define("animation", ["animationDeclaration", "viewBuilderApi", "commonControls", "componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "slotModelApi", "uiHelper", "winMeterApi", "displayEngineApi", "animationPort", "commonTools", "gameLayoutApi", "PIXI", "BABYLON", "clientkernelEventbusApi", "clientkernelModulesApi", "clientkernelLoggerApi"],
    function(animationDeclaration, viewBuilderApi, commonControls, componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, slotModelApi, uiHelper, winMeterApi, displayEngineApi, animationPort, commonTools, gameLayoutApi, PIXI, BABYLON, clientkernelEventbusApi, clientkernelModulesApi, clientkernelLoggerApi) {
        "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 animation == 'undefined') {
            var animation = {};
        };
        animation.Activator = function(context) {};
        animation.Activator = ck_implements(animation.Activator, clientkernelModulesApi.IModuleActivator);
        animation.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        animation.Activator.__name__ = ["animation", "Activator"];
        animation.Activator.prototype.start = function(context) {
            var services = [viewBuilderApi.IViewBuilderFactory, clientkernelLoaderApi.IAssetRegistry, displayEngineApi.IDisplayProvider];
            context.getServiceTracker(services).then(function(context1) {
                animation.ExternalService.initialize(context1);
                var vbf = context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
                animation.ExternalService.viewBuilderFactory = vbf;
                context1.registerService(new animation.AnimationFactory(vbf, context1), animationDeclaration.AnimationDeclaration, null);
            });
        };
        animation.Activator.prototype.stop = function(context) {};
        animation.Activator.main = function() {};
        animation.Activator.prototype.__class__ = animation.Activator;
        animation.Animation = function(context, vbf, configId) {
            this.initialized = false;
            this.layoutPayload = null;
            this.vba = null;
            var _g = this;
            this.context = context;
            this.controlsInjector = new commonControls.ControlsInjector(context);
            this.vbf = vbf;
            this.configId = configId;
            this.port = context.getImplementedPort(animationPort.IAnimationImplementationPort);
            this.layoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.onUpdateComponentLayout));
            animation.ExternalService.loadConfig(configId, function(vba) {
                _g.vba = vba;
                _g.initialize();
            });
        };
        animation.Animation.__name__ = ["animation", "Animation"];
        animation.Animation.prototype.view = null;
        animation.Animation.prototype.configId = null;
        animation.Animation.prototype.port = null;
        animation.Animation.prototype.layoutPort = null;
        animation.Animation.prototype.component = null;
        animation.Animation.prototype.context = null;
        animation.Animation.prototype.vba = null;
        animation.Animation.prototype.vbf = null;
        animation.Animation.prototype.controller = null;
        animation.Animation.prototype.layoutPayload = null;
        animation.Animation.prototype.initialized = null;
        animation.Animation.prototype.controlsInjector = null;
        animation.Animation.prototype.onUpdateComponentLayout = function(e) {
            this.layoutPayload = e.getPayload();
            if (!this.initialized) this.initialize();
            else this.updateLayout();
        };
        animation.Animation.prototype.initialize = function() {
            if (!this.initialized && this.vba != null && this.layoutPayload != null) {
                this.controller = new animation.AnimationController(this);
                this.view = this.vbf.createView(this.vba);
                this.registerAllComponents();
                this.controller.init();
                this.updateLayout();
                this.initialized = true;
            }
        };
        animation.Animation.prototype.updateLayout = function() {
            this.controller.updateLayout(this.layoutPayload);
            this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
        };
        animation.Animation.prototype.registerAllComponents = function() {
            var keys;
            var this1 = this.view.getChildComponents();
            keys = this1.keys();
            if (!keys.hasNext()) keys = this.view.storedConfigs.keys();
            while (keys.hasNext()) {
                var compId = keys.next();
                var comp = this.idToComponentEnum(compId);
                if (comp != animationPort.AnimationComponent.NONE) this.registerComponent(comp);
            }
        };
        animation.Animation.prototype.idToComponentEnum = function(id) {
            var ind;
            var _this = _hcmn_.Type.getEnumConstructs(animationPort.AnimationComponent);
            ind = _hcmn_.HxOverrides.indexOf(_this, id, 0);
            if (ind < 0) return animationPort.AnimationComponent.NONE;
            return _hcmn_.Type.createEnum(animationPort.AnimationComponent, id, null);
        };
        animation.Animation.prototype.registerComponent = function(componentEnum) {
            this.component = null;
            switch (componentEnum[1]) {
                case 1:
                    this.registerContainerComponent(animationPort.AnimationComponent.REEL_BACKGROUND, animation.WinMetterComponent);
                    this.registerContainerComponent(animationPort.AnimationComponent.REEL_BACKGROUND, animation.ReelMaskComponent);
                    if (animation.ExternalService.isDesktop()) this.registerContainerComponent(animationPort.AnimationComponent.REEL_BACKGROUND, animation.BetPanelAdaptorComponent);
                    this.registerContainerComponent(animationPort.AnimationComponent.REEL_BACKGROUND, animation.AnimationComponentViewLogic);
                    break;
                case 2:
                    this.registerContainerComponent(animationPort.AnimationComponent.REEL_FRAMES_CONTAINER, animation.AnimationComponentViewLogic);
                    break;
                case 0:
                    this.registerContainerComponent(animationPort.AnimationComponent.ASPECT_FRAME, animation.AnimationComponentViewLogic);
                    this.component.hide();
                    break;
                case 3:
                    this.registerContainerComponent(animationPort.AnimationComponent.LOGO, animation.LogoComponent);
                    break;
                case 7:
                    this.registerContainerComponent(componentEnum, animation.AnimationComponentViewLogic);
                    break;
                case 4:
                    this.registerContainerComponent(componentEnum, animation.FreeSpinPanel, true);
                    break;
                case 5:
                    this.registerContainerComponent(componentEnum, animation.FreeSpinMultiplier, true);
                    break;
                case 6:
                    this.registerContainerComponent(componentEnum, animation.FreeSpinReelFire, true);
                    break;
                case 8:
                    this.registerContainerComponent(componentEnum, animation.AnimationComponentViewLogic);
                    break;
                default:
                    return false;
            }
            return true;
        };
        animation.Animation.prototype.registerContainerComponent = function(componentEnum, componentClass, isAnimated) {
            if (isAnimated == null) isAnimated = false;
            var name = componentEnum[0];
            var container = this.view.getComponentById(name);
            var keys = this.view.storedConfigs.keys();
            if (container == null && keys.hasNext()) {
                var newComponent = this.view.createContainerFromStoredConfig(name);
                this.view.addChildComponent(newComponent, name);
                container = this.view.getComponentById(name);
            }
            if (container != null) {
                var scalefactor = this.vba.getConfiguration().scalefactor;
                this.component = _hcmn_.Type.createInstance(componentClass, [container, scalefactor, isAnimated]);
                animation.Animation.COMPONENTS.set(componentEnum, this.component);
                if (_hcmn_.js_Boot.__instanceof(this.component, animation.IViewBuilderSetter))(_hcmn_.js_Boot.__cast(this.component, animation.IViewBuilderSetter)).setViewBuilder(this.view);
                if (_hcmn_.js_Boot.__instanceof(this.component, animation.IAnimationPortSetter))(_hcmn_.js_Boot.__cast(this.component, animation.IAnimationPortSetter)).setAnimationPort(this.port);
                this.controlsInjector.inject(this.component);
                this.component.init();
            }
        };
        animation.Animation.prototype.getComponent = function() {
            return this.component;
        };
        animation.Animation.prototype.isComponent = function(key) {
            return this.getComponent() == this.getComponentByKey(key);
        };
        animation.Animation.prototype.getComponentByKey = function(key) {
            return animation.Animation.COMPONENTS.get(key);
        };
        animation.Animation.prototype.__class__ = animation.Animation;
        animation.AnimationController = function(animation) {
            this.isAddedToStage = false;
            this.animation = animation;
        };
        animation.AnimationController.__name__ = ["animation", "AnimationController"];
        animation.AnimationController.prototype.isAddedToStage = null;
        animation.AnimationController.prototype.animation = null;
        animation.AnimationController.prototype.init = function() {
            this.animation.port.getAnimationAction().subscribe($bind(this, this.onAnimationAction));
        };
        animation.AnimationController.prototype.updateLayout = function(layoutPayload) {
            var $it0 = layoutPayload.containers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var layerPayload = layoutPayload.containers.get(layerId);
                var cfg = layerPayload.configuration;
                var stage;
                var this1 = animation.ExternalService.displayProvider.getStages();
                stage = this1.get(layerPayload.stage);
                var container = this.animation.view.getComponentById(layerId).getDisplayObject();
                if (!this.isAddedToStage) stage.addChild(container);
                container.setX(layerPayload.left);
                container.setY(layerPayload.top);
                var userData = uiHelper.UiHelper.getSimpleHelper().getUserData(container);
                if (layerPayload.width == null) {
                    stage.getCanvas().style.pointerEvents = "none";
                    stage.setWidth((_hcmn_.js_Boot.__cast(stage.getCanvas(), HTMLCanvasElement)).width);
                    stage.setHeight((_hcmn_.js_Boot.__cast(stage.getCanvas(), HTMLCanvasElement)).height);
                    stage.setScaleX(1);
                    stage.setScaleY(1);
                } else {
                    container.setScaleX(layerPayload.width / userData.viewBuilderW);
                    container.setScaleY(layerPayload.height / userData.viewBuilderH);
                }
                container.setZIndex(layerPayload.zIndex);
                var component = this.animation.getComponent();
                component.configure(cfg);
                if (_hcmn_.js_Boot.__instanceof(component, animation.ILayoutUpdatable))(_hcmn_.js_Boot.__cast(component, animation.ILayoutUpdatable)).updateLayout(layerPayload);
            }
            if (!this.isAddedToStage) this.isAddedToStage = true;
        };
        animation.AnimationController.prototype.onAnimationAction = function(e) {
            var acimationAction = e.getPayload();
            var animationComponent = acimationAction.animationComponent;
            if (this.animation.isComponent(animationComponent)) this.handleAnimationAction(acimationAction);
        };
        animation.AnimationController.prototype.handleAnimationAction = function(action) {
            var component = this.animation.getComponent();
            component.action(action);
        };
        animation.AnimationController.prototype.__class__ = animation.AnimationController;
        animation.AnimationFactory = function(vbf, context) {
            this.context = context;
            this.vbf = vbf;
        };
        animation.AnimationFactory = ck_implements(animation.AnimationFactory, clientkernelModulesApi.IService);
        animation.AnimationFactory = ck_implements(animation.AnimationFactory, componentmodelComponentApi.IComponentFactory);
        animation.AnimationFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        animation.AnimationFactory.__name__ = ["animation", "AnimationFactory"];
        animation.AnimationFactory.prototype.vbf = null;
        animation.AnimationFactory.prototype.context = null;
        animation.AnimationFactory.prototype.getComponentDeclaration = function() {
            return animationDeclaration.AnimationDeclaration;
        };
        animation.AnimationFactory.prototype.createComponent = function(context) {
            var cfgId = context.getConfiguration();
            new animation.Animation(context, this.vbf, cfgId);
        };
        animation.AnimationFactory.prototype.__class__ = animation.AnimationFactory;
        animation.ExternalService = function() {};
        animation.ExternalService.__name__ = ["animation", "ExternalService"];
        animation.ExternalService.displayProvider = null;
        animation.ExternalService.assetRegistry = null;
        animation.ExternalService.variableRegistry = null;
        animation.ExternalService.bus = null;
        animation.ExternalService.busChanel = null;
        animation.ExternalService.logger = null;
        animation.ExternalService.viewBuilderFactory = null;
        animation.ExternalService.uiHelper = null;
        animation.ExternalService.translationManager = null;
        animation.ExternalService.initialize = function(context) {
            animation.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            animation.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            animation.ExternalService.variableRegistry = context.getAnyService(clientkernelLoaderApi.IVariableRegistry, null);
            animation.ExternalService.bus = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
            animation.ExternalService.busChanel = animation.ExternalService.bus.getChannel("GFBus");
            var loggerFactory = context.getAnyService(clientkernelLoggerApi.ILoggerFactory, null);
            animation.ExternalService.logger = loggerFactory.getLogger(context.getModule().getSymbolicName());
            animation.ExternalService.uiHelper = uiHelper.UiHelper.getUiHelper(animation.ExternalService.displayProvider);
            animation.ExternalService.translationManager = context.getAnyService(translationmanagerApi.ITranslationManager);
        };
        animation.ExternalService.getBus = function() {
            return animation.ExternalService.bus;
        };
        animation.ExternalService.load = function(assetsToBeLoaded, calbackFunction, timeoutToBeLoaded) {
            if (timeoutToBeLoaded == null) timeoutToBeLoaded = 60000;
            var timeoutId = window.setTimeout(function() {
                animation.ExternalService.logger.error("Would not loaded assets: " + _hcmn_.Std.string(assetsToBeLoaded) + " durin: " + timeoutToBeLoaded + " milliseconds");
            }, timeoutToBeLoaded);
            animation.ExternalService.assetRegistry.getAssetsContent(assetsToBeLoaded).then(function(loadedAssets) {
                window.clearTimeout(timeoutId);
                calbackFunction(loadedAssets);
            });
        };
        animation.ExternalService.loadConfig = function(config_id, configCallback) {
            animation.ExternalService.assetRegistry.getAsset(config_id).getContent().then(function(data) {
                configCallback(data);
            });
        };
        animation.ExternalService.getAsset = function(id) {
            return animation.ExternalService.assetRegistry.getAsset(id).getContent();
        };
        animation.ExternalService.isDesktop = function() {
            return !animation.ExternalService.isDevice() && !animation.ExternalService.isMini();
        };
        animation.ExternalService.isDevice = function() {
            return animation.ExternalService.checkIsDevice("mobile") || animation.ExternalService.checkIsDevice("tablet");
        };
        animation.ExternalService.isMini = function() {
            return animation.ExternalService.variableRegistry.get("presenttype") == "MIN" || animation.ExternalService.variableRegistry.get("assetPack") == "desktopmini" || animation.ExternalService.variableRegistry.get("assetPack") == "tabletmini";
        };
        animation.ExternalService.checkIsDevice = function(deviceType) {
            var skin = animation.ExternalService.variableRegistry.get("skin");
            var assetPack = animation.ExternalService.variableRegistry.get("assetPack");
            return skin == deviceType || assetPack == deviceType;
        };
        animation.ExternalService.prototype.__class__ = animation.ExternalService;

        animation.IAnimationComponent = function() {}
        animation.IAnimationComponent.prototype = {

            action: function(animAction) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            init: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            show: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            hide: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            configure: function(config) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            }
        };
        animation.AnimationComponentViewLogic = function(container, scalefactor, isAnimated) {
            if (isAnimated == null) isAnimated = false;
            this.container = container;
            this.scalefactor = scalefactor;
            this.isAnimated = isAnimated;
            this.show();
            this.logger = animation.ExternalService.logger;
            this.uiHelper = animation.ExternalService.uiHelper;
            uiHelper.ViewBuilderContainerExtension.cacheAsBitmap(container, !isAnimated);
        };
        animation.AnimationComponentViewLogic = ck_implements(animation.AnimationComponentViewLogic, animation.IAnimationComponent);
        animation.AnimationComponentViewLogic.__interfaces__ = [animation.IAnimationComponent];
        animation.AnimationComponentViewLogic.__name__ = ["animation", "AnimationComponentViewLogic"];
        animation.AnimationComponentViewLogic.prototype.logger = null;
        animation.AnimationComponentViewLogic.prototype.container = null;
        animation.AnimationComponentViewLogic.prototype.isAnimated = null;
        animation.AnimationComponentViewLogic.prototype.scalefactor = null;
        animation.AnimationComponentViewLogic.prototype.stage = null;
        animation.AnimationComponentViewLogic.prototype.userData = null;
        animation.AnimationComponentViewLogic.prototype.uiHelper = null;
        animation.AnimationComponentViewLogic.prototype.init = function() {};
        animation.AnimationComponentViewLogic.prototype.show = function() {
            this.container.show();
        };
        animation.AnimationComponentViewLogic.prototype.hide = function() {
            this.container.hide();
        };
        animation.AnimationComponentViewLogic.prototype.action = function(animAction) {
            var _g = animAction.action;
            switch (_g[1]) {
                case 0:
                    this.show();
                    break;
                case 1:
                    this.hide();
                    break;
                case 2:
                    this.handleAdditionalAction(animAction);
                    break;
            }
            uiHelper.ViewBuilderContainerExtension.updateCacheAsBitmap(this.container);
        };
        animation.AnimationComponentViewLogic.prototype.handleAdditionalAction = function(animAction) {};
        animation.AnimationComponentViewLogic.prototype.configure = function(config) {
            this.stage = this.container.getDisplayObject().getParent();
            this.userData = this.uiHelper.getUserDataFromVBContainer(this.container);
        };
        animation.AnimationComponentViewLogic.prototype.__class__ = animation.AnimationComponentViewLogic;
        animation.AnimationForMultiplierValue = function(assetPrefix) {
            this.animations = new _hcmn_.haxe_ds_IntMap();
            this.assetPrefix = assetPrefix;
        };
        animation.AnimationForMultiplierValue.__name__ = ["animation", "AnimationForMultiplierValue"];
        animation.AnimationForMultiplierValue.prototype.assetPrefix = null;
        animation.AnimationForMultiplierValue.prototype.loadedAssets = null;
        animation.AnimationForMultiplierValue.prototype.animations = null;
        animation.AnimationForMultiplierValue.prototype.currentAnimation = null;
        animation.AnimationForMultiplierValue.prototype.parentContainer = null;
        animation.AnimationForMultiplierValue.prototype.loadAssets = function() {
            var _g1 = this;
            var animAssets;
            var _g = [];
            var _g11 = 0;
            var _g2 = animation.AnimationForMultiplierValue.MULTIPLIER_VALUES;
            while (_g11 < _g2.length) {
                var i = _g2[_g11];
                ++_g11;
                _g.push(this.getAssetId(i));
            }
            animAssets = _g;
            var p = animation.ExternalService.assetRegistry.getAssetsContent(animAssets);
            p.then(function(data) {
                _g1.loadedAssets = data;
            });
            return p;
        };
        animation.AnimationForMultiplierValue.prototype.getAssetId = function(multiplier) {
            return this.assetPrefix + multiplier;
        };
        animation.AnimationForMultiplierValue.prototype.init = function(parentContainer) {
            this.parentContainer = parentContainer;
            var vbFactory = animation.ExternalService.viewBuilderFactory;
            var animProvider = new uiHelper.VbAnimationProvider(vbFactory, this.loadedAssets);
            this.initQueue(animation.AnimationForMultiplierValue.MULTIPLIER_VALUES.slice(), animProvider);
        };
        animation.AnimationForMultiplierValue.prototype.initQueue = function(indexes, animProvider) {
            var _g = this;
            var actualIndex = indexes.pop();
            var assetId = this.getAssetId(actualIndex);
            var anim = animProvider.provide(assetId);
            this.addAnimation(actualIndex, anim).then(function(d) {
                if (indexes.length > 0) _g.initQueue(indexes, animProvider);
            });
        };
        animation.AnimationForMultiplierValue.prototype.addAnimation = function(index, animation) {
            var _g = this;
            return new Promise(function(success, fail) {
                _g.parentContainer.addChildComponent(animation, _g.getAssetId(index));
                _g.animations.h[index] = animation;
                _g.play(index);
                animation.getDisplayObject().setAlpha(0.001);
                window.setTimeout(function() {
                    _g.hideCurrent();
                    animation.getDisplayObject().setAlpha(1);
                    success(index);
                }, 100);
            });
        };
        animation.AnimationForMultiplierValue.prototype.play = function(multiplier) {
            this.hideCurrent();
            var anim = this.animations.h[multiplier];
            uiHelper.VBAnimationExtension.gotoAndPlayOnFrame(anim, 0);
            anim.show();
            this.currentAnimation = anim;
        };
        animation.AnimationForMultiplierValue.prototype.hideCurrent = function() {
            if (this.currentAnimation != null) {
                uiHelper.VBAnimationExtension.gotoAndStopOnFrame(this.currentAnimation, 0);
                this.currentAnimation.hide();
            }
            this.currentAnimation = null;
        };
        animation.AnimationForMultiplierValue.prototype.__class__ = animation.AnimationForMultiplierValue;
        animation.BetPanelAdaptorComponent = function(container, scalefactor) {
            animation.AnimationComponentViewLogic.call(this, container, scalefactor);
            this.waitStageIsPresent($bind(this, this.waitBarAndSetRunAdaptaion));
        };
        animation.BetPanelAdaptorComponent.__name__ = ["animation", "BetPanelAdaptorComponent"];
        animation.BetPanelAdaptorComponent.__super__ = animation.AnimationComponentViewLogic;
        for (var k in animation.AnimationComponentViewLogic.prototype) animation.BetPanelAdaptorComponent.prototype[k] = animation.AnimationComponentViewLogic.prototype[k];
        animation.BetPanelAdaptorComponent.prototype.layout = null;
        animation.BetPanelAdaptorComponent.prototype.bleed = null;
        animation.BetPanelAdaptorComponent.prototype.waitStageIsPresent = function(calback) {
            var _g = this;
            commonTools.Await.await(this.getParentIsStageBoolSupplier(), function() {
                calback(_hcmn_.js_Boot.__cast(_g.container.getDisplayObject().getParent(), displayEngineApi.IStage));
            });
        };
        animation.BetPanelAdaptorComponent.prototype.waitBarAndSetRunAdaptaion = function(stage) {
            var _g = this;
            commonTools.Await.await(this.getChildsIsPresentBoolSupplier(stage, ["bp_bar"]), function() {
                _g.adapt(stage.getChildByID("bp_bar"));
            });
        };
        animation.BetPanelAdaptorComponent.prototype.adapt = function(bpBar) {
            var _g = 0;
            var _g1 = bpBar.getChildren();
            while (_g < _g1.length) {
                var child = _g1[_g];
                ++_g;
                var child1 = child;
                if (child1.getName() == "") uiHelper.DisplayObjectExtension.cacheAsBitmap(child1, true);
            }
        };
        animation.BetPanelAdaptorComponent.prototype.getParentIsStageBoolSupplier = function() {
            var _g = this;
            return function() {
                return _hcmn_.Std["is"](_g.container.getDisplayObject().getParent(), displayEngineApi.IStage);
            };
        };
        animation.BetPanelAdaptorComponent.prototype.getChildsIsPresentBoolSupplier = function(stage, childs) {
            var _g = this;
            return function() {
                return _g.isChildsPresent(stage, childs);
            };
        };
        animation.BetPanelAdaptorComponent.prototype.isChildsPresent = function(stage, childs) {
            var _g = 0;
            while (_g < childs.length) {
                var childName = childs[_g];
                ++_g;
                if (stage.getChildByID(childName) == null) return false;
            }
            return true;
        };
        animation.BetPanelAdaptorComponent.prototype.__class__ = animation.BetPanelAdaptorComponent;
        animation.FreeSpinMultiplier = function(container, scalefactor, isAnimated) {
            if (isAnimated == null) isAnimated = true;
            animation.AnimationComponentViewLogic.call(this, container, scalefactor, isAnimated);
            this.animationForMultiplier = new animation.AnimationForMultiplierValue("MULTIPLIER_VB_");
            this.animationForMultiplier.loadAssets().then($bind(this, this.onMultiplierAnimationsLoaded));
        };
        animation.FreeSpinMultiplier.__name__ = ["animation", "FreeSpinMultiplier"];
        animation.FreeSpinMultiplier.__super__ = animation.AnimationComponentViewLogic;
        for (var k in animation.AnimationComponentViewLogic.prototype) animation.FreeSpinMultiplier.prototype[k] = animation.AnimationComponentViewLogic.prototype[k];
        animation.FreeSpinMultiplier.prototype.animationForMultiplier = null;
        animation.FreeSpinMultiplier.prototype.onMultiplierAnimationsLoaded = function(d) {
            var animContainer = this.container.getContainerById("ANIMATION_PLACE");
            this.animationForMultiplier.init(animContainer);
        };
        animation.FreeSpinMultiplier.prototype.hide = function() {
            this.animationForMultiplier.hideCurrent();
            animation.AnimationComponentViewLogic.prototype.hide.call(this);
        };
        animation.FreeSpinMultiplier.prototype.handleAdditionalAction = function(animAction) {
            this.animationForMultiplier.hideCurrent();
            this.show();
            this.animationForMultiplier.play(animAction.data.multiplier);
        };
        animation.FreeSpinMultiplier.prototype.__class__ = animation.FreeSpinMultiplier;
        animation.FreeSpinPanel = function(container, scalefactor, isAnimated) {
            if (isAnimated == null) isAnimated = true;
            animation.AnimationComponentViewLogic.call(this, container, scalefactor, false);
            this.winAmountLabel = this.getLabel("BONUS_WIN", "freespin_panel_win_amount");
            this.spinCounterLabel = this.getLabel("SPINS_PLAYED", "freespin_panel_counter_value");
            this.hide();
        };
        animation.FreeSpinPanel.__name__ = ["animation", "FreeSpinPanel"];
        animation.FreeSpinPanel.__super__ = animation.AnimationComponentViewLogic;
        for (var k in animation.AnimationComponentViewLogic.prototype) animation.FreeSpinPanel.prototype[k] = animation.AnimationComponentViewLogic.prototype[k];
        animation.FreeSpinPanel.prototype.winAmountLabel = null;
        animation.FreeSpinPanel.prototype.spinCounterLabel = null;
        animation.FreeSpinPanel.prototype.getLabel = function(containerId, labelId) {
            var labelContainer = this.container.getContainerById(containerId);
            return labelContainer.getLabelById(labelId);
        };
        animation.FreeSpinPanel.prototype.hide = function() {
            this.winAmountLabel.setText(" ");
            animation.AnimationComponentViewLogic.prototype.hide.call(this);
        };
        animation.FreeSpinPanel.prototype.handleAdditionalAction = function(animAction) {
            var winAmount = animAction.data.winAmount;
            if (winAmount != null) this.winAmountLabel.setText(winAmount);
            var counter = animAction.data.counter;
            if (counter != null) this.spinCounterLabel.setText(counter);
            this.container.getDisplayObject().updateCache();
        };
        animation.FreeSpinPanel.prototype.__class__ = animation.FreeSpinPanel;

        animation.ILayoutUpdatable = function() {}
        animation.ILayoutUpdatable.prototype = {

            updateLayout: function(containerLayout) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            }
        };
        animation.FreeSpinReelFire = function(container, scalefactor, isAnimated) {
            if (isAnimated == null) isAnimated = true;
            animation.AnimationComponentViewLogic.call(this, container, scalefactor, isAnimated);
            this.animContainer = container.getContainerById("ANIMATION_PLACE");
            if (new _hcmn_.EReg("Edge", "").match(window.navigator.userAgent)) this.animationForMultiplier = new animation.EdgeReelFireAnimationForMultiplierValue("reel_fire_config");
            else this.animationForMultiplier = new animation.ReelFireAnimationForMultiplierValue("reel_fire_config");
            this.animationForMultiplier.loadAssets().then($bind(this, this.onAssetsLoadded));
        };
        animation.FreeSpinReelFire = ck_implements(animation.FreeSpinReelFire, animation.ILayoutUpdatable);
        animation.FreeSpinReelFire.__interfaces__ = [animation.ILayoutUpdatable];
        animation.FreeSpinReelFire.__name__ = ["animation", "FreeSpinReelFire"];
        animation.FreeSpinReelFire.__super__ = animation.AnimationComponentViewLogic;
        for (var k in animation.AnimationComponentViewLogic.prototype) animation.FreeSpinReelFire.prototype[k] = animation.AnimationComponentViewLogic.prototype[k];
        animation.FreeSpinReelFire.prototype.animationForMultiplier = null;
        animation.FreeSpinReelFire.prototype.animContainer = null;
        animation.FreeSpinReelFire.prototype.onAssetsLoadded = function(data) {
            this.animationForMultiplier.init(this.animContainer.getDisplayObject());
        };
        animation.FreeSpinReelFire.prototype.hide = function() {
            this.animationForMultiplier.hideCurrent();
            animation.AnimationComponentViewLogic.prototype.hide.call(this);
        };
        animation.FreeSpinReelFire.prototype.handleAdditionalAction = function(animAction) {
            var value;
            if (animAction.data.multiplier == null) value = 0;
            else value = animAction.data.multiplier;
            this.play(value);
        };
        animation.FreeSpinReelFire.prototype.play = function(multiplier) {
            this.hide();
            this.show();
            this.animationForMultiplier.play(multiplier);
        };
        animation.FreeSpinReelFire.prototype.updateLayout = function(layoutPayload) {
            this.animationForMultiplier.updateLayout(layoutPayload);
        };
        animation.FreeSpinReelFire.prototype.__class__ = animation.FreeSpinReelFire;
        animation.LogoComponent = function(container, scalefactor, isAnimated) {
            if (isAnimated == null) isAnimated = true;
            this.playTimeoutId = 0;
            var _g = this;
            animation.AnimationComponentViewLogic.call(this, container, scalefactor, true);
            this.logoheader = container.getVBAnimationById("LOGOHEADER");
            this.logoheader.addEventListener(animation.LogoComponent.ANIMATION_END_EVENT, function() {
                _g.pauseAnimation();
                var timeout = (_hcmn_.Std.random(10) + 5) * 1000;
                _g.playTimeoutId = window.setTimeout($bind(_g, _g.playAnimation), timeout);
            });
            this.playAnimation();
        };
        animation.LogoComponent.__name__ = ["animation", "LogoComponent"];
        animation.LogoComponent.__super__ = animation.AnimationComponentViewLogic;
        for (var k in animation.AnimationComponentViewLogic.prototype) animation.LogoComponent.prototype[k] = animation.AnimationComponentViewLogic.prototype[k];
        animation.LogoComponent.prototype.logoheader = null;
        animation.LogoComponent.prototype.playTimeoutId = null;
        animation.LogoComponent.prototype.handleAdditionalAction = function(animAction) {
            animation.AnimationComponentViewLogic.prototype.handleAdditionalAction.call(this, animAction);
            var _g = animAction.data;
            switch (_g) {
                case "play":
                    this.playAnimation();
                    break;
                case "pause":
                    this.pauseAnimation();
                    break;
            }
        };
        animation.LogoComponent.prototype.playAnimation = function() {
            uiHelper.ViewBuilderContainerExtension.cacheAsBitmap(this.logoheader, false);
            this.logoheader.play(false);
        };
        animation.LogoComponent.prototype.pauseAnimation = function() {
            this.logoheader.gotoAndStop(false, "firstFrame");
            uiHelper.ViewBuilderContainerExtension.cacheAsBitmap(this.logoheader, true);
            window.clearTimeout(this.playTimeoutId);
        };
        animation.LogoComponent.prototype.__class__ = animation.LogoComponent;
        animation.ReelMaskComponent = function(container, scalefactor) {
            animation.AnimationComponentViewLogic.call(this, container, scalefactor);
            this.waitStageIsPresent($bind(this, this.waitReelsAndApplyMasks));
        };
        animation.ReelMaskComponent.__name__ = ["animation", "ReelMaskComponent"];
        animation.ReelMaskComponent.__super__ = animation.AnimationComponentViewLogic;
        for (var k in animation.AnimationComponentViewLogic.prototype) animation.ReelMaskComponent.prototype[k] = animation.AnimationComponentViewLogic.prototype[k];
        animation.ReelMaskComponent.prototype.layout = null;
        animation.ReelMaskComponent.prototype.bleed = null;
        animation.ReelMaskComponent.prototype.waitStageIsPresent = function(calback) {
            var _g = this;
            commonTools.Await.await(this.getParentIsStageBoolSupplier(), function() {
                calback(_hcmn_.js_Boot.__cast(_g.container.getDisplayObject().getParent(), displayEngineApi.IStage));
            });
        };
        animation.ReelMaskComponent.prototype.waitReelsAndApplyMasks = function(stage) {
            var _g = this;
            commonTools.Await.await(this.getChildsIsPresentBoolSupplier(stage, ["layout", "bleed"]), function() {
                _g.layout = stage.getChildByID("layout");
                _g.bleed = stage.getChildByID("bleed");
                animation.ExternalService.loadConfig("reel-config", $bind(_g, _g.applyMasks));
            });
        };
        animation.ReelMaskComponent.prototype.applyMasks = function(data) {
            var mask = data.mask;
            this.uiHelper.addRectMask(this.bleed, mask.width, mask.height, mask.x, mask.y);
            this.uiHelper.addRectMask(this.layout, mask.width, mask.height, mask.x, mask.y);
            uiHelper.DisplayObjectExtension.updateCacheAsBitmap(this.layout);
        };
        animation.ReelMaskComponent.prototype.getParentIsStageBoolSupplier = function() {
            var _g = this;
            return function() {
                return _hcmn_.Std["is"](_g.container.getDisplayObject().getParent(), displayEngineApi.IStage);
            };
        };
        animation.ReelMaskComponent.prototype.getChildsIsPresentBoolSupplier = function(stage, childs) {
            var _g = this;
            return function() {
                return _g.isChildsPresent(stage, childs);
            };
        };
        animation.ReelMaskComponent.prototype.isChildsPresent = function(stage, childs) {
            var _g = 0;
            while (_g < childs.length) {
                var childName = childs[_g];
                ++_g;
                if (stage.getChildByID(childName) == null) return false;
            }
            return true;
        };
        animation.ReelMaskComponent.prototype.__class__ = animation.ReelMaskComponent;

        animation.IAnimationPortSetter = function() {}
        animation.IAnimationPortSetter.prototype = {

            setAnimationPort: function(port) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            }
        };

        animation.IViewBuilderSetter = function() {}
        animation.IViewBuilderSetter.prototype = {

            setViewBuilder: function(value) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            }
        };
        animation.PixiExtension = function() {};
        animation.PixiExtension.__name__ = ["animation", "PixiExtension"];
        animation.PixiExtension.getPixiContainer = function(value) {
            return value._obj;
        };
        animation.PixiExtension.getPixiDisplayObject = function(value) {
            return value._obj;
        };
        animation.PixiExtension.getTransform = function(value) {
            return value.transform;
        };
        animation.PixiExtension.setColor = function(dispayObject, tint, aTint) {
            if (aTint == null) aTint = 0;
            var pixiContainer = animation.PixiExtension.getPixiContainer(dispayObject);
            if (tint >= 0 && aTint >= 0) animation.PixiExtension.setColorTransform(pixiContainer, tint, aTint);
            else pixiContainer.filters = [];
        };
        animation.PixiExtension.setColorTransform = function(dispayObject, tint, aTint) {
            if (aTint == null) aTint = 0;
            var r = tint >> 16 & 255;
            var g = tint >> 8 & 255;
            var b = tint & 255;
            var rA = aTint >> 16 & 255;
            var gA = aTint >> 8 & 255;
            var bA = aTint & 255;
            var filter = animation.PixiExtension.getOrInitColorMatrixFilter(dispayObject);
            filter.reset();
            var matrix = filter.matrix;
            matrix[0] = r / 255;
            matrix[4] = rA / 255;
            matrix[6] = g / 255;
            matrix[9] = gA / 255;
            matrix[12] = b / 255;
            matrix[14] = bA / 255;
        };
        animation.PixiExtension.getOrInitColorMatrixFilter = function(dispayObject) {
            var filter = animation.PixiExtension.getColorMatrixFilter(dispayObject);
            if (filter == null) {
                filter = new PIXI.filters.ColorMatrixFilter();
                dispayObject.filters = [filter];
            }
            return filter;
        };
        animation.PixiExtension.getColorMatrixFilter = function(dispayObject) {
            var filters = dispayObject.filters;
            var filter = null;
            if (filters != null && filters.length > 0) filter = filters.filter(function(f) {
                return _hcmn_.js_Boot.__instanceof(f, PIXI.filters.ColorMatrixFilter);
            })[0];
            return filter;
        };
        animation.PixiExtension.prototype.__class__ = animation.PixiExtension;

        animation.ReelFireAnimation = function() {}
        animation.ReelFireAnimation.prototype = {

            loadAssets: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            init: function(parentContainer) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            play: function(multiplier) {
                return {
                    arguments: ["number"],
                    returns: "void"
                };
            },
            hideCurrent: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            }
        };
        animation.EdgeReelFireAnimationForMultiplierValue = function(configId) {
            this.rainbowScalMagicNumber = 5;
            this.magicNumber = 1.03;
            this.isScaled = false;
            this.intervalId = 0;
            this.configId = configId;
        };
        animation.EdgeReelFireAnimationForMultiplierValue = ck_implements(animation.EdgeReelFireAnimationForMultiplierValue, animation.ReelFireAnimation);
        animation.EdgeReelFireAnimationForMultiplierValue.__interfaces__ = [animation.ReelFireAnimation];
        animation.EdgeReelFireAnimationForMultiplierValue.__name__ = ["animation", "EdgeReelFireAnimationForMultiplierValue"];
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.loadedAssets = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.animation = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.parentContainer = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.scaleFactor = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.config = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.intervalId = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.cells = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.isScaled = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.configId = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.canvas = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.magicNumber = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.rainbowScalMagicNumber = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.mainCanvas = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.containerLayout = null;
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.loadAssets = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                var assetRegistry = animation.ExternalService.assetRegistry;
                assetRegistry.getAssetsContent([_g.configId]).then(function(data) {
                    _g.config = data.get(_g.configId);
                    var textureId = _g.config.animationTexture.textureId;
                    assetRegistry.getAssetsContent([textureId]).then(function(data1) {
                        _g.loadedAssets = data1;
                        _g.scaleFactor = new haxe.ds._StringMap.StringMapIterator(data1, data1.arrayKeys()).next().getConfiguration().scalefactor;
                        resolve(null);
                    });
                });
            });
            return p;
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.init = function(parentContainer) {
            var _g = this;
            this.parentContainer = parentContainer;
            var vbFactory = animation.ExternalService.viewBuilderFactory;
            var animProvider = new uiHelper.VbAnimationProvider(vbFactory, this.loadedAssets);
            this.addAnimation(2, animProvider.provide(this.config.animationTexture.textureId)).then(function(data) {
                var stageName = _g.animation.getDisplayObject().getStageName();
                var displayProvider = animation.ExternalService.displayProvider;
                var stage;
                stage = (function($this) {
                    var $r;
                    var this1 = displayProvider.getStages();
                    $r = this1.get(stageName);
                    return $r;
                }(this));
                var canvas = stage.getCanvas();
                var mainCanvas = displayProvider.getDefaultStage().getCanvas();
                mainCanvas.parentNode.appendChild(canvas);
                var onresize = null;
                _g.canvas = canvas;
                if (_g.containerLayout != null) _g.updateLayout(_g.containerLayout);
            });
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.updateLayout = function(containerLayout) {
            if (this.canvas == null) {
                this.containerLayout = containerLayout;
                return;
            }
            var defaultStage = animation.ExternalService.displayProvider.getDefaultStage();
            var stageName = this.animation.getDisplayObject().getStageName();
            var stage;
            var this1 = animation.ExternalService.displayProvider.getStages();
            stage = this1.get(stageName);
            this.mainCanvas = defaultStage.getCanvas();
            this.mainCanvas.parentNode.appendChild(this.canvas);
            var displayObject = this.animation.getDisplayObject();
            var scale = this.config.animationTexture.scale;
            this.canvas.style.width = _hcmn_.Math.round(this.mainCanvas.width * this.magicNumber) + "px";
            this.canvas.style.height = "";
            this.canvas.style.top = this.mainCanvas.style.top;
            this.canvas.style.left = this.mainCanvas.style.left;
            this.canvas.style.zIndex = this.mainCanvas.style.zIndex + 1;
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.addAnimation = function(index, animation) {
            var _g = this;
            return new Promise(function(success, fail) {
                _g.animation = animation;
                _g.parentContainer.addChild(animation.getDisplayObject());
                animation.getDisplayObject().setName(_g.config.animationTexture.textureId);
                _g.play(index);
                animation.getDisplayObject().setAlpha(0.001);
                window.setTimeout(function() {
                    _g.hideCurrent();
                    animation.getDisplayObject().setAlpha(1);
                    success(index);
                }, 100);
            });
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.play = function(multiplier) {
            this.hideCurrent();
            var scale = this.animation.getDisplayObject().getScaleX();
            var multiplierConfig = this.config.multipliers[multiplier];
            var xOffset = multiplierConfig.xOffset * this.scaleFactor;
            var yOffset = multiplierConfig.yOffset * this.scaleFactor;
            var cutomScaleFactor = 1;
            this.animation.getDisplayObject().setX(xOffset * cutomScaleFactor * this.scaleFactor);
            this.animation.getDisplayObject().setY(yOffset * cutomScaleFactor * this.scaleFactor);
            this.animation.getDisplayObject().setScale(cutomScaleFactor * this.scaleFactor);
            if (this.canvas == null) {
                this.animation.toOffScreen(true);
                var stageName = this.animation.getDisplayObject().getStageName();
                var stage;
                stage = (function($this) {
                    var $r;
                    var this1 = animation.ExternalService.displayProvider.getStages();
                    $r = this1.get(stageName);
                    return $r;
                }(this));
                this.canvas = stage.getCanvas();
            }
            this.canvas.style.display = "block";
            uiHelper.OffScreenVBAnimationExtension.gotoAndPlayOnFrame(this.animation, 0);
            this.animation.show();
            if (!this.isScaled) {
                this.parentContainer.setX(-xOffset / this.scaleFactor);
                this.parentContainer.setY(-yOffset / this.scaleFactor);
                this.parentContainer.setScale(scale / (cutomScaleFactor * this.scaleFactor));
                this.isScaled = true;
            }
            if (multiplierConfig.isRainbow) this.startRainbow(this.config.rainbowTexture);
            else {
                this.stopRainbow();
                this.adjustAnimationView(multiplierConfig);
            }
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.adjustAnimationView = function(multiplierConfig) {
            var displayObject = this.animation.getDisplayObject();
            var tint = _hcmn_.Std.parseInt(multiplierConfig.tint);
            var aTint = _hcmn_.Std.parseInt(multiplierConfig.aTint);
            animation.PixiExtension.setColor(displayObject, tint, aTint);
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.hideCurrent = function() {
            uiHelper.OffScreenVBAnimationExtension.gotoAndStopOnFrame(this.animation, 0);
            this.animation.hide();
            if (this.canvas != null) this.canvas.style.display = "none";
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.stopRainbow = function() {
            window.clearInterval(this.intervalId);
            var pixiContainer = animation.PixiExtension.getPixiContainer(this.animation.getDisplayObject());
            pixiContainer.filters = [];
            if (this.cells != null) {
                this.cells.mask = null;
                pixiContainer.alpha = 1.0;
                pixiContainer.parent.removeChild(this.cells);
            }
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.startRainbow = function(textureConfig) {
            var fire = this;
            var pixiContainer = animation.PixiExtension.getPixiContainer(this.animation.getDisplayObject());
            if (this.cells != null) pixiContainer.parent.removeChild(this.cells);
            var imageUrl = animation.ExternalService.assetRegistry.getAsset(textureConfig.textureId).getUrl();
            if (this.cells == null) {
                this.cells = PIXI.Sprite.fromImage(imageUrl);
                this.cells.scale.set(this.rainbowScalMagicNumber, this.rainbowScalMagicNumber);
            }
            animation.PixiExtension.getOrInitColorMatrixFilter(this.cells).contrast(textureConfig.contrast, false);
            this.cells.visible = false;
            pixiContainer.parent.addChild(this.cells);
            window.clearInterval(this.intervalId);
            var count = 0.0;
            var timeout = _hcmn_.Math.round(1000 / textureConfig.fps);
            var rainbowTextureDrawer = this.getDrawerOfRainbowTexture(textureConfig, pixiContainer);
            this.intervalId = window.setInterval(rainbowTextureDrawer, timeout);
            pixiContainer.visible = false;
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.getDrawerOfRainbowTexture = function(textureConfig, pixiContainer) {
            var _g = this;
            var previousDate = new _hcmn_.Date().getTime();
            var count = 0;
            return function() {
                var currentDate = new _hcmn_.Date().getTime();
                var dt = currentDate - previousDate;
                var precision = dt / 1000;
                _g.drawRainbowTexture(dt, precision, count, textureConfig, pixiContainer);
                count += textureConfig.horizontalSpeed * precision;
                previousDate = currentDate;
            };
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.drawRainbowTexture = function(dt, precision, count, textureConfig, pixiContainer) {
            var transform = animation.PixiExtension.getTransform(this.cells);
            var horizontalRange = textureConfig.horizontalRange;
            transform.position.y -= textureConfig.verticalSpeed * this.cells.scale.y * precision;
            transform.position.x = _hcmn_.Math.sin(count) * horizontalRange - horizontalRange;
            count += textureConfig.horizontalSpeed * precision;
            if (transform.position.y < -this.cells.height / 2) transform.position.y = 0;
            var pchildren = pixiContainer.children;
            var _g = 0;
            while (_g < pchildren.length) {
                var pchild = pchildren[_g];
                ++_g;
                if (!pchild.visible) continue;
                var children = pchild.children;
                var _g1 = 0;
                while (_g1 < children.length) {
                    var child = children[_g1];
                    ++_g1;
                    if (child.visible) {
                        pixiContainer.updateTransform();
                        this.cells.mask = child;
                        this.cells.visible = true;
                        return;
                    }
                }
            }
        };
        animation.EdgeReelFireAnimationForMultiplierValue.prototype.__class__ = animation.EdgeReelFireAnimationForMultiplierValue;
        animation.ReelFireAnimationForMultiplierValue = function(configId) {
            this.isScaled = false;
            this.intervalId = 0;
            this.configId = configId;
        };
        animation.ReelFireAnimationForMultiplierValue = ck_implements(animation.ReelFireAnimationForMultiplierValue, animation.ReelFireAnimation);
        animation.ReelFireAnimationForMultiplierValue.__interfaces__ = [animation.ReelFireAnimation];
        animation.ReelFireAnimationForMultiplierValue.__name__ = ["animation", "ReelFireAnimationForMultiplierValue"];
        animation.ReelFireAnimationForMultiplierValue.prototype.loadedAssets = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.animation = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.parentContainer = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.scaleFactor = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.config = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.intervalId = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.cells = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.isScaled = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.configId = null;
        animation.ReelFireAnimationForMultiplierValue.prototype.loadAssets = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                var assetRegistry = animation.ExternalService.assetRegistry;
                assetRegistry.getAssetsContent([_g.configId]).then(function(data) {
                    _g.config = data.get(_g.configId);
                    var textureId = _g.config.animationTexture.textureId;
                    assetRegistry.getAssetsContent([textureId]).then(function(data1) {
                        _g.loadedAssets = data1;
                        _g.scaleFactor = new haxe.ds._StringMap.StringMapIterator(data1, data1.arrayKeys()).next().getConfiguration().scalefactor;
                        resolve(null);
                    });
                });
            });
            return p;
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.init = function(parentContainer) {
            this.parentContainer = parentContainer;
            var vbFactory = animation.ExternalService.viewBuilderFactory;
            var animProvider = new uiHelper.VbAnimationProvider(vbFactory, this.loadedAssets);
            this.addAnimation(2, animProvider.provide(this.config.animationTexture.textureId));
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.addAnimation = function(index, animation) {
            var _g = this;
            return new Promise(function(success, fail) {
                _g.animation = animation;
                _g.parentContainer.addChild(animation.getDisplayObject());
                animation.getDisplayObject().setName(_g.config.animationTexture.textureId);
                _g.play(index);
                animation.getDisplayObject().setAlpha(0.001);
                window.setTimeout(function() {
                    _g.hideCurrent();
                    animation.getDisplayObject().setAlpha(1);
                    success(index);
                }, 100);
            });
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.updateLayout = function(containerLayout) {};
        animation.ReelFireAnimationForMultiplierValue.prototype.play = function(multiplier) {
            this.hideCurrent();
            var scale = this.animation.getDisplayObject().getScaleX();
            var multiplierConfig = this.config.multipliers[multiplier];
            var xOffset = multiplierConfig.xOffset * this.scaleFactor;
            var yOffset = multiplierConfig.yOffset * this.scaleFactor;
            var cutomScaleFactor = this.config.animationTexture.scale;
            this.animation.getDisplayObject().setX(xOffset * cutomScaleFactor * this.scaleFactor);
            this.animation.getDisplayObject().setY(yOffset * cutomScaleFactor * this.scaleFactor);
            this.animation.getDisplayObject().setScale(cutomScaleFactor * this.scaleFactor);
            this.animation.toOffScreen(true);
            uiHelper.OffScreenVBAnimationExtension.gotoAndPlayOnFrame(this.animation, 0);
            this.animation.show();
            if (!this.isScaled) {
                this.parentContainer.setX(-xOffset / this.scaleFactor);
                this.parentContainer.setY(-yOffset / this.scaleFactor);
                this.parentContainer.setScale(scale / (cutomScaleFactor * this.scaleFactor));
                this.isScaled = true;
            }
            if (multiplierConfig.isRainbow) this.startRainbow(this.config.rainbowTexture);
            else {
                this.stopRainbow();
                this.adjustAnimationView(multiplierConfig);
            }
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.adjustAnimationView = function(multiplierConfig) {
            var displayObject = this.animation.getDisplayObject();
            var tint = _hcmn_.Std.parseInt(multiplierConfig.tint);
            var aTint = _hcmn_.Std.parseInt(multiplierConfig.aTint);
            animation.PixiExtension.setColor(displayObject, tint, aTint);
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.hideCurrent = function() {
            uiHelper.OffScreenVBAnimationExtension.gotoAndStopOnFrame(this.animation, 0);
            this.animation.hide();
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.stopRainbow = function() {
            window.clearInterval(this.intervalId);
            var pixiContainer = animation.PixiExtension.getPixiContainer(this.animation.getDisplayObject());
            pixiContainer.filters = [];
            if (this.cells != null) {
                this.cells.mask = null;
                pixiContainer.alpha = 1.0;
                pixiContainer.parent.removeChild(this.cells);
            }
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.startRainbow = function(textureConfig) {
            var fire = this;
            var pixiContainer = animation.PixiExtension.getPixiContainer(this.animation.getDisplayObject());
            if (this.cells != null) pixiContainer.parent.removeChild(this.cells);
            var imageUrl = animation.ExternalService.assetRegistry.getAsset(textureConfig.textureId).getUrl();
            if (this.cells == null) {
                this.cells = PIXI.Sprite.fromImage(imageUrl);
                this.cells.scale.set(textureConfig.scale, textureConfig.scale);
            }
            animation.PixiExtension.getOrInitColorMatrixFilter(this.cells).contrast(textureConfig.contrast, false);
            this.cells.visible = false;
            pixiContainer.parent.addChild(this.cells);
            window.clearInterval(this.intervalId);
            var count = 0.0;
            var timeout = _hcmn_.Math.round(1000 / textureConfig.fps);
            var rainbowTextureDrawer = this.getDrawerOfRainbowTexture(textureConfig, pixiContainer);
            this.intervalId = window.setInterval(rainbowTextureDrawer, timeout);
            pixiContainer.visible = false;
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.getDrawerOfRainbowTexture = function(textureConfig, pixiContainer) {
            var _g = this;
            var previousDate = new _hcmn_.Date().getTime();
            var count = 0;
            return function() {
                var currentDate = new _hcmn_.Date().getTime();
                var dt = currentDate - previousDate;
                var precision = dt / 1000;
                _g.drawRainbowTexture(dt, precision, count, textureConfig, pixiContainer);
                count += textureConfig.horizontalSpeed * precision;
                previousDate = currentDate;
            };
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.drawRainbowTexture = function(dt, precision, count, textureConfig, pixiContainer) {
            var transform = animation.PixiExtension.getTransform(this.cells);
            var horizontalRange = textureConfig.horizontalRange;
            transform.position.y -= textureConfig.verticalSpeed * this.cells.scale.y * precision;
            transform.position.x = _hcmn_.Math.sin(count) * horizontalRange - horizontalRange;
            count += textureConfig.horizontalSpeed * precision;
            if (transform.position.y < -this.cells.height / 2) transform.position.y = 0;
            var pchildren = pixiContainer.children;
            var _g = 0;
            while (_g < pchildren.length) {
                var pchild = pchildren[_g];
                ++_g;
                if (!pchild.visible) continue;
                var children = pchild.children;
                var _g1 = 0;
                while (_g1 < children.length) {
                    var child = children[_g1];
                    ++_g1;
                    if (child.visible) {
                        pixiContainer.updateTransform();
                        this.cells.mask = child;
                        this.cells.visible = true;
                        return;
                    }
                }
            }
        };
        animation.ReelFireAnimationForMultiplierValue.prototype.__class__ = animation.ReelFireAnimationForMultiplierValue;
        animation.AnimationParticleSimulator = function(container, animationPool, particleConfig) {
            this.container = container;
            this.range = particleConfig.spawn.positionRange;
            this.animationPool = animationPool;
            this.particleConfig = particleConfig;
        };
        animation.AnimationParticleSimulator.__name__ = ["animation", "AnimationParticleSimulator"];
        animation.AnimationParticleSimulator.prototype.container = null;
        animation.AnimationParticleSimulator.prototype.range = null;
        animation.AnimationParticleSimulator.prototype.animationPool = null;
        animation.AnimationParticleSimulator.prototype.particleConfig = null;
        animation.AnimationParticleSimulator.prototype.intervalId = null;
        animation.AnimationParticleSimulator.prototype.rangeZone = null;
        animation.AnimationParticleSimulator.prototype.run = function() {
            var _g = this;
            window.clearInterval(this.intervalId);
            this.drawSpawnRangeZone();
            this.intervalId = window.setInterval(function() {
                var animation = _g.particleConfig.animation;
                var explosionAnimation = _g.animationPool.getAnimationFromPool(animation.assetId);
                var displayObject = explosionAnimation.getDisplayObject();
                _g.container.addChild(displayObject);
                explosionAnimation.show();
                explosionAnimation.gotoAndPlay(false, "loop");
                var rangeOfScale = _g.calculateRangeValue(animation.scale, _g.particleConfig.spawn.scaleRange);
                var rangeOffsetX = _g.calculateRangeValue(animation.offsetX, _g.range.x);
                var rangeOffsetY = _g.calculateRangeValue(animation.offsetY, _g.range.y);
                var rangeOfRotation = _g.calculateRangeValue(animation.rotation, _g.particleConfig.spawn.rotationRange);
                displayObject.setScale(rangeOfScale);
                displayObject.setX((rangeOffsetX | 0) - displayObject.getWidth() / 2);
                displayObject.setY((rangeOffsetY | 0) - displayObject.getHeight() / 2);
                displayObject.setRotation(rangeOfRotation);
                displayObject.setAlpha(animation.alpha);
                if (animation.sendToBottom) displayObject.sendToBottom();
                else if (animation.bringToTop) displayObject.bringToTop();
                explosionAnimation.addEventListener(animation.stopEvent, function() {
                    _g.animationPool.backAnimationToPool(animation.assetId, explosionAnimation);
                });
            }, this.particleConfig.spawn.interval);
        };
        animation.AnimationParticleSimulator.prototype.calculateRangeValue = function(initialValue, range) {
            return initialValue + _hcmn_.Math.random() * (range * 2) - range;
        };
        animation.AnimationParticleSimulator.prototype.stop = function() {
            window.clearInterval(this.intervalId);
            if (this.rangeZone != null) this.container.removeChild(this.rangeZone);
        };
        animation.AnimationParticleSimulator.prototype.drawSpawnRangeZone = function() {
            if (this.particleConfig.spawn.showRange) {
                var drawer = animation.ExternalService.uiHelper.getGraphicsDrawer();
                var range = this.particleConfig.spawn.positionRange;
                var x = this.particleConfig.animation.offsetX;
                var y = this.particleConfig.animation.offsetY;
                this.rangeZone = drawer.addRoundRect(x - range.x, y - range.y, range.x * 2, range.y * 2, 5).withFillStyle(16711680, .5).draw();
                this.container.addChild(this.rangeZone);
            }
        };
        animation.AnimationParticleSimulator.prototype.__class__ = animation.AnimationParticleSimulator;
        animation.AnimationParticlesRunner = function(animationPool) {
            this.particles = [];
            this.animationPool = animationPool;
        };
        animation.AnimationParticlesRunner.__name__ = ["animation", "AnimationParticlesRunner"];
        animation.AnimationParticlesRunner.prototype.particles = null;
        animation.AnimationParticlesRunner.prototype.animationPool = null;
        animation.AnimationParticlesRunner.prototype.run = function(container, particles) {
            var _g = 0;
            while (_g < particles.length) {
                var particle = particles[_g];
                ++_g;
                var particle1 = new animation.AnimationParticleSimulator(container, this.animationPool, particle);
                particle1.run();
                this.particles.push(particle1);
            }
        };
        animation.AnimationParticlesRunner.prototype.stop = function() {
            var _g = 0;
            var _g1 = this.particles;
            while (_g < _g1.length) {
                var particle = _g1[_g];
                ++_g;
                particle.stop();
            }
            this.particles = [];
        };
        animation.AnimationParticlesRunner.prototype.__class__ = animation.AnimationParticlesRunner;
        animation.WinMetterComponent = function(container, scalefactor, isAnimated) {
            this.backgroundAnimations = [];
            animation.AnimationComponentViewLogic.call(this, container, scalefactor, isAnimated);
        };
        animation.WinMetterComponent.__name__ = ["animation", "WinMetterComponent"];
        animation.WinMetterComponent.__super__ = animation.AnimationComponentViewLogic;
        for (var k in animation.AnimationComponentViewLogic.prototype) animation.WinMetterComponent.prototype[k] = animation.AnimationComponentViewLogic.prototype[k];
        animation.WinMetterComponent.prototype.winMeterControl = null;
        animation.WinMetterComponent.prototype.backgroundAnimations = null;
        animation.WinMetterComponent.prototype.config = null;
        animation.WinMetterComponent.prototype.animationPool = null;
        animation.WinMetterComponent.prototype.bigWinLabel = null;
        animation.WinMetterComponent.prototype.particlesRunner = null;
        animation.WinMetterComponent.prototype.loadedAssets = null;
        animation.WinMetterComponent.prototype.currentWinMeterPayload = null;
        animation.WinMetterComponent.prototype.init = function() {
            var _g = this;
            animation.AnimationComponentViewLogic.prototype.init.call(this);
            this.winMeterControl.onBigAnimationStart($bind(this, this.onBigAnimationStart));
            this.winMeterControl.onDisplayWinFinished($bind(this, this.onFinished));
            this.winMeterControl.onMediumAnimationStart($bind(this, this.onMediumAnimationStart));
            this.winMeterControl.getImplemetationControl().onDisplayWin($bind(this, this.onDisplayWin));
            this.winMeterControl.getImplemetationControl().onShowMessage($bind(this, this.onShowMessage));
            animation.ExternalService.loadConfig("winmeter-assets/winmeter_definition_config.json", function(config) {
                _g.config = config;
                _g.loadAssets();
            });
        };
        animation.WinMetterComponent.prototype.loadAssets = function() {
            var _g = this;
            animation.ExternalService.load(this.config.tier.assetsToLoad, function(loadedAssets) {
                _g.loadedAssets = loadedAssets;
                _g.crateAnimationPool(loadedAssets);
                _g.createBigWinLabel();
                _g.runInitializingCache();
                _g.particlesRunner = new animation.AnimationParticlesRunner(_g.animationPool);
            });
        };
        animation.WinMetterComponent.prototype.runInitializingCache = function() {
            var _g1 = this;
            var uniqueBackgroundAnimations = [];
            var _g = 0;
            var _g11 = this.config.tier.decorations;
            while (_g < _g11.length) {
                var decoration = _g11[_g];
                ++_g;
                var _g2 = 0;
                var _g3 = decoration.backgroundAnimations;
                while (_g2 < _g3.length) {
                    var backgroundAnimation = _g3[_g2];
                    ++_g2;
                    if (_hcmn_.HxOverrides.indexOf(uniqueBackgroundAnimations, backgroundAnimation.assetId, 0) == -1) uniqueBackgroundAnimations.push(backgroundAnimation.assetId);
                }
            }
            var stage = animation.ExternalService.displayProvider.getDefaultStage();
            var _g4 = 0;
            while (_g4 < uniqueBackgroundAnimations.length) {
                var backgroundAnimation1 = [uniqueBackgroundAnimations[_g4]];
                ++_g4;
                var animationFromPool = [this.animationPool.getAnimationFromPool(backgroundAnimation1[0])];
                animationFromPool[0].getDisplayObject().setAlpha(0.001);
                stage.addChild(animationFromPool[0].getDisplayObject());
                animationFromPool[0].play(false);
                window.setTimeout((function(animationFromPool, backgroundAnimation1) {
                    return function() {
                        animationFromPool[0].stop();
                        animationFromPool[0].getDisplayObject().setAlpha(1);
                        _g1.animationPool.backAnimationToPool(backgroundAnimation1[0], animationFromPool[0]);
                        stage.removeChild(animationFromPool[0].getDisplayObject());
                    };
                })(animationFromPool, backgroundAnimation1), 1000);
            }
        };
        animation.WinMetterComponent.prototype.crateAnimationPool = function(loadedAssets) {
            var viewBuilderFactory = animation.ExternalService.viewBuilderFactory;
            var vBAnimationProvider = new uiHelper.VbAnimationProvider(viewBuilderFactory, loadedAssets);
            var autogenAnimatioPool = new uiHelper.AutogenAnimationPool(vBAnimationProvider);
            this.animationPool = new uiHelper.AnimationPool(autogenAnimatioPool);
        };
        animation.WinMetterComponent.prototype.createBigWinLabel = function() {
            if (this.bigWinLabel == null) {
                var viewBuilderFactory = animation.ExternalService.viewBuilderFactory;
                var viewBuilderContainerProvider = new uiHelper.ViewBuilderContainerProvider(viewBuilderFactory, this.loadedAssets);
                var textContainer = viewBuilderContainerProvider.provide("textContainer");
                var textFieldContainer = textContainer.getContainerById("text_field_container");
                this.bigWinLabel = textFieldContainer.getLabelById("text_field");
            }
        };
        animation.WinMetterComponent.prototype.onShowMessage = function(message) {
            this.stop();
        };
        animation.WinMetterComponent.prototype.onDisplayWin = function(payload) {
            this.currentWinMeterPayload = payload;
            this.stop();
        };
        animation.WinMetterComponent.prototype.onFinished = function(e) {
            this.stop();
        };
        animation.WinMetterComponent.prototype.stop = function() {
            var _g = 0;
            var _g1 = this.backgroundAnimations;
            while (_g < _g1.length) {
                var anim = _g1[_g];
                ++_g;
                this.backAnimationToPool(anim);
            }
            this.backgroundAnimations = [];
            this.stopParticlesIfPresents();
            commonTools.TimeoutInvoker.clearTimeouts("showParticlesTimeOutGroupId");
        };
        animation.WinMetterComponent.prototype.stopParticlesIfPresents = function() {
            this.particlesRunner.stop();
        };
        animation.WinMetterComponent.prototype.onMediumAnimationStart = function(e) {
            var container = e.getPayload();
            this.showAnimationStart(container, this.config.win_mapping.MEDIUM);
        };
        animation.WinMetterComponent.prototype.onBigAnimationStart = function(e) {
            var container = e.getPayload();
            this.showAnimationStart(container, this.config.win_mapping.BIG);
        };
        animation.WinMetterComponent.prototype.showAnimationStart = function(container, winMap) {
            var winSegments = this.currentWinMeterPayload.winSegments.filter(function(w) {
                return _hcmn_.HxOverrides.indexOf(winMap, w.winGroup, 0) >= 0;
            });
            var tierDecoration = this.config.tier.decorations.filter(function(d) {
                return _hcmn_.HxOverrides.indexOf(d.ids, winSegments[0].winGroup, 0) >= 0;
            })[0];
            this.showNextTier(container, tierDecoration);
            var _g = 0;
            var _g1 = winSegments.slice(1);
            while (_g < _g1.length) {
                var winSegment = [_g1[_g]];
                ++_g;
                tierDecoration = this.config.tier.decorations.filter((function(winSegment) {
                    return function(d1) {
                        return _hcmn_.HxOverrides.indexOf(d1.ids, winSegment[0].winGroup, 0) >= 0;
                    };
                })(winSegment))[0];
                var delay = this.getTierCounterProperties(winSegment[0].winGroup - 1).time;
                commonTools.TimeoutInvoker.setTimeout("showParticlesTimeOutGroupId", ((function() {
                    return function(f, a1, a2) {
                        return (function() {
                            return function() {
                                f(a1, a2);
                            };
                        })();
                    };
                })())($bind(this, this.showNextTier), container, tierDecoration), delay);
            }
        };
        animation.WinMetterComponent.prototype.showNextTier = function(container, tierDecoration) {
            this.showLabel(container, tierDecoration);
            this.showBackground(container, tierDecoration);
            this.showParticle(container, tierDecoration);
        };
        animation.WinMetterComponent.prototype.showLabel = function(container, tierDecoration) {
            container.addChild(this.bigWinLabel.getDisplayObject());
            this.adjustLabelConfiguration(this.bigWinLabel, tierDecoration.textContainer);
        };
        animation.WinMetterComponent.prototype.showBackground = function(container, tierDecoration) {
            var _g = 0;
            var _g1 = this.backgroundAnimations;
            while (_g < _g1.length) {
                var anim = _g1[_g];
                ++_g;
                this.backAnimationToPool(anim);
            }
            this.backgroundAnimations = [];
            if (tierDecoration.backgroundAnimations != null) {
                var _g2 = 0;
                var _g11 = tierDecoration.backgroundAnimations;
                while (_g2 < _g11.length) {
                    var animationEntry = _g11[_g2];
                    ++_g2;
                    var animation = this.animationPool.getAnimationFromPool(animationEntry.assetId);
                    container.addChild(animation.getDisplayObject());
                    this.adjustAnimPositions(animation, animationEntry);
                    this.backgroundAnimations.push(animation);
                }
            }
        };
        animation.WinMetterComponent.prototype.showParticle = function(container, tierDecoration) {
            this.stopParticlesIfPresents();
            this.particlesRunner.run(container, tierDecoration.particles);
        };
        animation.WinMetterComponent.prototype.adjustLabelConfiguration = function(text, animConfig) {
            text.getDisplayObject().setX(animConfig.offsetX);
            text.getDisplayObject().setY(animConfig.offsetY);
            text.getDisplayObject().setRotation(animConfig.rotation);
            text.setText(animation.ExternalService.translationManager.stringLookup(animConfig.translationTextId));
            this.applyStyle(text, animConfig.textStyle);
        };
        animation.WinMetterComponent.prototype.applyStyle = function(text, textStyle) {
            var styleTable;
            var this1 = animation.ExternalService.translationManager.getStyleTables();
            styleTable = this1.get("styletable_json");
            var style = styleTable.getAttributes(textStyle);
            var extendStyle = style.extendStyle;
            if (extendStyle != null) this.applyStyle(text, extendStyle);
            text.updateTo(null, style);
        };
        animation.WinMetterComponent.prototype.backAnimationToPool = function(animation) {
            if (animation != null) {
                var id = animation.getDisplayObject().getId();
                this.animationPool.backAnimationToPool(id, animation);
                animation = null;
            }
        };
        animation.WinMetterComponent.prototype.adjustAnimPositions = function(anim, animConfig) {
            var displayObject = anim.getDisplayObject();
            anim.show();
            anim.gotoAndPlay(false, "loop");
            displayObject.setX(animConfig.offsetX);
            displayObject.setY(animConfig.offsetY);
            displayObject.setScale(animConfig.scale / this.scalefactor);
            displayObject.setRotation(animConfig.rotation);
            displayObject.setAlpha(animConfig.alpha);
            if (animConfig.sendToBottom) displayObject.sendToBottom();
            else if (animConfig.bringToTop) displayObject.bringToTop();
        };
        animation.WinMetterComponent.prototype.getTierCounterProperties = function(tierId) {
            return this.config.counter_properties.filter(function(t) {
                return t.id == tierId;
            })[0];
        };
        animation.WinMetterComponent.prototype.__class__ = animation.WinMetterComponent;
        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 (!haxe.ds._StringMap) {
            haxe.ds._StringMap = {};
        };
        haxe.ds._StringMap.StringMapIterator = function(map, keys) {
            this.map = map;
            this.keys = keys;
            this.index = 0;
            this.count = keys.length;
        };
        haxe.ds._StringMap.StringMapIterator.__name__ = ["haxe", "ds", "_StringMap", "StringMapIterator"];
        haxe.ds._StringMap.StringMapIterator.prototype.map = null;
        haxe.ds._StringMap.StringMapIterator.prototype.keys = null;
        haxe.ds._StringMap.StringMapIterator.prototype.index = null;
        haxe.ds._StringMap.StringMapIterator.prototype.count = null;
        haxe.ds._StringMap.StringMapIterator.prototype.hasNext = function() {
            return this.index < this.count;
        };
        haxe.ds._StringMap.StringMapIterator.prototype.next = function() {
            return this.map.get(this.keys[this.index++]);
        };
        haxe.ds._StringMap.StringMapIterator.prototype.__class__ = haxe.ds._StringMap.StringMapIterator;
        if (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 PIXI == 'undefined') {
            var PIXI = {};
        };

        PIXI.CurrentState = function() {}
        PIXI.CurrentState.prototype = {

        };
        animation.Animation.COMPONENTS = new haxe.ds.EnumValueMap();;
        animation.ExternalService.loadedAssets = new _hcmn_.haxe_ds_StringMap();;
        animation.AnimationForMultiplierValue.MULTIPLIER_VALUES = (function($this) {
            var $r;
            var _g = []; {
                var _g1 = 2;
                while (_g1 < 8) {
                    var i = _g1++;
                    _g.push(i);
                }
            }
            $r = _g;
            return $r;
        }(this));;
        animation.LogoComponent.ANIMATION_END_EVENT = "ANIMATION::end";;
        animation.WinMetterComponent.TIMEOUT_GROUP = "showParticlesTimeOutGroupId";;
        animation.WinMetterComponent.CONFIG_ID = "winmeter-assets/winmeter_definition_config.json";;
        return {
            exports: animation,
            activator: animation.Activator
        };
    });