define("smashThePigWinFrames", ["viewBuilderApi", "smashThePigWinAnimatorPort", "smashThePigWinFramesDeclaration", "componentmodelComponentApi", "clientkernelLoaderApi", "slotModelApi", "displayEngineApi", "clientkernelTestableApi", "gameLayoutApi", "clientkernelEventbusApi", "clientkernelModulesApi"],
    function(viewBuilderApi, smashThePigWinAnimatorPort, smashThePigWinFramesDeclaration, componentmodelComponentApi, clientkernelLoaderApi, slotModelApi, displayEngineApi, clientkernelTestableApi, gameLayoutApi, 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"
                };
            },
            keys: function() {
                return {
                    arguments: [],
                    returns: "null"
                };
            }
        };
        if (!haxe.ds) {
            haxe.ds = {};
        };
        haxe.ds.BalancedTree = function() {};
        haxe.ds.BalancedTree.__name__ = ["haxe", "ds", "BalancedTree"];
        haxe.ds.BalancedTree.prototype.root = null;
        haxe.ds.BalancedTree.prototype.set = function(key, value) {
            this.root = this.setLoop(key, value, this.root);
        };
        haxe.ds.BalancedTree.prototype.get = function(key) {
            var node = this.root;
            while (node != null) {
                var c = this.compare(key, node.key);
                if (c == 0) return node.value;
                if (c < 0) node = node.left;
                else node = node.right;
            }
            return null;
        };
        haxe.ds.BalancedTree.prototype.keys = function() {
            var ret = [];
            this.keysLoop(this.root, ret);
            return _hcmn_.HxOverrides.iter(ret);
        };
        haxe.ds.BalancedTree.prototype.setLoop = function(k, v, node) {
            if (node == null) return new haxe.ds.TreeNode(null, k, v, null);
            var c = this.compare(k, node.key);
            if (c == 0) return new haxe.ds.TreeNode(node.left, k, v, node.right, node == null ? 0 : node._height);
            else if (c < 0) {
                var nl = this.setLoop(k, v, node.left);
                return this.balance(nl, node.key, node.value, node.right);
            } else {
                var nr = this.setLoop(k, v, node.right);
                return this.balance(node.left, node.key, node.value, nr);
            }
        };
        haxe.ds.BalancedTree.prototype.keysLoop = function(node, acc) {
            if (node != null) {
                this.keysLoop(node.left, acc);
                acc.push(node.key);
                this.keysLoop(node.right, acc);
            }
        };
        haxe.ds.BalancedTree.prototype.balance = function(l, k, v, r) {
            var hl;
            if (l == null) hl = 0;
            else hl = l._height;
            var hr;
            if (r == null) hr = 0;
            else hr = r._height;
            if (hl > hr + 2) {
                if ((function($this) {
                        var $r;
                        var _this = l.left;
                        $r = _this == null ? 0 : _this._height;
                        return $r;
                    }(this)) >= (function($this) {
                        var $r;
                        var _this1 = l.right;
                        $r = _this1 == null ? 0 : _this1._height;
                        return $r;
                    }(this))) return new haxe.ds.TreeNode(l.left, l.key, l.value, new haxe.ds.TreeNode(l.right, k, v, r));
                else return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l.left, l.key, l.value, l.right.left), l.right.key, l.right.value, new haxe.ds.TreeNode(l.right.right, k, v, r));
            } else if (hr > hl + 2) {
                if ((function($this) {
                        var $r;
                        var _this2 = r.right;
                        $r = _this2 == null ? 0 : _this2._height;
                        return $r;
                    }(this)) > (function($this) {
                        var $r;
                        var _this3 = r.left;
                        $r = _this3 == null ? 0 : _this3._height;
                        return $r;
                    }(this))) return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l, k, v, r.left), r.key, r.value, r.right);
                else return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l, k, v, r.left.left), r.left.key, r.left.value, new haxe.ds.TreeNode(r.left.right, r.key, r.value, r.right));
            } else return new haxe.ds.TreeNode(l, k, v, r, (hl > hr ? hl : hr) + 1);
        };
        haxe.ds.BalancedTree.prototype.compare = function(k1, k2) {
            return _hcmn_.Reflect.compare(k1, k2);
        };
        haxe.ds.BalancedTree.prototype.__class__ = haxe.ds.BalancedTree;
        haxe.ds.TreeNode = function(l, k, v, r, h) {
            if (h == null) h = -1;
            this.left = l;
            this.key = k;
            this.value = v;
            this.right = r;
            if (h == -1) this._height = ((function($this) {
                var $r;
                var _this = $this.left;
                $r = _this == null ? 0 : _this._height;
                return $r;
            }(this)) > (function($this) {
                var $r;
                var _this1 = $this.right;
                $r = _this1 == null ? 0 : _this1._height;
                return $r;
            }(this)) ? (function($this) {
                var $r;
                var _this2 = $this.left;
                $r = _this2 == null ? 0 : _this2._height;
                return $r;
            }(this)) : (function($this) {
                var $r;
                var _this3 = $this.right;
                $r = _this3 == null ? 0 : _this3._height;
                return $r;
            }(this))) + 1;
            else this._height = h;
        };
        haxe.ds.TreeNode.__name__ = ["haxe", "ds", "TreeNode"];
        haxe.ds.TreeNode.prototype.left = null;
        haxe.ds.TreeNode.prototype.right = null;
        haxe.ds.TreeNode.prototype.key = null;
        haxe.ds.TreeNode.prototype.value = null;
        haxe.ds.TreeNode.prototype._height = null;
        haxe.ds.TreeNode.prototype.__class__ = haxe.ds.TreeNode;
        haxe.ds.EnumValueMap = function() {
            haxe.ds.BalancedTree.call(this);
        };
        haxe.ds.EnumValueMap.__interfaces__ = [haxe.IMap];
        haxe.ds.EnumValueMap.__name__ = ["haxe", "ds", "EnumValueMap"];
        haxe.ds.EnumValueMap.__super__ = haxe.ds.BalancedTree;
        for (var k in haxe.ds.BalancedTree.prototype) haxe.ds.EnumValueMap.prototype[k] = haxe.ds.BalancedTree.prototype[k];
        haxe.ds.EnumValueMap.prototype.compare = function(k1, k2) {
            var d = k1[1] - k2[1];
            if (d != 0) return d;
            var p1 = k1.slice(2);
            var p2 = k2.slice(2);
            if (p1.length == 0 && p2.length == 0) return 0;
            return this.compareArgs(p1, p2);
        };
        haxe.ds.EnumValueMap.prototype.compareArgs = function(a1, a2) {
            var ld = a1.length - a2.length;
            if (ld != 0) return ld;
            var _g1 = 0;
            var _g = a1.length;
            while (_g1 < _g) {
                var i = _g1++;
                var d = this.compareArg(a1[i], a2[i]);
                if (d != 0) return d;
            }
            return 0;
        };
        haxe.ds.EnumValueMap.prototype.compareArg = function(v1, v2) {
            if (_hcmn_.Reflect.isEnumValue(v1) && _hcmn_.Reflect.isEnumValue(v2)) return this.compare(v1, v2);
            else if ((v1 instanceof Array) && v1.__enum__ == null && ((v2 instanceof Array) && v2.__enum__ == null)) return this.compareArgs(v1, v2);
            else return _hcmn_.Reflect.compare(v1, v2);
        };
        haxe.ds.EnumValueMap.prototype.__class__ = haxe.ds.EnumValueMap;
        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 (typeof smashThePigWinFrames == 'undefined') {
            var smashThePigWinFrames = {};
        };
        smashThePigWinFrames.Activator = function(context) {};
        smashThePigWinFrames.Activator = ck_implements(smashThePigWinFrames.Activator, clientkernelModulesApi.IModuleActivator);
        smashThePigWinFrames.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        smashThePigWinFrames.Activator.__name__ = ["smashThePigWinFrames", "Activator"];
        smashThePigWinFrames.Activator.prototype.start = function(context) {
            context.getServiceTracker([displayEngineApi.IDisplayProvider, clientkernelTestableApi.ITestable, viewBuilderApi.IViewBuilderFactory]).then(function(context1) {
                smashThePigWinFrames.ExternalService.initialize(context1);
                var factory = context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
                smashThePigWinFrames.ExternalService.viewBuilderFactory = factory;
                context1.registerService(new smashThePigWinFrames.WinFramesFactory(factory), smashThePigWinFramesDeclaration.WinFramesDeclaration, null);
            });
        };
        smashThePigWinFrames.Activator.prototype.stop = function(context) {};
        smashThePigWinFrames.Activator.main = function() {};
        smashThePigWinFrames.Activator.prototype.__class__ = smashThePigWinFrames.Activator;

        smashThePigWinFrames.IWinFrames = function() {}
        smashThePigWinFrames.IWinFrames.prototype = {

            setOutcome: function(outcome, lineTime, loop) {
                return {
                    arguments: ["*", "number", "boolean"],
                    returns: "void"
                };
            },
            show: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            hide: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            }
        };

        smashThePigWinFrames.IWinFramesApplication = function() {}
        smashThePigWinFrames.IWinFramesApplication.prototype = {

            getDisplayObject: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            setVisible: function(visible) {
                return {
                    arguments: ["boolean"],
                    returns: "void"
                };
            },
            getContainerComponent: function(component) {
                return {
                    arguments: ["*"],
                    returns: "*"
                };
            }
        };
        smashThePigWinFrames.ExternalService = function() {};
        smashThePigWinFrames.ExternalService.__name__ = ["smashThePigWinFrames", "ExternalService"];
        smashThePigWinFrames.ExternalService.displayProvider = null;
        smashThePigWinFrames.ExternalService.assetRegistry = null;
        smashThePigWinFrames.ExternalService.testableLogger = null;
        smashThePigWinFrames.ExternalService.viewBuilderFactory = null;
        smashThePigWinFrames.ExternalService.initialize = function(context) {
            smashThePigWinFrames.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            smashThePigWinFrames.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            var testable = context.getAnyService(clientkernelTestableApi.ITestable, null);
            smashThePigWinFrames.ExternalService.testableLogger = testable.getLogger(context);
        };
        smashThePigWinFrames.ExternalService.loadConfig = function(config_id, configCallback) {
            smashThePigWinFrames.ExternalService.assetRegistry.getAsset(config_id).getContent().then(function(data) {
                configCallback(data);
            });
        };
        smashThePigWinFrames.ExternalService.prototype.__class__ = smashThePigWinFrames.ExternalService;
        smashThePigWinFrames.WinFramesApplication = function(context, factory) {
            this.context = context;
            this.layoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.outcomePhasePort = context.getUsedPort(slotModelApi.IOutcomePhasePort);
            this.factory = factory;
            this.winLinesPort = context.getUsedPort(smashThePigWinAnimatorPort.IWinAnimatorPort);
            this.baseEvents = new smashThePigWinFrames.BaseEvents();
            this.components = new haxe.ds.EnumValueMap();
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.updateLayout));
            this.controller = new smashThePigWinFrames.WinFramesController(this, this.layoutPort);
            new smashThePigWinFrames.WinFramesModel($bind(this, this.modelInitialised));
            this.winLinesPort.setupWinAnimatorComponents().subscribe($bind(this, this.setupSubComponents));
        };
        smashThePigWinFrames.WinFramesApplication = ck_implements(smashThePigWinFrames.WinFramesApplication, smashThePigWinFrames.IWinFramesApplication);
        smashThePigWinFrames.WinFramesApplication.__interfaces__ = [smashThePigWinFrames.IWinFramesApplication];
        smashThePigWinFrames.WinFramesApplication.__name__ = ["smashThePigWinFrames", "WinFramesApplication"];
        smashThePigWinFrames.WinFramesApplication.prototype.components = null;
        smashThePigWinFrames.WinFramesApplication.prototype.factory = null;
        smashThePigWinFrames.WinFramesApplication.prototype.controller = null;
        smashThePigWinFrames.WinFramesApplication.prototype.winAnimationAssets = null;
        smashThePigWinFrames.WinFramesApplication.prototype.view = null;
        smashThePigWinFrames.WinFramesApplication.prototype.layerContainers = null;
        smashThePigWinFrames.WinFramesApplication.prototype.winLinesPort = null;
        smashThePigWinFrames.WinFramesApplication.prototype.context = null;
        smashThePigWinFrames.WinFramesApplication.prototype.outcomePhasePort = null;
        smashThePigWinFrames.WinFramesApplication.prototype.baseEvents = null;
        smashThePigWinFrames.WinFramesApplication.prototype.layoutPayload = null;
        smashThePigWinFrames.WinFramesApplication.prototype.layoutPort = null;
        smashThePigWinFrames.WinFramesApplication.prototype.assetsLoaded = null;
        smashThePigWinFrames.WinFramesApplication.prototype.vba = null;
        smashThePigWinFrames.WinFramesApplication.prototype.setupSubComponents = function(e) {
            smashThePigWinFrames.WinFramesModel.setupConfiguration(e.getPayload());
        };
        smashThePigWinFrames.WinFramesApplication.prototype.modelInitialised = function() {
            this.vba = smashThePigWinFrames.WinFramesModel.vba;
            this.assetsLoaded = smashThePigWinFrames.WinFramesModel.assetsLoaded;
            this.initialize();
        };
        smashThePigWinFrames.WinFramesApplication.prototype.updateLayout = function(e) {
            this.layoutPayload = e.getPayload();
            if (!smashThePigWinFrames.WinFramesModel.initialised) this.initialize();
            else this.controller.updateLayout(this.layoutPayload, this.context.getInstance());
        };
        smashThePigWinFrames.WinFramesApplication.prototype.initialize = function() {
            if (this.assetsLoaded && this.layoutPayload != null) {
                this.view = this.factory.createView(this.vba);
                this.registerAllComponents();
                this.controller.prepareControllers();
                this.controller.updateLayout(this.layoutPayload, this.context.getInstance());
                smashThePigWinFrames.WinFramesModel.initialised = true;
            }
        };
        smashThePigWinFrames.WinFramesApplication.prototype.registerAllComponents = function() {
            this.layerContainers = this.view.getChildComponents();
            var $it0 = this.layerContainers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var constructorIndex;
                var _this = _hcmn_.Type.getEnumConstructs(smashThePigWinFrames.ComponentsEnum);
                constructorIndex = _hcmn_.HxOverrides.indexOf(_this, layerId, 0);
                if (constructorIndex < 0) continue;
                var componentEnum = _hcmn_.Type.createEnum(smashThePigWinFrames.ComponentsEnum, layerId, null);
                if (!this.registerComponent(componentEnum, layerId)) continue;
            }
        };
        smashThePigWinFrames.WinFramesApplication.prototype.registerComponent = function(componentEnum, layerId) {
            switch (componentEnum[1]) {
                case 0:
                    this.registerContainerComponent(smashThePigWinFrames.ComponentsEnum.WIN_FRAMES, layerId, smashThePigWinFrames.WinFrames);
                    break;
                default:
                    return false;
            }
            return true;
        };
        smashThePigWinFrames.WinFramesApplication.prototype.registerContainerComponent = function(component, layerId, componentClass) {
            var container = this.view.getComponentById(component[0]);
            if (container == null) return;
            if (componentClass != null) {
                var specificComponent = _hcmn_.Type.createInstance(componentClass, [container, this.baseEvents]);
                this.components.set(component, specificComponent);
            } else this.components.set(component, container);
        };
        smashThePigWinFrames.WinFramesApplication.prototype.setVisible = function(visible) {
            this.getDisplayObject().setVisible(visible);
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.view.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                var container = this.view.getComponentById(key);
                container.getDisplayObject().setVisible(visible);
            }
        };
        smashThePigWinFrames.WinFramesApplication.prototype.getDisplayObject = function() {
            return this.view.getDisplayObject();
        };
        smashThePigWinFrames.WinFramesApplication.prototype.getWinFrames = function() {
            return this.components.get(smashThePigWinFrames.ComponentsEnum.WIN_FRAMES);
        };
        smashThePigWinFrames.WinFramesApplication.prototype.getContainerComponent = function(component) {
            return this.components.get(component);
        };
        smashThePigWinFrames.WinFramesApplication.prototype.getBaseEvent = function(id) {
            return this.baseEvents.getEvent(id);
        };
        smashThePigWinFrames.WinFramesApplication.prototype.__class__ = smashThePigWinFrames.WinFramesApplication;
        smashThePigWinFrames.Controller = function(controllerInstance) {
            smashThePigWinFrames.Controller._CONTROLLERS.push(controllerInstance);
        };
        smashThePigWinFrames.Controller.__name__ = ["smashThePigWinFrames", "Controller"];
        smashThePigWinFrames.Controller.prototype.sendMessage = function(message) {
            var _g1 = 0;
            var _g = smashThePigWinFrames.Controller._CONTROLLERS.length;
            while (_g1 < _g) {
                var i = _g1++;
                var controller = smashThePigWinFrames.Controller._CONTROLLERS[i];
                var controllerEvents = controller.getInterests();
                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;
                    }
                }
            }
        };
        smashThePigWinFrames.Controller.prototype.getInterests = function() {
            return [];
        };
        smashThePigWinFrames.Controller.prototype.processMessage = function(message) {};
        smashThePigWinFrames.Controller.prototype.__class__ = smashThePigWinFrames.Controller;
        smashThePigWinFrames.WinFramesController = function(winAnimations, layoutPort) {
            this.winAnimations = winAnimations;
            this.layoutPort = layoutPort;
            smashThePigWinFrames.Controller.call(this, this);
        };
        smashThePigWinFrames.WinFramesController.__name__ = ["smashThePigWinFrames", "WinFramesController"];
        smashThePigWinFrames.WinFramesController.__super__ = smashThePigWinFrames.Controller;
        for (var k in smashThePigWinFrames.Controller.prototype) smashThePigWinFrames.WinFramesController.prototype[k] = smashThePigWinFrames.Controller.prototype[k];
        smashThePigWinFrames.WinFramesController.prototype.winAnimations = null;
        smashThePigWinFrames.WinFramesController.prototype.layoutPort = null;
        smashThePigWinFrames.WinFramesController.prototype.prepareControllers = function() {
            new smashThePigWinFrames.LayoutController(this.winAnimations);
            new smashThePigWinFrames.WinFramesPortController(this.winAnimations.winLinesPort, this.layoutPort, this.winAnimations);
        };
        smashThePigWinFrames.WinFramesController.prototype.updateLayout = function(layoutPayload, instance) {
            this.sendMessage(new smashThePigWinFrames.WinAnimatorMessagePayload("updateLayout", layoutPayload));
            this.sendMessage(new smashThePigWinFrames.WinAnimatorMessagePayload("updateUpdatedComponentsPort", instance));
        };
        smashThePigWinFrames.WinFramesController.prototype.__class__ = smashThePigWinFrames.WinFramesController;
        smashThePigWinFrames.WinFramesFactory = function(vbf) {
            this.vbf = vbf;
        };
        smashThePigWinFrames.WinFramesFactory = ck_implements(smashThePigWinFrames.WinFramesFactory, clientkernelModulesApi.IService);
        smashThePigWinFrames.WinFramesFactory = ck_implements(smashThePigWinFrames.WinFramesFactory, componentmodelComponentApi.IComponentFactory);
        smashThePigWinFrames.WinFramesFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        smashThePigWinFrames.WinFramesFactory.__name__ = ["smashThePigWinFrames", "WinFramesFactory"];
        smashThePigWinFrames.WinFramesFactory.prototype.vbf = null;
        smashThePigWinFrames.WinFramesFactory.prototype.getComponentDeclaration = function() {
            return smashThePigWinFramesDeclaration.WinFramesDeclaration;
        };
        smashThePigWinFrames.WinFramesFactory.prototype.createComponent = function(context) {
            var _winlines = new smashThePigWinFrames.WinFramesApplication(context, this.vbf);
        };
        smashThePigWinFrames.WinFramesFactory.prototype.__class__ = smashThePigWinFrames.WinFramesFactory;
        smashThePigWinFrames.WinFrames = function(container, baseEvents) {
            this.loop = true;
            this.symbolsList = smashThePigWinFrames.WinFramesModel.topSymbosConfiguration.topSymbolsMap;
            this.reelOffset = 0;
            this.totalWins = 0;
            this.currentLine = 0;
            this.reelsNum = smashThePigWinFrames.WinFramesModel.globalConfiguration.numberOfColums;
            this.cellsNum = smashThePigWinFrames.WinFramesModel.globalConfiguration.numberOfRows;
            this.width = smashThePigWinFrames.WinFramesModel.winFramesConfiguration.width;
            this.height = smashThePigWinFrames.WinFramesModel.winFramesConfiguration.height;
            this.verticalGap = smashThePigWinFrames.WinFramesModel.winFramesConfiguration.marginLeft;
            this.horisontalGap = smashThePigWinFrames.WinFramesModel.winFramesConfiguration.marginTop;
            this.baseEvents = baseEvents;
            this.container = container;
        };
        smashThePigWinFrames.WinFrames = ck_implements(smashThePigWinFrames.WinFrames, smashThePigWinFrames.IWinFrames);
        smashThePigWinFrames.WinFrames.__interfaces__ = [smashThePigWinFrames.IWinFrames];
        smashThePigWinFrames.WinFrames.__name__ = ["smashThePigWinFrames", "WinFrames"];
        smashThePigWinFrames.WinFrames.prototype.container = null;
        smashThePigWinFrames.WinFrames.prototype.horisontalGap = null;
        smashThePigWinFrames.WinFrames.prototype.verticalGap = null;
        smashThePigWinFrames.WinFrames.prototype.height = null;
        smashThePigWinFrames.WinFrames.prototype.width = null;
        smashThePigWinFrames.WinFrames.prototype.cellsNum = null;
        smashThePigWinFrames.WinFrames.prototype.reelsNum = null;
        smashThePigWinFrames.WinFrames.prototype.currentLine = null;
        smashThePigWinFrames.WinFrames.prototype.totalWins = null;
        smashThePigWinFrames.WinFrames.prototype.outcome = null;
        smashThePigWinFrames.WinFrames.prototype.timer = null;
        smashThePigWinFrames.WinFrames.prototype.allLineWins = null;
        smashThePigWinFrames.WinFrames.prototype.reelOffset = null;
        smashThePigWinFrames.WinFrames.prototype.baseEvents = null;
        smashThePigWinFrames.WinFrames.prototype.symbolsList = null;
        smashThePigWinFrames.WinFrames.prototype.loop = null;
        smashThePigWinFrames.WinFrames.prototype.setOutcome = function(outcome, lineTime, loop) {
            this.loop = loop;
            this.outcome = outcome;
            this.container.show();
            console.log("[LN] winFrames.setOutcome : " + _hcmn_.Std.string(outcome) + " isFreeSpin: " + (loop == null ? "null" : "" + loop));
            this.allLineWins = [];
            if (outcome != null) {
                if (outcome.lineWins != null) {
                    if (outcome.lineWins.length > 0) {
                        var _g1 = 0;
                        var _g = outcome.lineWins.length;
                        while (_g1 < _g) {
                            var i = _g1++;
                            this.allLineWins.push(outcome.lineWins[i]);
                        }
                    }
                }
                if (outcome.bonusWins != null) {
                    if (outcome.bonusWins.length > 0) {
                        var _g11 = 0;
                        var _g2 = outcome.bonusWins.length;
                        while (_g11 < _g2) {
                            var i1 = _g11++;
                            if (outcome.bonusWins[i1].type == smashThePigWinFrames.WinFramesModel.topSymbosConfiguration.topSymbolId) this.allLineWins.push(outcome.bonusWins[i1]);
                        }
                    }
                }
                if (outcome.scatterWins != null) {
                    if (outcome.scatterWins.length > 0) {
                        var _g12 = 0;
                        var _g3 = outcome.scatterWins.length;
                        while (_g12 < _g3) {
                            var i2 = _g12++;
                            var hasWin = false;
                            var rls = outcome.scatterWins[i2].winPath.reelsInfo.length;
                            var _g21 = 0;
                            while (_g21 < rls) {
                                var j = _g21++;
                                var rws = outcome.scatterWins[i2].winPath.reelsInfo[j].length;
                                var _g31 = 0;
                                while (_g31 < rws) {
                                    var k = _g31++;
                                    if (outcome.scatterWins[i2].winPath.reelsInfo[j][k] == 1) hasWin = true;
                                    else {}
                                }
                            }
                            if (hasWin) this.allLineWins.push(outcome.scatterWins[i2]);
                        }
                    }
                }
            }
            this.currentLine = 0;
            this.totalWins = this.allLineWins.length;
            this.sortData();
            this.timer = new _hcmn_.haxe_Timer(lineTime);
            if (this.totalWins == 0) this.baseEvents.getEvent(smashThePigWinFrames.BaseEventsEnum.WIN_FRAMES_CYCLE_ENDED).dispatch(this.currentLine);
            else this.enterCycle();
        };
        smashThePigWinFrames.WinFrames.prototype.sortData = function() {
            this.allLineWins.sort(function(a, b) {
                if (a.lineId < b.lineId) return -1;
                if (a.lineId > b.lineId) return 1;
                return 0;
            });
            var _g1 = 0;
            var _g = this.allLineWins.length - 1;
            while (_g1 < _g) {
                var i = _g1++;
                if (this.allLineWins[i].lineId == this.allLineWins[i + 1].lineId) {
                    if (this.allLineWins[i].type == smashThePigWinFrames.WinFramesModel.topSymbosConfiguration.topSymbolId) {
                        var temp = this.allLineWins[i];
                        this.allLineWins[i] = this.allLineWins[i + 1];
                        this.allLineWins[i + 1] = temp;
                    }
                }
            }
            var _g11 = 0;
            var _g2 = this.allLineWins.length;
            while (_g11 < _g2) {
                var i1 = _g11++;
                if (this.allLineWins[i1].type == "Scatter") {
                    this.allLineWins.push(this.allLineWins[i1]);
                    _hcmn_.HxOverrides.remove(this.allLineWins, this.allLineWins[i1]);
                }
            }
        };
        smashThePigWinFrames.WinFrames.prototype.enterCycle = function() {
            var _g = this;
            this.show();
            if (this.timer != null) this.timer.run = function() {
                _g.show();
                if (!_g.loop) {
                    if (_g.currentLine > _g.totalWins) {
                        _g.currentLine = 0;
                        _g.baseEvents.getEvent(smashThePigWinFrames.BaseEventsEnum.WIN_FRAMES_CYCLE_ENDED).dispatch(_g.currentLine);
                        _g.timer.stop();
                    }
                } else if (_g.currentLine >= _g.totalWins) _g.currentLine = 0;
            };
        };
        smashThePigWinFrames.WinFrames.prototype.show = function() {
            if (this.allLineWins[this.currentLine] != null) this.handleLineWin();
            this.currentLine++;
        };
        smashThePigWinFrames.WinFrames.prototype.handleLineWin = function() {
            var winLine = this.allLineWins[this.currentLine].winPath.reelsInfo;
            var frameVisible = 0;
            var isTopSymbol = false;
            var isScatterSymbol = false;
            var isDisabled = frameVisible == 2;
            var isEnabled = frameVisible == 1;
            var contId = "";
            var _g1 = 0;
            var _g = this.reelsNum;
            while (_g1 < _g) {
                var i = _g1++;
                var _g3 = 0;
                var _g2 = this.cellsNum;
                while (_g3 < _g2) {
                    var j = _g3++;
                    frameVisible = winLine[i][j + this.reelOffset];
                    isDisabled = frameVisible == 2;
                    isEnabled = frameVisible == 1;
                    isTopSymbol = false;
                    isScatterSymbol = false;
                    contId = "";
                    if ((function($this) {
                            var $r;
                            var key = _hcmn_.Std.parseInt($this.outcome.reelStop.reels[i][j + $this.reelOffset]);
                            $r = $this.symbolsList.h.hasOwnProperty(key);
                            return $r;
                        }(this))) isTopSymbol = true;
                    if (this.outcome.reelStop.reels[i][j + this.reelOffset] != null) {
                        if (this.outcome.reelStop.reels[i][j + this.reelOffset] == smashThePigWinFrames.WinFramesModel.globalConfiguration.scaterSymbolId) isScatterSymbol = true;
                    }
                    contId = "FRAME_CONTAINER_REGULAR";
                    if (isTopSymbol) {
                        if (j == 0) contId = "FRAME_CONTAINER_TOP";
                        else if (j == this.cellsNum - 1) contId = "FRAME_CONTAINER_BOTTOM";
                        else contId = "FRAME_CONTAINER_CENTER";
                    } else if (isScatterSymbol) contId = "FRAME_CONTAINER_SCATTER";
                    else contId = "FRAME_CONTAINER_REGULAR";
                    this.showFrame(i, j, frameVisible, contId);
                }
            }
            _hcmn_.haxe_Timer.delay(function() {
                smashThePigWinFrames.ExternalService.testableLogger.info("Win Frames", {
                    reelsInfo: winLine
                });
            }, 100);
            this.baseEvents.getEvent(smashThePigWinFrames.BaseEventsEnum.CURRENT_WIN_LINE_SHOWN).dispatch(this.allLineWins[this.currentLine]);
        };
        smashThePigWinFrames.WinFrames.prototype.showFrame = function(i, j, frameVisible, contId) {
            var id;
            id = contId + (i == null ? "null" : "" + i) + (j == null ? "null" : "" + j);
            var symbolExists = false;
            if (this.container.getComponentById(id) != null) symbolExists = true;
            var visible = frameVisible > 0;
            var isDisabled = frameVisible == 2;
            if (visible) {
                if (symbolExists) {
                    var symbol = this.container.getComponentById(id);
                    var disabledSymbol = symbol.getComponentById("DISABLED");
                    disabledSymbol.hide();
                    var enabledSymbol = symbol.getComponentById("ENABLED");
                    enabledSymbol.hide();
                    if (isDisabled) {
                        enabledSymbol.hide();
                        disabledSymbol.show();
                    } else {
                        disabledSymbol.hide();
                        enabledSymbol.show();
                    }
                    symbol.show();
                } else if (!symbolExists) {
                    var symbol1 = this.container.createContainerFromStoredConfig(contId);
                    symbol1.show();
                    this.container.addChildComponent(symbol1, id);
                    var x = (this.width + this.verticalGap) * i;
                    var y = (this.height + this.horisontalGap) * j;
                    symbol1.setX(x);
                    symbol1.setY(y);
                    var disabledSymbol1 = symbol1.getComponentById("DISABLED");
                    disabledSymbol1.hide();
                    var enabledSymbol1 = symbol1.getComponentById("ENABLED");
                    enabledSymbol1.hide();
                    if (isDisabled) {
                        enabledSymbol1.hide();
                        disabledSymbol1.show();
                    } else {
                        enabledSymbol1.show();
                        disabledSymbol1.hide();
                    }
                }
            } else if (symbolExists) {
                var symbol2 = this.container.getComponentById(id);
                symbol2.hide();
            }
        };
        smashThePigWinFrames.WinFrames.prototype.hide = function() {
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.container.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                this.container.disposeChildComponent(key);
            }
            this.container.getDisplayObject().removeChildren();
            this.allLineWins = null;
            if (this.timer != null) {
                this.timer.stop();
                this.timer.run = null;
                this.timer = null;
            }
            this.container.hide();
        };
        smashThePigWinFrames.WinFrames.prototype.__class__ = smashThePigWinFrames.WinFrames;
        smashThePigWinFrames.LayoutController = function(winAnimations) {
            this.winFramesApplication = winAnimations;
            this.winFrames = this.winFramesApplication.getWinFrames();
            smashThePigWinFrames.Controller.call(this, this);
        };
        smashThePigWinFrames.LayoutController.__name__ = ["smashThePigWinFrames", "LayoutController"];
        smashThePigWinFrames.LayoutController.__super__ = smashThePigWinFrames.Controller;
        for (var k in smashThePigWinFrames.Controller.prototype) smashThePigWinFrames.LayoutController.prototype[k] = smashThePigWinFrames.Controller.prototype[k];
        smashThePigWinFrames.LayoutController.prototype.winFrames = null;
        smashThePigWinFrames.LayoutController.prototype.winFramesApplication = null;
        smashThePigWinFrames.LayoutController.prototype.getInterests = function() {
            return ["handleWinframesSymbols", "hideAll", "setVisible", "updateLayout"];
        };
        smashThePigWinFrames.LayoutController.prototype.processMessage = function(message) {
            var _g = message._messageName;
            switch (_g) {
                case "updateLayout":
                    this.updateLayout(message._messageData);
                    break;
                case "handleWinframesSymbols":
                    this.handleWinFramesSymbols(message._messageData);
                    break;
                case "hideAll":
                    this.hideAll();
                    break;
                case "setVisible":
                    this.setVisible(message._messageData);
                    break;
            }
        };
        smashThePigWinFrames.LayoutController.prototype.setVisible = function(messageData) {
            var visible;
            visible = _hcmn_.js_Boot.__cast(messageData, _hcmn_.Bool);
            this.winFramesApplication.setVisible(visible);
        };
        smashThePigWinFrames.LayoutController.prototype.handleWinFramesSymbols = function(messageData) {
            var handleWinFramersSymbolspayload;
            handleWinFramersSymbolspayload = _hcmn_.js_Boot.__cast(messageData, smashThePigWinFrames.HandleWinFramesPayload);
            this.winFrames.setOutcome(handleWinFramersSymbolspayload.outcome, handleWinFramersSymbolspayload.lineTime, handleWinFramersSymbolspayload.loop);
        };
        smashThePigWinFrames.LayoutController.prototype.hideAll = function() {
            this.winFrames.hide();
        };
        smashThePigWinFrames.LayoutController.prototype.updateLayout = function(messageData) {
            var layoutPayload;
            layoutPayload = _hcmn_.js_Boot.__cast(messageData, gameLayoutApi.ComponentLayout);
            var $it0 = this.winFramesApplication.layerContainers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var layerPayload = layoutPayload.containers.get(layerId);
                if (layerPayload == null) continue;
                var stage;
                var this1 = smashThePigWinFrames.ExternalService.displayProvider.getStages();
                stage = this1.get(layerPayload.stage);
                var container = this.winFramesApplication.layerContainers.get(layerId).getDisplayObject();
                try {
                    stage.removeChild(container);
                } catch (e) {
                    if (e instanceof js._Boot.HaxeError) e = e.val;
                    if (_hcmn_.js_Boot.__instanceof(e, Error)) {} else throw (e);
                }
                stage.addChild(container);
                container.setX(layerPayload.left);
                container.setY(layerPayload.top);
                container.setScaleX(layerPayload.width / container.getUserData().viewBuilderW);
                container.setScaleY(layerPayload.height / container.getUserData().viewBuilderH);
                container.setZIndex(layerPayload.zIndex);
            }
        };
        smashThePigWinFrames.LayoutController.prototype.__class__ = smashThePigWinFrames.LayoutController;
        smashThePigWinFrames.WinFramesPortController = function(winAnimatorPort, layoutPort, winAnimations) {
            this.cellsNum = smashThePigWinFrames.WinFramesModel.globalConfiguration.numberOfRows;
            this.reelsNum = smashThePigWinFrames.WinFramesModel.globalConfiguration.numberOfColums;
            this.winAnimatorPort = winAnimatorPort;
            this.layoutPort = layoutPort;
            smashThePigWinFrames.Controller.call(this, this);
            winAnimations.getBaseEvent(smashThePigWinFrames.BaseEventsEnum.WIN_FRAMES_CYCLE_ENDED).add($bind(this, this.winLineCycleEnded));
            winAnimations.getBaseEvent(smashThePigWinFrames.BaseEventsEnum.CURRENT_WIN_LINE_SHOWN).add($bind(this, this.handleCurrentWinLine));
            this.winAnimatorPort.show().subscribe($bind(this, this.handleWinFrames));
            this.winAnimatorPort.hideAll().subscribe($bind(this, this.hideAll));
            this.winAnimatorPort.setSubComponentVisible().subscribe($bind(this, this.handleSetVisible));
        };
        smashThePigWinFrames.WinFramesPortController.__name__ = ["smashThePigWinFrames", "WinFramesPortController"];
        smashThePigWinFrames.WinFramesPortController.__super__ = smashThePigWinFrames.Controller;
        for (var k in smashThePigWinFrames.Controller.prototype) smashThePigWinFrames.WinFramesPortController.prototype[k] = smashThePigWinFrames.Controller.prototype[k];
        smashThePigWinFrames.WinFramesPortController.prototype.winAnimatorPort = null;
        smashThePigWinFrames.WinFramesPortController.prototype.reelsNum = null;
        smashThePigWinFrames.WinFramesPortController.prototype.cellsNum = null;
        smashThePigWinFrames.WinFramesPortController.prototype.layoutPort = null;
        smashThePigWinFrames.WinFramesPortController.prototype.handleWinFrames = function(e) {
            var showWinAnimationPayload = e.getPayload();
            this.sendMessage(new smashThePigWinFrames.WinAnimatorMessagePayload("handleWinframesSymbols", new smashThePigWinFrames.HandleWinFramesPayload(showWinAnimationPayload.outcome, showWinAnimationPayload.outcomeOptionsPayload.lineTime, showWinAnimationPayload.outcomeOptionsPayload.loop)));
        };
        smashThePigWinFrames.WinFramesPortController.prototype.getInterests = function() {
            return ["updateUpdatedComponentsPort"];
        };
        smashThePigWinFrames.WinFramesPortController.prototype.processMessage = function(message) {
            var _g = message._messageName;
            switch (_g) {
                case "updateUpdatedComponentsPort":
                    this.updateLayoutUpdatedComponentsPort(message._messageData);
                    break;
            }
        };
        smashThePigWinFrames.WinFramesPortController.prototype.updateLayoutUpdatedComponentsPort = function(messageData) {
            var instance;
            instance = _hcmn_.js_Boot.__cast(messageData, componentmodelComponentApi.IComponentInstance);
            this.layoutPort.getComponentLayoutUpdated().publish(instance);
        };
        smashThePigWinFrames.WinFramesPortController.prototype.handleSetVisible = function(e) {
            this.sendMessage(new smashThePigWinFrames.WinAnimatorMessagePayload("setVisible", e.getPayload()));
        };
        smashThePigWinFrames.WinFramesPortController.prototype.hideAll = function(e) {
            this.sendMessage(new smashThePigWinFrames.WinAnimatorMessagePayload("hideAll"));
        };
        smashThePigWinFrames.WinFramesPortController.prototype.handleDisplayReady = function(evt) {
            this.winAnimatorPort.requestDelegation().publish(new smashThePigWinAnimatorPort.RequestDelegationPayload(smashThePigWinAnimatorPort.RequestDelegationPayload.GET_WIN_SYMBOLS_CREATED, null));
        };
        smashThePigWinFrames.WinFramesPortController.prototype.handleCurrentWinLine = function(data) {
            this.winAnimatorPort.requestDelegation().publish(new smashThePigWinAnimatorPort.RequestDelegationPayload(smashThePigWinAnimatorPort.RequestDelegationPayload.GET_CURRENT_WIN, data));
        };
        smashThePigWinFrames.WinFramesPortController.prototype.winLineCycleEnded = function(data) {
            this.winAnimatorPort.requestDelegation().publish(new smashThePigWinAnimatorPort.RequestDelegationPayload(smashThePigWinAnimatorPort.RequestDelegationPayload.GET_WIN_LINES_CYCLE_ANIMATED, data));
        };
        smashThePigWinFrames.WinFramesPortController.prototype.__class__ = smashThePigWinFrames.WinFramesPortController;
        smashThePigWinFrames.BaseEventsEnum = {
            __ename__: ["smashThePigWinFrames", "BaseEventsEnum"],
            __constructs__: ["WIN_FRAMES_CYCLE_ENDED", "CURRENT_WIN_LINE_SHOWN", "CALLBACK_RECIVED"]
        };
        smashThePigWinFrames.BaseEventsEnum.CALLBACK_RECIVED = ["CALLBACK_RECIVED", 2];
        smashThePigWinFrames.BaseEventsEnum.CALLBACK_RECIVED.toString = $estr;
        smashThePigWinFrames.BaseEventsEnum.CALLBACK_RECIVED.__enum__ = smashThePigWinFrames.BaseEventsEnum;
        smashThePigWinFrames.BaseEventsEnum.CURRENT_WIN_LINE_SHOWN = ["CURRENT_WIN_LINE_SHOWN", 1];
        smashThePigWinFrames.BaseEventsEnum.CURRENT_WIN_LINE_SHOWN.toString = $estr;
        smashThePigWinFrames.BaseEventsEnum.CURRENT_WIN_LINE_SHOWN.__enum__ = smashThePigWinFrames.BaseEventsEnum;
        smashThePigWinFrames.BaseEventsEnum.WIN_FRAMES_CYCLE_ENDED = ["WIN_FRAMES_CYCLE_ENDED", 0];
        smashThePigWinFrames.BaseEventsEnum.WIN_FRAMES_CYCLE_ENDED.toString = $estr;
        smashThePigWinFrames.BaseEventsEnum.WIN_FRAMES_CYCLE_ENDED.__enum__ = smashThePigWinFrames.BaseEventsEnum;
        smashThePigWinFrames.ComponentsEnum = {
            __ename__: ["smashThePigWinFrames", "ComponentsEnum"],
            __constructs__: ["WIN_FRAMES", "SKATTER_SYMBOLS", "WIN_SYMBOLS", "TOP_SYMBOLS"]
        };
        smashThePigWinFrames.ComponentsEnum.TOP_SYMBOLS = ["TOP_SYMBOLS", 3];
        smashThePigWinFrames.ComponentsEnum.TOP_SYMBOLS.toString = $estr;
        smashThePigWinFrames.ComponentsEnum.TOP_SYMBOLS.__enum__ = smashThePigWinFrames.ComponentsEnum;
        smashThePigWinFrames.ComponentsEnum.WIN_FRAMES = ["WIN_FRAMES", 0];
        smashThePigWinFrames.ComponentsEnum.WIN_FRAMES.toString = $estr;
        smashThePigWinFrames.ComponentsEnum.WIN_FRAMES.__enum__ = smashThePigWinFrames.ComponentsEnum;
        smashThePigWinFrames.ComponentsEnum.SKATTER_SYMBOLS = ["SKATTER_SYMBOLS", 1];
        smashThePigWinFrames.ComponentsEnum.SKATTER_SYMBOLS.toString = $estr;
        smashThePigWinFrames.ComponentsEnum.SKATTER_SYMBOLS.__enum__ = smashThePigWinFrames.ComponentsEnum;
        smashThePigWinFrames.ComponentsEnum.WIN_SYMBOLS = ["WIN_SYMBOLS", 2];
        smashThePigWinFrames.ComponentsEnum.WIN_SYMBOLS.toString = $estr;
        smashThePigWinFrames.ComponentsEnum.WIN_SYMBOLS.__enum__ = smashThePigWinFrames.ComponentsEnum;
        smashThePigWinFrames.InternalMVCConstants = function() {};
        smashThePigWinFrames.InternalMVCConstants.__name__ = ["smashThePigWinFrames", "InternalMVCConstants"];
        smashThePigWinFrames.InternalMVCConstants.prototype.__class__ = smashThePigWinFrames.InternalMVCConstants;
        smashThePigWinFrames.BaseEvents = function() {
            this.events = new haxe.ds.EnumValueMap();
            this.registerEvents();
        };
        smashThePigWinFrames.BaseEvents.__name__ = ["smashThePigWinFrames", "BaseEvents"];
        smashThePigWinFrames.BaseEvents.prototype.events = null;
        smashThePigWinFrames.BaseEvents.prototype.registerEvents = function() {
            var value = new _hcmn_.msignal_Signal1();
            this.events.set(smashThePigWinFrames.BaseEventsEnum.WIN_FRAMES_CYCLE_ENDED, value);
            var value1 = new _hcmn_.msignal_Signal1();
            this.events.set(smashThePigWinFrames.BaseEventsEnum.CURRENT_WIN_LINE_SHOWN, value1);
            var value2 = new _hcmn_.msignal_Signal1();
            this.events.set(smashThePigWinFrames.BaseEventsEnum.CALLBACK_RECIVED, value2);
        };
        smashThePigWinFrames.BaseEvents.prototype.getEvent = function(id) {
            return this.events.get(id);
        };
        smashThePigWinFrames.BaseEvents.prototype.__class__ = smashThePigWinFrames.BaseEvents;
        smashThePigWinFrames.WinFramesModel = function(modelInitialised) {
            smashThePigWinFrames.WinFramesModel.callback = modelInitialised;
        };
        smashThePigWinFrames.WinFramesModel.__name__ = ["smashThePigWinFrames", "WinFramesModel"];
        smashThePigWinFrames.WinFramesModel.winFramesConfiguration = null;
        smashThePigWinFrames.WinFramesModel.globalConfiguration = null;
        smashThePigWinFrames.WinFramesModel.scaterSymbolsConfiguration = null;
        smashThePigWinFrames.WinFramesModel.topSymbosConfiguration = null;
        smashThePigWinFrames.WinFramesModel.winSymbosConfiguration = null;
        smashThePigWinFrames.WinFramesModel.callback = null;
        smashThePigWinFrames.WinFramesModel.setupConfiguration = function(setupConfig) {
            smashThePigWinFrames.WinFramesModel.winFramesConfiguration = setupConfig.winFramesConfiguration;
            smashThePigWinFrames.WinFramesModel.globalConfiguration = setupConfig.winAnimatorGlobalConfiguration;
            smashThePigWinFrames.WinFramesModel.scaterSymbolsConfiguration = setupConfig.scaterSymbolsConfiguration;
            smashThePigWinFrames.WinFramesModel.topSymbosConfiguration = setupConfig.topSymbolsConfiguration;
            smashThePigWinFrames.WinFramesModel.winSymbosConfiguration = setupConfig.winSymbolConfiguration;
            smashThePigWinFrames.WinFramesModel.loadVBAssets();
        };
        smashThePigWinFrames.WinFramesModel.loadVBAssets = function() {
            smashThePigWinFrames.ExternalService.assetRegistry.getAssetsContent(smashThePigWinFrames.WinFramesModel.globalConfiguration.vbAssets).then(function(data) {
                smashThePigWinFrames.ExternalService.loadedAssets = data;
                smashThePigWinFrames.WinFramesModel.loadMainAssets();
            });
        };
        smashThePigWinFrames.WinFramesModel.loadMainAssets = function() {
            smashThePigWinFrames.ExternalService.assetRegistry.getAsset(smashThePigWinFrames.WinFramesModel.globalConfiguration.mainAssetsId).getContent().then(function(vba) {
                smashThePigWinFrames.WinFramesModel.vba = vba;
                smashThePigWinFrames.WinFramesModel.assetsLoaded = true;
                smashThePigWinFrames.WinFramesModel.callback();
            });
        };
        smashThePigWinFrames.WinFramesModel.prototype.__class__ = smashThePigWinFrames.WinFramesModel;
        smashThePigWinFrames.HandleWinFramesPayload = function(outcome, lineTime, loop) {
            this.loop = loop;
            this.lineTime = lineTime;
            this.outcome = outcome;
        };
        smashThePigWinFrames.HandleWinFramesPayload.__name__ = ["smashThePigWinFrames", "HandleWinFramesPayload"];
        smashThePigWinFrames.HandleWinFramesPayload.prototype.loop = null;
        smashThePigWinFrames.HandleWinFramesPayload.prototype.lineTime = null;
        smashThePigWinFrames.HandleWinFramesPayload.prototype.outcome = null;
        smashThePigWinFrames.HandleWinFramesPayload.prototype.__class__ = smashThePigWinFrames.HandleWinFramesPayload;
        smashThePigWinFrames.WinAnimatorMessagePayload = function(messageName, messageData) {
            this._messageName = messageName;
            this._messageData = messageData;
        };
        smashThePigWinFrames.WinAnimatorMessagePayload.__name__ = ["smashThePigWinFrames", "WinAnimatorMessagePayload"];
        smashThePigWinFrames.WinAnimatorMessagePayload.prototype._messageName = null;
        smashThePigWinFrames.WinAnimatorMessagePayload.prototype._messageData = null;
        smashThePigWinFrames.WinAnimatorMessagePayload.prototype.__class__ = smashThePigWinFrames.WinAnimatorMessagePayload;
        smashThePigWinFrames.ExternalService.loadedAssets = new _hcmn_.haxe_ds_StringMap();;
        smashThePigWinFrames.Controller._CONTROLLERS = [];;
        smashThePigWinFrames.InternalMVCConstants.HANDLE_WINFRAMES_SYMBOLS = "handleWinframesSymbols";;
        smashThePigWinFrames.InternalMVCConstants.HIDE_ALL = "hideAll";;
        smashThePigWinFrames.InternalMVCConstants.SET_VISIBLE = "setVisible";;
        smashThePigWinFrames.InternalMVCConstants.UPDATE_LAYOUT = "updateLayout";;
        smashThePigWinFrames.InternalMVCConstants.UPDATE_UPDATED_COMPONENTS_PORT = "updateUpdatedComponentsPort";;
        smashThePigWinFrames.WinFramesModel.FRAME_CONTAINER_REGULAR = "FRAME_CONTAINER_REGULAR";;
        smashThePigWinFrames.WinFramesModel.FRAME_CONTAINER_TOP = "FRAME_CONTAINER_TOP";;
        smashThePigWinFrames.WinFramesModel.FRAME_CONTAINER_BOTTOM = "FRAME_CONTAINER_BOTTOM";;
        smashThePigWinFrames.WinFramesModel.FRAME_CONTAINER_CENTER = "FRAME_CONTAINER_CENTER";;
        smashThePigWinFrames.WinFramesModel.FRAME_CONTAINER_SCATTER = "FRAME_CONTAINER_SCATTER";;
        smashThePigWinFrames.WinFramesModel.initialised = false;;
        smashThePigWinFrames.WinFramesModel.assetsLoaded = false;;
        smashThePigWinFrames.WinFramesModel.vba = null;;
        return {
            exports: smashThePigWinFrames,
            activator: smashThePigWinFrames.Activator
        };
    });
//# sourceURL=smashThePigWinFrames.js