define("consoleservice/consoleconnector/MXF", ["require"], function(e) {
    return function() {
        var e = e || {};
        return e.igt = e.igt || {}, e.igt.mxf = function() {
            function n() {
                var e = window === top ? "game" : "console",
                    n = Array.prototype.slice.call(arguments);
                return n.unshift(m + " in " + e + " "), n
            }

            function t() {
                var e = n.apply(void 0, arguments);
                O && O.log(e, "MXF")
            }

            function i() {
                O ? O.error(n.apply(void 0, arguments), "MXF") : console.error.apply(console, n.apply(void 0, arguments))
            }

            function o(e) {
                try {
                    return JSON.parse(window.localStorage.getItem("com.igt.mxf." + e))
                } catch (e) {}
            }

            function r(e) {
                O = e
            }

            function s() {
                (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) && (document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen())
            }

            function a() {
                window.removeEventListener("message", k), window.top === window && window.removeEventListener("message", G), window.removeEventListener("beforeunload", s)
            }
            var c, l, d, u, f, m = "com.igt.mxf:",
                p = {}.hasOwnProperty,
                g = function(e, n) {
                    for (var t in n) p.call(n, t) && (e[t] = n[t])
                },
                h = function(n) {
                    function t(e, n) {
                        var t = d[e] = d[e] || [];
                        return n instanceof Function ? t.indexOf(n) >= 0 || t.push(n) : i("MXF event handlers must be functions"), this
                    }

                    function o(e) {
                        for (var n in e) e.hasOwnProperty(n) && t.call(this, n, e[n]);
                        return this
                    }

                    function r(e, o) {
                        return o instanceof Function ? t.call(this, e, function t() {
                            o.apply(n, arguments), s(e, t)
                        }) : (i("MXF event handlers must be functions"), this)
                    }

                    function s(e, n) {
                        var t, i = d[e];
                        return i && (t = i.indexOf(n), t >= 0 && i.splice(t, 1), 0 === i.length && delete d[e]), this
                    }

                    function a(e) {
                        for (var n in e) e.hasOwnProperty(n) && s.call(this, n, e[n]);
                        return this
                    }

                    function c(t, i, o) {
                        return e.igt.mxf.eventHandle = o, d[t] && d[t].forEach(function(e) {
                            e.apply(n, i)
                        }), !!d[t]
                    }

                    function l(e) {
                        return d[e] && d[e].length || 0
                    }
                    var d = {};
                    this._addEvent = t, this._addEvents = o, this._addOneShotEvent = r, this._removeEvent = s, this._removeEvents = a, this._fireEvent = c, this._handlerCount = l
                },
                v = function(e) {
                    if (this.values && -1 === this.values.indexOf(e)) return i('Invalid value for  control "' + this.name + '": value "' + e + '" for is not in values'), 0;
                    if (this.closedInterval) {
                        if (!(e >= this.closedInterval[0])) return i('Invalid value for  control "' + this.name + '": value "' + e + '" is <= ' + this.closedInterval[0]), 0;
                        if (!(e <= this.closedInterval[1])) return i('Invalid value for  control "' + this.name + '": value "' + e + '" is >= ' + this.closedInterval[1]), 0
                    }
                    if (this.openInterval) {
                        if (!(e > this.openInterval[0])) return i('Invalid value for  control "' + this.name + '": value "' + e + '" is < ' + this.openInterval[0]), 0;
                        if (!(e < this.openInterval[1])) return i('Invalid value for  control "' + this.name + '": value "' + e + '" is > ' + this.openInterval[1]), 0
                    }
                    return 1
                },
                y = function(e) {
                    var n, t = JSON.parse(JSON.stringify(e)),
                        o = function(e) {
                            if (!t.enabled) return void i('New value "' + e + '" for disabled control "' + t.name + '" ignored');
                            v.call(t, e) && _("control", t.name, "change", [].slice.call(arguments, 0))
                        };
                    n = new h(e), n._addEvent("enable", function(e) {
                        t.enabled = !!e
                    }), this._fireEvent = n._fireEvent, g(e, {
                        setValue: o,
                        addEvent: n._addEvent,
                        addEvents: n._addEvents,
                        addOneShotEvent: n._addOneShotEvent,
                        removeEvent: n._removeEvent,
                        removeEvents: n._removeEvents
                    })
                },
                C = {
                    _float: function(e) {
                        return parseFloat(e) || 0
                    },
                    _int: function(e) {
                        return parseInt(e, 10) || 0
                    },
                    _list: function(e) {
                        return e.split(",")
                    },
                    _nameize: function(e, n) {
                        var t, i = {},
                            o = e.length;
                        for (n = n || "@name"; --o >= 0;) t = e[o], i[t[n]] = t, delete t[n];
                        return i
                    },
                    _arrayize: function(e) {
                        return e instanceof Array ? e : void 0 !== e ? [e] : []
                    }
                },
                b = function(e) {
                    _("currency", e.config), delete e.config, c = e
                },
                E = [],
                w = 1,
                S = new h,
                I = {},
                M = {
                    wagerIsStarting: function(e) {
                        _("wagerStarted", e)
                    },
                    updateParams: function(e) {
                        _("afterUpdateParams", e)
                    },
                    wagerIsComplete: function() {
                        _("wagerComplete")
                    },
                    wagerIsAborted: function() {
                        _("wagerAborted")
                    },
                    insufficientFundsNotification: function() {
                        _("resume")
                    },
                    viewAccountHistory: function(e) {
                        _("resume", e)
                    },
                    requestHelp: function(e) {
                        _("resume", e)
                    },
                    displayMessage: function(e, n) {
                        _("resume", e, n)
                    },
                    command: function(e) {
                        _("resume")
                    },
                    gameOutcome: function() {
                        _("afterGameOutcome")
                    },
                    demoOutcome: function() {
                        _("afterDemoOutcome")
                    },
                    beforeInitGame: function(e) {
                        _("resume", e)
                    },
                    config: function() {
                        _("resume")
                    }
                },
                x = new function(e) {
                    var e = (e || location.search).substring(1);
                    e && e.split("&").map(function(e) {
                        e = e.split("="), this[decodeURIComponent(e[0])] = decodeURIComponent(e[1])
                    }, this)
                };
            Object.freeze && Object.freeze(x);
            var O, T = function(e) {
                    var n = document.createElement("a");
                    return n.setAttribute("href", e), n
                },
                B = function(e) {
                    if (e = "string" == typeof e ? T(e) : e, e.origin) return e.origin;
                    var n = e.protocol + "//" + e.hostname + ":" + e.port;
                    return 0 === e.href.indexOf(n) ? n : (n = e.protocol + "//" + e.hostname, 0 === e.href.indexOf(n) ? n : void i("Could not construct an origin from " + JSON.stringify(e)))
                },
                P = function(e, n) {
                    var t = e,
                        i = B(n);
                    return E.push({
                        window: t,
                        origin: i
                    }), this
                },
                _ = function(e) {
                    var n = JSON.stringify(Array.prototype.slice.call(arguments));
                    t("sending", n);
                    try {
                        for (var o in E) E[o].origin && E[o].window.postMessage(m + n, E[o].origin)
                    } catch (e) {
                        i(e)
                    }
                },
                L = function(e, n) {
                    t("relaying", n);
                    try {
                        for (var o in E) E[o].window !== e && E[o].window.postMessage(n, E[o].origin)
                    } catch (e) {
                        i(e)
                    }
                },
                F = function(e) {
                    var n = Array.prototype.slice.call(arguments),
                        o = n.pop(),
                        r = JSON.stringify(n);
                    t("sending", r);
                    try {
                        o.source.postMessage(m + r, o.origin)
                    } catch (e) {
                        i(e)
                    }
                },
                A = Object.freeze(["afterGameOutcome", "afterDemoOutcome", "reserveSize", "haltGame", "pauseGame", "unPauseGame", "stopAutospin"]),
                G = function(e) {
                    for (var n = !1, t = window; t !== window.top && !n;)(t = t.parent) === e.source && (n = !0);
                    if (n) {
                        var i = e.data;
                        E.forEach(function(e) {
                            _("portalMessage", i)
                        })
                    }
                },
                k = function(e) {
                    var n, o, r = 0 === E.length;
                    if (E.forEach(function(n, t) {
                            n.origin === e.origin && (r = !0)
                        }), r && "string" == typeof e.data && !e.data.hasOwnProperty("postal")) {
                        t("recieved", e.data), n = e.data.substr(m.length);
                        try {
                            n = JSON.parse(n)
                        } catch (e) {
                            return void i(e)
                        }
                        if (o = n.shift(), !w && -1 === A.indexOf(o)) return void i(" message " + n + " is not allowed during a wager and was ignored ", e.data);
                        M[o] && S._handlerCount(o) && (l && i(d + " handlers for " + u + " have not completed"), t('"' + o + '" has ' + d + " event handlers"), u = o, l = M[o], d = S._handlerCount(o), f = void 0);
                        switch (o) {
                            case "relayMessage":
                                L(e.source, e.data);
                                break;
                            case "register":
                                I[n[0].name] ? i("Control " + n[0].name + " is already registered") : I[n[0].name] = new y(n[0]);
                            default:
                                !S._fireEvent(o, n, e) && M[o] && M[o]()
                        }
                    }
                },
                D = function(e) {
                    t('resume called for "' + u + '" with action "' + e + '"'), null != e && (f = e), --d <= 0 && (t('resuming game after "' + u + '" with final action "' + f + '"'), l && l(f), l = void 0, f = void 0)
                },
                R = function() {
                    var e = {};
                    return S._addEvent("command", function(n) {
                        var t = e[n];
                        t ? t.apply(void 0, Array.prototype.slice.call(arguments, 1)) : D()
                    }), {
                        setHandler: function(n, t) {
                            e[n] = t
                        },
                        unsetHandler: function(n) {
                            delete e[n]
                        },
                        setHandlers: function(n) {
                            for (var t in n) n.hasOwnProperty(t) && (e[t] = n[t])
                        },
                        unsetHandlers: function(n) {
                            for (var t in n) n.hasOwnProperty(t) && delete e[t]
                        }
                    }
                }();
            S._addEvent("orientationchange", function(e) {
                var n = document.createEvent("HTMLEvents");
                window.orientation = e, n.initEvent("orientationchange", 1, 1), (window.dispatchEvent || document.dispatchEvent)(n)
            }), S._addEvent("control", function(e) {
                var n = [].slice.call(arguments, 1),
                    t = I[e];
                t || i('"' + e + '" is not a registered control'), t._fireEvent.apply(void 0, n)
            });
            var z = function(e) {
                    function n(n, o, a) {
                        if (n) {
                            var c = e.value;
                            e.values.forEach(function(e) {
                                e == c && (c = e)
                            }), r._fireEvent("change", [a]), i = o, t = {
                                _event: "change",
                                _args: [c]
                            }
                        } else t ? (e.values.forEach(function(n) {
                            Number(n) === Number(t._args) && (e.value = n)
                        }), r._fireEvent(t._event, t._args)) : (e.values.forEach(function(n) {
                            Number(n) === Number(e.value) && (e.value = n)
                        }), r._fireEvent("change", [e.value])), i = void 0, t = void 0;
                        s = n
                    }
                    var t, i, o, r = new h(e),
                        s = !1,
                        a = function(n, t) {
                            switch (n) {
                                case "enable":
                                    e.enabled = t[0]
                            }
                            _("control", e.name, n, t)
                        },
                        c = function(e, n, t) {
                            return n.addEvent(t, function() {
                                a.call(void 0, e, [].slice.call(arguments, 0))
                            }), this
                        },
                        l = function(n, o) {
                            switch (n) {
                                case "change":
                                    if (["patternsBet", "coinValue", "betPerPattern"].indexOf(e.name) >= 0) return;
                                    if (!e.enabled || !v.call(e, o[0])) return;
                                    e.value = o[0]
                            }
                            s ? (t = {
                                _event: n,
                                _args: o
                            }, i && i(n, o)) : r._fireEvent(n, o)
                        },
                        d = function() {
                            return o || (o = a, this._sendEvent = a = function(e) {
                                "change" !== e && o.apply(this, arguments)
                            }), this
                        };
                    return I[e.name] = {
                        _control: e,
                        _fireEvent: l
                    }, ["patternsBet", "coinValue", "betPerPattern"].indexOf(e.name) < 0 && _("register", e), g(e, {
                        sendEvent: a,
                        linkEvent: c,
                        addEvent: r._addEvent,
                        addEvents: r._addEvents,
                        addOneShotEvent: r._addOneShotEvent,
                        removeEvent: r._removeEvent,
                        removeEvents: r._removeEvents,
                        ignoreChange: d,
                        bypassControl: n
                    }), e
                },
                N = function(e, n) {
                    var t, i = {},
                        o = {
                            Balances: function() {
                                var e = {
                                    Balance: {}
                                };
                                return this.Balance && C._arrayize(this.Balance).forEach(function(n) {
                                    e.Balance[n["@name"]] = {
                                        amount: C._float(n["#text"]),
                                        formattedAmount: c.format(n["#text"])
                                    }
                                }), e || {}
                            },
                            TransactionId: function() {
                                return this
                            },
                            dTransactionId: function() {
                                return this
                            },
                            dSessionId: function() {
                                return this
                            },
                            dActionIds: function() {
                                return {
                                    dActionId: this && this.dActionId ? this.dActionId : ""
                                }
                            },
                            OutcomeDetail: function() {
                                return {
                                    TransactionId: this.TransactionId ? this.TransactionId : "",
                                    Balance: C._float(c.toCurrency(this.Balance)),
                                    Payout: C._float(c.toCurrency(this.Payout)),
                                    Pending: C._float(c.toCurrency(this.Pending)),
                                    Settled: C._float(c.toCurrency(this.Settled)),
                                    GameStatus: this.GameStatus ? this.GameStatus : "",
                                    NextStage: this.NextStage ? this.NextStage : "",
                                    Stage: this.Stage ? this.Stage : ""
                                }
                            },
                            PromotionalFreeSpin: function() {
                                var e = {
                                    count: C._int(this["@count"]),
                                    gip: "true" === this["@gip"]
                                };
                                return this["@cumulativeWin"] && (e.cumulativeWin = C._float(this["@cumulativeWin"]), e.formattedCumulativeWin = c.format(this["@cumulativeWin"])), e
                            },
                            CustomData: function() {
                                return this
                            },
                            JSONOutcome: function() {
                                var e = {},
                                    n = this;
                                return Array.isArray(n) || (n = [n]), n.forEach(function(n) {
                                    "ODEResponse" === n["@name"] && (e = n["#text"])
                                }), {
                                    TransactionId: e.clientWagerId ? e.clientWagerId : ""
                                }
                            }
                        };
                    for (t in e) o[t] && (i[t] = o[t].call(e[t]));
                    i.JSONOutcome && i.OutcomeDetail && (i.OutcomeDetail.TransactionId = i.JSONOutcome.TransactionId), n ? _("demoOutcome", i) : _("gameOutcome", i)
                },
                H = function(e) {
                    w = !!e
                };
            window.addEventListener("message", k, !0), window.top !== window && window.addEventListener("message", G, !0), t("initialised and listening for messages"), window.top === window && window.addEventListener("com.igt.events.orientationchange", function(e) {
                _("orientationchange", e.orientation)
            }, !1), window.addEventListener("beforeunload", s);
            var U = {
                    addEvent: S._addEvent,
                    addEvents: S._addEvents,
                    addOneShotEvent: S._addOneShotEvent,
                    removeEvent: S._removeEvent,
                    removeEvents: S._removeEvents,
                    sendMessage: _,
                    sendReply: F,
                    enableEvents: H,
                    registerControl: z,
                    sendOutcome: N,
                    setCurrencyFormat: b
                },
                W = (S._addEvent, S._addEvents, S._addOneShotEvent, S._removeEvent, S._removeEvents, S._fireEvent, {
                    setMessageOrigin: P,
                    setCurrencyFormat: b,
                    sendOutcome: N,
                    getGameInterface: function() {
                        return delete W.getGameInterface, delete W.getBridgeInterface, U
                    },
                    getBridgeInterface: function() {
                        return delete W.getGameInterface, delete W.getBridgeInterface, U
                    },
                    addEvent: S._addEvent,
                    addEvents: S._addEvents,
                    addOneShotEvent: S._addOneShotEvent,
                    removeEvent: S._removeEvent,
                    removeEvents: S._removeEvents,
                    resume: D,
                    sendMessage: _,
                    sendReply: F,
                    setMessageOrigin: P,
                    enableEvents: H,
                    fireEvent: S._fireEvent,
                    registerControl: z,
                    commands: R,
                    MXFflags: o,
                    launchParameters: x,
                    setLogger: r,
                    unload: a
                });
            return W
        }(), e
    }
}), define("consoleservice/consoleconnector/MXFAdapter", ["require", "consoleservice/consoleconnector/MXF"], function(e) {
    "use strict";

    function n(e) {
        C("consoleInitialised", function(n) {
            e(n)
        }, A.length)
    }

    function t(e) {
        G = e
    }

    function i(e, n) {
        A = e.consoles, F = A[0];
        var t = 0,
            i = e.timeout(),
            r = {},
            s = function(e) {
                e && Object.keys(e).forEach(function(n) {
                    r[n] = e[n]
                }), ++t >= A.length && (clearTimeout(i), D.igt.mxf.removeEvent("consoleInitialised", s), A.forEach(function(e, n) {
                    D.igt.mxf.setMessageOrigin(e.childNodes[0].contentWindow, e.childNodes[0].src)
                }), H = !0, n(r))
            };
        A.length > 0 ? (D.igt.mxf.addEvent("consoleInitialised", s), A.forEach(function(e, n) {
            e.style.height = "0", e.childNodes[0].style.width = "100%", e.childNodes[0].style.height = "100%"
        })) : s(), D.igt.mxf.addEvents({
            consoleResize: function(e) {
                var n = window.event || D.igt.mxf.eventHandle;
                A.forEach(function(t) {
                    if (t.firstChild.contentWindow && t.firstChild.contentWindow === n.source) {
                        if (t.id && (0 === t.id.indexOf("L") || 0 === t.id.indexOf("R")) && t.firstChild.style.width !== e || t.firstChild.style.height !== e || t.id && (0 === t.id.indexOf("T") || 0 === t.id.indexOf("B")) && t.style.height !== e || t.id && (0 === t.id.indexOf("L") || 0 === t.id.indexOf("R")) && t.style.width !== e)
                            if (0 === e) {
                                if (t.id && U[t.id]) {
                                    var i = Math.max(parseInt(e), U[t.id].reserved);
                                    U[t.id].size !== i && (U[t.id].size = i, U.hasChanged = !0)
                                }!t.id || 0 !== t.id.indexOf("L") && 0 !== t.id.indexOf("R") ? (t.style.height = e, t.firstChild.style.height = e, t.firstChild.style.width = "1px", t.firstChild.style.minWidth = "100%") : (t.style.width = e, t.firstChild.style.width = e)
                            } else {
                                if (t.id && U[t.id]) {
                                    var i = Math.max(parseInt(e), U[t.id].reserved);
                                    U[t.id].size !== i && (U[t.id].size = i, U.hasChanged = !0)
                                }
                                if (!t.id || 0 !== t.id.indexOf("L") && 0 !== t.id.indexOf("R"))
                                    if (e.indexOf("%") >= 0) t.style.height = e, t.firstChild.style.height = "100%", t.style.overflow = "inherit";
                                    else {
                                        var o = F.parentElement.offsetHeight;
                                        0 === t.id.indexOf("T") ? o -= U.BCustomView.size : o -= U.TCustomView.size;
                                        var r = U[t.id].reserved;
                                        t.style.height = Math.min(o, Math.max(parseInt(r), parseInt(e))) + "px", t.firstChild.style.height = e, parseInt(e) > o ? t.style.overflowY = "scroll" : t.style.overflow = "inherit"
                                    }
                                else {
                                    if (e.indexOf("%") >= 0) t.style.width = e, t.firstChild.style.width = "100%", t.style.overflow = "inherit";
                                    else {
                                        var s = F.parentElement.offsetWidth;
                                        0 === t.id.indexOf("L") ? s -= U.RCustomView.size : s -= U.LCustomView.size, t.style.width = Math.min(s, parseInt(e)) + "px", t.firstChild.style.width = e, parseInt(e) > s ? t.style.overflowX = "scroll" : t.style.overflow = "inherit"
                                    }
                                    t.style.height = window.innerHeight - (U.TCustomView.reserved + U.BCustomView.reserved) + "px", t.firstChild.style.height = window.innerHeight - (U.TCustomView.reserved + U.BCustomView.reserved) + "px", t.style.top = U.TCustomView.reserved + "px"
                                }
                                U[t.id].reserved ? t.firstChild.style.minHeight = U[t.id].reserved + "px" : t.firstChild.style.minHeight = "0"
                            }
                        G && U.hasChanged && (G(U), U.hasChanged = !1)
                    }
                }), D.igt.mxf.sendReply("consoleResized", e, n)
            },
            reserveSize: function(e) {
                var n = window.event || D.igt.mxf.eventHandle,
                    t = parseInt(e);
                A.forEach(function(e) {
                    e.firstChild.contentWindow && e.firstChild.contentWindow === n.source && (W = t, e.id && U[e.id] && U[e.id].reserved !== t && (U[e.id].reserved = t, U.hasChanged = !0))
                }), G && U.hasChanged && (G(U), U.hasChanged = !1), D.igt.mxf.sendReply("reservedSize", t, n)
            },
            haltGame: o,
            pauseGame: function() {
                var e;
                z || (D.igt.mxf.enableEvents(1), e = F.style.height, z = !0, F.style.visibility = "visible", F.style.height = "100%", y("unPauseGame", function() {
                    F.style.height = e, z = !1, N && N(), N = !1
                }, A.length))
            }
        })
    }

    function o() {
        D.igt.mxf.enableEvents(1), R = !0, z = !0
    }

    function r(e) {
        return e instanceof Array ? e : e ? [e] : []
    }

    function s() {
        return z
    }

    function a() {
        return R
    }

    function c(e) {
        N = e
    }

    function l(e, n) {
        var t = JSON.parse(JSON.stringify(e));
        t.Buttons.Button && (t.Buttons = r(t.Buttons.Button)), C("resume", function(e, i) {
            t.Buttons[e] ? n(t.Buttons[e].Cmd, i) : n(null)
        }, A.length), D.igt.mxf.enableEvents(1), D.igt.mxf.sendMessage("displayMessage", t.Id, t.Reference, t.Message, Array.prototype.map.call(t.Buttons, function(e) {
            return e.Text
        }), t.extraInfo ? t.extraInfo : void 0, Array.prototype.map.call(t.Buttons, function(e) {
            return e.Cmd ? {
                text: e.Text,
                name: e.Cmd["@name"],
                param: u(e.Cmd.Param)
            } : void 0
        }))
    }

    function d(e, n) {
        C("resume", function(t) {
            n(e["@name"], e.Param, t)
        }, A.length), D.igt.mxf.sendMessage("command", e["@name"], e.Param)
    }

    function u(e, n) {
        var t, i, o, r = {};
        if (e)
            for (Array.isArray(e) || (e = [e]), t = 0; t < e.length; t++) i = e[t], i["@name"] && (r[i["@name"]] = i["#text"]);
        if (n)
            for (o in n) r[o] = n[o];
        return r
    }

    function f(e, n, t) {
        D.igt.mxf.setCurrencyFormat({
            config: e.CURRENCY,
            toCurrency: n,
            format: t
        })
    }

    function m(e, n) {
        D.igt.mxf.sendOutcome(e, n)
    }

    function p() {}

    function g() {}

    function h(e, n) {
        D.igt.mxf.addEvent(e, n)
    }

    function v(e) {
        D.igt.mxf.addEvents(e)
    }

    function y(e, n) {
        D.igt.mxf.addOneShotEvent(e, n)
    }

    function C(e, n, t) {
        var i = t,
            o = [],
            r = function() {
                arguments && arguments.length > 0 && (o = arguments), 0 == --i && (D.igt.mxf.removeEvent(e, r), n.apply(this, o))
            };
        D.igt.mxf.addEvent(e, r)
    }

    function b(e, n) {
        D.igt.mxf.removeEvent(e, n)
    }

    function E(e) {
        D.igt.mxf.removeEvents(e)
    }

    function w() {
        H && D.igt.mxf.resume.apply(null, arguments)
    }

    function S(e, n) {
        H && D.igt.mxf.sendMessage(e, n)
    }

    function I(e, n) {
        C("resume", function() {
            n()
        }, A.length), D.igt.mxf.enableEvents(1), S("config", e)
    }

    function M(e, n) {
        S("command", {
            "@name": e,
            Param: n
        })
    }

    function x() {}

    function O() {}

    function T(e) {
        return D.igt.mxf.registerControl(e)
    }

    function B() {}

    function P() {}

    function _() {
        A.forEach(function(e, n) {
            e.childNodes[0].style.visibility = "visible"
        })
    }

    function L() {
        A.forEach(function(e, n) {
            e.childNodes[0].style.visibility = "hidden"
        })
    }
    var F, A, G, k, D = e("consoleservice/consoleconnector/MXF")(),
        R = !1,
        z = !1,
        N = !1,
        H = !1,
        U = {
            TCustomView: {
                size: 0,
                reserved: 0
            },
            BCustomView: {
                size: 0,
                reserved: 0
            },
            LCustomView: {
                size: 0,
                reserved: 0
            },
            RCustomView: {
                size: 0,
                reserved: 0
            },
            hasChanged: !1
        },
        W = 0;
    return function() {
        return {
            init: n,
            setMessageOrigin: i,
            setCurrencyFormat: f,
            sendOutcome: m,
            sendConfig: I,
            getGameInterface: p,
            getBridgeInterface: g,
            addEvent: h,
            addEvents: v,
            addOneShotEvent: y,
            addNShotEvent: C,
            removeEvent: b,
            removeEvents: E,
            resume: w,
            sendMessage: S,
            sendCommand: M,
            enableEvents: x,
            fireEvent: O,
            registerControl: T,
            commands: B,
            MXFFlags: P,
            showMessage: l,
            doMessageCommand: d,
            show: _,
            hide: L,
            isGamePaused: s,
            isGameHalted: a,
            setUnPauseGame: c,
            setResizeCallback: t,
            haltGame: o,
            setLogger: function(e) {
                k = e, D.igt.mxf.setLogger(k)
            }
        }
    }
}), define("consoleservice/messagebox/ui/DOMDesktopStandardUI", ["require"], function(e) {
    function n(e) {
        if (!e) throw new Error("DOMStandardUI initialize error: config parameter required");
        if (!e.root) throw new Error("DOMStandardUI: create UI require root object in config parameter");
        if (!e.strings) throw new Error("DOMStandardUI: create UI require strings object in config parameter");
        e.strings.hasOwnProperty("errId") || (e.strings.errId = "errorid"), g = e.root, w = e.strings.errId, h = document.createElement("div"), h.classList.add("MB_overlay"), v = document.createElement("div"), v.classList.add("MB_messageBoxDiv"), y = document.createElement("div"), y.classList.add("MB_messageInfoDiv"), C = document.createElement("div"), C.classList.add("MB_errorIdDiv"), E = document.createElement("div"), E.classList.add("MB_supportInfoDiv"), v.appendChild(y), v.appendChild(E), b = document.createElement("div"), b.classList.add("MB_ButtonGroup"), b.appendChild(C), v.appendChild(b);
        var n = document.createElement("div");
        n.classList.add("MB_centering"), n.appendChild(v), h.appendChild(n), S = !0
    }

    function t(e, n) {
        var t = [];
        e && "Button" in e && (f(e.Button) ? t = e.Button : t.push(e.Button)), b.innerHTML = "", b.appendChild(C);
        var o, r, s, a, c;
        for (o = 0; o < t.length; o++) {
            r = t[o], a = "", "Cmd" in r && "@name" in r.Cmd && (a = r.Cmd["@name"], "Param" in r.Cmd && (c = r.Cmd.Param)), s = i(a, r.Text, c, n);
            var l = document.createElement("div");
            l.classList.add("MB_ButtonPositioner"), o === t.length - 1 && (s.classList.add("MB_FirstButton"), l.classList.add("MB_FirstPositioner")), l.appendChild(s), b.appendChild(l)
        }
    }

    function i(e, n, t, i) {
        var o;
        return o = document.createElement("div"), o.classList.add("MB_Button"), o = m(o), o.appendChild(document.createTextNode(n)), o.addEventListener("click", function(e, n) {
            return function t(r) {
                i && (setTimeout(function() {
                    i(e, n)
                }, 0), o.removeEventListener("click", t), l())
            }
        }(e, t)), o
    }

    function o(e, n) {
        if (!S) throw new Error("DOMStandardUI: not created");
        d(), y.innerHTML = e.Message.replace(/\n/g, "<br>"), e.SupportInfo ? (E.innerHTML = e.SupportInfo.Message.replace(/\n/g, "<br>"), e.SupportInfo.Email && e.SupportInfo.Email.replace && (E.innerHTML += "<br>" + e.SupportInfo.Email.replace(/\n/g, "<br>")), e.SupportInfo.PhoneNumber && e.SupportInfo.PhoneNumber.replace && (E.innerHTML += "<br>" + e.SupportInfo.PhoneNumber.replace(/\n/g, "<br>")), E.style.padding = "", E.style.visibility = "inherit") : (E.style.padding = "0", E.style.visibility = "hidden");
        var i = s(e),
            o = !0;
        i ? (C.style.visibility = "inherit", C.style.padding = "", x.indexOf(i) >= 0 ? C.innerHTML = i : -1 === M.indexOf(i) ? C.innerHTML = w + " " + i : (C.style.padding = "0", C.style.visibility = "hidden", o = !1)) : (C.style.padding = "0", C.style.visibility = "hidden", o = !1), t(e.Buttons, n), Array.isArray(e.Buttons.Button) && e.Buttons.Button.length % 2 == 0 ? (b.classList.remove("MB_errorInline"), b.classList.remove("MB_wideLast")) : o ? (b.classList.add("MB_errorInline"), b.classList.remove("MB_wideLast")) : (b.classList.add("MB_wideLast"), b.classList.remove("MB_errorInline"))
    }

    function r() {
        function e(n, t, i, o, a) {
            var c = parseFloat(n.style.maxWidth),
                l = parseInt(getComputedStyle(n).height),
                d = parseInt(getComputedStyle(n).width);
            if (t > 0 && c >= i || t < 0 && c <= i) return void((r < l || s < d) && function e(t) {
                var i = parseFloat(n.style.fontSize);
                i < t || (n.style.fontSize = i + o + "em", l = parseInt(getComputedStyle(n).height), d = parseInt(getComputedStyle(n).width), (r < l || s < d) && e(t))
            }(a));
            n.style.maxWidth = c + t + "em", l = parseInt(getComputedStyle(n).height), (r < l || s < d) && e(n, t, i, o, a)
        }
        var n = getComputedStyle(v),
            t = getComputedStyle(g),
            i = parseInt(n.height),
            o = parseInt(n.width),
            r = parseInt(t.height),
            s = parseInt(t.width);
        i >= r ? e(v, 3, 36, -.1, .6) : o >= s && e(v, -3, "90%", -.1, .6)
    }

    function s(e) {
        return e ? e.Reference ? e.Reference : e.Id ? e.Id : void 0 : ""
    }

    function a() {
        if (!S) throw new Error("DOMStandardUI: not created");
        g.contains(h) || g.appendChild(h), h.style.display = "block", I = !0, window.innerWidth > window.innerHeight ? h.classList.add("landscape") : h.classList.remove("landscape"), r(), h.style.visibility = "visible"
    }

    function c() {
        S && (h.style.display = "none", h.style.visibility = "hidden", I = !1)
    }

    function l() {
        c(), d()
    }

    function d() {
        v && (v.style.maxWidth = "26.5em", v.style.fontSize = "1.0em"), y && (y.innerHTML = ""), b && (b.innerHTML = ""), E && (E.innerHTML = ""), C && (C.innerHTML = "")
    }

    function u() {
        h.style.width = "100%", h.style.height = "100%", window.innerWidth > window.innerHeight ? h.classList.add("landscape") : h.classList.remove("landscape")
    }

    function f(e) {
        return Array.isArray(e)
    }

    function m(e) {
        return e.style["-webkit-user-select"] = "none", e.style["-moz-user-select"] = "none", e.style["-ms-user-select"] = "none", e.style["user-select"] = "none", e
    }

    function p(e) {
        e.specialErrorID && (M = e.specialErrorID), e.nonErrorIds && (x = e.nonErrorIds)
    }
    var g, h, v, y, C, b, E, w, S = !1,
        I = !1,
        M = [],
        x = [];
    return Object.freeze({
        create: function(e) {
            return n(e), this
        },
        update: function(e, n) {
            return o(e, n), this
        },
        show: a,
        resize: u,
        init: p
    })
}), define("consoleservice/messagebox/ui/DOMDesktopMiniUI", ["require"], function(e) {
    function n(e) {
        if (!e) throw new Error("DOMDesktopMiniUI initialize error: config parameter required");
        if (!e.root) throw new Error("DOMDesktopMiniUI: create UI require root object in config parameter");
        if (!e.strings) throw new Error("DOMDesktopMiniUI: create UI require strings object in config parameter");
        e.strings.hasOwnProperty("errId") || (e.strings.errId = "errorid"), g = e.root, w = e.strings.errId, h = document.createElement("div"), h.style.display = "none", h.style.position = "absolute", h.style.top = 0, h.style.left = 0, h.style.backgroundColor = "rgba(0, 0, 0, 0.4)", h.style.width = "100%", h.style.height = "100%", h.style.minHeight = "100%", h.style.textAlign = "center", h.style.fontFamily = "Arial, Helvetica, sans-serif", h.style.zIndex = 9999, v = document.createElement("div"), v.style.position = "relative", v.style.minWidth = "2.5em", v.style.maxWidth = "16.5em", v.style.backgroundColor = "rgba(255, 255, 255, 0.94)", v.style.margin = "0 auto", v.style.borderRadius = "15px", v.style.border = "2px solid black", v.style.boxShadow = "2px 2px 8px #000", v.style.fontSize = "0.9em", y = document.createElement("div"), y.style.margin = "0", y.style.padding = "1em 1em 0.5em 1em", y.style.fontWeight = "bold", y.style.fontSize = "1.0em", y.style.lineHeight = "1.5em", C = document.createElement("div"), C.style.fontWeight = "normal", C.style.fontSize = "0.9em", C.style.padding = "0em 1em 1em 1em", C.style.lineHeight = "1.5em", E = document.createElement("div"), E.style.fontWeight = "normal", E.style.fontSize = "0.9em", E.style.padding = "0.5em", E.style.borderTop = "1px solid rgb(212, 212, 212)", E.style.lineHeight = "1.2em", v.appendChild(y), v.appendChild(C), v.appendChild(E), b = document.createElement("div"), v.appendChild(b);
        var n = document.createElement("div");
        n.style.height = "inherit", n.style.width = "inherit", n.style.display = "box", n.style.display = "flex", n.style.display = "-webkit-box", n.style.display = "-moz-box", n.style.display = "-ms-flexbox", n.style.webkitBoxAlign = "center", n.style.webkitBoxPack = "center", n.style.MozBoxAlign = "center", n.style.MozBoxPack = "center", n.style.msFlexDirection = "column", n.style.msFlexAlign = "center", n.style.msFlexPack = "center", n.appendChild(v), h.appendChild(n), S = !0
    }

    function t(e, n) {
        var t = [];
        e && "Button" in e && (f(e.Button) ? t = e.Button : t.push(e.Button)), b.innerHTML = "";
        var o, r, s, a, c;
        for (o = 0; o < t.length; o++) r = t[o], a = "", "Cmd" in r && "@name" in r.Cmd && (a = r.Cmd["@name"], "Param" in r.Cmd && (c = r.Cmd.Param)), s = i(a, r.Text, c, n), b.appendChild(s)
    }

    function i(e, n, t, i) {
        var o;
        return o = document.createElement("div"), o.style.color = "#1b9ddb", o.style.padding = "1.0em", o.style.fontWeight = "bold", o.style.fontSize = "1.0em", o.style.borderTop = "1px solid #d4d4d4", o.style.cursor = "pointer", o = m(o), o.appendChild(document.createTextNode(n)), o.addEventListener("click", function(e, n) {
            return function t(r) {
                i && (setTimeout(function() {
                    i(e, n)
                }, 0), o.removeEventListener("click", t), l())
            }
        }(e, t)), o
    }

    function o(e, n) {
        if (!S) throw new Error("DOMDesktopMiniUI: not created");
        d(), y.innerHTML = e.Message.replace(/\n/g, "<br>"), e.SupportInfo ? (E.innerHTML = e.SupportInfo.Message.replace(/\n/g, "<br>"), e.SupportInfo.Email && e.SupportInfo.Email.replace && (E.innerHTML += "<br>" + e.SupportInfo.Email.replace(/\n/g, "<br>")), e.SupportInfo.PhoneNumber && e.SupportInfo.PhoneNumber.replace && (E.innerHTML += "<br>" + e.SupportInfo.PhoneNumber.replace(/\n/g, "<br>")), E.style.padding = "0.5em", E.style.visibility = "inherit") : (E.style.padding = "0", E.style.visibility = "hidden");
        var i = s(e);
        i && (x.indexOf(i) >= 0 ? C.innerHTML = i : -1 === M.indexOf(i) && (C.innerHTML = w + " " + i)), t(e.Buttons, n)
    }

    function r() {
        function e(n, t, i, o, a) {
            var c = parseFloat(n.style.maxWidth),
                l = parseInt(getComputedStyle(n).height),
                d = parseInt(getComputedStyle(n).width);
            if (t > 0 && c >= i || t < 0 && c <= i) return void((r < l || s < d) && function e(t) {
                var i = parseFloat(n.style.fontSize);
                i < t || (n.style.fontSize = i + o + "em", l = parseInt(getComputedStyle(n).height), d = parseInt(getComputedStyle(n).width), (r < l || s < d) && e(t))
            }(a));
            n.style.maxWidth = c + t + "em", l = parseInt(getComputedStyle(n).height), (r < l || s < d) && e(n, t, i, o, a)
        }
        var n = getComputedStyle(v),
            t = getComputedStyle(g),
            i = parseInt(n.height),
            o = parseInt(n.width),
            r = parseInt(t.height),
            s = parseInt(t.width);
        i >= r ? e(v, 3, 36, -.1, .6) : o >= s && e(v, -3, 16.5, -.1, .6)
    }

    function s(e) {
        return e ? e.Reference ? e.Reference : e.Id ? e.Id : void 0 : ""
    }

    function a() {
        if (!S) throw new Error("DOMDesktopMiniUI: not created");
        g.contains(h) || g.appendChild(h), h.style.display = "block", I = !0, r(), h.style.visibility = "visible"
    }

    function c() {
        S && (h.style.display = "none", h.style.visibility = "hidden", I = !1)
    }

    function l() {
        c(), d()
    }

    function d() {
        v && (v.style.maxWidth = "16.5em", v.style.fontSize = "0.9em"), y && (y.innerHTML = ""), b && (b.innerHTML = ""), E && (E.innerHTML = ""), C && (C.innerHTML = "")
    }

    function u() {
        h.style.width = "100%", h.style.height = "100%"
    }

    function f(e) {
        return Array.isArray(e)
    }

    function m(e) {
        return e.style["-webkit-user-select"] = "none", e.style["-moz-user-select"] = "none", e.style["-ms-user-select"] = "none", e.style["user-select"] = "none", e
    }

    function p(e) {
        e.specialErrorID && (M = e.specialErrorID), e.nonErrorIds && (x = e.nonErrorIds)
    }
    var g, h, v, y, C, b, E, w, S = !1,
        I = !1,
        M = [],
        x = [];
    return Object.freeze({
        create: function(e) {
            return n(e), this
        },
        update: function(e, n) {
            return o(e, n), this
        },
        show: a,
        resize: u,
        init: p
    })
}), define("consoleservice/messagebox/ui/DOMTabletMiniUI", ["require"], function(e) {
    function n(e) {
        if (!e) throw new Error("DOMTabletMiniUI initialize error: config parameter required");
        if (!e.root) throw new Error("DOMTabletMiniUI: create UI require root object in config parameter");
        if (!e.strings) throw new Error("DOMTabletMiniUI: create UI require strings object in config parameter");
        e.strings.hasOwnProperty("errId") || (e.strings.errId = "errorid"), v = e.root, I = e.strings.errId, y = document.createElement("div"), y.style.display = "none", y.style.visibility = "hidden", y.style.position = "absolute", y.style.top = 0, y.style.left = 0, y.style.backgroundColor = "rgba(0, 0, 0, 0.4)", y.style.width = "100%", y.style.height = "100%", y.style.minHeight = "100%", y.style.textAlign = "center", y.style.fontFamily = "Arial, Helvetica, sans-serif", y.style.zIndex = 9999, C = document.createElement("div"), C.style.position = "relative", C.style.minWidth = "2.5em", C.style.maxWidth = "16.5em", C.style.backgroundColor = "rgba(255, 255, 255, 0.94)", C.style.margin = "0 auto", C.style.borderRadius = "15px", C.style.border = "2px solid black", C.style.boxShadow = "2px 2px 8px #000", C.style.fontSize = "0.9em", b = document.createElement("div"), b.style.margin = "0", b.style.padding = "1em 1em 0.5em 1em", b.style.fontWeight = "bold", b.style.fontSize = "1.0em", b.style.lineHeight = "1.5em", E = document.createElement("div"), E.style.fontWeight = "normal", E.style.fontSize = "0.9em", E.style.padding = "0em 1em 1em 1em", E.style.lineHeight = "1.5em", S = document.createElement("div"), S.style.fontWeight = "normal", S.style.fontSize = "0.9em", S.style.padding = "0.5em", S.style.borderTop = "1px solid rgb(212, 212, 212)", S.style.lineHeight = "1.2em", C.appendChild(b), C.appendChild(E), C.appendChild(S), w = document.createElement("div"), C.appendChild(w);
        var n = document.createElement("div");
        n.style.height = "inherit", n.style.width = "inherit", n.style.display = "box", n.style.display = "flex", n.style.display = "-webkit-box", n.style.display = "-moz-box", n.style.display = "-ms-flexbox", n.style.webkitBoxAlign = "center", n.style.webkitBoxPack = "center", n.style.MozBoxAlign = "center", n.style.MozBoxPack = "center", n.style.msFlexDirection = "column", n.style.msFlexAlign = "center", n.style.msFlexPack = "center", n.appendChild(C), y.appendChild(n), M = !0, window.addEventListener("orientationchange", r)
    }

    function t(e, n) {
        var t = [];
        e && "Button" in e && (p(e.Button) ? t = e.Button : t.push(e.Button)), w.innerHTML = "";
        var o, r, s, a, c;
        for (o = 0; o < t.length; o++) r = t[o], a = "", "Cmd" in r && "@name" in r.Cmd && (a = r.Cmd["@name"], "Param" in r.Cmd && (c = r.Cmd.Param)), s = i(a, r.Text, c, n), w.appendChild(s)
    }

    function i(e, n, t, i) {
        var o;
        return o = document.createElement("div"), o.style.color = "#1b9ddb", o.style.padding = "15px", o.style.fontWeight = "bold", o.style.fontSize = "1.0em", o.style.borderTop = "1px solid #d4d4d4", o.style.cursor = "pointer", o = g(o), o.appendChild(document.createTextNode(n)), o.addEventListener("click", function(e, n) {
            return function t(r) {
                i && (setTimeout(function() {
                    i(e, n)
                }, 0), o.removeEventListener("click", t), u())
            }
        }(e, t)), o
    }

    function o(e, n) {
        if (!M) throw new Error("DOMTabletMiniUI: not created");
        f(), b.innerHTML = e.Message.replace(/\n/g, "<br>"), e.SupportInfo ? (S.innerHTML = e.SupportInfo.Message.replace(/\n/g, "<br>"), e.SupportInfo.Email && e.SupportInfo.Email.replace && (S.innerHTML += "<br>" + e.SupportInfo.Email.replace(/\n/g, "<br>")), e.SupportInfo.PhoneNumber && e.SupportInfo.PhoneNumber.replace && (S.innerHTML += "<br>" + e.SupportInfo.PhoneNumber.replace(/\n/g, "<br>")), S.style.padding = "0.5em", S.style.visibility = "inherit") : (S.style.padding = "0", S.style.visibility = "hidden");
        var i = c(e);
        i && (T.indexOf(i) >= 0 ? E.innerHTML = i : -1 === O.indexOf(i) && (E.innerHTML = I + " " + i)), t(e.Buttons, n)
    }

    function r() {
        x && (a(), setTimeout(function() {
            x && a()
        }, 1e3))
    }

    function s(e) {
        var n = ["dimension"];
        return n.push(parseInt(e.height)), n.push(parseInt(e.width)), n.join("-")
    }

    function a() {
        function e(n, t, i, o, s) {
            var c = parseFloat(n.style.maxWidth),
                l = parseInt(getComputedStyle(n).height),
                d = parseInt(getComputedStyle(n).width);
            if (t > 0 && c >= i || t < 0 && c <= i) return void((r < l || a < d) && function e(t) {
                var i = parseFloat(n.style.fontSize);
                i < t || (n.style.fontSize = i + o + "em", l = parseInt(getComputedStyle(n).height), d = parseInt(getComputedStyle(n).width), (r < l || a < d) && e(t))
            }(s));
            n.style.maxWidth = c + t + "em", l = parseInt(getComputedStyle(n).height), (r < l || a < d) && e(n, t, i, o, s)
        }
        var n = getComputedStyle(C),
            t = getComputedStyle(v),
            i = parseInt(n.height),
            o = parseInt(n.width),
            r = parseInt(t.height),
            a = parseInt(t.width),
            c = s(t),
            l = B[c];
        if (l) return C.style.maxWidth = l.maxWidth, void(C.style.fontSize = l.fontSize);
        i >= r ? e(C, 3, 36, -.1, .6) : o >= a && e(C, -3, 16.5, -.1, .6), B[c] = {
            maxWidth: C.style.maxWidth,
            fontSize: C.style.fontSize
        }
    }

    function c(e) {
        return e ? e.Reference ? e.Reference : e.Id ? e.Id : void 0 : ""
    }

    function l() {
        if (!M) throw new Error("DOMTabletMiniUI: not created");
        v.contains(y) || v.appendChild(y), y.style.display = "block", x = !0, a(), y.style.visibility = "visible"
    }

    function d() {
        M && (y.style.display = "none", y.style.visibility = "hidden", x = !1)
    }

    function u() {
        d(), f()
    }

    function f() {
        C && (C.style.maxWidth = "16.5em", C.style.fontSize = "0.9em", B = {}), b && (b.innerHTML = ""), w && (w.innerHTML = ""), S && (S.innerHTML = ""), E && (E.innerHTML = "")
    }

    function m() {
        y.style.width = "100%",
            y.style.height = "100%"
    }

    function p(e) {
        return Array.isArray(e)
    }

    function g(e) {
        return e.style["-webkit-user-select"] = "none", e.style["-moz-user-select"] = "none", e.style["-ms-user-select"] = "none", e.style["user-select"] = "none", e
    }

    function h(e) {
        e.specialErrorID && (O = e.specialErrorID), e.nonErrorIds && (T = e.nonErrorIds)
    }
    var v, y, C, b, E, w, S, I, M = !1,
        x = !1,
        O = [],
        T = [],
        B = {};
    return Object.freeze({
        create: function(e) {
            return n(e), this
        },
        update: function(e, n) {
            return o(e, n), this
        },
        show: l,
        resize: m,
        init: h
    })
}), define("consoleservice/messagebox/ui/UIProxy", ["require", "consoleservice/messagebox/ui/DOMDesktopStandardUI", "consoleservice/messagebox/ui/DOMDesktopMiniUI", "consoleservice/messagebox/ui/DOMDesktopStandardUI", "consoleservice/messagebox/ui/DOMDesktopStandardUI", "consoleservice/messagebox/ui/DOMTabletMiniUI"], function(e) {
    "use strict";
    var n, t = !1,
        i = ["1069", "1610", "1618", "9010", "9030", "9031", "9032", "1633", "9020", "9022", "GS-003", "CD-108", "CD-111", "GM-012"],
        o = ["2201"];
    return function(r, s, a, c) {
        function l(e) {
            t || n.create(e)
        }

        function d(e, i) {
            "FREESPIN_CONGRATULATION" === e["@type"] || "FREESPIN_CONGRATULATION_NOT_WIN" === e["@type"] ? (t = !0, c.request({
                channel: "ConsoleService",
                topic: "MessageBox.PFSCONGRATULATION",
                data: {
                    message: e
                }
            }, i)) : "FREESPIN_TABLE_BET_WARN" === e["@type"] ? (t = !0, c.request({
                channel: "ConsoleService",
                topic: "MessageBox.PFSTABLEBETWARN",
                data: {
                    message: e
                }
            }, i)) : "FREESPIN_3RD_LOADING_ERROR" === e["@type"] ? (t = !0, c.request({
                channel: "ConsoleService",
                topic: "MessageBox.PFSISBLOADINGERROR",
                data: {
                    message: e
                }
            }, i)) : (t = !1, n.update(e, i))
        }

        function u() {
            t || n.show()
        }

        function f() {
            n.resize()
        }
        return "FREESPIN_CONGRATULATION" === a ? t = !0 : ("int" === r ? ("std" === s && (n = e("consoleservice/messagebox/ui/DOMDesktopStandardUI")), "min" === s && (n = e("consoleservice/messagebox/ui/DOMDesktopMiniUI"))) : "mob" === r ? "std" === s && (n = e("consoleservice/messagebox/ui/DOMDesktopStandardUI")) : "tab" === r && ("std" === s && (n = e("consoleservice/messagebox/ui/DOMDesktopStandardUI")), "min" === s && (n = e("consoleservice/messagebox/ui/DOMTabletMiniUI"))), t = !1, n.init({
            specialErrorID: i,
            nonErrorIds: o
        })), Object.freeze({
            create: function(e) {
                return l(e), this
            },
            update: function(e, n) {
                return d(e, n), this
            },
            show: u,
            resize: f
        })
    }
}), define("consoleservice/messagebox/MessageBox", ["require", "consoleservice/messagebox/ui/UIProxy"], function(e) {
    "use strict";

    function n(e) {
        if (!e) throw new Error("MessageBox: message data is required for showing message");
        e = d(e), c(e)
    }

    function t() {
        if (!F) {
            var e = D ? _ : a();
            if (D = !1, _ = e, !e) return void(k && (k(), k = null));
            var n = e.message,
                t = e.messageID;
            F = !0, s(n, function(e, r, s) {
                o(n, e, r);
                F = !1, i(e, n) ? (P.postErrorEvent(n.Id, B), w.request({
                    channel: "ConsoleService",
                    topic: "UKRCNotify",
                    data: {
                        messageId: n.Id,
                        cmdName: e
                    }
                }, function(n) {
                    f(t, e, r), s()
                }, function(e) {
                    s()
                })) : (f(t, e, r), P.postErrorEvent(n.Id, B), s())
            }, function(e, n) {
                m(t, e, n)
            })
        }
    }

    function i(e, n) {
        var t = !1;
        return "viewAccountHistory" !== e && n["@type"] && "REALITY_CHECK" === n["@type"].toUpperCase() && n["@notification"] && "Y" === n["@notification"].toUpperCase() && (t = !0), t
    }

    function o(e, n, t) {
        var i, o, r = !0;
        if ("REALITY_CHECK" === e["@type"] && "viewAccountHistory" === n && t)
            for (l(t) || (t = [t]), i = 0; i < t.length; i++)
                if (o = t[i], o["@name"] && "closeGame" === o["@name"] && o["#text"] && "yes" !== o["#text"].toLowerCase()) {
                    r = !1;
                    break
                }
        return r
    }

    function r(e, n) {
        T = e["@type"], O || h(), O.update(e, n), O.show(), F = !0
    }

    function s(e, n, t) {
        l(e) || (e = [e]);
        var i = e.shift(),
            o = function(o, r) {
                if ("viewAccountHistory" === o) return e.unshift(i), D = !0, void(n && n(o, r, function() {}));
                0 === e.length ? n ? n(o, r, function() {
                    t && t(o, r)
                }) : t && t(o, r) : n ? n(o, r, function() {
                    s(e, n, t)
                }) : s(e, n, t)
            };
        if ("FT-006" === i.Id) r(i, o);
        else {
            var a = function(e) {
                if (e) {
                    F = !0;
                    var n, t = "";
                    "@name" in e && (t = e["@name"], "Param" in e && (n = e.Param)), o(t, n)
                } else r(i, o)
            };
            i.gsType && G ? G(i, function(e) {
                e ? a(e) : A(i, a)
            }) : A(i, a)
        }
    }

    function a() {
        return L && L.length > 0 ? L.shift() : null
    }

    function c(e) {
        e && (L || (L = []), "1613" === e.message.Id && (e.priority = 9999), L.push(e), L.sort(function(e, n) {
            return e.hasOwnProperty("priority") || n.hasOwnProperty("priority") ? !e.hasOwnProperty("priority") && n.hasOwnProperty("priority") ? n.priority > 0 ? -1 : 1 : !n.hasOwnProperty("priority") && e.hasOwnProperty("priority") ? e.priority > 0 ? 1 : -1 : e.priority - n.priority : 0
        }))
    }

    function l(e) {
        return Array.isArray(e)
    }

    function d(e) {
        for (var n, t = {}, i = Object.keys(e), o = 0; o < i.length; o++) n = e[i[o]], l(n) ? t[i[o]] = n.slice(0) : t[i[o]] = n;
        return t
    }

    function u(e, t) {
        var i = {
            messageID: e.messageID
        };
        setTimeout(function() {
            t.reply(null, i)
        }, 0), n(e)
    }

    function f(e, n, t) {
        var i = p(t);
        w.publish({
            channel: "ConsoleService",
            topic: "MessageBox.Close",
            data: {
                messageID: e,
                cmd: {
                    name: n,
                    params: i
                }
            }
        })
    }

    function m(e, n, t) {
        var i = p(t);
        w.publish({
            channel: "ConsoleService",
            topic: "MessageBox.Done",
            data: {
                messageID: e,
                cmd: {
                    name: n,
                    params: i
                }
            }
        })
    }

    function p(e, n) {
        var t, i, o, r = {};
        if (e)
            for (l(e) || (e = [e]), t = 0; t < e.length; t++) i = e[t], i["@name"] && (r[i["@name"]] = i["#text"]);
        if (n)
            for (o in n) r[o] = n[o];
        return r
    }

    function g() {
        O = null, L = [], F = !1
    }

    function h() {
        var n;
        if (!(n = e("consoleservice/messagebox/ui/UIProxy")(I, M, T, w))) throw new Error("MessageBox: channel=" + I + ", presenttype=" + M + " not supported");
        O = n.create({
            root: S,
            strings: x
        })
    }

    function v() {
        O && O.resize()
    }

    function y() {
        w.subscribe({
            channel: "ClientService",
            topic: "MessageBox.DisplayMessage",
            callback: u
        }), w.subscribe({
            channel: "Kernel",
            topic: "System.Resize",
            callback: v
        }), w.subscribe({
            channel: "ClientService",
            topic: "MessageBox.processMessageQueue",
            callback: t
        }), g(), h()
    }

    function C(e) {
        k = e, t()
    }

    function b(e) {}

    function E() {
        g()
    }
    var w, S, I, M, x, O, T, B, P, _, L = [],
        F = !1,
        A = null,
        G = null,
        k = null,
        D = !1;
    return function(e) {
        if (!("bus" in e && null !== e.bus)) throw new Error("MessageBox: message bus object is required");
        if (w = e.bus, !("root" in e && e.root)) throw new Error("MessageBox: root is required");
        if (S = e.root, !("strings" in e && e.strings)) throw new Error("MessageBox: localised strings are required to be included in the config");
        return x = e.strings, I = e.channel ? e.channel.toLowerCase() : "int", M = e.presenttype ? e.presenttype.toLowerCase() : "std", B = e.language ? e.language : "en", A = e.showMessage ? e.showMessage : null, G = e.showGameServiceMessage ? e.showGameServiceMessage : null, P = e.cecCommand, y(), Object.freeze({
            display: n,
            showAnyMessages: C,
            updateClientConfig: b,
            reset: E,
            messageBoxOnStage: function() {
                return F
            }
        })
    }
}), define("consoleservice/consoleconnector/MuteBypass", ["require"], function(e) {
    "use strict";

    function n(e, n) {
        setTimeout(function() {
            e ? (r(c), o("change", ["0", "false"], n.sendEvent)) : (r(a), o("change", ["1", "true"], n.sendEvent))
        }, 0), setTimeout(function() {
            e ? (r(c), o("change", ["0", "false"], n.sendEvent)) : (r(a), o("change", ["1", "true"], n.sendEvent))
        }, 50)
    }

    function t(e) {
        if (!l) return g = !0, void(h = e);
        1 === l.enabled || "1" === l.enabled ? n(e, l) : (h = e, p = !0)
    }

    function i(e, n) {
        m[n] = e, e && !f ? (f = !0, d && d.publish({
            channel: "ConsoleService",
            topic: "Game.Control",
            data: {
                option: "sound",
                value: e ? a : c
            }
        })) : f && 0 === Object.keys(m).filter(function(e) {
            return m[e]
        }).length && (f = !1, d && d.publish({
            channel: "ConsoleService",
            topic: "Game.Control",
            data: {
                option: "sound",
                value: u ? a : c
            }
        }))
    }

    function o(e, t, i) {
        if (!f) {
            if ("change" !== e) return i(e, t), void(p && "enable" === e && (1 !== l.enabled && "1" !== l.enabled || (n(h, l), p = !1)));
            u = t[0] == a, i(e, [u ? a : c]), d.publish({
                channel: "ConsoleService",
                topic: "Global.Mute",
                data: {
                    mute: u
                }
            })
        }
    }

    function r(e) {
        u = a == e, d && !f && d.publish({
            channel: "ConsoleService",
            topic: "Game.Control",
            data: {
                option: "sound",
                value: u ? a : c
            }
        }), d.publish({
            channel: "ConsoleService",
            topic: "Global.Mute",
            data: {
                mute: u
            }
        })
    }

    function s(e, n) {
        d = n, l = e, e.values.forEach(function(e) {
            1 === e || "1" === e ? a = e : c = e
        }), u = e.value == a, g && (g = !1, t(h))
    }
    var a, c, l, d, u = !1,
        f = !1,
        m = {},
        p = !1,
        g = !1,
        h = !0;
    return {
        changeFromGame: o,
        changeFromConsole: r,
        muteFromComponent: i,
        muteWhenAvailable: t,
        register: s
    }
}), define("consoleservice/consoleconnector/ConsoleConnector", ["require", "consoleservice/consoleconnector/MXFAdapter", "consoleservice/messagebox/MessageBox", "consoleservice/consoleconnector/MuteBypass"], function(e) {
    "use strict";

    function n(e, n) {
        me.sendMessage("gameEvent", {
            event: e,
            data: n
        })
    }

    function t(e, n) {
        Oe.push({
            event: e,
            data: n
        })
    }

    function i() {
        Oe.forEach(function(e) {
            n(e.event, e.data)
        }), Oe = []
    }

    function o(e, i, o) {
        function r() {
            xe && (xe = !1, ye ? t("AutoSpinStopped") : n("AutoSpinStopped"))
        }
        te = e.bus(), ne = e.currency, se = e.logger, me.setLogger(se), te.subscribe({
            channel: "Kernel",
            topic: "System.Resize",
            callback: function(e, n) {
                me.sendMessage("orientationchange", null)
            }
        }), te.subscribe({
            channel: "ClientService",
            topic: "Game.Init",
            callback: function() {
                me.setCurrencyFormat(ne.getConfig(), ne.toCurrency, ne.formatFloat)
            }
        }), te.subscribe({
            channel: "Game",
            topic: "Game.Control",
            callback: function(e, n) {
                Ie.indexOf(e.name) < 0 && ("sound" === e.name ? ge.changeFromGame(e.event, e.params, he[e.name].sendEvent) : he[e.name].sendEvent(e.event, e.params))
            }
        }), te.subscribe({
            channel: "Game",
            topic: "Game.Capabilities",
            callback: j
        }), te.subscribe({
            channel: "Game",
            topic: "Game.AutoSpinStart",
            callback: function() {
                n("AutoSpinStarted"), xe = !0
            }
        }), te.subscribe({
            channel: "Game",
            topic: "Game.AutoSpinStopped",
            callback: r
        }), te.subscribe({
            channel: "GameService",
            topic: "Widget.MuteHost",
            callback: function(e, n) {
                ge.muteFromComponent(e.muteHost, "Widget")
            }
        }), te.subscribe({
            channel: "Game",
            topic: "Game.Register",
            callback: function(e, n) {
                var t;
                for (var i in e.options) {
                    if (t = e.options[i], !t.hasOwnProperty("name")) throw new Error("Proxy Control must specify a unique name!");
                    if (!t.hasOwnProperty("type")) throw new Error("Proxy Control must specify a control type!");
                    if (he.hasOwnProperty(t.name)) throw new Error("Proxy Control [" + t.name + "] is already registered!");
                    "sound" === t.name && ge.register(t, te);
                    var o = function(n) {
                        return function(i) {
                            "sound" === e.options[n].name ? ge.changeFromConsole(i) : te.publish({
                                channel: "ConsoleService",
                                topic: "Game.Control",
                                data: {
                                    option: e.options[n].name,
                                    value: i
                                }
                            }), t.value = i
                        }
                    }(i);
                    he[e.options[i].name] = t, Ie.indexOf(e.options[i].name) < 0 && me.registerControl(t).addEvent("change", o)
                }
            }
        }), te.subscribe({
            channel: "Kernel",
            topic: "Game.StartMuted",
            callback: ge.muteWhenAvailable
        }), te.subscribe({
            channel: "Kernel",
            topic: "System.InternalInit",
            callback: function(n, t) {
                i(n), pe = pe({
                    language: n.serverConfig.paramRGS ? n.serverConfig.paramRGS.language : "en",
                    bus: te,
                    root: e.root,
                    channel: n.serverConfig.channel,
                    presenttype: n.serverConfig.presenttype,
                    showMessage: c,
                    showGameServiceMessage: function(e, n) {
                        te.request({
                            channel: "ConsoleService",
                            topic: "GameService.DisplayMessage",
                            data: e
                        }, function(e) {
                            n && n instanceof Function && n(e)
                        }, function() {})
                    },
                    strings: n.stringsConfig,
                    cecCommand: ce
                }), s(n)
            }
        });
        var a = te.subscribe({
            channel: "Kernel",
            topic: "LoadProgress",
            callback: function(e, n) {
                "game" === e.id && (me.sendMessage("loadProgress", {
                    percent: Math.min(Math.round(e.current / e.items * 100), 100),
                    complete: e.complete
                }), e.complete && te.unsubscribe(a))
            }
        });
        o()
    }

    function r(e) {
        return setTimeout(function() {
            we = !1, te.publish({
                channel: "ConsoleService",
                topic: "ErrorHandler.Throw",
                data: {
                    errorCode: "FT-006",
                    priority: 0
                }
            })
        }, e || 2e4)
    }

    function s(e) {
        ve = e, me.setResizeCallback(function(e) {
            ue = e, de || (de = setTimeout(function() {
                te.publish({
                    channel: "ConsoleService",
                    topic: "ConsoleService.Resize",
                    data: e
                }), de = void 0
            }, 50))
        }), me.sendMessage("language", {
            language: e.gameConfig.language
        }), me.sendMessage("gameinfo", {
            gametitle: e.gameConfig.gameTitle,
            softwareid: e.gameConfig.softwareId,
            presenttype: e.serverConfig.presenttype,
            technology: e.serverConfig.paramRGS.technology,
            channel: e.serverConfig.channel
        }), e.gameConfig.isReplay && me.sendMessage("replayInfo", {
            totalRounds: e.serverConfig.totalRounds,
            needShareButton: e.serverConfig.needShareButton,
            replaySessionId: e.serverConfig.replaySessionId,
            replayTransactionId: e.serverConfig.replayTransactionId
        }), te.publish({
            channel: "ConsoleService",
            topic: "ConsoleService.InitDone",
            data: {}
        })
    }

    function a() {
        me.show()
    }

    function c(e, n) {
        we ? me.showMessage(e, n) : n && n instanceof Function && n(null)
    }

    function l(e, n) {
        we ? me.doMessageCommand(e, n) : n && n instanceof Function && n(e["@name"], e.Param)
    }

    function d(e, n) {
        fe && fe(e, n)
    }

    function u(e) {
        fe = e, me.addEvent("command", function(n, t) {
            e(n, t)
        })
    }

    function f(e, n) {
        me.sendMessage(e, n)
    }

    function m(e, n) {
        return ve.stringsConfig[e] || n || e
    }

    function p(e) {
        return me.registerControl(e)
    }

    function g(e) {
        h(), v(), e()
    }

    function h() {
        ie || (ie = me.registerControl({
            type: "balance",
            name: "totalBalance",
            text: m("lblBalance", "Balance"),
            enabled: 1,
            valueText: "0",
            value: 0
        }).addEvent("change", function(e) {
            ce.postRebuy(e), e = parseFloat(e);
            var n = "";
            !isNaN(e) && isFinite(e) ? n = ne.formatFloat(e) : e = NaN, te.publish({
                channel: "ConsoleService",
                topic: "BalanceUpdate",
                data: {
                    balance: n,
                    balanceValue: e
                }
            }), P(e, n)
        }), he[ie.name] = ie)
    }

    function v() {
        !oe && ve && ve.gameConfig && "T" !== ve.gameConfig.gameType && (oe = me.registerControl({
            type: "PromotionalFreeSpinsCount",
            name: "pfsCount",
            text: m("lblFreeSpins", "Promo Rounds"),
            value: 0,
            valueText: "0",
            enabled: 0
        }).addEvent("change", function(e) {}), he[oe.name] = oe)
    }

    function y(e, n) {
        if (re) re.sendEvent("change", e);
        else {
            if (!e || e.length <= 0) return;
            re = me.registerControl({
                type: "PromotionalFreeSpinsInfo",
                name: "pfsInfo",
                text: m("AvailableFreeSpins", "Available Promo Rounds"),
                value: 0,
                valueText: "0",
                enabled: 1,
                info: e
            }).addEvent("change", function(e) {
                n(e)
            }), he[re.name] = re
        }
        te.publish({
            channel: "ConsoleService",
            topic: "PFS.Offer",
            data: e
        })
    }

    function C(e) {
        var n, t = Ce,
            i = function(o) {
                o && (n = o), 0 == --t && (me.removeEvent("resume", i), e(o))
            };
        me.addEvent("resume", i), me.sendMessage("beforeInitGame")
    }

    function b(e) {
        i(), me.addNShotEvent("wagerComplete", function(n) {
            ye = !1, e()
        }, Ce), me.sendMessage("wagerIsComplete")
    }

    function E(e, n) {
        if (ye) e();
        else {
            var t = Ce,
                i = !1,
                o = function(r) {
                    r && (ye = !1, i = !0), 0 == --t && (me.removeEvent("wagerStarted", o), i ? (me.enableEvents(1), n()) : (me.enableEvents(0), e()))
                };
            ye = !0, me.addEvent("wagerStarted", o), me.sendMessage("wagerIsStarting")
        }
    }

    function w(e) {
        i(), ye ? (me.addNShotEvent("wagerAborted", function() {
            ye = !1, e()
        }, Ce), me.enableEvents(1), me.sendMessage("wagerIsAborted")) : e()
    }

    function S(e) {
        me.addNShotEvent("resume", function() {
            e()
        }, Ce), me.enableEvents(1), me.sendMessage("insufficientFundsNotification")
    }

    function I(e, n) {
        var t = Ce,
            i = !1,
            o = function(e) {
                void 0 !== e && null !== e && 0 === e && (i = !0), 0 == --t && (me.removeEvent("resume", o), n(!i))
            };
        me.addEvent("resume", o), me.sendMessage("viewAccountHistory", e)
    }

    function M(e) {
        me.sendMessage("gameReady"), a(), e()
    }

    function x(e, n) {
        var t = "afterGameOutcome";
        "TRY" === ve.serverConfig.paramRGS.wagerType && (t = "afterDemoOutcome"), n && me.addNShotEvent(t, function() {
            n()
        }, Ce), O(e, "TRY" === ve.serverConfig.paramRGS.wagerType)
    }

    function O(e) {
        var n = JSON.parse(JSON.stringify(e)),
            t = n.OutcomeDetail.Balance;
        n.OutcomeDetail.Balance = ne.toStakeUnits(t), n.PromotionalFreeSpin && (n.PromotionalFreeSpin["@gip"] = "InProgress" === e.OutcomeDetail.GameStatus ? "true" : "false"), me.sendOutcome(n, "TRY" === ve.serverConfig.paramRGS.wagerType), ve && ve.gameConfig && "T" === ve.gameConfig.gameType && T(n.Balances)
    }

    function T(e) {
        if (e && e.Balance) {
            var n = Array.isArray(e.Balance) ? e.Balance : [e.Balance],
                t = n.find(function(e) {
                    return "FREESPIN" === e["@name"]
                });
            if (t) {
                var i = parseFloat(t["#text"]),
                    o = ne.formatFloat(i);
                te.publish({
                    channel: "ConsoleService",
                    topic: "PFS.Balance",
                    data: {
                        currency: o,
                        number: i
                    }
                })
            }
        }
    }

    function B(e, n) {
        var t = "afterGameOutcome";
        "TRY" === ve.serverConfig.paramRGS.wagerType && (t = "afterDemoOutcome"), n && me.addNShotEvent(t, function() {
            n()
        }, Ce), me.setCurrencyFormat(ne.getConfig(), ne.toCurrency, ne.formatFloat), O(e, "TRY" === ve.serverConfig.paramRGS.wagerType)
    }

    function P(e, n, t) {
        ie || h(), ie.sendEvent("change", [e, n, t])
    }

    function _(e) {
        ve && ve.gameConfig && "T" !== ve.gameConfig.gameType && (oe || v(), oe.sendEvent("change", [e, e]), te.publish({
            channel: "ConsoleService",
            topic: "PFS.Count",
            data: e
        }))
    }

    function L() {
        Se = !0
    }

    function F() {
        Se = !1, ae && "function" == typeof ae && (ae(), ae = void 0)
    }

    function A() {
        le && "function" == typeof le && (le(), le = void 0)
    }

    function G() {
        return Se || me.isGamePaused()
    }

    function k() {
        return "replay" === ve.serverConfig.playMode && Me
    }

    function D() {
        return me.isGameHalted()
    }

    function R(e) {
        me.isGamePaused() && me.setUnPauseGame(e), Se && (ae = e)
    }

    function z(e) {
        Me && (le = e)
    }

    function N(e, n) {
        Ce = e ? e.length : 0, me.setMessageOrigin({
            consoles: e,
            timeout: r
        }, function(e) {
            we = !0, te.publish({
                channel: "ConsoleService",
                topic: "ConsoleService.ConsoleReady",
                data: {}
            }), n && n(e)
        }), me.addEvent("pauseReplayClicked", function(e, n) {
            Me = !Me, me.sendMessage("replayUpdate", {
                pauseFlag: Me
            }), Me || A()
        }), me.addEvents({
            relayMessage: function(e) {},
            stopAutospin: function() {
                te.publish({
                    channel: "ConsoleService",
                    topic: "Game.AutoSpinStop",
                    data: {}
                })
            },
            setOptions: function(e) {
                Object.keys(e).forEach(function(n) {
                    switch (n) {
                        case "stakeDeduction":
                            te.publish({
                                channel: "ConsoleService",
                                topic: "Option.StakeDeduction",
                                data: {
                                    enabled: !!e[n]
                                }
                            });
                            break;
                        case "handleFullscreen":
                            te.publish({
                                channel: "ConsoleService",
                                topic: "Option.FullScreen",
                                data: {
                                    enabled: !!e[n]
                                }
                            });
                            break;
                        case "setSize":
                            te.publish({
                                channel: "ConsoleService",
                                topic: "Option.SetSize",
                                data: {
                                    width: e[n].width,
                                    height: e[n].height
                                }
                            });
                            break;
                        case "disableIOSBarFix":
                            te.publish({
                                channel: "ConsoleService",
                                topic: "Option.disableIOSBarFix",
                                data: {}
                            });
                            break;
                        case "pinchZoomFixer":
                            te.publish({
                                channel: "ConsoleService",
                                topic: "Option.PinchZoomFixer",
                                data: {
                                    enabled: !!e[n]
                                }
                            })
                    }
                })
            }
        })
    }

    function H(e, n, t) {
        for (var i in n) "object" == typeof n[i] && "object" == typeof e[i] ? H(e[i], n[i], t) : t ? delete e[i] : e[i] = n[i]
    }

    function U(e) {
        ["pfsInfo"].forEach(function(n) {
            he[n] && he[n].sendEvent("enable", [e ? 1 : 0])
        })
    }

    function W(e, n) {
        pe.updateClientConfig(e), e.gameConfig && e.gameConfig.wagerType && (ve.serverConfig.paramRGS.wagerType = e.gameConfig.wagerType, ve.serverConfig.paramGet.wagerType && (ve.serverConfig.paramGet.wagerType = e.gameConfig.wagerType)), e.playModeChoice && (ve.serverConfig.paramRGS.playModeChoice = e.playModeChoice);
        for (var t in e) switch (t) {
            case "serverConfig":
            case "stringsConfig":
            case "kernelConfig":
            case "consoleConfig":
            case "gameServiceConfig":
                H(ve, e, n)
        }
    }

    function q(e) {
        var n = ["skincode", "ipaddress", "forcelat", "minbet", "forcelocationstatus", "countrycode", "channel", "language", "nscode", "technology", "currencycode", "loadskin", "forcelng", "playMode", "softwareid", "denomamount", "presenttype", "forcelocationmessage", "uniqueid"];
        if (e)
            for (var t in e) n.indexOf(t) < 0 && (ve.serverConfig.paramRGS[t] && (ve.serverConfig.paramRGS[t] = e[t]), ve.serverConfig.paramGet[t] && (ve.serverConfig.paramGet[t] = e[t]))
    }

    function j(e) {
        me.sendMessage("gameCapabilities", e)
    }

    function V(e) {
        me.addOneShotEvent("afterUpdateParams", function(n) {
            if (n) {
                if ("string" == typeof n) try {
                    n = JSON.parse(n)
                } catch (n) {
                    return void e()
                }
                n.data && (n = n.data), q(n), e(n)
            } else e()
        }), me.sendMessage("updateParams", ve.consoleConfig.paramConsole)
    }

    function J(e, n) {
        c(e, n)
    }

    function K(e, n) {
        me.sendConfig(e, n)
    }

    function X(e, n) {
        me.addEvent(e, function() {
            var e = Array.prototype.slice.call(arguments);
            e.unshift({
                haltGame: me.haltGame,
                resume: me.resume,
                inWager: ye
            }), n.apply(null, e)
        })
    }

    function Y() {
        return Ee
    }

    function Z(e) {
        Ee = !!e
    }

    function Q() {
        return be
    }

    function $(e) {
        be = !!e
    }

    function ee(e) {
        ce = e
    }
    var ne, te, ie, oe, re, se, ae, ce, le, de, ue, fe, me = e("consoleservice/consoleconnector/MXFAdapter")(),
        pe = e("consoleservice/messagebox/MessageBox"),
        ge = e("consoleservice/consoleconnector/MuteBypass"),
        he = [],
        ve = {},
        ye = !1,
        Ce = 0,
        be = !1,
        Ee = !1,
        we = !1,
        Se = !1,
        Ie = ["patternsBet", "coinValue", "betPerPattern", "price"],
        Me = !1,
        xe = !1,
        Oe = [];
    return {
        init: o,
        onloadConsole: N,
        beforeInitGame: C,
        registerControls: g,
        registerControl: p,
        initOutcome: B,
        sendOutcome: O,
        gameOutcome: x,
        sendConfig: K,
        gameReady: M,
        wagerStarted: E,
        wagerComplete: b,
        wagerAborted: w,
        sendMessage: f,
        showMessage: c,
        clearMessage: function() {
            pe.reset()
        },
        showAnyMessages: function(e) {
            pe.showAnyMessages(e)
        },
        sendGameEvent: n,
        doMessageCommand: l,
        doCommand: d,
        connectActionRunner: u,
        insufficientFundsNotification: S,
        viewAccountHistory: I,
        setBalance: P,
        setPromotionalFreeSpinCount: _,
        pauseGame: L,
        unPauseGame: F,
        isGamePaused: G,
        isGameHalted: D,
        setUnPauseGame: R,
        updateClientConfig: W,
        resetConsole: function() {
            ye = !1, me.sendMessage("reInit")
        },
        onUpdateParams: V,
        displayLaunchOptions: J,
        addConsoleEvent: X,
        setAllowInterruptedMessage: Z,
        isAllowInterruptedMessage: Y,
        hasInterruptedMessage: Q,
        setInteruptedMessage: $,
        registerPFSInfoNotification: y,
        enableConsoleControls: U,
        setCECCommand: ee,
        isReplayPaused: k,
        setUnPauseReplay: z,
        addEvents: function(e) {
            me.addEvents(e)
        },
        removeEvents: function(e) {
            me.removeEvents(e)
        }
    }
}), define("consoleservice/main", ["require", "consoleservice/consoleconnector/ConsoleConnector"], function(e) {
    "use strict";
    var n, t = e("consoleservice/consoleconnector/ConsoleConnector");
    return function() {
        function e(e, n) {
            o = e.bus(), o.publish({
                channel: "Kernel",
                topic: "LoadProgress",
                data: {
                    id: "consoleservice",
                    items: "5",
                    current: "0",
                    complete: !1
                }
            }), t.init(e, function(e) {}, function() {
                i(n)
            })
        }

        function i(e) {
            o.publish({
                channel: "Kernel",
                topic: "LoadProgress",
                data: {
                    id: "consoleservice",
                    items: "5",
                    current: "5",
                    complete: !0
                }
            }), o.subscribe({
                channel: "Kernel",
                topic: "Kernel.UpdateConfig",
                callback: function(e, n) {
                    t.resetConsole(), t.updateClientConfig(e), o.publish({
                        channel: "Kernel",
                        topic: "Kernel.UpdateConfig.Ack",
                        data: {
                            success: "ConsoleService"
                        }
                    })
                }
            }), e()
        }
        var o;
        return Object.freeze({
            load: e,
            connector: t,
            setCECCommand: function(e) {
                n = e, t.setCECCommand(e)
            }
        })
    }
});
//# sourceMappingURL=consoleservice.js.map