define("winController", ["viewBuilderApi", "componentmodelComponentApi", "clientkernelLoaderApi", "slotModelApi", "displayEngineApi", "winControllerApi", "reelsApi", "gameLayoutApi", "PIXI", "BABYLON", "clientkernelEventbusApi", "clientkernelModulesApi"],
    function(viewBuilderApi, componentmodelComponentApi, clientkernelLoaderApi, slotModelApi, displayEngineApi, winControllerApi, reelsApi, gameLayoutApi, PIXI, BABYLON, clientkernelEventbusApi, clientkernelModulesApi) {
        "use strict";

        function $iterator(o) {
            if (o instanceof Array) return function() {
                return {
                    cur: 0,
                    arr: o,
                    hasNext: function() {
                        return this.cur < this.arr.length;
                    },
                    next: function() {
                        return this.arr[this.cur++];
                    }
                };
            };
            return typeof(o.iterator) == 'function' ? $bind(o, o.iterator) : o.iterator;
        };;
        var $fid = 0;

        function $bind(o, m) {
            if (m == null) return null;
            if (m.__id__ == null) m.__id__ = $fid++;
            var f;
            if (o.hx__closures__ == null) o.hx__closures__ = {};
            else f = o.hx__closures__[m.__id__];
            if (f == null) {
                f = function() {
                    return f.method.apply(f.scope, arguments);
                };
                f.scope = o;
                f.method = m;
                o.hx__closures__[m.__id__] = f;
            }
            return f;
        };
        var $_;
        var $estr = function() {
            return _hcmn_.js_Boot.__string_rec(this, '');
        };
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

        haxe.IMap = function() {}
        haxe.IMap.prototype = {

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            },
            set: function(k, v) {
                return {
                    arguments: ["*", "*"],
                    returns: "void"
                };
            },
            keys: function() {
                return {
                    arguments: [],
                    returns: "null"
                };
            },
            iterator: function() {
                return {
                    arguments: [],
                    returns: "null"
                };
            }
        };
        if (!haxe._Int64) {
            haxe._Int64 = {};
        };
        haxe._Int64.___Int64 = function(high, low) {
            this.high = high;
            this.low = low;
        };
        haxe._Int64.___Int64.__name__ = ["haxe", "_Int64", "___Int64"];
        haxe._Int64.___Int64.prototype.high = null;
        haxe._Int64.___Int64.prototype.low = null;
        haxe._Int64.___Int64.prototype.__class__ = haxe._Int64.___Int64;
        if (!haxe.ds) {
            haxe.ds = {};
        };
        haxe.ds.ObjectMap = function() {
            this.h = {};
            this.h.__keys__ = {};
        };
        haxe.ds.ObjectMap.__interfaces__ = [haxe.IMap];
        haxe.ds.ObjectMap.__name__ = ["haxe", "ds", "ObjectMap"];
        haxe.ds.ObjectMap.prototype.h = null;
        haxe.ds.ObjectMap.prototype.set = function(key, value) {
            var id = key.__id__ || (key.__id__ = ++haxe.ds.ObjectMap.count);
            this.h[id] = value;
            this.h.__keys__[id] = key;
        };
        haxe.ds.ObjectMap.prototype.get = function(key) {
            return this.h[key.__id__];
        };
        haxe.ds.ObjectMap.prototype.keys = function() {
            var a = [];
            for (var key in this.h.__keys__) {
                if (this.h.hasOwnProperty(key)) a.push(this.h.__keys__[key]);
            }
            return _hcmn_.HxOverrides.iter(a);
        };
        haxe.ds.ObjectMap.prototype.iterator = function() {
            return {
                ref: this.h,
                it: this.keys(),
                hasNext: function() {
                    return this.it.hasNext();
                },
                next: function() {
                    var i = this.it.next();
                    return this.ref[i.__id__];
                }
            };
        };
        haxe.ds.ObjectMap.prototype.__class__ = haxe.ds.ObjectMap;
        if (!haxe.ds._StringMap) {
            haxe.ds._StringMap = {};
        };
        haxe.ds._StringMap.StringMapIterator = function(map, keys) {
            this.map = map;
            this.keys = keys;
            this.index = 0;
            this.count = keys.length;
        };
        haxe.ds._StringMap.StringMapIterator.__name__ = ["haxe", "ds", "_StringMap", "StringMapIterator"];
        haxe.ds._StringMap.StringMapIterator.prototype.map = null;
        haxe.ds._StringMap.StringMapIterator.prototype.keys = null;
        haxe.ds._StringMap.StringMapIterator.prototype.index = null;
        haxe.ds._StringMap.StringMapIterator.prototype.count = null;
        haxe.ds._StringMap.StringMapIterator.prototype.hasNext = function() {
            return this.index < this.count;
        };
        haxe.ds._StringMap.StringMapIterator.prototype.next = function() {
            return this.map.get(this.keys[this.index++]);
        };
        haxe.ds._StringMap.StringMapIterator.prototype.__class__ = haxe.ds._StringMap.StringMapIterator;
        if (!haxe.io) {
            haxe.io = {};
        };
        haxe.io.Error = {
            __ename__: ["haxe", "io", "Error"],
            __constructs__: ["Blocked", "Overflow", "OutsideBounds", "Custom"]
        };
        haxe.io.Error.Custom = function(e) {
            var $x = ["Custom", 3, e];
            $x.__enum__ = haxe.io.Error;
            $x.toString = $estr;
            return $x;
        };
        haxe.io.Error.Blocked = ["Blocked", 0];
        haxe.io.Error.Blocked.toString = $estr;
        haxe.io.Error.Blocked.__enum__ = haxe.io.Error;
        haxe.io.Error.Overflow = ["Overflow", 1];
        haxe.io.Error.Overflow.toString = $estr;
        haxe.io.Error.Overflow.__enum__ = haxe.io.Error;
        haxe.io.Error.OutsideBounds = ["OutsideBounds", 2];
        haxe.io.Error.OutsideBounds.toString = $estr;
        haxe.io.Error.OutsideBounds.__enum__ = haxe.io.Error;
        haxe.io.FPHelper = function() {};
        haxe.io.FPHelper.__name__ = ["haxe", "io", "FPHelper"];
        haxe.io.FPHelper.i32ToFloat = function(i) {
            var sign = 1 - (i >>> 31 << 1);
            var exp = i >>> 23 & 255;
            var sig = i & 8388607;
            if (sig == 0 && exp == 0) return 0.0;
            return sign * (1 + _hcmn_.Math.pow(2, -23) * sig) * _hcmn_.Math.pow(2, exp - 127);
        };
        haxe.io.FPHelper.floatToI32 = function(f) {
            if (f == 0) return 0;
            var af;
            if (f < 0) af = -f;
            else af = f;
            var exp = _hcmn_.Math.floor(_hcmn_.Math.log(af) / 0.6931471805599453);
            if (exp < -127) exp = -127;
            else if (exp > 128) exp = 128;
            var sig = _hcmn_.Math.round((af / _hcmn_.Math.pow(2, exp) - 1) * 8388608) & 8388607;
            return (f < 0 ? -2147483648 : 0) | exp + 127 << 23 | sig;
        };
        haxe.io.FPHelper.i64ToDouble = function(low, high) {
            var sign = 1 - (high >>> 31 << 1);
            var exp = (high >> 20 & 2047) - 1023;
            var sig = (high & 1048575) * 4294967296. + (low >>> 31) * 2147483648. + (low & 2147483647);
            if (sig == 0 && exp == -1023) return 0.0;
            return sign * (1.0 + _hcmn_.Math.pow(2, -52) * sig) * _hcmn_.Math.pow(2, exp);
        };
        haxe.io.FPHelper.doubleToI64 = function(v) {
            var i64 = haxe.io.FPHelper.i64tmp;
            if (v == 0) {
                i64.low = 0;
                i64.high = 0;
            } else {
                var av;
                if (v < 0) av = -v;
                else av = v;
                var exp = _hcmn_.Math.floor(_hcmn_.Math.log(av) / 0.6931471805599453);
                var sig;
                var v1 = (av / _hcmn_.Math.pow(2, exp) - 1) * 4503599627370496.;
                sig = _hcmn_.Math.round(v1);
                var sig_l = sig | 0;
                var sig_h = sig / 4294967296.0 | 0;
                i64.low = sig_l;
                i64.high = (v < 0 ? -2147483648 : 0) | exp + 1023 << 20 | sig_h;
            }
            return i64;
        };
        haxe.io.FPHelper.prototype.__class__ = haxe.io.FPHelper;
        if (typeof js == 'undefined') {
            var js = {};
        };
        if (!js._Boot) {
            js._Boot = {};
        };
        js._Boot.HaxeError = function(val) {
            Error.call(this);
            this.val = val;
            this.message = String(val);
            if (Error.captureStackTrace) Error.captureStackTrace(this, js._Boot.HaxeError);
        };
        js._Boot.HaxeError.__name__ = ["js", "_Boot", "HaxeError"];
        js._Boot.HaxeError.__super__ = Error;
        for (var k in Error.prototype) js._Boot.HaxeError.prototype[k] = Error.prototype[k];
        js._Boot.HaxeError.prototype.val = null;
        js._Boot.HaxeError.prototype.__class__ = js._Boot.HaxeError;
        if (!js.html) {
            js.html = {};
        };
        if (!js.html.compat) {
            js.html.compat = {};
        };
        js.html.compat.ArrayBuffer = function(a) {
            if ((a instanceof Array) && a.__enum__ == null) {
                this.a = a;
                this.byteLength = a.length;
            } else {
                var len = a;
                this.a = [];
                var _g = 0;
                while (_g < len) {
                    var i = _g++;
                    this.a[i] = 0;
                }
                this.byteLength = len;
            }
        };
        js.html.compat.ArrayBuffer.__name__ = ["js", "html", "compat", "ArrayBuffer"];
        js.html.compat.ArrayBuffer.prototype.byteLength = null;
        js.html.compat.ArrayBuffer.prototype.a = null;
        js.html.compat.ArrayBuffer.prototype.slice = function(begin, end) {
            return new js.html.compat.ArrayBuffer(this.a.slice(begin, end));
        };
        js.html.compat.ArrayBuffer.sliceImpl = function(begin, end) {
            var u = new Uint8Array(this, begin, end == null ? null : end - begin);
            var result = new ArrayBuffer(u.byteLength);
            var resultArray = new Uint8Array(result);
            resultArray.set(u);
            return result;
        };
        js.html.compat.ArrayBuffer.prototype.__class__ = js.html.compat.ArrayBuffer;
        js.html.compat.DataView = function(buffer, byteOffset, byteLength) {
            this.buf = buffer;
            if (byteOffset == null) this.offset = 0;
            else this.offset = byteOffset;
            if (byteLength == null) this.length = buffer.byteLength - this.offset;
            else this.length = byteLength;
            if (this.offset < 0 || this.length < 0 || this.offset + this.length > buffer.byteLength) throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);
        };
        js.html.compat.DataView.__name__ = ["js", "html", "compat", "DataView"];
        js.html.compat.DataView.prototype.buf = null;
        js.html.compat.DataView.prototype.offset = null;
        js.html.compat.DataView.prototype.length = null;
        js.html.compat.DataView.prototype.getInt8 = function(byteOffset) {
            var v = this.buf.a[this.offset + byteOffset];
            if (v >= 128) return v - 256;
            else return v;
        };
        js.html.compat.DataView.prototype.getUint8 = function(byteOffset) {
            return this.buf.a[this.offset + byteOffset];
        };
        js.html.compat.DataView.prototype.getInt16 = function(byteOffset, littleEndian) {
            var v = this.getUint16(byteOffset, littleEndian);
            if (v >= 32768) return v - 65536;
            else return v;
        };
        js.html.compat.DataView.prototype.getUint16 = function(byteOffset, littleEndian) {
            if (littleEndian) return this.buf.a[this.offset + byteOffset] | this.buf.a[this.offset + byteOffset + 1] << 8;
            else return this.buf.a[this.offset + byteOffset] << 8 | this.buf.a[this.offset + byteOffset + 1];
        };
        js.html.compat.DataView.prototype.getInt32 = function(byteOffset, littleEndian) {
            var p = this.offset + byteOffset;
            var a = this.buf.a[p++];
            var b = this.buf.a[p++];
            var c = this.buf.a[p++];
            var d = this.buf.a[p++];
            if (littleEndian) return a | b << 8 | c << 16 | d << 24;
            else return d | c << 8 | b << 16 | a << 24;
        };
        js.html.compat.DataView.prototype.getUint32 = function(byteOffset, littleEndian) {
            var v = this.getInt32(byteOffset, littleEndian);
            if (v < 0) return v + 4294967296.;
            else return v;
        };
        js.html.compat.DataView.prototype.getFloat32 = function(byteOffset, littleEndian) {
            return haxe.io.FPHelper.i32ToFloat(this.getInt32(byteOffset, littleEndian));
        };
        js.html.compat.DataView.prototype.getFloat64 = function(byteOffset, littleEndian) {
            var a = this.getInt32(byteOffset, littleEndian);
            var b = this.getInt32(byteOffset + 4, littleEndian);
            return haxe.io.FPHelper.i64ToDouble(littleEndian ? a : b, littleEndian ? b : a);
        };
        js.html.compat.DataView.prototype.setInt8 = function(byteOffset, value) {
            if (value < 0) this.buf.a[byteOffset + this.offset] = value + 128 & 255;
            else this.buf.a[byteOffset + this.offset] = value & 255;
        };
        js.html.compat.DataView.prototype.setUint8 = function(byteOffset, value) {
            this.buf.a[byteOffset + this.offset] = value & 255;
        };
        js.html.compat.DataView.prototype.setInt16 = function(byteOffset, value, littleEndian) {
            this.setUint16(byteOffset, value < 0 ? value + 65536 : value, littleEndian);
        };
        js.html.compat.DataView.prototype.setUint16 = function(byteOffset, value, littleEndian) {
            var p = byteOffset + this.offset;
            if (littleEndian) {
                this.buf.a[p] = value & 255;
                this.buf.a[p++] = value >> 8 & 255;
            } else {
                this.buf.a[p++] = value >> 8 & 255;
                this.buf.a[p] = value & 255;
            }
        };
        js.html.compat.DataView.prototype.setInt32 = function(byteOffset, value, littleEndian) {
            this.setUint32(byteOffset, value, littleEndian);
        };
        js.html.compat.DataView.prototype.setUint32 = function(byteOffset, value, littleEndian) {
            var p = byteOffset + this.offset;
            if (littleEndian) {
                this.buf.a[p++] = value & 255;
                this.buf.a[p++] = value >> 8 & 255;
                this.buf.a[p++] = value >> 16 & 255;
                this.buf.a[p++] = value >>> 24;
            } else {
                this.buf.a[p++] = value >>> 24;
                this.buf.a[p++] = value >> 16 & 255;
                this.buf.a[p++] = value >> 8 & 255;
                this.buf.a[p++] = value & 255;
            }
        };
        js.html.compat.DataView.prototype.setFloat32 = function(byteOffset, value, littleEndian) {
            this.setUint32(byteOffset, haxe.io.FPHelper.floatToI32(value), littleEndian);
        };
        js.html.compat.DataView.prototype.setFloat64 = function(byteOffset, value, littleEndian) {
            var i64 = haxe.io.FPHelper.doubleToI64(value);
            if (littleEndian) {
                this.setUint32(byteOffset, i64.low);
                this.setUint32(byteOffset, i64.high);
            } else {
                this.setUint32(byteOffset, i64.high);
                this.setUint32(byteOffset, i64.low);
            }
        };
        js.html.compat.DataView.prototype.__class__ = js.html.compat.DataView;
        if (typeof winController == 'undefined') {
            var winController = {};
        };
        winController.Activator = function(context) {};
        winController.Activator = ck_implements(winController.Activator, clientkernelModulesApi.IModuleActivator);
        winController.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        winController.Activator.__name__ = ["winController", "Activator"];
        winController.Activator.prototype.start = function(context) {
            context.getServiceTracker([viewBuilderApi.IViewBuilderFactory, clientkernelLoaderApi.IAssetRegistry, displayEngineApi.IDisplayProvider, reelsApi.IReelsRegistryService]).then(function(context1) {
                var factory;
                factory = _hcmn_.js_Boot.__cast(context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null), viewBuilderApi.IViewBuilderFactory);
                context1.registerService(new winController.WinControllerFactory(factory, context1), winControllerApi.WinControllerDeclaration, null);
                context1.registerService(new winController.WinControllerPluginService(), winControllerApi.IWinControllerPluginService, null);
            });
        };
        winController.Activator.prototype.stop = function(context) {};
        winController.Activator.main = function() {};
        winController.Activator.prototype.__class__ = winController.Activator;
        winController.WinController = function(context, factory, moduleContext) {
            this.context = context;
            this.factory = factory;
            var prepareCommonModelPayload = new winController.PrepareCommonModelPayload();
            prepareCommonModelPayload.context = context;
            prepareCommonModelPayload.factory = factory;
            prepareCommonModelPayload.moduleContext = moduleContext;
            prepareCommonModelPayload.configurationsToLoad = ["win-controller-assets/win-controller-configuration", "slot-definition_json", "reel-config"];
            winController.CommonModel.winControllerConfiguration = new winControllerApi.WinControllerConfiguration();
            new winController.PrepareCommonsController().processMessage(new winController.Message("Common:PrepareConfiguration", prepareCommonModelPayload));
            var winControllerPluginService;
            winControllerPluginService = _hcmn_.js_Boot.__cast(moduleContext.getAnyService(winControllerApi.IWinControllerPluginService), winControllerApi.IWinControllerPluginService);
            new winController.PrepareCustomModel();
            new winController.PortController(winControllerPluginService);
            new winController.LayoutController();
            new winController.WinAnimationsController();
            new winController.PluginController(winControllerPluginService);
        };
        winController.WinController.__name__ = ["winController", "WinController"];
        winController.WinController.prototype.factory = null;
        winController.WinController.prototype.context = null;
        winController.WinController.prototype.cfgId = null;
        winController.WinController.prototype.__class__ = winController.WinController;
        winController.WinControllerFactory = function(vbf, moduleContext) {
            this.vbf = vbf;
            this.moduleContext = moduleContext;
        };
        winController.WinControllerFactory = ck_implements(winController.WinControllerFactory, clientkernelModulesApi.IService);
        winController.WinControllerFactory = ck_implements(winController.WinControllerFactory, componentmodelComponentApi.IComponentFactory);
        winController.WinControllerFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        winController.WinControllerFactory.__name__ = ["winController", "WinControllerFactory"];
        winController.WinControllerFactory.prototype.vbf = null;
        winController.WinControllerFactory.prototype.moduleContext = null;
        winController.WinControllerFactory.prototype.getComponentDeclaration = function() {
            return winControllerApi.WinControllerDeclaration;
        };
        winController.WinControllerFactory.prototype.createComponent = function(context) {
            var cfgId = context.getConfiguration();
            new winController.ReelModel(_hcmn_.js_Boot.__cast(this.moduleContext.getAnyService(reelsApi.IReelsRegistryService), reelsApi.IReelsRegistryService));
            new winController.WinController(context, this.vbf, this.moduleContext);
        };
        winController.WinControllerFactory.prototype.__class__ = winController.WinControllerFactory;
        winController.WinControllerPluginService = function() {
            this.constructed = false;
            this.allModelsReady = 0;
        };
        winController.WinControllerPluginService = ck_implements(winController.WinControllerPluginService, clientkernelModulesApi.IService);
        winController.WinControllerPluginService = ck_implements(winController.WinControllerPluginService, winControllerApi.IWinControllerPluginService);
        winController.WinControllerPluginService.__interfaces__ = [clientkernelModulesApi.IService, winControllerApi.IWinControllerPluginService];
        winController.WinControllerPluginService.__name__ = ["winController", "WinControllerPluginService"];
        winController.WinControllerPluginService.prototype.allModelsReady = null;
        winController.WinControllerPluginService.prototype.scatterSymbolsModel = null;
        winController.WinControllerPluginService.prototype.rulesModel = null;
        winController.WinControllerPluginService.prototype.reelModel = null;
        winController.WinControllerPluginService.prototype.winSymbolModel = null;
        winController.WinControllerPluginService.prototype.constructed = null;
        winController.WinControllerPluginService.prototype.dispose = function() {
            var $it0 = winController.WinControllerPluginService.plugins.iterator();
            while ($it0.hasNext()) {
                var plugin = $it0.next();
                plugin.dispose();
            }
        };
        winController.WinControllerPluginService.prototype.registerPlugin = function(name, instance) {
            winController.WinControllerPluginService.plugins.set(name, instance);
            if (this.constructed) {
                winController.WinControllerPluginService.plugins.get(name).setContainer(winController.WinControllerPluginService.containers.get(name));
                winController.WinControllerPluginService.plugins.get(name).setLoadedAssets(winController.CommonModel.loadedAssets);
                winController.WinControllerPluginService.plugins.get(name).setWinAnimationRulesModel(this.rulesModel);
                winController.WinControllerPluginService.plugins.get(name).setReelLayoutModel(this.reelModel);
                winController.WinControllerPluginService.plugins.get(name).setWinSymbolsModel(this.winSymbolModel);
                if (_hcmn_.Std["is"](winController.WinControllerPluginService.plugins.get(name), winControllerApi.IWinControllerScatterPluginExtension) && this.scatterSymbolsModel != null) {
                    var scatterBasedPlugin;
                    scatterBasedPlugin = _hcmn_.js_Boot.__cast(winController.WinControllerPluginService.plugins.get(name), winControllerApi.IWinControllerScatterPluginExtension);
                    scatterBasedPlugin.setScatterLandingModel(this.scatterSymbolsModel);
                }
                winController.WinControllerPluginService.plugins.get(name).ready();
            }
        };
        winController.WinControllerPluginService.prototype.showWin = function(type, win) {
            var $it0 = winController.WinControllerPluginService.plugins.iterator();
            while ($it0.hasNext()) {
                var plugin = $it0.next();
                plugin.setCurrentWin(type, win);
            }
        };
        winController.WinControllerPluginService.prototype.registerSubContainer = function(name, dispay) {
            winController.WinControllerPluginService.containers.set(name, dispay);
        };
        winController.WinControllerPluginService.prototype.construct = function() {
            this.rulesModel = new winControllerApi.WinAnimationsRulesModel(winController.CommonModel.winControllerConfiguration.winAnimationRules);
            winController.CommonModel.interval = this.rulesModel.get_winLineInterval();
            winController.WinControllerPluginService.reelPort = _hcmn_.js_Boot.__cast(winController.CommonModel.context.getUsedPort(reelsApi.IReelsPort), reelsApi.IReelsPort);
            winController.WinControllerPluginService.reelsRegistryService = _hcmn_.js_Boot.__cast(winController.CommonModel.moduleContext.getAnyService(reelsApi.IReelsRegistryService), reelsApi.IReelsRegistryService);
            this.scatterSymbolsModel = null;
            this.winSymbolModel = new winControllerApi.WinSymbolModel(null, null, null);
            var $it0 = (function($this) {
                var $r;
                var this1 = winController.ConfigurationModel.get_frameColors();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var fcolor = $it0.next();
                this.winSymbolModel.setLineColor(fcolor, (function($this) {
                    var $r;
                    var this2 = winController.ConfigurationModel.get_frameColors();
                    $r = this2.get(fcolor);
                    return $r;
                }(this)));
            }
            this.reelModel = new winControllerApi.ReelLayoutModel(null, null, winController.WinControllerPluginService.reelPort, winController.WinControllerPluginService.reelsRegistryService, winController.ReelModel.WIN_SYMBOL_ROW_OFFSET);
            if (winController.WinSymbolsModel.hasScattersLanding()) {
                var scatterAssetsMap = new _hcmn_.haxe_ds_StringMap();
                var scatterFramesMap = new _hcmn_.haxe_ds_StringMap();
                var $it1 = (function($this) {
                    var $r;
                    var this3 = winController.WinSymbolsModel.get_scatterLandingSymbolsViewDefinitionsMap();
                    $r = this3.iterator();
                    return $r;
                }(this));
                while ($it1.hasNext()) {
                    var scdef = $it1.next();
                    var key = scdef.get_id();
                    var value = scdef.get_landingAnimation();
                    if (_hcmn_.__map_reserved[key] != null) scatterAssetsMap.setReserved(key, value);
                    else scatterAssetsMap.h[key] = value;
                    var key1 = scdef.get_id();
                    var value1 = scdef.get_landingFrame();
                    if (_hcmn_.__map_reserved[key1] != null) scatterFramesMap.setReserved(key1, value1);
                    else scatterFramesMap.h[key1] = value1;
                }
                this.scatterSymbolsModel = new winControllerApi.ScatterSymbolsModel(scatterAssetsMap, scatterFramesMap);
            }
            var $it2 = winController.WinControllerPluginService.plugins.keys();
            while ($it2.hasNext()) {
                var key2 = $it2.next();
                var plugin = winController.WinControllerPluginService.plugins.get(key2);
                plugin.setContainer(winController.WinControllerPluginService.containers.get(key2));
                plugin.setLoadedAssets(winController.CommonModel.loadedAssets);
                plugin.setWinAnimationRulesModel(this.rulesModel);
                plugin.setReelLayoutModel(this.reelModel);
                plugin.setWinSymbolsModel(this.winSymbolModel);
                if (_hcmn_.js_Boot.__instanceof(plugin, winControllerApi.IWinControllerScatterPluginExtension) && this.scatterSymbolsModel != null) {
                    var scatterBasedPlugin;
                    scatterBasedPlugin = _hcmn_.js_Boot.__cast(plugin, winControllerApi.IWinControllerScatterPluginExtension);
                    scatterBasedPlugin.setScatterLandingModel(this.scatterSymbolsModel);
                }
            }
            this.constructed = true;
        };
        winController.WinControllerPluginService.prototype.getAllContainers = function() {
            return winController.WinControllerPluginService.containers;
        };
        winController.WinControllerPluginService.prototype.getAllPlugins = function() {
            return winController.WinControllerPluginService.plugins;
        };
        winController.WinControllerPluginService.prototype.getReelRow = function(row) {
            if (winController.ReelModel.MANUAL_ROW_SET) return row + winController.ReelModel.WIN_SYMBOL_ROW_OFFSET;
            if (winController.ReelModel.WIN_SYMBOL_ROW_OFFSET > 0) return row + winController.ReelModel.WIN_SYMBOL_ROW_OFFSET;
            else if (winController.ReelModel.WIN_SYMBOL_ROW_OFFSET == 0) return row + 1;
            else return row;
        };
        winController.WinControllerPluginService.prototype.updateReelData = function() {
            if (!this.constructed) this.construct();
            this.rulesModel.winRules = winController.CommonModel.winControllerConfiguration.winAnimationRules;
            var activeReelData = winController.ReelModel.getWinControllerReelData();
            if (activeReelData == null) activeReelData = winController.ReelModel.getOriginalReelData();
            if (activeReelData == null) return;
            var reelPositions = [];
            var _g1 = 0;
            var _g = activeReelData.length;
            while (_g1 < _g) {
                var column = _g1++;
                var vectorArray = [];
                var _g3 = 0;
                var _g2 = activeReelData[column].length;
                while (_g3 < _g2) {
                    var row = _g3++;
                    vectorArray.push(new winControllerApi.Vector2D(winController.ReelModel.getXonReel(this.getReelRow(row), column), winController.ReelModel.getYonReel(this.getReelRow(row), column)));
                }
                reelPositions.push(vectorArray);
            }
            this.reelModel.reelPositions = reelPositions;
            this.reelModel.reelPicture = activeReelData;
            var winSymbolsAssetMap = new _hcmn_.haxe_ds_StringMap();
            var activeWinFramesAssetMap = new _hcmn_.haxe_ds_StringMap();
            var inactiveWinFramesAssetMap = new _hcmn_.haxe_ds_StringMap();
            var winSymbolsDefinitions = winController.WinSymbolsModel.get_winSymbolsViewDefinitionsMap();
            winController.WinSymbolsModel.updateWinFrames();
            var $it0 = new haxe.ds._StringMap.StringMapIterator(winSymbolsDefinitions, winSymbolsDefinitions.arrayKeys());
            while ($it0.hasNext()) {
                var wsd = $it0.next();
                winSymbolsAssetMap.set(wsd.id, wsd.winAnimationID);
                var value = winController.WinSymbolsModel.getFrameAssetId(true, wsd.activeFrameId);
                activeWinFramesAssetMap.set(wsd.id, value);
                var value1 = winController.WinSymbolsModel.getFrameAssetId(false, wsd.inactiveFrameId);
                inactiveWinFramesAssetMap.set(wsd.id, value1);
            }
            this.winSymbolModel.winSymbolsAssetMap = winSymbolsAssetMap;
            this.winSymbolModel.activeWinFramesAssetMap = activeWinFramesAssetMap;
            this.winSymbolModel.inactiveWinFramesAssetMap = inactiveWinFramesAssetMap;
            var $it1 = winController.WinControllerPluginService.plugins.iterator();
            while ($it1.hasNext()) {
                var plugin = $it1.next();
                if (winController.WinControllerPluginService.ready == false) plugin.ready();
            }
            winController.WinControllerPluginService.ready = true;
        };
        winController.WinControllerPluginService.reelPort = null;
        winController.WinControllerPluginService.reelsRegistryService = null;
        winController.WinControllerPluginService.prototype.__class__ = winController.WinControllerPluginService;
        winController.Controller = function(controllerInstance, register) {
            if (register == null) register = true;
            if (register) winController.Controller._CONTROLLERS.push(controllerInstance);
        };
        winController.Controller.__name__ = ["winController", "Controller"];
        winController.Controller.prototype.sendMessage = function(message) {
            var _g1 = 0;
            var _g = winController.Controller._CONTROLLERS.length;
            while (_g1 < _g) {
                var i = _g1++;
                var controller = winController.Controller._CONTROLLERS[i];
                var controllerEvents = controller.getInterests();
                if (_hcmn_.HxOverrides.indexOf(controllerEvents, message.messageName, 0) > -1) {
                    var _g3 = 0;
                    var _g2 = controllerEvents.length;
                    while (_g3 < _g2) {
                        var m = _g3++;
                        var interestedInMessage = controllerEvents[m];
                        if (interestedInMessage == message.messageName) {
                            controller.processMessage(message);
                            break;
                        }
                    }
                }
            }
        };
        winController.Controller.prototype.getInterests = function() {
            return [];
        };
        winController.Controller.prototype.processMessage = function(message) {};
        winController.Controller.prototype.__class__ = winController.Controller;
        winController.LayoutController = function() {
            winController.Controller.call(this, this);
        };
        winController.LayoutController.__name__ = ["winController", "LayoutController"];
        winController.LayoutController.__super__ = winController.Controller;
        for (var k in winController.Controller.prototype) winController.LayoutController.prototype[k] = winController.Controller.prototype[k];
        winController.LayoutController.prototype.layoutMediator = null;
        winController.LayoutController.prototype.getInterests = function() {
            return ["initialise", "UPDATE_LAYOUT", "addSubContainer"];
        };
        winController.LayoutController.prototype.processMessage = function(message) {
            var _g = message.messageName;
            switch (_g) {
                case "initialise":
                    this.initialise();
                    break;
                case "UPDATE_LAYOUT":
                    this.layoutMediator.updateLayout(message.messageData);
                    break;
                case "addSubContainer":
                    this.layoutMediator.addSubContainers(message.messageData);
                    break;
            }
        };
        winController.LayoutController.prototype.initialise = function() {
            this.layoutMediator = new winController.LayoutMediator();
            this.layoutMediator.prepareView(winController.CommonModel.factory, winController.CommonModel.loadedAssets, winController.CommonModel.layoutPayload);
        };
        winController.LayoutController.prototype.__class__ = winController.LayoutController;
        winController.PluginController = function(pluginService) {
            this.masks = new haxe.ds.ObjectMap();
            this.pluginService = pluginService;
            winController.Controller.call(this, this);
        };
        winController.PluginController.__name__ = ["winController", "PluginController"];
        winController.PluginController.__super__ = winController.Controller;
        for (var k in winController.Controller.prototype) winController.PluginController.prototype[k] = winController.Controller.prototype[k];
        winController.PluginController.prototype.pluginService = null;
        winController.PluginController.prototype.masks = null;
        winController.PluginController.prototype.getInterests = function() {
            return ["registerPlugins", "initialise", "showOutcome", "dispose", "showCurrentWin", "showScatterLanding", "updateReelData", "stopScatterLanding", "implementOverlapInWin", "showSummary"];
        };
        winController.PluginController.prototype.processMessage = function(message) {
            var _g = message.messageName;
            switch (_g) {
                case "registerPlugins":
                    var pluginsToRegister = winController.ConfigurationModel.getSubComponentsInZOrder();
                    var _g1 = 0;
                    while (_g1 < pluginsToRegister.length) {
                        var desc = pluginsToRegister[_g1];
                        ++_g1;
                        var container = winController.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
                        container.setName(desc.name);
                        this.pluginService.registerSubContainer(desc.name, container);
                        var _g2 = desc.name;
                        switch (_g2) {
                            case "WIN_SYMBOLS":
                                this.pluginService.registerPlugin(desc.name, new winController.WinSymbolsPlugin());
                                break;
                            case "WIN_FRAMES":
                                this.pluginService.registerPlugin(desc.name, new winController.WinFramesPlugin());
                                break;
                            case "SCATTER_SYMBOLS":
                                this.pluginService.registerPlugin(desc.name, new winController.ScatterSymbolsPlugin());
                                break;
                            case "REEL_FRAME":
                                this.pluginService.registerPlugin(desc.name, new winController.ReelFramePlugin());
                                break;
                            case "BONUS_SYMBOLS":
                                this.pluginService.registerPlugin(desc.name, new winController.BonusSymbolsPlugin());
                                break;
                            case "SPAGHETTI":
                                this.pluginService.registerPlugin(desc.name, new winController.SpaghettiPlugin());
                                break;
                            default:
                        }
                    }
                    break;
                case "initialise":
                    this.sendMessage(new winController.Message("addSubContainer", this.pluginService.getAllContainers()));
                    break;
                case "showOutcome":
                    this.pluginService.updateReelData();
                    var $it0 = (function($this) {
                        var $r;
                        var this1 = $this.pluginService.getAllPlugins();
                        $r = this1.iterator();
                        return $r;
                    }(this));
                    while ($it0.hasNext()) {
                        var plugin = $it0.next();
                        plugin.setOutcome(message.messageData);
                    }
                    break;
                case "dispose":
                    var $it1 = (function($this) {
                        var $r;
                        var this2 = $this.pluginService.getAllPlugins();
                        $r = this2.iterator();
                        return $r;
                    }(this));
                    while ($it1.hasNext()) {
                        var plugin1 = $it1.next();
                        plugin1.dispose();
                    }
                    break;
                case "showCurrentWin":
                    var $it2 = (function($this) {
                        var $r;
                        var this3 = $this.pluginService.getAllPlugins();
                        $r = this3.iterator();
                        return $r;
                    }(this));
                    while ($it2.hasNext()) {
                        var plugin2 = $it2.next();
                        var win = message.messageData;
                        plugin2.setCurrentWin(win.type, win);
                    }
                    break;
                case "showScatterLanding":
                    var $it3 = (function($this) {
                        var $r;
                        var this4 = $this.pluginService.getAllPlugins();
                        $r = this4.iterator();
                        return $r;
                    }(this));
                    while ($it3.hasNext()) {
                        var plugin3 = $it3.next();
                        if (_hcmn_.js_Boot.__instanceof(plugin3, winControllerApi.IWinControllerScatterPluginExtension)) {
                            var scatterType = plugin3;
                            scatterType.showScatterLanding(message.messageData);
                        }
                    }
                    break;
                case "stopScatterLanding":
                    var $it4 = (function($this) {
                        var $r;
                        var this5 = $this.pluginService.getAllPlugins();
                        $r = this5.iterator();
                        return $r;
                    }(this));
                    while ($it4.hasNext()) {
                        var plugin4 = $it4.next();
                        if (_hcmn_.js_Boot.__instanceof(plugin4, winControllerApi.IWinControllerScatterPluginExtension)) {
                            var scatterType1 = plugin4;
                            scatterType1.hideScatterLanding(message.messageData);
                        }
                    }
                    break;
                case "updateReelData":
                    this.pluginService.updateReelData();
                    break;
                case "implementOverlapInWin":
                    var $it5 = (function($this) {
                        var $r;
                        var this6 = $this.pluginService.getAllPlugins();
                        $r = this6.iterator();
                        return $r;
                    }(this));
                    while ($it5.hasNext()) {
                        var plugin5 = $it5.next();
                        if (_hcmn_.js_Boot.__instanceof(plugin5, winControllerApi.IWinControllerOverlapablePluginExtension)) {
                            var overlapType;
                            overlapType = _hcmn_.js_Boot.__cast(plugin5, winControllerApi.IWinControllerOverlapablePluginExtension);
                            overlapType.setOverlapMap(message.messageData);
                        }
                    }
                    break;
                case "showSummary":
                    var $it6 = (function($this) {
                        var $r;
                        var this7 = $this.pluginService.getAllPlugins();
                        $r = this7.iterator();
                        return $r;
                    }(this));
                    while ($it6.hasNext()) {
                        var plugin6 = $it6.next();
                        var wins = message.messageData;
                        plugin6.showSummery(wins);
                    }
                    break;
            }
        };
        winController.PluginController.prototype.__class__ = winController.PluginController;
        winController.PortController = function(winControllerPluginService) {
            this.commonModelPrepared = false;
            winController.Controller.call(this, this);
            this.winControllerPluginService = winControllerPluginService;
        };
        winController.PortController.__name__ = ["winController", "PortController"];
        winController.PortController.__super__ = winController.Controller;
        for (var k in winController.Controller.prototype) winController.PortController.prototype[k] = winController.Controller.prototype[k];
        winController.PortController.prototype.layoutPort = null;
        winController.PortController.prototype.winControllerPort = null;
        winController.PortController.prototype.reelImplementationPort = null;
        winController.PortController.prototype.reelPort = null;
        winController.PortController.prototype.commonWinRequest = null;
        winController.PortController.prototype.renderTimer = null;
        winController.PortController.prototype.winControllerPluginService = null;
        winController.PortController.prototype.commonModelPrepared = null;
        winController.PortController.prototype.componentLayout = null;
        winController.PortController.prototype.setupListeners = function() {
            this.winControllerPort.showWin().subscribe($bind(this, this.showWinRequest));
            this.winControllerPort.requestConfiguration().subscribe($bind(this, this.requestConfiguration));
            this.winControllerPort.dispose().subscribe($bind(this, this.dispose));
            this.winControllerPort.reconfigure().subscribe($bind(this, this.reconfigure));
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.componentUpdate));
            this.reelImplementationPort.startSpin().subscribe($bind(this, this.startSpinListener));
            this.reelImplementationPort.stopSpin().subscribe($bind(this, this.stopSpinListener));
            this.reelImplementationPort.setReelPicture().subscribe($bind(this, this.setReelPicture));
            this.reelPort.onReelStopped().subscribe($bind(this, this.onReelStoped));
            this.reelPort.onSpinStopped().subscribe($bind(this, this.onSpinStoped));
        };
        winController.PortController.prototype.setReelPicture = function(e) {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                winController.ReelModel.setOriginalReelData(e.getPayload());
                _g.sendMessage(new winController.Message("updateReelData"));
            }, 0);
        };
        winController.PortController.prototype.reconfigure = function(e) {
            this.sendMessage(new winController.Message("updateReelData"));
        };
        winController.PortController.prototype.requestConfiguration = function(e) {
            e.reply(winController.CommonModel.winControllerConfiguration);
        };
        winController.PortController.prototype.onSpinStoped = function(e) {
            this.sendMessage(new winController.Message("stopScatterLanding", true));
        };
        winController.PortController.prototype.stopSpinListener = function(e) {
            if (!winController.WinSymbolsModel.hasScattersLanding()) return;
            winController.ReelModel.setWinControllerReelData(null);
            winController.ReelModel.setOriginalReelData(e.getPayload().reelPicture);
            this.sendMessage(new winController.Message("updateReelData"));
        };
        winController.PortController.prototype.onReelStoped = function(e) {
            if (!winController.WinSymbolsModel.hasScattersLanding()) return;
            var $it0 = (function($this) {
                var $r;
                var this1 = winController.WinSymbolsModel.get_scatterLandingSymbolsViewDefinitionsMap();
                $r = this1.iterator();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var ss = $it0.next();
                var column = e.getPayload();
                var _g1 = 0;
                var _g = winController.ReelModel.getOriginalReelData()[column].length;
                while (_g1 < _g) {
                    var row = _g1++;
                    var reelID = winController.ReelModel.getOriginalReelData()[column][row];
                    if (reelID == ss.get_id()) this.sendMessage(new winController.Message("showScatterLanding", new winControllerApi.AnimateScatterLandingPayload(reelID, row, column)));
                }
            }
        };
        winController.PortController.prototype.dispose = function(e) {
            if (this.renderTimer != null) {
                this.renderTimer.stop();
                this.renderTimer = null;
            }
            if (this.commonWinRequest != null) {
                this.commonWinRequest.reply(null);
                this.commonWinRequest = null;
            }
            this.sendMessage(new winController.Message("dispose"));
        };
        winController.PortController.prototype.startSpinListener = function(e) {
            this.sendMessage(new winController.Message("dispose"));
            winController.OptimizationModel.optimisePool();
        };
        winController.PortController.prototype.showWinRequest = function(e) {
            var _g = this;
            this.commonWinRequest = e;
            var commonWinPayload = e.getPayload();
            winController.ReelModel.setWinControllerReelData(commonWinPayload.outcome.reelStop.reels);
            var allWins = [];
            var outcome = commonWinPayload.outcome;
            var hasLineWins = outcome.lineWins != null && outcome.lineWins.length > 0;
            var hasBonus = outcome.bonusWins != null && outcome.bonusWins.length > 0;
            var hasScatter = outcome.scatterWins != null && outcome.scatterWins.length > 0;
            var overlapComparanceMap = new _hcmn_.haxe_ds_StringMap();
            var overlapMap = new _hcmn_.haxe_ds_IntMap();
            winController.WinSymbolsModel.setFrozenSymbols(commonWinPayload.frozenSymbols);
            winController.WinSymbolsModel.setHighWinValue(this.commonWinRequest.getPayload().isHighWin);
            winController.WinSymbolsModel.setStopFrameName(this.commonWinRequest.getPayload().stopFrameName);
            if (hasLineWins) {
                allWins = allWins.concat(outcome.lineWins);
                var _g1 = 0;
                var _g2 = outcome.lineWins.length;
                while (_g1 < _g2) {
                    var s = _g1++;
                    var reelsInfo = outcome.lineWins[s].winPath.reelsInfo;
                    var lineID = outcome.lineWins[s].lineId;
                    var _g3 = 0;
                    var _g21 = reelsInfo.length;
                    while (_g3 < _g21) {
                        var column = _g3++;
                        var _g5 = 0;
                        var _g4 = reelsInfo[column].length;
                        while (_g5 < _g4) {
                            var row = _g5++;
                            if (reelsInfo[column][row] == 1) overlapComparanceMap.set(column + "_" + row, lineID);
                        }
                    }
                }
            }
            if (hasScatter) {
                allWins = allWins.concat(outcome.scatterWins);
                if (hasLineWins) {
                    var _g11 = 0;
                    var _g6 = outcome.scatterWins.length;
                    while (_g11 < _g6) {
                        var s1 = _g11++;
                        var reelsInfo1 = outcome.scatterWins[s1].winPath.reelsInfo;
                        var lineID1 = outcome.scatterWins[s1].lineId;
                        var _g31 = 0;
                        var _g22 = reelsInfo1.length;
                        while (_g31 < _g22) {
                            var column1 = _g31++;
                            var _g51 = 0;
                            var _g41 = reelsInfo1[column1].length;
                            while (_g51 < _g41) {
                                var row1 = _g51++;
                                if (reelsInfo1[column1][row1] == 1) {
                                    var id = column1 + "_" + row1;
                                    if (_hcmn_.__map_reserved[id] != null ? overlapComparanceMap.existsReserved(id) : overlapComparanceMap.h.hasOwnProperty(id)) {
                                        var key;
                                        key = _hcmn_.__map_reserved[id] != null ? overlapComparanceMap.getReserved(id) : overlapComparanceMap.h[id];
                                        overlapMap.h[key] = lineID1;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            overlapComparanceMap = new _hcmn_.haxe_ds_StringMap();
            if (hasBonus) {
                var _g7 = 0;
                var _g12 = outcome.bonusWins;
                while (_g7 < _g12.length) {
                    var bw = _g12[_g7];
                    ++_g7;
                    if (bw.type == winControllerApi.BonusWinLine.TYPE) allWins.push(bw);
                }
            }
            if (allWins.length > 0) {
                this.sendMessage(new winController.Message("animateWin", new winController.AnimateWinRequest(allWins, outcome, overlapMap)));
                _hcmn_.haxe_Timer.delay(function() {
                    _g.sendMessage(new winController.Message("UPDATE_LAYOUT", _g.componentLayout));
                }, 0);
            }
        };
        winController.PortController.prototype.componentUpdate = function(e) {
            if (!this.commonModelPrepared) return;
            this.componentLayout = e.getPayload();
            this.sendMessage(new winController.Message("UPDATE_LAYOUT", e.getPayload()));
            this.layoutPort.getComponentLayoutUpdated().publish(winController.CommonModel.instance);
        };
        winController.PortController.prototype.getInterests = function() {
            return ["initialise", "commonWinAnimationCycleEnded", "showCurrentWin", "commonModelPrepared"];
        };
        winController.PortController.prototype.processMessage = function(message) {
            var _g = message.messageName;
            switch (_g) {
                case "initialise":
                    this.initialise();
                    break;
                case "commonWinAnimationCycleEnded":
                    if (this.commonWinRequest != null) {
                        if (_hcmn_.js_Boot.__cast(message.messageData.status, _hcmn_.Bool) == true) this.commonWinRequest.reply(null);
                        else this.commonWinRequest.reject(message.messageData.body);
                        this.commonWinRequest = null;
                    }
                    this.winControllerPort.onWinCycleFinished().publish(null);
                    break;
                case "showCurrentWin":
                    var win = message.messageData;
                    this.winControllerPort.onCurrentWinLine().publish(new winControllerApi.CurrentWinLinePayload(win));
                    break;
                case "commonModelPrepared":
                    this.commonModelPrepared = true;
                    break;
            }
        };
        winController.PortController.prototype.initialise = function() {
            this.layoutPort = _hcmn_.js_Boot.__cast(winController.CommonModel.context.getUsedPort(gameLayoutApi.IGameLayoutPort), gameLayoutApi.IGameLayoutPort);
            this.winControllerPort = _hcmn_.js_Boot.__cast(winController.CommonModel.context.getImplementedPort(winControllerApi.IWinControllerImplementationPort), winControllerApi.IWinControllerImplementationPort);
            this.reelImplementationPort = _hcmn_.js_Boot.__cast(winController.CommonModel.context.getUsedPort(reelsApi.IReelsPort), reelsApi.IReelsImplementationPort);
            this.reelPort = _hcmn_.js_Boot.__cast(winController.CommonModel.context.getUsedPort(reelsApi.IReelsPort), reelsApi.IReelsPort);
            this.setupListeners();
            this.layoutPort.getComponentLayoutUpdated().publish(winController.CommonModel.instance);
        };
        winController.PortController.prototype.__class__ = winController.PortController;
        winController.PrepareCustomModel = function() {
            winController.Controller.call(this, this);
        };
        winController.PrepareCustomModel.__name__ = ["winController", "PrepareCustomModel"];
        winController.PrepareCustomModel.__super__ = winController.Controller;
        for (var k in winController.Controller.prototype) winController.PrepareCustomModel.prototype[k] = winController.Controller.prototype[k];
        winController.PrepareCustomModel.prototype.getInterests = function() {
            return ["commonModelPrepared"];
        };
        winController.PrepareCustomModel.prototype.processMessage = function(message) {
            var _g = message.messageName;
            switch (_g) {
                case "commonModelPrepared":
                    this.prepareCustomModel();
                    break;
            }
        };
        winController.PrepareCustomModel.prototype.prepareCustomModel = function() {
            this.sendMessage(new winController.Message("initialise"));
        };
        winController.PrepareCustomModel.prototype.__class__ = winController.PrepareCustomModel;
        winController.WinAnimationsController = function() {
            this.threadOutOfBounds = false;
            winController.Controller.call(this, this);
        };
        winController.WinAnimationsController.__name__ = ["winController", "WinAnimationsController"];
        winController.WinAnimationsController.__super__ = winController.Controller;
        for (var k in winController.Controller.prototype) winController.WinAnimationsController.prototype[k] = winController.Controller.prototype[k];
        winController.WinAnimationsController.prototype.renderTimer = null;
        winController.WinAnimationsController.prototype.win = null;
        winController.WinAnimationsController.prototype.winAnimationRules = null;
        winController.WinAnimationsController.prototype.threadOutOfBounds = null;
        winController.WinAnimationsController.prototype.getInterests = function() {
            return ["dispose", "animateWin", "winSymbolsFinished"];
        };
        winController.WinAnimationsController.prototype.animateWin = function(win) {
            var _g = this;
            this.sendMessage(new winController.Message("dispose"));
            this.threadOutOfBounds = false;
            if (this.renderTimer != null) this.dispose();
            var activeWin = 0;
            var allWins = win.allWins;
            var outcome = win.outcome;
            var hasOverlap = false;
            var $it0 = win.overlapMap.iterator();
            while ($it0.hasNext()) {
                var ovelapPair = $it0.next();
                hasOverlap = true;
                break;
            }
            if (hasOverlap) this.sendMessage(new winController.Message("implementOverlapInWin", win.overlapMap));
            this.sendMessage(new winController.Message("showOutcome", outcome));
            this.sendMessage(new winController.Message("showCurrentWin", allWins[activeWin]));
            this.renderTimer = new _hcmn_.haxe_Timer(this.winAnimationRules.winLineInterval);
            this.renderTimer.run = function() {
                activeWin++;
                if (activeWin == allWins.length) {
                    _g.renderTimer.stop();
                    _g.sendMessage(new winController.Message("winSymbolsFinished"));
                } else _g.sendMessage(new winController.Message("showCurrentWin", allWins[activeWin]));
            };
        };
        winController.WinAnimationsController.prototype.processMessage = function(message) {
            var _g1 = this;
            var _g = message.messageName;
            switch (_g) {
                case "dispose":
                    this.dispose();
                    this.threadOutOfBounds = true;
                    break;
                case "animateWin":
                    this.win = message.messageData;
                    this.winAnimationRules = winController.CommonModel.winControllerConfiguration.winAnimationRules;
                    if (this.winAnimationRules.showSummary.show == true && this.winAnimationRules.showSummary.type == winControllerApi.SummaryRules.SUMMARY_TYPE_BEGINNING) {
                        this.sendMessage(new winController.Message("showSummary", this.win.allWins));
                        _hcmn_.haxe_Timer.delay(function() {
                            if (!_g1.threadOutOfBounds) _g1.animateWin(_g1.win);
                        }, this.winAnimationRules.winLineInterval);
                    } else if (this.winAnimationRules.showSummary.show == true && this.winAnimationRules.showSummary.type == winControllerApi.SummaryRules.SUMMARY_TYPE_ONLY) {
                        this.sendMessage(new winController.Message("showOutcome", this.win.outcome));
                        this.sendMessage(new winController.Message("showSummary", this.win.allWins));
                        if (this.renderTimer != null) this.renderTimer.stop();
                        this.renderTimer = new _hcmn_.haxe_Timer(this.winAnimationRules.winLineInterval);
                        this.renderTimer.run = function() {
                            _g1.sendMessage(new winController.Message("commonWinAnimationCycleEnded", {
                                status: true,
                                data: null
                            }));
                        };
                    } else this.animateWin(this.win);
                    break;
                case "winSymbolsFinished":
                    if (this.winAnimationRules.showSummary.show == true && this.winAnimationRules.showSummary.type == winControllerApi.SummaryRules.SUMMARY_TYPE_END) {
                        this.sendMessage(new winController.Message("showSummary", this.win.allWins));
                        _hcmn_.haxe_Timer.delay(function() {
                            if (!_g1.threadOutOfBounds) {
                                _g1.sendMessage(new winController.Message("commonWinAnimationCycleEnded", {
                                    status: true,
                                    data: null
                                }));
                                _hcmn_.haxe_Timer.delay(function() {
                                    if (!_g1.threadOutOfBounds) _g1.animateWin(_g1.win);
                                }, 10);
                            }
                        }, this.winAnimationRules.winLineInterval);
                    } else {
                        this.sendMessage(new winController.Message("commonWinAnimationCycleEnded", {
                            status: true,
                            data: null
                        }));
                        _hcmn_.haxe_Timer.delay(function() {
                            if (!_g1.threadOutOfBounds) _g1.animateWin(_g1.win);
                        }, 10);
                    }
                    break;
            }
        };
        winController.WinAnimationsController.prototype.dispose = function() {
            if (this.renderTimer != null) {
                this.renderTimer.stop();
                this.renderTimer = null;
            }
        };
        winController.WinAnimationsController.prototype.__class__ = winController.WinAnimationsController;
        winController.Mediator = function() {
            winController.Controller.call(this, null, false);
        };
        winController.Mediator.__name__ = ["winController", "Mediator"];
        winController.Mediator.__super__ = winController.Controller;
        for (var k in winController.Controller.prototype) winController.Mediator.prototype[k] = winController.Controller.prototype[k];
        winController.Mediator.prototype.__class__ = winController.Mediator;
        winController.LayoutMediator = function() {
            this.masks = new haxe.ds.ObjectMap();
            winController.Mediator.call(this);
        };
        winController.LayoutMediator.__name__ = ["winController", "LayoutMediator"];
        winController.LayoutMediator.__super__ = winController.Mediator;
        for (var k in winController.Mediator.prototype) winController.LayoutMediator.prototype[k] = winController.Mediator.prototype[k];
        winController.LayoutMediator.prototype.winAnimationsStage = null;
        winController.LayoutMediator.prototype.layoutPayload = null;
        winController.LayoutMediator.prototype.mask = null;
        winController.LayoutMediator.prototype.masks = null;
        winController.LayoutMediator.prototype.prepareView = function(factory, loadedAssets, layoutPayload) {
            this.winAnimationsStage = new winController.Stage(winController.ConfigurationModel.getLayerName(), winController.ReelModel.reelWidth, winController.ReelModel.reelHeight);
            this.updateLayout(layoutPayload);
        };
        winController.LayoutMediator.prototype.updateLayout = function(layoutPayload) {
            var mask = winController.CommonModel.displayProvider.getFactory().createGraphics();
            mask = mask.beginFill(1111, 0);
            mask = mask.drawRect(1, 1, winController.ReelModel.reelWidth, winController.ReelModel.reelHeight);
            mask = mask.endFill();
            var $it0 = this.masks.keys();
            while ($it0.hasNext()) {
                var dsp = $it0.next();
                dsp.setMask(mask);
            }
            this.winAnimationsStage.display.setX(((function($this) {
                var $r;
                var key = winController.ConfigurationModel.getLayerName();
                $r = layoutPayload.containers.get(key);
                return $r;
            }(this))).left);
            this.winAnimationsStage.display.setY(((function($this) {
                var $r;
                var key1 = winController.ConfigurationModel.getLayerName();
                $r = layoutPayload.containers.get(key1);
                return $r;
            }(this))).top);
            this.winAnimationsStage.display.setScaleX(((function($this) {
                var $r;
                var key2 = winController.ConfigurationModel.getLayerName();
                $r = layoutPayload.containers.get(key2);
                return $r;
            }(this))).width / this.winAnimationsStage.getViewBuilderWidth());
            this.winAnimationsStage.display.setScaleY(((function($this) {
                var $r;
                var key3 = winController.ConfigurationModel.getLayerName();
                $r = layoutPayload.containers.get(key3);
                return $r;
            }(this))).height / this.winAnimationsStage.getViewBuilderHeight());
            this.winAnimationsStage.display.setZIndex(((function($this) {
                var $r;
                var key4 = winController.ConfigurationModel.getLayerName();
                $r = layoutPayload.containers.get(key4);
                return $r;
            }(this))).zIndex);
            var $it1 = this.masks.keys();
            while ($it1.hasNext()) {
                var key5 = $it1.next();
                key5.setMask(this.masks.h[key5.__id__]);
            }
        };
        winController.LayoutMediator.prototype.addSubContainers = function(containers) {
            var pluginsToRegister = winController.ConfigurationModel.getSubComponentsInZOrder();
            var $it0 = containers.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                this.winAnimationsStage.display.addChild(_hcmn_.__map_reserved[key] != null ? containers.getReserved(key) : containers.h[key]);
                var _g = 0;
                while (_g < pluginsToRegister.length) {
                    var desc = pluginsToRegister[_g];
                    ++_g;
                    if (desc.name == key && desc.isMaseked == true) {
                        var mask = winController.CommonModel.displayProvider.getFactory().createGraphics();
                        mask.setName(desc.name + "::Mask");
                        mask = mask.beginFill(1111, 1);
                        mask = mask.drawRect(1, 1, winController.ReelModel.reelWidth, winController.ReelModel.reelHeight);
                        mask = mask.endFill();
                        var dsp = winController.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
                        dsp.addChild(mask);
                        this.winAnimationsStage.display.addChild(dsp);
                        (_hcmn_.__map_reserved[key] != null ? containers.getReserved(key) : containers.h[key]).setMask(mask);
                        var key1;
                        key1 = _hcmn_.__map_reserved[key] != null ? containers.getReserved(key) : containers.h[key];
                        this.masks.set(key1, mask);
                    }
                }
            }
        };
        winController.LayoutMediator.prototype.__class__ = winController.LayoutMediator;
        winController.ConfigurationConstants = function() {};
        winController.ConfigurationConstants.__name__ = ["winController", "ConfigurationConstants"];
        winController.ConfigurationConstants.prototype.__class__ = winController.ConfigurationConstants;
        winController.ConfigurationModel = function() {};
        winController.ConfigurationModel.__name__ = ["winController", "ConfigurationModel"];
        winController.ConfigurationModel.winControllerConfig = null;
        winController.ConfigurationModel.ASSETS_TO_LOAD = null;
        winController.ConfigurationModel.slotConfig = null;
        winController.ConfigurationModel.reelsCofig = null;
        winController.ConfigurationModel.scatters = null;
        winController.ConfigurationModel.getLayerName = function() {
            return winController.ConfigurationModel.winControllerConfig.winControllerContanerID;
        };
        winController.ConfigurationModel.getSpagettiAssetName = function() {
            return winController.ConfigurationModel.spagettiAssetName;
        };
        winController.ConfigurationModel.getSubComponentsInZOrder = function() {
            var returner = [];
            var _g1 = 0;
            var _g = winController.ConfigurationModel.winControllerConfig.subcomponents.length;
            while (_g1 < _g) {
                var i = _g1++;
                var examine = winController.ConfigurationModel.winControllerConfig.subcomponents[i].name.toLowerCase();
                if (examine == "WIN_SYMBOLS") returner.push(new winController.PluginContainerDescriptionVO("WIN_SYMBOLS", winController.ConfigurationModel.winControllerConfig.subcomponents[i].isMasked));
                else if (examine == "SCATTER_SYMBOLS") returner.push(new winController.PluginContainerDescriptionVO("SCATTER_SYMBOLS", winController.ConfigurationModel.winControllerConfig.subcomponents[i].isMasked));
                else if (examine == "WIN_FRAMES") returner.push(new winController.PluginContainerDescriptionVO("WIN_FRAMES", winController.ConfigurationModel.winControllerConfig.subcomponents[i].isMasked));
                else returner.push(new winController.PluginContainerDescriptionVO(winController.ConfigurationModel.winControllerConfig.subcomponents[i].name, winController.ConfigurationModel.winControllerConfig.subcomponents[i].isMasked));
            }
            return returner;
        };
        winController.ConfigurationModel.parseConfigurations = function() {
            winController.ConfigurationModel.winControllerConfig = winController.CommonModel.loadedConfigurations.get("win-controller-assets/win-controller-configuration");
            winController.ConfigurationModel.slotConfig = winController.CommonModel.loadedConfigurations.get("slot-definition_json");
            winController.ConfigurationModel.reelsCofig = winController.CommonModel.loadedConfigurations.get("reel-config");
            winController.ConfigurationModel.ASSETS_TO_LOAD = [];
            var _g1 = 0;
            var _g = winController.ConfigurationModel.winControllerConfig.assetsToLoad.length;
            while (_g1 < _g) {
                var i = _g1++;
                winController.ConfigurationModel.ASSETS_TO_LOAD.push(winController.ConfigurationModel.winControllerConfig.assetsToLoad[i].name);
            }
            var _g11 = 0;
            var _g2 = winController.ConfigurationModel.winControllerConfig.winSymbolsMap.length;
            while (_g11 < _g2) {
                var m = _g11++;
                var winSymbolConfig = winController.ConfigurationModel.winControllerConfig.winSymbolsMap[m];
                winController.WinSymbolsModel.defineWinSymbol(new winController.WinSymbolViewDefinition(winSymbolConfig.id, winSymbolConfig.winAnimationID, winSymbolConfig.activeFrameAssetID, winSymbolConfig.inactiveFrameAssetID));
            }
            if (winController.ConfigurationModel.winControllerConfig.scatterLandingMap != null) {
                var _g12 = 0;
                var _g3 = winController.ConfigurationModel.winControllerConfig.scatterLandingMap.length;
                while (_g12 < _g3) {
                    var n = _g12++;
                    var scatterLandingSymbolConfig = winController.ConfigurationModel.winControllerConfig.scatterLandingMap[n];
                    winController.WinSymbolsModel.defineScatterLandingSymbol(new winController.ScatterLandingViewDefinition(scatterLandingSymbolConfig.id, scatterLandingSymbolConfig.landingAnimationID, scatterLandingSymbolConfig.landingFrame));
                }
            }
            if (winController.ConfigurationModel.winControllerConfig.frames != null) {
                var activeFrames = winController.ConfigurationModel.winControllerConfig.frames.active;
                var inactiveFrames = winController.ConfigurationModel.winControllerConfig.frames.inactive;
                var colours = winController.ConfigurationModel.winControllerConfig.frames.colours;
                if (activeFrames != null) {
                    var _g13 = 0;
                    var _g4 = activeFrames.length;
                    while (_g13 < _g4) {
                        var p = _g13++;
                        winController.WinSymbolsModel.defineFrameSet(true, activeFrames[p].id, activeFrames[p].assetID);
                    }
                }
                if (inactiveFrames != null) {
                    var _g14 = 0;
                    var _g5 = inactiveFrames.length;
                    while (_g14 < _g5) {
                        var g = _g14++;
                        winController.WinSymbolsModel.defineFrameSet(false, inactiveFrames[g].id, inactiveFrames[g].assetID);
                    }
                }
                if (colours != null) {
                    var _g15 = 0;
                    var _g6 = colours.length;
                    while (_g15 < _g6) {
                        var c = _g15++;
                        var this1 = winController.ConfigurationModel.get_frameColors();
                        var value = _hcmn_.Std.parseInt(colours[c].colour);
                        this1.set(colours[c].lineID, value);
                    }
                }
            }
            if (winController.ConfigurationModel.winControllerConfig.winSymbolsJoin != null) {
                var _g16 = 0;
                var _g7 = winController.ConfigurationModel.winControllerConfig.winSymbolsJoin.length;
                while (_g16 < _g7) {
                    var j = _g16++;
                    winController.WinSymbolsModel.defineJoin(winController.ConfigurationModel.winControllerConfig.winSymbolsJoin[j].join, winController.ConfigurationModel.winControllerConfig.winSymbolsJoin[j].type);
                }
            }
            winController.ReelModel.numberOfRows = winController.ConfigurationModel.slotConfig.reelPictureSize.reelLength;
            winController.ReelModel.numberOfCollumns = winController.ConfigurationModel.slotConfig.reelPictureSize.reelCount;
            winController.ReelModel.WIN_SYMBOL_ROW_OFFSET = 1;
            winController.ReelModel.reelWidth = winController.ConfigurationModel.reelsCofig.boundsWidth;
            winController.ReelModel.reelHeight = winController.ConfigurationModel.reelsCofig.boundsHeight;
            winController.ReelModel.WIN_SYMBOL_ROW_OFFSET = 0;
            if (winController.ConfigurationModel.winControllerConfig.rowOffset != null) {
                winController.ReelModel.WIN_SYMBOL_ROW_OFFSET = _hcmn_.Std["int"](winController.ConfigurationModel.winControllerConfig.rowOffset);
                winController.ReelModel.MANUAL_ROW_SET = true;
            } else {
                var reelVisibility = winController.ConfigurationModel.slotConfig.reelPictureVisibility.reels[0];
                var _g17 = 0;
                var _g8 = reelVisibility.length;
                while (_g17 < _g8) {
                    var n1 = _g17++;
                    if (reelVisibility[n1] == 0) winController.ReelModel.WIN_SYMBOL_ROW_OFFSET++;
                    if (reelVisibility[n1] == 1) break;
                }
            }
            if (winController.ConfigurationModel.winControllerConfig.bleedAmount != null) {
                winController.ReelModel.HAS_BLEED = true;
                winController.ReelModel.BLEED_AMOUNT = winController.ConfigurationModel.winControllerConfig.bleedAmount;
            }
            winController.CommonModel.winControllerConfiguration.winAnimationRules = new winControllerApi.WinAnimationRules();
            if (winController.ConfigurationModel.winControllerConfig.winAnimationRules != null) {
                winController.CommonModel.winControllerConfiguration.winAnimationRules.animateCurrentLineOnly = winController.ConfigurationModel.winControllerConfig.winAnimationRules.animateCurrentLineOnly;
                winController.CommonModel.winControllerConfiguration.winAnimationRules.showActiveFrames = winController.ConfigurationModel.winControllerConfig.winAnimationRules.showActiveFrames;
                winController.CommonModel.winControllerConfiguration.winAnimationRules.showInactiveFrames = winController.ConfigurationModel.winControllerConfig.winAnimationRules.showInactiveFrames;
                winController.CommonModel.winControllerConfiguration.winAnimationRules.showInactiveFrames = winController.ConfigurationModel.winControllerConfig.winAnimationRules.showInactiveFrames;
                winController.CommonModel.winControllerConfiguration.winAnimationRules.restartEachWinAnimation = winController.ConfigurationModel.winControllerConfig.winAnimationRules.restartEachWinAnimation;
                if (winController.ConfigurationModel.winControllerConfig.winAnimationRules.excludeScatterWinFromFreeze != null) winController.CommonModel.winControllerConfiguration.winAnimationRules.excludeScatterWinFromFreeze = winController.ConfigurationModel.winControllerConfig.winAnimationRules.excludeScatterWinFromFreeze;
                else winController.CommonModel.winControllerConfiguration.winAnimationRules.excludeScatterWinFromFreeze = false;
                if (winController.ConfigurationModel.winControllerConfig.winAnimationRules.showSummary != null) {
                    winController.CommonModel.winControllerConfiguration.winAnimationRules.showSummary = new winControllerApi.SummaryRules(winController.ConfigurationModel.winControllerConfig.winAnimationRules.showSummary.show, winController.ConfigurationModel.winControllerConfig.winAnimationRules.showSummary.type);
                    null;
                }
                winController.CommonModel.winControllerConfiguration.winAnimationRules.winLineInterval = winController.ConfigurationModel.winControllerConfig.winAnimationRules.winLineInterval;
            }
        };
        winController.ConfigurationModel.getAssetsToLoad = function() {
            return winController.ConfigurationModel.ASSETS_TO_LOAD;
        };
        winController.ConfigurationModel.get_frameColors = function() {
            return winController.ConfigurationModel.frameColors;
        };
        winController.ConfigurationModel.prototype.__class__ = winController.ConfigurationModel;
        winController.OptimizationModel = function() {};
        winController.OptimizationModel.__name__ = ["winController", "OptimizationModel"];
        winController.OptimizationModel.getWinFrameFromPool = function(assetID) {
            if (winController.OptimizationModel.initialisedFrames.exists(assetID)) {
                var _g = 0;
                var _g1 = winController.OptimizationModel.initialisedFrames.get(assetID);
                while (_g < _g1.length) {
                    var fim = _g1[_g];
                    ++_g;
                    if (!fim.isTaken) {
                        fim.isTaken = true;
                        return _hcmn_.js_Boot.__cast(fim.view, winController.WinFrame);
                    }
                }
            }
            var winFrameWiew = new winController.WinFrame(_hcmn_.Math.random() + "_" + _hcmn_.Math.random(), assetID);
            if (!winController.OptimizationModel.initialisedFrames.exists(assetID)) {
                var value = [];
                winController.OptimizationModel.initialisedFrames.set(assetID, value);
            }
            winController.OptimizationModel.initialisedFrames.get(assetID).push(new winController.ViewInstanceInPool(true, winFrameWiew));
            return winFrameWiew;
        };
        winController.OptimizationModel.releaseWinFramesPool = function() {
            var $it0 = winController.OptimizationModel.initialisedFrames.iterator();
            while ($it0.hasNext()) {
                var arr = $it0.next();
                var _g = 0;
                while (_g < arr.length) {
                    var vim = arr[_g];
                    ++_g;
                    vim.isTaken = false;
                }
            }
        };
        winController.OptimizationModel.getWinSymbolFromPool = function(assetID) {
            var winSymbolWiew = null;
            if (winController.OptimizationModel.initialisedWinSymbols.exists(assetID)) {
                var _g = 0;
                var _g1 = winController.OptimizationModel.initialisedWinSymbols.get(assetID);
                while (_g < _g1.length) {
                    var fim = _g1[_g];
                    ++_g;
                    if (!fim.isTaken) {
                        fim.isTaken = true;
                        winSymbolWiew = _hcmn_.js_Boot.__cast(fim.view, winController.WinSymbol);
                        return winSymbolWiew;
                    }
                }
            }
            winSymbolWiew = new winController.WinSymbol(_hcmn_.Math.random() + "_" + _hcmn_.Math.random(), assetID);
            if (!winController.OptimizationModel.initialisedWinSymbols.exists(assetID)) {
                var value = [];
                winController.OptimizationModel.initialisedWinSymbols.set(assetID, value);
            }
            winController.OptimizationModel.initialisedWinSymbols.get(assetID).push(new winController.ViewInstanceInPool(true, winSymbolWiew));
            return winSymbolWiew;
        };
        winController.OptimizationModel.getYJoinOffset = function(joinData, symbolID) {
            if (joinData == null) return 0;
            if (joinData.type == "column") return 0;
            var index = _hcmn_.HxOverrides.indexOf(joinData.joinArray, symbolID, 0);
            if (index <= 0) return 0;
            var baseHeight = winController.ReelModel.getYonReel(0, 0);
            var upperHeight = winController.ReelModel.getYonReel(1, 0);
            var totalHeight = upperHeight - baseHeight;
            var totalJoinOffset = totalHeight * index * -1;
            return totalJoinOffset;
        };
        winController.OptimizationModel.releaseWinSymbolsPool = function() {
            winController.OptimizationModel.winSymbolsOnStage = new _hcmn_.haxe_ds_StringMap();
            var $it0 = winController.OptimizationModel.initialisedWinSymbols.iterator();
            while ($it0.hasNext()) {
                var arr = $it0.next();
                var _g = 0;
                while (_g < arr.length) {
                    var vim = arr[_g];
                    ++_g;
                    vim.isTaken = false;
                }
            }
        };
        winController.OptimizationModel.optimisePool = function() {
            var $it0 = winController.OptimizationModel.initialisedWinSymbols.iterator();
            while ($it0.hasNext()) {
                var arr = $it0.next();
                var _g = 0;
                while (_g < arr.length) {
                    var vim = arr[_g];
                    ++_g;
                    if (arr.length > 5) {
                        var _g2 = 5;
                        var _g1 = arr.length;
                        while (_g2 < _g1) {
                            var n = _g2++;
                            arr[n].view.dispose();
                        }
                    }
                    while (arr.length > 5) arr.pop();
                }
            }
        };
        winController.OptimizationModel.prototype.__class__ = winController.OptimizationModel;
        winController.ReelModel = function(reelRegistryService) {
            winController.ReelModel.reelRegistryService = reelRegistryService;
        };
        winController.ReelModel.__name__ = ["winController", "ReelModel"];
        winController.ReelModel.winControllerReelData = null;
        winController.ReelModel.originalReelData = null;
        winController.ReelModel.reelRegistryService = null;
        winController.ReelModel.getXonReel = function(row, column) {
            return winController.ReelModel.reelRegistryService.getPositionOnReel(row, column).xPosition;
        };
        winController.ReelModel.getYonReel = function(row, col) {
            return winController.ReelModel.reelRegistryService.getPositionOnReel(row, col).yPosition;
        };
        winController.ReelModel.getSymbolId = function(row, column) {
            return winController.ReelModel.winControllerReelData[column][row];
        };
        winController.ReelModel.setWinControllerReelData = function(value) {
            winController.ReelModel.winControllerReelData = value;
        };
        winController.ReelModel.setOriginalReelData = function(value) {
            winController.ReelModel.originalReelData = value;
        };
        winController.ReelModel.getWinControllerReelData = function() {
            return winController.ReelModel.winControllerReelData;
        };
        winController.ReelModel.getOriginalReelData = function() {
            return winController.ReelModel.originalReelData;
        };
        winController.ReelModel.prototype.__class__ = winController.ReelModel;
        winController.ViewInstanceInPool = function(isTaken, view) {
            this.view = view;
            this.isTaken = isTaken;
        };
        winController.ViewInstanceInPool.__name__ = ["winController", "ViewInstanceInPool"];
        winController.ViewInstanceInPool.prototype.isTaken = null;
        winController.ViewInstanceInPool.prototype.view = null;
        winController.ViewInstanceInPool.prototype.__class__ = winController.ViewInstanceInPool;
        winController.WinSymbolsModel = function() {};
        winController.WinSymbolsModel.__name__ = ["winController", "WinSymbolsModel"];
        winController.WinSymbolsModel.frozenSymbols = null;
        winController.WinSymbolsModel.defineWinSymbol = function(newDefinition) {
            winController.WinSymbolsModel.winSymbolsMap.set(newDefinition.id, newDefinition);
            winController.CommonModel.winControllerConfiguration.setFrameForSymbols([newDefinition.id], true, newDefinition.activeFrameId);
            winController.CommonModel.winControllerConfiguration.setFrameForSymbols([newDefinition.id], false, newDefinition.inactiveFrameId);
        };
        winController.WinSymbolsModel.updateWinFrames = function() {
            var $it0 = winController.WinSymbolsModel.winSymbolsMap.iterator();
            while ($it0.hasNext()) {
                var winSymbol = $it0.next();
                var id = winSymbol.id;
                if (winController.CommonModel.winControllerConfiguration.framesAndSymbolsRelationMap.get(id).symbolId == id) {
                    var newActiveFrameID = winController.CommonModel.winControllerConfiguration.framesAndSymbolsRelationMap.get(id).activeFrameID;
                    var newInactiveFrameID = winController.CommonModel.winControllerConfiguration.framesAndSymbolsRelationMap.get(id).inactiveFrameID;
                    winSymbol.activeFrameId = newActiveFrameID;
                    winSymbol.inactiveFrameId = newActiveFrameID;
                }
            }
        };
        winController.WinSymbolsModel.get_winSymbolsViewDefinitionsMap = function() {
            return winController.WinSymbolsModel.winSymbolsMap;
        };
        winController.WinSymbolsModel.defineScatterLandingSymbol = function(newDefinition) {
            winController.WinSymbolsModel._hasScattersLanding = true;
            var key = newDefinition.get_id();
            winController.WinSymbolsModel.scatterLandingMap.set(key, newDefinition);
        };
        winController.WinSymbolsModel.get_scatterLandingSymbolsViewDefinitionsMap = function() {
            return winController.WinSymbolsModel.scatterLandingMap;
        };
        winController.WinSymbolsModel.hasScattersLanding = function() {
            return winController.WinSymbolsModel._hasScattersLanding;
        };
        winController.WinSymbolsModel.defineFrameSet = function(isActive, configurationId, assetID) {
            if (isActive) {
                var value = new winController.WinFrameViewDefinition(configurationId, assetID);
                winController.WinSymbolsModel.winFramesViewDefinitionMapActive.set(configurationId, value);
            } else {
                var value1 = new winController.WinFrameViewDefinition(configurationId, assetID);
                winController.WinSymbolsModel.winFramesViewDefinitionMapInactive.set(configurationId, value1);
            }
        };
        winController.WinSymbolsModel.getFrameAssetId = function(active, id) {
            if (id == "" || id == " " || id == "  ") return "";
            if (active) return winController.WinSymbolsModel.winFramesViewDefinitionMapActive.get(id).get_assetID();
            else return winController.WinSymbolsModel.winFramesViewDefinitionMapInactive.get(id).get_assetID();
        };
        winController.WinSymbolsModel.defineJoin = function(joinArray, joinType) {
            var $it0 = winController.WinSymbolsModel.winSymbolsMap.iterator();
            while ($it0.hasNext()) {
                var winSymbol = $it0.next();
                var _g = 0;
                while (_g < joinArray.length) {
                    var id = joinArray[_g];
                    ++_g;
                    if (id == winSymbol.id) {
                        winSymbol.joinDefinition = new winController.JoinDefinition();
                        winSymbol.joinDefinition.joinArray = joinArray;
                        winSymbol.joinDefinition.type = joinType;
                    }
                }
            }
        };
        winController.WinSymbolsModel.setFrozenSymbols = function(freezeSymbols) {
            winController.WinSymbolsModel.frozenSymbols = freezeSymbols;
        };
        winController.WinSymbolsModel.setHighWinValue = function(highWinValue) {
            winController.WinSymbolsModel.isHighWin = highWinValue;
        };
        winController.WinSymbolsModel.setStopFrameName = function(frame) {
            winController.WinSymbolsModel.stopFrameName = frame;
        };
        winController.WinSymbolsModel.prototype.__class__ = winController.WinSymbolsModel;
        winController.Const = function() {};
        winController.Const.__name__ = ["winController", "Const"];
        winController.Const.prototype.__class__ = winController.Const;
        winController.DefaultPluginTypes = function() {};
        winController.DefaultPluginTypes.__name__ = ["winController", "DefaultPluginTypes"];
        winController.DefaultPluginTypes.prototype.__class__ = winController.DefaultPluginTypes;
        winController.PluginContainerDescriptionVO = function(name, isMaseked) {
            this.name = name;
            this.isMaseked = isMaseked;
        };
        winController.PluginContainerDescriptionVO.__name__ = ["winController", "PluginContainerDescriptionVO"];
        winController.PluginContainerDescriptionVO.prototype.name = null;
        winController.PluginContainerDescriptionVO.prototype.isMaseked = null;
        winController.PluginContainerDescriptionVO.prototype.__class__ = winController.PluginContainerDescriptionVO;
        winController.AnimateWinRequest = function(allWins, outcome, overlapMap) {
            this.overlapMap = overlapMap;
            this.outcome = outcome;
            this.allWins = allWins;
        };
        winController.AnimateWinRequest.__name__ = ["winController", "AnimateWinRequest"];
        winController.AnimateWinRequest.prototype.overlapMap = null;
        winController.AnimateWinRequest.prototype.outcome = null;
        winController.AnimateWinRequest.prototype.allWins = null;
        winController.AnimateWinRequest.prototype.__class__ = winController.AnimateWinRequest;
        winController.JoinDefinition = function() {
            this.isConstructed = false;
            this.type = "";
        };
        winController.JoinDefinition.__name__ = ["winController", "JoinDefinition"];
        winController.JoinDefinition.prototype.type = null;
        winController.JoinDefinition.prototype.joinArray = null;
        winController.JoinDefinition.prototype.isConstructed = null;
        winController.JoinDefinition.prototype.__class__ = winController.JoinDefinition;
        winController.ScatterLandingViewDefinition = function(id, landingAnimation, landingFrame) {
            this.landingFrame = landingFrame;
            this.landingAnimation = landingAnimation;
            this.id = id;
        };
        winController.ScatterLandingViewDefinition.__name__ = ["winController", "ScatterLandingViewDefinition"];
        winController.ScatterLandingViewDefinition.prototype.landingFrame = null;
        winController.ScatterLandingViewDefinition.prototype.landingAnimation = null;
        winController.ScatterLandingViewDefinition.prototype.id = null;
        winController.ScatterLandingViewDefinition.prototype.get_landingFrame = function() {
            return this.landingFrame;
        };
        winController.ScatterLandingViewDefinition.prototype.get_landingAnimation = function() {
            return this.landingAnimation;
        };
        winController.ScatterLandingViewDefinition.prototype.get_id = function() {
            return this.id;
        };
        winController.ScatterLandingViewDefinition.prototype.__class__ = winController.ScatterLandingViewDefinition;
        winController.WinFrameViewDefinition = function(id, assetId) {
            this.id = id;
            this.assetID = assetId;
        };
        winController.WinFrameViewDefinition.__name__ = ["winController", "WinFrameViewDefinition"];
        winController.WinFrameViewDefinition.prototype.assetID = null;
        winController.WinFrameViewDefinition.prototype.id = null;
        winController.WinFrameViewDefinition.prototype.get_id = function() {
            return this.id;
        };
        winController.WinFrameViewDefinition.prototype.get_assetID = function() {
            return this.assetID;
        };
        winController.WinFrameViewDefinition.prototype.__class__ = winController.WinFrameViewDefinition;
        winController.WinSymbolViewDefinition = function(id, winAnimationID, activeFrameId, inactiveFrameId) {
            this.id = id;
            this.inactiveFrameId = inactiveFrameId;
            this.activeFrameId = activeFrameId;
            this.winAnimationID = winAnimationID;
        };
        winController.WinSymbolViewDefinition.__name__ = ["winController", "WinSymbolViewDefinition"];
        winController.WinSymbolViewDefinition.prototype.id = null;
        winController.WinSymbolViewDefinition.prototype.inactiveFrameId = null;
        winController.WinSymbolViewDefinition.prototype.activeFrameId = null;
        winController.WinSymbolViewDefinition.prototype.winAnimationID = null;
        winController.WinSymbolViewDefinition.prototype.joinDefinition = null;
        winController.WinSymbolViewDefinition.prototype.__class__ = winController.WinSymbolViewDefinition;
        winController.CommonConstants = function() {};
        winController.CommonConstants.__name__ = ["winController", "CommonConstants"];
        winController.CommonConstants.prototype.__class__ = winController.CommonConstants;
        winController.PrepareCommonsController = function() {
            this.loadedAssetsSoFar = 0;
            this.totalAssetsToLoad = 0;
            this.loadedConfigurationsSoFar = 0;
            this.totalConfigurationsToLoad = 0;
            winController.Controller.call(this, this, false);
        };
        winController.PrepareCommonsController.__name__ = ["winController", "PrepareCommonsController"];
        winController.PrepareCommonsController.__super__ = winController.Controller;
        for (var k in winController.Controller.prototype) winController.PrepareCommonsController.prototype[k] = winController.Controller.prototype[k];
        winController.PrepareCommonsController.prototype.totalConfigurationsToLoad = null;
        winController.PrepareCommonsController.prototype.loadedConfigurationsSoFar = null;
        winController.PrepareCommonsController.prototype.totalAssetsToLoad = null;
        winController.PrepareCommonsController.prototype.loadedAssetsSoFar = null;
        winController.PrepareCommonsController.prototype.payload = null;
        winController.PrepareCommonsController.prototype.layoutPort = null;
        winController.PrepareCommonsController.prototype.subscription = null;
        winController.PrepareCommonsController.prototype.processMessage = function(message) {
            var _g = message.messageName;
            switch (_g) {
                case "Common:PrepareConfiguration":
                    this.prepareConfigurations(message.messageData);
                    break;
            }
        };
        winController.PrepareCommonsController.prototype.prepareConfigurations = function(payload) {
            var _g2 = this;
            this.payload = payload;
            winController.CommonModel.context = payload.context;
            winController.CommonModel.moduleContext = payload.moduleContext;
            winController.CommonModel.factory = payload.factory;
            winController.CommonModel.assetRegistry = winController.CommonModel.moduleContext.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            winController.CommonModel.displayProvider = winController.CommonModel.moduleContext.getAnyService(displayEngineApi.IDisplayProvider, null);
            winController.CommonModel.instance = winController.CommonModel.context.getInstance();
            this.layoutPort = _hcmn_.js_Boot.__cast(winController.CommonModel.context.getUsedPort(gameLayoutApi.IGameLayoutPort), gameLayoutApi.IGameLayoutPort);
            if (this.layoutPort != null) {
                this.totalConfigurationsToLoad++;
                this.subscription = this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.handleLayoutPayload));
            }
            if (payload.configurationsToLoad != null) {
                winController.CommonModel.loadedConfigurations = new _hcmn_.haxe_ds_StringMap();
                var _g1 = 0;
                var _g = payload.configurationsToLoad.length;
                while (_g1 < _g) {
                    var s = _g1++;
                    this.totalConfigurationsToLoad++;
                    var config_id = [payload.configurationsToLoad[s]];
                    winController.CommonModel.assetRegistry.getAsset(config_id[0]).getContent().then((function(config_id) {
                        return function(data) {
                            winController.CommonModel.loadedConfigurations.set(config_id[0], data);
                            _g2.loadedConfigurationsSoFar++;
                            _g2.ceheckConfigurationsLoaded();
                        };
                    })(config_id));
                }
            }
        };
        winController.PrepareCommonsController.prototype.errorListener = function(e) {};
        winController.PrepareCommonsController.prototype.prepareAssets = function(payload) {
            var _g2 = this;
            if (payload.assetsLoLoad != null) {
                winController.CommonModel.loadedAssets = new _hcmn_.haxe_ds_StringMap();
                var _g1 = 0;
                var _g = payload.assetsLoLoad.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    var id = [payload.assetsLoLoad[i]];
                    this.totalAssetsToLoad++;
                    winController.CommonModel.assetRegistry.getAsset(id[0]).getContent().then((function(id) {
                        return function(vba) {
                            _g2.loadedAssetsSoFar++;
                            winController.CommonModel.loadedAssets.set(id[0], vba);
                            _g2.checkAssetsLoaded();
                        };
                    })(id));
                }
            }
        };
        winController.PrepareCommonsController.prototype.checkAssetsLoaded = function() {
            if (this.totalAssetsToLoad == this.loadedAssetsSoFar) this.allPrepared();
        };
        winController.PrepareCommonsController.prototype.handleLayoutPayload = function(event) {
            winController.CommonModel.layoutPayload = event.getPayload();
            this.subscription.unsubscribe();
            this.loadedConfigurationsSoFar++;
            this.ceheckConfigurationsLoaded();
        };
        winController.PrepareCommonsController.prototype.ceheckConfigurationsLoaded = function() {
            if (this.totalConfigurationsToLoad == this.loadedConfigurationsSoFar) {
                winController.ConfigurationModel.parseConfigurations();
                this.payload.assetsLoLoad = winController.ConfigurationModel.getAssetsToLoad();
                this.prepareAssets(this.payload);
            }
        };
        winController.PrepareCommonsController.prototype.allPrepared = function() {
            this.sendMessage(new winController.Message("registerPlugins"));
            this.sendMessage(new winController.Message("commonModelPrepared"));
        };
        winController.PrepareCommonsController.prototype.__class__ = winController.PrepareCommonsController;
        winController.CommonModel = function() {};
        winController.CommonModel.__name__ = ["winController", "CommonModel"];
        winController.CommonModel.factory = null;
        winController.CommonModel.context = null;
        winController.CommonModel.displayProvider = null;
        winController.CommonModel.assetRegistry = null;
        winController.CommonModel.configurationId = null;
        winController.CommonModel.layoutPayload = null;
        winController.CommonModel.loadedAssets = null;
        winController.CommonModel.instance = null;
        winController.CommonModel.moduleContext = null;
        winController.CommonModel.loadedConfigurations = null;
        winController.CommonModel.winControllerConfiguration = null;
        winController.CommonModel.createView = function(vba, assetName) {
            if (winController.CommonModel.createdViews.exists(assetName)) return winController.CommonModel.createdViews.get(assetName);
            else {
                var value = winController.CommonModel.factory.createView(vba);
                winController.CommonModel.createdViews.set(assetName, value);
                return winController.CommonModel.createdViews.get(assetName);
            }
        };
        winController.CommonModel.prototype.__class__ = winController.CommonModel;
        winController.Message = function(messageName, messageData) {
            this.messageName = messageName;
            this.messageData = messageData;
        };
        winController.Message.__name__ = ["winController", "Message"];
        winController.Message.prototype.messageData = null;
        winController.Message.prototype.messageName = null;
        winController.Message.prototype.__class__ = winController.Message;
        winController.PrepareCommonModelPayload = function() {};
        winController.PrepareCommonModelPayload.__name__ = ["winController", "PrepareCommonModelPayload"];
        winController.PrepareCommonModelPayload.prototype.context = null;
        winController.PrepareCommonModelPayload.prototype.factory = null;
        winController.PrepareCommonModelPayload.prototype.moduleContext = null;
        winController.PrepareCommonModelPayload.prototype.assetsLoLoad = null;
        winController.PrepareCommonModelPayload.prototype.configurationsToLoad = null;
        winController.PrepareCommonModelPayload.prototype.__class__ = winController.PrepareCommonModelPayload;
        winController.ViewAbstract = function() {};
        winController.ViewAbstract.__name__ = ["winController", "ViewAbstract"];
        winController.ViewAbstract.prototype.objectsStage = null;
        winController.ViewAbstract.prototype.display = null;
        winController.ViewAbstract.prototype.addChild = function(child, zindex) {};
        winController.ViewAbstract.prototype.removeChild = function(child) {};
        winController.ViewAbstract.prototype.getViewBuilderHeight = function() {
            return 0;
        };
        winController.ViewAbstract.prototype.getViewBuilderWidth = function() {
            return 0;
        };
        winController.ViewAbstract.prototype.stop = function() {};
        winController.ViewAbstract.prototype.isAnimated = function() {
            return false;
        };
        winController.ViewAbstract.prototype.play = function(renderInBackStage, callback, delay, reset, isHighWin) {
            if (isHighWin == null) isHighWin = false;
            if (reset == null) reset = false;
            if (delay == null) delay = 0;
        };
        winController.ViewAbstract.prototype.getAssetId = function() {
            return "";
        };
        winController.ViewAbstract.prototype.getXOffset = function() {
            return 0;
        };
        winController.ViewAbstract.prototype.getYOffset = function() {
            return 0;
        };
        winController.ViewAbstract.prototype.show = function() {};
        winController.ViewAbstract.prototype.isBackStage = function() {
            return false;
        };
        winController.ViewAbstract.prototype.dispose = function() {};
        winController.ViewAbstract.prototype.tint = function(color) {};
        winController.ViewAbstract.prototype.setFrozen = function(value) {};
        winController.ViewAbstract.prototype.__class__ = winController.ViewAbstract;
        winController.Stage = function(layerId, vbW, vbH) {
            this.viewBuilderH = 0;
            this.viewBuilderW = 0;
            this.layerId = layerId;
            this.viewBuilderH = vbH;
            this.viewBuilderW = vbW;
            this.layerPayload = winController.CommonModel.layoutPayload.containers.get(layerId);
            if (this.layerPayload != null) {
                var this1 = winController.CommonModel.displayProvider.getStages();
                this.stage = this1.get(this.layerPayload.stage);
                this.display = winController.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
                this.display.setWidth(this.viewBuilderH);
                this.display.setHeight(this.viewBuilderH);
                this.display.setX(this.layerPayload.left);
                this.display.setY(this.layerPayload.top);
                this.display.setZIndex(this.layerPayload.zIndex);
                this.display.setName(layerId);
                this.stage.addChild(this.display);
                this.children = [];
            }
            winController.ViewAbstract.call(this);
        };
        winController.Stage.__name__ = ["winController", "Stage"];
        winController.Stage.__super__ = winController.ViewAbstract;
        for (var k in winController.ViewAbstract.prototype) winController.Stage.prototype[k] = winController.ViewAbstract.prototype[k];
        winController.Stage.prototype.stage = null;
        winController.Stage.prototype.layerId = null;
        winController.Stage.prototype.viewBuilderW = null;
        winController.Stage.prototype.viewBuilderH = null;
        winController.Stage.prototype.layerPayload = null;
        winController.Stage.prototype.width = null;
        winController.Stage.prototype.height = null;
        winController.Stage.prototype.children = null;
        winController.Stage.prototype.addChild = function(child, zindex) {
            if (child.objectsStage == this.stage) this.display.removeChild(child.display);
            else child.objectsStage = this.stage;
            this.display.addChild(child.display);
            this.children.push(child);
        };
        winController.Stage.prototype.removeChild = function(child) {
            child.objectsStage = null;
            try {
                this.display.removeChild(child.display);
                _hcmn_.HxOverrides.remove(this.children, child);
            } catch (e) {
                if (e instanceof js._Boot.HaxeError) e = e.val;
                if (_hcmn_.js_Boot.__instanceof(e, Error)) {} else throw (e);
            }
        };
        winController.Stage.prototype.getViewBuilderHeight = function() {
            return this.viewBuilderH;
        };
        winController.Stage.prototype.getViewBuilderWidth = function() {
            return this.viewBuilderW;
        };
        winController.Stage.prototype.removeChildren = function() {
            while (this.children.length > 0) {
                var child = this.children[0];
                child.stop();
                this.removeChild(child);
            }
        };
        winController.Stage.prototype.__class__ = winController.Stage;
        winController.WinFrame = function(id, asetsId) {
            this.isAnimatedFrame = false;
            winController.ViewAbstract.call(this);
            this.asetsId = asetsId;
            this.id = id;
            var vba = winController.CommonModel.loadedAssets.get(asetsId);
            this.display = winController.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
            var view = winController.CommonModel.factory.createView(vba);
            var animHolder = null;
            try {
                animHolder = view.createContainerFromStoredConfig("ANIMATION_HOLDER");
            } catch (e) {
                if (e instanceof js._Boot.HaxeError) e = e.val;
                if (_hcmn_.js_Boot.__instanceof(e, Error)) {} else throw (e);
            }
            if (animHolder != null) {
                this.isAnimatedFrame = true;
                this.animComponent = _hcmn_.js_Boot.__cast(animHolder.getComponentById("ANIMATION_CONTENT"), viewBuilderApi.IVBAnimationComponent);
                this.display.setName(id);
                this.frame = this.animComponent.getDisplayObject();
                this.display.addChild(this.frame);
                this.xOffset = animHolder.getDisplayObject().getX();
                this.yOffset = animHolder.getDisplayObject().getY();
            } else {
                this.frame = view.getDisplayObject().getChildByName("FRAME");
                this.display.addChild(this.frame);
            }
            this.tint(13434828);
        };
        winController.WinFrame.__name__ = ["winController", "WinFrame"];
        winController.WinFrame.__super__ = winController.ViewAbstract;
        for (var k in winController.ViewAbstract.prototype) winController.WinFrame.prototype[k] = winController.ViewAbstract.prototype[k];
        winController.WinFrame.prototype.id = null;
        winController.WinFrame.prototype.asetsId = null;
        winController.WinFrame.prototype.animComponent = null;
        winController.WinFrame.prototype.isAnimatedFrame = null;
        winController.WinFrame.prototype.xOffset = null;
        winController.WinFrame.prototype.yOffset = null;
        winController.WinFrame.prototype.renderInBackStage = null;
        winController.WinFrame.prototype.frame = null;
        winController.WinFrame.prototype.isAnimated = function() {
            return this.isAnimatedFrame;
        };
        winController.WinFrame.prototype.play = function(renderInBackStage, callback, delay, reset, isHighWin) {
            if (isHighWin == null) isHighWin = false;
            if (reset == null) reset = false;
            if (delay == null) delay = 0;
            this.renderInBackStage = renderInBackStage;
            isHighWin = winController.WinSymbolsModel.isHighWin;
            var stopFrameName = winController.WinSymbolsModel.stopFrameName;
            if (this.isAnimated()) {
                if (renderInBackStage && !this.animComponent.isOffscreen()) this.animComponent.toOffScreen();
                if (isHighWin) this.animComponent.play(renderInBackStage, callback, delay);
                else {
                    if (stopFrameName != "") this.animComponent.gotoAndStop(renderInBackStage, stopFrameName);
                    this.animComponent.show();
                }
            }
        };
        winController.WinFrame.prototype.stop = function() {
            if (this.isAnimated()) this.animComponent.gotoAndStop(this.renderInBackStage, "1");
        };
        winController.WinFrame.prototype.getAssetId = function() {
            return this.asetsId;
        };
        winController.WinFrame.prototype.getXOffset = function() {
            return this.xOffset;
        };
        winController.WinFrame.prototype.getYOffset = function() {
            return this.yOffset;
        };
        winController.WinFrame.prototype.isBackStage = function() {
            return this.renderInBackStage;
        };
        winController.WinFrame.prototype.dispose = function() {
            if (this.animComponent != null) this.animComponent.dispose();
        };
        winController.WinFrame.prototype.tint = function(color) {
            if (this.frame != null) {
                var frameAsContainer;
                frameAsContainer = _hcmn_.js_Boot.__cast(this.frame, displayEngineApi.IDisplayObjectContainer);
                if (frameAsContainer.getChildByName("TINTABLE") == null) return;
                var tintable;
                tintable = _hcmn_.js_Boot.__cast(frameAsContainer.getChildByName("TINTABLE"), displayEngineApi.IDisplayObjectContainer);
                if (tintable == null) return;
                var _g1 = 0;
                var _g = tintable.getNumChildren();
                while (_g1 < _g) {
                    var i = _g1++;
                    var child = tintable.getChildAt(i);
                    if (_hcmn_.js_Boot.__instanceof(child, displayEngineApi.IGraphics)) {
                        child.endFill();
                        child.clear();
                        child.update(color);
                        child.endFill();
                    }
                }
            }
        };
        winController.WinFrame.prototype.__class__ = winController.WinFrame;
        winController.WinSymbol = function(id, symbolName) {
            this.isPlaying = false;
            this.frozen = false;
            winController.ViewAbstract.call(this);
            this.symbolName = symbolName;
            this.display = winController.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
            this.animationContent = this.generateByInstanceNameFromUnknownAsset(symbolName);
            this.display.setName(id);
            if (this.animationContent != null) {
                this.animationContent.show();
                this.display.addChild(this.animationContent.getDisplayObject());
            } else this.movieClipContent = this.generateMovieClipByInstanceNameFromUnknownAsset(symbolName);
            if (this.movieClipContent != null) {
                this.movieClipContent.gotoAndStop("default");
                var x = this.movieClipContent.getX();
                var y = this.movieClipContent.getY();
                this.display.addChild(this.movieClipContent);
                this.movieClipContent.setX(x);
                this.movieClipContent.setY(y);
            }
        };
        winController.WinSymbol.__name__ = ["winController", "WinSymbol"];
        winController.WinSymbol.__super__ = winController.ViewAbstract;
        for (var k in winController.ViewAbstract.prototype) winController.WinSymbol.prototype[k] = winController.ViewAbstract.prototype[k];
        winController.WinSymbol.prototype.animationContent = null;
        winController.WinSymbol.prototype.movieClipContent = null;
        winController.WinSymbol.prototype.symbolName = null;
        winController.WinSymbol.prototype.renderInBackStage = null;
        winController.WinSymbol.prototype.joinOffset = null;
        winController.WinSymbol.prototype.frozen = null;
        winController.WinSymbol.prototype.isPlaying = null;
        winController.WinSymbol.prototype.play = function(renderInBackStage, callback, delay, reset, isHighWin) {
            if (isHighWin == null) isHighWin = false;
            if (reset == null) reset = false;
            if (delay == null) delay = 0;
            this.renderInBackStage = renderInBackStage;
            var stopFrameName = winController.WinSymbolsModel.stopFrameName;
            if (this.frozen) {
                this.stop();
                return;
            }
            if (this.get_isPlaying() && reset == false) return;
            if (this.animationContent != null) {
                this.animationContent.stop();
                if (isHighWin) this.animationContent.gotoAndPlay(renderInBackStage, "loop", callback, delay);
                else {
                    var stopFrame;
                    if (stopFrameName != "") stopFrame = stopFrameName;
                    else stopFrame = "loop";
                    this.animationContent.gotoAndStop(renderInBackStage, stopFrame);
                }
            }
            if (this.movieClipContent != null) {
                this.movieClipContent.stop();
                if (isHighWin) this.movieClipContent.gotoAndPlay("default");
                else this.movieClipContent.gotoAndStop("default");
            }
            this.isPlaying = true;
        };
        winController.WinSymbol.prototype.stop = function() {
            if (this.animationContent != null) this.animationContent.gotoAndStop(this.renderInBackStage, "loop");
            if (this.movieClipContent != null) this.movieClipContent.gotoAndStop("default");
            this.isPlaying = false;
        };
        winController.WinSymbol.prototype.generateByInstanceNameFromUnknownAsset = function(symbolName) {
            var animationContent = null;
            var $it0 = winController.CommonModel.loadedAssets.keys();
            while ($it0.hasNext()) {
                var assetName = $it0.next();
                var vbAsset = winController.CommonModel.loadedAssets.get(assetName);
                if (vbAsset.getConfiguration() == null) continue;
                var _g1 = 0;
                var _g = vbAsset.getConfiguration().components.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    if (symbolName == vbAsset.getConfiguration().id) {
                        var vbAnimView = winController.CommonModel.createView(vbAsset, assetName);
                        var vbAnimationHolder = vbAnimView.createContainerFromStoredConfig("ANIMATION_HOLDER");
                        animationContent = vbAnimationHolder.getVBAnimationById("ANIMATION_CONTENT");
                        return animationContent;
                    } else if (symbolName == vbAsset.getConfiguration().id || symbolName == vbAsset.getConfiguration().components[i].id) {
                        var vbAnimView1 = winController.CommonModel.createView(vbAsset, assetName);
                        var vbAnimationHolder1 = vbAnimView1.createContainerFromStoredConfig(symbolName);
                        if (vbAnimationHolder1 == null) continue;
                        animationContent = vbAnimationHolder1.getVBAnimationById("ANIMATION_CONTENT");
                        return animationContent;
                    }
                }
            }
            return animationContent;
        };
        winController.WinSymbol.prototype.generateMovieClipByInstanceNameFromUnknownAsset = function(symbolName) {
            var movieClipContent = null;
            var $it0 = winController.CommonModel.loadedAssets.keys();
            while ($it0.hasNext()) {
                var assetName = $it0.next();
                var vbAsset = winController.CommonModel.loadedAssets.get(assetName);
                var _g1 = 0;
                var _g = vbAsset.getConfiguration().components.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    if (symbolName == vbAsset.getConfiguration().id) {
                        var vbAnimView = winController.CommonModel.factory.createView(vbAsset);
                        var animationHolder = vbAnimView.getDisplayObject();
                        var anim;
                        anim = _hcmn_.js_Boot.__cast((_hcmn_.js_Boot.__cast(animationHolder, viewBuilderApi.IViewBuilderContainer)).getComponentById("MOVIE_CLIP"), viewBuilderApi.IViewBuilderComponent);
                        movieClipContent = _hcmn_.js_Boot.__cast(anim.getDisplayObject(), displayEngineApi.IMovieClip);
                        return movieClipContent;
                    } else if (symbolName == vbAsset.getConfiguration().components[i].id) {
                        var vbAnimView1 = winController.CommonModel.factory.createView(vbAsset);
                        var animationHolder1 = vbAnimView1.getComponentById(symbolName).getDisplayObject();
                        var anim1;
                        anim1 = _hcmn_.js_Boot.__cast((_hcmn_.js_Boot.__cast(vbAnimView1.getComponentById(symbolName), viewBuilderApi.IViewBuilderContainer)).getComponentById("MOVIE_CLIP"), viewBuilderApi.IViewBuilderComponent);
                        movieClipContent = _hcmn_.js_Boot.__cast(anim1.getDisplayObject(), displayEngineApi.IMovieClip);
                        return movieClipContent;
                    }
                }
            }
            return movieClipContent;
        };
        winController.WinSymbol.prototype.getAssetId = function() {
            return this.symbolName;
        };
        winController.WinSymbol.prototype.isAnimated = function() {
            return true;
        };
        winController.WinSymbol.prototype.show = function() {
            if (this.animationContent != null) this.animationContent.show();
            if (this.movieClipContent != null) this.movieClipContent.gotoAndStop("default");
        };
        winController.WinSymbol.prototype.isBackStage = function() {
            return this.renderInBackStage;
        };
        winController.WinSymbol.prototype.dispose = function() {
            if (this.movieClipContent != null) this.movieClipContent.dispose();
            if (this.animationContent != null) this.animationContent.dispose();
        };
        winController.WinSymbol.prototype.applyOffset = function(y, x) {
            if (this.movieClipContent != null) {
                this.movieClipContent.setY(this.movieClipContent.getY() + y);
                this.movieClipContent.setX(this.movieClipContent.getX() + x);
            }
            if (this.animationContent != null) {
                this.animationContent.getDisplayObject().setY(this.animationContent.getDisplayObject().getY() + y);
                this.animationContent.getDisplayObject().setX(this.animationContent.getDisplayObject().getX() + x);
            }
        };
        winController.WinSymbol.prototype.get_isPlaying = function() {
            return this.isPlaying;
        };
        winController.WinSymbol.prototype.setFrozen = function(value) {
            this.frozen = value;
        };
        winController.WinSymbol.prototype.__class__ = winController.WinSymbol;
        winController.BonusSymbolsPlugin = function() {
            this.lineAnimationHelper = new winController.LineAnimationHelper("BonusWinLine");
        };
        winController.BonusSymbolsPlugin = ck_implements(winController.BonusSymbolsPlugin, winControllerApi.IWinControllerPlugin);
        winController.BonusSymbolsPlugin.__interfaces__ = [winControllerApi.IWinControllerPlugin];
        winController.BonusSymbolsPlugin.__name__ = ["winController", "BonusSymbolsPlugin"];
        winController.BonusSymbolsPlugin.prototype.container = null;
        winController.BonusSymbolsPlugin.prototype.lineAnimationHelper = null;
        winController.BonusSymbolsPlugin.prototype.dispose = function() {
            this.lineAnimationHelper.dispose();
        };
        winController.BonusSymbolsPlugin.prototype.ready = function() {
            this.lineAnimationHelper.ready();
        };
        winController.BonusSymbolsPlugin.prototype.setContainer = function(container) {
            this.lineAnimationHelper.setContainer(container);
        };
        winController.BonusSymbolsPlugin.prototype.setCurrentWin = function(type, win) {
            this.lineAnimationHelper.setCurrentWin(type, win);
        };
        winController.BonusSymbolsPlugin.prototype.setLoadedAssets = function(loadedAssets) {};
        winController.BonusSymbolsPlugin.prototype.setOutcome = function(outcome) {
            this.lineAnimationHelper.setOutcome(outcome);
        };
        winController.BonusSymbolsPlugin.prototype.setReelLayoutModel = function(reelLayoutModel) {
            this.lineAnimationHelper.setReelLayoutModel(reelLayoutModel);
        };
        winController.BonusSymbolsPlugin.prototype.setWinAnimationRulesModel = function(winAnimationRulesModel) {
            this.lineAnimationHelper.setWinAnimationRulesModel(winAnimationRulesModel);
        };
        winController.BonusSymbolsPlugin.prototype.setWinSymbolsModel = function(winSymbolsModel) {
            this.lineAnimationHelper.setWinSymbolsModel(winSymbolsModel);
        };
        winController.BonusSymbolsPlugin.prototype.showSummery = function(wins) {};
        winController.BonusSymbolsPlugin.prototype.__class__ = winController.BonusSymbolsPlugin;
        winController.ReelFramePlugin = function() {
            winControllerApi.WinControllerAbstractPlugin.call(this);
        };
        winController.ReelFramePlugin.__name__ = ["winController", "ReelFramePlugin"];
        winController.ReelFramePlugin.__super__ = winControllerApi.WinControllerAbstractPlugin;
        for (var k in winControllerApi.WinControllerAbstractPlugin.prototype) winController.ReelFramePlugin.prototype[k] = winControllerApi.WinControllerAbstractPlugin.prototype[k];
        winController.ReelFramePlugin.prototype.container = null;
        winController.ReelFramePlugin.prototype.setContainer = function(container) {
            if (this.container == container) return;
            this.container = container;
            winControllerApi.WinControllerAbstractPlugin.prototype.setContainer.call(this, container);
            var vba = winController.CommonModel.loadedAssets.get("reel_foreground");
            var view = winController.CommonModel.factory.createView(vba);
            container.addChild(view.getDisplayObject());
            container.setCacheAsBitmap(true);
        };
        winController.ReelFramePlugin.prototype.__class__ = winController.ReelFramePlugin;
        winController.ScatterSymbolsPlugin = function() {
            this.landingConteiner = winController.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
            this.landingConteiner.setName("langingContainer");
            this.scatterWinContainer = winController.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
            this.scatterWinContainer.setName("winContainer");
            this.landingSymbolsMap = new _hcmn_.haxe_ds_StringMap();
            this.lineAnimationHelper = new winController.LineAnimationHelper("Scatter");
            this.overlapMap = new _hcmn_.haxe_ds_IntMap();
        };
        winController.ScatterSymbolsPlugin = ck_implements(winController.ScatterSymbolsPlugin, winControllerApi.IWinControllerOverlapablePluginExtension);
        winController.ScatterSymbolsPlugin = ck_implements(winController.ScatterSymbolsPlugin, winControllerApi.IWinControllerPlugin);
        winController.ScatterSymbolsPlugin = ck_implements(winController.ScatterSymbolsPlugin, winControllerApi.IWinControllerScatterPluginExtension);
        winController.ScatterSymbolsPlugin.__interfaces__ = [winControllerApi.IWinControllerOverlapablePluginExtension, winControllerApi.IWinControllerPlugin, winControllerApi.IWinControllerScatterPluginExtension];
        winController.ScatterSymbolsPlugin.__name__ = ["winController", "ScatterSymbolsPlugin"];
        winController.ScatterSymbolsPlugin.prototype.reelLayoutModel = null;
        winController.ScatterSymbolsPlugin.prototype.scatterSymbolsModel = null;
        winController.ScatterSymbolsPlugin.prototype.container = null;
        winController.ScatterSymbolsPlugin.prototype.landingConteiner = null;
        winController.ScatterSymbolsPlugin.prototype.scatterWinContainer = null;
        winController.ScatterSymbolsPlugin.prototype.landingSymbolsMap = null;
        winController.ScatterSymbolsPlugin.prototype.winAnimationRulesModel = null;
        winController.ScatterSymbolsPlugin.prototype.winSymbolsModel = null;
        winController.ScatterSymbolsPlugin.prototype.lineAnimationHelper = null;
        winController.ScatterSymbolsPlugin.prototype.overlapMap = null;
        winController.ScatterSymbolsPlugin.prototype.hideScatterLanding = function(remove) {
            if (remove == null) remove = false;
            var $it0 = this.landingSymbolsMap.iterator();
            while ($it0.hasNext()) {
                var scatterLandingSymbol = $it0.next();
                scatterLandingSymbol.stop();
            }
            if (remove) this.landingConteiner.removeChildren();
        };
        winController.ScatterSymbolsPlugin.prototype.showScatterLanding = function(scatterLanding) {
            var animationID = this.scatterSymbolsModel.getScatterLandingAnimationForId(scatterLanding.id);
            var xPosition = this.reelLayoutModel.getCellPosition(scatterLanding.row, scatterLanding.column).get_x();
            var yPosition = this.reelLayoutModel.getCellPosition(scatterLanding.row, scatterLanding.column).get_y();
            var scatterLandingSymbol = winController.OptimizationModel.getWinSymbolFromPool(animationID);
            scatterLandingSymbol.display.setX(xPosition);
            scatterLandingSymbol.display.setY(yPosition);
            scatterLandingSymbol.show();
            this.landingConteiner.addChild(scatterLandingSymbol.display);
            scatterLandingSymbol.play(false);
            this.landingSymbolsMap.set(scatterLanding.row + "_" + scatterLanding.column, scatterLandingSymbol);
        };
        winController.ScatterSymbolsPlugin.prototype.dispose = function() {
            var $it0 = this.landingSymbolsMap.iterator();
            while ($it0.hasNext()) {
                var scatterLandingSymbol = $it0.next();
                scatterLandingSymbol.stop();
            }
            this.landingConteiner.removeChildren();
            this.lineAnimationHelper.dispose();
        };
        winController.ScatterSymbolsPlugin.prototype.ready = function() {
            this.lineAnimationHelper.ready();
        };
        winController.ScatterSymbolsPlugin.prototype.setContainer = function(container) {
            this.container = container;
            container.removeChildren();
            container.addChild(this.landingConteiner);
            container.addChild(this.scatterWinContainer);
            this.lineAnimationHelper.setContainer(this.scatterWinContainer);
        };
        winController.ScatterSymbolsPlugin.prototype.setCurrentWin = function(type, win) {
            this.lineAnimationHelper.setCurrentWin(type, win);
        };
        winController.ScatterSymbolsPlugin.prototype.setOutcome = function(outcome) {
            this.lineAnimationHelper.setOutcome(outcome);
        };
        winController.ScatterSymbolsPlugin.prototype.setReelLayoutModel = function(reelLayoutModel) {
            this.reelLayoutModel = reelLayoutModel;
            this.lineAnimationHelper.setReelLayoutModel(reelLayoutModel);
        };
        winController.ScatterSymbolsPlugin.prototype.setWinAnimationRulesModel = function(winAnimationRulesModel) {
            this.winAnimationRulesModel = winAnimationRulesModel;
            this.lineAnimationHelper.setWinAnimationRulesModel(winAnimationRulesModel);
        };
        winController.ScatterSymbolsPlugin.prototype.setWinSymbolsModel = function(winSymbolsModel) {
            this.winSymbolsModel = winSymbolsModel;
            this.lineAnimationHelper.setWinSymbolsModel(winSymbolsModel);
        };
        winController.ScatterSymbolsPlugin.prototype.showSummery = function(wins) {
            this.lineAnimationHelper.showSummery(wins);
        };
        winController.ScatterSymbolsPlugin.prototype.setScatterLandingModel = function(scatterSumbolsModel) {
            this.scatterSymbolsModel = scatterSumbolsModel;
        };
        winController.ScatterSymbolsPlugin.prototype.setOverlapMap = function(map) {
            this.overlapMap = map;
        };
        winController.ScatterSymbolsPlugin.prototype.setLoadedAssets = function(loadedAssets) {};
        winController.ScatterSymbolsPlugin.prototype.__class__ = winController.ScatterSymbolsPlugin;
        winController.SpaghettiPlugin = function() {
            this.constructed = false;
            winControllerApi.WinControllerAbstractPlugin.call(this);
        };
        winController.SpaghettiPlugin.__name__ = ["winController", "SpaghettiPlugin"];
        winController.SpaghettiPlugin.__super__ = winControllerApi.WinControllerAbstractPlugin;
        for (var k in winControllerApi.WinControllerAbstractPlugin.prototype) winController.SpaghettiPlugin.prototype[k] = winControllerApi.WinControllerAbstractPlugin.prototype[k];
        winController.SpaghettiPlugin.prototype.parrent = null;
        winController.SpaghettiPlugin.prototype.container = null;
        winController.SpaghettiPlugin.prototype.loadedAssets = null;
        winController.SpaghettiPlugin.prototype.constructed = null;
        winController.SpaghettiPlugin.prototype.lines = null;
        winController.SpaghettiPlugin.prototype.enabledTabs = null;
        winController.SpaghettiPlugin.prototype.disabledTabs = null;
        winController.SpaghettiPlugin.prototype.outcome = null;
        winController.SpaghettiPlugin.prototype.setCurrentWin = function(type, win) {
            var id = win.lineId;
            var spagetyName = "line" + id;
            var tabName = "tab" + id;
            this.dispose();
            this.lines.getChildByName(spagetyName).setVisible(true);
            this.enabledTabs.getChildByName(tabName).setVisible(true);
        };
        winController.SpaghettiPlugin.prototype.setOutcome = function(outcome) {
            this.outcome = outcome;
        };
        winController.SpaghettiPlugin.prototype.setLoadedAssets = function(loadedAssets) {
            this.loadedAssets = loadedAssets;
            var vba;
            var key = winController.ConfigurationModel.getSpagettiAssetName();
            vba = _hcmn_.__map_reserved[key] != null ? loadedAssets.getReserved(key) : loadedAssets.h[key];
            var display = winController.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
            var view = winController.CommonModel.factory.createView(vba);
            this.parrent = _hcmn_.js_Boot.__cast(view.getDisplayObject(), displayEngineApi.IDisplayObjectContainer);
            this.construct();
        };
        winController.SpaghettiPlugin.prototype.setContainer = function(container) {
            this.container = container;
            this.construct();
        };
        winController.SpaghettiPlugin.prototype.construct = function() {
            if (this.parrent != null && this.container != null && this.constructed == false) {
                this.constructed = true;
                this.container.addChild(this.parrent);
                this.lines = _hcmn_.js_Boot.__cast(this.parrent.getChildByName("LINES"), displayEngineApi.IDisplayObjectContainer);
                var tabs = null;
                if (tabs != null) {
                    tabs = _hcmn_.js_Boot.__cast(this.parrent.getChildByName("TABS"), displayEngineApi.IDisplayObjectContainer);
                    if (tabs.getChildByName("enabled") != null) this.enabledTabs = _hcmn_.js_Boot.__cast(tabs.getChildByName("enabled"), displayEngineApi.IDisplayObjectContainer);
                    if (tabs.getChildByName("disabled") != null) this.disabledTabs = _hcmn_.js_Boot.__cast(tabs.getChildByName("disabled"), displayEngineApi.IDisplayObjectContainer);
                }
            }
        };
        winController.SpaghettiPlugin.prototype.dispose = function() {
            var numberOffDisabledTabs = 0;
            if (this.disabledTabs != null) numberOffDisabledTabs = this.disabledTabs.getNumChildren();
            var numberOffEnabledTabs = 0;
            if (this.enabledTabs != null) numberOffEnabledTabs = this.enabledTabs.getNumChildren();
            var numberOffLines = 0;
            if (this.lines != null) numberOffLines = this.lines.getNumChildren();
            var _g = 0;
            while (_g < numberOffLines) {
                var l = _g++;
                this.lines.getChildAt(l).setVisible(false);
            }
            var _g1 = 0;
            while (_g1 < numberOffEnabledTabs) {
                var et = _g1++;
                this.enabledTabs.getChildAt(et).setVisible(false);
            }
        };
        winController.SpaghettiPlugin.prototype.showSummery = function(wins) {
            this.dispose();
            var _g = 0;
            while (_g < wins.length) {
                var win = wins[_g];
                ++_g;
                if (win.lineId != null) {
                    var id = win.lineId;
                    var spagetyName = "line" + id;
                    var tabName = "tab" + id;
                    if (this.lines != null) this.lines.getChildByName(spagetyName).setVisible(true);
                    if (this.enabledTabs != null) this.enabledTabs.getChildByName(tabName).setVisible(true);
                }
            }
        };
        winController.SpaghettiPlugin.prototype.__class__ = winController.SpaghettiPlugin;
        winController.WinFramesPlugin = function() {
            this.activeWinFrames = [];
        };
        winController.WinFramesPlugin = ck_implements(winController.WinFramesPlugin, winControllerApi.IWinControllerPlugin);
        winController.WinFramesPlugin.__interfaces__ = [winControllerApi.IWinControllerPlugin];
        winController.WinFramesPlugin.__name__ = ["winController", "WinFramesPlugin"];
        winController.WinFramesPlugin.prototype.container = null;
        winController.WinFramesPlugin.prototype.activeWinFrames = null;
        winController.WinFramesPlugin.prototype.reelLayoutModel = null;
        winController.WinFramesPlugin.prototype.winSymbolsModel = null;
        winController.WinFramesPlugin.prototype.winAnimationRulesModel = null;
        winController.WinFramesPlugin.prototype.dispose = function() {
            var _g = 0;
            var _g1 = this.activeWinFrames;
            while (_g < _g1.length) {
                var activeWinFrame = _g1[_g];
                ++_g;
                if (activeWinFrame.isAnimated()) activeWinFrame.stop();
            }
            this.container.removeChildren();
            this.activeWinFrames = [];
        };
        winController.WinFramesPlugin.prototype.setContainer = function(container) {
            this.container = container;
        };
        winController.WinFramesPlugin.prototype.setCurrentWin = function(type, win) {
            if (win.winPath == null || win.winPath.reelsInfo == null || win.winPath.reelsInfo.length == 0) {
                this.dispose();
                return;
            }
            if (this.winAnimationRulesModel.get_showSummary().show == true && this.winAnimationRulesModel.get_showSummary().type == winControllerApi.SummaryRules.SUMMARY_TYPE_ONLY) return;
            var reelsInfo = win.winPath.reelsInfo;
            this.activeWinFrames = [];
            this.container.removeChildren();
            winController.OptimizationModel.releaseWinFramesPool();
            var _g1 = 0;
            var _g = reelsInfo.length;
            while (_g1 < _g) {
                var column = _g1++;
                var _g3 = 0;
                var _g2 = reelsInfo[column].length;
                while (_g3 < _g2) {
                    var row = _g3++;
                    if (reelsInfo[column][row] == 1 && this.winAnimationRulesModel.get_showActiveFrames()) {
                        var symbolID = this.reelLayoutModel.getCellSymbolID(row, column);
                        var assetID = this.winSymbolsModel.getActiveFrameAssetId(symbolID);
                        var uniqueID = _hcmn_.Math.random() + "_" + _hcmn_.Math.random();
                        var winFrame = winController.OptimizationModel.getWinFrameFromPool(assetID);
                        winFrame.display.setX(this.reelLayoutModel.getCellPosition(row, column).get_x() + winFrame.getXOffset());
                        winFrame.display.setY(this.reelLayoutModel.getCellPosition(row, column).get_y() + winFrame.getYOffset());
                        this.activeWinFrames.push(winFrame);
                        if (this.winSymbolsModel.getLineColor(win.lineId) != null) {
                            var winColor = this.winSymbolsModel.getLineColor(win.lineId);
                            winFrame.tint(winColor);
                        }
                    } else if (reelsInfo[column][row] == 2 && this.winAnimationRulesModel.get_showInactiveFrames()) {
                        var symbolID1 = this.reelLayoutModel.getCellSymbolID(row, column);
                        var assetID1 = this.winSymbolsModel.getInactiveFrameAssetId(symbolID1);
                        var uniqueID1 = _hcmn_.Math.random() + "_" + _hcmn_.Math.random();
                        var winFrame1 = winController.OptimizationModel.getWinFrameFromPool(assetID1);
                        winFrame1.display.setX(this.reelLayoutModel.getCellPosition(row, column).get_x() + winFrame1.getXOffset());
                        winFrame1.display.setY(this.reelLayoutModel.getCellPosition(row, column).get_y() + winFrame1.getYOffset());
                        this.activeWinFrames.push(winFrame1);
                        if (this.winSymbolsModel.getLineColor(win.lineId) != null) {
                            var winColor1 = this.winSymbolsModel.getLineColor(win.lineId);
                            winFrame1.tint(winColor1);
                        }
                    }
                }
            }
            var _g11 = 0;
            var _g4 = this.activeWinFrames.length;
            while (_g11 < _g4) {
                var n = _g11++;
                var reverseIndex = this.activeWinFrames.length - 1 - n;
                var newFrame = this.activeWinFrames[reverseIndex];
                this.container.addChild(newFrame.display);
                if (newFrame.isAnimated()) newFrame.play(false);
            }
        };
        winController.WinFramesPlugin.prototype.setOutcome = function(outcome) {};
        winController.WinFramesPlugin.prototype.setReelLayoutModel = function(reelLayoutModel) {
            this.reelLayoutModel = reelLayoutModel;
        };
        winController.WinFramesPlugin.prototype.setWinSymbolsModel = function(winSymbolsModel) {
            this.winSymbolsModel = winSymbolsModel;
        };
        winController.WinFramesPlugin.prototype.setWinAnimationRulesModel = function(winAnimationRulesModel) {
            this.winAnimationRulesModel = winAnimationRulesModel;
        };
        winController.WinFramesPlugin.prototype.ready = function() {};
        winController.WinFramesPlugin.prototype.showSummery = function(wins) {
            this.dispose();
        };
        winController.WinFramesPlugin.prototype.setLoadedAssets = function(loadedAssets) {};
        winController.WinFramesPlugin.prototype.__class__ = winController.WinFramesPlugin;
        winController.WinSymbolsPlugin = function() {
            this.overlapMap = new _hcmn_.haxe_ds_IntMap();
            this.lineAnimationHelper = new winController.LineAnimationHelper("LineLeft");
        };
        winController.WinSymbolsPlugin = ck_implements(winController.WinSymbolsPlugin, winControllerApi.IWinControllerOverlapablePluginExtension);
        winController.WinSymbolsPlugin = ck_implements(winController.WinSymbolsPlugin, winControllerApi.IWinControllerPlugin);
        winController.WinSymbolsPlugin.__interfaces__ = [winControllerApi.IWinControllerOverlapablePluginExtension, winControllerApi.IWinControllerPlugin];
        winController.WinSymbolsPlugin.__name__ = ["winController", "WinSymbolsPlugin"];
        winController.WinSymbolsPlugin.prototype.lineAnimationHelper = null;
        winController.WinSymbolsPlugin.prototype.overlapMap = null;
        winController.WinSymbolsPlugin.prototype.dispose = function() {
            this.lineAnimationHelper.dispose();
        };
        winController.WinSymbolsPlugin.prototype.setContainer = function(container) {
            this.lineAnimationHelper.setContainer(container);
        };
        winController.WinSymbolsPlugin.prototype.setReelLayoutModel = function(reelLayoutModel) {
            this.lineAnimationHelper.setReelLayoutModel(reelLayoutModel);
        };
        winController.WinSymbolsPlugin.prototype.setWinSymbolsModel = function(winSymbolsModel) {
            this.lineAnimationHelper.setWinSymbolsModel(winSymbolsModel);
        };
        winController.WinSymbolsPlugin.prototype.setCurrentWin = function(type, win) {
            this.lineAnimationHelper.setCurrentWin(type, win);
        };
        winController.WinSymbolsPlugin.prototype.setOutcome = function(outcome) {
            this.lineAnimationHelper.setOutcome(outcome);
        };
        winController.WinSymbolsPlugin.prototype.setWinAnimationRulesModel = function(winAnimationRulesModel) {
            this.lineAnimationHelper.setWinAnimationRulesModel(winAnimationRulesModel);
        };
        winController.WinSymbolsPlugin.prototype.ready = function() {
            this.lineAnimationHelper.ready();
        };
        winController.WinSymbolsPlugin.prototype.showSummery = function(wins) {
            this.lineAnimationHelper.showSummery(wins);
        };
        winController.WinSymbolsPlugin.prototype.setOverlapMap = function(map) {
            this.overlapMap = map;
        };
        winController.WinSymbolsPlugin.prototype.setLoadedAssets = function(loadedAssets) {};
        winController.WinSymbolsPlugin.prototype.__class__ = winController.WinSymbolsPlugin;
        winController.LineAnimationHelper = function(type) {
            this.type = type;
            this.allWinSymbolsMap = new _hcmn_.haxe_ds_StringMap();
            this.allWinSymbolsPerLine = new _hcmn_.haxe_ds_IntMap();
        };
        winController.LineAnimationHelper.__name__ = ["winController", "LineAnimationHelper"];
        winController.LineAnimationHelper.prototype.container = null;
        winController.LineAnimationHelper.prototype.outcome = null;
        winController.LineAnimationHelper.prototype.allWinSymbolsMap = null;
        winController.LineAnimationHelper.prototype.allWinSymbolsPerLine = null;
        winController.LineAnimationHelper.prototype.reelLayoutModel = null;
        winController.LineAnimationHelper.prototype.winSymbolsModel = null;
        winController.LineAnimationHelper.prototype.winAnimationRulesModel = null;
        winController.LineAnimationHelper.prototype.visibilityArray = null;
        winController.LineAnimationHelper.prototype.type = null;
        winController.LineAnimationHelper.prototype.dispose = function() {
            var $it0 = this.allWinSymbolsMap.iterator();
            while ($it0.hasNext()) {
                var winSymbol = $it0.next();
                if (winSymbol.isAnimated()) winSymbol.stop();
            }
            winController.OptimizationModel.releaseWinSymbolsPool();
            this.container.removeChildren();
            this.allWinSymbolsMap = new _hcmn_.haxe_ds_StringMap();
        };
        winController.LineAnimationHelper.prototype.setContainer = function(container) {
            this.container = container;
        };
        winController.LineAnimationHelper.prototype.setReelLayoutModel = function(reelLayoutModel) {
            this.reelLayoutModel = reelLayoutModel;
        };
        winController.LineAnimationHelper.prototype.setWinSymbolsModel = function(winSymbolsModel) {
            this.winSymbolsModel = winSymbolsModel;
        };
        winController.LineAnimationHelper.prototype.setCurrentWin = function(type, win) {
            if (this.type != type) {
                if (this.winAnimationRulesModel.get_animateCurrentLineOnly()) {
                    var $it0 = this.allWinSymbolsPerLine.keys();
                    while ($it0.hasNext()) {
                        var key = $it0.next();
                        var symbolArray = this.allWinSymbolsPerLine.h[key];
                        var _g = 0;
                        while (_g < symbolArray.length) {
                            var winSymbol = symbolArray[_g];
                            ++_g;
                            winSymbol.stop();
                        }
                    }
                }
                return;
            }
            if (this.winAnimationRulesModel.get_showSummary().show == true && this.winAnimationRulesModel.get_showSummary().type == winControllerApi.SummaryRules.SUMMARY_TYPE_ONLY) return;
            if (this.winAnimationRulesModel.get_animateCurrentLineOnly()) {
                var backstage = new _hcmn_.haxe_ds_StringMap();
                var lineID = win.lineId;
                var fosucArray = this.allWinSymbolsPerLine.h[lineID];
                var _g1 = 0;
                while (_g1 < fosucArray.length) {
                    var winSymbolInFocus = fosucArray[_g1];
                    ++_g1;
                    var assetId = winSymbolInFocus.getAssetId();
                    if (_hcmn_.__map_reserved[assetId] != null ? backstage.existsReserved(assetId) : backstage.h.hasOwnProperty(assetId)) {
                        var currentNumberOfApperance;
                        currentNumberOfApperance = _hcmn_.__map_reserved[assetId] != null ? backstage.getReserved(assetId) : backstage.h[assetId];
                        currentNumberOfApperance++;
                        if (_hcmn_.__map_reserved[assetId] != null) backstage.setReserved(assetId, currentNumberOfApperance);
                        else backstage.h[assetId] = currentNumberOfApperance;
                    } else if (_hcmn_.__map_reserved[assetId] != null) backstage.setReserved(assetId, 0);
                    else backstage.h[assetId] = 0;
                }
                var $it1 = this.allWinSymbolsPerLine.keys();
                while ($it1.hasNext()) {
                    var key1 = $it1.next();
                    var symbolArray1 = this.allWinSymbolsPerLine.h[key1];
                    var _g2 = 0;
                    while (_g2 < symbolArray1.length) {
                        var winSymbol1 = symbolArray1[_g2];
                        ++_g2;
                        if (key1 != lineID) {
                            var inFoxus = false;
                            var _g11 = 0;
                            while (_g11 < fosucArray.length) {
                                var mc = fosucArray[_g11];
                                ++_g11;
                                if (winSymbol1 == mc) {
                                    inFoxus = true;
                                    break;
                                }
                            }
                            if (!inFoxus) winSymbol1.stop();
                        }
                    }
                }
                var _g3 = 0;
                while (_g3 < fosucArray.length) {
                    var winSymbolsToPlay = fosucArray[_g3];
                    ++_g3;
                    var assetId1 = winSymbolsToPlay.getAssetId();
                    var appirance;
                    appirance = _hcmn_.__map_reserved[assetId1] != null ? backstage.getReserved(assetId1) : backstage.h[assetId1];
                    if (appirance > 1) winSymbolsToPlay.play(false, null, null, this.winAnimationRulesModel.winRules.restartEachWinAnimation, winController.WinSymbolsModel.isHighWin);
                    else winSymbolsToPlay.play(false, null, null, this.winAnimationRulesModel.winRules.restartEachWinAnimation, winController.WinSymbolsModel.isHighWin);
                }
            }
        };
        winController.LineAnimationHelper.prototype.setOutcome = function(outcome) {
            this.dispose();
            this.outcome = outcome;
            if (this.winAnimationRulesModel.get_showSummary().show == true && this.winAnimationRulesModel.get_showSummary().type == winControllerApi.SummaryRules.SUMMARY_TYPE_ONLY) return;
            var hasLineWins = outcome.lineWins != null && outcome.lineWins.length > 0;
            var hasScatterWins = outcome.scatterWins != null && outcome.scatterWins.length > 0;
            var hasBonusWins = outcome.bonusWins != null && outcome.bonusWins.length > 0;
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelLayoutModel.getNumberOfColumns();
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push((function($this) {
                    var $r;
                    var _g3 = []; {
                        var _g5 = 0;
                        var _g4 = $this.reelLayoutModel.getNumberOfRows();
                        while (_g5 < _g4) {
                            var j = _g5++;
                            _g3.push(0);
                        }
                    }
                    $r = _g3;
                    return $r;
                }(this)));
            }
            this.visibilityArray = _g;
            if (hasLineWins || hasScatterWins || hasBonusWins) {
                this.allWinSymbolsMap = new _hcmn_.haxe_ds_StringMap();
                this.allWinSymbolsPerLine = new _hcmn_.haxe_ds_IntMap();
                var winsInLine = null;
                var _g11 = this.type;
                switch (_g11) {
                    case "Scatter":
                        winsInLine = outcome.scatterWins;
                        break;
                    case "LineLeft":
                        winsInLine = outcome.lineWins;
                        break;
                    case "BonusWinLine":
                        winsInLine = outcome.bonusWins;
                        break;
                }
                if (winsInLine == null || winsInLine.length == 0) return;
                var _g21 = 0;
                var _g12 = winsInLine.length;
                while (_g21 < _g12) {
                    var s = _g21++;
                    if (winsInLine[s].winPath == null) continue;
                    var reelsInfo = winsInLine[s].winPath.reelsInfo;
                    var lineID = winsInLine[s].lineId;
                    if (!this.allWinSymbolsPerLine.h.hasOwnProperty(lineID)) {
                        var value = [];
                        this.allWinSymbolsPerLine.h[lineID] = value;
                    }
                    var _g41 = 0;
                    var _g31 = reelsInfo.length;
                    while (_g41 < _g31) {
                        var column = _g41++;
                        var _g6 = 0;
                        var _g51 = reelsInfo[column].length;
                        while (_g6 < _g51) {
                            var row = _g6++;
                            if (reelsInfo[column][row] == 1) {
                                var uniqueId = _hcmn_.Math.random() + "_" + _hcmn_.Math.random();
                                var assetId = this.winSymbolsModel.getWinSymbolAssetId(this.reelLayoutModel.getCellSymbolID(row, column));
                                var symbolID = this.reelLayoutModel.getCellSymbolID(row, column);
                                var key = column + "_" + row;
                                if (winController.ReelModel.HAS_BLEED) this.visibilityArray[column][row + winController.ReelModel.BLEED_AMOUNT] = 1;
                                else this.visibilityArray[column][row] = 1;
                                var joinData;
                                joinData = ((function($this) {
                                    var $r;
                                    var this1 = winController.WinSymbolsModel.get_winSymbolsViewDefinitionsMap();
                                    $r = this1.get(symbolID);
                                    return $r;
                                }(this))).joinDefinition;
                                if (!this.allWinSymbolsMap.exists(key)) {
                                    if (joinData == null) {
                                        var winSymbol = winController.OptimizationModel.getWinSymbolFromPool(assetId);
                                        this.setFreezeFunction(winSymbol, column, row);
                                        winSymbol.display.setX(this.reelLayoutModel.getCellPosition(row, column).get_x());
                                        winSymbol.display.setY(this.reelLayoutModel.getCellPosition(row, column).get_y());
                                        this.allWinSymbolsMap.set(key, winSymbol);
                                    } else {
                                        var joinYOffset = winController.OptimizationModel.getYJoinOffset(joinData, symbolID);
                                        var newY = _hcmn_.Math.round(this.reelLayoutModel.getCellPosition(row, column).get_y());
                                        var newX = _hcmn_.Math.round(this.reelLayoutModel.getCellPosition(row, column).get_x());
                                        var determinant1;
                                        var key1 = column + "_" + (row - _hcmn_.HxOverrides.indexOf(joinData.joinArray, symbolID, 0));
                                        determinant1 = this.allWinSymbolsMap.exists(key1);
                                        var determinant2 = false;
                                        if (!determinant1) {
                                            var $it0 = this.allWinSymbolsMap.iterator();
                                            while ($it0.hasNext()) {
                                                var wsi = $it0.next();
                                                var differenceY = wsi.display.getY() - (newY + joinYOffset);
                                                var differenceX = wsi.display.getX() - newX;
                                                if (differenceY < 5 && differenceY > -5 && differenceX < 5 && differenceX > -5) {
                                                    determinant2 = true;
                                                    break;
                                                }
                                            }
                                            if (determinant1 == false && determinant2 == false) {
                                                var winSymbol1 = winController.OptimizationModel.getWinSymbolFromPool(assetId);
                                                this.setFreezeFunction(winSymbol1, column, row);
                                                winSymbol1.display.setX(this.reelLayoutModel.getCellPosition(row, column).get_x());
                                                winSymbol1.display.setY(newY + joinYOffset);
                                                this.allWinSymbolsMap.set(key, winSymbol1);
                                            }
                                        }
                                    }
                                }
                                if (joinData == null) {
                                    var toPush = this.allWinSymbolsMap.get(key);
                                    this.setFreezeFunction(toPush, column, row);
                                    this.allWinSymbolsPerLine.h[lineID].push(toPush);
                                } else {
                                    var $it1 = this.allWinSymbolsMap.keys();
                                    while ($it1.hasNext()) {
                                        var k = $it1.next();
                                        var c = _hcmn_.Std.parseInt(k.split("_")[0]);
                                        if (c == column) {
                                            var ws = this.allWinSymbolsMap.get(k);
                                            if (ws.getAssetId() == assetId) {
                                                var toPush1 = ws;
                                                this.allWinSymbolsPerLine.h[lineID].push(toPush1);
                                                break;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if (!this.winAnimationRulesModel.get_animateCurrentLineOnly()) {
                var backstage = new _hcmn_.haxe_ds_StringMap();
                var $it2 = this.allWinSymbolsMap.iterator();
                while ($it2.hasNext()) {
                    var winSymbol2 = $it2.next();
                    var assetId1 = winSymbol2.getAssetId();
                    if (_hcmn_.__map_reserved[assetId1] != null ? backstage.existsReserved(assetId1) : backstage.h.hasOwnProperty(assetId1)) {
                        var currentNumberOfApperance;
                        currentNumberOfApperance = _hcmn_.__map_reserved[assetId1] != null ? backstage.getReserved(assetId1) : backstage.h[assetId1];
                        currentNumberOfApperance++;
                        if (_hcmn_.__map_reserved[assetId1] != null) backstage.setReserved(assetId1, currentNumberOfApperance);
                        else backstage.h[assetId1] = currentNumberOfApperance;
                    } else if (_hcmn_.__map_reserved[assetId1] != null) backstage.setReserved(assetId1, 0);
                    else backstage.h[assetId1] = 0;
                }
                var $it3 = this.allWinSymbolsMap.iterator();
                while ($it3.hasNext()) {
                    var winSymbolToPlay = $it3.next();
                    this.container.addChild(winSymbolToPlay.display);
                    var assetId2 = winSymbolToPlay.getAssetId();
                    var appirance;
                    appirance = _hcmn_.__map_reserved[assetId2] != null ? backstage.getReserved(assetId2) : backstage.h[assetId2];
                    if (appirance > 1) winSymbolToPlay.play(false);
                    else winSymbolToPlay.play(false);
                }
            } else {
                var $it4 = this.allWinSymbolsMap.iterator();
                while ($it4.hasNext()) {
                    var winSymbol3 = $it4.next();
                    this.container.addChild(winSymbol3.display);
                    if (winSymbol3.isAnimated()) winSymbol3.show();
                }
            }
            this.reelLayoutModel.setCellVisibility(this.visibilityArray);
        };
        winController.LineAnimationHelper.prototype.setWinAnimationRulesModel = function(winAnimationRulesModel) {
            this.winAnimationRulesModel = winAnimationRulesModel;
        };
        winController.LineAnimationHelper.prototype.ready = function() {};
        winController.LineAnimationHelper.prototype.setFreezeFunction = function(winSymbol, column, row) {
            if (winController.WinSymbolsModel.frozenSymbols != null && winController.WinSymbolsModel.frozenSymbols[column][row] == 1) {
                if (this.winAnimationRulesModel.get_excludeScatterWinFromFreeze() == true && this.type == "Scatter") winSymbol.setFrozen(false);
                else winSymbol.setFrozen(true);
            } else winSymbol.setFrozen(false);
        };
        winController.LineAnimationHelper.prototype.showSummery = function(wins) {
            this.dispose();
            var hasLineWins = this.outcome.lineWins != null && this.outcome.lineWins.length > 0;
            var hasScatterWins = this.outcome.scatterWins != null && this.outcome.scatterWins.length > 0;
            var hasBonusWins = this.outcome.bonusWins != null && this.outcome.bonusWins.length > 0;
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelLayoutModel.getNumberOfColumns();
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push((function($this) {
                    var $r;
                    var _g3 = []; {
                        var _g5 = 0;
                        var _g4 = $this.reelLayoutModel.getNumberOfRows();
                        while (_g5 < _g4) {
                            var j = _g5++;
                            _g3.push(0);
                        }
                    }
                    $r = _g3;
                    return $r;
                }(this)));
            }
            this.visibilityArray = _g;
            if (hasLineWins || hasScatterWins || hasBonusWins) {
                this.allWinSymbolsMap = new _hcmn_.haxe_ds_StringMap();
                this.allWinSymbolsPerLine = new _hcmn_.haxe_ds_IntMap();
                var winsInLine = null;
                var _g11 = this.type;
                switch (_g11) {
                    case "Scatter":
                        winsInLine = this.outcome.scatterWins;
                        break;
                    case "LineLeft":
                        winsInLine = this.outcome.lineWins;
                        break;
                    case "BonusWinLine":
                        winsInLine = this.outcome.bonusWins;
                        break;
                }
                if (winsInLine == null || winsInLine.length == 0) return;
                var _g21 = 0;
                var _g12 = winsInLine.length;
                while (_g21 < _g12) {
                    var s = _g21++;
                    if (winsInLine[s].winPath == null) continue;
                    var reelsInfo = winsInLine[s].winPath.reelsInfo;
                    var lineID = winsInLine[s].lineId;
                    if (!this.allWinSymbolsPerLine.h.hasOwnProperty(lineID)) {
                        var value = [];
                        this.allWinSymbolsPerLine.h[lineID] = value;
                    }
                    var _g41 = 0;
                    var _g31 = reelsInfo.length;
                    while (_g41 < _g31) {
                        var column = _g41++;
                        var _g6 = 0;
                        var _g51 = reelsInfo[column].length;
                        while (_g6 < _g51) {
                            var row = _g6++;
                            if (reelsInfo[column][row] == 1) {
                                var uniqueId = _hcmn_.Math.random() + "_" + _hcmn_.Math.random();
                                var assetId = this.winSymbolsModel.getWinSymbolAssetId(this.reelLayoutModel.getCellSymbolID(row, column));
                                var symbolID = this.reelLayoutModel.getCellSymbolID(row, column);
                                var key = column + "_" + row;
                                if (winController.ReelModel.HAS_BLEED) this.visibilityArray[column][row + winController.ReelModel.BLEED_AMOUNT] = 1;
                                else this.visibilityArray[column][row] = 1;
                                if (!this.allWinSymbolsMap.exists(key)) {
                                    var joinData;
                                    joinData = ((function($this) {
                                        var $r;
                                        var this1 = winController.WinSymbolsModel.get_winSymbolsViewDefinitionsMap();
                                        $r = this1.get(symbolID);
                                        return $r;
                                    }(this))).joinDefinition;
                                    if (joinData == null) {
                                        var winSymbol = winController.OptimizationModel.getWinSymbolFromPool(assetId);
                                        winSymbol.display.setX(this.reelLayoutModel.getCellPosition(row, column).get_x());
                                        winSymbol.display.setY(this.reelLayoutModel.getCellPosition(row, column).get_y());
                                        this.allWinSymbolsMap.set(key, winSymbol);
                                    } else {
                                        var joinYOffset = winController.OptimizationModel.getYJoinOffset(joinData, symbolID);
                                        var newY = _hcmn_.Math.round(this.reelLayoutModel.getCellPosition(row, column).get_y());
                                        var newX = _hcmn_.Math.round(this.reelLayoutModel.getCellPosition(row, column).get_x());
                                        var determinant1;
                                        var key1 = column + "_" + (row - _hcmn_.HxOverrides.indexOf(joinData.joinArray, symbolID, 0));
                                        determinant1 = this.allWinSymbolsMap.exists(key1);
                                        var determinant2 = false;
                                        if (!determinant1) {
                                            var $it0 = this.allWinSymbolsMap.iterator();
                                            while ($it0.hasNext()) {
                                                var wsi = $it0.next();
                                                var differenceY = wsi.display.getY() - (newY + joinYOffset);
                                                var differenceX = wsi.display.getX() - newX;
                                                if (differenceY < 5 && differenceY > -5 && differenceX < 5 && differenceX > -5) {
                                                    determinant2 = true;
                                                    break;
                                                }
                                            }
                                            if (determinant1 == false && determinant2 == false) {
                                                var winSymbol1 = winController.OptimizationModel.getWinSymbolFromPool(assetId);
                                                winSymbol1.display.setX(this.reelLayoutModel.getCellPosition(row, column).get_x());
                                                winSymbol1.display.setY(newY + joinYOffset);
                                                this.allWinSymbolsMap.set(key, winSymbol1);
                                            }
                                        }
                                    }
                                }
                                this.allWinSymbolsPerLine.h[lineID].push(this.allWinSymbolsMap.get(key));
                            }
                        }
                    }
                }
                var backstage = new _hcmn_.haxe_ds_StringMap();
                var $it1 = this.allWinSymbolsMap.iterator();
                while ($it1.hasNext()) {
                    var winSymbol2 = $it1.next();
                    var assetId1 = winSymbol2.getAssetId();
                    if (_hcmn_.__map_reserved[assetId1] != null ? backstage.existsReserved(assetId1) : backstage.h.hasOwnProperty(assetId1)) {
                        var currentNumberOfApperance;
                        currentNumberOfApperance = _hcmn_.__map_reserved[assetId1] != null ? backstage.getReserved(assetId1) : backstage.h[assetId1];
                        currentNumberOfApperance++;
                        if (_hcmn_.__map_reserved[assetId1] != null) backstage.setReserved(assetId1, currentNumberOfApperance);
                        else backstage.h[assetId1] = currentNumberOfApperance;
                    } else if (_hcmn_.__map_reserved[assetId1] != null) backstage.setReserved(assetId1, 0);
                    else backstage.h[assetId1] = 0;
                }
                var $it2 = this.allWinSymbolsMap.iterator();
                while ($it2.hasNext()) {
                    var winSymbolToPlay = $it2.next();
                    this.container.addChild(winSymbolToPlay.display);
                    if ((function($this) {
                            var $r;
                            var key2 = winSymbolToPlay.getAssetId();
                            $r = _hcmn_.__map_reserved[key2] != null ? backstage.getReserved(key2) : backstage.h[key2];
                            return $r;
                        }(this)) > 0) winSymbolToPlay.play(false, null, null, this.winAnimationRulesModel.winRules.restartEachWinAnimation, winController.WinSymbolsModel.isHighWin);
                    else winSymbolToPlay.play(false, null, null, this.winAnimationRulesModel.winRules.restartEachWinAnimation, winController.WinSymbolsModel.isHighWin);
                }
                this.reelLayoutModel.setCellVisibility(this.visibilityArray);
            }
        };
        winController.LineAnimationHelper.prototype.hideCell = function(row, column) {};
        winController.LineAnimationHelper.prototype.showCell = function(row, column) {};
        winController.LineAnimationHelper.prototype.__class__ = winController.LineAnimationHelper; {
            var ArrayBuffer = (Function("return typeof ArrayBuffer != 'undefined' ? ArrayBuffer : null"))() || js.html.compat.ArrayBuffer;
            if (ArrayBuffer.prototype.slice == null) ArrayBuffer.prototype.slice = js.html.compat.ArrayBuffer.sliceImpl;
        };
        var DataView = (Function("return typeof DataView != 'undefined' ? DataView : null"))() || js.html.compat.DataView;
        haxe.ds.ObjectMap.count = 0;;
        haxe.io.FPHelper.i64tmp = (function($this) {
            var $r;
            var x = new haxe._Int64.___Int64(0, 0);
            $r = x;
            return $r;
        }(this));;
        winController.WinControllerPluginService.plugins = new _hcmn_.haxe_ds_StringMap();;
        winController.WinControllerPluginService.containers = new _hcmn_.haxe_ds_StringMap();;
        winController.WinControllerPluginService.ready = false;;
        winController.Controller._CONTROLLERS = [];;
        winController.ConfigurationConstants.COMPNENT_LAYER_ID = "WINCONTROLLER";;
        winController.ConfigurationConstants.WIN_CONTROLLER_CONFIGURATION_ID = "win-controller-assets/win-controller-configuration";;
        winController.ConfigurationConstants.REEL_CONFIGURATION_ID = "reel-config";;
        winController.ConfigurationConstants.SLOT_CONFIGURATION_ID = "slot-definition_json";;
        winController.ConfigurationModel.spagettiAssetName = "spagetti";;
        winController.ConfigurationModel.frameColors = new _hcmn_.haxe_ds_IntMap();;
        winController.OptimizationModel.initialisedFrames = new _hcmn_.haxe_ds_StringMap();;
        winController.OptimizationModel.initialisedWinSymbols = new _hcmn_.haxe_ds_StringMap();;
        winController.OptimizationModel.winSymbolsOnStage = new _hcmn_.haxe_ds_StringMap();;
        winController.ReelModel.numberOfRows = 5;;
        winController.ReelModel.numberOfCollumns = 4;;
        winController.ReelModel.reelWidth = 0;;
        winController.ReelModel.reelHeight = 0;;
        winController.ReelModel.WIN_SYMBOL_ROW_OFFSET = 1;;
        winController.ReelModel.MANUAL_ROW_SET = false;;
        winController.ReelModel.HAS_BLEED = false;;
        winController.ReelModel.BLEED_AMOUNT = 0;;
        winController.WinSymbolsModel.winSymbolsMap = new _hcmn_.haxe_ds_StringMap();;
        winController.WinSymbolsModel.scatterLandingMap = new _hcmn_.haxe_ds_StringMap();;
        winController.WinSymbolsModel.winFramesViewDefinitionMapActive = new _hcmn_.haxe_ds_StringMap();;
        winController.WinSymbolsModel.winFramesViewDefinitionMapInactive = new _hcmn_.haxe_ds_StringMap();;
        winController.WinSymbolsModel._hasScattersLanding = false;;
        winController.WinSymbolsModel.isHighWin = false;;
        winController.WinSymbolsModel.stopFrameName = "";;
        winController.Const.UPDATE_LAYOUT = "UPDATE_LAYOUT";;
        winController.Const.INITIALISE = "initialise";;
        winController.Const.DISPOSE = "dispose";;
        winController.Const.WIN_CYCLE_FINISHED = "commonWinAnimationCycleEnded";;
        winController.Const.REGISTER_NATIVE_PLUGINS = "registerNativePlugins";;
        winController.Const.REGISTER_CUSTOM_PLUGIN = "registerCustomPlugin";;
        winController.Const.REGISTER_PLUGINS = "registerPlugins";;
        winController.Const.ADD_SUB_CONTAINERS = "addSubContainer";;
        winController.Const.SET_OUTCOME = "showOutcome";;
        winController.Const.SHOW_CURRENT_WIN = "showCurrentWin";;
        winController.Const.ANIMATE_WIN = "animateWin";;
        winController.Const.SHOW_SUMMARY = "showSummary";;
        winController.Const.SHOW_SCATTER_LANDING = "showScatterLanding";;
        winController.Const.UPDATE_REEL_DATA = "updateReelData";;
        winController.Const.STOP_SCATTER_LANDING = "stopScatterLanding";;
        winController.Const.IMPLEMENT_OVERLAP_IN_WIN = "implementOverlapInWin";;
        winController.Const.WIN_SYMBOLS_FINISHED = "winSymbolsFinished";;
        winController.DefaultPluginTypes.WIN_SYMBOLS = "WIN_SYMBOLS";;
        winController.DefaultPluginTypes.BONUS_SYMBOL = "BONUS_SYMBOLS";;
        winController.DefaultPluginTypes.SCATTER_SYMBOL = "SCATTER_SYMBOLS";;
        winController.DefaultPluginTypes.WIN_FRAMES = "WIN_FRAMES";;
        winController.DefaultPluginTypes.REEL_FRAME = "REEL_FRAME";;
        winController.DefaultPluginTypes.SPAGHETTI = "SPAGHETTI";;
        winController.CommonConstants.PREPARE_COMMON_MODEL = "Common:PrepareConfiguration";;
        winController.CommonConstants.PREPARE_ASSETS = "Common:PrepareAssets";;
        winController.CommonConstants.COMMON_MODEL_PREPARED = "commonModelPrepared";;
        winController.CommonModel.interval = 1000;;
        winController.CommonModel.createdViews = new _hcmn_.haxe_ds_StringMap();;
        winController.LineAnimationHelper.SCATTER_TYPE_WIN = "Scatter";;
        winController.LineAnimationHelper.LINE_TYPE_WIN = "LineLeft";;
        winController.LineAnimationHelper.BONUS_WIN = "BonusWinLine";;
        return {
            exports: winController,
            activator: winController.Activator
        };
    });
//# sourceURL=winController.js