define("scarabGameController", ["scarabViewManagerApi", "componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "slotModelApi", "winMeterApi", "displayEngineApi", "scarabStaticViewsApi", "winControllerApi", "reelsApi", "scarabTensionApi", "soundManagerApi", "scarabFxManagerApi", "scarabWildsApi", "gameLayoutApi", "money", "PIXI", "BABYLON", "scarabComponentsGameControllerApi", "scarabTutorialApi", "clientkernelEventbusApi", "stateMachineEngine", "infoBarApi", "backgroundApi", "clientkernelModulesApi", "scarabWinManagerApi", "paytableApi", "betPanelApi", "clientkernelLoggerApi", "moneyApi"],
    function(scarabViewManagerApi, componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, slotModelApi, winMeterApi, displayEngineApi, scarabStaticViewsApi, winControllerApi, reelsApi, scarabTensionApi, soundManagerApi, scarabFxManagerApi, scarabWildsApi, gameLayoutApi, money, PIXI, BABYLON, scarabComponentsGameControllerApi, scarabTutorialApi, clientkernelEventbusApi, stateMachineEngine, infoBarApi, backgroundApi, clientkernelModulesApi, scarabWinManagerApi, paytableApi, betPanelApi, clientkernelLoggerApi, 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 scarabGameController == 'undefined') {
            var scarabGameController = {};
        };
        scarabGameController.Activator = function() {};
        scarabGameController.Activator = ck_implements(scarabGameController.Activator, clientkernelModulesApi.IModuleActivator);
        scarabGameController.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        scarabGameController.Activator.__name__ = ["scarabGameController", "Activator"];
        scarabGameController.Activator.prototype.start = function(context) {
            context.getServiceTracker([translationmanagerApi.ITranslationManager, moneyApi.IMoneyFormatter, displayEngineApi.IDisplayProvider]).then(function(context1) {
                scarabGameController.ExternalService.initialize(context1);
                context1.registerService(new scarabGameController.Factory(), scarabComponentsGameControllerApi.GameControllerDeclaration, null);
            });
        };
        scarabGameController.Activator.prototype.stop = function(context) {};
        scarabGameController.Activator.main = function() {};
        scarabGameController.Activator.prototype.__class__ = scarabGameController.Activator;
        scarabGameController.ExternalService = function() {};
        scarabGameController.ExternalService.__name__ = ["scarabGameController", "ExternalService"];
        scarabGameController.ExternalService.bus = null;
        scarabGameController.ExternalService.assetRegistry = null;
        scarabGameController.ExternalService.moneyFormatter = null;
        scarabGameController.ExternalService.translationManager = null;
        scarabGameController.ExternalService.variableRegistry = null;
        scarabGameController.ExternalService.moduleContext = null;
        scarabGameController.ExternalService.displayProvider = null;
        scarabGameController.ExternalService.logger = null;
        scarabGameController.ExternalService.initialize = function(context) {
            scarabGameController.ExternalService.moduleContext = context;
            scarabGameController.ExternalService.bus = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
            scarabGameController.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            scarabGameController.ExternalService.moneyFormatter = context.getAnyService(moneyApi.IMoneyFormatter, null);
            scarabGameController.ExternalService.variableRegistry = context.getAnyService(clientkernelLoaderApi.IVariableRegistry, null);
            scarabGameController.ExternalService.translationManager = context.getAnyService(translationmanagerApi.ITranslationManager, null);
            scarabGameController.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            var loggerFactory = context.getAnyService(clientkernelLoggerApi.ILoggerFactory, null);
            scarabGameController.ExternalService.logger = loggerFactory.getDefaultLogger();
        };
        scarabGameController.ExternalService.isDesktop = function() {
            return scarabGameController.ExternalService.variableRegistry.get("skin") == "dektop" || scarabGameController.ExternalService.variableRegistry.get("assetPack") == "desktop";
        };
        scarabGameController.ExternalService.prototype.__class__ = scarabGameController.ExternalService;
        scarabGameController.Factory = function() {};
        scarabGameController.Factory = ck_implements(scarabGameController.Factory, clientkernelModulesApi.IService);
        scarabGameController.Factory = ck_implements(scarabGameController.Factory, componentmodelComponentApi.IComponentFactory);
        scarabGameController.Factory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        scarabGameController.Factory.__name__ = ["scarabGameController", "Factory"];
        scarabGameController.Factory.prototype.createComponent = function(context) {
            new scarabGameController.GameController(context);
        };
        scarabGameController.Factory.prototype.getComponentDeclaration = function() {
            return scarabComponentsGameControllerApi.GameControllerDeclaration;
        };
        scarabGameController.Factory.prototype.__class__ = scarabGameController.Factory;
        scarabGameController.GameController = function(context) {
            this.pickerChoice = 0;
            this.betsArray = [];
            this.freeSpinCompleted = false;
            this.isFreeSpin = false;
            this.isResume = false;
            this.tutorialActive = false;
            this.tutorialConfirmed = false;
            this.BG_FREESPIN_IMG = "FreeSpinsImage";
            this.BG_BASEGAME_IMG = "BaseGameImage";
            this.BG_FREESPIN_VIDEO = "FreeSpinsVideo";
            this.BG_BASEGAME_VIDEO = "BaseGameVideo";
            this.showSpinButtonDuringFreeSpin = false;
            this.showSpinButtonInsideAutoplay = false;
            this.autoPlayActive = false;
            this.paytableOpened = false;
            this.promotionalSpinsActive = false;
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] new", {
                fileName: "GameController.hx",
                lineNumber: 152,
                className: "components.gamecontroller.imp.GameController",
                methodName: "new"
            });
            this.model = new scarabGameController.GameModel();
            this.betPanelPort = context.getUsedPort(betPanelApi.IBetPanelPort);
            this.reelsPort = context.getUsedPort(reelsApi.IReelsPort);
            this.slotModelPort = context.getUsedPort(slotModelApi.ISlotModelPort);
            this.gameLayoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.winMeterPort = context.getUsedPort(winMeterApi.IWinMeterPort);
            this.winControllerPort = context.getUsedPort(winControllerApi.IWinControllerPort);
            this.infoBarPort = context.getUsedPort(infoBarApi.IInfoBarPort);
            this.staticViewsPort = context.getUsedPort(scarabStaticViewsApi.IStaticViewsPort);
            this.paytablePort = context.getUsedPort(paytableApi.IPaytablePort);
            this.backgroundPort = context.getUsedPort(backgroundApi.IBackgroundPort);
            this.wildsPort = context.getUsedPort(scarabWildsApi.IWildsPort);
            this.tutorialPort = context.getUsedPort(scarabTutorialApi.ITutorialPort);
            this.tensionPort = context.getUsedPort(scarabTensionApi.ITensionPort);
            this.viewManagerPort = context.getUsedPort(scarabViewManagerApi.IViewManagerPort);
            this.soundPort = context.getUsedPort(soundManagerApi.ISoundManagerPort);
            this.fxManagerPort = context.getUsedPort(scarabFxManagerApi.IFxManagerPort);
            this.winManagerPort = context.getUsedPort(scarabWinManagerApi.IWinManagerPort);
            this.setupStateMachine();
            this.baseGameElementsVisibility = new _hcmn_.haxe_ds_StringMap();
            this.initStorage();
            context.getStarted().then(function(a) {
                scarabGameController.GameController.soundController = new scarabGameController.SoundController(_g.soundPort, _g.model);
                _g.assemblyStarted = true;
                _g.checkGameLoaded();
            });
            scarabGameController.ExternalService.assetRegistry.getAsset("game-config_json").getContent().then(function(data) {
                if (data.gameControllerConfig != null) _g.config = data.gameControllerConfig;
                _g.checkGameLoaded();
            });
            this.attachToEventBus();
            this.skipController = new scarabGameController.SkipController(this.betPanelPort);
            this.winMeterController = new scarabGameController.WinMeterController(this.winMeterPort, this.model);
        };
        scarabGameController.GameController.__name__ = ["scarabGameController", "GameController"];
        scarabGameController.GameController.prototype.stateMachine = null;
        scarabGameController.GameController.prototype.smDispatcher = null;
        scarabGameController.GameController.prototype.smContext = null;
        scarabGameController.GameController.prototype.model = null;
        scarabGameController.GameController.prototype.config = null;
        scarabGameController.GameController.prototype.assemblyStarted = null;
        scarabGameController.GameController.prototype.layoutUpdated = null;
        scarabGameController.GameController.prototype.stopSpinRecieved = null;
        scarabGameController.GameController.prototype.promotionalSpinsActive = null;
        scarabGameController.GameController.prototype.paytableOpened = null;
        scarabGameController.GameController.prototype.betPanelPort = null;
        scarabGameController.GameController.prototype.reelsPort = null;
        scarabGameController.GameController.prototype.slotModelPort = null;
        scarabGameController.GameController.prototype.gameLayoutPort = null;
        scarabGameController.GameController.prototype.resultPayload = null;
        scarabGameController.GameController.prototype.winMeterPort = null;
        scarabGameController.GameController.prototype.skipController = null;
        scarabGameController.GameController.prototype.winMeterController = null;
        scarabGameController.GameController.prototype.winControllerPort = null;
        scarabGameController.GameController.prototype.infoBarPort = null;
        scarabGameController.GameController.prototype.staticViewsPort = null;
        scarabGameController.GameController.prototype.paytablePort = null;
        scarabGameController.GameController.prototype.backgroundPort = null;
        scarabGameController.GameController.prototype.wildsPort = null;
        scarabGameController.GameController.prototype.tutorialPort = null;
        scarabGameController.GameController.prototype.tensionPort = null;
        scarabGameController.GameController.prototype.viewManagerPort = null;
        scarabGameController.GameController.prototype.soundPort = null;
        scarabGameController.GameController.prototype.fxManagerPort = null;
        scarabGameController.GameController.prototype.winManagerPort = null;
        scarabGameController.GameController.prototype.autoPlayActive = null;
        scarabGameController.GameController.prototype.showSpinButtonInsideAutoplay = null;
        scarabGameController.GameController.prototype.resolveFnOnClickSpinInsideAutoplay = null;
        scarabGameController.GameController.prototype.resolveFnOnStopInsideAutoplay = null;
        scarabGameController.GameController.prototype.showSpinButtonDuringFreeSpin = null;
        scarabGameController.GameController.prototype.resolveFnOnClickSpinDuringFreeSpin = null;
        scarabGameController.GameController.prototype.promotionalSpinsCount = null;
        scarabGameController.GameController.prototype.BG_BASEGAME_VIDEO = null;
        scarabGameController.GameController.prototype.BG_FREESPIN_VIDEO = null;
        scarabGameController.GameController.prototype.BG_BASEGAME_IMG = null;
        scarabGameController.GameController.prototype.BG_FREESPIN_IMG = null;
        scarabGameController.GameController.prototype.storage = null;
        scarabGameController.GameController.prototype.tutorialConfirmed = null;
        scarabGameController.GameController.prototype.tutorialActive = null;
        scarabGameController.GameController.prototype.baseGameElementsVisibility = null;
        scarabGameController.GameController.prototype.isResume = null;
        scarabGameController.GameController.prototype.isFreeSpin = null;
        scarabGameController.GameController.prototype.freeSpinCompleted = null;
        scarabGameController.GameController.prototype.betsArray = null;
        scarabGameController.GameController.prototype.previousBPL = null;
        scarabGameController.GameController.prototype.pickerChoice = null;
        scarabGameController.GameController.prototype.scarabTimers = null;
        scarabGameController.GameController.prototype.setupStateMachine = function() {
            haxe.Log.trace("[GAME_CONTROLLER] STARTED", {
                fileName: "GameController.hx",
                lineNumber: 206,
                className: "components.gamecontroller.imp.GameController",
                methodName: "setupStateMachine"
            });
            this.smDispatcher = new stateMachineEngine.EventDispatcher();
            this.smContext = new scarabGameController.StateMachineContext(this.smDispatcher);
            this.smContext.setupContextData(this);
            this.stateMachine = new stateMachineEngine.StateMachine(this.smDispatcher, scarabGameController.StateMachineDef.ID);
            this.stateMachine.setContext(this.smContext);
            this.stateMachine.logLevel = 3;
            this.stateMachine.logPrefix = "[GAME_CONTROLLER]";
            this.stateMachine.dispatchGlobalStateChange = false;
            stateMachineEngine.StateMachine.logger = scarabGameController.ExternalService.logger;
            stateMachineEngine.FSMInjector.registerSM(this.stateMachine, scarabGameController.StateMachineDef.FSM);
        };
        scarabGameController.GameController.prototype.checkGameLoaded = function() {
            if (!this.assemblyStarted) return;
            if (!this.layoutUpdated) return;
            if (this.config == null) return;
            haxe.Log.trace("[GAME_CONTROLLER] GAME LOADED", {
                fileName: "GameController.hx",
                lineNumber: 225,
                className: "components.gamecontroller.imp.GameController",
                methodName: "checkGameLoaded"
            });
            this.slotModelPort.getStages().getInitStage().getGameLoaded().publish(null);
        };
        scarabGameController.GameController.prototype.dispatchEvent = function(action) {
            haxe.Log.trace(this.stateMachine.logPrefix + " dispatchEvent", {
                fileName: "GameController.hx",
                lineNumber: 235,
                className: "components.gamecontroller.imp.GameController",
                methodName: "dispatchEvent"
            });
            this.smDispatcher.dispatchEvent(new stateMachineEngine.StateEvent(scarabGameController.StateMachineDef.ID + stateMachineEngine.StateEvent.ACTION, action));
        };
        scarabGameController.GameController.prototype.attachComponents = function() {
            haxe.Log.trace(this.stateMachine.logPrefix + " attachComponents", {
                fileName: "GameController.hx",
                lineNumber: 244,
                className: "components.gamecontroller.imp.GameController",
                methodName: "attachComponents"
            });
            this.slotModelPort.getGameContext().getBalance().subscribe($bind(this, this.handleBalanceUpdate));
            this.slotModelPort.getGameContext().getGameOptionChangedFromPf().subscribe($bind(this, this.handleGameOptionChanged));
            this.slotModelPort.getStages().getInitStage().getInitializeGamePhase().getInitializeGame().subscribe($bind(this, this.handleSlotModelInitGame));
            this.slotModelPort.getStages().getResumeStage().getPrepareResume().subscribe($bind(this, this.handlePrepareResume));
            this.slotModelPort.getStages().getIdleStage().getConfirmSelectedStake().subscribe($bind(this, this.handleConfirmSelectedStake));
            this.slotModelPort.getStages().getIdleStage().getOpenPaytable().subscribe($bind(this, this.handleOpenPaytable));
            this.slotModelPort.getStages().getSpinStage().getStartReelSpin().subscribe($bind(this, this.handleModelSpinStart));
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcome().subscribe($bind(this, this.handleSpinOutcome));
            this.slotModelPort.getStages().getSpinStage().getStopReelSpin().subscribe($bind(this, this.handleModelSpinStop));
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getPresentSpinOutcome().subscribe($bind(this, this.handleSpinOutcomePresent));
            this.slotModelPort.getStages().getResultStage().getPresentResult().subscribe($bind(this, this.handlePresentResult));
            this.slotModelPort.getStages().getPickerBonusStage().getSetPickerIdle().subscribe($bind(this, this.handleSetPickerIdle));
            this.slotModelPort.getStages().getPickerBonusStage().getSelectPickerBonus().subscribe($bind(this, this.handleSelectPickerBonus));
            this.slotModelPort.getStages().getAbortStage().getAbortSpin().subscribe($bind(this, this.handleAbortSpin));
            this.slotModelPort.getStages().getIdleStage().getAutoSpinStarted().subscribe($bind(this, this.onAutospinStarted));
            this.slotModelPort.getStages().getIdleStage().getAutoSpinsStopped().subscribe($bind(this, this.onAutospinStopped));
            this.slotModelPort.getGameCommands().getStartAutoSpinsCommandAvailable().subscribe($bind(this, this.onSpinAvailable));
            this.slotModelPort.getGameCommands().getStopAutoSpinsCommandAvailable().subscribe($bind(this, this.onStopAvailable));
            this.slotModelPort.getGameCommands().getSpinCommandAvailable().subscribe($bind(this, this.handleSpinCommandAvailable));
            this.slotModelPort.getGameCommands().getContinueCommandAvailable().subscribe($bind(this, this.handleContinueCommandAvailable));
            this.slotModelPort.getGameCommands().getPaytableCommandAvailable().subscribe($bind(this, this.handlePaytableCommandAvailable));
            this.slotModelPort.getGameCommands().getStakeCommandAvailable().subscribe($bind(this, this.handleStakeCommandAvailable));
            this.slotModelPort.getStages().getIdleStage().getOpenHelp().subscribe($bind(this, this.onHelpOpen));
            this.betPanelPort.onButtonPressed().subscribe($bind(this, this.onBetPanelButtonPressed));
            this.betPanelPort.onStakeChanged().subscribe($bind(this, this.onBetPanelStakeChanged));
            this.reelsPort.onReelStopped().subscribe($bind(this, this.onReelStopped));
            this.reelsPort.onSpinStopped().subscribe($bind(this, this.onSpinStopped));
            this.reelsPort.onStoppingStarted().subscribe($bind(this, this.onReelStoppingStarted));
            this.reelsPort.onStartSpinReelPictureExit().subscribe($bind(this, this.onReelOutcomeExit));
            this.gameLayoutPort.getGameLayoutUpdated().subscribe($bind(this, this.onGameLayoutUpdated));
            this.winControllerPort.onCurrentWinLine().subscribe($bind(this, this.onWinLineAnimated));
            this.winControllerPort.onWinCycleFinished().subscribe($bind(this, this.onWinCycleFinished));
            this.paytablePort.onCloseButtonPressed().subscribe($bind(this, this.onPaytableClose));
            this.paytablePort.onPageChanged().subscribe($bind(this, this.onPaytablePageChanged));
            this.tutorialPort.getConfirmed().subscribe($bind(this, this.handleTutorialConfirmed));
            this.tutorialPort.getClosed().subscribe($bind(this, this.handleTutorialClose));
            this.tutorialPort.getCurrentPage().subscribe($bind(this, this.handleTutorialPage));
            this.viewManagerPort.getCompleted().subscribe($bind(this, this.handleTransitionCompleted));
            this.viewManagerPort.getUpdated().subscribe($bind(this, this.handleTransitionUpdated));
            this.staticViewsPort.getChoice().subscribe($bind(this, this.handleChoice));
            this.staticViewsPort.getLayoutUpdated().subscribe($bind(this, this.onStaticViewsUpdated));
        };
        scarabGameController.GameController.prototype.attachToEventBus = function() {
            haxe.Log.trace("[GameController]xx [attachToEventBus]", {
                fileName: "GameController.hx",
                lineNumber: 313,
                className: "components.gamecontroller.imp.GameController",
                methodName: "attachToEventBus"
            });
            var bus = scarabGameController.ExternalService.moduleContext.getAnyService(clientkernelEventbusApi.IEventBus, null);
            bus.getChannel("GFBus").subscribe("multipicker:choice", $bind(this, this.handleSelection));
        };
        scarabGameController.GameController.prototype.handleSelection = function(payload) {
            haxe.Log.trace("[GameController]xx [handleSelection]", {
                fileName: "GameController.hx",
                lineNumber: 319,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSelection",
                customParams: [payload]
            });
            this.tensionPort.getHideWildTension().publish(null);
            this.pickerChoice = payload.envelope.data.playerChoice;
            this.setFsReelPicture();
            this.slotModelPort.getStages().getPickerBonusStage().getPickerBonusSelected().publish(new slotModelApi.Pair(_hcmn_.Std.string(this.pickerChoice), _hcmn_.Std.string(this.pickerChoice)));
            haxe.Log.trace("[GameController]xx [handleSelection]", {
                fileName: "GameController.hx",
                lineNumber: 324,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSelection",
                customParams: [this.pickerChoice]
            });
        };
        scarabGameController.GameController.prototype.initGame = function() {
            haxe.Log.trace("[GAME_CONTROLLER] initGame", {
                fileName: "GameController.hx",
                lineNumber: 332,
                className: "components.gamecontroller.imp.GameController",
                methodName: "initGame"
            });
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.slotModelPort.getStages().getInitStage().getGameInitialized().publish(null);
            this.winMeterPort.showMessage().publish("");
            this.changeBackground(this.BG_BASEGAME_IMG);
        };
        scarabGameController.GameController.prototype.initStorage = function() {
            this.storage = new scarabGameController.Storage();
            if (!this.storage.hasOption("tutorialConfirmed")) this.storage.writeOption("tutorialConfirmed", "false");
            var confStorage = this.storage.readOption("tutorialConfirmed");
            if (confStorage == "true") this.tutorialConfirmed = true;
            else this.tutorialConfirmed = false;
            var bus = scarabGameController.ExternalService.bus;
            bus.getChannel("GFBus").publish("testable:testcomponent:tutorialConfirmed", this.tutorialConfirmed);
            haxe.Log.trace("[TUTORIAL] initStorage " + _hcmn_.Std.string(this.tutorialConfirmed), {
                fileName: "GameController.hx",
                lineNumber: 363,
                className: "components.gamecontroller.imp.GameController",
                methodName: "initStorage"
            });
        };
        scarabGameController.GameController.prototype.handleTutorialConfirmed = function(e) {
            if (this.tutorialConfirmed) this.tutorialConfirmed = false;
            else this.tutorialConfirmed = true;
            if (this.storage.hasOption("tutorialConfirmed")) this.storage.writeOption("tutorialConfirmed", _hcmn_.Std.string(this.tutorialConfirmed));
            haxe.Log.trace("[GAME_CONTROLLER] handleTutorialConfirmed " + _hcmn_.Std.string(this.tutorialConfirmed), {
                fileName: "GameController.hx",
                lineNumber: 374,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleTutorialConfirmed"
            });
        };
        scarabGameController.GameController.prototype.handleTutorialPage = function(e) {
            scarabGameController.GameController.soundController.playSoundButtonPush();
            haxe.Log.trace("[GAME_CONTROLLER] handleTutorialPage " + e.getPayload(), {
                fileName: "GameController.hx",
                lineNumber: 380,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleTutorialPage"
            });
            if (this.isResume) return;
            if (e.getPayload() == 3) {
                scarabGameController.GameController.soundController.playSoundButtonPush();
                this.showGameElements();
                if (this.model.getWildCounter() == "10") this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "3"));
                else this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "1"));
                this.tutorialActive = false;
                this.tutorialPort.getHide().publish(null);
            } else {}
            var bus = scarabGameController.ExternalService.bus;
            bus.getChannel("GFBus").publish("testable:testcomponent:currentPage", e.getPayload());
        };
        scarabGameController.GameController.prototype.handleTutorialClose = function(e) {
            this.tutorialActive = false;
            scarabGameController.GameController.soundController.playSoundButtonPush();
            this.showGameElements();
            this.tutorialPort.getHide().publish(null);
            if (this.model.getWildCounter() == "10") this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "3"));
            else this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "1"));
            haxe.Log.trace("[GAME_CONTROLLER] handleTutorialConfirmed " + _hcmn_.Std.string(this.tutorialConfirmed), {
                fileName: "GameController.hx",
                lineNumber: 425,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleTutorialClose"
            });
        };
        scarabGameController.GameController.prototype.initTutorial = function() {
            this.tutorialActive = true;
            haxe.Log.trace("[GAME_CONTROLLER] initTutorial ", {
                fileName: "GameController.hx",
                lineNumber: 431,
                className: "components.gamecontroller.imp.GameController",
                methodName: "initTutorial"
            });
            _hcmn_.haxe_Timer.delay($bind(this, this.hideGameElements), 0);
            this.tutorialPort.getShow().publish(scarabTutorialApi.TutorialLayerEnum.TUTORIAL_VIEW);
        };
        scarabGameController.GameController.prototype.hideGameElements = function() {
            var st = scarabGameController.ExternalService.displayProvider.getDefaultStage();
            var _g1 = 0;
            var _g = st.getNumChildren();
            while (_g1 < _g) {
                var i = _g1++;
                var id = st.getChildAt(i).id;
                haxe.Log.trace("[GAME_CONTROLLER] hideGameElements " + id, {
                    fileName: "GameController.hx",
                    lineNumber: 443,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "hideGameElements"
                });
                var visible = st.getChildAt(i).getVisible();
                this.baseGameElementsVisibility.set(id, visible);
                st.getChildAt(i).setVisible(false);
                if (id == "TUTORIAL_VIEW") st.getChildAt(i).setVisible(true);
            }
        };
        scarabGameController.GameController.prototype.showGameElements = function() {
            var st = scarabGameController.ExternalService.displayProvider.getDefaultStage();
            var $it0 = this.baseGameElementsVisibility.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                var visible = this.baseGameElementsVisibility.get(key);
                st.getChildByID(key).setVisible(visible);
                if (key == "TUTORIAL_VIEW") st.getChildByID(key).setVisible(false);
                haxe.Log.trace("[GAME_CONTROLLER] showBaseGameElements " + key, {
                    fileName: "GameController.hx",
                    lineNumber: 470,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "showGameElements"
                });
            }
        };
        scarabGameController.GameController.prototype.onStaticViewsUpdated = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onStaticViewsUpdated " + e.getPayload(), {
                fileName: "GameController.hx",
                lineNumber: 476,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onStaticViewsUpdated",
                customParams: [this.tutorialActive]
            });
            if (this.tutorialActive) {
                var $it0 = this.baseGameElementsVisibility.keys();
                while ($it0.hasNext()) {
                    var key = $it0.next();
                    if (key == e.getPayload()) this.baseGameElementsVisibility.set(key, true);
                }
                var st = scarabGameController.ExternalService.displayProvider.getDefaultStage();
                st.getChildByID("game_logo_landscape").setVisible(false);
                st.getChildByID("game_logo_portrait").setVisible(false);
            }
        };
        scarabGameController.GameController.prototype.changeBackground = function(id) {
            haxe.Log.trace("[GAME_CONTROLLER] changeBackground", {
                fileName: "GameController.hx",
                lineNumber: 493,
                className: "components.gamecontroller.imp.GameController",
                methodName: "changeBackground"
            });
            this.backgroundPort.showBackground().publish(id);
        };
        scarabGameController.GameController.prototype.prepareResume = function() {
            haxe.Log.trace("[GAME_CONTROLLER] prepareResume stage ", {
                fileName: "GameController.hx",
                lineNumber: 499,
                className: "components.gamecontroller.imp.GameController",
                methodName: "prepareResume",
                customParams: [this.model.spinOutcome.stage]
            });
            haxe.Log.trace("[GAME_CONTROLLER] prepareResume nextStage ", {
                fileName: "GameController.hx",
                lineNumber: 500,
                className: "components.gamecontroller.imp.GameController",
                methodName: "prepareResume",
                customParams: [this.model.spinOutcome.nextStage]
            });
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.PAYTABLE);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
            this.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.bonus_counter));
            this.slotModelPort.getStages().getResumeStage().getResumePrepared().publish(null);
            if (this.model.spinOutcome.nextStage == "FreeSpin") {
                this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_bonus_counter, [
                    [_hcmn_.Std.string(this.model.spinOutcome.freeSpin.current + 1), _hcmn_.Std.string(this.model.spinOutcome.freeSpin.total)]
                ]));
                scarabGameController.GameController.soundController.setGameMode(false, true);
            }
        };
        scarabGameController.GameController.prototype.fsCounterMessage = function() {
            if (this.model.spinOutcome.stage == "FreeSpin") this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_bonus_counter, [
                [_hcmn_.Std.string(this.model.spinOutcome.freeSpin.current), _hcmn_.Std.string(this.model.spinOutcome.freeSpin.total)]
            ]));
        };
        scarabGameController.GameController.prototype.onBaseGameIdle = function() {
            haxe.Log.trace("[GAME_CONTROLLER] onBaseGameIdle", {
                fileName: "GameController.hx",
                lineNumber: 530,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onBaseGameIdle"
            });
            this.isResume = false;
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.showSpinInfoLabel();
            scarabGameController.GameController.soundController.checkBackgroundMusic();
        };
        scarabGameController.GameController.prototype.updateBetPanel = function() {
            haxe.Log.trace("[GAME_CONTROLLER] updateBetPanel", {
                fileName: "GameController.hx",
                lineNumber: 545,
                className: "components.gamecontroller.imp.GameController",
                methodName: "updateBetPanel"
            });
            this.winMeterPort.showMessage().publish(scarabGameController.ExternalService.translationManager.stringLookup("GoodLuck"));
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
        };
        scarabGameController.GameController.prototype.updateBetPanelFS = function() {
            haxe.Log.trace("[GAME_CONTROLLER] updateBetPanelFS", {
                fileName: "GameController.hx",
                lineNumber: 557,
                className: "components.gamecontroller.imp.GameController",
                methodName: "updateBetPanelFS"
            });
            var current = this.model.spinOutcome.freeSpin.current + 1;
            var total = this.model.spinOutcome.freeSpin.total;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_bonus_counter, [
                [current, total]
            ]));
            this.winMeterPort.showMessage().publish("");
            if (!scarabGameController.ExternalService.moneyFormatter.isZero(this.model.spinOutcome.acumulatedPayout)) {
                this.winMeterController.showIntro(this.model.spinOutcome.acumulatedPayout, this.model.spinOutcome.freeSpin.outcome.bigWin);
                this.model.lastAccumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            }
            this.showBonusRemaining();
        };
        scarabGameController.GameController.prototype.showBonusRemaining = function() {
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            if (this.model.retriggerData.bonusesRemaining > 0 && !(function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("awardCapExceeded");
                    return $r;
                }(this))) this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, scarabGameController.ExternalService.translationManager.stringLookup("FS_BonusRemaining", [this.model.retriggerData.bonusesRemaining])));
            else this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
        };
        scarabGameController.GameController.prototype.clearAllWins = function() {
            haxe.Log.trace("[GAME_CONTROLLER] clearAllWins", {
                fileName: "GameController.hx",
                lineNumber: 593,
                className: "components.gamecontroller.imp.GameController",
                methodName: "clearAllWins"
            });
            this.model.setAbortSpinPayload(null);
            this.stopSpinRecieved = false;
            this.infoBarPort.hideWinLineSummary().publish(null);
        };
        scarabGameController.GameController.prototype.startSpin = function() {
            haxe.Log.trace("[GAME_CONTROLLER] startSpin", {
                fileName: "GameController.hx",
                lineNumber: 601,
                className: "components.gamecontroller.imp.GameController",
                methodName: "startSpin"
            });
            this.forcePaytableClose();
            this.reelsPort.show().publish(null);
            this.reelsPort.startSpin().publish(new reelsApi.StartSpinPayload(this.model.startSpinPayload));
            scarabGameController.GameController.soundController.onStartSpin();
            if (this.model.getWildCounter() == "9") scarabGameController.GameController.soundController.playWildAnnouncement(this.model.wilds);
            if ((function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("Stage");
                    return $r;
                }(this)) == "BaseGame" && (function($this) {
                    var $r;
                    var this2 = $this.smContext.get_contextValues();
                    $r = this2.get("NextStage");
                    return $r;
                }(this)) != "FreeSpin" && this.autoPlayActive) this.winMeterPort.showMessage().publish(scarabGameController.ExternalService.translationManager.stringLookup("GoodLuck"));
            if ((function($this) {
                    var $r;
                    var this3 = $this.smContext.get_contextValues();
                    $r = this3.get("Stage");
                    return $r;
                }(this)) == "FreeSpin" && (function($this) {
                    var $r;
                    var this4 = $this.smContext.get_contextValues();
                    $r = this4.get("NextStage");
                    return $r;
                }(this)) != "BaseGame" || (function($this) {
                    var $r;
                    var this5 = $this.smContext.get_contextValues();
                    $r = this5.get("Stage");
                    return $r;
                }(this)) == "Picker" && (function($this) {
                    var $r;
                    var this6 = $this.smContext.get_contextValues();
                    $r = this6.get("NextStage");
                    return $r;
                }(this)) == "FreeSpin") this.showGoodLuckInfoBarLabel();
            this.resetWildTimers();
        };
        scarabGameController.GameController.prototype.checkForStopOrAbort = function() {
            haxe.Log.trace("[GAME_CONTROLLER] checkForStopOrAbort", {
                fileName: "GameController.hx",
                lineNumber: 628,
                className: "components.gamecontroller.imp.GameController",
                methodName: "checkForStopOrAbort"
            });
            if (this.model.abortSpinPayload != null) this.dispatchEvent(scarabGameController.StateMachineDef.ABORT_SPIN);
            else if (this.stopSpinRecieved) this.dispatchEvent(scarabGameController.StateMachineDef.STOP_REEL_SPIN);
        };
        scarabGameController.GameController.prototype.applyAbortData = function() {
            haxe.Log.trace("[GAME_CONTROLLER] applyAbortData", {
                fileName: "GameController.hx",
                lineNumber: 641,
                className: "components.gamecontroller.imp.GameController",
                methodName: "applyAbortData"
            });
            this.applyStakeItemsWithTotalBet(this.model.abortSpinPayload.stake);
            this.reelsPort.setReelPicture().publish(this.model.abortSpinPayload.stake.outcome.reelStop.reels);
            this.winMeterPort.showMessage().publish("");
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
        };
        scarabGameController.GameController.prototype.stopReels = function() {
            haxe.Log.trace("[GAME_CONTROLLER] stopReels", {
                fileName: "GameController.hx",
                lineNumber: 654,
                className: "components.gamecontroller.imp.GameController",
                methodName: "stopReels",
                customParams: [this.model.tensionReels]
            });
            this.reelsPort.stopSpin().publish(new reelsApi.StopSpinPayload(this.model.outcome.reelStop.reels, this.model.tensionReels));
            if (!this.stateMachine.isInState(scarabGameController.StateMachineDef.ABORT_SPIN_STATE)) {}
        };
        scarabGameController.GameController.prototype.showBaseGameOutcome = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] showBaseGameOutcome", {
                fileName: "GameController.hx",
                lineNumber: 671,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showBaseGameOutcome"
            });
            var totalPayout = this.model.spinOutcome.baseGame.outcome.totalPayout;
            if (scarabGameController.ExternalService.moneyFormatter.isZero(totalPayout)) this.publishSpinOutcomePresented();
            else {
                var skipPromise = this.skipController.show();
                var outcome = this.model.spinOutcome.baseGame.outcome;
                var conditionalPlayVBAnimationBig = this.model.isCandidateForAdditionalBigWinAnimation(outcome.totalPayout);
                var winMeterPromise = this.winMeterController.show(outcome.totalPayout, outcome.bigWin, conditionalPlayVBAnimationBig);
                if (outcome.bigWin.winGroup > 4) {
                    scarabGameController.GameController.soundController.playSound("screenshake");
                    this.viewManagerPort.getShake().publish(new scarabViewManagerApi.ShakeProperties(scarabGameController.TransitionConstants.REELS_SHAKE, 15, 2, 10, 1800));
                }
                scarabGameController.GameController.soundController.playWinSound(outcome.bigWin.winGroup, false, conditionalPlayVBAnimationBig);
                Promise.race([skipPromise, winMeterPromise]).then(function(data) {
                    _g.skipController.hide();
                    _g.winMeterController.stop();
                    if (outcome.bigWin.winGroup > 4) _g.viewManagerPort.getReset().publish(scarabGameController.TransitionConstants.REELS_SHAKE);
                    scarabGameController.GameController.soundController.winFinish();
                    var isHighWin = true;
                    if (_g.model.rgPresentation) {
                        if (!_g.model.isHighWin()) isHighWin = false;
                    }
                    var payload = new winControllerApi.ShowWinPayload(_g.model.spinOutcome.baseGame.outcome, true, null, isHighWin);
                    var winPromise = _g.winControllerPort.showWin().request(payload, 0);
                    if (_g.autoPlayActive) {
                        _g.showSpinButtonInsideAutoplay = true;
                        var spinInsideAutoplayPromise = _g.showSpinInsideAutoplay();
                        var forceStopAutoPlayPromise = _g.forceStopAutoPlay();
                        var promiseWait = Promise.race([winPromise, spinInsideAutoplayPromise, forceStopAutoPlayPromise]);
                        promiseWait.then(function(value) {
                            _g.showSpinButtonInsideAutoplay = false;
                            if (value == "AUTOSPIN-STOP") {
                                _g.publishSpinOutcomePresented();
                                return;
                            }
                            _g.hideSpinInsideAutoplay();
                            _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                            _g.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
                            _g.winControllerPort.dispose().publish(null);
                            _g.infoBarPort.hideWinLineSummary().publish(null);
                            _g.publishSpinOutcomePresented();
                        });
                    } else _g.publishSpinOutcomePresented();
                });
            }
        };
        scarabGameController.GameController.prototype.showFreeSpinSummary = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] showFreeSpinSummary", {
                fileName: "GameController.hx",
                lineNumber: 757,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showFreeSpinSummary"
            });
            this.freeSpinCompleted = true;
            if (this.model.getWildCounter() == "10") this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "2"));
            else this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "1"));
            if (scarabGameController.ExternalService.moneyFormatter.isZero(this.resultPayload.totalWin)) {
                this.skipController.hide();
                this.reelsPort.show().publish(null);
                this.reelsPort.setReelPicture().publish(this.model.spinOutcome.baseGame.outcome.reelStop.reels);
                var payload = new winControllerApi.ShowWinPayload(this.model.spinOutcome.baseGame.outcome);
                this.winControllerPort.showWin().request(payload, 0);
                if (this.model.spinOutcome.baseGame.outcome.bonusWins != null) {}
                this.dispatchEvent(scarabGameController.StateMachineDef.CONTINUE);
                return;
            }
            var skipPromise = this.skipController.show();
            var conditionalPlayVBAnimationBig = this.model.isCandidateForAdditionalBigWinAnimation(this.resultPayload.totalWin);
            var winMeterPromise = this.winMeterController.show(this.resultPayload.totalWin, this.resultPayload.bigWin, conditionalPlayVBAnimationBig);
            scarabGameController.GameController.soundController.playWinSound(this.resultPayload.bigWin.winGroup, false, conditionalPlayVBAnimationBig);
            if (this.resultPayload.bigWin.winGroup > 4) {
                scarabGameController.GameController.soundController.playSound("screenshake");
                this.viewManagerPort.getShake().publish(new scarabViewManagerApi.ShakeProperties(scarabGameController.TransitionConstants.REELS_SHAKE, 15, 2, 10, 1800));
            }
            Promise.race([skipPromise, winMeterPromise]).then(function(o) {
                _g.skipController.hide();
                _g.winMeterController.stop();
                if (_g.resultPayload.bigWin.winGroup > 4) _g.viewManagerPort.getReset().publish(scarabGameController.TransitionConstants.REELS_SHAKE);
                scarabGameController.GameController.soundController.winFinish();
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.TOTAL_BET);
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.PAYTABLE);
                _g.reelsPort.setReelPicture().publish(_g.model.spinOutcome.baseGame.outcome.reelStop.reels);
                var isHighWin = true;
                if (_g.model.rgPresentation) {
                    if (!_g.model.isAccumulatedHighWin()) isHighWin = false;
                }
                var payload1 = new winControllerApi.ShowWinPayload(_g.model.spinOutcome.baseGame.outcome, true, null, isHighWin);
                _g.winControllerPort.showWin().request(payload1, 0);
                _g.dispatchEvent(scarabGameController.StateMachineDef.CONTINUE);
                _g.model.lastAccumulatedPayout = null;
            });
            this.reelsPort.show().publish(null);
        };
        scarabGameController.GameController.prototype.hideInfoBar = function() {
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
        };
        scarabGameController.GameController.prototype.publishSpinOutcomePresented = function() {
            haxe.Log.trace("[GAME_CONTROLLER] publishSpinOutcomePresented", {
                fileName: "GameController.hx",
                lineNumber: 839,
                className: "components.gamecontroller.imp.GameController",
                methodName: "publishSpinOutcomePresented"
            });
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcomePresented().publish(null);
        };
        scarabGameController.GameController.prototype.publishResultPresented = function() {
            haxe.Log.trace("[GAME_CONTROLLER] publishResultPresented", {
                fileName: "GameController.hx",
                lineNumber: 849,
                className: "components.gamecontroller.imp.GameController",
                methodName: "publishResultPresented"
            });
            this.slotModelPort.getStages().getResultStage().getResultPresented().publish(null);
        };
        scarabGameController.GameController.prototype.showAwardCapScreen = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] showAwardCapScreen", {
                fileName: "GameController.hx",
                lineNumber: 860,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showAwardCapScreen",
                customParams: [this.resultPayload.totalWin]
            });
            scarabGameController.GameController.soundController.setGameMode(false, false, false, true);
            this.resetWildTimers();
            this.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wilds);
            haxe.Log.trace("[GAME_CONTROLLER] showAwardCapScreen " + this.model.getWildCounter(), {
                fileName: "GameController.hx",
                lineNumber: 867,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showAwardCapScreen",
                customParams: [this.model.wilds]
            });
            if (this.model.getWildCounter() == "10") this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "3"));
            else this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "1"));
            this.winMeterPort.displayWin().publish(new winMeterApi.WinMeterPayload(this.resultPayload.totalWin, null, true));
            if (this.model.spinOutcome.stage.indexOf("FreeSpin") > -1) {
                this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_award_cap, [
                    [this.getString("fs_award_cap_0"), this.getString("fs_award_cap_1"), scarabGameController.ExternalService.translationManager.stringLookup("fs_award_cap_2", [scarabGameController.ExternalService.moneyFormatter.format(this.resultPayload.totalWin)])]
                ]));
                this.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_bonus_counter));
                this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
                _hcmn_.haxe_Timer.delay(function() {
                    _g.dispatchEvent(scarabGameController.StateMachineDef.CONTINUE);
                    _g.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.bonus_counter, [
                        [_g.model.getWildCounter()]
                    ]));
                    _g.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_award_cap));
                }, 5000);
            } else {
                if (this.autoPlayActive) {
                    this.slotModelPort.getGameCommands().getStopAutoSpinsCommandExecuted().publish(null);
                    this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.PLAY_BUTTON_STATE);
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                    this.autoPlayActive = false;
                }
                this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.award_cap, [
                    [this.getString("award_cap_0"), this.getString("award_cap_1"), scarabGameController.ExternalService.translationManager.stringLookup("award_cap_2", [scarabGameController.ExternalService.moneyFormatter.format(this.resultPayload.totalWin)])]
                ]));
                _hcmn_.haxe_Timer.delay(function() {
                    _g.dispatchEvent(scarabGameController.StateMachineDef.CONTINUE);
                    _g.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.award_cap));
                }, 5000);
            }
        };
        scarabGameController.GameController.prototype.showScatterWins = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] showScatterWins", {
                fileName: "GameController.hx",
                lineNumber: 912,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showScatterWins"
            });
            var outcome = new slotModelApi.Outcome(this.model.outcome.reelStop, this.model.outcome.reelStopAdditional, null, this.model.outcome.scatterWins, null, null, null, null, null);
            this.stopAutoplayInFS();
            if (this.model.getWildCounter() != "10") this.winControllerPort.showWin().request(new winControllerApi.ShowWinPayload(outcome, false, null, true), 0).then(function(data) {
                _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                _g.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
                _g.winControllerPort.dispose().publish(null);
                _g.dispatchEvent(scarabGameController.StateMachineDef.SET_PICKER_INTRO);
            });
            else this.dispatchEvent(scarabGameController.StateMachineDef.SET_PICKER_INTRO);
        };
        scarabGameController.GameController.prototype.showPicker = function() {
            var _g = this;
            haxe.Log.trace("[GameController] [showPicker] ", {
                fileName: "GameController.hx",
                lineNumber: 948,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showPicker",
                customParams: [this.isResume]
            });
            this.freeSpinCompleted = false;
            if (this.model.retryChoice) {
                this.staticViewsPort.getEnable().publish(scarabStaticViewsApi.StaticViewTypeEnum.picker);
                this.setAvailablePicks();
                this.model.retryChoice = false;
                return;
            }
            this.resetWildTimers();
            this.tensionPort.getHideTension().publish(null);
            this.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wilds);
            this.hideInfoBar();
            scarabGameController.GameController.soundController.setGameMode(false, false, true);
            this.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.bonus_counter));
            this.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_bonus_counter));
            if (this.isResume) {
                this.viewManagerPort.getHide().publish(scarabGameController.TransitionConstants.REMOVE_REELS);
                _hcmn_.haxe_Timer.delay(function() {
                    _g.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PICKER_INITIAL);
                }, 1500);
            } else {
                this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.REMOVE_REELS);
                this.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "dust_up_vb", new displayEngineApi.Point(0, 150)));
                _hcmn_.haxe_Timer.delay(function() {
                    _g.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "dust_vb", new displayEngineApi.Point(0, 740)));
                }, 500);
            }
        };
        scarabGameController.GameController.prototype.setAvailablePicks = function() {
            var bus = scarabGameController.ExternalService.moduleContext.getAnyService(clientkernelEventbusApi.IEventBus, null);
            var pickerData = {};
            var availablePicks = new _hcmn_.haxe_ds_StringMap();
            var _g1 = 0;
            var _g = this.model.pickerData.length;
            while (_g1 < _g) {
                var i = _g1++;
                haxe.Log.trace("model.pickerData " + _hcmn_.Std.string(this.model.pickerData[i]), {
                    fileName: "GameController.hx",
                    lineNumber: 997,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "setAvailablePicks"
                });
                availablePicks.set(_hcmn_.Std.string(i + 1), true);
            }
            pickerData.availablePicks = availablePicks;
            pickerData.instanceId = "fs";
            var bus1 = scarabGameController.ExternalService.moduleContext.getAnyService(clientkernelEventbusApi.IEventBus, null);
            bus1.getChannel("GFBus").publish("multipicker:availablePicks", pickerData);
            haxe.Log.trace("[GameController]xx [setAvailablePicks]", {
                fileName: "GameController.hx",
                lineNumber: 1004,
                className: "components.gamecontroller.imp.GameController",
                methodName: "setAvailablePicks",
                customParams: [availablePicks]
            });
        };
        scarabGameController.GameController.prototype.prepareFreeSpin = function() {
            var _g = this;
            var pickedChoise = this.model.spinOutcome.baseGame.outcome.customField.currentPick;
            this.showPickerOutro(pickedChoise).then(function(o) {
                _g.showPickerOutro2();
            });
            this.isFreeSpin = true;
        };
        scarabGameController.GameController.prototype.showPickerOutro2 = function() {
            var _g = this;
            var totalWilds = this.model.pickerData[this.pickerChoice - 1][1];
            this.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wilds);
            haxe.Log.trace("[GAME_CONTROLLER] handleChoice " + this.pickerChoice, {
                fileName: "GameController.hx",
                lineNumber: 1020,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showPickerOutro2"
            });
            haxe.Log.trace("[GAME_CONTROLLER] handleChoice: model.wildPositions  " + _hcmn_.Std.string(this.model.wildPositions), {
                fileName: "GameController.hx",
                lineNumber: 1021,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showPickerOutro2"
            });
            haxe.Log.trace("[GAME_CONTROLLER] handleChoice: model.pickerData  " + _hcmn_.Std.string(this.model.pickerData), {
                fileName: "GameController.hx",
                lineNumber: 1022,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showPickerOutro2"
            });
            haxe.Log.trace("[GAME_CONTROLLER] handleChoice: model.pickerData  " + this.model.pickerData[this.pickerChoice - 1][1], {
                fileName: "GameController.hx",
                lineNumber: 1023,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showPickerOutro2"
            });
            haxe.Log.trace("[GAME_CONTROLLER] handleChoice: totalWilds ", {
                fileName: "GameController.hx",
                lineNumber: 1024,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showPickerOutro2",
                customParams: [totalWilds]
            });
            var positions = [];
            var cell = 0;
            var _g1 = 0;
            while (_g1 < totalWilds) {
                var i = _g1++;
                positions[i] = "C" + cell + "R" + this.random(0, 5);
                cell++;
                if (cell >= this.model.reelsNum) cell = 0;
            }
            this.wildsPort.getShowFreeSpinWilds().publish(totalWilds);
            this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "1"));
            _hcmn_.haxe_Timer.delay(function() {
                _g.wildsPort.getTransition().publish(new scarabWildsApi.WildTransitionPayload(positions, "1", 1000, 0));
                _hcmn_.haxe_Timer.delay(function() {
                    _g.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.REMOVE_PICKER);
                    scarabGameController.GameController.soundController.setGameMode(true, false, false);
                }, 1000);
            }, 1000);
        };
        scarabGameController.GameController.prototype.handleChoice = function(e) {
            this.tensionPort.getHideWildTension().publish(null);
            this.pickerChoice = e.getPayload();
            this.setFsReelPicture();
            this.slotModelPort.getStages().getPickerBonusStage().getPickerBonusSelected().publish(new slotModelApi.Pair(_hcmn_.Std.string(this.pickerChoice), _hcmn_.Std.string(this.pickerChoice)));
        };
        scarabGameController.GameController.prototype.abortPicker = function() {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                _g.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
            }, 1000);
        };
        scarabGameController.GameController.prototype.showFreeSpinOutcome = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] showFreeSpinOutcome ", {
                fileName: "GameController.hx",
                lineNumber: 1072,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showFreeSpinOutcome",
                customParams: [this.model.outcome.reelStop.reels]
            });
            var accumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            var payout = this.model.spinOutcome.freeSpin.outcome.totalPayout;
            haxe.Log.trace("[GAME_CONTROLLER] showFreeSpinOutcome payout ", {
                fileName: "GameController.hx",
                lineNumber: 1077,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showFreeSpinOutcome",
                customParams: [!scarabGameController.ExternalService.moneyFormatter.isZero(payout)]
            });
            if (!scarabGameController.ExternalService.moneyFormatter.isZero(payout)) {
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.RIGHT, scarabGameController.ExternalService.translationManager.stringLookup("FreeSpinPays", [scarabGameController.ExternalService.moneyFormatter.format(payout)])));
                var fsOutcome = this.model.spinOutcome.freeSpin.outcome;
                var skipPromise = this.skipController.show();
                var winMeterPromise = null;
                if (!scarabGameController.ExternalService.moneyFormatter.isZero(payout)) {
                    var conditionalPlayVBAnimationBig = this.model.isCandidateForAdditionalBigWinAnimation(payout);
                    winMeterPromise = this.winMeterController.showInFS(accumulatedPayout, this.model.spinOutcome.freeSpin.outcome.bigWin, this.model.lastAccumulatedPayout, conditionalPlayVBAnimationBig);
                    scarabGameController.GameController.soundController.playWinSound(fsOutcome.bigWin.winGroup, true, conditionalPlayVBAnimationBig);
                }
                haxe.Log.trace("[GAME_CONTROLLER] showFreeSpinOutcome pay ", {
                    fileName: "GameController.hx",
                    lineNumber: 1100,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "showFreeSpinOutcome",
                    customParams: [!scarabGameController.ExternalService.moneyFormatter.isZero(payout)]
                });
                this.model.lastAccumulatedPayout = accumulatedPayout;
                if (fsOutcome.bigWin.winGroup > 4) {
                    scarabGameController.GameController.soundController.playSound("screenshake");
                    this.viewManagerPort.getShake().publish(new scarabViewManagerApi.ShakeProperties(scarabGameController.TransitionConstants.REELS_SHAKE, 15, 2, 10, 1800));
                }
                Promise.race([winMeterPromise, skipPromise]).then(function(data) {
                    _g.skipController.hide();
                    _g.winMeterController.stop();
                    if (fsOutcome.bigWin.winGroup > 4) _g.viewManagerPort.getReset().publish(scarabGameController.TransitionConstants.REELS_SHAKE);
                    scarabGameController.GameController.soundController.winFinish();
                    var isHighWin = true;
                    if (_g.model.rgPresentation) {
                        if (!_g.model.isHighWin()) isHighWin = false;
                    }
                    var showWinPayload = new winControllerApi.ShowWinPayload(_g.model.outcome, false, null, isHighWin);
                    var winAnimPromise = _g.winControllerPort.showWin().request(showWinPayload, 0);
                    _g.showSpinButtonDuringFreeSpin = true;
                    var spinInsideFreeSpinPromise = _g.showSpinInsideFreeSpin();
                    Promise.race([winAnimPromise, spinInsideFreeSpinPromise]).then(function(data1) {
                        _g.showSpinButtonDuringFreeSpin = false;
                        _g.hideSpinDuringFreeSpin();
                        _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                        _g.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
                        _g.winControllerPort.dispose().publish(null);
                        _g.dispatchEvent(scarabGameController.StateMachineDef.FS_OUTCOME_DONE);
                    });
                });
            } else this.dispatchEvent(scarabGameController.StateMachineDef.FS_OUTCOME_DONE);
        };
        scarabGameController.GameController.prototype.showRetriggerScreen = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] showRetriggerScreen", {
                fileName: "GameController.hx",
                lineNumber: 1156,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showRetriggerScreen",
                customParams: [(function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("retrigger");
                    return $r;
                }(this))]
            });
            var maxRetriggerReached = this.model.retriggerData.maxRetrigger;
            if ((function($this) {
                    var $r;
                    var this2 = $this.smContext.get_contextValues();
                    $r = this2.get("retrigger");
                    return $r;
                }(this)) && (function($this) {
                    var $r;
                    var this3 = $this.smContext.get_contextValues();
                    $r = this3.get("awardCapExceeded");
                    return $r;
                }(this)) != true) {
                var this4 = this.smContext.get_contextValues();
                this4.set("retrigger", false);
            }
            if (!maxRetriggerReached) {
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, scarabGameController.ExternalService.translationManager.stringLookup("FreeSpinsRetriggeredInfo")));
                this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_summary, [
                    [this.getString("FS_RETRIGGER_0"), this.getString("FS_RETRIGGER_1"), this.getString("FS_RETRIGGER_2"), ""]
                ]));
                this.viewManagerPort.getHide().publish(scarabGameController.TransitionConstants.WILDS);
                _hcmn_.haxe_Timer.delay(function() {
                    _g.dispatchEvent(scarabGameController.StateMachineDef.RETRIGGER_SHOWN);
                    _g.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_summary));
                    _g.viewManagerPort.getShow().publish(scarabGameController.TransitionConstants.WILDS);
                }, this.config.fs_RetriggerScreenDuration);
            } else {
                this.showBonusRemaining();
                this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_summary, [
                    [this.getString("FS_MAX_RETRIGGER_0"), this.getString("FS_MAX_RETRIGGER_1"), this.getString("FS_MAX_RETRIGGER_2"), ""]
                ]));
                this.viewManagerPort.getHide().publish(scarabGameController.TransitionConstants.WILDS);
                _hcmn_.haxe_Timer.delay(function() {
                    _g.dispatchEvent(scarabGameController.StateMachineDef.RETRIGGER_SHOWN);
                    _g.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_summary));
                    _g.viewManagerPort.getShow().publish(scarabGameController.TransitionConstants.WILDS);
                }, this.config.fs_MaxRetriggerScreenDuration);
            }
        };
        scarabGameController.GameController.prototype.startFSOutroAnim = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] startFSOutroAnim", {
                fileName: "GameController.hx",
                lineNumber: 1200,
                className: "components.gamecontroller.imp.GameController",
                methodName: "startFSOutroAnim"
            });
            this.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
            this.winControllerPort.dispose().publish(null);
            this.reelsPort.hide().publish(null);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideWinLineSummary().publish(null);
            scarabGameController.GameController.soundController.afterLastFreeSpin();
            this.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_bonus_counter));
            if (!scarabGameController.ExternalService.moneyFormatter.isZero(this.model.spinOutcome.acumulatedFreeSpinPayout)) this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_summary, [
                [this.getString("fs_outro_0"), this.getString("fs_outro_1"), scarabGameController.ExternalService.moneyFormatter.format(this.model.spinOutcome.acumulatedFreeSpinPayout), ""]
            ]));
            else this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_summary, [
                ["", "", "", this.getString("fs_summary_3")]
            ]));
            _hcmn_.haxe_Timer.delay(function() {
                _g.dispatchEvent(scarabGameController.StateMachineDef.FS_OUTRO_END);
                scarabGameController.GameController.soundController.setGameMode(false, false, false, true);
                _g.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.fs_summary));
                _g.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.bonus_counter, [
                    [_g.model.getWildCounter()]
                ]));
            }, this.config.fs_SummaryDuration);
            haxe.Log.trace("[GameController] [startFSOutroAnim] ", {
                fileName: "GameController.hx",
                lineNumber: 1240,
                className: "components.gamecontroller.imp.GameController",
                methodName: "startFSOutroAnim",
                customParams: [this.isFreeSpin, this.model.getWildCounter()]
            });
            this.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wilds);
        };
        scarabGameController.GameController.prototype.setBaseGameOutcome = function() {
            haxe.Log.trace("[GAME_CONTROLLER] setBaseGameOutcome ", {
                fileName: "GameController.hx",
                lineNumber: 1251,
                className: "components.gamecontroller.imp.GameController",
                methodName: "setBaseGameOutcome",
                customParams: [this.model.spinOutcome.baseGame.outcome]
            });
            this.model.setOutcome(this.model.spinOutcome.baseGame.outcome);
            this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
            if (!(function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("awardCapExceeded");
                    return $r;
                }(this))) this.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wilds);
        };
        scarabGameController.GameController.prototype.executeContinueCommand = function() {
            var _g = this;
            haxe.Log.trace("[GAME_CONTROLLER] executeContinueCommand:stage:" + this.model.spinOutcome.stage, {
                fileName: "GameController.hx",
                lineNumber: 1267,
                className: "components.gamecontroller.imp.GameController",
                methodName: "executeContinueCommand"
            });
            if (this.model.spinOutcome.stage == "FreeSpin") {
                var payout = this.model.spinOutcome.freeSpin.outcome.totalPayout;
                if (scarabGameController.ExternalService.moneyFormatter.isZero(payout)) _hcmn_.haxe_Timer.delay(function() {
                    _g.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
                }, this.config.fs_NoWinSpinDelay);
                else this.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
            } else _hcmn_.haxe_Timer.delay(function() {
                _g.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
            }, this.config.fs_FirstSpinDelay);
        };
        scarabGameController.GameController.prototype.handleBalanceUpdate = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleBalanceUpdate", {
                fileName: "GameController.hx",
                lineNumber: 1302,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleBalanceUpdate"
            });
            var payload = e.getPayload();
            if (payload.freespin != null) {
                haxe.Log.trace("GAME_CONTORLLER -> PROMOFREESPINS AWARDED:" + payload.freespin, {
                    fileName: "GameController.hx",
                    lineNumber: 1306,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "handleBalanceUpdate"
                });
                this.promotionalSpinsActive = true;
                this.promotionalSpinsCount = payload.freespin;
                this.betPanelPort.setBalance().publish(scarabGameController.ExternalService.translationManager.stringLookup("BalanceValueNotAvailable"));
                this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            } else this.betPanelPort.setBalance().publish(payload.balance);
        };
        scarabGameController.GameController.prototype.handleGameOptionChanged = function(e) {
            var type = e.getPayload().key;
            var value = _hcmn_.Std.parseInt(e.getPayload().value);
            if (type == "sound") {
                if (value == 0) {
                    this.betPanelPort.enableButton().publish(betPanelApi.EButton.SOUND_ON);
                    scarabGameController.GameController.soundController.turnSoundOn();
                } else {
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.SOUND_OFF);
                    scarabGameController.GameController.soundController.turnSoundOff();
                }
            }
        };
        scarabGameController.GameController.prototype.handleSlotModelInitGame = function(e) {
            this.applyStakeItemsWithTotalBet(e.getPayload().defaultStake);
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.model.denomination = e.getPayload().riskControlSettings.denomination;
            this.model.rgPresentation = e.getPayload().riskControlSettings.rgPresentation;
            this.model.updateWilds();
            this.isFreeSpin = false;
            this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.bonus_counter, [
                [this.model.getWildCounter()]
            ]));
            this.tensionPort.getShowWildTension().publish(_hcmn_.Std.parseInt(this.model.getWildCounter()));
            this.dispatchEvent(scarabGameController.StateMachineDef.INIT_ACTION);
            if (!this.tutorialConfirmed) this.initTutorial();
            else {
                this.tutorialPort.getHide().publish(null);
                var wildsState = "1";
                if (this.model.getWildCounter() == "10") wildsState = "3";
                this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, wildsState));
            }
            haxe.Log.trace("[GAME_CONTROLLER] handleSlotModelInitGame wilds " + _hcmn_.Std.string(this.model.wilds), {
                fileName: "GameController.hx",
                lineNumber: 1369,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSlotModelInitGame"
            });
        };
        scarabGameController.GameController.prototype.handleSetPickerIdle = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleSetPickerIdle", {
                fileName: "GameController.hx",
                lineNumber: 1374,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSetPickerIdle"
            });
            this.dispatchEvent(scarabGameController.StateMachineDef.SET_PICKER_IDLE);
        };
        scarabGameController.GameController.prototype.handleSelectPickerBonus = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleSelectPickerBonus", {
                fileName: "GameController.hx",
                lineNumber: 1380,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSelectPickerBonus"
            });
            var pickerChoices = e.getPayload();
            var pickDataStr = [];
            var _g = 0;
            while (_g < pickerChoices.length) {
                var pair = pickerChoices[_g];
                ++_g;
                var str = pair.value.split(",")[3];
                var a = str.substring(str.indexOf("Wilds") + 5);
                pickDataStr.push([_hcmn_.Std.string(pair.value.split(",")[1]), a]);
            }
            this.model.pickerDataStr = pickDataStr;
        };
        scarabGameController.GameController.prototype.handlePrepareResume = function(e) {
            this.isResume = true;
            this.isFreeSpin = true;
            var resumePayload = e.getPayload();
            haxe.Log.trace("[GAME_CONTROLLER] handlePrepareResume " + _hcmn_.Std.string(resumePayload.stake), {
                fileName: "GameController.hx",
                lineNumber: 1407,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handlePrepareResume"
            });
            haxe.Log.trace("[GAME_CONTROLLER] handlePrepareResume stage " + e.getPayload().spinOutcome.stage, {
                fileName: "GameController.hx",
                lineNumber: 1408,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handlePrepareResume"
            });
            haxe.Log.trace("[GAME_CONTROLLER] handlePrepareResume nextStage " + e.getPayload().spinOutcome.nextStage, {
                fileName: "GameController.hx",
                lineNumber: 1409,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handlePrepareResume"
            });
            this.model.rgPresentation = e.getPayload().initializationProperties.riskControlSettings.rgPresentation;
            this.model.setSpinOutcome(resumePayload.spinOutcome);
            this.model.denomination = e.getPayload().initializationProperties.riskControlSettings.denomination;
            this.model.updateWilds();
            this.smContext.setContextValue("Stage", e.getPayload().spinOutcome.stage);
            this.smContext.setContextValue("NextStage", e.getPayload().spinOutcome.nextStage);
            this.smContext.setContextValue("awardCapExceeded", e.getPayload().spinOutcome.awardCapExceeded);
            this.applyStakeItemsWithTotalBet(resumePayload.stake);
            this.dispatchEvent(scarabGameController.StateMachineDef.PREPARE_RESUME);
            this.tutorialPort.getHide().publish(null);
            this.tensionPort.getHideWildTension().publish(null);
            if (this.model.currentPick != -1) {
                var totalWilds = this.model.pickerData[this.model.currentPick - 1][1];
                var positions = [];
                var cell = 0;
                var _g = 0;
                while (_g < totalWilds) {
                    var i = _g++;
                    positions[i] = "C" + cell + "R" + this.random(0, 5);
                    cell++;
                    if (cell >= this.model.reelsNum) cell = 0;
                }
                this.wildsPort.getShowFreeSpinWilds().publish(totalWilds);
                haxe.Log.trace("[GAME_CONTROLLER] handlePrepareResume totalWilds " + totalWilds, {
                    fileName: "GameController.hx",
                    lineNumber: 1439,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "handlePrepareResume"
                });
                haxe.Log.trace("[GAME_CONTROLLER] handlePrepareResume positions " + _hcmn_.Std.string(positions), {
                    fileName: "GameController.hx",
                    lineNumber: 1440,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "handlePrepareResume"
                });
                haxe.Log.trace("[GAME_CONTROLLER] handlePrepareResume stage " + e.getPayload().spinOutcome.stage, {
                    fileName: "GameController.hx",
                    lineNumber: 1441,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "handlePrepareResume"
                });
                haxe.Log.trace("[GAME_CONTROLLER] handlePrepareResume nextStage " + e.getPayload().spinOutcome.nextStage, {
                    fileName: "GameController.hx",
                    lineNumber: 1442,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "handlePrepareResume"
                });
                haxe.Log.trace("[GAME_CONTROLLER] handlePrepareResume customField " + _hcmn_.Std.string(this.model.outcome.customField), {
                    fileName: "GameController.hx",
                    lineNumber: 1443,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "handlePrepareResume"
                });
            }
        };
        scarabGameController.GameController.prototype.handleConfirmSelectedStake = function(e) {
            this.winMeterPort.showMessage().publish("");
            this.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
            this.winControllerPort.dispose().publish(null);
            this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
            this.applyStakeItemsWithTotalBet(e.getPayload());
        };
        scarabGameController.GameController.prototype.handleTransitionCompleted = function(e) {
            var _g = this;
            var scenarioId = e.getPayload();
            haxe.Log.trace("VIEW_MANAGER.x handleTransitionCompleted " + scenarioId, {
                fileName: "GameController.hx",
                lineNumber: 1468,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleTransitionCompleted"
            });
            if (scenarioId == scarabGameController.TransitionConstants.REMOVE_REELS) {
                this.viewManagerPort.getHide().publish(scarabGameController.TransitionConstants.REMOVE_REELS);
                this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.REELS_REMOVED);
            } else if (scenarioId == scarabGameController.TransitionConstants.REELS_REMOVED) this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PICKER_INITIAL);
            else if (scenarioId == scarabGameController.TransitionConstants.PICKER_INITIAL) {
                this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.picker, this.model.pickerDataStr));
                this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PRESENT_PICKER);
            } else if (scenarioId == scarabGameController.TransitionConstants.PRESENT_PICKER) this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PICKER_PRESENTED);
            else if (scenarioId == scarabGameController.TransitionConstants.PICKER_PRESENTED) {
                this.staticViewsPort.getEnable().publish(scarabStaticViewsApi.StaticViewTypeEnum.picker);
                this.setAvailablePicks();
            } else if (scenarioId == scarabGameController.TransitionConstants.REMOVE_PICKER) this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PICKER_REMOVED);
            else if (scenarioId == scarabGameController.TransitionConstants.PICKER_REMOVED) {
                this.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.picker));
                this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.SET_REELS_INIT_AFTER_PICKER);
                this.tensionPort.getHideWildTension().publish(null);
            } else if (scenarioId == scarabGameController.TransitionConstants.SET_REELS_INIT_AFTER_PICKER) {
                this.viewManagerPort.getShow().publish(scarabGameController.TransitionConstants.PRESENT_REELS);
                this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PRESENT_REELS);
                this.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "dust_vb", new displayEngineApi.Point(0, 740)));
                _hcmn_.haxe_Timer.delay(function() {
                    _g.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "dust_up_vb", new displayEngineApi.Point(0, 150)));
                }, 750);
            } else if (scenarioId == scarabGameController.TransitionConstants.PRESENT_REELS) {
                this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
                this.tensionPort.getHideWildTension().publish(null);
            } else if (scenarioId == scarabGameController.TransitionConstants.REELS_PRESENTED) this.publishSpinOutcomePresented();
        };
        scarabGameController.GameController.prototype.handleTransitionUpdated = function(e) {
            var _g = this;
            haxe.Log.trace("VIEW_MANAGER.x handleTransitionUpdated: " + (function($this) {
                var $r;
                var this1 = e.getPayload();
                $r = this1.toString();
                return $r;
            }(this)), {
                fileName: "GameController.hx",
                lineNumber: 1531,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleTransitionUpdated"
            });
            var scenarios = e.getPayload();
            if (scenarios.get(scarabGameController.TransitionConstants.REMOVE_REELS)) _hcmn_.haxe_Timer.delay(function() {
                _g.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PICKER_INITIAL);
                _g.viewManagerPort.getHide().publish(scarabGameController.TransitionConstants.REMOVE_REELS);
            }, 0);
            if (scenarios.get(scarabGameController.TransitionConstants.REELS_REMOVED)) _hcmn_.haxe_Timer.delay(function() {
                _g.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PICKER_INITIAL);
            }, 0);
            if (scenarios.get(scarabGameController.TransitionConstants.PICKER_INITIAL)) _hcmn_.haxe_Timer.delay(function() {
                _g.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.picker, _g.model.pickerDataStr));
                _g.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.PICKER_PRESENTED);
            }, 0);
            if (scenarios.get(scarabGameController.TransitionConstants.PRESENT_PICKER)) _hcmn_.haxe_Timer.delay(function() {
                _g.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.picker, _g.model.pickerDataStr));
                _g.staticViewsPort.getEnable().publish(scarabStaticViewsApi.StaticViewTypeEnum.picker);
                _g.setAvailablePicks();
            }, 0);
            if (scenarios.get(scarabGameController.TransitionConstants.REMOVE_PICKER)) _hcmn_.haxe_Timer.delay(function() {
                _g.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.picker));
                _g.viewManagerPort.getShow().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
                _g.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
                _g.tensionPort.getHideWildTension().publish(null);
            }, 0);
            if (scenarios.get(scarabGameController.TransitionConstants.PICKER_REMOVED)) _hcmn_.haxe_Timer.delay(function() {
                _g.staticViewsPort.getHide().publish(new scarabStaticViewsApi.HideStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.picker));
                _g.viewManagerPort.getShow().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
                _g.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
                _g.tensionPort.getHideWildTension().publish(null);
            }, 0);
            if (scenarios.get(scarabGameController.TransitionConstants.SET_REELS_INIT_AFTER_PICKER)) {
                this.viewManagerPort.getShow().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
                this.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
            }
            if (scenarios.get(scarabGameController.TransitionConstants.PRESENT_REELS)) _hcmn_.haxe_Timer.delay(function() {
                _g.viewManagerPort.getShow().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
                _g.viewManagerPort.getActivate().publish(scarabGameController.TransitionConstants.REELS_PRESENTED);
            }, 0);
            if (scenarios.get(scarabGameController.TransitionConstants.REELS_PRESENTED)) this.publishSpinOutcomePresented();
        };
        scarabGameController.GameController.prototype.applyStakeItemsWithTotalBet = function(stake) {
            haxe.Log.trace("[GAME_CONTROLLER] applyStakeItemsWithTotalBet ", {
                fileName: "GameController.hx",
                lineNumber: 1607,
                className: "components.gamecontroller.imp.GameController",
                methodName: "applyStakeItemsWithTotalBet",
                customParams: [stake]
            });
            this.model.setOutcome(stake.outcome);
            this.model.setCurrentStake(stake);
            this.resetWildTimers();
            this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
            this.betPanelPort.setStake().publish(stake);
            this.betsArray = stake.totalBetsForSelectedLines;
            this.previousBPL = parseFloat(stake.stakeItems.betPerLine);
            this.resultPayload = null;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.tensionPort.getShowWildTension().publish(_hcmn_.Std.parseInt(this.model.getWildCounter()));
            if (!this.isFreeSpin) {
                this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.bonus_counter, [
                    [this.model.getWildCounter()]
                ]));
                this.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wilds);
                if (this.model.getWildCounter() == "10") this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "3"));
                else this.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(this.model.wilds, "1"));
            }
            if (scarabGameController.ExternalService.isDesktop()) this.betPanelPort.getCoinValue().publish(scarabGameController.ExternalService.moneyFormatter.format(stake.stakeItems.betPerLine));
        };
        scarabGameController.GameController.prototype.resetWildTimers = function() {
            if (this.scarabTimers != null) {
                var _g1 = 0;
                var _g = this.scarabTimers.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    this.scarabTimers[i].stop();
                    this.scarabTimers[i] = null;
                }
                this.scarabTimers = null;
            }
        };
        scarabGameController.GameController.prototype.handleSpinCommandAvailable = function(e) {
            haxe.Log.trace("[GameController] [handleSpinCommandAvailable] ", {
                fileName: "GameController.hx",
                lineNumber: 1659,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSpinCommandAvailable",
                customParams: [e.getPayload()]
            });
            var spinAvailable = e.getPayload();
            if (spinAvailable) {
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
                if (!this.stateMachine.isInState(scarabGameController.StateMachineDef.IDLE_STATE)) this.dispatchEvent(scarabGameController.StateMachineDef.SPIN_ENABLED);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
        };
        scarabGameController.GameController.prototype.handleStakeCommandAvailable = function(e) {
            if (e.getPayload()) {
                if (!this.promotionalSpinsActive) this.betPanelPort.enableButton().publish(betPanelApi.EButton.TOTAL_BET);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
        };
        scarabGameController.GameController.prototype.handleModelSpinStart = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleModelSpinStart ", {
                fileName: "GameController.hx",
                lineNumber: 1685,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleModelSpinStart",
                customParams: [e.getPayload()]
            });
            this.model.setStartSpinPayload(e.getPayload());
            this.dispatchEvent(scarabGameController.StateMachineDef.START_REEL_SPIN);
            if (this.model.getWildCounter() == "10") {
                if (!this.isFreeSpin) this.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wilds);
            }
            haxe.Log.trace("[GameController] [handleModelSpinStart]", {
                fileName: "GameController.hx",
                lineNumber: 1696,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleModelSpinStart",
                customParams: [this.isFreeSpin, this.model.getWildCounter()]
            });
            if (this.model.rgPresentation) {
                if (this.isFreeSpin) this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "3"));
            }
            this.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
        };
        scarabGameController.GameController.prototype.handleSpinOutcome = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleSpinOutcome ", {
                fileName: "GameController.hx",
                lineNumber: 1710,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSpinOutcome",
                customParams: [e.getPayload()]
            });
            haxe.Log.trace("[GAME_CONTROLLER] handleSpinOutcome stage ", {
                fileName: "GameController.hx",
                lineNumber: 1711,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSpinOutcome",
                customParams: [e.getPayload().stage]
            });
            haxe.Log.trace("[GAME_CONTROLLER] handleSpinOutcome nextStage ", {
                fileName: "GameController.hx",
                lineNumber: 1712,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSpinOutcome",
                customParams: [e.getPayload().nextStage]
            });
            this.model.setSpinOutcome(e.getPayload());
            this.smContext.setContextValue("Stage", e.getPayload().stage);
            this.smContext.setContextValue("NextStage", e.getPayload().nextStage);
            this.smContext.setContextValue("awardCapExceeded", e.getPayload().awardCapExceeded);
            if (e.getPayload().stage == "FreeSpin") {
                if (this.model.getScatterCount() >= 3) this.smContext.setContextValue("retrigger", true);
                this.tensionPort.getHideWildTension().publish(null);
            } else if (e.getPayload().stage == "Picker") this.tensionPort.getHideWildTension().publish(null);
            else this.tensionPort.getShowWildTension().publish(_hcmn_.Std.parseInt(this.model.getWildCounter()));
            if (e.getPayload().stage == "FreeSpin" && e.getPayload().nextStage == "FreeSpin") this.isFreeSpin = true;
            else if (e.getPayload().stage == "FreeSpin" && e.getPayload().nextStage == "BaseGame") this.isFreeSpin = false;
            else if (e.getPayload().stage == "Picker") this.isFreeSpin = true;
            else this.isFreeSpin = false;
            haxe.Log.trace("model.isFreeSpinmodel.isFreeSpinmodel.isFreeSpin handleSpinOutcome " + _hcmn_.Std.string(this.isFreeSpin), {
                fileName: "GameController.hx",
                lineNumber: 1747,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleSpinOutcome",
                customParams: [this.model.getWildCounter(), e.getPayload().stage, e.getPayload().nextStage]
            });
        };
        scarabGameController.GameController.prototype.handleModelSpinStop = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleModelSpinStop " + this.model.getWildCounter(), {
                fileName: "GameController.hx",
                lineNumber: 1752,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleModelSpinStop"
            });
            haxe.Log.trace("[GAME_CONTROLLER] handleModelSpinStop " + this.model.spinOutcome.stage, {
                fileName: "GameController.hx",
                lineNumber: 1753,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleModelSpinStop"
            });
            haxe.Log.trace("[GAME_CONTROLLER] handleModelSpinStop " + this.model.spinOutcome.nextStage, {
                fileName: "GameController.hx",
                lineNumber: 1754,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleModelSpinStop"
            });
            if (this.model.spinOutcome.stage != "FreeSpin") {
                this.staticViewsPort.getShow().publish(new scarabStaticViewsApi.ShowStaticViewPayload(scarabStaticViewsApi.StaticViewTypeEnum.bonus_counter, [
                    [this.model.getWildCounter()]
                ]));
                if (this.model.getWildCounter() == "10") this.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "bc_particle_high", new displayEngineApi.Point(1090, -170)));
                else this.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "bc_particle_low", new displayEngineApi.Point(1090, -170)));
            }
            if (this.stateMachine.isInState(scarabGameController.StateMachineDef.SPINNING_STATE)) this.dispatchEvent(scarabGameController.StateMachineDef.STOP_REEL_SPIN);
            else this.stopSpinRecieved = true;
        };
        scarabGameController.GameController.prototype.handleAbortSpin = function(e) {
            this.model.setAbortSpinPayload(e.getPayload());
            if (this.stateMachine.isInState(scarabGameController.StateMachineDef.SPINNING_STATE) || this.stateMachine.isInState(scarabGameController.StateMachineDef.PICKER_STATE)) {
                if (this.stateMachine.isInState(scarabGameController.StateMachineDef.PICKER_STATE)) this.model.retryChoice = true;
                this.dispatchEvent(scarabGameController.StateMachineDef.ABORT_SPIN);
            }
        };
        scarabGameController.GameController.prototype.handleSpinOutcomePresent = function(e) {
            this.dispatchEvent(scarabGameController.StateMachineDef.PRESENT_SPIN_OUTCOME);
        };
        scarabGameController.GameController.prototype.handlePresentResult = function(e) {
            this.resultPayload = e.getPayload();
            haxe.Log.trace("[GAME_CONTROLLER] handlePresentResult ", {
                fileName: "GameController.hx",
                lineNumber: 1794,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handlePresentResult",
                customParams: [e.getPayload()]
            });
            this.dispatchEvent(scarabGameController.StateMachineDef.PRESENT_RESULT);
        };
        scarabGameController.GameController.prototype.handleContinueCommandAvailable = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleContinueCommandAvailable ", {
                fileName: "GameController.hx",
                lineNumber: 1800,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleContinueCommandAvailable",
                customParams: [e.getPayload()]
            });
            if (e.getPayload()) this.dispatchEvent(scarabGameController.StateMachineDef.CONTINUE_ENABLED);
        };
        scarabGameController.GameController.prototype.handlePaytableCommandAvailable = function(e) {
            if (!e.getPayload()) this.betPanelPort.disableButton().publish(betPanelApi.EButton.PAYTABLE);
            else this.betPanelPort.enableButton().publish(betPanelApi.EButton.PAYTABLE);
        };
        scarabGameController.GameController.prototype.handleOpenPaytable = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] handleOpenPaytable", {
                fileName: "GameController.hx",
                lineNumber: 1820,
                className: "components.gamecontroller.imp.GameController",
                methodName: "handleOpenPaytable"
            });
            if (this.paytableOpened) {
                this.onPaytableClose();
                return;
            }
            this.paytableOpened = true;
            this.paytablePort.show().publish(null);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            scarabGameController.GameController.soundController.playSound("pay_open");
        };
        scarabGameController.GameController.prototype.onStopAvailable = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onStopAvailable ", {
                fileName: "GameController.hx",
                lineNumber: 1845,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onStopAvailable",
                customParams: [e.getPayload()]
            });
            if (e.getPayload()) {
                this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.STOP_BUTTON_STATE);
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
        };
        scarabGameController.GameController.prototype.onSpinAvailable = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onSpinAvailable ", {
                fileName: "GameController.hx",
                lineNumber: 1863,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onSpinAvailable",
                customParams: [e.getPayload()]
            });
            if (e.getPayload()) {
                this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.PLAY_BUTTON_STATE);
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
        };
        scarabGameController.GameController.prototype.onAutospinStopped = function(e) {
            this.autoPlayActive = false;
            haxe.Log.trace("[GAME_CONTROLLER] onAutospinStopped ", {
                fileName: "GameController.hx",
                lineNumber: 1882,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onAutospinStopped",
                customParams: [e.getPayload()]
            });
            scarabGameController.GameController.soundController.playAutoSpinSound();
        };
        scarabGameController.GameController.prototype.onAutospinStarted = function(e) {
            this.autoPlayActive = true;
            haxe.Log.trace("[GAME_CONTROLLER] onAutospinStarted ", {
                fileName: "GameController.hx",
                lineNumber: 1898,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onAutospinStarted",
                customParams: [e.getPayload()]
            });
            this.betPanelPort.setNumberOffAutoSpinsLeft().publish(e.getPayload().current + " / " + e.getPayload().total);
            this.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
        };
        scarabGameController.GameController.prototype.onGameLayoutUpdated = function(event) {
            if (this.layoutUpdated) return;
            this.layoutUpdated = true;
            this.checkGameLoaded();
        };
        scarabGameController.GameController.prototype.onBetPanelButtonPressed = function(e) {
            var button = e.getPayload();
            switch (button[1]) {
                case 1:
                    if (this.showSpinButtonInsideAutoplay) {
                        if (this.resolveFnOnClickSpinInsideAutoplay != null) {
                            this.resolveFnOnClickSpinInsideAutoplay(null);
                            this.resolveFnOnClickSpinInsideAutoplay = null;
                        }
                        return;
                    }
                    if (this.showSpinButtonDuringFreeSpin) {
                        if (this.resolveFnOnClickSpinDuringFreeSpin != null) {
                            this.resolveFnOnClickSpinDuringFreeSpin("CLICK-SPIN-INSIDE-FREE SPIN");
                            this.resolveFnOnClickSpinDuringFreeSpin = null;
                        }
                        return;
                    }
                    this.slotModelPort.getGameCommands().getSpinCommandExecuted().publish(null);
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                    scarabGameController.GameController.soundController.playSoundButtonPush();
                    break;
                case 5:
                    this.slotModelPort.getGameCommands().getPaytableCommandExecuted().publish(null);
                    break;
                case 9:
                    this.slotModelPort.getGameContext().getGameOptionChangedFromGf().publish(new slotModelApi.Pair("sound", "1"));
                    break;
                case 10:
                    this.slotModelPort.getGameContext().getGameOptionChangedFromGf().publish(new slotModelApi.Pair("sound", "0"));
                    break;
                case 13:
                    this.slotModelPort.getGameCommands().getStartAutoSpinsCommandExecuted().publish(new slotModelApi.AutospinCommandPayload());
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
                    scarabGameController.GameController.soundController.playAutoSpinSound(true);
                    break;
                case 14:
                    this.slotModelPort.getGameCommands().getStopAutoSpinsCommandExecuted().publish(null);
                    this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.PLAY_BUTTON_STATE);
                    this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                    this.autoPlayActive = false;
                    if (this.resolveFnOnStopInsideAutoplay != null) {
                        this.resolveFnOnStopInsideAutoplay("AUTOSPIN-STOP");
                        this.resolveFnOnStopInsideAutoplay = null;
                    }
                    break;
                default:
                    haxe.Log.trace("[GAME_CONTROLLER] onBetPanelButtonPressed not handled for: " + _hcmn_.Type.getEnumName(betPanelApi.EButton), {
                        fileName: "GameController.hx",
                        lineNumber: 1976,
                        className: "components.gamecontroller.imp.GameController",
                        methodName: "onBetPanelButtonPressed"
                    });
            }
        };
        scarabGameController.GameController.prototype.onBetPanelStakeChanged = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onBetPanelStakeChanged " + _hcmn_.Std.string(e.getPayload()), {
                fileName: "GameController.hx",
                lineNumber: 1982,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onBetPanelStakeChanged"
            });
            this.slotModelPort.getGameCommands().getStakeCommandExecuted().publish(e.getPayload());
            var currentBPL = _hcmn_.Std.parseFloat(e.getPayload().betPerLine);
            var maxValue = _hcmn_.Std.parseFloat(this.betsArray[this.betsArray.length - 1].value);
            scarabGameController.GameController.soundController.betPanleStakeChanged(currentBPL, maxValue, this.previousBPL);
        };
        scarabGameController.GameController.prototype.onPaytableClose = function(e) {
            if (this.stateMachine.isInState(scarabGameController.StateMachineDef.IDLE_STATE)) {
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.TOTAL_BET);
            }
            this.paytableOpened = false;
            this.paytablePort.hide().publish(null);
            this.reelsPort.show().publish(null);
            scarabGameController.GameController.soundController.playSound("pay_close");
            if (this.tutorialActive) {
                this.showGameElements();
                this.hideGameElements();
            }
        };
        scarabGameController.GameController.prototype.setFsReelPicture = function() {
            if (this.model.retriggerData.initReels != null) this.reelsPort.setReelPicture().publish(this.model.retriggerData.initReels.reels);
            else this.reelsPort.setReelPicture().publish(this.model.spinOutcome.freeSpin.outcome.reelStop.reels);
        };
        scarabGameController.GameController.prototype.forcePaytableClose = function() {
            haxe.Log.trace("[GAME_CONTROLLER] forcePaytableClose", {
                fileName: "GameController.hx",
                lineNumber: 2035,
                className: "components.gamecontroller.imp.GameController",
                methodName: "forcePaytableClose"
            });
            this.paytableOpened = false;
            this.paytablePort.hide().publish(null);
            this.reelsPort.show().publish(null);
        };
        scarabGameController.GameController.prototype.onReelOutcomeExit = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onReelOutcomeExit", {
                fileName: "GameController.hx",
                lineNumber: 2045,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onReelOutcomeExit"
            });
            if (e.getPayload() == 0) this.dispatchEvent(scarabGameController.StateMachineDef.SPIN_STARTING_ENDED);
        };
        scarabGameController.GameController.prototype.onReelStoppingStarted = function(e) {
            haxe.Log.trace("[GAME_CONTROLLER] onReelStoppingStarted", {
                fileName: "GameController.hx",
                lineNumber: 2055,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onReelStoppingStarted"
            });
        };
        scarabGameController.GameController.prototype.onReelStopped = function(e) {
            var _g = this;
            var reelId = e.getPayload();
            haxe.Log.trace("[GAME_CONTROLLER] onReelStopped", {
                fileName: "GameController.hx",
                lineNumber: 2061,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onReelStopped",
                customParams: [reelId, this.model.spinOutcome.stage, this.model.spinOutcome.nextStage, this.model.spinOutcome.customData]
            });
            if (this.model.spinOutcome != null && this.model.spinOutcome.stage == "BaseGame" && reelId == this.model.reelsNum - 1) this.winMeterPort.showMessage().publish("");
            if (this.model.spinOutcome.stage == "BaseGame") {
                if (this.model.scarabSymbols != null) {
                    haxe.Log.trace("[GAME_CONTROLLER] handleSpinOutcome scarabSymbols ", {
                        fileName: "GameController.hx",
                        lineNumber: 2074,
                        className: "components.gamecontroller.imp.GameController",
                        methodName: "onReelStopped",
                        customParams: [this.model.scarabSymbols]
                    });
                    var _g1 = 0;
                    var _g2 = this.model.scarabSymbols[reelId].length;
                    while (_g1 < _g2) {
                        var j = _g1++;
                        haxe.Log.trace("[GAME_CONTROLLER]x onReelStopped wild_flame " + _hcmn_.Std.string(this.model.scarabSymbols[reelId]), {
                            fileName: "GameController.hx",
                            lineNumber: 2077,
                            className: "components.gamecontroller.imp.GameController",
                            methodName: "onReelStopped"
                        });
                        if (this.model.scarabSymbols[reelId][j] == 1) this.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "wild_flame", new displayEngineApi.Point(302 * reelId, 188 * j)));
                    }
                }
                scarabGameController.GameController.soundController.frame_glitter(this.model.scarabSymbols[reelId]);
            } else if (reelId == 0) {
                haxe.Log.trace("[GAME_CONTROLLER] showFreeSpinOutcome wildPositions ", {
                    fileName: "GameController.hx",
                    lineNumber: 2090,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "onReelStopped",
                    customParams: [this.model.wildPositions]
                });
                this.wildsPort.getTransition().publish(new scarabWildsApi.WildTransitionPayload(this.model.wildPositions, "1", 0, 1));
                this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "1"));
                _hcmn_.haxe_Timer.delay(function() {
                    var pos = [];
                    var _g21 = 0;
                    var _g11 = _g.model.wildPositions.length;
                    while (_g21 < _g11) {
                        var i = _g21++;
                        var row = _hcmn_.Std.parseInt(_g.model.wildPositions[i].split("R")[1]);
                        var col = _hcmn_.Std.parseInt(_g.model.wildPositions[i].split("R")[0].split("C")[1]);
                        haxe.Log.trace("[GAME_CONTROLLER]x showFreeSpinOutcome wildPositions ", {
                            fileName: "GameController.hx",
                            lineNumber: 2099,
                            className: "components.gamecontroller.imp.GameController",
                            methodName: "onReelStopped",
                            customParams: [row, col]
                        });
                        _g.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "wild_flame", new displayEngineApi.Point(302 * col, 188 * row)));
                    }
                }, 250);
            }
            if (this.model.hasTension) {
                haxe.Log.trace("[mm-reelID", {
                    fileName: "GameController.hx",
                    lineNumber: 2115,
                    className: "components.gamecontroller.imp.GameController",
                    methodName: "onReelStopped",
                    customParams: [this.model.tensionReels, reelId]
                });
                this.tensionPort.getShowTension().publish(new scarabTensionApi.ShowTensionPayload(this.model.tensionReels, reelId));
                scarabGameController.GameController.soundController.playTensionSound(this.model.tensionReels, reelId);
            }
            scarabGameController.GameController.soundController.onReelStopped(reelId, this.model.hasFSTrigger[reelId]);
            if (this.model.hasFSTrigger[reelId]) {
                var _g12 = 0;
                var _g3 = this.model.fStriggerPosition[reelId].length;
                while (_g12 < _g3) {
                    var j1 = _g12++;
                    if (this.model.fStriggerPosition[reelId][j1] == true) this.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_back, "bonus_flame", new displayEngineApi.Point(302 * reelId, 188 * j1)));
                }
            }
        };
        scarabGameController.GameController.prototype.onSpinStopped = function(e) {
            haxe.Log.trace("GAME CONTROLLER onSpinStopped", {
                fileName: "GameController.hx",
                lineNumber: 2137,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onSpinStopped"
            });
            scarabGameController.GameController.soundController.startBackgroundMusicStopTimeOut();
            haxe.Log.trace("[GAME_CONTROLLER] onSpinStopped wilds ", {
                fileName: "GameController.hx",
                lineNumber: 2142,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onSpinStopped",
                customParams: [this.model.wilds, this.model.getWildCounter()]
            });
            if (this.model.spinOutcome.stage != "BaseGame") this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "2"));
            this.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wild_trigger);
            if ((function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("Stage");
                    return $r;
                }(this)) == "FreeSpin") this.hideGoodLuckInfoBar();
            haxe.Log.trace("[GAME_CONTROLLER] onSpinStopped stage ", {
                fileName: "GameController.hx",
                lineNumber: 2154,
                className: "components.gamecontroller.imp.GameController",
                methodName: "onSpinStopped",
                customParams: [(function($this) {
                    var $r;
                    var this2 = $this.smContext.get_contextValues();
                    $r = this2.get("Stage");
                    return $r;
                }(this)), (function($this) {
                    var $r;
                    var this3 = $this.smContext.get_contextValues();
                    $r = this3.get("NextStage");
                    return $r;
                }(this))]
            });
            this.showScarabs();
        };
        scarabGameController.GameController.prototype.showScarabs = function() {
            var _g4 = this;
            haxe.Log.trace("[GAME_CONTROLLER] showScarabs scarabSymbols ", {
                fileName: "GameController.hx",
                lineNumber: 2163,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showScarabs",
                customParams: [this.model.scarabSymbols]
            });
            haxe.Log.trace("[GAME_CONTROLLER] showScarab\t\t   s wilds ", {
                fileName: "GameController.hx",
                lineNumber: 2164,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showScarabs",
                customParams: [this.model.wilds]
            });
            if (this.model.spinOutcome.stage == "BaseGame") {
                this.scarabTimers = [];
                var currentScarab = 0;
                var counter = 0;
                var hasScarab = false;
                var _g1 = 0;
                var _g = this.model.scarabSymbols.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    var _g3 = 0;
                    var _g2 = this.model.scarabSymbols[i].length;
                    while (_g3 < _g2) {
                        var j = _g3++;
                        if (this.model.scarabSymbols[i][j] == 1) hasScarab = true;
                    }
                }
                if (hasScarab) {
                    var _g11 = 0;
                    var _g5 = this.model.scarabSymbols.length;
                    while (_g11 < _g5) {
                        var i1 = [_g11++];
                        var _g31 = 0;
                        var _g21 = this.model.scarabSymbols[i1[0]].length;
                        while (_g31 < _g21) {
                            var j1 = [_g31++];
                            if (this.model.scarabSymbols[i1[0]][j1[0]] == 1) {
                                this.scarabTimers.push(_hcmn_.haxe_Timer.delay((function(j1, i1) {
                                    return function() {
                                        var position = new displayEngineApi.Point(i1[0], j1[0]);
                                        _g4.wildsPort.getShowLanding().publish(new scarabWildsApi.ShowLandingPayload(scarabWildsApi.WildsTypeEnum.wild_trigger, position, "loop"));
                                        _g4.wildsPort.getShowLanding().publish(new scarabWildsApi.ShowLandingPayload(scarabWildsApi.WildsTypeEnum.wilds, position, "1"));
                                        _g4.playWildSound(i1[0], false);
                                        counter++;
                                        if (counter == _g4.model.totalScarabs) {
                                            _g4.wildsPresented();
                                            _g4.playWildSound(i1[0], true);
                                        }
                                    };
                                })(j1, i1), 150 * currentScarab));
                                currentScarab++;
                            }
                        }
                    }
                } else this.wildsPresented();
            } else this.wildsPresented();
        };
        scarabGameController.GameController.prototype.playWildSound = function(reelId, isItLast) {
            haxe.Log.trace("[GAME_CONTROLLER] playWildSound ", {
                fileName: "GameController.hx",
                lineNumber: 2219,
                className: "components.gamecontroller.imp.GameController",
                methodName: "playWildSound",
                customParams: [this.model.getWildCounter()]
            });
            if (this.model.getWildCounter() == "10") scarabGameController.GameController.soundController.playWild(reelId, isItLast);
        };
        scarabGameController.GameController.prototype.wildsPresented = function() {
            haxe.Log.trace("[GAME_CONTROLLER] wildsPresented wilds ", {
                fileName: "GameController.hx",
                lineNumber: 2224,
                className: "components.gamecontroller.imp.GameController",
                methodName: "wildsPresented",
                customParams: [this.model.wilds]
            });
            haxe.Log.trace("[GAME_CONTROLLER] wildsPresented scarabSymbols ", {
                fileName: "GameController.hx",
                lineNumber: 2225,
                className: "components.gamecontroller.imp.GameController",
                methodName: "wildsPresented",
                customParams: [this.model.scarabSymbols]
            });
            if (this.model.spinOutcome.stage == "BaseGame") this.playAllWilds();
            if (this.stateMachine.isInState(scarabGameController.StateMachineDef.STOPPING_STATE)) {
                this.tensionPort.getHideTension().publish(null);
                scarabGameController.GameController.soundController.stopSound("tension_spin");
                this.slotModelPort.getStages().getSpinStage().getReelSpinFinished().publish(null);
            } else this.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
        };
        scarabGameController.GameController.prototype.playAllWilds = function() {
            var _g4 = this;
            this.resetWildTimers();
            if (this.model.getWildCounter() == "10") {
                this.scarabTimers = [];
                var currentWild = 0;
                var counter = 0;
                var _g1 = 0;
                var _g = this.model.wilds.length;
                while (_g1 < _g) {
                    var i = [_g1++];
                    var _g3 = 0;
                    var _g2 = this.model.wilds[i[0]].length;
                    while (_g3 < _g2) {
                        var j = [_g3++];
                        if (this.model.wilds[i[0]][j[0]] != -1) {
                            currentWild++;
                            this.scarabTimers.push(_hcmn_.haxe_Timer.delay((function(j, i) {
                                return function() {
                                    var wildPos = _g4.model.wilds[i[0]][j[0]];
                                    _g4.fxManagerPort.getShow().publish(new scarabFxManagerApi.ShowFxPayload(scarabFxManagerApi.FxManagerTypeEnum.fx_basic, "wild_flame", new displayEngineApi.Point(302 * i[0], 188 * wildPos)));
                                    var position = new displayEngineApi.Point(i[0], _g4.model.wilds[i[0]][j[0]]);
                                    _g4.wildsPort.getSymbolState().publish(new scarabWildsApi.ShowLandingPayload(scarabWildsApi.WildsTypeEnum.wilds, position, "2"));
                                    _g4.playWildSound(i[0], false);
                                    counter++;
                                    if (counter == _g4.model.totalWilds) {
                                        _g4.wildsPort.getHide().publish(scarabWildsApi.WildsTypeEnum.wilds);
                                        var wildsState = "2";
                                        if (_g4.model.rgPresentation) {
                                            if (!_g4.model.isHighWin()) wildsState = "3";
                                        }
                                        _g4.wildsPort.getShowBaseGameWilds().publish(new scarabWildsApi.ShowWildsPayload(_g4.model.wilds, wildsState));
                                        _g4.playWildSound(i[0], true);
                                        if (_g4.stateMachine.getCurrentStateName() == "FS_ENTRY") {
                                            var outcome = new slotModelApi.Outcome(_g4.model.outcome.reelStop, _g4.model.outcome.reelStopAdditional, null, _g4.model.outcome.scatterWins, null, null, null, null, null);
                                            _g4.stopAutoplayInFS();
                                            _g4.winControllerPort.showWin().request(new winControllerApi.ShowWinPayload(outcome, false), 0).then((function() {
                                                return function(data) {
                                                    _g4.reelsPort.setReelPicture().publish(_g4.model.outcome.reelStop.reels);
                                                    _g4.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
                                                    _g4.winControllerPort.dispose().publish(null);
                                                    _g4.dispatchEvent(scarabGameController.StateMachineDef.SET_PICKER_INTRO);
                                                };
                                            })());
                                        }
                                    }
                                };
                            })(j, i), 150 * currentWild));
                        }
                    }
                }
            }
        };
        scarabGameController.GameController.prototype.showSpinInfoLabel = function() {
            haxe.Log.trace("[GAME_CONTROLLER] showSpinInfoLabel ", {
                fileName: "GameController.hx",
                lineNumber: 2314,
                className: "components.gamecontroller.imp.GameController",
                methodName: "showSpinInfoLabel"
            });
            if (this.promotionalSpinsActive) this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, scarabGameController.ExternalService.translationManager.stringLookup("PromotionalSpinsLeft") + " " + this.promotionalSpinsCount));
            else this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, scarabGameController.ExternalService.translationManager.stringLookup("SpinInfoLabel")));
        };
        scarabGameController.GameController.prototype.showGoodLuckInfoBarLabel = function() {
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, scarabGameController.ExternalService.translationManager.stringLookup("GoodLuck")));
        };
        scarabGameController.GameController.prototype.hideGoodLuckInfoBar = function() {
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
        };
        scarabGameController.GameController.prototype.onWinCycleFinished = function(e) {};
        scarabGameController.GameController.prototype.onWinLineAnimated = function(e) {
            var win = e.getPayload().win;
            this.winManagerPort.getHide().publish(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames);
            this.winManagerPort.getShow().publish(new scarabWinManagerApi.WinManagerShowPayload(scarabWinManagerApi.WinManagerTypeEnum.wm_win_frames, win.winPath.reelsInfo, this.model.getReelsInfo(win.winPath.reelsInfo)));
            var linePicture;
            var _g = [];
            var _g1 = 0;
            while (_g1 < 5) {
                var i = _g1++;
                _g.push((function($this) {
                    var $r;
                    var _g2 = []; {
                        var _g3 = 0;
                        while (_g3 < 4) {
                            var j = _g3++;
                            _g2.push(1);
                        }
                    }
                    $r = _g2;
                    return $r;
                }(this)));
            }
            linePicture = _g;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            var linePicture1;
            var _g11 = [];
            var _g21 = 0;
            while (_g21 < 5) {
                var i1 = _g21++;
                _g11.push("-");
            }
            linePicture1 = _g11;
            var _g31 = 0;
            var _g22 = win.symbolCount;
            while (_g31 < _g22) {
                var k = _g31++;
                linePicture1[win.position + k] = win.winningSymbol;
            }
            if (win.type == "LineRight") linePicture1.reverse();
            if (this.paytableOpened) this.infoBarPort.hideWinLineSummary().publish(null);
            else if (win.lineId != 0) this.infoBarPort.showWinLineSummary().publish(new infoBarApi.WinLineSummaryPayload(linePicture1, win.lineId == null ? "null" : "" + win.lineId, scarabGameController.ExternalService.moneyFormatter.format(win.payout)));
            else if (this.model.spinOutcome.nextStage == "BaseGame") {
                if (this.model.spinOutcome.acumulatedFreeSpinPayout == "0") this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, scarabGameController.ExternalService.translationManager.stringLookup("FreeSpinsEnded")));
                else this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, scarabGameController.ExternalService.translationManager.stringLookup("FreeSpinsWin", [scarabGameController.ExternalService.moneyFormatter.format(this.model.spinOutcome.acumulatedFreeSpinPayout)])));
            } else this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, scarabGameController.ExternalService.translationManager.stringLookup("FreeSpinsTriggered")));
            if (this.model.rgPresentation) {
                if (this.model.spinOutcome.stage != "FreeSpin") {
                    if (this.model.getWildCounter() == "10") {
                        if (this.model.isHighWin()) this.presentCurrentWildInLine(win.winPath.reelsInfo);
                        else this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "3"));
                    }
                } else if (this.model.spinOutcome.stage == "FreeSpin") {
                    if (this.freeSpinCompleted) {
                        if (this.model.getWildCounter() == "10") {
                            if (this.model.isHighWin()) this.presentCurrentWildInLine(win.winPath.reelsInfo);
                            else this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "3"));
                        } else this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "1"));
                    } else if (this.model.isHighWin()) this.presentCurrentWildInLine(win.winPath.reelsInfo);
                    else this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "3"));
                }
            }
        };
        scarabGameController.GameController.prototype.presentCurrentWildInLine = function(reelsInfo) {
            this.wildsPort.getState().publish(new scarabWildsApi.WildsStatePayload(scarabWildsApi.WildsTypeEnum.wilds, "3"));
            var _g1 = 0;
            var _g = reelsInfo.length;
            while (_g1 < _g) {
                var i = _g1++;
                var _g3 = 0;
                var _g2 = reelsInfo[i].length;
                while (_g3 < _g2) {
                    var j = _g3++;
                    if (reelsInfo[i][j] == 1) {
                        var position = new displayEngineApi.Point(i, j);
                        this.wildsPort.getSymbolState().publish(new scarabWildsApi.ShowLandingPayload(scarabWildsApi.WildsTypeEnum.wilds, position, "2"));
                    }
                }
            }
        };
        scarabGameController.GameController.prototype.getString = function(id) {
            return scarabGameController.ExternalService.translationManager.stringLookup(id);
        };
        scarabGameController.GameController.prototype.onPaytablePageChanged = function(e) {
            scarabGameController.GameController.soundController.playSoundButtonPush();
        };
        scarabGameController.GameController.prototype.onHelpOpen = function(e) {
            scarabGameController.GameController.soundController.playSoundButtonPush();
        };
        scarabGameController.GameController.prototype.random = function(min, max) {
            return _hcmn_.Math.floor(_hcmn_.Math.random() * (max - min + 1) + min);
        };
        scarabGameController.GameController.prototype.stopAutoplayInFS = function() {
            if (this.autoPlayActive) {
                this.slotModelPort.getGameCommands().getStopAutoSpinsCommandExecuted().publish(null);
                this.betPanelPort.setAutoPlayButtonState().publish(betPanelApi.SetAutoPlayButtonState.PLAY_BUTTON_STATE);
                this.betPanelPort.disableButton().publish(betPanelApi.EButton.AUTO_PLAY_BUTTON);
                this.autoPlayActive = false;
            }
        };
        scarabGameController.GameController.prototype.showSpinInsideAutoplay = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolveFnOnClickSpinInsideAutoplay = resolve;
                _g.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
            });
            return p;
        };
        scarabGameController.GameController.prototype.hideSpinInsideAutoplay = function() {
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
        };
        scarabGameController.GameController.prototype.forceStopAutoPlay = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolveFnOnStopInsideAutoplay = resolve;
            });
            return p;
        };
        scarabGameController.GameController.prototype.dummyPromise = function(pickedChoise, timeout) {
            this.staticViewsPort.getPlayFlyAnimation().publish(pickedChoise);
            var p = new Promise(function(resolve, reject) {
                _hcmn_.haxe_Timer.delay(function() {
                    resolve(null);
                }, timeout);
            });
            return p;
        };
        scarabGameController.GameController.prototype.showPickerOutro = function(pickedChoise) {
            scarabGameController.GameController.soundController.playSound("fg_pick_sound_and_animations");
            return this.dummyPromise(pickedChoise, 3000);
        };
        scarabGameController.GameController.prototype.showSpinInsideFreeSpin = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolveFnOnClickSpinDuringFreeSpin = resolve;
                _g.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
            });
            return p;
        };
        scarabGameController.GameController.prototype.hideSpinDuringFreeSpin = function() {
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
        };
        scarabGameController.GameController.soundController = null;
        scarabGameController.GameController.prototype.__class__ = scarabGameController.GameController;
        scarabGameController.GameControllerConfig = function() {};
        scarabGameController.GameControllerConfig.__name__ = ["scarabGameController", "GameControllerConfig"];
        scarabGameController.GameControllerConfig.prototype.winlineInterval = null;
        scarabGameController.GameControllerConfig.prototype.playingLinesAtBetMessageDelay = null;
        scarabGameController.GameControllerConfig.prototype.fs_winlineInterval = null;
        scarabGameController.GameControllerConfig.prototype.fs_IntroScreenDuration = null;
        scarabGameController.GameControllerConfig.prototype.fs_FirstSpinDelay = null;
        scarabGameController.GameControllerConfig.prototype.fs_WinSpinDelay = null;
        scarabGameController.GameControllerConfig.prototype.fs_NoWinSpinDelay = null;
        scarabGameController.GameControllerConfig.prototype.fs_RetriggerScreenDuration = null;
        scarabGameController.GameControllerConfig.prototype.fs_MaxRetriggerScreenDuration = null;
        scarabGameController.GameControllerConfig.prototype.fs_SummaryDuration = null;
        scarabGameController.GameControllerConfig.prototype.maxAwardSpinEnabledDelay = null;
        scarabGameController.GameControllerConfig.prototype.__class__ = scarabGameController.GameControllerConfig;
        scarabGameController.GameModel = function() {
            this.rgPresentation = false;
            this.totalWilds = 0;
            this.totalScarabs = 0;
            this.retryChoice = false;
            this.currentPick = -1;
            this.tensionCounter = 0;
            this.reelsNum = 5;
            this.cellsNum = 4;
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelsNum;
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push(false);
            }
            this.hasFSTrigger = _g;
        };
        scarabGameController.GameModel.__name__ = ["scarabGameController", "GameModel"];
        scarabGameController.GameModel.prototype.spinOutcome = null;
        scarabGameController.GameModel.prototype.outcome = null;
        scarabGameController.GameModel.prototype.abortSpinPayload = null;
        scarabGameController.GameModel.prototype.startSpinPayload = null;
        scarabGameController.GameModel.prototype.tensionReels = null;
        scarabGameController.GameModel.prototype.hasTension = null;
        scarabGameController.GameModel.prototype.lastAccumulatedPayout = null;
        scarabGameController.GameModel.prototype.cellsNum = null;
        scarabGameController.GameModel.prototype.reelsNum = null;
        scarabGameController.GameModel.prototype.stakeState = null;
        scarabGameController.GameModel.prototype.denomination = null;
        scarabGameController.GameModel.prototype.wilds = null;
        scarabGameController.GameModel.prototype.fsWilds = null;
        scarabGameController.GameModel.prototype.wildPositions = null;
        scarabGameController.GameModel.prototype.fStriggerPosition = null;
        scarabGameController.GameModel.prototype.pickerData = null;
        scarabGameController.GameModel.prototype.pickerDataStr = null;
        scarabGameController.GameModel.prototype.retriggerData = null;
        scarabGameController.GameModel.prototype.chainInteger = null;
        scarabGameController.GameModel.prototype.chainCollection = null;
        scarabGameController.GameModel.prototype.tensionCounter = null;
        scarabGameController.GameModel.prototype.hasFSTrigger = null;
        scarabGameController.GameModel.prototype.currentPick = null;
        scarabGameController.GameModel.prototype.scarabSymbols = null;
        scarabGameController.GameModel.prototype.retryChoice = null;
        scarabGameController.GameModel.prototype.totalScarabs = null;
        scarabGameController.GameModel.prototype.totalWilds = null;
        scarabGameController.GameModel.prototype.totalBet = null;
        scarabGameController.GameModel.prototype.rgPresentation = null;
        scarabGameController.GameModel.prototype.setSpinOutcome = function(spinOutcome) {
            this.spinOutcome = spinOutcome;
            haxe.Log.trace("[GAME_CONTROLLER] setSpinOutcome:stage: " + this.spinOutcome.stage, {
                fileName: "GameModel.hx",
                lineNumber: 66,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "setSpinOutcome",
                customParams: [spinOutcome]
            });
            if (this.spinOutcome.stage == "BaseGame") {
                this.setOutcome(this.spinOutcome.baseGame.outcome);
                this.updateWilds();
                this.setScarabSymbols();
            } else {
                this.setOutcome(this.spinOutcome.freeSpin.outcome);
                this.updateFSWilds();
            }
        };
        scarabGameController.GameModel.prototype.updateFSWilds = function() {
            haxe.Log.trace("[GAME_CONTROLLER] updateFSWilds -> ", {
                fileName: "GameModel.hx",
                lineNumber: 81,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "updateFSWilds",
                customParams: [this.spinOutcome.freeSpin.outcome.customField]
            });
            this.wildPositions = this.spinOutcome.freeSpin.outcome.customField.fsWilds;
            this.currentPick = this.spinOutcome.freeSpin.outcome.customField.currentPick;
            this.fsWilds = null;
            this.fsWilds = [];
            var _g1 = 0;
            var _g = this.reelsNum;
            while (_g1 < _g) {
                var i = _g1++;
                this.fsWilds[i] = [];
                var _g3 = 0;
                var _g2 = this.cellsNum;
                while (_g3 < _g2) {
                    var j = _g3++;
                    this.fsWilds[i][j] = -1;
                }
            }
            var _g11 = 0;
            var _g4 = this.wildPositions.length;
            while (_g11 < _g4) {
                var i1 = _g11++;
                var name = this.wildPositions[i1];
                var row = _hcmn_.Std.parseInt(name.split("R")[0].split("C")[1]);
                var col = _hcmn_.Std.parseInt(name.split("R")[1]);
                this.fsWilds[row][col] = col;
            }
            haxe.Log.trace("[GAME_CONTROLLER] updateFSWilds ", {
                fileName: "GameModel.hx",
                lineNumber: 108,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "updateFSWilds",
                customParams: [this.fsWilds, this.wildPositions]
            });
        };
        scarabGameController.GameModel.prototype.setOutcome = function(outcome) {
            haxe.Log.trace("[GAME_CONTROLLER] setOutcome", {
                fileName: "GameModel.hx",
                lineNumber: 113,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "setOutcome",
                customParams: [outcome]
            });
            this.outcome = outcome;
            var customField = outcome.customField;
            if (outcome.customField == null) this.retriggerData = new scarabGameController.RetriggerData(0, false, null);
            else if (customField.retriggerData != null) {
                var maxRetrigger = outcome.customField.retriggerData.maxRetrigger;
                var bonusesRemaining = outcome.customField.retriggerData.bonusesRemaining;
                var initReels = outcome.customField.retriggerData.initReels;
                this.retriggerData = new scarabGameController.RetriggerData(bonusesRemaining, maxRetrigger, initReels);
            }
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelsNum;
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push(0);
            }
            this.tensionReels = _g;
            var positionSeccondScatter = 0;
            this.tensionCounter = 0;
            this.fStriggerPosition = null;
            this.fStriggerPosition = [];
            if (outcome.reelStop != null) {
                var _g21 = 0;
                var _g11 = outcome.reelStop.reels.length;
                while (_g21 < _g11) {
                    var i1 = _g21++;
                    this.hasFSTrigger[i1] = false;
                    this.fStriggerPosition[i1] = [];
                    if (positionSeccondScatter != 0) this.tensionReels[i1] = 1;
                    else this.tensionReels[i1] = 0;
                    var _g4 = 0;
                    var _g3 = outcome.reelStop.reels[i1].length;
                    while (_g4 < _g3) {
                        var j = _g4++;
                        this.fStriggerPosition[i1][j] = false;
                        if (outcome.reelStop.reels[i1][j] == "16") {
                            this.hasFSTrigger[i1] = true;
                            this.tensionCounter++;
                            this.fStriggerPosition[i1][j] = true;
                        }
                    }
                    if (this.tensionCounter == 2 && i1 < 4) positionSeccondScatter = i1;
                }
            }
            if (_hcmn_.HxOverrides.indexOf(this.tensionReels, 1, 0) >= 0) this.hasTension = true;
            else this.hasTension = false;
        };
        scarabGameController.GameModel.prototype.getScatterCount = function() {
            return this.tensionCounter;
        };
        scarabGameController.GameModel.prototype.setCurrentStake = function(stakeState) {
            this.stakeState = stakeState;
            this.totalBet = stakeState.totalBet;
            if (this.chainInteger == null) this.chainInteger = stakeState.outcome.customField.chainInteger;
            this.chainCollection = stakeState.outcome.customField.chainCollection;
            this.updateWilds();
        };
        scarabGameController.GameModel.prototype.setAbortSpinPayload = function(asp) {
            this.abortSpinPayload = asp;
        };
        scarabGameController.GameModel.prototype.setStartSpinPayload = function(ssp) {
            this.startSpinPayload = ssp;
        };
        scarabGameController.GameModel.prototype.updateWilds = function() {
            this.totalWilds = 0;
            if (this.stakeState != null) {
                this.chainCollection = this.stakeState.outcome.customField.chainCollection;
                var betPerLine = this.stakeState.stakeItems.betPerLine;
                var betInfoSteps = this.outcome.customField.betInfoSteps;
                var betValue = "";
                var _g1 = 0;
                var _g = betInfoSteps.length;
                while (_g1 < _g) {
                    var k = _g1++;
                    var denomBet = new money.Money(betInfoSteps[k]).mul(new money.Money(this.denomination)).value;
                    if (betPerLine == denomBet) betValue = betInfoSteps[k];
                }
                this.wilds = [];
                if (this.chainCollection.exists(betValue)) {
                    var len = this.chainCollection.get(betValue).length;
                    var _g2 = 0;
                    while (_g2 < len) {
                        var i = _g2++;
                        this.wilds[i] = [];
                        var key = this.chainCollection.get(betValue)[i];
                        if (this.chainInteger[key] != null) {
                            var _g21 = 0;
                            var _g11 = this.chainInteger[key].length;
                            while (_g21 < _g11) {
                                var j = _g21++;
                                var val = this.chainInteger[key][j];
                                this.wilds[i].push(val);
                            }
                        }
                    }
                }
                this.pickerData = this.stakeState.outcome.customField.pickerData;
                this.pickerDataStr = [];
                var _g12 = 0;
                var _g3 = this.pickerData.length;
                while (_g12 < _g3) {
                    var i1 = _g12++;
                    this.pickerDataStr[i1] = [];
                    var _g31 = 0;
                    var _g22 = this.pickerData[i1].length;
                    while (_g31 < _g22) {
                        var j1 = _g31++;
                        this.pickerDataStr[i1][j1] = _hcmn_.Std.string(this.pickerData[i1][j1]);
                    }
                }
            }
            if (this.wilds != null && this.wilds.length > 0) {
                var _g13 = 0;
                var _g4 = this.wilds.length;
                while (_g13 < _g4) {
                    var i2 = _g13++;
                    var _g32 = 0;
                    var _g23 = this.wilds[i2].length;
                    while (_g32 < _g23) {
                        var j2 = _g32++;
                        if (this.wilds[i2][j2] != -1) this.totalWilds++;
                    }
                }
            }
            haxe.Log.trace("[GameModel] [updateWilds] wild ", {
                fileName: "GameModel.hx",
                lineNumber: 273,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "updateWilds",
                customParams: [this.wilds]
            });
            haxe.Log.trace("[GameModel] [updateWilds] chainCollection ", {
                fileName: "GameModel.hx",
                lineNumber: 274,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "updateWilds",
                customParams: [this.chainCollection]
            });
            haxe.Log.trace("[GameModel] [updateWilds] pickerData ", {
                fileName: "GameModel.hx",
                lineNumber: 275,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "updateWilds",
                customParams: [this.pickerData]
            });
        };
        scarabGameController.GameModel.prototype.setScarabSymbols = function() {
            this.totalScarabs = 0;
            var _g = [];
            var _g1 = 0;
            while (_g1 < 5) {
                var i = _g1++;
                _g.push((function($this) {
                    var $r;
                    var _g2 = []; {
                        var _g3 = 0;
                        while (_g3 < 4) {
                            var j = _g3++;
                            _g2.push(0);
                        }
                    }
                    $r = _g2;
                    return $r;
                }(this)));
            }
            this.scarabSymbols = _g;
            if (this.outcome != null) {
                if (this.outcome.customField != null) {
                    if (this.outcome.customField.wildTriggers != null) this.scarabSymbols = this.outcome.customField.wildTriggers;
                }
                haxe.Log.trace("[GameModel] [updateWilds] currentSpinWilds scarabSymbols ", {
                    fileName: "GameModel.hx",
                    lineNumber: 293,
                    className: "components.gamecontroller.imp.GameModel",
                    methodName: "setScarabSymbols",
                    customParams: [this.scarabSymbols]
                });
            }
            var _g21 = 0;
            var _g11 = this.scarabSymbols.length;
            while (_g21 < _g11) {
                var i1 = _g21++;
                var _g4 = 0;
                var _g31 = this.scarabSymbols.length;
                while (_g4 < _g31) {
                    var j1 = _g4++;
                    if (this.scarabSymbols[i1][j1] == 1) this.totalScarabs++;
                }
            }
            haxe.Log.trace("[GameModel] [updateWilds] currentSpinWilds totalScarabs ", {
                fileName: "GameModel.hx",
                lineNumber: 302,
                className: "components.gamecontroller.imp.GameModel",
                methodName: "setScarabSymbols",
                customParams: [this.totalScarabs]
            });
        };
        scarabGameController.GameModel.prototype.getWildCounter = function() {
            var spinsCounter = "";
            if (this.stakeState != null) {
                var betPerLine = this.stakeState.stakeItems.betPerLine;
                var betInfoSteps = this.outcome.customField.betInfoSteps;
                var spinsMap = this.outcome.customField.spinsCounterPerBet;
                var _g1 = 0;
                var _g = betInfoSteps.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    var betInfoDenom = new money.Money(betInfoSteps[i]).mul(new money.Money(this.denomination)).value;
                    if (betPerLine == betInfoDenom) {
                        var key = betInfoSteps[i];
                        if (_hcmn_.__map_reserved[key] != null ? spinsMap.existsReserved(key) : spinsMap.h.hasOwnProperty(key)) spinsCounter = _hcmn_.__map_reserved[key] != null ? spinsMap.getReserved(key) : spinsMap.h[key];
                        else spinsCounter = _hcmn_.__map_reserved["default"] != null ? spinsMap.getReserved("default") : spinsMap.h["default"];
                    }
                }
            } else spinsCounter == "-1";
            return spinsCounter;
        };
        scarabGameController.GameModel.prototype.getReelsInfo = function(reelsInfo) {
            var states = [];
            if (this.rgPresentation) {
                var _g1 = 0;
                var _g = reelsInfo.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    states[i] = [];
                    var _g3 = 0;
                    var _g2 = reelsInfo[i].length;
                    while (_g3 < _g2) {
                        var j = _g3++;
                        states[i][j] = reelsInfo[i][j];
                        if (reelsInfo[i][j] == 1) {
                            if (!this.isHighWin()) states[i][j] = 2;
                        }
                    }
                }
                return states;
            }
            return reelsInfo;
        };
        scarabGameController.GameModel.prototype.isHighWin = function() {
            var totalPayout = parseFloat(this.spinOutcome.baseGame.outcome.totalPayout);
            if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "BaseGame") totalPayout = parseFloat(this.spinOutcome.freeSpin.outcome.totalPayout);
            else if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "FreeSpin") totalPayout = parseFloat(this.spinOutcome.freeSpin.outcome.totalPayout);
            var totalBetValue = parseFloat(this.totalBet);
            if (totalPayout > totalBetValue) return true;
            return false;
        };
        scarabGameController.GameModel.prototype.isAccumulatedHighWin = function() {
            var totalBetValue = parseFloat(this.totalBet);
            var totalPayout = parseFloat(this.spinOutcome.acumulatedPayout);
            if (totalPayout > totalBetValue) return true;
            return false;
        };
        scarabGameController.GameModel.prototype.isCandidateForAdditionalBigWinAnimation = function(payload) {
            return parseFloat(payload) >= 30 * parseFloat(this.totalBet);
        };
        scarabGameController.GameModel.prototype.__class__ = scarabGameController.GameModel;
        scarabGameController.StateMachineContext = function(dispatcher) {
            stateMachineEngine.SMContext.call(this, dispatcher);
        };
        scarabGameController.StateMachineContext.__name__ = ["scarabGameController", "StateMachineContext"];
        scarabGameController.StateMachineContext.__super__ = stateMachineEngine.SMContext;
        for (var k in stateMachineEngine.SMContext.prototype) scarabGameController.StateMachineContext.prototype[k] = stateMachineEngine.SMContext.prototype[k];
        scarabGameController.StateMachineContext.prototype.setupContextData = function(game) {
            this.set_contextValues(new _hcmn_.haxe_ds_StringMap());
            var this1 = this.get_contextValues();
            this1.set("Stage", "");
            var this2 = this.get_contextValues();
            this2.set("retrigger", false);
            var this3 = this.get_contextValues();
            this3.set("NextStage", "");
            var this4 = this.get_contextValues();
            this4.set("awardCapExceeded", false);
            this.set_contextMethods(new _hcmn_.haxe_ds_StringMap());
            var this5 = this.get_contextMethods();
            this5.set("attachComponents", $bind(game, game.attachComponents));
            var this6 = this.get_contextMethods();
            this6.set("initGame", $bind(game, game.initGame));
            var this7 = this.get_contextMethods();
            this7.set("prepareResume", $bind(game, game.prepareResume));
            var this8 = this.get_contextMethods();
            this8.set("onBaseGameIdle", $bind(game, game.onBaseGameIdle));
            var this9 = this.get_contextMethods();
            this9.set("updateBetPanel", $bind(game, game.updateBetPanel));
            var this10 = this.get_contextMethods();
            this10.set("startSpin", $bind(game, game.startSpin));
            var this11 = this.get_contextMethods();
            this11.set("clearAllWins", $bind(game, game.clearAllWins));
            var this12 = this.get_contextMethods();
            this12.set("checkForStopOrAbort", $bind(game, game.checkForStopOrAbort));
            var this13 = this.get_contextMethods();
            this13.set("applyAbortData", $bind(game, game.applyAbortData));
            var this14 = this.get_contextMethods();
            this14.set("stopReels", $bind(game, game.stopReels));
            var this15 = this.get_contextMethods();
            this15.set("showBaseGameOutcome", $bind(game, game.showBaseGameOutcome));
            var this16 = this.get_contextMethods();
            this16.set("showAwardCapScreen", $bind(game, game.showAwardCapScreen));
            var this17 = this.get_contextMethods();
            this17.set("publishResultPresented", $bind(game, game.publishResultPresented));
            var this18 = this.get_contextMethods();
            this18.set("showScatterWins", $bind(game, game.showScatterWins));
            var this19 = this.get_contextMethods();
            this19.set("showPicker", $bind(game, game.showPicker));
            var this20 = this.get_contextMethods();
            this20.set("prepareFreeSpin", $bind(game, game.prepareFreeSpin));
            var this21 = this.get_contextMethods();
            this21.set("publishSpinOutcomePresented", $bind(game, game.publishSpinOutcomePresented));
            var this22 = this.get_contextMethods();
            this22.set("executeContinueCommand", $bind(game, game.executeContinueCommand));
            var this23 = this.get_contextMethods();
            this23.set("updateBetPanelFS", $bind(game, game.updateBetPanelFS));
            var this24 = this.get_contextMethods();
            this24.set("showFreeSpinOutcome", $bind(game, game.showFreeSpinOutcome));
            var this25 = this.get_contextMethods();
            this25.set("showRetriggerScreen", $bind(game, game.showRetriggerScreen));
            var this26 = this.get_contextMethods();
            this26.set("startFSOutroAnim", $bind(game, game.startFSOutroAnim));
            var this27 = this.get_contextMethods();
            this27.set("setBaseGameOutcome", $bind(game, game.setBaseGameOutcome));
            var this28 = this.get_contextMethods();
            this28.set("showFreeSpinSummary", $bind(game, game.showFreeSpinSummary));
            var this29 = this.get_contextMethods();
            this29.set("hideInfoBar", $bind(game, game.hideInfoBar));
            var this30 = this.get_contextMethods();
            this30.set("abortPicker", $bind(game, game.abortPicker));
        };
        scarabGameController.StateMachineContext.prototype.__class__ = scarabGameController.StateMachineContext;
        scarabGameController.StateMachineDef = function() {};
        scarabGameController.StateMachineDef.__name__ = ["scarabGameController", "StateMachineDef"];
        scarabGameController.StateMachineDef.prototype.__class__ = scarabGameController.StateMachineDef;
        scarabGameController.TransitionConstants = function() {};
        scarabGameController.TransitionConstants.__name__ = ["scarabGameController", "TransitionConstants"];
        scarabGameController.TransitionConstants.prototype.__class__ = scarabGameController.TransitionConstants;
        scarabGameController.SkipController = function(betPanelPort) {
            this.betPanelPort = betPanelPort;
            betPanelPort.onButtonPressed().subscribe($bind(this, this.onButtonPressed));
        };
        scarabGameController.SkipController.__name__ = ["scarabGameController", "SkipController"];
        scarabGameController.SkipController.prototype.betPanelPort = null;
        scarabGameController.SkipController.prototype.resolveFn = null;
        scarabGameController.SkipController.prototype.onButtonPressed = function(e) {
            if (e.getPayload() == betPanelApi.EButton.SKIP) {
                if (this.resolveFn != null) {
                    this.resolveFn(null);
                    this.resolveFn = null;
                }
            }
        };
        scarabGameController.SkipController.prototype.show = function() {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolveFn = resolve;
                _g.betPanelPort.showButton().publish(betPanelApi.EButton.SKIP);
                _g.betPanelPort.enableButton().publish(betPanelApi.EButton.SKIP);
            });
            return p;
        };
        scarabGameController.SkipController.prototype.hide = function() {
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
        };
        scarabGameController.SkipController.prototype.__class__ = scarabGameController.SkipController;
        scarabGameController.SoundController = function(soundPort, model) {
            this.count = 0;
            this.winSixDeley = 0;
            this.afterWinSoundStartDalay = 1100;
            this.bgMusicStopDalayTime = 15000;
            this.pushCounter = 0;
            this.isCoinsSoundPlaying = false;
            this.bgMusicIsPlaying = false;
            this.inTension = false;
            this.resumeFreeGame = false;
            this.soundON = true;
            this.winJingleEnd = "";
            this.winJingle = "";
            this.backgroundMusic = "basegame_loop";
            this.BUTTON_PUSH = "button_push";
            this.FREESPINS_WIN_SOUND_1 = "bg_rollup2";
            this.FREESPINS_LOOP = "freegame_music_loop";
            this.BASEGAME_WIN_SOUND_4 = "celebration_loop";
            this.WIN_SIX_END = "celebration_term";
            this.WIN_JINGLE_END = "bg_rollup_term";
            this.BASEGAME_WIN_SOUND_2 = "bg_rollup2";
            this.BASEGAME_WIN_SOUND_1 = "bg_rollup1";
            this.WIN_SOUND_2 = "bg_rollup_term_2";
            this.WIN_SOUND_1 = "bg_rollup_term";
            this.BASEGAME_LOOP = "basegame_loop";
            this.WILD_ARRAY = ["wild_reel1", "wild_reel2", "wild_reel3", "wild_reel4", "wild_reel5", "wild_last"];
            this.REEL_STOP_ARRAY = ["reel_stop1", "reel_stop2", "reel_stop3", "reel_stop4", "reel_stop5"];
            this.model = model;
            this.soundPort = soundPort;
            soundPort.muteAll().publish(null);
            soundPort.unmuteAll().publish(null);
        };
        scarabGameController.SoundController.__name__ = ["scarabGameController", "SoundController"];
        scarabGameController.SoundController.prototype.REEL_STOP_ARRAY = null;
        scarabGameController.SoundController.prototype.WILD_ARRAY = null;
        scarabGameController.SoundController.prototype.BASEGAME_LOOP = null;
        scarabGameController.SoundController.prototype.WIN_SOUND_1 = null;
        scarabGameController.SoundController.prototype.WIN_SOUND_2 = null;
        scarabGameController.SoundController.prototype.BASEGAME_WIN_SOUND_1 = null;
        scarabGameController.SoundController.prototype.BASEGAME_WIN_SOUND_2 = null;
        scarabGameController.SoundController.prototype.WIN_JINGLE_END = null;
        scarabGameController.SoundController.prototype.WIN_SIX_END = null;
        scarabGameController.SoundController.prototype.BASEGAME_WIN_SOUND_4 = null;
        scarabGameController.SoundController.prototype.FREESPINS_LOOP = null;
        scarabGameController.SoundController.prototype.FREESPINS_WIN_SOUND_1 = null;
        scarabGameController.SoundController.prototype.BUTTON_PUSH = null;
        scarabGameController.SoundController.prototype.backgroundMusic = null;
        scarabGameController.SoundController.prototype.winJingle = null;
        scarabGameController.SoundController.prototype.winJingleEnd = null;
        scarabGameController.SoundController.prototype.soundON = null;
        scarabGameController.SoundController.prototype.resumeFreeGame = null;
        scarabGameController.SoundController.prototype.inTension = null;
        scarabGameController.SoundController.prototype.bgMusicIsPlaying = null;
        scarabGameController.SoundController.prototype.isCoinsSoundPlaying = null;
        scarabGameController.SoundController.prototype.pushCounter = null;
        scarabGameController.SoundController.prototype.bgMusicStopDalayTime = null;
        scarabGameController.SoundController.prototype.afterWinSoundStartDalay = null;
        scarabGameController.SoundController.prototype.winSixDeley = null;
        scarabGameController.SoundController.prototype.count = null;
        scarabGameController.SoundController.prototype.temp = null;
        scarabGameController.SoundController.prototype.reelsWithWild = null;
        scarabGameController.SoundController.prototype.freegameOn = null;
        scarabGameController.SoundController.prototype.soundPort = null;
        scarabGameController.SoundController.prototype.tensionReels = null;
        scarabGameController.SoundController.prototype.isWinPlaying = null;
        scarabGameController.SoundController.prototype.model = null;
        scarabGameController.SoundController.prototype.stopBackgroundMusic = null;
        scarabGameController.SoundController.prototype.finisherFS = null;
        scarabGameController.SoundController.prototype.finisherBG = null;
        scarabGameController.SoundController.prototype.setGameMode = function(freegame, resumeGame, pickerOn, afterFSbasegameOn, topic, payload) {
            if (afterFSbasegameOn == null) afterFSbasegameOn = false;
            if (pickerOn == null) pickerOn = false;
            if (resumeGame == null) resumeGame = false;
            var _g = this;
            haxe.Log.trace("setGameMode", {
                fileName: "SoundController.hx",
                lineNumber: 62,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "setGameMode",
                customParams: [resumeGame]
            });
            if (!resumeGame) {
                if (pickerOn) {
                    if (this.bgMusicIsPlaying) this.stopSound(this.backgroundMusic);
                    this.bgMusicIsPlaying = false;
                    this.stopSound(this.FREESPINS_LOOP);
                    this.playSound("fg_transition_sound");
                    this.playSound("celebration_bell");
                    _hcmn_.haxe_Timer.delay(function() {
                        _g.playSound("fg_pick_loop");
                    }, 2000);
                }
                if (freegame) {
                    this.freegameOn = true;
                    this.fadeOut("fg_pick_loop", 1);
                    this.playSound("fg_transition_sound");
                    _hcmn_.haxe_Timer.delay(function() {
                        _g.fadeOut("fg_pick_sound_and_animations", 1);
                        _g.inFreeGame();
                    }, 300);
                }
                if (afterFSbasegameOn) {
                    this.freegameOn = false;
                    if (this.soundON) this.fadeOut(this.FREESPINS_LOOP, 150);
                    else this.stopSound(this.FREESPINS_LOOP);
                    this.playBackgroundMusicAfterFs();
                }
            }
            if (resumeGame) {
                this.freegameOn = true;
                this.resumeInFreeGameLoop();
            }
        };
        scarabGameController.SoundController.prototype.onReelStopped = function(payload, hasFsTrigger) {
            this.playSound(this.REEL_STOP_ARRAY[payload]);
            this.decreaseVolume(this.REEL_STOP_ARRAY[payload], 0.5);
            if (hasFsTrigger) this.playSound("bonus_symbol");
        };
        scarabGameController.SoundController.prototype.decreaseVolume = function(x, y) {
            this.soundPort.volume().publish(new soundManagerApi.SoundVolumeData(x, y));
        };
        scarabGameController.SoundController.prototype.playWinSound = function(winType, isFreeGame, includeCoinsSound) {
            if (includeCoinsSound == null) includeCoinsSound = false;
            if (isFreeGame == null) isFreeGame = false;
            var _g = this;
            this.isWinPlaying = true;
            if (isFreeGame) this.winJingle = this.FREESPINS_WIN_SOUND_1;
            else this.winJingle = this.BASEGAME_WIN_SOUND_1;
            this.winJingleEnd = this.WIN_JINGLE_END;
            if (winType != 1) this.volumeDown(this.backgroundMusic);
            this.clearBackgroundMusicStopTimeOut();
            switch (winType) {
                case 0:
                    return;
                case 1:
                    var isHighWin = this.model.isHighWin();
                    if (this.model.rgPresentation) {
                        if (!isHighWin) this.playSound(this.WIN_SOUND_2);
                        else this.playSound(this.WIN_SOUND_1);
                    } else this.playSound(this.WIN_SOUND_1);
                    this.isWinPlaying = false;
                    _hcmn_.haxe_Timer.delay(function() {
                        _g.startBackgroundMusicStopTimeOut();
                    }, this.afterWinSoundStartDalay);
                    break;
                case 2:
                    this.playSound(this.winJingle);
                    this.winCaseSoundBehavior(1900);
                    break;
                case 3:
                    this.playSound(this.winJingle);
                    this.winCaseSoundBehavior(3900);
                    break;
                case 4:
                    this.winJingle = this.BASEGAME_WIN_SOUND_2;
                    this.playSound(this.winJingle);
                    this.winCaseSoundBehavior(3900);
                    break;
                case 5:
                    this.winJingle = this.BASEGAME_WIN_SOUND_2;
                    this.playSound(this.winJingle);
                    this.winCaseSoundBehavior(9900);
                    break;
                case 6:
                    if (!isFreeGame) {
                        this.winJingle = this.BASEGAME_WIN_SOUND_4;
                        this.winJingleEnd = this.WIN_SIX_END;
                        this.playSound("celebration_bell");
                        this.winSixDeley = 2000;
                    } else this.winSixDeley = 0;
                    _hcmn_.haxe_Timer.delay(function() {
                        _g.stopSound("celebration_bell");
                        _hcmn_.haxe_Timer.delay(function() {
                            if (_g.isWinPlaying) _g.playCoin(includeCoinsSound);
                        }, 2000);
                        _g.playSound(_g.winJingle);
                        _g.winCaseSoundBehavior(11000, 8400);
                    }, this.winSixDeley);
                    break;
            }
        };
        scarabGameController.SoundController.prototype.playCoin = function(includeCoinsSound) {
            if (includeCoinsSound) {
                this.playSound("coins");
                this.isCoinsSoundPlaying = true;
            }
        };
        scarabGameController.SoundController.prototype.onlyBaseGameWinCaseSoundBehavior = function(CurrentBaseGameWinSound) {
            var _g = this;
            if (!this.freegameOn) _hcmn_.haxe_Timer.delay(function() {
                _g.stopSound(_g.winJingle);
                _g.winJingle = CurrentBaseGameWinSound;
                if (_g.isWinPlaying) _g.playSound(_g.winJingle);
            }, 4300);
        };
        scarabGameController.SoundController.prototype.winCaseSoundBehavior = function(ifIsFreeGameDelay, ifIsBaseGameDalay) {
            var _g = this;
            if (ifIsBaseGameDalay == null) ifIsBaseGameDalay = ifIsFreeGameDelay;
            if (this.freegameOn && this.isWinPlaying) this.finisherFS = _hcmn_.haxe_Timer.delay(function() {
                _g.winFinish();
            }, ifIsFreeGameDelay);
            if (!this.freegameOn && this.isWinPlaying) this.finisherBG = _hcmn_.haxe_Timer.delay(function() {
                _g.winFinish();
            }, ifIsBaseGameDalay);
        };
        scarabGameController.SoundController.prototype.winFinish = function() {
            this.stopSound(this.winJingle);
            this.stopSound("celebration_bell");
            this.winJingle = "";
            this.playWinJingleEndWithDelay();
            this.afterWinBackgroundSoundBehavior();
        };
        scarabGameController.SoundController.prototype.playWinJingleEndWithDelay = function() {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                if (_g.isWinPlaying) {
                    _g.playSound(_g.winJingleEnd);
                    if (_g.isCoinsSoundPlaying) {
                        _g.stopSound("coins");
                        _g.isCoinsSoundPlaying = false;
                    }
                    _g.isWinPlaying = false;
                }
                _g.clearFinisher();
            }, 100);
        };
        scarabGameController.SoundController.prototype.afterWinBackgroundSoundBehavior = function() {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                _g.volumeUp(_g.backgroundMusic);
                _g.startBackgroundMusicStopTimeOut();
            }, this.afterWinSoundStartDalay);
        };
        scarabGameController.SoundController.prototype.clearBackgroundMusicStopTimeOut = function() {
            if (this.stopBackgroundMusic != null) this.stopBackgroundMusic.stop();
        };
        scarabGameController.SoundController.prototype.clearFinisher = function() {
            if (this.finisherBG != null) this.finisherBG.stop();
            if (this.finisherFS != null) this.finisherFS.stop();
        };
        scarabGameController.SoundController.prototype.startBackgroundMusicStopTimeOut = function() {
            var _g = this;
            this.clearBackgroundMusicStopTimeOut();
            this.stopBackgroundMusic = _hcmn_.haxe_Timer.delay(function() {
                if (_g.bgMusicIsPlaying) {
                    if (_g.soundON) {
                        _g.fadeOut(_g.backgroundMusic, 2000);
                        _g.bgMusicIsPlaying = false;
                    } else {
                        _g.stopSound(_g.backgroundMusic);
                        _g.bgMusicIsPlaying = false;
                    }
                }
                _g.clearBackgroundMusicStopTimeOut();
            }, this.bgMusicStopDalayTime);
        };
        scarabGameController.SoundController.prototype.turnSoundOn = function() {
            this.soundPort.unmuteAll().publish(null);
            this.soundON = true;
        };
        scarabGameController.SoundController.prototype.turnSoundOff = function() {
            this.soundPort.muteAll().publish(null);
            this.soundON = false;
        };
        scarabGameController.SoundController.prototype.onStartSpin = function() {
            this.checkBackgroundMusic();
            this.clearBackgroundMusicStopTimeOut();
        };
        scarabGameController.SoundController.prototype.playSound = function(sound) {
            this.soundPort.play().publish(sound);
            haxe.Log.trace("[SOUND_CONTROLLER] playSound()", {
                fileName: "SoundController.hx",
                lineNumber: 298,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "playSound",
                customParams: [sound]
            });
        };
        scarabGameController.SoundController.prototype.playSoundButtonPush = function() {
            if (this.pushCounter == 1) this.playSound(this.BUTTON_PUSH);
            else this.pushCounter = 1;
        };
        scarabGameController.SoundController.prototype.muteSound = function(sound) {
            this.soundPort.mute().publish(sound);
        };
        scarabGameController.SoundController.prototype.stopSound = function(sound) {
            this.soundPort.stop().publish(sound);
        };
        scarabGameController.SoundController.prototype.playTensionSound = function(payload, reelId) {
            if (payload[reelId + 1] == 1) this.playSound("tension_spin");
            this.clearBackgroundMusicStopTimeOut();
        };
        scarabGameController.SoundController.prototype.volumeDown = function(sound) {
            this.setVolume(sound, 0.8, 100);
            this.setVolume(sound, 0.5, 200);
            this.setVolume(sound, 0.1, 250);
        };
        scarabGameController.SoundController.prototype.volumeUp = function(sound) {
            this.setVolume(sound, 0.3, 100);
            this.setVolume(sound, 0.6, 200);
            this.setVolume(sound, 1.0, 250);
        };
        scarabGameController.SoundController.prototype.setVolume = function(sound, volume, time) {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                _g.soundPort.volume().publish(new soundManagerApi.SoundVolumeData(sound, volume));
            }, time);
        };
        scarabGameController.SoundController.prototype.freeSpinBackgroundMusicVolumeUpAfterSkip = function() {
            this.soundPort.volume().publish(new soundManagerApi.SoundVolumeData("freegame_loop", 1.0));
        };
        scarabGameController.SoundController.prototype.checkBackgroundMusic = function() {
            if (!this.bgMusicIsPlaying) {
                if (this.soundON) {
                    if (!this.freegameOn) this.fadeIn(this.backgroundMusic, 1);
                } else this.soundPort.play().publish(this.backgroundMusic);
                this.bgMusicIsPlaying = true;
                this.startBackgroundMusicStopTimeOut();
            }
        };
        scarabGameController.SoundController.prototype.playBackgroundMusicAfterFs = function() {
            if (this.soundON) {
                if (!this.freegameOn) this.fadeIn(this.backgroundMusic, 1);
            } else this.soundPort.play().publish(this.backgroundMusic);
            this.bgMusicIsPlaying = true;
        };
        scarabGameController.SoundController.prototype.freeGameLoop = function() {
            if (this.soundON) this.fadeIn(this.FREESPINS_LOOP, 500);
            else this.playSound(this.FREESPINS_LOOP);
        };
        scarabGameController.SoundController.prototype.restartWinSound = function() {
            this.winJingle = "";
            this.winJingleEnd = "";
            this.isWinPlaying = false;
            this.volumeUp(this.backgroundMusic);
            this.clearBackgroundMusicStopTimeOut();
        };
        scarabGameController.SoundController.prototype.checkWinSound = function() {
            if (this.winJingle != "") {
                this.soundPort.stop().publish(this.winJingle);
                this.restartWinSound();
            }
        };
        scarabGameController.SoundController.prototype.inFreeGame = function() {
            if (this.freegameOn) this.freeGameLoop();
        };
        scarabGameController.SoundController.prototype.resumeInFreeGameLoop = function() {
            if (this.soundON) this.fadeIn(this.FREESPINS_LOOP, 500);
            else this.playSound(this.FREESPINS_LOOP);
        };
        scarabGameController.SoundController.prototype.betPanleStakeChanged = function(currentBPL, maxValue, previousBPL) {
            if (currentBPL == maxValue) {
                this.playSound("bet_max");
                return;
            }
            if (currentBPL > previousBPL) this.playSound("bet_up");
            else if (currentBPL < previousBPL) this.playSound("bet_down");
            else this.playSound("button_push");
        };
        scarabGameController.SoundController.prototype.playAutoSpinSound = function(isOn) {
            if (isOn == null) isOn = false;
            if (isOn) {
                this.playSound("auto_on");
                return;
            }
            this.playSound("auto_off");
        };
        scarabGameController.SoundController.prototype.playBonus = function(reelId) {
            var bounusSymbolSound = "wild_reel" + reelId;
            this.playSound(bounusSymbolSound);
        };
        scarabGameController.SoundController.prototype.playWildAnnouncement = function(payload) {
            var _g1 = 0;
            var _g = payload.length;
            while (_g1 < _g) {
                var i = _g1++;
                var _g3 = 0;
                var _g2 = payload[i].length;
                while (_g3 < _g2) {
                    var j = _g3++;
                    if (payload[i][j] != -1) this.count++;
                }
            }
            if (!this.freegameOn) {
                if (this.count == 1) this.playSound("wild_speech");
                if (this.count > 1) this.playSound("wilds_speech");
                this.count = 0;
            }
        };
        scarabGameController.SoundController.prototype.playWild = function(reelId, isLast) {
            if (isLast) this.playSound(this.WILD_ARRAY[5]);
            else this.playSound(this.WILD_ARRAY[reelId]);
        };
        scarabGameController.SoundController.prototype.afterLastFreeSpin = function() {
            this.stopSound(this.FREESPINS_LOOP);
            this.playSound("fg_congrats_screen_jingle");
            this.playSound("fg_congrats_screen");
        };
        scarabGameController.SoundController.prototype.frame_glitter = function(payload) {
            var _g1 = this;
            haxe.Log.trace("[SOUND_CONTROLLER] frame", {
                fileName: "SoundController.hx",
                lineNumber: 480,
                className: "components.gamecontroller.imp.controllers.SoundController",
                methodName: "frame_glitter",
                customParams: [payload]
            });
            var _g = 0;
            while (_g < payload.length) {
                var sound = payload[_g];
                ++_g;
                if (sound == 1) {
                    this.playSound("symbol_frame_glitter");
                    _hcmn_.haxe_Timer.delay(function() {
                        _g1.playSound("symbol_animation");
                    }, 1700);
                    this.temp = payload;
                }
            }
        };
        scarabGameController.SoundController.prototype.fadeIn = function(soundId, length) {
            this.soundPort.fadeIn().publish(new soundManagerApi.SoundActionProperties(soundId, length));
        };
        scarabGameController.SoundController.prototype.fadeOut = function(soundId, length) {
            this.soundPort.fadeOut().publish(new soundManagerApi.SoundActionProperties(soundId, length));
        };
        scarabGameController.SoundController.prototype.__class__ = scarabGameController.SoundController;
        scarabGameController.TopicToRequest = function(requestTopic, responseTopic) {
            this.responseTopic = responseTopic;
            this.requestTopic = requestTopic;
        };
        scarabGameController.TopicToRequest.__name__ = ["scarabGameController", "TopicToRequest"];
        scarabGameController.TopicToRequest.prototype.requestTopic = null;
        scarabGameController.TopicToRequest.prototype.responseTopic = null;
        scarabGameController.TopicToRequest.prototype.subscription = null;
        scarabGameController.TopicToRequest.prototype.resolve = null;
        scarabGameController.TopicToRequest.prototype.beforeResolve = null;
        scarabGameController.TopicToRequest.prototype.onBeforeResolve = function(callback) {
            this.beforeResolve = callback;
            return this;
        };
        scarabGameController.TopicToRequest.prototype.execute = function(payload) {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolve = resolve;
                _g.subscription = _g.responseTopic.subscribe($bind(_g, _g.onResponse));
                _g.requestTopic.publish(payload);
            });
            return p;
        };
        scarabGameController.TopicToRequest.prototype.onResponse = function(e) {
            var payload = e.getPayload();
            this.subscription.unsubscribe();
            if (this.beforeResolve != null) this.beforeResolve(payload);
            this.resolve(payload);
            this.resolve = null;
        };
        scarabGameController.TopicToRequest.prototype.__class__ = scarabGameController.TopicToRequest;
        if (typeof components == 'undefined') {
            var components = {};
        };
        if (!components.gamecontroller) {
            components.gamecontroller = {};
        };
        if (!components.gamecontroller.imp) {
            components.gamecontroller.imp = {};
        };
        if (!components.gamecontroller.imp.controllers) {
            components.gamecontroller.imp.controllers = {};
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload = function(requestTopic, responseTopic) {
            this.responseTopic = responseTopic;
            this.requestTopic = requestTopic;
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.__name__ = ["components", "gamecontroller", "imp", "controllers", "TopicToRequest_winmeter_api_port_payload_WinMeterPayload"];
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.requestTopic = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.responseTopic = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.subscription = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.resolve = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.beforeResolve = null;
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.onBeforeResolve = function(callback) {
            this.beforeResolve = callback;
            return this;
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.execute = function(payload) {
            var _g = this;
            var p = new Promise(function(resolve, reject) {
                _g.resolve = resolve;
                _g.subscription = _g.responseTopic.subscribe($bind(_g, _g.onResponse));
                _g.requestTopic.publish(payload);
            });
            return p;
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.onResponse = function(e) {
            var payload = e.getPayload();
            this.subscription.unsubscribe();
            if (this.beforeResolve != null) this.beforeResolve(payload);
            this.resolve(payload);
            this.resolve = null;
        };
        components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload.prototype.__class__ = components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload;
        scarabGameController.WinMeterController = function(port, model) {
            this.model = model;
            this.port = port;
        };
        scarabGameController.WinMeterController.__name__ = ["scarabGameController", "WinMeterController"];
        scarabGameController.WinMeterController.prototype.port = null;
        scarabGameController.WinMeterController.prototype.payload = null;
        scarabGameController.WinMeterController.prototype.model = null;
        scarabGameController.WinMeterController.prototype.showWin = function(payload) {
            this.payload = payload;
            var request = new components.gamecontroller.imp.controllers.TopicToRequest_winmeter_api_port_payload_WinMeterPayload(this.port.displayWin(), this.port.onDisplayWinFinished());
            return request.execute(payload);
        };
        scarabGameController.WinMeterController.prototype.show = function(winAmount, bigWin, conditionalPlayVBAnimationBig) {
            var instantShow = false;
            if (this.model.rgPresentation) {
                if (!this.model.isHighWin()) {
                    if (this.model.getWildCounter() == "10") instantShow = false;
                    else instantShow = true;
                }
            }
            var payload = new winMeterApi.WinMeterPayload(winAmount, bigWin.winSegments, instantShow, null, conditionalPlayVBAnimationBig);
            return this.showWin(payload);
        };
        scarabGameController.WinMeterController.prototype.stop = function() {
            this.port.displayWin().publish(new winMeterApi.WinMeterPayload(this.payload.winAmount, this.payload.winSegments, true, null, false));
        };
        scarabGameController.WinMeterController.prototype.clear = function() {
            this.port.showMessage().publish("");
        };
        scarabGameController.WinMeterController.prototype.showInFS = function(winAmount, bigWin, startingAmount, conditionalPlayVBAnimationBig) {
            var payload = new winMeterApi.WinMeterPayload(winAmount, bigWin.winSegments, false, startingAmount, conditionalPlayVBAnimationBig);
            return this.showWin(payload);
        };
        scarabGameController.WinMeterController.prototype.showIntro = function(winAmount, bigWin) {
            var payload = new winMeterApi.WinMeterPayload(winAmount, bigWin.winSegments, true, null, false);
            return this.showWin(payload);
        };
        scarabGameController.WinMeterController.prototype.__class__ = scarabGameController.WinMeterController;
        scarabGameController.LocalStoragePolyfill = function() {
            this.values = new _hcmn_.haxe_ds_StringMap();
        };
        scarabGameController.LocalStoragePolyfill.__name__ = ["scarabGameController", "LocalStoragePolyfill"];
        scarabGameController.LocalStoragePolyfill.prototype.values = null;
        scarabGameController.LocalStoragePolyfill.prototype.setItem = function(key, val) {
            var value = val;
            this.values.set(key, value);
        };
        scarabGameController.LocalStoragePolyfill.prototype.getItem = function(key) {
            return this.values.get(key);
        };
        scarabGameController.LocalStoragePolyfill.prototype.removeItem = function(key) {
            this.values.remove(key);
        };
        scarabGameController.LocalStoragePolyfill.prototype.__class__ = scarabGameController.LocalStoragePolyfill;
        scarabGameController.Storage = function() {
            try {
                js.Browser.getLocalStorage().setItem("ollie_settings_" + "test", "test");
                js.Browser.getLocalStorage().removeItem("ollie_settings_" + "test");
                this.storage = js.Browser.getLocalStorage();
            } catch (err) {
                this.storage = new scarabGameController.LocalStoragePolyfill();
            }
        };
        scarabGameController.Storage.__name__ = ["scarabGameController", "Storage"];
        scarabGameController.Storage.prototype.storage = null;
        scarabGameController.Storage.prototype.writeOption = function(id, value) {
            this.storage.setItem("ollie_settings_" + id, value);
        };
        scarabGameController.Storage.prototype.readOption = function(id) {
            return this.storage.getItem("ollie_settings_" + id);
        };
        scarabGameController.Storage.prototype.hasOption = function(id) {
            return this.storage.getItem("ollie_settings_" + id) != null;
        };
        scarabGameController.Storage.prototype.__class__ = scarabGameController.Storage;
        scarabGameController.RetriggerData = function(bonusesRemaining, maxRetrigger, initReels) {
            this.maxRetrigger = maxRetrigger;
            this.bonusesRemaining = bonusesRemaining;
            this.initReels = initReels;
        };
        scarabGameController.RetriggerData.__name__ = ["scarabGameController", "RetriggerData"];
        scarabGameController.RetriggerData.prototype.maxRetrigger = null;
        scarabGameController.RetriggerData.prototype.bonusesRemaining = null;
        scarabGameController.RetriggerData.prototype.initReels = null;
        scarabGameController.RetriggerData.prototype.__class__ = scarabGameController.RetriggerData;
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            },
            set: function(k, v) {
                return {
                    arguments: ["*", "*"],
                    returns: "void"
                };
            },
            toString: function() {
                return {
                    arguments: [],
                    returns: "string"
                };
            }
        };
        haxe.Log = function() {};
        haxe.Log.__name__ = ["haxe", "Log"];
        haxe.Log.trace = function(v, infos) {
            _hcmn_.js_Boot.__trace(v, infos);
        };
        haxe.Log.prototype.__class__ = haxe.Log;
        if (typeof js == 'undefined') {
            var js = {};
        };
        js.Browser = function() {};
        js.Browser.__name__ = ["js", "Browser"];
        js.Browser.window = null;
        js.Browser.document = null;
        js.Browser.location = null;
        js.Browser.navigator = null;
        js.Browser.console = null;
        js.Browser.supported = null;
        js.Browser.getLocalStorage = function() {
            try {
                var s = window.localStorage;
                s.getItem("");
                return s;
            } catch (e) {
                return null;
            }
        };
        js.Browser.prototype.__class__ = js.Browser;
        scarabGameController.StateMachineDef.ID = "GAMECONTROLLERSM_";;
        scarabGameController.StateMachineDef.START_REEL_SPIN = "START_REEL_SPIN";;
        scarabGameController.StateMachineDef.PRESENT_SPIN_OUTCOME = "PRESENT_SPIN_OUTCOME";;
        scarabGameController.StateMachineDef.FS_OUTRO_END = "FS_OUTRO_END";;
        scarabGameController.StateMachineDef.CONTINUE_ENABLED = "CONTINUE_ENABLED";;
        scarabGameController.StateMachineDef.ABORT_SPIN = "ABORT_SPIN";;
        scarabGameController.StateMachineDef.SPIN_ENABLED = "SPIN_ENABLED";;
        scarabGameController.StateMachineDef.PICKER_STATE = "PICKER_STATE";;
        scarabGameController.StateMachineDef.PRESENT_RESULT = "PRESENT_RESULT";;
        scarabGameController.StateMachineDef.INIT_ACTION = "INIT_ACTION";;
        scarabGameController.StateMachineDef.FS_OUTCOME_DONE = "FS_OUTCOME_DONE";;
        scarabGameController.StateMachineDef.STOP_REEL_SPIN = "STOP_REEL_SPIN";;
        scarabGameController.StateMachineDef.RETRIGGER_SHOWN = "RETRIGGER_SHOWN";;
        scarabGameController.StateMachineDef.PREPARE_RESUME = "PREPARE_RESUME";;
        scarabGameController.StateMachineDef.SET_PICKER_INTRO = "SET_PICKER_INTRO";;
        scarabGameController.StateMachineDef.CONTINUE = "CONTINUE";;
        scarabGameController.StateMachineDef.SPIN_STARTING_ENDED = "SPIN_STARTING_ENDED";;
        scarabGameController.StateMachineDef.SET_PICKER_IDLE = "SET_PICKER_IDLE";;
        scarabGameController.StateMachineDef.ABORT_PICKER_STATE = "ABORT_PICKER_STATE";;
        scarabGameController.StateMachineDef.PICKER_OUTRO_STATE = "PICKER_OUTRO_STATE";;
        scarabGameController.StateMachineDef.LOADING_STATE = "LOADING_STATE";;
        scarabGameController.StateMachineDef.PREPARE_RESUME_STATE = "PREPARE_RESUME_STATE";;
        scarabGameController.StateMachineDef.INIT_STATE = "INIT_STATE";;
        scarabGameController.StateMachineDef.INTRO_STATE = "INTRO_STATE";;
        scarabGameController.StateMachineDef.IDLE_STATE = "IDLE_STATE";;
        scarabGameController.StateMachineDef.SPINNING_STATE = "SPINNING_STATE";;
        scarabGameController.StateMachineDef.FS_IDLE = "FS_IDLE";;
        scarabGameController.StateMachineDef.ABORT_SPIN_STATE = "ABORT_SPIN_STATE";;
        scarabGameController.StateMachineDef.STOPPING_STATE = "STOPPING_STATE";;
        scarabGameController.StateMachineDef.AWARD_CAP_STATE = "AWARD_CAP_STATE";;
        scarabGameController.StateMachineDef.AWARD_CAP_PREPARE = "AWARD_CAP_PREPARE";;
        scarabGameController.StateMachineDef.FS_ENTRY = "FS_ENTRY";;
        scarabGameController.StateMachineDef.BASEGAME_OUTCOME = "BASEGAME_OUTCOME";;
        scarabGameController.StateMachineDef.FS_OUTCOME = "FS_OUTCOME";;
        scarabGameController.StateMachineDef.FS_OUTRO = "FS_OUTRO";;
        scarabGameController.StateMachineDef.RETRIGGER_STATE = "RETRIGGER_STATE";;
        scarabGameController.StateMachineDef.FS_OUTCOME_PRESENTED = "FS_OUTCOME_PRESENTED";;
        scarabGameController.StateMachineDef.FS_SUMMARY = "FS_SUMMARY";;
        scarabGameController.StateMachineDef.BET_CONFIRM = "BET_CONFIRM";;
        scarabGameController.StateMachineDef.SHOW_WIN_STATE = "SHOW_WIN_STATE";;
        scarabGameController.StateMachineDef.SPIN_STARTING_STATE = "SPIN_STARTING_STATE";;
        scarabGameController.StateMachineDef.FSM = "<fsm initial='LOADING_STATE'>\r\n  <state name='LOADING_STATE'>\r\n    <transition target='PREPARE_RESUME_STATE' action='PREPARE_RESUME'/>\r\n    <transition target='INIT_STATE' action='INIT_ACTION'/>\r\n    <operation type='do' method='attachComponents'/>\r\n  </state>\r\n  <state name='PREPARE_RESUME_STATE'>\r\n    <transition target='FS_IDLE' condition='NextStage==FreeSpin' action='CONTINUE_ENABLED'/>\r\n\t<transition target='PICKER_STATE' action='SET_PICKER_IDLE'/>\r\n    <operation type='do' method='prepareResume'/>\r\n  </state>\r\n  <state name='INIT_STATE'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n    <operation type='do' method='initGame'/>\r\n  </state>\r\n  <state name='IDLE_STATE'>\r\n    <transition target='SPIN_STARTING_STATE' action='START_REEL_SPIN'/>\r\n    <operation type='do' method='onBaseGameIdle'/>\r\n    <operation type='exit' method='updateBetPanel'/>\r\n  </state>\r\n  <state name='PICKER_STATE'>\r\n\t\t<transition target='PICKER_OUTRO_STATE' action='PRESENT_SPIN_OUTCOME'/>\r\n\t\t<transition target='ABORT_PICKER_STATE' action='ABORT_SPIN'/>\r\n\t\t<operation type='do' method='showPicker'/>\r\n\t</state>\r\n\t<state name='PICKER_OUTRO_STATE'>\r\n\t\t<transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n\t\t<operation type='entry' method='prepareFreeSpin'/>\r\n\t</state>\r\n\t<state name='ABORT_PICKER_STATE'>\r\n\t\t<transition target='PICKER_STATE' action='SET_PICKER_IDLE'/>\r\n\t\t<operation type='do' method='abortPicker'/>\r\n\t</state>\r\n  <state name='SPIN_STARTING_STATE'>\r\n    <transition target='SPINNING_STATE' action='SPIN_STARTING_ENDED'/>\r\n\t<operation type='do' method='clearAllWins'/>\r\n\t<operation type='do' method='startSpin'/>\r\n  </state>\r\n  <state name='SPINNING_STATE'>\r\n    <transition target='STOPPING_STATE' action='STOP_REEL_SPIN'/>\r\n    <transition target='ABORT_SPIN_STATE' action='ABORT_SPIN'/>\r\n\t<operation type='do' method='checkForStopOrAbort'/>\r\n  </state>\r\n  <state name='FS_IDLE'>\r\n    <transition target='SPIN_STARTING_STATE' action='START_REEL_SPIN'/>\r\n    <operation type='do' method='executeContinueCommand'/>\r\n    <operation type='exit' method='updateBetPanelFS'/>\r\n  </state>\r\n  <state name='ABORT_SPIN_STATE'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n\t<transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n\t<operation type='entry' method='applyAbortData'/>\r\n  </state>\r\n  <state name='STOPPING_STATE'>\r\n    <transition target='FS_ENTRY' condition='!awardCapExceeded,Stage==BaseGame,NextStage==Picker' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='BASEGAME_OUTCOME' condition='!awardCapExceeded,Stage==BaseGame,NextStage==BaseGame' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='FS_OUTCOME' condition='!awardCapExceeded,Stage==FreeSpin' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='AWARD_CAP_PREPARE' condition='awardCapExceeded' action='PRESENT_SPIN_OUTCOME'/>\r\n    <operation type='entry' method='stopReels'/>\r\n  </state>\r\n  <state name='AWARD_CAP_PREPARE'>\r\n    <transition target='AWARD_CAP_STATE' action='PRESENT_RESULT'/>\r\n    <operation type='do' method='publishSpinOutcomePresented'/>\r\n  </state>\r\n  <state name='AWARD_CAP_STATE'>\r\n    <transition target='BET_CONFIRM' action='CONTINUE'/>\r\n    <operation type='do' method='showAwardCapScreen'/>\r\n\t<operation type='do' method='setBaseGameOutcome'/>\r\n  </state>\r\n  <state name='FS_ENTRY'>\r\n    <transition target='PICKER_STATE' action='SET_PICKER_INTRO'/>\r\n    <operation type='do' method='showScatterWins'/>\r\n\t<operation type='do' method='publishSpinOutcomePresented'/>\r\n  </state>\r\n  <state name='BASEGAME_OUTCOME'>\r\n    <transition target='BET_CONFIRM' action='PRESENT_RESULT'/>\r\n    <operation type='entry' method='showBaseGameOutcome'/>\r\n  </state>\r\n  <state name='FS_OUTCOME'>\r\n    <transition target='RETRIGGER_STATE' condition='retrigger' action='FS_OUTCOME_DONE'/>\r\n    <transition target='FS_OUTCOME_PRESENTED' condition='!retrigger' action='FS_OUTCOME_DONE'/>\r\n\t<operation type='do' method='showFreeSpinOutcome'/>\r\n  </state>\r\n  <state name='RETRIGGER_STATE'>\r\n    <transition target='FS_OUTCOME_PRESENTED' action='RETRIGGER_SHOWN'/>\r\n    <operation type='do' method='showRetriggerScreen'/>\r\n\t<operation type='entry' method='hideInfoBar'/>\r\n  </state>\r\n  <state name='FS_OUTCOME_PRESENTED'>\r\n    <transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n    <transition target='FS_OUTRO' action='PRESENT_RESULT'/>\r\n\t<transition target='PICKER_STATE' action='SET_PICKER_IDLE'/>\r\n    <operation type='do' method='publishSpinOutcomePresented'/>\r\n  </state>\r\n  <state name='FS_OUTRO'>\r\n    <transition target='FS_SUMMARY' action='FS_OUTRO_END'/>\r\n    <operation type='do' method='startFSOutroAnim'/>\r\n  </state>\r\n  <state name='FS_SUMMARY'>\r\n    <transition target='BET_CONFIRM' action='CONTINUE'/>\r\n    <operation type='entry' method='setBaseGameOutcome'/>\r\n    <operation type='do' method='showFreeSpinSummary'/>\r\n  </state>\r\n  <state name='BET_CONFIRM'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n\t<transition target='SPIN_STARTING_STATE' action='START_REEL_SPIN'/>\r\n    <operation type='do' method='publishResultPresented'/>\r\n  </state>\r\n</fsm>";;
        scarabGameController.TransitionConstants.REMOVE_REELS = "REMOVE_REELS";;
        scarabGameController.TransitionConstants.REELS_REMOVED = "REELS_REMOVED";;
        scarabGameController.TransitionConstants.PICKER_INITIAL = "PICKER_INITIAL";;
        scarabGameController.TransitionConstants.PRESENT_PICKER = "PRESENT_PICKER";;
        scarabGameController.TransitionConstants.PICKER_PRESENTED = "PICKER_PRESENTED";;
        scarabGameController.TransitionConstants.REMOVE_PICKER = "REMOVE_PICKER";;
        scarabGameController.TransitionConstants.PICKER_REMOVED = "PICKER_REMOVED";;
        scarabGameController.TransitionConstants.SET_REELS_INIT_AFTER_PICKER = "SET_REELS_INIT_AFTER_PICKER";;
        scarabGameController.TransitionConstants.PRESENT_REELS = "PRESENT_REELS";;
        scarabGameController.TransitionConstants.REELS_PRESENTED = "REELS_PRESENTED";;
        scarabGameController.TransitionConstants.REELS_SHAKE = "REELS_SHAKE";;
        scarabGameController.TransitionConstants.WILDS = "WILDS";;
        scarabGameController.Storage.PREFIX_ID = "ollie_settings_";;
        return {
            exports: scarabGameController,
            activator: scarabGameController.Activator
        };
    });
//# sourceURL=scarabGameController.js