define("slotmodelGamePluginCommonGle", ["slotModelApi", "money", "clientkernelModulesApi", "slotmodelGamePluginApi", "clientkernelLoggerApi"],
    function(slotModelApi, money, 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 slotmodelGamePluginCommonGle == 'undefined') {
            var slotmodelGamePluginCommonGle = {};
        };
        slotmodelGamePluginCommonGle.Common = function() {};
        slotmodelGamePluginCommonGle.Common.__name__ = ["slotmodelGamePluginCommonGle", "Common"];
        slotmodelGamePluginCommonGle.Common.prototype.__class__ = slotmodelGamePluginCommonGle.Common;
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser = function(gameId, onError, payloadErrorId) {
            this.parseError = false;
            this.gameId = gameId;
            this.onError = onError;
            this.payloadErrorId = payloadErrorId;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.__name__ = ["slotmodelGamePluginCommonGle", "PfPluginCommonResponseParser"];
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.onError = null;
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.payloadErrorId = null;
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.gameId = null;
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseError = null;
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.onParseFatalError = function(message) {
            slotmodelGamePluginCommonGle.Log.getLoggerBykey("PFResponseParser").error("[ParseFatalError]" + message);
            this.parseError = true;
            this.onError(this.getFatalError("ParseFatalError", message));
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.getFatalError = function(source, message) {
            return new slotModelApi.Error(this.payloadErrorId, true, "[" + this.gameId + "][" + source + "] " + message);
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.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;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.updateReelPictureInfo = function(reelPictureInfo, cellsInfo, reelPictureVisibility, symbolValue) {
            var reelPictureVisibilityInfo = null;
            if (reelPictureVisibility != null) reelPictureVisibilityInfo = reelPictureVisibility.reelsInfo;
            if (cellsInfo == null) return;
            var _g = 0;
            while (_g < cellsInfo.length) {
                var cellInfo = cellsInfo[_g];
                ++_g;
                var reelIndex = _hcmn_.Std.parseInt(cellInfo.split("C")[1].split("R")[0]);
                var symbolIndex = _hcmn_.Std.parseInt(cellInfo.split("R")[1]);
                if (reelPictureVisibilityInfo != null) {
                    if (reelPictureVisibilityInfo[reelIndex][symbolIndex] > 0) reelPictureInfo[reelIndex][symbolIndex] = symbolValue;
                } else reelPictureInfo[reelIndex][symbolIndex] = symbolValue;
            }
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.getDefaultLineWinPath = function(reelPictureSize, lineId, linesDefinition) {
            var reelsInfo = this.getDefaultReelPictureInfo(reelPictureSize, 0);
            var lineDefinition = this.getLine(lineId, linesDefinition);
            if (lineDefinition == null) return reelsInfo;
            var linePath = lineDefinition.getLinePath(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] = slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.DISABLED_WINNING_SYMBOL_INFO;
                }
            }
            return reelsInfo;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parsePopulationOutcome = function(response, populationField) {
            var populationOutcomes = slotmodelGamePluginCommonGle.StdHelper.getArrayField(response, "PopulationOutcome");
            if (populationOutcomes == null) return null;
            var result = null;
            var _g = 0;
            while (_g < populationOutcomes.length) {
                var populationOutcome = populationOutcomes[_g];
                ++_g;
                var name = slotmodelGamePluginCommonGle.StdHelper.getField(populationOutcome, "@name");
                if (name == populationField) {
                    result = slotmodelGamePluginCommonGle.StdHelper.getArrayField(populationOutcome, "Entry");
                    break;
                }
            }
            return result;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parsePrizeOutcome = function(response, fieldName) {
            var prizeOutcomes = slotmodelGamePluginCommonGle.StdHelper.getArrayField(response, "PrizeOutcome");
            if (prizeOutcomes == null) return null;
            var result = null;
            var _g = 0;
            while (_g < prizeOutcomes.length) {
                var prizeOutcome = prizeOutcomes[_g];
                ++_g;
                var name = slotmodelGamePluginCommonGle.StdHelper.getField(prizeOutcome, "@name");
                if (name == fieldName) {
                    result = prizeOutcome;
                    break;
                }
            }
            return result;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseWinMultiplier = function(response) {
            var totalStakeCredit = this.parseTotalStakeCredit(response);
            if (totalStakeCredit == null) return null;
            var totalWinCredit = this.parseTotalWinCredit(response);
            if (totalWinCredit == null) return null;
            var result = totalWinCredit / totalStakeCredit;
            return result;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseTotalStakeCredit = function(response) {
            var betPerLineCredit = this.parseBetPerLineCredit(response);
            if (betPerLineCredit == null) return null;
            var selectedLineCount = this.parseSelectedLineCount(response);
            if (selectedLineCount == null) return null;
            return betPerLineCredit * selectedLineCount;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseBetPerLineCredit = function(response) {
            var betPerPatternObject = slotmodelGamePluginCommonGle.StdHelper.getField(response, "PatternSliderInput.BetPerPattern");
            if (betPerPatternObject == null) return null;
            return slotmodelGamePluginCommonGle.StdHelper.parseInt(betPerPatternObject, $bind(this, this.onParseFatalError));
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseSelectedLineCount = function(response) {
            var patternsBetObject = slotmodelGamePluginCommonGle.StdHelper.getField(response, "PatternSliderInput.PatternsBet");
            if (patternsBetObject == null) return null;
            return slotmodelGamePluginCommonGle.StdHelper.parseInt(patternsBetObject, $bind(this, this.onParseFatalError));
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseHighlightOutcome = function(response, fieldName) {
            var highlightOutcomes = slotmodelGamePluginCommonGle.StdHelper.getArrayField(response, "HighlightOutcome");
            if (highlightOutcomes == null) return null;
            var result = null;
            var _g = 0;
            while (_g < highlightOutcomes.length) {
                var highlightOutcome = highlightOutcomes[_g];
                ++_g;
                var name = slotmodelGamePluginCommonGle.StdHelper.getField(highlightOutcome, "@name");
                if (name == fieldName) {
                    result = highlightOutcome;
                    break;
                }
            }
            return result;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseTotalWinCredit = function(response) {
            var totalWinObject = slotmodelGamePluginCommonGle.StdHelper.getField(response, "OutcomeDetail.Payout");
            if (totalWinObject == null) return null;
            return slotmodelGamePluginCommonGle.StdHelper.parseInt(totalWinObject, $bind(this, this.onParseFatalError));
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseReelPicture = function(populationOutcome) {
            if (populationOutcome == null) return null;
            var reelPictureMatrix = [];
            var populationOutcomeItem;
            var _g = 0;
            while (_g < populationOutcome.length) {
                var populationOutcomeItem1 = populationOutcome[_g];
                ++_g;
                var cellArray = slotmodelGamePluginCommonGle.StdHelper.getArrayField(populationOutcomeItem1, "Cell");
                var reelPicture1 = [];
                var _g1 = 0;
                while (_g1 < cellArray.length) {
                    var cellItem = cellArray[_g1];
                    ++_g1;
                    var cellPicture = slotmodelGamePluginCommonGle.StdHelper.getField(cellItem, "#text");
                    reelPicture1.push(cellPicture);
                }
                reelPictureMatrix.push(reelPicture1);
            }
            var reelPicture = new slotModelApi.ReelPicture(reelPictureMatrix);
            return reelPicture;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseBonus_LinePrizeOutcomes = function(bonusWins, outcomeSearchType, outcomeType, reseponse, stage, slotDefinition, calc_id, calc_lineId, calc_winningSymbol, calc_position) {
            slotmodelGamePluginCommonGle.Log.getLogger(this).debug("[parseBonus_LinePrizeOutcomes] outcomeType=" + outcomeType + ",  outcomeSearchType=" + outcomeSearchType);
            this.parseError = false;
            var reelPictureSize = slotDefinition.reelPictureSize;
            var reelPictureVisibility = slotDefinition.reelPictureVisibility;
            var linesDefinition = slotDefinition.lines;
            var fieldName = stage + "." + outcomeSearchType;
            var prizes = this.parsePrizes(reseponse, fieldName);
            if (prizes == null) return this.parseError;
            var bonusWinMap = new _hcmn_.haxe_ds_StringMap();
            var prize;
            var _g = 0;
            while (_g < prizes.length) {
                var prize1 = prizes[_g];
                ++_g;
                var mapId = slotmodelGamePluginCommonGle.StdHelper.getField(prize1, "@name");
                var name = slotmodelGamePluginCommonGle.StdHelper.getField(prize1, "@payName");
                var id1 = mapId;
                if (calc_id != null) id1 = calc_id(mapId);
                var lineId = 0;
                if (calc_lineId != null) lineId = calc_lineId(mapId);
                var bonusWin = this.addBonusWin(bonusWinMap, mapId, outcomeType, id1, name, lineId);
                this.parseWinPayProperties(bonusWin, prize1);
                var winningSymbol = null;
                if (calc_winningSymbol != null) winningSymbol = calc_winningSymbol([mapId, name]);
                else winningSymbol = this.parse_WinningSymbol(name);
                var position = 0;
                if (calc_position != null) position = calc_position([mapId, name]);
                else {
                    position = slotmodelGamePluginCommonGle.StdHelper.parseIntField(prize1, "@position", null);
                    if (position == null) position = 0;
                }
                var symbolCount = slotmodelGamePluginCommonGle.StdHelper.parseIntField(prize1, "@symbolCount", $bind(this, this.onParseFatalError));
                bonusWin.setRenderProperties(winningSymbol, position, symbolCount);
            }
            var highlights = this.parseHighlights(reseponse, fieldName);
            if (highlights == null) return this.parseError;
            var highlight;
            var _g1 = 0;
            while (_g1 < highlights.length) {
                var highlight1 = highlights[_g1];
                ++_g1;
                var mapId1 = slotmodelGamePluginCommonGle.StdHelper.getField(highlight1, "@name");
                var id2 = mapId1;
                if (calc_id != null) id2 = calc_id(mapId1);
                var lineId1 = 0;
                if (calc_lineId != null) lineId1 = calc_lineId(mapId1);
                var name1 = mapId1;
                var bonusWin1 = this.addBonusWin(bonusWinMap, mapId1, outcomeType, id2, name1, lineId1);
                var winPath = this.getDefaultLineWinPath(reelPictureSize, lineId1, linesDefinition);
                this.updateReelPictureInfoFromCell(winPath, highlight1, reelPictureVisibility, slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.WINNING_SYMBOL_INFO);
                bonusWin1.setWinPath(new slotModelApi.ReelPictureInfo(winPath));
            }
            if (bonusWins == null) bonusWins = [];
            var id;
            var $it0 = bonusWinMap.keys();
            while ($it0.hasNext()) {
                var id3 = $it0.next();
                bonusWins.push(_hcmn_.__map_reserved[id3] != null ? bonusWinMap.getReserved(id3) : bonusWinMap.h[id3]);
            }
            return this.parseError;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parse_WinningSymbol = function(payName) {
            if (payName == null) return null;
            var payNameParts = payName.split(" ");
            if (payNameParts.length > 0) return payNameParts[1];
            return null;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseBonus_PrizeOutcomes = function(bonusWins, outcomeSearchType, outcomeType, reseponse, stage, slotDefinition, calc_id, calc_lineId, calc_winningSymbol, calc_position) {
            slotmodelGamePluginCommonGle.Log.getLogger(this).debug("[parseBonus_PrizeOutcomes] outcomeType=" + outcomeType + ",  outcomeSearchType=" + outcomeSearchType);
            this.parseError = false;
            var reelPictureSize = slotDefinition.reelPictureSize;
            var reelPictureVisibility = slotDefinition.reelPictureVisibility;
            var fieldName = stage + "." + outcomeSearchType;
            var prizes = this.parsePrizes(reseponse, fieldName);
            if (prizes == null) return this.parseError;
            var bonusWinMap = new _hcmn_.haxe_ds_StringMap();
            var prize;
            var _g = 0;
            while (_g < prizes.length) {
                var prize1 = prizes[_g];
                ++_g;
                var mapId = slotmodelGamePluginCommonGle.StdHelper.getField(prize1, "@name");
                var name = slotmodelGamePluginCommonGle.StdHelper.getField(prize1, "@payName");
                var id1 = mapId;
                if (calc_id != null) id1 = calc_id(mapId);
                var lineId = 0;
                if (calc_lineId != null) lineId = calc_lineId(mapId);
                var bonusWin = this.addBonusWin(bonusWinMap, mapId, outcomeType, id1, name, lineId);
                this.parseWinPayProperties(bonusWin, prize1);
                var winningSymbol = null;
                if (calc_winningSymbol != null) winningSymbol = calc_winningSymbol([mapId, name]);
                else winningSymbol = this.parse_WinningSymbol(name);
                var position = 0;
                if (calc_position != null) position = calc_position([mapId, name]);
                else {
                    position = slotmodelGamePluginCommonGle.StdHelper.parseIntField(prize1, "@position", null);
                    if (position == null) position = 0;
                }
                var symbolCount = slotmodelGamePluginCommonGle.StdHelper.parseIntField(prize1, "@symbolCount", $bind(this, this.onParseFatalError));
                bonusWin.setRenderProperties(winningSymbol, position, symbolCount);
            }
            var highlights = this.parseHighlights(reseponse, fieldName);
            if (highlights == null) return this.parseError;
            var highlight;
            var _g1 = 0;
            while (_g1 < highlights.length) {
                var highlight1 = highlights[_g1];
                ++_g1;
                var mapId1 = slotmodelGamePluginCommonGle.StdHelper.getField(highlight1, "@name");
                var id2 = mapId1;
                if (calc_id != null) id2 = calc_id(mapId1);
                var lineId1 = 0;
                if (calc_lineId != null) lineId1 = calc_lineId(mapId1);
                var name1 = mapId1;
                var bonusWin1 = this.addBonusWin(bonusWinMap, mapId1, outcomeType, id2, name1, lineId1);
                var winPath = this.getDefaultReelPictureInfo(reelPictureSize, 0);
                this.updateReelPictureInfoFromCell(winPath, highlight1, reelPictureVisibility, slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.WINNING_SYMBOL_INFO);
                bonusWin1.setWinPath(new slotModelApi.ReelPictureInfo(winPath));
            }
            if (bonusWins == null) bonusWins = [];
            var id;
            var $it0 = bonusWinMap.keys();
            while ($it0.hasNext()) {
                var id3 = $it0.next();
                bonusWins.push(_hcmn_.__map_reserved[id3] != null ? bonusWinMap.getReserved(id3) : bonusWinMap.h[id3]);
            }
            return this.parseError;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseScatterWins = function(scatterWins, reseponse, stage, slotDefinition, winPathSymbolInfo, calc_winningSymbol) {
            slotmodelGamePluginCommonGle.Log.getLogger(this).debug("[parseScatterWins]");
            var fieldName = stage + ".Scatter";
            var prizes = this.parsePrizes(reseponse, fieldName);
            if (prizes == null) return this.parseError;
            var scatterWinMap = new _hcmn_.haxe_ds_StringMap();
            var _g = 0;
            while (_g < prizes.length) {
                var prize = prizes[_g];
                ++_g;
                var mapId = slotmodelGamePluginCommonGle.StdHelper.getField(prize, "@name");
                var name = slotmodelGamePluginCommonGle.StdHelper.getField(prize, "@payName");
                var scatterWin = this.addScatterWin(scatterWinMap, mapId, name);
                this.parseWinPayProperties(scatterWin, prize);
                var winningSymbol = null;
                if (calc_winningSymbol != null) winningSymbol = calc_winningSymbol([mapId, name]);
                else winningSymbol = this.parse_WinningSymbol(name);
                var symbolCount = slotmodelGamePluginCommonGle.StdHelper.parseIntField(prize, "@symbolCount", $bind(this, this.onParseFatalError));
                scatterWin.setRenderProperties(winningSymbol, null, symbolCount);
            }
            var highlights = this.parseHighlights(reseponse, fieldName);
            if (highlights == null) return this.parseError;
            var highlight;
            var _g1 = 0;
            while (_g1 < highlights.length) {
                var highlight1 = highlights[_g1];
                ++_g1;
                var mapId1 = slotmodelGamePluginCommonGle.StdHelper.getField(highlight1, "@name");
                var scatterWin1 = this.addScatterWin(scatterWinMap, mapId1, mapId1);
                var winPath = this.getDefaultReelPictureInfo(slotDefinition.reelPictureSize, 0);
                this.updateReelPictureInfoFromCell(winPath, highlight1, slotDefinition.reelPictureVisibility, winPathSymbolInfo);
                scatterWin1.setWinPath(new slotModelApi.ReelPictureInfo(winPath));
            }
            if (scatterWins == null) 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]);
            }
            return this.parseError;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseFreeSpinInfo = function(reseponse) {
            slotmodelGamePluginCommonGle.Log.getLogger(this).debug("[parseFreeSpinInfo]");
            var freeSpinOutcomeObject = slotmodelGamePluginCommonGle.StdHelper.getField(reseponse, "FreeSpinOutcome");
            if (freeSpinOutcomeObject == null) return null;
            var total = slotmodelGamePluginCommonGle.StdHelper.parseIntField(freeSpinOutcomeObject, "TotalAwarded", $bind(this, this.onParseFatalError));
            if (total == 0) return null;
            var awarded = slotmodelGamePluginCommonGle.StdHelper.parseIntField(freeSpinOutcomeObject, "Awarded", $bind(this, this.onParseFatalError));
            var isMaxAwarded = slotmodelGamePluginCommonGle.StdHelper.getBoolField(freeSpinOutcomeObject, "MaxAwarded", false);
            var isIncrementTriggered = slotmodelGamePluginCommonGle.StdHelper.getBoolField(freeSpinOutcomeObject, "IncrementTriggered", false);
            var current = slotmodelGamePluginCommonGle.StdHelper.parseIntField(freeSpinOutcomeObject, "Count", $bind(this, this.onParseFatalError));
            return new slotmodelGamePluginCommonGle.FreeSpinInfo(awarded, isMaxAwarded, isIncrementTriggered, total, current);
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.addBonusWin = function(bonusWins, mapId, type, id, name, lineId) {
            if (bonusWins == null) bonusWins = new _hcmn_.haxe_ds_StringMap();
            var bonusWin;
            if (_hcmn_.__map_reserved[mapId] != null ? bonusWins.existsReserved(mapId) : bonusWins.h.hasOwnProperty(mapId)) bonusWin = _hcmn_.__map_reserved[mapId] != null ? bonusWins.getReserved(mapId) : bonusWins.h[mapId];
            else {
                bonusWin = new slotmodelGamePluginCommonGle.BonusWin(type, id, name, lineId);
                if (_hcmn_.__map_reserved[mapId] != null) bonusWins.setReserved(mapId, bonusWin);
                else bonusWins.h[mapId] = bonusWin;
            }
            return bonusWin;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.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 slotmodelGamePluginCommonGle.ScatterWin(name);
                if (_hcmn_.__map_reserved[mapId] != null) scatterWins.setReserved(mapId, scatterWin);
                else scatterWins.h[mapId] = scatterWin;
            }
            return scatterWin;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.getLine = function(lineId, linesDefinition) {
            if (linesDefinition == null) return null;
            var lineDefinition = null;
            var line;
            var _g = 0;
            while (_g < linesDefinition.length) {
                var line1 = linesDefinition[_g];
                ++_g;
                if (line1.id == lineId) {
                    lineDefinition = line1;
                    break;
                }
            }
            return lineDefinition;
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parsePrizes = function(response, fieldName) {
            var prizeOutcome = this.parsePrizeOutcome(response, fieldName);
            if (prizeOutcome == null) return null;
            return slotmodelGamePluginCommonGle.StdHelper.getArrayField(prizeOutcome, "Prize");
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseHighlights = function(response, fieldName) {
            var highlightOutcome = this.parseHighlightOutcome(response, fieldName);
            if (highlightOutcome == null) return null;
            return slotmodelGamePluginCommonGle.StdHelper.getArrayField(highlightOutcome, "Highlight");
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.updateReelPictureInfoFromCell = function(reelPictureInfo, object, reelPictureVisibility, symbolValue) {
            if (object == null) return;
            var cells = slotmodelGamePluginCommonGle.StdHelper.getArrayField(object, "Cell");
            if (cells == null) return;
            var cellsInfo = [];
            var cell;
            var _g = 0;
            while (_g < cells.length) {
                var cell1 = cells[_g];
                ++_g;
                var cellInfo = slotmodelGamePluginCommonGle.StdHelper.getField(cell1, "@name");
                cellsInfo.push(cellInfo);
            }
            this.updateReelPictureInfo(reelPictureInfo, cellsInfo, reelPictureVisibility, symbolValue);
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.parseWinPayProperties = function(win, prize) {
            if (win == null) return;
            if (prize == null) return;
            var stakePerLineCredit = slotmodelGamePluginCommonGle.StdHelper.parseIntField(prize, "@betMultiplier", $bind(this, this.onParseFatalError));
            var price = new money.Money(slotmodelGamePluginCommonGle.StdHelper.getField(prize, "@pay"));
            var multiplier = slotmodelGamePluginCommonGle.StdHelper.parseIntField(prize, "@multiplier", $bind(this, this.onParseFatalError));
            var payoutCredit = slotmodelGamePluginCommonGle.StdHelper.parseIntField(prize, "@totalPay", $bind(this, this.onParseFatalError));
            win.setPayProperties(stakePerLineCredit, price, multiplier, payoutCredit);
        };
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.prototype.__class__ = slotmodelGamePluginCommonGle.PfPluginCommonResponseParser;
        slotmodelGamePluginCommonGle.Log = function() {};
        slotmodelGamePluginCommonGle.Log.__name__ = ["slotmodelGamePluginCommonGle", "Log"];
        slotmodelGamePluginCommonGle.Log.logerFactory = null;
        slotmodelGamePluginCommonGle.Log.init = function(context) {
            slotmodelGamePluginCommonGle.Log.logerFactory = slotmodelGamePluginCommonGle.Log.getLogerFactory(context);
        };
        slotmodelGamePluginCommonGle.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 slotmodelGamePluginCommonGle.Log.getLoggerBykey(key);
        };
        slotmodelGamePluginCommonGle.Log.getLoggerBykey = function(key) {
            if (slotmodelGamePluginCommonGle.Log.logerFactory == null) return null;
            if (!slotmodelGamePluginCommonGle.Log.loggers.exists(key)) {
                var value = slotmodelGamePluginCommonGle.Log.logerFactory.getLogger(key);
                slotmodelGamePluginCommonGle.Log.loggers.set(key, value);
            }
            return slotmodelGamePluginCommonGle.Log.loggers.get(key);
        };
        slotmodelGamePluginCommonGle.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;
        };
        slotmodelGamePluginCommonGle.Log.prototype.__class__ = slotmodelGamePluginCommonGle.Log;
        slotmodelGamePluginCommonGle.StdHelper = function() {};
        slotmodelGamePluginCommonGle.StdHelper.__name__ = ["slotmodelGamePluginCommonGle", "StdHelper"];
        slotmodelGamePluginCommonGle.StdHelper.isEmpty = function(value) {
            if (value == null) return true;
            if (value == "") return true;
            return false;
        };
        slotmodelGamePluginCommonGle.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;
        };
        slotmodelGamePluginCommonGle.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;
        };
        slotmodelGamePluginCommonGle.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;
        };
        slotmodelGamePluginCommonGle.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 (pathArray.length == 0) return field;
                else return slotmodelGamePluginCommonGle.StdHelper.getField(field, remainingPath);
            }
            return null;
        };
        slotmodelGamePluginCommonGle.StdHelper.getBoolField = function(object, name, defaultValue) {
            var dynammicValue = slotmodelGamePluginCommonGle.StdHelper.getField(object, name);
            if (dynammicValue == null) return defaultValue;
            return _hcmn_.Std.string(dynammicValue).toLowerCase() == "true";
        };
        slotmodelGamePluginCommonGle.StdHelper.getArrayField = function(object, name) {
            var field = slotmodelGamePluginCommonGle.StdHelper.getField(object, name);
            return slotmodelGamePluginCommonGle.StdHelper.getArray(field);
        };
        slotmodelGamePluginCommonGle.StdHelper.getIntArrayField = function(object, name) {
            if (object == null) return null;
            var resultDynamicArray = slotmodelGamePluginCommonGle.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;
        };
        slotmodelGamePluginCommonGle.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 slotmodelGamePluginCommonGle.StdHelper.getArray(slotmodelGamePluginCommonGle.StdHelper.getField(json, namePath));
        };
        slotmodelGamePluginCommonGle.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 slotmodelGamePluginCommonGle.StdHelper.getField(json, namePath);
        };
        slotmodelGamePluginCommonGle.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;
        };
        slotmodelGamePluginCommonGle.StdHelper.parseIntField = function(object, name, onError) {
            var dynamicValue = slotmodelGamePluginCommonGle.StdHelper.getField(object, name);
            if (dynamicValue == null) return null;
            return slotmodelGamePluginCommonGle.StdHelper.parseInt(dynamicValue, onError);
        };
        slotmodelGamePluginCommonGle.StdHelper.parseIntArrayField = function(object, name, onError) {
            if (object == null) return null;
            var resultDynamicArray = slotmodelGamePluginCommonGle.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 = slotmodelGamePluginCommonGle.StdHelper.parseInt(resultItem1, onError);
                if (item == null) return null;
                result.push(item);
            }
            return result;
        };
        slotmodelGamePluginCommonGle.StdHelper.prototype.__class__ = slotmodelGamePluginCommonGle.StdHelper;
        slotmodelGamePluginCommonGle.Win = function(type, id, name, lineId) {
            this.type = type;
            this.id = id;
            this.name = name;
            this.lineId = lineId;
        };
        slotmodelGamePluginCommonGle.Win = ck_implements(slotmodelGamePluginCommonGle.Win, slotmodelGamePluginApi.IWin);
        slotmodelGamePluginCommonGle.Win.__interfaces__ = [slotmodelGamePluginApi.IWin];
        slotmodelGamePluginCommonGle.Win.__name__ = ["slotmodelGamePluginCommonGle", "Win"];
        slotmodelGamePluginCommonGle.Win.prototype.type = null;
        slotmodelGamePluginCommonGle.Win.prototype.id = null;
        slotmodelGamePluginCommonGle.Win.prototype.name = null;
        slotmodelGamePluginCommonGle.Win.prototype.lineId = null;
        slotmodelGamePluginCommonGle.Win.prototype.stakePerLineCredit = null;
        slotmodelGamePluginCommonGle.Win.prototype.price = null;
        slotmodelGamePluginCommonGle.Win.prototype.multiplier = null;
        slotmodelGamePluginCommonGle.Win.prototype.payoutCredit = null;
        slotmodelGamePluginCommonGle.Win.prototype.winPath = null;
        slotmodelGamePluginCommonGle.Win.prototype.winningSymbol = null;
        slotmodelGamePluginCommonGle.Win.prototype.position = null;
        slotmodelGamePluginCommonGle.Win.prototype.symbolCount = null;
        slotmodelGamePluginCommonGle.Win.prototype.setWinPath = function(value) {
            this.winPath = value;
        };
        slotmodelGamePluginCommonGle.Win.prototype.setPayProperties = function(stakePerLineCredit, price, multiplier, payoutCredit) {
            this.stakePerLineCredit = stakePerLineCredit;
            this.price = price;
            this.multiplier = multiplier;
            this.payoutCredit = payoutCredit;
        };
        slotmodelGamePluginCommonGle.Win.prototype.setRenderProperties = function(winningSymbol, position, symbolCount) {
            this.winningSymbol = winningSymbol;
            this.position = position;
            this.symbolCount = symbolCount;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getType = function() {
            return this.type;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getId = function() {
            return this.id;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getName = function() {
            return this.name;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getLineId = function() {
            return this.lineId;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getStakePerLineCredit = function() {
            return this.stakePerLineCredit;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getPrice = function() {
            return this.price;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getMultiplier = function() {
            return this.multiplier;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getPayoutCredit = function() {
            return this.payoutCredit;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getWinPath = function() {
            return this.winPath;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getWinningSymbol = function() {
            return this.winningSymbol;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getPosition = function() {
            return this.position;
        };
        slotmodelGamePluginCommonGle.Win.prototype.getSymbolCount = function() {
            return this.symbolCount;
        };
        slotmodelGamePluginCommonGle.Win.prototype.__class__ = slotmodelGamePluginCommonGle.Win;
        slotmodelGamePluginCommonGle.BonusWin = function(type, id, name, lineId) {
            slotmodelGamePluginCommonGle.Win.call(this, type, id, name, lineId);
        };
        slotmodelGamePluginCommonGle.BonusWin = ck_implements(slotmodelGamePluginCommonGle.BonusWin, slotmodelGamePluginApi.IBonusWin);
        slotmodelGamePluginCommonGle.BonusWin.__interfaces__ = [slotmodelGamePluginApi.IBonusWin];
        slotmodelGamePluginCommonGle.BonusWin.__name__ = ["slotmodelGamePluginCommonGle", "BonusWin"];
        slotmodelGamePluginCommonGle.BonusWin.__super__ = slotmodelGamePluginCommonGle.Win;
        for (var k in slotmodelGamePluginCommonGle.Win.prototype) slotmodelGamePluginCommonGle.BonusWin.prototype[k] = slotmodelGamePluginCommonGle.Win.prototype[k];
        slotmodelGamePluginCommonGle.BonusWin.prototype.__class__ = slotmodelGamePluginCommonGle.BonusWin;
        slotmodelGamePluginCommonGle.FreeSpinInfo = function(awarded, isMaxAwarded, isIncrementTriggered, total, current) {
            this.awarded = awarded;
            this.isMaxAwarded = isMaxAwarded;
            this.isIncrementTriggered = isIncrementTriggered;
            this.total = total;
            this.current = current;
        };
        slotmodelGamePluginCommonGle.FreeSpinInfo.__name__ = ["slotmodelGamePluginCommonGle", "FreeSpinInfo"];
        slotmodelGamePluginCommonGle.FreeSpinInfo.prototype.awarded = null;
        slotmodelGamePluginCommonGle.FreeSpinInfo.prototype.isMaxAwarded = null;
        slotmodelGamePluginCommonGle.FreeSpinInfo.prototype.isIncrementTriggered = null;
        slotmodelGamePluginCommonGle.FreeSpinInfo.prototype.current = null;
        slotmodelGamePluginCommonGle.FreeSpinInfo.prototype.total = null;
        slotmodelGamePluginCommonGle.FreeSpinInfo.prototype.__class__ = slotmodelGamePluginCommonGle.FreeSpinInfo;
        slotmodelGamePluginCommonGle.LineWin = function(lineId, name) {
            var id = slotmodelGamePluginCommonGle.LineWin.WIN_TYPE + "_" + lineId;
            slotmodelGamePluginCommonGle.Win.call(this, slotmodelGamePluginCommonGle.LineWin.WIN_TYPE, id, name, lineId);
        };
        slotmodelGamePluginCommonGle.LineWin = ck_implements(slotmodelGamePluginCommonGle.LineWin, slotmodelGamePluginApi.ILineWin);
        slotmodelGamePluginCommonGle.LineWin.__interfaces__ = [slotmodelGamePluginApi.ILineWin];
        slotmodelGamePluginCommonGle.LineWin.__name__ = ["slotmodelGamePluginCommonGle", "LineWin"];
        slotmodelGamePluginCommonGle.LineWin.__super__ = slotmodelGamePluginCommonGle.Win;
        for (var k in slotmodelGamePluginCommonGle.Win.prototype) slotmodelGamePluginCommonGle.LineWin.prototype[k] = slotmodelGamePluginCommonGle.Win.prototype[k];
        slotmodelGamePluginCommonGle.LineWin.prototype.setRenderProperties = function(winningSymbol, positionHidden, symbolCount) {
            slotmodelGamePluginCommonGle.Win.prototype.setRenderProperties.call(this, winningSymbol, slotmodelGamePluginCommonGle.LineWin.WIN_POSITION, symbolCount);
        };
        slotmodelGamePluginCommonGle.LineWin.prototype.__class__ = slotmodelGamePluginCommonGle.LineWin;
        slotmodelGamePluginCommonGle.Outcome = function() {};
        slotmodelGamePluginCommonGle.Outcome = ck_implements(slotmodelGamePluginCommonGle.Outcome, slotmodelGamePluginApi.IOutcome);
        slotmodelGamePluginCommonGle.Outcome.__interfaces__ = [slotmodelGamePluginApi.IOutcome];
        slotmodelGamePluginCommonGle.Outcome.__name__ = ["slotmodelGamePluginCommonGle", "Outcome"];
        slotmodelGamePluginCommonGle.Outcome.prototype.stage = null;
        slotmodelGamePluginCommonGle.Outcome.prototype.reelStop = null;
        slotmodelGamePluginCommonGle.Outcome.prototype.lineWins = null;
        slotmodelGamePluginCommonGle.Outcome.prototype.scatterWins = null;
        slotmodelGamePluginCommonGle.Outcome.prototype.bonusWins = null;
        slotmodelGamePluginCommonGle.Outcome.prototype.setStage = function(value) {
            this.stage = value;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.setReelStop = function(value) {
            this.reelStop = value;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.setLineWins = function(value) {
            this.lineWins = value;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.setScatterWins = function(value) {
            this.scatterWins = value;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.setBonusWins = function(value) {
            this.bonusWins = value;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.getStage = function() {
            return this.stage;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.getReelStop = function() {
            return this.reelStop;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.getLineWins = function() {
            return this.lineWins;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.getScatterWins = function() {
            return this.scatterWins;
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.getBonusWins = function() {
            return this.bonusWins;
        };
        slotmodelGamePluginCommonGle.Outcome.create = function(stage, reelStop, lineWins, scatterWins, bonusWins) {
            var result = new slotmodelGamePluginCommonGle.Outcome();
            result.setStage(stage);
            result.setReelStop(reelStop);
            result.setLineWins(lineWins);
            result.setScatterWins(scatterWins);
            result.setBonusWins(bonusWins);
            return result;
        };
        slotmodelGamePluginCommonGle.Outcome.create2 = function(stage, reelStop) {
            return slotmodelGamePluginCommonGle.Outcome.create(stage, reelStop, null, null, null);
        };
        slotmodelGamePluginCommonGle.Outcome.prototype.__class__ = slotmodelGamePluginCommonGle.Outcome;
        slotmodelGamePluginCommonGle.ScatterWin = function(name) {
            var id = slotmodelGamePluginCommonGle.ScatterWin.WIN_TYPE + "_" + name;
            slotmodelGamePluginCommonGle.Win.call(this, slotmodelGamePluginCommonGle.ScatterWin.WIN_TYPE, id, name, slotmodelGamePluginCommonGle.ScatterWin.WIN_LINEID);
        };
        slotmodelGamePluginCommonGle.ScatterWin = ck_implements(slotmodelGamePluginCommonGle.ScatterWin, slotmodelGamePluginApi.IScatterWin);
        slotmodelGamePluginCommonGle.ScatterWin.__interfaces__ = [slotmodelGamePluginApi.IScatterWin];
        slotmodelGamePluginCommonGle.ScatterWin.__name__ = ["slotmodelGamePluginCommonGle", "ScatterWin"];
        slotmodelGamePluginCommonGle.ScatterWin.__super__ = slotmodelGamePluginCommonGle.Win;
        for (var k in slotmodelGamePluginCommonGle.Win.prototype) slotmodelGamePluginCommonGle.ScatterWin.prototype[k] = slotmodelGamePluginCommonGle.Win.prototype[k];
        slotmodelGamePluginCommonGle.ScatterWin.prototype.setRenderProperties = function(winningSymbol, positionHidden, symbolCount) {
            slotmodelGamePluginCommonGle.Win.prototype.setRenderProperties.call(this, winningSymbol, slotmodelGamePluginCommonGle.ScatterWin.WIN_POSITION, symbolCount);
        };
        slotmodelGamePluginCommonGle.ScatterWin.prototype.__class__ = slotmodelGamePluginCommonGle.ScatterWin;
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.WINNING_SYMBOL_INFO = 1;;
        slotmodelGamePluginCommonGle.PfPluginCommonResponseParser.DISABLED_WINNING_SYMBOL_INFO = 2;;
        slotmodelGamePluginCommonGle.Log.loggers = new _hcmn_.haxe_ds_StringMap();;
        slotmodelGamePluginCommonGle.LineWin.WIN_TYPE = "Line";;
        slotmodelGamePluginCommonGle.LineWin.WIN_POSITION = 0;;
        slotmodelGamePluginCommonGle.ScatterWin.WIN_TYPE = "Scatter";;
        slotmodelGamePluginCommonGle.ScatterWin.WIN_LINEID = 0;;
        slotmodelGamePluginCommonGle.ScatterWin.WIN_POSITION = 0;;
        return {
            exports: slotmodelGamePluginCommonGle
        };
    });
//# sourceURL=slotModelGamePluginCommonGle.js