define("pbWofExoticFarEastChestGlowComponent", ["viewBuilderApi", "componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "slotModelApi", "winControllerApi", "displayEngineApi", "reelsApi", "displayEngineUtils", "gameLayoutApi", "PIXI", "BABYLON", "clientkernelEventbusApi", "pbWofExoticFarEastChestGlowComponentApi", "clientkernelModulesApi"],
    function(viewBuilderApi, componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, slotModelApi, winControllerApi, displayEngineApi, reelsApi, displayEngineUtils, gameLayoutApi, PIXI, BABYLON, clientkernelEventbusApi, pbWofExoticFarEastChestGlowComponentApi, 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 pbWofExoticFarEastChestGlowComponent == 'undefined') {
            var pbWofExoticFarEastChestGlowComponent = {};
        };
        pbWofExoticFarEastChestGlowComponent.Activator = function(context) {};
        pbWofExoticFarEastChestGlowComponent.Activator = ck_implements(pbWofExoticFarEastChestGlowComponent.Activator, clientkernelModulesApi.IModuleActivator);
        pbWofExoticFarEastChestGlowComponent.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        pbWofExoticFarEastChestGlowComponent.Activator.__name__ = ["pbWofExoticFarEastChestGlowComponent", "Activator"];
        pbWofExoticFarEastChestGlowComponent.Activator.prototype.start = function(context) {
            context.getServiceTracker([clientkernelLoaderApi.IAssetRegistry, viewBuilderApi.IViewBuilderFactory, displayEngineApi.IDisplayProvider, translationmanagerApi.ITranslationManager, winControllerApi.IWinControllerPluginService]).then(function(context1) {
                var factory;
                factory = _hcmn_.js_Boot.__cast(context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null), viewBuilderApi.IViewBuilderFactory);
                pbWofExoticFarEastChestGlowComponent.ExternalService.initialize(context1);
                var winService;
                winService = _hcmn_.js_Boot.__cast(context1.getAnyService(winControllerApi.IWinControllerPluginService), winControllerApi.IWinControllerPluginService);
                pbWofExoticFarEastChestGlowComponent.Activator.glowPlugin = new pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin();
                winService.registerPlugin("CHEST", pbWofExoticFarEastChestGlowComponent.Activator.glowPlugin);
                context1.registerService(new pbWofExoticFarEastChestGlowComponent.GlowComponentFactory(context1, factory), pbWofExoticFarEastChestGlowComponentApi.ChestGlowDeclaration, null);
            });
        };
        pbWofExoticFarEastChestGlowComponent.Activator.prototype.stop = function(context) {};
        pbWofExoticFarEastChestGlowComponent.Activator.glowPlugin = null;
        pbWofExoticFarEastChestGlowComponent.Activator.main = function() {};
        pbWofExoticFarEastChestGlowComponent.Activator.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.Activator;
        pbWofExoticFarEastChestGlowComponent.ExternalService = function() {};
        pbWofExoticFarEastChestGlowComponent.ExternalService.__name__ = ["pbWofExoticFarEastChestGlowComponent", "ExternalService"];
        pbWofExoticFarEastChestGlowComponent.ExternalService.assetRegistry = null;
        pbWofExoticFarEastChestGlowComponent.ExternalService.vbf = null;
        pbWofExoticFarEastChestGlowComponent.ExternalService.displayProvider = null;
        pbWofExoticFarEastChestGlowComponent.ExternalService.translationManager = null;
        pbWofExoticFarEastChestGlowComponent.ExternalService.bus = null;
        pbWofExoticFarEastChestGlowComponent.ExternalService.viewBuilderFactory = null;
        pbWofExoticFarEastChestGlowComponent.ExternalService.initialize = function(context) {
            pbWofExoticFarEastChestGlowComponent.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            pbWofExoticFarEastChestGlowComponent.ExternalService.vbf = context.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
            pbWofExoticFarEastChestGlowComponent.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            pbWofExoticFarEastChestGlowComponent.ExternalService.translationManager = context.getAnyService(translationmanagerApi.ITranslationManager, null);
            pbWofExoticFarEastChestGlowComponent.ExternalService.viewBuilderFactory = context.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
            pbWofExoticFarEastChestGlowComponent.ExternalService.bus = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
        };
        pbWofExoticFarEastChestGlowComponent.ExternalService.getAsset = function(id) {
            return pbWofExoticFarEastChestGlowComponent.ExternalService.assetRegistry.getAsset(id).getContent();
        };
        pbWofExoticFarEastChestGlowComponent.ExternalService.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.ExternalService;
        pbWofExoticFarEastChestGlowComponent.GlowComponent = function(context, factory, moduleContext, cfgId) {
            var prepareCommonModelPayload = new pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload();
            prepareCommonModelPayload.context = context;
            prepareCommonModelPayload.factory = factory;
            prepareCommonModelPayload.assetsLoLoad = [];
            prepareCommonModelPayload.configurationsToLoad = [];
            prepareCommonModelPayload.moduleContext = moduleContext;
            new pbWofExoticFarEastChestGlowComponent.PrepareCommonsController().processMessage(new pbWofExoticFarEastChestGlowComponent.Message("Common:PrepareCommonModel", prepareCommonModelPayload));
            new pbWofExoticFarEastChestGlowComponent.PortController();
            new pbWofExoticFarEastChestGlowComponent.LayoutController();
        };
        pbWofExoticFarEastChestGlowComponent.GlowComponent.__name__ = ["pbWofExoticFarEastChestGlowComponent", "GlowComponent"];
        pbWofExoticFarEastChestGlowComponent.GlowComponent.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.GlowComponent;
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory = function(context, factory) {
            this.factory = factory;
            this.moduleContext = context;
        };
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory = ck_implements(pbWofExoticFarEastChestGlowComponent.GlowComponentFactory, clientkernelModulesApi.IService);
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory = ck_implements(pbWofExoticFarEastChestGlowComponent.GlowComponentFactory, componentmodelComponentApi.IComponentFactory);
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory.__name__ = ["pbWofExoticFarEastChestGlowComponent", "GlowComponentFactory"];
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory.prototype.moduleContext = null;
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory.prototype.factory = null;
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory.prototype.getComponentDeclaration = function() {
            return pbWofExoticFarEastChestGlowComponentApi.ChestGlowDeclaration;
        };
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory.prototype.createComponent = function(context) {
            var cfgId = context.getConfiguration();
            new pbWofExoticFarEastChestGlowComponent.GlowComponent(context, this.factory, this.moduleContext, cfgId);
        };
        pbWofExoticFarEastChestGlowComponent.GlowComponentFactory.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.GlowComponentFactory;
        pbWofExoticFarEastChestGlowComponent.Controller = function(controllerInstance, register) {
            if (register == null) register = true;
            if (register) pbWofExoticFarEastChestGlowComponent.Controller._CONTROLLERS.push(controllerInstance);
        };
        pbWofExoticFarEastChestGlowComponent.Controller.__name__ = ["pbWofExoticFarEastChestGlowComponent", "Controller"];
        pbWofExoticFarEastChestGlowComponent.Controller.prototype.sendMessage = function(message) {
            var _g1 = 0;
            var _g = pbWofExoticFarEastChestGlowComponent.Controller._CONTROLLERS.length;
            while (_g1 < _g) {
                var i = _g1++;
                var controller = pbWofExoticFarEastChestGlowComponent.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;
                        }
                    }
                }
            }
        };
        pbWofExoticFarEastChestGlowComponent.Controller.prototype.getInterests = function() {
            return [];
        };
        pbWofExoticFarEastChestGlowComponent.Controller.prototype.processMessage = function(message) {};
        pbWofExoticFarEastChestGlowComponent.Controller.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.Controller;
        pbWofExoticFarEastChestGlowComponent.LayoutController = function() {
            pbWofExoticFarEastChestGlowComponent.Controller.call(this, this);
        };
        pbWofExoticFarEastChestGlowComponent.LayoutController.__name__ = ["pbWofExoticFarEastChestGlowComponent", "LayoutController"];
        pbWofExoticFarEastChestGlowComponent.LayoutController.__super__ = pbWofExoticFarEastChestGlowComponent.Controller;
        for (var k in pbWofExoticFarEastChestGlowComponent.Controller.prototype) pbWofExoticFarEastChestGlowComponent.LayoutController.prototype[k] = pbWofExoticFarEastChestGlowComponent.Controller.prototype[k];
        pbWofExoticFarEastChestGlowComponent.LayoutController.prototype.layoutMediator = null;
        pbWofExoticFarEastChestGlowComponent.LayoutController.prototype.getInterests = function() {
            return ["updateComponentLayout", "Common:CommonModelPrepared", "hide", "show", "reelStoped", "setReelPicture", "startSpin", "stopAnimation"];
        };
        pbWofExoticFarEastChestGlowComponent.LayoutController.prototype.processMessage = function(message) {
            var _g = message.messageName;
            switch (_g) {
                case "updateComponentLayout":
                    this.layoutMediator.updateComponentLayout(message.messageData);
                    break;
                case "Common:CommonModelPrepared":
                    this.layoutMediator = new pbWofExoticFarEastChestGlowComponent.LayoutMediator();
                    break;
                case "hide":
                    this.layoutMediator.hide();
                    break;
                case "show":
                    this.layoutMediator.show();
                    break;
                case "reelStoped":
                    this.layoutMediator.reelStoped();
                    break;
                case "setReelPicture":
                    this.layoutMediator.setReelPicture(message.messageData);
                    break;
                case "startSpin":
                    this.layoutMediator.clearAnimations();
                    break;
                case "stopAnimation":
                    this.layoutMediator.stopAnimation(message.messageData);
                    break;
            }
        };
        pbWofExoticFarEastChestGlowComponent.LayoutController.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.LayoutController;
        pbWofExoticFarEastChestGlowComponent.PortController = function() {
            pbWofExoticFarEastChestGlowComponent.Controller.call(this, this);
        };
        pbWofExoticFarEastChestGlowComponent.PortController.__name__ = ["pbWofExoticFarEastChestGlowComponent", "PortController"];
        pbWofExoticFarEastChestGlowComponent.PortController.__super__ = pbWofExoticFarEastChestGlowComponent.Controller;
        for (var k in pbWofExoticFarEastChestGlowComponent.Controller.prototype) pbWofExoticFarEastChestGlowComponent.PortController.prototype[k] = pbWofExoticFarEastChestGlowComponent.Controller.prototype[k];
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.implementationPort = null;
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.layoutPort = null;
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.reelPort = null;
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.reelImpPort = null;
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.getInterests = function() {
            return ["Common:CommonModelPrepared"];
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.processMessage = function(message) {
            var _g = message.messageName;
            switch (_g) {
                case "Common:CommonModelPrepared":
                    this.setupListeners();
                    pbWofExoticFarEastChestGlowComponent.CustomModel.parseConfiguration(pbWofExoticFarEastChestGlowComponent.CommonModel.loadedConfigurations.get(pbWofExoticFarEastChestGlowComponent.CustomModel.CONFIGURATION_ID));
                    break;
            }
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.setupListeners = function() {
            var _g = this;
            this.implementationPort = pbWofExoticFarEastChestGlowComponent.CommonModel.context.getImplementedPort(pbWofExoticFarEastChestGlowComponentApi.IChestGlowImplementationPort);
            this.layoutPort = pbWofExoticFarEastChestGlowComponent.CommonModel.context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.implementationPort.setVisibility().subscribe($bind(this, this.setVisibility));
            this.implementationPort.stopAnimation().subscribe($bind(this, this.stopAnimation));
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.updateLayout));
            this.reelPort = pbWofExoticFarEastChestGlowComponent.CommonModel.context.getUsedPort(reelsApi.IReelsPort);
            this.reelImpPort = pbWofExoticFarEastChestGlowComponent.CommonModel.context.getUsedPort(reelsApi.IReelsPort);
            this.reelPort.onReelStopped().subscribe($bind(this, this.onReelStopped));
            this.reelImpPort.setReelPicture().subscribe($bind(this, this.setReelPicture));
            this.reelImpPort.stopSpin().subscribe($bind(this, this.stopSpinPayload));
            this.reelImpPort.startSpin().subscribe($bind(this, this.spinStarting));
            _hcmn_.haxe_Timer.delay(function() {
                _g.updateLayout(null);
                _g.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("show"));
            }, 1000);
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.spinStarting = function(e) {
            this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("startSpin"));
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.stopSpinPayload = function(e) {
            this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("setReelPicture", e.getPayload().reelPicture));
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.setReelPicture = function(e) {
            this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("setReelPicture", e.getPayload()));
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.onReelStopped = function(e) {
            if (e.getPayload() == 4) this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("reelStoped"));
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.setVisibility = function(e) {
            if (e.getPayload()) this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("show"));
            else this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("hide"));
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.stopAnimation = function(e) {
            this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("stopAnimation", e.getPayload()));
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.updateLayout = function(e) {
            if (e != null) this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("updateComponentLayout", e.getPayload()));
            this.layoutPort.getComponentLayoutUpdated().publish(pbWofExoticFarEastChestGlowComponent.CommonModel.instance);
        };
        pbWofExoticFarEastChestGlowComponent.PortController.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.PortController;
        pbWofExoticFarEastChestGlowComponent.LayoutMediator = function() {
            this.parrent = new pbWofExoticFarEastChestGlowComponent.Stage(pbWofExoticFarEastChestGlowComponent.CustomModel.LAYER_ID, pbWofExoticFarEastChestGlowComponent.CustomModel.componentWidth, pbWofExoticFarEastChestGlowComponent.CustomModel.componentHeight);
            this.mask = pbWofExoticFarEastChestGlowComponent.CommonModel.displayProvider.getFactory().createGraphics();
            this.mask.beginFill(0, 1, true);
            this.mask.drawRect(0, 0, pbWofExoticFarEastChestGlowComponent.CustomModel.componentWidth, pbWofExoticFarEastChestGlowComponent.CustomModel.componentHeight);
            this.mask.endFill();
            this.glowPlugin = pbWofExoticFarEastChestGlowComponent.Activator.glowPlugin;
        };
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.__name__ = ["pbWofExoticFarEastChestGlowComponent", "LayoutMediator"];
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.parrent = null;
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.mask = null;
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.glowPlugin = null;
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.updateComponentLayout = function(layout) {
            this.parrent.display.setX(layout.containers.get(pbWofExoticFarEastChestGlowComponent.CustomModel.LAYER_ID).left);
            this.parrent.display.setY(layout.containers.get(pbWofExoticFarEastChestGlowComponent.CustomModel.LAYER_ID).top);
            this.parrent.display.setScaleX(layout.containers.get(pbWofExoticFarEastChestGlowComponent.CustomModel.LAYER_ID).width / pbWofExoticFarEastChestGlowComponent.CustomModel.componentWidth);
            this.parrent.display.setScaleX(layout.containers.get(pbWofExoticFarEastChestGlowComponent.CustomModel.LAYER_ID).height / pbWofExoticFarEastChestGlowComponent.CustomModel.componentHeight);
        };
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.hide = function() {
            this.parrent.display.setVisible(false);
        };
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.show = function() {
            this.parrent.display.setVisible(true);
        };
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.setReelPicture = function(rp) {
            this.glowPlugin.setReelPicture(rp);
        };
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.reelStoped = function() {
            this.glowPlugin.show();
        };
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.clearAnimations = function() {
            this.glowPlugin.clearAnimations();
        };
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.stopAnimation = function(doNotShow) {
            this.glowPlugin.stopAnimation(doNotShow);
        };
        pbWofExoticFarEastChestGlowComponent.LayoutMediator.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.LayoutMediator;
        pbWofExoticFarEastChestGlowComponent.CustomConst = function() {};
        pbWofExoticFarEastChestGlowComponent.CustomConst.__name__ = ["pbWofExoticFarEastChestGlowComponent", "CustomConst"];
        pbWofExoticFarEastChestGlowComponent.CustomConst.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.CustomConst;
        pbWofExoticFarEastChestGlowComponent.CustomModel = function() {};
        pbWofExoticFarEastChestGlowComponent.CustomModel.__name__ = ["pbWofExoticFarEastChestGlowComponent", "CustomModel"];
        pbWofExoticFarEastChestGlowComponent.CustomModel.parseConfiguration = function(config) {};
        pbWofExoticFarEastChestGlowComponent.CustomModel.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.CustomModel;
        pbWofExoticFarEastChestGlowComponent.CommonConstants = function() {};
        pbWofExoticFarEastChestGlowComponent.CommonConstants.__name__ = ["pbWofExoticFarEastChestGlowComponent", "CommonConstants"];
        pbWofExoticFarEastChestGlowComponent.CommonConstants.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.CommonConstants;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController = function() {
            this.loadedSoFar = 0;
            this.totalToLoad = 0;
            pbWofExoticFarEastChestGlowComponent.Controller.call(this, this, false);
        };
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.__name__ = ["pbWofExoticFarEastChestGlowComponent", "PrepareCommonsController"];
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.__super__ = pbWofExoticFarEastChestGlowComponent.Controller;
        for (var k in pbWofExoticFarEastChestGlowComponent.Controller.prototype) pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype[k] = pbWofExoticFarEastChestGlowComponent.Controller.prototype[k];
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.totalToLoad = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.loadedSoFar = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.payload = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.layoutPort = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.subscription = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.processMessage = function(message) {
            var _g = message.messageName;
            switch (_g) {
                case "Common:PrepareCommonModel":
                    this.prepareModel(message.messageData);
                    break;
            }
        };
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.prepareModel = function(payload) {
            var _g2 = this;
            this.payload = payload;
            pbWofExoticFarEastChestGlowComponent.CommonModel.context = payload.context;
            pbWofExoticFarEastChestGlowComponent.CommonModel.moduleContext = payload.moduleContext;
            pbWofExoticFarEastChestGlowComponent.CommonModel.configurationId = pbWofExoticFarEastChestGlowComponent.CommonModel.context.getConfiguration();
            pbWofExoticFarEastChestGlowComponent.CommonModel.factory = payload.factory;
            pbWofExoticFarEastChestGlowComponent.CommonModel.assetRegistry = pbWofExoticFarEastChestGlowComponent.CommonModel.moduleContext.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            pbWofExoticFarEastChestGlowComponent.CommonModel.displayProvider = pbWofExoticFarEastChestGlowComponent.CommonModel.moduleContext.getAnyService(displayEngineApi.IDisplayProvider, null);
            pbWofExoticFarEastChestGlowComponent.CommonModel.instance = pbWofExoticFarEastChestGlowComponent.CommonModel.context.getInstance();
            this.layoutPort = _hcmn_.js_Boot.__cast(pbWofExoticFarEastChestGlowComponent.CommonModel.context.getUsedPort(gameLayoutApi.IGameLayoutPort), gameLayoutApi.IGameLayoutPort);
            if (this.layoutPort != null) {
                this.totalToLoad++;
                this.subscription = this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.handleLayoutPayload));
            }
            if (payload.assetsLoLoad != null) {
                pbWofExoticFarEastChestGlowComponent.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.totalToLoad++;
                    console.log("*/*/* load asset " + id[0]);
                    pbWofExoticFarEastChestGlowComponent.CommonModel.assetRegistry.getAsset(id[0]).getContent().then((function(id) {
                        return function(vba) {
                            _g2.loadedSoFar++;
                            pbWofExoticFarEastChestGlowComponent.CommonModel.loadedAssets.set(id[0], vba);
                            console.log("*/*/*  loaded asset " + id[0]);
                            _g2.ceheckLoaded();
                        };
                    })(id));
                }
            }
            if (payload.configurationsToLoad != null) {
                pbWofExoticFarEastChestGlowComponent.CommonModel.loadedConfigurations = new _hcmn_.haxe_ds_StringMap();
                var _g11 = 0;
                var _g3 = payload.configurationsToLoad.length;
                while (_g11 < _g3) {
                    var s = _g11++;
                    this.totalToLoad++;
                    var config_id = [payload.configurationsToLoad[s]];
                    pbWofExoticFarEastChestGlowComponent.CommonModel.assetRegistry.getAsset(config_id[0]).getContent().then((function(config_id) {
                        return function(data) {
                            pbWofExoticFarEastChestGlowComponent.CommonModel.loadedConfigurations.set(config_id[0], data);
                            _g2.loadedSoFar++;
                            _g2.ceheckLoaded();
                        };
                    })(config_id));
                }
            }
        };
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.handleLayoutPayload = function(event) {
            this.loadedSoFar++;
            pbWofExoticFarEastChestGlowComponent.CommonModel.layoutPayload = event.getPayload();
            this.ceheckLoaded();
        };
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.ceheckLoaded = function() {
            if (this.totalToLoad == this.loadedSoFar) {
                if (this.layoutPort != null && this.subscription != null) this.subscription.unsubscribe();
                this.sendMessage(new pbWofExoticFarEastChestGlowComponent.Message("Common:CommonModelPrepared"));
            }
        };
        pbWofExoticFarEastChestGlowComponent.PrepareCommonsController.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.PrepareCommonsController;
        pbWofExoticFarEastChestGlowComponent.CommonModel = function() {};
        pbWofExoticFarEastChestGlowComponent.CommonModel.__name__ = ["pbWofExoticFarEastChestGlowComponent", "CommonModel"];
        pbWofExoticFarEastChestGlowComponent.CommonModel.factory = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.context = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.displayProvider = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.assetRegistry = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.configurationId = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.layoutPayload = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.loadedAssets = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.instance = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.moduleContext = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.loadedConfigurations = null;
        pbWofExoticFarEastChestGlowComponent.CommonModel.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.CommonModel;
        pbWofExoticFarEastChestGlowComponent.Message = function(messageName, messageData) {
            this.messageName = messageName;
            this.messageData = messageData;
        };
        pbWofExoticFarEastChestGlowComponent.Message.__name__ = ["pbWofExoticFarEastChestGlowComponent", "Message"];
        pbWofExoticFarEastChestGlowComponent.Message.prototype.messageData = null;
        pbWofExoticFarEastChestGlowComponent.Message.prototype.messageName = null;
        pbWofExoticFarEastChestGlowComponent.Message.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.Message;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload = function() {};
        pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload.__name__ = ["pbWofExoticFarEastChestGlowComponent", "PrepareCommonModelPayload"];
        pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload.prototype.context = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload.prototype.factory = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload.prototype.moduleContext = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload.prototype.assetsLoLoad = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload.prototype.configurationsToLoad = null;
        pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.PrepareCommonModelPayload;
        pbWofExoticFarEastChestGlowComponent.DisplayObject = function() {};
        pbWofExoticFarEastChestGlowComponent.DisplayObject.__name__ = ["pbWofExoticFarEastChestGlowComponent", "DisplayObject"];
        pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype.objectsStage = null;
        pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype.display = null;
        pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype.addChild = function(child, zindex) {};
        pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype.removeChild = function(child) {};
        pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype.getViewBuilderHeight = function() {
            return 0;
        };
        pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype.getViewBuilderWidth = function() {
            return 0;
        };
        pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.DisplayObject;
        pbWofExoticFarEastChestGlowComponent.MovieClip = function(id, asetId, flashInstanceName) {
            pbWofExoticFarEastChestGlowComponent.DisplayObject.call(this);
            this.id = id;
            this.display = pbWofExoticFarEastChestGlowComponent.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
            var vbAsset = pbWofExoticFarEastChestGlowComponent.CommonModel.loadedAssets.get(asetId);
            var ivbc = pbWofExoticFarEastChestGlowComponent.CommonModel.factory.createView(vbAsset);
            var vbAnimationHolder = ivbc.createContainerFromStoredConfig(flashInstanceName);
            this.animComponent = vbAnimationHolder.getVBAnimationById("ANIMATION_CONTENT");
            this.display.setName(id);
            this.animComponent.stop();
            this.display.addChild(this.animComponent.getDisplayObject());
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.__name__ = ["pbWofExoticFarEastChestGlowComponent", "MovieClip"];
        pbWofExoticFarEastChestGlowComponent.MovieClip.__super__ = pbWofExoticFarEastChestGlowComponent.DisplayObject;
        for (var k in pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype) pbWofExoticFarEastChestGlowComponent.MovieClip.prototype[k] = pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype[k];
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.animComponent = null;
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.id = null;
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.x = null;
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.y = null;
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.visible = null;
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.play = function(renderInBackStage, callback, delay) {
            if (delay == null) delay = 0;
            this.animComponent.play(renderInBackStage, callback, delay);
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.show = function() {
            this.animComponent.show();
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.hide = function() {
            this.animComponent.hide();
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.get_x = function() {
            return this.x;
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.set_x = function(value) {
            this.display.setX(value);
            return this.x = value;
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.get_y = function() {
            return this.y;
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.set_y = function(value) {
            this.display.setY(value);
            return this.y = value;
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.stop = function() {
            this.animComponent.gotoAndStop(false, "1");
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.addEventListener = function(listenerId, callback) {
            this.animComponent.addEventListener(listenerId, callback);
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.gotoAndPlay = function(offScreen, animationAnchor) {
            this.animComponent.gotoAndPlay(offScreen, animationAnchor);
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.get_visible = function() {
            return this.visible;
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.set_visible = function(value) {
            this.visible = value;
            this.display.setVisible(this.get_visible());
            return this.get_visible();
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.getViewBuilderHeight = function() {
            return this.animComponent.getDisplayObject().getUserData().viewBuilderH;
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.getViewBuilderWidth = function() {
            return this.animComponent.getDisplayObject().getUserData().viewBuilderW;
        };
        pbWofExoticFarEastChestGlowComponent.MovieClip.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.MovieClip;
        pbWofExoticFarEastChestGlowComponent.Stage = function(layerId, vbW, vbH) {
            this.viewBuilderH = 0;
            this.viewBuilderW = 0;
            this.layerId = layerId;
            this.viewBuilderH = vbH;
            this.viewBuilderW = vbW;
            this.layerPayload = pbWofExoticFarEastChestGlowComponent.CommonModel.layoutPayload.containers.get(layerId);
            var this1 = pbWofExoticFarEastChestGlowComponent.CommonModel.displayProvider.getStages();
            this.stage = this1.get(this.layerPayload.stage);
            this.display = pbWofExoticFarEastChestGlowComponent.CommonModel.displayProvider.getFactory().createDisplayObjectContainer();
            this.display.setWidth(this.layerPayload.width);
            this.display.setWidth(this.layerPayload.height);
            this.display.setX(this.layerPayload.left);
            this.display.setY(this.layerPayload.top);
            this.display.setY(this.layerPayload.top);
            this.display.setZIndex(this.layerPayload.zIndex);
            this.display.setName(layerId);
            this.stage.addChild(this.display);
            pbWofExoticFarEastChestGlowComponent.DisplayObject.call(this);
        };
        pbWofExoticFarEastChestGlowComponent.Stage.__name__ = ["pbWofExoticFarEastChestGlowComponent", "Stage"];
        pbWofExoticFarEastChestGlowComponent.Stage.__super__ = pbWofExoticFarEastChestGlowComponent.DisplayObject;
        for (var k in pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype) pbWofExoticFarEastChestGlowComponent.Stage.prototype[k] = pbWofExoticFarEastChestGlowComponent.DisplayObject.prototype[k];
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.stage = null;
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.layerId = null;
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.viewBuilderW = null;
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.viewBuilderH = null;
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.layerPayload = null;
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.width = null;
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.height = null;
        pbWofExoticFarEastChestGlowComponent.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);
        };
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.addDisplayObjectContainer = function(d) {
            this.display.addChild(d);
        };
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.removeChild = function(child) {
            child.objectsStage = null;
            try {
                this.display.removeChild(child.display);
            } catch (e) {
                if (e instanceof js._Boot.HaxeError) e = e.val;
                if (_hcmn_.js_Boot.__instanceof(e, Error)) {} else throw (e);
            }
        };
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.getViewBuilderHeight = function() {
            return this.viewBuilderH;
        };
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.getViewBuilderWidth = function() {
            return this.viewBuilderW;
        };
        pbWofExoticFarEastChestGlowComponent.Stage.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.Stage;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin = function() {
            this.doNotShow = false;
            this.isStoppped = false;
            winControllerApi.WinControllerAbstractPlugin.call(this);
        };
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.__name__ = ["pbWofExoticFarEastChestGlowComponent", "ChestGlowPlugin"];
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.__super__ = winControllerApi.WinControllerAbstractPlugin;
        for (var k in winControllerApi.WinControllerAbstractPlugin.prototype) pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype[k] = winControllerApi.WinControllerAbstractPlugin.prototype[k];
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.loadedAssets = null;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.reelLayoutModel = null;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.reelPicture = null;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.container = null;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.vbAnimationComponents = null;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.notInited = null;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.isStoppped = null;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.doNotShow = null;
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.setLoadedAssets = function(loadedAssets) {
            this.loadedAssets = loadedAssets;
        };
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.setReelLayoutModel = function(reelLayoutModel) {
            var _g = this;
            this.reelLayoutModel = reelLayoutModel;
            if (this.notInited) {
                this.notInited = false;
                _hcmn_.haxe_Timer.delay(function() {
                    _g.setReelPicture(_g.reelPicture);
                    _g.show();
                }, 1000);
            }
        };
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.setReelPicture = function(reelPicture) {
            this.clearAnimations();
            this.reelPicture = reelPicture;
            if (this.reelLayoutModel != null) {
                this.vbAnimationComponents = [];
                var _g1 = 0;
                var _g = reelPicture.length;
                while (_g1 < _g) {
                    var co = _g1++;
                    var _g3 = 0;
                    var _g2 = reelPicture[co].length;
                    while (_g3 < _g2) {
                        var ro = _g3++;
                        if (reelPicture[co][ro] == "b01" && ro != 0 && ro != reelPicture[co].length - 1) {
                            var v2d = this.reelLayoutModel.getCellPosition(ro, co);
                            var vba = this.loadedAssets.get("WIN_SYMBOLS_MERGED_VB_01");
                            var view = pbWofExoticFarEastChestGlowComponent.ExternalService.viewBuilderFactory.createView(vba);
                            var animationHolder = view.createContainerFromStoredConfig("ANIMATION_HOLDER_CIRCLE");
                            var vbAnimationComponent = animationHolder.getVBAnimationById("ANIMATION_CONTENT");
                            vbAnimationComponent.show();
                            vbAnimationComponent.play(false);
                            vbAnimationComponent.getDisplayObject().setX(v2d.get_x() + vbAnimationComponent.getDisplayObject().getX());
                            vbAnimationComponent.getDisplayObject().setY(v2d.get_y() + vbAnimationComponent.getDisplayObject().getY());
                            this.vbAnimationComponents.push(vbAnimationComponent);
                        }
                    }
                }
            } else this.notInited = true;
        };
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.setContainer = function(container) {
            this.container = container;
        };
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.setOutcome = function(outcome) {};
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.show = function() {
            var _g = 0;
            var _g1 = this.vbAnimationComponents;
            while (_g < _g1.length) {
                var anim = _g1[_g];
                ++_g;
                this.container.addChild(anim.getDisplayObject());
                if (!this.doNotShow) anim.play(false);
                else {
                    anim.hide();
                    this.doNotShow = false;
                }
            }
        };
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.clearAnimations = function() {
            if (this.container == null || this.vbAnimationComponents == null) return;
            this.container.removeChildren();
            var _g = 0;
            var _g1 = this.vbAnimationComponents;
            while (_g < _g1.length) {
                var anim = _g1[_g];
                ++_g;
                anim.dispose();
            }
            this.vbAnimationComponents = [];
        };
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.stopAnimation = function(doNotShow) {
            if (doNotShow) this.doNotShow = true;
            else {
                var _g = 0;
                var _g1 = this.vbAnimationComponents;
                while (_g < _g1.length) {
                    var anim = _g1[_g];
                    ++_g;
                    anim.stop();
                }
            }
        };
        pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin.prototype.__class__ = pbWofExoticFarEastChestGlowComponent.ChestGlowPlugin;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            }
        };
        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;
        pbWofExoticFarEastChestGlowComponent.Controller._CONTROLLERS = [];;
        pbWofExoticFarEastChestGlowComponent.CustomConst.UPDATE_COMPONENT_LAYOUT = "updateComponentLayout";;
        pbWofExoticFarEastChestGlowComponent.CustomConst.REGISTER_RENDER_ELEMENT = "registerRenderElement";;
        pbWofExoticFarEastChestGlowComponent.CustomConst.START_SPIN = "startSpin";;
        pbWofExoticFarEastChestGlowComponent.CustomConst.CHANGE_FORCE = "changeForce";;
        pbWofExoticFarEastChestGlowComponent.CustomConst.REEL_STOPED = "reelStoped";;
        pbWofExoticFarEastChestGlowComponent.CustomConst.SET_REEL_PICTURE = "setReelPicture";;
        pbWofExoticFarEastChestGlowComponent.CustomConst.STOP_ANIMATION = "stopAnimation";;
        pbWofExoticFarEastChestGlowComponent.CustomModel.LAYER_ID = "GLOW";;
        pbWofExoticFarEastChestGlowComponent.CustomModel.CONFIGURATION_ID = "bonus-reel-assets/bonus-reel-config";;
        pbWofExoticFarEastChestGlowComponent.CustomModel.ASSET_PACK_ID = "bonus-reel-assets/BONUS_REEL_PACK";;
        pbWofExoticFarEastChestGlowComponent.CustomModel.componentWidth = 1378;;
        pbWofExoticFarEastChestGlowComponent.CustomModel.componentHeight = 906;;
        pbWofExoticFarEastChestGlowComponent.CommonConstants.PREPARE_COMMON_MODEL = "Common:PrepareCommonModel";;
        pbWofExoticFarEastChestGlowComponent.CommonConstants.COMMON_MODEL_PREPARED = "Common:CommonModelPrepared";;
        pbWofExoticFarEastChestGlowComponent.CommonConstants.HIDE = "hide";;
        pbWofExoticFarEastChestGlowComponent.CommonConstants.SHOW = "show";;
        return {
            exports: pbWofExoticFarEastChestGlowComponent,
            activator: pbWofExoticFarEastChestGlowComponent.Activator
        };
    });
//# sourceURL=pbWofExoticFarEastChestGlowComponent.js