define("paytable", ["viewBuilderApi", "componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "slotModelApi", "displayEngineApi", "gameLayoutApi", "money", "PIXI", "BABYLON", "clientkernelEventbusApi", "clientkernelModulesApi", "paytableApi", "moneyApi"],
    function(viewBuilderApi, componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, slotModelApi, displayEngineApi, gameLayoutApi, money, PIXI, BABYLON, clientkernelEventbusApi, clientkernelModulesApi, paytableApi, 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 = {

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            },
            exists: function(k) {
                return {
                    arguments: ["*"],
                    returns: "boolean"
                };
            },
            keys: function() {
                return {
                    arguments: [],
                    returns: "null"
                };
            },
            iterator: function() {
                return {
                    arguments: [],
                    returns: "null"
                };
            }
        };
        haxe.Log = function() {};
        haxe.Log.__name__ = ["haxe", "Log"];
        haxe.Log.trace = function(v, infos) {
            _hcmn_.js_Boot.__trace(v, infos);
        };
        haxe.Log.prototype.__class__ = haxe.Log;
        if (!haxe.ds) {
            haxe.ds = {};
        };
        haxe.ds.BalancedTree = function() {};
        haxe.ds.BalancedTree.__name__ = ["haxe", "ds", "BalancedTree"];
        haxe.ds.BalancedTree.prototype.root = null;
        haxe.ds.BalancedTree.prototype.set = function(key, value) {
            this.root = this.setLoop(key, value, this.root);
        };
        haxe.ds.BalancedTree.prototype.get = function(key) {
            var node = this.root;
            while (node != null) {
                var c = this.compare(key, node.key);
                if (c == 0) return node.value;
                if (c < 0) node = node.left;
                else node = node.right;
            }
            return null;
        };
        haxe.ds.BalancedTree.prototype.exists = function(key) {
            var node = this.root;
            while (node != null) {
                var c = this.compare(key, node.key);
                if (c == 0) return true;
                else if (c < 0) node = node.left;
                else node = node.right;
            }
            return false;
        };
        haxe.ds.BalancedTree.prototype.iterator = function() {
            var ret = [];
            this.iteratorLoop(this.root, ret);
            return _hcmn_.HxOverrides.iter(ret);
        };
        haxe.ds.BalancedTree.prototype.keys = function() {
            var ret = [];
            this.keysLoop(this.root, ret);
            return _hcmn_.HxOverrides.iter(ret);
        };
        haxe.ds.BalancedTree.prototype.setLoop = function(k, v, node) {
            if (node == null) return new haxe.ds.TreeNode(null, k, v, null);
            var c = this.compare(k, node.key);
            if (c == 0) return new haxe.ds.TreeNode(node.left, k, v, node.right, node == null ? 0 : node._height);
            else if (c < 0) {
                var nl = this.setLoop(k, v, node.left);
                return this.balance(nl, node.key, node.value, node.right);
            } else {
                var nr = this.setLoop(k, v, node.right);
                return this.balance(node.left, node.key, node.value, nr);
            }
        };
        haxe.ds.BalancedTree.prototype.iteratorLoop = function(node, acc) {
            if (node != null) {
                this.iteratorLoop(node.left, acc);
                acc.push(node.value);
                this.iteratorLoop(node.right, acc);
            }
        };
        haxe.ds.BalancedTree.prototype.keysLoop = function(node, acc) {
            if (node != null) {
                this.keysLoop(node.left, acc);
                acc.push(node.key);
                this.keysLoop(node.right, acc);
            }
        };
        haxe.ds.BalancedTree.prototype.balance = function(l, k, v, r) {
            var hl;
            if (l == null) hl = 0;
            else hl = l._height;
            var hr;
            if (r == null) hr = 0;
            else hr = r._height;
            if (hl > hr + 2) {
                if ((function($this) {
                        var $r;
                        var _this = l.left;
                        $r = _this == null ? 0 : _this._height;
                        return $r;
                    }(this)) >= (function($this) {
                        var $r;
                        var _this1 = l.right;
                        $r = _this1 == null ? 0 : _this1._height;
                        return $r;
                    }(this))) return new haxe.ds.TreeNode(l.left, l.key, l.value, new haxe.ds.TreeNode(l.right, k, v, r));
                else return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l.left, l.key, l.value, l.right.left), l.right.key, l.right.value, new haxe.ds.TreeNode(l.right.right, k, v, r));
            } else if (hr > hl + 2) {
                if ((function($this) {
                        var $r;
                        var _this2 = r.right;
                        $r = _this2 == null ? 0 : _this2._height;
                        return $r;
                    }(this)) > (function($this) {
                        var $r;
                        var _this3 = r.left;
                        $r = _this3 == null ? 0 : _this3._height;
                        return $r;
                    }(this))) return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l, k, v, r.left), r.key, r.value, r.right);
                else return new haxe.ds.TreeNode(new haxe.ds.TreeNode(l, k, v, r.left.left), r.left.key, r.left.value, new haxe.ds.TreeNode(r.left.right, r.key, r.value, r.right));
            } else return new haxe.ds.TreeNode(l, k, v, r, (hl > hr ? hl : hr) + 1);
        };
        haxe.ds.BalancedTree.prototype.compare = function(k1, k2) {
            return _hcmn_.Reflect.compare(k1, k2);
        };
        haxe.ds.BalancedTree.prototype.__class__ = haxe.ds.BalancedTree;
        haxe.ds.TreeNode = function(l, k, v, r, h) {
            if (h == null) h = -1;
            this.left = l;
            this.key = k;
            this.value = v;
            this.right = r;
            if (h == -1) this._height = ((function($this) {
                var $r;
                var _this = $this.left;
                $r = _this == null ? 0 : _this._height;
                return $r;
            }(this)) > (function($this) {
                var $r;
                var _this1 = $this.right;
                $r = _this1 == null ? 0 : _this1._height;
                return $r;
            }(this)) ? (function($this) {
                var $r;
                var _this2 = $this.left;
                $r = _this2 == null ? 0 : _this2._height;
                return $r;
            }(this)) : (function($this) {
                var $r;
                var _this3 = $this.right;
                $r = _this3 == null ? 0 : _this3._height;
                return $r;
            }(this))) + 1;
            else this._height = h;
        };
        haxe.ds.TreeNode.__name__ = ["haxe", "ds", "TreeNode"];
        haxe.ds.TreeNode.prototype.left = null;
        haxe.ds.TreeNode.prototype.right = null;
        haxe.ds.TreeNode.prototype.key = null;
        haxe.ds.TreeNode.prototype.value = null;
        haxe.ds.TreeNode.prototype._height = null;
        haxe.ds.TreeNode.prototype.__class__ = haxe.ds.TreeNode;
        haxe.ds.EnumValueMap = function() {
            haxe.ds.BalancedTree.call(this);
        };
        haxe.ds.EnumValueMap.__interfaces__ = [haxe.IMap];
        haxe.ds.EnumValueMap.__name__ = ["haxe", "ds", "EnumValueMap"];
        haxe.ds.EnumValueMap.__super__ = haxe.ds.BalancedTree;
        for (var k in haxe.ds.BalancedTree.prototype) haxe.ds.EnumValueMap.prototype[k] = haxe.ds.BalancedTree.prototype[k];
        haxe.ds.EnumValueMap.prototype.compare = function(k1, k2) {
            var d = k1[1] - k2[1];
            if (d != 0) return d;
            var p1 = k1.slice(2);
            var p2 = k2.slice(2);
            if (p1.length == 0 && p2.length == 0) return 0;
            return this.compareArgs(p1, p2);
        };
        haxe.ds.EnumValueMap.prototype.compareArgs = function(a1, a2) {
            var ld = a1.length - a2.length;
            if (ld != 0) return ld;
            var _g1 = 0;
            var _g = a1.length;
            while (_g1 < _g) {
                var i = _g1++;
                var d = this.compareArg(a1[i], a2[i]);
                if (d != 0) return d;
            }
            return 0;
        };
        haxe.ds.EnumValueMap.prototype.compareArg = function(v1, v2) {
            if (_hcmn_.Reflect.isEnumValue(v1) && _hcmn_.Reflect.isEnumValue(v2)) return this.compare(v1, v2);
            else if ((v1 instanceof Array) && v1.__enum__ == null && ((v2 instanceof Array) && v2.__enum__ == null)) return this.compareArgs(v1, v2);
            else return _hcmn_.Reflect.compare(v1, v2);
        };
        haxe.ds.EnumValueMap.prototype.__class__ = haxe.ds.EnumValueMap;
        if (!haxe.ds._StringMap) {
            haxe.ds._StringMap = {};
        };
        haxe.ds._StringMap.StringMapIterator = function(map, keys) {
            this.map = map;
            this.keys = keys;
            this.index = 0;
            this.count = keys.length;
        };
        haxe.ds._StringMap.StringMapIterator.__name__ = ["haxe", "ds", "_StringMap", "StringMapIterator"];
        haxe.ds._StringMap.StringMapIterator.prototype.map = null;
        haxe.ds._StringMap.StringMapIterator.prototype.keys = null;
        haxe.ds._StringMap.StringMapIterator.prototype.index = null;
        haxe.ds._StringMap.StringMapIterator.prototype.count = null;
        haxe.ds._StringMap.StringMapIterator.prototype.hasNext = function() {
            return this.index < this.count;
        };
        haxe.ds._StringMap.StringMapIterator.prototype.next = function() {
            return this.map.get(this.keys[this.index++]);
        };
        haxe.ds._StringMap.StringMapIterator.prototype.__class__ = haxe.ds._StringMap.StringMapIterator;
        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 paytable == 'undefined') {
            var paytable = {};
        };
        paytable.Activator = function(context) {};
        paytable.Activator = ck_implements(paytable.Activator, clientkernelModulesApi.IModuleActivator);
        paytable.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        paytable.Activator.__name__ = ["paytable", "Activator"];
        paytable.Activator.prototype.start = function(context) {
            context.getServiceTracker([viewBuilderApi.IViewBuilderFactory, clientkernelLoaderApi.IAssetRegistry, displayEngineApi.IDisplayProvider, translationmanagerApi.ITranslationManager]).then(function(context1) {
                var vbf = context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
                paytable.ExternalService.initialize(context1, vbf);
                context1.registerService(new paytable.PaytableFactory(context1), paytableApi.PaytableDeclaration, null);
            });
        };
        paytable.Activator.prototype.stop = function(context) {};
        paytable.Activator.main = function() {};
        paytable.Activator.prototype.__class__ = paytable.Activator;
        paytable.ExternalService = function() {};
        paytable.ExternalService.__name__ = ["paytable", "ExternalService"];
        paytable.ExternalService.displayProvider = null;
        paytable.ExternalService.assetRegistry = null;
        paytable.ExternalService.viewBuilderFactory = null;
        paytable.ExternalService.translationManager = null;
        paytable.ExternalService.loadedAssets = null;
        paytable.ExternalService.loadedDefinitionConfig = null;
        paytable.ExternalService.moneyFormatter = null;
        paytable.ExternalService.variableRegistry = null;
        paytable.ExternalService.eventBus = null;
        paytable.ExternalService.initialize = function(context, vbf) {
            paytable.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            paytable.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            paytable.ExternalService.moneyFormatter = context.getAnyService(moneyApi.IMoneyFormatter);
            paytable.ExternalService.translationManager = context.getAnyService(translationmanagerApi.ITranslationManager);
            paytable.ExternalService.variableRegistry = context.getAnyService(clientkernelLoaderApi.IVariableRegistry, null);
            paytable.ExternalService.eventBus = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
            paytable.ExternalService.viewBuilderFactory = vbf;
        };
        paytable.ExternalService.getLanguage = function() {
            return paytable.ExternalService.variableRegistry.get("language");
        };
        paytable.ExternalService.prototype.__class__ = paytable.ExternalService;
        paytable.Paytable = function(context) {
            this.assetsLoaded = false;
            this.initialized = false;
            this.presentationInitializationPayload = null;
            this.layoutPayload = null;
            this.IS_DEFAULT_HELP = false;
            this.IS_DEFAULT_PAYTABLE = false;
            this.HTML_PAYTABLE = false;
            this.DEFINITION_CONFIG_ID = "paytable-assets/paytable_definition_config.json";
            this.MAIN_CONFIG_ID = "paytable-assets/paytable_layout.viewbuilder.json";
            this.COMPONENT_ID = "PAYTABLE";
            var _g = this;
            this.context = context;
            this.baseEvents = new paytable.BaseEvents();
            this.port = context.getImplementedPort(paytableApi.IPaytableImplementationPort);
            this.layoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.slotModelPort = context.getUsedPort(slotModelApi.ISlotModelPort);
            this.slotModelPort.getStages().getInitStage().getInitializeGamePhase().getInitializeGame().subscribe($bind(this, this.handlePresentationInitialization));
            this.slotModelPort.getStages().getResumeStage().getPrepareResume().subscribe($bind(this, this.handlePrepareResume));
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.updateLayout));
            this.controller = new paytable.PaytableController(this);
            paytable.ExternalService.assetRegistry.getAsset(this.DEFINITION_CONFIG_ID).getContent().then(function(config) {
                paytable.ExternalService.loadedDefinitionConfig = config;
                if (paytable.ExternalService.loadedDefinitionConfig.useHTMLPaytable != null) _g.HTML_PAYTABLE = paytable.ExternalService.loadedDefinitionConfig.useHTMLPaytable;
                else if (paytable.ExternalService.loadedDefinitionConfig.useDefault != null) _g.IS_DEFAULT_PAYTABLE = true;
                if (paytable.ExternalService.loadedDefinitionConfig.useDefaultHelpPage == true) {
                    _g.IS_DEFAULT_HELP = true;
                    _g.slotModelPort.getStages().getIdleStage().getOpenHelp().subscribe($bind(_g, _g.openDefaultHelpPage));
                }
                if (!_g.IS_DEFAULT_PAYTABLE) paytable.ExternalService.assetRegistry.getAsset(_g.MAIN_CONFIG_ID).getContent().then(function(vb) {
                    _g.assetsLoaded = true;
                    paytable.ExternalService.loadedAssets = vb;
                    _g.initialize();
                });
                else {
                    _g.paytableComponent = new paytable.DefaultPaytable();
                    _g.port.show().subscribe($bind(_g, _g.handleShow));
                    _g.port.hide().subscribe($bind(_g, _g.handleHide));
                }
            });
        };
        paytable.Paytable.__name__ = ["paytable", "Paytable"];
        paytable.Paytable.prototype.COMPONENT_ID = null;
        paytable.Paytable.prototype.MAIN_CONFIG_ID = null;
        paytable.Paytable.prototype.DEFINITION_CONFIG_ID = null;
        paytable.Paytable.prototype.HTML_PAYTABLE = null;
        paytable.Paytable.prototype.IS_DEFAULT_PAYTABLE = null;
        paytable.Paytable.prototype.IS_DEFAULT_HELP = null;
        paytable.Paytable.prototype.view = null;
        paytable.Paytable.prototype.paytableComponent = null;
        paytable.Paytable.prototype.helpComponent = null;
        paytable.Paytable.prototype.port = null;
        paytable.Paytable.prototype.layoutPort = null;
        paytable.Paytable.prototype.slotModelPort = null;
        paytable.Paytable.prototype.controller = null;
        paytable.Paytable.prototype.context = null;
        paytable.Paytable.prototype.layoutPayload = null;
        paytable.Paytable.prototype.presentationInitializationPayload = null;
        paytable.Paytable.prototype.initialized = null;
        paytable.Paytable.prototype.assetsLoaded = null;
        paytable.Paytable.prototype.baseEvents = null;
        paytable.Paytable.prototype.mainStageCacheID = null;
        paytable.Paytable.prototype.handlePrepareResume = function(e) {
            this.paytableComponent.initializeContent(e.getPayload().initializationProperties);
        };
        paytable.Paytable.prototype.handlePresentationInitialization = function(e) {
            this.paytableComponent.initializeContent(e.getPayload());
        };
        paytable.Paytable.prototype.updateLayout = function(e) {
            if (!this.IS_DEFAULT_PAYTABLE) {
                this.layoutPayload = e.getPayload();
                if (!this.initialized) this.initialize();
                else if (!this.HTML_PAYTABLE) {
                    this.controller.updateLayout(this.layoutPayload);
                    this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
                }
            }
        };
        paytable.Paytable.prototype.initialize = function() {
            if (this.assetsLoaded && this.layoutPayload != null || this.assetsLoaded && this.HTML_PAYTABLE) {
                paytable.PaytableDefinition.initialize(paytable.ExternalService.loadedDefinitionConfig);
                if (!this.HTML_PAYTABLE) {
                    this.view = paytable.ExternalService.viewBuilderFactory.createView(paytable.ExternalService.loadedAssets);
                    var container = this.view.getComponentById(this.COMPONENT_ID);
                    if (container == null) throw new Error("paytable container (with paytable id) not found in assets!");
                    this.paytableComponent = new paytable.PaytableComponent(container, this.baseEvents);
                    this.controller.updateLayout(this.layoutPayload);
                    this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
                } else this.paytableComponent = new paytable.HTMLPaytableComponent(this.baseEvents);
                this.port.show().subscribe($bind(this, this.handleShow));
                this.port.hide().subscribe($bind(this, this.handleHide));
                this.port.setPreviousPage().subscribe($bind(this, this.handlePrevious));
                this.port.setNextPage().subscribe($bind(this, this.handleNext));
                this.port.updateLabelContent().subscribe($bind(this, this.handleUpdateLabelContent));
                this.baseEvents.getEvent(paytable.BaseEventsEnum.CLOSE).add($bind(this, this.handleClose));
                this.baseEvents.getEvent(paytable.BaseEventsEnum.CURRENT_PAGE).add($bind(this, this.handleCurrentPage));
                this.paytableComponent.hide();
                this.setStageVisible("skgl_1", false);
                this.initialized = true;
            }
        };
        paytable.Paytable.prototype.handleShow = function(e) {
            this.closeHelp(null);
            this.paytableComponent.show();
            if (!this.IS_DEFAULT_PAYTABLE) {
                if (this.paytableComponent.isFullScreenMobile()) {
                    this.setStageVisible("skgl_0", false);
                    this.setStageVisible("skgl_1", true);
                }
            }
        };
        paytable.Paytable.prototype.handleHide = function(e) {
            this.paytableComponent.hide();
            if (!this.IS_DEFAULT_PAYTABLE) {
                this.setStageVisible("skgl_0", true);
                this.setStageVisible("skgl_1", false);
                ((function($this) {
                    var $r;
                    var this1 = paytable.ExternalService.displayProvider.getStages();
                    $r = this1.get("skgl_0");
                    return $r;
                }(this))).getCanvas().style.visibility = "visible";
            }
        };
        paytable.Paytable.prototype.setStageVisible = function(stageId, visible) {
            if (this.HTML_PAYTABLE && stageId != "skgl_0") return;
            var stg;
            var this1 = paytable.ExternalService.displayProvider.getStages();
            stg = this1.get(stageId);
            stg.setVisible(visible);
        };
        paytable.Paytable.prototype.handleClose = function(e) {
            this.port.onCloseButtonPressed().publish(null);
        };
        paytable.Paytable.prototype.handlePrevious = function(e) {
            this.paytableComponent.showPrevious();
        };
        paytable.Paytable.prototype.handleNext = function(e) {
            this.paytableComponent.showNext();
        };
        paytable.Paytable.prototype.handleUpdateLabelContent = function(e) {
            var payload = e.getPayload();
            this.paytableComponent.changeLabelContent(payload.pageId, payload.labelId, payload.text, payload.style);
        };
        paytable.Paytable.prototype.handleCurrentPage = function(e) {
            this.port.onPageChanged().publish(e);
        };
        paytable.Paytable.prototype.getPaytableComponent = function() {
            return this.paytableComponent;
        };
        paytable.Paytable.prototype.openDefaultHelpPage = function(event) {
            var url = event.getPayload();
            haxe.Log.trace("[PAYTABLE][defaultHelpPage] OPEN/CLOSE with url:" + url, {
                fileName: "Paytable.hx",
                lineNumber: 263,
                className: "paytable.component.Paytable",
                methodName: "openDefaultHelpPage"
            });
            if (url == null || url == "") {
                haxe.Log.trace("[PAYTABLE][defaultHelpPage] WARNING: url == null || url == \"\"", {
                    fileName: "Paytable.hx",
                    lineNumber: 265,
                    className: "paytable.component.Paytable",
                    methodName: "openDefaultHelpPage"
                });
                return;
            }
            if (window.document.getElementById("rulesInstance") != null) {
                this.closeHelp(null);
                return;
            }
            if (this.paytableComponent.isOpen()) this.handleClose(null);
            this.helpComponent = new paytable.HelpComponent(url, "Help", $bind(this, this.helpClosed));
        };
        paytable.Paytable.prototype.closeHelp = function(event) {
            haxe.Log.trace("[PAYTABLE][defaultHelpPage] CLOSE closeHelp", {
                fileName: "Paytable.hx",
                lineNumber: 286,
                className: "paytable.component.Paytable",
                methodName: "closeHelp"
            });
            if (this.helpComponent == null) {
                haxe.Log.trace("[PAYTABLE][defaultHelpPage] WARNING: helpComponent == null", {
                    fileName: "Paytable.hx",
                    lineNumber: 288,
                    className: "paytable.component.Paytable",
                    methodName: "closeHelp"
                });
                return;
            }
            this.helpComponent.close();
        };
        paytable.Paytable.prototype.helpClosed = function() {
            haxe.Log.trace("[PAYTABLE][defaultHelpPage] CLOSE helpClosed", {
                fileName: "Paytable.hx",
                lineNumber: 295,
                className: "paytable.component.Paytable",
                methodName: "helpClosed"
            });
            this.helpComponent.close();
            this.helpComponent = null;
        };
        paytable.Paytable.prototype.__class__ = paytable.Paytable;
        paytable.PaytableController = function(paytable1) {
            this.flag_addedToStage = false;
            this.paytable = paytable1;
        };
        paytable.PaytableController.__name__ = ["paytable", "PaytableController"];
        paytable.PaytableController.prototype.paytable = null;
        paytable.PaytableController.prototype.flag_addedToStage = null;
        paytable.PaytableController.prototype.updateLayout = function(layoutPayload) {
            var $it0 = layoutPayload.containers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var layerPayload = layoutPayload.containers.get(layerId);
                var cfg = layerPayload.configuration;
                var stage;
                var this1 = paytable.ExternalService.displayProvider.getStages();
                stage = this1.get(layerPayload.stage);
                var container = this.paytable.view.getComponentById(layerId);
                var containerDO = container.getDisplayObject();
                var fullScreenCanvas = layerPayload.width == null || layerPayload.height == null;
                if (!this.flag_addedToStage) {
                    stage.addChild(containerDO);
                    this.flag_addedToStage = true;
                    if (fullScreenCanvas) {}
                }
                containerDO.setZIndex(layerPayload.zIndex);
                stage.setWidth(stage.getCanvas().width);
                stage.setHeight(stage.getCanvas().height);
                if (cfg != null) this.paytable.getPaytableComponent().setConfig(cfg, stage, fullScreenCanvas);
            }
        };
        paytable.PaytableController.prototype.init = function() {};
        paytable.PaytableController.prototype.__class__ = paytable.PaytableController;
        paytable.PaytableDefinition = function() {};
        paytable.PaytableDefinition.__name__ = ["paytable", "PaytableDefinition"];
        paytable.PaytableDefinition.dynTextConfig = null;
        paytable.PaytableDefinition.initialize = function(loadedDefinitionConfig) {
            if (Object.prototype.hasOwnProperty.call(loadedDefinitionConfig, "dynamicText")) paytable.PaytableDefinition.dynTextConfig = loadedDefinitionConfig.dynamicText;
            else paytable.PaytableDefinition.dynTextConfig = {
                RTP_FromTo: "PaytableContent_7_0",
                RTP_Single: "PaytableContent_7_0_singleRTP",
                awardCap: null
            };
        };
        paytable.PaytableDefinition.getSingleRTPLabelId = function() {
            return paytable.PaytableDefinition.dynTextConfig.RTP_Single;
        };
        paytable.PaytableDefinition.getRTPLabelId = function() {
            return paytable.PaytableDefinition.dynTextConfig.RTP_FromTo;
        };
        paytable.PaytableDefinition.getAwardCapLabelId = function() {
            return paytable.PaytableDefinition.dynTextConfig.awardCap;
        };
        paytable.PaytableDefinition.prototype.__class__ = paytable.PaytableDefinition;
        paytable.PaytableFactory = function(context) {
            this.context = context;
        };
        paytable.PaytableFactory = ck_implements(paytable.PaytableFactory, clientkernelModulesApi.IService);
        paytable.PaytableFactory = ck_implements(paytable.PaytableFactory, componentmodelComponentApi.IComponentFactory);
        paytable.PaytableFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        paytable.PaytableFactory.__name__ = ["paytable", "PaytableFactory"];
        paytable.PaytableFactory.prototype.vbf = null;
        paytable.PaytableFactory.prototype.context = null;
        paytable.PaytableFactory.prototype.getComponentDeclaration = function() {
            return paytableApi.PaytableDeclaration;
        };
        paytable.PaytableFactory.prototype.createComponent = function(context) {
            new paytable.Paytable(context);
        };
        paytable.PaytableFactory.prototype.__class__ = paytable.PaytableFactory;

        paytable.IPaytableComponent = function() {}
        paytable.IPaytableComponent.prototype = {

            hide: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            show: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            showNext: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            showPrevious: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            changeLabelContent: function(pageId, labelId, text, style) {
                return {
                    arguments: ["string", "string", "string", "*"],
                    returns: "void"
                };
            },
            setConfig: function(cfg, stage, fullScreenCanvas) {
                return {
                    arguments: ["*", "*", {
                        type: "boolean",
                        opt: true
                    }],
                    returns: "void"
                };
            },
            initializeContent: function(presentationInitializationPayload, newPage) {
                return {
                    arguments: ["*", {
                        type: "*",
                        opt: true
                    }],
                    returns: "void"
                };
            },
            isFullScreenMobile: function() {
                return {
                    arguments: [],
                    returns: "boolean"
                };
            },
            isOpen: function() {
                return {
                    arguments: [],
                    returns: "boolean"
                };
            }
        };
        paytable.DefaultPaytable = function() {
            this.showDecimalValueInAwardCap = false;
            this.visible = false;
        };
        paytable.DefaultPaytable = ck_implements(paytable.DefaultPaytable, paytable.IPaytableComponent);
        paytable.DefaultPaytable.__interfaces__ = [paytable.IPaytableComponent];
        paytable.DefaultPaytable.__name__ = ["paytable", "DefaultPaytable"];
        paytable.DefaultPaytable.prototype.iframe = null;
        paytable.DefaultPaytable.prototype.node = null;
        paytable.DefaultPaytable.prototype.divWrapper = null;
        paytable.DefaultPaytable.prototype.minRTP = null;
        paytable.DefaultPaytable.prototype.maxRTP = null;
        paytable.DefaultPaytable.prototype.singleRTP = null;
        paytable.DefaultPaytable.prototype.maxSingleRTP = null;
        paytable.DefaultPaytable.prototype.awardCap = null;
        paytable.DefaultPaytable.prototype.initialPayload = null;
        paytable.DefaultPaytable.prototype.payLines = null;
        paytable.DefaultPaytable.prototype.visible = null;
        paytable.DefaultPaytable.prototype.jpValue = null;
        paytable.DefaultPaytable.prototype.showDecimalValueInAwardCap = null;
        paytable.DefaultPaytable.prototype.initializeContent = function(initialPayload, newPage) {
            this.initialPayload = initialPayload;
            this.minRTP = initialPayload.slotDefinition.rtp.minRTP;
            this.maxRTP = initialPayload.slotDefinition.rtp.maxRTP;
            this.singleRTP = initialPayload.slotDefinition.rtp.singleRTP;
            this.maxSingleRTP = initialPayload.slotDefinition.rtp.maxSingleRTP;
            var decimalSeparator = paytable.ExternalService.translationManager.stringLookup("rtpDecimalSeparator");
            if (decimalSeparator != null && decimalSeparator != "rtpDecimalSeparator") {
                if (this.minRTP != null) this.minRTP = _hcmn_.StringTools.replace(this.minRTP, ".", decimalSeparator);
                else this.minRTP = null;
                if (this.maxRTP != null) this.maxRTP = _hcmn_.StringTools.replace(this.maxRTP, ".", decimalSeparator);
                else this.maxRTP = null;
                if (this.maxSingleRTP != null) this.maxSingleRTP = _hcmn_.StringTools.replace(this.maxSingleRTP, ".", decimalSeparator);
                else this.maxSingleRTP = null;
            }
            this.awardCap = initialPayload.riskControlSettings.awardCap;
            if (initialPayload.defaultStake.outcome.customField != null) {
                if (initialPayload.defaultStake.outcome.customField.payLines != null) this.payLines = initialPayload.defaultStake.outcome.customField.payLines;
            }
            if (initialPayload.defaultStake.outcome.customField != null) {
                if (initialPayload.defaultStake.outcome.customField.jackpotValue != null) this.jpValue = paytable.ExternalService.moneyFormatter.format(_hcmn_.Std.string(_hcmn_.Std.parseInt(initialPayload.defaultStake.outcome.customField.jackpotValue) * initialPayload.riskControlSettings.denomination));
            }
            this.setPaytable();
        };
        paytable.DefaultPaytable.prototype.setPaytable = function() {
            var _g = this;
            var _this = window.document;
            this.iframe = _this.createElement("iframe");
            this.iframe.marginHeight = "0";
            this.iframe.marginWidth = "0";
            this.iframe.src = _hcmn_.Std.string(paytable.ExternalService.loadedDefinitionConfig.url) + "paytable_" + paytable.ExternalService.variableRegistry.get("language") + ".html";
            this.iframe.frameBorder = "0";
            this.iframe.setAttribute("style", "width:100%; height:100%; background:white; position:absolute;");
            this.iframe.height = window.document.body.scrollHeight + "px";
            var _this1 = window.document;
            this.divWrapper = _this1.createElement("div");
            this.setDivWrapperStyle();
            this.divWrapper.appendChild(this.iframe);
            this.divWrapper.id = "paytableInstance";
            this.divWrapper.style.display = "none";
            this.node = window.document.body.appendChild(this.divWrapper);
            if (paytable.ExternalService.loadedDefinitionConfig.showDecimalValueInAwardCap != null) this.showDecimalValueInAwardCap = paytable.ExternalService.loadedDefinitionConfig.showDecimalValueInAwardCap;
            this.iframe.onload = function() {
                _g.placePaytableTexts();
                if (_g.payLines != null) {
                    _g.createPaylinesTables("baseGame", "bg", paytable.ExternalService.loadedDefinitionConfig.bgColumns, paytable.ExternalService.loadedDefinitionConfig.bgRows);
                    _g.createPaylinesTables("freeSpin", "fs", paytable.ExternalService.loadedDefinitionConfig.fsColumns, paytable.ExternalService.loadedDefinitionConfig.fsRows);
                }
            };
        };
        paytable.DefaultPaytable.prototype.show = function() {
            var _g = this;
            _hcmn_.Reflect.setProperty(window, "closePaytable", function() {
                var frame = window.document.getElementById("paytableInstance");
                var closePaytableEvt = window.document.createEvent("Event");
                closePaytableEvt.initEvent("closePaytable", false, false);
                window.dispatchEvent(closePaytableEvt);
                _g.hide();
            });
            this.visible = true;
            this.divWrapper.style.display = "block";
        };
        paytable.DefaultPaytable.prototype.setDivWrapperStyle = function() {
            this.divWrapper.setAttribute("style", "overflow-x: hidden; overflow-y: auto; width:100%; height:100%; position: absolute; z-index: 99999; background:white; top:0px");
            this.divWrapper.style.setProperty("-webkit-overflow-scrolling", "touch");
            this.divWrapper.style.setProperty("-webkit-user-select", "none");
            this.divWrapper.style.setProperty("-webkit-text-size-adjust", "none");
        };
        paytable.DefaultPaytable.prototype.closeListener = function(event) {
            if (event.data == "rules:close$id") window.document.removeEventListener("message", $bind(this, this.closeListener));
        };
        paytable.DefaultPaytable.prototype.showNext = function() {};
        paytable.DefaultPaytable.prototype.showPrevious = function() {};
        paytable.DefaultPaytable.prototype.changeLabelContent = function(pageId, labelId, text, style) {};
        paytable.DefaultPaytable.prototype.setConfig = function(cfg, stage, fullScreenCanvas) {
            if (fullScreenCanvas == null) fullScreenCanvas = false;
        };
        paytable.DefaultPaytable.prototype.isFullScreenMobile = function() {
            return false;
        };
        paytable.DefaultPaytable.prototype.hide = function() {
            this.visible = false;
            this.divWrapper.style.display = "none";
        };
        paytable.DefaultPaytable.prototype.isOpen = function() {
            var isOpen = false;
            if (this.node != null) isOpen = true;
            return isOpen;
        };
        paytable.DefaultPaytable.prototype.setPaytableText = function(div, texts, style) {
            var paytableDiv = this.iframe.contentDocument.getElementById(div);
            if (paytableDiv != null) {
                paytableDiv.innerText = texts;
                if (style != null) paytableDiv.setAttribute("style", style);
            }
        };
        paytable.DefaultPaytable.prototype.placePaytableTexts = function() {
            this.setRTPValues();
            this.setAwardCapValue();
            this.setJackpotValues();
        };
        paytable.DefaultPaytable.prototype.setJackpotValues = function() {
            this.setPaytableText("jpValue", this.jpValue);
        };
        paytable.DefaultPaytable.prototype.setRTPValues = function() {
            if (this.singleRTP != null && this.singleRTP) {
                this.setPaytableText("multipleRTP", "", "display:none;");
                this.setPaytableText("maxSingleRTP", this.maxSingleRTP);
            } else {
                this.setPaytableText("singleRTP", "", "display:none;");
                this.setPaytableText("minRTP", this.minRTP);
                this.setPaytableText("maxRTP", this.maxRTP);
            }
        };
        paytable.DefaultPaytable.prototype.setAwardCapValue = function() {
            var formattedAwardCap = paytable.ExternalService.moneyFormatter.format(this.awardCap, true, this.showDecimalValueInAwardCap);
            this.setPaytableText("awardcap", formattedAwardCap);
        };
        paytable.DefaultPaytable.prototype.bgpaylines = function() {
            var baseGamePaylines = new _hcmn_.haxe_ds_StringMap();
            var $it0 = this.payLines.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                if (_hcmn_.StringTools.startsWith(key, "bg_")) {
                    var value = this.payLines.get(key);
                    if (_hcmn_.__map_reserved[key] != null) baseGamePaylines.setReserved(key, value);
                    else baseGamePaylines.h[key] = value;
                }
            }
            return baseGamePaylines;
        };
        paytable.DefaultPaytable.prototype.fppaylines = function() {
            var freeSpinPaylines = new _hcmn_.haxe_ds_StringMap();
            var $it0 = this.payLines.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                if (_hcmn_.StringTools.startsWith(key, "fs_")) {
                    var value = this.payLines.get(key);
                    if (_hcmn_.__map_reserved[key] != null) freeSpinPaylines.setReserved(key, value);
                    else freeSpinPaylines.h[key] = value;
                }
            }
            return freeSpinPaylines;
        };
        paytable.DefaultPaytable.prototype.createPaylinesTables = function(elementId, type, rows, columns) {
            var lineOffset = 0;
            if (paytable.ExternalService.loadedDefinitionConfig.lineOffset != null) lineOffset = paytable.ExternalService.loadedDefinitionConfig.lineOffset;
            var $it0 = this.payLines.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                if (_hcmn_.StringTools.startsWith(key, type)) {
                    var div = this.iframe.contentDocument.getElementById(elementId);
                    var tbl = this.iframe.contentDocument.createElement("table");
                    tbl.setAttribute("border", "1");
                    var th = this.iframe.contentDocument.createElement("th");
                    tbl.appendChild(th);
                    var _g = 0;
                    while (_g < rows) {
                        var k = _g++;
                        var tr = this.iframe.contentDocument.createElement("tr");
                        var _g1 = 0;
                        while (_g1 < columns) {
                            var j = _g1++;
                            var td = this.iframe.contentDocument.createElement("td");
                            tr.appendChild(td);
                            var _g2 = 0;
                            while (_g2 < columns) {
                                var z = _g2++;
                                var xx = this.payLines.get(key)[z].x;
                                var yy = this.payLines.get(key)[z].y - lineOffset;
                                if (xx == j && yy == k) td.setAttribute("class", "payline-color");
                            }
                        }
                        tbl.appendChild(tr);
                    }
                    th.setAttribute("colspan", "5");
                    div.appendChild(tbl);
                    th.setAttribute("id", "tHead" + key);
                    tbl.setAttribute("id", "table" + key);
                    th.appendChild(this.iframe.contentDocument.createTextNode(_hcmn_.Std.string(_hcmn_.HxOverrides.substr(key, 3, null))));
                }
            }
        };
        paytable.DefaultPaytable.prototype.__class__ = paytable.DefaultPaytable;
        paytable.Extender = function() {};
        paytable.Extender.__name__ = ["paytable", "Extender"];
        paytable.Extender.getField = function(obj, field) {
            if (obj == null) return null;
            if (Object.prototype.hasOwnProperty.call(obj, field)) return _hcmn_.Reflect.field(obj, field);
            else return null;
        };
        paytable.Extender.getFieldAsArray = function(obj, path) {
            return paytable.Extender.makeArray(paytable.Extender.getField(obj, path));
        };
        paytable.Extender.makeArray = function(field) {
            if (field == null) return [];
            if ((field instanceof Array) && field.__enum__ == null) return field;
            else return [field];
        };
        paytable.Extender.find = function(arr, field, value) {
            var _g = 0;
            while (_g < arr.length) {
                var elem = arr[_g];
                ++_g;
                if (paytable.Extender.getField(elem, field) == value) return elem;
            }
            return null;
        };
        paytable.Extender.isEmpty = function(value) {
            if (value == null) return true;
            if (value.length == 0) return true;
            return false;
        };
        paytable.Extender.getBoolValue = function(obj) {
            if (obj != null) {
                if (typeof(obj) == "string") return obj.toLowerCase() == "true";
                return obj;
            }
            return false;
        };
        paytable.Extender.toIntArray = function(arr) {
            var out = [];
            var _g = 0;
            while (_g < arr.length) {
                var elem = arr[_g];
                ++_g;
                out.push(_hcmn_.Std.parseInt(elem));
            }
            return out;
        };
        paytable.Extender.toInt = function(obj) {
            if (obj == null) return null;
            return _hcmn_.Std.parseInt(obj);
        };
        paytable.Extender.toStringArray = function(arr) {
            var out = [];
            var _g = 0;
            while (_g < arr.length) {
                var elem = arr[_g];
                ++_g;
                out.push(_hcmn_.Std.string(elem));
            }
            return out;
        };
        paytable.Extender.clone = function(obj) {
            return JSON.parse(JSON.stringify(obj));
        };
        paytable.Extender.getBoolField = function(object, name, defaultValue) {
            var dynammicValue = paytable.Extender.getField(object, name);
            if (dynammicValue == null) return defaultValue;
            return _hcmn_.Std.string(dynammicValue).toLowerCase() == "true";
        };
        paytable.Extender.strToArray = function(str, delimiter) {
            var _g = [];
            var _g1 = 0;
            var _g2 = str.split(delimiter);
            while (_g1 < _g2.length) {
                var $char = _g2[_g1];
                ++_g1;
                _g.push($char);
            }
            return _g;
        };
        paytable.Extender.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;
        };
        paytable.Extender.sortIntArray = function(array) {
            var temp;
            if (paytable.Extender.isEmpty(array)) return null;
            var _g1 = 1;
            var _g = array.length;
            while (_g1 < _g) {
                var i = _g1++;
                var j = i;
                while (j > 0) {
                    if (array[j] < array[j - 1]) {
                        temp = array[j];
                        array[j] = array[j - 1];
                        array[j - 1] = temp;
                    }
                    j--;
                }
            }
            return array;
        };
        paytable.Extender.prototype.__class__ = paytable.Extender;
        paytable.HTMLPaytableComponent = function(baseEvents) {
            this.currentPage = 0;
            this.labelsWithDynamicData = [];
            this.showDecimalValueInAwardCap = true;
            this.pageCount = 0;
            this.pages = new _hcmn_.haxe_ds_StringMap();
            var ts = new _hcmn_.Date().getTime();
            this.channel = paytable.ExternalService.variableRegistry.get("assetPack");
            this.baseEvents = baseEvents;
            this.parseAssetLibraryMap();
            this.spritesheetImgUrl = paytable.ExternalService.assetRegistry.getAsset("paytable-assets/paytable_layout.viewbuilder.json/paytable_layout_spritesheet_img").getUrl();
            this.spritesheetImg = ((function($this) {
                var $r;
                var this1 = paytable.ExternalService.loadedAssets.getSpritesheetImages();
                $r = this1.iterator();
                return $r;
            }(this))).next();
            this.spritesheetJson = ((function($this) {
                var $r;
                var this2 = paytable.ExternalService.loadedAssets.getSpritesheetJSONs();
                $r = this2.iterator();
                return $r;
            }(this))).next();
            this.vbJson = paytable.ExternalService.loadedAssets.getConfiguration();
            var ptJSON = this.getComponentJSONConfig(this.vbJson, "PAYTABLE");
            this.controlsPortraitJSON = this.getComponentJSONConfig(ptJSON, "ControlsPortrait");
            this.controlsLandscapeJSON = this.getComponentJSONConfig(ptJSON, "ControlsLandscape");
            this.controlsCloseJSON = this.getComponentJSONConfig(ptJSON, "ControlsClose");
            var contentJSON = this.getComponentJSONConfig(ptJSON, "Content");
            paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE = contentJSON.w;
            this.container = window.document.createElement("div");
            this.container.id = "paytable_container";
            this.frame = window.document.createElement("div");
            this.frame.id = "paytable_frame";
            this.frame.style.transformOrigin = "top left";
            this.frame.style.width = paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE + "px";
            this.frame.style.height = paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE + "px";
            var contentBackground = this.getOffsetedImg(this.assetLibraryMap.background);
            var backgroundRect = this.getFrameRect(this.assetLibraryMap.background);
            var bkgScale = paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE / backgroundRect.w;
            contentBackground.style.width = backgroundRect.w + "px";
            contentBackground.style.height = backgroundRect.h + "px";
            contentBackground.style.transformOrigin = "top left";
            contentBackground.style.transform = "scale(" + bkgScale + "," + bkgScale + ")";
            this.frame.appendChild(contentBackground);
            this.content = window.document.createElement("div");
            this.content.id = "paytable_content";
            this.content.style.width = paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE + "px";
            this.content.style.height = paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE + "px";
            this.frame.appendChild(this.content);
            this.container.appendChild(this.frame);
            window.document.body.appendChild(this.container);
            window.onresize = $bind(this, this.onResizeHandler);
            if (paytable.ExternalService.loadedDefinitionConfig.totalPages != null) this.pageCount = _hcmn_.Std["int"](paytable.ExternalService.loadedDefinitionConfig.totalPages);
            if (paytable.ExternalService.loadedDefinitionConfig.showDecimalValueInAwardCap != null) this.showDecimalValueInAwardCap = paytable.ExternalService.loadedDefinitionConfig.showDecimalValueInAwardCap;
            if (paytable.ExternalService.loadedDefinitionConfig.labelsWithDynamicData != null) this.labelsWithDynamicData = paytable.ExternalService.loadedDefinitionConfig.labelsWithDynamicData;
            var _g1 = 0;
            var _g = this.pageCount;
            while (_g1 < _g) {
                var i = _g1++;
                this.createPage("page_" + i);
            }
            this.createUIControls(paytable.ExternalService.variableRegistry.get("assetPack"));
            this.onResizeHandler();
            haxe.Log.trace("[im] HTMLPaytable component creation time: " + (new _hcmn_.Date().getTime() - ts), {
                fileName: "HTMLPaytableComponent.hx",
                lineNumber: 154,
                className: "paytable.component.components.HTMLPaytableComponent",
                methodName: "new"
            });
        };
        paytable.HTMLPaytableComponent = ck_implements(paytable.HTMLPaytableComponent, paytable.IPaytableComponent);
        paytable.HTMLPaytableComponent.__interfaces__ = [paytable.IPaytableComponent];
        paytable.HTMLPaytableComponent.__name__ = ["paytable", "HTMLPaytableComponent"];
        paytable.HTMLPaytableComponent.prototype.container = null;
        paytable.HTMLPaytableComponent.prototype.content = null;
        paytable.HTMLPaytableComponent.prototype.frame = null;
        paytable.HTMLPaytableComponent.prototype.pages = null;
        paytable.HTMLPaytableComponent.prototype.scaleFactor = null;
        paytable.HTMLPaytableComponent.prototype.defaultControlsDiv = null;
        paytable.HTMLPaytableComponent.prototype.verticalControlsDiv = null;
        paytable.HTMLPaytableComponent.prototype.closeControlsDiv = null;
        paytable.HTMLPaytableComponent.prototype.controlsLandscapeJSON = null;
        paytable.HTMLPaytableComponent.prototype.controlsPortraitJSON = null;
        paytable.HTMLPaytableComponent.prototype.controlsCloseJSON = null;
        paytable.HTMLPaytableComponent.prototype.spritesheetImg = null;
        paytable.HTMLPaytableComponent.prototype.spritesheetJson = null;
        paytable.HTMLPaytableComponent.prototype.spritesheetImgUrl = null;
        paytable.HTMLPaytableComponent.prototype.vbJson = null;
        paytable.HTMLPaytableComponent.prototype.leftBtn = null;
        paytable.HTMLPaytableComponent.prototype.closeBtn = null;
        paytable.HTMLPaytableComponent.prototype.rightBtn = null;
        paytable.HTMLPaytableComponent.prototype.pageCounterLabel = null;
        paytable.HTMLPaytableComponent.prototype.assetLibraryMap = null;
        paytable.HTMLPaytableComponent.prototype.pageCount = null;
        paytable.HTMLPaytableComponent.prototype.showDecimalValueInAwardCap = null;
        paytable.HTMLPaytableComponent.prototype.labelsWithDynamicData = null;
        paytable.HTMLPaytableComponent.prototype.currentPage = null;
        paytable.HTMLPaytableComponent.prototype.channel = null;
        paytable.HTMLPaytableComponent.prototype.presentationInitializationPayload = null;
        paytable.HTMLPaytableComponent.prototype.denomination = null;
        paytable.HTMLPaytableComponent.prototype.baseEvents = null;
        paytable.HTMLPaytableComponent.prototype.parseAssetLibraryMap = function() {
            this.assetLibraryMap = {};
            this.assetLibraryMap.background = paytable.ExternalService.loadedDefinitionConfig.HTMLPaytableLibraryNames.background;
            this.assetLibraryMap.controls_close = paytable.ExternalService.loadedDefinitionConfig.HTMLPaytableLibraryNames.controls_close;
            this.assetLibraryMap.controls_left = paytable.ExternalService.loadedDefinitionConfig.HTMLPaytableLibraryNames.controls_left;
            this.assetLibraryMap.controls_right = paytable.ExternalService.loadedDefinitionConfig.HTMLPaytableLibraryNames.controls_right;
        };
        paytable.HTMLPaytableComponent.prototype.createUIControls = function(channel) {
            switch (channel) {
                case "desktop":
                    var _this = window.document;
                    this.defaultControlsDiv = _this.createElement("div");
                    this.defaultControlsDiv.id = "paytable_controls_default";
                    var _this1 = window.document;
                    this.closeControlsDiv = _this1.createElement("div");
                    this.closeControlsDiv.id = "paytable_controls_close";
                    this.defaultControlsDiv.style.width = _hcmn_.Std.string(this.controlsPortraitJSON.w) + "px";
                    this.defaultControlsDiv.style.height = _hcmn_.Std.string(this.controlsPortraitJSON.h) + "px";
                    this.defaultControlsDiv.style.top = paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE - this.controlsPortraitJSON.h + "px";
                    this.defaultControlsDiv.style.left = (paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE - this.controlsPortraitJSON.w) / 2 + "px";
                    this.closeControlsDiv.style.width = _hcmn_.Std.string(this.controlsCloseJSON.w) + "px";
                    this.closeControlsDiv.style.height = _hcmn_.Std.string(this.controlsCloseJSON.h) + "px";
                    this.closeControlsDiv.style.top = "0px";
                    this.closeControlsDiv.style.right = "0px";
                    this.closeControlsDiv.style.position = "absolute";
                    this.closeBtn = this.createControlBtn("paytable_close_button", this.assetLibraryMap.controls_close, $bind(this, this.handleClose), this.getComponentJSONConfig(this.controlsCloseJSON, "ButtonClose"));
                    this.leftBtn = this.createControlBtn("paytable_left_button", this.assetLibraryMap.controls_left, $bind(this, this.showPrevious), this.getComponentJSONConfig(this.controlsPortraitJSON, "BtnLeft"));
                    this.rightBtn = this.createControlBtn("paytable_right_button", this.assetLibraryMap.controls_right, $bind(this, this.showNext), this.getComponentJSONConfig(this.controlsPortraitJSON, "BtnRight"));
                    this.pageCounterLabel = this.drawLabelElement(this.getComponentJSONConfig(this.controlsPortraitJSON, "pageCounter"), this.defaultControlsDiv);
                    this.closeControlsDiv.appendChild(this.closeBtn);
                    this.defaultControlsDiv.appendChild(this.leftBtn);
                    this.defaultControlsDiv.appendChild(this.rightBtn);
                    this.frame.appendChild(this.defaultControlsDiv);
                    this.frame.appendChild(this.closeControlsDiv);
                    break;
                case "mobile":
                case "tablet":
                    var _this2 = window.document;
                    this.defaultControlsDiv = _this2.createElement("div");
                    this.defaultControlsDiv.id = "paytable_controls_mobile";
                    var _this3 = window.document;
                    this.closeControlsDiv = _this3.createElement("div");
                    this.closeControlsDiv.id = "paytable_controls_close";
                    this.defaultControlsDiv.style.width = _hcmn_.Std.string(this.controlsPortraitJSON.w) + "px";
                    this.defaultControlsDiv.style.height = _hcmn_.Std.string(this.controlsPortraitJSON.h) + "px";
                    this.closeControlsDiv.style.height = _hcmn_.Std.string(this.controlsCloseJSON.h) + "px";
                    this.closeControlsDiv.style.right = _hcmn_.Std.string(this.controlsCloseJSON.w) + "px";
                    this.closeControlsDiv.style.top = paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT + "px";
                    this.closeBtn = this.createControlBtn("paytable_close_button", this.assetLibraryMap.controls_close, $bind(this, this.handleClose), this.getComponentJSONConfig(this.controlsCloseJSON, "ButtonClose"));
                    this.leftBtn = this.createControlBtn("paytable_left_button", this.assetLibraryMap.controls_left, $bind(this, this.showPrevious), this.getComponentJSONConfig(this.controlsPortraitJSON, "BtnLeft"));
                    this.rightBtn = this.createControlBtn("paytable_right_button", this.assetLibraryMap.controls_right, $bind(this, this.showNext), this.getComponentJSONConfig(this.controlsPortraitJSON, "BtnRight"));
                    this.pageCounterLabel = this.drawLabelElement(this.getComponentJSONConfig(this.controlsPortraitJSON, "pageCounter"), this.defaultControlsDiv);
                    this.closeControlsDiv.appendChild(this.closeBtn);
                    this.defaultControlsDiv.appendChild(this.leftBtn);
                    this.defaultControlsDiv.appendChild(this.rightBtn);
                    this.container.appendChild(this.defaultControlsDiv);
                    this.container.appendChild(this.closeControlsDiv);
                    break;
                default:
                    return;
            }
        };
        paytable.HTMLPaytableComponent.prototype.createControlBtn = function(btnId, spritesheetFrame, clickCallback, jsonElement) {
            var btn = this.getOffsetedImg(spritesheetFrame);
            btn.id = btnId;
            btn.onclick = clickCallback;
            btn.className = "paytable_ui_button";
            btn.style.width = _hcmn_.Std.string(jsonElement.w) + "px";
            btn.style.height = _hcmn_.Std.string(jsonElement.h) + "px";
            btn.style.position = "absolute";
            return btn;
        };
        paytable.HTMLPaytableComponent.prototype.handleClose = function(e) {
            this.baseEvents.getEvent(paytable.BaseEventsEnum.CLOSE).dispatch(null);
        };
        paytable.HTMLPaytableComponent.prototype.onResizeHandler = function() {
            var _g = this.channel;
            switch (_g) {
                case "desktop":
                    this.scaleFactor = _hcmn_.Math.min(window.innerWidth, window.innerHeight) / paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE;
                    this.frame.style.transform = "scale(" + this.scaleFactor + "," + this.scaleFactor + ")";
                    this.frame.style.left = (window.innerWidth - this.scaleFactor * paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE) / 2 + "px";
                    this.frame.style.top = (window.innerHeight - this.scaleFactor * paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE) / 2 + "px";
                    this.leftBtn.style.left = "0px";
                    this.rightBtn.style.right = "0px";
                    this.closeBtn.style.right = "0px";
                    this.pageCounterLabel.style.left = (parseFloat(this.defaultControlsDiv.style.width) - parseFloat(this.pageCounterLabel.style.width)) / 2 + "px";
                    this.pageCounterLabel.style.top = (parseFloat(this.defaultControlsDiv.style.height) - parseFloat(this.pageCounterLabel.style.height)) / 2 + "px";
                    break;
                case "mobile":
                case "tablet":
                    this.scaleFactor = _hcmn_.Math.min(window.innerWidth, window.innerHeight - paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT) / paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE;
                    this.frame.style.transform = "scale(" + this.scaleFactor + "," + this.scaleFactor + ")";
                    if (this.isPortrait()) {
                        this.frame.style.left = (window.innerWidth - this.scaleFactor * paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE) / 2 + "px";
                        this.frame.style.top = paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT + (window.innerHeight - paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT - this.scaleFactor * paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE) / 2 + "px";
                        this.defaultControlsDiv.style.width = _hcmn_.Std.string(this.controlsPortraitJSON.w) + "px";
                        this.defaultControlsDiv.style.height = _hcmn_.Std.string(this.controlsPortraitJSON.h) + "px";
                        var controlsAreaHeight = (window.innerHeight - this.scaleFactor * paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE) / 2;
                        var controlsScaleFactor = controlsAreaHeight / parseFloat(this.defaultControlsDiv.style.height);
                        if (parseFloat(this.defaultControlsDiv.style.width) > window.innerWidth) controlsScaleFactor = _hcmn_.Math.min(controlsScaleFactor, window.innerWidth / parseFloat(this.defaultControlsDiv.style.width));
                        if (controlsScaleFactor > 1) controlsScaleFactor = 1;
                        if (controlsScaleFactor < paytable.HTMLPaytableComponent.MINIMUM_UI_SCALE) controlsScaleFactor = paytable.HTMLPaytableComponent.MINIMUM_UI_SCALE;
                        this.defaultControlsDiv.style.top = window.innerHeight - parseFloat(this.defaultControlsDiv.style.height) + "px";
                        this.defaultControlsDiv.style.left = (window.innerWidth - parseFloat(this.defaultControlsDiv.style.width)) / 2 + "px";
                        this.defaultControlsDiv.style.transform = "scale(" + controlsScaleFactor + "," + controlsScaleFactor + ")";
                        this.defaultControlsDiv.style.transformOrigin = "bottom center";
                        this.defaultControlsDiv.style.position = "absolute";
                        this.closeBtn.style.transform = "scale(" + controlsScaleFactor + "," + controlsScaleFactor + ")";
                        this.closeBtn.style.transformOrigin = "top right";
                        this.leftBtn.style.left = "0px";
                        this.leftBtn.style.removeProperty("right");
                        this.leftBtn.style.removeProperty("transform");
                        this.rightBtn.style.right = "0px";
                        this.rightBtn.style.removeProperty("left");
                        this.rightBtn.style.removeProperty("transform");
                    } else {
                        this.frame.style.left = (window.innerWidth - this.scaleFactor * paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE) / 2 + "px";
                        this.frame.style.top = paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT + "px";
                        this.defaultControlsDiv.style.width = _hcmn_.Std.string(this.controlsLandscapeJSON.w) + "px";
                        this.defaultControlsDiv.style.height = _hcmn_.Std.string(this.controlsLandscapeJSON.h) + "px";
                        var controlsAreaWidth = (window.innerWidth - this.scaleFactor * paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE) / 2;
                        var controlsScaleFactor1 = controlsAreaWidth / parseFloat(this.defaultControlsDiv.style.width);
                        if (parseFloat(this.defaultControlsDiv.style.height) + parseFloat(this.closeControlsDiv.style.height) + paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT > window.innerHeight) controlsScaleFactor1 = _hcmn_.Math.min(controlsScaleFactor1, (window.innerHeight - paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT) / (parseFloat(this.defaultControlsDiv.style.height) + parseFloat(this.closeControlsDiv.style.height) + paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT));
                        if (controlsScaleFactor1 > 1) controlsScaleFactor1 = 1;
                        if (controlsScaleFactor1 < paytable.HTMLPaytableComponent.MINIMUM_UI_SCALE) controlsScaleFactor1 = paytable.HTMLPaytableComponent.MINIMUM_UI_SCALE;
                        this.defaultControlsDiv.style.top = window.innerHeight - parseFloat(this.defaultControlsDiv.style.height) + "px";
                        this.defaultControlsDiv.style.left = window.innerWidth - parseFloat(this.defaultControlsDiv.style.width) + "px";
                        this.defaultControlsDiv.style.transform = "scale(" + controlsScaleFactor1 + "," + controlsScaleFactor1 + ")";
                        this.defaultControlsDiv.style.transformOrigin = "bottom right";
                        this.defaultControlsDiv.style.position = "absolute";
                        this.closeBtn.style.transform = "scale(" + controlsScaleFactor1 + "," + controlsScaleFactor1 + ")";
                        this.closeBtn.style.transformOrigin = "top right";
                        this.leftBtn.style.bottom = "0px";
                        this.rightBtn.style.top = "0px";
                        this.leftBtn.style.transformOrigin = "center center";
                        this.leftBtn.style.transform = "rotate(-90deg)";
                        this.rightBtn.style.transformOrigin = "center center";
                        this.rightBtn.style.transform = "rotate(-90deg)";
                        this.leftBtn.style.left = (parseFloat(this.defaultControlsDiv.style.width) - parseFloat(this.leftBtn.style.width)) / 2 + "px";
                        this.leftBtn.style.removeProperty("right");
                        this.rightBtn.style.left = (parseFloat(this.defaultControlsDiv.style.width) - parseFloat(this.rightBtn.style.width)) / 2 + "px";
                        this.rightBtn.style.removeProperty("right");
                    }
                    this.pageCounterLabel.style.left = (parseFloat(this.defaultControlsDiv.style.width) - parseFloat(this.pageCounterLabel.style.width)) / 2 + "px";
                    this.pageCounterLabel.style.top = (parseFloat(this.defaultControlsDiv.style.height) - parseFloat(this.pageCounterLabel.style.height)) / 2 + "px";
                    break;
                default:
                    return;
            }
        };
        paytable.HTMLPaytableComponent.prototype.createPage = function(pageId) {
            var componentsArray = this.vbJson.components[0].components;
            var contentHolderCfg = null;
            var pageContent = null;
            var _g = 0;
            while (_g < componentsArray.length) {
                var c = componentsArray[_g];
                ++_g;
                if (c.id == "Content") {
                    contentHolderCfg = c;
                    break;
                }
            }
            var contentArray = contentHolderCfg.components;
            var _g1 = 0;
            while (_g1 < contentArray.length) {
                var p = contentArray[_g1];
                ++_g1;
                if (p.id == pageId) {
                    pageContent = p.components;
                    break;
                }
            }
            var pageDiv;
            var _this = window.document;
            pageDiv = _this.createElement("div");
            pageDiv.id = pageId;
            pageDiv.style.visibility = "hidden";
            this.pages.set(pageId, pageDiv);
            this.content.appendChild(pageDiv);
            var _g2 = 0;
            while (_g2 < pageContent.length) {
                var element = pageContent[_g2];
                ++_g2;
                var _g11 = element.t;
                switch (_g11) {
                    case "bitmap":
                        this.drawBitmapElement(element, this.pages.get(pageId), pageId);
                        break;
                    case "label":
                        this.drawLabelElement(element, this.pages.get(pageId), pageId);
                        break;
                    default:
                }
            }
        };
        paytable.HTMLPaytableComponent.prototype.drawLabelElement = function(element, parentDom, pageId) {
            var label;
            var _this = window.document;
            label = _this.createElement("span");
            label.id = element.id;
            label.style.position = "absolute";
            label.style.top = _hcmn_.Std.string(element.y) + "px";
            label.style.left = _hcmn_.Std.string(element.x) + "px";
            label.style.width = _hcmn_.Std.string(element.w) + "px";
            label.style.height = _hcmn_.Std.string(element.h) + "px";
            var style = paytable.ExternalService.translationManager.styleLookup(label.id);
            if (style.fontFamily != null) label.style.fontFamily = style.fontFamily;
            else label.style.fontFamily = label.style.fontFamily;
            if (style.color != null) label.style.color = style.color;
            else label.style.color = label.style.color;
            if (style.fontColor != null) label.style.color = style.fontColor;
            else label.style.color = label.style.color;
            if (style.fontSize != null) label.style.fontSize = _hcmn_.Std.parseInt(style.fontSize) + "px";
            else label.style.fontSize = label.style.fontSize;
            if (style.fontWeight != null) label.style.fontWeight = style.fontWeight;
            else label.style.fontWeight = label.style.fontWeight;
            if (style.fontStyle != null) label.style.fontStyle = style.fontStyle;
            else label.style.fontStyle = "";
            if (style.align != null) label.style.textAlign = style.align;
            else label.style.textAlign = label.style.textAlign;
            if (style.width != null) label.style.width = _hcmn_.Std.string(style.width) + "px";
            if (style.height != null) label.style.height = _hcmn_.Std.string(style.height) + "px";
            if (style.lineHeight != null) label.style.lineHeight = _hcmn_.Std.string(style.lineHeight) + "px";
            else label.style.lineHeight = "";
            if (style.kerning != null) label.style.letterSpacing = _hcmn_.Std.string(style.kerning) + "px";
            else label.style.letterSpacing = "";
            if (style.top != null) label.style.marginTop = _hcmn_.Std.string(style.top) + "px";
            else label.style.marginTop = "";
            if (style.left != null) label.style.marginLeft = _hcmn_.Std.string(style.left) + "px";
            else label.style.marginLeft = "";
            if (style.textfillDef != null) {
                label.style.background = this.extractGradientString(style.textfillDef);
                label.className = "gradient_text";
                if (style.textfillDef.stroke != null) label.style.setProperty("-webkit-text-stroke", _hcmn_.Std.string(style.textfillDef.stroke.weight) + "px " + _hcmn_.Std.string(style.textfillDef.stroke.color));
            }
            parentDom.appendChild(label);
            this.setLabelText(label, paytable.ExternalService.translationManager.stringLookup(label.id));
            this.correctObjectOffsetsAndDimenson(label, label.id, pageId);
            return label;
        };
        paytable.HTMLPaytableComponent.prototype.setLabelText = function(label, text) {
            var fontSize = parseFloat(label.style.fontSize);
            label.innerText = text;
            while (this.isOverflown(label)) {
                fontSize -= 0.5;
                label.style.fontSize = fontSize + "px";
                if (fontSize < 3) break;
            }
        };
        paytable.HTMLPaytableComponent.prototype.drawBitmapElement = function(element, parentDom, pageId) {
            if (element.ln == this.assetLibraryMap.background) return;
            var imgProps = this.getFrameRect(element.ln);
            var img = this.getOffsetedImg(element.ln);
            var scaleX = 1;
            var scaleY = 1;
            var finalW = element.w;
            var finalH = element.h;
            if (element.sX != null) scaleX = element.sX;
            if (element.sY != null) scaleY = element.sY;
            if (scaleX != 1 || scaleY != 1) {
                img.style.transformOrigin = "top left";
                img.style.transform = "scale(" + scaleX + "," + scaleY + ")";
                finalW /= scaleX;
                finalH /= scaleY;
            }
            if (element.r != null && element.r != 0) {
                img.style.transformOrigin = "top left";
                var oldTrans = img.style.transform;
                img.style.transform = "rotate(" + _hcmn_.Math.round(element.r) + "deg) " + oldTrans;
                if (_hcmn_.Math.abs(_hcmn_.Math.round(element.r)) == 90) {
                    finalH = element.w / scaleY;
                    finalW = element.h / scaleX;
                }
            }
            var updatePoint = this.correctImageOffsets(img.id, pageId);
            if (updatePoint != null) {
                if (updatePoint.x != null) img.style.top = _hcmn_.Std.string(updatePoint.y) + "px";
                if (updatePoint.y != null) img.style.left = _hcmn_.Std.string(updatePoint.x) + "px";
            } else {
                img.style.top = _hcmn_.Std.string(element.y) + "px";
                img.style.left = _hcmn_.Std.string(element.x) + "px";
            }
            img.style.width = finalW + "px";
            img.style.height = finalH + "px";
            parentDom.appendChild(img);
        };
        paytable.HTMLPaytableComponent.prototype.hide = function() {
            this.container.style.visibility = "hidden";
            this.pages.get("page_" + this.currentPage).style.visibility = "hidden";
        };
        paytable.HTMLPaytableComponent.prototype.show = function() {
            this.container.style.visibility = "visible";
            this.currentPage = 0;
            this.showPage(this.currentPage);
        };
        paytable.HTMLPaytableComponent.prototype.showNext = function() {
            this.pages.get("page_" + this.currentPage).style.visibility = "hidden";
            this.currentPage++;
            if (this.currentPage >= this.pageCount) this.currentPage = 0;
            this.showPage(this.currentPage);
        };
        paytable.HTMLPaytableComponent.prototype.showPrevious = function() {
            this.pages.get("page_" + this.currentPage).style.visibility = "hidden";
            this.currentPage--;
            if (this.currentPage < 0) this.currentPage = this.pageCount - 1;
            this.showPage(this.currentPage);
        };
        paytable.HTMLPaytableComponent.prototype.changeLabelContent = function(pageId, labelId, text, style) {};
        paytable.HTMLPaytableComponent.prototype.showPage = function(num) {
            this.pages.get("page_" + this.currentPage).style.visibility = "hidden";
            this.pages.get("page_" + num).style.visibility = "visible";
            this.pageCounterLabel.innerText = _hcmn_.Std.string(this.currentPage + 1) + "/" + this.pageCount;
            this.baseEvents.getEvent(paytable.BaseEventsEnum.CURRENT_PAGE).dispatch(this.currentPage);
        };
        paytable.HTMLPaytableComponent.prototype.setConfig = function(cfg, stage, fullScreenCanvas) {
            if (fullScreenCanvas == null) fullScreenCanvas = false;
        };
        paytable.HTMLPaytableComponent.prototype.initializeContent = function(presentationInitializationPayload, newPage) {
            if (presentationInitializationPayload == null) return;
            this.presentationInitializationPayload = presentationInitializationPayload;
            var awardCap = this.presentationInitializationPayload.riskControlSettings.awardCap;
            var outcomes = this.presentationInitializationPayload.slotDefinition.outcomes;
            var jackpotSeed = "";
            var jackpotRTP = "";
            var jackpotFeed = "";
            var softwareId = "";
            var currency = "";
            var rtp = this.presentationInitializationPayload.slotDefinition.rtp;
            var progressiveMinTotalBet = "";
            if (this.presentationInitializationPayload.defaultStake.outcome.customField != null) {
                if (this.presentationInitializationPayload.defaultStake.outcome.customField.progressiveMinTotalBet != null) {
                    this.denomination = this.presentationInitializationPayload.riskControlSettings.denomination;
                    var jpValue = this.presentationInitializationPayload.defaultStake.outcome.customField.progressiveMinTotalBet;
                    var denValue = new money.Money(this.denomination).mul(new money.Money(jpValue)).value;
                    progressiveMinTotalBet = paytable.ExternalService.moneyFormatter.format(denValue);
                }
                if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData != null) {
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.rtp != null) jackpotRTP = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.rtp;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.feed != null) jackpotFeed = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.feed;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.softwareId != null) softwareId = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.softwareId;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.currency != null) currency = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.currency;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.seed != null && softwareId != "") {
                        var type;
                        if (softwareId.split("-").length == 3) type = softwareId.split("-")[2];
                        else type = null;
                        if (type == "001" && currency != "") {
                            var jpSeed = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.seed;
                            jackpotSeed = currency + jpSeed;
                        } else {
                            var jpSeed1 = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.seed;
                            jackpotSeed = paytable.ExternalService.moneyFormatter.format(jpSeed1, true, false);
                        }
                    }
                }
            }
            var minRTP;
            var maxRTP;
            if (rtp.singleRTP != null && rtp.singleRTP == true) {
                if (rtp.minSingleRTP == null) throw new Error("minSingleRTP must exist if singleRTP==true");
                minRTP = rtp.minSingleRTP;
                if (paytable.ExternalService.loadedDefinitionConfig.singleRTP != null) {
                    if (paytable.ExternalService.loadedDefinitionConfig.singleRTP == false) minRTP = rtp.minRTP;
                    else minRTP = rtp.minSingleRTP;
                }
                if (rtp.maxSingleRTP == null) throw new Error("maxSingleRTP must exist if singleRTP==true");
                maxRTP = rtp.maxSingleRTP;
                if (paytable.ExternalService.loadedDefinitionConfig.singleRTP != null) {
                    if (paytable.ExternalService.loadedDefinitionConfig.singleRTP == false) maxRTP = rtp.maxRTP;
                    else maxRTP = rtp.maxSingleRTP;
                }
            } else {
                minRTP = rtp.minRTP;
                maxRTP = rtp.maxRTP;
            }
            var decimalSeparator = paytable.ExternalService.translationManager.stringLookup("rtpDecimalSeparator");
            if (decimalSeparator != null && decimalSeparator != "rtpDecimalSeparator") {
                minRTP = _hcmn_.StringTools.replace(minRTP, ".", decimalSeparator);
                maxRTP = _hcmn_.StringTools.replace(maxRTP, ".", decimalSeparator);
            }
            var $it0 = this.pages.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                var page = this.pages.get(key);
                this.setupPageContent(key, page, outcomes, awardCap, minRTP, maxRTP, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed);
            }
            haxe.Log.trace("[PAYTABLE] presentationInitializationPayload ", {
                fileName: "HTMLPaytableComponent.hx",
                lineNumber: 708,
                className: "paytable.component.components.HTMLPaytableComponent",
                methodName: "initializeContent",
                customParams: [presentationInitializationPayload]
            });
        };
        paytable.HTMLPaytableComponent.prototype.setupPageContent = function(id, page, outcomes, awardCap, minRTP, maxRTP, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed) {
            var rtpLabel = window.document.getElementById("PaytableContent_7_0");
            if (rtpLabel != null) {
                var formattedAwardCap = paytable.ExternalService.moneyFormatter.format(awardCap, true, this.showDecimalValueInAwardCap);
                var newLabelContent = "";
                if (minRTP == maxRTP) newLabelContent = paytable.ExternalService.translationManager.stringLookup("PaytableContent_7_0_singleRTP", [minRTP, formattedAwardCap, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed]);
                if (minRTP != maxRTP || newLabelContent == "PaytableContent_7_0_singleRTP") newLabelContent = paytable.ExternalService.translationManager.stringLookup("PaytableContent_7_0", [minRTP, maxRTP, formattedAwardCap, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed]);
                newLabelContent = this.moneyFormatFillin(newLabelContent);
                this.setLabelText(rtpLabel, newLabelContent);
            }
            var proMinTotalBetLabel = window.document.getElementById("progressiveMinTotalBetLabel");
            if (proMinTotalBetLabel != null) {
                var newTotalBetContent = paytable.ExternalService.translationManager.stringLookup("progressiveMinTotalBetLabel", [progressiveMinTotalBet]);
                newTotalBetContent = this.moneyFormatFillin(newTotalBetContent);
                this.setLabelText(proMinTotalBetLabel, newTotalBetContent);
            }
            var $it0 = outcomes.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                var labelId = "PaytableValues_" + key;
                var outcomeKeyLabel = window.document.getElementById(labelId);
                if (outcomeKeyLabel != null) this.setLabelText(proMinTotalBetLabel, _hcmn_.__map_reserved[key] != null ? outcomes.getReserved(key) : outcomes.h[key]);
            }
            this.bindDynamicData(id, progressiveMinTotalBet, jackpotSeed);
        };
        paytable.HTMLPaytableComponent.prototype.moneyFormatFillin = function(msg) {
            var ereg = new _hcmn_.EReg("({MONEY=)(.+?)(}|\n|$)", "g");
            if (!ereg.match(msg)) return msg;
            while (ereg.match(msg)) {
                var replacementString = ereg.matched(1) + ereg.matched(2) + "}";
                var moneyValue = new money.Money(ereg.matched(2)).mul(new money.Money(this.denomination));
                msg = _hcmn_.StringTools.replace(msg, replacementString, paytable.ExternalService.moneyFormatter.format(moneyValue.value));
            }
            return msg;
        };
        paytable.HTMLPaytableComponent.prototype.isFullScreenMobile = function() {
            return true;
        };
        paytable.HTMLPaytableComponent.prototype.isOpen = function() {
            return this.container.style.visibility == "visible";
        };
        paytable.HTMLPaytableComponent.prototype.isOverflown = function(element) {
            return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
        };
        paytable.HTMLPaytableComponent.prototype.isPortrait = function() {
            return window.innerWidth < window.innerHeight;
        };
        paytable.HTMLPaytableComponent.prototype.extractGradientString = function(textfillDef) {
            if (textfillDef.gradient == null) return null;
            var gradNode = textfillDef.gradient;
            var gradientString = "linear-gradient(" + _hcmn_.Std.string(gradNode.rotation + 270) + "deg";
            var stops = gradNode.stops;
            stops.sort(function(stopA, stopB) {
                if (stopA.pos <= stopB.pos) return -1;
                else return 1;
            });
            var _g = 0;
            while (_g < stops.length) {
                var stop = stops[_g];
                ++_g;
                gradientString += ", " + _hcmn_.Std.string(stop.color) + " " + stop.pos * 100 + "%";
            }
            gradientString += ")";
            return gradientString;
        };
        paytable.HTMLPaytableComponent.prototype.getComponentJSONConfig = function(parentJson, componentId) {
            var components = parentJson.components;
            var _g = 0;
            while (_g < components.length) {
                var c = components[_g];
                ++_g;
                if (c.id == componentId) return c;
            }
            return null;
        };
        paytable.HTMLPaytableComponent.prototype.getBase64Img = function(frameName) {
            var frameRect = this.getFrameRect(frameName);
            var canvas;
            var _this = window.document;
            canvas = _this.createElement("canvas");
            canvas.width = _hcmn_.Math.floor(frameRect.w);
            canvas.height = _hcmn_.Math.floor(frameRect.h);
            var ctx = canvas.getContext("2d", null);
            ctx.drawImage(this.spritesheetImg, frameRect.x, frameRect.y, frameRect.w, frameRect.h, 0, 0, frameRect.w, frameRect.h);
            var str = canvas.toDataURL();
            ctx = null;
            canvas = null;
            return str;
        };
        paytable.HTMLPaytableComponent.prototype.getOffsetedImg = function(frameName) {
            var frameRect = this.getFrameRect(frameName);
            var div;
            var _this = window.document;
            div = _this.createElement("div");
            div.id = frameName;
            div.style.position = "absolute";
            div.style.background = "url(" + this.spritesheetImgUrl + ")";
            div.style.backgroundPosition = this.spritesheetImg.width - frameRect.x + "px " + (this.spritesheetImg.height - frameRect.y) + "px";
            div.style.display = "block";
            return div;
        };
        paytable.HTMLPaytableComponent.prototype.getFrameRect = function(frameName) {
            var frameProps = _hcmn_.Reflect.field(this.spritesheetJson, frameName);
            if (frameProps == null) {
                throw new Error("Sprite with id:" + frameName + " not found in spritesheet JSON");
                return new displayEngineApi.Rectangle(0, 0, 0, 0);
            }
            var rectProps = _hcmn_.Reflect.field(frameProps.frames, "0").rect;
            return new displayEngineApi.Rectangle(rectProps.x, rectProps.y, rectProps.w, rectProps.h);
        };
        paytable.HTMLPaytableComponent.prototype.bindDynamicData = function(id, progressiveValue, jackpotSeed) {
            var idx = id.split("_");
            var page = _hcmn_.Std.parseInt(idx[1]);
            if (page >= 0 && ((this.labelsWithDynamicData instanceof Array) && this.labelsWithDynamicData.__enum__ == null) && ((this.labelsWithDynamicData[page] instanceof Array) && this.labelsWithDynamicData[page].__enum__ == null) && this.labelsWithDynamicData[page].length > 0) {
                var _g1 = 0;
                var _g = this.labelsWithDynamicData[page].length;
                while (_g1 < _g) {
                    var i = _g1++;
                    var label = this.labelsWithDynamicData[page][i];
                    var span = window.document.getElementById(label);
                    if (span != null) {
                        var newLabelText = paytable.ExternalService.translationManager.stringLookup(label, [progressiveValue, jackpotSeed]);
                        this.setLabelText(span, newLabelText);
                    }
                }
            }
        };
        paytable.HTMLPaytableComponent.prototype.correctObjectOffsetsAndDimenson = function(object, objectId, pageId) {
            if (pageId == null) return;
            var pageIdx = pageId.split("_");
            var page = _hcmn_.Std.parseInt(pageIdx[1]);
            var dims = null;
            var offsets = paytable.ExternalService.loadedDefinitionConfig.offsets;
            if (offsets != null) {
                var langPages = _hcmn_.Reflect.field(offsets, paytable.ExternalService.getLanguage());
                if (langPages != null && ((langPages instanceof Array) && langPages.__enum__ == null) && langPages[page] != null) {
                    dims = _hcmn_.Reflect.field(langPages[page], objectId);
                    if (dims != null) {
                        if (dims.x) object.style.left = _hcmn_.Std.string(dims.x) + "px";
                        if (dims.y) object.style.top = _hcmn_.Std.string(dims.y) + "px";
                        if (dims.w) object.style.width = _hcmn_.Std.string(dims.w) + "px";
                        if (dims.h) object.style.height = _hcmn_.Std.string(dims.h) + "px";
                    }
                }
            }
        };
        paytable.HTMLPaytableComponent.prototype.correctImageOffsets = function(imgId, pageId) {
            var pageIdx = pageId.split("_");
            var page = _hcmn_.Std.parseInt(pageIdx[1]);
            var point = null;
            if (paytable.ExternalService.loadedDefinitionConfig.offsets != null) {
                var offsets = paytable.ExternalService.loadedDefinitionConfig.offsets;
                var _g = 0;
                var _g1 = _hcmn_.Reflect.fields(offsets);
                while (_g < _g1.length) {
                    var lang = _g1[_g];
                    ++_g;
                    if (lang == paytable.ExternalService.getLanguage()) {
                        var imagesOffsets = _hcmn_.Reflect.field(paytable.ExternalService.loadedDefinitionConfig.offsets, lang);
                        if (page >= 0 && ((imagesOffsets instanceof Array) && imagesOffsets.__enum__ == null) && imagesOffsets.length > 0) {
                            if (_hcmn_.Reflect.fields(imagesOffsets[page]).length != 0) {
                                var _g2 = 0;
                                var _g3 = _hcmn_.Reflect.fields(imagesOffsets[page]);
                                while (_g2 < _g3.length) {
                                    var bitmapId = _g3[_g2];
                                    ++_g2;
                                    if (bitmapId == imgId) point = _hcmn_.Reflect.field(imagesOffsets[page], bitmapId);
                                }
                            }
                        }
                    }
                }
            }
            return point;
        };
        paytable.HTMLPaytableComponent.prototype.__class__ = paytable.HTMLPaytableComponent;
        paytable.HelpComponent = function(url, id, closeCallback) {
            this.id = id;
            this.closeCallback = closeCallback;
            var _this = window.document;
            this.iframe = _this.createElement("iframe");
            this.iframe.marginHeight = "0";
            this.iframe.marginWidth = "0";
            this.iframe.src = url;
            this.iframe.frameBorder = "0";
            this.iframe.setAttribute("style", "width:100%; height:100%; background:white; position:absolute;");
            this.iframe.height = window.document.body.scrollHeight + "px";
            var _this1 = window.document;
            this.divWrapper = _this1.createElement("div");
            this.setDivWrapperStyle();
            this.divWrapper.appendChild(this.iframe);
            this.divWrapper.id = "rulesInstance";
            this.node = window.document.body.appendChild(this.divWrapper);
            window.addEventListener("resize", $bind(this, this.onResize));
            this.iframe.addEventListener("load", $bind(this, this.onLoad));
        };
        paytable.HelpComponent.__name__ = ["paytable", "HelpComponent"];
        paytable.HelpComponent.prototype.iframe = null;
        paytable.HelpComponent.prototype.node = null;
        paytable.HelpComponent.prototype.id = null;
        paytable.HelpComponent.prototype.closeCallback = null;
        paytable.HelpComponent.prototype.divWrapper = null;
        paytable.HelpComponent.prototype.onLoad = function(e) {
            this.iframe.height = this.iframe.contentWindow.document.body.scrollHeight + "px";
            this.setDivWrapperStyle();
        };
        paytable.HelpComponent.prototype.setDivWrapperStyle = function() {
            this.divWrapper.setAttribute("style", "overflow-x: hidden; overflow-y: auto; width:100%; height:100%; position: absolute; z-index: 99999; background:white; top:0px");
            this.divWrapper.style.setProperty("-webkit-overflow-scrolling", "touch");
            this.divWrapper.style.setProperty("-webkit-user-select", "none");
            this.divWrapper.style.setProperty("-webkit-text-size-adjust", "none");
        };
        paytable.HelpComponent.prototype.onResize = function() {
            this.setDivWrapperStyle();
            _hcmn_.haxe_Timer.delay($bind(this, this.updateIFrame), 0);
        };
        paytable.HelpComponent.prototype.updateIFrame = function() {
            if (this.iframe == null || this.iframe.contentWindow == null || this.iframe.contentWindow.document == null) {
                window.removeEventListener("resize", $bind(this, this.onResize));
                this.iframe.removeEventListener("load", $bind(this, this.onLoad));
                this.divWrapper = null;
                this.iframe = null;
                return;
            }
            this.iframe.height = this.iframe.contentWindow.document.body.scrollHeight + "px";
        };
        paytable.HelpComponent.prototype.closeListener = function(event) {
            if ("rules:close" + this.id == event.data) {
                window.document.removeEventListener("message", $bind(this, this.closeListener));
                this.close();
            }
        };
        paytable.HelpComponent.prototype.close = function() {
            if (this.node == null) return;
            if (this.node.parentNode != null) this.node.parentNode.removeChild(this.node);
            this.node = null;
            if (this.closeCallback != null) {
                haxe.Log.trace("[PAYTABLE][defaultHelpPage] closeCallback called", {
                    fileName: "HelpComponent.hx",
                    lineNumber: 110,
                    className: "paytable.component.components.HelpComponent",
                    methodName: "close"
                });
                this.closeCallback();
            }
        };
        paytable.HelpComponent.prototype.__class__ = paytable.HelpComponent;
        paytable.PaytableComponent = function(container, baseEvents) {
            this.width_defValue = 100;
            this.height_defValue = 100;
            this.direction = "default";
            this.consoleOffset = 60;
            this.presentationInitializationPayload = null;
            this.textFormated = false;
            this.fullScreenCanvas = true;
            this.showDecimalValueInAwardCap = true;
            this.totalPages = 0;
            this.currentPage = 0;
            this.MAX_SCALE_FACTOR = 1.0;
            this.MIN_SCALE_FACTOR = 0.5;
            this.container = container;
            this.baseEvents = baseEvents;
            container.hide();
            this.content = container.getContainerById("Content");
            this.createdPages = new _hcmn_.haxe_ds_StringMap();
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.content.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                var page = this.content.getContainerById(key);
                page.hide();
                this.createdPages.set(key, page);
            }
            if (paytable.ExternalService.loadedDefinitionConfig.totalPages != null) {
                this.totalPages = _hcmn_.Std["int"](paytable.ExternalService.loadedDefinitionConfig.totalPages) - 1;
                var bus = paytable.ExternalService.eventBus;
                bus.getChannel("GFBus").publish("testable:testcomponent:totalPages", this.totalPages);
            }
            if (paytable.ExternalService.loadedDefinitionConfig.showDecimalValueInAwardCap != null) this.showDecimalValueInAwardCap = paytable.ExternalService.loadedDefinitionConfig.showDecimalValueInAwardCap;
        };
        paytable.PaytableComponent = ck_implements(paytable.PaytableComponent, paytable.IPaytableComponent);
        paytable.PaytableComponent.__interfaces__ = [paytable.IPaytableComponent];
        paytable.PaytableComponent.__name__ = ["paytable", "PaytableComponent"];
        paytable.PaytableComponent.prototype.container = null;
        paytable.PaytableComponent.prototype.MIN_SCALE_FACTOR = null;
        paytable.PaytableComponent.prototype.MAX_SCALE_FACTOR = null;
        paytable.PaytableComponent.prototype.baseEvents = null;
        paytable.PaytableComponent.prototype.currentPage = null;
        paytable.PaytableComponent.prototype.totalPages = null;
        paytable.PaytableComponent.prototype.showDecimalValueInAwardCap = null;
        paytable.PaytableComponent.prototype.config = null;
        paytable.PaytableComponent.prototype.defStage = null;
        paytable.PaytableComponent.prototype.fullScreenCanvas = null;
        paytable.PaytableComponent.prototype.textFormated = null;
        paytable.PaytableComponent.prototype.createdPages = null;
        paytable.PaytableComponent.prototype.presentationInitializationPayload = null;
        paytable.PaytableComponent.prototype.consoleOffset = null;
        paytable.PaytableComponent.prototype.content = null;
        paytable.PaytableComponent.prototype.direction = null;
        paytable.PaytableComponent.prototype.denomination = null;
        paytable.PaytableComponent.prototype.height_defValue = null;
        paytable.PaytableComponent.prototype.width_defValue = null;
        paytable.PaytableComponent.prototype.showNext = function() {
            if (this.currentPage < this.totalPages) this.currentPage++;
            else this.currentPage = 0;
            this.showPage(this.currentPage);
        };
        paytable.PaytableComponent.prototype.showPrevious = function() {
            if (this.currentPage > 0) this.currentPage--;
            else this.currentPage = this.totalPages;
            this.showPage(this.currentPage);
        };
        paytable.PaytableComponent.prototype.changeLabelContent = function(pageId, labelId, text, style) {
            this.createNewPage(pageId);
            var page = this.createdPages.get(pageId);
            if ((function($this) {
                    var $r;
                    var this1 = page.getChildComponents();
                    $r = this1.exists(labelId);
                    return $r;
                }(this))) {
                var lbl = page.getLabelById(labelId);
                lbl.setText(text);
                lbl.updateTo(labelId, style);
            }
        };
        paytable.PaytableComponent.prototype.showPage = function(currentPage) {
            this.currentPage = currentPage;
            this.baseEvents.getEvent(paytable.BaseEventsEnum.CURRENT_PAGE).dispatch(currentPage);
            this.updatePagesBuffer(currentPage, this.totalPages);
            var page = this.createdPages.get("page_" + currentPage);
            if (this.container.getComponentById("pageCounter") != null) {
                var pageCounter = this.container.getLabelById("pageCounter");
                pageCounter.setText(_hcmn_.Std.string(currentPage + 1) + "/" + (this.totalPages + 1));
            }
            if (this.container.getComponentById("ControlsPortrait") != null) {
                var controls = this.container.getContainerById("ControlsPortrait");
                var pageCounter1 = controls.getLabelById("pageCounter");
                pageCounter1.setText(_hcmn_.Std.string(currentPage + 1) + "/" + (this.totalPages + 1));
            }
            if (this.container.getComponentById("ControlsLandscape") != null) {
                var controls1 = this.container.getContainerById("ControlsLandscape");
                var pageCounter2 = controls1.getLabelById("pageCounter");
                pageCounter2.setText(_hcmn_.Std.string(currentPage + 1) + "/" + (this.totalPages + 1));
            }
            var $it0 = this.createdPages.iterator();
            while ($it0.hasNext()) {
                var p = $it0.next();
                p.hide();
            }
            page.show();
        };
        paytable.PaytableComponent.prototype.updateOffsets = function(page) {
            if (paytable.ExternalService.loadedDefinitionConfig.offsets != null) {
                var offsets = paytable.ExternalService.loadedDefinitionConfig.offsets;
                var _g = 0;
                var _g1 = _hcmn_.Reflect.fields(offsets);
                while (_g < _g1.length) {
                    var lang = _g1[_g];
                    ++_g;
                    if (lang == paytable.ExternalService.getLanguage()) {
                        var elements = _hcmn_.Reflect.field(paytable.ExternalService.loadedDefinitionConfig.offsets, lang);
                        var _g2 = 0;
                        var _g3 = _hcmn_.Reflect.fields(elements);
                        while (_g2 < _g3.length) {
                            var displayObjectId = _g3[_g2];
                            ++_g2;
                            var point = _hcmn_.Reflect.field(elements, displayObjectId);
                            if ((function($this) {
                                    var $r;
                                    var this1 = page.getChildComponents();
                                    $r = this1.exists(displayObjectId);
                                    return $r;
                                }(this))) {
                                var x = _hcmn_.Std["int"](((function($this) {
                                    var $r;
                                    var this2 = page.getChildComponents();
                                    $r = this2.get(displayObjectId);
                                    return $r;
                                }(this))).getDisplayObject().getX());
                                var y = _hcmn_.Std["int"](((function($this) {
                                    var $r;
                                    var this3 = page.getChildComponents();
                                    $r = this3.get(displayObjectId);
                                    return $r;
                                }(this))).getDisplayObject().getY());
                                var offsetX = point.x;
                                var offsetY = point.y;
                                ((function($this) {
                                    var $r;
                                    var this4 = page.getChildComponents();
                                    $r = this4.get(displayObjectId);
                                    return $r;
                                }(this))).setX(x + offsetX);
                                ((function($this) {
                                    var $r;
                                    var this5 = page.getChildComponents();
                                    $r = this5.get(displayObjectId);
                                    return $r;
                                }(this))).setY(y + offsetY);
                            }
                        }
                    }
                }
            }
        };
        paytable.PaytableComponent.prototype.handleClose = function(e) {
            this.baseEvents.getEvent(paytable.BaseEventsEnum.CLOSE).dispatch(null);
        };
        paytable.PaytableComponent.prototype.handleLeft = function(e) {
            this.showPrevious();
        };
        paytable.PaytableComponent.prototype.handleRight = function(e) {
            this.showNext();
        };
        paytable.PaytableComponent.prototype.setConfig = function(cfg, stage, fullScreenCanvas) {
            if (fullScreenCanvas == null) fullScreenCanvas = true;
            var _g = this;
            this.fullScreenCanvas = fullScreenCanvas;
            this.config = cfg;
            this.defStage = stage;
            _hcmn_.haxe_Timer.delay(function() {
                _g.updateLayout();
            }, 0);
        };
        paytable.PaytableComponent.prototype.updateLayout = function() {
            haxe.Log.trace("[pt] IOS paytable comp updateLayout", {
                fileName: "PaytableComponent.hx",
                lineNumber: 198,
                className: "paytable.component.components.PaytableComponent",
                methodName: "updateLayout"
            });
            var contentContainer = this.container.getContainerById("Content");
            if (this.config != null) {
                this.updatePagesBuffer(this.currentPage, this.totalPages);
                var stageH = this.defStage.getHeight();
                var stageW = this.defStage.getWidth();
                if (this.fullScreenCanvas) this.setForFullScreen();
                if (this.container.getComponentById("MainBg") != null) {
                    var bg = this.container.getComponentById("MainBg").getDisplayObject();
                    bg.setWidth(stageW);
                    bg.setHeight(stageH);
                    this.container.getComponentById("MainBg").disable();
                }
                if (this.config.dir != null) {
                    var $it0 = this.createdPages.iterator();
                    while ($it0.hasNext()) {
                        var p = $it0.next();
                        this.setLayout(p, this.config.dir);
                    }
                }
            }
        };
        paytable.PaytableComponent.prototype.updatePagesBuffer = function(currentPage, totalPages) {
            var prevPage;
            if (currentPage == 0) prevPage = totalPages;
            else prevPage = currentPage - 1;
            var nextPage;
            if (currentPage == totalPages) nextPage = 0;
            else nextPage = currentPage + 1;
            this.createNewPage("page_" + currentPage);
            this.createNewPage("page_" + prevPage);
            this.createNewPage("page_" + nextPage);
        };
        paytable.PaytableComponent.prototype.createNewPage = function(pageId) {
            if (!this.createdPages.exists(pageId)) {
                var newPage = this.content.createContainerFromStoredConfig(pageId);
                this.createdPages.set(pageId, newPage);
                this.content.addChildComponent(newPage, pageId);
                this.initializeContent(this.presentationInitializationPayload, newPage);
                newPage.show();
                this.setLayout(newPage, this.direction);
            }
        };
        paytable.PaytableComponent.prototype.setForFullScreen = function() {
            var canvasElement;
            canvasElement = _hcmn_.js_Boot.__cast(this.defStage.getCanvas(), HTMLCanvasElement);
            var stageH = canvasElement.height;
            var stageW = canvasElement.width;
            var fisicalW = canvasElement.height;
            var fisicalH = canvasElement.width;
            if (canvasElement.style.width != "") {
                fisicalW = _hcmn_.Std.parseInt(_hcmn_.StringTools.replace(canvasElement.style.width, "px", ""));
                fisicalH = _hcmn_.Std.parseInt(_hcmn_.StringTools.replace(canvasElement.style.height, "px", ""));
            }
            var containerDO = this.container.getDisplayObject();
            containerDO.setX(0);
            containerDO.setY(0);
            this.defStage.setScaleX(1);
            this.defStage.setScaleY(1);
            containerDO.setScaleX(1);
            containerDO.setScaleY(1);
            if ((function($this) {
                    var $r;
                    var f = containerDO.getWidth();
                    $r = isNaN(f);
                    return $r;
                }(this)) || (function($this) {
                    var $r;
                    var f1 = containerDO.getHeight();
                    $r = isNaN(f1);
                    return $r;
                }(this))) {
                containerDO.setWidth(fisicalW);
                containerDO.setHeight(fisicalH);
            }
        };
        paytable.PaytableComponent.prototype.setLayout = function(pageContainer, direction) {
            haxe.Log.trace("[pt] IOS paytable comp setLayout", {
                fileName: "PaytableComponent.hx",
                lineNumber: 278,
                className: "paytable.component.components.PaytableComponent",
                methodName: "setLayout"
            });
            this.direction = direction;
            var stageH = this.height_defValue;
            var stageW = this.width_defValue;
            if (this.defStage.getHeight() != null) stageH = this.defStage.getHeight();
            if (this.defStage.getWidth() != null) stageW = this.defStage.getWidth();
            var offset = 0;
            if (this.config.offset != null) offset = this.config.offset;
            if (pageContainer != null) {
                var page = pageContainer.getDisplayObject();
                this.resizeContent(page, direction);
                var posX = _hcmn_.Std["int"]((stageW - page.getScaleX() * page.getUserData().viewBuilderW) / 2);
                var posY = _hcmn_.Std["int"]((stageH - page.getScaleY() * page.getUserData().viewBuilderH + this.consoleOffset) / 2);
                page.setPos(posX, posY);
            }
            if (direction == "up") {
                this.consoleOffset = 60;
                var controlsPortrait = this.container.getComponentById("ControlsPortrait").getDisplayObject();
                controlsPortrait.setVisible(true);
                controlsPortrait.setScale(1);
                var page1 = this.createdPages.get("page_" + this.currentPage).getDisplayObject();
                var controlsLandscape = this.container.getComponentById("ControlsLandscape").getDisplayObject();
                controlsLandscape.setVisible(false);
                controlsLandscape.setScale(1);
                var controlsClose = this.container.getComponentById("ControlsClose").getDisplayObject();
                controlsClose.setScale(1);
                var controlsHeight = _hcmn_.Std["int"](page1.getHeight() + controlsClose.getHeight() + controlsPortrait.getHeight() + 2 * offset);
                if (controlsHeight >= stageH) {
                    offset = 0;
                    var scaleFactor = page1.getScaleY();
                    if (scaleFactor > 1) scaleFactor = this.MAX_SCALE_FACTOR;
                    if (scaleFactor < 0.5) scaleFactor = this.MIN_SCALE_FACTOR;
                    controlsPortrait.setScale(scaleFactor);
                    controlsClose.setScale(scaleFactor);
                } else {
                    controlsClose.setScale(1);
                    controlsPortrait.setScale(1);
                }
                var posX1 = stageW / 2 | 0;
                var posY1 = _hcmn_.Std["int"](stageH - controlsPortrait.getHeight() / 2) - offset;
                controlsClose.setX(stageW - controlsClose.getWidth() - offset);
                controlsClose.setY(offset + this.consoleOffset);
                controlsPortrait.setX(posX1);
                controlsPortrait.setY(posY1);
            } else if (direction == "left") {
                this.consoleOffset = 60;
                var controlsLandscape1 = this.container.getComponentById("ControlsLandscape").getDisplayObject();
                controlsLandscape1.setScale(1);
                var page2 = this.createdPages.get("page_" + this.currentPage).getDisplayObject();
                var controlsPortrait1 = this.container.getComponentById("ControlsPortrait").getDisplayObject();
                controlsPortrait1.setScale(1);
                controlsPortrait1.setVisible(false);
                var btnClose = this.container.getComponentById("ControlsClose").getDisplayObject();
                btnClose.setScale(1);
                var controlsHeight1 = _hcmn_.Std["int"](btnClose.getHeight() + controlsLandscape1.getHeight() + 2 * offset);
                if (controlsHeight1 >= stageH) {
                    btnClose.setScale(btnClose.getScaleY() * page2.getHeight() / controlsHeight1);
                    controlsLandscape1.setScale(controlsLandscape1.getScaleY() * page2.getHeight() / controlsHeight1);
                    offset = 0;
                } else {
                    btnClose.setScale(1);
                    controlsLandscape1.setScale(1);
                }
                var posX2 = _hcmn_.Std["int"](stageW - controlsLandscape1.getWidth() / 2 - offset);
                var posY2 = _hcmn_.Std["int"](stageH - controlsLandscape1.getHeight() / 2) - offset;
                controlsLandscape1.setVisible(true);
                controlsLandscape1.setX(posX2);
                controlsLandscape1.setY(posY2);
                btnClose.setX(stageW - btnClose.getWidth() - offset);
                btnClose.setY(offset + this.consoleOffset);
            } else {
                this.consoleOffset = 0;
                var offsetX = 0;
                var offsetY = 0;
                if (this.config.offsetX != null) offsetX = this.config.offsetX;
                if (this.config.offsetY != null) offsetY = this.config.offsetY;
                var controlsPortrait2 = this.container.getComponentById("ControlsPortrait").getDisplayObject();
                controlsPortrait2.setVisible(true);
                controlsPortrait2.setScale(1);
                var page3 = this.createdPages.get("page_" + this.currentPage).getDisplayObject();
                var controlsLandscape2 = this.container.getComponentById("ControlsLandscape").getDisplayObject();
                controlsLandscape2.setVisible(false);
                controlsLandscape2.setScale(1);
                var controlsClose1 = this.container.getComponentById("ControlsClose").getDisplayObject();
                controlsClose1.setScale(1);
                var controlsHeight2 = _hcmn_.Std["int"](page3.getHeight() + controlsClose1.getHeight() + controlsPortrait2.getHeight() + 2 * offsetY);
                controlsPortrait2.setScaleX(page3.getScaleX());
                controlsPortrait2.setScaleY(page3.getScaleY());
                controlsClose1.setScaleX(page3.getScaleX());
                controlsClose1.setScaleY(page3.getScaleY());
                var posX3 = stageW / 2 | 0;
                var posY3 = _hcmn_.Std["int"](page3.getHeight() + page3.getY() - controlsPortrait2.getHeight() / 2 - offsetY * page3.getScaleY());
                controlsPortrait2.setX(posX3);
                controlsPortrait2.setY(posY3);
                controlsClose1.setX(page3.getX() + page3.getWidth() - controlsClose1.getWidth() - offsetX * page3.getScaleX());
                controlsClose1.setY(page3.getY() + offsetY * page3.getScaleY());
            }
        };
        paytable.PaytableComponent.prototype.resizeContent = function(content, direction) {
            content.setScale(1);
            var stageH = this.defStage.getHeight() - this.consoleOffset;
            var stageW = this.defStage.getWidth();
            var ratio = 1;
            var scale = 1;
            if (stageH > stageW) {
                ratio = stageW / content.getUserData().viewBuilderW;
                scale = content.getScaleX();
            } else {
                ratio = stageH / content.getUserData().viewBuilderH;
                scale = content.getScaleY();
            }
            content.setScale(scale * ratio);
        };
        paytable.PaytableComponent.prototype.attachHandlers = function() {
            if (this.container.getComponentById("ControlsClose") != null) {
                var controlsClose = this.container.getContainerById("ControlsClose");
                if (controlsClose.getButtonById("ButtonClose") != null) controlsClose.getButtonById("ButtonClose").getEvents().DOWN().addListener($bind(this, this.handleClose));
                if (controlsClose.getButtonContainerById("ButtonClose") != null) controlsClose.getButtonContainerById("ButtonClose").getEvents().DOWN().addListener($bind(this, this.handleClose));
            }
            this.attachControls("ControlsLandscape");
            this.attachControls("ControlsPortrait");
        };
        paytable.PaytableComponent.prototype.detachHandlers = function() {
            if (this.container.getComponentById("ControlsClose") != null) {
                var controlsClose = this.container.getContainerById("ControlsClose");
                if (controlsClose.getButtonById("ButtonClose") != null) controlsClose.getButtonById("ButtonClose").getEvents().DOWN().removeListener($bind(this, this.handleClose));
                if (controlsClose.getButtonContainerById("ButtonClose") != null) controlsClose.getButtonContainerById("ButtonClose").getEvents().DOWN().removeListener($bind(this, this.handleClose));
            }
            this.detachControls("ControlsLandscape");
            this.detachControls("ControlsPortrait");
        };
        paytable.PaytableComponent.prototype.attachControls = function(id) {
            if (this.container.getComponentById(id) != null) {
                var controls = this.container.getContainerById(id);
                if (controls.getButtonById("BtnLeft") != null) {
                    var btnLeft = controls.getButtonById("BtnLeft");
                    btnLeft.getEvents().DOWN().addListener($bind(this, this.handleLeft));
                }
                if (controls.getButtonContainerById("BtnLeft") != null) {
                    var btnLeft1 = controls.getButtonContainerById("BtnLeft");
                    btnLeft1.getEvents().DOWN().addListener($bind(this, this.handleLeft));
                }
                if (controls.getButtonById("BtnRight") != null) {
                    var btnRight = controls.getButtonById("BtnRight");
                    btnRight.getEvents().DOWN().addListener($bind(this, this.handleRight));
                }
                if (controls.getButtonContainerById("BtnRight") != null) {
                    var btnRight1 = controls.getButtonContainerById("BtnRight");
                    btnRight1.getEvents().DOWN().addListener($bind(this, this.handleRight));
                }
            }
        };
        paytable.PaytableComponent.prototype.detachControls = function(id) {
            if (this.container.getComponentById(id) != null) {
                var controls = this.container.getContainerById(id);
                if (controls.getButtonById("BtnLeft") != null) {
                    var btnLeft = controls.getButtonById("BtnLeft");
                    btnLeft.getEvents().DOWN().removeListener($bind(this, this.handleLeft));
                }
                if (controls.getButtonContainerById("BtnLeft") != null) {
                    var btnLeft1 = controls.getButtonContainerById("BtnLeft");
                    btnLeft1.getEvents().DOWN().removeListener($bind(this, this.handleLeft));
                }
                if (controls.getButtonById("BtnRight") != null) {
                    var btnRight = controls.getButtonById("BtnRight");
                    btnRight.getEvents().DOWN().removeListener($bind(this, this.handleRight));
                }
                if (controls.getButtonContainerById("BtnRight") != null) {
                    var btnRight1 = controls.getButtonContainerById("BtnRight");
                    btnRight1.getEvents().DOWN().removeListener($bind(this, this.handleRight));
                }
            }
        };
        paytable.PaytableComponent.prototype.show = function() {
            this.attachHandlers();
            this.showPage(0);
            if (!this.textFormated) {
                this.textFormated = true;
                var content = this.container.getContainerById("Content");
                var $it0 = (function($this) {
                    var $r;
                    var this1 = content.getChildComponents();
                    $r = this1.keys();
                    return $r;
                }(this));
                while ($it0.hasNext()) {
                    var key = $it0.next();
                    var page = content.getContainerById(key);
                    var $it1 = (function($this) {
                        var $r;
                        var this2 = page.getChildComponents();
                        $r = this2.keys();
                        return $r;
                    }(this));
                    while ($it1.hasNext()) {
                        var k = $it1.next();
                        if (_hcmn_.Std["is"](page.getComponentById(k), viewBuilderApi.ILabel)) page.getLabelById(k).forceRenderText();
                    }
                }
            }
            this.container.show();
        };
        paytable.PaytableComponent.prototype.hide = function() {
            var $it0 = this.createdPages.iterator();
            while ($it0.hasNext()) {
                var page = $it0.next();
                page.hide();
            }
            this.container.hide();
            this.detachHandlers();
        };
        paytable.PaytableComponent.prototype.initializeContent = function(presentationInitializationPayload, newPage) {
            if (presentationInitializationPayload == null) return;
            this.presentationInitializationPayload = presentationInitializationPayload;
            var awardCap = this.presentationInitializationPayload.riskControlSettings.awardCap;
            var outcomes = this.presentationInitializationPayload.slotDefinition.outcomes;
            var jackpotSeed = "";
            var jackpotRTP = "";
            var jackpotFeed = "";
            var softwareId = "";
            var currency = "";
            var jackpot051 = "";
            var rtp = this.presentationInitializationPayload.slotDefinition.rtp;
            var progressiveMinTotalBet = "";
            this.denomination = this.presentationInitializationPayload.riskControlSettings.denomination;
            if (this.presentationInitializationPayload.defaultStake.outcome.customField != null) {
                if (this.presentationInitializationPayload.defaultStake.outcome.customField.progressiveMinTotalBet != null) {
                    var jpValue = this.presentationInitializationPayload.defaultStake.outcome.customField.progressiveMinTotalBet;
                    var denValue = new money.Money(this.denomination).mul(new money.Money(jpValue)).value;
                    progressiveMinTotalBet = paytable.ExternalService.moneyFormatter.format(denValue);
                }
                if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData != null) {
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.jackpot051 != null) jackpot051 = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.jackpot051;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.rtp != null) jackpotRTP = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.rtp;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.feed != null) jackpotFeed = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.feed;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.softwareId != null) softwareId = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.softwareId;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.currency != null) currency = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.currency;
                    if (this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.seed != null && softwareId != "") {
                        var type;
                        if (softwareId.split("-").length == 3) type = softwareId.split("-")[2];
                        else type = null;
                        if (type == "001" && currency != "") {
                            var jpSeed = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.seed;
                            jackpotSeed = currency + jpSeed;
                        } else {
                            var jpSeed1 = this.presentationInitializationPayload.defaultStake.outcome.customField.jackpotData.seed;
                            jackpotSeed = paytable.ExternalService.moneyFormatter.format(jpSeed1, true, false);
                        }
                    }
                }
            }
            var minRTP;
            var maxRTP;
            if (rtp.singleRTP != null && rtp.singleRTP == true) {
                if (rtp.minSingleRTP == null) throw new Error("minSingleRTP must exist if singleRTP==true");
                minRTP = rtp.minSingleRTP;
                if (paytable.ExternalService.loadedDefinitionConfig.singleRTP != null) {
                    if (paytable.ExternalService.loadedDefinitionConfig.singleRTP == false) minRTP = rtp.minRTP;
                    else minRTP = rtp.minSingleRTP;
                }
                if (rtp.maxSingleRTP == null) throw new Error("maxSingleRTP must exist if singleRTP==true");
                maxRTP = rtp.maxSingleRTP;
                if (paytable.ExternalService.loadedDefinitionConfig.singleRTP != null) {
                    if (paytable.ExternalService.loadedDefinitionConfig.singleRTP == false) maxRTP = rtp.maxRTP;
                    else maxRTP = rtp.maxSingleRTP;
                }
            } else {
                minRTP = rtp.minRTP;
                maxRTP = rtp.maxRTP;
            }
            var decimalSeparator = paytable.ExternalService.translationManager.stringLookup("rtpDecimalSeparator");
            if (decimalSeparator != null && decimalSeparator != "rtpDecimalSeparator") {
                minRTP = _hcmn_.StringTools.replace(minRTP, ".", decimalSeparator);
                maxRTP = _hcmn_.StringTools.replace(maxRTP, ".", decimalSeparator);
            }
            if (newPage == null) {
                var content = this.container.getContainerById("Content");
                var $it0 = (function($this) {
                    var $r;
                    var this1 = content.getChildComponents();
                    $r = this1.keys();
                    return $r;
                }(this));
                while ($it0.hasNext()) {
                    var key = $it0.next();
                    var page = content.getContainerById(key);
                    this.setupPageContent(page, outcomes, awardCap, minRTP, maxRTP, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed, jackpot051);
                }
            } else this.setupPageContent(newPage, outcomes, awardCap, minRTP, maxRTP, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed, jackpot051);
            haxe.Log.trace("[PAYTABLE] presentationInitializationPayload ", {
                fileName: "PaytableComponent.hx",
                lineNumber: 705,
                className: "paytable.component.components.PaytableComponent",
                methodName: "initializeContent",
                customParams: [presentationInitializationPayload]
            });
        };
        paytable.PaytableComponent.prototype.isFullScreenMobile = function() {
            return this.fullScreenCanvas;
        };
        paytable.PaytableComponent.prototype.setupPageContent = function(page, outcomes, awardCap, minRTP, maxRTP, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed, jackpot051) {
            this.expandMoneyValues(page);
            var rtpLabelID = paytable.PaytableDefinition.getRTPLabelId();
            var rtpSingleLabelID = paytable.PaytableDefinition.getSingleRTPLabelId();
            var formattedAwardCap = this.getFormattedAwardCap(awardCap);
            if (page.getComponentById(rtpLabelID) != null) {
                var lbl = page.getLabelById(rtpLabelID);
                var newLabelContent = "";
                if (minRTP == maxRTP) newLabelContent = paytable.ExternalService.translationManager.stringLookup(rtpSingleLabelID, [minRTP, formattedAwardCap, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed, jackpot051]);
                if (minRTP != maxRTP || newLabelContent == rtpSingleLabelID) newLabelContent = paytable.ExternalService.translationManager.stringLookup(rtpLabelID, [minRTP, maxRTP, formattedAwardCap, progressiveMinTotalBet, jackpotSeed, jackpotRTP, jackpotFeed, jackpot051]);
                newLabelContent = this.moneyFormatFillin(newLabelContent);
                lbl.setText(newLabelContent);
            }
            var awardCapLabelId = paytable.PaytableDefinition.getAwardCapLabelId();
            if (awardCapLabelId != null && page.getComponentById(awardCapLabelId) != null) {
                var lbl1 = page.getComponentById(awardCapLabelId);
                var text = paytable.ExternalService.translationManager.stringLookup(awardCapLabelId, [formattedAwardCap]);
                lbl1.setText(text);
            }
            if ((function($this) {
                    var $r;
                    var this1 = page.getChildComponents();
                    $r = this1.exists("progressiveMinTotalBetLabel");
                    return $r;
                }(this))) {
                var newTotalBetContent = paytable.ExternalService.translationManager.stringLookup("progressiveMinTotalBetLabel", [progressiveMinTotalBet]);
                var minBetLabel = page.getLabelById("progressiveMinTotalBetLabel");
                newTotalBetContent = this.moneyFormatFillin(newTotalBetContent);
                minBetLabel.setText(newTotalBetContent);
            }
            var $it0 = outcomes.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                var labelId = "PaytableValues_" + key;
                if ((function($this) {
                        var $r;
                        var this2 = page.getChildComponents();
                        $r = this2.exists(labelId);
                        return $r;
                    }(this))) {
                    var lbl2 = page.getLabelById(labelId);
                    lbl2.setText(_hcmn_.__map_reserved[key] != null ? outcomes.getReserved(key) : outcomes.h[key]);
                }
            }
            this.updateOffsets(page);
        };
        paytable.PaytableComponent.prototype.getFormattedAwardCap = function(awardCap) {
            var moneyFormatter = paytable.ExternalService.moneyFormatter;
            var currencyFormat = moneyFormatter.currencyFormat;
            var result = moneyFormatter.format(awardCap, true, this.showDecimalValueInAwardCap);
            var indexSeparator = result.lastIndexOf(currencyFormat.decimalSeparator);
            var decimal = _hcmn_.HxOverrides.substr(result, indexSeparator + 1, currencyFormat.decimalPrecision);
            if (_hcmn_.Std.parseInt(decimal) == 0) result = result.split(currencyFormat.decimalSeparator + decimal).join("");
            return result;
        };
        paytable.PaytableComponent.prototype.expandMoneyValues = function(page) {
            var $it0 = (function($this) {
                var $r;
                var this1 = page.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var ck = $it0.next();
                var component;
                var this2 = page.getChildComponents();
                component = this2.get(ck);
                if (_hcmn_.js_Boot.__instanceof(component, viewBuilderApi.ILabel)) {
                    var expandedMsg = this.moneyFormatFillin(paytable.ExternalService.translationManager.stringLookup(ck));
                    (_hcmn_.js_Boot.__cast(component, viewBuilderApi.ILabel)).setText(expandedMsg);
                }
            }
        };
        paytable.PaytableComponent.prototype.moneyFormatFillin = function(msg) {
            var ereg = new _hcmn_.EReg("({MONEY=)(.+?)(}|\n|$)", "g");
            if (!ereg.match(msg)) return msg;
            while (ereg.match(msg)) {
                var replacementString = ereg.matched(1) + ereg.matched(2) + "}";
                var moneyValue = new money.Money(ereg.matched(2)).mul(new money.Money(this.denomination));
                msg = _hcmn_.StringTools.replace(msg, replacementString, paytable.ExternalService.moneyFormatter.format(moneyValue.value));
            }
            return msg;
        };
        paytable.PaytableComponent.prototype.isOpen = function() {
            return this.container.getDisplayObject().getVisible();
        };
        paytable.PaytableComponent.prototype.__class__ = paytable.PaytableComponent;
        paytable.BaseEventsEnum = {
            __ename__: ["paytable", "BaseEventsEnum"],
            __constructs__: ["CLOSE", "OPEN", "CURRENT_PAGE", "NAVIGATE_LEFT", "NAVIGATE_RIGHT"]
        };
        paytable.BaseEventsEnum.CURRENT_PAGE = ["CURRENT_PAGE", 2];
        paytable.BaseEventsEnum.CURRENT_PAGE.toString = $estr;
        paytable.BaseEventsEnum.CURRENT_PAGE.__enum__ = paytable.BaseEventsEnum;
        paytable.BaseEventsEnum.NAVIGATE_LEFT = ["NAVIGATE_LEFT", 3];
        paytable.BaseEventsEnum.NAVIGATE_LEFT.toString = $estr;
        paytable.BaseEventsEnum.NAVIGATE_LEFT.__enum__ = paytable.BaseEventsEnum;
        paytable.BaseEventsEnum.CLOSE = ["CLOSE", 0];
        paytable.BaseEventsEnum.CLOSE.toString = $estr;
        paytable.BaseEventsEnum.CLOSE.__enum__ = paytable.BaseEventsEnum;
        paytable.BaseEventsEnum.NAVIGATE_RIGHT = ["NAVIGATE_RIGHT", 4];
        paytable.BaseEventsEnum.NAVIGATE_RIGHT.toString = $estr;
        paytable.BaseEventsEnum.NAVIGATE_RIGHT.__enum__ = paytable.BaseEventsEnum;
        paytable.BaseEventsEnum.OPEN = ["OPEN", 1];
        paytable.BaseEventsEnum.OPEN.toString = $estr;
        paytable.BaseEventsEnum.OPEN.__enum__ = paytable.BaseEventsEnum;
        paytable.BaseEvents = function() {
            this.events = new haxe.ds.EnumValueMap();
            this.registerEvents();
        };
        paytable.BaseEvents.__name__ = ["paytable", "BaseEvents"];
        paytable.BaseEvents.prototype.events = null;
        paytable.BaseEvents.prototype.registerEvents = function() {
            var value = new _hcmn_.msignal_Signal1();
            this.events.set(paytable.BaseEventsEnum.CLOSE, value);
            var value1 = new _hcmn_.msignal_Signal1();
            this.events.set(paytable.BaseEventsEnum.CURRENT_PAGE, value1);
            var value2 = new _hcmn_.msignal_Signal1();
            this.events.set(paytable.BaseEventsEnum.NAVIGATE_LEFT, value2);
            var value3 = new _hcmn_.msignal_Signal1();
            this.events.set(paytable.BaseEventsEnum.NAVIGATE_RIGHT, value3);
        };
        paytable.BaseEvents.prototype.getEvent = function(id) {
            return this.events.get(id);
        };
        paytable.BaseEvents.prototype.__class__ = paytable.BaseEvents;
        paytable.HTMLPaytableComponent.PAYTABLE_SQUARE_SIZE = 1000;;
        paytable.HTMLPaytableComponent.RESERVED_MOBILE_CONSOLE_HEIGHT = 35;;
        paytable.HTMLPaytableComponent.MINIMUM_UI_SCALE = 0.3;;
        return {
            exports: paytable,
            activator: paytable.Activator
        };
    });
//# sourceURL=slotPaytable.js