define("wolfRunGameController", ["componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "slotModelApi", "winMeterApi", "reelsApi", "wolfRunPopupApi", "soundManagerApi", "gameLayoutApi", "wolfRunComponentsWinlinesPort", "wolfRunComponentsGameControllerDeclaration", "clientkernelEventbusApi", "stateMachineEngine", "infoBarApi", "wolfRunComponentsBackgroundPort", "clientkernelModulesApi", "wolfRunSpaghettiPort", "paytableApi", "betPanelApi", "clientkernelLoggerApi", "moneyApi", "wolfRunComponentsAnimationPort"],
    function(componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, slotModelApi, winMeterApi, reelsApi, wolfRunPopupApi, soundManagerApi, gameLayoutApi, wolfRunComponentsWinlinesPort, wolfRunComponentsGameControllerDeclaration, clientkernelEventbusApi, stateMachineEngine, infoBarApi, wolfRunComponentsBackgroundPort, clientkernelModulesApi, wolfRunSpaghettiPort, paytableApi, betPanelApi, clientkernelLoggerApi, moneyApi, wolfRunComponentsAnimationPort) {
        "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 wolfRunGameController == 'undefined') {
            var wolfRunGameController = {};
        };
        wolfRunGameController.Activator = function() {};
        wolfRunGameController.Activator = ck_implements(wolfRunGameController.Activator, clientkernelModulesApi.IModuleActivator);
        wolfRunGameController.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        wolfRunGameController.Activator.__name__ = ["wolfRunGameController", "Activator"];
        wolfRunGameController.Activator.prototype.start = function(context) {
            context.getServiceTracker([translationmanagerApi.ITranslationManager, moneyApi.IMoneyFormatter]).then(function(context1) {
                wolfRunGameController.ExternalService.initialize(context1);
                context1.registerService(new wolfRunGameController.Factory(), wolfRunComponentsGameControllerDeclaration.GameControllerDeclaration, null);
            });
        };
        wolfRunGameController.Activator.prototype.stop = function(context) {};
        wolfRunGameController.Activator.main = function() {};
        wolfRunGameController.Activator.prototype.__class__ = wolfRunGameController.Activator;
        wolfRunGameController.ExternalService = function() {};
        wolfRunGameController.ExternalService.__name__ = ["wolfRunGameController", "ExternalService"];
        wolfRunGameController.ExternalService.bus = null;
        wolfRunGameController.ExternalService.assetRegistry = null;
        wolfRunGameController.ExternalService.moneyFormatter = null;
        wolfRunGameController.ExternalService.variableRegistry = null;
        wolfRunGameController.ExternalService.logger = null;
        wolfRunGameController.ExternalService._moduleContext = null;
        wolfRunGameController.ExternalService.initialize = function(context) {
            wolfRunGameController.ExternalService._moduleContext = context;
            wolfRunGameController.ExternalService.bus = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
            wolfRunGameController.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            wolfRunGameController.ExternalService.moneyFormatter = context.getAnyService(moneyApi.IMoneyFormatter, null);
            wolfRunGameController.ExternalService.variableRegistry = context.getAnyService(clientkernelLoaderApi.IVariableRegistry, null);
            var loggerFactory = context.getAnyService(clientkernelLoggerApi.ILoggerFactory, null);
            wolfRunGameController.ExternalService.logger = loggerFactory.getDefaultLogger();
        };
        wolfRunGameController.ExternalService.getTranslationService = function() {
            return wolfRunGameController.ExternalService._moduleContext.getAnyService(translationmanagerApi.ITranslationManager);
        };
        wolfRunGameController.ExternalService.isMobile = function() {
            return wolfRunGameController.ExternalService.variableRegistry.get("skin") == "mobile" || wolfRunGameController.ExternalService.variableRegistry.get("assetPack") == "mobile";
        };
        wolfRunGameController.ExternalService.prototype.__class__ = wolfRunGameController.ExternalService;
        wolfRunGameController.Factory = function() {};
        wolfRunGameController.Factory = ck_implements(wolfRunGameController.Factory, clientkernelModulesApi.IService);
        wolfRunGameController.Factory = ck_implements(wolfRunGameController.Factory, componentmodelComponentApi.IComponentFactory);
        wolfRunGameController.Factory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        wolfRunGameController.Factory.__name__ = ["wolfRunGameController", "Factory"];
        wolfRunGameController.Factory.prototype.createComponent = function(context) {
            new wolfRunGameController.GameController(context);
        };
        wolfRunGameController.Factory.prototype.getComponentDeclaration = function() {
            return wolfRunComponentsGameControllerDeclaration.GameControllerDeclaration;
        };
        wolfRunGameController.Factory.prototype.__class__ = wolfRunGameController.Factory;
        wolfRunGameController.FloatUtil = function() {};
        wolfRunGameController.FloatUtil.__name__ = ["wolfRunGameController", "FloatUtil"];
        wolfRunGameController.FloatUtil.fixedFloat = function(v, precision) {
            if (precision == null) precision = 2;
            return _hcmn_.Math.round(v * _hcmn_.Math.pow(10, precision)) / _hcmn_.Math.pow(10, precision);
        };
        wolfRunGameController.FloatUtil.prototype.__class__ = wolfRunGameController.FloatUtil;
        wolfRunGameController.GameController = function(context) {
            this.isSpinning = false;
            this.showingAwardCap = false;
            this.resultPresentedPublished = false;
            this.paytableOpened = false;
            this.promotionalSpinsActive = false;
            var _g = this;
            this.model = new wolfRunGameController.GameModel();
            this.infoBarPort = context.getUsedPort(infoBarApi.IInfoBarPort);
            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.paytablePort = context.getUsedPort(paytableApi.IPaytablePort);
            this.animationPort = context.getUsedPort(wolfRunComponentsAnimationPort.IAnimationPort);
            this.spaghettiPort = context.getUsedPort(wolfRunSpaghettiPort.ISpaghettiPort);
            this.winlinesPort = context.getUsedPort(wolfRunComponentsWinlinesPort.IWinLinesPort);
            this.backgroundPort = context.getUsedPort(wolfRunComponentsBackgroundPort.IBackgroundPort);
            this.winMeterPort = context.getUsedPort(winMeterApi.IWinMeterPort);
            this.popupPort = context.getUsedPort(wolfRunPopupApi.IPopupPort);
            this.soundController = new wolfRunGameController.SoundController(context, this.model);
            this.setupStateMachine();
            context.getStarted().then(function(a) {
                _g.assemblyStarted = true;
                _g.checkGameLoaded();
            });
            wolfRunGameController.ExternalService.assetRegistry.getAsset("game-config_json").getContent().then(function(data) {
                _g.config = data.gameControllerConfig;
                _g.checkGameLoaded();
            });
            ((function($this) {
                var $r;
                var this1 = context.getReferredComponents("animation");
                $r = this1.get("freespinbonus");
                return $r;
            }(this))).then(function(fsp) {
                _g.freeSpinsAnimations = fsp;
                _g.animationPort.getShown().subscribeForComponentInstance(_g.freeSpinsAnimations, $bind(_g, _g.freeSpinsAnimationShown));
                _g.animationPort.getTriggered().subscribeForComponentInstance(_g.freeSpinsAnimations, $bind(_g, _g.freeSpinsButtonClicked));
            });
            ((function($this) {
                var $r;
                var this2 = context.getReferredComponents("animation");
                $r = this2.get("banner");
                return $r;
            }(this))).then(function(ba) {
                _g.banner = ba;
            });
            ((function($this) {
                var $r;
                var this3 = context.getReferredComponents("animation");
                $r = this3.get("reelsbackground");
                return $r;
            }(this))).then(function(rbg) {
                _g.reelsBackground = rbg;
            });
            this.translationManager = wolfRunGameController.ExternalService.getTranslationService();
            this.moneyFormatter = wolfRunGameController.ExternalService.moneyFormatter;
        };
        wolfRunGameController.GameController.__name__ = ["wolfRunGameController", "GameController"];
        wolfRunGameController.GameController.prototype.stateMachine = null;
        wolfRunGameController.GameController.prototype.smDispatcher = null;
        wolfRunGameController.GameController.prototype.smContext = null;
        wolfRunGameController.GameController.prototype.soundController = null;
        wolfRunGameController.GameController.prototype.model = null;
        wolfRunGameController.GameController.prototype.config = null;
        wolfRunGameController.GameController.prototype.translationManager = null;
        wolfRunGameController.GameController.prototype.moneyFormatter = null;
        wolfRunGameController.GameController.prototype.assemblyStarted = null;
        wolfRunGameController.GameController.prototype.layoutUpdated = null;
        wolfRunGameController.GameController.prototype.stopSpinRecieved = null;
        wolfRunGameController.GameController.prototype.spaghettiShown = null;
        wolfRunGameController.GameController.prototype.abortSpinPayload = null;
        wolfRunGameController.GameController.prototype.freeSpinsAnimations = null;
        wolfRunGameController.GameController.prototype.banner = null;
        wolfRunGameController.GameController.prototype.reelsBackground = null;
        wolfRunGameController.GameController.prototype.betPanelPort = null;
        wolfRunGameController.GameController.prototype.reelsPort = null;
        wolfRunGameController.GameController.prototype.slotModelPort = null;
        wolfRunGameController.GameController.prototype.gameLayoutPort = null;
        wolfRunGameController.GameController.prototype.paytablePort = null;
        wolfRunGameController.GameController.prototype.animationPort = null;
        wolfRunGameController.GameController.prototype.spaghettiPort = null;
        wolfRunGameController.GameController.prototype.winlinesPort = null;
        wolfRunGameController.GameController.prototype.infoBarPort = null;
        wolfRunGameController.GameController.prototype.backgroundPort = null;
        wolfRunGameController.GameController.prototype.winMeterPort = null;
        wolfRunGameController.GameController.prototype.popupPort = null;
        wolfRunGameController.GameController.prototype.resultPayload = null;
        wolfRunGameController.GameController.prototype.promotionalSpinsActive = null;
        wolfRunGameController.GameController.prototype.promotionalSpinsCount = null;
        wolfRunGameController.GameController.prototype.paytableOpened = null;
        wolfRunGameController.GameController.prototype.resultPresentedPublished = null;
        wolfRunGameController.GameController.prototype.showingAwardCap = null;
        wolfRunGameController.GameController.prototype.startFSReelPicture = null;
        wolfRunGameController.GameController.prototype.isSpinning = null;
        wolfRunGameController.GameController.prototype.spaghettiTimer = null;
        wolfRunGameController.GameController.prototype.setupStateMachine = function() {
            this.smDispatcher = new stateMachineEngine.EventDispatcher();
            this.smContext = new wolfRunGameController.StateMachineContext(this.smDispatcher);
            this.smContext.setupContextData(this);
            this.stateMachine = new stateMachineEngine.StateMachine(this.smDispatcher, wolfRunGameController.StateMachineDef.ID);
            this.stateMachine.setContext(this.smContext);
            this.stateMachine.logLevel = 3;
            this.stateMachine.logPrefix = "[GAME_CONTROLLER]";
            this.stateMachine.dispatchGlobalStateChange = false;
            stateMachineEngine.StateMachine.logger = wolfRunGameController.ExternalService.logger;
            stateMachineEngine.FSMInjector.registerSM(this.stateMachine, wolfRunGameController.StateMachineDef.FSM);
        };
        wolfRunGameController.GameController.prototype.dispatchEvent = function(action) {
            this.smDispatcher.dispatchEvent(new stateMachineEngine.StateEvent(wolfRunGameController.StateMachineDef.ID + stateMachineEngine.StateEvent.ACTION, action));
        };
        wolfRunGameController.GameController.prototype.checkGameLoaded = function() {
            if (!this.assemblyStarted) return;
            if (!this.layoutUpdated) return;
            if (this.config == null) return;
            this.model.gameControllerConfig = this.config;
            this.slotModelPort.getStages().getInitStage().getGameLoaded().publish(null);
        };
        wolfRunGameController.GameController.prototype.attachComponents = function() {
            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().getIdleStage().getOpenHelp().subscribe($bind(this, this.handleOpenHelp));
            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().getAbortStage().getAbortSpin().subscribe($bind(this, this.handleAbortSpin));
            this.slotModelPort.getStages().getResultStage().getPresentResult().subscribe($bind(this, this.handlePresentResult));
            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.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.paytablePort.onCloseButtonPressed().subscribe($bind(this, this.onPaytableClose));
            this.paytablePort.onPageChanged().subscribe($bind(this, this.onPaytablePageChanged));
            this.gameLayoutPort.getGameLayoutUpdated().subscribe($bind(this, this.onGameLayoutUpdated));
            this.winlinesPort.getCurrentWin().subscribe($bind(this, this.onWinLineAnimated));
            this.winlinesPort.getWinLineCycleStarted().subscribe($bind(this, this.onWinLineCycleStarted));
            this.winlinesPort.getWinLineCycleAnimated().subscribe($bind(this, this.onWinLineCycleAnimated));
            this.winMeterPort.onDisplayWinFinished().subscribe($bind(this, this.onDisplayWinMeterFinished));
            window.addEventListener("closePaytable", $bind(this, this.onHTMLPaytableClose));
        };
        wolfRunGameController.GameController.prototype.initGame = function() {
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.slotModelPort.getStages().getInitStage().getGameInitialized().publish(null);
        };
        wolfRunGameController.GameController.prototype.showIntro = function() {
            this.dispatchEvent(wolfRunGameController.StateMachineDef.INTRO_FINISHED_ACTION);
        };
        wolfRunGameController.GameController.prototype.prepareResume = function() {
            var _g = this;
            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.updateBetPanelFS();
            _hcmn_.haxe_Timer.delay(function() {
                _g.slotModelPort.getStages().getResumeStage().getResumePrepared().publish(null);
            }, this.config.fs_NoWinSpinDelay);
        };
        wolfRunGameController.GameController.prototype.onBaseGameIdle = function() {
            this.showSpinButton();
            this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.resultPresentedPublished = false;
            this.showSpinInfoLabel();
            this.model.bonusEnd = false;
        };
        wolfRunGameController.GameController.prototype.updateBetPanel = function() {
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
        };
        wolfRunGameController.GameController.prototype.updateBetPanelFS = function() {
            var current = this.model.spinOutcome.freeSpin.current + 1;
            var total = this.model.spinOutcome.freeSpin.total;
            var payload = new wolfRunComponentsAnimationPort.ShowAnimationPayload("UpdateCounter");
            payload.addData("current", current);
            payload.addData("total", total);
            this.animationPort.getShow().publishForComponentInstance(this.freeSpinsAnimations, payload);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.winMeterPort.showMessage().publish("");
            if (!this.moneyFormatter.isZero(this.model.spinOutcome.acumulatedPayout)) this.winMeterPort.displayWin().publish(new winMeterApi.WinMeterPayload(this.model.spinOutcome.acumulatedPayout, this.model.spinOutcome.freeSpin.outcome.bigWin.winSegments, true));
        };
        wolfRunGameController.GameController.prototype.clearAllWins = function() {
            this.abortSpinPayload = null;
            this.stopSpinRecieved = false;
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.model.setAbortSpin(false);
        };
        wolfRunGameController.GameController.prototype.startSpin = function() {
            this.forcePaytableClose();
            this.reelsPort.startSpin().publish(new reelsApi.StartSpinPayload(this.model.startSpinPayload));
        };
        wolfRunGameController.GameController.prototype.checkForStopOrAbort = function() {
            if (this.abortSpinPayload != null) this.dispatchEvent(wolfRunGameController.StateMachineDef.ABORT_SPIN);
            else if (this.stopSpinRecieved) this.dispatchEvent(wolfRunGameController.StateMachineDef.STOP_REEL_SPIN);
        };
        wolfRunGameController.GameController.prototype.applyAbortData = function() {
            this.applyStakeItemsWithTotalBet(this.abortSpinPayload.stake, false);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            this.winMeterPort.showMessage().publish("");
            this.soundController.stopOnAbort();
            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);
        };
        wolfRunGameController.GameController.prototype.stopReels = function() {
            this.reelsPort.stopSpin().publish(new reelsApi.StopSpinPayload(this.model.outcome.reelStop.reels, this.model.tensionReels));
        };
        wolfRunGameController.GameController.prototype.showBaseGameWins = function() {
            var totalBet = parseFloat(this.model.stakeState.totalBet);
            var showOutcomeOptions = new wolfRunComponentsWinlinesPort.ShowOutcomeOptions(this.config.winlineInterval, this.config.highWinlineInterval, this.model.outcome, true, totalBet, this.model.isLowWin());
            this.winlinesPort.getShowOutcome().publish(showOutcomeOptions);
        };
        wolfRunGameController.GameController.prototype.displayBaseGameWin = function() {
            var isWin = !this.moneyFormatter.isZero(this.model.spinOutcome.baseGame.outcome.totalPayout);
            this.smContext.setContextValue("win", isWin);
            this.showWins(this.model.spinOutcome.baseGame.outcome.totalPayout, this.model.spinOutcome.baseGame.outcome.bigWin);
            if (!isWin) {
                this.publishSpinOutcomePresented();
                return;
            }
            this.soundController.onSpinOutcome(this.model.spinOutcome.baseGame.outcome.bigWin);
        };
        wolfRunGameController.GameController.prototype.displayTotalWin = function() {
            this.showWins(this.resultPayload.totalWin, this.resultPayload.bigWin);
            if (this.moneyFormatter.isZero(this.resultPayload.totalWin)) return;
            this.soundController.onSpinOutcome(this.resultPayload.bigWin);
        };
        wolfRunGameController.GameController.prototype.showWins = function(payout, bigWin, instantShow, startAmmount) {
            if (instantShow == null) instantShow = false;
            if (this.moneyFormatter.isZero(payout)) {
                this.winMeterPort.showMessage().publish("");
                return;
            }
            var instant = instantShow;
            if (this.model.isLowWin()) instant = true;
            this.winMeterPort.displayWin().publish(new winMeterApi.WinMeterPayload(payout, bigWin.winSegments, instant, startAmmount));
            if (!this.moneyFormatter.isZero(payout)) this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.RIGHT, this.translationManager.stringLookup("InfoTextRight", [this.moneyFormatter.format(payout)])));
        };
        wolfRunGameController.GameController.prototype.showScatterWins = function() {
            var totalBet = parseFloat(this.model.stakeState.totalBet);
            var showOutcomeOptions = new wolfRunComponentsWinlinesPort.ShowOutcomeOptions(this.config.winlineInterval, this.config.scatterSymbolsInterval, this.model.getScatterOutcome(), false, totalBet, this.model.isLowWin());
            this.winlinesPort.getShowOutcome().publish(showOutcomeOptions);
            this.dispatchEvent(wolfRunGameController.StateMachineDef.FS_WIN_SHOWN);
            this.model.lastAccumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            this.soundController.onScatterWin();
            var payout = this.model.spinOutcome.acumulatedPayout;
            var winsegm = new slotModelApi.BigWinSegment(1, payout);
            this.winMeterPort.displayWin().publish(new winMeterApi.WinMeterPayload(payout, [winsegm], true));
        };
        wolfRunGameController.GameController.prototype.startFSIntroAnim = function() {
            this.animationPort.getShowFSIntro().publish(null);
            var payload = new wolfRunComponentsAnimationPort.ShowAnimationPayload("BonusIntro");
            payload.addData("FreeSpinsValue", this.model.spinOutcome.freeSpin.awarded);
            payload.addData("duration", this.config.fs_IntroScreenDuration);
            this.animationPort.getHide().publishForComponentInstance(this.banner, null);
            this.backgroundPort.prepareBackground().publish(new wolfRunComponentsBackgroundPort.ChangeBackgroundPayload(1));
            this.reelsPort.setReelSkin().publish(1);
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, this.translationManager.stringLookup("FreeSpinsTriggered")));
            this.animationPort.getShow().publishForComponentInstance(this.freeSpinsAnimations, payload);
        };
        wolfRunGameController.GameController.prototype.prepareFreeSpin = function() {
            this.winlinesPort.getHideOutcome().publish(null);
            this.spaghettiPort.getHideLines().publish(null);
            this.spaghettiPort.getShowSelectedTabs().publish(this.model.stakeState.stakeItems.lineCount);
            this.winlinesPort.setAnimationsSkin().publish(1);
            this.reelsPort.setReelPicture().publish(this.startFSReelPicture.reels);
            this.animationPort.getShow().publishForComponentInstance(this.reelsBackground, new wolfRunComponentsAnimationPort.ShowAnimationPayload("FreeGameReelBackground"));
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.model.setOutcome(this.model.spinOutcome.freeSpin.outcome);
            this.backgroundPort.getChange().publish(new wolfRunComponentsBackgroundPort.ChangeBackgroundPayload(1, true));
        };
        wolfRunGameController.GameController.prototype.displayScatterWinOnInfobar = function() {
            var scaterWinPayout = this.model.getScatterPayout();
            var moneyFormatedPayout = this.moneyFormatter.format(scaterWinPayout);
            var scaterWinLabelText = this.translationManager.stringLookup("ScatterWinLabel");
            var scatterText = scaterWinLabelText + moneyFormatedPayout;
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, scatterText));
        };
        wolfRunGameController.GameController.prototype.displayFreeSpinWin = function() {
            var accumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            var payout = this.model.spinOutcome.freeSpin.outcome.totalPayout;
            this.smContext.setContextValue("win", !this.moneyFormatter.isZero(payout));
            if (!this.moneyFormatter.isZero(payout)) {
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.RIGHT, this.translationManager.stringLookup("FreeSpinPays", [this.moneyFormatter.format(payout)])));
                if ((function($this) {
                        var $r;
                        var this1 = $this.smContext.get_contextValues();
                        $r = this1.get("retrigger");
                        return $r;
                    }(this)) == true && this.model.getScatterPayout() == payout) this.displayScatterWinOnInfobar();
                var instant = false;
                if (this.model.isLowWin()) instant = true;
                var winSegments = this.model.getFreeSpinWinSegments(payout);
                this.winMeterPort.displayWin().publish(new winMeterApi.WinMeterPayload(accumulatedPayout, winSegments, instant, this.model.lastAccumulatedPayout));
            }
            this.dispatchEvent(wolfRunGameController.StateMachineDef.CONTINUE);
            this.model.lastAccumulatedPayout = accumulatedPayout;
        };
        wolfRunGameController.GameController.prototype.showFreeSpinWins = function() {
            var totalBet = parseFloat(this.model.stakeState.totalBet);
            var showOutcomeOptions = new wolfRunComponentsWinlinesPort.ShowOutcomeOptions(this.config.fs_winlineInterval, this.config.fs_highWinlineInterval, this.model.spinOutcome.freeSpin.outcome, false, totalBet, this.model.isLowWin());
            this.winlinesPort.getShowOutcome().publish(showOutcomeOptions);
            if (this.moneyFormatter.isZero(this.model.spinOutcome.freeSpin.outcome.totalPayout)) return;
            if (this.model.outcome.scatterWins != null) this.soundController.onScatterWin();
            else this.soundController.onSpinOutcome(this.model.spinOutcome.freeSpin.outcome.bigWin);
        };
        wolfRunGameController.GameController.prototype.showRetriggerScreen = function() {
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.spaghettiPort.getHideLines().publish(null);
            this.spaghettiPort.getShowSelectedTabs().publish(this.model.stakeState.stakeItems.lineCount);
            var popupTime;
            var payload;
            if (this.model.spinOutcome.freeSpin.isMaxAwarded && this.model.spinOutcome.freeSpin.awarded == 0) {
                popupTime = this.config.fs_MaxRetriggerScreenDuration;
                payload = new wolfRunComponentsAnimationPort.ShowAnimationPayload("FreeSpinsLimitReached");
                payload.addData("total", this.model.spinOutcome.freeSpin.total);
            } else {
                popupTime = this.config.fs_RetriggerScreenDuration;
                payload = new wolfRunComponentsAnimationPort.ShowAnimationPayload("Retrigger");
                payload.addData("FreeSpinsValue", this.model.spinOutcome.freeSpin.awarded);
            }
            payload.addData("duration", popupTime);
            this.animationPort.getShow().publishForComponentInstance(this.freeSpinsAnimations, payload);
            this.soundController.onRetriggerScreen();
            if (!this.moneyFormatter.isZero(this.model.spinOutcome.freeSpin.outcome.totalPayout)) this.winMeterPort.displayWin().publish(new winMeterApi.WinMeterPayload(this.model.spinOutcome.acumulatedPayout, this.model.spinOutcome.freeSpin.outcome.bigWin.winSegments, true));
        };
        wolfRunGameController.GameController.prototype.startFSOutroAnim = function() {
            var _g = this;
            this.winlinesPort.getHideOutcome().publish(null);
            this.spaghettiPort.getHideLines().publish(null);
            this.spaghettiPort.getShowSelectedTabs().publish(this.model.stakeState.stakeItems.lineCount);
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            var payload = new wolfRunComponentsAnimationPort.ShowAnimationPayload("BonusOutro");
            payload.addData("duration", this.config.fs_SummaryDuration);
            var totalBonusWin = this.moneyFormatter.format(this.model.getScatterAndBonusTotalWin());
            payload.addData("TotalBonusWinValue", totalBonusWin);
            this.animationPort.getShow().publishForComponentInstance(this.freeSpinsAnimations, payload);
            this.soundController.onBonusEnd();
            this.spaghettiShown = false;
            this.model.bonusEnd = true;
            this.backgroundPort.prepareBackground().publish(new wolfRunComponentsBackgroundPort.ChangeBackgroundPayload(0));
            this.reelsPort.setReelSkin().publish(0);
            this.winlinesPort.setAnimationsSkin().publish(0);
            _hcmn_.haxe_Timer.delay(function() {
                _g.backgroundPort.getChange().publish(new wolfRunComponentsBackgroundPort.ChangeBackgroundPayload(0, true));
                _g.animationPort.getShow().publishForComponentInstance(_g.reelsBackground, new wolfRunComponentsAnimationPort.ShowAnimationPayload("BaseGameReelBackground"));
                _g.setBaseGameOutcome();
            }, this.config.fs_SummaryDuration);
        };
        wolfRunGameController.GameController.prototype.setBaseGameOutcome = function() {
            this.model.setOutcome(this.model.spinOutcome.baseGame.outcome);
            this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
        };
        wolfRunGameController.GameController.prototype.showSkipButton = function() {
            if (!this.moneyFormatter.isZero(this.model.outcome.totalPayout)) this.betPanelPort.showButton().publish(betPanelApi.EButton.SKIP);
        };
        wolfRunGameController.GameController.prototype.showSpinButton = function() {
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
        };
        wolfRunGameController.GameController.prototype.publishSpinOutcomePresented = function() {
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcomePresented().publish(null);
        };
        wolfRunGameController.GameController.prototype.executeContinueCommand = function() {
            var _g = this;
            if (this.abortSpinPayload != null) {
                if (this.model.spinOutcome.stage == "FreeSpin") _hcmn_.haxe_Timer.delay(function() {
                    _g.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
                }, this.config.fs_NoWinSpinDelay);
                else _hcmn_.haxe_Timer.delay(function() {
                    _g.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
                }, this.config.fs_FirstSpinDelay);
                return;
            }
            if (this.model.spinOutcome.stage == "FreeSpin") {
                var payout = this.model.spinOutcome.freeSpin.outcome.totalPayout;
                if (this.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);
        };
        wolfRunGameController.GameController.prototype.publishResultPresented = function() {
            if (this.resultPresentedPublished) return;
            this.slotModelPort.getStages().getResultStage().getResultPresented().publish(null);
            this.resultPresentedPublished = true;
        };
        wolfRunGameController.GameController.prototype.showAwardCapScreen = function() {
            this.showingAwardCap = true;
            this.winMeterPort.displayWin().publish(new winMeterApi.WinMeterPayload(this.resultPayload.totalWin, [new slotModelApi.BigWinSegment(1, this.resultPayload.totalWin)], true));
            var isFreeSpin = this.model.spinOutcome.stage == "FreeSpin";
            this.popupPort.getShowAwardCap().publish(new wolfRunPopupApi.AwardCapPayload(this.moneyFormatter.format(this.resultPayload.totalWin), isFreeSpin));
            if (isFreeSpin) {
                this.animationPort.getShow().publishForComponentInstance(this.reelsBackground, new wolfRunComponentsAnimationPort.ShowAnimationPayload("BaseGameReelBackground"));
                this.animationPort.getShow().publishForComponentInstance(this.freeSpinsAnimations, new wolfRunComponentsAnimationPort.ShowAnimationPayload("AwardCap"));
                this.backgroundPort.prepareBackground().publish(new wolfRunComponentsBackgroundPort.ChangeBackgroundPayload(0));
                this.reelsPort.setReelSkin().publish(0);
                this.winlinesPort.setAnimationsSkin().publish(0);
                this.soundController.onBonusEnd();
            }
            _hcmn_.haxe_Timer.delay($bind(this, this.onAwardCapScreenShown), this.config.maxAwardSpinEnabledDelay);
        };
        wolfRunGameController.GameController.prototype.onAwardCapScreenShown = function() {
            if (this.model.spinOutcome.stage == "FreeSpin") this.backgroundPort.getChange().publish(new wolfRunComponentsBackgroundPort.ChangeBackgroundPayload(0, true));
            this.setBaseGameOutcome();
            this.dispatchEvent(wolfRunGameController.StateMachineDef.CONTINUE);
        };
        wolfRunGameController.GameController.prototype.hideAwardCap = function() {
            if (!this.showingAwardCap) return;
            this.popupPort.getHide().publish(null);
            this.showingAwardCap = false;
        };
        wolfRunGameController.GameController.prototype.handleBalanceUpdate = function(e) {
            var payload = e.getPayload();
            if (payload.freespin != null) {
                this.promotionalSpinsCount = payload.freespin;
                if (this.promotionalSpinsCount == 0) this.showSpinInfoLabel();
                this.promotionalSpinsActive = payload.freespin > 0;
                this.betPanelPort.setBalance().publish(this.translationManager.stringLookup("BalanceValueNotAvailable"));
                this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            } else this.betPanelPort.setBalance().publish(payload.balance);
        };
        wolfRunGameController.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);
                else this.betPanelPort.disableButton().publish(betPanelApi.EButton.SOUND_OFF);
            }
        };
        wolfRunGameController.GameController.prototype.handleSlotModelInitGame = function(e) {
            var minRTP;
            var maxRTP;
            var singleRTP = e.getPayload().slotDefinition.rtp.singleRTP;
            if (singleRTP != null && singleRTP == true) {
                minRTP = e.getPayload().slotDefinition.rtp.minSingleRTP;
                maxRTP = e.getPayload().slotDefinition.rtp.maxSingleRTP;
            } else {
                minRTP = e.getPayload().slotDefinition.rtp.minRTP;
                maxRTP = e.getPayload().slotDefinition.rtp.maxRTP;
            }
            this.model.rgPresentation = e.getPayload().riskControlSettings.rgPresentation;
            this.applyPresentationInitialization(e.getPayload());
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.dispatchEvent(wolfRunGameController.StateMachineDef.INIT_ACTION);
            this.startFSReelPicture = e.getPayload().slotDefinition.startFSReelPicture;
            this.spaghettiPort.getShowSelectedTabs().publish(this.model.stakeState.stakeItems.lineCount);
        };
        wolfRunGameController.GameController.prototype.handlePrepareResume = function(e) {
            this.model.rgPresentation = e.getPayload().initializationProperties.riskControlSettings.rgPresentation;
            this.backgroundPort.prepareBackground().publish(new wolfRunComponentsBackgroundPort.ChangeBackgroundPayload(1));
            this.animationPort.getHide().publishForComponentInstance(this.banner, null);
            this.reelsPort.setReelSkin().publish(1);
            this.backgroundPort.getChange().publish(new wolfRunComponentsBackgroundPort.ChangeBackgroundPayload(1, false));
            this.animationPort.getShow().publishForComponentInstance(this.reelsBackground, new wolfRunComponentsAnimationPort.ShowAnimationPayload("FreeGameReelBackground"));
            var resumePayload = e.getPayload();
            this.applyPresentationInitialization(resumePayload.initializationProperties);
            this.applyStakeItemsWithTotalBet(resumePayload.stake);
            this.model.setSpinOutcome(resumePayload.spinOutcome);
            this.model.lastAccumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            var minRTP;
            var maxRTP;
            var singleRTP = resumePayload.initializationProperties.slotDefinition.rtp.singleRTP;
            if (singleRTP != null && singleRTP == true) {
                minRTP = resumePayload.initializationProperties.slotDefinition.rtp.minSingleRTP;
                maxRTP = resumePayload.initializationProperties.slotDefinition.rtp.maxSingleRTP;
            } else {
                minRTP = resumePayload.initializationProperties.slotDefinition.rtp.minRTP;
                maxRTP = resumePayload.initializationProperties.slotDefinition.rtp.maxRTP;
            }
            this.soundController.onResumeBonus();
            this.winlinesPort.setAnimationsSkin().publish(1);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.startFSReelPicture = resumePayload.initializationProperties.slotDefinition.startFSReelPicture;
            this.dispatchEvent(wolfRunGameController.StateMachineDef.PREPARE_RESUME);
        };
        wolfRunGameController.GameController.prototype.applyPresentationInitialization = function(payload) {
            this.applyStakeItemsWithTotalBet(payload.defaultStake);
        };
        wolfRunGameController.GameController.prototype.handleConfirmSelectedStake = function(e) {
            this.winMeterPort.showMessage().publish("");
            this.applyStakeItemsWithTotalBet(e.getPayload());
        };
        wolfRunGameController.GameController.prototype.applyStakeItemsWithTotalBet = function(stakeState, showLines) {
            if (showLines == null) showLines = true;
            this.winlinesPort.getHideOutcome().publish(null);
            if (this.model.stakeState != null && showLines) {
                if (this.model.stakeState.stakeItems.lineCount != stakeState.stakeItems.lineCount) {
                    this.spaghettiPort.getShowSelectedLines().publish(stakeState.stakeItems.lineCount);
                    this.spaghettiPort.getShowSelectedTabs().publish(stakeState.stakeItems.lineCount);
                } else {
                    this.spaghettiPort.getHideLines().publish(null);
                    this.spaghettiPort.getShowSelectedTabs().publish(stakeState.stakeItems.lineCount);
                }
            }
            if (this.model.spinOutcome != null && this.abortSpinPayload == null) this.model.setOutcome(this.model.spinOutcome.baseGame.outcome);
            else this.model.setOutcome(stakeState.outcome);
            this.model.setCurrentStake(stakeState);
            if (this.abortSpinPayload != null) this.model.setOutcome(this.abortSpinPayload.stake.outcome);
            this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
            this.betPanelPort.setStake().publish(stakeState);
            this.winMeterPort.showMessage().publish("");
            this.resultPayload = null;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideWinLineSummary().publish(null);
        };
        wolfRunGameController.GameController.prototype.handleSpinCommandAvailable = function(e) {
            if (e.getPayload()) {
                this.dispatchEvent(wolfRunGameController.StateMachineDef.SPIN_ENABLED);
                this.showSpinButton();
                this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
                this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
        };
        wolfRunGameController.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);
        };
        wolfRunGameController.GameController.prototype.handleModelSpinStart = function(e) {
            this.model.startSpinPayload = e.getPayload();
            this.winlinesPort.getHideOutcome().publish(null);
            this.isSpinning = true;
            if (this.spaghettiTimer != null) {
                this.spaghettiTimer.stop();
                this.spaghettiTimer = null;
            }
            this.spaghettiPort.getHideLines().publish(null);
            this.spaghettiPort.getShowSelectedTabs().publish(this.model.stakeState.stakeItems.lineCount);
            this.dispatchEvent(wolfRunGameController.StateMachineDef.START_REEL_SPIN);
            if (this.model.spinOutcome != null && (this.model.spinOutcome.stage == "BaseGame" || this.model.spinOutcome.nextStage == "BaseGame") && this.model.spinOutcome.nextStage != "FreeSpin") this.winMeterPort.showMessage().publish("");
        };
        wolfRunGameController.GameController.prototype.handleSpinOutcome = function(e) {
            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") this.smContext.setContextValue("retrigger", this.model.spinOutcome.freeSpin.isIncrementTriggered);
            this.spaghettiShown = false;
        };
        wolfRunGameController.GameController.prototype.handleModelSpinStop = function(e) {
            if (this.stateMachine.isInState(wolfRunGameController.StateMachineDef.SPINNING_STATE)) this.dispatchEvent(wolfRunGameController.StateMachineDef.STOP_REEL_SPIN);
            else this.stopSpinRecieved = true;
        };
        wolfRunGameController.GameController.prototype.handleAbortSpin = function(e) {
            this.abortSpinPayload = e.getPayload();
            this.model.setAbortSpin(true);
            this.model.setOutcome(this.abortSpinPayload.stake.outcome);
            if (this.stateMachine.isInState(wolfRunGameController.StateMachineDef.SPINNING_STATE)) this.dispatchEvent(wolfRunGameController.StateMachineDef.ABORT_SPIN);
        };
        wolfRunGameController.GameController.prototype.handleSpinOutcomePresent = function(e) {
            this.dispatchEvent(wolfRunGameController.StateMachineDef.PRESENT_SPIN_OUTCOME);
        };
        wolfRunGameController.GameController.prototype.handlePresentResult = function(e) {
            this.resultPayload = e.getPayload();
            this.dispatchEvent(wolfRunGameController.StateMachineDef.PRESENT_RESULT);
        };
        wolfRunGameController.GameController.prototype.handleContinueCommandAvailable = function(e) {
            if (e.getPayload()) this.dispatchEvent(wolfRunGameController.StateMachineDef.CONTINUE_ENABLED);
        };
        wolfRunGameController.GameController.prototype.handlePaytableCommandAvailable = function(e) {
            if (!e.getPayload()) this.betPanelPort.disableButton().publish(betPanelApi.EButton.PAYTABLE);
            else this.betPanelPort.enableButton().publish(betPanelApi.EButton.PAYTABLE);
        };
        wolfRunGameController.GameController.prototype.handleOpenPaytable = function(e) {
            if (this.paytableOpened) {
                this.onPaytableClose();
                return;
            }
            this.paytableOpened = true;
            this.paytablePort.show().publish(null);
            this.reelsPort.hide().publish(null);
            if (!wolfRunGameController.ExternalService.isMobile()) this.animationPort.getHide().publishForComponentInstance(this.banner, null);
            this.winlinesPort.setVisible().publish(false);
            this.spaghettiPort.getVisible().publish(false);
        };
        wolfRunGameController.GameController.prototype.handleOpenHelp = function(e) {
            var _g = this;
            if (this.paytableOpened) {
                this.onPaytableClose();
                return;
            }
            _hcmn_.Reflect.setProperty(window, "closeHelp", function() {
                var frame = window.document.getElementById("rulesInstance");
                frame.style.display = "none";
                _g.soundController.closePaytable();
                var node = frame.parentNode;
                node.removeChild(frame);
                node = null;
            });
        };
        wolfRunGameController.GameController.prototype.onGameLayoutUpdated = function(event) {
            if (this.layoutUpdated) return;
            this.layoutUpdated = true;
            this.checkGameLoaded();
        };
        wolfRunGameController.GameController.prototype.onBetPanelButtonPressed = function(e) {
            var button = e.getPayload();
            switch (button[1]) {
                case 1:
                    this.hideAwardCap();
                    this.slotModelPort.getGameCommands().getSpinCommandExecuted().publish(null);
                    this.winlinesPort.getHideOutcome().publish(null);
                    this.soundController.onSpinButtonPressed();
                    break;
                case 3:
                    this.onSkip();
                    break;
                case 5:
                    this.hideAwardCap();
                    this.slotModelPort.getGameCommands().getPaytableCommandExecuted().publish(null);
                    break;
                case 6:
                    this.paytablePort.setNextPage().publish(null);
                    break;
                case 7:
                    this.paytablePort.setPreviousPage().publish(null);
                    break;
                case 8:
                    this.onPaytableClose(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;
                default:
                    console.log("Not Implemented");
            }
        };
        wolfRunGameController.GameController.prototype.isBonusEnd = function() {
            return (function($this) {
                var $r;
                var this1 = $this.smContext.get_contextValues();
                $r = this1.get("Stage");
                return $r;
            }(this)) == "FreeSpin" && (function($this) {
                var $r;
                var this2 = $this.smContext.get_contextValues();
                $r = this2.get("NextStage");
                return $r;
            }(this)) == "BaseGame";
        };
        wolfRunGameController.GameController.prototype.onSkip = function() {
            this.soundController.onSkip();
            if (this.stateMachine.get_currentStateName() == wolfRunGameController.StateMachineDef.FS_OUTCOME) {
                this.winlinesPort.getHideOutcome().publish(null);
                this.dispatchEvent(wolfRunGameController.StateMachineDef.FS_OUTCOME_DONE);
            } else if (this.stateMachine.get_currentStateName() == wolfRunGameController.StateMachineDef.SHOW_SPAGHETTI && this.isBonusEnd()) {
                var payload = this.model.getWinMeterPayloadOnSkip(true, this.resultPayload);
                this.winMeterPort.displayWin().publish(payload);
                this.hideSkip();
                this.dispatchEvent(wolfRunGameController.StateMachineDef.SPAGHETTI_SHOWN);
            } else {
                this.hideSkip();
                var payload1 = this.model.getWinMeterPayloadOnSkip(this.isBonusEnd(), this.resultPayload);
                this.winMeterPort.displayWin().publish(payload1);
                this.publishSpinOutcomePresented();
            }
        };
        wolfRunGameController.GameController.prototype.hideSkip = function() {
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
        };
        wolfRunGameController.GameController.prototype.onPaytableClose = function(e) {
            this.paytableOpened = false;
            this.paytablePort.hide().publish(null);
            this.betPanelPort.hidePaytableControl().publish(null);
            this.reelsPort.show().publish(null);
            this.winlinesPort.setVisible().publish(true);
            this.spaghettiPort.getVisible().publish(true);
            this.showSpinInfoLabel();
        };
        wolfRunGameController.GameController.prototype.onHTMLPaytableClose = function(e) {
            this.onPaytableClose(null);
        };
        wolfRunGameController.GameController.prototype.forcePaytableClose = function() {
            if (this.paytableOpened) this.onPaytableClose();
        };
        wolfRunGameController.GameController.prototype.onPaytablePageChanged = function(e) {
            this.betPanelPort.showPaytableControl().publish(e.getPayload());
        };
        wolfRunGameController.GameController.prototype.onDisplayWinMeterFinished = function(e) {
            if (this.stateMachine.get_currentStateName() == wolfRunGameController.StateMachineDef.BASEGAME_OUTCOME) this.publishSpinOutcomePresented();
            if (this.stateMachine.get_currentStateName() == wolfRunGameController.StateMachineDef.SHOW_WIN_STATE) this.dispatchEvent(wolfRunGameController.StateMachineDef.CONTINUE);
            if (this.stateMachine.get_currentStateName() == wolfRunGameController.StateMachineDef.SHOW_SPAGHETTI) this.dispatchEvent(wolfRunGameController.StateMachineDef.SPAGHETTI_SHOWN);
        };
        wolfRunGameController.GameController.prototype.onBetPanelStakeChanged = function(e) {
            this.hideAwardCap();
            this.slotModelPort.getGameCommands().getStakeCommandExecuted().publish(e.getPayload());
        };
        wolfRunGameController.GameController.prototype.onReelOutcomeExit = function(e) {
            if (e.getPayload() == 0) this.dispatchEvent(wolfRunGameController.StateMachineDef.SPIN_STARTING_ENDED);
        };
        wolfRunGameController.GameController.prototype.onReelStoppingStarted = function(e) {};
        wolfRunGameController.GameController.prototype.onReelStopped = function(e) {
            var reelId = e.getPayload();
            if (this.model.shouldReelStopSmart(reelId)) this.soundController.playSmartSound(reelId);
            if (this.model.spinOutcome != null && this.model.spinOutcome.stage == "BaseGame" && reelId == 0) this.winMeterPort.showMessage().publish("");
        };
        wolfRunGameController.GameController.prototype.onSpinStopped = function(e) {
            if (this.stateMachine.isInState(wolfRunGameController.StateMachineDef.STOPPING_STATE)) {
                this.isSpinning = false;
                this.slotModelPort.getStages().getSpinStage().getReelSpinFinished().publish(null);
            } else this.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
        };
        wolfRunGameController.GameController.prototype.freeSpinsAnimationShown = function(e) {
            var _g = this.stateMachine.get_currentStateName();
            switch (_g) {
                case "FS_INTRO":
                    this.dispatchEvent(wolfRunGameController.StateMachineDef.FS_INTRO_ENDED);
                    break;
                case "RETRIGGER_STATE":
                    this.dispatchEvent(wolfRunGameController.StateMachineDef.RETRIGGER_SHOWN);
                    break;
                case "FS_SUMMARY":
                    this.dispatchEvent(wolfRunGameController.StateMachineDef.FS_OUTRO_END);
                    break;
                default:
            }
        };
        wolfRunGameController.GameController.prototype.freeSpinsButtonClicked = function(e) {
            if (this.stateMachine.get_currentStateName() == wolfRunGameController.StateMachineDef.FS_INTRO) {
                if (e.getPayload().indexOf("TEST") == -1) this.animationPort.getFSIntroFinished().publish(null);
                this.soundController.onStartBonus();
                _hcmn_.haxe_Timer.delay($bind(this, this.prepareFreeSpin), this.config.fs_IntroScreenDuration);
            }
        };
        wolfRunGameController.GameController.prototype.onWinLineCycleStarted = function(e) {
            this.spaghettiPort.getShowLinesById().publish(e.getPayload());
            this.infoBarPort.hideWinLineSummary().publish(null);
            var spaghettiShowTime;
            if (this.model.spinOutcome.stage == "FreeSpin") spaghettiShowTime = this.config.fs_winlineInterval;
            else spaghettiShowTime = this.config.winlineInterval;
            if (!this.isSpinning) this.spaghettiTimer = _hcmn_.haxe_Timer.delay($bind(this, this.onSpaghettishown), spaghettiShowTime);
        };
        wolfRunGameController.GameController.prototype.onSpaghettishown = function() {
            if (!this.spaghettiShown && this.stateMachine.get_currentStateName() != wolfRunGameController.StateMachineDef.FS_INTRO) {
                if (this.model.isLowWin() && this.model.spinOutcome.stage == "BaseGame") this.onSkip();
                else this.showSkipButton();
            }
            this.spaghettiShown = true;
            if (this.stateMachine.get_currentStateName() == wolfRunGameController.StateMachineDef.SHOW_SPAGHETTI && !this.isBonusEnd()) this.dispatchEvent(wolfRunGameController.StateMachineDef.SPAGHETTI_SHOWN);
        };
        wolfRunGameController.GameController.prototype.checkSpaghettiShown = function() {
            if (this.spaghettiShown && !this.isBonusEnd()) this.dispatchEvent(wolfRunGameController.StateMachineDef.SPAGHETTI_SHOWN);
        };
        wolfRunGameController.GameController.prototype.onWinLineCycleAnimated = function(e) {
            var _g1 = this;
            var _g = this.stateMachine.get_currentStateName();
            switch (_g) {
                case "SHOW_FS_WIN":
                    this.dispatchEvent(wolfRunGameController.StateMachineDef.FS_WIN_SHOWN);
                    break;
                case "FS_OUTCOME":
                    if ((function($this) {
                            var $r;
                            var this1 = $this.smContext.get_contextValues();
                            $r = this1.get("retrigger");
                            return $r;
                        }(this)) == true && this.model.spinOutcome.freeSpin.awarded > 0) {
                        this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, this.translationManager.stringLookup("FreeSpinsRetriggered")));
                        var delay = this.config.fs_BeforeRetriggerScreenDelay;
                        _hcmn_.haxe_Timer.delay(function() {
                            _g1.dispatchEvent(wolfRunGameController.StateMachineDef.FS_OUTCOME_DONE);
                        }, delay);
                    } else this.dispatchEvent(wolfRunGameController.StateMachineDef.FS_OUTCOME_DONE);
                    break;
            }
        };
        wolfRunGameController.GameController.prototype.onWinLineAnimated = function(e) {
            var win = e.getPayload();
            this.spaghettiPort.getShowLinesById().publish([win.lineId - 1]);
            if (win.type == "Scatter") {
                this.infoBarPort.hideWinLineSummary().publish(null);
                if ((function($this) {
                        var $r;
                        var this1 = $this.smContext.get_contextValues();
                        $r = this1.get("NextStage");
                        return $r;
                    }(this)) == "BaseGame") {
                    var totalBonusWin = this.moneyFormatter.format(this.model.getScatterAndBonusTotalWin());
                    this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, this.translationManager.stringLookup("FreeSpinsWin", [totalBonusWin])));
                }
                if ((function($this) {
                        var $r;
                        var this2 = $this.smContext.get_contextValues();
                        $r = this2.get("retrigger");
                        return $r;
                    }(this)) == true) this.displayScatterWinOnInfobar();
                return;
            }
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            var linePicture;
            var _g = [];
            var _g1 = 0;
            while (_g1 < 5) {
                var i = _g1++;
                _g.push("-");
            }
            linePicture = _g;
            var _g2 = 0;
            var _g11 = win.symbolCount;
            while (_g2 < _g11) {
                var k = _g2++;
                linePicture[win.position + k] = win.winningSymbol;
            }
            this.infoBarPort.showWinLineSummary().publish(new infoBarApi.WinLineSummaryPayload(linePicture, win.lineId == null ? "null" : "" + win.lineId, this.moneyFormatter.format(win.payout)));
            if (this.paytableOpened) return;
            this.soundController.onLineWin(win.winningSymbol, this.model.isHighWin(win.payout), this.model.isUsingWilds(win));
        };
        wolfRunGameController.GameController.prototype.showSpinInfoLabel = function() {
            if ((function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("NextStage");
                    return $r;
                }(this)) == "FreeSpin") return;
            var payload = new wolfRunComponentsAnimationPort.ShowAnimationPayload("Banner");
            if (this.promotionalSpinsActive) payload.addData("promoFreeSpinsLeft", this.promotionalSpinsCount);
            this.animationPort.getShow().publishForComponentInstance(this.banner, payload);
        };
        wolfRunGameController.GameController.prototype.__class__ = wolfRunGameController.GameController;
        wolfRunGameController.GameControllerConfig = function() {};
        wolfRunGameController.GameControllerConfig.__name__ = ["wolfRunGameController", "GameControllerConfig"];
        wolfRunGameController.GameControllerConfig.prototype.winlineInterval = null;
        wolfRunGameController.GameControllerConfig.prototype.highWinlineInterval = null;
        wolfRunGameController.GameControllerConfig.prototype.scatterSymbolsInterval = null;
        wolfRunGameController.GameControllerConfig.prototype.playingLinesAtBetMessageDelay = null;
        wolfRunGameController.GameControllerConfig.prototype.scatterPositions = null;
        wolfRunGameController.GameControllerConfig.prototype.tensionableReels = null;
        wolfRunGameController.GameControllerConfig.prototype.scatterSymbolId = null;
        wolfRunGameController.GameControllerConfig.prototype.wildSymbolId = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_winlineInterval = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_highWinlineInterval = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_IntroScreenDuration = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_FirstSpinDelay = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_WinSpinDelay = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_NoWinSpinDelay = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_BeforeRetriggerScreenDelay = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_RetriggerScreenDuration = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_MaxRetriggerScreenDuration = null;
        wolfRunGameController.GameControllerConfig.prototype.fs_SummaryDuration = null;
        wolfRunGameController.GameControllerConfig.prototype.maxAwardSpinEnabledDelay = null;
        wolfRunGameController.GameControllerConfig.prototype.maxTotalBet = null;
        wolfRunGameController.GameControllerConfig.prototype.__class__ = wolfRunGameController.GameControllerConfig;
        wolfRunGameController.GameModel = function() {
            this.bonusEnd = false;
            this.rgPresentation = false;
            this.reelsNum = 5;
            this.cellsNum = 4;
        };
        wolfRunGameController.GameModel.__name__ = ["wolfRunGameController", "GameModel"];
        wolfRunGameController.GameModel.prototype.spinOutcome = null;
        wolfRunGameController.GameModel.prototype.outcome = null;
        wolfRunGameController.GameModel.prototype.startSpinPayload = null;
        wolfRunGameController.GameModel.prototype.tensionReels = null;
        wolfRunGameController.GameModel.prototype.hasTension = null;
        wolfRunGameController.GameModel.prototype.cellsNum = null;
        wolfRunGameController.GameModel.prototype.reelsNum = null;
        wolfRunGameController.GameModel.prototype.stakeState = null;
        wolfRunGameController.GameModel.prototype.lastAccumulatedPayout = null;
        wolfRunGameController.GameModel.prototype.gameControllerConfig = null;
        wolfRunGameController.GameModel.prototype.smartSoundReels = null;
        wolfRunGameController.GameModel.prototype.isAbortSpin = null;
        wolfRunGameController.GameModel.prototype.totalBet = null;
        wolfRunGameController.GameModel.prototype.rgPresentation = null;
        wolfRunGameController.GameModel.prototype.bonusEnd = null;
        wolfRunGameController.GameModel.prototype.setSpinOutcome = function(spinOutcome) {
            this.spinOutcome = spinOutcome;
            if (this.spinOutcome.stage == "BaseGame") this.setOutcome(this.spinOutcome.baseGame.outcome);
            else this.setOutcome(this.spinOutcome.freeSpin.outcome);
        };
        wolfRunGameController.GameModel.prototype.setOutcome = function(outcome) {
            this.outcome = outcome;
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelsNum;
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push(0);
            }
            this.smartSoundReels = _g;
            var _g11 = [];
            var _g3 = 0;
            var _g21 = this.reelsNum;
            while (_g3 < _g21) {
                var i1 = _g3++;
                _g11.push(0);
            }
            this.tensionReels = _g11;
            var reels = this.outcome.reelStop.reels;
            var scatterSymbolId = this.gameControllerConfig.scatterSymbolId;
            var smartSoundsAmount = 0;
            if (!this.isAbortSpin) {
                var _g31 = 0;
                var _g22 = reels.length;
                while (_g31 < _g22) {
                    var i2 = _g31++;
                    if (_hcmn_.HxOverrides.indexOf(reels[i2], scatterSymbolId, 0) >= 0) {
                        if (_hcmn_.HxOverrides.indexOf(this.gameControllerConfig.scatterPositions, 1, 0) == i2 || this.smartSoundReels[i2 - 1] == 1) {
                            this.smartSoundReels[i2] = 1;
                            smartSoundsAmount++;
                        }
                    }
                }
                var scatterCount = 0;
                if (this.outcome.scatterWins != null) {
                    var scatterWinInfo = this.outcome.scatterWins[0].winPath.reelsInfo;
                    var _g32 = 0;
                    var _g23 = scatterWinInfo.length;
                    while (_g32 < _g23) {
                        var i3 = _g32++;
                        if (scatterCount >= 2 && this.gameControllerConfig.scatterPositions[i3] == 1) {
                            this.tensionReels[i3] = 1;
                            continue;
                        }
                        if (_hcmn_.HxOverrides.indexOf(scatterWinInfo[i3], 1, 0) >= 0 || _hcmn_.HxOverrides.indexOf(scatterWinInfo[i3], 2, 0) >= 0) scatterCount++;
                    }
                } else if (smartSoundsAmount == 2 && (function($this) {
                        var $r;
                        var _this = $this.gameControllerConfig.scatterPositions;
                        $r = _hcmn_.HxOverrides.lastIndexOf(_this, 1, _this.length - 1);
                        return $r;
                    }(this)) > (function($this) {
                        var $r;
                        var _this1 = $this.smartSoundReels;
                        $r = _hcmn_.HxOverrides.lastIndexOf(_this1, 1, _this1.length - 1);
                        return $r;
                    }(this))) this.tensionReels[(function($this) {
                    var $r;
                    var _this2 = $this.gameControllerConfig.scatterPositions;
                    $r = _hcmn_.HxOverrides.lastIndexOf(_this2, 1, _this2.length - 1);
                    return $r;
                }(this))] = 1;
            }
            if (_hcmn_.HxOverrides.indexOf(this.tensionReels, 1, 0) >= 0 && !this.isAbortSpin) this.hasTension = true;
            else this.hasTension = false;
        };
        wolfRunGameController.GameModel.prototype.shouldReelStopSmart = function(reelId) {
            return this.smartSoundReels[reelId] == 1;
        };
        wolfRunGameController.GameModel.prototype.isUsingWilds = function(win) {
            var symbols = this.outcome.reelStop.reels;
            var winLine = win.winPath.reelsInfo;
            var _g1 = 0;
            var _g = this.reelsNum;
            while (_g1 < _g) {
                var i = _g1++;
                var _g3 = 0;
                var _g2 = this.cellsNum;
                while (_g3 < _g2) {
                    var j = _g3++;
                    if (symbols[i][j] == this.gameControllerConfig.wildSymbolId && winLine[i][j] == 1) return true;
                }
            }
            return false;
        };
        wolfRunGameController.GameModel.prototype.getWinMeterPayloadOnSkip = function(isBonusEnd, res) {
            if (isBonusEnd) return new winMeterApi.WinMeterPayload(res.totalWin, res.bigWin.winSegments, true);
            else return this.getBaseGameWinMeterPayload();
        };
        wolfRunGameController.GameModel.prototype.getBaseGameWinMeterPayload = function() {
            return new winMeterApi.WinMeterPayload(this.spinOutcome.baseGame.outcome.totalPayout, this.spinOutcome.baseGame.outcome.bigWin.winSegments, true);
        };
        wolfRunGameController.GameModel.prototype.getScatterOutcome = function() {
            var scatterOutcome = new slotModelApi.Outcome(this.outcome.reelStop, this.outcome.reelStopAdditional, null, this.outcome.scatterWins, null, null, this.getScatterPayout(), null, this.outcome.customField);
            return scatterOutcome;
        };
        wolfRunGameController.GameModel.prototype.getScatterPayout = function() {
            if (this.outcome.scatterWins != null) return this.outcome.scatterWins[0].payout;
            return null;
        };
        wolfRunGameController.GameModel.prototype.getScatterAndBonusTotalWin = function() {
            var scatterWin = 0.0;
            if (this.spinOutcome.baseGame.outcome.scatterWins != null) scatterWin = parseFloat(this.spinOutcome.baseGame.outcome.scatterWins[0].payout);
            var totalBonusWin = parseFloat(this.spinOutcome.acumulatedFreeSpinPayout);
            var res = wolfRunGameController.FloatUtil.fixedFloat(scatterWin + totalBonusWin);
            if (res == null) return "null";
            else return "" + res;
        };
        wolfRunGameController.GameModel.prototype.getFreeSpinWinSegments = function(payout) {
            if (this.spinOutcome.freeSpin.outcome.bigWin.winSegments.length > 2) return [new slotModelApi.BigWinSegment(1, parseFloat(payout) * 0.5), new slotModelApi.BigWinSegment(2, payout)];
            return this.spinOutcome.freeSpin.outcome.bigWin.winSegments;
        };
        wolfRunGameController.GameModel.prototype.setCurrentStake = function(stakeState) {
            this.stakeState = stakeState;
            this.totalBet = stakeState.totalBet;
        };
        wolfRunGameController.GameModel.prototype.setAbortSpin = function(isAbort) {
            this.isAbortSpin = isAbort;
        };
        wolfRunGameController.GameModel.prototype.isHighWin = function(payout) {
            var win = parseFloat(payout);
            var bet = parseFloat(this.stakeState.totalBet);
            return win > bet;
        };
        wolfRunGameController.GameModel.prototype.isHighWins = function() {
            var totalPayout = parseFloat(this.spinOutcome.baseGame.outcome.totalPayout);
            if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "BaseGame" && this.bonusEnd) totalPayout = parseFloat(this.spinOutcome.acumulatedPayout);
            else if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "BaseGame" && !this.bonusEnd) 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;
        };
        wolfRunGameController.GameModel.prototype.isLowWin = function() {
            var isLowWin = false;
            if (this.rgPresentation) {
                if (!this.isHighWins()) isLowWin = true;
            }
            return isLowWin;
        };
        wolfRunGameController.GameModel.prototype.__class__ = wolfRunGameController.GameModel;
        wolfRunGameController.SoundAction = function(obj) {
            this.action_id = obj.id;
            this.action_type = obj.action;
        };
        wolfRunGameController.SoundAction.__name__ = ["wolfRunGameController", "SoundAction"];
        wolfRunGameController.SoundAction.prototype.action_id = null;
        wolfRunGameController.SoundAction.prototype.action_type = null;
        wolfRunGameController.SoundAction.prototype.__class__ = wolfRunGameController.SoundAction;
        if (typeof components == 'undefined') {
            var components = {};
        };
        if (!components.gamecontroller) {
            components.gamecontroller = {};
        };
        if (!components.gamecontroller.impl) {
            components.gamecontroller.impl = {};
        };
        components.gamecontroller.impl.SymbolSound = function(obj) {
            if (Object.prototype.hasOwnProperty.call(obj, "high")) this.high = obj.high;
            if (Object.prototype.hasOwnProperty.call(obj, "low")) this.low = obj.low;
        };
        components.gamecontroller.impl.SymbolSound.__name__ = ["components", "gamecontroller", "impl", "SymbolSound"];
        components.gamecontroller.impl.SymbolSound.prototype.high = null;
        components.gamecontroller.impl.SymbolSound.prototype.low = null;
        components.gamecontroller.impl.SymbolSound.prototype.__class__ = components.gamecontroller.impl.SymbolSound;
        components.gamecontroller.impl.WinGroupSound = function(obj) {
            if (Object.prototype.hasOwnProperty.call(obj, "intro")) this.introDuration = obj.introDuration;
            if (Object.prototype.hasOwnProperty.call(obj, "introDuration")) this.intro = obj.intro;
            if (Object.prototype.hasOwnProperty.call(obj, "middle")) this.middle = obj.middle;
            if (Object.prototype.hasOwnProperty.call(obj, "end")) this.end = obj.end;
            if (Object.prototype.hasOwnProperty.call(obj, "endTime")) this.endTime = obj.endTime;
        };
        components.gamecontroller.impl.WinGroupSound.__name__ = ["components", "gamecontroller", "impl", "WinGroupSound"];
        components.gamecontroller.impl.WinGroupSound.prototype.intro = null;
        components.gamecontroller.impl.WinGroupSound.prototype.introDuration = null;
        components.gamecontroller.impl.WinGroupSound.prototype.middle = null;
        components.gamecontroller.impl.WinGroupSound.prototype.end = null;
        components.gamecontroller.impl.WinGroupSound.prototype.endTime = null;
        components.gamecontroller.impl.WinGroupSound.prototype.__class__ = components.gamecontroller.impl.WinGroupSound;
        components.gamecontroller.impl.BonusSounds = function(obj) {
            this.waitPressButton = obj.waitPressButton;
            this.introScreen = obj.introScreen;
            this.introDuration = obj.introDuration;
            this.themeMusic = obj.themeMusic;
            this.themeMusicVolume = obj.themeMusicVolume;
            this.retriggerSymbols = obj.retriggerSymbols;
            this.retriggerScreen = obj.retriggerScreen;
            this.outro = obj.outro;
        };
        components.gamecontroller.impl.BonusSounds.__name__ = ["components", "gamecontroller", "impl", "BonusSounds"];
        components.gamecontroller.impl.BonusSounds.prototype.waitPressButton = null;
        components.gamecontroller.impl.BonusSounds.prototype.introScreen = null;
        components.gamecontroller.impl.BonusSounds.prototype.introDuration = null;
        components.gamecontroller.impl.BonusSounds.prototype.themeMusic = null;
        components.gamecontroller.impl.BonusSounds.prototype.themeMusicVolume = null;
        components.gamecontroller.impl.BonusSounds.prototype.retriggerSymbols = null;
        components.gamecontroller.impl.BonusSounds.prototype.retriggerScreen = null;
        components.gamecontroller.impl.BonusSounds.prototype.outro = null;
        components.gamecontroller.impl.BonusSounds.prototype.__class__ = components.gamecontroller.impl.BonusSounds;
        components.gamecontroller.impl.StageSound = function(obj) {
            if (Object.prototype.hasOwnProperty.call(obj, "base")) this.base = obj.base;
            if (Object.prototype.hasOwnProperty.call(obj, "bonus")) this.bonus = obj.bonus;
        };
        components.gamecontroller.impl.StageSound.__name__ = ["components", "gamecontroller", "impl", "StageSound"];
        components.gamecontroller.impl.StageSound.prototype.base = null;
        components.gamecontroller.impl.StageSound.prototype.bonus = null;
        components.gamecontroller.impl.StageSound.prototype.__class__ = components.gamecontroller.impl.StageSound;
        wolfRunGameController.SoundConfig = function() {};
        wolfRunGameController.SoundConfig.__name__ = ["wolfRunGameController", "SoundConfig"];
        wolfRunGameController.SoundConfig.prototype.spinButton = null;
        wolfRunGameController.SoundConfig.prototype.skipButton = null;
        wolfRunGameController.SoundConfig.prototype.reelSpin = null;
        wolfRunGameController.SoundConfig.prototype.numSpinSounds = null;
        wolfRunGameController.SoundConfig.prototype.smartSound = null;
        wolfRunGameController.SoundConfig.prototype.reelStops = null;
        wolfRunGameController.SoundConfig.prototype.winSymbol = null;
        wolfRunGameController.SoundConfig.prototype.winGroup = null;
        wolfRunGameController.SoundConfig.prototype.bonus = null;
        wolfRunGameController.SoundConfig.prototype.events = null;
        wolfRunGameController.SoundConfig.prototype.initialize = function(config) {
            if (config == null) throw new Error("SoundConfig: config is null");
            this.spinButton = config.spinButton;
            this.skipButton = config.skipButton;
            this.reelSpin = config.reelSpin;
            this.numSpinSounds = config.numSpinSounds;
            this.smartSound = config.smartSound;
            this.reelStops = config.reelStops;
            this.winSymbol = new _hcmn_.haxe_ds_StringMap();
            var _g = 0;
            var _g1 = _hcmn_.Reflect.fields(config.winSymbol);
            while (_g < _g1.length) {
                var key = _g1[_g];
                ++_g;
                var value = _hcmn_.Reflect.field(config.winSymbol, key);
                this.winSymbol.set(key, value);
            }
            this.winGroup = new _hcmn_.haxe_ds_StringMap();
            var _g2 = 0;
            var _g11 = _hcmn_.Reflect.fields(config.winGroup);
            while (_g2 < _g11.length) {
                var key1 = _g11[_g2];
                ++_g2;
                var value1 = _hcmn_.Reflect.field(config.winGroup, key1);
                this.winGroup.set(key1, value1);
            }
            this.bonus = config.bonus;
            this.events = new _hcmn_.haxe_ds_StringMap();
            var _g3 = 0;
            var _g12 = _hcmn_.Reflect.fields(config.events);
            while (_g3 < _g12.length) {
                var eventName = _g12[_g3];
                ++_g3;
                var arr = _hcmn_.Reflect.field(config.events, eventName);
                var actions = [];
                var _g31 = 0;
                var _g21 = arr.length;
                while (_g31 < _g21) {
                    var i = _g31++;
                    actions.push(new wolfRunGameController.SoundAction(arr[i]));
                }
                this.events.set(eventName, actions);
            }
        };
        wolfRunGameController.SoundConfig.prototype.getSmartSound = function(isBonus, index) {
            var res;
            if (isBonus) res = this.smartSound.bonus;
            else res = this.smartSound.base;
            if (res != null) res = res + index;
            return res;
        };
        wolfRunGameController.SoundConfig.prototype.getReelStopSound = function(isBonus, index) {
            var res;
            if (isBonus) res = this.reelStops.bonus;
            else res = this.reelStops.base;
            if (res != null) res = res + index;
            return res;
        };
        wolfRunGameController.SoundConfig.prototype.getWinSymbolSound = function(symbol, isHigh) {
            if (!this.winSymbol.exists(symbol)) return null;
            if (isHigh) return this.winSymbol.get(symbol).high;
            else return this.winSymbol.get(symbol).low;
        };
        wolfRunGameController.SoundConfig.prototype.isWinGroupDefined = function(group) {
            var strGroup;
            if (group == null) strGroup = "null";
            else strGroup = "" + group;
            return this.winGroup.exists(strGroup);
        };
        wolfRunGameController.SoundConfig.prototype.getWinGroupSound = function(group, inBonus) {
            if (inBonus) return this.winGroup.get("inBonus");
            return this.winGroup.get(group == null ? "null" : "" + group);
        };
        wolfRunGameController.SoundConfig.prototype.__class__ = wolfRunGameController.SoundConfig;
        wolfRunGameController.SoundController = function(context, model) {
            this.reelSpinSounds = [];
            this.currentReelSpinSound = 1;
            this.endTimer = null;
            this.midTimer = null;
            this.outcomeSound = null;
            this.inBonusGame = false;
            this.winSoundStopped = false;
            this.winEndSoundPlayed = true;
            this.playbackON = true;
            this.soundON = true;
            var _g = this;
            this.bus = wolfRunGameController.ExternalService.bus;
            this.ccontext = context;
            this.model = model;
            this.soundPort = context.getUsedPort(soundManagerApi.ISoundManagerPort);
            this.bus.getChannel("GFBus").subscribe("*", $bind(this, this.onAllEvents));
            this.soundPort.unmuteAll().publish(null);
            this.playedWinSymbolsSounds = [];
            wolfRunGameController.ExternalService.assetRegistry.getAsset("soundplayer-assets/soundevents").getContent().then(function(data) {
                _g.cfg = new wolfRunGameController.SoundConfig();
                _g.cfg.initialize(data);
                var _g2 = 2;
                var _g1 = _g.cfg.numSpinSounds;
                while (_g2 < _g1) {
                    var i = _g2++;
                    _g.reelSpinSounds.push(i);
                }
            });
        };
        wolfRunGameController.SoundController.__name__ = ["wolfRunGameController", "SoundController"];
        wolfRunGameController.SoundController.prototype.cfg = null;
        wolfRunGameController.SoundController.prototype.bus = null;
        wolfRunGameController.SoundController.prototype.ccontext = null;
        wolfRunGameController.SoundController.prototype.soundPort = null;
        wolfRunGameController.SoundController.prototype.soundON = null;
        wolfRunGameController.SoundController.prototype.playbackON = null;
        wolfRunGameController.SoundController.prototype.winEndSoundPlayed = null;
        wolfRunGameController.SoundController.prototype.playedWinSymbolsSounds = null;
        wolfRunGameController.SoundController.prototype.winSoundStopped = null;
        wolfRunGameController.SoundController.prototype.inBonusGame = null;
        wolfRunGameController.SoundController.prototype.outcomeSound = null;
        wolfRunGameController.SoundController.prototype.midTimer = null;
        wolfRunGameController.SoundController.prototype.endTimer = null;
        wolfRunGameController.SoundController.prototype.currentReelSpinSound = null;
        wolfRunGameController.SoundController.prototype.reelSpinSounds = null;
        wolfRunGameController.SoundController.prototype.model = null;
        wolfRunGameController.SoundController.prototype.playSmartSound = function(reelId) {
            this.playSound(this.cfg.getSmartSound(this.inBonusGame, reelId));
        };
        wolfRunGameController.SoundController.prototype.startBonusMusic = function() {
            this.fadeInSound(this.cfg.bonus.themeMusic);
            if (this.soundON) this.soundPort.volume().publish(new soundManagerApi.SoundVolumeData(this.cfg.bonus.themeMusic, this.cfg.bonus.themeMusicVolume));
        };
        wolfRunGameController.SoundController.prototype.onStartBonus = function() {
            this.stopSound(this.cfg.bonus.waitPressButton);
            this.playSound(this.cfg.bonus.introScreen);
            _hcmn_.haxe_Timer.delay($bind(this, this.startBonusMusic), this.cfg.bonus.introDuration);
            this.inBonusGame = true;
        };
        wolfRunGameController.SoundController.prototype.onResumeBonus = function() {
            this.startBonusMusic();
            this.inBonusGame = true;
        };
        wolfRunGameController.SoundController.prototype.onRetriggerScreen = function() {
            this.playSound(this.cfg.bonus.retriggerScreen);
        };
        wolfRunGameController.SoundController.prototype.onBonusEnd = function() {
            this.fadeOutSound(this.cfg.bonus.themeMusic);
            this.playSound(this.cfg.bonus.outro);
            this.inBonusGame = false;
        };
        wolfRunGameController.SoundController.prototype.onSpinButtonPressed = function() {
            this.playSound(this.cfg.spinButton);
        };
        wolfRunGameController.SoundController.prototype.onSpinOutcome = function(bigWin) {
            var _g = this;
            this.winSoundStopped = false;
            this.winEndSoundPlayed = false;
            this.playedWinSymbolsSounds = [];
            var isBonus = this.inBonusGame;
            if (this.model.rgPresentation) {
                if (this.model.isLowWin()) isBonus = false;
            }
            this.outcomeSound = this.cfg.getWinGroupSound(bigWin.winGroup, isBonus);
            if (this.outcomeSound == null) return;
            if (this.outcomeSound.intro != null) {
                this.playSound(this.outcomeSound.intro);
                this.midTimer = new _hcmn_.haxe_Timer(this.outcomeSound.introDuration);
                this.midTimer.run = function() {
                    _g.playOutcomeSound(_g.outcomeSound.middle);
                    _g.midTimer.stop();
                };
            } else this.playOutcomeSound(this.outcomeSound.middle);
            if (this.outcomeSound.endTime != null && this.outcomeSound.end != null) {
                this.endTimer = new _hcmn_.haxe_Timer(this.outcomeSound.endTime);
                this.endTimer.run = $bind(this, this.bigWinEnd);
            }
        };
        wolfRunGameController.SoundController.prototype.onScatterWin = function() {
            if (this.inBonusGame) this.playSound(this.cfg.bonus.retriggerSymbols);
            else this.playSound(this.cfg.bonus.waitPressButton);
        };
        wolfRunGameController.SoundController.prototype.stopTimer = function(t) {
            if (t != null) t.stop();
        };
        wolfRunGameController.SoundController.prototype.bigWinEnd = function() {
            if (this.outcomeSound == null) return;
            this.stopSound(this.outcomeSound.intro);
            this.stopSound(this.outcomeSound.middle);
            this.stopTimer(this.midTimer);
            this.stopTimer(this.endTimer);
            if (this.winEndSoundPlayed) return;
            this.playOutcomeSound(this.outcomeSound.end);
            this.winEndSoundPlayed = true;
        };
        wolfRunGameController.SoundController.prototype.playOutcomeSound = function(soundId) {
            if (this.winSoundStopped) return;
            this.playSound(soundId);
        };
        wolfRunGameController.SoundController.prototype.onLineWin = function(symbol, isHigh, wilds) {
            if (this.winSoundStopped) return;
            if (wilds) {
                this.playSymbolSound(this.cfg.getWinSymbolSound("wild", isHigh));
                return;
            }
            this.playSymbolSound(this.cfg.getWinSymbolSound(symbol, isHigh));
        };
        wolfRunGameController.SoundController.prototype.playSymbolSound = function(id) {
            if (id == null) return;
            if (_hcmn_.HxOverrides.indexOf(this.playedWinSymbolsSounds, id, 0) >= 0) return;
            this.playSound(id);
            this.playedWinSymbolsSounds.push(id);
        };
        wolfRunGameController.SoundController.prototype.terminateWinSoundsOnSkip = function() {
            if (this.winSoundStopped) return;
            this.stopSymbolSounds();
            this.bigWinEnd();
            this.winSoundStopped = true;
        };
        wolfRunGameController.SoundController.prototype.stopSymbolSounds = function() {
            var _g = 0;
            var _g1 = this.playedWinSymbolsSounds;
            while (_g < _g1.length) {
                var s = _g1[_g];
                ++_g;
                this.stopSound(s);
            }
            this.playedWinSymbolsSounds = [];
        };
        wolfRunGameController.SoundController.prototype.playRandomSpinReelSound = function() {
            if (!this.inBonusGame) {
                var index = _hcmn_.Std.random(this.reelSpinSounds.length);
                var nextSoundId = this.reelSpinSounds[index];
                this.reelSpinSounds[index] = this.currentReelSpinSound;
                this.playSound(this.cfg.reelSpin + nextSoundId);
                this.currentReelSpinSound = nextSoundId;
            }
        };
        wolfRunGameController.SoundController.prototype.playSkipSound = function() {
            var skipSound;
            if (this.inBonusGame) skipSound = this.cfg.skipButton.bonus;
            else skipSound = this.cfg.skipButton.base;
            this.playSound(skipSound);
        };
        wolfRunGameController.SoundController.prototype.onSkip = function() {
            this.playSkipSound();
            this.terminateWinSoundsOnSkip();
        };
        wolfRunGameController.SoundController.prototype.onAllEvents = function(e) {
            var topic = e.getTopic();
            var payload = e.getPayload();
            this.onEvent(topic, payload);
            this.ultimateSoundOff(payload);
            if (topic == "reels:reelStopped") {
                if (payload == 4) this.stopSound(this.cfg.reelSpin + this.currentReelSpinSound);
                this.playSound(this.cfg.getReelStopSound(this.inBonusGame, payload + 1));
            }
            if (topic == "reels:startSpin") this.playRandomSpinReelSound();
        };
        wolfRunGameController.SoundController.prototype.stopOnAbort = function() {
            this.fadeOutSound(this.cfg.reelSpin + this.currentReelSpinSound, 500);
        };
        wolfRunGameController.SoundController.prototype.onEvent = function(topic, payload) {
            if (this.cfg == null) return;
            if (this.cfg.events.exists(topic)) {
                var arr = this.cfg.events.get(topic);
                var _g1 = 0;
                var _g = arr.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    if (!this.soundON && (function($this) {
                            var $r;
                            var x = arr[i];
                            $r = _hcmn_.HxOverrides.indexOf(["fade_in", "fade_out"], x, 0);
                            return $r;
                        }(this)) != -1) return;
                    else if ("unblockAll" == arr[i].action_type || this.playbackON) this.executeAction(arr[i]);
                    if (!this.soundON) this.turnOffSounds();
                }
            }
        };
        wolfRunGameController.SoundController.prototype.executeAction = function(action, duration) {
            if (duration == null) duration = 500;
            var _g = action.action_type;
            switch (_g) {
                case "blockAll":
                    this.playbackON = false;
                    break;
                case "unblockAll":
                    this.playbackON = true;
                    break;
                case "mute":
                    this.muteSound(action.action_id);
                    break;
                case "muteAll":
                    this.turnOffSounds();
                    break;
                case "unmuteAll":
                    this.turnOnSounds();
                    break;
                case "stop":
                    this.stopSound(action.action_id);
                    break;
                case "play":
                    this.playSound(action.action_id);
                    break;
                case "fade_out":
                    this.fadeOutSound(action.action_id, duration);
                    break;
            }
        };
        wolfRunGameController.SoundController.prototype.turnOnSounds = function() {
            this.soundPort.unmuteAll().publish(null);
            this.soundON = true;
            if (this.inBonusGame) this.soundPort.volume().publish(new soundManagerApi.SoundVolumeData(this.cfg.bonus.themeMusic, this.cfg.bonus.themeMusicVolume));
        };
        wolfRunGameController.SoundController.prototype.turnOffSounds = function() {
            this.soundPort.muteAll().publish(null);
            this.soundON = false;
        };
        wolfRunGameController.SoundController.prototype.playSound = function(sound) {
            if (sound == null) return;
            this.soundPort.play().publish(sound);
        };
        wolfRunGameController.SoundController.prototype.muteSound = function(sound) {
            this.soundPort.mute().publish(sound);
        };
        wolfRunGameController.SoundController.prototype.stopSound = function(sound) {
            if (sound == null) return;
            this.soundPort.stop().publish(sound);
        };
        wolfRunGameController.SoundController.prototype.fadeOutSound = function(sound, duration) {
            if (duration == null) duration = 1000;
            if (this.soundON) this.soundPort.fadeOut().publish({
                soundId: sound,
                length: duration
            });
            else this.stopSound(sound);
        };
        wolfRunGameController.SoundController.prototype.fadeInSound = function(sound, duration) {
            if (duration == null) duration = 1000;
            if (this.soundON) this.soundPort.fadeIn().publish({
                soundId: sound,
                length: duration
            });
            else this.playSound(sound);
        };
        wolfRunGameController.SoundController.prototype.ultimateSoundOff = function(payload) {
            if (payload) {
                if (payload.key) {
                    var _g = payload.key;
                    switch (_g) {
                        case "sound":
                            if (payload.value == "1") this.turnOffSounds();
                            else this.turnOnSounds();
                            break;
                    }
                }
            }
        };
        wolfRunGameController.SoundController.prototype.onTabSwitch = function() {
            var _g = this;
            window.onblur = function() {
                _g.turnOffSounds();
            };
            window.onfocus = function() {
                if (_g.soundON) _g.turnOnSounds();
            };
        };
        wolfRunGameController.SoundController.prototype.closePaytable = function() {
            this.soundPort.play().publish("pay_nav");
        };
        wolfRunGameController.SoundController.prototype.__class__ = wolfRunGameController.SoundController;
        wolfRunGameController.StateMachineContext = function(dispatcher) {
            stateMachineEngine.SMContext.call(this, dispatcher);
        };
        wolfRunGameController.StateMachineContext.__name__ = ["wolfRunGameController", "StateMachineContext"];
        wolfRunGameController.StateMachineContext.__super__ = stateMachineEngine.SMContext;
        for (var k in stateMachineEngine.SMContext.prototype) wolfRunGameController.StateMachineContext.prototype[k] = stateMachineEngine.SMContext.prototype[k];
        wolfRunGameController.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);
            var this5 = this.get_contextValues();
            this5.set("win", false);
            this.set_contextMethods(new _hcmn_.haxe_ds_StringMap());
            var this6 = this.get_contextMethods();
            this6.set("initGame", $bind(game, game.initGame));
            var this7 = this.get_contextMethods();
            this7.set("showIntro", $bind(game, game.showIntro));
            var this8 = this.get_contextMethods();
            this8.set("attachComponents", $bind(game, game.attachComponents));
            var this9 = this.get_contextMethods();
            this9.set("prepareResume", $bind(game, game.prepareResume));
            var this10 = this.get_contextMethods();
            this10.set("onBaseGameIdle", $bind(game, game.onBaseGameIdle));
            var this11 = this.get_contextMethods();
            this11.set("startSpin", $bind(game, game.startSpin));
            var this12 = this.get_contextMethods();
            this12.set("clearAllWins", $bind(game, game.clearAllWins));
            var this13 = this.get_contextMethods();
            this13.set("checkForStopOrAbort", $bind(game, game.checkForStopOrAbort));
            var this14 = this.get_contextMethods();
            this14.set("applyAbortData", $bind(game, game.applyAbortData));
            var this15 = this.get_contextMethods();
            this15.set("stopReels", $bind(game, game.stopReels));
            var this16 = this.get_contextMethods();
            this16.set("showBaseGameWins", $bind(game, game.showBaseGameWins));
            var this17 = this.get_contextMethods();
            this17.set("showScatterWins", $bind(game, game.showScatterWins));
            var this18 = this.get_contextMethods();
            this18.set("showFreeSpinWins", $bind(game, game.showFreeSpinWins));
            var this19 = this.get_contextMethods();
            this19.set("displayBaseGameWin", $bind(game, game.displayBaseGameWin));
            var this20 = this.get_contextMethods();
            this20.set("displayTotalWin", $bind(game, game.displayTotalWin));
            var this21 = this.get_contextMethods();
            this21.set("displayFreeSpinWin", $bind(game, game.displayFreeSpinWin));
            var this22 = this.get_contextMethods();
            this22.set("updateBetPanel", $bind(game, game.updateBetPanel));
            var this23 = this.get_contextMethods();
            this23.set("updateBetPanelFS", $bind(game, game.updateBetPanelFS));
            var this24 = this.get_contextMethods();
            this24.set("setBaseGameOutcome", $bind(game, game.setBaseGameOutcome));
            var this25 = this.get_contextMethods();
            this25.set("showSpinButton", $bind(game, game.showSpinButton));
            var this26 = this.get_contextMethods();
            this26.set("showSkipButton", $bind(game, game.showSkipButton));
            var this27 = this.get_contextMethods();
            this27.set("showRetriggerScreen", $bind(game, game.showRetriggerScreen));
            var this28 = this.get_contextMethods();
            this28.set("executeContinueCommand", $bind(game, game.executeContinueCommand));
            var this29 = this.get_contextMethods();
            this29.set("startFSIntroAnim", $bind(game, game.startFSIntroAnim));
            var this30 = this.get_contextMethods();
            this30.set("startFSOutroAnim", $bind(game, game.startFSOutroAnim));
            var this31 = this.get_contextMethods();
            this31.set("showAwardCapScreen", $bind(game, game.showAwardCapScreen));
            var this32 = this.get_contextMethods();
            this32.set("publishSpinOutcomePresented", $bind(game, game.publishSpinOutcomePresented));
            var this33 = this.get_contextMethods();
            this33.set("publishResultPresented", $bind(game, game.publishResultPresented));
            var this34 = this.get_contextMethods();
            this34.set("checkSpaghettiShown", $bind(game, game.checkSpaghettiShown));
        };
        wolfRunGameController.StateMachineContext.prototype.__class__ = wolfRunGameController.StateMachineContext;
        wolfRunGameController.StateMachineDef = function() {};
        wolfRunGameController.StateMachineDef.__name__ = ["wolfRunGameController", "StateMachineDef"];
        wolfRunGameController.StateMachineDef.prototype.__class__ = wolfRunGameController.StateMachineDef;
        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"
                };
            }
        };
        wolfRunGameController.SoundController.LAST_REEL = 4;;
        wolfRunGameController.StateMachineDef.ID = "GAMECONTROLLERSM_";;
        wolfRunGameController.StateMachineDef.FS_INTRO_ENDED = "FS_INTRO_ENDED";;
        wolfRunGameController.StateMachineDef.START_REEL_SPIN = "START_REEL_SPIN";;
        wolfRunGameController.StateMachineDef.PRESENT_SPIN_OUTCOME = "PRESENT_SPIN_OUTCOME";;
        wolfRunGameController.StateMachineDef.INTRO_FINISHED_ACTION = "INTRO_FINISHED_ACTION";;
        wolfRunGameController.StateMachineDef.FS_OUTRO_END = "FS_OUTRO_END";;
        wolfRunGameController.StateMachineDef.CONTINUE_ENABLED = "CONTINUE_ENABLED";;
        wolfRunGameController.StateMachineDef.ABORT_SPIN = "ABORT_SPIN";;
        wolfRunGameController.StateMachineDef.SPIN_ENABLED = "SPIN_ENABLED";;
        wolfRunGameController.StateMachineDef.PRESENT_RESULT = "PRESENT_RESULT";;
        wolfRunGameController.StateMachineDef.INIT_ACTION = "INIT_ACTION";;
        wolfRunGameController.StateMachineDef.FS_OUTCOME_DONE = "FS_OUTCOME_DONE";;
        wolfRunGameController.StateMachineDef.STOP_REEL_SPIN = "STOP_REEL_SPIN";;
        wolfRunGameController.StateMachineDef.RETRIGGER_SHOWN = "RETRIGGER_SHOWN";;
        wolfRunGameController.StateMachineDef.PREPARE_RESUME = "PREPARE_RESUME";;
        wolfRunGameController.StateMachineDef.FS_WIN_SHOWN = "FS_WIN_SHOWN";;
        wolfRunGameController.StateMachineDef.CONTINUE = "CONTINUE";;
        wolfRunGameController.StateMachineDef.SPIN_STARTING_ENDED = "SPIN_STARTING_ENDED";;
        wolfRunGameController.StateMachineDef.SPAGHETTI_SHOWN = "SPAGHETTI_SHOWN";;
        wolfRunGameController.StateMachineDef.LOADING_STATE = "LOADING_STATE";;
        wolfRunGameController.StateMachineDef.PREPARE_RESUME_STATE = "PREPARE_RESUME_STATE";;
        wolfRunGameController.StateMachineDef.INIT_STATE = "INIT_STATE";;
        wolfRunGameController.StateMachineDef.INTRO_STATE = "INTRO_STATE";;
        wolfRunGameController.StateMachineDef.IDLE_STATE = "IDLE_STATE";;
        wolfRunGameController.StateMachineDef.SPINNING_STATE = "SPINNING_STATE";;
        wolfRunGameController.StateMachineDef.FS_IDLE = "FS_IDLE";;
        wolfRunGameController.StateMachineDef.ABORT_SPIN_STATE = "ABORT_SPIN_STATE";;
        wolfRunGameController.StateMachineDef.STOPPING_STATE = "STOPPING_STATE";;
        wolfRunGameController.StateMachineDef.AWARD_CAP_STATE = "AWARD_CAP_STATE";;
        wolfRunGameController.StateMachineDef.AWARD_CAP_PREPARE = "AWARD_CAP_PREPARE";;
        wolfRunGameController.StateMachineDef.SHOW_FS_WIN = "SHOW_FS_WIN";;
        wolfRunGameController.StateMachineDef.BASEGAME_OUTCOME = "BASEGAME_OUTCOME";;
        wolfRunGameController.StateMachineDef.FS_OUTCOME = "FS_OUTCOME";;
        wolfRunGameController.StateMachineDef.FS_INTRO = "FS_INTRO";;
        wolfRunGameController.StateMachineDef.RETRIGGER_STATE = "RETRIGGER_STATE";;
        wolfRunGameController.StateMachineDef.FS_OUTCOME_PRESENTED = "FS_OUTCOME_PRESENTED";;
        wolfRunGameController.StateMachineDef.FS_SUMMARY = "FS_SUMMARY";;
        wolfRunGameController.StateMachineDef.BET_CONFIRM = "BET_CONFIRM";;
        wolfRunGameController.StateMachineDef.SHOW_WIN_STATE = "SHOW_WIN_STATE";;
        wolfRunGameController.StateMachineDef.SPIN_STARTING_STATE = "SPIN_STARTING_STATE";;
        wolfRunGameController.StateMachineDef.SHOW_SPAGHETTI = "SHOW_SPAGHETTI";;
        wolfRunGameController.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' action='CONTINUE_ENABLED'/>\r\n    <operation type='do' method='prepareResume'/>\r\n  </state>\r\n  <state name='INIT_STATE'>\r\n    <transition target='INTRO_STATE' action='SPIN_ENABLED'/>\r\n    <operation type='do' method='initGame'/>\r\n  </state>\r\n  <state name='INTRO_STATE'>\r\n    <transition target='IDLE_STATE' action='INTRO_FINISHED_ACTION'/>\r\n    <operation type='do' method='showIntro'/>\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='SPIN_STARTING_STATE'>\r\n    <transition target='SPINNING_STATE' action='SPIN_STARTING_ENDED'/>\r\n    <operation type='do' method='clearAllWins'/>\r\n    <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    <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\t//<operation type='do' method='stopReels'/>\r\n  </state>\r\n  <state name='STOPPING_STATE'>\r\n    <transition target='SHOW_FS_WIN' condition='!awardCapExceeded,Stage==BaseGame,NextStage==FreeSpin' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='BASEGAME_OUTCOME' condition='!awardCapExceeded,Stage==BaseGame,NextStage==BaseGame' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='SHOW_WIN_STATE' 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  </state>\r\n  <state name='SHOW_FS_WIN'>\r\n    <transition target='FS_INTRO' action='FS_WIN_SHOWN'/>\r\n    <operation type='do' method='showScatterWins'/>\r\n  </state>\r\n  <state name='BASEGAME_OUTCOME'>\r\n    <transition target='SHOW_SPAGHETTI' condition='win' action='PRESENT_RESULT'/>\r\n    <transition target='BET_CONFIRM' condition='!win' action='PRESENT_RESULT'/>\r\n    <operation type='entry' method='showBaseGameWins'/>\r\n    <operation type='entry' method='displayBaseGameWin'/>\r\n  </state>\r\n  <state name='SHOW_WIN_STATE'>\r\n    <transition target='FS_OUTCOME' action='CONTINUE'/>\r\n    <operation type='do' method='displayFreeSpinWin'/>\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    <operation type='do' method='showFreeSpinWins'/>\r\n    <operation type='exit' method='showSpinButton'/>\r\n  </state>\r\n  <state name='FS_INTRO'>\r\n    <transition target='FS_OUTCOME_PRESENTED' action='FS_INTRO_ENDED'/>\r\n    <operation type='do' method='startFSIntroAnim'/>\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  </state>\r\n  <state name='FS_OUTCOME_PRESENTED'>\r\n    <transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n    <transition target='FS_SUMMARY' action='PRESENT_RESULT'/>\r\n    <operation type='do' method='publishSpinOutcomePresented'/>\r\n  </state>\r\n  <state name='FS_SUMMARY'>\r\n    <transition target='SHOW_SPAGHETTI' action='FS_OUTRO_END'/>\r\n    <operation type='do' method='startFSOutroAnim'/>\r\n    <operation type='exit' method='showBaseGameWins'/>\r\n    <operation type='exit' method='displayTotalWin'/>\r\n  </state>\r\n  <state name='BET_CONFIRM'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n    <operation type='do' method='publishResultPresented'/>\r\n  </state>\r\n  <state name='SHOW_SPAGHETTI'>\r\n    <transition target='BET_CONFIRM' action='SPAGHETTI_SHOWN'/>\r\n\t<operation type='do' method='checkSpaghettiShown'/>\r\n  </state>\r\n</fsm>";;
        return {
            exports: wolfRunGameController,
            activator: wolfRunGameController.Activator
        };
    });
//# sourceURL=wolfRunGameController.js