define("tripleRedHotSevensIXFTutorial", ["tripleRedHotSevensIXFTutorialApi", "viewBuilderApi", "commonControls", "componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "slotModelApi", "uiHelper", "displayEngineApi", "winControllerApi", "reelsApi", "commonTools", "displayEngineUtils", "gameLayoutApi", "PIXI", "BABYLON", "clientkernelEventbusApi", "clientkernelModulesApi", "moneyApi"],
    function(tripleRedHotSevensIXFTutorialApi, viewBuilderApi, commonControls, componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, slotModelApi, uiHelper, displayEngineApi, winControllerApi, reelsApi, commonTools, displayEngineUtils, gameLayoutApi, PIXI, BABYLON, clientkernelEventbusApi, clientkernelModulesApi, moneyApi) {
        "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 tripleRedHotSevensIXFTutorial == 'undefined') {
            var tripleRedHotSevensIXFTutorial = {};
        };
        tripleRedHotSevensIXFTutorial.Activator = function(context) {};
        tripleRedHotSevensIXFTutorial.Activator = ck_implements(tripleRedHotSevensIXFTutorial.Activator, clientkernelModulesApi.IModuleActivator);
        tripleRedHotSevensIXFTutorial.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        tripleRedHotSevensIXFTutorial.Activator.__name__ = ["tripleRedHotSevensIXFTutorial", "Activator"];
        tripleRedHotSevensIXFTutorial.Activator.prototype.start = function(context) {
            context.getServiceTracker([clientkernelLoaderApi.IAssetRegistry, viewBuilderApi.IViewBuilderFactory, displayEngineApi.IDisplayProvider, translationmanagerApi.ITranslationManager, moneyApi.IMoneyFormatter]).then(function(context1) {
                tripleRedHotSevensIXFTutorial.ExternalService.initialize(context1);
                context1.registerService(new tripleRedHotSevensIXFTutorial.TutorialFactory(context1), tripleRedHotSevensIXFTutorialApi.TutorialDeclaration, null);
            });
        };
        tripleRedHotSevensIXFTutorial.Activator.prototype.stop = function(context) {};
        tripleRedHotSevensIXFTutorial.Activator.main = function() {};
        tripleRedHotSevensIXFTutorial.Activator.prototype.__class__ = tripleRedHotSevensIXFTutorial.Activator;
        tripleRedHotSevensIXFTutorial.ExternalService = function() {};
        tripleRedHotSevensIXFTutorial.ExternalService.__name__ = ["tripleRedHotSevensIXFTutorial", "ExternalService"];
        tripleRedHotSevensIXFTutorial.ExternalService.assetRegistry = null;
        tripleRedHotSevensIXFTutorial.ExternalService.viewBuilderFactory = null;
        tripleRedHotSevensIXFTutorial.ExternalService.displayProvider = null;
        tripleRedHotSevensIXFTutorial.ExternalService.bus = null;
        tripleRedHotSevensIXFTutorial.ExternalService.uiHelper = null;
        tripleRedHotSevensIXFTutorial.ExternalService.busChanel = null;
        tripleRedHotSevensIXFTutorial.ExternalService.initialize = function(context) {
            tripleRedHotSevensIXFTutorial.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            tripleRedHotSevensIXFTutorial.ExternalService.viewBuilderFactory = context.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
            tripleRedHotSevensIXFTutorial.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            tripleRedHotSevensIXFTutorial.ExternalService.bus = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
            tripleRedHotSevensIXFTutorial.ExternalService.uiHelper = uiHelper.UiHelper.getUiHelper(tripleRedHotSevensIXFTutorial.ExternalService.displayProvider);
            tripleRedHotSevensIXFTutorial.ExternalService.busChanel = tripleRedHotSevensIXFTutorial.ExternalService.bus.getChannel("GFBus");
        };
        tripleRedHotSevensIXFTutorial.ExternalService.getAsset = function(id) {
            return tripleRedHotSevensIXFTutorial.ExternalService.assetRegistry.getAsset(id).getContent();
        };
        tripleRedHotSevensIXFTutorial.ExternalService.prototype.__class__ = tripleRedHotSevensIXFTutorial.ExternalService;
        tripleRedHotSevensIXFTutorial.Tutorial = function(context) {
            this.initialized = false;
            var _g = this;
            this.context = context;
            this.controller = new tripleRedHotSevensIXFTutorial.TutorialController(context);
            this.layoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.onUpdateLayout));
            var assetsList = [];
            assetsList.push("tutorial-assets/" + "tutorial.viewbuilder.json");
            assetsList.push("tutorial-assets/" + "tutorial_animation.viewbuilder.json");
            assetsList.push("tutorial-assets/" + "tutorial-configuration.json");
            tripleRedHotSevensIXFTutorial.ExternalService.assetRegistry.getAssetsContent(assetsList).then(function(data) {
                tripleRedHotSevensIXFTutorial.ExternalService.loadedAssets = data;
                tripleRedHotSevensIXFTutorial.TutorialConfig.init(tripleRedHotSevensIXFTutorial.ExternalService.loadedAssets.get("tutorial-configuration.json"));
                _g.vba = tripleRedHotSevensIXFTutorial.ExternalService.loadedAssets.get("tutorial.viewbuilder.json");
                _g.initialize();
            });
        };
        tripleRedHotSevensIXFTutorial.Tutorial.__name__ = ["tripleRedHotSevensIXFTutorial", "Tutorial"];
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.context = null;
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.layoutPort = null;
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.layoutPayload = null;
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.initialized = null;
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.vba = null;
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.controller = null;
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.onUpdateLayout = function(e) {
            this.layoutPayload = e.getPayload();
            if (!this.initialized) this.initialize();
            else this.updateLayout();
        };
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.updateLayout = function() {
            this.controller.updateLayout(this.layoutPayload);
            this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
        };
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.initialize = function() {
            if (this.layoutPayload != null && this.vba != null) {
                this.initialized = true;
                var view = tripleRedHotSevensIXFTutorial.ExternalService.viewBuilderFactory.createView(this.vba);
                this.controller.init(view);
                this.updateLayout();
            }
        };
        tripleRedHotSevensIXFTutorial.Tutorial.prototype.__class__ = tripleRedHotSevensIXFTutorial.Tutorial;
        tripleRedHotSevensIXFTutorial.TutorialFactory = function(context) {
            this.context = context;
        };
        tripleRedHotSevensIXFTutorial.TutorialFactory = ck_implements(tripleRedHotSevensIXFTutorial.TutorialFactory, clientkernelModulesApi.IService);
        tripleRedHotSevensIXFTutorial.TutorialFactory = ck_implements(tripleRedHotSevensIXFTutorial.TutorialFactory, componentmodelComponentApi.IComponentFactory);
        tripleRedHotSevensIXFTutorial.TutorialFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        tripleRedHotSevensIXFTutorial.TutorialFactory.__name__ = ["tripleRedHotSevensIXFTutorial", "TutorialFactory"];
        tripleRedHotSevensIXFTutorial.TutorialFactory.prototype.context = null;
        tripleRedHotSevensIXFTutorial.TutorialFactory.prototype.getComponentDeclaration = function() {
            return tripleRedHotSevensIXFTutorialApi.TutorialDeclaration;
        };
        tripleRedHotSevensIXFTutorial.TutorialFactory.prototype.createComponent = function(context) {
            new tripleRedHotSevensIXFTutorial.Tutorial(context);
        };
        tripleRedHotSevensIXFTutorial.TutorialFactory.prototype.__class__ = tripleRedHotSevensIXFTutorial.TutorialFactory;
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent = function() {};
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.__name__ = ["tripleRedHotSevensIXFTutorial", "TutorialBaseComponent"];
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.container = null;
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.init = function(container) {
            this.container = container;
            container.hide();
        };
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.showPage = function(page) {
            this.show();
        };
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.show = function() {
            this.container.show();
        };
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.hide = function() {
            this.container.hide();
        };
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.dispose = function() {
            var stage = this.container.getDisplayObject().getParent();
            stage.removeChild(this.container.getDisplayObject());
            this.container.dispose();
            this.container = null;
        };
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.executeAfterDelay = function(callback, delay) {
            commonTools.TimeoutInvoker.setTimeout(tripleRedHotSevensIXFTutorial.TutorialController.TIMEOUT_GROUP, callback, delay);
        };
        tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.__class__ = tripleRedHotSevensIXFTutorial.TutorialBaseComponent;
        tripleRedHotSevensIXFTutorial.TutorialPanel = function() {
            this.checkboxState = false;
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.call(this);
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.__name__ = ["tripleRedHotSevensIXFTutorial", "TutorialPanel"];
        tripleRedHotSevensIXFTutorial.TutorialPanel.__super__ = tripleRedHotSevensIXFTutorial.TutorialBaseComponent;
        for (var k in tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype) tripleRedHotSevensIXFTutorial.TutorialPanel.prototype[k] = tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype[k];
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.closeBtnCallback = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.nextPageBtnCallback = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.prevPageBtnCallback = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.checkboxCallback = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.leftBtn = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.rightBtn = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.pageCounter = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.checkboxState = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.checkboxActiveSkin = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.init = function(container) {
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.init.call(this, container);
            this.initCloseButton("CLOSE_BUTTON", this.closeBtnCallback);
            this.initStickerButton("STICKER_OFF", $bind(this, this.onCheckboxClick));
            this.initLeftButton("BUTTON_ARROW_LEFT", this.prevPageBtnCallback);
            this.initRightButton("BUTTON_ARROW_RIGHT", this.nextPageBtnCallback);
            this.pageCounter = container.getLabelById("TutorialPageCounter");
            this.checkboxActiveSkin = container.getComponentById("STICKER_ON");
            this.checkboxActiveSkin.hide();
            tripleRedHotSevensIXFTutorial.TutorialPanel.instanceOfTP = this;
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.dispose = function() {
            this.closeBtnCallback = null;
            this.nextPageBtnCallback = null;
            this.prevPageBtnCallback = null;
            this.checkboxCallback = null;
            this.leftBtn = null;
            this.rightBtn = null;
            this.pageCounter = null;
            this.checkboxState = null;
            this.checkboxActiveSkin = null;
            tripleRedHotSevensIXFTutorial.TutorialPanel.instanceOfTP = null;
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.dispose.call(this);
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.initCloseButton = function(containerID, callback) {
            var btnContainer = this.container.getButtonContainerById(containerID);
            var btn = btnContainer.getButtonById("btn");
            btn.getEvents().DOWN().addListener(callback);
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.initStickerButton = function(containerID, callback) {
            var btnContainer = this.container.getButtonContainerById(containerID);
            var btn = btnContainer.getButtonById("btn");
            btn.getEvents().DOWN().addListener(callback);
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.initLeftButton = function(containerID, callback) {
            var btnContainer = this.container.getButtonContainerById(containerID);
            var btn = btnContainer.getButtonById("btn");
            btn.getEvents().DOWN().addListener(callback);
            btnContainer.disable();
            this.leftBtn = btn;
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.initRightButton = function(containerID, callback) {
            var btnContainer = this.container.getButtonContainerById(containerID);
            var btn = btnContainer.getButtonById("btn");
            btn.getEvents().DOWN().addListener(callback);
            btnContainer.disable();
            this.rightBtn = btn;
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.showPage = function(page) {
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.showPage.call(this, page);
            var text = "" + (page + 1) + "/" + tripleRedHotSevensIXFTutorial.TutorialConfig.getNumPages();
            this.pageCounter.setText(text);
            if (tripleRedHotSevensIXFTutorial.TutorialConfig.isSpinningReels()) this.disableTutLRButtons();
            else this.enableTutLRButtons();
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.disableTutLRButtons = function() {
            this.leftBtn.disable();
            this.rightBtn.disable();
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.enableTutLRButtons = function() {
            this.leftBtn.enable();
            this.rightBtn.enable();
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.onCheckboxClick = function() {
            this.checkboxState = !this.checkboxState;
            if (this.checkboxState) this.checkboxActiveSkin.show();
            else this.checkboxActiveSkin.hide();
            this.checkboxCallback(this.checkboxState);
        };
        tripleRedHotSevensIXFTutorial.TutorialPanel.instanceOfTP = null;
        tripleRedHotSevensIXFTutorial.TutorialPanel.prototype.__class__ = tripleRedHotSevensIXFTutorial.TutorialPanel;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay = function(context) {
            this.isTutReelsSpinning = false;
            this.winForSecondPage = null;
            this.winForFirstPage = null;
            this.tutorialIsOpen = false;
            this.tutorialPageNum = 0;
            this.subTutReelStop = null;
            this.isFirstTime = true;
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.call(this);
            this.controlsInjector = new commonControls.ControlsInjector(context);
            this.controlsInjector.inject(this);
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.__name__ = ["tripleRedHotSevensIXFTutorial", "TutorialReelDisplay"];
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.__super__ = tripleRedHotSevensIXFTutorial.TutorialBaseComponent;
        for (var k in tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype) tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype[k] = tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype[k];
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.controlsInjector = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.reelsControl = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.winControllerControl = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.isFirstTime = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.multiplierAnimation = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.reelPicture = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.isSpinningReels = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.subTutReelStop = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.tutorialPageNum = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.tutorialIsOpen = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.winForFirstPage = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.winForSecondPage = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.isTutReelsSpinning = null;
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.init = function(container) {
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.init.call(this, container);
            var ANIM_CONTAINER_ID = "animation";
            var animationHolder = container.getContainerById(ANIM_CONTAINER_ID);
            this.multiplierAnimation = this.getAnimation("ANIMATION_HOLDER", "ANIMATION_CONTENT");
            animationHolder.addChildComponent(this.multiplierAnimation, ANIM_CONTAINER_ID);
            this.isSpinningReels = tripleRedHotSevensIXFTutorial.TutorialConfig.isSpinningReels();
            this.winForFirstPage = tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getScatterWinOutcome(tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getReelPicture(0));
            this.winForSecondPage = tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getLineWinOutcome(tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getReelPicture(1), 1);
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.dispose = function() {
            if (this.isTutReelsSpinning) {
                this.isTutReelsSpinning = false;
                this.reelsControl.stopSpin(this.reelPicture, [0, 0, 0]);
                this.reelsControl.setReelPicture(this.reelPicture);
                this.showWinAnimation(this.tutorialPageNum);
                this.hideWins();
            }
            if (this.subTutReelStop != null) this.subTutReelStop.unsubscribe();
            this.subTutReelStop = null;
            this.tutorialPageNum = null;
            this.tutorialIsOpen = null;
            this.multiplierAnimation.removeEventListener("SHOW::FINISHED");
            this.controlsInjector = null;
            this.reelsControl = null;
            this.winControllerControl = null;
            this.isFirstTime = null;
            this.multiplierAnimation = null;
            this.reelPicture = null;
            this.isSpinningReels = null;
            this.winForFirstPage = null;
            this.winForSecondPage = null;
            this.isTutReelsSpinning = null;
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.dispose.call(this);
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.getAnimation = function(holderID, animationID) {
            var animAssets = tripleRedHotSevensIXFTutorial.ExternalService.loadedAssets.get("tutorial_animation.viewbuilder.json");
            var animView = tripleRedHotSevensIXFTutorial.ExternalService.viewBuilderFactory.createView(animAssets);
            var animHolder = animView.createContainerFromStoredConfig(holderID);
            return animHolder.getVBAnimationById(animationID);
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.showPage = function(page) {
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.showPage.call(this, page);
            if (!this.isFirstTime) this.hideWins();
            else {
                this.tutorialIsOpen = true;
                if (this.isSpinningReels) this.subTutReelStop = tripleRedHotSevensIXFTutorial.ExternalService.busChanel.subscribe("reels:spinStopped", $bind(this, this.showWinAnimAfterSpinStop));
            }
            this.isFirstTime = false;
            this.tutorialPageNum = page;
            this.reelPicture = tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getReelPicture(page);
            if (this.isSpinningReels) this.showPageWithSpinningReels(page);
            else this.showPageWithoutSpinningReels(page);
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.showPageWithoutSpinningReels = function(page) {
            this.reelsControl.setReelPicture(this.reelPicture);
            this.executeAfterDelay((function(f, a1) {
                return function() {
                    f(a1);
                };
            })($bind(this, this.showWinAnimation), page), tripleRedHotSevensIXFTutorial.TutorialConfig.getShowWinDelay());
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.showPageWithSpinningReels = function(page) {
            var _g = this;
            this.reelsControl.startSpin([0, 0, 0]);
            this.isTutReelsSpinning = true;
            Promise.resolve(this.stopingDelay(1000)).then(function(data) {
                if (_g.isTutReelsSpinning) _g.reelsControl.stopSpin(_g.reelPicture, [0, 0, 0]);
            });
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.stopingDelay = function(delay) {
            return new Promise(function(resolve, reject) {
                _hcmn_.haxe_Timer.delay(function() {
                    resolve(null);
                }, delay);
            });
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.showWinAnimAfterSpinStop = function(e) {
            if (this.tutorialIsOpen && this.isTutReelsSpinning) {
                this.isTutReelsSpinning = false;
                this.reelsControl.setReelPicture(this.reelPicture);
                this.showWinAnimation(this.tutorialPageNum);
                tripleRedHotSevensIXFTutorial.TutorialPanel.instanceOfTP.enableTutLRButtons();
            }
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.showWinAnimation = function(page) {
            if (page == 0) this.winControllerControl.showWin(this.winForFirstPage);
            else {
                this.winControllerControl.showWin(this.winForSecondPage);
                this.playMultiplierAnimation();
            }
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.playMultiplierAnimation = function() {
            this.multiplierAnimation.show();
            uiHelper.VBAnimationExtension.gotoAndPlayOnLabel(this.multiplierAnimation, "intro");
            this.multiplierAnimation.addEventListener("SHOW::FINISHED", $bind(this, this.onMultiplierAnimated));
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.onMultiplierAnimated = function() {
            this.winControllerControl.showWin(tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getLineWinOutcome(this.reelPicture, 3));
            this.multiplierAnimation.stop();
            this.multiplierAnimation.hide();
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.hide = function() {
            this.hideWins();
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.hide.call(this);
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.hideWins = function() {
            this.multiplierAnimation.removeEventListener("SHOW::FINISHED");
            this.multiplierAnimation.stop();
            this.multiplierAnimation.hide();
            this.winControllerControl.hide();
        };
        tripleRedHotSevensIXFTutorial.TutorialReelDisplay.prototype.__class__ = tripleRedHotSevensIXFTutorial.TutorialReelDisplay;
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay = function() {
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.call(this);
        };
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.__name__ = ["tripleRedHotSevensIXFTutorial", "TutorialTextDisplay"];
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.__super__ = tripleRedHotSevensIXFTutorial.TutorialBaseComponent;
        for (var k in tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype) tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype[k] = tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype[k];
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.activeTween = null;
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.texts = null;
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.init = function(container) {
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.init.call(this, container);
            this.texts = [];
            var _g1 = 0;
            var _g = tripleRedHotSevensIXFTutorial.TutorialConfig.getNumPages();
            while (_g1 < _g) {
                var i = _g1++;
                var pageText = container.getComponentById("Tutorial_MainText_Page" + i);
                pageText.hide();
                this.texts.push(pageText);
            }
        };
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.dispose = function() {
            this.texts = null;
            this.activeTween = null;
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.dispose.call(this);
        };
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.showPage = function(page) {
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.showPage.call(this, page);
            this.stopBlinking();
            var _g1 = 0;
            var _g = tripleRedHotSevensIXFTutorial.TutorialConfig.getNumPages();
            while (_g1 < _g) {
                var i = _g1++;
                if (i == page) {
                    this.texts[i].show();
                    this.startBlinking(this.texts[i]);
                } else this.texts[i].hide();
            }
        };
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.startBlinking = function(element) {
            var obj = element.getDisplayObject();
            this.activeTween = displayEngineUtils.TweenX.serial([displayEngineUtils.TweenX.to(obj, {
                alpha: tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextMinAlpha()
            }, null, null, null, null, null, null, null, null, {
                fileName: "TutorialTextDisplay.hx",
                lineNumber: 46,
                className: "game.tutorial.components.TutorialTextDisplay",
                methodName: "startBlinking"
            }), displayEngineUtils.TweenX.to(obj, {
                alpha: 1
            }, tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextFadeInTime(), null, null, null, null, null, null, null, {
                fileName: "TutorialTextDisplay.hx",
                lineNumber: 47,
                className: "game.tutorial.components.TutorialTextDisplay",
                methodName: "startBlinking"
            }), displayEngineUtils.TweenX.wait(tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextWaitTime(), {
                fileName: "TutorialTextDisplay.hx",
                lineNumber: 48,
                className: "game.tutorial.components.TutorialTextDisplay",
                methodName: "startBlinking"
            }), displayEngineUtils.TweenX.to(obj, {
                alpha: tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextMinAlpha()
            }, tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextFadeOutTime(), null, null, null, null, null, null, null, {
                fileName: "TutorialTextDisplay.hx",
                lineNumber: 49,
                className: "game.tutorial.components.TutorialTextDisplay",
                methodName: "startBlinking"
            })], null, {
                fileName: "TutorialTextDisplay.hx",
                lineNumber: 45,
                className: "game.tutorial.components.TutorialTextDisplay",
                methodName: "startBlinking"
            }).repeat();
        };
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.hide = function() {
            tripleRedHotSevensIXFTutorial.TutorialBaseComponent.prototype.hide.call(this);
            this.stopBlinking();
        };
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.stopBlinking = function() {
            if (this.activeTween != null) {
                this.activeTween["goto"](this.activeTween.get_totalTime(), false);
                this.activeTween = null;
            }
        };
        tripleRedHotSevensIXFTutorial.TutorialTextDisplay.prototype.__class__ = tripleRedHotSevensIXFTutorial.TutorialTextDisplay;
        tripleRedHotSevensIXFTutorial.TutorialConfig = function() {};
        tripleRedHotSevensIXFTutorial.TutorialConfig.__name__ = ["tripleRedHotSevensIXFTutorial", "TutorialConfig"];
        tripleRedHotSevensIXFTutorial.TutorialConfig.definition = null;
        tripleRedHotSevensIXFTutorial.TutorialConfig.init = function(config) {
            tripleRedHotSevensIXFTutorial.TutorialConfig.definition = config;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.getNumPages = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.numPages;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.isSpinningReels = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.spinningReels;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.getShowWinDelay = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.showWinDelay;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.getReelSpinTime = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.reelSpinTime;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.getNavigateEnableDelay = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.navigateEnableDelay;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextFadeInTime = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.mainTextFadeInTimeMs;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextFadeOutTime = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.mainTextFadeOutTimeMs;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextWaitTime = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.mainTextWaitTimeSec;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.getMainTextMinAlpha = function() {
            return tripleRedHotSevensIXFTutorial.TutorialConfig.definition.mainTextMinAlpha;
        };
        tripleRedHotSevensIXFTutorial.TutorialConfig.prototype.__class__ = tripleRedHotSevensIXFTutorial.TutorialConfig;
        tripleRedHotSevensIXFTutorial.TutorialController = function(context) {
            this.components = new _hcmn_.List();
            this.addedToStage = false;
            this.context = context;
            this.tutorialPort = context.getImplementedPort(tripleRedHotSevensIXFTutorialApi.ITutorialImplementationPort);
            this.listeners = [this.tutorialPort.getShow().subscribe($bind(this, this.onShow)), this.tutorialPort.getHide().subscribe($bind(this, this.onHide)), this.tutorialPort.getPrevPageClicked().subscribe($bind(this, this.showPrevPage)), this.tutorialPort.getNextPageClicked().subscribe($bind(this, this.showNextPage))];
        };
        tripleRedHotSevensIXFTutorial.TutorialController.__name__ = ["tripleRedHotSevensIXFTutorial", "TutorialController"];
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.context = null;
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.tutorialPort = null;
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.rootContainer = null;
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.addedToStage = null;
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.components = null;
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.currentPage = null;
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.bus = null;
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.listeners = null;
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.init = function(container) {
            this.rootContainer = container;
            this.addComponent("TUTORIAL_HEADER", new tripleRedHotSevensIXFTutorial.TutorialBaseComponent());
            this.addComponent("TUTORIAL_REELS", new tripleRedHotSevensIXFTutorial.TutorialReelDisplay(this.context));
            this.addComponent("TUTORIAL_TEXT", new tripleRedHotSevensIXFTutorial.TutorialTextDisplay());
            var panel = new tripleRedHotSevensIXFTutorial.TutorialPanel();
            panel.closeBtnCallback = $bind(this, this.onCloseClick);
            panel.nextPageBtnCallback = $bind(this, this.onNextPageClick);
            panel.prevPageBtnCallback = $bind(this, this.onPrevPageClick);
            panel.checkboxCallback = $bind(this, this.onCheckboxClick);
            this.addComponent("TUTORIAL_PANEL", panel);
            this.bus = tripleRedHotSevensIXFTutorial.ExternalService.bus;
            this.bus.getChannel("GFBus").publish("testable:testcomponent:tutorialTotalPages", tripleRedHotSevensIXFTutorial.TutorialConfig.getNumPages());
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.addComponent = function(id, component) {
            component.init(this.rootContainer.getComponentById(id));
            this.components.push(component);
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.onShow = function(e) {
            this.show(e.getPayload());
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.onHide = function(e) {
            this.dispose();
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.dispose = function() {
            this.hide();
            var _g = 0;
            var _g1 = this.listeners;
            while (_g < _g1.length) {
                var listener = _g1[_g];
                ++_g;
                listener.unsubscribe();
            }
            this.rootContainer = null;
            this.components = null;
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.show = function(page) {
            commonTools.TimeoutInvoker.clearTimeouts(tripleRedHotSevensIXFTutorial.TutorialController.TIMEOUT_GROUP);
            this.currentPage = page;
            var _g_head = this.components.h;
            var _g_val = null;
            while (_g_head != null) {
                var component;
                component = (function($this) {
                    var $r;
                    _g_val = _g_head[0];
                    _g_head = _g_head[1];
                    $r = _g_val;
                    return $r;
                }(this));
                component.showPage(page);
            }
            this.bus.getChannel("GFBus").publish("tutorial:currentPage", this.currentPage);
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.hide = function() {
            commonTools.TimeoutInvoker.clearTimeouts(tripleRedHotSevensIXFTutorial.TutorialController.TIMEOUT_GROUP);
            var _g_head = this.components.h;
            var _g_val = null;
            while (_g_head != null) {
                var component;
                component = (function($this) {
                    var $r;
                    _g_val = _g_head[0];
                    _g_head = _g_head[1];
                    $r = _g_val;
                    return $r;
                }(this));
                component.hide();
                component.dispose();
            }
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.onCloseClick = function() {
            this.tutorialPort.closeClicked();
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.onNextPageClick = function() {
            this.tutorialPort.nextPageClicked();
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.onPrevPageClick = function() {
            this.tutorialPort.prevPageClicked();
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.showNextPage = function(e) {
            this.show((this.currentPage + 1) % tripleRedHotSevensIXFTutorial.TutorialConfig.getNumPages());
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.showPrevPage = function(e) {
            this.show((this.currentPage + tripleRedHotSevensIXFTutorial.TutorialConfig.getNumPages() - 1) % tripleRedHotSevensIXFTutorial.TutorialConfig.getNumPages());
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.onCheckboxClick = function(value) {
            this.tutorialPort.checkBoxChanged(value);
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.updateLayout = function(layoutPayload) {
            if (this.rootContainer == null) return;
            var $it0 = layoutPayload.containers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var layerPayload = layoutPayload.containers.get(layerId);
                var stage;
                var this1 = tripleRedHotSevensIXFTutorial.ExternalService.displayProvider.getStages();
                stage = this1.get(layerPayload.stage);
                var container = this.rootContainer.getComponentById(layerId);
                var containerDO = container.getDisplayObject();
                containerDO.setCacheAsBitmap(false);
                if (!this.addedToStage) stage.addChild(containerDO);
                containerDO.setX(layerPayload.left);
                containerDO.setY(layerPayload.top);
                containerDO.setScaleX(layerPayload.width / containerDO.getUserData().viewBuilderW);
                containerDO.setScaleY(layerPayload.height / containerDO.getUserData().viewBuilderH);
                containerDO.setZIndex(layerPayload.zIndex);
            }
            if (!this.addedToStage) this.addedToStage = true;
        };
        tripleRedHotSevensIXFTutorial.TutorialController.prototype.__class__ = tripleRedHotSevensIXFTutorial.TutorialController;
        tripleRedHotSevensIXFTutorial.WinOutcomeBuilder = function() {};
        tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.__name__ = ["tripleRedHotSevensIXFTutorial", "WinOutcomeBuilder"];
        tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getReelPicture = function(page) {
            if (page == 0) return [
                ["s06", "b01", "s06", "s02", "s06"],
                ["s06", "s03", "s06", "b01", "s06"],
                ["s02", "s06", "b01", "s06", "s04"]
            ];
            else return [
                ["s03", "s06", "s03", "s06", "s02"],
                ["s02", "s06", "s03", "s06", "b01"],
                ["s04", "s06", "s04", "s06", "s05"]
            ];
        };
        tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getLineWinOutcome = function(reels, multiplier) {
            var winPath = new slotModelApi.ReelPictureInfo([
                [0, 0, 1, 2, 0],
                [0, 0, 1, 2, 0],
                [0, 0, 1, 2, 0]
            ]);
            var price = 5;
            var lineWin = new slotModelApi.LineWin("3 AnySeven", 1, "" + price, multiplier, "" + price * multiplier, winPath, "AnySeven", 3);
            return new slotModelApi.Outcome(new slotModelApi.ReelPicture(reels), null, [lineWin], null, null, null, "0", null, {
                isFreeSpins: false
            });
        };
        tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.getScatterWinOutcome = function(reels) {
            var customField = {
                freeSpinsTriggered: true
            };
            var winPath = new slotModelApi.ReelPictureInfo([
                [0, 1, 0, 0, 0],
                [0, 0, 0, 1, 0],
                [0, 0, 1, 0, 0]
            ]);
            var scatterWin = new slotModelApi.ScatterWin("3 b01", "1", 1, "0.25", winPath, "b01", 3);
            return new slotModelApi.Outcome(new slotModelApi.ReelPicture(reels), null, null, [scatterWin], null, null, "0", null, customField);
        };
        tripleRedHotSevensIXFTutorial.WinOutcomeBuilder.prototype.__class__ = tripleRedHotSevensIXFTutorial.WinOutcomeBuilder;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            }
        };
        tripleRedHotSevensIXFTutorial.ExternalService.loadedAssets = new _hcmn_.haxe_ds_StringMap();;
        tripleRedHotSevensIXFTutorial.Tutorial.PATH_TUTORIAL_BASE = "tutorial-assets/";;
        tripleRedHotSevensIXFTutorial.Tutorial.VB_MAIN_ID = "tutorial.viewbuilder.json";;
        tripleRedHotSevensIXFTutorial.Tutorial.VB_ANIMATIONS_ID = "tutorial_animation.viewbuilder.json";;
        tripleRedHotSevensIXFTutorial.Tutorial.CONFIG_ID = "tutorial-configuration.json";;
        tripleRedHotSevensIXFTutorial.TutorialPanel.CLOSE_BUTTON = "CLOSE_BUTTON";;
        tripleRedHotSevensIXFTutorial.TutorialPanel.STICKER_OFF = "STICKER_OFF";;
        tripleRedHotSevensIXFTutorial.TutorialPanel.BUTTON_ARROW_LEFT = "BUTTON_ARROW_LEFT";;
        tripleRedHotSevensIXFTutorial.TutorialPanel.BUTTON_ARROW_RIGHT = "BUTTON_ARROW_RIGHT";;
        tripleRedHotSevensIXFTutorial.TutorialPanel.STICKER_ON = "STICKER_ON";;
        tripleRedHotSevensIXFTutorial.TutorialPanel.TUTORIAL_PAGE_COUNTER = "TutorialPageCounter";;
        tripleRedHotSevensIXFTutorial.TutorialPanel.BUTTON = "btn";;
        tripleRedHotSevensIXFTutorial.TutorialController.TIMEOUT_GROUP = "tutorialPage";;
        return {
            exports: tripleRedHotSevensIXFTutorial,
            activator: tripleRedHotSevensIXFTutorial.Activator
        };
    });