! function e(t, n, i) {
    function r(s, a) {
        if (!n[s]) {
            if (!t[s]) {
                var c = "function" == typeof require && require;
                if (!a && c) return c(s, !0);
                if (o) return o(s, !0);
                var u = new Error("Cannot find module '" + s + "'");
                throw u.code = "MODULE_NOT_FOUND", u
            }
            var l = n[s] = {
                exports: {}
            };
            t[s][0].call(l.exports, function(e) {
                var n = t[s][1][e];
                return r(n || e)
            }, l, l.exports, e, t, n, i)
        }
        return n[s].exports
    }
    for (var o = "function" == typeof require && require, s = 0; s < i.length; s++) r(i[s]);
    return r
}({
    1: [function(e, t, n) {
        "use strict";
        e("./index").polyfill()
    }, {
        "./index": 2
    }],
    2: [function(e, t, n) {
        "use strict";

        function i(e, t) {
            if (void 0 === e || null === e) throw new TypeError("Cannot convert first argument to object");
            for (var n = Object(e), i = 1; i < arguments.length; i++) {
                var r = arguments[i];
                if (void 0 !== r && null !== r)
                    for (var o = Object.keys(Object(r)), s = 0, a = o.length; s < a; s++) {
                        var c = o[s],
                            u = Object.getOwnPropertyDescriptor(r, c);
                        void 0 !== u && u.enumerable && (n[c] = r[c])
                    }
            }
            return n
        }

        function r() {
            Object.assign || Object.defineProperty(Object, "assign", {
                enumerable: !1,
                configurable: !0,
                writable: !0,
                value: i
            })
        }
        t.exports = {
            assign: i,
            polyfill: r
        }
    }, {}]
}, {}, [1]), define("objectAssignAuto", function() {}),
    function(e) {
        "use strict";

        function t(e, t, n) {
            return t <= e && e <= n
        }

        function n(e, t) {
            return -1 !== e.indexOf(t)
        }

        function i(e) {
            if (void 0 === e) return {};
            if (e === Object(e)) return e;
            throw TypeError("Could not convert argument to dictionary")
        }

        function r(e) {
            for (var t = String(e), n = t.length, i = 0, r = []; i < n;) {
                var o = t.charCodeAt(i);
                if (o < 55296 || o > 57343) r.push(o);
                else if (56320 <= o && o <= 57343) r.push(65533);
                else if (55296 <= o && o <= 56319)
                    if (i === n - 1) r.push(65533);
                    else {
                        var s = t.charCodeAt(i + 1);
                        if (56320 <= s && s <= 57343) {
                            var a = 1023 & o,
                                c = 1023 & s;
                            r.push(65536 + (a << 10) + c), i += 1
                        } else r.push(65533)
                    }
                i += 1
            }
            return r
        }

        function o(e) {
            for (var t = "", n = 0; n < e.length; ++n) {
                var i = e[n];
                i <= 65535 ? t += String.fromCharCode(i) : (i -= 65536, t += String.fromCharCode(55296 + (i >> 10), 56320 + (1023 & i)))
            }
            return t
        }

        function s(e) {
            return 0 <= e && e <= 127
        }

        function a(e) {
            this.tokens = [].slice.call(e), this.tokens.reverse()
        }

        function c(e, t) {
            if (e) throw TypeError("Decoder error");
            return t || 65533
        }

        function u(e) {
            throw TypeError("The code point " + e + " could not be encoded.")
        }

        function l() {}

        function f() {}

        function d(e) {
            return e = String(e).trim().toLowerCase(), Object.prototype.hasOwnProperty.call(K, e) ? K[e] : null
        }

        function p(e, t) {
            return t ? t[e] || null : null
        }

        function h(e, t) {
            var n = t.indexOf(e);
            return -1 === n ? null : n
        }

        function m(t) {
            if (!("encoding-indexes" in e)) throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");
            return e["encoding-indexes"][t]
        }

        function g(e) {
            if (e > 39419 && e < 189e3 || e > 1237575) return null;
            if (7457 === e) return 59335;
            var t, n = 0,
                i = 0,
                r = m("gb18030-ranges");
            for (t = 0; t < r.length; ++t) {
                var o = r[t];
                if (!(o[0] <= e)) break;
                n = o[0], i = o[1]
            }
            return i + e - n
        }

        function b(e) {
            if (59335 === e) return 7457;
            var t, n = 0,
                i = 0,
                r = m("gb18030-ranges");
            for (t = 0; t < r.length; ++t) {
                var o = r[t];
                if (!(o[1] <= e)) break;
                n = o[1], i = o[0]
            }
            return i + e - n
        }

        function y(e) {
            return X = X || m("jis0208").map(function(e, n) {
                return t(n, 8272, 8835) ? null : e
            }), X.indexOf(e)
        }

        function v(e) {
            Z = Z || m("big5").map(function(e, t) {
                return t < 5024 ? null : e
            });
            var t = Z;
            return 9552 === e || 9566 === e || 9569 === e || 9578 === e || 21313 === e || 21317 === e ? t.lastIndexOf(e) : h(e, t)
        }

        function w(e, t) {
            if (!(this instanceof w)) throw TypeError("Called as a function. Did you forget 'new'?");
            e = void 0 !== e ? String(e) : Q, t = i(t), this._encoding = null, this._decoder = null, this._ignoreBOM = !1, this._BOMseen = !1, this._error_mode = "replacement", this._do_not_flush = !1;
            var n = d(e);
            if (null === n || "replacement" === n.name) throw RangeError("Unknown encoding: " + e);
            if (!$[n.name]) throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");
            var r = this;
            return r._encoding = n, Boolean(t.fatal) && (r._error_mode = "fatal"), Boolean(t.ignoreBOM) && (r._ignoreBOM = !0), Object.defineProperty || (this.encoding = r._encoding.name.toLowerCase(), this.fatal = "fatal" === r._error_mode, this.ignoreBOM = r._ignoreBOM), r
        }

        function _(t, n) {
            if (!(this instanceof _)) throw TypeError("Called as a function. Did you forget 'new'?");
            n = i(n), this._encoding = null, this._encoder = null, this._do_not_flush = !1, this._fatal = Boolean(n.fatal) ? "fatal" : "replacement";
            var r = this;
            if (Boolean(n.NONSTANDARD_allowLegacyEncoding)) {
                t = void 0 !== t ? String(t) : Q;
                var o = d(t);
                if (null === o || "replacement" === o.name) throw RangeError("Unknown encoding: " + t);
                if (!Y[o.name]) throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");
                r._encoding = o
            } else r._encoding = d("utf-8"), void 0 !== t && "console" in e && console.warn("TextEncoder constructor called with encoding label, which is ignored.");
            return Object.defineProperty || (this.encoding = r._encoding.name.toLowerCase()), r
        }

        function C(e) {
            var n = e.fatal,
                i = 0,
                r = 0,
                o = 0,
                s = 128,
                a = 191;
            this.handler = function(e, u) {
                if (u === J && 0 !== o) return o = 0, c(n);
                if (u === J) return V;
                if (0 === o) {
                    if (t(u, 0, 127)) return u;
                    if (t(u, 194, 223)) o = 1, i = 31 & u;
                    else if (t(u, 224, 239)) 224 === u && (s = 160), 237 === u && (a = 159), o = 2, i = 15 & u;
                    else {
                        if (!t(u, 240, 244)) return c(n);
                        240 === u && (s = 144), 244 === u && (a = 143), o = 3, i = 7 & u
                    }
                    return null
                }
                if (!t(u, s, a)) return i = o = r = 0, s = 128, a = 191, e.prepend(u), c(n);
                if (s = 128, a = 191, i = i << 6 | 63 & u, (r += 1) !== o) return null;
                var l = i;
                return i = o = r = 0, l
            }
        }

        function S(e) {
            e.fatal;
            this.handler = function(e, n) {
                if (n === J) return V;
                if (z(n)) return n;
                var i, r;
                t(n, 128, 2047) ? (i = 1, r = 192) : t(n, 2048, 65535) ? (i = 2, r = 224) : t(n, 65536, 1114111) && (i = 3, r = 240);
                for (var o = [(n >> 6 * i) + r]; i > 0;) {
                    var s = n >> 6 * (i - 1);
                    o.push(128 | 63 & s), i -= 1
                }
                return o
            }
        }

        function E(e, t) {
            var n = t.fatal;
            this.handler = function(t, i) {
                if (i === J) return V;
                if (s(i)) return i;
                var r = e[i - 128];
                return null === r ? c(n) : r
            }
        }

        function O(e, t) {
            t.fatal;
            this.handler = function(t, n) {
                if (n === J) return V;
                if (z(n)) return n;
                var i = h(n, e);
                return null === i && u(n), i + 128
            }
        }

        function x(e) {
            var n = e.fatal,
                i = 0,
                r = 0,
                o = 0;
            this.handler = function(e, a) {
                if (a === J && 0 === i && 0 === r && 0 === o) return V;
                a !== J || 0 === i && 0 === r && 0 === o || (i = 0, r = 0, o = 0, c(n));
                var u;
                if (0 !== o) {
                    u = null, t(a, 48, 57) && (u = g(10 * (126 * (10 * (i - 129) + r - 48) + o - 129) + a - 48));
                    var l = [r, o, a];
                    return i = 0, r = 0, o = 0, null === u ? (e.prepend(l), c(n)) : u
                }
                if (0 !== r) return t(a, 129, 254) ? (o = a, null) : (e.prepend([r, a]), i = 0, r = 0, c(n));
                if (0 !== i) {
                    if (t(a, 48, 57)) return r = a, null;
                    var f = i,
                        d = null;
                    i = 0;
                    var h = a < 127 ? 64 : 65;
                    return (t(a, 64, 126) || t(a, 128, 254)) && (d = 190 * (f - 129) + (a - h)), u = null === d ? null : p(d, m("gb18030")), null === u && s(a) && e.prepend(a), null === u ? c(n) : u
                }
                return s(a) ? a : 128 === a ? 8364 : t(a, 129, 254) ? (i = a, null) : c(n)
            }
        }

        function I(e, t) {
            e.fatal;
            this.handler = function(e, n) {
                if (n === J) return V;
                if (z(n)) return n;
                if (58853 === n) return u(n);
                if (t && 8364 === n) return 128;
                var i = h(n, m("gb18030"));
                if (null !== i) {
                    var r = H(i / 190) + 129,
                        o = i % 190;
                    return [r, o + (o < 63 ? 64 : 65)]
                }
                if (t) return u(n);
                i = b(n);
                var s = H(i / 10 / 126 / 10);
                i -= 10 * s * 126 * 10;
                var a = H(i / 10 / 126);
                i -= 10 * a * 126;
                var c = H(i / 10);
                return [s + 129, a + 48, c + 129, i - 10 * c + 48]
            }
        }

        function k(e) {
            var n = e.fatal,
                i = 0;
            this.handler = function(e, r) {
                if (r === J && 0 !== i) return i = 0, c(n);
                if (r === J && 0 === i) return V;
                if (0 !== i) {
                    var o = i,
                        a = null;
                    i = 0;
                    var u = r < 127 ? 64 : 98;
                    switch ((t(r, 64, 126) || t(r, 161, 254)) && (a = 157 * (o - 129) + (r - u)), a) {
                        case 1133:
                            return [202, 772];
                        case 1135:
                            return [202, 780];
                        case 1164:
                            return [234, 772];
                        case 1166:
                            return [234, 780]
                    }
                    var l = null === a ? null : p(a, m("big5"));
                    return null === l && s(r) && e.prepend(r), null === l ? c(n) : l
                }
                return s(r) ? r : t(r, 129, 254) ? (i = r, null) : c(n)
            }
        }

        function T(e) {
            e.fatal;
            this.handler = function(e, t) {
                if (t === J) return V;
                if (z(t)) return t;
                var n = v(t);
                if (null === n) return u(t);
                var i = H(n / 157) + 129;
                if (i < 161) return u(t);
                var r = n % 157;
                return [i, r + (r < 63 ? 64 : 98)]
            }
        }

        function A(e) {
            var n = e.fatal,
                i = !1,
                r = 0;
            this.handler = function(e, o) {
                if (o === J && 0 !== r) return r = 0, c(n);
                if (o === J && 0 === r) return V;
                if (142 === r && t(o, 161, 223)) return r = 0, 65216 + o;
                if (143 === r && t(o, 161, 254)) return i = !0, r = o, null;
                if (0 !== r) {
                    var a = r;
                    r = 0;
                    var u = null;
                    return t(a, 161, 254) && t(o, 161, 254) && (u = p(94 * (a - 161) + (o - 161), m(i ? "jis0212" : "jis0208"))), i = !1, t(o, 161, 254) || e.prepend(o), null === u ? c(n) : u
                }
                return s(o) ? o : 142 === o || 143 === o || t(o, 161, 254) ? (r = o, null) : c(n)
            }
        }

        function j(e) {
            e.fatal;
            this.handler = function(e, n) {
                if (n === J) return V;
                if (z(n)) return n;
                if (165 === n) return 92;
                if (8254 === n) return 126;
                if (t(n, 65377, 65439)) return [142, n - 65377 + 161];
                8722 === n && (n = 65293);
                var i = h(n, m("jis0208"));
                return null === i ? u(n) : [H(i / 94) + 161, i % 94 + 161]
            }
        }

        function N(e) {
            var n = e.fatal,
                i = {
                    ASCII: 0,
                    Roman: 1,
                    Katakana: 2,
                    LeadByte: 3,
                    TrailByte: 4,
                    EscapeStart: 5,
                    Escape: 6
                },
                r = i.ASCII,
                o = i.ASCII,
                s = 0,
                a = !1;
            this.handler = function(e, u) {
                switch (r) {
                    default:
                        case i.ASCII:
                        return 27 === u ? (r = i.EscapeStart, null) : t(u, 0, 127) && 14 !== u && 15 !== u && 27 !== u ? (a = !1, u) : u === J ? V : (a = !1, c(n));
                    case i.Roman:
                            return 27 === u ? (r = i.EscapeStart, null) : 92 === u ? (a = !1, 165) : 126 === u ? (a = !1, 8254) : t(u, 0, 127) && 14 !== u && 15 !== u && 27 !== u && 92 !== u && 126 !== u ? (a = !1, u) : u === J ? V : (a = !1, c(n));
                    case i.Katakana:
                            return 27 === u ? (r = i.EscapeStart, null) : t(u, 33, 95) ? (a = !1, 65344 + u) : u === J ? V : (a = !1, c(n));
                    case i.LeadByte:
                            return 27 === u ? (r = i.EscapeStart, null) : t(u, 33, 126) ? (a = !1, s = u, r = i.TrailByte, null) : u === J ? V : (a = !1, c(n));
                    case i.TrailByte:
                            if (27 === u) return r = i.EscapeStart, c(n);
                        if (t(u, 33, 126)) {
                            r = i.LeadByte;
                            var l = 94 * (s - 33) + u - 33,
                                f = p(l, m("jis0208"));
                            return null === f ? c(n) : f
                        }
                        return u === J ? (r = i.LeadByte, e.prepend(u), c(n)) : (r = i.LeadByte, c(n));
                    case i.EscapeStart:
                            return 36 === u || 40 === u ? (s = u, r = i.Escape, null) : (e.prepend(u), a = !1, r = o, c(n));
                    case i.Escape:
                            var d = s;s = 0;
                        var h = null;
                        if (40 === d && 66 === u && (h = i.ASCII), 40 === d && 74 === u && (h = i.Roman), 40 === d && 73 === u && (h = i.Katakana), 36 !== d || 64 !== u && 66 !== u || (h = i.LeadByte), null !== h) {
                            r = r = h;
                            var g = a;
                            return a = !0, g ? c(n) : null
                        }
                        return e.prepend([d, u]),
                        a = !1,
                        r = o,
                        c(n)
                }
            }
        }

        function P(e) {
            var t = (e.fatal, {
                    ASCII: 0,
                    Roman: 1,
                    jis0208: 2
                }),
                n = t.ASCII;
            this.handler = function(e, i) {
                if (i === J && n !== t.ASCII) return e.prepend(i), n = t.ASCII, [27, 40, 66];
                if (i === J && n === t.ASCII) return V;
                if (!(n !== t.ASCII && n !== t.Roman || 14 !== i && 15 !== i && 27 !== i)) return u(65533);
                if (n === t.ASCII && z(i)) return i;
                if (n === t.Roman && (z(i) && 92 !== i && 126 !== i || 165 == i || 8254 == i)) {
                    if (z(i)) return i;
                    if (165 === i) return 92;
                    if (8254 === i) return 126
                }
                if (z(i) && n !== t.ASCII) return e.prepend(i), n = t.ASCII, [27, 40, 66];
                if ((165 === i || 8254 === i) && n !== t.Roman) return e.prepend(i), n = t.Roman, [27, 40, 74];
                8722 === i && (i = 65293);
                var r = h(i, m("jis0208"));
                return null === r ? u(i) : n !== t.jis0208 ? (e.prepend(i), n = t.jis0208, [27, 36, 66]) : [H(r / 94) + 33, r % 94 + 33]
            }
        }

        function D(e) {
            var n = e.fatal,
                i = 0;
            this.handler = function(e, r) {
                if (r === J && 0 !== i) return i = 0, c(n);
                if (r === J && 0 === i) return V;
                if (0 !== i) {
                    var o = i,
                        a = null;
                    i = 0;
                    var u = r < 127 ? 64 : 65,
                        l = o < 160 ? 129 : 193;
                    if ((t(r, 64, 126) || t(r, 128, 252)) && (a = 188 * (o - l) + r - u), t(a, 8836, 10715)) return 48508 + a;
                    var f = null === a ? null : p(a, m("jis0208"));
                    return null === f && s(r) && e.prepend(r), null === f ? c(n) : f
                }
                return s(r) || 128 === r ? r : t(r, 161, 223) ? 65216 + r : t(r, 129, 159) || t(r, 224, 252) ? (i = r, null) : c(n)
            }
        }

        function F(e) {
            e.fatal;
            this.handler = function(e, n) {
                if (n === J) return V;
                if (z(n) || 128 === n) return n;
                if (165 === n) return 92;
                if (8254 === n) return 126;
                if (t(n, 65377, 65439)) return n - 65377 + 161;
                8722 === n && (n = 65293);
                var i = y(n);
                if (null === i) return u(n);
                var r = H(i / 188),
                    o = r < 31 ? 129 : 193,
                    s = i % 188;
                return [r + o, s + (s < 63 ? 64 : 65)]
            }
        }

        function R(e) {
            var n = e.fatal,
                i = 0;
            this.handler = function(e, r) {
                if (r === J && 0 !== i) return i = 0, c(n);
                if (r === J && 0 === i) return V;
                if (0 !== i) {
                    var o = i,
                        a = null;
                    i = 0, t(r, 65, 254) && (a = 190 * (o - 129) + (r - 65));
                    var u = null === a ? null : p(a, m("euc-kr"));
                    return null === a && s(r) && e.prepend(r), null === u ? c(n) : u
                }
                return s(r) ? r : t(r, 129, 254) ? (i = r, null) : c(n)
            }
        }

        function B(e) {
            e.fatal;
            this.handler = function(e, t) {
                if (t === J) return V;
                if (z(t)) return t;
                var n = h(t, m("euc-kr"));
                return null === n ? u(t) : [H(n / 190) + 129, n % 190 + 65]
            }
        }

        function G(e, t) {
            var n = e >> 8,
                i = 255 & e;
            return t ? [n, i] : [i, n]
        }

        function L(e, n) {
            var i = n.fatal,
                r = null,
                o = null;
            this.handler = function(n, s) {
                if (s === J && (null !== r || null !== o)) return c(i);
                if (s === J && null === r && null === o) return V;
                if (null === r) return r = s, null;
                var a;
                if (a = e ? (r << 8) + s : (s << 8) + r, r = null, null !== o) {
                    var u = o;
                    return o = null, t(a, 56320, 57343) ? 65536 + 1024 * (u - 55296) + (a - 56320) : (n.prepend(G(a, e)), c(i))
                }
                return t(a, 55296, 56319) ? (o = a, null) : t(a, 56320, 57343) ? c(i) : a
            }
        }

        function W(e, n) {
            n.fatal;
            this.handler = function(n, i) {
                if (i === J) return V;
                if (t(i, 0, 65535)) return G(i, e);
                var r = G(55296 + (i - 65536 >> 10), e),
                    o = G(56320 + (i - 65536 & 1023), e);
                return r.concat(o)
            }
        }

        function U(e) {
            e.fatal;
            this.handler = function(e, t) {
                return t === J ? V : s(t) ? t : 63360 + t - 128
            }
        }

        function M(e) {
            e.fatal;
            this.handler = function(e, n) {
                return n === J ? V : z(n) ? n : t(n, 63360, 63487) ? n - 63360 + 128 : u(n)
            }
        }
        "undefined" != typeof module && module.exports && !e["encoding-indexes"] && (e["encoding-indexes"] = require("./encoding-indexes.js")["encoding-indexes"]);
        var H = Math.floor,
            z = s,
            J = -1;
        a.prototype = {
            endOfStream: function() {
                return !this.tokens.length
            },
            read: function() {
                return this.tokens.length ? this.tokens.pop() : J
            },
            prepend: function(e) {
                if (Array.isArray(e))
                    for (var t = e; t.length;) this.tokens.push(t.pop());
                else this.tokens.push(e)
            },
            push: function(e) {
                if (Array.isArray(e))
                    for (var t = e; t.length;) this.tokens.unshift(t.shift());
                else this.tokens.unshift(e)
            }
        };
        var V = -1;
        l.prototype = {
            handler: function(e, t) {}
        }, f.prototype = {
            handler: function(e, t) {}
        };
        var q = [{
                encodings: [{
                    labels: ["unicode-1-1-utf-8", "utf-8", "utf8"],
                    name: "UTF-8"
                }],
                heading: "The Encoding"
            }, {
                encodings: [{
                    labels: ["866", "cp866", "csibm866", "ibm866"],
                    name: "IBM866"
                }, {
                    labels: ["csisolatin2", "iso-8859-2", "iso-ir-101", "iso8859-2", "iso88592", "iso_8859-2", "iso_8859-2:1987", "l2", "latin2"],
                    name: "ISO-8859-2"
                }, {
                    labels: ["csisolatin3", "iso-8859-3", "iso-ir-109", "iso8859-3", "iso88593", "iso_8859-3", "iso_8859-3:1988", "l3", "latin3"],
                    name: "ISO-8859-3"
                }, {
                    labels: ["csisolatin4", "iso-8859-4", "iso-ir-110", "iso8859-4", "iso88594", "iso_8859-4", "iso_8859-4:1988", "l4", "latin4"],
                    name: "ISO-8859-4"
                }, {
                    labels: ["csisolatincyrillic", "cyrillic", "iso-8859-5", "iso-ir-144", "iso8859-5", "iso88595", "iso_8859-5", "iso_8859-5:1988"],
                    name: "ISO-8859-5"
                }, {
                    labels: ["arabic", "asmo-708", "csiso88596e", "csiso88596i", "csisolatinarabic", "ecma-114", "iso-8859-6", "iso-8859-6-e", "iso-8859-6-i", "iso-ir-127", "iso8859-6", "iso88596", "iso_8859-6", "iso_8859-6:1987"],
                    name: "ISO-8859-6"
                }, {
                    labels: ["csisolatingreek", "ecma-118", "elot_928", "greek", "greek8", "iso-8859-7", "iso-ir-126", "iso8859-7", "iso88597", "iso_8859-7", "iso_8859-7:1987", "sun_eu_greek"],
                    name: "ISO-8859-7"
                }, {
                    labels: ["csiso88598e", "csisolatinhebrew", "hebrew", "iso-8859-8", "iso-8859-8-e", "iso-ir-138", "iso8859-8", "iso88598", "iso_8859-8", "iso_8859-8:1988", "visual"],
                    name: "ISO-8859-8"
                }, {
                    labels: ["csiso88598i", "iso-8859-8-i", "logical"],
                    name: "ISO-8859-8-I"
                }, {
                    labels: ["csisolatin6", "iso-8859-10", "iso-ir-157", "iso8859-10", "iso885910", "l6", "latin6"],
                    name: "ISO-8859-10"
                }, {
                    labels: ["iso-8859-13", "iso8859-13", "iso885913"],
                    name: "ISO-8859-13"
                }, {
                    labels: ["iso-8859-14", "iso8859-14", "iso885914"],
                    name: "ISO-8859-14"
                }, {
                    labels: ["csisolatin9", "iso-8859-15", "iso8859-15", "iso885915", "iso_8859-15", "l9"],
                    name: "ISO-8859-15"
                }, {
                    labels: ["iso-8859-16"],
                    name: "ISO-8859-16"
                }, {
                    labels: ["cskoi8r", "koi", "koi8", "koi8-r", "koi8_r"],
                    name: "KOI8-R"
                }, {
                    labels: ["koi8-ru", "koi8-u"],
                    name: "KOI8-U"
                }, {
                    labels: ["csmacintosh", "mac", "macintosh", "x-mac-roman"],
                    name: "macintosh"
                }, {
                    labels: ["dos-874", "iso-8859-11", "iso8859-11", "iso885911", "tis-620", "windows-874"],
                    name: "windows-874"
                }, {
                    labels: ["cp1250", "windows-1250", "x-cp1250"],
                    name: "windows-1250"
                }, {
                    labels: ["cp1251", "windows-1251", "x-cp1251"],
                    name: "windows-1251"
                }, {
                    labels: ["ansi_x3.4-1968", "ascii", "cp1252", "cp819", "csisolatin1", "ibm819", "iso-8859-1", "iso-ir-100", "iso8859-1", "iso88591", "iso_8859-1", "iso_8859-1:1987", "l1", "latin1", "us-ascii", "windows-1252", "x-cp1252"],
                    name: "windows-1252"
                }, {
                    labels: ["cp1253", "windows-1253", "x-cp1253"],
                    name: "windows-1253"
                }, {
                    labels: ["cp1254", "csisolatin5", "iso-8859-9", "iso-ir-148", "iso8859-9", "iso88599", "iso_8859-9", "iso_8859-9:1989", "l5", "latin5", "windows-1254", "x-cp1254"],
                    name: "windows-1254"
                }, {
                    labels: ["cp1255", "windows-1255", "x-cp1255"],
                    name: "windows-1255"
                }, {
                    labels: ["cp1256", "windows-1256", "x-cp1256"],
                    name: "windows-1256"
                }, {
                    labels: ["cp1257", "windows-1257", "x-cp1257"],
                    name: "windows-1257"
                }, {
                    labels: ["cp1258", "windows-1258", "x-cp1258"],
                    name: "windows-1258"
                }, {
                    labels: ["x-mac-cyrillic", "x-mac-ukrainian"],
                    name: "x-mac-cyrillic"
                }],
                heading: "Legacy single-byte encodings"
            }, {
                encodings: [{
                    labels: ["chinese", "csgb2312", "csiso58gb231280", "gb2312", "gb_2312", "gb_2312-80", "gbk", "iso-ir-58", "x-gbk"],
                    name: "GBK"
                }, {
                    labels: ["gb18030"],
                    name: "gb18030"
                }],
                heading: "Legacy multi-byte Chinese (simplified) encodings"
            }, {
                encodings: [{
                    labels: ["big5", "big5-hkscs", "cn-big5", "csbig5", "x-x-big5"],
                    name: "Big5"
                }],
                heading: "Legacy multi-byte Chinese (traditional) encodings"
            }, {
                encodings: [{
                    labels: ["cseucpkdfmtjapanese", "euc-jp", "x-euc-jp"],
                    name: "EUC-JP"
                }, {
                    labels: ["csiso2022jp", "iso-2022-jp"],
                    name: "ISO-2022-JP"
                }, {
                    labels: ["csshiftjis", "ms932", "ms_kanji", "shift-jis", "shift_jis", "sjis", "windows-31j", "x-sjis"],
                    name: "Shift_JIS"
                }],
                heading: "Legacy multi-byte Japanese encodings"
            }, {
                encodings: [{
                    labels: ["cseuckr", "csksc56011987", "euc-kr", "iso-ir-149", "korean", "ks_c_5601-1987", "ks_c_5601-1989", "ksc5601", "ksc_5601", "windows-949"],
                    name: "EUC-KR"
                }],
                heading: "Legacy multi-byte Korean encodings"
            }, {
                encodings: [{
                    labels: ["csiso2022kr", "hz-gb-2312", "iso-2022-cn", "iso-2022-cn-ext", "iso-2022-kr"],
                    name: "replacement"
                }, {
                    labels: ["utf-16be"],
                    name: "UTF-16BE"
                }, {
                    labels: ["utf-16", "utf-16le"],
                    name: "UTF-16LE"
                }, {
                    labels: ["x-user-defined"],
                    name: "x-user-defined"
                }],
                heading: "Legacy miscellaneous encodings"
            }],
            K = {};
        q.forEach(function(e) {
            e.encodings.forEach(function(e) {
                e.labels.forEach(function(t) {
                    K[t] = e
                })
            })
        });
        var X, Z, Y = {},
            $ = {},
            Q = "utf-8";
        Object.defineProperty && (Object.defineProperty(w.prototype, "encoding", {
                get: function() {
                    return this._encoding.name.toLowerCase()
                }
            }), Object.defineProperty(w.prototype, "fatal", {
                get: function() {
                    return "fatal" === this._error_mode
                }
            }), Object.defineProperty(w.prototype, "ignoreBOM", {
                get: function() {
                    return this._ignoreBOM
                }
            })), w.prototype.decode = function(e, t) {
                function r(e) {
                    return !n(["UTF-8", "UTF-16LE", "UTF-16BE"], this._encoding.name) || this._ignoreBOM || this._BOMseen || (e.length > 0 && 65279 === e[0] ? (this._BOMseen = !0, e.shift()) : e.length > 0 && (this._BOMseen = !0)), o(e)
                }
                var s;
                s = "object" == typeof e && e instanceof ArrayBuffer ? new Uint8Array(e) : "object" == typeof e && "buffer" in e && e.buffer instanceof ArrayBuffer ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(0), t = i(t), this._do_not_flush || (this._decoder = $[this._encoding.name]({
                    fatal: "fatal" === this._error_mode
                }), this._BOMseen = !1), this._do_not_flush = Boolean(t.stream);
                for (var c, u = new a(s), l = [];;) {
                    var f = u.read();
                    if (f === J) break;
                    if ((c = this._decoder.handler(u, f)) === V) break;
                    null !== c && (Array.isArray(c) ? l.push.apply(l, c) : l.push(c))
                }
                if (!this._do_not_flush) {
                    do {
                        if ((c = this._decoder.handler(u, u.read())) === V) break;
                        null !== c && (Array.isArray(c) ? l.push.apply(l, c) : l.push(c))
                    } while (!u.endOfStream());
                    this._decoder = null
                }
                return r.call(this, l)
            }, Object.defineProperty && Object.defineProperty(_.prototype, "encoding", {
                get: function() {
                    return this._encoding.name.toLowerCase()
                }
            }), _.prototype.encode = function(e, t) {
                e = void 0 === e ? "" : String(e), t = i(t), this._do_not_flush || (this._encoder = Y[this._encoding.name]({
                    fatal: "fatal" === this._fatal
                })), this._do_not_flush = Boolean(t.stream);
                for (var n, o = new a(r(e)), s = [];;) {
                    var c = o.read();
                    if (c === J) break;
                    if ((n = this._encoder.handler(o, c)) === V) break;
                    Array.isArray(n) ? s.push.apply(s, n) : s.push(n)
                }
                if (!this._do_not_flush) {
                    for (;;) {
                        if ((n = this._encoder.handler(o, o.read())) === V) break;
                        Array.isArray(n) ? s.push.apply(s, n) : s.push(n)
                    }
                    this._encoder = null
                }
                return new Uint8Array(s)
            }, Y["UTF-8"] = function(e) {
                return new S(e)
            }, $["UTF-8"] = function(e) {
                return new C(e)
            },
            function() {
                "encoding-indexes" in e && q.forEach(function(e) {
                    "Legacy single-byte encodings" === e.heading && e.encodings.forEach(function(e) {
                        var t = e.name,
                            n = m(t.toLowerCase());
                        $[t] = function(e) {
                            return new E(n, e)
                        }, Y[t] = function(e) {
                            return new O(n, e)
                        }
                    })
                })
            }(), $.GBK = function(e) {
                return new x(e)
            }, Y.GBK = function(e) {
                return new I(e, !0)
            }, Y.gb18030 = function(e) {
                return new I(e)
            }, $.gb18030 = function(e) {
                return new x(e)
            }, Y.Big5 = function(e) {
                return new T(e)
            }, $.Big5 = function(e) {
                return new k(e)
            }, Y["EUC-JP"] = function(e) {
                return new j(e)
            }, $["EUC-JP"] = function(e) {
                return new A(e)
            }, Y["ISO-2022-JP"] = function(e) {
                return new P(e)
            }, $["ISO-2022-JP"] = function(e) {
                return new N(e)
            }, Y.Shift_JIS = function(e) {
                return new F(e)
            }, $.Shift_JIS = function(e) {
                return new D(e)
            }, Y["EUC-KR"] = function(e) {
                return new B(e)
            }, $["EUC-KR"] = function(e) {
                return new R(e)
            }, Y["UTF-16BE"] = function(e) {
                return new W(!0, e)
            }, $["UTF-16BE"] = function(e) {
                return new L(!0, e)
            }, Y["UTF-16LE"] = function(e) {
                return new W(!1, e)
            }, $["UTF-16LE"] = function(e) {
                return new L(!1, e)
            }, Y["x-user-defined"] = function(e) {
                return new M(e)
            }, $["x-user-defined"] = function(e) {
                return new U(e)
            }, e.TextEncoder || (e.TextEncoder = _), e.TextDecoder || (e.TextDecoder = w), "undefined" != typeof module && module.exports && (module.exports = {
                TextEncoder: e.TextEncoder,
                TextDecoder: e.TextDecoder,
                EncodingIndexes: e["encoding-indexes"]
            })
    }(this || {}), define("encodingjs", function() {}),
    function(e) {
        if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
        else if ("function" == typeof define && define.amd) define("sockjs", [], e);
        else {
            var t;
            t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, t.SockJS = e()
        }
    }(function() {
        var e;
        return function() {
            function e(t, n, i) {
                function r(s, a) {
                    if (!n[s]) {
                        if (!t[s]) {
                            var c = "function" == typeof require && require;
                            if (!a && c) return c(s, !0);
                            if (o) return o(s, !0);
                            var u = new Error("Cannot find module '" + s + "'");
                            throw u.code = "MODULE_NOT_FOUND", u
                        }
                        var l = n[s] = {
                            exports: {}
                        };
                        t[s][0].call(l.exports, function(e) {
                            return r(t[s][1][e] || e)
                        }, l, l.exports, e, t, n, i)
                    }
                    return n[s].exports
                }
                for (var o = "function" == typeof require && require, s = 0; s < i.length; s++) r(i[s]);
                return r
            }
            return e
        }()({
            1: [function(e, t, n) {
                (function(n) {
                    "use strict";
                    var i = e("./transport-list");
                    t.exports = e("./main")(i), "_sockjs_onload" in n && setTimeout(n._sockjs_onload, 1)
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "./main": 14,
                "./transport-list": 16
            }],
            2: [function(e, t, n) {
                "use strict";

                function i() {
                    o.call(this), this.initEvent("close", !1, !1), this.wasClean = !1, this.code = 0, this.reason = ""
                }
                var r = e("inherits"),
                    o = e("./event");
                r(i, o), t.exports = i
            }, {
                "./event": 4,
                inherits: 57
            }],
            3: [function(e, t, n) {
                "use strict";

                function i() {
                    o.call(this)
                }
                var r = e("inherits"),
                    o = e("./eventtarget");
                r(i, o), i.prototype.removeAllListeners = function(e) {
                    e ? delete this._listeners[e] : this._listeners = {}
                }, i.prototype.once = function(e, t) {
                    function n() {
                        i.removeListener(e, n), r || (r = !0, t.apply(this, arguments))
                    }
                    var i = this,
                        r = !1;
                    this.on(e, n)
                }, i.prototype.emit = function() {
                    var e = arguments[0],
                        t = this._listeners[e];
                    if (t) {
                        for (var n = arguments.length, i = new Array(n - 1), r = 1; r < n; r++) i[r - 1] = arguments[r];
                        for (var o = 0; o < t.length; o++) t[o].apply(this, i)
                    }
                }, i.prototype.on = i.prototype.addListener = o.prototype.addEventListener, i.prototype.removeListener = o.prototype.removeEventListener, t.exports.EventEmitter = i
            }, {
                "./eventtarget": 5,
                inherits: 57
            }],
            4: [function(e, t, n) {
                "use strict";

                function i(e) {
                    this.type = e
                }
                i.prototype.initEvent = function(e, t, n) {
                    return this.type = e, this.bubbles = t, this.cancelable = n, this.timeStamp = +new Date, this
                }, i.prototype.stopPropagation = function() {}, i.prototype.preventDefault = function() {}, i.CAPTURING_PHASE = 1, i.AT_TARGET = 2, i.BUBBLING_PHASE = 3, t.exports = i
            }, {}],
            5: [function(e, t, n) {
                "use strict";

                function i() {
                    this._listeners = {}
                }
                i.prototype.addEventListener = function(e, t) {
                    e in this._listeners || (this._listeners[e] = []);
                    var n = this._listeners[e]; - 1 === n.indexOf(t) && (n = n.concat([t])), this._listeners[e] = n
                }, i.prototype.removeEventListener = function(e, t) {
                    var n = this._listeners[e];
                    if (n) {
                        var i = n.indexOf(t);
                        return -1 !== i ? void(n.length > 1 ? this._listeners[e] = n.slice(0, i).concat(n.slice(i + 1)) : delete this._listeners[e]) : void 0
                    }
                }, i.prototype.dispatchEvent = function() {
                    var e = arguments[0],
                        t = e.type,
                        n = 1 === arguments.length ? [e] : Array.apply(null, arguments);
                    if (this["on" + t] && this["on" + t].apply(this, n), t in this._listeners)
                        for (var i = this._listeners[t], r = 0; r < i.length; r++) i[r].apply(this, n)
                }, t.exports = i
            }, {}],
            6: [function(e, t, n) {
                "use strict";

                function i(e) {
                    o.call(this), this.initEvent("message", !1, !1), this.data = e
                }
                var r = e("inherits"),
                    o = e("./event");
                r(i, o), t.exports = i
            }, {
                "./event": 4,
                inherits: 57
            }],
            7: [function(e, t, n) {
                "use strict";

                function i(e) {
                    this._transport = e, e.on("message", this._transportMessage.bind(this)), e.on("close", this._transportClose.bind(this))
                }
                var r = e("json3"),
                    o = e("./utils/iframe");
                i.prototype._transportClose = function(e, t) {
                    o.postMessage("c", r.stringify([e, t]))
                }, i.prototype._transportMessage = function(e) {
                    o.postMessage("t", e)
                }, i.prototype._send = function(e) {
                    this._transport.send(e)
                }, i.prototype._close = function() {
                    this._transport.close(), this._transport.removeAllListeners()
                }, t.exports = i
            }, {
                "./utils/iframe": 47,
                json3: 58
            }],
            8: [function(e, t, n) {
                (function(n) {
                    "use strict";
                    var i = e("./utils/url"),
                        r = e("./utils/event"),
                        o = e("json3"),
                        s = e("./facade"),
                        a = e("./info-iframe-receiver"),
                        c = e("./utils/iframe"),
                        u = e("./location"),
                        l = function() {};
                    "production" !== n.env.NODE_ENV && (l = e("debug")("sockjs-client:iframe-bootstrap")), t.exports = function(e, t) {
                        var n = {};
                        t.forEach(function(e) {
                            e.facadeTransport && (n[e.facadeTransport.transportName] = e.facadeTransport)
                        }), n[a.transportName] = a;
                        var f;
                        e.bootstrap_iframe = function() {
                            var t;
                            c.currentWindowId = u.hash.slice(1);
                            var a = function(r) {
                                if (r.source === parent && (void 0 === f && (f = r.origin), r.origin === f)) {
                                    var a;
                                    try {
                                        a = o.parse(r.data)
                                    } catch (e) {
                                        return void l("bad json", r.data)
                                    }
                                    if (a.windowId === c.currentWindowId) switch (a.type) {
                                        case "s":
                                            var d;
                                            try {
                                                d = o.parse(a.data)
                                            } catch (e) {
                                                l("bad json", a.data);
                                                break
                                            }
                                            var p = d[0],
                                                h = d[1],
                                                m = d[2],
                                                g = d[3];
                                            if (l(p, h, m, g), p !== e.version) throw new Error('Incompatible SockJS! Main site uses: "' + p + '", the iframe: "' + e.version + '".');
                                            if (!i.isOriginEqual(m, u.href) || !i.isOriginEqual(g, u.href)) throw new Error("Can't connect to different domain from within an iframe. (" + u.href + ", " + m + ", " + g + ")");
                                            t = new s(new n[h](m, g));
                                            break;
                                        case "m":
                                            t._send(a.data);
                                            break;
                                        case "c":
                                            t && t._close(), t = null
                                    }
                                }
                            };
                            r.attachEvent("message", a), c.postMessage("s")
                        }
                    }
                }).call(this, {
                    env: {}
                })
            }, {
                "./facade": 7,
                "./info-iframe-receiver": 10,
                "./location": 13,
                "./utils/event": 46,
                "./utils/iframe": 47,
                "./utils/url": 52,
                debug: 55,
                json3: 58
            }],
            9: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e, t) {
                        r.call(this);
                        var n = this,
                            i = +new Date;
                        this.xo = new t("GET", e), this.xo.once("finish", function(e, t) {
                            var r, o;
                            if (200 === e) {
                                if (o = +new Date - i, t) try {
                                    r = s.parse(t)
                                } catch (e) {
                                    c("bad json", t)
                                }
                                a.isObject(r) || (r = {})
                            }
                            n.emit("finish", r, o), n.removeAllListeners()
                        })
                    }
                    var r = e("events").EventEmitter,
                        o = e("inherits"),
                        s = e("json3"),
                        a = e("./utils/object"),
                        c = function() {};
                    "production" !== n.env.NODE_ENV && (c = e("debug")("sockjs-client:info-ajax")), o(i, r), i.prototype.close = function() {
                        this.removeAllListeners(), this.xo.close()
                    }, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                "./utils/object": 49,
                debug: 55,
                events: 3,
                inherits: 57,
                json3: 58
            }],
            10: [function(e, t, n) {
                "use strict";

                function i(e) {
                    var t = this;
                    o.call(this), this.ir = new c(e, a), this.ir.once("finish", function(e, n) {
                        t.ir = null, t.emit("message", s.stringify([e, n]))
                    })
                }
                var r = e("inherits"),
                    o = e("events").EventEmitter,
                    s = e("json3"),
                    a = e("./transport/sender/xhr-local"),
                    c = e("./info-ajax");
                r(i, o), i.transportName = "iframe-info-receiver", i.prototype.close = function() {
                    this.ir && (this.ir.close(), this.ir = null), this.removeAllListeners()
                }, t.exports = i
            }, {
                "./info-ajax": 9,
                "./transport/sender/xhr-local": 37,
                events: 3,
                inherits: 57,
                json3: 58
            }],
            11: [function(e, t, n) {
                (function(n, i) {
                    "use strict";

                    function r(e, t) {
                        var n = this;
                        o.call(this);
                        var r = function() {
                            var i = n.ifr = new u(l.transportName, t, e);
                            i.once("message", function(e) {
                                if (e) {
                                    var t;
                                    try {
                                        t = a.parse(e)
                                    } catch (t) {
                                        return f("bad json", e), n.emit("finish"), void n.close()
                                    }
                                    var i = t[0],
                                        r = t[1];
                                    n.emit("finish", i, r)
                                }
                                n.close()
                            }), i.once("close", function() {
                                n.emit("finish"), n.close()
                            })
                        };
                        i.document.body ? r() : c.attachEvent("load", r)
                    }
                    var o = e("events").EventEmitter,
                        s = e("inherits"),
                        a = e("json3"),
                        c = e("./utils/event"),
                        u = e("./transport/iframe"),
                        l = e("./info-iframe-receiver"),
                        f = function() {};
                    "production" !== n.env.NODE_ENV && (f = e("debug")("sockjs-client:info-iframe")), s(r, o), r.enabled = function() {
                        return u.enabled()
                    }, r.prototype.close = function() {
                        this.ifr && this.ifr.close(), this.removeAllListeners(), this.ifr = null
                    }, t.exports = r
                }).call(this, {
                    env: {}
                }, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "./info-iframe-receiver": 10,
                "./transport/iframe": 22,
                "./utils/event": 46,
                debug: 55,
                events: 3,
                inherits: 57,
                json3: 58
            }],
            12: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e, t) {
                        p(e);
                        var n = this;
                        r.call(this), setTimeout(function() {
                            n.doXhr(e, t)
                        }, 0)
                    }
                    var r = e("events").EventEmitter,
                        o = e("inherits"),
                        s = e("./utils/url"),
                        a = e("./transport/sender/xdr"),
                        c = e("./transport/sender/xhr-cors"),
                        u = e("./transport/sender/xhr-local"),
                        l = e("./transport/sender/xhr-fake"),
                        f = e("./info-iframe"),
                        d = e("./info-ajax"),
                        p = function() {};
                    "production" !== n.env.NODE_ENV && (p = e("debug")("sockjs-client:info-receiver")), o(i, r), i._getReceiver = function(e, t, n) {
                        return n.sameOrigin ? new d(t, u) : c.enabled ? new d(t, c) : a.enabled && n.sameScheme ? new d(t, a) : f.enabled() ? new f(e, t) : new d(t, l)
                    }, i.prototype.doXhr = function(e, t) {
                        var n = this,
                            r = s.addPath(e, "/info");
                        p("doXhr", r), this.xo = i._getReceiver(e, r, t), this.timeoutRef = setTimeout(function() {
                            p("timeout"), n._cleanup(!1), n.emit("finish")
                        }, i.timeout), this.xo.once("finish", function(e, t) {
                            p("finish", e, t), n._cleanup(!0), n.emit("finish", e, t)
                        })
                    }, i.prototype._cleanup = function(e) {
                        p("_cleanup"), clearTimeout(this.timeoutRef), this.timeoutRef = null, !e && this.xo && this.xo.close(), this.xo = null
                    }, i.prototype.close = function() {
                        p("close"), this.removeAllListeners(), this._cleanup(!1)
                    }, i.timeout = 8e3, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                "./info-ajax": 9,
                "./info-iframe": 11,
                "./transport/sender/xdr": 34,
                "./transport/sender/xhr-cors": 35,
                "./transport/sender/xhr-fake": 36,
                "./transport/sender/xhr-local": 37,
                "./utils/url": 52,
                debug: 55,
                events: 3,
                inherits: 57
            }],
            13: [function(e, t, n) {
                (function(e) {
                    "use strict";
                    t.exports = e.location || {
                        origin: "http://localhost:80",
                        protocol: "http:",
                        host: "localhost",
                        port: 80,
                        href: "http://localhost/",
                        hash: ""
                    }
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            14: [function(e, t, n) {
                (function(n, i) {
                    "use strict";

                    function r(e, t, n) {
                        if (!(this instanceof r)) return new r(e, t, n);
                        if (arguments.length < 1) throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");
                        y.call(this), this.readyState = r.CONNECTING, this.extensions = "", this.protocol = "", n = n || {}, n.protocols_whitelist && g.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."), this._transportsWhitelist = n.transports, this._transportOptions = n.transportOptions || {}, this._timeout = n.timeout || 0;
                        var i = n.sessionId || 8;
                        if ("function" == typeof i) this._generateSessionId = i;
                        else {
                            if ("number" != typeof i) throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");
                            this._generateSessionId = function() {
                                return u.string(i)
                            }
                        }
                        this._server = n.server || u.numberString(1e3);
                        var o = new s(e);
                        if (!o.host || !o.protocol) throw new SyntaxError("The URL '" + e + "' is invalid");
                        if (o.hash) throw new SyntaxError("The URL must not contain a fragment");
                        if ("http:" !== o.protocol && "https:" !== o.protocol) throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + o.protocol + "' is not allowed.");
                        var a = "https:" === o.protocol;
                        if ("https:" === v.protocol && !a && !f.isLoopbackAddr(o.hostname)) throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");
                        t ? Array.isArray(t) || (t = [t]) : t = [];
                        var c = t.sort();
                        c.forEach(function(e, t) {
                            if (!e) throw new SyntaxError("The protocols entry '" + e + "' is invalid.");
                            if (t < c.length - 1 && e === c[t + 1]) throw new SyntaxError("The protocols entry '" + e + "' is duplicated.")
                        });
                        var l = f.getOrigin(v.href);
                        this._origin = l ? l.toLowerCase() : null, o.set("pathname", o.pathname.replace(/\/+$/, "")), this.url = o.href, S("using url", this.url), this._urlInfo = {
                            nullOrigin: !m.hasDomain(),
                            sameOrigin: f.isOriginEqual(this.url, v.href),
                            sameScheme: f.isSchemeEqual(this.url, v.href)
                        }, this._ir = new C(this.url, this._urlInfo), this._ir.once("finish", this._receiveInfo.bind(this))
                    }

                    function o(e) {
                        return 1e3 === e || e >= 3e3 && e <= 4999
                    }
                    e("./shims");
                    var s = e("url-parse"),
                        a = e("inherits"),
                        c = e("json3"),
                        u = e("./utils/random"),
                        l = e("./utils/escape"),
                        f = e("./utils/url"),
                        d = e("./utils/event"),
                        p = e("./utils/transport"),
                        h = e("./utils/object"),
                        m = e("./utils/browser"),
                        g = e("./utils/log"),
                        b = e("./event/event"),
                        y = e("./event/eventtarget"),
                        v = e("./location"),
                        w = e("./event/close"),
                        _ = e("./event/trans-message"),
                        C = e("./info-receiver"),
                        S = function() {};
                    "production" !== n.env.NODE_ENV && (S = e("debug")("sockjs-client:main"));
                    var E;
                    a(r, y), r.prototype.close = function(e, t) {
                        if (e && !o(e)) throw new Error("InvalidAccessError: Invalid code");
                        if (t && t.length > 123) throw new SyntaxError("reason argument has an invalid length");
                        if (this.readyState !== r.CLOSING && this.readyState !== r.CLOSED) {
                            this._close(e || 1e3, t || "Normal closure", !0)
                        }
                    }, r.prototype.send = function(e) {
                        if ("string" != typeof e && (e = "" + e),
                            this.readyState === r.CONNECTING) throw new Error("InvalidStateError: The connection has not been established yet");
                        this.readyState === r.OPEN && this._transport.send(l.quote(e))
                    }, r.version = e("./version"), r.CONNECTING = 0, r.OPEN = 1, r.CLOSING = 2, r.CLOSED = 3, r.prototype._receiveInfo = function(e, t) {
                        if (S("_receiveInfo", t), this._ir = null, !e) return void this._close(1002, "Cannot connect to server");
                        this._rto = this.countRTO(t), this._transUrl = e.base_url ? e.base_url : this.url, e = h.extend(e, this._urlInfo), S("info", e);
                        var n = E.filterToEnabled(this._transportsWhitelist, e);
                        this._transports = n.main, S(this._transports.length + " enabled transports"), this._connect()
                    }, r.prototype._connect = function() {
                        for (var e = this._transports.shift(); e; e = this._transports.shift()) {
                            if (S("attempt", e.transportName), e.needBody && (!i.document.body || void 0 !== i.document.readyState && "complete" !== i.document.readyState && "interactive" !== i.document.readyState)) return S("waiting for body"), this._transports.unshift(e), void d.attachEvent("load", this._connect.bind(this));
                            var t = Math.max(this._timeout, this._rto * e.roundTrips || 5e3);
                            this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), t), S("using timeout", t);
                            var n = f.addPath(this._transUrl, "/" + this._server + "/" + this._generateSessionId()),
                                r = this._transportOptions[e.transportName];
                            S("transport url", n);
                            var o = new e(n, this._transUrl, r);
                            return o.on("message", this._transportMessage.bind(this)), o.once("close", this._transportClose.bind(this)), o.transportName = e.transportName, void(this._transport = o)
                        }
                        this._close(2e3, "All transports failed", !1)
                    }, r.prototype._transportTimeout = function() {
                        S("_transportTimeout"), this.readyState === r.CONNECTING && (this._transport && this._transport.close(), this._transportClose(2007, "Transport timed out"))
                    }, r.prototype._transportMessage = function(e) {
                        S("_transportMessage", e);
                        var t, n = this,
                            i = e.slice(0, 1),
                            r = e.slice(1);
                        switch (i) {
                            case "o":
                                return void this._open();
                            case "h":
                                return this.dispatchEvent(new b("heartbeat")), void S("heartbeat", this.transport)
                        }
                        if (r) try {
                            t = c.parse(r)
                        } catch (e) {
                            S("bad json", r)
                        }
                        if (void 0 === t) return void S("empty payload", r);
                        switch (i) {
                            case "a":
                                Array.isArray(t) && t.forEach(function(e) {
                                    S("message", n.transport, e), n.dispatchEvent(new _(e))
                                });
                                break;
                            case "m":
                                S("message", this.transport, t), this.dispatchEvent(new _(t));
                                break;
                            case "c":
                                Array.isArray(t) && 2 === t.length && this._close(t[0], t[1], !0)
                        }
                    }, r.prototype._transportClose = function(e, t) {
                        if (S("_transportClose", this.transport, e, t), this._transport && (this._transport.removeAllListeners(), this._transport = null, this.transport = null), !o(e) && 2e3 !== e && this.readyState === r.CONNECTING) return void this._connect();
                        this._close(e, t)
                    }, r.prototype._open = function() {
                        S("_open", this._transport && this._transport.transportName, this.readyState), this.readyState === r.CONNECTING ? (this._transportTimeoutId && (clearTimeout(this._transportTimeoutId), this._transportTimeoutId = null), this.readyState = r.OPEN, this.transport = this._transport.transportName, this.dispatchEvent(new b("open")), S("connected", this.transport)) : this._close(1006, "Server lost session")
                    }, r.prototype._close = function(e, t, n) {
                        S("_close", this.transport, e, t, n, this.readyState);
                        var i = !1;
                        if (this._ir && (i = !0, this._ir.close(), this._ir = null), this._transport && (this._transport.close(), this._transport = null, this.transport = null), this.readyState === r.CLOSED) throw new Error("InvalidStateError: SockJS has already been closed");
                        this.readyState = r.CLOSING, setTimeout(function() {
                            this.readyState = r.CLOSED, i && this.dispatchEvent(new b("error"));
                            var o = new w("close");
                            o.wasClean = n || !1, o.code = e || 1e3, o.reason = t, this.dispatchEvent(o), this.onmessage = this.onclose = this.onerror = null, S("disconnected")
                        }.bind(this), 0)
                    }, r.prototype.countRTO = function(e) {
                        return e > 100 ? 4 * e : 300 + e
                    }, t.exports = function(t) {
                        return E = p(t), e("./iframe-bootstrap")(r, t), r
                    }
                }).call(this, {
                    env: {}
                }, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "./event/close": 2,
                "./event/event": 4,
                "./event/eventtarget": 5,
                "./event/trans-message": 6,
                "./iframe-bootstrap": 8,
                "./info-receiver": 12,
                "./location": 13,
                "./shims": 15,
                "./utils/browser": 44,
                "./utils/escape": 45,
                "./utils/event": 46,
                "./utils/log": 48,
                "./utils/object": 49,
                "./utils/random": 50,
                "./utils/transport": 51,
                "./utils/url": 52,
                "./version": 53,
                debug: 55,
                inherits: 57,
                json3: 58,
                "url-parse": 61
            }],
            15: [function(e, t, n) {
                function i(e) {
                    var t = +e;
                    return t !== t ? t = 0 : 0 !== t && t !== 1 / 0 && t !== -1 / 0 && (t = (t > 0 || -1) * Math.floor(Math.abs(t))), t
                }

                function r(e) {
                    return e >>> 0
                }

                function o() {}
                var s, a = Array.prototype,
                    c = Object.prototype,
                    u = Function.prototype,
                    l = String.prototype,
                    f = a.slice,
                    d = c.toString,
                    p = function(e) {
                        return "[object Function]" === c.toString.call(e)
                    },
                    h = function(e) {
                        return "[object Array]" === d.call(e)
                    },
                    m = function(e) {
                        return "[object String]" === d.call(e)
                    },
                    g = Object.defineProperty && function() {
                        try {
                            return Object.defineProperty({}, "x", {}), !0
                        } catch (e) {
                            return !1
                        }
                    }();
                s = g ? function(e, t, n, i) {
                    !i && t in e || Object.defineProperty(e, t, {
                        configurable: !0,
                        enumerable: !1,
                        writable: !0,
                        value: n
                    })
                } : function(e, t, n, i) {
                    !i && t in e || (e[t] = n)
                };
                var b = function(e, t, n) {
                        for (var i in t) c.hasOwnProperty.call(t, i) && s(e, i, t[i], n)
                    },
                    y = function(e) {
                        if (null == e) throw new TypeError("can't convert " + e + " to object");
                        return Object(e)
                    };
                b(u, {
                    bind: function(e) {
                        var t = this;
                        if (!p(t)) throw new TypeError("Function.prototype.bind called on incompatible " + t);
                        for (var n = f.call(arguments, 1), i = function() {
                                if (this instanceof c) {
                                    var i = t.apply(this, n.concat(f.call(arguments)));
                                    return Object(i) === i ? i : this
                                }
                                return t.apply(e, n.concat(f.call(arguments)))
                            }, r = Math.max(0, t.length - n.length), s = [], a = 0; a < r; a++) s.push("$" + a);
                        var c = Function("binder", "return function (" + s.join(",") + "){ return binder.apply(this, arguments); }")(i);
                        return t.prototype && (o.prototype = t.prototype, c.prototype = new o, o.prototype = null), c
                    }
                }), b(Array, {
                    isArray: h
                });
                var v = Object("a"),
                    w = "a" !== v[0] || !(0 in v);
                b(a, {
                    forEach: function(e) {
                        var t = y(this),
                            n = w && m(this) ? this.split("") : t,
                            i = arguments[1],
                            r = -1,
                            o = n.length >>> 0;
                        if (!p(e)) throw new TypeError;
                        for (; ++r < o;) r in n && e.call(i, n[r], r, t)
                    }
                }, ! function(e) {
                    var t = !0,
                        n = !0;
                    return e && (e.call("foo", function(e, n, i) {
                        "object" != typeof i && (t = !1)
                    }), e.call([1], function() {
                        "use strict";
                        n = "string" == typeof this
                    }, "x")), !!e && t && n
                }(a.forEach));
                var _ = Array.prototype.indexOf && -1 !== [0, 1].indexOf(1, 2);
                b(a, {
                    indexOf: function(e) {
                        var t = w && m(this) ? this.split("") : y(this),
                            n = t.length >>> 0;
                        if (!n) return -1;
                        var r = 0;
                        for (arguments.length > 1 && (r = i(arguments[1])), r = r >= 0 ? r : Math.max(0, n + r); r < n; r++)
                            if (r in t && t[r] === e) return r;
                        return -1
                    }
                }, _);
                var C = l.split;
                2 !== "ab".split(/(?:ab)*/).length || 4 !== ".".split(/(.?)(.?)/).length || "t" === "tesst".split(/(s)*/)[1] || 4 !== "test".split(/(?:)/, -1).length || "".split(/.?/).length || ".".split(/()()/).length > 1 ? function() {
                    var e = void 0 === /()??/.exec("")[1];
                    l.split = function(t, n) {
                        var i = this;
                        if (void 0 === t && 0 === n) return [];
                        if ("[object RegExp]" !== d.call(t)) return C.call(this, t, n);
                        var o, s, c, u, l = [],
                            f = (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.extended ? "x" : "") + (t.sticky ? "y" : ""),
                            p = 0;
                        for (t = new RegExp(t.source, f + "g"), i += "", e || (o = new RegExp("^" + t.source + "$(?!\\s)", f)), n = void 0 === n ? -1 >>> 0 : r(n);
                            (s = t.exec(i)) && !((c = s.index + s[0].length) > p && (l.push(i.slice(p, s.index)), !e && s.length > 1 && s[0].replace(o, function() {
                                for (var e = 1; e < arguments.length - 2; e++) void 0 === arguments[e] && (s[e] = void 0)
                            }), s.length > 1 && s.index < i.length && a.push.apply(l, s.slice(1)), u = s[0].length, p = c, l.length >= n));) t.lastIndex === s.index && t.lastIndex++;
                        return p === i.length ? !u && t.test("") || l.push("") : l.push(i.slice(p)), l.length > n ? l.slice(0, n) : l
                    }
                }() : "0".split(void 0, 0).length && (l.split = function(e, t) {
                    return void 0 === e && 0 === t ? [] : C.call(this, e, t)
                });
                var S = l.substr,
                    E = "".substr && "b" !== "0b".substr(-1);
                b(l, {
                    substr: function(e, t) {
                        return S.call(this, e < 0 && (e = this.length + e) < 0 ? 0 : e, t)
                    }
                }, E)
            }, {}],
            16: [function(e, t, n) {
                "use strict";
                t.exports = [e("./transport/websocket"), e("./transport/xhr-streaming"), e("./transport/xdr-streaming"), e("./transport/eventsource"), e("./transport/lib/iframe-wrap")(e("./transport/eventsource")), e("./transport/htmlfile"), e("./transport/lib/iframe-wrap")(e("./transport/htmlfile")), e("./transport/xhr-polling"), e("./transport/xdr-polling"), e("./transport/lib/iframe-wrap")(e("./transport/xhr-polling")), e("./transport/jsonp-polling")]
            }, {
                "./transport/eventsource": 20,
                "./transport/htmlfile": 21,
                "./transport/jsonp-polling": 23,
                "./transport/lib/iframe-wrap": 26,
                "./transport/websocket": 38,
                "./transport/xdr-polling": 39,
                "./transport/xdr-streaming": 40,
                "./transport/xhr-polling": 41,
                "./transport/xhr-streaming": 42
            }],
            17: [function(e, t, n) {
                (function(n, i) {
                    "use strict";

                    function r(e, t, n, i) {
                        l(e, t);
                        var r = this;
                        o.call(this), setTimeout(function() {
                            r._start(e, t, n, i)
                        }, 0)
                    }
                    var o = e("events").EventEmitter,
                        s = e("inherits"),
                        a = e("../../utils/event"),
                        c = e("../../utils/url"),
                        u = i.XMLHttpRequest,
                        l = function() {};
                    "production" !== n.env.NODE_ENV && (l = e("debug")("sockjs-client:browser:xhr")), s(r, o), r.prototype._start = function(e, t, n, i) {
                        var o = this;
                        try {
                            this.xhr = new u
                        } catch (e) {}
                        if (!this.xhr) return l("no xhr"), this.emit("finish", 0, "no xhr support"), void this._cleanup();
                        t = c.addQuery(t, "t=" + +new Date), this.unloadRef = a.unloadAdd(function() {
                            l("unload cleanup"), o._cleanup(!0)
                        });
                        try {
                            this.xhr.open(e, t, !0), this.timeout && "timeout" in this.xhr && (this.xhr.timeout = this.timeout, this.xhr.ontimeout = function() {
                                l("xhr timeout"), o.emit("finish", 0, ""), o._cleanup(!1)
                            })
                        } catch (e) {
                            return l("exception", e), this.emit("finish", 0, ""), void this._cleanup(!1)
                        }
                        if (i && i.noCredentials || !r.supportsCORS || (l("withCredentials"), this.xhr.withCredentials = !0), i && i.headers)
                            for (var s in i.headers) this.xhr.setRequestHeader(s, i.headers[s]);
                        this.xhr.onreadystatechange = function() {
                            if (o.xhr) {
                                var e, t, n = o.xhr;
                                switch (l("readyState", n.readyState), n.readyState) {
                                    case 3:
                                        try {
                                            t = n.status, e = n.responseText
                                        } catch (e) {}
                                        l("status", t), 1223 === t && (t = 204), 200 === t && e && e.length > 0 && (l("chunk"), o.emit("chunk", t, e));
                                        break;
                                    case 4:
                                        t = n.status, l("status", t), 1223 === t && (t = 204), 12005 !== t && 12029 !== t || (t = 0), l("finish", t, n.responseText), o.emit("finish", t, n.responseText), o._cleanup(!1)
                                }
                            }
                        };
                        try {
                            o.xhr.send(n)
                        } catch (e) {
                            o.emit("finish", 0, ""), o._cleanup(!1)
                        }
                    }, r.prototype._cleanup = function(e) {
                        if (l("cleanup"), this.xhr) {
                            if (this.removeAllListeners(), a.unloadDel(this.unloadRef), this.xhr.onreadystatechange = function() {}, this.xhr.ontimeout && (this.xhr.ontimeout = null), e) try {
                                this.xhr.abort()
                            } catch (e) {}
                            this.unloadRef = this.xhr = null
                        }
                    }, r.prototype.close = function() {
                        l("close"), this._cleanup(!0)
                    }, r.enabled = !!u;
                    var f = ["Active"].concat("Object").join("X");
                    !r.enabled && f in i && (l("overriding xmlhttprequest"), u = function() {
                        try {
                            return new i[f]("Microsoft.XMLHTTP")
                        } catch (e) {
                            return null
                        }
                    }, r.enabled = !!new u);
                    var d = !1;
                    try {
                        d = "withCredentials" in new u
                    } catch (e) {}
                    r.supportsCORS = d, t.exports = r
                }).call(this, {
                    env: {}
                }, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "../../utils/event": 46,
                "../../utils/url": 52,
                debug: 55,
                events: 3,
                inherits: 57
            }],
            18: [function(e, t, n) {
                (function(e) {
                    t.exports = e.EventSource
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            19: [function(e, t, n) {
                (function(e) {
                    "use strict";
                    var n = e.WebSocket || e.MozWebSocket;
                    t.exports = n ? function(e) {
                        return new n(e)
                    } : void 0
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            20: [function(e, t, n) {
                "use strict";

                function i(e) {
                    if (!i.enabled()) throw new Error("Transport created when disabled");
                    o.call(this, e, "/eventsource", s, a)
                }
                var r = e("inherits"),
                    o = e("./lib/ajax-based"),
                    s = e("./receiver/eventsource"),
                    a = e("./sender/xhr-cors"),
                    c = e("eventsource");
                r(i, o), i.enabled = function() {
                    return !!c
                }, i.transportName = "eventsource", i.roundTrips = 2, t.exports = i
            }, {
                "./lib/ajax-based": 24,
                "./receiver/eventsource": 29,
                "./sender/xhr-cors": 35,
                eventsource: 18,
                inherits: 57
            }],
            21: [function(e, t, n) {
                "use strict";

                function i(e) {
                    if (!o.enabled) throw new Error("Transport created when disabled");
                    a.call(this, e, "/htmlfile", o, s)
                }
                var r = e("inherits"),
                    o = e("./receiver/htmlfile"),
                    s = e("./sender/xhr-local"),
                    a = e("./lib/ajax-based");
                r(i, a), i.enabled = function(e) {
                    return o.enabled && e.sameOrigin
                }, i.transportName = "htmlfile", i.roundTrips = 2, t.exports = i
            }, {
                "./lib/ajax-based": 24,
                "./receiver/htmlfile": 30,
                "./sender/xhr-local": 37,
                inherits: 57
            }],
            22: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e, t, n) {
                        if (!i.enabled()) throw new Error("Transport created when disabled");
                        s.call(this);
                        var r = this;
                        this.origin = c.getOrigin(n), this.baseUrl = n, this.transUrl = t, this.transport = e, this.windowId = f.string(8);
                        var o = c.addPath(n, "/iframe.html") + "#" + this.windowId;
                        d(e, t, o), this.iframeObj = u.createIframe(o, function(e) {
                            d("err callback"), r.emit("close", 1006, "Unable to load an iframe (" + e + ")"), r.close()
                        }), this.onmessageCallback = this._message.bind(this), l.attachEvent("message", this.onmessageCallback)
                    }
                    var r = e("inherits"),
                        o = e("json3"),
                        s = e("events").EventEmitter,
                        a = e("../version"),
                        c = e("../utils/url"),
                        u = e("../utils/iframe"),
                        l = e("../utils/event"),
                        f = e("../utils/random"),
                        d = function() {};
                    "production" !== n.env.NODE_ENV && (d = e("debug")("sockjs-client:transport:iframe")), r(i, s), i.prototype.close = function() {
                        if (d("close"), this.removeAllListeners(), this.iframeObj) {
                            l.detachEvent("message", this.onmessageCallback);
                            try {
                                this.postMessage("c")
                            } catch (e) {}
                            this.iframeObj.cleanup(), this.iframeObj = null, this.onmessageCallback = this.iframeObj = null
                        }
                    }, i.prototype._message = function(e) {
                        if (d("message", e.data), !c.isOriginEqual(e.origin, this.origin)) return void d("not same origin", e.origin, this.origin);
                        var t;
                        try {
                            t = o.parse(e.data)
                        } catch (t) {
                            return void d("bad json", e.data)
                        }
                        if (t.windowId !== this.windowId) return void d("mismatched window id", t.windowId, this.windowId);
                        switch (t.type) {
                            case "s":
                                this.iframeObj.loaded(), this.postMessage("s", o.stringify([a, this.transport, this.transUrl, this.baseUrl]));
                                break;
                            case "t":
                                this.emit("message", t.data);
                                break;
                            case "c":
                                var n;
                                try {
                                    n = o.parse(t.data)
                                } catch (e) {
                                    return void d("bad json", t.data)
                                }
                                this.emit("close", n[0], n[1]), this.close()
                        }
                    }, i.prototype.postMessage = function(e, t) {
                        d("postMessage", e, t), this.iframeObj.post(o.stringify({
                            windowId: this.windowId,
                            type: e,
                            data: t || ""
                        }), this.origin)
                    }, i.prototype.send = function(e) {
                        d("send", e), this.postMessage("m", e)
                    }, i.enabled = function() {
                        return u.iframeEnabled
                    }, i.transportName = "iframe", i.roundTrips = 2, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                "../utils/event": 46,
                "../utils/iframe": 47,
                "../utils/random": 50,
                "../utils/url": 52,
                "../version": 53,
                debug: 55,
                events: 3,
                inherits: 57,
                json3: 58
            }],
            23: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e) {
                        if (!i.enabled()) throw new Error("Transport created when disabled");
                        o.call(this, e, "/jsonp", a, s)
                    }
                    var r = e("inherits"),
                        o = e("./lib/sender-receiver"),
                        s = e("./receiver/jsonp"),
                        a = e("./sender/jsonp");
                    r(i, o), i.enabled = function() {
                        return !!n.document
                    }, i.transportName = "jsonp-polling", i.roundTrips = 1, i.needBody = !0, t.exports = i
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "./lib/sender-receiver": 28,
                "./receiver/jsonp": 31,
                "./sender/jsonp": 33,
                inherits: 57
            }],
            24: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e) {
                        return function(t, n, i) {
                            c("create ajax sender", t, n);
                            var r = {};
                            "string" == typeof n && (r.headers = {
                                "Content-type": "text/plain"
                            });
                            var o = s.addPath(t, "/xhr_send"),
                                a = new e("POST", o, n, r);
                            return a.once("finish", function(e) {
                                    if (c("finish", e), a = null, 200 !== e && 204 !== e) return i(new Error("http status " + e));
                                    i()
                                }),
                                function() {
                                    c("abort"), a.close(), a = null;
                                    var e = new Error("Aborted");
                                    e.code = 1e3, i(e)
                                }
                        }
                    }

                    function r(e, t, n, r) {
                        a.call(this, e, t, i(r), n, r)
                    }
                    var o = e("inherits"),
                        s = e("../../utils/url"),
                        a = e("./sender-receiver"),
                        c = function() {};
                    "production" !== n.env.NODE_ENV && (c = e("debug")("sockjs-client:ajax-based")), o(r, a), t.exports = r
                }).call(this, {
                    env: {}
                })
            }, {
                "../../utils/url": 52,
                "./sender-receiver": 28,
                debug: 55,
                inherits: 57
            }],
            25: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e, t) {
                        s(e), o.call(this), this.sendBuffer = [], this.sender = t, this.url = e
                    }
                    var r = e("inherits"),
                        o = e("events").EventEmitter,
                        s = function() {};
                    "production" !== n.env.NODE_ENV && (s = e("debug")("sockjs-client:buffered-sender")), r(i, o), i.prototype.send = function(e) {
                        s("send", e), this.sendBuffer.push(e), this.sendStop || this.sendSchedule()
                    }, i.prototype.sendScheduleWait = function() {
                        s("sendScheduleWait");
                        var e, t = this;
                        this.sendStop = function() {
                            s("sendStop"), t.sendStop = null, clearTimeout(e)
                        }, e = setTimeout(function() {
                            s("timeout"), t.sendStop = null, t.sendSchedule()
                        }, 25)
                    }, i.prototype.sendSchedule = function() {
                        s("sendSchedule", this.sendBuffer.length);
                        var e = this;
                        if (this.sendBuffer.length > 0) {
                            var t = "[" + this.sendBuffer.join(",") + "]";
                            this.sendStop = this.sender(this.url, t, function(t) {
                                e.sendStop = null, t ? (s("error", t), e.emit("close", t.code || 1006, "Sending error: " + t), e.close()) : e.sendScheduleWait()
                            }), this.sendBuffer = []
                        }
                    }, i.prototype._cleanup = function() {
                        s("_cleanup"), this.removeAllListeners()
                    }, i.prototype.close = function() {
                        s("close"), this._cleanup(), this.sendStop && (this.sendStop(), this.sendStop = null)
                    }, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                debug: 55,
                events: 3,
                inherits: 57
            }],
            26: [function(e, t, n) {
                (function(n) {
                    "use strict";
                    var i = e("inherits"),
                        r = e("../iframe"),
                        o = e("../../utils/object");
                    t.exports = function(e) {
                        function t(t, n) {
                            r.call(this, e.transportName, t, n)
                        }
                        return i(t, r), t.enabled = function(t, i) {
                            if (!n.document) return !1;
                            var s = o.extend({}, i);
                            return s.sameOrigin = !0, e.enabled(s) && r.enabled()
                        }, t.transportName = "iframe-" + e.transportName, t.needBody = !0, t.roundTrips = r.roundTrips + e.roundTrips - 1, t.facadeTransport = e, t
                    }
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "../../utils/object": 49,
                "../iframe": 22,
                inherits: 57
            }],
            27: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e, t, n) {
                        s(t), o.call(this), this.Receiver = e, this.receiveUrl = t, this.AjaxObject = n, this._scheduleReceiver()
                    }
                    var r = e("inherits"),
                        o = e("events").EventEmitter,
                        s = function() {};
                    "production" !== n.env.NODE_ENV && (s = e("debug")("sockjs-client:polling")), r(i, o), i.prototype._scheduleReceiver = function() {
                        s("_scheduleReceiver");
                        var e = this,
                            t = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);
                        t.on("message", function(t) {
                            s("message", t), e.emit("message", t)
                        }), t.once("close", function(n, i) {
                            s("close", n, i, e.pollIsClosing), e.poll = t = null, e.pollIsClosing || ("network" === i ? e._scheduleReceiver() : (e.emit("close", n || 1006, i), e.removeAllListeners()))
                        })
                    }, i.prototype.abort = function() {
                        s("abort"), this.removeAllListeners(), this.pollIsClosing = !0, this.poll && this.poll.abort()
                    }, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                debug: 55,
                events: 3,
                inherits: 57
            }],
            28: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e, t, n, i, r) {
                        var u = o.addPath(e, t);
                        c(u);
                        var l = this;
                        s.call(this, e, n), this.poll = new a(i, u, r), this.poll.on("message", function(e) {
                            c("poll message", e), l.emit("message", e)
                        }), this.poll.once("close", function(e, t) {
                            c("poll close", e, t), l.poll = null, l.emit("close", e, t), l.close()
                        })
                    }
                    var r = e("inherits"),
                        o = e("../../utils/url"),
                        s = e("./buffered-sender"),
                        a = e("./polling"),
                        c = function() {};
                    "production" !== n.env.NODE_ENV && (c = e("debug")("sockjs-client:sender-receiver")), r(i, s), i.prototype.close = function() {
                        s.prototype.close.call(this), c("close"), this.removeAllListeners(), this.poll && (this.poll.abort(), this.poll = null)
                    }, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                "../../utils/url": 52,
                "./buffered-sender": 25,
                "./polling": 27,
                debug: 55,
                inherits: 57
            }],
            29: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e) {
                        a(e), o.call(this);
                        var t = this,
                            n = this.es = new s(e);
                        n.onmessage = function(e) {
                            a("message", e.data), t.emit("message", decodeURI(e.data))
                        }, n.onerror = function(e) {
                            a("error", n.readyState, e);
                            var i = 2 !== n.readyState ? "network" : "permanent";
                            t._cleanup(), t._close(i)
                        }
                    }
                    var r = e("inherits"),
                        o = e("events").EventEmitter,
                        s = e("eventsource"),
                        a = function() {};
                    "production" !== n.env.NODE_ENV && (a = e("debug")("sockjs-client:receiver:eventsource")), r(i, o), i.prototype.abort = function() {
                        a("abort"), this._cleanup(), this._close("user")
                    }, i.prototype._cleanup = function() {
                        a("cleanup");
                        var e = this.es;
                        e && (e.onmessage = e.onerror = null, e.close(), this.es = null)
                    }, i.prototype._close = function(e) {
                        a("close", e);
                        var t = this;
                        setTimeout(function() {
                            t.emit("close", null, e), t.removeAllListeners()
                        }, 200)
                    }, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                debug: 55,
                events: 3,
                eventsource: 18,
                inherits: 57
            }],
            30: [function(e, t, n) {
                (function(n, i) {
                    "use strict";

                    function r(e) {
                        l(e), c.call(this);
                        var t = this;
                        s.polluteGlobalNamespace(), this.id = "a" + u.string(6), e = a.addQuery(e, "c=" + decodeURIComponent(s.WPrefix + "." + this.id)), l("using htmlfile", r.htmlfileEnabled);
                        var n = r.htmlfileEnabled ? s.createHtmlfile : s.createIframe;
                        i[s.WPrefix][this.id] = {
                            start: function() {
                                l("start"), t.iframeObj.loaded()
                            },
                            message: function(e) {
                                l("message", e), t.emit("message", e)
                            },
                            stop: function() {
                                l("stop"), t._cleanup(), t._close("network")
                            }
                        }, this.iframeObj = n(e, function() {
                            l("callback"), t._cleanup(), t._close("permanent")
                        })
                    }
                    var o = e("inherits"),
                        s = e("../../utils/iframe"),
                        a = e("../../utils/url"),
                        c = e("events").EventEmitter,
                        u = e("../../utils/random"),
                        l = function() {};
                    "production" !== n.env.NODE_ENV && (l = e("debug")("sockjs-client:receiver:htmlfile")), o(r, c), r.prototype.abort = function() {
                        l("abort"), this._cleanup(), this._close("user")
                    }, r.prototype._cleanup = function() {
                        l("_cleanup"), this.iframeObj && (this.iframeObj.cleanup(), this.iframeObj = null), delete i[s.WPrefix][this.id]
                    }, r.prototype._close = function(e) {
                        l("_close", e), this.emit("close", null, e), this.removeAllListeners()
                    }, r.htmlfileEnabled = !1;
                    var f = ["Active"].concat("Object").join("X");
                    if (f in i) try {
                        r.htmlfileEnabled = !!new i[f]("htmlfile")
                    } catch (e) {}
                    r.enabled = r.htmlfileEnabled || s.iframeEnabled, t.exports = r
                }).call(this, {
                    env: {}
                }, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "../../utils/iframe": 47,
                "../../utils/random": 50,
                "../../utils/url": 52,
                debug: 55,
                events: 3,
                inherits: 57
            }],
            31: [function(e, t, n) {
                (function(n, i) {
                    "use strict";

                    function r(e) {
                        f(e);
                        var t = this;
                        l.call(this), o.polluteGlobalNamespace(), this.id = "a" + s.string(6);
                        var n = c.addQuery(e, "c=" + encodeURIComponent(o.WPrefix + "." + this.id));
                        i[o.WPrefix][this.id] = this._callback.bind(this), this._createScript(n), this.timeoutId = setTimeout(function() {
                            f("timeout"), t._abort(new Error("JSONP script loaded abnormally (timeout)"))
                        }, r.timeout)
                    }
                    var o = e("../../utils/iframe"),
                        s = e("../../utils/random"),
                        a = e("../../utils/browser"),
                        c = e("../../utils/url"),
                        u = e("inherits"),
                        l = e("events").EventEmitter,
                        f = function() {};
                    "production" !== n.env.NODE_ENV && (f = e("debug")("sockjs-client:receiver:jsonp")), u(r, l), r.prototype.abort = function() {
                        if (f("abort"), i[o.WPrefix][this.id]) {
                            var e = new Error("JSONP user aborted read");
                            e.code = 1e3, this._abort(e)
                        }
                    }, r.timeout = 35e3, r.scriptErrorTimeout = 1e3, r.prototype._callback = function(e) {
                        f("_callback", e), this._cleanup(), this.aborting || (e && (f("message", e), this.emit("message", e)), this.emit("close", null, "network"), this.removeAllListeners())
                    }, r.prototype._abort = function(e) {
                        f("_abort", e), this._cleanup(), this.aborting = !0, this.emit("close", e.code, e.message), this.removeAllListeners()
                    }, r.prototype._cleanup = function() {
                        if (f("_cleanup"), clearTimeout(this.timeoutId), this.script2 && (this.script2.parentNode.removeChild(this.script2), this.script2 = null), this.script) {
                            var e = this.script;
                            e.parentNode.removeChild(e), e.onreadystatechange = e.onerror = e.onload = e.onclick = null, this.script = null
                        }
                        delete i[o.WPrefix][this.id]
                    }, r.prototype._scriptError = function() {
                        f("_scriptError");
                        var e = this;
                        this.errorTimer || (this.errorTimer = setTimeout(function() {
                            e.loadedOkay || e._abort(new Error("JSONP script loaded abnormally (onerror)"))
                        }, r.scriptErrorTimeout))
                    }, r.prototype._createScript = function(e) {
                        f("_createScript", e);
                        var t, n = this,
                            r = this.script = i.document.createElement("script");
                        if (r.id = "a" + s.string(8), r.src = e, r.type = "text/javascript", r.charset = "UTF-8", r.onerror = this._scriptError.bind(this), r.onload = function() {
                                f("onload"), n._abort(new Error("JSONP script loaded abnormally (onload)"))
                            }, r.onreadystatechange = function() {
                                if (f("onreadystatechange", r.readyState), /loaded|closed/.test(r.readyState)) {
                                    if (r && r.htmlFor && r.onclick) {
                                        n.loadedOkay = !0;
                                        try {
                                            r.onclick()
                                        } catch (e) {}
                                    }
                                    r && n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))
                                }
                            }, void 0 === r.async && i.document.attachEvent)
                            if (a.isOpera()) t = this.script2 = i.document.createElement("script"), t.text = "try{var a = document.getElementById('" + r.id + "'); if(a)a.onerror();}catch(x){};", r.async = t.async = !1;
                            else {
                                try {
                                    r.htmlFor = r.id, r.event = "onclick"
                                } catch (e) {}
                                r.async = !0
                            }
                        void 0 !== r.async && (r.async = !0);
                        var o = i.document.getElementsByTagName("head")[0];
                        o.insertBefore(r, o.firstChild), t && o.insertBefore(t, o.firstChild)
                    }, t.exports = r
                }).call(this, {
                    env: {}
                }, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "../../utils/browser": 44,
                "../../utils/iframe": 47,
                "../../utils/random": 50,
                "../../utils/url": 52,
                debug: 55,
                events: 3,
                inherits: 57
            }],
            32: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e, t) {
                        s(e), o.call(this);
                        var n = this;
                        this.bufferPosition = 0, this.xo = new t("POST", e, null), this.xo.on("chunk", this._chunkHandler.bind(this)), this.xo.once("finish", function(e, t) {
                            s("finish", e, t), n._chunkHandler(e, t), n.xo = null;
                            var i = 200 === e ? "network" : "permanent";
                            s("close", i), n.emit("close", null, i), n._cleanup()
                        })
                    }
                    var r = e("inherits"),
                        o = e("events").EventEmitter,
                        s = function() {};
                    "production" !== n.env.NODE_ENV && (s = e("debug")("sockjs-client:receiver:xhr")), r(i, o), i.prototype._chunkHandler = function(e, t) {
                        if (s("_chunkHandler", e), 200 === e && t)
                            for (var n = -1;; this.bufferPosition += n + 1) {
                                var i = t.slice(this.bufferPosition);
                                if (-1 === (n = i.indexOf("\n"))) break;
                                var r = i.slice(0, n);
                                r && (s("message", r), this.emit("message", r))
                            }
                    }, i.prototype._cleanup = function() {
                        s("_cleanup"), this.removeAllListeners()
                    }, i.prototype.abort = function() {
                        s("abort"), this.xo && (this.xo.close(), s("close"), this.emit("close", null, "user"), this.xo = null), this._cleanup()
                    }, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                debug: 55,
                events: 3,
                inherits: 57
            }],
            33: [function(e, t, n) {
                (function(n, i) {
                    "use strict";

                    function r(e) {
                        c("createIframe", e);
                        try {
                            return i.document.createElement('<iframe name="' + e + '">')
                        } catch (n) {
                            var t = i.document.createElement("iframe");
                            return t.name = e, t
                        }
                    }

                    function o() {
                        c("createForm"), u = i.document.createElement("form"), u.style.display = "none", u.style.position = "absolute", u.method = "POST", u.enctype = "application/x-www-form-urlencoded", u.acceptCharset = "UTF-8", l = i.document.createElement("textarea"), l.name = "d", u.appendChild(l), i.document.body.appendChild(u)
                    }
                    var s = e("../../utils/random"),
                        a = e("../../utils/url"),
                        c = function() {};
                    "production" !== n.env.NODE_ENV && (c = e("debug")("sockjs-client:sender:jsonp"));
                    var u, l;
                    t.exports = function(e, t, n) {
                        c(e, t), u || o();
                        var i = "a" + s.string(8);
                        u.target = i, u.action = a.addQuery(a.addPath(e, "/jsonp_send"), "i=" + i);
                        var f = r(i);
                        f.id = i, f.style.display = "none", u.appendChild(f);
                        try {
                            l.value = t
                        } catch (e) {}
                        u.submit();
                        var d = function(e) {
                            c("completed", i, e), f.onerror && (f.onreadystatechange = f.onerror = f.onload = null, setTimeout(function() {
                                c("cleaning up", i), f.parentNode.removeChild(f), f = null
                            }, 500), l.value = "", n(e))
                        };
                        return f.onerror = function() {
                                c("onerror", i), d()
                            }, f.onload = function() {
                                c("onload", i), d()
                            }, f.onreadystatechange = function(e) {
                                c("onreadystatechange", i, f.readyState, e), "complete" === f.readyState && d()
                            },
                            function() {
                                c("aborted", i), d(new Error("Aborted"))
                            }
                    }
                }).call(this, {
                    env: {}
                }, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "../../utils/random": 50,
                "../../utils/url": 52,
                debug: 55
            }],
            34: [function(e, t, n) {
                (function(n, i) {
                    "use strict";

                    function r(e, t, n) {
                        l(e, t);
                        var i = this;
                        o.call(this), setTimeout(function() {
                            i._start(e, t, n)
                        }, 0)
                    }
                    var o = e("events").EventEmitter,
                        s = e("inherits"),
                        a = e("../../utils/event"),
                        c = e("../../utils/browser"),
                        u = e("../../utils/url"),
                        l = function() {};
                    "production" !== n.env.NODE_ENV && (l = e("debug")("sockjs-client:sender:xdr")), s(r, o), r.prototype._start = function(e, t, n) {
                        l("_start");
                        var r = this,
                            o = new i.XDomainRequest;
                        t = u.addQuery(t, "t=" + +new Date), o.onerror = function() {
                            l("onerror"), r._error()
                        }, o.ontimeout = function() {
                            l("ontimeout"), r._error()
                        }, o.onprogress = function() {
                            l("progress", o.responseText), r.emit("chunk", 200, o.responseText)
                        }, o.onload = function() {
                            l("load"), r.emit("finish", 200, o.responseText), r._cleanup(!1)
                        }, this.xdr = o, this.unloadRef = a.unloadAdd(function() {
                            r._cleanup(!0)
                        });
                        try {
                            this.xdr.open(e, t), this.timeout && (this.xdr.timeout = this.timeout), this.xdr.send(n)
                        } catch (e) {
                            this._error()
                        }
                    }, r.prototype._error = function() {
                        this.emit("finish", 0, ""), this._cleanup(!1)
                    }, r.prototype._cleanup = function(e) {
                        if (l("cleanup", e), this.xdr) {
                            if (this.removeAllListeners(), a.unloadDel(this.unloadRef), this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null, e) try {
                                this.xdr.abort()
                            } catch (e) {}
                            this.unloadRef = this.xdr = null
                        }
                    }, r.prototype.close = function() {
                        l("close"), this._cleanup(!0)
                    }, r.enabled = !(!i.XDomainRequest || !c.hasDomain()), t.exports = r
                }).call(this, {
                    env: {}
                }, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "../../utils/browser": 44,
                "../../utils/event": 46,
                "../../utils/url": 52,
                debug: 55,
                events: 3,
                inherits: 57
            }],
            35: [function(e, t, n) {
                "use strict";

                function i(e, t, n, i) {
                    o.call(this, e, t, n, i)
                }
                var r = e("inherits"),
                    o = e("../driver/xhr");
                r(i, o), i.enabled = o.enabled && o.supportsCORS, t.exports = i
            }, {
                "../driver/xhr": 17,
                inherits: 57
            }],
            36: [function(e, t, n) {
                "use strict";

                function i() {
                    var e = this;
                    r.call(this), this.to = setTimeout(function() {
                        e.emit("finish", 200, "{}")
                    }, i.timeout)
                }
                var r = e("events").EventEmitter;
                e("inherits")(i, r), i.prototype.close = function() {
                    clearTimeout(this.to)
                }, i.timeout = 2e3, t.exports = i
            }, {
                events: 3,
                inherits: 57
            }],
            37: [function(e, t, n) {
                "use strict";

                function i(e, t, n) {
                    o.call(this, e, t, n, {
                        noCredentials: !0
                    })
                }
                var r = e("inherits"),
                    o = e("../driver/xhr");
                r(i, o), i.enabled = o.enabled, t.exports = i
            }, {
                "../driver/xhr": 17,
                inherits: 57
            }],
            38: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e, t, n) {
                        if (!i.enabled()) throw new Error("Transport created when disabled");
                        a.call(this), u("constructor", e);
                        var s = this,
                            l = o.addPath(e, "/websocket");
                        l = "https" === l.slice(0, 5) ? "wss" + l.slice(5) : "ws" + l.slice(4), this.url = l, this.ws = new c(this.url, [], n), this.ws.onmessage = function(e) {
                            u("message event", e.data), s.emit("message", e.data)
                        }, this.unloadRef = r.unloadAdd(function() {
                            u("unload"), s.ws.close()
                        }), this.ws.onclose = function(e) {
                            u("close event", e.code, e.reason), s.emit("close", e.code, e.reason), s._cleanup()
                        }, this.ws.onerror = function(e) {
                            u("error event", e), s.emit("close", 1006, "WebSocket connection broken"), s._cleanup()
                        }
                    }
                    var r = e("../utils/event"),
                        o = e("../utils/url"),
                        s = e("inherits"),
                        a = e("events").EventEmitter,
                        c = e("./driver/websocket"),
                        u = function() {};
                    "production" !== n.env.NODE_ENV && (u = e("debug")("sockjs-client:websocket")), s(i, a), i.prototype.send = function(e) {
                        var t = "[" + e + "]";
                        u("send", t), this.ws.send(t)
                    }, i.prototype.close = function() {
                        u("close");
                        var e = this.ws;
                        this._cleanup(), e && e.close()
                    }, i.prototype._cleanup = function() {
                        u("_cleanup");
                        var e = this.ws;
                        e && (e.onmessage = e.onclose = e.onerror = null), r.unloadDel(this.unloadRef), this.unloadRef = this.ws = null, this.removeAllListeners()
                    }, i.enabled = function() {
                        return u("enabled"), !!c
                    }, i.transportName = "websocket", i.roundTrips = 2, t.exports = i
                }).call(this, {
                    env: {}
                })
            }, {
                "../utils/event": 46,
                "../utils/url": 52,
                "./driver/websocket": 19,
                debug: 55,
                events: 3,
                inherits: 57
            }],
            39: [function(e, t, n) {
                "use strict";

                function i(e) {
                    if (!c.enabled) throw new Error("Transport created when disabled");
                    o.call(this, e, "/xhr", a, c)
                }
                var r = e("inherits"),
                    o = e("./lib/ajax-based"),
                    s = e("./xdr-streaming"),
                    a = e("./receiver/xhr"),
                    c = e("./sender/xdr");
                r(i, o), i.enabled = s.enabled, i.transportName = "xdr-polling", i.roundTrips = 2, t.exports = i
            }, {
                "./lib/ajax-based": 24,
                "./receiver/xhr": 32,
                "./sender/xdr": 34,
                "./xdr-streaming": 40,
                inherits: 57
            }],
            40: [function(e, t, n) {
                "use strict";

                function i(e) {
                    if (!a.enabled) throw new Error("Transport created when disabled");
                    o.call(this, e, "/xhr_streaming", s, a)
                }
                var r = e("inherits"),
                    o = e("./lib/ajax-based"),
                    s = e("./receiver/xhr"),
                    a = e("./sender/xdr");
                r(i, o), i.enabled = function(e) {
                    return !e.cookie_needed && !e.nullOrigin && (a.enabled && e.sameScheme)
                }, i.transportName = "xdr-streaming", i.roundTrips = 2, t.exports = i
            }, {
                "./lib/ajax-based": 24,
                "./receiver/xhr": 32,
                "./sender/xdr": 34,
                inherits: 57
            }],
            41: [function(e, t, n) {
                "use strict";

                function i(e) {
                    if (!c.enabled && !a.enabled) throw new Error("Transport created when disabled");
                    o.call(this, e, "/xhr", s, a)
                }
                var r = e("inherits"),
                    o = e("./lib/ajax-based"),
                    s = e("./receiver/xhr"),
                    a = e("./sender/xhr-cors"),
                    c = e("./sender/xhr-local");
                r(i, o), i.enabled = function(e) {
                    return !e.nullOrigin && (!(!c.enabled || !e.sameOrigin) || a.enabled)
                }, i.transportName = "xhr-polling", i.roundTrips = 2, t.exports = i
            }, {
                "./lib/ajax-based": 24,
                "./receiver/xhr": 32,
                "./sender/xhr-cors": 35,
                "./sender/xhr-local": 37,
                inherits: 57
            }],
            42: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e) {
                        if (!c.enabled && !a.enabled) throw new Error("Transport created when disabled");
                        o.call(this, e, "/xhr_streaming", s, a)
                    }
                    var r = e("inherits"),
                        o = e("./lib/ajax-based"),
                        s = e("./receiver/xhr"),
                        a = e("./sender/xhr-cors"),
                        c = e("./sender/xhr-local"),
                        u = e("../utils/browser");
                    r(i, o), i.enabled = function(e) {
                        return !e.nullOrigin && (!u.isOpera() && a.enabled)
                    }, i.transportName = "xhr-streaming", i.roundTrips = 2, i.needBody = !!n.document, t.exports = i
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "../utils/browser": 44,
                "./lib/ajax-based": 24,
                "./receiver/xhr": 32,
                "./sender/xhr-cors": 35,
                "./sender/xhr-local": 37,
                inherits: 57
            }],
            43: [function(e, t, n) {
                (function(e) {
                    "use strict";
                    e.crypto && e.crypto.getRandomValues ? t.exports.randomBytes = function(t) {
                        var n = new Uint8Array(t);
                        return e.crypto.getRandomValues(n), n
                    } : t.exports.randomBytes = function(e) {
                        for (var t = new Array(e), n = 0; n < e; n++) t[n] = Math.floor(256 * Math.random());
                        return t
                    }
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            44: [function(e, t, n) {
                (function(e) {
                    "use strict";
                    t.exports = {
                        isOpera: function() {
                            return e.navigator && /opera/i.test(e.navigator.userAgent)
                        },
                        isKonqueror: function() {
                            return e.navigator && /konqueror/i.test(e.navigator.userAgent)
                        },
                        hasDomain: function() {
                            if (!e.document) return !0;
                            try {
                                return !!e.document.domain
                            } catch (e) {
                                return !1
                            }
                        }
                    }
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            45: [function(e, t, n) {
                "use strict";
                var i, r = e("json3"),
                    o = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,
                    s = function(e) {
                        var t, n = {},
                            i = [];
                        for (t = 0; t < 65536; t++) i.push(String.fromCharCode(t));
                        return e.lastIndex = 0, i.join("").replace(e, function(e) {
                            return n[e] = "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4), ""
                        }), e.lastIndex = 0, n
                    };
                t.exports = {
                    quote: function(e) {
                        var t = r.stringify(e);
                        return o.lastIndex = 0, o.test(t) ? (i || (i = s(o)), t.replace(o, function(e) {
                            return i[e]
                        })) : t
                    }
                }
            }, {
                json3: 58
            }],
            46: [function(e, t, n) {
                (function(n) {
                    "use strict";
                    var i = e("./random"),
                        r = {},
                        o = !1,
                        s = n.chrome && n.chrome.app && n.chrome.app.runtime;
                    t.exports = {
                        attachEvent: function(e, t) {
                            void 0 !== n.addEventListener ? n.addEventListener(e, t, !1) : n.document && n.attachEvent && (n.document.attachEvent("on" + e, t), n.attachEvent("on" + e, t))
                        },
                        detachEvent: function(e, t) {
                            void 0 !== n.addEventListener ? n.removeEventListener(e, t, !1) : n.document && n.detachEvent && (n.document.detachEvent("on" + e, t), n.detachEvent("on" + e, t))
                        },
                        unloadAdd: function(e) {
                            if (s) return null;
                            var t = i.string(8);
                            return r[t] = e, o && setTimeout(this.triggerUnloadCallbacks, 0), t
                        },
                        unloadDel: function(e) {
                            e in r && delete r[e]
                        },
                        triggerUnloadCallbacks: function() {
                            for (var e in r) r[e](), delete r[e]
                        }
                    };
                    var a = function() {
                        o || (o = !0, t.exports.triggerUnloadCallbacks())
                    };
                    s || t.exports.attachEvent("unload", a)
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "./random": 50
            }],
            47: [function(e, t, n) {
                (function(n, i) {
                    "use strict";
                    var r = e("./event"),
                        o = e("json3"),
                        s = e("./browser"),
                        a = function() {};
                    "production" !== n.env.NODE_ENV && (a = e("debug")("sockjs-client:utils:iframe")), t.exports = {
                        WPrefix: "_jp",
                        currentWindowId: null,
                        polluteGlobalNamespace: function() {
                            t.exports.WPrefix in i || (i[t.exports.WPrefix] = {})
                        },
                        postMessage: function(e, n) {
                            i.parent !== i ? i.parent.postMessage(o.stringify({
                                windowId: t.exports.currentWindowId,
                                type: e,
                                data: n || ""
                            }), "*") : a("Cannot postMessage, no parent window.", e, n)
                        },
                        createIframe: function(e, t) {
                            var n, o, s = i.document.createElement("iframe"),
                                c = function() {
                                    a("unattach"), clearTimeout(n);
                                    try {
                                        s.onload = null
                                    } catch (e) {}
                                    s.onerror = null
                                },
                                u = function() {
                                    a("cleanup"), s && (c(), setTimeout(function() {
                                        s && s.parentNode.removeChild(s), s = null
                                    }, 0), r.unloadDel(o))
                                },
                                l = function(e) {
                                    a("onerror", e), s && (u(), t(e))
                                },
                                f = function(e, t) {
                                    a("post", e, t), setTimeout(function() {
                                        try {
                                            s && s.contentWindow && s.contentWindow.postMessage(e, t)
                                        } catch (e) {}
                                    }, 0)
                                };
                            return s.src = e, s.style.display = "none", s.style.position = "absolute", s.onerror = function() {
                                l("onerror")
                            }, s.onload = function() {
                                a("onload"), clearTimeout(n), n = setTimeout(function() {
                                    l("onload timeout")
                                }, 2e3)
                            }, i.document.body.appendChild(s), n = setTimeout(function() {
                                l("timeout")
                            }, 15e3), o = r.unloadAdd(u), {
                                post: f,
                                cleanup: u,
                                loaded: c
                            }
                        },
                        createHtmlfile: function(e, n) {
                            var o, s, c, u = ["Active"].concat("Object").join("X"),
                                l = new i[u]("htmlfile"),
                                f = function() {
                                    clearTimeout(o), c.onerror = null
                                },
                                d = function() {
                                    l && (f(), r.unloadDel(s), c.parentNode.removeChild(c), c = l = null, CollectGarbage())
                                },
                                p = function(e) {
                                    a("onerror", e), l && (d(), n(e))
                                },
                                h = function(e, t) {
                                    try {
                                        setTimeout(function() {
                                            c && c.contentWindow && c.contentWindow.postMessage(e, t)
                                        }, 0)
                                    } catch (e) {}
                                };
                            l.open(), l.write('<html><script>document.domain="' + i.document.domain + '";<\/script></html>'), l.close(), l.parentWindow[t.exports.WPrefix] = i[t.exports.WPrefix];
                            var m = l.createElement("div");
                            return l.body.appendChild(m), c = l.createElement("iframe"), m.appendChild(c), c.src = e, c.onerror = function() {
                                p("onerror")
                            }, o = setTimeout(function() {
                                p("timeout")
                            }, 15e3), s = r.unloadAdd(d), {
                                post: h,
                                cleanup: d,
                                loaded: f
                            }
                        }
                    }, t.exports.iframeEnabled = !1, i.document && (t.exports.iframeEnabled = ("function" == typeof i.postMessage || "object" == typeof i.postMessage) && !s.isKonqueror())
                }).call(this, {
                    env: {}
                }, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "./browser": 44,
                "./event": 46,
                debug: 55,
                json3: 58
            }],
            48: [function(e, t, n) {
                (function(e) {
                    "use strict";
                    var n = {};
                    ["log", "debug", "warn"].forEach(function(t) {
                        var i;
                        try {
                            i = e.console && e.console[t] && e.console[t].apply
                        } catch (e) {}
                        n[t] = i ? function() {
                            return e.console[t].apply(e.console, arguments)
                        } : "log" === t ? function() {} : n.log
                    }), t.exports = n
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            49: [function(e, t, n) {
                "use strict";
                t.exports = {
                    isObject: function(e) {
                        var t = typeof e;
                        return "function" === t || "object" === t && !!e
                    },
                    extend: function(e) {
                        if (!this.isObject(e)) return e;
                        for (var t, n, i = 1, r = arguments.length; i < r; i++) {
                            t = arguments[i];
                            for (n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n])
                        }
                        return e
                    }
                }
            }, {}],
            50: [function(e, t, n) {
                "use strict";
                var i = e("crypto"),
                    r = "abcdefghijklmnopqrstuvwxyz012345";
                t.exports = {
                    string: function(e) {
                        for (var t = r.length, n = i.randomBytes(e), o = [], s = 0; s < e; s++) o.push(r.substr(n[s] % t, 1));
                        return o.join("")
                    },
                    number: function(e) {
                        return Math.floor(Math.random() * e)
                    },
                    numberString: function(e) {
                        var t = ("" + (e - 1)).length;
                        return (new Array(t + 1).join("0") + this.number(e)).slice(-t)
                    }
                }
            }, {
                crypto: 43
            }],
            51: [function(e, t, n) {
                (function(n) {
                    "use strict";
                    var i = function() {};
                    "production" !== n.env.NODE_ENV && (i = e("debug")("sockjs-client:utils:transport")), t.exports = function(e) {
                        return {
                            filterToEnabled: function(t, n) {
                                var r = {
                                    main: [],
                                    facade: []
                                };
                                return t ? "string" == typeof t && (t = [t]) : t = [], e.forEach(function(e) {
                                    if (e) return "websocket" === e.transportName && !1 === n.websocket ? void i("disabled from server", "websocket") : t.length && -1 === t.indexOf(e.transportName) ? void i("not in whitelist", e.transportName) : void(e.enabled(n) ? (i("enabled", e.transportName), r.main.push(e), e.facadeTransport && r.facade.push(e.facadeTransport)) : i("disabled", e.transportName))
                                }), r
                            }
                        }
                    }
                }).call(this, {
                    env: {}
                })
            }, {
                debug: 55
            }],
            52: [function(e, t, n) {
                (function(n) {
                    "use strict";
                    var i = e("url-parse"),
                        r = function() {};
                    "production" !== n.env.NODE_ENV && (r = e("debug")("sockjs-client:utils:url")), t.exports = {
                        getOrigin: function(e) {
                            if (!e) return null;
                            var t = new i(e);
                            if ("file:" === t.protocol) return null;
                            var n = t.port;
                            return n || (n = "https:" === t.protocol ? "443" : "80"), t.protocol + "//" + t.hostname + ":" + n
                        },
                        isOriginEqual: function(e, t) {
                            var n = this.getOrigin(e) === this.getOrigin(t);
                            return r("same", e, t, n), n
                        },
                        isSchemeEqual: function(e, t) {
                            return e.split(":")[0] === t.split(":")[0]
                        },
                        addPath: function(e, t) {
                            var n = e.split("?");
                            return n[0] + t + (n[1] ? "?" + n[1] : "")
                        },
                        addQuery: function(e, t) {
                            return e + (-1 === e.indexOf("?") ? "?" + t : "&" + t)
                        },
                        isLoopbackAddr: function(e) {
                            return /^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e) || /^\[::1\]$/.test(e)
                        }
                    }
                }).call(this, {
                    env: {}
                })
            }, {
                debug: 55,
                "url-parse": 61
            }],
            53: [function(e, t, n) {
                t.exports = "1.5.1"
            }, {}],
            54: [function(e, t, n) {
                function i(e) {
                    if (e = String(e), !(e.length > 100)) {
                        var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);
                        if (t) {
                            var n = parseFloat(t[1]);
                            switch ((t[2] || "ms").toLowerCase()) {
                                case "years":
                                case "year":
                                case "yrs":
                                case "yr":
                                case "y":
                                    return n * d;
                                case "weeks":
                                case "week":
                                case "w":
                                    return n * f;
                                case "days":
                                case "day":
                                case "d":
                                    return n * l;
                                case "hours":
                                case "hour":
                                case "hrs":
                                case "hr":
                                case "h":
                                    return n * u;
                                case "minutes":
                                case "minute":
                                case "mins":
                                case "min":
                                case "m":
                                    return n * c;
                                case "seconds":
                                case "second":
                                case "secs":
                                case "sec":
                                case "s":
                                    return n * a;
                                case "milliseconds":
                                case "millisecond":
                                case "msecs":
                                case "msec":
                                case "ms":
                                    return n;
                                default:
                                    return
                            }
                        }
                    }
                }

                function r(e) {
                    var t = Math.abs(e);
                    return t >= l ? Math.round(e / l) + "d" : t >= u ? Math.round(e / u) + "h" : t >= c ? Math.round(e / c) + "m" : t >= a ? Math.round(e / a) + "s" : e + "ms"
                }

                function o(e) {
                    var t = Math.abs(e);
                    return t >= l ? s(e, t, l, "day") : t >= u ? s(e, t, u, "hour") : t >= c ? s(e, t, c, "minute") : t >= a ? s(e, t, a, "second") : e + " ms"
                }

                function s(e, t, n, i) {
                    var r = t >= 1.5 * n;
                    return Math.round(e / n) + " " + i + (r ? "s" : "")
                }
                var a = 1e3,
                    c = 60 * a,
                    u = 60 * c,
                    l = 24 * u,
                    f = 7 * l,
                    d = 365.25 * l;
                t.exports = function(e, t) {
                    t = t || {};
                    var n = typeof e;
                    if ("string" === n && e.length > 0) return i(e);
                    if ("number" === n && isFinite(e)) return t.long ? o(e) : r(e);
                    throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e))
                }
            }, {}],
            55: [function(e, t, n) {
                (function(i) {
                    "use strict";

                    function r(e) {
                        return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
                            return typeof e
                        } : function(e) {
                            return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
                        })(e)
                    }

                    function o() {
                        return !("undefined" == typeof window || !window.process || "renderer" !== window.process.type && !window.process.__nwjs) || ("undefined" == typeof navigator || !navigator.userAgent || !navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && ("undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))
                    }

                    function s(e) {
                        if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), this.useColors) {
                            var n = "color: " + this.color;
                            e.splice(1, 0, n, "color: inherit");
                            var i = 0,
                                r = 0;
                            e[0].replace(/%[a-zA-Z%]/g, function(e) {
                                "%%" !== e && (i++, "%c" === e && (r = i))
                            }), e.splice(r, 0, n)
                        }
                    }

                    function a() {
                        var e;
                        return "object" === ("undefined" == typeof console ? "undefined" : r(console)) && console.log && (e = console).log.apply(e, arguments)
                    }

                    function c(e) {
                        try {
                            e ? n.storage.setItem("debug", e) : n.storage.removeItem("debug")
                        } catch (e) {}
                    }

                    function u() {
                        var e;
                        try {
                            e = n.storage.getItem("debug")
                        } catch (e) {}
                        return !e && void 0 !== i && "env" in i && (e = i.env.DEBUG), e
                    }
                    n.log = a, n.formatArgs = s, n.save = c, n.load = u, n.useColors = o, n.storage = function() {
                        try {
                            return localStorage
                        } catch (e) {}
                    }(), n.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"], t.exports = e("./common")(n), t.exports.formatters.j = function(e) {
                        try {
                            return JSON.stringify(e)
                        } catch (e) {
                            return "[UnexpectedJSONParseError]: " + e.message
                        }
                    }
                }).call(this, {
                    env: {}
                })
            }, {
                "./common": 56
            }],
            56: [function(e, t, n) {
                "use strict";

                function i(t) {
                    function n(e) {
                        for (var t = 0, n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
                        return i.colors[Math.abs(t) % i.colors.length]
                    }

                    function i(e) {
                        function t() {
                            if (t.enabled) {
                                for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++) n[r] = arguments[r];
                                var o = t,
                                    a = Number(new Date),
                                    c = a - (s || a);
                                o.diff = c, o.prev = s, o.curr = a, s = a, n[0] = i.coerce(n[0]), "string" != typeof n[0] && n.unshift("%O");
                                var u = 0;
                                n[0] = n[0].replace(/%([a-zA-Z%])/g, function(e, t) {
                                    if ("%%" === e) return e;
                                    u++;
                                    var r = i.formatters[t];
                                    if ("function" == typeof r) {
                                        var s = n[u];
                                        e = r.call(o, s), n.splice(u, 1), u--
                                    }
                                    return e
                                }), i.formatArgs.call(o, n);
                                (o.log || i.log).apply(o, n)
                            }
                        }
                        var s;
                        return t.namespace = e, t.enabled = i.enabled(e), t.useColors = i.useColors(), t.color = n(e), t.destroy = r, t.extend = o, "function" == typeof i.init && i.init(t), i.instances.push(t), t
                    }

                    function r() {
                        var e = i.instances.indexOf(this);
                        return -1 !== e && (i.instances.splice(e, 1), !0)
                    }

                    function o(e, t) {
                        return i(this.namespace + (void 0 === t ? ":" : t) + e)
                    }

                    function s(e) {
                        i.save(e), i.names = [], i.skips = [];
                        var t, n = ("string" == typeof e ? e : "").split(/[\s,]+/),
                            r = n.length;
                        for (t = 0; t < r; t++) n[t] && (e = n[t].replace(/\*/g, ".*?"), "-" === e[0] ? i.skips.push(new RegExp("^" + e.substr(1) + "$")) : i.names.push(new RegExp("^" + e + "$")));
                        for (t = 0; t < i.instances.length; t++) {
                            var o = i.instances[t];
                            o.enabled = i.enabled(o.namespace)
                        }
                    }

                    function a() {
                        i.enable("")
                    }

                    function c(e) {
                        if ("*" === e[e.length - 1]) return !0;
                        var t, n;
                        for (t = 0, n = i.skips.length; t < n; t++)
                            if (i.skips[t].test(e)) return !1;
                        for (t = 0, n = i.names.length; t < n; t++)
                            if (i.names[t].test(e)) return !0;
                        return !1
                    }

                    function u(e) {
                        return e instanceof Error ? e.stack || e.message : e
                    }
                    return i.debug = i, i.default = i, i.coerce = u, i.disable = a, i.enable = s, i.enabled = c, i.humanize = e("ms"), Object.keys(t).forEach(function(e) {
                        i[e] = t[e]
                    }), i.instances = [], i.names = [], i.skips = [], i.formatters = {}, i.selectColor = n, i.enable(i.load()), i
                }
                t.exports = i
            }, {
                ms: 54
            }],
            57: [function(e, t, n) {
                "function" == typeof Object.create ? t.exports = function(e, t) {
                    t && (e.super_ = t, e.prototype = Object.create(t.prototype, {
                        constructor: {
                            value: e,
                            enumerable: !1,
                            writable: !0,
                            configurable: !0
                        }
                    }))
                } : t.exports = function(e, t) {
                    if (t) {
                        e.super_ = t;
                        var n = function() {};
                        n.prototype = t.prototype, e.prototype = new n, e.prototype.constructor = e
                    }
                }
            }, {}],
            58: [function(t, n, i) {
                (function(t) {
                    (function() {
                        function r(e, t) {
                            function n(e, t) {
                                try {
                                    e()
                                } catch (e) {
                                    t && t()
                                }
                            }

                            function i(e) {
                                if (null != i[e]) return i[e];
                                var r;
                                if ("bug-string-char-index" == e) r = "a" != "a" [0];
                                else if ("json" == e) r = i("json-stringify") && i("date-serialization") && i("json-parse");
                                else if ("date-serialization" == e) {
                                    if (r = i("json-stringify") && w) {
                                        var o = t.stringify;
                                        n(function() {
                                            r = '"-271821-04-20T00:00:00.000Z"' == o(new f(-864e13)) && '"+275760-09-13T00:00:00.000Z"' == o(new f(864e13)) && '"-000001-01-01T00:00:00.000Z"' == o(new f(-621987552e5)) && '"1969-12-31T23:59:59.999Z"' == o(new f(-1))
                                        })
                                    }
                                } else {
                                    var s, c = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
                                    if ("json-stringify" == e) {
                                        var o = t.stringify,
                                            l = "function" == typeof o;
                                        l && ((s = function() {
                                            return 1
                                        }).toJSON = s, n(function() {
                                            l = "0" === o(0) && "0" === o(new a) && '""' == o(new u) && o(y) === g && o(g) === g && o() === g && "1" === o(s) && "[1]" == o([s]) && "[null]" == o([g]) && "null" == o(null) && "[null,null,null]" == o([g, y, null]) && o({
                                                a: [s, !0, !1, null, "\0\b\n\f\r\t"]
                                            }) == c && "1" === o(null, s) && "[\n 1,\n 2\n]" == o([1, 2], null, 1)
                                        }, function() {
                                            l = !1
                                        })), r = l
                                    }
                                    if ("json-parse" == e) {
                                        var d, p = t.parse;
                                        "function" == typeof p && n(function() {
                                            0 !== p("0") || p(!1) || (s = p(c), (d = 5 == s.a.length && 1 === s.a[0]) && (n(function() {
                                                d = !p('"\t"')
                                            }), d && n(function() {
                                                d = 1 !== p("01")
                                            }), d && n(function() {
                                                d = 1 !== p("1.")
                                            })))
                                        }, function() {
                                            d = !1
                                        }), r = d
                                    }
                                }
                                return i[e] = !!r
                            }

                            function o(e) {
                                return O(this)
                            }
                            e || (e = c.Object()), t || (t = c.Object());
                            var a = e.Number || c.Number,
                                u = e.String || c.String,
                                l = e.Object || c.Object,
                                f = e.Date || c.Date,
                                d = e.SyntaxError || c.SyntaxError,
                                p = e.TypeError || c.TypeError,
                                h = e.Math || c.Math,
                                m = e.JSON || c.JSON;
                            "object" == typeof m && m && (t.stringify = m.stringify, t.parse = m.parse);
                            var g, b = l.prototype,
                                y = b.toString,
                                v = b.hasOwnProperty,
                                w = new f(-0xc782b5b800cec);
                            if (n(function() {
                                    w = -109252 == w.getUTCFullYear() && 0 === w.getUTCMonth() && 1 === w.getUTCDate() && 10 == w.getUTCHours() && 37 == w.getUTCMinutes() && 6 == w.getUTCSeconds() && 708 == w.getUTCMilliseconds()
                                }), i["bug-string-char-index"] = i["date-serialization"] = i.json = i["json-stringify"] = i["json-parse"] = null, !i("json")) {
                                var _ = i("bug-string-char-index"),
                                    C = function(e, t) {
                                        var n, i, r, o = 0;
                                        (n = function() {
                                            this.valueOf = 0
                                        }).prototype.valueOf = 0, i = new n;
                                        for (r in i) v.call(i, r) && o++;
                                        return n = i = null, o ? C = function(e, t) {
                                            var n, i, r = "[object Function]" == y.call(e);
                                            for (n in e) r && "prototype" == n || !v.call(e, n) || (i = "constructor" === n) || t(n);
                                            (i || v.call(e, n = "constructor")) && t(n)
                                        } : (i = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], C = function(e, t) {
                                            var n, r, o = "[object Function]" == y.call(e),
                                                a = !o && "function" != typeof e.constructor && s[typeof e.hasOwnProperty] && e.hasOwnProperty || v;
                                            for (n in e) o && "prototype" == n || !a.call(e, n) || t(n);
                                            for (r = i.length; n = i[--r];) a.call(e, n) && t(n)
                                        }), C(e, t)
                                    };
                                if (!i("json-stringify") && !i("date-serialization")) {
                                    var S = {
                                            92: "\\\\",
                                            34: '\\"',
                                            8: "\\b",
                                            12: "\\f",
                                            10: "\\n",
                                            13: "\\r",
                                            9: "\\t"
                                        },
                                        E = function(e, t) {
                                            return ("000000" + (t || 0)).slice(-e)
                                        },
                                        O = function(e) {
                                            var t, n, i, r, o, s, a, c, u;
                                            if (w) t = function(e) {
                                                n = e.getUTCFullYear(), i = e.getUTCMonth(), r = e.getUTCDate(), s = e.getUTCHours(), a = e.getUTCMinutes(), c = e.getUTCSeconds(), u = e.getUTCMilliseconds()
                                            };
                                            else {
                                                var l = h.floor,
                                                    f = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
                                                    d = function(e, t) {
                                                        return f[t] + 365 * (e - 1970) + l((e - 1969 + (t = +(t > 1))) / 4) - l((e - 1901 + t) / 100) + l((e - 1601 + t) / 400)
                                                    };
                                                t = function(e) {
                                                    for (r = l(e / 864e5), n = l(r / 365.2425) + 1970 - 1; d(n + 1, 0) <= r; n++);
                                                    for (i = l((r - d(n, 0)) / 30.42); d(n, i + 1) <= r; i++);
                                                    r = 1 + r - d(n, i), o = (e % 864e5 + 864e5) % 864e5, s = l(o / 36e5) % 24, a = l(o / 6e4) % 60, c = l(o / 1e3) % 60, u = o % 1e3
                                                }
                                            }
                                            return (O = function(e) {
                                                return e > -1 / 0 && e < 1 / 0 ? (t(e), e = (n <= 0 || n >= 1e4 ? (n < 0 ? "-" : "+") + E(6, n < 0 ? -n : n) : E(4, n)) + "-" + E(2, i + 1) + "-" + E(2, r) + "T" + E(2, s) + ":" + E(2, a) + ":" + E(2, c) + "." + E(3, u) + "Z", n = i = r = s = a = c = u = null) : e = null, e
                                            })(e)
                                        };
                                    if (i("json-stringify") && !i("date-serialization")) {
                                        var x = t.stringify;
                                        t.stringify = function(e, t, n) {
                                            var i = f.prototype.toJSON;
                                            f.prototype.toJSON = o;
                                            var r = x(e, t, n);
                                            return f.prototype.toJSON = i, r
                                        }
                                    } else {
                                        var I = function(e) {
                                                var t = e.charCodeAt(0),
                                                    n = S[t];
                                                return n || "\\u00" + E(2, t.toString(16))
                                            },
                                            k = /[\x00-\x1f\x22\x5c]/g,
                                            T = function(e) {
                                                return k.lastIndex = 0, '"' + (k.test(e) ? e.replace(k, I) : e) + '"'
                                            },
                                            A = function(e, t, i, r, o, s, a) {
                                                var c, u, l, d, h, m, b, v, w;
                                                if (n(function() {
                                                        c = t[e]
                                                    }), "object" == typeof c && c && (c.getUTCFullYear && "[object Date]" == y.call(c) && c.toJSON === f.prototype.toJSON ? c = O(c) : "function" == typeof c.toJSON && (c = c.toJSON(e))), i && (c = i.call(t, e, c)), c == g) return c === g ? c : "null";
                                                switch (u = typeof c, "object" == u && (l = y.call(c)), l || u) {
                                                    case "boolean":
                                                    case "[object Boolean]":
                                                        return "" + c;
                                                    case "number":
                                                    case "[object Number]":
                                                        return c > -1 / 0 && c < 1 / 0 ? "" + c : "null";
                                                    case "string":
                                                    case "[object String]":
                                                        return T("" + c)
                                                }
                                                if ("object" == typeof c) {
                                                    for (b = a.length; b--;)
                                                        if (a[b] === c) throw p();
                                                    if (a.push(c), d = [], v = s, s += o, "[object Array]" == l) {
                                                        for (m = 0, b = c.length; m < b; m++) h = A(m, c, i, r, o, s, a), d.push(h === g ? "null" : h);
                                                        w = d.length ? o ? "[\n" + s + d.join(",\n" + s) + "\n" + v + "]" : "[" + d.join(",") + "]" : "[]"
                                                    } else C(r || c, function(e) {
                                                        var t = A(e, c, i, r, o, s, a);
                                                        t !== g && d.push(T(e) + ":" + (o ? " " : "") + t)
                                                    }), w = d.length ? o ? "{\n" + s + d.join(",\n" + s) + "\n" + v + "}" : "{" + d.join(",") + "}" : "{}";
                                                    return a.pop(), w
                                                }
                                            };
                                        t.stringify = function(e, t, n) {
                                            var i, r, o, a;
                                            if (s[typeof t] && t)
                                                if ("[object Function]" == (a = y.call(t))) r = t;
                                                else if ("[object Array]" == a) {
                                                o = {};
                                                for (var c, u = 0, l = t.length; u < l;) c = t[u++], "[object String]" != (a = y.call(c)) && "[object Number]" != a || (o[c] = 1)
                                            }
                                            if (n)
                                                if ("[object Number]" == (a = y.call(n))) {
                                                    if ((n -= n % 1) > 0)
                                                        for (n > 10 && (n = 10), i = ""; i.length < n;) i += " "
                                                } else "[object String]" == a && (i = n.length <= 10 ? n : n.slice(0, 10));
                                            return A("", (c = {}, c[""] = e, c), r, o, i, "", [])
                                        }
                                    }
                                }
                                if (!i("json-parse")) {
                                    var j, N, P = u.fromCharCode,
                                        D = {
                                            92: "\\",
                                            34: '"',
                                            47: "/",
                                            98: "\b",
                                            116: "\t",
                                            110: "\n",
                                            102: "\f",
                                            114: "\r"
                                        },
                                        F = function() {
                                            throw j = N = null, d()
                                        },
                                        R = function() {
                                            for (var e, t, n, i, r, o = N, s = o.length; j < s;) switch (r = o.charCodeAt(j)) {
                                                case 9:
                                                case 10:
                                                case 13:
                                                case 32:
                                                    j++;
                                                    break;
                                                case 123:
                                                case 125:
                                                case 91:
                                                case 93:
                                                case 58:
                                                case 44:
                                                    return e = _ ? o.charAt(j) : o[j], j++, e;
                                                case 34:
                                                    for (e = "@", j++; j < s;)
                                                        if ((r = o.charCodeAt(j)) < 32) F();
                                                        else if (92 == r) switch (r = o.charCodeAt(++j)) {
                                                        case 92:
                                                        case 34:
                                                        case 47:
                                                        case 98:
                                                        case 116:
                                                        case 110:
                                                        case 102:
                                                        case 114:
                                                            e += D[r], j++;
                                                            break;
                                                        case 117:
                                                            for (t = ++j, n = j + 4; j < n; j++)(r = o.charCodeAt(j)) >= 48 && r <= 57 || r >= 97 && r <= 102 || r >= 65 && r <= 70 || F();
                                                            e += P("0x" + o.slice(t, j));
                                                            break;
                                                        default:
                                                            F()
                                                    } else {
                                                        if (34 == r) break;
                                                        for (r = o.charCodeAt(j), t = j; r >= 32 && 92 != r && 34 != r;) r = o.charCodeAt(++j);
                                                        e += o.slice(t, j)
                                                    }
                                                    if (34 == o.charCodeAt(j)) return j++, e;
                                                    F();
                                                default:
                                                    if (t = j, 45 == r && (i = !0, r = o.charCodeAt(++j)), r >= 48 && r <= 57) {
                                                        for (48 == r && (r = o.charCodeAt(j + 1)) >= 48 && r <= 57 && F(), i = !1; j < s && (r = o.charCodeAt(j)) >= 48 && r <= 57; j++);
                                                        if (46 == o.charCodeAt(j)) {
                                                            for (n = ++j; n < s && !((r = o.charCodeAt(n)) < 48 || r > 57); n++);
                                                            n == j && F(), j = n
                                                        }
                                                        if (101 == (r = o.charCodeAt(j)) || 69 == r) {
                                                            for (r = o.charCodeAt(++j), 43 != r && 45 != r || j++, n = j; n < s && !((r = o.charCodeAt(n)) < 48 || r > 57); n++);
                                                            n == j && F(), j = n
                                                        }
                                                        return +o.slice(t, j)
                                                    }
                                                    i && F();
                                                    var a = o.slice(j, j + 4);
                                                    if ("true" == a) return j += 4, !0;
                                                    if ("fals" == a && 101 == o.charCodeAt(j + 4)) return j += 5, !1;
                                                    if ("null" == a) return j += 4, null;
                                                    F()
                                            }
                                            return "$"
                                        },
                                        B = function(e) {
                                            var t, n;
                                            if ("$" == e && F(), "string" == typeof e) {
                                                if ("@" == (_ ? e.charAt(0) : e[0])) return e.slice(1);
                                                if ("[" == e) {
                                                    for (t = [];
                                                        "]" != (e = R());) n ? "," == e ? "]" == (e = R()) && F() : F() : n = !0, "," == e && F(), t.push(B(e));
                                                    return t
                                                }
                                                if ("{" == e) {
                                                    for (t = {};
                                                        "}" != (e = R());) n ? "," == e ? "}" == (e = R()) && F() : F() : n = !0, "," != e && "string" == typeof e && "@" == (_ ? e.charAt(0) : e[0]) && ":" == R() || F(), t[e.slice(1)] = B(R());
                                                    return t
                                                }
                                                F()
                                            }
                                            return e
                                        },
                                        G = function(e, t, n) {
                                            var i = L(e, t, n);
                                            i === g ? delete e[t] : e[t] = i
                                        },
                                        L = function(e, t, n) {
                                            var i, r = e[t];
                                            if ("object" == typeof r && r)
                                                if ("[object Array]" == y.call(r))
                                                    for (i = r.length; i--;) G(y, C, r);
                                                else C(r, function(e) {
                                                    G(r, e, n)
                                                });
                                            return n.call(e, t, r)
                                        };
                                    t.parse = function(e, t) {
                                        var n, i;
                                        return j = 0, N = "" + e, n = B(R()), "$" != R() && F(), j = N = null, t && "[object Function]" == y.call(t) ? L((i = {}, i[""] = n, i), "", t) : n
                                    }
                                }
                            }
                            return t.runInContext = r, t
                        }
                        var o = "function" == typeof e && e.amd,
                            s = {
                                function: !0,
                                object: !0
                            },
                            a = s[typeof i] && i && !i.nodeType && i,
                            c = s[typeof window] && window || this,
                            u = a && s[typeof n] && n && !n.nodeType && "object" == typeof t && t;
                        if (!u || u.global !== u && u.window !== u && u.self !== u || (c = u), a && !o) r(c, a);
                        else {
                            var l = c.JSON,
                                f = c.JSON3,
                                d = !1,
                                p = r(c, c.JSON3 = {
                                    noConflict: function() {
                                        return d || (d = !0, c.JSON = l, c.JSON3 = f, l = f = null), p
                                    }
                                });
                            c.JSON = {
                                parse: p.parse,
                                stringify: p.stringify
                            }
                        }
                        o && e(function() {
                            return p
                        })
                    }).call(this)
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            59: [function(e, t, n) {
                "use strict";

                function i(e) {
                    try {
                        return decodeURIComponent(e.replace(/\+/g, " "))
                    } catch (e) {
                        return null
                    }
                }

                function r(e) {
                    for (var t, n = /([^=?&]+)=?([^&]*)/g, r = {}; t = n.exec(e);) {
                        var o = i(t[1]),
                            s = i(t[2]);
                        null === o || null === s || o in r || (r[o] = s)
                    }
                    return r
                }

                function o(e, t) {
                    t = t || "";
                    var n, i, r = [];
                    "string" != typeof t && (t = "?");
                    for (i in e)
                        if (a.call(e, i)) {
                            if (n = e[i], n || null !== n && n !== s && !isNaN(n) || (n = ""), i = encodeURIComponent(i), n = encodeURIComponent(n), null === i || null === n) continue;
                            r.push(i + "=" + n)
                        }
                    return r.length ? t + r.join("&") : ""
                }
                var s, a = Object.prototype.hasOwnProperty;
                n.stringify = o, n.parse = r
            }, {}],
            60: [function(e, t, n) {
                "use strict";
                t.exports = function(e, t) {
                    if (t = t.split(":")[0], !(e = +e)) return !1;
                    switch (t) {
                        case "http":
                        case "ws":
                            return 80 !== e;
                        case "https":
                        case "wss":
                            return 443 !== e;
                        case "ftp":
                            return 21 !== e;
                        case "gopher":
                            return 70 !== e;
                        case "file":
                            return !1
                    }
                    return 0 !== e
                }
            }, {}],
            61: [function(e, t, n) {
                (function(n) {
                    "use strict";

                    function i(e) {
                        return (e || "").toString().replace(h, "")
                    }

                    function r(e) {
                        var t;
                        t = "undefined" != typeof window ? window : void 0 !== n ? n : "undefined" != typeof self ? self : {};
                        var i = t.location || {};
                        e = e || i;
                        var r, o = {},
                            s = typeof e;
                        if ("blob:" === e.protocol) o = new a(unescape(e.pathname), {});
                        else if ("string" === s) {
                            o = new a(e, {});
                            for (r in g) delete o[r]
                        } else if ("object" === s) {
                            for (r in e) r in g || (o[r] = e[r]);
                            void 0 === o.slashes && (o.slashes = d.test(e.href))
                        }
                        return o
                    }

                    function o(e) {
                        e = i(e);
                        var t = p.exec(e);
                        return {
                            protocol: t[1] ? t[1].toLowerCase() : "",
                            slashes: !!(t[2] && t[2].length >= 2),
                            rest: t[2] && 1 === t[2].length ? "/" + t[3] : t[3]
                        }
                    }

                    function s(e, t) {
                        if ("" === e) return t;
                        for (var n = (t || "/").split("/").slice(0, -1).concat(e.split("/")), i = n.length, r = n[i - 1], o = !1, s = 0; i--;) "." === n[i] ? n.splice(i, 1) : ".." === n[i] ? (n.splice(i, 1), s++) : s && (0 === i && (o = !0), n.splice(i, 1), s--);
                        return o && n.unshift(""), "." !== r && ".." !== r || n.push(""), n.join("/")
                    }

                    function a(e, t, n) {
                        if (e = i(e), !(this instanceof a)) return new a(e, t, n);
                        var c, u, d, p, h, g, b = m.slice(),
                            y = typeof t,
                            v = this,
                            w = 0;
                        for ("object" !== y && "string" !== y && (n = t, t = null), n && "function" != typeof n && (n = f.parse), t = r(t), u = o(e || ""), c = !u.protocol && !u.slashes, v.slashes = u.slashes || c && t.slashes, v.protocol = u.protocol || t.protocol || "", e = u.rest, u.slashes || (b[3] = [/(.*)/, "pathname"]); w < b.length; w++) p = b[w], "function" != typeof p ? (d = p[0], g = p[1], d !== d ? v[g] = e : "string" == typeof d ? ~(h = e.indexOf(d)) && ("number" == typeof p[2] ? (v[g] = e.slice(0, h), e = e.slice(h + p[2])) : (v[g] = e.slice(h), e = e.slice(0, h))) : (h = d.exec(e)) && (v[g] = h[1], e = e.slice(0, h.index)), v[g] = v[g] || (c && p[3] ? t[g] || "" : ""), p[4] && (v[g] = v[g].toLowerCase())) : e = p(e);
                        n && (v.query = n(v.query)), c && t.slashes && "/" !== v.pathname.charAt(0) && ("" !== v.pathname || "" !== t.pathname) && (v.pathname = s(v.pathname, t.pathname)), "/" !== v.pathname.charAt(0) && v.hostname && (v.pathname = "/" + v.pathname), l(v.port, v.protocol) || (v.host = v.hostname, v.port = ""), v.username = v.password = "", v.auth && (p = v.auth.split(":"), v.username = p[0] || "", v.password = p[1] || ""), v.origin = v.protocol && v.host && "file:" !== v.protocol ? v.protocol + "//" + v.host : "null", v.href = v.toString()
                    }

                    function c(e, t, n) {
                        var i = this;
                        switch (e) {
                            case "query":
                                "string" == typeof t && t.length && (t = (n || f.parse)(t)), i[e] = t;
                                break;
                            case "port":
                                i[e] = t, l(t, i.protocol) ? t && (i.host = i.hostname + ":" + t) : (i.host = i.hostname, i[e] = "");
                                break;
                            case "hostname":
                                i[e] = t, i.port && (t += ":" + i.port), i.host = t;
                                break;
                            case "host":
                                i[e] = t, /:\d+$/.test(t) ? (t = t.split(":"), i.port = t.pop(), i.hostname = t.join(":")) : (i.hostname = t, i.port = "");
                                break;
                            case "protocol":
                                i.protocol = t.toLowerCase(), i.slashes = !n;
                                break;
                            case "pathname":
                            case "hash":
                                if (t) {
                                    var r = "pathname" === e ? "/" : "#";
                                    i[e] = t.charAt(0) !== r ? r + t : t
                                } else i[e] = t;
                                break;
                            default:
                                i[e] = t
                        }
                        for (var o = 0; o < m.length; o++) {
                            var s = m[o];
                            s[4] && (i[s[1]] = i[s[1]].toLowerCase())
                        }
                        return i.origin = i.protocol && i.host && "file:" !== i.protocol ? i.protocol + "//" + i.host : "null", i.href = i.toString(), i
                    }

                    function u(e) {
                        e && "function" == typeof e || (e = f.stringify);
                        var t, n = this,
                            i = n.protocol;
                        i && ":" !== i.charAt(i.length - 1) && (i += ":");
                        var r = i + (n.slashes ? "//" : "");
                        return n.username && (r += n.username, n.password && (r += ":" + n.password), r += "@"), r += n.host + n.pathname, t = "object" == typeof n.query ? e(n.query) : n.query, t && (r += "?" !== t.charAt(0) ? "?" + t : t), n.hash && (r += n.hash), r
                    }
                    var l = e("requires-port"),
                        f = e("querystringify"),
                        d = /^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,
                        p = /^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,
                        h = new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+"),
                        m = [
                            ["#", "hash"],
                            ["?", "query"],
                            function(e) {
                                return e.replace("\\", "/")
                            },
                            ["/", "pathname"],
                            ["@", "auth", 1],
                            [NaN, "host", void 0, 1, 1],
                            [/:(\d+)$/, "port", void 0, 1],
                            [NaN, "hostname", void 0, 1, 1]
                        ],
                        g = {
                            hash: 1,
                            query: 1
                        };
                    a.prototype = {
                        set: c,
                        toString: u
                    }, a.extractProtocol = o, a.location = r, a.trimLeft = i, a.qs = f, t.exports = a
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                querystringify: 59,
                "requires-port": 60
            }]
        }, {}, [1])(1)
    }),
    function(e, t) {
        "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("StompJs", [], t) : "object" == typeof exports ? exports.StompJs = t() : e.StompJs = t()
    }("undefined" != typeof self ? self : this, function() {
        return function(e) {
            function t(i) {
                if (n[i]) return n[i].exports;
                var r = n[i] = {
                    i: i,
                    l: !1,
                    exports: {}
                };
                return e[i].call(r.exports, r, r.exports, t), r.l = !0, r.exports
            }
            var n = {};
            return t.m = e, t.c = n, t.d = function(e, n, i) {
                t.o(e, n) || Object.defineProperty(e, n, {
                    enumerable: !0,
                    get: i
                })
            }, t.r = function(e) {
                "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
                    value: "Module"
                }), Object.defineProperty(e, "__esModule", {
                    value: !0
                })
            }, t.t = function(e, n) {
                if (1 & n && (e = t(e)), 8 & n) return e;
                if (4 & n && "object" == typeof e && e && e.__esModule) return e;
                var i = Object.create(null);
                if (t.r(i), Object.defineProperty(i, "default", {
                        enumerable: !0,
                        value: e
                    }), 2 & n && "string" != typeof e)
                    for (var r in e) t.d(i, r, function(t) {
                        return e[t]
                    }.bind(null, r));
                return i
            }, t.n = function(e) {
                var n = e && e.__esModule ? function() {
                    return e.default
                } : function() {
                    return e
                };
                return t.d(n, "a", n), n
            }, t.o = function(e, t) {
                return Object.prototype.hasOwnProperty.call(e, t)
            }, t.p = "", t(t.s = 0)
        }({
            "./src/byte.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                }), t.BYTE = {
                    LF: "\n",
                    NULL: "\0"
                }
            },
            "./src/client.ts": function(e, t, n) {
                var i = this && this.__awaiter || function(e, t, n, i) {
                        return new(n || (n = Promise))(function(r, o) {
                            function s(e) {
                                try {
                                    c(i.next(e))
                                } catch (e) {
                                    o(e)
                                }
                            }

                            function a(e) {
                                try {
                                    c(i.throw(e))
                                } catch (e) {
                                    o(e)
                                }
                            }

                            function c(e) {
                                e.done ? r(e.value) : new n(function(t) {
                                    t(e.value)
                                }).then(s, a)
                            }
                            c((i = i.apply(e, t || [])).next())
                        })
                    },
                    r = this && this.__generator || function(e, t) {
                        function n(e) {
                            return function(t) {
                                return i([e, t])
                            }
                        }

                        function i(n) {
                            if (r) throw new TypeError("Generator is already executing.");
                            for (; c;) try {
                                if (r = 1, o && (s = 2 & n[0] ? o.return : n[0] ? o.throw || ((s = o.return) && s.call(o), 0) : o.next) && !(s = s.call(o, n[1])).done) return s;
                                switch (o = 0, s && (n = [2 & n[0], s.value]), n[0]) {
                                    case 0:
                                    case 1:
                                        s = n;
                                        break;
                                    case 4:
                                        return c.label++, {
                                            value: n[1],
                                            done: !1
                                        };
                                    case 5:
                                        c.label++, o = n[1], n = [0];
                                        continue;
                                    case 7:
                                        n = c.ops.pop(), c.trys.pop();
                                        continue;
                                    default:
                                        if (s = c.trys, !(s = s.length > 0 && s[s.length - 1]) && (6 === n[0] || 2 === n[0])) {
                                            c = 0;
                                            continue
                                        }
                                        if (3 === n[0] && (!s || n[1] > s[0] && n[1] < s[3])) {
                                            c.label = n[1];
                                            break
                                        }
                                        if (6 === n[0] && c.label < s[1]) {
                                            c.label = s[1], s = n;
                                            break
                                        }
                                        if (s && c.label < s[2]) {
                                            c.label = s[2], c.ops.push(n);
                                            break
                                        }
                                        s[2] && c.ops.pop(), c.trys.pop();
                                        continue
                                }
                                n = t.call(e, c)
                            } catch (e) {
                                n = [6, e], o = 0
                            } finally {
                                r = s = 0
                            }
                            if (5 & n[0]) throw n[1];
                            return {
                                value: n[0] ? n[1] : void 0,
                                done: !0
                            }
                        }
                        var r, o, s, a, c = {
                            label: 0,
                            sent: function() {
                                if (1 & s[0]) throw s[1];
                                return s[1]
                            },
                            trys: [],
                            ops: []
                        };
                        return a = {
                            next: n(0),
                            throw: n(1),
                            return: n(2)
                        }, "function" == typeof Symbol && (a[Symbol.iterator] = function() {
                            return this
                        }), a
                    };
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var o = n("./src/stomp-handler.ts"),
                    s = n("./src/versions.ts"),
                    a = function() {
                        function e(e) {
                            void 0 === e && (e = {}), this.stompVersions = s.Versions.default, this.reconnectDelay = 5e3, this.heartbeatIncoming = 1e4, this.heartbeatOutgoing = 1e4, this.splitLargeFrames = !1, this.maxWebSocketChunkSize = 8192, this.forceBinaryWSFrames = !1, this._active = !1;
                            var t = function() {};
                            this.debug = t, this.beforeConnect = t, this.onConnect = t, this.onDisconnect = t, this.onUnhandledMessage = t, this.onUnhandledReceipt = t, this.onUnhandledFrame = t, this.onStompError = t, this.onWebSocketClose = t, this.onWebSocketError = t, this.logRawCommunication = !1, this.connectHeaders = {}, this._disconnectHeaders = {}, this.configure(e)
                        }
                        return Object.defineProperty(e.prototype, "webSocket", {
                                get: function() {
                                    return this._webSocket
                                },
                                enumerable: !0,
                                configurable: !0
                            }), Object.defineProperty(e.prototype, "disconnectHeaders", {
                                get: function() {
                                    return this._disconnectHeaders
                                },
                                set: function(e) {
                                    this._disconnectHeaders = e, this._stompHandler && (this._stompHandler.disconnectHeaders = this._disconnectHeaders)
                                },
                                enumerable: !0,
                                configurable: !0
                            }),
                            Object.defineProperty(e.prototype, "connected", {
                                get: function() {
                                    return !!this._stompHandler && this._stompHandler.connected
                                },
                                enumerable: !0,
                                configurable: !0
                            }), Object.defineProperty(e.prototype, "connectedVersion", {
                                get: function() {
                                    return this._stompHandler ? this._stompHandler.connectedVersion : void 0
                                },
                                enumerable: !0,
                                configurable: !0
                            }), Object.defineProperty(e.prototype, "active", {
                                get: function() {
                                    return this._active
                                },
                                enumerable: !0,
                                configurable: !0
                            }), e.prototype.configure = function(e) {
                                Object.assign(this, e)
                            }, e.prototype.activate = function() {
                                this._active = !0, this._connect()
                            }, e.prototype._connect = function() {
                                return i(this, void 0, void 0, function() {
                                    var e = this;
                                    return r(this, function(t) {
                                        switch (t.label) {
                                            case 0:
                                                return this.connected ? (this.debug("STOMP: already connected, nothing to do"), [2]) : [4, this.beforeConnect()];
                                            case 1:
                                                return t.sent(), this._active ? (this.debug("Opening Web Socket..."), this._webSocket = this._createWebSocket(), this._stompHandler = new o.StompHandler(this, this._webSocket, {
                                                    debug: this.debug,
                                                    stompVersions: this.stompVersions,
                                                    connectHeaders: this.connectHeaders,
                                                    disconnectHeaders: this._disconnectHeaders,
                                                    heartbeatIncoming: this.heartbeatIncoming,
                                                    heartbeatOutgoing: this.heartbeatOutgoing,
                                                    splitLargeFrames: this.splitLargeFrames,
                                                    maxWebSocketChunkSize: this.maxWebSocketChunkSize,
                                                    forceBinaryWSFrames: this.forceBinaryWSFrames,
                                                    logRawCommunication: this.logRawCommunication,
                                                    onConnect: function(t) {
                                                        if (!e._active) return e.debug("STOMP got connected while deactivate was issued, will disconnect now"), void e._disposeStompHandler();
                                                        e.onConnect(t)
                                                    },
                                                    onDisconnect: function(t) {
                                                        e.onDisconnect(t)
                                                    },
                                                    onStompError: function(t) {
                                                        e.onStompError(t)
                                                    },
                                                    onWebSocketClose: function(t) {
                                                        e.onWebSocketClose(t), e._active && e._schedule_reconnect()
                                                    },
                                                    onWebSocketError: function(t) {
                                                        e.onWebSocketError(t)
                                                    },
                                                    onUnhandledMessage: function(t) {
                                                        e.onUnhandledMessage(t)
                                                    },
                                                    onUnhandledReceipt: function(t) {
                                                        e.onUnhandledReceipt(t)
                                                    },
                                                    onUnhandledFrame: function(t) {
                                                        e.onUnhandledFrame(t)
                                                    }
                                                }), this._stompHandler.start(), [2]) : (this.debug("Client has been marked inactive, will not attempt to connect"), [2])
                                        }
                                    })
                                })
                            }, e.prototype._createWebSocket = function() {
                                var e;
                                return e = this.webSocketFactory ? this.webSocketFactory() : new WebSocket(this.brokerURL, this.stompVersions.protocolVersions()), e.binaryType = "arraybuffer", e
                            }, e.prototype._schedule_reconnect = function() {
                                var e = this;
                                this.reconnectDelay > 0 && (this.debug("STOMP: scheduling reconnection in " + this.reconnectDelay + "ms"), this._reconnector = setTimeout(function() {
                                    e._connect()
                                }, this.reconnectDelay))
                            }, e.prototype.deactivate = function() {
                                this._active = !1, this._reconnector && clearTimeout(this._reconnector), this._disposeStompHandler()
                            }, e.prototype.forceDisconnect = function() {
                                this._webSocket && (this._webSocket.readyState !== WebSocket.CONNECTING && this._webSocket.readyState !== WebSocket.OPEN || this._webSocket.close())
                            }, e.prototype._disposeStompHandler = function() {
                                this._stompHandler && (this._stompHandler.dispose(), this._stompHandler = null)
                            }, e.prototype.publish = function(e) {
                                this._stompHandler.publish(e)
                            }, e.prototype.watchForReceipt = function(e, t) {
                                this._stompHandler.watchForReceipt(e, t)
                            }, e.prototype.subscribe = function(e, t, n) {
                                return void 0 === n && (n = {}), this._stompHandler.subscribe(e, t, n)
                            }, e.prototype.unsubscribe = function(e, t) {
                                void 0 === t && (t = {}), this._stompHandler.unsubscribe(e, t)
                            }, e.prototype.begin = function(e) {
                                return this._stompHandler.begin(e)
                            }, e.prototype.commit = function(e) {
                                this._stompHandler.commit(e)
                            }, e.prototype.abort = function(e) {
                                this._stompHandler.abort(e)
                            }, e.prototype.ack = function(e, t, n) {
                                void 0 === n && (n = {}), this._stompHandler.ack(e, t, n)
                            }, e.prototype.nack = function(e, t, n) {
                                void 0 === n && (n = {}), this._stompHandler.nack(e, t, n)
                            }, e
                    }();
                t.Client = a
            },
            "./src/compatibility/compat-client.ts": function(e, t, n) {
                var i = this && this.__extends || function() {
                    var e = function(t, n) {
                        return (e = Object.setPrototypeOf || {
                                __proto__: []
                            }
                            instanceof Array && function(e, t) {
                                e.__proto__ = t
                            } || function(e, t) {
                                for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n])
                            })(t, n)
                    };
                    return function(t, n) {
                        function i() {
                            this.constructor = t
                        }
                        e(t, n), t.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i)
                    }
                }();
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var r = n("./src/client.ts"),
                    o = n("./src/compatibility/heartbeat-info.ts"),
                    s = function(e) {
                        function t(t) {
                            var n = e.call(this) || this;
                            return n.maxWebSocketFrameSize = 16384, n._heartbeatInfo = new o.HeartbeatInfo(n), n.reconnect_delay = 0, n.webSocketFactory = t, n.debug = function() {
                                for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
                                console.log.apply(console, e)
                            }, n
                        }
                        return i(t, e), t.prototype._parseConnect = function() {
                            for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
                            var n, i, r, o = {};
                            if (e.length < 2) throw new Error("Connect requires at least 2 arguments");
                            if ("function" == typeof e[1]) o = e[0], i = e[1], r = e[2], n = e[3];
                            else switch (e.length) {
                                case 6:
                                    o.login = e[0], o.passcode = e[1], i = e[2], r = e[3], n = e[4], o.host = e[5];
                                    break;
                                default:
                                    o.login = e[0], o.passcode = e[1], i = e[2], r = e[3], n = e[4]
                            }
                            return [o, i, r, n]
                        }, t.prototype.connect = function() {
                            for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
                            var i = this._parseConnect.apply(this, t);
                            i[0] && (this.connectHeaders = i[0]), i[1] && (this.onConnect = i[1]), i[2] && (this.onStompError = i[2]), i[3] && (this.onWebSocketClose = i[3]), e.prototype.activate.call(this)
                        }, t.prototype.disconnect = function(t, n) {
                            void 0 === n && (n = {}), t && (this.onDisconnect = t), this.disconnectHeaders = n, e.prototype.deactivate.call(this)
                        }, t.prototype.send = function(e, t, n) {
                            void 0 === t && (t = {}), void 0 === n && (n = ""), t = Object.assign({}, t);
                            var i = !1 === t["content-length"];
                            i && delete t["content-length"], this.publish({
                                destination: e,
                                headers: t,
                                body: n,
                                skipContentLengthHeader: i
                            })
                        }, Object.defineProperty(t.prototype, "reconnect_delay", {
                            set: function(e) {
                                this.reconnectDelay = e
                            },
                            enumerable: !0,
                            configurable: !0
                        }), Object.defineProperty(t.prototype, "ws", {
                            get: function() {
                                return this._webSocket
                            },
                            enumerable: !0,
                            configurable: !0
                        }), Object.defineProperty(t.prototype, "version", {
                            get: function() {
                                return this.connectedVersion
                            },
                            enumerable: !0,
                            configurable: !0
                        }), Object.defineProperty(t.prototype, "onreceive", {
                            get: function() {
                                return this.onUnhandledMessage
                            },
                            set: function(e) {
                                this.onUnhandledMessage = e
                            },
                            enumerable: !0,
                            configurable: !0
                        }), Object.defineProperty(t.prototype, "onreceipt", {
                            get: function() {
                                return this.onUnhandledReceipt
                            },
                            set: function(e) {
                                this.onUnhandledReceipt = e
                            },
                            enumerable: !0,
                            configurable: !0
                        }), Object.defineProperty(t.prototype, "heartbeat", {
                            get: function() {
                                return this._heartbeatInfo
                            },
                            set: function(e) {
                                this.heartbeatIncoming = e.incoming, this.heartbeatOutgoing = e.outgoing
                            },
                            enumerable: !0,
                            configurable: !0
                        }), t
                    }(r.Client);
                t.CompatClient = s
            },
            "./src/compatibility/heartbeat-info.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = function() {
                    function e(e) {
                        this.client = e
                    }
                    return Object.defineProperty(e.prototype, "outgoing", {
                        get: function() {
                            return this.client.heartbeatOutgoing
                        },
                        set: function(e) {
                            this.client.heartbeatOutgoing = e
                        },
                        enumerable: !0,
                        configurable: !0
                    }), Object.defineProperty(e.prototype, "incoming", {
                        get: function() {
                            return this.client.heartbeatIncoming
                        },
                        set: function(e) {
                            this.client.heartbeatIncoming = e
                        },
                        enumerable: !0,
                        configurable: !0
                    }), e
                }();
                t.HeartbeatInfo = i
            },
            "./src/compatibility/stomp.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = n("./src/versions.ts"),
                    r = n("./src/compatibility/compat-client.ts"),
                    o = function() {
                        function e() {}
                        return e.client = function(t, n) {
                            null == n && (n = i.Versions.default.protocolVersions());
                            var o = function() {
                                return new(e.WebSocketClass || WebSocket)(t, n)
                            };
                            return new r.CompatClient(o)
                        }, e.over = function(e) {
                            var t = "function" == typeof e ? e : function() {
                                return e
                            };
                            return new r.CompatClient(t)
                        }, e.WebSocketClass = null, e
                    }();
                t.Stomp = o
            },
            "./src/frame-impl.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = n("./src/byte.ts"),
                    r = function() {
                        function e(e) {
                            var t = e.command,
                                n = e.headers,
                                i = e.body,
                                r = e.binaryBody,
                                o = e.escapeHeaderValues,
                                s = e.skipContentLengthHeader;
                            this.command = t, this.headers = Object.assign({}, n || {}), r ? (this._binaryBody = r, this.isBinaryBody = !0) : (this._body = i || "", this.isBinaryBody = !1), this.escapeHeaderValues = o || !1, this.skipContentLengthHeader = s || !1
                        }
                        return Object.defineProperty(e.prototype, "body", {
                            get: function() {
                                return !this._body && this.isBinaryBody && (this._body = (new TextDecoder).decode(this._binaryBody)), this._body
                            },
                            enumerable: !0,
                            configurable: !0
                        }), Object.defineProperty(e.prototype, "binaryBody", {
                            get: function() {
                                return this._binaryBody || this.isBinaryBody || (this._binaryBody = (new TextEncoder).encode(this._body)), this._binaryBody
                            },
                            enumerable: !0,
                            configurable: !0
                        }), e.fromRawFrame = function(t, n) {
                            for (var i = {}, r = function(e) {
                                    return e.replace(/^\s+|\s+$/g, "")
                                }, o = 0, s = t.headers.reverse(); o < s.length; o++) {
                                var a = s[o],
                                    c = (a.indexOf(":"), r(a[0])),
                                    u = r(a[1]);
                                n && "CONNECT" !== t.command && "CONNECTED" !== t.command && (u = e.hdrValueUnEscape(u)), i[c] = u
                            }
                            return new e({
                                command: t.command,
                                headers: i,
                                binaryBody: t.binaryBody,
                                escapeHeaderValues: n
                            })
                        }, e.prototype.toString = function() {
                            return this.serializeCmdAndHeaders()
                        }, e.prototype.serialize = function() {
                            var t = this.serializeCmdAndHeaders();
                            return this.isBinaryBody ? e.toUnit8Array(t, this._binaryBody).buffer : t + this._body + i.BYTE.NULL
                        }, e.prototype.serializeCmdAndHeaders = function() {
                            var t = [this.command];
                            this.skipContentLengthHeader && delete this.headers["content-length"];
                            for (var n = 0, r = Object.keys(this.headers || {}); n < r.length; n++) {
                                var o = r[n],
                                    s = this.headers[o];
                                this.escapeHeaderValues && "CONNECT" !== this.command && "CONNECTED" !== this.command ? t.push(o + ":" + e.hdrValueEscape("" + s)) : t.push(o + ":" + s)
                            }
                            return (this.isBinaryBody || !this.isBodyEmpty() && !this.skipContentLengthHeader) && t.push("content-length:" + this.bodyLength()), t.join(i.BYTE.LF) + i.BYTE.LF + i.BYTE.LF
                        }, e.prototype.isBodyEmpty = function() {
                            return 0 === this.bodyLength()
                        }, e.prototype.bodyLength = function() {
                            var e = this.binaryBody;
                            return e ? e.length : 0
                        }, e.sizeOfUTF8 = function(e) {
                            return e ? (new TextEncoder).encode(e).length : 0
                        }, e.toUnit8Array = function(e, t) {
                            var n = (new TextEncoder).encode(e),
                                i = new Uint8Array([0]),
                                r = new Uint8Array(n.length + t.length + i.length);
                            return r.set(n), r.set(t, n.length), r.set(i, n.length + t.length), r
                        }, e.marshall = function(t) {
                            return new e(t).serialize()
                        }, e.hdrValueEscape = function(e) {
                            return e.replace(/\\/g, "\\\\").replace(/\r/g, "\\r").replace(/\n/g, "\\n").replace(/:/g, "\\c")
                        }, e.hdrValueUnEscape = function(e) {
                            return e.replace(/\\r/g, "\r").replace(/\\n/g, "\n").replace(/\\c/g, ":").replace(/\\\\/g, "\\")
                        }, e
                    }();
                t.FrameImpl = r
            },
            "./src/index.ts": function(e, t, n) {
                function i(e) {
                    for (var n in e) t.hasOwnProperty(n) || (t[n] = e[n])
                }
                Object.defineProperty(t, "__esModule", {
                    value: !0
                }), i(n("./src/client.ts")), i(n("./src/frame-impl.ts")), i(n("./src/parser.ts")), i(n("./src/stomp-config.ts")), i(n("./src/stomp-headers.ts")), i(n("./src/stomp-subscription.ts")), i(n("./src/versions.ts")), i(n("./src/compatibility/compat-client.ts")), i(n("./src/compatibility/stomp.ts"))
            },
            "./src/parser.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = function() {
                    function e(e, t) {
                        this.onFrame = e, this.onIncomingPing = t, this._encoder = new TextEncoder, this._decoder = new TextDecoder, this._token = [], this._initState()
                    }
                    return e.prototype.parseChunk = function(e) {
                        var t;
                        t = e instanceof ArrayBuffer ? new Uint8Array(e) : this._encoder.encode(e);
                        for (var n = 0; n < t.length; n++) {
                            var i = t[n];
                            this._onByte(i)
                        }
                    }, e.prototype._collectFrame = function(e) {
                        if (0 !== e && 13 !== e) {
                            if (10 === e) return void this.onIncomingPing();
                            this._onByte = this._collectCommand, this._reinjectByte(e)
                        }
                    }, e.prototype._collectCommand = function(e) {
                        if (13 !== e) return 10 === e ? (this._results.command = this._consumeTokenAsUTF8(), void(this._onByte = this._collectHeaders)) : void this._consumeByte(e)
                    }, e.prototype._collectHeaders = function(e) {
                        if (13 !== e) {
                            if (10 === e) return void this._setupCollectBody();
                            this._onByte = this._collectHeaderKey, this._reinjectByte(e)
                        }
                    }, e.prototype._reinjectByte = function(e) {
                        this._onByte(e)
                    }, e.prototype._collectHeaderKey = function(e) {
                        if (58 === e) return this._headerKey = this._consumeTokenAsUTF8(), void(this._onByte = this._collectHeaderValue);
                        this._consumeByte(e)
                    }, e.prototype._collectHeaderValue = function(e) {
                        if (13 !== e) return 10 === e ? (this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]), this._headerKey = void 0, void(this._onByte = this._collectHeaders)) : void this._consumeByte(e)
                    }, e.prototype._setupCollectBody = function() {
                        var e = this._results.headers.filter(function(e) {
                            return "content-length" === e[0]
                        })[0];
                        e ? (this._bodyBytesRemaining = parseInt(e[1], 10), this._onByte = this._collectBodyFixedSize) : this._onByte = this._collectBodyNullTerminated
                    }, e.prototype._collectBodyNullTerminated = function(e) {
                        if (0 === e) return void this._retrievedBody();
                        this._consumeByte(e)
                    }, e.prototype._collectBodyFixedSize = function(e) {
                        if (0 == this._bodyBytesRemaining--) return void this._retrievedBody();
                        this._consumeByte(e)
                    }, e.prototype._retrievedBody = function() {
                        this._results.binaryBody = this._consumeTokenAsRaw(), this.onFrame(this._results), this._initState()
                    }, e.prototype._consumeByte = function(e) {
                        this._token.push(e)
                    }, e.prototype._consumeTokenAsUTF8 = function() {
                        return this._decoder.decode(this._consumeTokenAsRaw())
                    }, e.prototype._consumeTokenAsRaw = function() {
                        var e = new Uint8Array(this._token);
                        return this._token = [], e
                    }, e.prototype._initState = function() {
                        this._results = {
                            command: void 0,
                            headers: [],
                            binaryBody: void 0
                        }, this._token = [], this._headerKey = void 0, this._onByte = this._collectFrame
                    }, e
                }();
                t.Parser = i
            },
            "./src/stomp-config.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = function() {
                    function e() {}
                    return e
                }();
                t.StompConfig = i
            },
            "./src/stomp-handler.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = n("./src/byte.ts"),
                    r = n("./src/frame-impl.ts"),
                    o = n("./src/parser.ts"),
                    s = n("./src/versions.ts"),
                    a = function() {
                        function e(e, t, n) {
                            void 0 === n && (n = {});
                            var i = this;
                            this._client = e, this._webSocket = t, this._serverFrameHandlers = {
                                CONNECTED: function(e) {
                                    i.debug("connected to server " + e.headers.server), i._connected = !0, i._connectedVersion = e.headers.version, i._connectedVersion === s.Versions.V1_2 && (i._escapeHeaderValues = !0), i._setupHeartbeat(e.headers), i.onConnect(e)
                                },
                                MESSAGE: function(e) {
                                    var t = e.headers.subscription,
                                        n = i._subscriptions[t] || i.onUnhandledMessage,
                                        r = e,
                                        o = i,
                                        a = i._connectedVersion === s.Versions.V1_2 ? r.headers.ack : r.headers["message-id"];
                                    r.ack = function(e) {
                                        return void 0 === e && (e = {}), o.ack(a, t, e)
                                    }, r.nack = function(e) {
                                        return void 0 === e && (e = {}), o.nack(a, t, e)
                                    }, n(r)
                                },
                                RECEIPT: function(e) {
                                    var t = i._receiptWatchers[e.headers["receipt-id"]];
                                    t ? (t(e), delete i._receiptWatchers[e.headers["receipt-id"]]) : i.onUnhandledReceipt(e)
                                },
                                ERROR: function(e) {
                                    i.onStompError(e)
                                }
                            }, this._counter = 0, this._subscriptions = {}, this._receiptWatchers = {}, this._partialData = "", this._escapeHeaderValues = !1, this._lastServerActivityTS = Date.now(), this.configure(n)
                        }
                        return Object.defineProperty(e.prototype, "connectedVersion", {
                            get: function() {
                                return this._connectedVersion
                            },
                            enumerable: !0,
                            configurable: !0
                        }), Object.defineProperty(e.prototype, "connected", {
                            get: function() {
                                return this._connected
                            },
                            enumerable: !0,
                            configurable: !0
                        }), e.prototype.configure = function(e) {
                            Object.assign(this, e)
                        }, e.prototype.start = function() {
                            var e = this,
                                t = new o.Parser(function(t) {
                                    var n = r.FrameImpl.fromRawFrame(t, e._escapeHeaderValues);
                                    e.logRawCommunication || e.debug("<<< " + n), (e._serverFrameHandlers[n.command] || e.onUnhandledFrame)(n)
                                }, function() {
                                    e.debug("<<< PONG")
                                });
                            this._webSocket.onmessage = function(n) {
                                if (e.debug("Received data"), e._lastServerActivityTS = Date.now(), e.logRawCommunication) {
                                    var i = n.data instanceof ArrayBuffer ? (new TextDecoder).decode(n.data) : n.data;
                                    e.debug("<<< " + i)
                                }
                                t.parseChunk(n.data)
                            }, this._webSocket.onclose = function(t) {
                                e.debug("Connection closed to " + e._webSocket.url), e.onWebSocketClose(t), e._cleanUp()
                            }, this._webSocket.onerror = function(t) {
                                e.onWebSocketError(t)
                            }, this._webSocket.onopen = function() {
                                var t = Object.assign({}, e.connectHeaders);
                                e.debug("Web Socket Opened..."), t["accept-version"] = e.stompVersions.supportedVersions(), t["heart-beat"] = [e.heartbeatOutgoing, e.heartbeatIncoming].join(","), e._transmit({
                                    command: "CONNECT",
                                    headers: t
                                })
                            }
                        }, e.prototype._setupHeartbeat = function(e) {
                            var t = this;
                            if (e.version === s.Versions.V1_1 || e.version === s.Versions.V1_2) {
                                var n = e["heart-beat"].split(",").map(function(e) {
                                        return parseInt(e, 10)
                                    }),
                                    r = n[0],
                                    o = n[1];
                                if (0 !== this.heartbeatOutgoing && 0 !== o) {
                                    var a = Math.max(this.heartbeatOutgoing, o);
                                    this.debug("send PING every " + a + "ms"), this._pinger = setInterval(function() {
                                        t._webSocket.readyState === WebSocket.OPEN && (t._webSocket.send(i.BYTE.LF), t.debug(">>> PING"))
                                    }, a)
                                }
                                if (0 !== this.heartbeatIncoming && 0 !== r) {
                                    var c = Math.max(this.heartbeatIncoming, r);
                                    this.debug("check PONG every " + c + "ms"), this._ponger = setInterval(function() {
                                        var e = Date.now() - t._lastServerActivityTS;
                                        e > 2 * c && (t.debug("did not receive server activity for the last " + e + "ms"), t._webSocket.close())
                                    }, c)
                                }
                            }
                        }, e.prototype._transmit = function(e) {
                            var t = e.command,
                                n = e.headers,
                                i = e.body,
                                o = e.binaryBody,
                                s = e.skipContentLengthHeader,
                                a = new r.FrameImpl({
                                    command: t,
                                    headers: n,
                                    body: i,
                                    binaryBody: o,
                                    escapeHeaderValues: this._escapeHeaderValues,
                                    skipContentLengthHeader: s
                                }),
                                c = a.serialize();
                            if (this.logRawCommunication ? this.debug(">>> " + c) : this.debug(">>> " + a), this.forceBinaryWSFrames && "string" == typeof c && (c = (new TextEncoder).encode(c)), "string" == typeof c && this.splitLargeFrames)
                                for (var u = c; u.length > 0;) {
                                    var l = u.substring(0, this.maxWebSocketChunkSize);
                                    u = u.substring(this.maxWebSocketChunkSize), this._webSocket.send(l), this.debug("chunk sent = " + l.length + ", remaining = " + u.length)
                                } else this._webSocket.send(c)
                        }, e.prototype.dispose = function() {
                            var e = this;
                            if (this.connected) try {
                                var t = Object.assign({}, this.disconnectHeaders);
                                t.receipt || (t.receipt = "close-" + this._counter++), this.watchForReceipt(t.receipt, function(t) {
                                    e._webSocket.close(), e._cleanUp(), e.onDisconnect(t)
                                }), this._transmit({
                                    command: "DISCONNECT",
                                    headers: t
                                })
                            } catch (e) {
                                this.debug("Ignoring error during disconnect " + e)
                            } else this._webSocket.readyState !== WebSocket.CONNECTING && this._webSocket.readyState !== WebSocket.OPEN || this._webSocket.close()
                        }, e.prototype._cleanUp = function() {
                            this._connected = !1, this._pinger && clearInterval(this._pinger), this._ponger && clearInterval(this._ponger)
                        }, e.prototype.publish = function(e) {
                            var t = e.destination,
                                n = e.headers,
                                i = e.body,
                                r = e.binaryBody,
                                o = e.skipContentLengthHeader,
                                s = Object.assign({
                                    destination: t
                                }, n);
                            this._transmit({
                                command: "SEND",
                                headers: s,
                                body: i,
                                binaryBody: r,
                                skipContentLengthHeader: o
                            })
                        }, e.prototype.watchForReceipt = function(e, t) {
                            this._receiptWatchers[e] = t
                        }, e.prototype.subscribe = function(e, t, n) {
                            void 0 === n && (n = {}), n = Object.assign({}, n), n.id || (n.id = "sub-" + this._counter++), n.destination = e, this._subscriptions[n.id] = t, this._transmit({
                                command: "SUBSCRIBE",
                                headers: n
                            });
                            var i = this;
                            return {
                                id: n.id,
                                unsubscribe: function(e) {
                                    return i.unsubscribe(n.id, e)
                                }
                            }
                        }, e.prototype.unsubscribe = function(e, t) {
                            void 0 === t && (t = {}), t = Object.assign({}, t), delete this._subscriptions[e], t.id = e, this._transmit({
                                command: "UNSUBSCRIBE",
                                headers: t
                            })
                        }, e.prototype.begin = function(e) {
                            var t = e || "tx-" + this._counter++;
                            this._transmit({
                                command: "BEGIN",
                                headers: {
                                    transaction: t
                                }
                            });
                            var n = this;
                            return {
                                id: t,
                                commit: function() {
                                    n.commit(t)
                                },
                                abort: function() {
                                    n.abort(t)
                                }
                            }
                        }, e.prototype.commit = function(e) {
                            this._transmit({
                                command: "COMMIT",
                                headers: {
                                    transaction: e
                                }
                            })
                        }, e.prototype.abort = function(e) {
                            this._transmit({
                                command: "ABORT",
                                headers: {
                                    transaction: e
                                }
                            })
                        }, e.prototype.ack = function(e, t, n) {
                            void 0 === n && (n = {}), n = Object.assign({}, n), this._connectedVersion === s.Versions.V1_2 ? n.id = e : n["message-id"] = e, n.subscription = t, this._transmit({
                                command: "ACK",
                                headers: n
                            })
                        }, e.prototype.nack = function(e, t, n) {
                            return void 0 === n && (n = {}), n = Object.assign({}, n), this._connectedVersion === s.Versions.V1_2 ? n.id = e : n["message-id"] = e, n.subscription = t, this._transmit({
                                command: "NACK",
                                headers: n
                            })
                        }, e
                    }();
                t.StompHandler = a
            },
            "./src/stomp-headers.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = function() {
                    function e() {}
                    return e
                }();
                t.StompHeaders = i
            },
            "./src/stomp-subscription.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = function() {
                    function e() {}
                    return e
                }();
                t.StompSubscription = i
            },
            "./src/versions.ts": function(e, t, n) {
                Object.defineProperty(t, "__esModule", {
                    value: !0
                });
                var i = function() {
                    function e(e) {
                        this.versions = e
                    }
                    return e.prototype.supportedVersions = function() {
                        return this.versions.join(",")
                    }, e.prototype.protocolVersions = function() {
                        return this.versions.map(function(e) {
                            return "v" + e.replace(".", "") + ".stomp"
                        })
                    }, e.V1_0 = "1.0", e.V1_1 = "1.1", e.V1_2 = "1.2", e.default = new e([e.V1_0, e.V1_1, e.V1_2]), e
                }();
                t.Versions = i
            },
            0: function(e, t, n) {
                e.exports = n("./src/index.ts")
            }
        })
    }), define("gameservice/flightdeck/WebsocketAdapter", ["require", "objectAssignAuto", "encodingjs", "sockjs", "StompJs"], function(e, t, n, i, r) {
        "use strict";

        function o(e) {
            function t(e, t, n, i, r) {
                f || (f = !1, l.connect({
                    login: e.login,
                    passcode: e.passcode,
                    uniqueid: e.headers.uniqueid,
                    securetoken: e.headers.securetoken,
                    currencycode: e.headers.currencycode,
                    softwareid: e.headers.softwareid,
                    skincode: e.headers.skincode,
                    operator: e.headers.operator,
                    presenttype: e.headers.presenttype,
                    countrycode: e.headers.countrycode,
                    language: e.headers.language,
                    channel: e.headers.channel
                }, function(e) {
                    f = !0, t && t(e)
                }, function(e) {
                    f = !1, r && r(e.code), setTimeout(function() {
                        n()
                    }, 1e4)
                }, function(e) {
                    f = !1, r && r(e.code), setTimeout(function() {
                        i()
                    }, 1e4)
                }))
            }

            function n(e, t, n) {
                return l.subscribe(e, function(e) {
                    t(e)
                }, n || {})
            }

            function o(e, t, n) {
                return l.subscribe(e, t, n || {})
            }

            function s(e, t) {
                l.send(e, {}, JSON.stringify(t))
            }

            function a(e, t) {
                l.forceDisconnect()
            }
            var c = new i(e, null, {
                    transports: ["websocket", "xhr-streaming"]
                }),
                u = r.Stomp,
                l = u.over(c);
            l.heartbeat.outgoing = 2e4, l.heartbeat.incoming = 2e4, l.reconnectDelay = 0;
            var f = !1;
            return Object.freeze({
                connect: t,
                subscribe: n,
                register: o,
                send: s,
                disconnect: a
            })
        }
        return Object.freeze({
            createStompClient: o
        })
    }), define("gameservice/flightdeck/FlightdeckClient", ["./WebsocketAdapter"], function(e) {
        "use strict";

        function t(t, n, i, r, o) {
            d || (f = e.createStompClient(t.endpoint), f.connect({
                login: t.user ? encodeURIComponent(t.user.id) : "anonymous",
                passcode: "",
                headers: t.headers
            }, function(e) {
                d = !0, n(e)
            }, function() {
                d = !1, i()
            }, function() {
                d = !1, r && r()
            }, function(e) {
                d = !1, o && o(e)
            }))
        }

        function n(e, t) {
            var n = f.register("/gs/notification", function(e) {
                t && "function" == typeof t && (t(e), p.push(t))
            }, e.payload ? e.payload : {});
            return h["/gs/notification"] = n, n
        }

        function i(e, t, n) {
            var i = f.register(e, t, n);
            return h[e] = i, i
        }

        function r(e, t, n) {
            var i = f.subscribe(e, t, n);
            return h[e] = i, i
        }

        function o(e) {
            h[e] && (h[e].unsubscribe(), delete h[e])
        }

        function s(e, t) {
            f.send(e, t)
        }

        function a() {
            for (var e in h) h[e].unsubscribe(), delete h[e];
            f && (f.disconnect(), f = null)
        }

        function c() {}

        function u(e) {
            return !!h[e]
        }

        function l() {
            f && f.disconnect()
        }
        var f, d = !1,
            p = [],
            h = {};
        return Object.freeze({
            connect: t,
            disconnect: a,
            registerNotification: n,
            reconnect: c,
            register: i,
            subscribe: r,
            unsubscribe: o,
            hasSubscribedByTopic: u,
            send: s,
            wsClientDisconnect: l
        })
    }), define("gameservice/competition/CompetitionStateController", ["require"], function(e) {
        "use strict";
        return function(e) {
            function t(e) {
                function t(e) {
                    return K && K === e
                }

                function s(e) {
                    var t = G;
                    switch (e) {
                        case "PRE_ACTIVE":
                        case "PUBLISHED":
                            G = "preactive";
                            break;
                        case "ACTIVE":
                            G = "active";
                            break;
                        case "LB_PAYOUT_ERROR":
                        case "PAYOUT_ERROR":
                        case "COMPLETED":
                            G = "PRIZE_DRAW" === Z || "PROMOTION" === Z ? "completed" : "completing";
                            break;
                        case "LB_RESULTED":
                        case "RESULTED":
                            G = "completed";
                            break;
                        case "LB_PAYOUT_ERROR_FOR_CANCEL":
                        case "PAYOUT_ERROR_FOR_CANCEL":
                        case "CANCELED_AND_REWARDING_LB":
                        case "CANCELED_AND_REWARDING":
                        case "CANCELED":
                        case "CANCELED_AND_REWARDED_LB":
                        case "CANCELED_AND_REWARDED":
                        case "CANCELED_AND_NO_REWARD_LB":
                        case "CANCELED_AND_NO_REWARD":
                            G = "cancelled", L = e
                    }
                    return G !== t
                }

                function a() {
                    if (B) r.warn("warning, the competition already started");
                    else {
                        if (W.length > 0)
                            for (var e = 0; e < W.length; e++) ee[W[e].type](W[e].data);
                        W = [], B = !0
                    }
                }

                function c(e) {
                    r.debug(">> for debug : raw flightdeck message <<"), r.debug(e), r.debug(JSON.stringify(e));
                    var t = e.type,
                        n = e.timestamp,
                        i = e.payload;
                    e.serverTime && (i.serverTime = e.serverTime), (!Q[t] || "NOTIFICATION" === t || Q[t] && Q[t].timestamp < n) && (Q[t] = e, B ? ee[t](i) : "ACTIVE" !== i.notifyType && W.push({
                        type: t,
                        data: i
                    }))
                }

                function u(e, t, n) {
                    M = {
                        isInGameRound: e,
                        status: t,
                        isInGIP: H,
                        nextStage: n
                    }, M.isInGameRound || p()
                }

                function l(e, t) {
                    H = e, M && (M.isInGIP = H), x(t)
                }

                function f(e, t, n, i) {
                    M && M.isInGameRound && "onAllowInterruptedMessage" !== M.status && ("onExitStage" !== M.status || "BaseGame" === M.nextStage) ? U.push({
                        msg: e,
                        repliable: t,
                        success: n,
                        fail: i
                    }) : d(e, t, n, i)
                }

                function d(e, t, i, r) {
                    e.data && e.data.gameRoundState && (e.data.gameRoundState = M), t ? n.request(e, i, r) : n.publish(e)
                }

                function p() {
                    var e;
                    if (U.length > 0) {
                        var t = U.findIndex(function(e) {
                            return "Competition.Finished" === e.msg.topic
                        });
                        if (-1 !== t) {
                            var n = U.splice(t, 1)[0];
                            U.splice(U.length, 0, n)
                        }
                    }
                    for (; U.length > 0;) e = U.shift(), d(e.msg, e.repliable, e.success, e.fail)
                }

                function h(e, t) {
                    r.debug(">>> " + e + " <<<"), r.debug(t), r.debug(JSON.stringify(t))
                }

                function m(e) {
                    var t = ["GETS_X_CARD_IN_FISRT_TWO_CARDS_THAT_ARE_DEALT_IN_GAME_G", "GETS_ANY_X_CARD_IN_FISRT_TWO_CARDS_THAT_ARE_DEALT_IN_GAME_G"];
                    !e || !Array.isArray(e) || q.length > 0 || e.forEach(function(e) {
                        e.rules && e.rules.CONDITION && Array.isArray(e.rules.CONDITION) && e.rules.CONDITION.forEach(function(n) {
                            t.indexOf(n.template) > -1 && q.push(e.ruleGroupId)
                        })
                    })
                }

                function g() {
                    z || (z = !0, o.bufferOrSendToWidget("Competition.Status", {
                        messageType: "Competition.Status",
                        messageData: {
                            status: "PreActive"
                        },
                        messageExtraData: {
                            competitionId: K
                        }
                    }))
                }

                function b(e) {
                    e.spinRemaining || (e.spinRemaining = Y ? Y.spinRemaining : e.spinLimitation), e.reBuyRemaining || (e.reBuyRemaining = Y ? Y.reBuyRemaining : e.reBuyLimitation)
                }

                function y(e) {
                    return ["uniqueId", "nickname", "nicknameAutoGen"].reduce(function(t, n) {
                        return n in e && (t[n] = e[n]), t
                    }, {})
                }

                function v(e, t) {
                    var n = {
                        registered: !1,
                        registrationId: null,
                        progress: {
                            rules: []
                        }
                    };
                    if (!t) return n;
                    var i = {},
                        r = e.competitionToken;
                    return t.buffer && (i = JSON.parse(JSON.stringify(t.buffer)).reduce(function(e, t) {
                        return e[t.cptToken] = t, delete t.cptToken, e
                    }, {})), i[r] ? i[r] : n
                }

                function w(e) {
                    if ("PROMOTION" === e.stopType && void 0 !== e.awardQuestAwardLimitation) {
                        var t = parseInt(e.awardQuestAwardLimitation),
                            n = 0 === t ? "" : "0%";
                        Object.assign(e.progress, {
                            maxAward: {
                                current: 0,
                                maximum: t,
                                percent: n,
                                finishedRuleGroupIds: null
                            }
                        })
                    }
                }

                function _(e) {
                    if (h("Pre Active", e), !z && (z = !0, e.GSPWidget)) {
                        var t = e.GSPWidget.competitions ? e.GSPWidget.competitions[0] : null,
                            i = e.GSPWidget.player;
                        if (t && t.leaderBoard && b(t.leaderBoard), t && i) {
                            var r = v(t, i);
                            Object.assign(t, r), w(t), e.GSPWidget.player = y(i)
                        }
                        t && void 0 !== t.awardQuestAwardLimitation && delete t.awardQuestAwardLimitation, m(t.ruleGroupsDescription), o.bufferOrSendToWidget("Competition.Status", {
                            messageType: "Competition.Status",
                            messageData: {
                                status: "PreActive"
                            },
                            messageExtraData: {
                                competitionId: K
                            }
                        }), n.publish({
                            channel: "GameService",
                            topic: "Competition.Info",
                            data: Object.freeze(F(e.GSPWidget))
                        })
                    }
                }

                function C(e) {
                    z = !0;
                    var t, i;
                    if (e.GSPWidget && e.GSPWidget.competitions && (t = e.GSPWidget.competitions[0], i = e.GSPWidget.player), !J) {
                        if (J = !0, t && t.leaderBoard && b(t.leaderBoard), t && i) {
                            var r = v(t, i);
                            Object.assign(t, r), w(t), e.GSPWidget.player = y(i)
                        }
                        t && void 0 !== t.awardQuestAwardLimitation && delete t.awardQuestAwardLimitation, m(t.ruleGroupsDescription), o.bufferOrSendToWidget("Competition.Status", {
                            messageType: "Competition.Status",
                            messageData: {
                                status: "Active"
                            },
                            messageExtraData: {
                                competitionId: K
                            }
                        }), n.publish({
                            channel: "GameService",
                            topic: "Competition.Info",
                            data: Object.freeze(F(e.GSPWidget))
                        })
                    }
                    t && "PRIZE_DRAW" === t.stopType && o.bufferOrSendToWidget("Competition.Update", {
                        messageType: "Competition.Update",
                        messageSubType: "PrizePool",
                        messageData: D(t.prizePool),
                        messageExtraData: {
                            competitionId: K
                        }
                    })
                }

                function S(e) {
                    h("Leaderboard", e), e.competitionWidgetInfo && o.sendWidgetMessage({
                        messageType: "Competition.Update",
                        messageSubType: "Leaderboard",
                        messageData: e.competitionWidgetInfo,
                        messageExtraData: {
                            competitionId: K
                        }
                    })
                }

                function E(e) {
                    h("Leaderboard Award", e), e.payoutStatus && "PENDING" === e.payoutStatus && e.competitionWidgetInfo && o.sendWidgetMessage({
                        messageType: "Competition.Award",
                        messageSubType: "LeaderboardAward",
                        messageData: function(e) {
                            var t = JSON.parse(JSON.stringify(e));
                            return t.forEach(function(e) {
                                e.awards && Array.isArray(e.awards) && e.awards.length > 0 && e.awards.forEach(function(e) {
                                    "CASH" !== e.category && "FREESPIN" !== e.category || P(e)
                                })
                            }), t
                        }(e.competitionWidgetInfo),
                        messageExtraData: {
                            competitionId: K
                        }
                    })
                }

                function O(e) {
                    "TIMED_PRIZE_DRAW" === Z && (h("Timed Prize Draw Award", e), e.payoutStatus && "PENDING" === e.payoutStatus && e.competitionWidgetInfo && o.sendWidgetMessage({
                        messageType: "Competition.Award",
                        messageSubType: "TimedPrizeDrawAward",
                        messageData: function(e) {
                            var t = JSON.parse(JSON.stringify(e));
                            return t.forEach(function(e) {
                                "CASH" !== e.category && "FREESPIN" !== e.category || P(e)
                            }), t
                        }(e.competitionWidgetInfo),
                        messageExtraData: {
                            competitionId: K
                        }
                    }))
                }

                function x(e) {
                    if ($ && (!H || e) && $) {
                        var t = $;
                        $ = null, o.sendWidgetMessage({
                            messageType: "Competition.Update",
                            messageSubType: "Progression",
                            messageData: t,
                            messageExtraData: {
                                competitionId: K
                            }
                        })
                    }
                }

                function I(e) {
                    var t = !0;
                    if (e.prizes && e.prizes.length > 0)
                        for (var n = 0; n < e.prizes.length; n++) {
                            var i = e.prizes[n];
                            if ("EMPTY" !== i.awardType.category) {
                                t = !1;
                                break
                            }
                        } else t = !(!e.prize || !e.prize.awardType || "EMPTY" !== e.prize.awardType.category);
                    return t
                }

                function k(e) {
                    if (h("Progression", e), ("COMPLETED" !== e.payoutStatus || I(e)) && e.competitionWidgetInfo && e.competitionWidgetInfo.progress) {
                        var t = e.competitionWidgetInfo.progress;
                        !(t.rules || []).map(function(e) {
                            return e.ruleGroupId
                        }).some(function(e) {
                            return q.indexOf(e) > -1
                        }) && M.isInGameRound ? $ = t : o.sendWidgetMessage({
                            messageType: "Competition.Update",
                            messageSubType: "Progression",
                            messageData: t,
                            messageExtraData: {
                                competitionId: K
                            }
                        })
                    }
                }

                function T(e) {
                    "PRIZE_DRAW" !== Z && "PROMOTION" !== Z || (h("Prize Award", e), e && ("PENDING" === e.payoutStatus || I(e)) && e.competitionWidgetInfo && e.competitionWidgetInfo.awards.length > 0 && o.sendWidgetMessage({
                        messageType: "Competition.Award",
                        messageSubType: "PrizeDrawAward",
                        messageData: function(e) {
                            var t = JSON.parse(JSON.stringify(e));
                            return t = Object.keys(t).reduce(function(e, n) {
                                return "progress" !== n && (e[n] = t[n], "awards" === n && e[n].forEach(function(e) {
                                    "CASH" !== e.category && "FREESPIN" !== e.category || P(e)
                                })), e
                            }, {})
                        }(e.competitionWidgetInfo),
                        messageExtraData: {
                            competitionId: K
                        }
                    }))
                }

                function A(e) {
                    if (h("Completing", e), e.GSPWidget) {
                        var t = e.GSPWidget.competitions ? e.GSPWidget.competitions[0] : null;
                        t.prizePool && "PRIZE_DRAW" === Z && o.sendWidgetMessage({
                            messageType: "Competition.Update",
                            messageSubType: "PrizePool",
                            messageData: D(t.prizePool),
                            messageExtraData: {
                                competitionId: K
                            }
                        }), o.sendWidgetMessage({
                            messageType: "Competition.Status",
                            messageData: {
                                status: "Completing"
                            },
                            messageExtraData: {
                                competitionId: K
                            }
                        })
                    }
                    f({
                        channel: "GameService",
                        topic: "Competition.Finished",
                        data: {
                            isRegistered: V,
                            competitionToken: K,
                            competitionStatus: "Completing"
                        }
                    })
                }

                function j(e) {
                    if (h("Completed", e), e.GSPWidget) {
                        var t = e.GSPWidget.competitions ? e.GSPWidget.competitions[0] : null;
                        t.prizePool && "PRIZE_DRAW" === Z && o.sendWidgetMessage({
                            messageType: "Competition.Update",
                            messageSubType: "PrizePool",
                            messageData: D(t.prizePool),
                            messageExtraData: {
                                competitionId: K
                            }
                        }), o.sendWidgetMessage({
                            messageType: "Competition.Status",
                            messageData: {
                                status: "Completed"
                            },
                            messageExtraData: {
                                competitionId: K
                            }
                        }), f({
                            channel: "GameService",
                            topic: "Competition.Completed",
                            data: {
                                competitionId: K
                            }
                        })
                    }
                    f({
                        channel: "GameService",
                        topic: "Competition.Finished",
                        data: {
                            isRegistered: V,
                            competitionToken: K,
                            competitionStatus: "Completed"
                        }
                    })
                }

                function N(e, t) {
                    if (h("Cancelled", e), e.GSPWidget) {
                        var n = e.GSPWidget.competitions ? e.GSPWidget.competitions[0] : null;
                        n.prizePool && "PRIZE_DRAW" === Z && o.sendWidgetMessage({
                            messageType: "Competition.Update",
                            messageSubType: "PrizePool",
                            messageData: D(n.prizePool),
                            messageExtraData: {
                                competitionId: K
                            }
                        }), o.sendWidgetMessage({
                            messageType: "Competition.Status",
                            messageData: {
                                status: "Cancelled",
                                subStatus: L
                            },
                            messageExtraData: {
                                competitionId: K
                            }
                        }), f({
                            channel: "GameService",
                            topic: "Competition.Cancelled",
                            data: {
                                competitionId: K
                            }
                        })
                    }["CANCELED_AND_NO_REWARD", "CANCELED_AND_REWARDED", "CANCELED_AND_NO_REWARD_LB", "CANCELED_AND_REWARDED_LB", "CANCELED"].includes(t) && f({
                        channel: "GameService",
                        topic: "Competition.Finished",
                        data: {
                            isRegistered: V,
                            competitionToken: K,
                            competitionStatus: "Cancelled"
                        }
                    })
                }

                function P(e) {
                    e.formatterAward = i.formatFloat(parseFloat(e.award)), "FREESPIN" === e.category && e.additionalInfo && e.additionalInfo.offers && e.additionalInfo.offers.forEach(function(e) {
                        e.betAmount && (e.formatterBetAmount = i.formatFloat(parseFloat(e.betAmount)))
                    })
                }

                function D(e) {
                    var t = JSON.parse(JSON.stringify(e));
                    return t.prizes ? (t.prizes.forEach(function(e) {
                        !e.category || "CASH" !== e.category && "FREESPIN" !== e.category || P(e)
                    }), t) : t
                }

                function F(e) {
                    function t(e) {
                        e.forEach(function(e) {
                            !e.category || "CASH" !== e.category && "FREESPIN" !== e.category || P(e)
                        })
                    }
                    var n = JSON.parse(JSON.stringify(e)),
                        r = n.competitions[0];
                    return r && r.ruleGroupsDescription && (r.ruleGroupsDescription.forEach(function(e) {
                        if (e.rules && e.rules.CONDITION && e.rules.CONDITION[0] && e.rules.CONDITION[0].parameters) {
                            var t = e.rules.CONDITION[0].parameters;
                            Object.keys(t).forEach(function(e) {
                                ["amount", "winAmount", "loseAmount"].indexOf(e) > -1 && (t[e] = i.formatFloat(parseFloat(t[e])))
                            })
                        }
                    }), r.ruleGroupsDescription.forEach(function(e) {
                        if (e.exclusiveAward) {
                            var t = e.exclusiveAward;
                            !t.category || "CASH" !== t.category && "FREESPIN" !== t.category || P(t)
                        }
                    })), r && r.leaderBoard && (t(r.leaderBoard.levels), r.leaderBoard.hasOwnProperty("totalPrize") && (r.leaderBoard.totalPrize = i.formatFloat(parseFloat(r.leaderBoard.totalPrize)))), r && r.prizePool && t(r.prizePool.prizes), r && r.prizePools && r.prizePools.forEach(function(e) {
                        t(e.prizes)
                    }), n
                }

                function R() {
                    return G
                }
                var B = !1,
                    G = "idle",
                    L = "",
                    W = [],
                    U = [],
                    M = {},
                    H = !1,
                    z = !1,
                    J = !1,
                    V = !1,
                    q = [],
                    K = e.competitionToken,
                    X = e.status,
                    Z = e.stopType,
                    Y = e.leaderBoardDataByPlayer,
                    $ = null,
                    Q = {},
                    ee = {
                        NOTIFICATION: function(e) {
                            var t = e.notifyType,
                                n = {
                                    GSPWidget: e.competitionWidgetInfo
                                };
                            s(t);
                            switch (G) {
                                case "preactive":
                                    _(n);
                                    break;
                                case "active":
                                    C(n);
                                    break;
                                case "completing":
                                    A(n);
                                    break;
                                case "completed":
                                    j(n);
                                    break;
                                case "cancelled":
                                    N(n, t)
                            }
                        },
                        LEADERBOARD: function(e) {
                            S(e)
                        },
                        TRANSACTION: function(e) {
                            k(e), "PRIZE_DRAW" !== Z && "PROMOTION" !== Z || T(e)
                        },
                        LEADERBOARDAWARD: function(e) {
                            E(e)
                        },
                        RESULTEDAWARD: function(e) {
                            "TIMED_PRIZE_DRAW" === Z && O(e)
                        }
                    };
                return s(X), Object.freeze({
                    feed: c,
                    getState: R,
                    hasStarted: function() {
                        return B
                    },
                    isFinished: function() {
                        return "completing" === G || "completed" === G || "cancelled" === G
                    },
                    getCompetitionToken: function() {
                        return K
                    },
                    identify: t,
                    start: a,
                    setInGameRound: u,
                    setGameInProgress: l,
                    setRegistered: function(e) {
                        V = e
                    },
                    getRegistered: function() {
                        return V
                    },
                    sendPreActiveToWidget: g
                })
            }
            var n = e.bus,
                i = e.currency,
                r = e.logger,
                o = e.widgetsInterface;
            return {
                newInstance: t
            }
        }
    }), define("gameservice/competition/CompetitionFdController", ["require", "gameservice/competition/CompetitionStateController"], function(e) {
        "use strict";
        return function(t) {
            function n(e) {
                V = e
            }

            function i(e) {
                B ? (B = JSON.parse(JSON.stringify(B)), B = Object.assign(B, e)) : B = e
            }

            function r(e) {
                "Completed" !== e.competitionStatus && "Cancelled" !== e.competitionStatus || C(e.competitionToken)
            }

            function o(e) {
                var t = e.competitionToken;
                return t && !K[t] && (K[t] = L.newInstance(e)), K[t]
            }

            function s() {
                R.unsubscribe(W)
            }

            function a() {
                R.unsubscribe(U)
            }

            function c() {
                R.unsubscribe(M)
            }

            function u() {
                R.unsubscribe(H)
            }

            function l() {
                s(), _(), a(), c(), u()
            }

            function f() {
                d(), p(), h(), m()
            }

            function d() {
                R.hasSubscribedByTopic(W) || R.subscribe(W, function(e) {
                    if (e && e.body) {
                        D.debug("===> competition notification"), D.debug(e.body);
                        var t = JSON.parse(e.body),
                            n = {
                                player: B,
                                competitions: [t.payload.competitionWidgetInfo],
                                serverTime: t.serverTime
                            };
                        t.payload.competitionWidgetInfo = n;
                        var i = n.competitions[0],
                            r = i.competitionToken,
                            s = K[r];
                        s && s.identify(r) ? s.feed(t) : s || (s = o({
                            competitionToken: r,
                            status: i.status,
                            stopType: i.stopType
                        }), q && s.start(), s.feed(t)), s && s.getRegistered() && O(r)
                    }
                })
            }

            function p() {
                R.hasSubscribedByTopic(U) || R.subscribe(U, function(e) {
                    if (e && e.body) {
                        D.debug("===> competition optout notification: " + e.competitionId), D.debug(e.body);
                        var t = JSON.parse(e.body),
                            n = t.competitionId;
                        if (!n) return;
                        N.publish({
                            channel: "GameService",
                            topic: "Competition.OptedOut",
                            data: n
                        }), G.sendWidgetMessage({
                            messageType: "Competition.OptedOut",
                            messageData: {
                                status: "success",
                                optedOut: !0
                            },
                            messageExtraData: {
                                competitionId: n
                            }
                        }), C(n)
                    }
                })
            }

            function h() {
                R.hasSubscribedByTopic(M) || R.subscribe(M, function(e) {
                    if (e && e.body) {
                        D.debug("===> competition publish notification"), D.debug(e.body);
                        var t = JSON.parse(e.body);
                        if (t.payload && t.payload.competitionWidgetInfo) {
                            var n = t.payload.notifyType;
                            "PRE_ACTIVE" === n && (t.payload.competitionWidgetInfo.status = n), G.sendWidgetMessage({
                                messageType: "Competition.Published",
                                messageData: [v(t.payload.competitionWidgetInfo)]
                            })
                        }
                    }
                })
            }

            function m() {
                R.hasSubscribedByTopic(H) || R.subscribe(H, function(e) {
                    if (e && e.body) {
                        D.debug("===> competition player on leaderboard notification"), D.debug(e.body);
                        var t = JSON.parse(e.body);
                        G.sendWidgetMessage({
                            messageType: "Competition.PlayerOnLeaderboard",
                            messageData: t.playerOnLeaderboard,
                            messageExtraData: {
                                competitionId: t.competitionToken
                            }
                        })
                    }
                })
            }

            function g(e) {
                D.debug("=== > CompetitionFdController.initCompetition "), D.debug(JSON.stringify(e));
                var t = [];
                if (e && e.GSPWidget && (t = e.GSPWidget.competitions) && t.length > 0) {
                    var n = {},
                        i = {};
                    B && (B.buffer && (n = JSON.parse(JSON.stringify(B.buffer)).reduce(function(e, t) {
                        return e[t.cptToken] = t, delete t.cptToken, e
                    }, {})), i = ["uniqueId", "nickname", "nicknameAutoGen"].reduce(function(e, t) {
                        return t in B && (e[t] = B[t]), e
                    }, {})), e.GSPWidget.competitions.forEach(function(e) {
                        Object.assign(e, n[e.competitionToken])
                    }), e.GSPWidget.player = i, t.forEach(function(e) {
                        void 0 !== e.awardQuestAwardLimitation && delete e.awardQuestAwardLimitation
                    }), N.publish({
                        channel: "GameService",
                        topic: "Competition.Info",
                        data: Object.freeze(w(e.GSPWidget))
                    }), t.forEach(function(e) {
                        var t;
                        e.leaderBoard && (t = {
                            spinRemaining: e.leaderBoard.spinRemaining,
                            reBuyRemaining: e.leaderBoard.reBuyRemaining
                        });
                        var n = e.competitionToken,
                            i = K[n];
                        i || (i = o({
                            competitionToken: n,
                            status: e.status,
                            stopType: e.stopType,
                            leaderBoardDataByPlayer: t
                        })), i && z && i.setGameInProgress(z), "PUBLISHED" === e.status && i.sendPreActiveToWidget(), i.start(), e.registered && (i.setRegistered(!0), V ? x(n) : J.push(function() {
                            x(n)
                        }))
                    })
                }
                q = !0
            }

            function b(e) {
                e.formatterAward = F.formatFloat(parseFloat(e.award)), "FREESPIN" === e.category && e.additionalInfo && e.additionalInfo.offers && e.additionalInfo.offers.forEach(function(e) {
                    e.betAmount && (e.formatterBetAmount = F.formatFloat(parseFloat(e.betAmount)))
                })
            }

            function y(e) {
                e.forEach(function(e) {
                    !e.category || "CASH" !== e.category && "FREESPIN" !== e.category || b(e)
                })
            }

            function v(e) {
                var t = JSON.parse(JSON.stringify(e));
                return t.ruleGroupsDescription && (t.ruleGroupsDescription.forEach(function(e) {
                    if (e.rules && e.rules.CONDITION && e.rules.CONDITION[0] && e.rules.CONDITION[0].parameters) {
                        var t = e.rules.CONDITION[0].parameters;
                        Object.keys(t).forEach(function(e) {
                            ["amount", "winAmount", "loseAmount"].indexOf(e) > -1 && (t[e] = F.formatFloat(parseFloat(t[e])))
                        })
                    }
                }), t.ruleGroupsDescription.forEach(function(e) {
                    if (e.exclusiveAward) {
                        var t = e.exclusiveAward;
                        !t.category || "CASH" !== t.category && "FREESPIN" !== t.category || b(t)
                    }
                })), t.leaderBoard && (y(t.leaderBoard.levels), t.leaderBoard.hasOwnProperty("totalPrize") && (t.leaderBoard.totalPrize = F.formatFloat(parseFloat(t.leaderBoard.totalPrize)))), t.prizePool && y(t.prizePool.prizes), t.prizePools && t.prizePools.forEach(function(e) {
                    y(e.prizes)
                }), t
            }

            function w(e) {
                var t = JSON.parse(JSON.stringify(e));
                return t.competitions && t.competitions.forEach(function(e) {
                    e.ruleGroupsDescription && (e.ruleGroupsDescription.forEach(function(e) {
                        if (e.rules && e.rules.CONDITION && e.rules.CONDITION[0] && e.rules.CONDITION[0].parameters) {
                            var t = e.rules.CONDITION[0].parameters;
                            Object.keys(t).forEach(function(e) {
                                ["amount", "winAmount", "loseAmount"].indexOf(e) > -1 && (t[e] = F.formatFloat(parseFloat(t[e])))
                            })
                        }
                    }), e.ruleGroupsDescription.forEach(function(e) {
                        if (e.exclusiveAward) {
                            var t = e.exclusiveAward;
                            !t.category || "CASH" !== t.category && "FREESPIN" !== t.category || b(t)
                        }
                    })), e.leaderBoard && (y(e.leaderBoard.levels), e.leaderBoard.hasOwnProperty("totalPrize") && (e.leaderBoard.totalPrize = F.formatFloat(parseFloat(e.leaderBoard.totalPrize)))), e.prizePool && y(e.prizePool.prizes), e.prizePools && e.prizePools.forEach(function(e) {
                        y(e.prizes)
                    })
                }), t
            }

            function _() {
                Object.keys(Z).length > 0 && Object.values(Z).forEach(function(e) {
                    var t = e.subscriptions;
                    for (var n in t) Object.hasOwnProperty.call(t, n) && t[n].unsubscribe()
                }), K = {}, X = {}, Z = {}
            }

            function C(e) {
                if (Z[e]) {
                    var t = Z[e].subscriptions;
                    for (var n in t) Object.hasOwnProperty.call(t, n) && t[n].unsubscribe();
                    delete Z[e]
                }
                K[e] && delete K[e], X[e] && delete X[e]
            }

            function S() {
                Z = {}, X = {}
            }

            function E() {
                if (J)
                    for (; J.length > 0;) {
                        var e = J.shift();
                        e && "function" == typeof e && e.call()
                    }
            }

            function O(e) {
                var t = K[e];
                if (t && !Z[e]) {
                    X[e] = t, Z[e] = {}, Z[e].id = e, Z[e].subscriptions = {}, t.setRegistered(!0);
                    var n = ["/player/topic/notification/competition/rt/", e].join("");
                    Z[e].subscriptions[n] = R.subscribe(n, function(e) {
                        if (e && e.body) {
                            D.debug("===> competition runtime notification"), D.debug(e.body);
                            var n = JSON.parse(e.body),
                                i = {
                                    player: B,
                                    competitions: [n.payload.competitionWidgetInfo],
                                    serverTime: n.serverTime
                                };
                            n.payload.competitionWidgetInfo = i, t.feed(n)
                        }
                    });
                    var i = ["/topic/competition/", e].join("");
                    Z[e].subscriptions[i] = R.subscribe(i, function(e) {
                        var n = {};
                        e && e.body && (n = JSON.parse(e.body), D.debug("message received for all players: "), D.debug(n), t.feed(n))
                    });
                    [
                        ["/player/topic/competition/", e].join(""), ["/player/topic/competition/", e, "/", P.channel, "/", P.presenttype].join(""), ["/player/topic/competition/", e, "/timedPrizeDrawAward"].join("")
                    ].forEach(function(n) {
                        Z[e].subscriptions[n] = R.subscribe(n, function(e) {
                            var n = {};
                            e && e.body && (n = JSON.parse(e.body), D.debug("message received for this player: "), D.debug(n), t.feed(n))
                        })
                    })
                }
            }

            function x(e) {
                R.register("/gs/competition", function(t) {
                    D.debug("===> /gs/competition registered"), D.debug(JSON.stringify(t)), O(e)
                }, {
                    competitiontoken: e
                })
            }

            function I(e, t) {
                !z && e.competitionId && N.request({
                    channel: "GameService",
                    topic: "GameService.JoinCompetition",
                    data: {
                        competitionId: e.competitionId,
                        nickname: e.nickname
                    }
                }, function(e) {
                    if ("success" === e.status) {
                        var t = {
                            optedIn: !0,
                            status: "success",
                            nickname: e.nickname,
                            registrationId: e.registrationId,
                            newReBuyRegister: e.newReBuyRegister,
                            leaderBoardReBuyUsedNumber: e.leaderBoardReBuyUsedNumber
                        };
                        null !== e.nickname && i({
                            nickname: e.nickname
                        }), G.sendWidgetMessage({
                            messageType: "Competition.OptedIn",
                            messageData: t,
                            messageExtraData: {
                                competitionId: e.competitionId
                            }
                        }), K[e.competitionId].setRegistered(!0), x(e.competitionId)
                    }
                }, function(t) {
                    G.sendWidgetMessage({
                        messageType: "Competition.OptedIn",
                        messageData: Object.assign(t, {
                            optedIn: !1
                        }),
                        messageExtraData: {
                            competitionId: e.competitionId
                        }
                    })
                })
            }

            function k(e) {
                e && e.competitionId && N.request({
                    channel: "GameService",
                    topic: "GameService.OptOutCompetition",
                    data: {
                        competitionId: e.competitionId
                    }
                }, function(e) {
                    "success" === e.status && (G.sendWidgetMessage({
                        messageType: "Competition.OptedOut",
                        messageData: {
                            status: "success",
                            optedOut: !0
                        },
                        messageExtraData: {
                            competitionId: e.competitionId
                        }
                    }), C(e.competitionId))
                }, function(t) {
                    G.sendWidgetMessage({
                        messageType: "Competition.OptedOut",
                        messageData: Object.assign(t, {
                            optedOut: !1
                        }),
                        messageExtraData: {
                            competitionId: e.competitionId
                        }
                    })
                })
            }

            function T(e, t) {
                z = e, Object.keys(K).length > 0 && Object.values(K).forEach(function(e) {
                    e.setGameInProgress(z, t)
                })
            }

            function A(e) {}

            function j(e, t, n) {
                Object.keys(K).length > 0 && Object.values(K).forEach(function(i) {
                    i.setInGameRound(e, t, n)
                })
            }
            var N = t.bus,
                P = t.params,
                D = t.logger,
                F = t.currency,
                R = t.fdClient,
                B = t.playerInfo,
                G = t.widgetsInterface,
                L = e("gameservice/competition/CompetitionStateController")({
                    bus: N,
                    currency: F,
                    logger: D,
                    widgetsInterface: G
                }),
                W = ["/player/topic/notification/competition/", P.operator, "/", P.skincode, "/", P.channel, "/", P.presenttype, "/", P.softwareid, "/", P.currencycode].join(""),
                U = ["/player/topic/notification/competition/optout/", P.operator, "/", P.skincode, "/", P.channel, "/", P.presenttype, "/", P.softwareid, "/", P.currencycode].join(""),
                M = ["/player/topic/notification/hub/", P.operator, "/", P.skincode, "/", P.channel, "/", P.presenttype, "/", P.currencycode].join(""),
                H = ["/player/topic/notification/hub/leaderboard/", P.operator, "/", P.skincode, "/", P.channel, "/", P.presenttype, "/", P.currencycode].join(""),
                z = !1,
                J = [],
                V = t.fdConnected,
                q = !1,
                K = {},
                X = {},
                Z = {};
            return N.subscribe({
                channel: "GameService",
                topic: "Competition.OptIn",
                callback: I
            }), N.subscribe({
                channel: "GameService",
                topic: "Competition.OptOut",
                callback: k
            }), N.subscribe({
                channel: "GameService",
                topic: "Competition.Finished",
                callback: r
            }), Object.freeze({
                initCompetition: g,
                setGameInProgress: T,
                setGameInActive: A,
                setInGameRound: j,
                startOnCompetitionNotification: f,
                startListenOnCurrentCompetition: O,
                connectFDCallback: E,
                stopCompetitionListening: l,
                disconnectFDCallback: S,
                setFDConnected: n,
                setPlayerInfo: i
            })
        }
    }), define("gameservice/promospin/PromotionFreespinFdController", ["require"], function(e) {
        "use strict";
        return function(e) {
            function t() {
                c.unsubscribe(l)
            }

            function n() {
                c.hasSubscribedByTopic(l) || c.subscribe(l, function(e) {
                    if (e && e.body) {
                        a.debug("===> Promo Rounds notification"), a.debug(e.body);
                        var t = JSON.parse(e.body);
                        s.publish({
                            channel: "GameService",
                            topic: "GameService.PromotionFreespinMessage",
                            data: t.payload
                        })
                    }
                })
            }

            function i(e) {
                u = e, o && o.setGameInProgress(u)
            }

            function r(e, t) {
                o && o.setInGameRound(e, t)
            }
            var o, s = e.bus,
                a = (e.params, e.logger),
                c = (e.currency, e.fdClient),
                u = !1,
                l = ["/player/topic/promotionfreespin/"].join("");
            return Object.freeze({
                setGameInProgress: i,
                setInGameRound: r,
                startListenOnPromotionFreespin: n,
                stopOnPromotionFreespinNotification: t
            })
        }
    }), define("kernel/logger/Logger", [], function() {
        "use strict";

        function e(e) {
            console.log("initialising to level " + e.logLevel), e && e.hasOwnProperty("logLevel") && c(e.logLevel)
        }

        function t(e, t) {
            var n = Array.prototype.slice.call(t);
            return [e, "[" + (new Date).toISOString() + "]"].concat(n)
        }

        function n() {
            if (!(f < l.FATAL)) return p.error.apply(null, t("FATAL", arguments))
        }

        function i() {
            if (!(f < l.ERROR)) return p.error.apply(null, t("ERROR", arguments))
        }

        function r() {
            if (!(f < l.WARN)) return p.warn.apply(null, t("WARN", arguments))
        }

        function o() {
            if (!(f < l.INFO)) return p.info.apply(null, t("INFO", arguments))
        }

        function s() {
            if (!(f < l.DEBUG)) return p.debug.apply(null, t("DEBUG", arguments))
        }

        function a() {
            if (!(f < l.DEBUG)) return p.log.apply(null, t("LOG", arguments))
        }

        function c(e) {
            switch (l.hasOwnProperty(e) ? (f = l[e], d = e) : (f = l.FATAL, d = "FATAL"), console.log = h, console.debug = h, console.info = h, console.warn = h, console.error = h, d) {
                case "ALL":
                case "DEBUG":
                    console.log = p.log, console.debug = p.debug;
                case "INFO":
                    console.info = p.info;
                case "WARN":
                    console.warn = p.warn;
                case "ERROR":
                case "FATAL":
                    console.error = p.error
            }
        }

        function u() {
            return d
        }
        var l = {
                ALL: 10,
                DEBUG: 5,
                INFO: 4,
                WARN: 3,
                ERROR: 2,
                FATAL: 1,
                NONE: 0
            },
            f = l.FATAL,
            d = "FATAL",
            p = {
                log: console.log,
                debug: console.debug,
                info: console.info,
                warn: console.warn,
                error: console.error
            },
            h = function() {};
        return console.log = h, console.debug = h, console.info = h, console.warn = h, console.error = h,
            function() {
                return Object.freeze({
                    init: e,
                    setLevel: c,
                    getLevel: u,
                    debug: s,
                    error: i,
                    fatal: n,
                    info: o,
                    warn: r,
                    log: a
                })
            }()
    }), define("gameservice/widgets/WidgetInterface", ["require", "kernel/logger/Logger"], function(e) {
        "use strict";
        var t, n = e("kernel/logger/Logger");
        return function(e) {
            function i(e) {
                if (n.log("ISB", "messageToWidget", e), e && e.messageType) switch (e.messageType) {
                    case "reveal":
                        return p = !0, t.publish({
                            channel: "GameService",
                            topic: "Widgets.FromIXF",
                            data: e
                        }), t.publish({
                            channel: "GameService",
                            topic: "Widgets.FromIXF",
                            data: {
                                messageType: "mute",
                                messageData: !!b
                            }
                        }), void(h && Object.keys(w).length > 0 && (Object.values(w).forEach(function(e) {
                            n.log("ISB", "messageToWidget_buffer", e), t.publish({
                                channel: "GameService",
                                topic: "Widgets.FromIXF",
                                data: e
                            })
                        }), w = {}));
                    case "hide":
                        p = !1;
                        break;
                    case "gameStart":
                        g = !0;
                        break;
                    case "gameAborted":
                    case "gameEnd":
                        g = !1;
                        break;
                    case "mute":
                        b = e.messageData
                }
                t.publish({
                    channel: "GameService",
                    topic: "Widgets.FromIXF",
                    data: e
                })
            }

            function r(e) {
                if (e && e.messageType) {
                    switch (e.messageType) {
                        case "widgetsReady":
                            h || (p && Object.keys(w).length > 0 && (Object.values(w).forEach(function(e) {
                                n.log("ISB", "messageToWidget_buffer", e), t.publish({
                                    channel: "GameService",
                                    topic: "Widgets.FromIXF",
                                    data: e
                                })
                            }), w = {}), v && v.length > 0 && (v.forEach(function(e) {
                                e()
                            }), v = []), h = !0);
                            break;
                        case "Widget.PositionGame":
                            t.publish({
                                channel: "GameService",
                                topic: "Widget.PositionGame",
                                data: e.messageData
                            });
                            break;
                        case "notificationAction":
                            if (e.messageData && "PFS.Accept" === e.messageData.actionType) {
                                var r = [e.messageData.game, e.messageData.offer];
                                t.publish({
                                    channel: "GameService",
                                    topic: "PFS.Accept",
                                    data: r
                                })
                            }
                    }
                    if (h && p) switch (e.messageType) {
                        case "pauseGame":
                            e.hasOwnProperty("messageData") && (m = !!e.messageData), !m && y && (y(), y = void 0), m && !g && i({
                                messageType: "gamePaused",
                                messageData: !0
                            }), t.publish({
                                channel: "GameService",
                                topic: "Widget.PauseHost",
                                data: {
                                    widgetPauseRequested: m
                                }
                            });
                            break;
                        case "muteGame":
                            t.publish({
                                channel: "GameService",
                                topic: "Widget.MuteHost",
                                data: {
                                    muteHost: !!e.messageData
                                }
                            });
                            break;
                        case "loadGame":
                            if (e.messageData) {
                                var o = ["securetoken", "uniqueid", "nscode", "skincode"];
                                Object.keys(e.messageData).forEach(function(t) {
                                    o.indexOf(t.toLowerCase()) >= 0 && delete e.messageData[t]
                                })
                            }
                            t.publish({
                                channel: "GameService",
                                topic: "GameService.LaunchGame",
                                data: e.messageData
                            });
                            break;
                        case "Competition.OptIn":
                            t.publish({
                                channel: "GameService",
                                topic: "Competition.OptIn",
                                data: e.messageData
                            });
                            break;
                        case "Competition.OptOut":
                            t.publish({
                                channel: "GameService",
                                topic: "Competition.OptOut",
                                data: e.messageData
                            });
                            break;
                        case "Competition.RequestHistory":
                            t.publish({
                                channel: "GameService",
                                topic: "Competition.RequestHistory",
                                data: e.messageData
                            })
                    }
                }
            }

            function o(e) {
                y = e
            }

            function s() {
                return m
            }

            function a(e) {
                "function" == typeof e && v.push(e)
            }

            function c(e, t) {
                if (p && h) i(t);
                else if ("Competition.Info" === e && w["Competition.Info"]) {
                    var n = JSON.parse(JSON.stringify(t)),
                        r = JSON.parse(JSON.stringify(w["Competition.Info"].messageData.competitions)),
                        o = r.reduce(function(e, t, n) {
                            return e[t.competitionToken] = n, e
                        }, {});
                    n.messageData.competitions.forEach(function(e) {
                        void 0 !== o[e.competitionToken] ? r[o[e.competitionToken]] = e : r.push(e)
                    }), n.messageData.competitions = r, w[e] = n
                } else t.messageExtraData && t.messageExtraData.competitionId ? w[e + "." + t.messageExtraData.competitionId] = t : w[e] = t
            }

            function u(e) {
                c("PFS.Offer", {
                    messageType: "notification",
                    messageData: {
                        notificationType: "PFS.Offer",
                        notificationData: e
                    }
                })
            }

            function l(e) {
                c("PFS.Update", {
                    messageType: "notification",
                    messageData: {
                        notificationType: "PFS.Update",
                        notificationData: {
                            pfsCount: e
                        }
                    }
                })
            }

            function f(e) {
                c("PFS.Update", {
                    messageType: "notification",
                    messageData: {
                        notificationType: "PFS.Update",
                        notificationData: {
                            pfsValue: e.number,
                            pfsBalance: e.currency
                        }
                    }
                })
            }

            function d(e) {
                if (e && e.competitions && (!Array.isArray(e.competitions) || 0 !== e.competitions.length)) {
                    c("Competition.Info", {
                        messageType: "Competition.Info",
                        messageData: e
                    })
                }
            }
            t = e.bus, n.log("ISB", "Initialising gameservice/WidgetInterface.  Config:", e);
            var p, h, m, g, b, y, v = [],
                w = {};
            return t.subscribe({
                channel: "ConsoleService",
                topic: "PFS.Offer",
                callback: u
            }), t.subscribe({
                channel: "ConsoleService",
                topic: "PFS.Count",
                callback: l
            }), t.subscribe({
                channel: "ConsoleService",
                topic: "PFS.Balance",
                callback: f
            }), t.subscribe({
                channel: "GameService",
                topic: "Competition.Info",
                callback: d
            }), t.subscribe({
                channel: "GameService",
                topic: "Widgets.ToIXF",
                callback: r
            }), t.subscribe({
                channel: "GameService",
                topic: "IXF.ToWidgets",
                callback: function(e) {
                    c(e.messageType, e)
                }
            }), t.subscribe({
                channel: "ConsoleService",
                topic: "Global.Mute",
                callback: function(e) {
                    c("mute", {
                        messageType: "mute",
                        messageData: !!e.mute
                    })
                }
            }), t.subscribe({
                channel: "ClientService",
                topic: "ClientService.PromoExclude",
                callback: function(e) {
                    c("Promo.Exclude", {
                        messageType: "Promo.Exclude",
                        messageData: e
                    })
                }
            }), t.subscribe({
                channel: "ClientService",
                topic: "Competition.Published",
                callback: function(e) {
                    c("Competition.Published", {
                        messageType: "Competition.Published",
                        messageData: e
                    })
                }
            }), {
                sendWidgetMessage: i,
                setUnpauseGame: o,
                ifPauseRequested: s,
                setReadyHooks: a,
                bufferOrSendToWidget: c
            }
        }
    }), define("gameservice/controller/GameServiceController", ["require", "gameservice/flightdeck/FlightdeckClient", "gameservice/competition/CompetitionFdController", "gameservice/promospin/PromotionFreespinFdController", "gameservice/widgets/WidgetInterface"], function(e) {
        "use strict";

        function t(e, t) {
            C = e.bus, S = e.logger, E = e.currency, S.log("ISB", "GameServiceController init", "config", e), m({
                bus: C
            }), C.subscribe({
                channel: "Kernel",
                topic: "System.InternalInit",
                callback: y
            }), C.subscribe({
                channel: "Kernel",
                topic: "System.Ready",
                callback: function() {
                    B = !0, v()
                }
            }), C.subscribe({
                channel: "GameService",
                topic: "GameService.GameInActive",
                callback: o
            }), C.subscribe({
                channel: "GameService",
                topic: "GameService.wagerIsStarting",
                callback: n
            }), C.subscribe({
                channel: "GameService",
                topic: "GameService.wagerIsComplete",
                callback: n
            }), C.subscribe({
                channel: "GameService",
                topic: "GameService.wagerIsAborted",
                callback: n
            }), t()
        }

        function n(e) {
            e && ("boolean" == typeof e.inRound && c(e.inRound), "boolean" == typeof e.inGIP && r(e.inGIP))
        }

        function i(e) {
            L = [], O && O.stopCompetitionListening(), x && x.stopOnPromotionFreespinNotification(), e()
        }

        function r(e, t) {
            z = !!e, O && O.setGameInProgress(z, t)
        }

        function o(e) {
            J = !!e, J && (T && clearTimeout(T), T = setTimeout(function() {
                o(!1)
            }, q)), setTimeout(function() {
                !J && P && p()
            }, 0)
        }

        function s() {
            U || (C.publish({
                channel: "GameService",
                topic: "ErrorHandler.Throw",
                data: {
                    errorCode: "GS-011",
                    priority: 0
                }
            }), S.log("Flightdeck reconnect successful."), U = !0), v()
        }

        function a() {
            if (J && !P && !D) {
                for (; M.length > 0;) L.push(M.shift());
                d(s, a, a, !0)
            }
        }

        function c(e, t, n) {
            V = !!e, O && O.setInGameRound(V, t, n)
        }

        function u(t) {
            if (!O) {
                var n = {
                    operator: j.serverConfig.nscode,
                    skincode: j.serverConfig.skincode,
                    softwareid: j.serverConfig.softwareid,
                    uniqueid: j.serverConfig.uniqueid,
                    channel: j.serverConfig.channel,
                    presenttype: j.serverConfig.presenttype,
                    currencycode: j.serverConfig.paramRGS.currencycode,
                    language: j.serverConfig.paramRGS.language
                };
                O = e("gameservice/competition/CompetitionFdController")({
                    fdClient: H,
                    params: n,
                    bus: C,
                    logger: S,
                    currency: E,
                    playerInfo: t,
                    widgetsInterface: I,
                    fdConnected: P
                })
            }
            F && O.startOnCompetitionNotification();
            L.initcompetition || L.push({
                name: "initcompetition",
                callback: function() {
                    O.startOnCompetitionNotification()
                }
            })
        }

        function l(e, t) {
            k = e;
            var n = e.GSPWidget.player ? JSON.parse(JSON.stringify(e.GSPWidget.player)) : {
                nickname: null
            };
            O.setPlayerInfo(n), v()
        }

        function f() {
            var t = {
                operator: j.serverConfig.nscode,
                skincode: j.serverConfig.skincode,
                softwareid: j.serverConfig.softwareid,
                uniqueid: j.serverConfig.uniqueid,
                channel: j.serverConfig.channel,
                presenttype: j.serverConfig.presenttype,
                currencycode: j.serverConfig.paramRGS.currencycode
            };
            x = e("gameservice/promospin/PromotionFreespinFdController")({
                fdClient: H,
                params: t,
                bus: C,
                logger: S,
                currency: E
            }), F && x.startListenOnPromotionFreespin();
            L.initpromotionspin || L.push({
                name: "initpromotionspin",
                callback: function() {
                    x.startListenOnPromotionFreespin()
                }
            })
        }

        function d(e, t, n, i) {
            P || D || (D = !0, H.connect({
                endpoint: N.endpoint,
                headers: {
                    uniqueid: j.serverConfig.uniqueid,
                    securetoken: j.serverConfig.securetoken,
                    currencycode: j.serverConfig.paramRGS.currencycode,
                    softwareid: j.serverConfig.softwareid,
                    skincode: j.serverConfig.skincode,
                    operator: j.serverConfig.nscode,
                    presenttype: j.serverConfig.presenttype,
                    countrycode: j.serverConfig.countrycode,
                    language: j.serverConfig.paramRGS.language,
                    channel: j.serverConfig.channel
                },
                user: N.user
            }, function(t) {
                P = !0, D = !1, O && (O.setFDConnected(P), O.connectFDCallback()), h(i), e && e()
            }, function() {
                t && t()
            }, function() {
                n && n()
            }, function(e) {
                S.log("Disconnect close event code:", e), 1002 !== e || W || (C.publish({
                    channel: "GameService",
                    topic: "ErrorHandler.Throw",
                    data: {
                        errorCode: "GS-010",
                        priority: 0
                    }
                }), S.log("Disconnect close event code is 1002,so throw an exception."), W = !0), p()
            }))
        }

        function p() {
            P && (O && O.disconnectFDCallback(), H.disconnect(), F = !1), P = !1, D = !1, S.log("Flightdeck is disconnected."), O && O.setFDConnected(P)
        }

        function h(e) {
            H.registerNotification({}, function(t) {
                S.debug("register gs notification success"), S.debug(t.body);
                var n = JSON.parse(t.body);
                if (F = !0, L)
                    for (; L.length > 0;) {
                        var i = L.shift();
                        M.push(i);
                        var r = i.callback;
                        r && "function" == typeof r && r.call()
                    }
                e && n.blacklist && n.blacklist.forEach(function(e) {
                    O.startListenOnCurrentCompetition(e)
                })
            }, function() {
                S.debug("==== register gs notification fail =="), F = !1
            })
        }

        function m(t) {
            I = e("gameservice/widgets/WidgetInterface")(t), I.setReadyHooks(function() {
                G = !0, v()
            }), S.log("ISB", "initWidgets", t)
        }

        function g() {
            return I
        }

        function b() {
            A = j.gameServiceConfig, N = {
                endpoint: A.flightdeck.url,
                user: {
                    id: j.serverConfig.skincode + "_" + j.serverConfig.uniqueid
                }
            }, d(function() {
                S.debug("flightdeck connected"), v()
            }, function() {
                S.warn("flightdeck connect failed"), a()
            }, function() {
                S.warn("flightdeck connect closed"), a()
            })
        }

        function y(e, t) {
            j = e, C.subscribe({
                channel: "ClientService",
                topic: "ServerSessionReady",
                callback: b
            }), C.subscribe({
                channel: "ClientService",
                topic: "GameService.PFSNotificationInit",
                callback: f
            }), C.subscribe({
                channel: "ClientService",
                topic: "GameService.CPTNotificationInit",
                callback: u
            }), C.subscribe({
                channel: "ClientService",
                topic: "GameService.CompetitionInit",
                callback: l
            }), C.publish({
                channel: "GameService",
                topic: "GameService.InitDone",
                data: {}
            })
        }

        function v() {
            O && k && B && G && (k.GSPWidget.competition && (R = !0), O.initCompetition(k), k = null)
        }

        function w() {
            return R
        }

        function _() {
            return S.log("FD:connected status :", P), P
        }
        var C, S, E, O, x, I, k, T, A = {},
            j = {},
            N = {},
            P = !1,
            D = !1,
            F = !1,
            R = !1,
            B = !1,
            G = !1,
            L = [],
            W = !1,
            U = !1,
            M = [],
            H = e("gameservice/flightdeck/FlightdeckClient"),
            z = !1,
            J = !1,
            V = !1,
            q = 12e5;
        return window.addEventListener("beforeunload", function() {
            H.wsClientDisconnect()
        }), window.addEventListener("unload", function() {
            H.wsClientDisconnect()
        }), Object.freeze({
            init: t,
            reInit: i,
            setGameInProgress: r,
            setGameInActive: o,
            setInGameRound: c,
            isCompetitionActive: w,
            reconnectFlightdeck: a,
            widgets: g,
            isFDConnected: _
        })
    }), define("gameservice/main", ["require", "gameservice/controller/GameServiceController"], function(e) {
        "use strict";
        var t = e("gameservice/controller/GameServiceController");
        return function() {
            function e(e, s) {
                i = e.bus(), r = e.logger, o = e.currency, i.publish({
                    channel: "Kernel",
                    topic: "LoadProgress",
                    data: {
                        id: "gameservice",
                        items: "10",
                        current: "1",
                        complete: !1
                    }
                }), t.init({
                    bus: i,
                    logger: r,
                    currency: o
                }, function() {
                    n(s)
                })
            }

            function n(e) {
                i.publish({
                    channel: "Kernel",
                    topic: "LoadProgress",
                    data: {
                        id: "gameservice",
                        items: "10",
                        current: "10",
                        complete: !0
                    }
                }), e()
            }
            var i, r, o;
            return Object.freeze({
                load: e,
                controller: Object.freeze({
                    setGameInProgress: t.setGameInProgress,
                    setGameInActive: t.setGameInActive,
                    setInGameRound: t.setInGameRound,
                    isGamePaused: t.isGamePaused,
                    setUnPauseGame: t.setUnPauseGame,
                    reInit: t.reInit,
                    isCompetitionActive: t.isCompetitionActive,
                    reconnectFlightdeck: t.reconnectFlightdeck,
                    widgets: t.widgets,
                    isFDConnected: t.isFDConnected
                })
            })
        }
    });
//# sourceMappingURL=gameservice.js.map