define("slotmodel", ["componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "slotModelApi", "umlStateMachineApi", "money", "clientkernelEventbusApi", "pfCommunicatorApi", "clientkernelModulesApi", "slotmodelGamePluginApi", "clientkernelLoggerApi", "moneyApi"],
    function(componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, slotModelApi, umlStateMachineApi, money, clientkernelEventbusApi, pfCommunicatorApi, clientkernelModulesApi, slotmodelGamePluginApi, clientkernelLoggerApi, moneyApi) {
        "use strict";

        function $iterator(o) {
            if (o instanceof Array) return function() {
                return {
                    cur: 0,
                    arr: o,
                    hasNext: function() {
                        return this.cur < this.arr.length;
                    },
                    next: function() {
                        return this.arr[this.cur++];
                    }
                };
            };
            return typeof(o.iterator) == 'function' ? $bind(o, o.iterator) : o.iterator;
        };;
        var $fid = 0;

        function $bind(o, m) {
            if (m == null) return null;
            if (m.__id__ == null) m.__id__ = $fid++;
            var f;
            if (o.hx__closures__ == null) o.hx__closures__ = {};
            else f = o.hx__closures__[m.__id__];
            if (f == null) {
                f = function() {
                    return f.method.apply(f.scope, arguments);
                };
                f.scope = o;
                f.method = m;
                o.hx__closures__[m.__id__] = f;
            }
            return f;
        };
        var $_;
        var $estr = function() {
            return _hcmn_.js_Boot.__string_rec(this, '');
        };
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

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

        };
        if (!haxe.ds) {
            haxe.ds = {};
        };
        haxe.ds.ObjectMap = function() {
            this.h = {};
            this.h.__keys__ = {};
        };
        haxe.ds.ObjectMap.__interfaces__ = [haxe.IMap];
        haxe.ds.ObjectMap.__name__ = ["haxe", "ds", "ObjectMap"];
        haxe.ds.ObjectMap.prototype.h = null;
        haxe.ds.ObjectMap.prototype.set = function(key, value) {
            var id = key.__id__ || (key.__id__ = ++haxe.ds.ObjectMap.count);
            this.h[id] = value;
            this.h.__keys__[id] = key;
        };
        haxe.ds.ObjectMap.prototype.__class__ = haxe.ds.ObjectMap;
        if (typeof js == 'undefined') {
            var js = {};
        };
        if (!js._Boot) {
            js._Boot = {};
        };
        js._Boot.HaxeError = function(val) {
            Error.call(this);
            this.val = val;
            this.message = String(val);
            if (Error.captureStackTrace) Error.captureStackTrace(this, js._Boot.HaxeError);
        };
        js._Boot.HaxeError.__name__ = ["js", "_Boot", "HaxeError"];
        js._Boot.HaxeError.__super__ = Error;
        for (var k in Error.prototype) js._Boot.HaxeError.prototype[k] = Error.prototype[k];
        js._Boot.HaxeError.prototype.val = null;
        js._Boot.HaxeError.prototype.__class__ = js._Boot.HaxeError;
        if (typeof slotmodel == 'undefined') {
            var slotmodel = {};
        };
        slotmodel.ModuleActivator = function() {};
        slotmodel.ModuleActivator = ck_implements(slotmodel.ModuleActivator, clientkernelModulesApi.IModuleActivator);
        slotmodel.ModuleActivator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        slotmodel.ModuleActivator.__name__ = ["slotmodel", "ModuleActivator"];
        slotmodel.ModuleActivator.prototype.factory = null;
        slotmodel.ModuleActivator.prototype.registration = null;
        slotmodel.ModuleActivator.prototype.start = function(context) {
            var _g = this;
            slotmodel.Log.init(context);
            context.getServiceTracker([clientkernelLoaderApi.IAssetRegistry, clientkernelLoggerApi.ILoggerFactory, clientkernelEventbusApi.IEventBus, umlStateMachineApi.IStateMachineProvider]).then(function(context1) {
                _g.factory = new slotmodel.SlotModelFactory(context1);
                _g.registration = context1.registerService(_g.factory, slotModelApi.SlotModelDeclaration, null);
            });
        };
        slotmodel.ModuleActivator.prototype.stop = function(context) {
            if (this.factory.model != null) this.factory.model.stop();
            if (this.registration != null) this.registration.unregister();
        };
        slotmodel.ModuleActivator.main = function() {};
        slotmodel.ModuleActivator.prototype.__class__ = slotmodel.ModuleActivator;
        slotmodel.SlotModel = function(slotModelPort) {
            this.started = false;
            this.delayGameLoaded = false;
            this.configuration = new slotmodel.Configuration(this);
            this.state = new slotmodel.State(this);
            this.stateMachineController = new slotmodel.StateMachineController(this);
            this.gfBusController = new slotmodel.GfBusController(this, slotModelPort);
            this.pfBusController = new slotmodel.PfBusController(this);
            this.pluginController = new slotmodel.PluginController(this);
        };
        slotmodel.SlotModel.__name__ = ["slotmodel", "SlotModel"];
        slotmodel.SlotModel.prototype.context = null;
        slotmodel.SlotModel.prototype.configuration = null;
        slotmodel.SlotModel.prototype.state = null;
        slotmodel.SlotModel.prototype.stateMachineController = null;
        slotmodel.SlotModel.prototype.gfBusController = null;
        slotmodel.SlotModel.prototype.pfBusController = null;
        slotmodel.SlotModel.prototype.pluginController = null;
        slotmodel.SlotModel.prototype.translationManager = null;
        slotmodel.SlotModel.prototype.moneyFormatter = null;
        slotmodel.SlotModel.prototype.moneyFormatterControler = null;
        slotmodel.SlotModel.prototype.delayGameLoaded = null;
        slotmodel.SlotModel.prototype.started = null;
        slotmodel.SlotModel.prototype.getConfiguration = function() {
            return this.configuration;
        };
        slotmodel.SlotModel.prototype.getState = function() {
            return this.state;
        };
        slotmodel.SlotModel.prototype.getPfBusController = function() {
            return this.pfBusController;
        };
        slotmodel.SlotModel.prototype.getGfBusController = function() {
            return this.gfBusController;
        };
        slotmodel.SlotModel.prototype.getPluginController = function() {
            return this.pluginController;
        };
        slotmodel.SlotModel.prototype.getTranslationManager = function() {
            return this.translationManager;
        };
        slotmodel.SlotModel.prototype.getMoneyFormatter = function() {
            return this.moneyFormatter;
        };
        slotmodel.SlotModel.prototype.getMoneyFormatterController = function() {
            return this.moneyFormatterControler;
        };
        slotmodel.SlotModel.prototype.start = function(context) {
            var _g = this;
            this.context = context;
            this.translationManager = null;
            this.moneyFormatter = null;
            this.moneyFormatterControler = null;
            this.gfBusController.start();
            var configPromise = this.configuration.start(context, this.translationManager);
            configPromise.then(function(data) {
                var translationManagerPromise = context.getServiceTracker([translationmanagerApi.ITranslationManager]);
                translationManagerPromise.then(function(context1) {
                    _g.translationManager = _hcmn_.js_Boot.__cast(context1.getAnyService(translationmanagerApi.ITranslationManager, null), translationmanagerApi.ITranslationManager);
                    _g.getConfiguration().getGameConfiguration().translateOptions(_g.translationManager);
                }, function(errorMessage) {
                    slotmodel.Log.getLogger(_g).error("[start] " + errorMessage);
                });
                var moneyFormatterPromise = context.getServiceTracker([moneyApi.IMoneyFormatter]);
                moneyFormatterPromise.then(function(data1) {
                    _g.moneyFormatter = _hcmn_.js_Boot.__cast(context.getAnyService(moneyApi.IMoneyFormatter, null), moneyApi.IMoneyFormatter);
                }, function(errorMessage1) {
                    slotmodel.Log.getLogger(_g).error("[start] " + errorMessage1);
                });
                var moneyFormatterControllerPromise = context.getServiceTracker([moneyApi.IMoneyFormatterController]);
                moneyFormatterControllerPromise.then(function(data2) {
                    _g.moneyFormatterControler = _hcmn_.js_Boot.__cast(context.getAnyService(moneyApi.IMoneyFormatterController, null), moneyApi.IMoneyFormatterController);
                }, function(errorMessage2) {
                    slotmodel.Log.getLogger(_g).error("[start] " + errorMessage2);
                });
                var pluginPromise = _g.pluginController.start(context);
                pluginPromise.then(function(data3) {
                    _g.start_finish(context);
                }, function(errorMessage3) {
                    slotmodel.Log.getLogger(_g).error("[start] " + errorMessage3);
                });
            }, function(errorMessage4) {
                slotmodel.Log.getLogger(_g).error("[start] " + errorMessage4);
            });
        };
        slotmodel.SlotModel.prototype.start_finish = function(context) {
            this.pfBusController.start(context);
            this.stateMachineController.start(context);
            this.onStarted();
        };
        slotmodel.SlotModel.prototype.stop = function() {
            slotmodel.Log.getLogger(this).debug("STOPPING SLOT MODEL");
            this.gfBusController.stop();
            this.pfBusController.stop();
        };
        slotmodel.SlotModel.prototype.onError = function(error) {
            if (error != null) slotmodel.Log.getLogger(this).error("[" + error.getId() + "][" + _hcmn_.Std.string(error.getSource()) + "] " + error.getMessage());
            else slotmodel.Log.getLogger(this).error("Unknown error");
            this.gfBusController.sendError(error);
        };
        slotmodel.SlotModel.prototype.onStarted = function() {
            this.fireTrigger(slotmodel.sm.Trigger.STARTED);
            this.started = true;
            if (this.delayGameLoaded) this.fireTrigger(slotmodel.sm.Trigger.GAME_LOADED);
        };
        slotmodel.SlotModel.prototype.onGameOptionChangedFromPf = function(optionState) {
            this.gfBusController.sendGameOptionChanged(optionState);
        };
        slotmodel.SlotModel.prototype.onGameOptionChangedFromGf = function(event) {
            this.pfBusController.changeConsoleOption(event.getPayload().key, [event.getPayload().value]);
        };
        slotmodel.SlotModel.prototype.onBalanceChanged = function(accountBalances) {
            this.gfBusController.sendBalance(accountBalances);
        };
        slotmodel.SlotModel.prototype.onGameRequestedFullScreen = function(event) {
            this.pfBusController.requestFullScreen();
        };
        slotmodel.SlotModel.prototype.onPlatformInitialized = function(initializedProperties) {
            this.fireTrigger(slotmodel.sm.Trigger.PLATFORM_INITIALIZED, initializedProperties);
        };
        slotmodel.SlotModel.prototype.onGameLoaded = function(event) {
            if (this.started) this.fireTrigger(slotmodel.sm.Trigger.GAME_LOADED, null);
            else this.delayGameLoaded = true;
        };
        slotmodel.SlotModel.prototype.onInitialized = function() {
            if (this.getState().isResume()) {
                this.getPfBusController().startResume();
                return;
            }
            this.fireTrigger(slotmodel.sm.Trigger.INITIALIZE_CLIENT, null);
        };
        slotmodel.SlotModel.prototype.onGameInitialized = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.GAME_INITIALIZED, null);
        };
        slotmodel.SlotModel.prototype.onResumeStarted = function() {
            this.fireTrigger(slotmodel.sm.Trigger.RESUME_GAME, null);
        };
        slotmodel.SlotModel.prototype.onGameResumePrepared = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.GAME_RESUME_PREPARED, null);
        };
        slotmodel.SlotModel.prototype.onIdlePrepared = function() {
            this.fireTrigger(slotmodel.sm.Trigger.IDLE_PREPARED, null);
        };
        slotmodel.SlotModel.prototype.onStakeChanged = function(stakeItems) {
            this.fireTrigger(slotmodel.sm.Trigger.STAKE_CHANGED, stakeItems);
        };
        slotmodel.SlotModel.prototype.onHelpRequested = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.HELP_REQUESTED, null);
        };
        slotmodel.SlotModel.prototype.onPaytableRequested = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.PAYTABLE_REQUESTED, null);
        };
        slotmodel.SlotModel.prototype.onStartAutoSpinsRequested = function(event) {
            this.pfBusController.requestAutospinsPF(event.getPayload());
            this.stateMachineController.setNotIdle();
        };
        slotmodel.SlotModel.prototype.onStartAutoSpinsRepliedCancel = function() {
            this.stateMachineController.setIdle();
        };
        slotmodel.SlotModel.prototype.onStartAutoSpinsReplied = function(count) {
            this.fireTrigger(slotmodel.sm.Trigger.START_AUTOSPINS, count);
        };
        slotmodel.SlotModel.prototype.onNoAutoSpinsStopReason = function() {
            this.fireTrigger(slotmodel.sm.Trigger.CONTINUE_AUTOSPINS, null);
        };
        slotmodel.SlotModel.prototype.onAutoSpinRequested = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.AUTOSPIN_REQUESTED, null);
        };
        slotmodel.SlotModel.prototype.onPFStopAutoSpinsRequested = function() {
            this.state.onGameStopAutoSpinsRequested(slotmodel.AutoSpinInfoImpl.REASON_ID_PFStopAutoSpinsRequested);
        };
        slotmodel.SlotModel.prototype.onGameStopAutoSpinsRequested = function(event) {
            this.state.onGameStopAutoSpinsRequested(slotmodel.AutoSpinInfoImpl.REASON_ID_GameStopAutoSpinsRequested);
        };
        slotmodel.SlotModel.prototype.onStopAutoSpinsRequested = function(reason) {
            this.fireTrigger(slotmodel.sm.Trigger.STOP_AUTOSPINS, reason);
        };
        slotmodel.SlotModel.prototype.onGameRequestedSpin = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.GAME_REQUESTED_SPIN, null);
        };
        slotmodel.SlotModel.prototype.onSpinningStarted = function() {
            var a = this.context.getServiceTracker([translationmanagerApi.ITranslationManager]);
            this.fireTrigger(slotmodel.sm.Trigger.SPINNING_STARTED, null);
        };
        slotmodel.SlotModel.prototype.onPlatformOutcomeReceived = function(spinOutcome) {
            this.fireTrigger(slotmodel.sm.Trigger.PLATFORM_OUTCOME_RECEIVED, spinOutcome);
        };
        slotmodel.SlotModel.prototype.onGameSpinFinished = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.GAME_SPIN_FINISHED, null);
        };
        slotmodel.SlotModel.prototype.onSpinOutcomePresented = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED, null);
        };
        slotmodel.SlotModel.prototype.onEndGame = function() {
            this.fireTrigger(slotmodel.sm.Trigger.END_GAME, null);
        };
        slotmodel.SlotModel.prototype.onPrepareFreeSpin = function() {
            this.fireTrigger(slotmodel.sm.Trigger.PREPARE_FREE_SPIN, null);
        };
        slotmodel.SlotModel.prototype.onFreeSpinPrepared = function() {
            this.fireTrigger(slotmodel.sm.Trigger.FS_IDLE_PREPARED, null);
        };
        slotmodel.SlotModel.prototype.onGameRequestedContinue = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.GAME_REQUESTED_CONTINUE, null);
        };
        slotmodel.SlotModel.prototype.onPreparePickerBonus = function() {
            this.fireTrigger(slotmodel.sm.Trigger.PREPARE_PICKER_BONUS, null);
        };
        slotmodel.SlotModel.prototype.onPickerBonusPrepared = function() {
            this.fireTrigger(slotmodel.sm.Trigger.PB_IDLE_PREPARED, null);
        };
        slotmodel.SlotModel.prototype.onPickerBonusSelected = function(event) {
            this.getState().setSelectedPickerBonusChoice(event.getPayload().key, event.getPayload().value);
            this.fireTrigger(slotmodel.sm.Trigger.PICKER_BONUS_SELECTED, null);
        };
        slotmodel.SlotModel.prototype.onPickerBonusSelectedArray = function(event) {
            this.getState().setSelectedPickerBonusChoices(event.getPayload());
            this.fireTrigger(slotmodel.sm.Trigger.PICKER_BONUS_SELECTED, null);
        };
        slotmodel.SlotModel.prototype.onPickingStarted = function() {
            var a = this.context.getServiceTracker([translationmanagerApi.ITranslationManager]);
            this.fireTrigger(slotmodel.sm.Trigger.PICKING_STARTED, null);
        };
        slotmodel.SlotModel.prototype.onPlatformAbortSpinReceived = function(abortSpinProperties) {
            this.fireTrigger(slotmodel.sm.Trigger.ABORT_SPIN, abortSpinProperties);
        };
        slotmodel.SlotModel.prototype.onGameSpinAborted = function(event) {
            this.fireTrigger(slotmodel.sm.Trigger.SPIN_ABORTED, null);
        };
        slotmodel.SlotModel.prototype.onGameResultPresented = function(event) {
            this.getPfBusController().calculateNextStage();
        };
        slotmodel.SlotModel.prototype.onTumble = function() {
            this.fireTrigger(slotmodel.sm.Trigger.TUMBLE);
        };
        slotmodel.SlotModel.prototype.onTumbleResumePrepared = function() {
            this.gfBusController.presentSpinOutcome();
        };
        slotmodel.SlotModel.prototype.fireTrigger = function(trigger, payload) {
            this.stateMachineController.fireTrigger(trigger, payload);
        };
        slotmodel.SlotModel.main = function() {};
        slotmodel.SlotModel.prototype.__class__ = slotmodel.SlotModel;
        slotmodel.SlotModelFactory = function(mcontext) {
            this.mcontext = mcontext;
        };
        slotmodel.SlotModelFactory = ck_implements(slotmodel.SlotModelFactory, clientkernelModulesApi.IService);
        slotmodel.SlotModelFactory = ck_implements(slotmodel.SlotModelFactory, componentmodelComponentApi.IComponentFactory);
        slotmodel.SlotModelFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        slotmodel.SlotModelFactory.__name__ = ["slotmodel", "SlotModelFactory"];
        slotmodel.SlotModelFactory.prototype.mcontext = null;
        slotmodel.SlotModelFactory.prototype.model = null;
        slotmodel.SlotModelFactory.prototype.getComponentDeclaration = function() {
            return slotModelApi.SlotModelDeclaration;
        };
        slotmodel.SlotModelFactory.prototype.createComponent = function(context) {
            this.model = new slotmodel.SlotModel(context.getImplementedPort(slotModelApi.ISlotModelImplementationPort));
            this.model.start(this.mcontext);
        };
        slotmodel.SlotModelFactory.prototype.__class__ = slotmodel.SlotModelFactory;
        slotmodel.KernelHelper = function() {};
        slotmodel.KernelHelper.__name__ = ["slotmodel", "KernelHelper"];
        slotmodel.KernelHelper.defaultContext = null;
        slotmodel.KernelHelper.setDefaultContext = function(context) {
            slotmodel.KernelHelper.defaultContext = context;
        };
        slotmodel.KernelHelper.getChannel = function(context, channelId) {
            var eventBus = null;
            var eventBusService = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
            if (eventBusService != null) {
                if (_hcmn_.js_Boot.__instanceof(eventBusService, clientkernelEventbusApi.IEventBus)) eventBus = _hcmn_.js_Boot.__cast(eventBusService, clientkernelEventbusApi.IEventBus);
            }
            if (eventBus == null) {
                slotmodel.Log.getLoggerBykey("KernelHelper").error("[getChannel] EventBus is null.");
                return null;
            }
            return eventBus.getChannel(channelId);
        };
        slotmodel.KernelHelper.getStateMahineProvider = function(context) {
            var stateMachineProvider = null;
            var stateMachineProviderService = context.getAnyService(umlStateMachineApi.IStateMachineProvider, null);
            if (stateMachineProviderService != null) {
                if (_hcmn_.js_Boot.__instanceof(stateMachineProviderService, umlStateMachineApi.IStateMachineProvider)) stateMachineProvider = _hcmn_.js_Boot.__cast(stateMachineProviderService, umlStateMachineApi.IStateMachineProvider);
            }
            if (stateMachineProvider == null) {
                slotmodel.Log.getLoggerBykey("KernelHelper").error("[getStateMahineProvider] StateMahineProvider is null.");
                return null;
            }
            return stateMachineProvider;
        };
        slotmodel.KernelHelper.getAssetRegistry = function(context) {
            var assetRegistry = null;
            var assetRegistryService = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            if (assetRegistryService != null) {
                if (_hcmn_.js_Boot.__instanceof(assetRegistryService, clientkernelLoaderApi.IAssetRegistry)) assetRegistry = _hcmn_.js_Boot.__cast(assetRegistryService, clientkernelLoaderApi.IAssetRegistry);
            }
            return assetRegistry;
        };
        slotmodel.KernelHelper.getAsset = function(context, assetId) {
            var assetRegistry = slotmodel.KernelHelper.getAssetRegistry(context);
            return new Promise(function(resolve, reject) {
                if (assetRegistry == null) reject("AssetRegistry is null");
                var assetRegistryPromise = assetRegistry.getAsset(assetId).getContent();
                assetRegistryPromise.then(function(data) {
                    resolve(data);
                }, function(error) {
                    reject(error.message);
                });
            });
        };
        slotmodel.KernelHelper.getVariableRegistry = function(context) {
            var variableRegistry = null;
            var variableRegistryService = context.getAnyService(clientkernelLoaderApi.IVariableRegistry, null);
            if (variableRegistryService != null) {
                if (_hcmn_.js_Boot.__instanceof(variableRegistryService, clientkernelLoaderApi.IVariableRegistry)) variableRegistry = _hcmn_.js_Boot.__cast(variableRegistryService, clientkernelLoaderApi.IVariableRegistry);
            }
            return variableRegistry;
        };
        slotmodel.KernelHelper.getLoaderVariable = function(context, name, defaultValue) {
            var variableRegistry = slotmodel.KernelHelper.getVariableRegistry(context);
            return variableRegistry.get(name, defaultValue);
        };
        slotmodel.KernelHelper.prototype.__class__ = slotmodel.KernelHelper;
        slotmodel.Log = function() {};
        slotmodel.Log.__name__ = ["slotmodel", "Log"];
        slotmodel.Log.logerFactory = null;
        slotmodel.Log.init = function(context) {
            slotmodel.Log.logerFactory = slotmodel.Log.getLogerFactory(context);
        };
        slotmodel.Log.getLogger = function(object) {
            var key = _hcmn_.Type.getClassName(_hcmn_.Type.getClass(object));
            if (key != null) {
                var keyArray = key.split(".");
                key = keyArray[keyArray.length - 1];
            }
            return slotmodel.Log.getLoggerBykey(key);
        };
        slotmodel.Log.getLoggerBykey = function(key) {
            if (slotmodel.Log.logerFactory == null) return null;
            if (!slotmodel.Log.loggers.exists(key)) {
                var value = slotmodel.Log.logerFactory.getLogger(key);
                slotmodel.Log.loggers.set(key, value);
            }
            return slotmodel.Log.loggers.get(key);
        };
        slotmodel.Log.getLogerFactory = function(context) {
            var loggerService = context.getAnyService(clientkernelLoggerApi.ILoggerFactory, null);
            if (loggerService != null) {
                if (_hcmn_.js_Boot.__instanceof(loggerService, clientkernelLoggerApi.ILoggerFactory)) return _hcmn_.js_Boot.__cast(loggerService, clientkernelLoggerApi.ILoggerFactory);
            }
            return null;
        };
        slotmodel.Log.prototype.__class__ = slotmodel.Log;
        slotmodel.StdHelper = function() {};
        slotmodel.StdHelper.__name__ = ["slotmodel", "StdHelper"];
        slotmodel.StdHelper.isStringEmpty = function(value) {
            if (value == null) return true;
            if (value == "") return true;
            return false;
        };
        slotmodel.StdHelper.isArrayEmpty = function(value) {
            if (value == null) return true;
            if (value.length == 0) return true;
            return false;
        };
        slotmodel.StdHelper.getArray = function(object) {
            var result = null;
            if (object == null) return null;
            if ((object instanceof Array) && object.__enum__ == null) result = object;
            else if (Object.prototype.hasOwnProperty.call(object, "#text")) result = [_hcmn_.Reflect.field(object, "#text")];
            else result = [object];
            return result;
        };
        slotmodel.StdHelper.getStringArray = function(object) {
            if (object == null) return null;
            var dynamicResult = null;
            if ((object instanceof Array) && object.__enum__ == null) dynamicResult = object;
            else dynamicResult = [object];
            var result = [];
            var item;
            var _g = 0;
            while (_g < dynamicResult.length) {
                var item1 = dynamicResult[_g];
                ++_g;
                result.push(_hcmn_.Std.string(item1));
            }
            return result;
        };
        slotmodel.StdHelper.getIntArray = function(object) {
            if (object == null) return null;
            var dynamicResult = null;
            if ((object instanceof Array) && object.__enum__ == null) dynamicResult = object;
            else dynamicResult = [object];
            var result = [];
            var item;
            var _g = 0;
            while (_g < dynamicResult.length) {
                var item1 = dynamicResult[_g];
                ++_g;
                result.push(_hcmn_.js_Boot.__cast(item1, _hcmn_.Int));
            }
            return result;
        };
        slotmodel.StdHelper.getField = function(object, path) {
            if (object == null) return null;
            var pathArray = path.split(".");
            var fieldName = pathArray.shift();
            var remainingPath = pathArray.join(".");
            var field;
            if (Object.prototype.hasOwnProperty.call(object, fieldName)) {
                field = _hcmn_.Reflect.field(object, fieldName);
                if (slotmodel.StdHelper.isArrayEmpty(pathArray)) return field;
                else return slotmodel.StdHelper.getField(field, remainingPath);
            }
            return null;
        };
        slotmodel.StdHelper.getBoolField = function(object, name, defaultValue) {
            var dynammicValue = slotmodel.StdHelper.getField(object, name);
            if (dynammicValue == null) return defaultValue;
            return _hcmn_.Std.string(dynammicValue).toLowerCase() == "true";
        };
        slotmodel.StdHelper.getArrayField = function(object, name) {
            var field = slotmodel.StdHelper.getField(object, name);
            return slotmodel.StdHelper.getArray(field);
        };
        slotmodel.StdHelper.getIntArrayField = function(object, name) {
            if (object == null) return null;
            var resultDynamicArray = slotmodel.StdHelper.getArrayField(object, name);
            if (resultDynamicArray == null) return null;
            var result = [];
            var resultItem;
            var _g = 0;
            while (_g < resultDynamicArray.length) {
                var resultItem1 = resultDynamicArray[_g];
                ++_g;
                result.push(_hcmn_.js_Boot.__cast(resultItem1, _hcmn_.Int));
            }
            return result;
        };
        slotmodel.StdHelper.getArrayInJsonString = function(jsonString, namePath, onError) {
            var json;
            try {
                json = JSON.parse(jsonString);
            } catch (exception) {
                if (exception instanceof js._Boot.HaxeError) exception = exception.val;
                if (onError != null) onError(_hcmn_.Std.string(exception));
                return null;
            }
            return slotmodel.StdHelper.getArray(slotmodel.StdHelper.getField(json, namePath));
        };
        slotmodel.StdHelper.getObjectInJsonString = function(jsonString, namePath, onError) {
            var json;
            try {
                json = JSON.parse(jsonString);
            } catch (exception) {
                if (exception instanceof js._Boot.HaxeError) exception = exception.val;
                if (onError != null) onError(_hcmn_.Std.string(exception));
                return null;
            }
            return slotmodel.StdHelper.getField(json, namePath);
        };
        slotmodel.StdHelper.parseInt = function(object, onError) {
            var result = null;
            try {
                result = _hcmn_.Std.parseInt(_hcmn_.Std.string(object));
            } catch (exception) {
                if (exception instanceof js._Boot.HaxeError) exception = exception.val;
                if (onError != null) onError(_hcmn_.Std.string(exception));
                return null;
            }
            return result;
        };
        slotmodel.StdHelper.parseIntField = function(object, name, onError) {
            var dynamicValue = slotmodel.StdHelper.getField(object, name);
            if (dynamicValue == null) return null;
            return slotmodel.StdHelper.parseInt(dynamicValue, onError);
        };
        slotmodel.StdHelper.parseIntArrayField = function(object, name, onError) {
            if (object == null) return null;
            var resultDynamicArray = slotmodel.StdHelper.getArrayField(object, name);
            if (resultDynamicArray == null) return null;
            var result = [];
            var resultItem;
            var _g = 0;
            while (_g < resultDynamicArray.length) {
                var resultItem1 = resultDynamicArray[_g];
                ++_g;
                var item = slotmodel.StdHelper.parseInt(resultItem1, onError);
                if (item == null) return null;
                result.push(item);
            }
            return result;
        };
        slotmodel.StdHelper.getMaxFromArray = function(array) {
            if (slotmodel.StdHelper.isArrayEmpty(array)) return null;
            var max = array[0];
            var _g1 = 0;
            var _g = array.length;
            while (_g1 < _g) {
                var i = _g1++;
                if (array[i] > max) max = array[i];
            }
            return max;
        };
        slotmodel.StdHelper.prototype.__class__ = slotmodel.StdHelper;
        slotmodel.Configuration = function(model) {
            this.testable = false;
            this.model = model;
            this.playerConfiguration = new slotmodel.PlayerConfiguration(this);
            this.gameConfiguration = new slotmodel.GameConfiguration(this);
            this.setIsTestable();
        };
        slotmodel.Configuration.__name__ = ["slotmodel", "Configuration"];
        slotmodel.Configuration.prototype.testable = null;
        slotmodel.Configuration.prototype.model = null;
        slotmodel.Configuration.prototype.playerConfiguration = null;
        slotmodel.Configuration.prototype.gameConfiguration = null;
        slotmodel.Configuration.prototype.onError = function(error) {
            this.model.onError(error);
        };
        slotmodel.Configuration.prototype.start = function(context, translationManager) {
            var _g = this;
            slotmodel.KernelHelper.setDefaultContext(context);
            return new Promise(function(resolve, reject) {
                var gameConfigPromise = slotmodel.KernelHelper.getAsset(context, slotmodel.Configuration.GAME_CONFIG_ASSET_ID);
                gameConfigPromise.then(function(data) {
                    _g.gameConfiguration.parseGameConfig(data, translationManager);
                    var gameAssemblyVersion = slotmodel.KernelHelper.getLoaderVariable(context, _g.gameConfiguration.getVersionVariable());
                    _g.gameConfiguration.setGameAssemblyVersion(gameAssemblyVersion);
                    slotmodel.Log.getLogger(_g).debug("[loadGameConfig] added game config from config file: " + slotmodel.Configuration.GAME_CONFIG_ASSET_ID);
                    var slotDefinitionPromise = slotmodel.KernelHelper.getAsset(context, slotmodel.Configuration.SLOT_DEFINITION_ASSET_ID);
                    slotDefinitionPromise.then(function(data1) {
                        _g.gameConfiguration.parseSlotDefinition(data1, $bind(_g, _g.onError));
                        slotmodel.Log.getLogger(_g).debug("[loadSlotDefinition] added slot definition from config file: " + slotmodel.Configuration.SLOT_DEFINITION_ASSET_ID);
                        resolve(data1);
                    }, function(errorMessage) {
                        slotmodel.Log.getLogger(_g).error("[loadSlotDefinition] " + errorMessage);
                        reject(errorMessage);
                    });
                }, function(errorMessage1) {
                    slotmodel.Log.getLogger(_g).error("[loadSlotDefinition] " + errorMessage1);
                    reject(errorMessage1);
                });
            });
        };
        slotmodel.Configuration.prototype.onPlatformInitialized = function(properties) {
            if (properties == null) {
                this.onError(new slotmodel.Error(slotmodel.EErrorSource.CONFIGURATION, slotmodel.ErrorIdList.InitializedPropertiesError, true, "[onPlatformInitialized] InitializedProperties are null;"));
                return;
            }
            this.gameConfiguration.onPlatformInitialized(properties);
            this.playerConfiguration.onPlatformInitialized(properties);
        };
        slotmodel.Configuration.prototype.setIsTestable = function() {
            this.testable = false;
            var testableString = this.getUrlParam("testable");
            if (testableString != null) {
                if (testableString == "1") this.testable = true;
            }
        };
        slotmodel.Configuration.prototype.getUrlParam = function(param) {
            var urlParams;
            if (window.location != window.parent.location) urlParams = window.document.referrer.split("?")[1];
            else urlParams = window.document.location.search.split("?")[1];
            if (urlParams == null) return null;
            var vars = urlParams.split("&");
            var _g1 = 0;
            var _g = vars.length;
            while (_g1 < _g) {
                var i = _g1++;
                var pair = vars[i].split("=");
                if (pair[0] == param) return pair[1];
            }
            return null;
        };
        slotmodel.Configuration.prototype.isTestable = function() {
            return this.testable;
        };
        slotmodel.Configuration.prototype.getPlayerConfiguration = function() {
            return this.playerConfiguration;
        };
        slotmodel.Configuration.prototype.getGameConfiguration = function() {
            return this.gameConfiguration;
        };
        slotmodel.Configuration.prototype.hasGamePlugin = function() {
            return this.gameConfiguration.hasGamePlugin();
        };
        slotmodel.Configuration.prototype.__class__ = slotmodel.Configuration;
        slotmodel.EServerType = function(value) {
            this.value = "";
            this.value = value;
        };
        slotmodel.EServerType.__name__ = ["slotmodel", "EServerType"];
        slotmodel.EServerType.prototype.value = null;
        slotmodel.EServerType.prototype.toString = function() {
            return this.value;
        };
        slotmodel.EServerType.prototype.equals = function(that) {
            if (that != null && this.value.toLowerCase() == that.value.toLowerCase()) return true;
            return false;
        };
        slotmodel.EServerType.prototype.__class__ = slotmodel.EServerType;
        slotmodel.GameConfigParser = function() {};
        slotmodel.GameConfigParser.__name__ = ["slotmodel", "GameConfigParser"];
        slotmodel.GameConfigParser.parseVersionVariable = function(gameConfigJson) {
            if (gameConfigJson == null) return null;
            var versionVariable = slotmodel.StdHelper.getField(gameConfigJson, "versionVariable");
            return versionVariable;
        };
        slotmodel.GameConfigParser.parseLinks = function(gameConfigJson) {
            if (gameConfigJson == null) return null;
            var linksArray = slotmodel.StdHelper.getArrayField(gameConfigJson, "links");
            if (linksArray == null) return null;
            var languageVariable = slotmodel.KernelHelper.getVariableRegistry(slotmodel.KernelHelper.defaultContext).get("language", "en");
            var links = new _hcmn_.haxe_ds_StringMap();
            var linkItem;
            var _g = 0;
            while (_g < linksArray.length) {
                var linkItem1 = linksArray[_g];
                ++_g;
                var id = slotmodel.StdHelper.getField(linkItem1, "id");
                var url = slotmodel.StdHelper.getField(linkItem1, "url");
                url = _hcmn_.StringTools.replace(url, "_en", "_" + languageVariable);
                var value = new slotmodel.Link(id, url);
                if (_hcmn_.__map_reserved[id] != null) links.setReserved(id, value);
                else links.h[id] = value;
            }
            return links;
        };
        slotmodel.GameConfigParser.parseOptions = function(gameConfigJson, translationManager) {
            if (gameConfigJson == null) return null;
            var optionsArray = slotmodel.StdHelper.getArrayField(gameConfigJson, "options");
            if (optionsArray == null) return null;
            var options = new _hcmn_.haxe_ds_StringMap();
            var optionItem;
            var _g = 0;
            while (_g < optionsArray.length) {
                var optionItem1 = optionsArray[_g];
                ++_g;
                var type = slotmodel.StdHelper.getField(optionItem1, "type");
                var name = slotmodel.StdHelper.getField(optionItem1, "name");
                var text = slotmodel.StdHelper.getField(optionItem1, "text");
                if (translationManager != null) {
                    if (text != null && text != "") text = translationManager.stringLookup(text);
                }
                var enabled = slotmodel.StdHelper.parseIntField(optionItem1, "enabled", null);
                if (enabled == null) enabled = 0;
                var value = slotmodel.StdHelper.getField(optionItem1, "value");
                var values = slotmodel.StdHelper.getArrayField(optionItem1, "values");
                var valueText = slotmodel.StdHelper.getField(optionItem1, "valueText");
                if (translationManager != null) {
                    if (valueText != null) {
                        if ((valueText instanceof Array) && valueText.__enum__ == null) {
                            var valueTextArr = slotmodel.StdHelper.getStringArray(valueText);
                            if (valueTextArr.length > 0) {
                                var i;
                                var _g2 = 0;
                                var _g1 = valueTextArr.length;
                                while (_g2 < _g1) {
                                    var i1 = _g2++;
                                    valueTextArr[i1] = translationManager.stringLookup(valueTextArr[i1]);
                                }
                            }
                            valueText = valueTextArr;
                        } else valueText = translationManager.stringLookup(_hcmn_.Std.string(valueText));
                    }
                }
                var value1 = new pfCommunicatorApi.Option(type, name, text, enabled, value, values, valueText);
                if (_hcmn_.__map_reserved[name] != null) options.setReserved(name, value1);
                else options.h[name] = value1;
            }
            return options;
        };
        slotmodel.GameConfigParser.parseBigWinGroupPoints = function(gameConfigJson) {
            if (gameConfigJson == null) return null;
            var bigWinGroupPointsArray = slotmodel.StdHelper.getArrayField(gameConfigJson, "bigWinGroupPoints");
            if (bigWinGroupPointsArray == null) return null;
            var bigWinGroupPoints = [];
            var bigWinGroupPointsItem;
            var _g = 0;
            while (_g < bigWinGroupPointsArray.length) {
                var bigWinGroupPointsItem1 = bigWinGroupPointsArray[_g];
                ++_g;
                bigWinGroupPoints.push(bigWinGroupPointsItem1);
            }
            return bigWinGroupPoints;
        };
        slotmodel.GameConfigParser.prototype.__class__ = slotmodel.GameConfigParser;
        slotmodel.GameConfiguration = function(configuration) {
            this.bigWinGroupPoints = slotmodel.GameConfiguration.DEFAULT_BIG_WIN_GROUP_POINTS;
            this.consoleSettings = null;
            this.configuration = configuration;
        };
        slotmodel.GameConfiguration.__name__ = ["slotmodel", "GameConfiguration"];
        slotmodel.GameConfiguration.prototype.stripeLayersMap = null;
        slotmodel.GameConfiguration.prototype.configuration = null;
        slotmodel.GameConfiguration.prototype.hasGamePluginP = null;
        slotmodel.GameConfiguration.prototype.serverType = null;
        slotmodel.GameConfiguration.prototype.useDistortionReels = null;
        slotmodel.GameConfiguration.prototype.useServerAsPrimary = null;
        slotmodel.GameConfiguration.prototype.versionVariable = null;
        slotmodel.GameConfiguration.prototype.gameAssemblyVersion = null;
        slotmodel.GameConfiguration.prototype.gameLogicVersion = null;
        slotmodel.GameConfiguration.prototype.links = null;
        slotmodel.GameConfiguration.prototype.options = null;
        slotmodel.GameConfiguration.prototype.reelPictureSize = null;
        slotmodel.GameConfiguration.prototype.reelPictureVisibility = null;
        slotmodel.GameConfiguration.prototype.symbols = null;
        slotmodel.GameConfiguration.prototype.reels = null;
        slotmodel.GameConfiguration.prototype.lines = null;
        slotmodel.GameConfiguration.prototype.outcomes = null;
        slotmodel.GameConfiguration.prototype.defaultBaseGameStripeLayer = null;
        slotmodel.GameConfiguration.prototype.defaultFreeSpinStripeLayer = null;
        slotmodel.GameConfiguration.prototype.baseGameIndex = null;
        slotmodel.GameConfiguration.prototype.freeSpinIndex = null;
        slotmodel.GameConfiguration.prototype.rtp = null;
        slotmodel.GameConfiguration.prototype.selectableLines = null;
        slotmodel.GameConfiguration.prototype.sideBets = null;
        slotmodel.GameConfiguration.prototype.startReelPicture = null;
        slotmodel.GameConfiguration.prototype.startReelPicturePerBet = null;
        slotmodel.GameConfiguration.prototype.startFSReelPicture = null;
        slotmodel.GameConfiguration.prototype.startFSReelPicturePerBet = null;
        slotmodel.GameConfiguration.prototype.autoSpinDefinition = null;
        slotmodel.GameConfiguration.prototype.consoleSettings = null;
        slotmodel.GameConfiguration.prototype.bigWinGroupPoints = null;
        slotmodel.GameConfiguration.prototype.parseGameConfig = function(json, translationManager) {
            if (json == null) {
                slotmodel.Log.getLogger(this).warn("Game Config json is NULL");
                return;
            }
            this.versionVariable = slotmodel.GameConfigParser.parseVersionVariable(json);
            this.links = slotmodel.GameConfigParser.parseLinks(json);
            this.options = slotmodel.GameConfigParser.parseOptions(json, translationManager);
            this.bigWinGroupPoints = slotmodel.GameConfigParser.parseBigWinGroupPoints(json);
            if (this.bigWinGroupPoints == null) this.bigWinGroupPoints = slotmodel.GameConfiguration.DEFAULT_BIG_WIN_GROUP_POINTS;
        };
        slotmodel.GameConfiguration.prototype.translateOptions = function(translationManager) {
            if (translationManager == null) return;
            if (this.options == null) return;
            var optionName;
            var $it0 = this.options.keys();
            while ($it0.hasNext()) {
                var optionName1 = $it0.next();
                var option = this.options.get(optionName1);
                var text = option.text;
                if (text != null && text != "") text = translationManager.stringLookup(text);
                var valueText = option.valueText;
                if (valueText != null) {
                    if ((valueText instanceof Array) && valueText.__enum__ == null) {
                        var valueTextArr = slotmodel.StdHelper.getStringArray(valueText);
                        if (valueTextArr.length > 0) {
                            var i;
                            var _g1 = 0;
                            var _g = valueTextArr.length;
                            while (_g1 < _g) {
                                var i1 = _g1++;
                                valueTextArr[i1] = translationManager.stringLookup(valueTextArr[i1]);
                            }
                        }
                        valueText = valueTextArr;
                    } else valueText = translationManager.stringLookup(_hcmn_.Std.string(valueText));
                }
                var newOption = new pfCommunicatorApi.Option(option.type, option.name, text, option.enabled, option.value, option.values, valueText);
                this.options.set(optionName1, newOption);
            }
        };
        slotmodel.GameConfiguration.prototype.parseSlotDefinition = function(json, onError) {
            if (json == null) {
                slotmodel.Log.getLogger(this).warn("Slot definition json is NULL");
                return;
            }
            slotmodel.SlotDefinitionParser.init(onError);
            this.hasGamePluginP = slotmodel.SlotDefinitionParser.parseHasGamePlugin(json);
            this.serverType = slotmodel.SlotDefinitionParser.parseServerType(json);
            this.useDistortionReels = slotmodel.SlotDefinitionParser.parseUseDistortionReels(json);
            this.useServerAsPrimary = slotmodel.SlotDefinitionParser.parseUseServerAsPrimary(json);
            this.reelPictureSize = slotmodel.SlotDefinitionParser.parseReelPictureSize(json);
            this.reelPictureVisibility = slotmodel.SlotDefinitionParser.parseReelPictureVisibility(json);
            this.symbols = slotmodel.SlotDefinitionParser.parseSymbols(json);
            this.reels = null;
            if (this.useDistortionReels) this.reels = slotmodel.SlotDefinitionParser.parseReels(json, this.useDistortionReels);
            this.lines = slotmodel.SlotDefinitionParser.parseLines(json);
            this.outcomes = slotmodel.SlotDefinitionParser.parseOutcomes(json);
            this.startReelPicture = slotmodel.SlotDefinitionParser.parseStartReelPicture(json);
            this.startReelPicturePerBet = slotmodel.SlotDefinitionParser.parseStartReelPicturePerBet(json);
            this.startFSReelPicture = slotmodel.SlotDefinitionParser.parseStartFSReelPicture(json);
            this.startFSReelPicturePerBet = slotmodel.SlotDefinitionParser.parseStartFSReelPicturePerBet(json);
        };
        slotmodel.GameConfiguration.prototype.setGameAssemblyVersion = function(value) {
            this.gameAssemblyVersion = value;
        };
        slotmodel.GameConfiguration.prototype.setGameLogicVersion = function(value) {
            this.gameLogicVersion = value;
        };
        slotmodel.GameConfiguration.prototype.updateOptionBetPerLine = function(name, betsPerLine, moneyFormatter) {
            if (!this.hasOption(name)) return;
            if (betsPerLine == null) return;
            var betsPerLineKeys = null;
            if (betsPerLine != null) {
                betsPerLineKeys = [];
                var key;
                var $it0 = betsPerLine.keys();
                while ($it0.hasNext()) {
                    var key1 = $it0.next();
                    betsPerLineKeys.push(key1);
                }
                betsPerLineKeys.sort(slotmodel.GameConfiguration.sortMonneyStrings);
            }
            if (slotmodel.StdHelper.isArrayEmpty(betsPerLineKeys)) return;
            var betsPerLineValues = [];
            var i;
            var _g1 = 0;
            var _g = betsPerLineKeys.length;
            while (_g1 < _g) {
                var i1 = _g1++;
                if (moneyFormatter != null) betsPerLineValues[i1] = moneyFormatter.format(betsPerLineKeys[i1]);
                else betsPerLineValues[i1] = betsPerLineKeys[i1];
            }
            var current = this.options.get(name);
            var newOption = new pfCommunicatorApi.Option(current.type, name, current.text, current.enabled, betsPerLineKeys[0], betsPerLineKeys, betsPerLineValues);
            this.options.set(name, newOption);
        };
        slotmodel.GameConfiguration.prototype.updateOptionSelectableLines = function(name, selectableLines) {
            if (!this.hasOption(name)) return;
            if (selectableLines == null) return;
            if (slotmodel.StdHelper.isArrayEmpty(selectableLines)) return;
            var current = this.options.get(name);
            var newOption = new pfCommunicatorApi.Option(current.type, name, current.text, current.enabled, selectableLines[0], slotmodel.StdHelper.getStringArray(selectableLines), slotmodel.StdHelper.getStringArray(selectableLines));
            this.options.set(name, newOption);
        };
        slotmodel.GameConfiguration.prototype.getVersionVariable = function() {
            return this.versionVariable;
        };
        slotmodel.GameConfiguration.prototype.getGameAssemblyVersion = function() {
            return this.gameAssemblyVersion;
        };
        slotmodel.GameConfiguration.prototype.getGameVersion = function() {
            var gameVersion = null;
            if (this.gameAssemblyVersion != null) {
                var gameVersionArr = this.gameAssemblyVersion.split(".");
                if (gameVersionArr.length > 1) gameVersion = gameVersionArr[0] + "." + gameVersionArr[1];
            }
            return gameVersion;
        };
        slotmodel.GameConfiguration.prototype.getGameLogicVersion = function() {
            return this.gameLogicVersion;
        };
        slotmodel.GameConfiguration.prototype.getServerType = function() {
            return this.serverType;
        };
        slotmodel.GameConfiguration.prototype.hasGamePlugin = function() {
            return this.hasGamePluginP;
        };
        slotmodel.GameConfiguration.prototype.getConsoleSettings = function() {
            return this.consoleSettings;
        };
        slotmodel.GameConfiguration.prototype.getReelPictureSize = function() {
            return this.reelPictureSize;
        };
        slotmodel.GameConfiguration.prototype.getReelPictureVisibility = function() {
            return this.reelPictureVisibility;
        };
        slotmodel.GameConfiguration.prototype.getSelectableLines = function() {
            return this.selectableLines;
        };
        slotmodel.GameConfiguration.prototype.getSideBets = function() {
            return this.sideBets;
        };
        slotmodel.GameConfiguration.prototype.getLines = function() {
            return this.lines;
        };
        slotmodel.GameConfiguration.prototype.getLinesArray = function() {
            if (this.lines == null) return null;
            var result = [];
            var id;
            var $it0 = this.lines.keys();
            while ($it0.hasNext()) {
                var id1 = $it0.next();
                result.push(this.lines.h[id1]);
            }
            return result;
        };
        slotmodel.GameConfiguration.prototype.getLink = function(id) {
            if (this.links.exists(id)) return this.links.get(id);
            return null;
        };
        slotmodel.GameConfiguration.prototype.getOptions = function() {
            return this.options;
        };
        slotmodel.GameConfiguration.prototype.hasOption = function(name) {
            if (this.options == null) return null;
            return this.options.exists(name);
        };
        slotmodel.GameConfiguration.prototype.getOptionsArray = function() {
            var result = [];
            if (this.options != null) {
                var name;
                var $it0 = this.options.keys();
                while ($it0.hasNext()) {
                    var name1 = $it0.next();
                    result.push(this.options.get(name1));
                }
            }
            return result;
        };
        slotmodel.GameConfiguration.prototype.getDefaultStripeLayers = function(stage) {
            if (this.reelPictureSize == null) return null;
            var result = [];
            var i;
            var _g1 = 0;
            var _g = this.reelPictureSize.reelCount;
            while (_g1 < _g) {
                var i1 = _g1++;
                if (stage.equals(slotmodel.EStage.BASE_GAME)) result.push(this.defaultBaseGameStripeLayer);
                else if (stage.contains(slotmodel.EStage.FREE_SPIN)) result.push(this.defaultFreeSpinStripeLayer);
            }
            return result;
        };
        slotmodel.GameConfiguration.prototype.getBaseGameIndex = function() {
            return this.baseGameIndex;
        };
        slotmodel.GameConfiguration.prototype.getFreeSpinIndex = function() {
            return this.freeSpinIndex;
        };
        slotmodel.GameConfiguration.prototype.getBigWinGroupPoints = function() {
            return this.bigWinGroupPoints;
        };
        slotmodel.GameConfiguration.prototype.getReels = function() {
            return this.reels;
        };
        slotmodel.GameConfiguration.prototype.setReels = function(reels) {
            if (!this.useDistortionReels) this.reels = reels;
        };
        slotmodel.GameConfiguration.prototype.setOutcomes = function(outcomes) {
            this.outcomes = outcomes;
        };
        slotmodel.GameConfiguration.prototype.setLines = function(lines) {
            if (lines != null && this.useServerAsPrimary) this.lines = lines;
        };
        slotmodel.GameConfiguration.prototype.setStartFSReelPicture = function(reelPicture) {
            this.startFSReelPicture = reelPicture;
        };
        slotmodel.GameConfiguration.prototype.setDefaultBaseGameStripeLayer = function(defaultBaseGameStripeLayer) {
            this.defaultBaseGameStripeLayer = defaultBaseGameStripeLayer;
        };
        slotmodel.GameConfiguration.prototype.setDefaultFreeSpinStripeLayer = function(defaultFreeSpinStripeLayer) {
            this.defaultFreeSpinStripeLayer = defaultFreeSpinStripeLayer;
        };
        slotmodel.GameConfiguration.prototype.setBaseGameIndex = function(baseGameindex) {
            this.baseGameIndex = baseGameindex;
        };
        slotmodel.GameConfiguration.prototype.setFreeSpinIndex = function(freeSpinIndex) {
            this.freeSpinIndex = freeSpinIndex;
        };
        slotmodel.GameConfiguration.prototype.setStripeLayersMap = function(stripeLayersMap) {
            this.stripeLayersMap = stripeLayersMap;
        };
        slotmodel.GameConfiguration.prototype.onPlatformInitialized = function(properties) {
            if (properties == null) {
                this.configuration.onError(new slotmodel.Error(slotmodel.EErrorSource.CONFIGURATION, slotmodel.ErrorIdList.InitializedPropertiesError, true, "[onPlatformInitialized] InitializedProperties are null;"));
                return;
            }
            this.rtp = properties.rtp;
            this.selectableLines = properties.selectableLines;
            this.sideBets = properties.sideBets;
            if (properties.startReelPicture != null && this.useServerAsPrimary) this.startReelPicture = properties.startReelPicture;
            if (properties.startReelPicturePerBet != null && this.useServerAsPrimary) this.startReelPicturePerBet = properties.startReelPicturePerBet;
            if (properties.startFSReelPicture != null && this.useServerAsPrimary) this.startFSReelPicture = properties.startFSReelPicture;
            if (properties.startFSReelPicturePerBet != null && this.useServerAsPrimary) this.startFSReelPicturePerBet = properties.startFSReelPicturePerBet;
            this.autoSpinDefinition = properties.autoSpinDefinition;
        };
        slotmodel.GameConfiguration.prototype.getSlotDefinition = function() {
            return new slotModelApi.SlotDefinition(this.rtp, this.reelPictureSize, this.reelPictureVisibility, this.symbols, this.reels, this.getLinesArray(), this.selectableLines, this.sideBets, this.startReelPicture, this.startReelPicturePerBet, this.startFSReelPicture, this.startFSReelPicturePerBet, this.autoSpinDefinition, this.outcomes, this.stripeLayersMap);
        };
        slotmodel.GameConfiguration.sortMonneyStrings = function(x, y) {
            return new money.Money(x).compare(new money.Money(y));
        };
        slotmodel.GameConfiguration.prototype.__class__ = slotmodel.GameConfiguration;
        slotmodel.PlayerConfiguration = function(configuration) {
            this.configuration = configuration;
        };
        slotmodel.PlayerConfiguration.__name__ = ["slotmodel", "PlayerConfiguration"];
        slotmodel.PlayerConfiguration.prototype.configuration = null;
        slotmodel.PlayerConfiguration.prototype.betsPerLine = null;
        slotmodel.PlayerConfiguration.prototype.defaultBetPerLineCredit = null;
        slotmodel.PlayerConfiguration.prototype.riskControlSettings = null;
        slotmodel.PlayerConfiguration.prototype.onPlatformInitialized = function(properties) {
            if (properties == null) {
                this.configuration.onError(new slotmodel.Error(slotmodel.EErrorSource.CONFIGURATION, slotmodel.ErrorIdList.InitializedPropertiesError, true, "[onPlatformInitialized] InitializedProperties are null;"));
                return;
            }
            this.betsPerLine = properties.betsPerLine;
            this.defaultBetPerLineCredit = properties.defaultBetPerLineCredit;
            this.riskControlSettings = properties.riskControlSettings;
        };
        slotmodel.PlayerConfiguration.prototype.getRiskControlSettings = function() {
            return this.riskControlSettings;
        };
        slotmodel.PlayerConfiguration.prototype.getDefaultBetPerLineCredit = function() {
            return this.defaultBetPerLineCredit;
        };
        slotmodel.PlayerConfiguration.prototype.getBetPerLineCredit = function(betPerLine) {
            if (this.betsPerLine.exists(betPerLine)) return this.betsPerLine.get(betPerLine);
            return null;
        };
        slotmodel.PlayerConfiguration.prototype.onError = function(error) {
            this.configuration.onError(error);
        };
        slotmodel.PlayerConfiguration.prototype.__class__ = slotmodel.PlayerConfiguration;
        slotmodel.SlotDefinitionParser = function() {};
        slotmodel.SlotDefinitionParser.__name__ = ["slotmodel", "SlotDefinitionParser"];
        slotmodel.SlotDefinitionParser.onError = null;
        slotmodel.SlotDefinitionParser.init = function(onErr) {
            slotmodel.SlotDefinitionParser.onError = onErr;
        };
        slotmodel.SlotDefinitionParser.parseHasGamePlugin = function(slotDefinitionJson) {
            return slotmodel.StdHelper.getBoolField(slotDefinitionJson, "hasGamePlugin", false);
        };
        slotmodel.SlotDefinitionParser.parseServerType = function(slotDefinitionJson) {
            return new slotmodel.EServerType(slotmodel.StdHelper.getField(slotDefinitionJson, "serverType"));
        };
        slotmodel.SlotDefinitionParser.parseUseDistortionReels = function(slotDefinitionJson) {
            return slotmodel.StdHelper.getBoolField(slotDefinitionJson, "useDistortionReels", false);
        };
        slotmodel.SlotDefinitionParser.parseUseServerAsPrimary = function(slotDefinitionJson) {
            return slotmodel.StdHelper.getBoolField(slotDefinitionJson, "useServerAsPrimary", true);
        };
        slotmodel.SlotDefinitionParser.parseReelPictureSize = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var reelPictureSize = slotmodel.StdHelper.getField(slotDefinitionJson, "reelPictureSize");
            if (reelPictureSize == null) return null;
            var reelCount = slotmodel.StdHelper.parseIntField(reelPictureSize, "reelCount", slotmodel.SlotDefinitionParser.onParseFatalError);
            var reelLength = slotmodel.StdHelper.parseIntField(reelPictureSize, "reelLength", slotmodel.SlotDefinitionParser.onParseFatalError);
            return new slotModelApi.ReelPictureSize(reelCount, reelLength);
        };
        slotmodel.SlotDefinitionParser.parseSymbols = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var symbolsArray = slotmodel.StdHelper.getArrayField(slotDefinitionJson, "symbols");
            if (symbolsArray == null) return null;
            var symbols = [];
            var symbolsItem;
            var _g = 0;
            while (_g < symbolsArray.length) {
                var symbolsItem1 = symbolsArray[_g];
                ++_g;
                var id = slotmodel.StdHelper.getField(symbolsItem1, "id");
                var description = slotmodel.StdHelper.getField(symbolsItem1, "description");
                var isWild = slotmodel.StdHelper.getBoolField(symbolsItem1, "isWild", false);
                var isBonus = slotmodel.StdHelper.getBoolField(symbolsItem1, "isBonus", false);
                var isScatter = slotmodel.StdHelper.getBoolField(symbolsItem1, "isScatter", false);
                var hasLandingAnimation = slotmodel.StdHelper.getBoolField(symbolsItem1, "hasLandingAnimation", false);
                var isBleed = slotmodel.StdHelper.getBoolField(symbolsItem1, "isBleed", false);
                var block = slotmodel.StdHelper.getStringArray(slotmodel.StdHelper.getField(symbolsItem1, "block"));
                var asset = slotmodel.StdHelper.getField(symbolsItem1, "asset");
                symbols.push(new slotModelApi.Symbol(id, description, isWild, isBonus, isScatter, hasLandingAnimation, isBleed, block, asset));
            }
            return symbols;
        };
        slotmodel.SlotDefinitionParser.parseLines = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var linesArray = slotmodel.StdHelper.getArrayField(slotDefinitionJson, "lines");
            if (linesArray == null) return null;
            var lines = new _hcmn_.haxe_ds_IntMap();
            var linesItem;
            var _g = 0;
            while (_g < linesArray.length) {
                var linesItem1 = linesArray[_g];
                ++_g;
                var id = slotmodel.StdHelper.getField(linesItem1, "id");
                var offsets = slotmodel.StdHelper.getIntArrayField(linesItem1, "offsets");
                var value = new slotModelApi.Line(id, offsets);
                lines.h[id] = value;
            }
            return lines;
        };
        slotmodel.SlotDefinitionParser.parseReels = function(slotDefinitionJson, useDistortionReels) {
            if (!useDistortionReels) slotmodel.Log.getLogger("SlotDefinitionParser").error("BIG FAT WARNING: Using reels configuration from slot definition!");
            if (slotDefinitionJson == null) return null;
            var reelsArray = slotmodel.StdHelper.getArrayField(slotDefinitionJson, "reels");
            if (reelsArray == null) return null;
            var reels = [];
            var reelsItem;
            var _g = 0;
            while (_g < reelsArray.length) {
                var reelsItem1 = reelsArray[_g];
                ++_g;
                var reel = slotmodel.SlotDefinitionParser.parseReel(reelsItem1);
                reels.push(reel);
            }
            return reels;
        };
        slotmodel.SlotDefinitionParser.parseOutcomes = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var outcomesArray = slotmodel.StdHelper.getArrayField(slotDefinitionJson, "outcomes");
            if (outcomesArray == null) return null;
            var outcomes = new _hcmn_.haxe_ds_StringMap();
            var outcomesItem;
            var _g = 0;
            while (_g < outcomesArray.length) {
                var outcomesItem1 = outcomesArray[_g];
                ++_g;
                if (outcomesItem1 == null) continue;
                var id = slotmodel.StdHelper.getField(outcomesItem1, "id");
                var price = slotmodel.StdHelper.getField(outcomesItem1, "price");
                if (_hcmn_.__map_reserved[id] != null) outcomes.setReserved(id, price);
                else outcomes.h[id] = price;
            }
            return outcomes;
        };
        slotmodel.SlotDefinitionParser.parseStartReelPicture = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var startReelPictureReels = slotmodel.StdHelper.getArrayField(slotDefinitionJson, "startReelPicture.reels");
            if (startReelPictureReels == null) return null;
            var reels = [];
            var startReelPictureReel;
            var _g = 0;
            while (_g < startReelPictureReels.length) {
                var startReelPictureReel1 = startReelPictureReels[_g];
                ++_g;
                var reel = slotmodel.StdHelper.getStringArray(startReelPictureReel1);
                reels.push(reel);
            }
            return new slotModelApi.ReelPicture(reels);
        };
        slotmodel.SlotDefinitionParser.parseStartReelPicturePerBet = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var startReelPicturePerBet = slotmodel.StdHelper.getField(slotDefinitionJson, "startReelPicturePerBet");
            if (startReelPicturePerBet == null) return null;
            return null;
        };
        slotmodel.SlotDefinitionParser.parseStartFSReelPicture = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var startReelPictureReels = slotmodel.StdHelper.getArrayField(slotDefinitionJson, "startFSReelPicture.reels");
            if (startReelPictureReels == null) return null;
            var reels = [];
            var startReelPictureReel;
            var _g = 0;
            while (_g < startReelPictureReels.length) {
                var startReelPictureReel1 = startReelPictureReels[_g];
                ++_g;
                var reel = slotmodel.StdHelper.getStringArray(startReelPictureReel1);
                reels.push(reel);
            }
            return new slotModelApi.ReelPicture(reels);
        };
        slotmodel.SlotDefinitionParser.parseReelPictureVisibility = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var reelPictureVisibilityReels = slotmodel.StdHelper.getArrayField(slotDefinitionJson, "reelPictureVisibility.reels");
            if (reelPictureVisibilityReels == null) return null;
            var reels = [];
            var reelPictureVisibilityReel;
            var _g = 0;
            while (_g < reelPictureVisibilityReels.length) {
                var reelPictureVisibilityReel1 = reelPictureVisibilityReels[_g];
                ++_g;
                var reel = slotmodel.StdHelper.getIntArray(reelPictureVisibilityReel1);
                reels.push(reel);
            }
            return new slotModelApi.ReelPictureInfo(reels);
        };
        slotmodel.SlotDefinitionParser.parseStartFSReelPicturePerBet = function(slotDefinitionJson) {
            if (slotDefinitionJson == null) return null;
            var startFSReelPicturePerBet = slotmodel.StdHelper.getField(slotDefinitionJson, "startFSReelPicturePerBet");
            if (startFSReelPicturePerBet == null) return null;
            return null;
        };
        slotmodel.SlotDefinitionParser.parseReel = function(reelJson) {
            if (reelJson == null) return null;
            var id = slotmodel.StdHelper.parseIntField(reelJson, "id", slotmodel.SlotDefinitionParser.onParseFatalError);
            var stripes = slotmodel.SlotDefinitionParser.parseStripes(reelJson);
            var reel = new slotModelApi.Reel(id, stripes);
            return reel;
        };
        slotmodel.SlotDefinitionParser.parseStripes = function(parentJson) {
            if (parentJson == null) return null;
            var stripesArray = slotmodel.StdHelper.getArrayField(parentJson, "stripes");
            if (stripesArray == null) return null;
            var stripes = [];
            var stripesItem;
            var _g = 0;
            while (_g < stripesArray.length) {
                var stripesItem1 = stripesArray[_g];
                ++_g;
                var stripe = slotmodel.SlotDefinitionParser.parseStripe(stripesItem1);
                stripes.push(stripe);
            }
            return stripes;
        };
        slotmodel.SlotDefinitionParser.parseStripe = function(stripeJson) {
            if (stripeJson == null) return null;
            var stripeLayer = slotmodel.StdHelper.parseIntField(stripeJson, "stripeLayer", slotmodel.SlotDefinitionParser.onParseFatalError);
            var symbols = slotmodel.SlotDefinitionParser.parseStripeSymbols(stripeJson);
            var stripe = new slotModelApi.Stripe(stripeLayer, symbols);
            return stripe;
        };
        slotmodel.SlotDefinitionParser.parseStripeSymbols = function(parentJson) {
            if (parentJson == null) return null;
            var symbolsArray = slotmodel.StdHelper.getArrayField(parentJson, "symbols");
            if (symbolsArray == null) return null;
            var symbols = [];
            var symbolsItem;
            var _g = 0;
            while (_g < symbolsArray.length) {
                var symbolsItem1 = symbolsArray[_g];
                ++_g;
                var symbol;
                symbol = _hcmn_.js_Boot.__cast(symbolsItem1, String);
                symbols.push(symbol);
            }
            return symbols;
        };
        slotmodel.SlotDefinitionParser.onParseFatalError = function(message) {
            slotmodel.Log.getLoggerBykey("SlotDefinitionParser").error("[ParseFatalError]" + message);
            slotmodel.SlotDefinitionParser.parseError = true;
            slotmodel.SlotDefinitionParser.onError(slotmodel.SlotDefinitionParser.getFatalError(message));
        };
        slotmodel.SlotDefinitionParser.getFatalError = function(message) {
            return new slotmodel.Error(slotmodel.EErrorSource.SLOT_DEFINITION, slotmodel.ErrorIdList.SlotDefinitionParserError, true, message);
        };
        slotmodel.SlotDefinitionParser.prototype.__class__ = slotmodel.SlotDefinitionParser;
        slotmodel.Link = function(id, url) {
            this.id = id;
            this.url = url;
        };
        slotmodel.Link.__name__ = ["slotmodel", "Link"];
        slotmodel.Link.prototype.id = null;
        slotmodel.Link.prototype.url = null;
        slotmodel.Link.prototype.__class__ = slotmodel.Link;
        slotmodel.EErrorSource = {
            __ename__: ["slotmodel", "EErrorSource"],
            __constructs__: ["STATE", "CONFIGURATION", "SLOT_DEFINITION", "PLUGIN", "PF_RESPONSE_PARSER", "PF_GLOBAL", "PF_INITIALIZE", "PF_PLAY", "PF_STATECHANGE", "MPT_HELPER"]
        };
        slotmodel.EErrorSource.PF_RESPONSE_PARSER = ["PF_RESPONSE_PARSER", 4];
        slotmodel.EErrorSource.PF_RESPONSE_PARSER.toString = $estr;
        slotmodel.EErrorSource.PF_RESPONSE_PARSER.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.CONFIGURATION = ["CONFIGURATION", 1];
        slotmodel.EErrorSource.CONFIGURATION.toString = $estr;
        slotmodel.EErrorSource.CONFIGURATION.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.PF_STATECHANGE = ["PF_STATECHANGE", 8];
        slotmodel.EErrorSource.PF_STATECHANGE.toString = $estr;
        slotmodel.EErrorSource.PF_STATECHANGE.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.MPT_HELPER = ["MPT_HELPER", 9];
        slotmodel.EErrorSource.MPT_HELPER.toString = $estr;
        slotmodel.EErrorSource.MPT_HELPER.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.PLUGIN = ["PLUGIN", 3];
        slotmodel.EErrorSource.PLUGIN.toString = $estr;
        slotmodel.EErrorSource.PLUGIN.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.SLOT_DEFINITION = ["SLOT_DEFINITION", 2];
        slotmodel.EErrorSource.SLOT_DEFINITION.toString = $estr;
        slotmodel.EErrorSource.SLOT_DEFINITION.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.STATE = ["STATE", 0];
        slotmodel.EErrorSource.STATE.toString = $estr;
        slotmodel.EErrorSource.STATE.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.PF_PLAY = ["PF_PLAY", 7];
        slotmodel.EErrorSource.PF_PLAY.toString = $estr;
        slotmodel.EErrorSource.PF_PLAY.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.PF_GLOBAL = ["PF_GLOBAL", 5];
        slotmodel.EErrorSource.PF_GLOBAL.toString = $estr;
        slotmodel.EErrorSource.PF_GLOBAL.__enum__ = slotmodel.EErrorSource;
        slotmodel.EErrorSource.PF_INITIALIZE = ["PF_INITIALIZE", 6];
        slotmodel.EErrorSource.PF_INITIALIZE.toString = $estr;
        slotmodel.EErrorSource.PF_INITIALIZE.__enum__ = slotmodel.EErrorSource;
        slotmodel.Error = function(source, id, isFatal, message) {
            this.source = source;
            this.id = id;
            this.isFatal = isFatal;
            this.message = message;
        };
        slotmodel.Error.__name__ = ["slotmodel", "Error"];
        slotmodel.Error.prototype.source = null;
        slotmodel.Error.prototype.id = null;
        slotmodel.Error.prototype.isFatal = null;
        slotmodel.Error.prototype.message = null;
        slotmodel.Error.prototype.getSource = function() {
            return this.source;
        };
        slotmodel.Error.prototype.getId = function() {
            return this.id;
        };
        slotmodel.Error.prototype.getIsFatal = function() {
            return this.isFatal;
        };
        slotmodel.Error.prototype.getMessage = function() {
            return this.message;
        };
        slotmodel.Error.prototype.toString = function() {
            return "[" + _hcmn_.Std.string(this.source) + "][" + this.id + "] " + this.message;
        };
        slotmodel.Error.prototype.__class__ = slotmodel.Error;
        slotmodel.ErrorIdList = function() {};
        slotmodel.ErrorIdList.__name__ = ["slotmodel", "ErrorIdList"];
        slotmodel.ErrorIdList.prototype.__class__ = slotmodel.ErrorIdList;
        slotmodel.EUICommand = {
            __ename__: ["slotmodel", "EUICommand"],
            __constructs__: ["SPIN", "CONTINUE", "STOP", "STAKE", "HELP", "PAYTABLE", "START_AUTOSPINS", "STOP_AUTOSPINS", "AUTOSPIN"]
        };
        slotmodel.EUICommand.PAYTABLE = ["PAYTABLE", 5];
        slotmodel.EUICommand.PAYTABLE.toString = $estr;
        slotmodel.EUICommand.PAYTABLE.__enum__ = slotmodel.EUICommand;
        slotmodel.EUICommand.STOP = ["STOP", 2];
        slotmodel.EUICommand.STOP.toString = $estr;
        slotmodel.EUICommand.STOP.__enum__ = slotmodel.EUICommand;
        slotmodel.EUICommand.SPIN = ["SPIN", 0];
        slotmodel.EUICommand.SPIN.toString = $estr;
        slotmodel.EUICommand.SPIN.__enum__ = slotmodel.EUICommand;
        slotmodel.EUICommand.STOP_AUTOSPINS = ["STOP_AUTOSPINS", 7];
        slotmodel.EUICommand.STOP_AUTOSPINS.toString = $estr;
        slotmodel.EUICommand.STOP_AUTOSPINS.__enum__ = slotmodel.EUICommand;
        slotmodel.EUICommand.CONTINUE = ["CONTINUE", 1];
        slotmodel.EUICommand.CONTINUE.toString = $estr;
        slotmodel.EUICommand.CONTINUE.__enum__ = slotmodel.EUICommand;
        slotmodel.EUICommand.STAKE = ["STAKE", 3];
        slotmodel.EUICommand.STAKE.toString = $estr;
        slotmodel.EUICommand.STAKE.__enum__ = slotmodel.EUICommand;
        slotmodel.EUICommand.AUTOSPIN = ["AUTOSPIN", 8];
        slotmodel.EUICommand.AUTOSPIN.toString = $estr;
        slotmodel.EUICommand.AUTOSPIN.__enum__ = slotmodel.EUICommand;
        slotmodel.EUICommand.HELP = ["HELP", 4];
        slotmodel.EUICommand.HELP.toString = $estr;
        slotmodel.EUICommand.HELP.__enum__ = slotmodel.EUICommand;
        slotmodel.EUICommand.START_AUTOSPINS = ["START_AUTOSPINS", 6];
        slotmodel.EUICommand.START_AUTOSPINS.toString = $estr;
        slotmodel.EUICommand.START_AUTOSPINS.__enum__ = slotmodel.EUICommand;
        slotmodel.GfBusController = function(model, slotModelPort) {
            this.model = model;
            this.slotModelPort = slotModelPort;
        };
        slotmodel.GfBusController.__name__ = ["slotmodel", "GfBusController"];
        slotmodel.GfBusController.prototype.subscriptions = null;
        slotmodel.GfBusController.prototype.model = null;
        slotmodel.GfBusController.prototype.channel = null;
        slotmodel.GfBusController.prototype.slotModelPort = null;
        slotmodel.GfBusController.prototype.start = function() {
            this.subscribe();
        };
        slotmodel.GfBusController.prototype.stop = function() {
            this.unSubscribe();
        };
        slotmodel.GfBusController.prototype.unSubscribe = function() {
            if (this.subscriptions != null) {
                var subscription;
                var _g = 0;
                var _g1 = this.subscriptions;
                while (_g < _g1.length) {
                    var subscription1 = _g1[_g];
                    ++_g;
                    subscription1.unsubscribe();
                }
            }
        };
        slotmodel.GfBusController.prototype.subscribe = function() {
            this.subscriptions = [];
            this.subscriptions.push(this.slotModelPort.getStages().getInitStage().getGameLoaded().subscribe(($_ = this.model, $bind($_, $_.onGameLoaded))));
            this.subscriptions.push(this.slotModelPort.getStages().getInitStage().getGameInitialized().subscribe(($_ = this.model, $bind($_, $_.onGameInitialized))));
            this.subscriptions.push(this.slotModelPort.getStages().getResumeStage().getResumePrepared().subscribe(($_ = this.model, $bind($_, $_.onGameResumePrepared))));
            this.subscriptions.push(this.slotModelPort.getGameCommands().getStakeCommandExecuted().subscribe($bind(this, this.handleStakeCommandExecuted)));
            this.subscriptions.push(this.slotModelPort.getGameCommands().getHelpCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onHelpRequested))));
            this.subscriptions.push(this.slotModelPort.getGameCommands().getPaytableCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onPaytableRequested))));
            this.subscriptions.push(this.slotModelPort.getGameCommands().getStartAutoSpinsCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onStartAutoSpinsRequested))));
            this.subscriptions.push(this.slotModelPort.getGameCommands().getStopAutoSpinsCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onGameStopAutoSpinsRequested))));
            this.subscriptions.push(this.slotModelPort.getGameCommands().getSpinCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onGameRequestedSpin))));
            this.subscriptions.push(this.slotModelPort.getGameCommands().getAutoSpinCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onAutoSpinRequested))));
            this.subscriptions.push(this.slotModelPort.getStages().getSpinStage().getReelSpinFinished().subscribe(($_ = this.model, $bind($_, $_.onGameSpinFinished))));
            this.subscriptions.push(this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcomePresented().subscribe(($_ = this.model, $bind($_, $_.onSpinOutcomePresented))));
            this.subscriptions.push(this.slotModelPort.getStages().getResultStage().getResultPresented().subscribe(($_ = this.model, $bind($_, $_.onGameResultPresented))));
            if (this.model.getConfiguration().isTestable()) this.subscriptions.push(this.slotModelPort.getGameCommands().getTestContinueCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onGameRequestedContinue))));
            else this.subscriptions.push(this.slotModelPort.getGameCommands().getContinueCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onGameRequestedContinue))));
            this.subscriptions.push(this.slotModelPort.getStages().getPickerBonusStage().getPickerBonusSelected().subscribe(($_ = this.model, $bind($_, $_.onPickerBonusSelected))));
            this.subscriptions.push(this.slotModelPort.getStages().getPickerBonusStage().getPickerBonusSelectedArray().subscribe(($_ = this.model, $bind($_, $_.onPickerBonusSelectedArray))));
            this.subscriptions.push(this.slotModelPort.getStages().getAbortStage().getSpinAborted().subscribe(($_ = this.model, $bind($_, $_.onGameSpinAborted))));
            this.subscriptions.push(this.slotModelPort.getGameCommands().getFullScreenCommandExecuted().subscribe(($_ = this.model, $bind($_, $_.onGameRequestedFullScreen))));
            this.subscriptions.push(this.slotModelPort.getGameContext().getGameOptionChangedFromGf().subscribe(($_ = this.model, $bind($_, $_.onGameOptionChangedFromGf))));
        };
        slotmodel.GfBusController.prototype.sendGameOptionChanged = function(optionState) {
            this.slotModelPort.getGameContext().getGameOptionChangedFromPf().publish(optionState);
        };
        slotmodel.GfBusController.prototype.sendBalance = function(accountBalances) {
            this.slotModelPort.getGameContext().getBalance().publish(new slotModelApi.Balance(accountBalances.balance, accountBalances.promoFreeSpinCount));
        };
        slotmodel.GfBusController.prototype.initializeGame = function() {
            var presentationInitializationPayload = slotmodel.PayloadHelper.getPresentationInitializationPayload(this.model.getState(), this.model.getConfiguration());
            this.slotModelPort.getStages().getInitStage().getInitializeGamePhase().getInitializeGame().publish(presentationInitializationPayload);
        };
        slotmodel.GfBusController.prototype.prepareResume = function() {
            var prepareResumePayload = slotmodel.PayloadHelper.getPrepareResumePayload(this.model.getState(), this.model.getConfiguration());
            this.slotModelPort.getStages().getResumeStage().getPrepareResume().publish(prepareResumePayload);
        };
        slotmodel.GfBusController.prototype.setGameIdle = function() {
            this.enableUICommand(slotmodel.EUICommand.SPIN);
            this.disableUICommand(slotmodel.EUICommand.STOP);
            this.enableUICommand(slotmodel.EUICommand.STAKE);
            this.enableUICommand(slotmodel.EUICommand.HELP);
            this.enableUICommand(slotmodel.EUICommand.PAYTABLE);
            if (this.model.getState().isAutoSpinEnabled()) this.enableUICommand(slotmodel.EUICommand.START_AUTOSPINS);
        };
        slotmodel.GfBusController.prototype.setGameNotIdle = function() {
            this.disableUICommand(slotmodel.EUICommand.HELP);
            this.disableUICommand(slotmodel.EUICommand.PAYTABLE);
            this.disableUICommand(slotmodel.EUICommand.STAKE);
            if (this.model.getState().isAutoSpinEnabled()) this.disableUICommand(slotmodel.EUICommand.START_AUTOSPINS);
            this.disableUICommand(slotmodel.EUICommand.SPIN);
        };
        slotmodel.GfBusController.prototype.handleStakeCommandExecuted = function(event) {
            this.model.onStakeChanged(event.getPayload());
        };
        slotmodel.GfBusController.prototype.confirmStakeChanged = function() {
            var currentBetStakePayload = slotmodel.PayloadHelper.getCurrentBetStakePayload(this.model.getState());
            this.slotModelPort.getStages().getIdleStage().getConfirmSelectedStake().publish(currentBetStakePayload);
        };
        slotmodel.GfBusController.prototype.sendOpenHelp = function() {
            var helpLink = this.model.getConfiguration().getGameConfiguration().getLink(slotmodel.GfBusController.LINK_ID_HELP);
            var helpUrl = null;
            if (helpLink != null) helpUrl = helpLink.url;
            this.slotModelPort.getStages().getIdleStage().getOpenHelp().publish(helpUrl);
        };
        slotmodel.GfBusController.prototype.sendOpenPaytable = function() {
            var paytableLink = this.model.getConfiguration().getGameConfiguration().getLink(slotmodel.GfBusController.LINK_ID_PAYTABLE);
            var paytableUrl = null;
            if (paytableLink != null) paytableUrl = paytableLink.url;
            this.slotModelPort.getStages().getIdleStage().getOpenPaytable().publish(paytableUrl);
        };
        slotmodel.GfBusController.prototype.setAutoSpinIdle = function() {
            this.enableUICommand(slotmodel.EUICommand.AUTOSPIN);
        };
        slotmodel.GfBusController.prototype.setAutoSpinNotIdle = function() {
            this.disableUICommand(slotmodel.EUICommand.AUTOSPIN);
        };
        slotmodel.GfBusController.prototype.sendAutoSpinStarted = function() {
            this.enableUICommand(slotmodel.EUICommand.STOP_AUTOSPINS);
            var payload = slotmodel.PayloadHelper.getAutoSpinStartedPayload(this.model.getState());
            this.slotModelPort.getStages().getIdleStage().getAutoSpinStarted().publish(payload);
        };
        slotmodel.GfBusController.prototype.sendAutoSpinsStopped = function(reason) {
            this.disableUICommand(slotmodel.EUICommand.STOP_AUTOSPINS);
            this.slotModelPort.getStages().getIdleStage().getAutoSpinsStopped().publish(reason);
        };
        slotmodel.GfBusController.prototype.requestAutoSpin = function() {
            this.model.onAutoSpinRequested(null);
        };
        slotmodel.GfBusController.prototype.startReelSpin = function() {
            var stripeLayers = slotmodel.PayloadHelper.getNextSpinStripeLayersPayload(this.model.getState());
            this.slotModelPort.getStages().getSpinStage().getStartReelSpin().publish(stripeLayers);
        };
        slotmodel.GfBusController.prototype.sendSpinOutcome = function() {
            var spinOutcome = slotmodel.PayloadHelper.getSpinOutcomePayload(this.model.getState(), this.model.getConfiguration());
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcome().publish(spinOutcome);
        };
        slotmodel.GfBusController.prototype.stopReelSpin = function() {
            this.enableUICommand(slotmodel.EUICommand.STOP);
            this.slotModelPort.getStages().getSpinStage().getStopReelSpin().publish(null);
        };
        slotmodel.GfBusController.prototype.presentSpinOutcome = function() {
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getPresentSpinOutcome().publish(null);
        };
        slotmodel.GfBusController.prototype.presentResult = function() {
            var resultPayload = slotmodel.PayloadHelper.getResultPayload(this.model.getState());
            this.slotModelPort.getStages().getResultStage().getPresentResult().publish(resultPayload);
        };
        slotmodel.GfBusController.prototype.setGameFSIdle = function() {
            this.enableUICommand(slotmodel.EUICommand.CONTINUE);
            this.disableUICommand(slotmodel.EUICommand.STOP);
        };
        slotmodel.GfBusController.prototype.setGameNotFSIdle = function() {
            this.disableUICommand(slotmodel.EUICommand.CONTINUE);
        };
        slotmodel.GfBusController.prototype.publishPBChoices = function() {
            var choices = this.model.getState().getPickerBonusChoices();
            this.slotModelPort.getStages().getPickerBonusStage().getSelectPickerBonus().publish(choices);
        };
        slotmodel.GfBusController.prototype.abortSpin = function() {
            var abortSpinPayload = slotmodel.PayloadHelper.getAbortSpinPayload(this.model.getState());
            this.slotModelPort.getStages().getAbortStage().getAbortSpin().publish(abortSpinPayload);
        };
        slotmodel.GfBusController.prototype.sendError = function(error) {
            var payload = new slotModelApi.Error(error.getId(), error.getIsFatal(), error.getMessage());
            this.slotModelPort.getError().getError().publish(payload);
        };
        slotmodel.GfBusController.prototype.setPBIdle = function() {
            this.slotModelPort.getStages().getPickerBonusStage().getSetPickerIdle().publish(null);
        };
        slotmodel.GfBusController.prototype.enableUICommand = function(command) {
            this.updateUICommandState(command, true);
        };
        slotmodel.GfBusController.prototype.disableUICommand = function(command) {
            this.updateUICommandState(command, false);
        };
        slotmodel.GfBusController.prototype.updateUICommandState = function(command, enable) {
            switch (command[1]) {
                case 0:
                    this.slotModelPort.getGameCommands().getSpinCommandAvailable().publish(enable);
                    break;
                case 1:
                    this.slotModelPort.getGameCommands().getContinueCommandAvailable().publish(enable);
                    break;
                case 2:
                    this.slotModelPort.getGameCommands().getStopCommandAvailable().publish(enable);
                    break;
                case 3:
                    this.slotModelPort.getGameCommands().getStakeCommandAvailable().publish(enable);
                    break;
                case 4:
                    this.slotModelPort.getGameCommands().getHelpCommandAvailable().publish(enable);
                    break;
                case 5:
                    this.slotModelPort.getGameCommands().getPaytableCommandAvailable().publish(enable);
                    break;
                case 6:
                    this.slotModelPort.getGameCommands().getStartAutoSpinsCommandAvailable().publish(enable);
                    break;
                case 7:
                    this.slotModelPort.getGameCommands().getStopAutoSpinsCommandAvailable().publish(enable);
                    break;
                case 8:
                    this.slotModelPort.getGameCommands().getAutoSpinCommandAvailable().publish(enable);
                    break;
            }
        };
        slotmodel.GfBusController.prototype.testRequestable2 = function(event) {
            event.reply("I am ok in testRequestable2");
        };
        slotmodel.GfBusController.prototype.testRequestable1 = function() {};
        slotmodel.GfBusController.prototype.__class__ = slotmodel.GfBusController;
        slotmodel.PayloadHelper = function() {};
        slotmodel.PayloadHelper.__name__ = ["slotmodel", "PayloadHelper"];
        slotmodel.PayloadHelper.getPresentationInitializationPayload = function(state, configuration) {
            var payload = new slotModelApi.PresentationInitialization(slotmodel.PayloadHelper.getDefaultBetStakePayload(state), configuration.getPlayerConfiguration().getRiskControlSettings(), configuration.getGameConfiguration().getSlotDefinition(), configuration.getGameConfiguration().getConsoleSettings());
            return payload;
        };
        slotmodel.PayloadHelper.getSpinOutcomePayload = function(state, configuration) {
            var currentBet = state.getCurrentBet();
            var payload = currentBet.getSpinOutcome();
            return payload;
        };
        slotmodel.PayloadHelper.getResultPayload = function(state) {
            var currentBet = state.getCurrentBet();
            var payload = new slotModelApi.Result(currentBet.getTotalWin(), currentBet.getTotalBigWin());
            return payload;
        };
        slotmodel.PayloadHelper.getDefaultBoolReelPicture = function(reelPictureSize, defaultValue) {
            var boolReelPicture = [];
            var reelIndex;
            var symbolIndex;
            var _g1 = 0;
            var _g = reelPictureSize.reelCount;
            while (_g1 < _g) {
                var reelIndex1 = _g1++;
                var boolReel = [];
                var _g3 = 0;
                var _g2 = reelPictureSize.reelLength;
                while (_g3 < _g2) {
                    var symbolIndex1 = _g3++;
                    boolReel.push(defaultValue);
                }
                boolReelPicture.push(boolReel);
            }
            return boolReelPicture;
        };
        slotmodel.PayloadHelper.getDefaultBetStakePayload = function(state) {
            var betPerLineCredit = state.getNextBetPerLineCredit();
            var selectedLinesCount = state.getNextSelectedLinesCount();
            var sideBet = state.getNextSideBet();
            var denomination = state.getNextDenomination();
            var betPerLine = denomination.mulInt(betPerLineCredit);
            var totalStake = betPerLine.mulInt(selectedLinesCount + sideBet);
            var stakeItems = new slotModelApi.StakeItems(selectedLinesCount, betPerLine.value, sideBet);
            var totalBetsForSelectedLines = state.getTotalBetsForVariableBetPerLine(selectedLinesCount, sideBet);
            var totalBetsForSelectedBetPerLine = state.getTotalBetsForVariableLines(betPerLineCredit, sideBet);
            var nextStage = state.getNextStage();
            var resumeOutcome = state.getResumePerStakeOutcome(nextStage, selectedLinesCount, betPerLineCredit, sideBet);
            var payload = new slotModelApi.StakeItemsWithTotalBet(stakeItems, totalStake.value, totalBetsForSelectedLines, totalBetsForSelectedBetPerLine, resumeOutcome);
            return payload;
        };
        slotmodel.PayloadHelper.getCurrentBetStakePayload = function(state) {
            var currentBet = state.getCurrentBet();
            var stakeItems = new slotModelApi.StakeItems(currentBet.getSelectedLinesCount(), currentBet.getBetPerLine().value, currentBet.getSideBet());
            var totalBet = currentBet.getTotalStake().value;
            var totalBetsForSelectedLines = state.getTotalBetsForVariableBetPerLine(currentBet.getSelectedLinesCount(), currentBet.getSideBet());
            var totalBetsForSelectedBetPerLine = state.getTotalBetsForVariableLines(currentBet.getBetPerLineCredit(), currentBet.getSideBet());
            var nextStage = state.getNextStage();
            var resumeOutcome = state.getResumePerStakeOutcome(nextStage, currentBet.getSelectedLinesCount(), currentBet.getBetPerLineCredit(), currentBet.getSideBet());
            var payload = new slotModelApi.StakeItemsWithTotalBet(stakeItems, totalBet, totalBetsForSelectedLines, totalBetsForSelectedBetPerLine, resumeOutcome);
            return payload;
        };
        slotmodel.PayloadHelper.getNextSpinStripeLayersPayload = function(state) {
            var currentBet = state.getCurrentBet();
            var nextStage = state.getNextStage();
            var nextSpinStrypeLayers = state.getNextSpinStripeLayers(nextStage, currentBet.getSelectedLinesCount(), currentBet.getBetPerLineCredit());
            return nextSpinStrypeLayers;
        };
        slotmodel.PayloadHelper.getPrepareResumePayload = function(state, configuration) {
            var currentBet = state.getCurrentBet();
            var initializationProperties = slotmodel.PayloadHelper.getPresentationInitializationPayload(state, configuration);
            var stake = slotmodel.PayloadHelper.getCurrentBetStakePayload(state);
            var spinOutcome = currentBet.getSpinOutcome();
            var payload = new slotModelApi.PrepareResume(initializationProperties, stake, spinOutcome);
            return payload;
        };
        slotmodel.PayloadHelper.getAutoSpinStartedPayload = function(state) {
            var autoSpinInfo = state.getAutoSpinInfo();
            if (autoSpinInfo == null) return null;
            return autoSpinInfo.getAutoSpinInfo();
        };
        slotmodel.PayloadHelper.getAbortSpinPayload = function(state) {
            var currentBet = state.getCurrentBet();
            var betStake = slotmodel.PayloadHelper.getCurrentBetStakePayload(state);
            var nextStage = state.getNextStage();
            var resumeOutcome = state.getAbortSpinResumeOutcome(nextStage);
            var stake = new slotModelApi.StakeItemsWithTotalBet(betStake.stakeItems, betStake.totalBet, betStake.totalBetsForSelectedLines, betStake.totalBetsForSelectedBetPerLine, resumeOutcome);
            var payload = new slotModelApi.AbortSpin(nextStage.value, stake);
            return payload;
        };
        slotmodel.PayloadHelper.prototype.__class__ = slotmodel.PayloadHelper;
        slotmodel.ELineType = function() {};
        slotmodel.ELineType.__name__ = ["slotmodel", "ELineType"];
        slotmodel.ELineType.ofSymbol = function(symbol) {
            switch (symbol) {
                case 2:
                    return slotmodel.ELineType.LINE_LEFT;
                case 3:
                    return slotmodel.ELineType.LINE_RIGHT;
                case 4:
                    return slotmodel.ELineType.LINE_ANY;
                default:
                    return slotmodel.ELineType.LINE_LEFT;
            }
        };
        slotmodel.ELineType.ofName = function(name) {
            switch (name) {
                case "Lines":
                    return slotmodel.ELineType.LINE_LEFT;
                case "LinesRight":
                    return slotmodel.ELineType.LINE_RIGHT;
                case "LinesAny":
                    return slotmodel.ELineType.LINE_ANY;
                default:
                    return slotmodel.ELineType.LINE_LEFT;
            }
        };
        slotmodel.ELineType.prototype.__class__ = slotmodel.ELineType;
        slotmodel.PfResponseParser = function(onError, pluginController, model) {
            this.model = null;
            this.pluginError = false;
            this.parseError = false;
            this.onError = onError;
            this.pluginController = pluginController;
            this.model = model;
        };
        slotmodel.PfResponseParser.__name__ = ["slotmodel", "PfResponseParser"];
        slotmodel.PfResponseParser.prototype.getKeyValueMapping_String_String = function(keyValuesPairInfo) {
            var pairs = slotmodel.StdHelper.getArrayField(keyValuesPairInfo, "Mapping");
            if (pairs == null) return null;
            else {
                var out = new _hcmn_.haxe_ds_StringMap();
                var _g = 0;
                while (_g < pairs.length) {
                    var pair = pairs[_g];
                    ++_g;
                    var key = slotmodel.StdHelper.getField(pair, "@key");
                    var value = slotmodel.StdHelper.getField(pair, "@value");
                    if (_hcmn_.__map_reserved[key] != null) out.setReserved(key, value);
                    else out.h[key] = value;
                }
                return out;
            }
        };
        slotmodel.PfResponseParser.prototype.getKeyValueMapping_String_Int = function(keyValuesPairInfo) {
            var pairs = slotmodel.StdHelper.getArrayField(keyValuesPairInfo, "Mapping");
            if (pairs == null) return null;
            else {
                var out = new _hcmn_.haxe_ds_StringMap();
                var _g = 0;
                while (_g < pairs.length) {
                    var pair = pairs[_g];
                    ++_g;
                    var key = slotmodel.StdHelper.getField(pair, "@key");
                    var value = slotmodel.StdHelper.getField(pair, "@value");
                    if (_hcmn_.__map_reserved[key] != null) out.setReserved(key, value);
                    else out.h[key] = value;
                }
                return out;
            }
        };
        slotmodel.PfResponseParser.prototype.onError = null;
        slotmodel.PfResponseParser.prototype.pluginController = null;
        slotmodel.PfResponseParser.prototype.parseError = null;
        slotmodel.PfResponseParser.prototype.pluginError = null;
        slotmodel.PfResponseParser.prototype.model = null;
        slotmodel.PfResponseParser.prototype.defaultDenomination = null;
        slotmodel.PfResponseParser.prototype.getCurrencyFormat = function(systemInitResponse, currencyResponse) {
            var currencyCode = this.parseCurrencyCode(systemInitResponse);
            var currencyFormat = this.parseCurrencyFormat(currencyCode, currencyResponse);
            return currencyFormat;
        };
        slotmodel.PfResponseParser.prototype.parseBetsPerLine = function(paytableResponse) {
            var steps = slotmodel.StdHelper.getArrayField(paytableResponse, "PatternSliderInfo.BetInfo.Step");
            if (steps == null) return null;
            var denomination = this.parseDenomination(paytableResponse);
            if (denomination == null) return null;
            var betsPerLine = new _hcmn_.haxe_ds_StringMap();
            var _g = 0;
            while (_g < steps.length) {
                var step = steps[_g];
                ++_g;
                var stepCredit = slotmodel.StdHelper.parseInt(step, $bind(this, this.onParseFatalError));
                if (this.parseError) return null;
                var betPerLine = denomination.mulInt(stepCredit);
                betsPerLine.set(betPerLine.value, stepCredit);
            }
            return betsPerLine;
        };
        slotmodel.PfResponseParser.prototype.parseGameLogicVersion = function(paytableResponse) {
            var gameLogicVersion = slotmodel.StdHelper.getField(paytableResponse, "VersionInfo.GameLogicVersion");
            return gameLogicVersion;
        };
        slotmodel.PfResponseParser.prototype.parseNextStageFromStageChange = function(stageChange) {
            if (stageChange == null || stageChange.response == null) return null;
            return this.parseNextStage(stageChange.response);
        };
        slotmodel.PfResponseParser.prototype.parsePfAbortProperties = function(gameLogicResponse, slotDefinition) {
            if (gameLogicResponse == null) return null;
            var messages = this.parseMessages(gameLogicResponse);
            var stage = this.parseStage(gameLogicResponse);
            var nextStage = this.parseNextStage(gameLogicResponse);
            var betPerLineCredit = this.parseBetPerLineCredit(gameLogicResponse);
            var selectedLineCount = this.parseSelectedLineCount(gameLogicResponse);
            var selectedSideBet = this.parseSelectedSideBet(gameLogicResponse);
            var baseGameOutcome = this.parseOutcome(gameLogicResponse, slotmodel.EStage.BASE_GAME, slotDefinition);
            var freeSpinOutcome = this.parseOutcome(gameLogicResponse, slotmodel.EStage.FREE_SPIN, slotDefinition);
            var pickerBonusOutcome = this.parsePickerOutcome(gameLogicResponse, slotDefinition);
            if (this.wasError()) return null;
            var pfAbortProperties = new slotmodel.PfAbortSpinProperties(messages, stage, nextStage, betPerLineCredit, selectedLineCount, selectedSideBet, baseGameOutcome, freeSpinOutcome, pickerBonusOutcome);
            return pfAbortProperties;
        };
        slotmodel.PfResponseParser.prototype.parsePfInitializedResponse = function(systemInitResponse, gameLogicResponse, paytableResponse, currencyResponse, slotDefinition) {
            var denomination = this.parseDenomination(paytableResponse);
            this.defaultDenomination = denomination;
            var softwareId = this.parseSoftwareId(paytableResponse);
            var awardCap = this.parseAwardCap(paytableResponse);
            var rtp = this.parseRtp(paytableResponse);
            if (rtp == null) return null;
            var sideBets = this.parseSideBets(paytableResponse);
            if (sideBets == null) return null;
            var reelSetMap = this.parseReelSetMap(paytableResponse);
            this.model.getConfiguration().getGameConfiguration().setStripeLayersMap(reelSetMap);
            var stateBasedSpinStripeLayers = null;
            if (this.pluginController.isImplemented(slotmodelGamePluginApi.EPluginFeature.STRIPE_LAYER_PER_BET)) stateBasedSpinStripeLayers = this.pluginController.getNextSpinStripeLayersPerBet(paytableResponse, $bind(this, this.onPluginError));
            var defaultBaseGameStripeLayer = this.getDefaultStripeLayer(paytableResponse, slotmodel.EStage.BASE_GAME, ".Section");
            this.model.getConfiguration().getGameConfiguration().setDefaultBaseGameStripeLayer(defaultBaseGameStripeLayer);
            var defaultFreeSpinStripeLayer = this.getDefaultStripeLayer(paytableResponse, slotmodel.EStage.FREE_SPIN, ".Section");
            this.model.getConfiguration().getGameConfiguration().setDefaultFreeSpinStripeLayer(defaultFreeSpinStripeLayer);
            var baseGameIndex = this.parseKeyValuePairInfo(paytableResponse, slotmodel.EStage.BASE_GAME, ".Index");
            this.model.getConfiguration().getGameConfiguration().setBaseGameIndex(baseGameIndex);
            var freeSpinIndex = this.parseKeyValuePairInfo(paytableResponse, slotmodel.EStage.FREE_SPIN, ".Index");
            this.model.getConfiguration().getGameConfiguration().setFreeSpinIndex(freeSpinIndex);
            var selectableLines = this.parseSelectableLines(paytableResponse);
            if (selectableLines == null) return null;
            var startReelPicture = this.parseStartReelPicture(gameLogicResponse, slotmodel.EStage.BASE_GAME);
            var startReelPicturePerBet = this.parseStartReelPicturePerBet(gameLogicResponse, slotmodel.EStage.BASE_GAME);
            var startFSReelPicture = this.parseStartReelPicture(gameLogicResponse, slotmodel.EStage.FREE_SPIN);
            var startFSReelPicturePerBet = this.parseStartReelPicturePerBet(gameLogicResponse, slotmodel.EStage.FREE_SPIN);
            if (this.model.getConfiguration().getGameConfiguration().getReels() == null) {
                var reels = this.parseReels(paytableResponse);
                this.model.getConfiguration().getGameConfiguration().setReels(reels);
            }
            var paytableOutcomes = this.parsePaytableOutcomes(paytableResponse);
            if (paytableOutcomes != null) this.model.getConfiguration().getGameConfiguration().setOutcomes(paytableOutcomes);
            var lines = this.parseLines(paytableResponse);
            this.model.getConfiguration().getGameConfiguration().setLines(lines);
            slotDefinition = this.model.getConfiguration().getGameConfiguration().getSlotDefinition();
            var autoSpinDefinition = this.parseAutoSpinDefinition(paytableResponse);
            var betsPerLine = this.parseBetsPerLine(paytableResponse);
            var betsPerLineKeys = null;
            if (betsPerLine != null) {
                betsPerLineKeys = [];
                var key;
                var $it0 = betsPerLine.keys();
                while ($it0.hasNext()) {
                    var key1 = $it0.next();
                    betsPerLineKeys.push(key1);
                }
                betsPerLineKeys.sort(slotmodel.PfResponseParser.sortMonneyStrings);
            }
            var defaultBetPerLine = new money.Money("0");
            var defaultBetPerLineCredit = this.parseBetPerLineCredit(gameLogicResponse);
            if (defaultBetPerLineCredit != null) defaultBetPerLine = denomination.mulInt(defaultBetPerLineCredit);
            var currencyCode = this.parseCurrencyCode(systemInitResponse);
            var currencyFormat = this.parseCurrencyFormat(currencyCode, currencyResponse);
            var defaultSelectedLineCount = this.parseSelectedLineCount(gameLogicResponse);
            var rgPresentation = false;
            if (this.parseRGPresentation(systemInitResponse) != null) rgPresentation = this.parseRGPresentation(systemInitResponse);
            var riskControlSettings = new slotModelApi.RiskControlSettings(currencyFormat, betsPerLineKeys, defaultBetPerLine.value, defaultSelectedLineCount, denomination.value, awardCap.value, softwareId, rgPresentation);
            var resumeSpinOutcome = this.parseSpinOutcome(gameLogicResponse, slotDefinition);
            resumeSpinOutcome.setStageBasedSpinStripeLayers(stateBasedSpinStripeLayers);
            if (this.wasError()) return null;
            var pfInitializedProperties = new slotmodel.PfInitializedProperties(rtp, selectableLines, sideBets, startReelPicture, startReelPicturePerBet, startFSReelPicture, startFSReelPicturePerBet, autoSpinDefinition, betsPerLine, defaultBetPerLineCredit, riskControlSettings, resumeSpinOutcome);
            return pfInitializedProperties;
        };
        slotmodel.PfResponseParser.prototype.parsePaytableOutcomes = function(paytableResponse) {
            var prizeInfo = slotmodel.StdHelper.getArrayField(paytableResponse, "PrizeInfo");
            if (prizeInfo == null) return null;
            var out = new _hcmn_.haxe_ds_StringMap();
            var _g = 0;
            while (_g < prizeInfo.length) {
                var info = prizeInfo[_g];
                ++_g;
                if (slotmodel.StdHelper.getField(info, "@name") == "PrizeInfoLines") {
                    var prizes = slotmodel.StdHelper.getArrayField(info, "Prize");
                    if (prizes == null) return null;
                    var _g1 = 0;
                    while (_g1 < prizes.length) {
                        var prize = prizes[_g1];
                        ++_g1;
                        var symbol = slotmodel.StdHelper.getField(prize, "@name");
                        var pays = slotmodel.StdHelper.getField(prize, "PrizePay");
                        var _g2 = 0;
                        while (_g2 < pays.length) {
                            var prizePay = pays[_g2];
                            ++_g2;
                            var count = slotmodel.StdHelper.getField(prizePay, "@count");
                            var id = symbol + "x" + count;
                            var value = slotmodel.StdHelper.getField(prizePay, "@value");
                            if (_hcmn_.__map_reserved[id] != null) out.setReserved(id, value);
                            else out.h[id] = value;
                        }
                    }
                }
            }
            return out;
        };
        slotmodel.PfResponseParser.prototype.getDefaultStripeLayer = function(paytableResponse, stage, section) {
            var keyValuePairInfo = this.getKeyValuePairInfo(paytableResponse, _hcmn_.Std.string(stage) + section);
            if (keyValuePairInfo == null) {
                this.logWarning("keyValuePairInfo for default stripes layers is null!");
                return null;
            }
            var mapping = this.getKeyValueMapping_String_String(keyValuePairInfo);
            var value;
            value = _hcmn_.__map_reserved["default"] != null ? mapping.getReserved("default") : mapping.h["default"];
            if (value == null) return null;
            if (((value | 0) === value)) return _hcmn_.Std.parseInt(value);
            else {
                var stripeLayerMap = this.model.getConfiguration().getGameConfiguration().getSlotDefinition().stripeLayersMap;
                var key = value;
                return _hcmn_.__map_reserved[key] != null ? stripeLayerMap.getReserved(key) : stripeLayerMap.h[key];
            }
        };
        slotmodel.PfResponseParser.prototype.parseSoftwareId = function(paytableResponse) {
            return slotmodel.StdHelper.getField(paytableResponse, "DenominationList.Denomination.@softwareId");
        };
        slotmodel.PfResponseParser.prototype.parsePfSpinOutcome = function(gameLogicResponse, slotDefinition) {
            if (gameLogicResponse == null) return null;
            var spinOutcome = this.parseSpinOutcome(gameLogicResponse, slotDefinition);
            if (this.wasError()) return null;
            return spinOutcome;
        };
        slotmodel.PfResponseParser.prototype.parseCurrencyCode = function(systemInitResponse) {
            return slotmodel.StdHelper.getField(systemInitResponse, "gameConfig.currencycode");
        };
        slotmodel.PfResponseParser.prototype.parseRGPresentation = function(systemInitResponse) {
            return slotmodel.StdHelper.getField(systemInitResponse, "gameConfig.rgPresentation");
        };
        slotmodel.PfResponseParser.prototype.parseCurrencyFormat = function(currencyCode, currencyResponse) {
            if (currencyCode == null || currencyCode == "") return null;
            var currencyObject = null;
            var _g = 0;
            while (_g < currencyResponse.length) {
                var item = currencyResponse[_g];
                ++_g;
                var currency = slotmodel.StdHelper.getField(item, "CURRENCY");
                var currencyCodeFromObject = slotmodel.StdHelper.getField(currency, "@currencyCode");
                if (currencyCodeFromObject == currencyCode) currencyObject = currency;
            }
            if (currencyObject == null) {
                this.onParseFatalError("Cannot parse currency format! Curency code =" + currencyCode);
                return null;
            }
            var majorSymbol = slotmodel.StdHelper.getField(currencyObject, "MAJOR_SYMBOL");
            var minorSymbol = slotmodel.StdHelper.getField(currencyObject, "MINOR_SYMBOL");
            var majorSymbolIsLeftAligned = false;
            var majorSymbolAligment = slotmodel.StdHelper.getField(currencyObject, "MAJOR_SYMBOL_ALIGNMENT");
            if (majorSymbolAligment != null) {
                if (majorSymbolAligment == "left") majorSymbolIsLeftAligned = true;
            }
            var minorSymbolIsLeftAligned = false;
            var minorSymbolAligment = slotmodel.StdHelper.getField(currencyObject, "MINOR_SYMBOL_ALIGNMENT");
            if (minorSymbolAligment != null) {
                if (minorSymbolAligment == "left") minorSymbolIsLeftAligned = true;
            }
            var majorSymbolHasPaddingSpace = false;
            var majorSymbolPaddingSpace = slotmodel.StdHelper.getField(currencyObject, "MAJOR_SYMBOL_PADDING_SPACE");
            if (majorSymbolPaddingSpace != null) {
                if (majorSymbolPaddingSpace == "true") majorSymbolHasPaddingSpace = true;
            }
            var minorSymbolHasPaddingSpace = false;
            var minorSymbolPaddingSpace = slotmodel.StdHelper.getField(currencyObject, "MINOR_SYMBOL_PADDING_SPACE");
            if (minorSymbolPaddingSpace != null) {
                if (minorSymbolPaddingSpace == "true") minorSymbolHasPaddingSpace = true;
            }
            var decimalSeparator = slotmodel.StdHelper.getField(currencyObject, "DECIMAL_SEPARATOR");
            var thousandsSeparator = slotmodel.StdHelper.getField(currencyObject, "THOUSANDS_SEPARATOR");
            var decimalPrecision = 0;
            var decimalPrecisionStr = slotmodel.StdHelper.getField(currencyObject, "DECIMAL_PRECISION");
            if (decimalPrecisionStr != null) decimalPrecision = _hcmn_.Std.parseInt(decimalPrecisionStr);
            var useThousandsSeparator = false;
            var useThousandsSeparatorStr = slotmodel.StdHelper.getField(currencyObject, "USE_THOUSANDS_SEPARATOR");
            if (useThousandsSeparatorStr != null) {
                if (useThousandsSeparatorStr == "yes") useThousandsSeparator = true;
            }
            var minorCurrencyLock = false;
            var minorCurrencyLockStr = slotmodel.StdHelper.getField(currencyObject, "MINOR_CURRENCY_LOCK");
            if (minorCurrencyLockStr != null) {
                if (minorCurrencyLockStr == "yes") minorCurrencyLock = true;
            }
            var chipSetCode = slotmodel.StdHelper.getField(currencyObject, "CHIP_SET_CODE");
            var currencyFormat = new moneyApi.CurrencyFormat(currencyCode, majorSymbol, minorSymbol, majorSymbolIsLeftAligned, minorSymbolIsLeftAligned, majorSymbolHasPaddingSpace, minorSymbolHasPaddingSpace, decimalSeparator, thousandsSeparator, decimalPrecision, useThousandsSeparator, minorCurrencyLock, chipSetCode);
            return currencyFormat;
        };
        slotmodel.PfResponseParser.prototype.parseDenomination = function(paytableResponse) {
            var denominationObject = slotmodel.StdHelper.getField(paytableResponse, "DenominationList.Denomination.#text");
            if (denominationObject == null) return null;
            return new money.Money(_hcmn_.Std.string(denominationObject));
        };
        slotmodel.PfResponseParser.prototype.parseAwardCap = function(paytableResponse) {
            var awardCapObject = slotmodel.StdHelper.getField(paytableResponse, "AwardCapInfo.CurrencyCap.AwardCap");
            if (awardCapObject == null) return null;
            return new money.Money(_hcmn_.Std.string(awardCapObject));
        };
        slotmodel.PfResponseParser.prototype.parseStage = function(gameLogicResponse) {
            var stageObject = slotmodel.StdHelper.getField(gameLogicResponse, "OutcomeDetail.Stage");
            if (stageObject == null) return null;
            return new slotmodel.EStage(_hcmn_.Std.string(stageObject));
        };
        slotmodel.PfResponseParser.prototype.parseNextStage = function(gameLogicResponse) {
            var nextStageObject = slotmodel.StdHelper.getField(gameLogicResponse, "OutcomeDetail.NextStage");
            if (nextStageObject == null) return null;
            return new slotmodel.EStage(_hcmn_.Std.string(nextStageObject));
        };
        slotmodel.PfResponseParser.prototype.parseMessages = function(gameLogicResponse) {
            var messagesDynamic = slotmodel.StdHelper.getField(gameLogicResponse, "Messages");
            if (messagesDynamic == null) return null;
            var messageArrayObject = null;
            if (Object.prototype.hasOwnProperty.call(messagesDynamic, "Message")) messageArrayObject = slotmodel.StdHelper.getArrayField(messagesDynamic, "Message");
            else messageArrayObject = slotmodel.StdHelper.getArray(messagesDynamic);
            if (messageArrayObject == null) return null;
            var messages = [];
            var messageObject;
            var _g = 0;
            while (_g < messageArrayObject.length) {
                var messageObject1 = messageArrayObject[_g];
                ++_g;
                var type = slotmodel.StdHelper.getField(messageObject1, "@type");
                var id = slotmodel.StdHelper.getField(messageObject1, "Id");
                var message = slotmodel.StdHelper.getField(messageObject1, "Message");
                messages.push(new slotmodel.PfMessage(type, id, message));
            }
            return messages;
        };
        slotmodel.PfResponseParser.prototype.parseBetPerLineCredit = function(gameLogicResponse) {
            return slotmodel.StdHelper.parseIntField(gameLogicResponse, "PatternSliderInput.BetPerPattern", $bind(this, this.onParseFatalError));
        };
        slotmodel.PfResponseParser.prototype.parseRtp = function(paytableResponse) {
            var paytableStatistics = slotmodel.StdHelper.getField(paytableResponse, "PaytableStatistics");
            if (paytableStatistics == null) return null;
            var minRTP = slotmodel.StdHelper.getField(paytableStatistics, "@minRTP");
            var maxRTP = slotmodel.StdHelper.getField(paytableStatistics, "@maxRTP");
            var singleRTP = slotmodel.StdHelper.getBoolField(paytableStatistics, "@singleRTP", false);
            var maxSingleRTP = slotmodel.StdHelper.getField(paytableStatistics, "@maxSingleRTP");
            var minSingleRTP = slotmodel.StdHelper.getField(paytableStatistics, "@minSingleRTP");
            return new slotModelApi.Rtp(minRTP, maxRTP, singleRTP, minSingleRTP, maxSingleRTP);
        };
        slotmodel.PfResponseParser.prototype.parseStartReelPicturePerBet = function(gameLogicResponse, stage) {
            return null;
        };
        slotmodel.PfResponseParser.prototype.parseKeyValuePairInfo = function(paytableResponse, stage, name) {
            var populationField = stage.value + name;
            var keyValuesPairInfo = slotmodel.StdHelper.getArrayField(paytableResponse, "KeyValuePairInfo");
            if (keyValuesPairInfo == null) return null;
            var result = null;
            var _g = 0;
            while (_g < keyValuesPairInfo.length) {
                var keyValuePairInfo = keyValuesPairInfo[_g];
                ++_g;
                var name1 = slotmodel.StdHelper.getField(keyValuePairInfo, "@name");
                if (name1 == populationField) {
                    var mapping = slotmodel.StdHelper.getArrayField(keyValuePairInfo, "Mapping");
                    var _g1 = 0;
                    while (_g1 < mapping.length) {
                        var map = mapping[_g1];
                        ++_g1;
                        var key = slotmodel.StdHelper.getField(map, "@key");
                        if (key == "default") {
                            result = slotmodel.StdHelper.parseIntField(map, "@value", $bind(this, this.onParseFatalError));
                            break;
                        }
                    }
                    break;
                }
            }
            return result;
        };
        slotmodel.PfResponseParser.prototype.parseSpinOutcome = function(gameLogicResponse, slotDefinition) {
            if (gameLogicResponse == null) return null;
            var stage = this.parseStage(gameLogicResponse);
            if (stage == null) return null;
            var nextStage = this.parseNextStage(gameLogicResponse);
            if (nextStage == null) return null;
            var nextSpinStripeLayers = null;
            if (this.pluginController.isImplemented(slotmodelGamePluginApi.EPluginFeature.STRIPE_LAYER_FOR_SYNCHRONIZED_REELS)) nextSpinStripeLayers = this.pluginController.getNextSpinStripeLayersForSynchronizedReels(gameLogicResponse, $bind(this, this.onPluginError));
            if (slotDefinition.startFSReelPicture == null) {
                var startFSReelPicture = this.parseStartReelPicture(gameLogicResponse, slotmodel.EStage.FREE_SPIN);
                this.model.getConfiguration().getGameConfiguration().setStartFSReelPicture(startFSReelPicture);
                slotDefinition = this.model.getConfiguration().getGameConfiguration().getSlotDefinition();
            }
            var baseGame = this.parseBaseGameOutcome(gameLogicResponse, slotDefinition);
            var freeSpin = this.parseFreeSpinOutcome(gameLogicResponse, slotDefinition);
            var pickerBonus = this.parsePickerBonusOutcome(gameLogicResponse, slotDefinition);
            var totalFreeSpinCredit = this.parseTotalFreeSpinCredit(gameLogicResponse);
            var totalGameCredit = this.parseTotalGameCredit(gameLogicResponse);
            var totalWinCredit = this.parseTotalWinCredit(gameLogicResponse);
            var totalPickerCredit = this.parseTotalPickerCredit(gameLogicResponse);
            var awardCapExceeded = this.parseAwardCapExceeded(gameLogicResponse);
            var selectedSideBet = this.parseSelectedSideBet(gameLogicResponse);
            var resumePerStake = null;
            if (this.pluginController.isImplemented(slotmodelGamePluginApi.EPluginFeature.RESUME_PER_STAKE)) resumePerStake = this.pluginController.getResumePerStake(gameLogicResponse, $bind(this, this.onPluginError));
            if (this.wasError()) return null;
            var spinOutcome = new slotmodel.PfSpinOutcome(stage, nextStage, nextSpinStripeLayers, baseGame, freeSpin, pickerBonus, selectedSideBet, totalFreeSpinCredit, totalGameCredit, totalWinCredit, totalPickerCredit, awardCapExceeded, resumePerStake);
            return spinOutcome;
        };
        slotmodel.PfResponseParser.prototype.parseReelSetMap = function(gameLogicResponse) {
            var reelSetKeyValue = this.getKeyValuePairInfo(gameLogicResponse, "ReelSetKeyValuePair");
            if (reelSetKeyValue == null) {
                this.logWarning("ReelSetKeyValuePair = null!, Generating map from StripInfo");
                var out = new _hcmn_.haxe_ds_StringMap();
                var counter = 0;
                var stripInfo = slotmodel.StdHelper.getArrayField(gameLogicResponse, "StripInfo");
                var _g = 0;
                while (_g < stripInfo.length) {
                    var strip = stripInfo[_g];
                    ++_g;
                    var name = slotmodel.StdHelper.getField(strip, "@name");
                    if (!(_hcmn_.__map_reserved[name] != null ? out.existsReserved(name) : out.h.hasOwnProperty(name))) {
                        var value = counter++;
                        if (_hcmn_.__map_reserved[name] != null) out.setReserved(name, value);
                        else out.h[name] = value;
                    }
                }
                return out;
            } else return this.getKeyValueMapping_String_Int(reelSetKeyValue);
        };
        slotmodel.PfResponseParser.prototype.logWarning = function(message) {
            slotmodel.Log.getLoggerBykey("PFResponseParser").warn(message);
        };
        slotmodel.PfResponseParser.prototype.getKeyValuePairInfo = function(paytableResponse, name) {
            var keyValuesPairInfo = slotmodel.StdHelper.getArrayField(paytableResponse, "KeyValuePairInfo");
            if (keyValuesPairInfo != null) {
                var _g = 0;
                while (_g < keyValuesPairInfo.length) {
                    var keyValuePairInfo = keyValuesPairInfo[_g];
                    ++_g;
                    if (slotmodel.StdHelper.getField(keyValuePairInfo, "@name") == name) return keyValuePairInfo;
                }
            }
            return null;
        };
        slotmodel.PfResponseParser.prototype.parseBaseGameOutcome = function(gameLogicResponse, slotDefinition) {
            var stage = slotmodel.EStage.BASE_GAME;
            var outcome = this.parseOutcome(gameLogicResponse, stage, slotDefinition);
            if (outcome == null) return null;
            return new slotmodel.BaseGameOutcomeImpl(outcome);
        };
        slotmodel.PfResponseParser.prototype.parseFreeSpinOutcome = function(gameLogicResponse, slotDefinition) {
            var freeSpinInfo = this.parseFreeSpinInfo(gameLogicResponse);
            if (freeSpinInfo == null) return null;
            var stage = slotmodel.EStage.FREE_SPIN;
            var outcome = this.parseOutcome(gameLogicResponse, stage, slotDefinition);
            return new slotmodel.FreeSpinOutcomeImpl(freeSpinInfo.awarded, freeSpinInfo.isMaxAwarded, freeSpinInfo.isIncrementTriggered, freeSpinInfo.total, freeSpinInfo.current, outcome);
        };
        slotmodel.PfResponseParser.prototype.parsePickerBonusOutcome = function(gameLogicResponse, slotDefinition) {
            var pickerBonusInfo = this.parsePickerBonusInfo(gameLogicResponse);
            var outcome = this.parsePickerOutcome(gameLogicResponse, slotDefinition);
            if (outcome == null && pickerBonusInfo == null) return null;
            if (pickerBonusInfo == null) return new slotmodel.PickerBonusOutcomeImpl(null, outcome, false);
            else return new slotmodel.PickerBonusOutcomeImpl(pickerBonusInfo.choices, outcome, pickerBonusInfo.isIncrementTriggered);
        };
        slotmodel.PfResponseParser.prototype.parseTotalWinCredit = function(gameLogicResponse) {
            return slotmodel.StdHelper.parseIntField(gameLogicResponse, "OutcomeDetail.Payout", $bind(this, this.onParseFatalError));
        };
        slotmodel.PfResponseParser.prototype.parseReels = function(paytableResponse) {
            var stripeLayers = slotmodel.StdHelper.getArrayField(paytableResponse, "StripInfo");
            if (stripeLayers == null) return null;
            var stripeNamesMap = this.model.getConfiguration().getGameConfiguration().getSlotDefinition().stripeLayersMap;
            var stripeMap = new _hcmn_.haxe_ds_IntMap();
            var stripeLayerJson;
            var _g = 0;
            while (_g < stripeLayers.length) {
                var stripeLayerJson1 = stripeLayers[_g];
                ++_g;
                var stripeId = slotmodel.StdHelper.parseIntField(stripeLayerJson1, "@name", $bind(this, this.onParseFatalError));
                if (stripeId == null) {
                    var key = slotmodel.StdHelper.getField(stripeLayerJson1, "@name");
                    stripeId = _hcmn_.__map_reserved[key] != null ? stripeNamesMap.getReserved(key) : stripeNamesMap.h[key];
                }
                var strips = slotmodel.StdHelper.getArrayField(stripeLayerJson1, "Strip");
                var _g1 = 0;
                while (_g1 < strips.length) {
                    var strip = strips[_g1];
                    ++_g1;
                    var reelName = slotmodel.StdHelper.getField(strip, "@name");
                    var reelId = slotmodel.StdHelper.parseInt(reelName.split("Reel")[1], $bind(this, this.onParseFatalError));
                    var stop = slotmodel.StdHelper.getArrayField(strip, "Stop");
                    var symbols = [];
                    var _g2 = 0;
                    while (_g2 < stop.length) {
                        var symbolJson = stop[_g2];
                        ++_g2;
                        symbols.push(slotmodel.StdHelper.getField(symbolJson, "@symbolID"));
                    }
                    if (!stripeMap.h.hasOwnProperty(reelId)) {
                        var value = [];
                        stripeMap.h[reelId] = value;
                    }
                    stripeMap.h[reelId].push(new slotModelApi.Stripe(stripeId, symbols));
                }
            }
            var reels = [];
            var $it0 = stripeMap.keys();
            while ($it0.hasNext()) {
                var reelId1 = $it0.next();
                var reel = new slotModelApi.Reel(reelId1, stripeMap.h[reelId1]);
                reels.push(reel);
            }
            return reels;
        };
        slotmodel.PfResponseParser.prototype.parseLines = function(paytableResponse) {
            var patternInfos = slotmodel.StdHelper.getArrayField(paytableResponse, "PatternInfo");
            if (patternInfos == null) return null;
            var lines = new _hcmn_.haxe_ds_IntMap();
            var fieldName = "Paylines";
            var _g = 0;
            while (_g < patternInfos.length) {
                var patternInfo = patternInfos[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(patternInfo, "@name");
                if (name == fieldName) {
                    var patterns = slotmodel.StdHelper.getArrayField(patternInfo, "Pattern");
                    var _g1 = 0;
                    while (_g1 < patterns.length) {
                        var pattern = patterns[_g1];
                        ++_g1;
                        var namePattern = slotmodel.StdHelper.getField(pattern, "@name");
                        var lineId = _hcmn_.Std.parseInt(namePattern.split("Line ")[1]);
                        var offsets = [];
                        var cells = slotmodel.StdHelper.getArrayField(pattern, "Cell");
                        var _g2 = 0;
                        while (_g2 < cells.length) {
                            var cell = cells[_g2];
                            ++_g2;
                            var position = slotmodel.StdHelper.getField(cell, "@name");
                            var reelIndex = _hcmn_.Std.parseInt(position.split("C")[1].split("R")[1]);
                            offsets.push(reelIndex);
                        }
                        var value = new slotModelApi.Line(lineId, offsets);
                        lines.h[lineId] = value;
                    }
                    break;
                }
            }
            return lines;
        };
        slotmodel.PfResponseParser.prototype.getWagerInput = function() {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseAwardCapExceeded = function(gameLogicResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parsePickerBonusInfo = function(gameLogicResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseFreeSpinInfo = function(gameLogicResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseOutcome = function(gameLogicResponse, stage, slotDefinition) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parsePickerOutcome = function(gameLogicResponse, slotDefinition) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseSelectableLines = function(paytableResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseSelectedLineCount = function(gameLogicResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseSelectedSideBet = function(gameLogicResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseSideBets = function(paytableResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseStartReelPicture = function(gameLogicResponse, stage) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseTotalFreeSpinCredit = function(gameLogicResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseTotalGameCredit = function(gameLogicResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.parseTotalPickerCredit = function(gameLogicResponse) {
            throw new js._Boot.HaxeError("Unimplemented method!");
        };
        slotmodel.PfResponseParser.prototype.onParseFatalError = function(message) {
            slotmodel.Log.getLoggerBykey("PFResponseParser").error("[ParseFatalError]" + message);
            this.parseError = true;
            this.onError(this.getFatalError(message));
        };
        slotmodel.PfResponseParser.prototype.getFatalError = function(message) {
            return new slotmodel.Error(slotmodel.EErrorSource.PF_RESPONSE_PARSER, slotmodel.ErrorIdList.PF_PayloadError, true, message);
        };
        slotmodel.PfResponseParser.prototype.onPluginError = function(message) {
            slotmodel.Log.getLoggerBykey("PluginController").error("[GamePluginError]" + message);
            this.pluginError = true;
            this.onError(this.getFatalError(message));
        };
        slotmodel.PfResponseParser.prototype.wasError = function() {
            return this.parseError || this.pluginError;
        };
        slotmodel.PfResponseParser.prototype.parseAutoSpinDefinition = function(paytableStatistics) {
            var autoSpinInfoObject = slotmodel.StdHelper.getField(paytableStatistics, "AutoSpinInfo");
            if (autoSpinInfoObject == null) return null;
            var enabled = slotmodel.StdHelper.getBoolField(autoSpinInfoObject, "@enable", false);
            var steps = slotmodel.StdHelper.parseIntArrayField(autoSpinInfoObject, "Step", $bind(this, this.onParseFatalError));
            if (this.parseError) return null;
            var autoSpinDefinition = new slotModelApi.AutoSpinDefinition(enabled, steps);
            return autoSpinDefinition;
        };
        slotmodel.PfResponseParser.sortMonneyStrings = function(x, y) {
            return new money.Money(x).compare(new money.Money(y));
        };
        slotmodel.PfResponseParser.prototype.__class__ = slotmodel.PfResponseParser;

        slotmodel.IResponseParser = function() {}
        slotmodel.IResponseParser.prototype = {

            getCurrencyFormat: function(systemInitResponse, currencyResponse) {
                return {
                    arguments: ["*", "*"],
                    returns: "*"
                };
            },
            getWagerInput: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            },
            parseBetsPerLine: function(paytableResponse) {
                return {
                    arguments: ["*"],
                    returns: Map
                };
            },
            parseGameLogicVersion: function(paytableResponse) {
                return {
                    arguments: ["*"],
                    returns: "string"
                };
            },
            parseNextStageFromStageChange: function(stageChange) {
                return {
                    arguments: ["*"],
                    returns: "*"
                };
            },
            parsePfAbortProperties: function(abortResponse, slotDefinition) {
                return {
                    arguments: ["*", "*"],
                    returns: "*"
                };
            },
            parsePfInitializedResponse: function(systemInitResponse, gameLogicResponse, paytableResponse, currencyResponse, slotDefinition) {
                return {
                    arguments: ["*", "*", "*", "*", "*"],
                    returns: "*"
                };
            },
            parsePfSpinOutcome: function(gameLogicResponse, slotDefinition) {
                return {
                    arguments: ["*", "*"],
                    returns: "*"
                };
            },
            parseSelectableLines: function(paytableResponse) {
                return {
                    arguments: ["*"],
                    returns: "array"
                };
            },
            parseAwardCapExceeded: function(gameLogicResponse) {
                return {
                    arguments: ["*"],
                    returns: "boolean"
                };
            },
            parsePickerBonusInfo: function(gameLogicResponse) {
                return {
                    arguments: ["*"],
                    returns: "*"
                };
            },
            parseFreeSpinInfo: function(gameLogicResponse) {
                return {
                    arguments: ["*"],
                    returns: "*"
                };
            },
            parseOutcome: function(gameLogicResponse, stage, slotDefinition) {
                return {
                    arguments: ["*", "*", "*"],
                    returns: "*"
                };
            },
            parsePickerOutcome: function(gameLogicResponse, slotDefinition) {
                return {
                    arguments: ["*", "*"],
                    returns: "*"
                };
            },
            parseSelectedLineCount: function(gameLogicResponse) {
                return {
                    arguments: ["*"],
                    returns: "number"
                };
            },
            parseSelectedSideBet: function(gameLogicResponse) {
                return {
                    arguments: ["*"],
                    returns: "number"
                };
            },
            parseSideBets: function(paytableResponse) {
                return {
                    arguments: ["*"],
                    returns: "array"
                };
            },
            parseStartReelPicture: function(gameLogicResponse, stage) {
                return {
                    arguments: ["*", "*"],
                    returns: "*"
                };
            },
            parseTotalFreeSpinCredit: function(gameLogicResponse) {
                return {
                    arguments: ["*"],
                    returns: "number"
                };
            },
            parseTotalGameCredit: function(gameLogicResponse) {
                return {
                    arguments: ["*"],
                    returns: "number"
                };
            },
            parseTotalPickerCredit: function(gameLogicResponse) {
                return {
                    arguments: ["*"],
                    returns: "number"
                };
            }
        };
        slotmodel.GleResponseParser = function(onError, pluginController, model) {
            slotmodel.PfResponseParser.call(this, onError, pluginController, model);
        };
        slotmodel.GleResponseParser = ck_implements(slotmodel.GleResponseParser, slotmodel.IResponseParser);
        slotmodel.GleResponseParser.__interfaces__ = [slotmodel.IResponseParser];
        slotmodel.GleResponseParser.__name__ = ["slotmodel", "GleResponseParser"];
        slotmodel.GleResponseParser.__super__ = slotmodel.PfResponseParser;
        for (var k in slotmodel.PfResponseParser.prototype) slotmodel.GleResponseParser.prototype[k] = slotmodel.PfResponseParser.prototype[k];
        slotmodel.GleResponseParser.prototype.getWagerInput = function() {
            var result = new pfCommunicatorApi.WagerInput();
            if (this.model.getConfiguration().getGameConfiguration().getSideBets().length > 0) {}
            return result;
        };
        slotmodel.GleResponseParser.prototype.parseAwardCapExceeded = function(gameLogicResponse) {
            var awardCapOutcomeObject = slotmodel.StdHelper.getField(gameLogicResponse, "AwardCapOutcome");
            if (awardCapOutcomeObject == null) return false;
            var awardCapExceededObject = slotmodel.StdHelper.getField(awardCapOutcomeObject, "AwardCapExceeded");
            if (awardCapExceededObject == null) return false;
            return awardCapExceededObject.toLowerCase() == "true";
        };
        slotmodel.GleResponseParser.prototype.parsePickerBonusInfo = function(gameLogicResponse) {
            var populationField = ".Picker";
            var populationOutcomes = this.parsePopulationOutcomeContains(gameLogicResponse, populationField);
            if (populationOutcomes == null) return null;
            var choices = [];
            var _g = 0;
            while (_g < populationOutcomes.length) {
                var populationOutcome = populationOutcomes[_g];
                ++_g;
                var cell = slotmodel.StdHelper.getField(populationOutcome, "Cell");
                var name = slotmodel.StdHelper.getField(cell, "@name");
                var text = slotmodel.StdHelper.getField(cell, "#text");
                var choice = new slotModelApi.Pair(name, text);
                choices.push(choice);
            }
            var isIncrementTriggered = false;
            var pickerSummaryOutcome = slotmodel.StdHelper.getArrayField(gameLogicResponse, "PickerSummaryOutcome");
            if (pickerSummaryOutcome != null) isIncrementTriggered = slotmodel.StdHelper.getBoolField(pickerSummaryOutcome, "IncrementTriggered", false);
            return new slotmodel.PickerBonusInfoImpl(choices, isIncrementTriggered);
        };
        slotmodel.GleResponseParser.prototype.parseFreeSpinInfo = function(gameLogicResponse) {
            var freeSpinOutcomeObject = slotmodel.StdHelper.getField(gameLogicResponse, "FreeSpinOutcome");
            if (freeSpinOutcomeObject == null) return null;
            var total = slotmodel.StdHelper.parseIntField(freeSpinOutcomeObject, "TotalAwarded", $bind(this, this.onParseFatalError));
            if (total == 0) {}
            var awarded = slotmodel.StdHelper.parseIntField(freeSpinOutcomeObject, "Awarded", $bind(this, this.onParseFatalError));
            var isMaxAwarded = slotmodel.StdHelper.getBoolField(freeSpinOutcomeObject, "MaxAwarded", false);
            var isIncrementTriggered = slotmodel.StdHelper.getBoolField(freeSpinOutcomeObject, "IncrementTriggered", false);
            var current = slotmodel.StdHelper.parseIntField(freeSpinOutcomeObject, "Count", $bind(this, this.onParseFatalError));
            return new slotmodel.FreeSpinInfoImpl(awarded, isMaxAwarded, isIncrementTriggered, total, current);
        };
        slotmodel.GleResponseParser.prototype.parseOutcome = function(gameLogicResponse, stage, slotDefinition) {
            var reelStop = this.parseReelStop(gameLogicResponse, stage);
            var reelStopAdditional = this.parseReelStopAdditional(gameLogicResponse, stage);
            var lineWins = this.parseLineWins(gameLogicResponse, stage, slotDefinition);
            if (this.pluginController.isImplemented(slotmodelGamePluginApi.EPluginFeature.ADD_LINE_OUTCOMES)) {
                var additionalLineWins = this.pluginController.getAdditionalLineWins(gameLogicResponse, stage, $bind(this, this.onPluginError));
                if (additionalLineWins != null) {
                    if (lineWins == null) lineWins = [];
                    lineWins = lineWins.concat(additionalLineWins);
                }
            }
            var scatterWins = [];
            if (this.pluginController.isImplemented(slotmodelGamePluginApi.EPluginFeature.SCATTER_OUTCOMES)) scatterWins = this.pluginController.getScatterWins(gameLogicResponse, stage, $bind(this, this.onPluginError));
            else scatterWins = this.parseScatterWins(gameLogicResponse, stage, slotDefinition);
            var bonusWins = [];
            bonusWins = this.pluginController.getBonusWins(gameLogicResponse, stage, $bind(this, this.onPluginError));
            var customField;
            if (this.pluginController.isImplemented(slotmodelGamePluginApi.EPluginFeature.CUSTOM_FIELD)) customField = this.pluginController.parseCustomField(gameLogicResponse, $bind(this, this.onPluginError));
            else customField = this.parseLadderOutcome(gameLogicResponse);
            if (this.wasError()) return null;
            var outcome = new slotmodel.OutcomeImpl(reelStop, reelStopAdditional, lineWins, scatterWins, bonusWins, null, customField);
            return outcome;
        };
        slotmodel.GleResponseParser.prototype.parsePickerOutcome = function(gameLogicResponse, slotDefinition) {
            var outcome = null;
            var progressMeter = this.pluginController.getProgressMeter(gameLogicResponse, $bind(this, this.onParseFatalError));
            if (progressMeter != null) {
                outcome = this.parsePickerBonusOutcomes(gameLogicResponse, slotDefinition);
                if (outcome == null) {
                    var pickerWins = [];
                    var pickerWin = new slotmodel.PickerWinImpl(null, null, null);
                    pickerWin.setProgressMeter(progressMeter);
                    pickerWins.push(pickerWin);
                    outcome = new slotmodel.OutcomeImpl(null, null, null, null, null, pickerWins, null);
                } else {
                    var pickerWins1 = outcome.getPickerWinsImpl();
                    var _g = 0;
                    while (_g < pickerWins1.length) {
                        var pickerWin1 = pickerWins1[_g];
                        ++_g;
                        pickerWin1.setProgressMeter(progressMeter);
                    }
                }
            } else outcome = this.parsePickerBonusOutcomes(gameLogicResponse, slotDefinition);
            return outcome;
        };
        slotmodel.GleResponseParser.prototype.parseSelectableLinesFromPatternSliderInfo = function(paytableResponse) {
            var patternInfoObject = slotmodel.StdHelper.getField(paytableResponse, "PatternSliderInfo.PatternInfo");
            if (patternInfoObject == null) return null;
            var selectableLines = [];
            var max = slotmodel.StdHelper.parseIntField(patternInfoObject, "@max", $bind(this, this.onParseFatalError));
            if (max == null) return null;
            var min = slotmodel.StdHelper.parseIntField(patternInfoObject, "@min", $bind(this, this.onParseFatalError));
            if (min == null) return null;
            if (min == max) selectableLines.push(min);
            else selectableLines = slotmodel.StdHelper.parseIntArrayField(patternInfoObject, "Step", $bind(this, this.onParseFatalError));
            return selectableLines;
        };
        slotmodel.GleResponseParser.prototype.parseSelectableLines = function(paytableResponse) {
            var selectableLines = this.parseSelectableLinesFromPatternInfo(paytableResponse);
            if (selectableLines == null) selectableLines = this.parseSelectableLinesFromPatternSliderInfo(paytableResponse);
            return selectableLines;
        };
        slotmodel.GleResponseParser.prototype.parseSelectableLinesFromPatternInfo = function(paytableResponse) {
            var selectableLines = null;
            var selectableLinesInfo = this.parsePatternInfo(paytableResponse, "SelectableLinesInfo");
            if (selectableLinesInfo == null) return null;
            else {
                var steps = this.parseSteps(selectableLinesInfo);
                if (steps != null) selectableLines = steps;
            }
            return selectableLines;
        };
        slotmodel.GleResponseParser.prototype.parsePatternInfo = function(paytableResponse, name) {
            var patternInfos = slotmodel.StdHelper.getArrayField(paytableResponse, "PatternInfo");
            if (patternInfos != null) {
                var _g = 0;
                while (_g < patternInfos.length) {
                    var patternInfo = patternInfos[_g];
                    ++_g;
                    var fieldName = slotmodel.StdHelper.getField(patternInfo, "@name");
                    if (fieldName == name) return patternInfo;
                }
            }
            return null;
        };
        slotmodel.GleResponseParser.prototype.parseSteps = function(patternInfo) {
            var min = slotmodel.StdHelper.parseIntField(patternInfo, "@min", null);
            var max = slotmodel.StdHelper.parseIntField(patternInfo, "@max", null);
            if (min == null || max == null) return null;
            if (min == max) return [min];
            else {
                var stepsArray = slotmodel.StdHelper.getIntArrayField(patternInfo, "Step");
                if (stepsArray == null) return null;
                return stepsArray;
            }
        };
        slotmodel.GleResponseParser.prototype.parseSelectedLineCount = function(gameLogicResponse) {
            var value = this.parseResumeWagerOutcome(gameLogicResponse, "Lines");
            if (value == null) value = slotmodel.StdHelper.parseIntField(gameLogicResponse, "PatternSliderInput.PatternsBet", $bind(this, this.onParseFatalError));
            return value;
        };
        slotmodel.GleResponseParser.prototype.parseResumeWagerOutcome = function(gameLogicResponse, fieldName) {
            var rwo = slotmodel.StdHelper.getField(gameLogicResponse, "ResumeWagerOutcome");
            if (rwo == null || slotmodel.StdHelper.getField(rwo, "@name") != "BaseGame.ResumeWagerOutcome") return null;
            return slotmodel.StdHelper.parseIntField(rwo, fieldName, $bind(this, this.onParseFatalError));
        };
        slotmodel.GleResponseParser.prototype.parseSideBets = function(paytableResponse) {
            var sidebets = [];
            var selectableSideBetInfo = this.parsePatternInfo(paytableResponse, "SelectableSideBetInfo");
            if (selectableSideBetInfo != null) {
                var steps = this.parseSteps(selectableSideBetInfo);
                if (steps != null) sidebets = steps;
            }
            return sidebets;
        };
        slotmodel.GleResponseParser.prototype.parseSelectedSideBet = function(gameLogicResponse) {
            var result = this.parseResumeWagerOutcome(gameLogicResponse, "SideBet");
            if (result == null) result = 0;
            return result;
        };
        slotmodel.GleResponseParser.prototype.parseStartReelPicture = function(gameLogicResponse, stage) {
            var populationField = stage.value + ".Reels";
            var populationOutcome = this.parsePopulationOutcome(gameLogicResponse, populationField);
            if (populationOutcome == null) return null;
            return this.parseReelPicture(populationOutcome);
        };
        slotmodel.GleResponseParser.prototype.parseTotalFreeSpinCredit = function(gameLogicResponse) {
            var prizeOutcome = this.parsePrizeOutcome(gameLogicResponse, "FreeSpin.Total");
            if (prizeOutcome == null) return 0;
            return slotmodel.StdHelper.parseIntField(prizeOutcome, "@totalPay", $bind(this, this.onParseFatalError));
        };
        slotmodel.GleResponseParser.prototype.parseTotalGameCredit = function(gameLogicResponse) {
            var prizeOutcome = this.parsePrizeOutcome(gameLogicResponse, "Game.Total");
            if (prizeOutcome == null) return 0;
            return slotmodel.StdHelper.parseIntField(prizeOutcome, "@totalPay", $bind(this, this.onParseFatalError));
        };
        slotmodel.GleResponseParser.prototype.parseTotalPickerCredit = function(gameLogicResponse) {
            var prizeOutcome = this.parsePrizeOutcome(gameLogicResponse, "Picker.Total");
            if (prizeOutcome == null) return 0;
            return slotmodel.StdHelper.parseIntField(prizeOutcome, "@totalPay", $bind(this, this.onParseFatalError));
        };
        slotmodel.GleResponseParser.prototype.parseReelStop = function(gameLogicResponse, stage) {
            var populationField = stage.value + ".Reels";
            var populationOutcome = this.parsePopulationOutcome(gameLogicResponse, populationField);
            if (populationOutcome == null) return null;
            return this.parseReelPicture(populationOutcome);
        };
        slotmodel.GleResponseParser.prototype.parseReelStopAdditional = function(gameLogicResponse, stage) {
            var populationField = stage.value + ".AdditionalReels";
            var populationOutcome = this.parsePopulationOutcome(gameLogicResponse, populationField);
            if (populationOutcome == null) return null;
            return this.parseReelPicture(populationOutcome);
        };
        slotmodel.GleResponseParser.prototype.parsePopulationOutcome = function(gameLogicResponse, populationField) {
            var populationOutcomes = slotmodel.StdHelper.getArrayField(gameLogicResponse, "PopulationOutcome");
            if (populationOutcomes == null) return null;
            var result = null;
            var _g = 0;
            while (_g < populationOutcomes.length) {
                var populationOutcome = populationOutcomes[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(populationOutcome, "@name");
                if (name == populationField) {
                    result = slotmodel.StdHelper.getArrayField(populationOutcome, "Entry");
                    break;
                }
            }
            return result;
        };
        slotmodel.GleResponseParser.prototype.parsePopulationOutcomeContains = function(gameLogicResponse, populationField) {
            var populationOutcomes = slotmodel.StdHelper.getArrayField(gameLogicResponse, "PopulationOutcome");
            if (populationOutcomes == null) return null;
            var result = null;
            var _g = 0;
            while (_g < populationOutcomes.length) {
                var populationOutcome = populationOutcomes[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(populationOutcome, "@name");
                if (name.indexOf(populationField) != -1) {
                    result = slotmodel.StdHelper.getArrayField(populationOutcome, "Entry");
                    break;
                }
            }
            return result;
        };
        slotmodel.GleResponseParser.prototype.parseReelPicture = function(populationOutcomes) {
            if (populationOutcomes == null) return null;
            var reelPictureMatrix = [];
            var _g = 0;
            while (_g < populationOutcomes.length) {
                var populationOutcome = populationOutcomes[_g];
                ++_g;
                var cellsField = slotmodel.StdHelper.getField(populationOutcome, "Cell");
                var cells;
                if ((cellsField instanceof Array) && cellsField.__enum__ == null) cells = cellsField;
                else cells = [cellsField];
                var reelPicture1 = [];
                var _g1 = 0;
                while (_g1 < cells.length) {
                    var cell = cells[_g1];
                    ++_g1;
                    var cellPicture = slotmodel.StdHelper.getField(cell, "#text");
                    reelPicture1.push(cellPicture);
                }
                reelPictureMatrix.push(reelPicture1);
            }
            var reelPicture = new slotModelApi.ReelPicture(reelPictureMatrix);
            return reelPicture;
        };
        slotmodel.GleResponseParser.prototype.parseLineWins = function(gameLogicResponse, stage, slotDefinition) {
            var lineWinMap = new _hcmn_.haxe_ds_StringMap();
            var fieldName = stage.value + ".Lines";
            var prizeOutcomeLines = this.parsePrizeOutcomeLines(gameLogicResponse, fieldName);
            if (prizeOutcomeLines == null) return null;
            var _g = 0;
            while (_g < prizeOutcomeLines.length) {
                var prizeOutcomeLine = prizeOutcomeLines[_g];
                ++_g;
                var lineTypeString = slotmodel.StdHelper.getField(prizeOutcomeLine, "@name");
                var lineType = lineTypeString.split(stage.value + ".")[1];
                var prizes = slotmodel.StdHelper.getArrayField(prizeOutcomeLine, "Prize");
                if (prizes == null) continue;
                var prize;
                var _g1 = 0;
                while (_g1 < prizes.length) {
                    var prize1 = prizes[_g1];
                    ++_g1;
                    var mapId = slotmodel.StdHelper.getField(prize1, "@name");
                    var lineId = _hcmn_.Std.parseInt(mapId.split("Line ")[1]);
                    var name = slotmodel.StdHelper.getField(prize1, "@payName");
                    var lineWin = this.addLineWin(lineWinMap, mapId, lineId, name, lineType);
                    this.parseWinPayProperties(lineWin, prize1);
                    var winningSymbol = name.split(" ")[1];
                    var symbolCount = slotmodel.StdHelper.parseIntField(prize1, "@symbolCount", $bind(this, this.onParseFatalError));
                    lineWin.setRenderProperties(winningSymbol, null, symbolCount);
                }
            }
            var highlightOutcomeLines = this.parseHighlightOutcomeLines(gameLogicResponse, fieldName);
            if (highlightOutcomeLines == null) return null;
            var _g2 = 0;
            while (_g2 < highlightOutcomeLines.length) {
                var highlightOutcomeLine = highlightOutcomeLines[_g2];
                ++_g2;
                var lineTypeString1 = slotmodel.StdHelper.getField(highlightOutcomeLine, "@name");
                var lineType1 = lineTypeString1.split(stage.value + ".")[1];
                var highlights = slotmodel.StdHelper.getArrayField(highlightOutcomeLine, "Highlight");
                if (highlights == null) continue;
                var highlight;
                var _g11 = 0;
                while (_g11 < highlights.length) {
                    var highlight1 = highlights[_g11];
                    ++_g11;
                    var mapId1 = slotmodel.StdHelper.getField(highlight1, "@name");
                    var lineId1 = _hcmn_.Std.parseInt(mapId1.split("Line ")[1]);
                    var name1 = mapId1;
                    var lineWin1 = this.addLineWin(lineWinMap, mapId1, lineId1, name1, lineType1);
                    var winPath = this.getDefaultLineWinPath(lineId1, slotDefinition);
                    var cells = slotmodel.StdHelper.getArrayField(highlight1, "Cell");
                    this.updateReelPictureInfo(winPath, cells, slotDefinition.reelPictureVisibility);
                    lineWin1.setWinPath(new slotModelApi.ReelPictureInfo(winPath));
                }
            }
            var lineWins = [];
            var id;
            var $it0 = lineWinMap.keys();
            while ($it0.hasNext()) {
                var id1 = $it0.next();
                lineWins.push(_hcmn_.__map_reserved[id1] != null ? lineWinMap.getReserved(id1) : lineWinMap.h[id1]);
            }
            if (slotmodel.StdHelper.isArrayEmpty(lineWins)) return null;
            return lineWins;
        };
        slotmodel.GleResponseParser.prototype.parsePrizes = function(gameLogicResponse, fieldName) {
            var prizeOutcome = this.parsePrizeOutcome(gameLogicResponse, fieldName);
            if (prizeOutcome == null) return null;
            return slotmodel.StdHelper.getArrayField(prizeOutcome, "Prize");
        };
        slotmodel.GleResponseParser.prototype.parsePrizeOutcome = function(gameLogicResponse, fieldName) {
            var prizeOutcomes = slotmodel.StdHelper.getField(gameLogicResponse, "PrizeOutcome");
            if (prizeOutcomes == null) return null;
            var result = null;
            var _g = 0;
            while (_g < prizeOutcomes.length) {
                var prizeOutcome = prizeOutcomes[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(prizeOutcome, "@name");
                if (name == fieldName) {
                    result = prizeOutcome;
                    break;
                }
            }
            return result;
        };
        slotmodel.GleResponseParser.prototype.parsePrizeOutcomeLines = function(gameLogicResponse, fieldName) {
            var prizeOutcomes = slotmodel.StdHelper.getField(gameLogicResponse, "PrizeOutcome");
            if (prizeOutcomes == null) return null;
            var result = [];
            var _g = 0;
            while (_g < prizeOutcomes.length) {
                var prizeOutcome = prizeOutcomes[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(prizeOutcome, "@name");
                if (name.indexOf(fieldName) != -1) result.push(prizeOutcome);
            }
            if (slotmodel.StdHelper.isArrayEmpty(result)) return null;
            return result;
        };
        slotmodel.GleResponseParser.prototype.addLineWin = function(lineWins, mapId, lineId, name, lineType) {
            if (lineWins == null) lineWins = new _hcmn_.haxe_ds_StringMap();
            var lineWin;
            if (_hcmn_.__map_reserved[mapId] != null ? lineWins.existsReserved(mapId) : lineWins.h.hasOwnProperty(mapId)) lineWin = _hcmn_.__map_reserved[mapId] != null ? lineWins.getReserved(mapId) : lineWins.h[mapId];
            else {
                if (lineType == null) lineWin = new slotmodel.LineWinImpl(lineId, name);
                else lineWin = new slotmodel.LineWinImpl(lineId, name, slotmodel.ELineType.ofName(lineType));
                if (_hcmn_.__map_reserved[mapId] != null) lineWins.setReserved(mapId, lineWin);
                else lineWins.h[mapId] = lineWin;
            }
            return lineWin;
        };
        slotmodel.GleResponseParser.prototype.parseWinPayProperties = function(win, prize) {
            if (win == null) return;
            if (prize == null) return;
            var stakePerLineCredit = slotmodel.StdHelper.parseIntField(prize, "@betMultiplier", $bind(this, this.onParseFatalError));
            var price = new money.Money(slotmodel.StdHelper.getField(prize, "@pay"));
            var multiplier = slotmodel.StdHelper.parseIntField(prize, "@multiplier", $bind(this, this.onParseFatalError));
            var payoutCredit = slotmodel.StdHelper.parseIntField(prize, "@totalPay", $bind(this, this.onParseFatalError));
            win.setPayProperties(stakePerLineCredit, price, multiplier, payoutCredit);
        };
        slotmodel.GleResponseParser.prototype.parseHighlights = function(gameLogicResponse, fieldName) {
            var highlightOutcome = this.parseHighlightOutcome(gameLogicResponse, fieldName);
            if (highlightOutcome == null) return null;
            return slotmodel.StdHelper.getArrayField(highlightOutcome, "Highlight");
        };
        slotmodel.GleResponseParser.prototype.parseHighlightOutcome = function(gameLogicResponse, fieldName) {
            var highlightOutcomes = slotmodel.StdHelper.getField(gameLogicResponse, "HighlightOutcome");
            if (highlightOutcomes == null) return null;
            var result = null;
            var _g = 0;
            while (_g < highlightOutcomes.length) {
                var highlightOutcome = highlightOutcomes[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(highlightOutcome, "@name");
                if (name == fieldName) {
                    result = highlightOutcome;
                    break;
                }
            }
            return result;
        };
        slotmodel.GleResponseParser.prototype.parseHighlightOutcomeLines = function(gameLogicResponse, fieldName) {
            var highlightOutcomes = slotmodel.StdHelper.getField(gameLogicResponse, "HighlightOutcome");
            if (highlightOutcomes == null) return null;
            var result = [];
            var _g = 0;
            while (_g < highlightOutcomes.length) {
                var highlightOutcome = highlightOutcomes[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(highlightOutcome, "@name");
                if (name.indexOf(fieldName) != -1) result.push(highlightOutcome);
            }
            if (slotmodel.StdHelper.isArrayEmpty(result)) return null;
            return result;
        };
        slotmodel.GleResponseParser.prototype.getDefaultLineWinPath = function(lineId, slotDefinition) {
            var reelsInfo = this.getDefaultReelPictureInfo(slotDefinition.reelPictureSize, 0);
            var lineDefinition = slotDefinition.getLine(lineId);
            if (lineDefinition == null) return reelsInfo;
            var linePath = lineDefinition.getLinePath(slotDefinition.reelPictureSize);
            var reelIndex;
            var symbolIndex;
            var _g1 = 0;
            var _g = linePath.length;
            while (_g1 < _g) {
                var reelIndex1 = _g1++;
                var reelPath = linePath[reelIndex1];
                var _g3 = 0;
                var _g2 = reelPath.length;
                while (_g3 < _g2) {
                    var symbolIndex1 = _g3++;
                    if (linePath[reelIndex1][symbolIndex1]) reelsInfo[reelIndex1][symbolIndex1] = slotmodel.GleResponseParser.DISABLED_WINNING_SYMBOL_INFO;
                }
            }
            return reelsInfo;
        };
        slotmodel.GleResponseParser.prototype.getDefaultReelPictureInfo = function(reelPictureSize, defaultValue) {
            var reelsInfo = [];
            var reelIndex;
            var symbolIndex;
            var _g1 = 0;
            var _g = reelPictureSize.reelCount;
            while (_g1 < _g) {
                var reelIndex1 = _g1++;
                var reelInfo = [];
                var _g3 = 0;
                var _g2 = reelPictureSize.reelLength;
                while (_g3 < _g2) {
                    var symbolIndex1 = _g3++;
                    reelInfo.push(defaultValue);
                }
                reelsInfo.push(reelInfo);
            }
            return reelsInfo;
        };
        slotmodel.GleResponseParser.prototype.updateReelPictureInfo = function(reelPictureInfo, cells, reelPictureVisibility) {
            var reelPictureVisibilityInfo = null;
            if (reelPictureVisibility != null) reelPictureVisibilityInfo = reelPictureVisibility.reelsInfo;
            var _g = 0;
            while (_g < cells.length) {
                var cell = cells[_g];
                ++_g;
                var position = slotmodel.StdHelper.getField(cell, "@name");
                var reelIndex = _hcmn_.Std.parseInt(position.split("C")[1].split("R")[0]);
                var symbolIndex = _hcmn_.Std.parseInt(position.split("R")[1]);
                if (reelPictureVisibilityInfo != null) {
                    if (reelPictureVisibilityInfo[reelIndex][symbolIndex] > 0) reelPictureInfo[reelIndex][symbolIndex] = slotmodel.GleResponseParser.WINNING_SYMBOL_INFO;
                } else reelPictureInfo[reelIndex][symbolIndex] = slotmodel.GleResponseParser.WINNING_SYMBOL_INFO;
            }
        };
        slotmodel.GleResponseParser.prototype.parseScatterWins = function(gameLogicResponse, stage, slotDefinition) {
            var scatterWinMap = new _hcmn_.haxe_ds_StringMap();
            var fieldName = stage.value + ".Scatter";
            var prizes = this.parsePrizes(gameLogicResponse, fieldName);
            if (prizes == null) return null;
            var prize;
            var _g = 0;
            while (_g < prizes.length) {
                var prize1 = prizes[_g];
                ++_g;
                var mapId = slotmodel.StdHelper.getField(prize1, "@name");
                var name = slotmodel.StdHelper.getField(prize1, "@payName");
                var scatterWin = this.addScatterWin(scatterWinMap, mapId, name);
                this.parseWinPayProperties(scatterWin, prize1);
                var winningSymbol = name.split(" ")[1];
                var symbolCount = slotmodel.StdHelper.parseIntField(prize1, "@symbolCount", $bind(this, this.onParseFatalError));
                scatterWin.setRenderProperties(winningSymbol, null, symbolCount);
            }
            var highlights = this.parseHighlights(gameLogicResponse, fieldName);
            if (highlights == null) return null;
            var highlight;
            var _g1 = 0;
            while (_g1 < highlights.length) {
                var highlight1 = highlights[_g1];
                ++_g1;
                var mapId1 = slotmodel.StdHelper.getField(highlight1, "@name");
                var scatterWin1 = this.addScatterWin(scatterWinMap, mapId1, mapId1);
                var winPath = this.getDefaultReelPictureInfo(slotDefinition.reelPictureSize, 0);
                this.updateReelPictureInfo(winPath, slotmodel.StdHelper.getArrayField(highlight1, "Cell"), slotDefinition.reelPictureVisibility);
                scatterWin1.setWinPath(new slotModelApi.ReelPictureInfo(winPath));
            }
            var scatterWins = [];
            var id;
            var $it0 = scatterWinMap.keys();
            while ($it0.hasNext()) {
                var id1 = $it0.next();
                scatterWins.push(_hcmn_.__map_reserved[id1] != null ? scatterWinMap.getReserved(id1) : scatterWinMap.h[id1]);
            }
            if (slotmodel.StdHelper.isArrayEmpty(scatterWins)) return null;
            return scatterWins;
        };
        slotmodel.GleResponseParser.prototype.addScatterWin = function(scatterWins, mapId, name) {
            if (scatterWins == null) scatterWins = new _hcmn_.haxe_ds_StringMap();
            var scatterWin;
            if (_hcmn_.__map_reserved[mapId] != null ? scatterWins.existsReserved(mapId) : scatterWins.h.hasOwnProperty(mapId)) scatterWin = _hcmn_.__map_reserved[mapId] != null ? scatterWins.getReserved(mapId) : scatterWins.h[mapId];
            else {
                scatterWin = new slotmodel.ScatterWinImpl(name);
                if (_hcmn_.__map_reserved[mapId] != null) scatterWins.setReserved(mapId, scatterWin);
                else scatterWins.h[mapId] = scatterWin;
            }
            return scatterWin;
        };
        slotmodel.GleResponseParser.prototype.parsePickerBonusOutcomes = function(gameLogicResponse, slotDefinition) {
            var pickerOutcomes = slotmodel.StdHelper.getArrayField(gameLogicResponse, "PickerOutcome");
            var pickerInput = slotmodel.StdHelper.getField(gameLogicResponse, "PickerInput");
            if (pickerOutcomes == null) return null;
            var pickerWins = [];
            var stage = this.parseStage(gameLogicResponse).value;
            var _g = 0;
            while (_g < pickerOutcomes.length) {
                var pickerOutcome = pickerOutcomes[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(pickerOutcome, "@name");
                if (stage.indexOf(name) != -1) {
                    var layers = slotmodel.StdHelper.getArrayField(pickerOutcome, "Layer");
                    if (layers == null) return null;
                    var _g1 = 0;
                    while (_g1 < layers.length) {
                        var layer = layers[_g1];
                        ++_g1;
                        var pickerWin = this.parsePickerWin(layer, name, pickerInput);
                        this.setPickerWinPayProperties(pickerWin, gameLogicResponse);
                        pickerWins.push(pickerWin);
                    }
                    break;
                }
            }
            var ladderOutcome = this.parseLadderOutcome(gameLogicResponse);
            if (slotmodel.StdHelper.isArrayEmpty(pickerWins)) return null;
            if (this.wasError()) return null;
            var outcome = new slotmodel.OutcomeImpl(null, null, null, null, null, pickerWins, ladderOutcome);
            return outcome;
        };
        slotmodel.GleResponseParser.prototype.parseLadderOutcome = function(gameLogicResponse) {
            var ladderOutcome = slotmodel.StdHelper.getField(gameLogicResponse, "LadderOutcome.Ladder");
            if (ladderOutcome == null) return null;
            return slotmodel.StdHelper.getField(ladderOutcome, "#text");
        };
        slotmodel.GleResponseParser.prototype.parsePickerWin = function(layer, name, pickerInput) {
            var pickArray = slotmodel.StdHelper.getArrayField(layer, "Pick");
            if (pickArray == null) return null;
            var lastPick = null;
            var lastPickName = null;
            var pickerInputPick = slotmodel.StdHelper.getField(pickerInput, "Pick");
            if (pickerInputPick == null) return null;
            lastPickName = slotmodel.StdHelper.getField(pickerInputPick, "@name");
            var picks = [];
            var _g = 0;
            while (_g < pickArray.length) {
                var p = pickArray[_g];
                ++_g;
                var pick = this.parsePick(p);
                picks.push(pick);
                if (pick.name == lastPickName) lastPick = pick;
            }
            return new slotmodel.PickerWinImpl(name, null, picks, lastPick);
        };
        slotmodel.GleResponseParser.prototype.parsePick = function(pick) {
            var name = slotmodel.StdHelper.getField(pick, "@name");
            var picked = slotmodel.StdHelper.getBoolField(pick, "@picked", false);
            var values = [];
            var features = slotmodel.StdHelper.getArrayField(pick, "Feature");
            var _g = 0;
            while (_g < features.length) {
                var feature = features[_g];
                ++_g;
                var value = slotmodel.StdHelper.getField(feature, "@value");
                var type = slotmodel.StdHelper.getField(feature, "@type");
                values.push(new slotModelApi.Pair(type, value));
            }
            return new slotModelApi.Pick(name, picked, values);
        };
        slotmodel.GleResponseParser.prototype.setPickerWinPayProperties = function(pickerWin, gameLogicResponse) {
            var pickerTotal = this.parsePrizeOutcome(gameLogicResponse, "Picker.Total");
            if (pickerTotal == null) return null;
            var prize = slotmodel.StdHelper.getField(pickerTotal, "Prize");
            var stakePerLineCredit = slotmodel.StdHelper.parseIntField(prize, "@betMultiplier", $bind(this, this.onParseFatalError));
            var price = new money.Money(slotmodel.StdHelper.getField(prize, "@pay"));
            var multiplier = slotmodel.StdHelper.parseIntField(prize, "@multiplier", $bind(this, this.onParseFatalError));
            var payoutCredit = slotmodel.StdHelper.parseIntField(prize, "@totalPay", $bind(this, this.onParseFatalError));
            pickerWin.setPayProperties(stakePerLineCredit, price, multiplier, payoutCredit);
            var pickerCredits = this.parseWagerOutcome(gameLogicResponse, "Picker.Credits");
            var pickerCreditsMultiplier = slotmodel.StdHelper.parseIntField(pickerCredits, "@amount", $bind(this, this.onParseFatalError));
            var denomination;
            try {
                denomination = this.model.getState().getNextDenomination();
            } catch (err) {
                if (err instanceof js._Boot.HaxeError) err = err.val;
                denomination = this.defaultDenomination;
                null;
            }
            var pickCreditsValue;
            var _g = 0;
            var _g1 = pickerWin.picks;
            while (_g < _g1.length) {
                var pick = _g1[_g];
                ++_g;
                var pickPayout = null;
                var _g2 = 0;
                var _g3 = pick.values;
                while (_g2 < _g3.length) {
                    var value = _g3[_g2];
                    ++_g2;
                    if (value.key == "credits") {
                        pickCreditsValue = _hcmn_.Std.parseInt(value.value);
                        var pickWinValue = pickCreditsValue * pickerCreditsMultiplier;
                        pickPayout = new slotModelApi.Pair(pickWinValue, denomination.mulInt(pickWinValue).value);
                    }
                }
                if (pickPayout != null) pick.payout = pickPayout;
            }
        };
        slotmodel.GleResponseParser.prototype.parseWagerOutcome = function(gameLogicResponse, fieldName) {
            var wagerOutcomes = slotmodel.StdHelper.getField(gameLogicResponse, "WagerOutcome");
            if (wagerOutcomes == null) return null;
            var result = null;
            var _g = 0;
            while (_g < wagerOutcomes.length) {
                var wagerOutcome = wagerOutcomes[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(wagerOutcome, "@name");
                if (name == fieldName) {
                    result = wagerOutcome;
                    break;
                }
            }
            return result;
        };
        slotmodel.GleResponseParser.prototype.parseHighlight_LineWin = function(highlight, lineWinMap, slotDefinition) {};
        slotmodel.GleResponseParser.prototype.parseTotalStakeCredit = function(gameLogicResponse) {
            var betPerLineCredit = this.parseBetPerLineCredit(gameLogicResponse);
            if (betPerLineCredit == null) return null;
            var selectedLineCount = this.parseSelectedLineCount(gameLogicResponse);
            if (selectedLineCount == null) return null;
            return betPerLineCredit * selectedLineCount;
        };
        slotmodel.GleResponseParser.prototype.getLinesMap = function(lines) {
            if (lines == null) return null;
            var linesMap = new _hcmn_.haxe_ds_IntMap();
            var line;
            var _g = 0;
            while (_g < lines.length) {
                var line1 = lines[_g];
                ++_g;
                if (line1 != null) linesMap.h[line1.id] = line1;
            }
            return linesMap;
        };
        slotmodel.GleResponseParser.prototype.__class__ = slotmodel.GleResponseParser;
        slotmodel.MptResponseParser = function(onError, pluginController, model) {
            slotmodel.MptHelper.init(onError);
            slotmodel.PfResponseParser.call(this, onError, pluginController, model);
        };
        slotmodel.MptResponseParser = ck_implements(slotmodel.MptResponseParser, slotmodel.IResponseParser);
        slotmodel.MptResponseParser.__interfaces__ = [slotmodel.IResponseParser];
        slotmodel.MptResponseParser.__name__ = ["slotmodel", "MptResponseParser"];
        slotmodel.MptResponseParser.__super__ = slotmodel.PfResponseParser;
        for (var k in slotmodel.PfResponseParser.prototype) slotmodel.MptResponseParser.prototype[k] = slotmodel.PfResponseParser.prototype[k];
        slotmodel.MptResponseParser.prototype.currentNodeWinInfo = null;
        slotmodel.MptResponseParser.prototype.mptGameOutcome = null;
        slotmodel.MptResponseParser.prototype.mOutcome = null;
        slotmodel.MptResponseParser.prototype.baseGameOutcome = null;
        slotmodel.MptResponseParser.prototype.slotDefinition = null;
        slotmodel.MptResponseParser.prototype.getWagerInput = function() {
            var result = new pfCommunicatorApi.WagerInput();
            if (this.model.getConfiguration().getGameConfiguration().getSideBets().length > 0) result.add(slotmodel.MptResponseParser.STAKE_ITEM_SIDE_BET, this.model.getState().getCurrentBet().getSideBet());
            return result;
        };
        slotmodel.MptResponseParser.prototype.parseAwardCapExceeded = function(gameLogicResponse) {
            return this.mptGameOutcome.awardCapped;
        };
        slotmodel.MptResponseParser.prototype.parsePickerBonusInfo = function(gameLogicResponse) {
            return null;
        };
        slotmodel.MptResponseParser.prototype.parseFreeSpinInfo = function(gameLogicResponse) {
            var result = null;
            if (this.parseStage(gameLogicResponse).equals(slotmodel.EStage.BASE_GAME) && this.parseNextStage(gameLogicResponse).equals(slotmodel.EStage.BASE_GAME)) return result;
            var awarded = this.getAwardedFS(this.currentNodeWinInfo);
            var isMaxAwarded = this.getIsMaxAwarded(this.currentNodeWinInfo);
            var isIncrementTriggered = this.getIsRetriggered(this.currentNodeWinInfo);
            var total = this.getTotalFS(this.currentNodeWinInfo);
            if (this.isFreeSpinEnter(gameLogicResponse)) total = awarded;
            if (this.isFreeSpinExit(gameLogicResponse)) total = 0;
            var current = this.getCurrentFS(this.currentNodeWinInfo);
            result = new slotmodel.FreeSpinInfoImpl(awarded, isMaxAwarded, isIncrementTriggered, total, current);
            return result;
        };
        slotmodel.MptResponseParser.prototype.parseOutcome = function(gameLogicResponse, stage, slotDefinition) {
            var mptGameOutcomeJson = this.getMptGameOutcomeJson(gameLogicResponse);
            this.mptGameOutcome = slotmodel.MptHelper.getMptGameOutcome(mptGameOutcomeJson);
            this.setCurrentNodeWinInfoFromOutcome();
            this.slotDefinition = slotDefinition;
            var reelPicture = this.getReelPicture(this.currentNodeWinInfo);
            var lineWins = this.getLineWins(this.currentNodeWinInfo);
            var scatterWins = this.getScatterWins(this.currentNodeWinInfo);
            var bonusWins = this.getBonusWins(this.currentNodeWinInfo);
            if (stage.equals(slotmodel.EStage.BASE_GAME)) {
                if (this.parseStage(gameLogicResponse).equals(slotmodel.EStage.BASE_GAME)) this.baseGameOutcome = new slotmodel.OutcomeImpl(reelPicture, null, lineWins, scatterWins, bonusWins, null, null);
                else if (this.baseGameOutcome == null) {
                    var mptResumeOutcomeJson = this.getMptResumeOutcomeJson(gameLogicResponse);
                    var mptResumeNodes = slotmodel.StdHelper.getArrayField(mptResumeOutcomeJson, "MptResumeNodes");
                    var mptGameOutcomeArray = slotmodel.MptHelper.getMGameOutcomeArray(mptResumeNodes);
                    var baseGameIndex = this.model.getConfiguration().getGameConfiguration().getBaseGameIndex();
                    var nodeWinInfo = slotmodel.MptHelper.getNodeWinInfoFromOutcomeArray(mptGameOutcomeArray, baseGameIndex);
                    reelPicture = this.getReelPicture(nodeWinInfo);
                    lineWins = this.getLineWins(nodeWinInfo);
                    scatterWins = this.getScatterWins(nodeWinInfo);
                    bonusWins = this.getBonusWins(nodeWinInfo);
                    this.baseGameOutcome = new slotmodel.OutcomeImpl(reelPicture, null, lineWins, scatterWins, bonusWins, null, null);
                }
                return this.baseGameOutcome;
            } else if (stage.equals(slotmodel.EStage.FREE_SPIN)) {
                var freeSpinOutcome = null;
                if (this.isFreeSpinEnter(gameLogicResponse)) {
                    var fsReelPicture = slotDefinition.startFSReelPicture;
                    lineWins = [];
                    scatterWins = [];
                    bonusWins = [];
                    freeSpinOutcome = new slotmodel.OutcomeImpl(fsReelPicture, null, lineWins, scatterWins, bonusWins, null, null);
                } else if (this.parseStage(gameLogicResponse).equals(slotmodel.EStage.FREE_SPIN)) freeSpinOutcome = new slotmodel.OutcomeImpl(reelPicture, null, lineWins, scatterWins, bonusWins, null, null);
                return freeSpinOutcome;
            }
            return null;
        };
        slotmodel.MptResponseParser.prototype.parsePickerOutcome = function(gameLogicResponse, slotDefinition) {
            return null;
        };
        slotmodel.MptResponseParser.prototype.parseSelectableLines = function(paytableResponse) {
            var selectableLines = this.parseSelectableLinesFromPatternInfo(paytableResponse);
            if (selectableLines == null) selectableLines = this.parseSelectableLinesFromPatternSliderInfo(paytableResponse);
            return selectableLines;
        };
        slotmodel.MptResponseParser.prototype.parseSelectableLinesFromPatternSliderInfo = function(paytableResponse) {
            var patternInfoObject = slotmodel.StdHelper.getField(paytableResponse, "PatternSliderInfo.PatternInfo");
            if (patternInfoObject == null) return null;
            var selectableLines = [];
            var max = slotmodel.StdHelper.parseIntField(patternInfoObject, "@max", $bind(this, this.onParseFatalError));
            if (max == null) return null;
            var min = slotmodel.StdHelper.parseIntField(patternInfoObject, "@min", $bind(this, this.onParseFatalError));
            if (min == null) return null;
            if (min == max) selectableLines.push(min);
            else {
                var sideBets = this.parseSideBets(paytableResponse);
                selectableLines = slotmodel.StdHelper.parseIntArrayField(patternInfoObject, "Step", $bind(this, this.onParseFatalError));
                if (sideBets.length > 0) {
                    if (sideBets.length == selectableLines.length) selectableLines = [min];
                    else throw new js._Boot.HaxeError("Cannot parseSelectableLines when line count is not fixed & sideBets exist! - NOT IMPLEMENTED");
                }
            }
            return selectableLines;
        };
        slotmodel.MptResponseParser.prototype.parseSelectableLinesFromPatternInfo = function(paytableResponse) {
            var patternInfos = slotmodel.StdHelper.getArrayField(paytableResponse, "PatternInfo");
            if (patternInfos == null) return null;
            var selectableLines = null;
            var _g = 0;
            while (_g < patternInfos.length) {
                var patternInfo = patternInfos[_g];
                ++_g;
                var name = slotmodel.StdHelper.getField(patternInfo, "@name");
                if (name == "SelectableLinesInfo") {
                    var min = slotmodel.StdHelper.parseIntField(patternInfo, "@min", null);
                    var max = slotmodel.StdHelper.parseIntField(patternInfo, "@max", null);
                    if (min == null || max == null) return null;
                    if (min == max) return [min];
                    else {
                        var stepsArray = slotmodel.StdHelper.getIntArrayField(patternInfo, "Step");
                        if (stepsArray == null) return null;
                        return stepsArray;
                    }
                }
            }
            return selectableLines;
        };
        slotmodel.MptResponseParser.prototype.parseSelectedLineCount = function(gameLogicResponse) {
            var lines = slotmodel.StdHelper.parseIntField(gameLogicResponse, "MptResumeOutcome.Wager.Lines", $bind(this, this.onParseFatalError));
            return lines;
        };
        slotmodel.MptResponseParser.prototype.parseSelectedSideBet = function(gameLogicResponse) {
            var sideBet = slotmodel.StdHelper.parseIntField(gameLogicResponse, "MptResumeOutcome.Wager.SideBet", $bind(this, this.onParseFatalError));
            if (sideBet == null) sideBet = 0;
            return sideBet;
        };
        slotmodel.MptResponseParser.prototype.parseSideBets = function(paytableResponse) {
            var result = [];
            var wagerArray = slotmodel.StdHelper.getField(paytableResponse, "WagerInfo.Wager");
            if (wagerArray == null) return result;
            var _g = 0;
            while (_g < wagerArray.length) {
                var wager = wagerArray[_g];
                ++_g;
                var value = _hcmn_.Std.parseInt(slotmodel.StdHelper.getField(wager, "#text"));
                result.push(value);
            }
            return result;
        };
        slotmodel.MptResponseParser.prototype.parseStartReelPicture = function(gameLogicResponse, stage) {
            var mptGameOutcomeJson = this.getMptGameOutcomeJson(gameLogicResponse);
            this.mptGameOutcome = slotmodel.MptHelper.getMptGameOutcome(mptGameOutcomeJson);
            this.setCurrentNodeWinInfoFromOutcome();
            var result = null;
            if (stage.equals(slotmodel.EStage.BASE_GAME)) result = this.getReelPicture(this.currentNodeWinInfo);
            else if (stage.equals(slotmodel.EStage.FREE_SPIN)) result = this.getReelPictureFS(this.currentNodeWinInfo);
            return result;
        };
        slotmodel.MptResponseParser.prototype.parseTotalFreeSpinCredit = function(gameLogicResponse) {
            return this.mOutcome.featureWin;
        };
        slotmodel.MptResponseParser.prototype.parseTotalGameCredit = function(gameLogicResponse) {
            var totalGameCredit = this.mOutcome.featureWin + this.mOutcome.baseGameWin;
            return totalGameCredit;
        };
        slotmodel.MptResponseParser.prototype.parseTotalPickerCredit = function(gameLogicResponse) {
            return null;
        };
        slotmodel.MptResponseParser.prototype.getMptGameOutcomeJson = function(gameLogicResponse) {
            return slotmodel.StdHelper.getField(gameLogicResponse, "MptGameOutcome");
        };
        slotmodel.MptResponseParser.prototype.getMptResumeOutcomeJson = function(gameLogicResponse) {
            return slotmodel.StdHelper.getField(gameLogicResponse, "MptResumeOutcome");
        };
        slotmodel.MptResponseParser.prototype.setCurrentNodeWinInfoFromOutcome = function() {
            this.mOutcome = this.mptGameOutcome.outcome;
            this.currentNodeWinInfo = null;
            var _g = 0;
            var _g1 = this.mOutcome.nodeWinInfos;
            while (_g < _g1.length) {
                var nodeWinInfo = _g1[_g];
                ++_g;
                if (nodeWinInfo.node.argument == this.mOutcome.currentNode.argument && nodeWinInfo.node.index == this.mOutcome.currentNode.index) this.currentNodeWinInfo = nodeWinInfo;
            }
        };
        slotmodel.MptResponseParser.prototype.getAwardedFS = function(nodeWinInfo) {
            var result = 0;
            var _g = 0;
            var _g1 = nodeWinInfo.winInfos;
            while (_g < _g1.length) {
                var winInfo = _g1[_g];
                ++_g;
                if (!(this.isAwardedFS(winInfo) || this.isRetriggerFS(winInfo))) continue;
                result = winInfo.basicWin;
                break;
            }
            return result;
        };
        slotmodel.MptResponseParser.prototype.isAwardedFS = function(winInfo) {
            return winInfo.info == slotmodel.MptResponseParser.WININFO_FREE_SPIN_TRIGGER;
        };
        slotmodel.MptResponseParser.prototype.getIsRetriggered = function(nodeWinInfo) {
            var _g = 0;
            var _g1 = nodeWinInfo.winInfos;
            while (_g < _g1.length) {
                var winInfo = _g1[_g];
                ++_g;
                if (this.isRetriggerFS(winInfo)) return true;
            }
            return false;
        };
        slotmodel.MptResponseParser.prototype.isRetriggerFS = function(winInfo) {
            return winInfo.info == slotmodel.MptResponseParser.WININFO_FREE_SPIN_RETRIGGER;
        };
        slotmodel.MptResponseParser.prototype.getIsMaxAwarded = function(nodeWinInfo) {
            return _hcmn_.Lambda.exists(nodeWinInfo.winInfos, $bind(this, this.isMaxAwardedFS));
        };
        slotmodel.MptResponseParser.prototype.isMaxAwardedFS = function(winInfo) {
            return winInfo.infoString == slotmodel.MptResponseParser.INFOSTRING_MAX_AWARDED_FREE_SPIN;
        };
        slotmodel.MptResponseParser.prototype.getTotalFS = function(nodeWinInfo) {
            var result = 0;
            var _g = 0;
            var _g1 = nodeWinInfo.winInfos;
            while (_g < _g1.length) {
                var winInfo = _g1[_g];
                ++_g;
                if (!this.isTotalFS(winInfo)) continue;
                result = winInfo.multiplier1;
                break;
            }
            return result;
        };
        slotmodel.MptResponseParser.prototype.isTotalFS = function(winInfo) {
            return winInfo.info == slotmodel.MptResponseParser.WININFO_CURRENT_FREE_SPIN;
        };
        slotmodel.MptResponseParser.prototype.getCurrentFS = function(nodeWinInfo) {
            var result = 0;
            var _g = 0;
            var _g1 = nodeWinInfo.winInfos;
            while (_g < _g1.length) {
                var winInfo = _g1[_g];
                ++_g;
                if (!this.isCurrentFS(winInfo)) continue;
                result = winInfo.multiplier2;
                break;
            }
            return result;
        };
        slotmodel.MptResponseParser.prototype.isCurrentFS = function(winInfo) {
            return winInfo.info == slotmodel.MptResponseParser.WININFO_CURRENT_FREE_SPIN;
        };
        slotmodel.MptResponseParser.prototype.isFreeSpinEnter = function(gameLogicResponse) {
            return this.parseStage(gameLogicResponse).equals(slotmodel.EStage.BASE_GAME) && this.parseNextStage(gameLogicResponse).equals(slotmodel.EStage.FREE_SPIN);
        };
        slotmodel.MptResponseParser.prototype.isFreeSpinExit = function(gameLogicResponse) {
            return this.parseStage(gameLogicResponse).equals(slotmodel.EStage.FREE_SPIN) && this.parseNextStage(gameLogicResponse).equals(slotmodel.EStage.BASE_GAME);
        };
        slotmodel.MptResponseParser.prototype.getReelPicture = function(nodeWinInfo) {
            var reelPictureOriginal = nodeWinInfo.reelPicture;
            if (reelPictureOriginal == null) return null;
            return this.getReelPic(reelPictureOriginal);
        };
        slotmodel.MptResponseParser.prototype.getReelPictureFS = function(nodeWinInfo) {
            var reelPictureOriginal = null;
            var _g = 0;
            var _g1 = nodeWinInfo.winInfos;
            while (_g < _g1.length) {
                var winInfo = _g1[_g];
                ++_g;
                if (!this.isStartFSReelPicture(winInfo)) continue;
                reelPictureOriginal = this.createReelPictureFromSymbolMatrix(winInfo.symbol);
                if (reelPictureOriginal == null) return null;
            }
            return this.getReelPic(reelPictureOriginal);
        };
        slotmodel.MptResponseParser.prototype.isStartFSReelPicture = function(winInfo) {
            return winInfo.info == slotmodel.MptResponseParser.WININFO_FREE_SPIN_INIT_PICTURE;
        };
        slotmodel.MptResponseParser.prototype.getReelPic = function(reelPictureOriginal) {
            if (reelPictureOriginal == null) return null;
            var reelPicture = [];
            var _g = 0;
            while (_g < reelPictureOriginal.length) {
                var row = reelPictureOriginal[_g];
                ++_g;
                var index = 0;
                var _g1 = 0;
                while (_g1 < row.length) {
                    var cell = row[_g1];
                    ++_g1;
                    if (reelPicture.length == index) reelPicture.push([]);
                    reelPicture[index++].push(cell == null ? "null" : "" + cell);
                }
            }
            return new slotModelApi.ReelPicture(reelPicture);
        };
        slotmodel.MptResponseParser.prototype.getLineWins = function(nodeWinInfo) {
            var lineWinArray = [];
            var _g = 0;
            var _g1 = nodeWinInfo.winInfos;
            while (_g < _g1.length) {
                var winInfo = _g1[_g];
                ++_g;
                if (!this.isLineWin(winInfo)) continue;
                var name = winInfo.infoString;
                var lineId = winInfo.lineNumber;
                var price = new money.Money(winInfo.basicWin == null ? "null" : "" + winInfo.basicWin);
                var multiplier = winInfo.multiplier2;
                var payout = winInfo.creditWin;
                var winPath = this.createReelPictureInfoFromSymbolMatrix(winInfo.symbol);
                var winningSymbol = name.split(" ")[1];
                var symbolCount = _hcmn_.Std.parseInt(name.split(" ")[0]);
                var lineWin = new slotmodel.LineWinImpl(lineId, name, slotmodel.ELineType.ofSymbol(winInfo.conditionId));
                lineWin.setPayProperties(null, price, multiplier, payout);
                lineWin.setRenderProperties(winningSymbol, 0, symbolCount);
                lineWin.setWinPath(winPath);
                lineWinArray.push(lineWin);
            }
            return lineWinArray;
        };
        slotmodel.MptResponseParser.prototype.isLineWin = function(winInfo) {
            var isCredit = winInfo.winType == slotmodel.EWinInfo.WIN_TYPE_CREDIT;
            var isLineLeft = winInfo.conditionId == slotmodel.ECondition._c_LINE_LEFT;
            var isLineRight = winInfo.conditionId == slotmodel.ECondition._c_LINE_RIGHT;
            var isLineAny = winInfo.conditionId == slotmodel.ECondition._c_LINE_ANY;
            return isCredit && (isLineLeft || isLineRight || isLineAny);
        };
        slotmodel.MptResponseParser.prototype.getScatterWins = function(nodeWinInfo) {
            var scatterWinArray = [];
            var _g = 0;
            var _g1 = nodeWinInfo.winInfos;
            while (_g < _g1.length) {
                var winInfo = _g1[_g];
                ++_g;
                if (!this.isScatterWin(winInfo)) continue;
                var name = winInfo.infoString;
                var price = new money.Money(winInfo.basicWin == null ? "null" : "" + winInfo.basicWin);
                var multiplier = winInfo.multiplier2;
                var payout = winInfo.creditWin;
                var winPath = this.createReelPictureInfoFromSymbolMatrix(winInfo.symbol);
                var winningSymbol = name.split(" ")[1];
                var symbolCount = _hcmn_.Std.parseInt(name.split(" ")[0]);
                var scatterWin = new slotmodel.ScatterWinImpl(name);
                scatterWin.setPayProperties(null, price, multiplier, payout);
                scatterWin.setRenderProperties(winningSymbol, 0, symbolCount);
                scatterWin.setWinPath(winPath);
                scatterWinArray.push(scatterWin);
            }
            return scatterWinArray;
        };
        slotmodel.MptResponseParser.prototype.isScatterWin = function(winInfo) {
            return winInfo.info == slotmodel.MptResponseParser.WININFO_SCATTER_CREDIT;
        };
        slotmodel.MptResponseParser.prototype.getBonusWins = function(nodeWinInfo) {
            var bonusWinArray = [];
            var _g = 0;
            var _g1 = nodeWinInfo.winInfos;
            while (_g < _g1.length) {
                var winInfo = _g1[_g];
                ++_g;
                if (!this.isBonusWin(winInfo)) continue;
                var bonusWin = this.getBonusWin(winInfo);
                if (bonusWin != null) bonusWinArray.push(bonusWin);
            }
            return bonusWinArray;
        };
        slotmodel.MptResponseParser.prototype.isBonusWin = function(winInfo) {
            return winInfo.info == slotmodel.MptResponseParser.WININFO_WILD_TRANSFORMATION;
        };
        slotmodel.MptResponseParser.prototype.getBonusWin = function(winInfo) {
            if (winInfo.info == slotmodel.MptResponseParser.WININFO_WILD_TRANSFORMATION) return this.getWilds(winInfo);
            else return null;
        };
        slotmodel.MptResponseParser.prototype.getWilds = function(winInfo) {
            var type = "Wilds";
            var id = "Reel";
            var name = winInfo.infoString;
            var lineId = 0;
            var price = new money.Money(winInfo.basicWin == null ? "null" : "" + winInfo.basicWin);
            var multiplier = winInfo.multiplier2;
            var payout = winInfo.creditWin;
            var winPath = this.createReelPictureInfoFromSymbolMatrix(winInfo.symbol);
            var winningSymbol = name.split(" ")[1];
            var symbolCount = _hcmn_.Std.parseInt(name.split(" ")[0]);
            var position = 0;
            var _g = 0;
            var _g1 = winPath.reelsInfo;
            while (_g < _g1.length) {
                var reel = _g1[_g];
                ++_g;
                if (_hcmn_.HxOverrides.indexOf(reel, slotmodel.EReelPictureInfo.ACTIVE.value, 0) != -1) break;
                position++;
            }
            id = id + position;
            var bonusWin = new slotmodel.BonusWinImpl(type, id, name, lineId);
            bonusWin.setPayProperties(null, price, multiplier, payout);
            bonusWin.setRenderProperties(winningSymbol, position, symbolCount);
            bonusWin.setWinPath(winPath);
            return bonusWin;
        };
        slotmodel.MptResponseParser.prototype.createReelPictureInfoFromSymbolMatrix = function(symbolMatrix) {
            var result = this.createBlankReelPictureInfo(this.slotDefinition.reelPictureSize);
            var rowIndex = 0;
            while (rowIndex < symbolMatrix.length) {
                var symbolRow = symbolMatrix[rowIndex];
                var columnIndex = 0;
                while (columnIndex < symbolRow.length) {
                    var symbol = symbolRow[columnIndex];
                    result[columnIndex][rowIndex] = slotmodel.EReelPictureInfo.ofSymbol(symbol).value;
                    columnIndex++;
                }
                rowIndex++;
            }
            return new slotModelApi.ReelPictureInfo(result);
        };
        slotmodel.MptResponseParser.prototype.createBlankReelPictureInfo = function(reelPictureSize) {
            var result = [];
            while (result.length < reelPictureSize.reelCount) {
                var reel = [];
                while (reel.length < reelPictureSize.reelLength) reel.push(slotmodel.EReelPictureInfo.NONE.value);
                result.push(reel);
            }
            return result;
        };
        slotmodel.MptResponseParser.prototype.createReelPictureFromSymbolMatrix = function(symbolMatrix) {
            var result = [];
            var rowIndex = 0;
            while (rowIndex < symbolMatrix.length) {
                var symbolRow = symbolMatrix[rowIndex];
                result.push(symbolRow);
                rowIndex++;
            }
            return result;
        };
        slotmodel.MptResponseParser.prototype.__class__ = slotmodel.MptResponseParser;
        slotmodel.PF = function() {};
        slotmodel.PF.__name__ = ["slotmodel", "PF"];
        slotmodel.PF.prototype.__class__ = slotmodel.PF;
        slotmodel.PfBusController = function(model) {
            this.parseError = false;
            this.parser = null;
            this.model = model;
            this.pfStateMachineControler = new slotmodel.PfStateMachineControler(this);
        };
        slotmodel.PfBusController.__name__ = ["slotmodel", "PfBusController"];
        slotmodel.PfBusController.prototype.model = null;
        slotmodel.PfBusController.prototype.subscriptions = null;
        slotmodel.PfBusController.prototype.pfStateMachineControler = null;
        slotmodel.PfBusController.prototype.parser = null;
        slotmodel.PfBusController.prototype.parseError = null;
        slotmodel.PfBusController.prototype.clientServicePort = null;
        slotmodel.PfBusController.prototype.consoleServicePort = null;
        slotmodel.PfBusController.prototype.gamePort = null;
        slotmodel.PfBusController.prototype.kernelPort = null;
        slotmodel.PfBusController.prototype.loaderChannel = null;
        slotmodel.PfBusController.prototype.systemInitPayload = null;
        slotmodel.PfBusController.prototype.paytableResponse = null;
        slotmodel.PfBusController.prototype.initGameLogicResponse = null;
        slotmodel.PfBusController.prototype.currencyResponse = null;
        slotmodel.PfBusController.prototype.serverType = null;
        slotmodel.PfBusController.prototype.continueAction = null;
        slotmodel.PfBusController.prototype.start = function(context) {
            this.clientServicePort = pfCommunicatorApi.ClientServicePort["use"](slotmodel.KernelHelper.getChannel(context, slotmodel.PF.EVENTBUS_CHANNEL_CLIENT_SERVICE));
            this.consoleServicePort = pfCommunicatorApi.ConsoleServicePort["use"](slotmodel.KernelHelper.getChannel(context, slotmodel.PF.EVENTBUS_CHANNEL_CONSOLE_SERVICE));
            this.gamePort = pfCommunicatorApi.GamePort["use"](slotmodel.KernelHelper.getChannel(context, slotmodel.PF.EVENTBUS_CHANNEL_GAME));
            this.kernelPort = pfCommunicatorApi.KernelPort["use"](slotmodel.KernelHelper.getChannel(context, slotmodel.PF.EVENTBUS_CHANNEL_KERNEL));
            this.loaderChannel = slotmodel.KernelHelper.getChannel(context, slotmodel.PF.EVENTBUS_CHANNEL_LOADER);
            this.serverType = this.getGameConfiguration().getServerType();
            if (slotmodel.EServerType.GLE.equals(this.serverType)) {
                this.parser = new slotmodel.GleResponseParser($bind(this, this.onError), this.model.getPluginController(), this.model);
                this.continueAction = slotmodel.PfBusController.GLE_CONTINUE_ACTION;
            } else if (slotmodel.EServerType.MPT.equals(this.serverType)) {
                this.parser = new slotmodel.MptResponseParser($bind(this, this.onError), this.model.getPluginController(), this.model);
                this.continueAction = slotmodel.PfBusController.MPT_CONTINUE_ACTION;
            }
            this.subscribe();
        };
        slotmodel.PfBusController.prototype.stop = function() {
            this.unSubscribe();
        };
        slotmodel.PfBusController.prototype.unSubscribe = function() {
            if (this.subscriptions != null) {
                var subscription;
                var _g = 0;
                var _g1 = this.subscriptions;
                while (_g < _g1.length) {
                    var subscription1 = _g1[_g];
                    ++_g;
                    subscription1.unsubscribe();
                }
            }
        };
        slotmodel.PfBusController.prototype.subscribe = function() {
            this.subscriptions = [];
            this.subscriptions.push(this.kernelPort.getSystemInit().subscribe($bind(this, this.handleSystemInit)));
            this.subscriptions.push(this.clientServicePort.getGameInit().subscribe($bind(this, this.handleGameInit)));
            this.subscriptions.push(this.kernelPort.getSystemReady().subscribe($bind(this, this.handleSystemReady)));
            this.subscriptions.push(this.clientServicePort.getAccountBalances().subscribe($bind(this, this.handleAccountBalances)));
            this.subscriptions.push(this.clientServicePort.getStateChange().subscribe(($_ = this.pfStateMachineControler, $bind($_, $_.handleStateChangeEvent))));
            this.subscriptions.push(this.clientServicePort.getErrorHandlerNotify().subscribe($bind(this, this.handleError)));
            this.subscriptions.push(this.clientServicePort.getStopAutospin().subscribe($bind(this, this.handleStopAutospin)));
            this.subscriptions.push(this.consoleServicePort.getGameHelpPage().subscribe($bind(this, this.handleHelpPageRequested)));
            this.subscriptions.push(this.consoleServicePort.getGamePaytablePage().subscribe($bind(this, this.handlePaytablePageRequested)));
            this.subscriptions.push(this.consoleServicePort.getConsoleControlEvent().subscribe($bind(this, this.handleConsoleControlEvent)));
        };
        slotmodel.PfBusController.prototype.getGameConfiguration = function() {
            return this.model.getConfiguration().getGameConfiguration();
        };
        slotmodel.PfBusController.prototype.getState = function() {
            return this.model.getState();
        };
        slotmodel.PfBusController.prototype.getSlotDefinition = function() {
            return this.getGameConfiguration().getSlotDefinition();
        };
        slotmodel.PfBusController.prototype.getPlayerConfiguration = function() {
            return this.model.getConfiguration().getPlayerConfiguration();
        };
        slotmodel.PfBusController.prototype.formatMoney = function(value) {
            var moneyFormatter = this.model.getMoneyFormatter();
            if (moneyFormatter == null) return value.value;
            return moneyFormatter.format(value.value);
        };
        slotmodel.PfBusController.prototype.handleConsoleControlEvent = function(event) {
            var consoleControlEvent = event.getPayload();
            if (consoleControlEvent == null) return;
            var name = consoleControlEvent.option;
            if (name == slotmodel.PF.OPTION_STAKE_BET_PER_LINE || name == slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT) this.handleStakeOptionChanged(consoleControlEvent);
            else if (name == slotmodel.PF.OPTION_PAYTABLE) this.handlePaytablePageRequested(null);
            else if (name == slotmodel.PF.OPTION_HELP) this.handleHelpPageRequested(null);
            else {
                var option = consoleControlEvent.option;
                var value = consoleControlEvent.value;
                this.model.onGameOptionChangedFromPf(new slotModelApi.Pair(option, value));
            }
        };
        slotmodel.PfBusController.prototype.handleAccountBalances = function(event) {
            var balance = slotmodel.StdHelper.getField(event.getPayload(), "balance");
            var promoFreeSpinCount = slotmodel.StdHelper.parseIntField(event.getPayload(), "freespin", $bind(this, this.onParseFatalError));
            var accountBalances = new slotmodel.AccountBalances(balance, promoFreeSpinCount);
            this.getState().setAccountBalances(accountBalances);
            this.model.onBalanceChanged(accountBalances);
        };
        slotmodel.PfBusController.prototype.requestFullScreen = function() {
            this.gamePort.getFullscreen().publish(null);
        };
        slotmodel.PfBusController.prototype.initializePlatform = function() {};
        slotmodel.PfBusController.prototype.handleSystemInit = function(event) {
            this.systemInitPayload = event.getPayload();
            if (this.systemInitPayload == null) {
                var error = new slotmodel.Error(slotmodel.EErrorSource.PF_INITIALIZE, slotmodel.ErrorIdList.PF_PayloadError, true, "[handleSystemInit] systemInitPayload is null");
                this.onError(error);
                return;
            }
        };
        slotmodel.PfBusController.prototype.handleGameInit = function(event) {
            var gameInitPayload = event.getPayload();
            if (gameInitPayload == null) {
                var error = new slotmodel.Error(slotmodel.EErrorSource.PF_INITIALIZE, slotmodel.ErrorIdList.PF_PayloadError, true, "[handleGameInit] gameInitPayload is null");
                this.onError(error);
                return;
            }
            this.currencyResponse = slotmodel.StdHelper.getArrayField(gameInitPayload, "CurrencyResponse");
            this.initGameLogicResponse = slotmodel.StdHelper.getField(gameInitPayload, "GameLogicResponse");
            this.paytableResponse = slotmodel.StdHelper.getField(gameInitPayload, "PaytableResponse");
            this.setMoneyFormatterCurrencyFormat(this.systemInitPayload, this.currencyResponse);
            this.setGameLogicVersion();
            this.updateGameOptionValues();
            this.registerGameOptions();
            this.publishInitDone();
        };
        slotmodel.PfBusController.prototype.setMoneyFormatterCurrencyFormat = function(systemInitResponse, gameInitResponse) {
            var moneyFormatterControler = this.model.getMoneyFormatterController();
            if (moneyFormatterControler != null) {
                var currencyFormat = this.parser.getCurrencyFormat(systemInitResponse, this.currencyResponse);
                moneyFormatterControler.setCurrencyFormat(currencyFormat);
            }
        };
        slotmodel.PfBusController.prototype.publishInitDone = function() {
            var gameVersion = this.getGameConfiguration().getGameVersion();
            var gleVersion = this.getGameConfiguration().getGameLogicVersion();
            var version = new pfCommunicatorApi.Version(gameVersion, gleVersion);
            var initDone = new pfCommunicatorApi.InitDone(version);
            this.gamePort.getInitDone().publish(initDone);
        };
        slotmodel.PfBusController.prototype.handleSystemReady = function(event) {};
        slotmodel.PfBusController.prototype.onPlatformInitialized = function() {
            var slotDefinition = this.getSlotDefinition();
            var pfInitializedProperties = this.parser.parsePfInitializedResponse(this.systemInitPayload, this.initGameLogicResponse, this.paytableResponse, this.currencyResponse, slotDefinition);
            this.model.onPlatformInitialized(pfInitializedProperties);
        };
        slotmodel.PfBusController.prototype.initializeConsole = function() {
            if (!this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE) && !this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT) && !this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_TOTAL_STAKE)) return;
            var betPerLineCredit = this.getState().getNextBetPerLineCredit();
            var selectedLinesCount = this.getState().getNextSelectedLinesCount();
            var denomination = this.getState().getNextDenomination();
            var sideBet = this.getState().getNextSideBet();
            var totalStakeCredit = betPerLineCredit * (selectedLinesCount + sideBet);
            var betPerLine = denomination.mulInt(betPerLineCredit);
            var totalStake = denomination.mulInt(totalStakeCredit);
            this.updateConsoleStake(betPerLine, selectedLinesCount, totalStakeCredit, totalStake);
        };
        slotmodel.PfBusController.prototype.onGameInitialized = function() {
            if (!this.pfStateMachineControler.checkState("onGameInitialized", slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE)) return;
            this.publishHideDefaultPreloader();
        };
        slotmodel.PfBusController.prototype.startResume = function() {
            if (!this.pfStateMachineControler.checkState("startResume", slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE)) return;
            this.model.onResumeStarted();
        };
        slotmodel.PfBusController.prototype.onResumeStarted = function() {
            if (!this.pfStateMachineControler.checkState("onResumeStarted", slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_STAGE)) return;
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.onResumePrepared = function(stateChange) {
            if (!this.pfStateMachineControler.checkState("onResumePrepared", slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_NEXT_STAGE)) return;
            this.publishHideDefaultPreloader();
            var nextStage = this.parser.parseNextStageFromStageChange(stateChange);
            if (nextStage.equals(slotmodel.EStage.BASE_GAME)) return;
            if (nextStage.contains(slotmodel.EStage.FREE_SPIN)) {
                this.model.onFreeSpinPrepared();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.PICKER_BONUS)) {
                this.model.onPickerBonusPrepared();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.TUMBLE)) {
                this.model.onTumbleResumePrepared();
                return;
            }
        };
        slotmodel.PfBusController.prototype.prepareIdle = function() {
            if (!this.pfStateMachineControler.checkStates("prepareIdle", [slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE, slotmodel.PF.STATE_ON_END_GAME, slotmodel.PF.STATE_ON_ABORT_NEXT_STAGE])) return;
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.handleOnPFIdlePrepared = function() {
            this.model.onIdlePrepared();
        };
        slotmodel.PfBusController.prototype.handleOnPFFSIdlePrepared = function() {
            this.model.onFreeSpinPrepared();
        };
        slotmodel.PfBusController.prototype.handleOnPFPBIdlePrepared = function() {
            this.model.onPickerBonusPrepared();
        };
        slotmodel.PfBusController.prototype.setIdle = function() {
            this.enableConsoleOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE);
            this.enableConsoleOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT);
            this.enableConsoleOption(slotmodel.PF.OPTION_STAKE_TOTAL_STAKE);
            this.enableConsoleOption(slotmodel.PF.OPTION_HELP);
            this.enableConsoleOption(slotmodel.PF.OPTION_PAYTABLE);
        };
        slotmodel.PfBusController.prototype.setNotIdle = function() {
            this.disableConsoleOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE);
            this.disableConsoleOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT);
            this.disableConsoleOption(slotmodel.PF.OPTION_STAKE_TOTAL_STAKE);
            this.disableConsoleOption(slotmodel.PF.OPTION_HELP);
            this.disableConsoleOption(slotmodel.PF.OPTION_PAYTABLE);
        };
        slotmodel.PfBusController.prototype.confirmStakeChanged = function() {
            if (!this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE) && !this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT) && !this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_TOTAL_STAKE)) return;
            var currentBet = this.getState().getCurrentBet();
            var betPerLine = currentBet.getBetPerLine();
            var selectedLinesCount = currentBet.getSelectedLinesCount();
            var totalStakeCredit = currentBet.getTotalStakeCredit();
            var totalStake = currentBet.getTotalStake();
            this.updateConsoleStake(betPerLine, selectedLinesCount, totalStakeCredit, totalStake);
        };
        slotmodel.PfBusController.prototype.handleHelpPageRequested = function(event) {
            this.model.onHelpRequested(null);
        };
        slotmodel.PfBusController.prototype.handlePaytablePageRequested = function(event) {
            this.model.onPaytableRequested(null);
        };
        slotmodel.PfBusController.prototype.startSpinning = function() {
            if (!this.pfStateMachineControler.checkStates("startSpinning", [slotmodel.PF.STATE_ON_START_GAME_INITIAL, slotmodel.PF.STATE_ON_BEGIN_NEW_GAME, slotmodel.PF.STATE_ON_RESET_NEXT_STAGE, slotmodel.PF.STATE_ON_ENTER_NEXT_STAGE, slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE, slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_NEXT_STAGE])) return;
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.onSpinningStarted = function() {
            this.model.onSpinningStarted();
        };
        slotmodel.PfBusController.prototype.onPickingStarted = function() {
            this.model.onPickingStarted();
        };
        slotmodel.PfBusController.prototype.deductStake = function() {
            var value = this.getState().getCurrentBet().getTotalStake().value;
            var payload = parseFloat(value);
            this.gamePort.getDeductStake().publish(payload);
        };
        slotmodel.PfBusController.prototype.sendPlatformSpinRequest = function() {
            if (!this.pfStateMachineControler.checkState("sendPlatformSpinRequest", slotmodel.PF.STATE_ON_BEFORE_REQUEST)) return;
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.sendPlayRequest = function() {
            if (!this.pfStateMachineControler.checkState("sendPlayRequest", slotmodel.PF.STATE_ON_MAKE_REQUEST)) return;
            var action = "play";
            var betPerLineCredit = this.model.getState().getCurrentBet().getBetPerLineCredit();
            var selectedLinesCount = this.model.getState().getCurrentBet().getSelectedLinesCount();
            var sideBet = this.model.getState().getCurrentBet().getSideBet();
            var actionInput = new pfCommunicatorApi.ActionInput(action);
            var patternSliderInput = new pfCommunicatorApi.PatternSliderInput(betPerLineCredit, selectedLinesCount + sideBet);
            var wagerInput = this.parser.getWagerInput();
            var playData = new pfCommunicatorApi.PlayData(actionInput, patternSliderInput, wagerInput);
            this.gamePort.getPlay().publish(playData);
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.sendContinueRequest = function() {
            if (!this.pfStateMachineControler.checkState("sendContinueRequest", slotmodel.PF.STATE_ON_MAKE_REQUEST)) return;
            var betPerLineCredit = this.model.getState().getCurrentBet().getBetPerLineCredit();
            var selectedLinesCount = this.model.getState().getCurrentBet().getSelectedLinesCount();
            var sideBet = this.model.getState().getCurrentBet().getSideBet();
            var actionInput = new pfCommunicatorApi.ActionInput(this.continueAction);
            var patternSliderInput = new pfCommunicatorApi.PatternSliderInput(betPerLineCredit, selectedLinesCount + sideBet);
            var selectedPickerBonusChoice = this.model.getState().getSelectedPickerBonusChoice();
            var wagerInput = this.parser.getWagerInput();
            var playData = null;
            if (selectedPickerBonusChoice == null) playData = new pfCommunicatorApi.PlayData(actionInput, patternSliderInput, wagerInput);
            else {
                var pickerInput = new pfCommunicatorApi.PickerInput(selectedPickerBonusChoice);
                playData = new pfCommunicatorApi.PlayData(actionInput, patternSliderInput, wagerInput, pickerInput);
            }
            this.gamePort.getPlay().publish(playData);
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.onPlatformOutcomeReceived = function(gameLogicResponse) {
            if (!this.pfStateMachineControler.checkState("onPlatformOutcomeReceived", slotmodel.PF.STATE_ON_RESOLVE_STAGE)) return;
            if (gameLogicResponse == null) {
                var error = new slotmodel.Error(slotmodel.EErrorSource.PF_PLAY, slotmodel.ErrorIdList.PF_PayloadError, true, "[onPlatformOutcomeReceived] Payload is null");
                this.onError(error);
                return;
            }
            var slotDefinition = this.getGameConfiguration().getSlotDefinition();
            var pfSpinOutcome = this.parser.parsePfSpinOutcome(gameLogicResponse, slotDefinition);
            this.model.onPlatformOutcomeReceived(pfSpinOutcome);
        };
        slotmodel.PfBusController.prototype.calculateNextStage = function() {
            if (!this.pfStateMachineControler.checkState("calculateNextStage", slotmodel.PF.STATE_ON_RESOLVE_STAGE)) return;
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.onExitStage = function(stateChange) {
            if (!this.pfStateMachineControler.checkState("onExitStage", slotmodel.PF.STATE_ON_EXIT_STAGE)) return;
            var nextStage = this.parser.parseNextStageFromStageChange(stateChange);
            if (nextStage.contains(slotmodel.EStage.FREE_SPIN)) {
                this.model.onPrepareFreeSpin();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.PICKER_BONUS)) {
                this.model.onPreparePickerBonus();
                return;
            }
            if (nextStage.equals(slotmodel.EStage.BASE_GAME)) {
                this.pfStateMachineControler.replyToStateChangeEvent(null);
                return;
            }
            if (nextStage.contains(slotmodel.EStage.TUMBLE)) {
                this.pfStateMachineControler.replyToStateChangeEvent(null);
                return;
            }
        };
        slotmodel.PfBusController.prototype.prepareFSIdle = function() {
            if (!this.pfStateMachineControler.checkStates("prepareFSIdle", [slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE, slotmodel.PF.STATE_ON_EXIT_STAGE, slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE, slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_STAGE, slotmodel.PF.STATE_ON_ABORT_NEXT_STAGE])) return;
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_EXIT_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_ABORT_NEXT_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE)) {
                this.model.onFreeSpinPrepared();
                return;
            }
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
        };
        slotmodel.PfBusController.prototype.preparePBIdle = function() {
            if (!this.pfStateMachineControler.checkStates("preparePBIdle", [slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE, slotmodel.PF.STATE_ON_EXIT_STAGE, slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE, slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_STAGE, slotmodel.PF.STATE_ON_ABORT_NEXT_STAGE])) return;
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_EXIT_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_ABORT_NEXT_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE)) {
                this.model.onPickerBonusPrepared();
                return;
            }
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
        };
        slotmodel.PfBusController.prototype.onEnterNextStage = function(stateChange) {
            if (!this.pfStateMachineControler.checkState("onStageChanged", slotmodel.PF.STATE_ON_ENTER_NEXT_STAGE)) return;
            var nextStage = this.parser.parseNextStageFromStageChange(stateChange);
            if (nextStage.equals(slotmodel.EStage.BASE_GAME)) {
                this.pfStateMachineControler.replyToStateChangeEvent(null);
                return;
            }
            if (nextStage.contains(slotmodel.EStage.FREE_SPIN)) {
                this.model.onFreeSpinPrepared();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.PICKER_BONUS)) {
                this.model.onPickerBonusPrepared();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.TUMBLE)) {
                this.model.onTumble();
                return;
            }
        };
        slotmodel.PfBusController.prototype.onContinueProgressStage = function() {
            if (this.getState().isNextStagetumble()) {
                this.model.onTumble();
                return;
            }
            if (this.getState().isNextStageFreeSpin()) {
                this.model.onPrepareFreeSpin();
                return;
            }
            if (this.getState().isNextStagePickerBonus()) {
                this.model.onPreparePickerBonus();
                return;
            }
        };
        slotmodel.PfBusController.prototype.startFSSpinning = function() {
            if (!this.pfStateMachineControler.checkStates("startSpinning", [slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_NEXT_STAGE, slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE, slotmodel.PF.STATE_ON_ENTER_NEXT_STAGE, slotmodel.PF.STATE_ON_RESET_NEXT_STAGE])) return;
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.startPicking = function() {
            if (!this.pfStateMachineControler.checkStates("startPicking", [slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_NEXT_STAGE, slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE, slotmodel.PF.STATE_ON_ENTER_NEXT_STAGE, slotmodel.PF.STATE_ON_RESET_NEXT_STAGE])) return;
            this.pfStateMachineControler.replyToStateChangeEvent({});
        };
        slotmodel.PfBusController.prototype.onEndGame = function() {
            if (!this.pfStateMachineControler.checkState("onEndGame", slotmodel.PF.STATE_ON_END_GAME)) return;
            this.model.onEndGame();
        };
        slotmodel.PfBusController.prototype.onAbortSpinReceived = function(abortPayload) {
            if (!this.pfStateMachineControler.checkState("onAbortSpinReceived", slotmodel.PF.STATE_ON_ABORT_NEXT_STAGE)) return;
            if (abortPayload == null) {
                var error = new slotmodel.Error(slotmodel.EErrorSource.PF_PLAY, slotmodel.ErrorIdList.PF_PayloadError, true, "[onAbortSpinReceived] Payload is null");
                this.onError(error);
                return;
            }
            var slotDefinition = this.getGameConfiguration().getSlotDefinition();
            var pfAbortSpinProperties = this.parser.parsePfAbortProperties(abortPayload, slotDefinition);
            this.model.onPlatformAbortSpinReceived(pfAbortSpinProperties);
        };
        slotmodel.PfBusController.prototype.abortSpin = function() {
            this.confirmStakeChanged();
        };
        slotmodel.PfBusController.prototype.updateConsoleStake = function(betPerLine, selectedLinesCount, totalStakeCredit, totalStake) {
            if (!this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE) && !this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT) && !this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_TOTAL_STAKE)) return;
            if (this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE)) this.changeConsoleOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE, [betPerLine.value]);
            if (this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT)) this.changeConsoleOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT, [selectedLinesCount]);
            if (this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_TOTAL_STAKE)) this.changeConsoleOption(slotmodel.PF.OPTION_STAKE_TOTAL_STAKE, [parseFloat(totalStake.value), this.formatMoney(totalStake)]);
        };
        slotmodel.PfBusController.prototype.changeConsoleOption = function(name, params) {
            var control = new pfCommunicatorApi.GameControlEvent(name, "change", params);
            this.gamePort.getGameControlEvent().publish(control);
        };
        slotmodel.PfBusController.prototype.enableConsoleOption = function(name) {
            var control = new pfCommunicatorApi.GameControlEvent(name, "enable", [slotmodel.PF.CONSOLE_OPTION_ENABLED]);
            this.gamePort.getGameControlEvent().publish(control);
        };
        slotmodel.PfBusController.prototype.disableConsoleOption = function(name) {
            var control = new pfCommunicatorApi.GameControlEvent(name, "enable", [slotmodel.PF.CONSOLE_OPTION_DISABLED]);
            this.gamePort.getGameControlEvent().publish(control);
        };
        slotmodel.PfBusController.prototype.handleError = function(event) {
            var action = event.getPayload();
            var errorSource = slotmodel.EErrorSource.PF_GLOBAL;
            var errorId = slotmodel.ErrorIdList.PF_Unknown;
            var errorMessage = "Platform Framework error";
            if (action != null) errorMessage = "[" + _hcmn_.Std.string(action) + "]";
            var error = new slotmodel.Error(errorSource, errorId, true, errorMessage);
            this.onError(error);
        };
        slotmodel.PfBusController.prototype.onError = function(error) {
            this.model.onError(error);
        };
        slotmodel.PfBusController.prototype.sendAutoSpinsStopped = function() {
            this.gamePort.getAutoSpinStopped().publish(null);
        };
        slotmodel.PfBusController.prototype.sendAutoSpinsStarted = function() {
            this.gamePort.getAutoSpinStart().publish(null);
        };
        slotmodel.PfBusController.prototype.getModel = function() {
            return this.model;
        };
        slotmodel.PfBusController.prototype.onParseFatalError = function(message) {
            slotmodel.Log.getLogger(this).error("[onParseFatalError]" + message);
            this.parseError = true;
            this.onError(this.getFatalError(message));
        };
        slotmodel.PfBusController.prototype.getFatalError = function(message) {
            return new slotmodel.Error(slotmodel.EErrorSource.PF_RESPONSE_PARSER, slotmodel.ErrorIdList.PF_PayloadError, true, message);
        };
        slotmodel.PfBusController.prototype.setGameLogicVersion = function() {
            var gameLogicVersion = this.parser.parseGameLogicVersion(this.paytableResponse);
            this.getGameConfiguration().setGameLogicVersion(gameLogicVersion);
        };
        slotmodel.PfBusController.prototype.updateGameOptionValues = function() {
            if (this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE)) {
                var betsPerLine = this.parser.parseBetsPerLine(this.paytableResponse);
                this.getGameConfiguration().updateOptionBetPerLine(slotmodel.PF.OPTION_STAKE_BET_PER_LINE, betsPerLine, this.model.getMoneyFormatter());
            }
            if (this.getGameConfiguration().hasOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT)) {
                var selectableLines = this.parser.parseSelectableLines(this.paytableResponse);
                this.getGameConfiguration().updateOptionSelectableLines(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT, selectableLines);
            }
        };
        slotmodel.PfBusController.prototype.registerGameOptions = function() {
            var options = this.getGameConfiguration().getOptionsArray();
            this.gamePort.getRegister().publish(new pfCommunicatorApi.Options(options));
            this.disableConsoleOption(slotmodel.PF.OPTION_STAKE_BET_PER_LINE);
            this.disableConsoleOption(slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT);
            this.disableConsoleOption(slotmodel.PF.OPTION_STAKE_TOTAL_STAKE);
            this.disableConsoleOption(slotmodel.PF.OPTION_HELP);
            this.disableConsoleOption(slotmodel.PF.OPTION_PAYTABLE);
        };
        slotmodel.PfBusController.prototype.publishHideDefaultPreloader = function() {
            var hideDefaultPreloaderTopic = new clientkernelLoaderApi.HideDefaultPreloaderTopic();
            hideDefaultPreloaderTopic.connect(this.loaderChannel);
            hideDefaultPreloaderTopic.publish(null);
        };
        slotmodel.PfBusController.prototype.handleStakeOptionChanged = function(consoleControlEvent) {
            var name = consoleControlEvent.option;
            var value = consoleControlEvent.value;
            if (name == slotmodel.PF.OPTION_STAKE_BET_PER_LINE) this.onBetPerLineChanged(value);
            if (name == slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT) {
                var lineCount = slotmodel.StdHelper.parseInt(value, $bind(this, this.onParseFatalError));
                this.onSelectedLineCountChanged(lineCount);
            }
        };
        slotmodel.PfBusController.prototype.onBetPerLineChanged = function(value) {
            var currentBet = this.getState().getCurrentBet();
            var lineCount = currentBet.getSelectedLinesCount();
            var betPerLine = value;
            var sideBet = currentBet.getSideBet();
            var stakeItems = new slotModelApi.StakeItems(lineCount, betPerLine, sideBet);
            this.model.onStakeChanged(stakeItems);
        };
        slotmodel.PfBusController.prototype.onSelectedLineCountChanged = function(value) {
            var currentBet = this.getState().getCurrentBet();
            var lineCount = value;
            var betPerLine = currentBet.getBetPerLine().value;
            var sideBet = currentBet.getSideBet();
            var stakeItems = new slotModelApi.StakeItems(lineCount, betPerLine, sideBet);
            this.model.onStakeChanged(stakeItems);
        };
        slotmodel.PfBusController.prototype.handleStopAutospin = function(e) {
            this.model.onPFStopAutoSpinsRequested();
        };
        slotmodel.PfBusController.prototype.requestAutospinsPF = function(payload) {
            var _g = this;
            var requestPayload = new pfCommunicatorApi.AutospinPayload(payload.steps, payload.lossLimit, payload.winLimit);
            this.gamePort.getAutoSpinOption().request(requestPayload, 0).then(function(data) {
                if (data.action == "play") _g.model.onStartAutoSpinsReplied(data.steps);
                else _g.model.onStartAutoSpinsRepliedCancel();
            });
        };
        slotmodel.PfBusController.prototype.prepareTumble = function() {
            if (this.pfStateMachineControler.isState(slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE)) {
                this.pfStateMachineControler.replyToStateChangeEvent({});
                return;
            }
        };
        slotmodel.PfBusController.prototype.__class__ = slotmodel.PfBusController;
        slotmodel.PfStateMachineControler = function(pfBusController) {
            this.pfBusController = pfBusController;
        };
        slotmodel.PfStateMachineControler.__name__ = ["slotmodel", "PfStateMachineControler"];
        slotmodel.PfStateMachineControler.prototype.pfBusController = null;
        slotmodel.PfStateMachineControler.prototype.currentStateChangeEvent = null;
        slotmodel.PfStateMachineControler.prototype.onError = function(error) {
            this.pfBusController.onError(error);
        };
        slotmodel.PfStateMachineControler.prototype.handleStateChangeEvent = function(event) {
            var stateChange = event.getPayload();
            if (stateChange == null) {
                var error = new slotmodel.Error(slotmodel.EErrorSource.PF_INITIALIZE, slotmodel.ErrorIdList.PF_PayloadError, true, "[handleStateChange] stateChange payload is null");
                this.onError(error);
                return;
            }
            if (this.currentStateChangeEvent != null) {
                var error1 = new slotmodel.Error(slotmodel.EErrorSource.PF_INITIALIZE, slotmodel.ErrorIdList.PF_StateChangeError, true, "[handleStateChange] Received new StateChangeEvent: " + stateChange.state + " but there is unfinished event: " + this.currentStateChangeEvent.getPayload().state);
                this.onError(error1);
                return;
            }
            slotmodel.Log.getLogger(this).debug("[handleStateChange] " + stateChange.state);
            this.currentStateChangeEvent = event;
            if (stateChange.state == slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE) this.handleOnBeforeShowStage(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_START_GAME_INITIAL) this.handleOnStartGameInitial(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_STAGE) this.handleOnStartGameInProgressStage(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_NEXT_STAGE) this.handleOnStartGameInProgressNextStage(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_BEFORE_REQUEST) this.handleOnBeforeRequest(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_MAKE_REQUEST) this.handleOnMakeRequest(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_RESOLVE_STAGE) this.handleOnResolveStage(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_END_GAME) this.handleOnEndGame(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_BEGIN_NEW_GAME) this.handleOnBeginNewGame(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_ABORT_NEXT_STAGE) this.handleOnAbortNextStage(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_RESET_NEXT_STAGE) this.handleOnResetNextStage(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_EXIT_STAGE) this.handleOnExitStage(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_ENTER_NEXT_STAGE) this.handleOnEnterNextStage(event);
            if (stateChange.state == slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE) this.handleOnInProgressStage(event);
        };
        slotmodel.PfStateMachineControler.prototype.isState = function(expectedState) {
            if (this.currentStateChangeEvent == null) return false;
            if (this.currentStateChangeEvent.getPayload().state != expectedState) return false;
            return true;
        };
        slotmodel.PfStateMachineControler.prototype.checkState = function(handlerInfo, expectedState) {
            if (this.currentStateChangeEvent == null) {
                var error = new slotmodel.Error(slotmodel.EErrorSource.PF_STATECHANGE, slotmodel.ErrorIdList.PF_StateChangeError, true, "[" + handlerInfo + "] currentStateChangeEvent is null and it should be " + expectedState + ";");
                this.onError(error);
                return false;
            }
            if (this.currentStateChangeEvent.getPayload().state != expectedState) {
                var error1 = new slotmodel.Error(slotmodel.EErrorSource.PF_STATECHANGE, slotmodel.ErrorIdList.PF_StateChangeError, true, "[" + handlerInfo + "] currentStateChangeEvent is " + this.currentStateChangeEvent.getPayload().state + " and it should be " + expectedState + ";");
                this.onError(error1);
                return false;
            }
            return true;
        };
        slotmodel.PfStateMachineControler.prototype.checkStates = function(handlerInfo, expectedStates) {
            var expectedStateList = expectedStates.join(",");
            if (this.currentStateChangeEvent == null) {
                var error = new slotmodel.Error(slotmodel.EErrorSource.PF_STATECHANGE, slotmodel.ErrorIdList.PF_StateChangeError, true, "[" + handlerInfo + "] currentStateChangeEvent is null and it should be " + expectedStateList + ";");
                this.onError(error);
                return false;
            }
            if (!(expectedStateList.indexOf(this.currentStateChangeEvent.getPayload().state) >= 0)) {
                var error1 = new slotmodel.Error(slotmodel.EErrorSource.PF_STATECHANGE, slotmodel.ErrorIdList.PF_StateChangeError, true, "[" + handlerInfo + "] currentStateChangeEvent is " + this.currentStateChangeEvent.getPayload().state + " and it should be " + expectedStateList + ";");
                this.onError(error1);
                return false;
            }
            return true;
        };
        slotmodel.PfStateMachineControler.prototype.replyToStateChangeEvent = function(data) {
            var event = this.currentStateChangeEvent;
            this.currentStateChangeEvent = null;
            var replyPayload = new slotmodel.StateChangeReply(event.getPayload().state, data);
            event.reply(replyPayload);
        };
        slotmodel.PfStateMachineControler.prototype.handleOnBeforeShowStage = function(event) {
            this.pfBusController.onPlatformInitialized();
        };
        slotmodel.PfStateMachineControler.prototype.handleOnStartGameInitial = function(event) {
            this.pfBusController.handleOnPFIdlePrepared();
        };
        slotmodel.PfStateMachineControler.prototype.handleOnBeginNewGame = function(event) {
            this.pfBusController.handleOnPFIdlePrepared();
        };
        slotmodel.PfStateMachineControler.prototype.handleOnStartGameInProgressStage = function(event) {
            this.pfBusController.onResumeStarted();
        };
        slotmodel.PfStateMachineControler.prototype.handleOnStartGameInProgressNextStage = function(event) {
            this.pfBusController.onResumePrepared(event.getPayload());
        };
        slotmodel.PfStateMachineControler.prototype.handleOnBeforeRequest = function(event) {
            var nextStageString = event.getPayload().nextStage;
            var nextStage = new slotmodel.EStage(nextStageString);
            if (nextStage.equals(slotmodel.EStage.BASE_GAME)) {
                this.pfBusController.onSpinningStarted();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.FREE_SPIN)) {
                this.pfBusController.onSpinningStarted();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.PICKER_BONUS)) {
                this.pfBusController.onPickingStarted();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.TUMBLE)) {
                this.pfBusController.onSpinningStarted();
                return;
            }
        };
        slotmodel.PfStateMachineControler.prototype.handleOnMakeRequest = function(event) {
            var nextStageString = event.getPayload().nextStage;
            var nextStage = new slotmodel.EStage(nextStageString);
            if (nextStage.equals(slotmodel.EStage.BASE_GAME)) {
                this.pfBusController.sendPlayRequest();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.FREE_SPIN)) {
                this.pfBusController.sendContinueRequest();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.PICKER_BONUS)) {
                this.pfBusController.sendContinueRequest();
                return;
            }
            if (nextStage.contains(slotmodel.EStage.TUMBLE)) this.pfBusController.sendPlayRequest();
        };
        slotmodel.PfStateMachineControler.prototype.handleOnResolveStage = function(event) {
            var platformOutcome = event.getPayload().response;
            this.pfBusController.onPlatformOutcomeReceived(platformOutcome);
        };
        slotmodel.PfStateMachineControler.prototype.handleOnEndGame = function(event) {
            this.pfBusController.onEndGame();
        };
        slotmodel.PfStateMachineControler.prototype.handleOnAbortNextStage = function(event) {
            var abortPayload = event.getPayload().response;
            this.pfBusController.onAbortSpinReceived(abortPayload);
        };
        slotmodel.PfStateMachineControler.prototype.handleOnResetNextStage = function(event) {
            var nextStageString = event.getPayload().nextStage;
            var nextStage = new slotmodel.EStage(nextStageString);
            if (nextStage.contains(slotmodel.EStage.BASE_GAME)) this.pfBusController.handleOnPFIdlePrepared();
            if (nextStage.contains(slotmodel.EStage.FREE_SPIN)) this.pfBusController.handleOnPFFSIdlePrepared();
            if (nextStage.contains(slotmodel.EStage.PICKER_BONUS)) this.pfBusController.handleOnPFPBIdlePrepared();
        };
        slotmodel.PfStateMachineControler.prototype.handleOnExitStage = function(event) {
            this.pfBusController.onExitStage(event.getPayload());
        };
        slotmodel.PfStateMachineControler.prototype.handleOnEnterNextStage = function(event) {
            this.pfBusController.onEnterNextStage(event.getPayload());
        };
        slotmodel.PfStateMachineControler.prototype.handleOnInProgressStage = function(event) {
            this.pfBusController.onContinueProgressStage();
        };
        slotmodel.PfStateMachineControler.prototype.__class__ = slotmodel.PfStateMachineControler;
        slotmodel.ECondition = function() {};
        slotmodel.ECondition.__name__ = ["slotmodel", "ECondition"];
        slotmodel.ECondition.prototype.__class__ = slotmodel.ECondition;
        slotmodel.EReelPictureInfo = function(value) {
            this.value = 0;
            this.value = value;
        };
        slotmodel.EReelPictureInfo.__name__ = ["slotmodel", "EReelPictureInfo"];
        slotmodel.EReelPictureInfo.prototype.value = null;
        slotmodel.EReelPictureInfo.ofSymbol = function(symbol) {
            switch (symbol) {
                case 0:
                    return slotmodel.EReelPictureInfo.NONE;
                case 254:
                    return slotmodel.EReelPictureInfo.INACTIVE;
                default:
                    return slotmodel.EReelPictureInfo.ACTIVE;
            }
        };
        slotmodel.EReelPictureInfo.prototype.__class__ = slotmodel.EReelPictureInfo;
        slotmodel.EWinInfo = function() {};
        slotmodel.EWinInfo.__name__ = ["slotmodel", "EWinInfo"];
        slotmodel.EWinInfo.prototype.__class__ = slotmodel.EWinInfo;
        slotmodel.MGameOutcome = function(type, gameOver, playerDecision, choices, name, outcome, awardCapped) {
            this.type = type;
            this.gameOver = gameOver;
            this.playerDecision = playerDecision;
            this.choices = choices;
            this.name = name;
            this.outcome = outcome;
            this.awardCapped = awardCapped;
        };
        slotmodel.MGameOutcome.__name__ = ["slotmodel", "MGameOutcome"];
        slotmodel.MGameOutcome.prototype.type = null;
        slotmodel.MGameOutcome.prototype.gameOver = null;
        slotmodel.MGameOutcome.prototype.playerDecision = null;
        slotmodel.MGameOutcome.prototype.choices = null;
        slotmodel.MGameOutcome.prototype.name = null;
        slotmodel.MGameOutcome.prototype.outcome = null;
        slotmodel.MGameOutcome.prototype.awardCapped = null;
        slotmodel.MGameOutcome.prototype.__class__ = slotmodel.MGameOutcome;
        slotmodel.MNode = function(argument, index) {
            this.argument = argument;
            this.index = index;
        };
        slotmodel.MNode.__name__ = ["slotmodel", "MNode"];
        slotmodel.MNode.prototype.argument = null;
        slotmodel.MNode.prototype.index = null;
        slotmodel.MNode.prototype.__class__ = slotmodel.MNode;
        slotmodel.MNodeWinInfo = function(node, win, winInfos, reelPicture, stopPositions, reelPictureFs, stopPositionsFs) {
            this.node = node;
            this.win = win;
            this.winInfos = winInfos;
            this.reelPicture = reelPicture;
            this.stopPositions = stopPositions;
            this.reelPictureFs = reelPictureFs;
            this.stopPositionsFs = stopPositionsFs;
        };
        slotmodel.MNodeWinInfo.__name__ = ["slotmodel", "MNodeWinInfo"];
        slotmodel.MNodeWinInfo.prototype.node = null;
        slotmodel.MNodeWinInfo.prototype.win = null;
        slotmodel.MNodeWinInfo.prototype.winInfos = null;
        slotmodel.MNodeWinInfo.prototype.reelPicture = null;
        slotmodel.MNodeWinInfo.prototype.stopPositions = null;
        slotmodel.MNodeWinInfo.prototype.reelPictureFs = null;
        slotmodel.MNodeWinInfo.prototype.stopPositionsFs = null;
        slotmodel.MNodeWinInfo.prototype.__class__ = slotmodel.MNodeWinInfo;
        slotmodel.MOutcome = function(nodeWinInfos, currentNode, nextNode, selectedBet, baseGameWin, featureWin, totalWin, hasWinCappingOccured) {
            this.nodeWinInfos = nodeWinInfos;
            this.currentNode = currentNode;
            this.nextNode = nextNode;
            this.selectedBet = selectedBet;
            this.baseGameWin = baseGameWin;
            this.featureWin = featureWin;
            this.totalWin = totalWin;
            this.hasWinCappingOccured = hasWinCappingOccured;
        };
        slotmodel.MOutcome.__name__ = ["slotmodel", "MOutcome"];
        slotmodel.MOutcome.prototype.nodeWinInfos = null;
        slotmodel.MOutcome.prototype.currentNode = null;
        slotmodel.MOutcome.prototype.nextNode = null;
        slotmodel.MOutcome.prototype.selectedBet = null;
        slotmodel.MOutcome.prototype.baseGameWin = null;
        slotmodel.MOutcome.prototype.featureWin = null;
        slotmodel.MOutcome.prototype.totalWin = null;
        slotmodel.MOutcome.prototype.hasWinCappingOccured = null;
        slotmodel.MOutcome.prototype.__class__ = slotmodel.MOutcome;
        slotmodel.MWinInfo = function(creditWin, sender, winType, basicWin, multiplier1, multiplier2, index, argument, info, infoString, conditionId, lineNumber, autoInfo, symbol) {
            this.creditWin = creditWin;
            this.sender = sender;
            this.winType = winType;
            this.basicWin = basicWin;
            this.multiplier1 = multiplier1;
            this.multiplier2 = multiplier2;
            this.index = index;
            this.argument = argument;
            this.info = info;
            this.infoString = infoString;
            this.conditionId = conditionId;
            this.lineNumber = lineNumber;
            this.autoInfo = autoInfo;
            this.symbol = symbol;
        };
        slotmodel.MWinInfo.__name__ = ["slotmodel", "MWinInfo"];
        slotmodel.MWinInfo.prototype.creditWin = null;
        slotmodel.MWinInfo.prototype.sender = null;
        slotmodel.MWinInfo.prototype.winType = null;
        slotmodel.MWinInfo.prototype.basicWin = null;
        slotmodel.MWinInfo.prototype.multiplier1 = null;
        slotmodel.MWinInfo.prototype.multiplier2 = null;
        slotmodel.MWinInfo.prototype.index = null;
        slotmodel.MWinInfo.prototype.argument = null;
        slotmodel.MWinInfo.prototype.info = null;
        slotmodel.MWinInfo.prototype.infoString = null;
        slotmodel.MWinInfo.prototype.conditionId = null;
        slotmodel.MWinInfo.prototype.lineNumber = null;
        slotmodel.MWinInfo.prototype.autoInfo = null;
        slotmodel.MWinInfo.prototype.symbol = null;
        slotmodel.MWinInfo.prototype.__class__ = slotmodel.MWinInfo;
        slotmodel.MptHelper = function() {};
        slotmodel.MptHelper.__name__ = ["slotmodel", "MptHelper"];
        slotmodel.MptHelper.onError = null;
        slotmodel.MptHelper.init = function(onErr) {
            slotmodel.MptHelper.onError = onErr;
        };
        slotmodel.MptHelper.getMptGameOutcome = function(json) {
            var type = slotmodel.StdHelper.getField(json, "@type");
            var gameOver = slotmodel.StdHelper.getBoolField(json, "GameOver", false);
            var playerDecision = slotmodel.StdHelper.getBoolField(json, "PlayerDecision", false);
            var choices = slotmodel.StdHelper.parseIntField(json, "Choices", slotmodel.MptHelper.onParseFatalError);
            var nameDynamic = slotmodel.StdHelper.getField(json, "name");
            var name = "";
            if (nameDynamic != null && nameDynamic.length != 0) name = _hcmn_.Std.string(nameDynamic);
            var outcome = slotmodel.MptHelper.getMOutcome(slotmodel.StdHelper.getField(json, "Outcome"));
            var awardCapped = slotmodel.StdHelper.getBoolField(json, "AwardCapped", false);
            return new slotmodel.MGameOutcome(type, gameOver, playerDecision, choices, name, outcome, awardCapped);
        };
        slotmodel.MptHelper.getMOutcome = function(json) {
            var nodeWinInfos = slotmodel.MptHelper.getMNodeWinInfoArray(slotmodel.StdHelper.getField(json, "NodeWinInfos"));
            var currentNode = slotmodel.MptHelper.getMNode(slotmodel.StdHelper.getField(json, "CurrentNode"));
            var nextNode = slotmodel.MptHelper.getMNode(slotmodel.StdHelper.getField(json, "NextNode"));
            var selectedBet = slotmodel.StdHelper.parseIntField(json, "SelectedBet", slotmodel.MptHelper.onParseFatalError);
            var baseGameWin = slotmodel.StdHelper.parseIntField(json, "BaseGameWin", slotmodel.MptHelper.onParseFatalError);
            var featureWin = slotmodel.StdHelper.parseIntField(json, "FeatureWin", slotmodel.MptHelper.onParseFatalError);
            var totalWin = slotmodel.StdHelper.parseIntField(json, "TotalWin", slotmodel.MptHelper.onParseFatalError);
            var hasWinCappingOccured = slotmodel.StdHelper.getBoolField(json, "HasWinCappingOccured", false);
            return new slotmodel.MOutcome(nodeWinInfos, currentNode, nextNode, selectedBet, baseGameWin, featureWin, totalWin, hasWinCappingOccured);
        };
        slotmodel.MptHelper.getMGameOutcomeArray = function(jsonArray) {
            var result = [];
            var _g = 0;
            while (_g < jsonArray.length) {
                var json = jsonArray[_g];
                ++_g;
                var mptGameOutcomeJson = slotmodel.StdHelper.getField(json, "MptGameOutcome");
                result.push(slotmodel.MptHelper.getMptGameOutcome(mptGameOutcomeJson));
            }
            return result;
        };
        slotmodel.MptHelper.getMNodeWinInfoArray = function(json) {
            var jsonArray = slotmodel.MptHelper.arrayify(json);
            var result = [];
            var _g = 0;
            while (_g < jsonArray.length) {
                var json1 = jsonArray[_g];
                ++_g;
                result.push(slotmodel.MptHelper.getMNodeWinInfo(json1));
            }
            return result;
        };
        slotmodel.MptHelper.getMNode = function(json) {
            var argument = slotmodel.StdHelper.parseIntField(json, "Argument", slotmodel.MptHelper.onParseFatalError);
            var index = slotmodel.StdHelper.parseIntField(json, "Index", slotmodel.MptHelper.onParseFatalError);
            return new slotmodel.MNode(argument, index);
        };
        slotmodel.MptHelper.getMNodeWinInfo = function(json) {
            var node = slotmodel.MptHelper.getMNode(slotmodel.StdHelper.getField(json, "Node"));
            var win = slotmodel.StdHelper.parseIntField(json, "Win", slotmodel.MptHelper.onParseFatalError);
            var winInfos = slotmodel.MptHelper.getMWinInfoArray(slotmodel.StdHelper.getField(json, "WinInfos"));
            var reelPictureArray = slotmodel.MptHelper.getIntMatrix(slotmodel.StdHelper.getField(json, "ReelPicture"));
            var stopPositions = "";
            var stopPositionsDynamic = slotmodel.StdHelper.getField(json, "StopPositions");
            if (_hcmn_.Std.string(stopPositionsDynamic).length > 0) stopPositions = _hcmn_.Std.string(stopPositionsDynamic);
            var reelPictureFsArray = slotmodel.MptHelper.getIntMatrix(slotmodel.StdHelper.getField(json, "ReelPictureFS"));
            var stopPositionsFs = "";
            var stopPositionsFsDynamic = slotmodel.StdHelper.getField(json, "StopPositionsFS");
            if ((stopPositionsFs == null ? "null" : "" + stopPositionsFs).length > 0) stopPositionsFs = _hcmn_.Std.string(stopPositionsDynamic);
            return new slotmodel.MNodeWinInfo(node, win, winInfos, reelPictureArray, stopPositions, reelPictureFsArray, stopPositionsFs);
        };
        slotmodel.MptHelper.getNodeWinInfoFromOutcomeArray = function(mptGameOutcomeArray, baseGameIndex) {
            var result = null;
            var _g = 0;
            while (_g < mptGameOutcomeArray.length) {
                var mptGameOutcome = mptGameOutcomeArray[_g];
                ++_g;
                if (mptGameOutcome.outcome.currentNode.index == baseGameIndex) {
                    result = slotmodel.MptHelper.getNodeWinInfoFromOutcome(mptGameOutcome);
                    break;
                }
            }
            return result;
        };
        slotmodel.MptHelper.getNodeWinInfoFromOutcome = function(mptGameOutcome) {
            var mOutcome = mptGameOutcome.outcome;
            var result = null;
            var _g = 0;
            var _g1 = mOutcome.nodeWinInfos;
            while (_g < _g1.length) {
                var nodeWinInfo = _g1[_g];
                ++_g;
                if (nodeWinInfo.node.argument == mOutcome.currentNode.argument && nodeWinInfo.node.index == mOutcome.currentNode.index) {
                    result = nodeWinInfo;
                    break;
                }
            }
            return result;
        };
        slotmodel.MptHelper.getMWinInfoArray = function(json) {
            var jsonArray = slotmodel.MptHelper.arrayify(json);
            var result = [];
            if (jsonArray == null) return result;
            var _g = 0;
            while (_g < jsonArray.length) {
                var json1 = jsonArray[_g];
                ++_g;
                result.push(slotmodel.MptHelper.getMWinInfo(json1));
            }
            return result;
        };
        slotmodel.MptHelper.getMWinInfo = function(json) {
            var creditWin = slotmodel.StdHelper.parseIntField(json, "CreditWin", slotmodel.MptHelper.onParseFatalError);
            var sender = slotmodel.MptHelper.getMNode(slotmodel.StdHelper.getField(json, "Sender"));
            var winType = slotmodel.StdHelper.parseIntField(json, "WinType", slotmodel.MptHelper.onParseFatalError);
            var basicWin = slotmodel.StdHelper.parseIntField(json, "BasicWin", slotmodel.MptHelper.onParseFatalError);
            var multiplier1 = slotmodel.StdHelper.parseIntField(json, "Multiplier1", slotmodel.MptHelper.onParseFatalError);
            var multiplier2 = slotmodel.StdHelper.parseIntField(json, "Multiplier2", slotmodel.MptHelper.onParseFatalError);
            var index = slotmodel.StdHelper.parseIntField(json, "Index", slotmodel.MptHelper.onParseFatalError);
            var argument = slotmodel.StdHelper.parseIntField(json, "Argument", slotmodel.MptHelper.onParseFatalError);
            var info = slotmodel.StdHelper.parseIntField(json, "Info", slotmodel.MptHelper.onParseFatalError);
            var infoString = _hcmn_.Std.string(slotmodel.StdHelper.getField(json, "InfoString"));
            var conditionId = slotmodel.StdHelper.parseIntField(json, "ConditionId", slotmodel.MptHelper.onParseFatalError);
            var lineNumber = slotmodel.StdHelper.parseIntField(json, "LineNumber", slotmodel.MptHelper.onParseFatalError);
            var autoInfo = slotmodel.StdHelper.parseIntField(json, "AutoInfo", slotmodel.MptHelper.onParseFatalError);
            var symbol = slotmodel.MptHelper.getIntMatrix(slotmodel.StdHelper.getField(json, "Symbol"));
            return new slotmodel.MWinInfo(creditWin, sender, winType, basicWin, multiplier1, multiplier2, index, argument, info, infoString, conditionId, lineNumber, autoInfo, symbol);
        };
        slotmodel.MptHelper.arrayify = function(json) {
            var jsonArray = null;
            if ((json instanceof Array) && json.__enum__ == null) jsonArray = json;
            else {
                jsonArray = [];
                if (json != null && _hcmn_.js_Boot.__instanceof(json, _hcmn_.Dynamic)) jsonArray.push(json);
            }
            return jsonArray;
        };
        slotmodel.MptHelper.getIntMatrix = function(json) {
            if (json == null) return null;
            if (Object.prototype.hasOwnProperty.call(json, "Rows")) {
                json = _hcmn_.Reflect.field(json, "Rows");
                if (json == null) return null;
            }
            if ((json instanceof Array) && json.__enum__ == null && json.length > 0 && !Object.prototype.hasOwnProperty.call(json[0], "Cells") && !((json[0] instanceof Array) && json[0].__enum__ == null)) {
                var tempMatrix = [];
                tempMatrix.push(json);
                json = tempMatrix;
            }
            var resultMatrix = [];
            var inputMatrixJson = json;
            var _g = 0;
            while (_g < inputMatrixJson.length) {
                var row = inputMatrixJson[_g];
                ++_g;
                var cellsArray = null;
                if (row != null && Object.prototype.hasOwnProperty.call(row, "Cells")) cellsArray = _hcmn_.Reflect.field(row, "Cells");
                else if ((row instanceof Array) && row.__enum__ == null) cellsArray = row;
                resultMatrix.push(cellsArray.map(_hcmn_.Std.parseInt));
            }
            return resultMatrix;
        };
        slotmodel.MptHelper.onParseFatalError = function(message) {
            slotmodel.Log.getLoggerBykey("MptHelper").error("[ParseFatalError]" + message);
            slotmodel.MptHelper.parseError = true;
            slotmodel.MptHelper.onError(slotmodel.MptHelper.getFatalError(message));
        };
        slotmodel.MptHelper.getFatalError = function(message) {
            return new slotmodel.Error(slotmodel.EErrorSource.MPT_HELPER, slotmodel.ErrorIdList.PF_PayloadError, true, message);
        };
        slotmodel.MptHelper.prototype.__class__ = slotmodel.MptHelper;
        slotmodel.PfAbortSpinProperties = function(messages, stage, nextStage, betPerLineCredit, selectedLineCount, sideBet, baseGameOutcome, freeSpinOutcome, pickerBonusOutcome) {
            this.messages = messages;
            this.stage = stage;
            this.nextStage = nextStage;
            this.betPerLineCredit = betPerLineCredit;
            this.selectedLineCount = selectedLineCount;
            this.sideBet = sideBet;
            this.baseGameOutcome = baseGameOutcome;
            this.freeSpinOutcome = freeSpinOutcome;
            this.pickerBonusOutcome = pickerBonusOutcome;
        };
        slotmodel.PfAbortSpinProperties.__name__ = ["slotmodel", "PfAbortSpinProperties"];
        slotmodel.PfAbortSpinProperties.prototype.messages = null;
        slotmodel.PfAbortSpinProperties.prototype.stage = null;
        slotmodel.PfAbortSpinProperties.prototype.nextStage = null;
        slotmodel.PfAbortSpinProperties.prototype.betPerLineCredit = null;
        slotmodel.PfAbortSpinProperties.prototype.selectedLineCount = null;
        slotmodel.PfAbortSpinProperties.prototype.sideBet = null;
        slotmodel.PfAbortSpinProperties.prototype.baseGameOutcome = null;
        slotmodel.PfAbortSpinProperties.prototype.freeSpinOutcome = null;
        slotmodel.PfAbortSpinProperties.prototype.pickerBonusOutcome = null;
        slotmodel.PfAbortSpinProperties.prototype.__class__ = slotmodel.PfAbortSpinProperties;
        slotmodel.PfInitializedProperties = function(rtp, selectableLines, sideBets, startReelPicture, startReelPicturePerBet, startFSReelPicture, startFSReelPicturePerBet, autoSpinDefinition, betsPerLine, defaultBetPerLineCredit, riskControlSettings, resumeSpinOutcome) {
            this.rtp = rtp;
            this.selectableLines = selectableLines;
            this.sideBets = sideBets;
            this.startReelPicture = startReelPicture;
            this.startReelPicturePerBet = startReelPicturePerBet;
            this.startFSReelPicture = startFSReelPicture;
            this.startFSReelPicturePerBet = startFSReelPicturePerBet;
            this.autoSpinDefinition = autoSpinDefinition;
            this.betsPerLine = betsPerLine;
            this.defaultBetPerLineCredit = defaultBetPerLineCredit;
            this.riskControlSettings = riskControlSettings;
            this.resumeSpinOutcome = resumeSpinOutcome;
        };
        slotmodel.PfInitializedProperties.__name__ = ["slotmodel", "PfInitializedProperties"];
        slotmodel.PfInitializedProperties.prototype.rtp = null;
        slotmodel.PfInitializedProperties.prototype.selectableLines = null;
        slotmodel.PfInitializedProperties.prototype.sideBets = null;
        slotmodel.PfInitializedProperties.prototype.startReelPicture = null;
        slotmodel.PfInitializedProperties.prototype.startFSReelPicture = null;
        slotmodel.PfInitializedProperties.prototype.startReelPicturePerBet = null;
        slotmodel.PfInitializedProperties.prototype.startFSReelPicturePerBet = null;
        slotmodel.PfInitializedProperties.prototype.autoSpinDefinition = null;
        slotmodel.PfInitializedProperties.prototype.betsPerLine = null;
        slotmodel.PfInitializedProperties.prototype.defaultBetPerLineCredit = null;
        slotmodel.PfInitializedProperties.prototype.riskControlSettings = null;
        slotmodel.PfInitializedProperties.prototype.resumeSpinOutcome = null;
        slotmodel.PfInitializedProperties.prototype.__class__ = slotmodel.PfInitializedProperties;
        slotmodel.PfMessage = function(type, id, message) {
            this.type = type;
            this.id = id;
            this.message = message;
        };
        slotmodel.PfMessage.__name__ = ["slotmodel", "PfMessage"];
        slotmodel.PfMessage.prototype.type = null;
        slotmodel.PfMessage.prototype.id = null;
        slotmodel.PfMessage.prototype.message = null;
        slotmodel.PfMessage.prototype.__class__ = slotmodel.PfMessage;
        slotmodel.PfSpinOutcome = function(stage, nextStage, nextSpinStripeLayers, baseGame, freeSpin, pickerBonus, sideBet, totalFreeSpinCredit, totalGameCredit, totalWinCredit, totalPickerCredit, awardCapExceeded, resumePerStake) {
            this.stage = stage;
            this.nextStage = nextStage;
            this.nextSpinStripeLayers = nextSpinStripeLayers;
            this.baseGame = baseGame;
            this.freeSpin = freeSpin;
            this.pickerBonus = pickerBonus;
            this.sideBet = sideBet;
            this.totalWinCredit = totalWinCredit;
            this.totalFreeSpinCredit = totalFreeSpinCredit;
            this.totalGameCredit = totalGameCredit;
            this.totalPickerCredit = totalPickerCredit;
            this.awardCapExceeded = awardCapExceeded;
            this.resumePerStake = resumePerStake;
        };
        slotmodel.PfSpinOutcome.__name__ = ["slotmodel", "PfSpinOutcome"];
        slotmodel.PfSpinOutcome.prototype.stage = null;
        slotmodel.PfSpinOutcome.prototype.nextStage = null;
        slotmodel.PfSpinOutcome.prototype.nextSpinStripeLayers = null;
        slotmodel.PfSpinOutcome.prototype.stageBasedSpinStripeLayers = null;
        slotmodel.PfSpinOutcome.prototype.baseGame = null;
        slotmodel.PfSpinOutcome.prototype.freeSpin = null;
        slotmodel.PfSpinOutcome.prototype.pickerBonus = null;
        slotmodel.PfSpinOutcome.prototype.sideBet = null;
        slotmodel.PfSpinOutcome.prototype.totalFreeSpinCredit = null;
        slotmodel.PfSpinOutcome.prototype.totalGameCredit = null;
        slotmodel.PfSpinOutcome.prototype.totalWinCredit = null;
        slotmodel.PfSpinOutcome.prototype.totalPickerCredit = null;
        slotmodel.PfSpinOutcome.prototype.awardCapExceeded = null;
        slotmodel.PfSpinOutcome.prototype.resumePerStake = null;
        slotmodel.PfSpinOutcome.prototype.setStageBasedSpinStripeLayers = function(stageBasedSpinStripeLayers) {
            this.stageBasedSpinStripeLayers = stageBasedSpinStripeLayers;
        };
        slotmodel.PfSpinOutcome.prototype.__class__ = slotmodel.PfSpinOutcome;
        slotmodel.StateChangeReply = function(state, param) {
            this.state = state;
            this.param = param;
        };
        slotmodel.StateChangeReply.__name__ = ["slotmodel", "StateChangeReply"];
        slotmodel.StateChangeReply.prototype.state = null;
        slotmodel.StateChangeReply.prototype.param = null;
        slotmodel.StateChangeReply.prototype.__class__ = slotmodel.StateChangeReply;
        slotmodel.PluginController = function(model) {
            this.model = model;
            this.isImplementedFeatureMap = new haxe.ds.ObjectMap();
            var feature;
            var _g = 0;
            var _g1 = slotmodelGamePluginApi.EPluginFeature.all();
            while (_g < _g1.length) {
                var feature1 = _g1[_g];
                ++_g;
                this.isImplementedFeatureMap.set(feature1, false);
            }
        };
        slotmodel.PluginController.__name__ = ["slotmodel", "PluginController"];
        slotmodel.PluginController.prototype.model = null;
        slotmodel.PluginController.prototype.gamePlugin = null;
        slotmodel.PluginController.prototype.isImplementedFeatureMap = null;
        slotmodel.PluginController.prototype.start = function(context) {
            var _g = this;
            return new Promise(function(resolve, reject) {
                if (_g.model.getConfiguration().hasGamePlugin()) context.getServiceTracker([slotmodelGamePluginApi.IGamePlugin]).then(function(context1) {
                    _g.setGamePlugin(_hcmn_.js_Boot.__cast(context1.getAnyService(slotmodelGamePluginApi.IGamePlugin, null), slotmodelGamePluginApi.IGamePlugin));
                    resolve(null);
                }, function(errorMessage) {
                    slotmodel.Log.getLogger(_g).error("[start] " + errorMessage);
                    reject(errorMessage);
                });
                else resolve(null);
            });
        };
        slotmodel.PluginController.prototype.setGamePlugin = function(gamePlugin) {
            this.gamePlugin = gamePlugin;
            var implementedFeatures = gamePlugin.getImplementedFeatures();
            if (implementedFeatures != null) {
                var feature;
                var _g = 0;
                while (_g < implementedFeatures.length) {
                    var feature1 = implementedFeatures[_g];
                    ++_g;
                    this.isImplementedFeatureMap.set(feature1, true);
                }
            }
        };
        slotmodel.PluginController.prototype.stop = function() {};
        slotmodel.PluginController.prototype.isImplemented = function(feature) {
            return this.isImplementedFeatureMap.h.__keys__[feature.__id__] != null && this.isImplementedFeatureMap.h[feature.__id__];
        };
        slotmodel.PluginController.prototype.getScatterWins = function(gameLogicResponse, stage, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.SCATTER_OUTCOMES)) return null;
            var pluginScatterWins = null;
            try {
                pluginScatterWins = this.gamePlugin.getScatterWins(gameLogicResponse, stage.toString(), this.getSlotDefinition());
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("getScatterWins", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
            var scatterWins = null;
            if (pluginScatterWins != null) {
                scatterWins = [];
                var pluginScatterWin;
                var _g = 0;
                while (_g < pluginScatterWins.length) {
                    var pluginScatterWin1 = pluginScatterWins[_g];
                    ++_g;
                    scatterWins.push(slotmodel.ScatterWinImpl.create(pluginScatterWin1));
                }
            }
            return scatterWins;
        };
        slotmodel.PluginController.prototype.getBonusWins = function(gameLogicResponse, stage, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.BONUS_OUTCOMES)) return null;
            var pluginBonusWins = null;
            try {
                pluginBonusWins = this.gamePlugin.getBonusWins(gameLogicResponse, stage.toString(), this.getSlotDefinition());
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("getBonusWins", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
            var bonusWins = null;
            if (pluginBonusWins != null) {
                bonusWins = [];
                var pluginBonusWin;
                var _g = 0;
                while (_g < pluginBonusWins.length) {
                    var pluginBonusWin1 = pluginBonusWins[_g];
                    ++_g;
                    bonusWins.push(slotmodel.BonusWinImpl.create(pluginBonusWin1));
                }
            }
            return bonusWins;
        };
        slotmodel.PluginController.prototype.getAdditionalLineWins = function(gameLogicResponse, stage, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.ADD_LINE_OUTCOMES)) return null;
            var pluginLineWins = null;
            try {
                pluginLineWins = this.gamePlugin.getAdditionalLineWins(gameLogicResponse, stage.toString(), this.getSlotDefinition());
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("getAdditionalLineWins", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
            var lineWins = null;
            if (pluginLineWins != null) {
                lineWins = [];
                var pluginLineWin;
                var _g = 0;
                while (_g < pluginLineWins.length) {
                    var pluginLineWin1 = pluginLineWins[_g];
                    ++_g;
                    lineWins.push(slotmodel.LineWinImpl.create(pluginLineWin1));
                }
            }
            return lineWins;
        };
        slotmodel.PluginController.prototype.getResumePerStake = function(gameLogicResponse, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.RESUME_PER_STAKE)) return null;
            try {
                var resumePerStake = this.gamePlugin.getResumePerStake(gameLogicResponse, this.getSlotDefinition());
                return resumePerStake;
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("getResumePerStake", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
        };
        slotmodel.PluginController.prototype.getCustomBigWin = function(totalStakeCredit, totalWinCredit, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.CUSTOM_BIG_WIN)) return null;
            try {
                var customBigWin = this.gamePlugin.getCustomBigWin(totalStakeCredit, totalWinCredit);
                return customBigWin;
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("getResumePerStake", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
        };
        slotmodel.PluginController.prototype.getNextSpinStripeLayersForSynchronizedReels = function(gameLogicResponse, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.STRIPE_LAYER_FOR_SYNCHRONIZED_REELS)) return null;
            try {
                var nextSpinStripeLayers = this.gamePlugin.getNextSpinStripeLayersForSynchronizedReels(gameLogicResponse, this.getSlotDefinition());
                return nextSpinStripeLayers;
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("getNextSpinStripeLayersForSynchronizedReels", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
        };
        slotmodel.PluginController.prototype.getNextSpinStripeLayersPerBet = function(paytableResponse, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.STRIPE_LAYER_PER_BET)) return null;
            try {
                var nextSpinStripeLayers = this.gamePlugin.getNextSpinStripeLayersPerBet(paytableResponse, this.getSlotDefinition());
                return nextSpinStripeLayers;
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("getNextSpinStripeLayersPerBet", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
        };
        slotmodel.PluginController.prototype.getProgressMeter = function(gameLogicResponse, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.PROGRESS_METER)) return null;
            try {
                var progressMeter = this.gamePlugin.getProgressMeter(gameLogicResponse, this.getSlotDefinition());
                return progressMeter;
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("getProgressMeter", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
        };
        slotmodel.PluginController.prototype.parseCustomField = function(gameLogicResponse, onPluginError) {
            if (this.gamePlugin == null) return null;
            if (!this.isImplemented(slotmodelGamePluginApi.EPluginFeature.CUSTOM_FIELD)) return null;
            try {
                var customField = this.gamePlugin.parseCustomField(gameLogicResponse);
                return customField;
            } catch (error) {
                if (error instanceof js._Boot.HaxeError) error = error.val;
                onPluginError(this.onErrorFromPlugin("parseCustomField", slotmodel.ErrorIdList.Plugin_PF_PayloadError, error));
                return null;
            }
        };
        slotmodel.PluginController.prototype.getSlotDefinition = function() {
            return this.model.getState().getGameConfiguration().getSlotDefinition();
        };
        slotmodel.PluginController.prototype.onErrorFromPlugin = function(method, id, error) {
            var myError = error;
            var message;
            if (Object.prototype.hasOwnProperty.call(error, "val")) myError = _hcmn_.Reflect.field(error, "val");
            if (_hcmn_.js_Boot.__instanceof(myError, slotModelApi.Error)) {
                var saError = myError;
                message = "[" + saError.id + "] " + saError.message;
                this.onFatalError(method, id, message);
            } else if (_hcmn_.js_Boot.__instanceof(myError, Error)) {
                message = "[JS Error]" + (_hcmn_.js_Boot.__cast(myError, Error)).message;
                this.onFatalError(method, id, message);
            } else {
                message = "Unknown Error";
                this.onFatalError(method, id, message);
            }
            return message;
        };
        slotmodel.PluginController.prototype.onFatalError = function(method, id, message) {
            this.model.onError(new slotmodel.Error(slotmodel.EErrorSource.PLUGIN, id, true, "[" + method + "]" + message));
        };
        slotmodel.PluginController.prototype.__class__ = slotmodel.PluginController;
        if (!slotmodel.sm) {
            slotmodel.sm = {};
        };
        slotmodel.sm.State = {
            __ename__: ["slotmodel", "sm", "State"],
            __constructs__: ["INITIAL", "INITIALIZATION", "WAITING_GAME_LOADED", "WAITING_PLATFORM_INITIALIZED", "MODEL_INITIALIZED", "INITIALIZE_CLIENT", "PREPARE_RESUME", "PREPARE_IDLE", "IDLE", "CHECK_AUTOSPINS", "AUTOSPIN_IDLE", "START_SPINNING", "REQUEST_OTCOME", "PLATFORM_OUTCOME", "PRESENT_SPIN_OUTCOME", "CALCULATE_NEXT_STAGE", "PREPARE_FS_IDLE", "FS_IDLE", "FS_START_SPINNING", "FS_REQUEST_OUTCOME", "PREPARE_PB_IDLE", "PB_IDLE", "PB_PICKING", "PB_REQUEST_OUTCOME", "PB_SEND_AND_PRESENT_SPIN_OUTCOME", "RESULT", "ABORT_SPIN", "PREPARE_TUMBLE_RESUME"]
        };
        slotmodel.sm.State.ABORT_SPIN = ["ABORT_SPIN", 26];
        slotmodel.sm.State.ABORT_SPIN.toString = $estr;
        slotmodel.sm.State.ABORT_SPIN.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.AUTOSPIN_IDLE = ["AUTOSPIN_IDLE", 10];
        slotmodel.sm.State.AUTOSPIN_IDLE.toString = $estr;
        slotmodel.sm.State.AUTOSPIN_IDLE.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.MODEL_INITIALIZED = ["MODEL_INITIALIZED", 4];
        slotmodel.sm.State.MODEL_INITIALIZED.toString = $estr;
        slotmodel.sm.State.MODEL_INITIALIZED.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PREPARE_FS_IDLE = ["PREPARE_FS_IDLE", 16];
        slotmodel.sm.State.PREPARE_FS_IDLE.toString = $estr;
        slotmodel.sm.State.PREPARE_FS_IDLE.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.START_SPINNING = ["START_SPINNING", 11];
        slotmodel.sm.State.START_SPINNING.toString = $estr;
        slotmodel.sm.State.START_SPINNING.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PB_IDLE = ["PB_IDLE", 21];
        slotmodel.sm.State.PB_IDLE.toString = $estr;
        slotmodel.sm.State.PB_IDLE.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.CHECK_AUTOSPINS = ["CHECK_AUTOSPINS", 9];
        slotmodel.sm.State.CHECK_AUTOSPINS.toString = $estr;
        slotmodel.sm.State.CHECK_AUTOSPINS.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.INITIALIZE_CLIENT = ["INITIALIZE_CLIENT", 5];
        slotmodel.sm.State.INITIALIZE_CLIENT.toString = $estr;
        slotmodel.sm.State.INITIALIZE_CLIENT.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PB_SEND_AND_PRESENT_SPIN_OUTCOME = ["PB_SEND_AND_PRESENT_SPIN_OUTCOME", 24];
        slotmodel.sm.State.PB_SEND_AND_PRESENT_SPIN_OUTCOME.toString = $estr;
        slotmodel.sm.State.PB_SEND_AND_PRESENT_SPIN_OUTCOME.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PB_REQUEST_OUTCOME = ["PB_REQUEST_OUTCOME", 23];
        slotmodel.sm.State.PB_REQUEST_OUTCOME.toString = $estr;
        slotmodel.sm.State.PB_REQUEST_OUTCOME.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.WAITING_GAME_LOADED = ["WAITING_GAME_LOADED", 2];
        slotmodel.sm.State.WAITING_GAME_LOADED.toString = $estr;
        slotmodel.sm.State.WAITING_GAME_LOADED.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PB_PICKING = ["PB_PICKING", 22];
        slotmodel.sm.State.PB_PICKING.toString = $estr;
        slotmodel.sm.State.PB_PICKING.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PREPARE_PB_IDLE = ["PREPARE_PB_IDLE", 20];
        slotmodel.sm.State.PREPARE_PB_IDLE.toString = $estr;
        slotmodel.sm.State.PREPARE_PB_IDLE.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.REQUEST_OTCOME = ["REQUEST_OTCOME", 12];
        slotmodel.sm.State.REQUEST_OTCOME.toString = $estr;
        slotmodel.sm.State.REQUEST_OTCOME.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.CALCULATE_NEXT_STAGE = ["CALCULATE_NEXT_STAGE", 15];
        slotmodel.sm.State.CALCULATE_NEXT_STAGE.toString = $estr;
        slotmodel.sm.State.CALCULATE_NEXT_STAGE.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.RESULT = ["RESULT", 25];
        slotmodel.sm.State.RESULT.toString = $estr;
        slotmodel.sm.State.RESULT.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.FS_REQUEST_OUTCOME = ["FS_REQUEST_OUTCOME", 19];
        slotmodel.sm.State.FS_REQUEST_OUTCOME.toString = $estr;
        slotmodel.sm.State.FS_REQUEST_OUTCOME.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PREPARE_IDLE = ["PREPARE_IDLE", 7];
        slotmodel.sm.State.PREPARE_IDLE.toString = $estr;
        slotmodel.sm.State.PREPARE_IDLE.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.WAITING_PLATFORM_INITIALIZED = ["WAITING_PLATFORM_INITIALIZED", 3];
        slotmodel.sm.State.WAITING_PLATFORM_INITIALIZED.toString = $estr;
        slotmodel.sm.State.WAITING_PLATFORM_INITIALIZED.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.FS_IDLE = ["FS_IDLE", 17];
        slotmodel.sm.State.FS_IDLE.toString = $estr;
        slotmodel.sm.State.FS_IDLE.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.IDLE = ["IDLE", 8];
        slotmodel.sm.State.IDLE.toString = $estr;
        slotmodel.sm.State.IDLE.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PREPARE_TUMBLE_RESUME = ["PREPARE_TUMBLE_RESUME", 27];
        slotmodel.sm.State.PREPARE_TUMBLE_RESUME.toString = $estr;
        slotmodel.sm.State.PREPARE_TUMBLE_RESUME.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PLATFORM_OUTCOME = ["PLATFORM_OUTCOME", 13];
        slotmodel.sm.State.PLATFORM_OUTCOME.toString = $estr;
        slotmodel.sm.State.PLATFORM_OUTCOME.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.INITIALIZATION = ["INITIALIZATION", 1];
        slotmodel.sm.State.INITIALIZATION.toString = $estr;
        slotmodel.sm.State.INITIALIZATION.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PREPARE_RESUME = ["PREPARE_RESUME", 6];
        slotmodel.sm.State.PREPARE_RESUME.toString = $estr;
        slotmodel.sm.State.PREPARE_RESUME.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.FS_START_SPINNING = ["FS_START_SPINNING", 18];
        slotmodel.sm.State.FS_START_SPINNING.toString = $estr;
        slotmodel.sm.State.FS_START_SPINNING.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.PRESENT_SPIN_OUTCOME = ["PRESENT_SPIN_OUTCOME", 14];
        slotmodel.sm.State.PRESENT_SPIN_OUTCOME.toString = $estr;
        slotmodel.sm.State.PRESENT_SPIN_OUTCOME.__enum__ = slotmodel.sm.State;
        slotmodel.sm.State.INITIAL = ["INITIAL", 0];
        slotmodel.sm.State.INITIAL.toString = $estr;
        slotmodel.sm.State.INITIAL.__enum__ = slotmodel.sm.State;
        slotmodel.sm.Trigger = {
            __ename__: ["slotmodel", "sm", "Trigger"],
            __constructs__: ["STARTED", "GAME_LOADED", "PLATFORM_INITIALIZED", "INITIALIZE_CLIENT", "GAME_INITIALIZED", "IDLE_PREPARED", "STAKE_CHANGED", "HELP_REQUESTED", "PAYTABLE_REQUESTED", "START_AUTOSPINS", "STOP_AUTOSPINS", "CONTINUE_AUTOSPINS", "AUTOSPIN_REQUESTED", "GAME_REQUESTED_SPIN", "SPINNING_STARTED", "PLATFORM_OUTCOME_RECEIVED", "GAME_SPIN_FINISHED", "SPIN_OUTCOME_PRESENTED", "PREPARE_FREE_SPIN", "FS_IDLE_PREPARED", "GAME_REQUESTED_CONTINUE", "PREPARE_PICKER_BONUS", "PB_IDLE_PREPARED", "PICKER_BONUS_SELECTED", "PICKING_STARTED", "PRESENT_RESULT", "GAME_RESULT_PRESENTED", "ABORT_SPIN", "SPIN_ABORTED", "RESUME_GAME", "GAME_RESUME_PREPARED", "TUMBLE", "END_GAME"]
        };
        slotmodel.sm.Trigger.ABORT_SPIN = ["ABORT_SPIN", 27];
        slotmodel.sm.Trigger.ABORT_SPIN.toString = $estr;
        slotmodel.sm.Trigger.ABORT_SPIN.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.SPIN_ABORTED = ["SPIN_ABORTED", 28];
        slotmodel.sm.Trigger.SPIN_ABORTED.toString = $estr;
        slotmodel.sm.Trigger.SPIN_ABORTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.GAME_REQUESTED_SPIN = ["GAME_REQUESTED_SPIN", 13];
        slotmodel.sm.Trigger.GAME_REQUESTED_SPIN.toString = $estr;
        slotmodel.sm.Trigger.GAME_REQUESTED_SPIN.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.GAME_SPIN_FINISHED = ["GAME_SPIN_FINISHED", 16];
        slotmodel.sm.Trigger.GAME_SPIN_FINISHED.toString = $estr;
        slotmodel.sm.Trigger.GAME_SPIN_FINISHED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PREPARE_FREE_SPIN = ["PREPARE_FREE_SPIN", 18];
        slotmodel.sm.Trigger.PREPARE_FREE_SPIN.toString = $estr;
        slotmodel.sm.Trigger.PREPARE_FREE_SPIN.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.STOP_AUTOSPINS = ["STOP_AUTOSPINS", 10];
        slotmodel.sm.Trigger.STOP_AUTOSPINS.toString = $estr;
        slotmodel.sm.Trigger.STOP_AUTOSPINS.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.END_GAME = ["END_GAME", 32];
        slotmodel.sm.Trigger.END_GAME.toString = $estr;
        slotmodel.sm.Trigger.END_GAME.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PB_IDLE_PREPARED = ["PB_IDLE_PREPARED", 22];
        slotmodel.sm.Trigger.PB_IDLE_PREPARED.toString = $estr;
        slotmodel.sm.Trigger.PB_IDLE_PREPARED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.STARTED = ["STARTED", 0];
        slotmodel.sm.Trigger.STARTED.toString = $estr;
        slotmodel.sm.Trigger.STARTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PICKING_STARTED = ["PICKING_STARTED", 24];
        slotmodel.sm.Trigger.PICKING_STARTED.toString = $estr;
        slotmodel.sm.Trigger.PICKING_STARTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PLATFORM_INITIALIZED = ["PLATFORM_INITIALIZED", 2];
        slotmodel.sm.Trigger.PLATFORM_INITIALIZED.toString = $estr;
        slotmodel.sm.Trigger.PLATFORM_INITIALIZED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PREPARE_PICKER_BONUS = ["PREPARE_PICKER_BONUS", 21];
        slotmodel.sm.Trigger.PREPARE_PICKER_BONUS.toString = $estr;
        slotmodel.sm.Trigger.PREPARE_PICKER_BONUS.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.STAKE_CHANGED = ["STAKE_CHANGED", 6];
        slotmodel.sm.Trigger.STAKE_CHANGED.toString = $estr;
        slotmodel.sm.Trigger.STAKE_CHANGED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PLATFORM_OUTCOME_RECEIVED = ["PLATFORM_OUTCOME_RECEIVED", 15];
        slotmodel.sm.Trigger.PLATFORM_OUTCOME_RECEIVED.toString = $estr;
        slotmodel.sm.Trigger.PLATFORM_OUTCOME_RECEIVED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.SPINNING_STARTED = ["SPINNING_STARTED", 14];
        slotmodel.sm.Trigger.SPINNING_STARTED.toString = $estr;
        slotmodel.sm.Trigger.SPINNING_STARTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.START_AUTOSPINS = ["START_AUTOSPINS", 9];
        slotmodel.sm.Trigger.START_AUTOSPINS.toString = $estr;
        slotmodel.sm.Trigger.START_AUTOSPINS.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.HELP_REQUESTED = ["HELP_REQUESTED", 7];
        slotmodel.sm.Trigger.HELP_REQUESTED.toString = $estr;
        slotmodel.sm.Trigger.HELP_REQUESTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.FS_IDLE_PREPARED = ["FS_IDLE_PREPARED", 19];
        slotmodel.sm.Trigger.FS_IDLE_PREPARED.toString = $estr;
        slotmodel.sm.Trigger.FS_IDLE_PREPARED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.INITIALIZE_CLIENT = ["INITIALIZE_CLIENT", 3];
        slotmodel.sm.Trigger.INITIALIZE_CLIENT.toString = $estr;
        slotmodel.sm.Trigger.INITIALIZE_CLIENT.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.CONTINUE_AUTOSPINS = ["CONTINUE_AUTOSPINS", 11];
        slotmodel.sm.Trigger.CONTINUE_AUTOSPINS.toString = $estr;
        slotmodel.sm.Trigger.CONTINUE_AUTOSPINS.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.GAME_LOADED = ["GAME_LOADED", 1];
        slotmodel.sm.Trigger.GAME_LOADED.toString = $estr;
        slotmodel.sm.Trigger.GAME_LOADED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.GAME_REQUESTED_CONTINUE = ["GAME_REQUESTED_CONTINUE", 20];
        slotmodel.sm.Trigger.GAME_REQUESTED_CONTINUE.toString = $estr;
        slotmodel.sm.Trigger.GAME_REQUESTED_CONTINUE.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED = ["SPIN_OUTCOME_PRESENTED", 17];
        slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED.toString = $estr;
        slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PAYTABLE_REQUESTED = ["PAYTABLE_REQUESTED", 8];
        slotmodel.sm.Trigger.PAYTABLE_REQUESTED.toString = $estr;
        slotmodel.sm.Trigger.PAYTABLE_REQUESTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.GAME_RESUME_PREPARED = ["GAME_RESUME_PREPARED", 30];
        slotmodel.sm.Trigger.GAME_RESUME_PREPARED.toString = $estr;
        slotmodel.sm.Trigger.GAME_RESUME_PREPARED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.IDLE_PREPARED = ["IDLE_PREPARED", 5];
        slotmodel.sm.Trigger.IDLE_PREPARED.toString = $estr;
        slotmodel.sm.Trigger.IDLE_PREPARED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.AUTOSPIN_REQUESTED = ["AUTOSPIN_REQUESTED", 12];
        slotmodel.sm.Trigger.AUTOSPIN_REQUESTED.toString = $estr;
        slotmodel.sm.Trigger.AUTOSPIN_REQUESTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PICKER_BONUS_SELECTED = ["PICKER_BONUS_SELECTED", 23];
        slotmodel.sm.Trigger.PICKER_BONUS_SELECTED.toString = $estr;
        slotmodel.sm.Trigger.PICKER_BONUS_SELECTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.PRESENT_RESULT = ["PRESENT_RESULT", 25];
        slotmodel.sm.Trigger.PRESENT_RESULT.toString = $estr;
        slotmodel.sm.Trigger.PRESENT_RESULT.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.GAME_INITIALIZED = ["GAME_INITIALIZED", 4];
        slotmodel.sm.Trigger.GAME_INITIALIZED.toString = $estr;
        slotmodel.sm.Trigger.GAME_INITIALIZED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.GAME_RESULT_PRESENTED = ["GAME_RESULT_PRESENTED", 26];
        slotmodel.sm.Trigger.GAME_RESULT_PRESENTED.toString = $estr;
        slotmodel.sm.Trigger.GAME_RESULT_PRESENTED.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.TUMBLE = ["TUMBLE", 31];
        slotmodel.sm.Trigger.TUMBLE.toString = $estr;
        slotmodel.sm.Trigger.TUMBLE.__enum__ = slotmodel.sm.Trigger;
        slotmodel.sm.Trigger.RESUME_GAME = ["RESUME_GAME", 29];
        slotmodel.sm.Trigger.RESUME_GAME.toString = $estr;
        slotmodel.sm.Trigger.RESUME_GAME.__enum__ = slotmodel.sm.Trigger;
        slotmodel.StateMachineConfiguration = function() {};
        slotmodel.StateMachineConfiguration.__name__ = ["slotmodel", "StateMachineConfiguration"];
        slotmodel.StateMachineConfiguration.createStateMachine = function(controller, smp) {
            var sm = smp.getStateMachine(slotmodel.sm.State.INITIAL, slotmodel.Log.getLoggerBykey("ModelStateMachine"));
            slotmodel.StateMachineConfiguration.createStates(sm, controller);
            slotmodel.StateMachineConfiguration.createTransitions(sm, controller);
            return sm;
        };
        slotmodel.StateMachineConfiguration.createStates = function(sm, controller) {
            sm.addState(slotmodel.sm.State.INITIALIZATION).onEnter($bind(controller, controller.initializePlatform));
            sm.addState(slotmodel.sm.State.WAITING_GAME_LOADED);
            sm.addState(slotmodel.sm.State.WAITING_PLATFORM_INITIALIZED);
            sm.addState(slotmodel.sm.State.MODEL_INITIALIZED).onEnter($bind(controller, controller.onModelInitialized));
            sm.addState(slotmodel.sm.State.INITIALIZE_CLIENT).onEnter($bind(controller, controller.initializeGame)).onEnter($bind(controller, controller.initializeConsole));
            sm.addState(slotmodel.sm.State.PREPARE_RESUME).onEnter($bind(controller, controller.prepareResume)).onEnter($bind(controller, controller.initializeConsole));
            sm.addState(slotmodel.sm.State.PREPARE_IDLE).onEnter($bind(controller, controller.createNewBet)).onEnter($bind(controller, controller.prepareIdle));
            sm.addState(slotmodel.sm.State.IDLE).onEnter($bind(controller, controller.setIdle)).onExit($bind(controller, controller.setNotIdle));
            sm.addState(slotmodel.sm.State.CHECK_AUTOSPINS).onEnter($bind(controller, controller.checkStopAutoSpins));
            sm.addState(slotmodel.sm.State.AUTOSPIN_IDLE).onEnter($bind(controller, controller.setAutoSpinIdle)).onEnter($bind(controller, controller.requestAutoSpin)).onExit($bind(controller, controller.setAutoSpinNotIdle));
            sm.addState(slotmodel.sm.State.START_SPINNING).onEnter($bind(controller, controller.startSpinning));
            sm.addState(slotmodel.sm.State.REQUEST_OTCOME).onEnter($bind(controller, controller.deductStake)).onEnter($bind(controller, controller.sendPlatformSpinRequest));
            sm.addState(slotmodel.sm.State.PLATFORM_OUTCOME).onEnter($bind(controller, controller.sendSpinOutcome)).onEnter($bind(controller, controller.stopReelSpin));
            sm.addState(slotmodel.sm.State.PRESENT_SPIN_OUTCOME).onEnter($bind(controller, controller.presentSpinOutcome));
            sm.addState(slotmodel.sm.State.CALCULATE_NEXT_STAGE).onEnter($bind(controller, controller.calculateNextStage)).onEnter($bind(controller, controller.checkStopAutoSpinsInterupted));
            sm.addState(slotmodel.sm.State.PREPARE_FS_IDLE).onEnter($bind(controller, controller.prepareCurrentBetForFS)).onEnter($bind(controller, controller.prepareFSIdle));
            sm.addState(slotmodel.sm.State.FS_IDLE).onEnter($bind(controller, controller.setFSIdle)).onExit($bind(controller, controller.setNotFSIdle));
            sm.addState(slotmodel.sm.State.FS_START_SPINNING).onEnter($bind(controller, controller.startFSSpinning));
            sm.addState(slotmodel.sm.State.FS_REQUEST_OUTCOME).onEnter($bind(controller, controller.sendPlatformSpinRequest));
            sm.addState(slotmodel.sm.State.PREPARE_PB_IDLE).onEnter($bind(controller, controller.prepareCurrentBetForPB)).onEnter($bind(controller, controller.preparePBIdle));
            sm.addState(slotmodel.sm.State.PB_IDLE).onEnter($bind(controller, controller.publishPBChoices));
            sm.addState(slotmodel.sm.State.PB_PICKING).onEnter($bind(controller, controller.startPicking));
            sm.addState(slotmodel.sm.State.PB_REQUEST_OUTCOME).onEnter($bind(controller, controller.sendPlatformSpinRequest));
            sm.addState(slotmodel.sm.State.PB_SEND_AND_PRESENT_SPIN_OUTCOME).onEnter($bind(controller, controller.sendSpinOutcome)).onEnter($bind(controller, controller.presentSpinOutcome));
            sm.addState(slotmodel.sm.State.RESULT).onEnter($bind(controller, controller.presentResult));
            sm.addState(slotmodel.sm.State.ABORT_SPIN).onEnter($bind(controller, controller.abortSpinAction));
            sm.addState(slotmodel.sm.State.PREPARE_TUMBLE_RESUME).onEnter($bind(controller, controller.prepareTumble));
        };
        slotmodel.StateMachineConfiguration.createTransitions = function(sm, controller) {
            sm.addTransition(slotmodel.sm.State.INITIAL, slotmodel.sm.State.INITIALIZATION, slotmodel.sm.Trigger.STARTED);
            sm.addTransition(slotmodel.sm.State.INITIALIZATION, slotmodel.sm.State.WAITING_GAME_LOADED, slotmodel.sm.Trigger.PLATFORM_INITIALIZED).action($bind(controller, controller.platformInitializedAction));
            sm.addTransition(slotmodel.sm.State.INITIALIZATION, slotmodel.sm.State.WAITING_PLATFORM_INITIALIZED, slotmodel.sm.Trigger.GAME_LOADED);
            sm.addTransition(slotmodel.sm.State.WAITING_GAME_LOADED, slotmodel.sm.State.MODEL_INITIALIZED, slotmodel.sm.Trigger.GAME_LOADED);
            sm.addTransition(slotmodel.sm.State.WAITING_PLATFORM_INITIALIZED, slotmodel.sm.State.MODEL_INITIALIZED, slotmodel.sm.Trigger.PLATFORM_INITIALIZED).action($bind(controller, controller.platformInitializedAction));
            sm.addTransition(slotmodel.sm.State.MODEL_INITIALIZED, slotmodel.sm.State.INITIALIZE_CLIENT, slotmodel.sm.Trigger.INITIALIZE_CLIENT);
            sm.addTransition(slotmodel.sm.State.INITIALIZE_CLIENT, slotmodel.sm.State.PREPARE_IDLE, slotmodel.sm.Trigger.GAME_INITIALIZED).action($bind(controller, controller.gameInitializedAction));
            sm.addTransition(slotmodel.sm.State.MODEL_INITIALIZED, slotmodel.sm.State.PREPARE_RESUME, slotmodel.sm.Trigger.RESUME_GAME);
            sm.addTransition(slotmodel.sm.State.PREPARE_RESUME, slotmodel.sm.State.PREPARE_FS_IDLE, slotmodel.sm.Trigger.GAME_RESUME_PREPARED).guardCondition($bind(controller, controller.resumeToFreeSpin));
            sm.addTransition(slotmodel.sm.State.PREPARE_RESUME, slotmodel.sm.State.PREPARE_PB_IDLE, slotmodel.sm.Trigger.GAME_RESUME_PREPARED).guardCondition($bind(controller, controller.resumeToPickerBonus));
            sm.addTransition(slotmodel.sm.State.PREPARE_RESUME, slotmodel.sm.State.PREPARE_TUMBLE_RESUME, slotmodel.sm.Trigger.GAME_RESUME_PREPARED).guardCondition($bind(controller, controller.resumeToTumble));
            sm.addTransition(slotmodel.sm.State.PREPARE_TUMBLE_RESUME, slotmodel.sm.State.START_SPINNING, slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED);
            sm.addTransition(slotmodel.sm.State.PREPARE_IDLE, slotmodel.sm.State.CHECK_AUTOSPINS, slotmodel.sm.Trigger.IDLE_PREPARED).guardCondition($bind(controller, controller.autoSpinOn));
            sm.addTransition(slotmodel.sm.State.PREPARE_IDLE, slotmodel.sm.State.IDLE, slotmodel.sm.Trigger.IDLE_PREPARED);
            sm.addStateInternalTransition(slotmodel.sm.State.IDLE, slotmodel.sm.Trigger.STAKE_CHANGED).action($bind(controller, controller.stakeChangedAction));
            sm.addStateInternalTransition(slotmodel.sm.State.IDLE, slotmodel.sm.Trigger.HELP_REQUESTED).action($bind(controller, controller.helpRequestedAction));
            sm.addStateInternalTransition(slotmodel.sm.State.IDLE, slotmodel.sm.Trigger.PAYTABLE_REQUESTED).action($bind(controller, controller.paytableRequestedAction));
            sm.addTransition(slotmodel.sm.State.IDLE, slotmodel.sm.State.START_SPINNING, slotmodel.sm.Trigger.GAME_REQUESTED_SPIN);
            sm.addTransition(slotmodel.sm.State.IDLE, slotmodel.sm.State.CHECK_AUTOSPINS, slotmodel.sm.Trigger.START_AUTOSPINS).guardCondition($bind(controller, controller.autoSpinEnabled)).action($bind(controller, controller.startAutoSpinsAction));
            sm.addTransition(slotmodel.sm.State.CHECK_AUTOSPINS, slotmodel.sm.State.IDLE, slotmodel.sm.Trigger.STOP_AUTOSPINS).action($bind(controller, controller.stopAutoSpinsAction));
            sm.addTransition(slotmodel.sm.State.CHECK_AUTOSPINS, slotmodel.sm.State.AUTOSPIN_IDLE, slotmodel.sm.Trigger.CONTINUE_AUTOSPINS);
            sm.addTransition(slotmodel.sm.State.AUTOSPIN_IDLE, slotmodel.sm.State.START_SPINNING, slotmodel.sm.Trigger.AUTOSPIN_REQUESTED).action($bind(controller, controller.startAutoSpinAction));
            sm.addTransition(slotmodel.sm.State.START_SPINNING, slotmodel.sm.State.REQUEST_OTCOME, slotmodel.sm.Trigger.SPINNING_STARTED);
            sm.addTransition(slotmodel.sm.State.REQUEST_OTCOME, slotmodel.sm.State.PLATFORM_OUTCOME, slotmodel.sm.Trigger.PLATFORM_OUTCOME_RECEIVED).action($bind(controller, controller.platformOutcomeReceivedAction));
            sm.addTransition(slotmodel.sm.State.PLATFORM_OUTCOME, slotmodel.sm.State.PRESENT_SPIN_OUTCOME, slotmodel.sm.Trigger.GAME_SPIN_FINISHED);
            sm.addTransition(slotmodel.sm.State.PRESENT_SPIN_OUTCOME, slotmodel.sm.State.RESULT, slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED).guardCondition($bind(controller, controller.nextStageIsBaseGame));
            sm.addTransition(slotmodel.sm.State.PRESENT_SPIN_OUTCOME, slotmodel.sm.State.CALCULATE_NEXT_STAGE, slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED);
            sm.addTransition(slotmodel.sm.State.CALCULATE_NEXT_STAGE, slotmodel.sm.State.RESULT, slotmodel.sm.Trigger.PRESENT_RESULT);
            sm.addTransition(slotmodel.sm.State.CALCULATE_NEXT_STAGE, slotmodel.sm.State.START_SPINNING, slotmodel.sm.Trigger.TUMBLE).guardCondition($bind(controller, controller.nextStageIsTumble));
            sm.addTransition(slotmodel.sm.State.CALCULATE_NEXT_STAGE, slotmodel.sm.State.PREPARE_FS_IDLE, slotmodel.sm.Trigger.PREPARE_FREE_SPIN);
            sm.addTransition(slotmodel.sm.State.PREPARE_FS_IDLE, slotmodel.sm.State.FS_IDLE, slotmodel.sm.Trigger.FS_IDLE_PREPARED);
            sm.addTransition(slotmodel.sm.State.FS_IDLE, slotmodel.sm.State.FS_START_SPINNING, slotmodel.sm.Trigger.GAME_REQUESTED_CONTINUE);
            sm.addTransition(slotmodel.sm.State.FS_START_SPINNING, slotmodel.sm.State.FS_REQUEST_OUTCOME, slotmodel.sm.Trigger.SPINNING_STARTED);
            sm.addTransition(slotmodel.sm.State.FS_REQUEST_OUTCOME, slotmodel.sm.State.PLATFORM_OUTCOME, slotmodel.sm.Trigger.PLATFORM_OUTCOME_RECEIVED).action($bind(controller, controller.platformOutcomeReceivedAction));
            sm.addTransition(slotmodel.sm.State.CALCULATE_NEXT_STAGE, slotmodel.sm.State.PREPARE_PB_IDLE, slotmodel.sm.Trigger.PREPARE_PICKER_BONUS);
            sm.addTransition(slotmodel.sm.State.PREPARE_PB_IDLE, slotmodel.sm.State.PB_IDLE, slotmodel.sm.Trigger.PB_IDLE_PREPARED);
            sm.addTransition(slotmodel.sm.State.PB_IDLE, slotmodel.sm.State.PB_PICKING, slotmodel.sm.Trigger.PICKER_BONUS_SELECTED);
            sm.addTransition(slotmodel.sm.State.PB_PICKING, slotmodel.sm.State.PB_REQUEST_OUTCOME, slotmodel.sm.Trigger.PICKING_STARTED);
            sm.addTransition(slotmodel.sm.State.PB_REQUEST_OUTCOME, slotmodel.sm.State.PB_SEND_AND_PRESENT_SPIN_OUTCOME, slotmodel.sm.Trigger.PLATFORM_OUTCOME_RECEIVED).action($bind(controller, controller.platformOutcomeReceivedAction));
            sm.addTransition(slotmodel.sm.State.PB_SEND_AND_PRESENT_SPIN_OUTCOME, slotmodel.sm.State.RESULT, slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED).guardCondition($bind(controller, controller.nextStageIsBaseGame));
            sm.addTransition(slotmodel.sm.State.PB_SEND_AND_PRESENT_SPIN_OUTCOME, slotmodel.sm.State.CALCULATE_NEXT_STAGE, slotmodel.sm.Trigger.SPIN_OUTCOME_PRESENTED);
            sm.addTransition(slotmodel.sm.State.RESULT, slotmodel.sm.State.PREPARE_IDLE, slotmodel.sm.Trigger.END_GAME).action($bind(controller, controller.gameResultPresentedAction));
            sm.addTransition(slotmodel.sm.State.REQUEST_OTCOME, slotmodel.sm.State.ABORT_SPIN, slotmodel.sm.Trigger.ABORT_SPIN).action($bind(controller, controller.platformAbortSpinAction));
            sm.addTransition(slotmodel.sm.State.FS_REQUEST_OUTCOME, slotmodel.sm.State.ABORT_SPIN, slotmodel.sm.Trigger.ABORT_SPIN).action($bind(controller, controller.platformAbortSpinAction));
            sm.addTransition(slotmodel.sm.State.PB_REQUEST_OUTCOME, slotmodel.sm.State.ABORT_SPIN, slotmodel.sm.Trigger.ABORT_SPIN).action($bind(controller, controller.platformAbortSpinAction));
            sm.addTransition(slotmodel.sm.State.START_SPINNING, slotmodel.sm.State.ABORT_SPIN, slotmodel.sm.Trigger.ABORT_SPIN).action($bind(controller, controller.platformAbortSpinAction));
            sm.addTransition(slotmodel.sm.State.ABORT_SPIN, slotmodel.sm.State.PREPARE_IDLE, slotmodel.sm.Trigger.SPIN_ABORTED).guardCondition($bind(controller, controller.nextStageIsBaseOrTumble)).action($bind(controller, controller.gameResultPresentedAction));
            sm.addTransition(slotmodel.sm.State.ABORT_SPIN, slotmodel.sm.State.PREPARE_FS_IDLE, slotmodel.sm.Trigger.SPIN_ABORTED).guardCondition($bind(controller, controller.nextStageIsFreeSpin));
            sm.addTransition(slotmodel.sm.State.ABORT_SPIN, slotmodel.sm.State.PREPARE_PB_IDLE, slotmodel.sm.Trigger.SPIN_ABORTED).guardCondition($bind(controller, controller.nextStageIsPickerBonus));
        };
        slotmodel.StateMachineConfiguration.prototype.__class__ = slotmodel.StateMachineConfiguration;
        slotmodel.StateMachineController = function(model) {
            this.model = model;
        };
        slotmodel.StateMachineController.__name__ = ["slotmodel", "StateMachineController"];
        slotmodel.StateMachineController.prototype.model = null;
        slotmodel.StateMachineController.prototype.stateMachine = null;
        slotmodel.StateMachineController.prototype.start = function(context) {
            var stateMachineProvider = slotmodel.KernelHelper.getStateMahineProvider(context);
            this.stateMachine = slotmodel.StateMachineConfiguration.createStateMachine(this, stateMachineProvider);
        };
        slotmodel.StateMachineController.prototype.fireTrigger = function(trigger, payload) {
            slotmodel.Log.getLogger(this).debug("Trigger:" + _hcmn_.Std.string(trigger));
            this.stateMachine.trigger(trigger, payload);
        };
        slotmodel.StateMachineController.prototype.getState = function() {
            return this.model.getState();
        };
        slotmodel.StateMachineController.prototype.getConfiguration = function() {
            return this.model.getConfiguration();
        };
        slotmodel.StateMachineController.prototype.getPfBusController = function() {
            return this.model.getPfBusController();
        };
        slotmodel.StateMachineController.prototype.getGfBusController = function() {
            return this.model.getGfBusController();
        };
        slotmodel.StateMachineController.prototype.initializePlatform = function() {
            this.getPfBusController().initializePlatform();
        };
        slotmodel.StateMachineController.prototype.platformInitializedAction = function(payload) {
            this.getConfiguration().onPlatformInitialized(payload);
            this.getState().onPlatformInitialized(payload);
        };
        slotmodel.StateMachineController.prototype.onModelInitialized = function() {
            this.model.onInitialized();
        };
        slotmodel.StateMachineController.prototype.initializeGame = function() {
            this.getGfBusController().initializeGame();
        };
        slotmodel.StateMachineController.prototype.initializeConsole = function() {
            this.getPfBusController().initializeConsole();
        };
        slotmodel.StateMachineController.prototype.gameInitializedAction = function(payload) {
            this.getPfBusController().onGameInitialized();
        };
        slotmodel.StateMachineController.prototype.createNewBet = function() {
            this.getState().createNewBet();
        };
        slotmodel.StateMachineController.prototype.prepareIdle = function() {
            this.getPfBusController().prepareIdle();
        };
        slotmodel.StateMachineController.prototype.setIdle = function() {
            this.getPfBusController().setIdle();
            this.getGfBusController().setGameIdle();
        };
        slotmodel.StateMachineController.prototype.setNotIdle = function() {
            this.getPfBusController().setNotIdle();
            this.getGfBusController().setGameNotIdle();
        };
        slotmodel.StateMachineController.prototype.stakeChangedAction = function(stakeItems) {
            if (!this.getState().updateStake(stakeItems)) return false;
            this.getGfBusController().confirmStakeChanged();
            this.getPfBusController().confirmStakeChanged();
            return true;
        };
        slotmodel.StateMachineController.prototype.helpRequestedAction = function($void) {
            this.getGfBusController().sendOpenHelp();
        };
        slotmodel.StateMachineController.prototype.paytableRequestedAction = function($void) {
            this.getGfBusController().sendOpenPaytable();
        };
        slotmodel.StateMachineController.prototype.startAutoSpinsAction = function(count) {
            this.getState().startAutoSpins(count);
            this.getPfBusController().sendAutoSpinsStarted();
        };
        slotmodel.StateMachineController.prototype.setAutoSpinIdle = function() {
            this.getGfBusController().setAutoSpinIdle();
        };
        slotmodel.StateMachineController.prototype.checkStopAutoSpins = function() {
            this.getState().checkStopAutoSpins();
        };
        slotmodel.StateMachineController.prototype.setAutoSpinNotIdle = function() {
            this.getGfBusController().setAutoSpinNotIdle();
        };
        slotmodel.StateMachineController.prototype.startAutoSpinAction = function($void) {
            this.getState().prepareAutoSpin();
            this.getGfBusController().sendAutoSpinStarted();
        };
        slotmodel.StateMachineController.prototype.requestAutoSpin = function() {
            this.getGfBusController().requestAutoSpin();
        };
        slotmodel.StateMachineController.prototype.stopAutoSpinsAction = function(reason) {
            this.getState().stopAutoSpins();
            this.getGfBusController().sendAutoSpinsStopped(reason);
            this.getPfBusController().sendAutoSpinsStopped();
        };
        slotmodel.StateMachineController.prototype.startSpinning = function() {
            this.getGfBusController().startReelSpin();
            this.getPfBusController().startSpinning();
        };
        slotmodel.StateMachineController.prototype.deductStake = function() {
            var stage = this.getState().getNextStage();
            if (stage.equals(slotmodel.EStage.BASE_GAME)) this.getPfBusController().deductStake();
        };
        slotmodel.StateMachineController.prototype.sendPlatformSpinRequest = function() {
            this.getPfBusController().sendPlatformSpinRequest();
        };
        slotmodel.StateMachineController.prototype.platformOutcomeReceivedAction = function(payload) {
            this.getState().onPlatformOutcomeReceived(payload);
        };
        slotmodel.StateMachineController.prototype.sendSpinOutcome = function() {
            this.getGfBusController().sendSpinOutcome();
        };
        slotmodel.StateMachineController.prototype.stopReelSpin = function() {
            this.getGfBusController().stopReelSpin();
        };
        slotmodel.StateMachineController.prototype.presentSpinOutcome = function() {
            this.getGfBusController().presentSpinOutcome();
        };
        slotmodel.StateMachineController.prototype.calculateNextStage = function() {
            this.getPfBusController().calculateNextStage();
        };
        slotmodel.StateMachineController.prototype.prepareCurrentBetForFS = function() {
            this.getState().prepareCurrentBetForFS();
        };
        slotmodel.StateMachineController.prototype.prepareFSIdle = function() {
            this.getPfBusController().prepareFSIdle();
        };
        slotmodel.StateMachineController.prototype.setFSIdle = function() {
            this.getGfBusController().setGameFSIdle();
        };
        slotmodel.StateMachineController.prototype.setNotFSIdle = function() {
            this.getGfBusController().setGameNotFSIdle();
        };
        slotmodel.StateMachineController.prototype.startFSSpinning = function() {
            this.getGfBusController().startReelSpin();
            this.getPfBusController().startFSSpinning();
        };
        slotmodel.StateMachineController.prototype.prepareCurrentBetForPB = function() {
            this.getState().prepareCurrentBetForPB();
        };
        slotmodel.StateMachineController.prototype.preparePBIdle = function() {
            this.getPfBusController().preparePBIdle();
            this.getGfBusController().setPBIdle();
        };
        slotmodel.StateMachineController.prototype.publishPBChoices = function() {
            this.getGfBusController().publishPBChoices();
        };
        slotmodel.StateMachineController.prototype.startPicking = function() {
            this.getPfBusController().startPicking();
        };
        slotmodel.StateMachineController.prototype.presentResult = function() {
            this.getGfBusController().presentResult();
        };
        slotmodel.StateMachineController.prototype.gameResultPresentedAction = function(payload) {
            this.getState().onResultPresented();
        };
        slotmodel.StateMachineController.prototype.platformAbortSpinAction = function(payload) {
            this.getState().setAbortSpinProperties(payload);
            if (this.getState().getPreviousBet() != null) {
                var denomination = this.getState().getNextDenomination();
                var betPerLineCreditDenominated = denomination.mulInt(payload.betPerLineCredit);
                this.getState().getPreviousBet().updateStake(new slotModelApi.StakeItems(payload.selectedLineCount, betPerLineCreditDenominated.value, payload.sideBet), null);
            }
        };
        slotmodel.StateMachineController.prototype.abortSpinAction = function() {
            if (this.getState().isAutoSpinOn()) this.getState().onGameStopAutoSpinsRequested(slotmodel.AutoSpinInfoImpl.REASON_ID_AutoSpinsInterrupted);
            this.getGfBusController().abortSpin();
            this.getPfBusController().abortSpin();
        };
        slotmodel.StateMachineController.prototype.prepareResume = function() {
            this.getGfBusController().prepareResume();
        };
        slotmodel.StateMachineController.prototype.nextStageIsBaseGame = function(payload) {
            return this.getState().isNextStageBaseGame();
        };
        slotmodel.StateMachineController.prototype.nextStageIsBaseOrTumble = function(payload) {
            return this.getState().getNextStage().contains(slotmodel.EStage.BASE_GAME);
        };
        slotmodel.StateMachineController.prototype.nextStageIsFreeSpin = function(payload) {
            return this.getState().isNextStageFreeSpin();
        };
        slotmodel.StateMachineController.prototype.nextStageIsPickerBonus = function(payload) {
            return this.getState().isNextStagePickerBonus();
        };
        slotmodel.StateMachineController.prototype.nextStageIsTumble = function(payload) {
            return this.getState().isNextStagetumble();
        };
        slotmodel.StateMachineController.prototype.noResume = function(payload) {
            return this.getState().isNoResume();
        };
        slotmodel.StateMachineController.prototype.isResume = function(payload) {
            return this.getState().isResume();
        };
        slotmodel.StateMachineController.prototype.resumeToFreeSpin = function(payload) {
            return this.getState().isResumeToFreeSpin();
        };
        slotmodel.StateMachineController.prototype.autoSpinOn = function(payload) {
            return this.getState().isAutoSpinOn();
        };
        slotmodel.StateMachineController.prototype.autoSpinEnabled = function(payload) {
            return this.getState().isAutoSpinEnabled();
        };
        slotmodel.StateMachineController.prototype.resumeToPickerBonus = function(payload) {
            return this.getState().isResumeToPickerBonus();
        };
        slotmodel.StateMachineController.prototype.checkStopAutoSpinsInterupted = function() {
            if (this.getState().isAutoSpinOn()) {
                if (this.getState().isNextStageBonus()) {
                    this.getState().onGameStopAutoSpinsRequested(slotmodel.AutoSpinInfoImpl.REASON_ID_AutoSpinsInterrupted);
                    this.getGfBusController().sendAutoSpinsStopped(this.getState().getAutoSpinInfo().checkStopAutoSpins());
                    this.getState().stopAutoSpins();
                    this.getPfBusController().sendAutoSpinsStopped();
                }
            }
        };
        slotmodel.StateMachineController.prototype.resumeToTumble = function(payload) {
            return this.getState().isResumeToTumble();
        };
        slotmodel.StateMachineController.prototype.prepareTumble = function() {
            this.getPfBusController().prepareTumble();
        };
        slotmodel.StateMachineController.prototype.__class__ = slotmodel.StateMachineController;
        slotmodel.State = function(owner) {
            this.pluginError = false;
            this.owner = owner;
            this.totalBetsCache = new _hcmn_.haxe_ds_StringMap();
            this.pickerBonusChoices = [];
        };
        slotmodel.State.__name__ = ["slotmodel", "State"];
        slotmodel.State.prototype.owner = null;
        slotmodel.State.prototype.pluginError = null;
        slotmodel.State.prototype.resumeStage = null;
        slotmodel.State.prototype.stage = null;
        slotmodel.State.prototype.nextStage = null;
        slotmodel.State.prototype.previousBet = null;
        slotmodel.State.prototype.currentBet = null;
        slotmodel.State.prototype.nextSpinStripeLayersForSynchronizedReels = null;
        slotmodel.State.prototype.nextSpinStripeLayersPerBet = null;
        slotmodel.State.prototype.resumePerStake = null;
        slotmodel.State.prototype.pickerBonusChoices = null;
        slotmodel.State.prototype.selectedPickerBonusChoice = null;
        slotmodel.State.prototype.totalBetsCache = null;
        slotmodel.State.prototype.autoSpinInfo = null;
        slotmodel.State.prototype.accountBalances = null;
        slotmodel.State.prototype.getCurrentBet = function() {
            return this.currentBet;
        };
        slotmodel.State.prototype.getPreviousBet = function() {
            return this.previousBet;
        };
        slotmodel.State.prototype.getAccountBalances = function() {
            return this.accountBalances;
        };
        slotmodel.State.prototype.setAccountBalances = function(ab) {
            this.accountBalances = ab;
        };
        slotmodel.State.prototype.setSelectedPickerBonusChoice = function(key, value) {
            this.selectedPickerBonusChoice = [key];
        };
        slotmodel.State.prototype.setSelectedPickerBonusChoices = function(names) {
            this.selectedPickerBonusChoice = names;
        };
        slotmodel.State.prototype.getAutoSpinInfo = function() {
            return this.autoSpinInfo;
        };
        slotmodel.State.prototype.getRiskControlSettings = function() {
            return this.owner.getConfiguration().getPlayerConfiguration().getRiskControlSettings();
        };
        slotmodel.State.prototype.getPlayerConfiguration = function() {
            return this.owner.getConfiguration().getPlayerConfiguration();
        };
        slotmodel.State.prototype.getGameConfiguration = function() {
            return this.owner.getConfiguration().getGameConfiguration();
        };
        slotmodel.State.prototype.getSlotDefinition = function() {
            var gameConfiguration = this.getGameConfiguration();
            if (gameConfiguration == null) return null;
            return gameConfiguration.getSlotDefinition();
        };
        slotmodel.State.prototype.getPickerBonusChoices = function() {
            return this.pickerBonusChoices;
        };
        slotmodel.State.prototype.getSelectedPickerBonusChoice = function() {
            return this.selectedPickerBonusChoice;
        };
        slotmodel.State.prototype.onPluginError = function(message) {
            slotmodel.Log.getLoggerBykey("PluginController").error("[GamePluginError]" + message);
            this.pluginError = true;
            this.onError(this.getFatalError(message));
        };
        slotmodel.State.prototype.getFatalError = function(message) {
            return new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.Plugin_PF_PayloadError, true, message);
        };
        slotmodel.State.prototype.onError = function(error) {
            this.owner.onError(error);
        };
        slotmodel.State.prototype.getTotalBetsForVariableBetPerLine = function(selectedLinesCount, sideBet) {
            var id = this.generateTotalBetsCacheId(selectedLinesCount, null, sideBet);
            if (!this.totalBetsCache.exists(id)) {
                if (this.getRiskControlSettings().betsPerLine == null) return null;
                var totalBets = [];
                var betPerLine;
                var _g = 0;
                var _g1 = this.getRiskControlSettings().betsPerLine;
                while (_g < _g1.length) {
                    var betPerLine1 = _g1[_g];
                    ++_g;
                    var totalBet = new money.Money(betPerLine1).mulInt(selectedLinesCount + sideBet).value;
                    totalBets.push(new slotModelApi.Pair(totalBet, betPerLine1));
                }
                this.totalBetsCache.set(id, totalBets);
            }
            return this.totalBetsCache.get(id);
        };
        slotmodel.State.prototype.getTotalBetsForVariableLines = function(betPerLineCredit, sideBet) {
            var id = this.generateTotalBetsCacheId(null, betPerLineCredit, sideBet);
            if (!this.totalBetsCache.exists(id)) {
                if (this.getGameConfiguration().getSelectableLines() == null) return null;
                var betPerLine = new money.Money(this.getRiskControlSettings().denomination).mulInt(betPerLineCredit);
                var totalBets = [];
                var selectableLineCount;
                var _g = 0;
                var _g1 = this.getGameConfiguration().getSelectableLines();
                while (_g < _g1.length) {
                    var selectableLineCount1 = _g1[_g];
                    ++_g;
                    var totalBet = betPerLine.mulInt(selectableLineCount1 + sideBet).value;
                    totalBets.push(new slotModelApi.Pair(totalBet, selectableLineCount1));
                }
                this.totalBetsCache.set(id, totalBets);
            }
            return this.totalBetsCache.get(id);
        };
        slotmodel.State.prototype.getTotalBetsForVariableSideBet = function(betPerLineCredit, selectedLinesCount) {
            var id = this.generateTotalBetsCacheId(selectedLinesCount, betPerLineCredit, null);
            if (!this.totalBetsCache.exists(id)) {
                if (this.getGameConfiguration().getSideBets() == null) return null;
                var betPerLine = new money.Money(this.getRiskControlSettings().denomination).mulInt(betPerLineCredit);
                var totalBets = [];
                var sideBet;
                var _g = 0;
                var _g1 = this.getGameConfiguration().getSideBets();
                while (_g < _g1.length) {
                    var sideBet1 = _g1[_g];
                    ++_g;
                    var totalBet = betPerLine.mulInt(selectedLinesCount + sideBet1).value;
                    totalBets.push(new slotModelApi.Pair(totalBet, sideBet1));
                }
                this.totalBetsCache.set(id, totalBets);
            }
            return this.totalBetsCache.get(id);
        };
        slotmodel.State.prototype.generateTotalBetsCacheId = function(lines, betPerLine, sideBet) {
            var id = "";
            if (lines != null) id += "L" + (lines == null ? "null" : "" + lines);
            if (betPerLine != null) id += "B" + (betPerLine == null ? "null" : "" + betPerLine);
            if (sideBet != null) id += "S" + (sideBet == null ? "null" : "" + sideBet);
            return id;
        };
        slotmodel.State.prototype.getNextStage = function() {
            if (this.nextStage != null) return this.nextStage;
            else return this.stage;
        };
        slotmodel.State.prototype.getResumePerStakeOutcome = function(stage, lineCount, betPerLineCredit, sideBet) {
            if (sideBet == null) sideBet = 0;
            if (this.resumePerStake == null) return this.getDefaultInitOutcome(stage, lineCount, betPerLineCredit);
            var outcome = this.resumePerStake.getResumeOutcome(stage.value, lineCount, betPerLineCredit);
            var outcomeImpl = slotmodel.OutcomeImpl.create(outcome);
            if (outcomeImpl == null) return null;
            var denomination = new money.Money(this.getRiskControlSettings().denomination);
            var resumePerStakeBet = new slotmodel.Bet(this, betPerLineCredit, lineCount, sideBet, denomination);
            return outcomeImpl.getOutcome(resumePerStakeBet);
        };
        slotmodel.State.prototype.getDefaultInitOutcome = function(stage, lineCount, betPerLineCredit) {
            var reelPicture = null;
            if (stage.contains(slotmodel.EStage.FREE_SPIN)) reelPicture = this.getSlotDefinition().startFSReelPicture;
            else reelPicture = this.getSlotDefinition().startReelPicture;
            return new slotModelApi.Outcome(reelPicture, null, null, null, null, null, null, null, null);
        };
        slotmodel.State.prototype.getAbortSpinResumeOutcome = function(stage) {
            if (this.resumePerStake == null) return this.getCurrentBet().getAbortSpinOutcome(stage);
            return this.getResumePerStakeOutcome(stage, this.getCurrentBet().getSelectedLinesCount(), this.getCurrentBet().getBetPerLineCredit(), this.getCurrentBet().getSideBet());
        };
        slotmodel.State.prototype.getNextSpinStripeLayers = function(stage, lineCount, betPerLineCredit) {
            var nextSpinStripeLayerValue = [];
            if (this.nextSpinStripeLayersForSynchronizedReels != null) {
                nextSpinStripeLayerValue = this.nextSpinStripeLayersForSynchronizedReels.getStripeLayersForSynchronizedReels(stage.value, lineCount, betPerLineCredit);
                return nextSpinStripeLayerValue;
            } else if (this.nextSpinStripeLayersPerBet != null) {
                nextSpinStripeLayerValue = this.nextSpinStripeLayersPerBet.getStripeLayersPerBet(this.getSlotDefinition(), stage.value, slotmodel.PayloadHelper.getCurrentBetStakePayload(this));
                return nextSpinStripeLayerValue;
            }
            return this.getGameConfiguration().getDefaultStripeLayers(stage);
        };
        slotmodel.State.prototype.getBigWin = function(stakeCredit, winCredit, denomination) {
            if (stakeCredit == null || stakeCredit == 0 || winCredit == null) return null;
            var winSegments = this.getWinSegments(stakeCredit, winCredit, denomination);
            var winGroup = 0;
            if (winSegments != null && winSegments.length > 0) winGroup = winSegments[winSegments.length - 1].winGroup;
            var customBigWin = this.owner.getPluginController().getCustomBigWin(stakeCredit, winCredit, $bind(this, this.onPluginError));
            return new slotModelApi.BigWin(winGroup, winSegments, customBigWin);
        };
        slotmodel.State.prototype.getWinSegments = function(stakeCredit, winCredit, denomination) {
            if (winCredit == 0) return [new slotModelApi.BigWinSegment(0, denomination.mulInt(winCredit).value)];
            var bigWinGroupPoints = this.getGameConfiguration().getBigWinGroupPoints();
            if (bigWinGroupPoints == null || slotmodel.StdHelper.isArrayEmpty(bigWinGroupPoints)) return [new slotModelApi.BigWinSegment(0, denomination.mulInt(winCredit).value)];
            var stake = denomination.mulInt(stakeCredit);
            var winMultiplier = winCredit / stakeCredit;
            var bigWinSegments = new _hcmn_.haxe_ds_IntMap();
            var i;
            var _g1 = 0;
            var _g = bigWinGroupPoints.length;
            while (_g1 < _g) {
                var i1 = _g1++;
                var point = bigWinGroupPoints[i1];
                if (point[0] > -1 && winMultiplier > point[0]) {
                    if (point[1] == -1 || stakeCredit < point[1]) {
                        var groupWin = stake.mul(new money.Money(_hcmn_.Std.string(point[0])));
                        var key1 = _hcmn_.Std.parseInt(_hcmn_.Std.string(point[2]));
                        bigWinSegments.h[key1] = groupWin.value;
                    }
                    continue;
                }
                if (point[1] > -1 && stakeCredit >= point[1]) continue;
                var key2 = _hcmn_.Std.parseInt(_hcmn_.Std.string(point[2]));
                var value = denomination.mulInt(winCredit).value;
                bigWinSegments.h[key2] = value;
                break;
            }
            var result = [];
            var key;
            var $it0 = bigWinSegments.keys();
            while ($it0.hasNext()) {
                var key3 = $it0.next();
                result.push(new slotModelApi.BigWinSegment(key3, bigWinSegments.h[key3]));
            }
            return result;
        };
        slotmodel.State.prototype.onPlatformInitialized = function(properties) {
            if (properties == null) {
                this.onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.InitializedPropertiesError, true, "[onPlatformInitialized] InitializedProperties are null;"));
                return;
            }
            this.setResumeData(properties.resumeSpinOutcome);
        };
        slotmodel.State.prototype.setResumeData = function(resumeSpinOutcome) {
            this.resumeStage = slotmodel.EResumeStage.NO_RESUME;
            if (resumeSpinOutcome == null) return;
            this.nextSpinStripeLayersPerBet = resumeSpinOutcome.stageBasedSpinStripeLayers;
            this.nextSpinStripeLayersForSynchronizedReels = resumeSpinOutcome.nextSpinStripeLayers;
            this.resumePerStake = resumeSpinOutcome.resumePerStake;
            this.stage = resumeSpinOutcome.stage;
            this.nextStage = resumeSpinOutcome.nextStage;
            var betPerLineCredit = this.getNextBetPerLineCredit();
            var selectedLinesCount = this.getNextSelectedLinesCount();
            var denomination = this.getNextDenomination();
            this.previousBet = new slotmodel.Bet(this, betPerLineCredit, selectedLinesCount, null, denomination);
            this.previousBet.setStage(resumeSpinOutcome.stage);
            this.previousBet.setNextStage(resumeSpinOutcome.nextStage);
            this.previousBet.setBaseGameOutcome(resumeSpinOutcome.baseGame);
            this.previousBet.setFreeSpinOutcome(resumeSpinOutcome.freeSpin);
            this.previousBet.setPickerBonusOutcome(resumeSpinOutcome.pickerBonus);
            this.previousBet.setSideBet(resumeSpinOutcome.sideBet);
            this.previousBet.setTotalFreeSpinCredit(resumeSpinOutcome.totalFreeSpinCredit);
            this.previousBet.setTotalGameCredit(resumeSpinOutcome.totalGameCredit);
            this.previousBet.setTotalWinCredit(resumeSpinOutcome.totalWinCredit);
            this.previousBet.setAwardCapExceeded(resumeSpinOutcome.awardCapExceeded);
            if (resumeSpinOutcome.nextStage.contains(slotmodel.EStage.PICKER_BONUS)) {
                slotmodel.Log.getLogger(this).debug("---------------- Enter PICKER_BONUS Resume ------------------------------");
                this.currentBet = this.previousBet;
                this.previousBet = null;
                this.resumeStage = slotmodel.EResumeStage.PICKER_BONUS;
                if (resumeSpinOutcome.pickerBonus != null) this.pickerBonusChoices = resumeSpinOutcome.pickerBonus.getChoices();
                else if (resumeSpinOutcome.stage.equals(slotmodel.EStage.BASE_GAME) || resumeSpinOutcome.stage.contains(slotmodel.EStage.FREE_SPIN)) {} else throw new js._Boot.HaxeError(new slotmodel.Error(slotmodel.EErrorSource.STATE, 1, true, "resumeSpinOutcome.pickerBonus==null"));
            } else if (resumeSpinOutcome.nextStage.contains(slotmodel.EStage.FREE_SPIN)) {
                slotmodel.Log.getLogger(this).debug("---------------- Enter FREE_SPIN Resume ------------------------------");
                this.currentBet = this.previousBet;
                this.previousBet = null;
                this.resumeStage = slotmodel.EResumeStage.RESUME_FREESPIN;
            } else if (resumeSpinOutcome.nextStage.contains(slotmodel.EStage.TUMBLE)) {
                this.currentBet = this.previousBet;
                this.previousBet = null;
                this.resumeStage = slotmodel.EResumeStage.TUMBLE;
            }
        };
        slotmodel.State.prototype.getNextBetPerLineCredit = function() {
            var betPerLineCredit = this.getPlayerConfiguration().getDefaultBetPerLineCredit();
            if (this.previousBet != null) betPerLineCredit = this.previousBet.getBetPerLineCredit();
            return betPerLineCredit;
        };
        slotmodel.State.prototype.getNextSelectedLinesCount = function() {
            var selectedLinesCount = this.getRiskControlSettings().defaultSelectedLineCount;
            if (this.previousBet != null) selectedLinesCount = this.previousBet.getSelectedLinesCount();
            if (this.inPromotionalFreeSpins()) selectedLinesCount = slotmodel.StdHelper.getMaxFromArray(this.getSlotDefinition().selectableLines);
            return selectedLinesCount;
        };
        slotmodel.State.prototype.inPromotionalFreeSpins = function() {
            return this.accountBalances != null && this.accountBalances.promoFreeSpinCount != null;
        };
        slotmodel.State.prototype.getNextDenomination = function() {
            var denomination = new money.Money(this.getRiskControlSettings().denomination);
            if (this.previousBet != null) denomination = this.previousBet.getDenomination();
            return denomination;
        };
        slotmodel.State.prototype.getNextSideBet = function() {
            var sideBet = 0;
            if (this.previousBet != null) sideBet = this.previousBet.getSideBet();
            if (sideBet == 0 && this.isResume() && this.currentBet != null) sideBet = this.currentBet.getSideBet();
            if (this.inPromotionalFreeSpins()) sideBet = slotmodel.StdHelper.getMaxFromArray(this.getSlotDefinition().sideBets);
            return sideBet;
        };
        slotmodel.State.prototype.createNewBet = function() {
            this.stage = this.nextStage;
            this.nextStage = null;
            var betPerLineCredit = this.getNextBetPerLineCredit();
            var selectedLinesCount = this.getNextSelectedLinesCount();
            var denomination = this.getNextDenomination();
            var sideBet = this.getNextSideBet();
            this.currentBet = new slotmodel.Bet(this, betPerLineCredit, selectedLinesCount, sideBet, denomination);
        };
        slotmodel.State.prototype.updateStake = function(stakeItems) {
            return this.currentBet.updateStake(stakeItems, $bind(this, this.onError));
        };
        slotmodel.State.prototype.startAutoSpins = function(count) {
            if (!this.isAutoSpinEnabled()) {
                this.onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalAutoSpin, true, "AutoSpin is not available"));
                return;
            }
            var steps = this.getSlotDefinition().autoSpins.steps;
            if (steps == null) {
                this.onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalAutoSpin, true, "AutoSpin steps are not available"));
                return;
            }
            var stepExist = false;
            var step;
            var _g = 0;
            while (_g < steps.length) {
                var step1 = steps[_g];
                ++_g;
                if (step1 == count) {
                    stepExist = true;
                    break;
                }
            }
            if (!stepExist) {
                this.onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalAutoSpin, true, "AutoSpin step (" + count + ") is not available"));
                return;
            }
            this.autoSpinInfo = new slotmodel.AutoSpinInfoImpl(count);
        };
        slotmodel.State.prototype.checkStopAutoSpins = function() {
            if (this.autoSpinInfo == null) {
                this.onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalAutoSpin, true, "AutoSpin State and autoSpinInfo is null"));
                return;
            }
            var autoSpinsStopReason = this.autoSpinInfo.checkStopAutoSpins();
            if (autoSpinsStopReason != null) this.owner.onStopAutoSpinsRequested(autoSpinsStopReason);
            else this.owner.onNoAutoSpinsStopReason();
        };
        slotmodel.State.prototype.prepareAutoSpin = function() {
            if (this.autoSpinInfo == null) return;
            this.autoSpinInfo.incrementCurrent();
        };
        slotmodel.State.prototype.onGameStopAutoSpinsRequested = function(reasonId) {
            if (this.autoSpinInfo == null) {
                this.onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalAutoSpin, true, "AutoSpin State and autoSpinInfo is null"));
                return;
            }
            this.autoSpinInfo.onGameStopAutoSpinsRequested(reasonId);
        };
        slotmodel.State.prototype.stopAutoSpins = function() {
            this.autoSpinInfo = null;
        };
        slotmodel.State.prototype.onPlatformOutcomeReceived = function(spinOutcome) {
            this.stage = spinOutcome.stage;
            this.nextStage = spinOutcome.nextStage;
            this.nextSpinStripeLayersForSynchronizedReels = spinOutcome.nextSpinStripeLayers;
            this.resumePerStake = spinOutcome.resumePerStake;
            this.currentBet.setStage(spinOutcome.stage);
            this.currentBet.setNextStage(spinOutcome.nextStage);
            this.currentBet.setBaseGameOutcome(spinOutcome.baseGame);
            this.currentBet.setFreeSpinOutcome(spinOutcome.freeSpin);
            this.currentBet.setPickerBonusOutcome(spinOutcome.pickerBonus);
            this.currentBet.setTotalFreeSpinCredit(spinOutcome.totalFreeSpinCredit);
            this.currentBet.setTotalGameCredit(spinOutcome.totalGameCredit);
            this.currentBet.setTotalWinCredit(spinOutcome.totalWinCredit);
            this.currentBet.setAwardCapExceeded(spinOutcome.awardCapExceeded);
            if (spinOutcome.pickerBonus != null) this.pickerBonusChoices = spinOutcome.pickerBonus.getChoices();
        };
        slotmodel.State.prototype.prepareCurrentBetForFS = function() {
            this.stage = this.nextStage;
            this.nextStage = null;
        };
        slotmodel.State.prototype.prepareCurrentBetForPB = function() {
            this.stage = this.nextStage;
            this.nextStage = null;
        };
        slotmodel.State.prototype.onResultPresented = function() {
            this.previousBet = this.currentBet;
            this.currentBet = null;
        };
        slotmodel.State.prototype.setAbortSpinProperties = function(properties) {
            if (properties == null) {
                this.onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalSpinAbort, true, "No abortSpinProperties!"));
                return false;
            }
            this.stage = properties.stage;
            this.nextStage = properties.nextStage;
            var selectedLinesCount = properties.selectedLineCount;
            var denomination = this.getCurrentBet().getDenomination();
            var betPerLine = denomination.mulInt(this.getCurrentBet().getBetPerLineCredit()).value;
            var sideBet = properties.sideBet;
            if (!this.updateStake(new slotModelApi.StakeItems(selectedLinesCount, betPerLine, sideBet))) return false;
            this.getCurrentBet().setStage(properties.stage);
            this.getCurrentBet().setNextStage(properties.nextStage);
            this.getCurrentBet().setAbortedSpinOutcomes(slotmodel.EStage.BASE_GAME.toString(), properties.baseGameOutcome);
            this.getCurrentBet().setAbortedSpinOutcomes(slotmodel.EStage.FREE_SPIN.toString(), properties.freeSpinOutcome);
            if (properties.pickerBonusOutcome != null) this.getCurrentBet().setAbortedSpinOutcomes(slotmodel.EStage.PICKER_BONUS.toString(), properties.pickerBonusOutcome);
            return true;
        };
        slotmodel.State.prototype.isStageBaseGame = function() {
            return this.stage.equals(slotmodel.EStage.BASE_GAME);
        };
        slotmodel.State.prototype.isStageFreeSpin = function() {
            return this.stage.contains(slotmodel.EStage.FREE_SPIN);
        };
        slotmodel.State.prototype.isNextStageBaseGame = function() {
            return this.nextStage.equals(slotmodel.EStage.BASE_GAME);
        };
        slotmodel.State.prototype.isNextStageFreeSpin = function() {
            return this.nextStage.contains(slotmodel.EStage.FREE_SPIN);
        };
        slotmodel.State.prototype.isNextStagePickerBonus = function() {
            return this.nextStage.contains(slotmodel.EStage.PICKER_BONUS);
        };
        slotmodel.State.prototype.isNextStagetumble = function() {
            return this.nextStage.contains(slotmodel.EStage.TUMBLE);
        };
        slotmodel.State.prototype.isResume = function() {
            return !this.isNoResume();
        };
        slotmodel.State.prototype.isNoResume = function() {
            return this.resumeStage.equals(slotmodel.EResumeStage.NO_RESUME);
        };
        slotmodel.State.prototype.isResumeToFreeSpin = function() {
            return this.resumeStage.equals(slotmodel.EResumeStage.RESUME_FREESPIN);
        };
        slotmodel.State.prototype.isAutoSpinOn = function() {
            return this.autoSpinInfo != null;
        };
        slotmodel.State.prototype.isAutoSpinEnabled = function() {
            var slotDefinition = this.getSlotDefinition();
            if (slotDefinition == null) return false;
            if (slotDefinition.autoSpins == null) return false;
            return slotDefinition.autoSpins.enabled;
        };
        slotmodel.State.prototype.isResumeToPickerBonus = function() {
            return this.resumeStage.equals(slotmodel.EResumeStage.PICKER_BONUS);
        };
        slotmodel.State.prototype.isResumeToTumble = function() {
            return this.resumeStage.equals(slotmodel.EResumeStage.TUMBLE);
        };
        slotmodel.State.prototype.isNextStageBonus = function() {
            return this.isNextStagePickerBonus() || this.isNextStageFreeSpin();
        };
        slotmodel.State.prototype.__class__ = slotmodel.State;
        slotmodel.AccountBalances = function(balance, promoFreeSpinCount) {
            this.balance = balance;
            this.promoFreeSpinCount = promoFreeSpinCount;
        };
        slotmodel.AccountBalances.__name__ = ["slotmodel", "AccountBalances"];
        slotmodel.AccountBalances.prototype.balance = null;
        slotmodel.AccountBalances.prototype.promoFreeSpinCount = null;
        slotmodel.AccountBalances.prototype.__class__ = slotmodel.AccountBalances;
        slotmodel.AutoSpinInfoImpl = function(total) {
            this.gameStopAutoSpinsRequested = false;
            this.total = total;
            this.current = 0;
            this.gameStopAutoSpinsRequested = false;
            this.reason = null;
        };
        slotmodel.AutoSpinInfoImpl.__name__ = ["slotmodel", "AutoSpinInfoImpl"];
        slotmodel.AutoSpinInfoImpl.prototype.total = null;
        slotmodel.AutoSpinInfoImpl.prototype.current = null;
        slotmodel.AutoSpinInfoImpl.prototype.gameStopAutoSpinsRequested = null;
        slotmodel.AutoSpinInfoImpl.prototype.reason = null;
        slotmodel.AutoSpinInfoImpl.prototype.incrementCurrent = function() {
            this.current = this.current + 1;
        };
        slotmodel.AutoSpinInfoImpl.prototype.getAutoSpinInfo = function() {
            return new slotModelApi.AutoSpinInfo(this.current, this.total);
        };
        slotmodel.AutoSpinInfoImpl.prototype.checkStopAutoSpins = function() {
            if (this.current >= this.total) {
                this.reason = new slotModelApi.AutoSpinsStopReason(slotmodel.AutoSpinInfoImpl.REASON_ID_Finished, "AutosSpins finished");
                return this.reason;
            }
            return this.reason;
        };
        slotmodel.AutoSpinInfoImpl.prototype.onGameStopAutoSpinsRequested = function(reasonID) {
            this.gameStopAutoSpinsRequested = true;
            this.reason = new slotModelApi.AutoSpinsStopReason(reasonID, this.getReasonText(reasonID));
        };
        slotmodel.AutoSpinInfoImpl.prototype.getReasonText = function(reasonID) {
            switch (reasonID) {
                case 0:
                    return "Autospins finished";
                case 1:
                    return "Stop AutoSpins requested - game";
                case 2:
                    return "AutoSpins limits exceeded - platform framework";
                case 3:
                    return "AutoSpins interrupted - bonus game / abortSpin";
                default:
                    return "ERROR bad reason id";
            }
        };
        slotmodel.AutoSpinInfoImpl.prototype.__class__ = slotmodel.AutoSpinInfoImpl;
        slotmodel.Bet = function(owner, betPerLineCredit, selectedLinesCount, sideBet, denomination) {
            if (sideBet == null) sideBet = 0;
            this.awardCapExceeded = false;
            this.sideBet = 0;
            this.selectedLinesCount = 0;
            this.owner = owner;
            this.betPerLineCredit = betPerLineCredit;
            this.selectedLinesCount = selectedLinesCount;
            this.sideBet = sideBet;
            this.denomination = denomination;
            this.abortedSpinOutcomes = new _hcmn_.haxe_ds_StringMap();
        };
        slotmodel.Bet.__name__ = ["slotmodel", "Bet"];
        slotmodel.Bet.prototype.owner = null;
        slotmodel.Bet.prototype.betPerLineCredit = null;
        slotmodel.Bet.prototype.selectedLinesCount = null;
        slotmodel.Bet.prototype.sideBet = null;
        slotmodel.Bet.prototype.denomination = null;
        slotmodel.Bet.prototype.stage = null;
        slotmodel.Bet.prototype.nextStage = null;
        slotmodel.Bet.prototype.baseGameOutcome = null;
        slotmodel.Bet.prototype.freeSpinOutcome = null;
        slotmodel.Bet.prototype.pickerBonusOutcome = null;
        slotmodel.Bet.prototype.previousFreeSpinsImpl = null;
        slotmodel.Bet.prototype.previousFreeSpins = null;
        slotmodel.Bet.prototype.totalFreeSpinCredit = null;
        slotmodel.Bet.prototype.totalGameCredit = null;
        slotmodel.Bet.prototype.totalWinCredit = null;
        slotmodel.Bet.prototype.awardCapExceeded = null;
        slotmodel.Bet.prototype.abortedSpinOutcomes = null;
        slotmodel.Bet.prototype.setBaseGameOutcome = function(baseGame) {
            this.baseGameOutcome = baseGame;
        };
        slotmodel.Bet.prototype.setFreeSpinOutcome = function(freeSpin) {
            if (this.freeSpinOutcome != null) {
                if (this.previousFreeSpinsImpl == null) this.previousFreeSpinsImpl = [];
                this.previousFreeSpinsImpl.push(this.freeSpinOutcome);
                if (this.previousFreeSpins == null) this.previousFreeSpins = [];
                this.previousFreeSpins.push(this.freeSpinOutcome.getFreeSpinOutcome(this));
            }
            this.freeSpinOutcome = freeSpin;
        };
        slotmodel.Bet.prototype.setPickerBonusOutcome = function(pickerBonus) {
            this.pickerBonusOutcome = pickerBonus;
        };
        slotmodel.Bet.prototype.setStage = function(value) {
            this.stage = value;
        };
        slotmodel.Bet.prototype.setNextStage = function(value) {
            this.nextStage = value;
        };
        slotmodel.Bet.prototype.setTotalFreeSpinCredit = function(value) {
            this.totalFreeSpinCredit = value;
        };
        slotmodel.Bet.prototype.setTotalGameCredit = function(value) {
            this.totalGameCredit = value;
        };
        slotmodel.Bet.prototype.setTotalWinCredit = function(value) {
            this.totalWinCredit = value;
        };
        slotmodel.Bet.prototype.setAwardCapExceeded = function(value) {
            this.awardCapExceeded = value;
        };
        slotmodel.Bet.prototype.setSideBet = function(value) {
            this.sideBet = value;
        };
        slotmodel.Bet.prototype.setAbortedSpinOutcomes = function(key, value) {
            this.abortedSpinOutcomes.set(key, value);
        };
        slotmodel.Bet.prototype.updateStake = function(stakeItems, onError) {
            if (!this.updateBetPerLine(stakeItems.betPerLine, onError)) return false;
            if (!this.updateSelectedLinesCount(stakeItems.lineCount, onError)) return false;
            if (this.getGameConfiguration().getSideBets().length != 0 && !this.updateSideBet(stakeItems.sideBet, onError)) return false;
            return true;
        };
        slotmodel.Bet.prototype.getNextStage = function() {
            return this.nextStage;
        };
        slotmodel.Bet.prototype.getBetPerLineCredit = function() {
            return this.betPerLineCredit;
        };
        slotmodel.Bet.prototype.getSelectedLinesCount = function() {
            return this.selectedLinesCount;
        };
        slotmodel.Bet.prototype.getSideBet = function() {
            return this.sideBet;
        };
        slotmodel.Bet.prototype.getBetPerLine = function() {
            return this.denomination.mulInt(this.betPerLineCredit);
        };
        slotmodel.Bet.prototype.getTotalStakeCredit = function() {
            return this.betPerLineCredit * (this.selectedLinesCount + this.sideBet);
        };
        slotmodel.Bet.prototype.getTotalStake = function() {
            return this.denomination.mulInt(this.getTotalStakeCredit());
        };
        slotmodel.Bet.prototype.getDenomination = function() {
            return this.denomination;
        };
        slotmodel.Bet.prototype.getSpinOutcome = function() {
            var baseGameOutcome = null;
            if (this.baseGameOutcome != null) baseGameOutcome = this.baseGameOutcome.getBaseGameOutcome(this);
            var freeSpinOutcome = null;
            if (this.freeSpinOutcome != null) freeSpinOutcome = this.freeSpinOutcome.getFreeSpinOutcome(this);
            var pickerBonusOutcome = null;
            if (this.pickerBonusOutcome != null) pickerBonusOutcome = this.pickerBonusOutcome.getPickerBonusOutcome(this);
            return new slotModelApi.SpinOutcome(this.stage.value, this.nextStage.value, baseGameOutcome, freeSpinOutcome, pickerBonusOutcome, this.getPreviousFreeSpins(), this.getAcumulatedFreeSpinPayout().value, this.getAcumulatedPayout().value, this.awardCapExceeded);
        };
        slotmodel.Bet.prototype.getAcumulatedFreeSpinPayout = function() {
            var result = new money.Money("0");
            if (this.totalFreeSpinCredit != null) result = result.add(this.denomination.mulInt(this.totalFreeSpinCredit));
            return result;
        };
        slotmodel.Bet.prototype.getAcumulatedPayout = function() {
            var result = new money.Money("0");
            if (this.totalGameCredit != null) result = result.add(this.denomination.mulInt(this.totalGameCredit));
            return result;
        };
        slotmodel.Bet.prototype.getTotalWin = function() {
            return this.denomination.mulInt(this.totalWinCredit).value;
        };
        slotmodel.Bet.prototype.getBigWin = function(winCredit, denomination) {
            return this.owner.getBigWin(this.getTotalStakeCredit(), winCredit, denomination);
        };
        slotmodel.Bet.prototype.getTotalBigWin = function() {
            return this.owner.getBigWin(this.getTotalStakeCredit(), this.totalWinCredit, this.denomination);
        };
        slotmodel.Bet.prototype.getAbortSpinOutcome = function(stage) {
            if (this.abortedSpinOutcomes == null) return null;
            var stageType = stage.getType();
            if ((function($this) {
                    var $r;
                    var key = stageType.toString();
                    $r = $this.abortedSpinOutcomes.exists(key);
                    return $r;
                }(this))) return ((function($this) {
                var $r;
                var key1 = stageType.toString();
                $r = $this.abortedSpinOutcomes.get(key1);
                return $r;
            }(this))).getOutcome(this);
            return null;
        };
        slotmodel.Bet.prototype.updateBetPerLine = function(betPerLine, onError) {
            var newBetPerLineCredit = this.getPlayerConfiguration().getBetPerLineCredit(betPerLine);
            if (newBetPerLineCredit == null) {
                onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalStake, true, "Bet per line " + betPerLine + "is not in the list of available bets per line."));
                return false;
            }
            this.betPerLineCredit = newBetPerLineCredit;
            return true;
        };
        slotmodel.Bet.prototype.updateSelectedLinesCount = function(selectedLinesCount, onError) {
            var selectableLines = this.getGameConfiguration().getSelectableLines();
            var hasAvalableLinesCount = false;
            if (selectableLines != null) {
                var selectableLinesCount;
                var _g = 0;
                while (_g < selectableLines.length) {
                    var selectableLinesCount1 = selectableLines[_g];
                    ++_g;
                    if (selectableLinesCount1 == selectedLinesCount) {
                        hasAvalableLinesCount = true;
                        break;
                    }
                }
            }
            if (!hasAvalableLinesCount) {
                onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalSelectedLines, true, "Illegal selected lines count: " + selectedLinesCount + " Available values: " + selectableLines.join(", ")));
                return false;
            }
            this.selectedLinesCount = selectedLinesCount;
            return true;
        };
        slotmodel.Bet.prototype.updateSideBet = function(sideBet, onError) {
            if ((function($this) {
                    var $r;
                    var _this = $this.getGameConfiguration().getSideBets();
                    $r = _hcmn_.HxOverrides.indexOf(_this, sideBet, 0);
                    return $r;
                }(this)) != -1) {
                this.sideBet = sideBet;
                return true;
            } else {
                onError(new slotmodel.Error(slotmodel.EErrorSource.STATE, slotmodel.ErrorIdList.IllegalSelectedLines, true, "Illegal side bet: " + sideBet + " Available values: " + this.getGameConfiguration().getSideBets().join(", ")));
                return false;
            }
        };
        slotmodel.Bet.prototype.getPlayerConfiguration = function() {
            return this.owner.getPlayerConfiguration();
        };
        slotmodel.Bet.prototype.getGameConfiguration = function() {
            return this.owner.getGameConfiguration();
        };
        slotmodel.Bet.prototype.getPreviousFreeSpins = function() {
            return this.previousFreeSpins;
        };
        slotmodel.Bet.prototype.__class__ = slotmodel.Bet;
        slotmodel.EResumeStage = function(value) {
            this.value = "";
            this.value = value;
        };
        slotmodel.EResumeStage.__name__ = ["slotmodel", "EResumeStage"];
        slotmodel.EResumeStage.prototype.value = null;
        slotmodel.EResumeStage.prototype.toString = function() {
            return this.value;
        };
        slotmodel.EResumeStage.prototype.equals = function(mode) {
            if (this.value == mode.value) return true;
            return false;
        };
        slotmodel.EResumeStage.prototype.__class__ = slotmodel.EResumeStage;
        slotmodel.EStage = function(value) {
            this.value = "";
            this.value = value;
        };
        slotmodel.EStage.__name__ = ["slotmodel", "EStage"];
        slotmodel.EStage.prototype.value = null;
        slotmodel.EStage.prototype.toString = function() {
            return this.value;
        };
        slotmodel.EStage.prototype.equals = function(mode) {
            if (this.value == mode.value) return true;
            return false;
        };
        slotmodel.EStage.prototype.contains = function(mode) {
            if (this.value.indexOf(mode.value) == -1) return false;
            return true;
        };
        slotmodel.EStage.prototype.getType = function() {
            if (this.contains(slotmodel.EStage.BASE_GAME)) return slotmodel.EStage.BASE_GAME;
            if (this.contains(slotmodel.EStage.FREE_SPIN)) return slotmodel.EStage.FREE_SPIN;
            if (this.contains(slotmodel.EStage.PICKER_BONUS)) return slotmodel.EStage.PICKER_BONUS;
            if (this.contains(slotmodel.EStage.TUMBLE)) return slotmodel.EStage.TUMBLE;
            return null;
        };
        slotmodel.EStage.prototype.__class__ = slotmodel.EStage;
        slotmodel.WinImpl = function(type, id, name, lineId) {
            this.type = type;
            this.id = id;
            this.name = name;
            this.lineId = lineId;
        };
        slotmodel.WinImpl.__name__ = ["slotmodel", "WinImpl"];
        slotmodel.WinImpl.prototype.type = null;
        slotmodel.WinImpl.prototype.id = null;
        slotmodel.WinImpl.prototype.name = null;
        slotmodel.WinImpl.prototype.lineId = null;
        slotmodel.WinImpl.prototype.stakePerLineCredit = null;
        slotmodel.WinImpl.prototype.price = null;
        slotmodel.WinImpl.prototype.multiplier = null;
        slotmodel.WinImpl.prototype.payoutCredit = null;
        slotmodel.WinImpl.prototype.winPath = null;
        slotmodel.WinImpl.prototype.winningSymbol = null;
        slotmodel.WinImpl.prototype.position = null;
        slotmodel.WinImpl.prototype.symbolCount = null;
        slotmodel.WinImpl.prototype.setWinPath = function(value) {
            this.winPath = value;
        };
        slotmodel.WinImpl.prototype.setPayProperties = function(stakePerLineCredit, price, multiplier, payoutCredit) {
            this.stakePerLineCredit = stakePerLineCredit;
            this.price = price;
            this.multiplier = multiplier;
            this.payoutCredit = payoutCredit;
        };
        slotmodel.WinImpl.prototype.setRenderProperties = function(winningSymbol, position, symbolCount) {
            this.winningSymbol = winningSymbol;
            this.position = position;
            this.symbolCount = symbolCount;
        };
        slotmodel.WinImpl.prototype.getPayoutCredit = function() {
            return this.payoutCredit;
        };
        slotmodel.WinImpl.prototype.getPayout = function(denomination) {
            return denomination.mulInt(this.payoutCredit).value;
        };
        slotmodel.WinImpl.prototype.copy = function(iWin) {
            if (iWin == null) return;
            this.stakePerLineCredit = iWin.getStakePerLineCredit();
            this.price = iWin.getPrice();
            this.multiplier = iWin.getMultiplier();
            this.payoutCredit = iWin.getPayoutCredit();
            this.winPath = iWin.getWinPath();
            this.winningSymbol = iWin.getWinningSymbol();
            this.position = iWin.getPosition();
            this.symbolCount = iWin.getSymbolCount();
        };
        slotmodel.WinImpl.prototype.__class__ = slotmodel.WinImpl;
        slotmodel.BonusWinImpl = function(type, id, name, lineId) {
            slotmodel.WinImpl.call(this, type, id, name, lineId);
        };
        slotmodel.BonusWinImpl.__name__ = ["slotmodel", "BonusWinImpl"];
        slotmodel.BonusWinImpl.__super__ = slotmodel.WinImpl;
        for (var k in slotmodel.WinImpl.prototype) slotmodel.BonusWinImpl.prototype[k] = slotmodel.WinImpl.prototype[k];
        slotmodel.BonusWinImpl.prototype.getBonusWin = function(denomination) {
            return new slotModelApi.BonusWin(this.type, this.id, this.name, this.lineId, this.price.value, this.multiplier, this.getPayout(denomination), this.winPath, this.winningSymbol, this.position, this.symbolCount);
        };
        slotmodel.BonusWinImpl.create = function(iBonusWin) {
            if (iBonusWin == null) return null;
            var result = new slotmodel.BonusWinImpl(iBonusWin.getType(), iBonusWin.getId(), iBonusWin.getName(), iBonusWin.getLineId());
            result.copy(iBonusWin);
            return result;
        };
        slotmodel.BonusWinImpl.createArray = function(iBonusWins) {
            if (iBonusWins == null) return null;
            var result = [];
            var iBonusWin;
            var _g = 0;
            while (_g < iBonusWins.length) {
                var iBonusWin1 = iBonusWins[_g];
                ++_g;
                result.push(slotmodel.BonusWinImpl.create(iBonusWin1));
            }
            return result;
        };
        slotmodel.BonusWinImpl.prototype.__class__ = slotmodel.BonusWinImpl;
        slotmodel.FreeSpinInfoImpl = function(awarded, isMaxAwarded, isIncrementTriggered, total, current) {
            this.awarded = awarded;
            this.isMaxAwarded = isMaxAwarded;
            this.isIncrementTriggered = isIncrementTriggered;
            this.total = total;
            this.current = current;
        };
        slotmodel.FreeSpinInfoImpl.__name__ = ["slotmodel", "FreeSpinInfoImpl"];
        slotmodel.FreeSpinInfoImpl.prototype.awarded = null;
        slotmodel.FreeSpinInfoImpl.prototype.isMaxAwarded = null;
        slotmodel.FreeSpinInfoImpl.prototype.isIncrementTriggered = null;
        slotmodel.FreeSpinInfoImpl.prototype.current = null;
        slotmodel.FreeSpinInfoImpl.prototype.total = null;
        slotmodel.FreeSpinInfoImpl.prototype.__class__ = slotmodel.FreeSpinInfoImpl;
        slotmodel.LineWinImpl = function(lineId, name, lineType) {
            var id = slotmodel.LineWinImpl.WIN_TYPE + "_" + lineId;
            if (lineType != null) slotmodel.WinImpl.call(this, lineType, id, name, lineId);
            else slotmodel.WinImpl.call(this, slotmodel.LineWinImpl.WIN_TYPE, id, name, lineId);
        };
        slotmodel.LineWinImpl.__name__ = ["slotmodel", "LineWinImpl"];
        slotmodel.LineWinImpl.__super__ = slotmodel.WinImpl;
        for (var k in slotmodel.WinImpl.prototype) slotmodel.LineWinImpl.prototype[k] = slotmodel.WinImpl.prototype[k];
        slotmodel.LineWinImpl.prototype.setRenderProperties = function(winningSymbol, positionHidden, symbolCount) {
            slotmodel.WinImpl.prototype.setRenderProperties.call(this, winningSymbol, slotmodel.LineWinImpl.WIN_POSITION, symbolCount);
        };
        slotmodel.LineWinImpl.prototype.getLineWin = function(denomination) {
            if (this.type == slotmodel.LineWinImpl.WIN_TYPE) return new slotModelApi.LineWin(this.name, this.lineId, this.price.value, this.multiplier, this.getPayout(denomination), this.winPath, this.winningSymbol, this.symbolCount);
            else return new slotModelApi.LineWin(this.name, this.lineId, this.price.value, this.multiplier, this.getPayout(denomination), this.winPath, this.winningSymbol, this.symbolCount, this.type);
        };
        slotmodel.LineWinImpl.create = function(iLineWin) {
            if (iLineWin == null) return null;
            var result = new slotmodel.LineWinImpl(iLineWin.getLineId(), iLineWin.getName());
            result.copy(iLineWin);
            return result;
        };
        slotmodel.LineWinImpl.createArray = function(iLineWins) {
            if (iLineWins == null) return null;
            var result = [];
            var iLineWin;
            var _g = 0;
            while (_g < iLineWins.length) {
                var iLineWin1 = iLineWins[_g];
                ++_g;
                result.push(slotmodel.LineWinImpl.create(iLineWin1));
            }
            return result;
        };
        slotmodel.LineWinImpl.prototype.__class__ = slotmodel.LineWinImpl;
        slotmodel.OutcomeImpl = function(reelStop, reelStopAdditional, lineWins, scatterWins, bonusWins, pickerWins, customField) {
            this.reelStop = reelStop;
            this.reelStopAdditional = reelStopAdditional;
            this.lineWins = lineWins;
            this.scatterWins = scatterWins;
            this.bonusWins = bonusWins;
            this.pickerWins = pickerWins;
            this.customField = customField;
        };
        slotmodel.OutcomeImpl.__name__ = ["slotmodel", "OutcomeImpl"];
        slotmodel.OutcomeImpl.prototype.stage = null;
        slotmodel.OutcomeImpl.prototype.reelStop = null;
        slotmodel.OutcomeImpl.prototype.reelStopAdditional = null;
        slotmodel.OutcomeImpl.prototype.lineWins = null;
        slotmodel.OutcomeImpl.prototype.scatterWins = null;
        slotmodel.OutcomeImpl.prototype.bonusWins = null;
        slotmodel.OutcomeImpl.prototype.pickerWins = null;
        slotmodel.OutcomeImpl.prototype.customField = null;
        slotmodel.OutcomeImpl.prototype.getOutcome = function(bet) {
            var denomination = bet.getDenomination();
            var bigWin = bet.getBigWin(this.getTotalWinCredit(), denomination);
            return new slotModelApi.Outcome(this.reelStop, this.reelStopAdditional, this.getLineWins(denomination), this.getScatterWins(denomination), this.getBonusWins(denomination), this.getPickerWins(denomination), this.getTotalWinImpl(denomination).value, bigWin, this.customField);
        };
        slotmodel.OutcomeImpl.prototype.getTotalLinesWinCredit = function() {
            var totalWinCredit = 0;
            if (this.lineWins != null) {
                var lineWin;
                var _g = 0;
                var _g1 = this.lineWins;
                while (_g < _g1.length) {
                    var lineWin1 = _g1[_g];
                    ++_g;
                    totalWinCredit += lineWin1.getPayoutCredit();
                }
            }
            return totalWinCredit;
        };
        slotmodel.OutcomeImpl.prototype.getTotalScatterWinCredit = function() {
            var totalWinCredit = 0;
            if (this.scatterWins != null) {
                var scatterWin;
                var _g = 0;
                var _g1 = this.scatterWins;
                while (_g < _g1.length) {
                    var scatterWin1 = _g1[_g];
                    ++_g;
                    totalWinCredit += scatterWin1.getPayoutCredit();
                }
            }
            return totalWinCredit;
        };
        slotmodel.OutcomeImpl.prototype.getTotalBonusWinCredit = function() {
            var totalWinCredit = 0;
            if (this.bonusWins != null) {
                var bonusWin;
                var _g = 0;
                var _g1 = this.bonusWins;
                while (_g < _g1.length) {
                    var bonusWin1 = _g1[_g];
                    ++_g;
                    totalWinCredit += bonusWin1.getPayoutCredit();
                }
            }
            return totalWinCredit;
        };
        slotmodel.OutcomeImpl.prototype.getTotalPickerWinCredit = function() {
            var totalWinCredit = 0;
            if (this.pickerWins != null) {
                var pickerWin;
                var _g = 0;
                var _g1 = this.pickerWins;
                while (_g < _g1.length) {
                    var pickerWin1 = _g1[_g];
                    ++_g;
                    totalWinCredit += pickerWin1.getPayoutCredit();
                }
            }
            return totalWinCredit;
        };
        slotmodel.OutcomeImpl.prototype.getTotalWinCredit = function() {
            var totalWinCredit = 0;
            totalWinCredit += this.getTotalLinesWinCredit();
            totalWinCredit += this.getTotalScatterWinCredit();
            totalWinCredit += this.getTotalBonusWinCredit();
            totalWinCredit += this.getTotalPickerWinCredit();
            return totalWinCredit;
        };
        slotmodel.OutcomeImpl.prototype.getTotalWinImpl = function(denomination) {
            return denomination.mulInt(this.getTotalWinCredit());
        };
        slotmodel.OutcomeImpl.prototype.getLineWins = function(denomination) {
            var result = null;
            if (this.lineWins != null) {
                result = [];
                var lineWinImpl;
                var _g = 0;
                var _g1 = this.lineWins;
                while (_g < _g1.length) {
                    var lineWinImpl1 = _g1[_g];
                    ++_g;
                    result.push(lineWinImpl1.getLineWin(denomination));
                }
            }
            return result;
        };
        slotmodel.OutcomeImpl.prototype.getScatterWins = function(denomination) {
            var result = null;
            if (this.scatterWins != null) {
                result = [];
                var scatterWinImpl;
                var _g = 0;
                var _g1 = this.scatterWins;
                while (_g < _g1.length) {
                    var scatterWinImpl1 = _g1[_g];
                    ++_g;
                    result.push(scatterWinImpl1.getScatterWin(denomination));
                }
            }
            return result;
        };
        slotmodel.OutcomeImpl.prototype.getBonusWins = function(denomination) {
            var result = null;
            if (this.bonusWins != null) {
                result = [];
                var bonusWinImpl;
                var _g = 0;
                var _g1 = this.bonusWins;
                while (_g < _g1.length) {
                    var bonusWinImpl1 = _g1[_g];
                    ++_g;
                    result.push(bonusWinImpl1.getBonusWin(denomination));
                }
            }
            return result;
        };
        slotmodel.OutcomeImpl.prototype.getPickerWins = function(denomination) {
            var result = null;
            if (this.pickerWins != null) {
                result = [];
                var pickerWinImpl;
                var _g = 0;
                var _g1 = this.pickerWins;
                while (_g < _g1.length) {
                    var pickerWinImpl1 = _g1[_g];
                    ++_g;
                    result.push(pickerWinImpl1.getPickerWin(denomination));
                }
            }
            return result;
        };
        slotmodel.OutcomeImpl.prototype.getPickerWinsImpl = function() {
            return this.pickerWins;
        };
        slotmodel.OutcomeImpl.create = function(outcome) {
            if (outcome == null) return null;
            var reelStop = outcome.getReelStop();
            var reelStopAdditional = outcome.getReelStopAdditional();
            var lineWins = slotmodel.LineWinImpl.createArray(outcome.getLineWins());
            var scatterWins = slotmodel.ScatterWinImpl.createArray(outcome.getScatterWins());
            var bonusWins = slotmodel.BonusWinImpl.createArray(outcome.getBonusWins());
            var pickerWins = slotmodel.PickerWinImpl.createArray(outcome.getPickerWins());
            var customField = outcome.getCustomField();
            return new slotmodel.OutcomeImpl(reelStop, reelStopAdditional, lineWins, scatterWins, bonusWins, pickerWins, customField);
        };
        slotmodel.OutcomeImpl.prototype.__class__ = slotmodel.OutcomeImpl;
        slotmodel.PickerBonusInfoImpl = function(choices, isIncrementTriggered) {
            if (isIncrementTriggered == null) isIncrementTriggered = false;
            this.isIncrementTriggered = isIncrementTriggered;
            this.choices = choices;
        };
        slotmodel.PickerBonusInfoImpl.__name__ = ["slotmodel", "PickerBonusInfoImpl"];
        slotmodel.PickerBonusInfoImpl.prototype.choices = null;
        slotmodel.PickerBonusInfoImpl.prototype.isIncrementTriggered = null;
        slotmodel.PickerBonusInfoImpl.prototype.__class__ = slotmodel.PickerBonusInfoImpl;
        slotmodel.PickerWinImpl = function(name, lineId, picks, lastPicked) {
            slotmodel.WinImpl.call(this, slotmodel.PickerWinImpl.WIN_TYPE, null, name, null);
            this.picks = picks;
            this.lastPicked = lastPicked;
        };
        slotmodel.PickerWinImpl.__name__ = ["slotmodel", "PickerWinImpl"];
        slotmodel.PickerWinImpl.__super__ = slotmodel.WinImpl;
        for (var k in slotmodel.WinImpl.prototype) slotmodel.PickerWinImpl.prototype[k] = slotmodel.WinImpl.prototype[k];
        slotmodel.PickerWinImpl.prototype.picks = null;
        slotmodel.PickerWinImpl.prototype.lastPicked = null;
        slotmodel.PickerWinImpl.prototype.progressMeter = null;
        slotmodel.PickerWinImpl.prototype.getPickerWin = function(denomination) {
            if (this.price == null) return new slotModelApi.PickerWin(this.name, this.id, this.lineId, null, this.multiplier, this.getPayout(denomination), this.winPath, this.winningSymbol, this.position, this.symbolCount, this.picks, this.progressMeter, this.lastPicked);
            else return new slotModelApi.PickerWin(this.name, this.id, this.lineId, this.price.value, this.multiplier, this.getPayout(denomination), this.winPath, this.winningSymbol, this.position, this.symbolCount, this.picks, this.progressMeter, this.lastPicked);
        };
        slotmodel.PickerWinImpl.prototype.setProgressMeter = function(progressMeter) {
            this.progressMeter = progressMeter;
        };
        slotmodel.PickerWinImpl.create = function(iPickerWin) {
            if (iPickerWin == null) return null;
            var result = new slotmodel.PickerWinImpl(iPickerWin.getName(), iPickerWin.getLineId());
            result.copy(iPickerWin);
            return result;
        };
        slotmodel.PickerWinImpl.createArray = function(iPickerWins) {
            if (iPickerWins == null) return null;
            var result = [];
            var iPickerWin;
            var _g = 0;
            while (_g < iPickerWins.length) {
                var iPickerWin1 = iPickerWins[_g];
                ++_g;
                result.push(slotmodel.PickerWinImpl.create(iPickerWin1));
            }
            return result;
        };
        slotmodel.PickerWinImpl.prototype.__class__ = slotmodel.PickerWinImpl;
        slotmodel.ScatterWinImpl = function(name) {
            var id = slotmodel.ScatterWinImpl.WIN_TYPE + "_" + name;
            slotmodel.WinImpl.call(this, slotmodel.ScatterWinImpl.WIN_TYPE, id, name, slotmodel.ScatterWinImpl.WIN_LINEID);
        };
        slotmodel.ScatterWinImpl.__name__ = ["slotmodel", "ScatterWinImpl"];
        slotmodel.ScatterWinImpl.__super__ = slotmodel.WinImpl;
        for (var k in slotmodel.WinImpl.prototype) slotmodel.ScatterWinImpl.prototype[k] = slotmodel.WinImpl.prototype[k];
        slotmodel.ScatterWinImpl.prototype.setRenderProperties = function(winningSymbol, positionHidden, symbolCount) {
            slotmodel.WinImpl.prototype.setRenderProperties.call(this, winningSymbol, slotmodel.ScatterWinImpl.WIN_POSITION, symbolCount);
        };
        slotmodel.ScatterWinImpl.prototype.getScatterWin = function(denomination) {
            return new slotModelApi.ScatterWin(this.name, this.price.value, this.multiplier, this.getPayout(denomination), this.winPath, this.winningSymbol, this.symbolCount);
        };
        slotmodel.ScatterWinImpl.create = function(iScatterWin) {
            if (iScatterWin == null) return null;
            var result = new slotmodel.ScatterWinImpl(iScatterWin.getName());
            result.copy(iScatterWin);
            return result;
        };
        slotmodel.ScatterWinImpl.createArray = function(iScatterWins) {
            if (iScatterWins == null) return null;
            var result = [];
            var iScatterWin;
            var _g = 0;
            while (_g < iScatterWins.length) {
                var iScatterWin1 = iScatterWins[_g];
                ++_g;
                result.push(slotmodel.ScatterWinImpl.create(iScatterWin1));
            }
            return result;
        };
        slotmodel.ScatterWinImpl.prototype.__class__ = slotmodel.ScatterWinImpl;
        slotmodel.BaseGameOutcomeImpl = function(outcome) {
            this.outcome = outcome;
        };
        slotmodel.BaseGameOutcomeImpl.__name__ = ["slotmodel", "BaseGameOutcomeImpl"];
        slotmodel.BaseGameOutcomeImpl.prototype.outcome = null;
        slotmodel.BaseGameOutcomeImpl.prototype.getBaseGameOutcome = function(bet) {
            return new slotModelApi.BaseGameOutcome(this.outcome.getOutcome(bet));
        };
        slotmodel.BaseGameOutcomeImpl.prototype.getTotalWinImpl = function(denomination) {
            var result = new money.Money("0");
            if (this.outcome != null) result = result.add(this.outcome.getTotalWinImpl(denomination));
            return result;
        };
        slotmodel.BaseGameOutcomeImpl.prototype.__class__ = slotmodel.BaseGameOutcomeImpl;
        slotmodel.FreeSpinOutcomeImpl = function(awarded, isMaxAwarded, isIncrementTriggered, total, current, outcome) {
            this.awarded = awarded;
            this.isMaxAwarded = isMaxAwarded;
            this.isIncrementTriggered = isIncrementTriggered;
            this.total = total;
            this.current = current;
            this.outcome = outcome;
        };
        slotmodel.FreeSpinOutcomeImpl.__name__ = ["slotmodel", "FreeSpinOutcomeImpl"];
        slotmodel.FreeSpinOutcomeImpl.prototype.awarded = null;
        slotmodel.FreeSpinOutcomeImpl.prototype.isMaxAwarded = null;
        slotmodel.FreeSpinOutcomeImpl.prototype.isIncrementTriggered = null;
        slotmodel.FreeSpinOutcomeImpl.prototype.total = null;
        slotmodel.FreeSpinOutcomeImpl.prototype.current = null;
        slotmodel.FreeSpinOutcomeImpl.prototype.outcome = null;
        slotmodel.FreeSpinOutcomeImpl.prototype.getFreeSpinOutcome = function(bet) {
            var fsOutcome = null;
            if (this.outcome != null) fsOutcome = this.outcome.getOutcome(bet);
            return new slotModelApi.FreeSpinOutcome(this.awarded, this.isMaxAwarded, this.isIncrementTriggered, this.total, this.current, fsOutcome);
        };
        slotmodel.FreeSpinOutcomeImpl.prototype.getTotalWinImpl = function(denomination) {
            var result = new money.Money("0");
            if (this.outcome != null) result = result.add(this.outcome.getTotalWinImpl(denomination));
            return result;
        };
        slotmodel.FreeSpinOutcomeImpl.prototype.getTotal = function() {
            return this.total;
        };
        slotmodel.FreeSpinOutcomeImpl.prototype.isLast = function() {
            return this.total == this.current;
        };
        slotmodel.FreeSpinOutcomeImpl.prototype.__class__ = slotmodel.FreeSpinOutcomeImpl;
        slotmodel.PickerBonusOutcomeImpl = function(choices, outcome, isIncrementTriggered) {
            this.isIncrementTriggered = isIncrementTriggered;
            this.choices = choices;
            this.outcome = outcome;
        };
        slotmodel.PickerBonusOutcomeImpl.__name__ = ["slotmodel", "PickerBonusOutcomeImpl"];
        slotmodel.PickerBonusOutcomeImpl.prototype.choices = null;
        slotmodel.PickerBonusOutcomeImpl.prototype.outcome = null;
        slotmodel.PickerBonusOutcomeImpl.prototype.isIncrementTriggered = null;
        slotmodel.PickerBonusOutcomeImpl.prototype.getPickerBonusOutcome = function(bet) {
            if (this.outcome == null) return null;
            return new slotModelApi.PickerBonusOutcome(this.outcome.getOutcome(bet), this.isIncrementTriggered);
        };
        slotmodel.PickerBonusOutcomeImpl.prototype.getChoices = function() {
            return this.choices;
        };
        slotmodel.PickerBonusOutcomeImpl.prototype.getTotalWinImpl = function(denomination) {
            var result = new money.Money("0");
            if (this.outcome != null) result = result.add(this.outcome.getTotalWinImpl(denomination));
            return result;
        };
        slotmodel.PickerBonusOutcomeImpl.prototype.__class__ = slotmodel.PickerBonusOutcomeImpl;
        haxe.ds.ObjectMap.count = 0;;
        slotmodel.Log.loggers = new _hcmn_.haxe_ds_StringMap();;
        slotmodel.Configuration.GAME_CONFIG_ASSET_ID = "game-config_json";;
        slotmodel.Configuration.SLOT_DEFINITION_ASSET_ID = "slot-definition_json";;
        slotmodel.EServerType.MPT = new slotmodel.EServerType("MPT");;
        slotmodel.EServerType.GLE = new slotmodel.EServerType("GLE");;
        slotmodel.GameConfiguration.DEFAULT_BIG_WIN_GROUP_POINTS = [
            [1, -1, 1],
            [1.5, -1, 2],
            [2, 100, 2],
            [2.5, 25, 2],
            [2.5, -1, 3],
            [3, 10, 2],
            [3, 750, 3],
            [4, 200, 3],
            [5, 75, 3],
            [6, 10, 3],
            [8, -1, 4],
            [9, 2500, 4],
            [10, 500, 4],
            [12, 150, 4],
            [15, -1, 5],
            [20, 5000, 5],
            [25, 500, 5],
            [30, 200, 5],
            [40, 50, 5],
            [-1, -1, 6]
        ];;
        slotmodel.SlotDefinitionParser.parseError = false;;
        slotmodel.ErrorIdList.InitializedPropertiesError = 101;;
        slotmodel.ErrorIdList.PlayPropertiesError = 102;;
        slotmodel.ErrorIdList.IllegalStake = 103;;
        slotmodel.ErrorIdList.IllegalSelectedLines = 104;;
        slotmodel.ErrorIdList.IllegalAutoSpin = 105;;
        slotmodel.ErrorIdList.IllegalSpinAbort = 106;;
        slotmodel.ErrorIdList.SlotDefinitionParserError = 107;;
        slotmodel.ErrorIdList.PF_Unknown = 1000;;
        slotmodel.ErrorIdList.PF_PayloadError = 1001;;
        slotmodel.ErrorIdList.PF_StateChangeError = 1002;;
        slotmodel.ErrorIdList.Plugin_PF_PayloadError = 1003;;
        slotmodel.GfBusController.LINK_ID_HELP = "howToPlay";;
        slotmodel.GfBusController.LINK_ID_PAYTABLE = "paytable";;
        slotmodel.ELineType.LINE_LEFT = "LineLeft";;
        slotmodel.ELineType.LINE_RIGHT = "LineRight";;
        slotmodel.ELineType.LINE_ANY = "LineAny";;
        slotmodel.GleResponseParser.WINNING_SYMBOL_INFO = 1;;
        slotmodel.GleResponseParser.DISABLED_WINNING_SYMBOL_INFO = 2;;
        slotmodel.MptResponseParser.WININFO_FREE_SPIN_TRIGGER = 14;;
        slotmodel.MptResponseParser.WININFO_FREE_SPIN_RETRIGGER = 15;;
        slotmodel.MptResponseParser.WININFO_SCATTER_CREDIT = 16;;
        slotmodel.MptResponseParser.WININFO_FREE_SPIN_INIT_PICTURE = 20;;
        slotmodel.MptResponseParser.WININFO_WILD_TRANSFORMATION = 40;;
        slotmodel.MptResponseParser.WININFO_CURRENT_FREE_SPIN = 500;;
        slotmodel.MptResponseParser.INFOSTRING_MAX_AWARDED_FREE_SPIN = "ExitCase";;
        slotmodel.MptResponseParser.STAKE_ITEM_SIDE_BET = "STAKE_ITEM_SIDE_BET";;
        slotmodel.PF.EVENTBUS_CHANNEL_CLIENT_SERVICE = "ClientService";;
        slotmodel.PF.EVENTBUS_CHANNEL_CONSOLE_SERVICE = "ConsoleService";;
        slotmodel.PF.EVENTBUS_CHANNEL_GAME = "Game";;
        slotmodel.PF.EVENTBUS_CHANNEL_KERNEL = "Kernel";;
        slotmodel.PF.EVENTBUS_CHANNEL_LOADER = "loader";;
        slotmodel.PF.OPTION_STAKE_BET_PER_LINE = "betPerPattern";;
        slotmodel.PF.OPTION_STAKE_SELECTED_LINES_COUNT = "patternsBet";;
        slotmodel.PF.OPTION_STAKE_TOTAL_STAKE = "stake";;
        slotmodel.PF.OPTION_HELP = "howToPlay";;
        slotmodel.PF.OPTION_PAYTABLE = "paytable";;
        slotmodel.PF.CONSOLE_OPTION_ENABLED = 1;;
        slotmodel.PF.CONSOLE_OPTION_DISABLED = 0;;
        slotmodel.PF.STATE_ON_BEFORE_SHOW_STAGE = "onBeforeShowStage";;
        slotmodel.PF.STATE_ON_START_GAME_INITIAL = "onStartGameInitial";;
        slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_STAGE = "onStartGameInProgressStage";;
        slotmodel.PF.STATE_ON_START_GAME_IN_PROGRESS_NEXT_STAGE = "onStartGameInProgressNextStage";;
        slotmodel.PF.STATE_ON_BEFORE_REQUEST = "onBeforeRequest";;
        slotmodel.PF.STATE_ON_MAKE_REQUEST = "onMakeRequest";;
        slotmodel.PF.STATE_ON_RESOLVE_STAGE = "onResolveStage";;
        slotmodel.PF.STATE_ON_END_GAME = "onEndGame";;
        slotmodel.PF.STATE_ON_BEGIN_NEW_GAME = "onBeginNewGame";;
        slotmodel.PF.STATE_ON_ABORT_NEXT_STAGE = "onAbortNextStage";;
        slotmodel.PF.STATE_ON_RESET_NEXT_STAGE = "onResetNextStage";;
        slotmodel.PF.STATE_ON_EXIT_STAGE = "onExitStage";;
        slotmodel.PF.STATE_ON_IN_PROGRESS_STAGE = "onInProgressStage";;
        slotmodel.PF.STATE_ON_ENTER_NEXT_STAGE = "onEnterNextStage";;
        slotmodel.PfBusController.MPT_CONTINUE_ACTION = "continue";;
        slotmodel.PfBusController.GLE_CONTINUE_ACTION = "play";;
        slotmodel.ECondition._c_TRUE = 1;;
        slotmodel.ECondition._c_LINE_LEFT = 2;;
        slotmodel.ECondition._c_LINE_RIGHT = 3;;
        slotmodel.ECondition._c_LINE_ANY = 4;;
        slotmodel.ECondition._c_REELS_ANY = 5;;
        slotmodel.ECondition._c_RESPIN_REELS_ANY = 6;;
        slotmodel.ECondition._c_PLAYER_DECISION = 7;;
        slotmodel.ECondition._c_TRUE_SEND_FILTERED_STATE = 8;;
        slotmodel.ECondition._c_TRUE_NR_NEXT_RESULT = 9;;
        slotmodel.ECondition._c_TRUE_DRAWGAME_STATE = 10;;
        slotmodel.ECondition._c_REELS_LEFT = 11;;
        slotmodel.ECondition._c_REELS_RIGHT = 12;;
        slotmodel.ECondition._c_REGISTER = 13;;
        slotmodel.ECondition._c_REGISTER_DRAWGAME_STATE = 14;;
        slotmodel.ECondition._c_REELSHAPE_LEFT = 15;;
        slotmodel.ECondition._c_REELSHAPE_RIGHT = 16;;
        slotmodel.ECondition._c_REELSHAPE_ANY = 17;;
        slotmodel.ECondition._c_BALANCED_OPTION = 18;;
        slotmodel.ECondition._c_LINESHAPE_LEFT = 19;;
        slotmodel.ECondition._c_LINESHAPE_RIGHT = 20;;
        slotmodel.ECondition._c_TRUE_SEND_PLAYER_DECISION = 21;;
        slotmodel.ECondition._c_MULTIWAY_LEFT = 22;;
        slotmodel.ECondition._c_MULTIWAY_RIGHT = 23;;
        slotmodel.ECondition._c_MULTIWAY_ANY = 24;;
        slotmodel.ECondition._c_TRUE_SEND_FILTERED_STATE_32 = 25;;
        slotmodel.ECondition._c_TRUE_DRAWGAME_STATE_32 = 26;;
        slotmodel.ECondition._c_REGISTER_DRAWGAME_STATE_32 = 27;;
        slotmodel.ECondition._c_HITSHAPE_LEFT = 28;;
        slotmodel.ECondition._c_HITSHAPE_RIGHT = 29;;
        slotmodel.ECondition._c_HITSHAPE_ANY = 30;;
        slotmodel.ECondition._c_TRUE_NRS_NEXT_RESULT = 31;;
        slotmodel.ECondition.__MAX_c_CONDITION_TYPES = 256;;
        slotmodel.EReelPictureInfo.NONE = new slotmodel.EReelPictureInfo(0);;
        slotmodel.EReelPictureInfo.ACTIVE = new slotmodel.EReelPictureInfo(1);;
        slotmodel.EReelPictureInfo.INACTIVE = new slotmodel.EReelPictureInfo(2);;
        slotmodel.EWinInfo.WIN_TYPE_CREDIT = 0;;
        slotmodel.EWinInfo.WIN_TYPE_TRIGGER_COUNTER = 1;;
        slotmodel.EWinInfo.WIN_TYPE_CONSOLATION = 2;;
        slotmodel.EWinInfo.WIN_TYPE_FILTEREDSTATE = 3;;
        slotmodel.EWinInfo.WIN_TYPE_POT_PAYOUT = 4;;
        slotmodel.EWinInfo.WIN_AUTO_TYPE_JACKPOT = 128;;
        slotmodel.EWinInfo.WIN_AUTO_TYPE_TRIGGER = 129;;
        slotmodel.EWinInfo.WIN_AUTO_TYPE_POT_MODIFY = 130;;
        slotmodel.EWinInfo.__MAX_WIN_TYPES = 256;;
        slotmodel.MptHelper.parseError = false;;
        slotmodel.AutoSpinInfoImpl.REASON_ID_Finished = 0;;
        slotmodel.AutoSpinInfoImpl.REASON_ID_GameStopAutoSpinsRequested = 1;;
        slotmodel.AutoSpinInfoImpl.REASON_ID_PFStopAutoSpinsRequested = 2;;
        slotmodel.AutoSpinInfoImpl.REASON_ID_AutoSpinsInterrupted = 3;;
        slotmodel.EResumeStage.NO_RESUME = new slotmodel.EResumeStage("NoResume");;
        slotmodel.EResumeStage.RESUME_FREESPIN = new slotmodel.EResumeStage("ResumeFreeSpin");;
        slotmodel.EResumeStage.PICKER_BONUS = new slotmodel.EResumeStage("pickerBonus");;
        slotmodel.EResumeStage.TUMBLE = new slotmodel.EResumeStage("Tumble");;
        slotmodel.EStage.BASE_GAME = new slotmodel.EStage("BaseGame");;
        slotmodel.EStage.FREE_SPIN = new slotmodel.EStage("FreeSpin");;
        slotmodel.EStage.PICKER_BONUS = new slotmodel.EStage("Picker");;
        slotmodel.EStage.TUMBLE = new slotmodel.EStage("Tumble");;
        slotmodel.LineWinImpl.WIN_TYPE = "Line";;
        slotmodel.LineWinImpl.WIN_POSITION = 0;;
        slotmodel.PickerWinImpl.WIN_TYPE = "Picker";;
        slotmodel.ScatterWinImpl.WIN_TYPE = "Scatter";;
        slotmodel.ScatterWinImpl.WIN_POSITION = 0;;
        slotmodel.ScatterWinImpl.WIN_LINEID = 0;;
        return {
            exports: slotmodel,
            activator: slotmodel.ModuleActivator
        };
    });
//# sourceURL=slotModel.js