define("tripleRedHotSevensIXFSlotModelGamePlugin", ["clientkernelLoaderApi", "slotModelApi", "slotmodelGamePluginCommonGle", "money", "clientkernelEventbusApi", "clientkernelModulesApi", "slotmodelGamePluginApi", "clientkernelLoggerApi"],
    function(clientkernelLoaderApi, slotModelApi, slotmodelGamePluginCommonGle, money, clientkernelEventbusApi, clientkernelModulesApi, slotmodelGamePluginApi, clientkernelLoggerApi) {
        "use strict";

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

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

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

        };
        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 tripleRedHotSevensIXFSlotModelGamePlugin == 'undefined') {
            var tripleRedHotSevensIXFSlotModelGamePlugin = {};
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin = function() {
            this.commonParser = new slotmodelGamePluginCommonGle.PfPluginCommonResponseParser(tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.GAME_ID, $bind(this, this.onError), tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.PF_RESPONSE_PARSER_ERROR_ID);
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin = ck_implements(tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin, clientkernelModulesApi.IService);
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin = ck_implements(tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin, slotmodelGamePluginApi.IGamePlugin);
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.__interfaces__ = [clientkernelModulesApi.IService, slotmodelGamePluginApi.IGamePlugin];
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.__name__ = ["tripleRedHotSevensIXFSlotModelGamePlugin", "GamePlugin"];
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.commonParser = null;
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getAdditionalLineWins = function(platformResponse, stage, slotDefinition) {
            throw new js._Boot.HaxeError("Not implemented");
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getBonusWins = function(platformResponse, stage, slotDefinition) {
            throw new js._Boot.HaxeError("Not implemented");
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getCustomBigWin = function(totalStakeCredit, totalWinCredit) {
            throw new js._Boot.HaxeError("Not implemented");
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getImplementedFeatures = function() {
            return [slotmodelGamePluginApi.EPluginFeature.CUSTOM_FIELD, slotmodelGamePluginApi.EPluginFeature.CUSTOM_DATA];
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getNextSpinStripeLayersForSynchronizedReels = function(platformResponse, slotDefinition) {
            throw new js._Boot.HaxeError("Not implemented");
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getNextSpinStripeLayersPerBet = function(platformResponse, slotDefinition) {
            tripleRedHotSevensIXFSlotModelGamePlugin.Parser.parsePayLines(platformResponse);
            return null;
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getProgressMeter = function(platformResponse, slotDefinition) {
            throw new js._Boot.HaxeError("Not implemented");
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getResumePerStake = function(platformResponse, slotDefinition) {
            throw new js._Boot.HaxeError("Not implemented");
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.getScatterWins = function(platformResponse, stage, slotDefinition) {
            throw new js._Boot.HaxeError("Not implemented");
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.parseCustomField = function(platformResponse) {
            return tripleRedHotSevensIXFSlotModelGamePlugin.Parser.parseCustomFields(platformResponse);
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.parseCustomData = function(platformResponse) {
            return this.parseCustomField(platformResponse);
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.stop = function(context) {};
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.onError = function(error) {
            slotmodelGamePluginCommonGle.Log.getLogger(this).error("[GamePlugin][" + error.id + "] " + error.message);
            throw new js._Boot.HaxeError(error);
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.prototype.__class__ = tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin;
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator = function() {};
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator = ck_implements(tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator, clientkernelModulesApi.IModuleActivator);
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator.__name__ = ["tripleRedHotSevensIXFSlotModelGamePlugin", "ModuleActivator"];
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator.prototype.gamePlugin = null;
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator.prototype.registration = null;
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator.prototype.start = function(context) {
            var _g = this;
            context.getServiceTracker([clientkernelLoaderApi.IAssetRegistry, clientkernelLoggerApi.ILoggerFactory, clientkernelEventbusApi.IEventBus]).then(function(context1) {
                _g.gamePlugin = new tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin();
                _g.registration = context1.registerService(_g.gamePlugin, slotmodelGamePluginApi.IGamePlugin, null);
            });
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator.prototype.stop = function(context) {
            if (this.gamePlugin != null) this.gamePlugin.stop(context);
            if (this.registration != null) this.registration.unregister();
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator.main = function() {};
        tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator.prototype.__class__ = tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator;
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser = function() {};
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.__name__ = ["tripleRedHotSevensIXFSlotModelGamePlugin", "Parser"];
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.payLines = null;
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.parseCustomFields = function(platformResponse) {
            var multiplier = tripleRedHotSevensIXFSlotModelGamePlugin.Parser.parseMultiplier(platformResponse);
            var out = {
                multiplier: multiplier,
                isFreeSpins: platformResponse.OutcomeDetail.NextStage != "BaseGame"
            };
            return out;
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.parseMultiplier = function(platformResponse, defaultValue) {
            if (defaultValue == null) defaultValue = 1;
            var outcome = slotmodelGamePluginCommonGle.StdHelper.getField(platformResponse, "MultiplierOutcome");
            if (outcome == null) return defaultValue;
            var field = slotmodelGamePluginCommonGle.StdHelper.getField(outcome, "Multiplier");
            if (field == null) return defaultValue;
            var value = slotmodelGamePluginCommonGle.StdHelper.parseIntField(field, "#text", tripleRedHotSevensIXFSlotModelGamePlugin.Parser.onParseError);
            return value;
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.onParseError = function(message) {
            slotmodelGamePluginCommonGle.Log.getLoggerBykey("PFResponseParser").error("[ParseError]" + message);
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.parsePayLines = function(paytableResponse) {
            tripleRedHotSevensIXFSlotModelGamePlugin.Parser.payLines = new _hcmn_.haxe_ds_StringMap();
            var patterns = slotmodelGamePluginCommonGle.StdHelper.getArrayField(paytableResponse, "PatternInfo");
            var _g = 0;
            while (_g < patterns.length) {
                var pattern = patterns[_g];
                ++_g;
                var isPayline = slotmodelGamePluginCommonGle.StdHelper.getField(pattern, "@name");
                if (isPayline == "Paylines") {
                    var lines = slotmodelGamePluginCommonGle.StdHelper.getArrayField(pattern, "Pattern");
                    var _g1 = 0;
                    while (_g1 < lines.length) {
                        var line = lines[_g1];
                        ++_g1;
                        var lineId = slotmodelGamePluginCommonGle.StdHelper.getField(line, "@name").split("Line ")[1];
                        var cells = slotmodelGamePluginCommonGle.StdHelper.getArrayField(line, "Cell");
                        var linePositions = [];
                        var position = null;
                        var _g2 = 0;
                        while (_g2 < cells.length) {
                            var cell = cells[_g2];
                            ++_g2;
                            var name = slotmodelGamePluginCommonGle.StdHelper.getField(cell, "@name");
                            position = tripleRedHotSevensIXFSlotModelGamePlugin.Parser.parsePosition(name);
                            linePositions.push(position);
                        }
                        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.payLines.set("bg_" + lineId, linePositions);
                    }
                }
            }
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.parsePosition = function(name) {
            var pos = {
                x: _hcmn_.Std.parseInt(name.split("C")[1].split("R")[0]),
                y: _hcmn_.Std.parseInt(name.split("R")[1])
            };
            return pos;
        };
        tripleRedHotSevensIXFSlotModelGamePlugin.Parser.prototype.__class__ = tripleRedHotSevensIXFSlotModelGamePlugin.Parser;
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.GAME_ID = "${package}";;
        tripleRedHotSevensIXFSlotModelGamePlugin.GamePlugin.PF_RESPONSE_PARSER_ERROR_ID = 9999;;
        return {
            exports: tripleRedHotSevensIXFSlotModelGamePlugin,
            activator: tripleRedHotSevensIXFSlotModelGamePlugin.ModuleActivator
        };
    });