@voicenter-team/events-sdk 0.0.56 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/voicenter-events-sdk.cjs.js +8 -8
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +10 -11
- package/dist/voicenter-events-sdk.es.js +769 -769
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +8 -8
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +8 -8
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +59 -59
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var H = (t, e, r) => (
|
|
4
|
-
function
|
|
1
|
+
var Er = Object.defineProperty;
|
|
2
|
+
var Ar = (t, e, r) => e in t ? Er(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var H = (t, e, r) => (Ar(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
function Tr(t) {
|
|
5
5
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var Ve = { exports: {} }, $e = { exports: {} };
|
|
8
8
|
(function() {
|
|
9
9
|
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = {
|
|
10
10
|
// Bit-wise rotation left
|
|
@@ -68,18 +68,18 @@ var Je = { exports: {} }, Ve = { exports: {} };
|
|
|
68
68
|
return n;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
$e.exports = e;
|
|
72
72
|
})();
|
|
73
|
-
var
|
|
73
|
+
var Nr = $e.exports, he = {
|
|
74
74
|
// UTF-8 encoding
|
|
75
75
|
utf8: {
|
|
76
76
|
// Convert a string to a byte array
|
|
77
77
|
stringToBytes: function(t) {
|
|
78
|
-
return
|
|
78
|
+
return he.bin.stringToBytes(unescape(encodeURIComponent(t)));
|
|
79
79
|
},
|
|
80
80
|
// Convert a byte array to a string
|
|
81
81
|
bytesToString: function(t) {
|
|
82
|
-
return decodeURIComponent(escape(
|
|
82
|
+
return decodeURIComponent(escape(he.bin.bytesToString(t)));
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
// Binary encoding
|
|
@@ -97,31 +97,31 @@ var Tr = Ve.exports, ce = {
|
|
|
97
97
|
return e.join("");
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, _e = he;
|
|
101
101
|
/*!
|
|
102
102
|
* Determine if an object is a Buffer
|
|
103
103
|
*
|
|
104
104
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
105
105
|
* @license MIT
|
|
106
106
|
*/
|
|
107
|
-
var
|
|
108
|
-
return t != null && (
|
|
107
|
+
var Or = function(t) {
|
|
108
|
+
return t != null && (Ge(t) || xr(t) || !!t._isBuffer);
|
|
109
109
|
};
|
|
110
|
-
function
|
|
110
|
+
function Ge(t) {
|
|
111
111
|
return !!t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t);
|
|
112
112
|
}
|
|
113
113
|
function xr(t) {
|
|
114
|
-
return typeof t.readFloatLE == "function" && typeof t.slice == "function" &&
|
|
114
|
+
return typeof t.readFloatLE == "function" && typeof t.slice == "function" && Ge(t.slice(0, 0));
|
|
115
115
|
}
|
|
116
116
|
(function() {
|
|
117
|
-
var t =
|
|
117
|
+
var t = Nr, e = _e.utf8, r = Or, n = _e.bin, o = function(i, u) {
|
|
118
118
|
i.constructor == String ? u && u.encoding === "binary" ? i = n.stringToBytes(i) : i = e.stringToBytes(i) : r(i) ? i = Array.prototype.slice.call(i, 0) : !Array.isArray(i) && i.constructor !== Uint8Array && (i = i.toString());
|
|
119
119
|
for (var h = t.bytesToWords(i), d = i.length * 8, c = 1732584193, l = -271733879, p = -1732584194, a = 271733878, s = 0; s < h.length; s++)
|
|
120
120
|
h[s] = (h[s] << 8 | h[s] >>> 24) & 16711935 | (h[s] << 24 | h[s] >>> 8) & 4278255360;
|
|
121
121
|
h[d >>> 5] |= 128 << d % 32, h[(d + 64 >>> 9 << 4) + 14] = d;
|
|
122
|
-
for (var f = o._ff, y = o._gg, g = o._hh,
|
|
123
|
-
var B = c, _ = l,
|
|
124
|
-
c = f(c, l, p, a, h[s + 0], 7, -680876936), a = f(a, c, l, p, h[s + 1], 12, -389564586), p = f(p, a, c, l, h[s + 2], 17, 606105819), l = f(l, p, a, c, h[s + 3], 22, -1044525330), c = f(c, l, p, a, h[s + 4], 7, -176418897), a = f(a, c, l, p, h[s + 5], 12, 1200080426), p = f(p, a, c, l, h[s + 6], 17, -1473231341), l = f(l, p, a, c, h[s + 7], 22, -45705983), c = f(c, l, p, a, h[s + 8], 7, 1770035416), a = f(a, c, l, p, h[s + 9], 12, -1958414417), p = f(p, a, c, l, h[s + 10], 17, -42063), l = f(l, p, a, c, h[s + 11], 22, -1990404162), c = f(c, l, p, a, h[s + 12], 7, 1804603682), a = f(a, c, l, p, h[s + 13], 12, -40341101), p = f(p, a, c, l, h[s + 14], 17, -1502002290), l = f(l, p, a, c, h[s + 15], 22, 1236535329), c = y(c, l, p, a, h[s + 1], 5, -165796510), a = y(a, c, l, p, h[s + 6], 9, -1069501632), p = y(p, a, c, l, h[s + 11], 14, 643717713), l = y(l, p, a, c, h[s + 0], 20, -373897302), c = y(c, l, p, a, h[s + 5], 5, -701558691), a = y(a, c, l, p, h[s + 10], 9, 38016083), p = y(p, a, c, l, h[s + 15], 14, -660478335), l = y(l, p, a, c, h[s + 4], 20, -405537848), c = y(c, l, p, a, h[s + 9], 5, 568446438), a = y(a, c, l, p, h[s + 14], 9, -1019803690), p = y(p, a, c, l, h[s + 3], 14, -187363961), l = y(l, p, a, c, h[s + 8], 20, 1163531501), c = y(c, l, p, a, h[s + 13], 5, -1444681467), a = y(a, c, l, p, h[s + 2], 9, -51403784), p = y(p, a, c, l, h[s + 7], 14, 1735328473), l = y(l, p, a, c, h[s + 12], 20, -1926607734), c = g(c, l, p, a, h[s + 5], 4, -378558), a = g(a, c, l, p, h[s + 8], 11, -2022574463), p = g(p, a, c, l, h[s + 11], 16, 1839030562), l = g(l, p, a, c, h[s + 14], 23, -35309556), c = g(c, l, p, a, h[s + 1], 4, -1530992060), a = g(a, c, l, p, h[s + 4], 11, 1272893353), p = g(p, a, c, l, h[s + 7], 16, -155497632), l = g(l, p, a, c, h[s + 10], 23, -1094730640), c = g(c, l, p, a, h[s + 13], 4, 681279174), a = g(a, c, l, p, h[s + 0], 11, -358537222), p = g(p, a, c, l, h[s + 3], 16, -722521979), l = g(l, p, a, c, h[s + 6], 23, 76029189), c = g(c, l, p, a, h[s + 9], 4, -640364487), a = g(a, c, l, p, h[s + 12], 11, -421815835), p = g(p, a, c, l, h[s + 15], 16, 530742520), l = g(l, p, a, c, h[s + 2], 23, -995338651), c =
|
|
122
|
+
for (var f = o._ff, y = o._gg, g = o._hh, w = o._ii, s = 0; s < h.length; s += 16) {
|
|
123
|
+
var B = c, _ = l, k = p, S = a;
|
|
124
|
+
c = f(c, l, p, a, h[s + 0], 7, -680876936), a = f(a, c, l, p, h[s + 1], 12, -389564586), p = f(p, a, c, l, h[s + 2], 17, 606105819), l = f(l, p, a, c, h[s + 3], 22, -1044525330), c = f(c, l, p, a, h[s + 4], 7, -176418897), a = f(a, c, l, p, h[s + 5], 12, 1200080426), p = f(p, a, c, l, h[s + 6], 17, -1473231341), l = f(l, p, a, c, h[s + 7], 22, -45705983), c = f(c, l, p, a, h[s + 8], 7, 1770035416), a = f(a, c, l, p, h[s + 9], 12, -1958414417), p = f(p, a, c, l, h[s + 10], 17, -42063), l = f(l, p, a, c, h[s + 11], 22, -1990404162), c = f(c, l, p, a, h[s + 12], 7, 1804603682), a = f(a, c, l, p, h[s + 13], 12, -40341101), p = f(p, a, c, l, h[s + 14], 17, -1502002290), l = f(l, p, a, c, h[s + 15], 22, 1236535329), c = y(c, l, p, a, h[s + 1], 5, -165796510), a = y(a, c, l, p, h[s + 6], 9, -1069501632), p = y(p, a, c, l, h[s + 11], 14, 643717713), l = y(l, p, a, c, h[s + 0], 20, -373897302), c = y(c, l, p, a, h[s + 5], 5, -701558691), a = y(a, c, l, p, h[s + 10], 9, 38016083), p = y(p, a, c, l, h[s + 15], 14, -660478335), l = y(l, p, a, c, h[s + 4], 20, -405537848), c = y(c, l, p, a, h[s + 9], 5, 568446438), a = y(a, c, l, p, h[s + 14], 9, -1019803690), p = y(p, a, c, l, h[s + 3], 14, -187363961), l = y(l, p, a, c, h[s + 8], 20, 1163531501), c = y(c, l, p, a, h[s + 13], 5, -1444681467), a = y(a, c, l, p, h[s + 2], 9, -51403784), p = y(p, a, c, l, h[s + 7], 14, 1735328473), l = y(l, p, a, c, h[s + 12], 20, -1926607734), c = g(c, l, p, a, h[s + 5], 4, -378558), a = g(a, c, l, p, h[s + 8], 11, -2022574463), p = g(p, a, c, l, h[s + 11], 16, 1839030562), l = g(l, p, a, c, h[s + 14], 23, -35309556), c = g(c, l, p, a, h[s + 1], 4, -1530992060), a = g(a, c, l, p, h[s + 4], 11, 1272893353), p = g(p, a, c, l, h[s + 7], 16, -155497632), l = g(l, p, a, c, h[s + 10], 23, -1094730640), c = g(c, l, p, a, h[s + 13], 4, 681279174), a = g(a, c, l, p, h[s + 0], 11, -358537222), p = g(p, a, c, l, h[s + 3], 16, -722521979), l = g(l, p, a, c, h[s + 6], 23, 76029189), c = g(c, l, p, a, h[s + 9], 4, -640364487), a = g(a, c, l, p, h[s + 12], 11, -421815835), p = g(p, a, c, l, h[s + 15], 16, 530742520), l = g(l, p, a, c, h[s + 2], 23, -995338651), c = w(c, l, p, a, h[s + 0], 6, -198630844), a = w(a, c, l, p, h[s + 7], 10, 1126891415), p = w(p, a, c, l, h[s + 14], 15, -1416354905), l = w(l, p, a, c, h[s + 5], 21, -57434055), c = w(c, l, p, a, h[s + 12], 6, 1700485571), a = w(a, c, l, p, h[s + 3], 10, -1894986606), p = w(p, a, c, l, h[s + 10], 15, -1051523), l = w(l, p, a, c, h[s + 1], 21, -2054922799), c = w(c, l, p, a, h[s + 8], 6, 1873313359), a = w(a, c, l, p, h[s + 15], 10, -30611744), p = w(p, a, c, l, h[s + 6], 15, -1560198380), l = w(l, p, a, c, h[s + 13], 21, 1309151649), c = w(c, l, p, a, h[s + 4], 6, -145523070), a = w(a, c, l, p, h[s + 11], 10, -1120210379), p = w(p, a, c, l, h[s + 2], 15, 718787259), l = w(l, p, a, c, h[s + 9], 21, -343485551), c = c + B >>> 0, l = l + _ >>> 0, p = p + k >>> 0, a = a + S >>> 0;
|
|
125
125
|
}
|
|
126
126
|
return t.endian([c, l, p, a]);
|
|
127
127
|
};
|
|
@@ -137,24 +137,24 @@ function xr(t) {
|
|
|
137
137
|
}, o._ii = function(i, u, h, d, c, l, p) {
|
|
138
138
|
var a = i + (h ^ (u | ~d)) + (c >>> 0) + p;
|
|
139
139
|
return (a << l | a >>> 32 - l) + u;
|
|
140
|
-
}, o._blocksize = 16, o._digestsize = 16,
|
|
140
|
+
}, o._blocksize = 16, o._digestsize = 16, Ve.exports = function(i, u) {
|
|
141
141
|
if (i == null)
|
|
142
142
|
throw new Error("Illegal argument " + i);
|
|
143
143
|
var h = t.wordsToBytes(o(i, u));
|
|
144
144
|
return u && u.asBytes ? h : u && u.asString ? n.bytesToString(h) : t.bytesToHex(h);
|
|
145
145
|
};
|
|
146
146
|
})();
|
|
147
|
-
var
|
|
148
|
-
const
|
|
149
|
-
var
|
|
150
|
-
class
|
|
147
|
+
var Rr = Ve.exports;
|
|
148
|
+
const Ir = /* @__PURE__ */ Tr(Rr);
|
|
149
|
+
var vt = /* @__PURE__ */ ((t) => (t.MAIN = "main", t.NEXT = "next", t))(vt || {}), it = /* @__PURE__ */ ((t) => (t.USER = "User", t.TOKEN = "Token", t))(it || {});
|
|
150
|
+
class It {
|
|
151
151
|
static async getSessionStorageDataByKey(e, r = !0) {
|
|
152
152
|
if (typeof chrome < "u" && typeof chrome.storage < "u") {
|
|
153
153
|
const n = await chrome.storage.session.get(e);
|
|
154
154
|
if (n[e])
|
|
155
155
|
return r ? JSON.parse(n[e]) : n[e];
|
|
156
156
|
}
|
|
157
|
-
if (typeof window < "u"
|
|
157
|
+
if (typeof window < "u") {
|
|
158
158
|
const n = window.sessionStorage.getItem(e);
|
|
159
159
|
if (n)
|
|
160
160
|
return r ? JSON.parse(n) : n;
|
|
@@ -163,17 +163,17 @@ class Rt {
|
|
|
163
163
|
static async updateSessionStorageKey(e, r) {
|
|
164
164
|
typeof chrome < "u" && typeof chrome.storage < "u" && await chrome.storage.session.set({
|
|
165
165
|
[e]: JSON.stringify(r)
|
|
166
|
-
}), typeof window < "u" &&
|
|
166
|
+
}), typeof window < "u" && window.sessionStorage.setItem(e, JSON.stringify(r));
|
|
167
167
|
}
|
|
168
168
|
static clearSessionStorage() {
|
|
169
|
-
typeof chrome < "u" && typeof chrome.storage < "u" && chrome.storage.session.clear(), typeof window < "u" &&
|
|
169
|
+
typeof chrome < "u" && typeof chrome.storage < "u" && chrome.storage.session.clear(), typeof window < "u" && window.sessionStorage.clear();
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
var
|
|
173
|
-
function
|
|
172
|
+
var Br = Object.defineProperty, _r = (t, e, r) => e in t ? Br(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, V = (t, e, r) => (_r(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
173
|
+
function Lr(t) {
|
|
174
174
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Ur(t) {
|
|
177
177
|
if (t.__esModule)
|
|
178
178
|
return t;
|
|
179
179
|
var e = t.default;
|
|
@@ -194,7 +194,7 @@ function Lr(t) {
|
|
|
194
194
|
});
|
|
195
195
|
}), r;
|
|
196
196
|
}
|
|
197
|
-
var
|
|
197
|
+
var pe = { exports: {} }, Dr = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, Pr = [
|
|
198
198
|
"source",
|
|
199
199
|
"protocol",
|
|
200
200
|
"authority",
|
|
@@ -209,35 +209,35 @@ var he = { exports: {} }, Ur = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/
|
|
|
209
209
|
"file",
|
|
210
210
|
"query",
|
|
211
211
|
"anchor"
|
|
212
|
-
],
|
|
212
|
+
], Ye = function(t) {
|
|
213
213
|
var e = t, r = t.indexOf("["), n = t.indexOf("]");
|
|
214
214
|
r != -1 && n != -1 && (t = t.substring(0, r) + t.substring(r, n).replace(/:/g, ";") + t.substring(n, t.length));
|
|
215
|
-
for (var o =
|
|
216
|
-
i[
|
|
217
|
-
return r != -1 && n != -1 && (i.source = e, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames =
|
|
215
|
+
for (var o = Dr.exec(t || ""), i = {}, u = 14; u--; )
|
|
216
|
+
i[Pr[u]] = o[u] || "";
|
|
217
|
+
return r != -1 && n != -1 && (i.source = e, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames = Fr(i, i.path), i.queryKey = jr(i, i.query), i;
|
|
218
218
|
};
|
|
219
|
-
function
|
|
219
|
+
function Fr(t, e) {
|
|
220
220
|
var r = /\/{2,9}/g, n = e.replace(r, "/").split("/");
|
|
221
221
|
return (e.substr(0, 1) == "/" || e.length === 0) && n.splice(0, 1), e.substr(e.length - 1, 1) == "/" && n.splice(n.length - 1, 1), n;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function jr(t, e) {
|
|
224
224
|
var r = {};
|
|
225
225
|
return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(n, o, i) {
|
|
226
226
|
o && (r[o] = i);
|
|
227
227
|
}), r;
|
|
228
228
|
}
|
|
229
|
-
var
|
|
229
|
+
var ue = { exports: {} }, le = { exports: {} }, Bt = 1e3, _t = Bt * 60, Lt = _t * 60, Ut = Lt * 24, Mr = Ut * 365.25, qr = function(t, e) {
|
|
230
230
|
e = e || {};
|
|
231
231
|
var r = typeof t;
|
|
232
232
|
if (r === "string" && t.length > 0)
|
|
233
|
-
return
|
|
233
|
+
return zr(t);
|
|
234
234
|
if (r === "number" && isNaN(t) === !1)
|
|
235
|
-
return e.long ?
|
|
235
|
+
return e.long ? Wr(t) : Xr(t);
|
|
236
236
|
throw new Error(
|
|
237
237
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(t)
|
|
238
238
|
);
|
|
239
239
|
};
|
|
240
|
-
function
|
|
240
|
+
function zr(t) {
|
|
241
241
|
if (t = String(t), !(t.length > 100)) {
|
|
242
242
|
var e = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
|
|
243
243
|
t
|
|
@@ -250,29 +250,29 @@ function qr(t) {
|
|
|
250
250
|
case "yrs":
|
|
251
251
|
case "yr":
|
|
252
252
|
case "y":
|
|
253
|
-
return r *
|
|
253
|
+
return r * Mr;
|
|
254
254
|
case "days":
|
|
255
255
|
case "day":
|
|
256
256
|
case "d":
|
|
257
|
-
return r *
|
|
257
|
+
return r * Ut;
|
|
258
258
|
case "hours":
|
|
259
259
|
case "hour":
|
|
260
260
|
case "hrs":
|
|
261
261
|
case "hr":
|
|
262
262
|
case "h":
|
|
263
|
-
return r *
|
|
263
|
+
return r * Lt;
|
|
264
264
|
case "minutes":
|
|
265
265
|
case "minute":
|
|
266
266
|
case "mins":
|
|
267
267
|
case "min":
|
|
268
268
|
case "m":
|
|
269
|
-
return r *
|
|
269
|
+
return r * _t;
|
|
270
270
|
case "seconds":
|
|
271
271
|
case "second":
|
|
272
272
|
case "secs":
|
|
273
273
|
case "sec":
|
|
274
274
|
case "s":
|
|
275
|
-
return r *
|
|
275
|
+
return r * Bt;
|
|
276
276
|
case "milliseconds":
|
|
277
277
|
case "millisecond":
|
|
278
278
|
case "msecs":
|
|
@@ -285,18 +285,18 @@ function qr(t) {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
function zr(t) {
|
|
289
|
-
return t >= Lt ? Math.round(t / Lt) + "d" : t >= _t ? Math.round(t / _t) + "h" : t >= Bt ? Math.round(t / Bt) + "m" : t >= It ? Math.round(t / It) + "s" : t + "ms";
|
|
290
|
-
}
|
|
291
288
|
function Xr(t) {
|
|
292
|
-
return
|
|
289
|
+
return t >= Ut ? Math.round(t / Ut) + "d" : t >= Lt ? Math.round(t / Lt) + "h" : t >= _t ? Math.round(t / _t) + "m" : t >= Bt ? Math.round(t / Bt) + "s" : t + "ms";
|
|
290
|
+
}
|
|
291
|
+
function Wr(t) {
|
|
292
|
+
return Pt(t, Ut, "day") || Pt(t, Lt, "hour") || Pt(t, _t, "minute") || Pt(t, Bt, "second") || t + " ms";
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Pt(t, e, r) {
|
|
295
295
|
if (!(t < e))
|
|
296
296
|
return t < e * 1.5 ? Math.floor(t / e) + " " + r : Math.ceil(t / e) + " " + r + "s";
|
|
297
297
|
}
|
|
298
298
|
(function(t, e) {
|
|
299
|
-
e = t.exports = n.debug = n.default = n, e.coerce = d, e.disable = u, e.enable = i, e.enabled = h, e.humanize =
|
|
299
|
+
e = t.exports = n.debug = n.default = n, e.coerce = d, e.disable = u, e.enable = i, e.enabled = h, e.humanize = qr, e.instances = [], e.names = [], e.skips = [], e.formatters = {};
|
|
300
300
|
function r(c) {
|
|
301
301
|
var l = 0, p;
|
|
302
302
|
for (p in c)
|
|
@@ -312,15 +312,15 @@ function Dt(t, e, r) {
|
|
|
312
312
|
for (var y = new Array(arguments.length), g = 0; g < y.length; g++)
|
|
313
313
|
y[g] = arguments[g];
|
|
314
314
|
y[0] = e.coerce(y[0]), typeof y[0] != "string" && y.unshift("%O");
|
|
315
|
-
var
|
|
316
|
-
y[0] = y[0].replace(/%([a-zA-Z%])/g, function(_,
|
|
315
|
+
var w = 0;
|
|
316
|
+
y[0] = y[0].replace(/%([a-zA-Z%])/g, function(_, k) {
|
|
317
317
|
if (_ === "%%")
|
|
318
318
|
return _;
|
|
319
|
-
|
|
320
|
-
var S = e.formatters[
|
|
319
|
+
w++;
|
|
320
|
+
var S = e.formatters[k];
|
|
321
321
|
if (typeof S == "function") {
|
|
322
|
-
var m = y[
|
|
323
|
-
_ = S.call(a, m), y.splice(
|
|
322
|
+
var m = y[w];
|
|
323
|
+
_ = S.call(a, m), y.splice(w, 1), w--;
|
|
324
324
|
}
|
|
325
325
|
return _;
|
|
326
326
|
}), e.formatArgs.call(a, y);
|
|
@@ -362,10 +362,10 @@ function Dt(t, e, r) {
|
|
|
362
362
|
function d(c) {
|
|
363
363
|
return c instanceof Error ? c.stack || c.message : c;
|
|
364
364
|
}
|
|
365
|
-
})(
|
|
366
|
-
var
|
|
365
|
+
})(le, le.exports);
|
|
366
|
+
var Kr = le.exports;
|
|
367
367
|
(function(t, e) {
|
|
368
|
-
e = t.exports =
|
|
368
|
+
e = t.exports = Kr, e.log = o, e.formatArgs = n, e.save = i, e.load = u, e.useColors = r, e.storage = typeof chrome < "u" && typeof chrome.storage < "u" ? chrome.storage.local : h(), e.colors = [
|
|
369
369
|
"#0000CC",
|
|
370
370
|
"#0000FF",
|
|
371
371
|
"#0033CC",
|
|
@@ -492,15 +492,15 @@ var Wr = ue.exports;
|
|
|
492
492
|
} catch {
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
})(
|
|
496
|
-
var lt =
|
|
497
|
-
function
|
|
495
|
+
})(ue, ue.exports);
|
|
496
|
+
var lt = ue.exports, Hr = Ye, Le = lt("socket.io-client:url"), Jr = Vr;
|
|
497
|
+
function Vr(t, e) {
|
|
498
498
|
var r = t;
|
|
499
|
-
e = e || typeof location < "u" && location, t == null && (t = e.protocol + "//" + e.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = e.protocol + t : t = e.host + t), /^(https?|wss?):\/\//.test(t) || (
|
|
499
|
+
e = e || typeof location < "u" && location, t == null && (t = e.protocol + "//" + e.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = e.protocol + t : t = e.host + t), /^(https?|wss?):\/\//.test(t) || (Le("protocol-less url %s", t), typeof e < "u" ? t = e.protocol + "//" + t : t = "https://" + t), Le("parse %s", t), r = Hr(t)), r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|ws)s$/.test(r.protocol) && (r.port = "443")), r.path = r.path || "/";
|
|
500
500
|
var n = r.host.indexOf(":") !== -1, o = n ? "[" + r.host + "]" : r.host;
|
|
501
501
|
return r.id = r.protocol + "://" + o + ":" + r.port, r.href = r.protocol + "://" + o + (e && e.port === r.port ? "" : ":" + r.port), r;
|
|
502
502
|
}
|
|
503
|
-
var
|
|
503
|
+
var Kt = {}, Qe = { exports: {} };
|
|
504
504
|
(function(t) {
|
|
505
505
|
t.exports = e;
|
|
506
506
|
function e(n) {
|
|
@@ -548,42 +548,42 @@ var Wt = {}, Ye = { exports: {} };
|
|
|
548
548
|
}, e.prototype.hasListeners = function(n) {
|
|
549
549
|
return !!this.listeners(n).length;
|
|
550
550
|
};
|
|
551
|
-
})(
|
|
552
|
-
var
|
|
553
|
-
return
|
|
554
|
-
},
|
|
551
|
+
})(Qe);
|
|
552
|
+
var St = Qe.exports, Ht = {}, $r = {}.toString, be = Array.isArray || function(t) {
|
|
553
|
+
return $r.call(t) == "[object Array]";
|
|
554
|
+
}, Ze = Zr, Gr = typeof Buffer == "function" && typeof Buffer.isBuffer == "function", Yr = typeof ArrayBuffer == "function", Qr = function(t) {
|
|
555
555
|
return typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t.buffer instanceof ArrayBuffer;
|
|
556
556
|
};
|
|
557
|
-
function
|
|
558
|
-
return
|
|
557
|
+
function Zr(t) {
|
|
558
|
+
return Gr && Buffer.isBuffer(t) || Yr && (t instanceof ArrayBuffer || Qr(t));
|
|
559
559
|
}
|
|
560
|
-
var ke =
|
|
561
|
-
|
|
560
|
+
var ke = be, tr = Ze, er = Object.prototype.toString, tn = typeof Blob == "function" || typeof Blob < "u" && er.call(Blob) === "[object BlobConstructor]", en = typeof File == "function" || typeof File < "u" && er.call(File) === "[object FileConstructor]";
|
|
561
|
+
Ht.deconstructPacket = function(t) {
|
|
562
562
|
var e = [], r = t.data, n = t;
|
|
563
|
-
return n.data =
|
|
563
|
+
return n.data = fe(r, e), n.attachments = e.length, { packet: n, buffers: e };
|
|
564
564
|
};
|
|
565
|
-
function
|
|
565
|
+
function fe(t, e) {
|
|
566
566
|
if (!t)
|
|
567
567
|
return t;
|
|
568
|
-
if (
|
|
568
|
+
if (tr(t)) {
|
|
569
569
|
var r = { _placeholder: !0, num: e.length };
|
|
570
570
|
return e.push(t), r;
|
|
571
571
|
} else if (ke(t)) {
|
|
572
572
|
for (var n = new Array(t.length), o = 0; o < t.length; o++)
|
|
573
|
-
n[o] =
|
|
573
|
+
n[o] = fe(t[o], e);
|
|
574
574
|
return n;
|
|
575
575
|
} else if (typeof t == "object" && !(t instanceof Date)) {
|
|
576
576
|
var n = {};
|
|
577
577
|
for (var i in t)
|
|
578
|
-
n[i] =
|
|
578
|
+
n[i] = fe(t[i], e);
|
|
579
579
|
return n;
|
|
580
580
|
}
|
|
581
581
|
return t;
|
|
582
582
|
}
|
|
583
|
-
|
|
584
|
-
return t.data =
|
|
583
|
+
Ht.reconstructPacket = function(t, e) {
|
|
584
|
+
return t.data = de(t.data, e), t.attachments = void 0, t;
|
|
585
585
|
};
|
|
586
|
-
function
|
|
586
|
+
function de(t, e) {
|
|
587
587
|
if (!t)
|
|
588
588
|
return t;
|
|
589
589
|
if (t && t._placeholder === !0) {
|
|
@@ -593,17 +593,17 @@ function fe(t, e) {
|
|
|
593
593
|
throw new Error("illegal attachments");
|
|
594
594
|
} else if (ke(t))
|
|
595
595
|
for (var n = 0; n < t.length; n++)
|
|
596
|
-
t[n] =
|
|
596
|
+
t[n] = de(t[n], e);
|
|
597
597
|
else if (typeof t == "object")
|
|
598
598
|
for (var o in t)
|
|
599
|
-
t[o] =
|
|
599
|
+
t[o] = de(t[o], e);
|
|
600
600
|
return t;
|
|
601
601
|
}
|
|
602
|
-
|
|
602
|
+
Ht.removeBlobs = function(t, e) {
|
|
603
603
|
function r(i, u, h) {
|
|
604
604
|
if (!i)
|
|
605
605
|
return i;
|
|
606
|
-
if (
|
|
606
|
+
if (tn && i instanceof Blob || en && i instanceof File) {
|
|
607
607
|
n++;
|
|
608
608
|
var d = new FileReader();
|
|
609
609
|
d.onload = function() {
|
|
@@ -612,7 +612,7 @@ Kt.removeBlobs = function(t, e) {
|
|
|
612
612
|
} else if (ke(i))
|
|
613
613
|
for (var c = 0; c < i.length; c++)
|
|
614
614
|
r(i[c], c, i);
|
|
615
|
-
else if (typeof i == "object" && !
|
|
615
|
+
else if (typeof i == "object" && !tr(i))
|
|
616
616
|
for (var l in i)
|
|
617
617
|
r(i[l], l, i);
|
|
618
618
|
}
|
|
@@ -620,7 +620,7 @@ Kt.removeBlobs = function(t, e) {
|
|
|
620
620
|
r(o), n || e(o);
|
|
621
621
|
};
|
|
622
622
|
(function(t) {
|
|
623
|
-
var e = lt("socket.io-parser"), r =
|
|
623
|
+
var e = lt("socket.io-parser"), r = St, n = Ht, o = be, i = Ze;
|
|
624
624
|
t.protocol = 4, t.types = [
|
|
625
625
|
"CONNECT",
|
|
626
626
|
"DISCONNECT",
|
|
@@ -633,24 +633,24 @@ Kt.removeBlobs = function(t, e) {
|
|
|
633
633
|
function u() {
|
|
634
634
|
}
|
|
635
635
|
var h = t.ERROR + '"encode error"';
|
|
636
|
-
u.prototype.encode = function(g,
|
|
636
|
+
u.prototype.encode = function(g, w) {
|
|
637
637
|
if (e("encoding packet %j", g), t.BINARY_EVENT === g.type || t.BINARY_ACK === g.type)
|
|
638
|
-
l(g,
|
|
638
|
+
l(g, w);
|
|
639
639
|
else {
|
|
640
640
|
var B = d(g);
|
|
641
|
-
|
|
641
|
+
w([B]);
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
644
|
function d(g) {
|
|
645
|
-
var
|
|
646
|
-
if ((t.BINARY_EVENT === g.type || t.BINARY_ACK === g.type) && (
|
|
645
|
+
var w = "" + g.type;
|
|
646
|
+
if ((t.BINARY_EVENT === g.type || t.BINARY_ACK === g.type) && (w += g.attachments + "-"), g.nsp && g.nsp !== "/" && (w += g.nsp + ","), g.id != null && (w += g.id), g.data != null) {
|
|
647
647
|
var B = c(g.data);
|
|
648
648
|
if (B !== !1)
|
|
649
|
-
|
|
649
|
+
w += B;
|
|
650
650
|
else
|
|
651
651
|
return h;
|
|
652
652
|
}
|
|
653
|
-
return e("encoded %j as %s", g,
|
|
653
|
+
return e("encoded %j as %s", g, w), w;
|
|
654
654
|
}
|
|
655
655
|
function c(g) {
|
|
656
656
|
try {
|
|
@@ -659,10 +659,10 @@ Kt.removeBlobs = function(t, e) {
|
|
|
659
659
|
return !1;
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function l(g,
|
|
662
|
+
function l(g, w) {
|
|
663
663
|
function B(_) {
|
|
664
|
-
var
|
|
665
|
-
m.unshift(S),
|
|
664
|
+
var k = n.deconstructPacket(_), S = d(k.packet), m = k.buffers;
|
|
665
|
+
m.unshift(S), w(m);
|
|
666
666
|
}
|
|
667
667
|
n.removeBlobs(g, B);
|
|
668
668
|
}
|
|
@@ -670,59 +670,59 @@ Kt.removeBlobs = function(t, e) {
|
|
|
670
670
|
this.reconstructor = null;
|
|
671
671
|
}
|
|
672
672
|
r(p.prototype), p.prototype.add = function(g) {
|
|
673
|
-
var
|
|
673
|
+
var w;
|
|
674
674
|
if (typeof g == "string") {
|
|
675
675
|
if (this.reconstructor)
|
|
676
676
|
throw new Error("got plaintext data when reconstructing a packet");
|
|
677
|
-
|
|
677
|
+
w = a(g), t.BINARY_EVENT === w.type || t.BINARY_ACK === w.type ? (this.reconstructor = new f(w), this.reconstructor.reconPack.attachments === 0 && this.emit("decoded", w)) : this.emit("decoded", w);
|
|
678
678
|
} else if (i(g) || g.base64)
|
|
679
679
|
if (this.reconstructor)
|
|
680
|
-
|
|
680
|
+
w = this.reconstructor.takeBinaryData(g), w && (this.reconstructor = null, this.emit("decoded", w));
|
|
681
681
|
else
|
|
682
682
|
throw new Error("got binary data when not reconstructing a packet");
|
|
683
683
|
else
|
|
684
684
|
throw new Error("Unknown type: " + g);
|
|
685
685
|
};
|
|
686
686
|
function a(g) {
|
|
687
|
-
var
|
|
687
|
+
var w = 0, B = {
|
|
688
688
|
type: Number(g.charAt(0))
|
|
689
689
|
};
|
|
690
690
|
if (t.types[B.type] == null)
|
|
691
691
|
return y("unknown packet type " + B.type);
|
|
692
692
|
if (t.BINARY_EVENT === B.type || t.BINARY_ACK === B.type) {
|
|
693
|
-
for (var _ =
|
|
693
|
+
for (var _ = w + 1; g.charAt(++w) !== "-" && w != g.length; )
|
|
694
694
|
;
|
|
695
|
-
var
|
|
696
|
-
if (
|
|
695
|
+
var k = g.substring(_, w);
|
|
696
|
+
if (k != Number(k) || g.charAt(w) !== "-")
|
|
697
697
|
throw new Error("Illegal attachments");
|
|
698
|
-
B.attachments = Number(
|
|
698
|
+
B.attachments = Number(k);
|
|
699
699
|
}
|
|
700
|
-
if (g.charAt(
|
|
701
|
-
for (var _ =
|
|
702
|
-
var S = g.charAt(
|
|
703
|
-
if (S === "," ||
|
|
700
|
+
if (g.charAt(w + 1) === "/") {
|
|
701
|
+
for (var _ = w + 1; ++w; ) {
|
|
702
|
+
var S = g.charAt(w);
|
|
703
|
+
if (S === "," || w === g.length)
|
|
704
704
|
break;
|
|
705
705
|
}
|
|
706
|
-
B.nsp = g.substring(_,
|
|
706
|
+
B.nsp = g.substring(_, w);
|
|
707
707
|
} else
|
|
708
708
|
B.nsp = "/";
|
|
709
|
-
var m = g.charAt(
|
|
709
|
+
var m = g.charAt(w + 1);
|
|
710
710
|
if (m !== "" && Number(m) == m) {
|
|
711
|
-
for (var _ =
|
|
712
|
-
var S = g.charAt(
|
|
711
|
+
for (var _ = w + 1; ++w; ) {
|
|
712
|
+
var S = g.charAt(w);
|
|
713
713
|
if (S == null || Number(S) != S) {
|
|
714
|
-
--
|
|
714
|
+
--w;
|
|
715
715
|
break;
|
|
716
716
|
}
|
|
717
|
-
if (
|
|
717
|
+
if (w === g.length)
|
|
718
718
|
break;
|
|
719
719
|
}
|
|
720
|
-
B.id = Number(g.substring(_,
|
|
720
|
+
B.id = Number(g.substring(_, w + 1));
|
|
721
721
|
}
|
|
722
|
-
if (g.charAt(++
|
|
723
|
-
var
|
|
722
|
+
if (g.charAt(++w)) {
|
|
723
|
+
var C = s(g.substr(w)), E = C !== !1 && (B.type === t.ERROR || o(C));
|
|
724
724
|
if (E)
|
|
725
|
-
B.data =
|
|
725
|
+
B.data = C;
|
|
726
726
|
else
|
|
727
727
|
return y("invalid payload");
|
|
728
728
|
}
|
|
@@ -743,8 +743,8 @@ Kt.removeBlobs = function(t, e) {
|
|
|
743
743
|
}
|
|
744
744
|
f.prototype.takeBinaryData = function(g) {
|
|
745
745
|
if (this.buffers.push(g), this.buffers.length === this.reconPack.attachments) {
|
|
746
|
-
var
|
|
747
|
-
return this.finishedReconstruction(),
|
|
746
|
+
var w = n.reconstructPacket(this.reconPack, this.buffers);
|
|
747
|
+
return this.finishedReconstruction(), w;
|
|
748
748
|
}
|
|
749
749
|
return null;
|
|
750
750
|
}, f.prototype.finishedReconstruction = function() {
|
|
@@ -756,19 +756,19 @@ Kt.removeBlobs = function(t, e) {
|
|
|
756
756
|
data: "parser error: " + g
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
})(
|
|
760
|
-
var
|
|
759
|
+
})(Kt);
|
|
760
|
+
var Ce = { exports: {} }, Jt = {}, ye = { exports: {} };
|
|
761
761
|
try {
|
|
762
|
-
|
|
762
|
+
ye.exports = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
|
763
763
|
} catch {
|
|
764
|
-
|
|
764
|
+
ye.exports = !1;
|
|
765
765
|
}
|
|
766
|
-
var
|
|
766
|
+
var rn = ye.exports, we = function() {
|
|
767
767
|
return typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
|
|
768
|
-
}(),
|
|
768
|
+
}(), nn = rn, on = we, Se = function(t) {
|
|
769
769
|
var e = t.xdomain, r = t.xscheme, n = t.enablesXDR;
|
|
770
770
|
try {
|
|
771
|
-
if (typeof XMLHttpRequest < "u" && (!e ||
|
|
771
|
+
if (typeof XMLHttpRequest < "u" && (!e || nn))
|
|
772
772
|
return new XMLHttpRequest();
|
|
773
773
|
} catch {
|
|
774
774
|
}
|
|
@@ -779,34 +779,34 @@ var en = de.exports, we = function() {
|
|
|
779
779
|
}
|
|
780
780
|
if (!e)
|
|
781
781
|
try {
|
|
782
|
-
return new
|
|
782
|
+
return new on[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
|
|
783
783
|
} catch {
|
|
784
784
|
}
|
|
785
|
-
},
|
|
785
|
+
}, Ee = { exports: {} }, bt = {}, sn = Object.keys || function(t) {
|
|
786
786
|
var e = [], r = Object.prototype.hasOwnProperty;
|
|
787
787
|
for (var n in t)
|
|
788
788
|
r.call(t, n) && e.push(n);
|
|
789
789
|
return e;
|
|
790
|
-
},
|
|
791
|
-
function
|
|
790
|
+
}, an = be, rr = Object.prototype.toString, cn = typeof Blob == "function" || typeof Blob < "u" && rr.call(Blob) === "[object BlobConstructor]", hn = typeof File == "function" || typeof File < "u" && rr.call(File) === "[object FileConstructor]", nr = Mt;
|
|
791
|
+
function Mt(t) {
|
|
792
792
|
if (!t || typeof t != "object")
|
|
793
793
|
return !1;
|
|
794
|
-
if (
|
|
794
|
+
if (an(t)) {
|
|
795
795
|
for (var e = 0, r = t.length; e < r; e++)
|
|
796
|
-
if (
|
|
796
|
+
if (Mt(t[e]))
|
|
797
797
|
return !0;
|
|
798
798
|
return !1;
|
|
799
799
|
}
|
|
800
|
-
if (typeof Buffer == "function" && Buffer.isBuffer && Buffer.isBuffer(t) || typeof ArrayBuffer == "function" && t instanceof ArrayBuffer ||
|
|
800
|
+
if (typeof Buffer == "function" && Buffer.isBuffer && Buffer.isBuffer(t) || typeof ArrayBuffer == "function" && t instanceof ArrayBuffer || cn && t instanceof Blob || hn && t instanceof File)
|
|
801
801
|
return !0;
|
|
802
802
|
if (t.toJSON && typeof t.toJSON == "function" && arguments.length === 1)
|
|
803
|
-
return
|
|
803
|
+
return Mt(t.toJSON(), !0);
|
|
804
804
|
for (var n in t)
|
|
805
|
-
if (Object.prototype.hasOwnProperty.call(t, n) &&
|
|
805
|
+
if (Object.prototype.hasOwnProperty.call(t, n) && Mt(t[n]))
|
|
806
806
|
return !0;
|
|
807
807
|
return !1;
|
|
808
808
|
}
|
|
809
|
-
var
|
|
809
|
+
var pn = function(t, e, r) {
|
|
810
810
|
var n = t.byteLength;
|
|
811
811
|
if (e = e || 0, r = r || n, t.slice)
|
|
812
812
|
return t.slice(e, r);
|
|
@@ -815,31 +815,31 @@ var hn = function(t, e, r) {
|
|
|
815
815
|
for (var o = new Uint8Array(t), i = new Uint8Array(r - e), u = e, h = 0; u < r; u++, h++)
|
|
816
816
|
i[h] = o[u];
|
|
817
817
|
return i.buffer;
|
|
818
|
-
},
|
|
819
|
-
function
|
|
818
|
+
}, un = ln;
|
|
819
|
+
function ln(t, e, r) {
|
|
820
820
|
var n = !1;
|
|
821
|
-
return r = r ||
|
|
821
|
+
return r = r || fn, o.count = t, t === 0 ? e() : o;
|
|
822
822
|
function o(i, u) {
|
|
823
823
|
if (o.count <= 0)
|
|
824
824
|
throw new Error("after called too many times");
|
|
825
825
|
--o.count, i ? (n = !0, e(i), e = r) : o.count === 0 && !n && e(null, u);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function fn() {
|
|
829
829
|
}
|
|
830
830
|
/*! https://mths.be/utf8js v2.1.2 by @mathias */
|
|
831
831
|
var dt = String.fromCharCode;
|
|
832
|
-
function
|
|
832
|
+
function or(t) {
|
|
833
833
|
for (var e = [], r = 0, n = t.length, o, i; r < n; )
|
|
834
834
|
o = t.charCodeAt(r++), o >= 55296 && o <= 56319 && r < n ? (i = t.charCodeAt(r++), (i & 64512) == 56320 ? e.push(((o & 1023) << 10) + (i & 1023) + 65536) : (e.push(o), r--)) : e.push(o);
|
|
835
835
|
return e;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function dn(t) {
|
|
838
838
|
for (var e = t.length, r = -1, n, o = ""; ++r < e; )
|
|
839
839
|
n = t[r], n > 65535 && (n -= 65536, o += dt(n >>> 10 & 1023 | 55296), n = 56320 | n & 1023), o += dt(n);
|
|
840
840
|
return o;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function sr(t, e) {
|
|
843
843
|
if (t >= 55296 && t <= 57343) {
|
|
844
844
|
if (e)
|
|
845
845
|
throw Error(
|
|
@@ -849,36 +849,36 @@ function or(t, e) {
|
|
|
849
849
|
}
|
|
850
850
|
return !0;
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function ne(t, e) {
|
|
853
853
|
return dt(t >> e & 63 | 128);
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function yn(t, e) {
|
|
856
856
|
if (!(t & 4294967168))
|
|
857
857
|
return dt(t);
|
|
858
858
|
var r = "";
|
|
859
|
-
return t & 4294965248 ? t & 4294901760 ? t & 4292870144 || (r = dt(t >> 18 & 7 | 240), r +=
|
|
859
|
+
return t & 4294965248 ? t & 4294901760 ? t & 4292870144 || (r = dt(t >> 18 & 7 | 240), r += ne(t, 12), r += ne(t, 6)) : (sr(t, e) || (t = 65533), r = dt(t >> 12 & 15 | 224), r += ne(t, 6)) : r = dt(t >> 6 & 31 | 192), r += dt(t & 63 | 128), r;
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function gn(t, e) {
|
|
862
862
|
e = e || {};
|
|
863
|
-
for (var r = e.strict !== !1, n =
|
|
864
|
-
u = n[i], h +=
|
|
863
|
+
for (var r = e.strict !== !1, n = or(t), o = n.length, i = -1, u, h = ""; ++i < o; )
|
|
864
|
+
u = n[i], h += yn(u, r);
|
|
865
865
|
return h;
|
|
866
866
|
}
|
|
867
867
|
function kt() {
|
|
868
|
-
if (yt >=
|
|
868
|
+
if (yt >= zt)
|
|
869
869
|
throw Error("Invalid byte index");
|
|
870
|
-
var t =
|
|
870
|
+
var t = qt[yt] & 255;
|
|
871
871
|
if (yt++, (t & 192) == 128)
|
|
872
872
|
return t & 63;
|
|
873
873
|
throw Error("Invalid continuation byte");
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function mn(t) {
|
|
876
876
|
var e, r, n, o, i;
|
|
877
|
-
if (yt >
|
|
877
|
+
if (yt > zt)
|
|
878
878
|
throw Error("Invalid byte index");
|
|
879
|
-
if (yt ==
|
|
879
|
+
if (yt == zt)
|
|
880
880
|
return !1;
|
|
881
|
-
if (e =
|
|
881
|
+
if (e = qt[yt] & 255, yt++, !(e & 128))
|
|
882
882
|
return e;
|
|
883
883
|
if ((e & 224) == 192) {
|
|
884
884
|
if (r = kt(), i = (e & 31) << 6 | r, i >= 128)
|
|
@@ -887,35 +887,35 @@ function gn(t) {
|
|
|
887
887
|
}
|
|
888
888
|
if ((e & 240) == 224) {
|
|
889
889
|
if (r = kt(), n = kt(), i = (e & 15) << 12 | r << 6 | n, i >= 2048)
|
|
890
|
-
return
|
|
890
|
+
return sr(i, t) ? i : 65533;
|
|
891
891
|
throw Error("Invalid continuation byte");
|
|
892
892
|
}
|
|
893
893
|
if ((e & 248) == 240 && (r = kt(), n = kt(), o = kt(), i = (e & 7) << 18 | r << 12 | n << 6 | o, i >= 65536 && i <= 1114111))
|
|
894
894
|
return i;
|
|
895
895
|
throw Error("Invalid UTF-8 detected");
|
|
896
896
|
}
|
|
897
|
-
var
|
|
898
|
-
function
|
|
897
|
+
var qt, zt, yt;
|
|
898
|
+
function vn(t, e) {
|
|
899
899
|
e = e || {};
|
|
900
900
|
var r = e.strict !== !1;
|
|
901
|
-
|
|
902
|
-
for (var n = [], o; (o =
|
|
901
|
+
qt = or(t), zt = qt.length, yt = 0;
|
|
902
|
+
for (var n = [], o; (o = mn(r)) !== !1; )
|
|
903
903
|
n.push(o);
|
|
904
|
-
return
|
|
904
|
+
return dn(n);
|
|
905
905
|
}
|
|
906
|
-
var
|
|
906
|
+
var bn = {
|
|
907
907
|
version: "2.1.2",
|
|
908
|
-
encode:
|
|
909
|
-
decode:
|
|
910
|
-
},
|
|
908
|
+
encode: gn,
|
|
909
|
+
decode: vn
|
|
910
|
+
}, oe = {}, Ue;
|
|
911
911
|
function kn() {
|
|
912
|
-
return
|
|
913
|
-
|
|
912
|
+
return Ue || (Ue = 1, function(t) {
|
|
913
|
+
oe.encode = function(e) {
|
|
914
914
|
var r = new Uint8Array(e), n, o = r.length, i = "";
|
|
915
915
|
for (n = 0; n < o; n += 3)
|
|
916
916
|
i += t[r[n] >> 2], i += t[(r[n] & 3) << 4 | r[n + 1] >> 4], i += t[(r[n + 1] & 15) << 2 | r[n + 2] >> 6], i += t[r[n + 2] & 63];
|
|
917
917
|
return o % 3 === 2 ? i = i.substring(0, i.length - 1) + "=" : o % 3 === 1 && (i = i.substring(0, i.length - 2) + "=="), i;
|
|
918
|
-
},
|
|
918
|
+
}, oe.decode = function(e) {
|
|
919
919
|
var r = e.length * 0.75, n = e.length, o, i = 0, u, h, d, c;
|
|
920
920
|
e[e.length - 1] === "=" && (r--, e[e.length - 2] === "=" && r--);
|
|
921
921
|
var l = new ArrayBuffer(r), p = new Uint8Array(l);
|
|
@@ -923,13 +923,13 @@ function kn() {
|
|
|
923
923
|
u = t.indexOf(e[o]), h = t.indexOf(e[o + 1]), d = t.indexOf(e[o + 2]), c = t.indexOf(e[o + 3]), p[i++] = u << 2 | h >> 4, p[i++] = (h & 15) << 4 | d >> 2, p[i++] = (d & 3) << 6 | c & 63;
|
|
924
924
|
return l;
|
|
925
925
|
};
|
|
926
|
-
}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),
|
|
926
|
+
}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")), oe;
|
|
927
927
|
}
|
|
928
|
-
var
|
|
929
|
-
function
|
|
930
|
-
if (
|
|
931
|
-
return
|
|
932
|
-
|
|
928
|
+
var se, De;
|
|
929
|
+
function Cn() {
|
|
930
|
+
if (De)
|
|
931
|
+
return se;
|
|
932
|
+
De = 1;
|
|
933
933
|
var t = typeof t < "u" ? t : typeof WebKitBlobBuilder < "u" ? WebKitBlobBuilder : typeof MSBlobBuilder < "u" ? MSBlobBuilder : typeof MozBlobBuilder < "u" ? MozBlobBuilder : !1, e = function() {
|
|
934
934
|
try {
|
|
935
935
|
var h = new Blob(["hi"]);
|
|
@@ -968,12 +968,12 @@ function bn() {
|
|
|
968
968
|
function u(h, d) {
|
|
969
969
|
return new Blob(o(h), d || {});
|
|
970
970
|
}
|
|
971
|
-
return typeof Blob < "u" && (i.prototype = Blob.prototype, u.prototype = Blob.prototype),
|
|
971
|
+
return typeof Blob < "u" && (i.prototype = Blob.prototype, u.prototype = Blob.prototype), se = /* @__PURE__ */ function() {
|
|
972
972
|
return e ? r ? Blob : u : n ? i : void 0;
|
|
973
|
-
}(),
|
|
973
|
+
}(), se;
|
|
974
974
|
}
|
|
975
975
|
(function(t) {
|
|
976
|
-
var e =
|
|
976
|
+
var e = sn, r = nr, n = pn, o = un, i = bn, u;
|
|
977
977
|
typeof ArrayBuffer < "u" && (u = kn());
|
|
978
978
|
var h = typeof navigator < "u" && /Android/i.test(navigator.userAgent), d = typeof navigator < "u" && /PhantomJS/i.test(navigator.userAgent), c = h || d;
|
|
979
979
|
t.protocol = 3;
|
|
@@ -985,142 +985,142 @@ function bn() {
|
|
|
985
985
|
message: 4,
|
|
986
986
|
upgrade: 5,
|
|
987
987
|
noop: 6
|
|
988
|
-
}, p = e(l), a = { type: "error", data: "parser error" }, s =
|
|
989
|
-
t.encodePacket = function(
|
|
990
|
-
typeof S == "function" && (
|
|
991
|
-
var E =
|
|
988
|
+
}, p = e(l), a = { type: "error", data: "parser error" }, s = Cn();
|
|
989
|
+
t.encodePacket = function(k, S, m, C) {
|
|
990
|
+
typeof S == "function" && (C = S, S = !1), typeof m == "function" && (C = m, m = null);
|
|
991
|
+
var E = k.data === void 0 ? void 0 : k.data.buffer || k.data;
|
|
992
992
|
if (typeof ArrayBuffer < "u" && E instanceof ArrayBuffer)
|
|
993
|
-
return y(
|
|
993
|
+
return y(k, S, C);
|
|
994
994
|
if (typeof s < "u" && E instanceof s)
|
|
995
|
-
return
|
|
995
|
+
return w(k, S, C);
|
|
996
996
|
if (E && E.base64)
|
|
997
|
-
return f(
|
|
998
|
-
var v = l[
|
|
999
|
-
return
|
|
997
|
+
return f(k, C);
|
|
998
|
+
var v = l[k.type];
|
|
999
|
+
return k.data !== void 0 && (v += m ? i.encode(String(k.data), { strict: !1 }) : String(k.data)), C("" + v);
|
|
1000
1000
|
};
|
|
1001
|
-
function f(
|
|
1002
|
-
var m = "b" + t.packets[
|
|
1001
|
+
function f(k, S) {
|
|
1002
|
+
var m = "b" + t.packets[k.type] + k.data.data;
|
|
1003
1003
|
return S(m);
|
|
1004
1004
|
}
|
|
1005
|
-
function y(
|
|
1005
|
+
function y(k, S, m) {
|
|
1006
1006
|
if (!S)
|
|
1007
|
-
return t.encodeBase64Packet(
|
|
1008
|
-
var
|
|
1009
|
-
v[0] = l[
|
|
1010
|
-
for (var
|
|
1011
|
-
v[
|
|
1007
|
+
return t.encodeBase64Packet(k, m);
|
|
1008
|
+
var C = k.data, E = new Uint8Array(C), v = new Uint8Array(1 + C.byteLength);
|
|
1009
|
+
v[0] = l[k.type];
|
|
1010
|
+
for (var b = 0; b < E.length; b++)
|
|
1011
|
+
v[b + 1] = E[b];
|
|
1012
1012
|
return m(v.buffer);
|
|
1013
1013
|
}
|
|
1014
|
-
function g(
|
|
1014
|
+
function g(k, S, m) {
|
|
1015
1015
|
if (!S)
|
|
1016
|
-
return t.encodeBase64Packet(
|
|
1017
|
-
var
|
|
1018
|
-
return
|
|
1019
|
-
t.encodePacket({ type:
|
|
1020
|
-
},
|
|
1016
|
+
return t.encodeBase64Packet(k, m);
|
|
1017
|
+
var C = new FileReader();
|
|
1018
|
+
return C.onload = function() {
|
|
1019
|
+
t.encodePacket({ type: k.type, data: C.result }, S, !0, m);
|
|
1020
|
+
}, C.readAsArrayBuffer(k.data);
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function w(k, S, m) {
|
|
1023
1023
|
if (!S)
|
|
1024
|
-
return t.encodeBase64Packet(
|
|
1024
|
+
return t.encodeBase64Packet(k, m);
|
|
1025
1025
|
if (c)
|
|
1026
|
-
return g(
|
|
1027
|
-
var
|
|
1028
|
-
|
|
1029
|
-
var E = new s([
|
|
1026
|
+
return g(k, S, m);
|
|
1027
|
+
var C = new Uint8Array(1);
|
|
1028
|
+
C[0] = l[k.type];
|
|
1029
|
+
var E = new s([C.buffer, k.data]);
|
|
1030
1030
|
return m(E);
|
|
1031
1031
|
}
|
|
1032
|
-
t.encodeBase64Packet = function(
|
|
1033
|
-
var m = "b" + t.packets[
|
|
1034
|
-
if (typeof s < "u" &&
|
|
1035
|
-
var
|
|
1036
|
-
return
|
|
1037
|
-
var
|
|
1038
|
-
S(m +
|
|
1039
|
-
},
|
|
1032
|
+
t.encodeBase64Packet = function(k, S) {
|
|
1033
|
+
var m = "b" + t.packets[k.type];
|
|
1034
|
+
if (typeof s < "u" && k.data instanceof s) {
|
|
1035
|
+
var C = new FileReader();
|
|
1036
|
+
return C.onload = function() {
|
|
1037
|
+
var O = C.result.split(",")[1];
|
|
1038
|
+
S(m + O);
|
|
1039
|
+
}, C.readAsDataURL(k.data);
|
|
1040
1040
|
}
|
|
1041
1041
|
var E;
|
|
1042
1042
|
try {
|
|
1043
|
-
E = String.fromCharCode.apply(null, new Uint8Array(
|
|
1043
|
+
E = String.fromCharCode.apply(null, new Uint8Array(k.data));
|
|
1044
1044
|
} catch {
|
|
1045
|
-
for (var v = new Uint8Array(
|
|
1046
|
-
|
|
1047
|
-
E = String.fromCharCode.apply(null,
|
|
1045
|
+
for (var v = new Uint8Array(k.data), b = new Array(v.length), T = 0; T < v.length; T++)
|
|
1046
|
+
b[T] = v[T];
|
|
1047
|
+
E = String.fromCharCode.apply(null, b);
|
|
1048
1048
|
}
|
|
1049
1049
|
return m += btoa(E), S(m);
|
|
1050
|
-
}, t.decodePacket = function(
|
|
1051
|
-
if (
|
|
1050
|
+
}, t.decodePacket = function(k, S, m) {
|
|
1051
|
+
if (k === void 0)
|
|
1052
1052
|
return a;
|
|
1053
|
-
if (typeof
|
|
1054
|
-
if (
|
|
1055
|
-
return t.decodeBase64Packet(
|
|
1056
|
-
if (m && (
|
|
1053
|
+
if (typeof k == "string") {
|
|
1054
|
+
if (k.charAt(0) === "b")
|
|
1055
|
+
return t.decodeBase64Packet(k.substr(1), S);
|
|
1056
|
+
if (m && (k = B(k), k === !1))
|
|
1057
1057
|
return a;
|
|
1058
|
-
var E =
|
|
1059
|
-
return Number(E) != E || !p[E] ? a :
|
|
1058
|
+
var E = k.charAt(0);
|
|
1059
|
+
return Number(E) != E || !p[E] ? a : k.length > 1 ? { type: p[E], data: k.substring(1) } : { type: p[E] };
|
|
1060
1060
|
}
|
|
1061
|
-
var
|
|
1061
|
+
var C = new Uint8Array(k), E = C[0], v = n(k, 1);
|
|
1062
1062
|
return s && S === "blob" && (v = new s([v])), { type: p[E], data: v };
|
|
1063
1063
|
};
|
|
1064
|
-
function B(
|
|
1064
|
+
function B(k) {
|
|
1065
1065
|
try {
|
|
1066
|
-
|
|
1066
|
+
k = i.decode(k, { strict: !1 });
|
|
1067
1067
|
} catch {
|
|
1068
1068
|
return !1;
|
|
1069
1069
|
}
|
|
1070
|
-
return
|
|
1070
|
+
return k;
|
|
1071
1071
|
}
|
|
1072
|
-
t.decodeBase64Packet = function(
|
|
1073
|
-
var m = p[
|
|
1072
|
+
t.decodeBase64Packet = function(k, S) {
|
|
1073
|
+
var m = p[k.charAt(0)];
|
|
1074
1074
|
if (!u)
|
|
1075
|
-
return { type: m, data: { base64: !0, data:
|
|
1076
|
-
var
|
|
1077
|
-
return S === "blob" && s && (
|
|
1078
|
-
}, t.encodePayload = function(
|
|
1075
|
+
return { type: m, data: { base64: !0, data: k.substr(1) } };
|
|
1076
|
+
var C = u.decode(k.substr(1));
|
|
1077
|
+
return S === "blob" && s && (C = new s([C])), { type: m, data: C };
|
|
1078
|
+
}, t.encodePayload = function(k, S, m) {
|
|
1079
1079
|
typeof S == "function" && (m = S, S = null);
|
|
1080
|
-
var
|
|
1081
|
-
if (S &&
|
|
1082
|
-
return s && !c ? t.encodePayloadAsBlob(
|
|
1083
|
-
if (!
|
|
1080
|
+
var C = r(k);
|
|
1081
|
+
if (S && C)
|
|
1082
|
+
return s && !c ? t.encodePayloadAsBlob(k, m) : t.encodePayloadAsArrayBuffer(k, m);
|
|
1083
|
+
if (!k.length)
|
|
1084
1084
|
return m("0:");
|
|
1085
|
-
function E(
|
|
1086
|
-
return
|
|
1085
|
+
function E(b) {
|
|
1086
|
+
return b.length + ":" + b;
|
|
1087
1087
|
}
|
|
1088
|
-
function v(
|
|
1089
|
-
t.encodePacket(
|
|
1090
|
-
T(null, E(
|
|
1088
|
+
function v(b, T) {
|
|
1089
|
+
t.encodePacket(b, C ? S : !1, !1, function(O) {
|
|
1090
|
+
T(null, E(O));
|
|
1091
1091
|
});
|
|
1092
1092
|
}
|
|
1093
|
-
_(
|
|
1093
|
+
_(k, v, function(b, T) {
|
|
1094
1094
|
return m(T.join(""));
|
|
1095
1095
|
});
|
|
1096
1096
|
};
|
|
1097
|
-
function _(
|
|
1098
|
-
for (var
|
|
1099
|
-
S(
|
|
1100
|
-
|
|
1097
|
+
function _(k, S, m) {
|
|
1098
|
+
for (var C = new Array(k.length), E = o(k.length, m), v = function(T, O, x) {
|
|
1099
|
+
S(O, function(A, q) {
|
|
1100
|
+
C[T] = q, x(A, C);
|
|
1101
1101
|
});
|
|
1102
|
-
},
|
|
1103
|
-
v(
|
|
1102
|
+
}, b = 0; b < k.length; b++)
|
|
1103
|
+
v(b, k[b], E);
|
|
1104
1104
|
}
|
|
1105
|
-
t.decodePayload = function(
|
|
1106
|
-
if (typeof
|
|
1107
|
-
return t.decodePayloadAsBinary(
|
|
1105
|
+
t.decodePayload = function(k, S, m) {
|
|
1106
|
+
if (typeof k != "string")
|
|
1107
|
+
return t.decodePayloadAsBinary(k, S, m);
|
|
1108
1108
|
typeof S == "function" && (m = S, S = null);
|
|
1109
|
-
var
|
|
1110
|
-
if (
|
|
1109
|
+
var C;
|
|
1110
|
+
if (k === "")
|
|
1111
1111
|
return m(a, 0, 1);
|
|
1112
|
-
for (var E = "", v,
|
|
1113
|
-
var
|
|
1114
|
-
if (
|
|
1115
|
-
E +=
|
|
1112
|
+
for (var E = "", v, b, T = 0, O = k.length; T < O; T++) {
|
|
1113
|
+
var x = k.charAt(T);
|
|
1114
|
+
if (x !== ":") {
|
|
1115
|
+
E += x;
|
|
1116
1116
|
continue;
|
|
1117
1117
|
}
|
|
1118
|
-
if (E === "" || E != (v = Number(E)) || (
|
|
1118
|
+
if (E === "" || E != (v = Number(E)) || (b = k.substr(T + 1, v), E != b.length))
|
|
1119
1119
|
return m(a, 0, 1);
|
|
1120
|
-
if (
|
|
1121
|
-
if (
|
|
1120
|
+
if (b.length) {
|
|
1121
|
+
if (C = t.decodePacket(b, S, !1), a.type === C.type && a.data === C.data)
|
|
1122
1122
|
return m(a, 0, 1);
|
|
1123
|
-
var A = m(
|
|
1123
|
+
var A = m(C, T + v, O);
|
|
1124
1124
|
if (A === !1)
|
|
1125
1125
|
return;
|
|
1126
1126
|
}
|
|
@@ -1128,88 +1128,88 @@ function bn() {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
if (E !== "")
|
|
1130
1130
|
return m(a, 0, 1);
|
|
1131
|
-
}, t.encodePayloadAsArrayBuffer = function(
|
|
1132
|
-
if (!
|
|
1131
|
+
}, t.encodePayloadAsArrayBuffer = function(k, S) {
|
|
1132
|
+
if (!k.length)
|
|
1133
1133
|
return S(new ArrayBuffer(0));
|
|
1134
|
-
function m(
|
|
1135
|
-
t.encodePacket(
|
|
1134
|
+
function m(C, E) {
|
|
1135
|
+
t.encodePacket(C, !0, !0, function(v) {
|
|
1136
1136
|
return E(null, v);
|
|
1137
1137
|
});
|
|
1138
1138
|
}
|
|
1139
|
-
_(
|
|
1140
|
-
var v = E.reduce(function(
|
|
1139
|
+
_(k, m, function(C, E) {
|
|
1140
|
+
var v = E.reduce(function(O, x) {
|
|
1141
1141
|
var A;
|
|
1142
|
-
return typeof
|
|
1143
|
-
}, 0),
|
|
1144
|
-
return E.forEach(function(
|
|
1145
|
-
var
|
|
1146
|
-
if (
|
|
1147
|
-
for (var q = new Uint8Array(
|
|
1148
|
-
q[j] =
|
|
1142
|
+
return typeof x == "string" ? A = x.length : A = x.byteLength, O + A.toString().length + A + 2;
|
|
1143
|
+
}, 0), b = new Uint8Array(v), T = 0;
|
|
1144
|
+
return E.forEach(function(O) {
|
|
1145
|
+
var x = typeof O == "string", A = O;
|
|
1146
|
+
if (x) {
|
|
1147
|
+
for (var q = new Uint8Array(O.length), j = 0; j < O.length; j++)
|
|
1148
|
+
q[j] = O.charCodeAt(j);
|
|
1149
1149
|
A = q.buffer;
|
|
1150
1150
|
}
|
|
1151
|
-
|
|
1151
|
+
x ? b[T++] = 0 : b[T++] = 1;
|
|
1152
1152
|
for (var $ = A.byteLength.toString(), j = 0; j < $.length; j++)
|
|
1153
|
-
|
|
1154
|
-
|
|
1153
|
+
b[T++] = parseInt($[j]);
|
|
1154
|
+
b[T++] = 255;
|
|
1155
1155
|
for (var q = new Uint8Array(A), j = 0; j < q.length; j++)
|
|
1156
|
-
|
|
1157
|
-
}), S(
|
|
1156
|
+
b[T++] = q[j];
|
|
1157
|
+
}), S(b.buffer);
|
|
1158
1158
|
});
|
|
1159
|
-
}, t.encodePayloadAsBlob = function(
|
|
1160
|
-
function m(
|
|
1161
|
-
t.encodePacket(
|
|
1162
|
-
var
|
|
1163
|
-
if (
|
|
1164
|
-
for (var T = new Uint8Array(v.length),
|
|
1165
|
-
T[
|
|
1166
|
-
v = T.buffer,
|
|
1159
|
+
}, t.encodePayloadAsBlob = function(k, S) {
|
|
1160
|
+
function m(C, E) {
|
|
1161
|
+
t.encodePacket(C, !0, !0, function(v) {
|
|
1162
|
+
var b = new Uint8Array(1);
|
|
1163
|
+
if (b[0] = 1, typeof v == "string") {
|
|
1164
|
+
for (var T = new Uint8Array(v.length), O = 0; O < v.length; O++)
|
|
1165
|
+
T[O] = v.charCodeAt(O);
|
|
1166
|
+
v = T.buffer, b[0] = 0;
|
|
1167
1167
|
}
|
|
1168
|
-
for (var
|
|
1169
|
-
q[
|
|
1168
|
+
for (var x = v instanceof ArrayBuffer ? v.byteLength : v.size, A = x.toString(), q = new Uint8Array(A.length + 1), O = 0; O < A.length; O++)
|
|
1169
|
+
q[O] = parseInt(A[O]);
|
|
1170
1170
|
if (q[A.length] = 255, s) {
|
|
1171
|
-
var j = new s([
|
|
1171
|
+
var j = new s([b.buffer, q.buffer, v]);
|
|
1172
1172
|
E(null, j);
|
|
1173
1173
|
}
|
|
1174
1174
|
});
|
|
1175
1175
|
}
|
|
1176
|
-
_(
|
|
1176
|
+
_(k, m, function(C, E) {
|
|
1177
1177
|
return S(new s(E));
|
|
1178
1178
|
});
|
|
1179
|
-
}, t.decodePayloadAsBinary = function(
|
|
1179
|
+
}, t.decodePayloadAsBinary = function(k, S, m) {
|
|
1180
1180
|
typeof S == "function" && (m = S, S = null);
|
|
1181
|
-
for (var
|
|
1182
|
-
for (var v = new Uint8Array(
|
|
1181
|
+
for (var C = k, E = []; C.byteLength > 0; ) {
|
|
1182
|
+
for (var v = new Uint8Array(C), b = v[0] === 0, T = "", O = 1; v[O] !== 255; O++) {
|
|
1183
1183
|
if (T.length > 310)
|
|
1184
1184
|
return m(a, 0, 1);
|
|
1185
|
-
T += v[
|
|
1185
|
+
T += v[O];
|
|
1186
1186
|
}
|
|
1187
|
-
|
|
1188
|
-
var
|
|
1189
|
-
if (
|
|
1187
|
+
C = n(C, 2 + T.length), T = parseInt(T);
|
|
1188
|
+
var x = n(C, 0, T);
|
|
1189
|
+
if (b)
|
|
1190
1190
|
try {
|
|
1191
|
-
|
|
1191
|
+
x = String.fromCharCode.apply(null, new Uint8Array(x));
|
|
1192
1192
|
} catch {
|
|
1193
|
-
var A = new Uint8Array(
|
|
1194
|
-
|
|
1195
|
-
for (var
|
|
1196
|
-
|
|
1193
|
+
var A = new Uint8Array(x);
|
|
1194
|
+
x = "";
|
|
1195
|
+
for (var O = 0; O < A.length; O++)
|
|
1196
|
+
x += String.fromCharCode(A[O]);
|
|
1197
1197
|
}
|
|
1198
|
-
E.push(
|
|
1198
|
+
E.push(x), C = n(C, T);
|
|
1199
1199
|
}
|
|
1200
1200
|
var q = E.length;
|
|
1201
1201
|
E.forEach(function(j, $) {
|
|
1202
1202
|
m(t.decodePacket(j, S, !0), $, q);
|
|
1203
1203
|
});
|
|
1204
1204
|
};
|
|
1205
|
-
})(
|
|
1206
|
-
var
|
|
1207
|
-
function
|
|
1208
|
-
if (
|
|
1209
|
-
return
|
|
1210
|
-
|
|
1211
|
-
var t =
|
|
1212
|
-
|
|
1205
|
+
})(bt);
|
|
1206
|
+
var ie, Pe;
|
|
1207
|
+
function Ae() {
|
|
1208
|
+
if (Pe)
|
|
1209
|
+
return ie;
|
|
1210
|
+
Pe = 1;
|
|
1211
|
+
var t = bt, e = St;
|
|
1212
|
+
ie = r;
|
|
1213
1213
|
function r(n) {
|
|
1214
1214
|
this.path = n.path, this.hostname = n.hostname, this.port = n.port, this.secure = n.secure, this.query = n.query, this.timestampParam = n.timestampParam, this.timestampRequests = n.timestampRequests, this.readyState = "", this.agent = n.agent || !1, this.socket = n.socket, this.enablesXDR = n.enablesXDR, this.withCredentials = n.withCredentials, this.pfx = n.pfx, this.key = n.key, this.passphrase = n.passphrase, this.cert = n.cert, this.ca = n.ca, this.ciphers = n.ciphers, this.rejectUnauthorized = n.rejectUnauthorized, this.forceNode = n.forceNode, this.isReactNative = n.isReactNative, this.extraHeaders = n.extraHeaders, this.localAddress = n.localAddress;
|
|
1215
1215
|
}
|
|
@@ -1234,57 +1234,57 @@ function Ee() {
|
|
|
1234
1234
|
this.emit("packet", n);
|
|
1235
1235
|
}, r.prototype.onClose = function() {
|
|
1236
1236
|
this.readyState = "closed", this.emit("close");
|
|
1237
|
-
},
|
|
1237
|
+
}, ie;
|
|
1238
1238
|
}
|
|
1239
|
-
var
|
|
1240
|
-
|
|
1239
|
+
var Et = {};
|
|
1240
|
+
Et.encode = function(t) {
|
|
1241
1241
|
var e = "";
|
|
1242
1242
|
for (var r in t)
|
|
1243
1243
|
t.hasOwnProperty(r) && (e.length && (e += "&"), e += encodeURIComponent(r) + "=" + encodeURIComponent(t[r]));
|
|
1244
1244
|
return e;
|
|
1245
1245
|
};
|
|
1246
|
-
|
|
1246
|
+
Et.decode = function(t) {
|
|
1247
1247
|
for (var e = {}, r = t.split("&"), n = 0, o = r.length; n < o; n++) {
|
|
1248
1248
|
var i = r[n].split("=");
|
|
1249
1249
|
e[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
|
|
1250
1250
|
}
|
|
1251
1251
|
return e;
|
|
1252
1252
|
};
|
|
1253
|
-
var
|
|
1253
|
+
var Vt = function(t, e) {
|
|
1254
1254
|
var r = function() {
|
|
1255
1255
|
};
|
|
1256
1256
|
r.prototype = e.prototype, t.prototype = new r(), t.prototype.constructor = t;
|
|
1257
|
-
},
|
|
1258
|
-
function
|
|
1257
|
+
}, ir = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), Xt = 64, ar = {}, Fe = 0, gt = 0, je;
|
|
1258
|
+
function ge(t) {
|
|
1259
1259
|
var e = "";
|
|
1260
1260
|
do
|
|
1261
|
-
e =
|
|
1261
|
+
e = ir[t % Xt] + e, t = Math.floor(t / Xt);
|
|
1262
1262
|
while (t > 0);
|
|
1263
1263
|
return e;
|
|
1264
1264
|
}
|
|
1265
1265
|
function wn(t) {
|
|
1266
1266
|
var e = 0;
|
|
1267
1267
|
for (gt = 0; gt < t.length; gt++)
|
|
1268
|
-
e = e *
|
|
1268
|
+
e = e * Xt + ar[t.charAt(gt)];
|
|
1269
1269
|
return e;
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1272
|
-
var t =
|
|
1273
|
-
return t !==
|
|
1271
|
+
function Te() {
|
|
1272
|
+
var t = ge(+/* @__PURE__ */ new Date());
|
|
1273
|
+
return t !== je ? (Fe = 0, je = t) : t + "." + ge(Fe++);
|
|
1274
1274
|
}
|
|
1275
|
-
for (; gt <
|
|
1276
|
-
ir[
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
var
|
|
1280
|
-
var t =
|
|
1275
|
+
for (; gt < Xt; gt++)
|
|
1276
|
+
ar[ir[gt]] = gt;
|
|
1277
|
+
Te.encode = ge;
|
|
1278
|
+
Te.decode = wn;
|
|
1279
|
+
var cr = Te, hr = Ae(), Sn = Et, pr = bt, En = Vt, An = cr, ht = lt("engine.io-client:polling"), ur = pt, Tn = function() {
|
|
1280
|
+
var t = Se, e = new t({ xdomain: !1 });
|
|
1281
1281
|
return e.responseType != null;
|
|
1282
1282
|
}();
|
|
1283
1283
|
function pt(t) {
|
|
1284
1284
|
var e = t && t.forceBase64;
|
|
1285
|
-
(!
|
|
1285
|
+
(!Tn || e) && (this.supportsBinary = !1), hr.call(this, t);
|
|
1286
1286
|
}
|
|
1287
|
-
|
|
1287
|
+
En(pt, hr);
|
|
1288
1288
|
pt.prototype.name = "polling";
|
|
1289
1289
|
pt.prototype.doOpen = function() {
|
|
1290
1290
|
this.poll();
|
|
@@ -1316,7 +1316,7 @@ pt.prototype.onData = function(t) {
|
|
|
1316
1316
|
return e.onClose(), !1;
|
|
1317
1317
|
e.onPacket(n);
|
|
1318
1318
|
};
|
|
1319
|
-
|
|
1319
|
+
pr.decodePayload(t, this.socket.binaryType, r), this.readyState !== "closed" && (this.polling = !1, this.emit("pollComplete"), this.readyState === "open" ? this.poll() : ht('ignoring poll - transport state "%s"', this.readyState));
|
|
1320
1320
|
};
|
|
1321
1321
|
pt.prototype.doClose = function() {
|
|
1322
1322
|
var t = this;
|
|
@@ -1331,40 +1331,40 @@ pt.prototype.write = function(t) {
|
|
|
1331
1331
|
var r = function() {
|
|
1332
1332
|
e.writable = !0, e.emit("drain");
|
|
1333
1333
|
};
|
|
1334
|
-
|
|
1334
|
+
pr.encodePayload(t, this.supportsBinary, function(n) {
|
|
1335
1335
|
e.doWrite(n, r);
|
|
1336
1336
|
});
|
|
1337
1337
|
};
|
|
1338
1338
|
pt.prototype.uri = function() {
|
|
1339
1339
|
var t = this.query || {}, e = this.secure ? "https" : "http", r = "";
|
|
1340
|
-
this.timestampRequests !== !1 && (t[this.timestampParam] =
|
|
1340
|
+
this.timestampRequests !== !1 && (t[this.timestampParam] = An()), !this.supportsBinary && !t.sid && (t.b64 = 1), t = Sn.encode(t), this.port && (e === "https" && Number(this.port) !== 443 || e === "http" && Number(this.port) !== 80) && (r = ":" + this.port), t.length && (t = "?" + t);
|
|
1341
1341
|
var n = this.hostname.indexOf(":") !== -1;
|
|
1342
1342
|
return e + "://" + (n ? "[" + this.hostname + "]" : this.hostname) + r + this.path + t;
|
|
1343
1343
|
};
|
|
1344
|
-
var
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
function
|
|
1344
|
+
var Nn = Se, lr = ur, On = St, xn = Vt, me = lt("engine.io-client:polling-xhr"), Rn = we;
|
|
1345
|
+
Ee.exports = At;
|
|
1346
|
+
Ee.exports.Request = Y;
|
|
1347
|
+
function Me() {
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1350
|
-
if (
|
|
1349
|
+
function At(t) {
|
|
1350
|
+
if (lr.call(this, t), this.requestTimeout = t.requestTimeout, this.extraHeaders = t.extraHeaders, typeof location < "u") {
|
|
1351
1351
|
var e = location.protocol === "https:", r = location.port;
|
|
1352
1352
|
r || (r = e ? 443 : 80), this.xd = typeof location < "u" && t.hostname !== location.hostname || r !== t.port, this.xs = t.secure !== e;
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
xn(
|
|
1356
|
-
|
|
1357
|
-
|
|
1355
|
+
xn(At, lr);
|
|
1356
|
+
At.prototype.supportsBinary = !0;
|
|
1357
|
+
At.prototype.request = function(t) {
|
|
1358
1358
|
return t = t || {}, t.uri = this.uri(), t.xd = this.xd, t.xs = this.xs, t.agent = this.agent || !1, t.supportsBinary = this.supportsBinary, t.enablesXDR = this.enablesXDR, t.withCredentials = this.withCredentials, t.pfx = this.pfx, t.key = this.key, t.passphrase = this.passphrase, t.cert = this.cert, t.ca = this.ca, t.ciphers = this.ciphers, t.rejectUnauthorized = this.rejectUnauthorized, t.requestTimeout = this.requestTimeout, t.extraHeaders = this.extraHeaders, new Y(t);
|
|
1359
1359
|
};
|
|
1360
|
-
|
|
1360
|
+
At.prototype.doWrite = function(t, e) {
|
|
1361
1361
|
var r = typeof t != "string" && t !== void 0, n = this.request({ method: "POST", data: t, isBinary: r }), o = this;
|
|
1362
1362
|
n.on("success", e), n.on("error", function(i) {
|
|
1363
1363
|
o.onError("xhr post error", i);
|
|
1364
1364
|
}), this.sendXhr = n;
|
|
1365
1365
|
};
|
|
1366
|
-
|
|
1367
|
-
|
|
1366
|
+
At.prototype.doPoll = function() {
|
|
1367
|
+
me("xhr poll");
|
|
1368
1368
|
var t = this.request(), e = this;
|
|
1369
1369
|
t.on("data", function(r) {
|
|
1370
1370
|
e.onData(r);
|
|
@@ -1375,13 +1375,13 @@ Et.prototype.doPoll = function() {
|
|
|
1375
1375
|
function Y(t) {
|
|
1376
1376
|
this.method = t.method || "GET", this.uri = t.uri, this.xd = !!t.xd, this.xs = !!t.xs, this.async = t.async !== !1, this.data = t.data !== void 0 ? t.data : null, this.agent = t.agent, this.isBinary = t.isBinary, this.supportsBinary = t.supportsBinary, this.enablesXDR = t.enablesXDR, this.withCredentials = t.withCredentials, this.requestTimeout = t.requestTimeout, this.pfx = t.pfx, this.key = t.key, this.passphrase = t.passphrase, this.cert = t.cert, this.ca = t.ca, this.ciphers = t.ciphers, this.rejectUnauthorized = t.rejectUnauthorized, this.extraHeaders = t.extraHeaders, this.create();
|
|
1377
1377
|
}
|
|
1378
|
-
|
|
1378
|
+
On(Y.prototype);
|
|
1379
1379
|
Y.prototype.create = function() {
|
|
1380
1380
|
var t = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
|
|
1381
1381
|
t.pfx = this.pfx, t.key = this.key, t.passphrase = this.passphrase, t.cert = this.cert, t.ca = this.ca, t.ciphers = this.ciphers, t.rejectUnauthorized = this.rejectUnauthorized;
|
|
1382
|
-
var e = this.xhr = new
|
|
1382
|
+
var e = this.xhr = new Nn(t), r = this;
|
|
1383
1383
|
try {
|
|
1384
|
-
|
|
1384
|
+
me("xhr open %s: %s", this.method, this.uri), e.open(this.method, this.uri, this.async);
|
|
1385
1385
|
try {
|
|
1386
1386
|
if (this.extraHeaders) {
|
|
1387
1387
|
e.setDisableHeaderCheck && e.setDisableHeaderCheck(!0);
|
|
@@ -1413,7 +1413,7 @@ Y.prototype.create = function() {
|
|
|
1413
1413
|
e.readyState === 4 && (e.status === 200 || e.status === 1223 ? r.onLoad() : setTimeout(function() {
|
|
1414
1414
|
r.onError(typeof e.status == "number" ? e.status : 0);
|
|
1415
1415
|
}, 0));
|
|
1416
|
-
},
|
|
1416
|
+
}, me("xhr data %s", this.data), e.send(this.data);
|
|
1417
1417
|
} catch (o) {
|
|
1418
1418
|
setTimeout(function() {
|
|
1419
1419
|
r.onError(o);
|
|
@@ -1433,7 +1433,7 @@ Y.prototype.onError = function(t) {
|
|
|
1433
1433
|
};
|
|
1434
1434
|
Y.prototype.cleanup = function(t) {
|
|
1435
1435
|
if (!(typeof this.xhr > "u" || this.xhr === null)) {
|
|
1436
|
-
if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror =
|
|
1436
|
+
if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = Me : this.xhr.onreadystatechange = Me, t)
|
|
1437
1437
|
try {
|
|
1438
1438
|
this.xhr.abort();
|
|
1439
1439
|
} catch {
|
|
@@ -1465,34 +1465,34 @@ Y.requestsCount = 0;
|
|
|
1465
1465
|
Y.requests = {};
|
|
1466
1466
|
if (typeof document < "u") {
|
|
1467
1467
|
if (typeof attachEvent == "function")
|
|
1468
|
-
attachEvent("onunload",
|
|
1468
|
+
attachEvent("onunload", qe);
|
|
1469
1469
|
else if (typeof addEventListener == "function") {
|
|
1470
|
-
var
|
|
1471
|
-
addEventListener(
|
|
1470
|
+
var In = "onpagehide" in Rn ? "pagehide" : "unload";
|
|
1471
|
+
addEventListener(In, qe, !1);
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function qe() {
|
|
1475
1475
|
for (var t in Y.requests)
|
|
1476
1476
|
Y.requests.hasOwnProperty(t) && Y.requests[t].abort();
|
|
1477
1477
|
}
|
|
1478
|
-
var
|
|
1479
|
-
function
|
|
1478
|
+
var Bn = Ee.exports, Ne = ur, _n = Vt, ze = we, Ln = Tt, Un = /\n/g, Dn = /\\n/g, Ft;
|
|
1479
|
+
function Pn() {
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1482
|
-
|
|
1481
|
+
function Tt(t) {
|
|
1482
|
+
Ne.call(this, t), this.query = this.query || {}, Ft || (Ft = ze.___eio = ze.___eio || []), this.index = Ft.length;
|
|
1483
1483
|
var e = this;
|
|
1484
|
-
|
|
1484
|
+
Ft.push(function(r) {
|
|
1485
1485
|
e.onData(r);
|
|
1486
1486
|
}), this.query.j = this.index, typeof addEventListener == "function" && addEventListener("beforeunload", function() {
|
|
1487
|
-
e.script && (e.script.onerror =
|
|
1487
|
+
e.script && (e.script.onerror = Pn);
|
|
1488
1488
|
}, !1);
|
|
1489
1489
|
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null),
|
|
1490
|
+
_n(Tt, Ne);
|
|
1491
|
+
Tt.prototype.supportsBinary = !1;
|
|
1492
|
+
Tt.prototype.doClose = function() {
|
|
1493
|
+
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), Ne.prototype.doClose.call(this);
|
|
1494
1494
|
};
|
|
1495
|
-
|
|
1495
|
+
Tt.prototype.doPoll = function() {
|
|
1496
1496
|
var t = this, e = document.createElement("script");
|
|
1497
1497
|
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), e.async = !0, e.src = this.uri(), e.onerror = function(o) {
|
|
1498
1498
|
t.onError("jsonp poll error", o);
|
|
@@ -1505,7 +1505,7 @@ At.prototype.doPoll = function() {
|
|
|
1505
1505
|
document.body.appendChild(o), document.body.removeChild(o);
|
|
1506
1506
|
}, 100);
|
|
1507
1507
|
};
|
|
1508
|
-
|
|
1508
|
+
Tt.prototype.doWrite = function(t, e) {
|
|
1509
1509
|
var r = this;
|
|
1510
1510
|
if (!this.form) {
|
|
1511
1511
|
var n = document.createElement("form"), o = document.createElement("textarea"), i = this.iframeId = "eio_iframe_" + this.index, u;
|
|
@@ -1530,8 +1530,8 @@ At.prototype.doWrite = function(t, e) {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
u.id = r.iframeId, r.form.appendChild(u), r.iframe = u;
|
|
1532
1532
|
}
|
|
1533
|
-
d(), t = t.replace(
|
|
1534
|
-
`), this.area.value = t.replace(
|
|
1533
|
+
d(), t = t.replace(Dn, `\\
|
|
1534
|
+
`), this.area.value = t.replace(Un, "\\n");
|
|
1535
1535
|
try {
|
|
1536
1536
|
this.form.submit();
|
|
1537
1537
|
} catch {
|
|
@@ -1540,23 +1540,23 @@ At.prototype.doWrite = function(t, e) {
|
|
|
1540
1540
|
r.iframe.readyState === "complete" && h();
|
|
1541
1541
|
} : this.iframe.onload = h;
|
|
1542
1542
|
};
|
|
1543
|
-
const
|
|
1543
|
+
const Fn = {}, jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1544
1544
|
__proto__: null,
|
|
1545
|
-
default:
|
|
1546
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1547
|
-
var
|
|
1548
|
-
typeof WebSocket < "u" ?
|
|
1545
|
+
default: Fn
|
|
1546
|
+
}, Symbol.toStringTag, { value: "Module" })), Mn = /* @__PURE__ */ Ur(jn);
|
|
1547
|
+
var Oe = Ae(), qn = bt, zn = Et, Xn = Vt, Wn = cr, Kn = lt("engine.io-client:websocket"), Wt, xe;
|
|
1548
|
+
typeof WebSocket < "u" ? Wt = WebSocket : typeof self < "u" && (Wt = self.WebSocket || self.MozWebSocket);
|
|
1549
1549
|
if (typeof window > "u")
|
|
1550
1550
|
try {
|
|
1551
|
-
xe =
|
|
1551
|
+
xe = Mn;
|
|
1552
1552
|
} catch {
|
|
1553
1553
|
}
|
|
1554
|
-
var wt =
|
|
1554
|
+
var wt = Wt || xe, Hn = st;
|
|
1555
1555
|
function st(t) {
|
|
1556
1556
|
var e = t && t.forceBase64;
|
|
1557
|
-
e && (this.supportsBinary = !1), this.perMessageDeflate = t.perMessageDeflate, this.usingBrowserWebSocket =
|
|
1557
|
+
e && (this.supportsBinary = !1), this.perMessageDeflate = t.perMessageDeflate, this.usingBrowserWebSocket = Wt && !t.forceNode, this.protocols = t.protocols, this.usingBrowserWebSocket || (wt = xe), Oe.call(this, t);
|
|
1558
1558
|
}
|
|
1559
|
-
|
|
1559
|
+
Xn(st, Oe);
|
|
1560
1560
|
st.prototype.name = "websocket";
|
|
1561
1561
|
st.prototype.supportsBinary = !0;
|
|
1562
1562
|
st.prototype.doOpen = function() {
|
|
@@ -1588,7 +1588,7 @@ st.prototype.write = function(t) {
|
|
|
1588
1588
|
this.writable = !1;
|
|
1589
1589
|
for (var r = t.length, n = 0, o = r; n < o; n++)
|
|
1590
1590
|
(function(u) {
|
|
1591
|
-
|
|
1591
|
+
qn.encodePacket(u, e.supportsBinary, function(h) {
|
|
1592
1592
|
if (!e.usingBrowserWebSocket) {
|
|
1593
1593
|
var d = {};
|
|
1594
1594
|
if (u.options && (d.compress = u.options.compress), e.perMessageDeflate) {
|
|
@@ -1599,7 +1599,7 @@ st.prototype.write = function(t) {
|
|
|
1599
1599
|
try {
|
|
1600
1600
|
e.usingBrowserWebSocket ? e.ws.send(h) : e.ws.send(h, d);
|
|
1601
1601
|
} catch {
|
|
1602
|
-
|
|
1602
|
+
Kn("websocket closed before onclose event");
|
|
1603
1603
|
}
|
|
1604
1604
|
--r || i();
|
|
1605
1605
|
});
|
|
@@ -1611,62 +1611,62 @@ st.prototype.write = function(t) {
|
|
|
1611
1611
|
}
|
|
1612
1612
|
};
|
|
1613
1613
|
st.prototype.onClose = function() {
|
|
1614
|
-
|
|
1614
|
+
Oe.prototype.onClose.call(this);
|
|
1615
1615
|
};
|
|
1616
1616
|
st.prototype.doClose = function() {
|
|
1617
1617
|
typeof this.ws < "u" && this.ws.close();
|
|
1618
1618
|
};
|
|
1619
1619
|
st.prototype.uri = function() {
|
|
1620
1620
|
var t = this.query || {}, e = this.secure ? "wss" : "ws", r = "";
|
|
1621
|
-
this.port && (e === "wss" && Number(this.port) !== 443 || e === "ws" && Number(this.port) !== 80) && (r = ":" + this.port), this.timestampRequests && (t[this.timestampParam] =
|
|
1621
|
+
this.port && (e === "wss" && Number(this.port) !== 443 || e === "ws" && Number(this.port) !== 80) && (r = ":" + this.port), this.timestampRequests && (t[this.timestampParam] = Wn()), this.supportsBinary || (t.b64 = 1), t = zn.encode(t), t.length && (t = "?" + t);
|
|
1622
1622
|
var n = this.hostname.indexOf(":") !== -1;
|
|
1623
1623
|
return e + "://" + (n ? "[" + this.hostname + "]" : this.hostname) + r + this.path + t;
|
|
1624
1624
|
};
|
|
1625
1625
|
st.prototype.check = function() {
|
|
1626
1626
|
return !!wt && !("__initialize" in wt && this.name === st.prototype.name);
|
|
1627
1627
|
};
|
|
1628
|
-
var
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
function
|
|
1628
|
+
var Jn = Se, Vn = Bn, $n = Ln, Gn = Hn;
|
|
1629
|
+
Jt.polling = Yn;
|
|
1630
|
+
Jt.websocket = Gn;
|
|
1631
|
+
function Yn(t) {
|
|
1632
1632
|
var e, r = !1, n = !1, o = t.jsonp !== !1;
|
|
1633
1633
|
if (typeof location < "u") {
|
|
1634
1634
|
var i = location.protocol === "https:", u = location.port;
|
|
1635
1635
|
u || (u = i ? 443 : 80), r = t.hostname !== location.hostname || u !== t.port, n = t.secure !== i;
|
|
1636
1636
|
}
|
|
1637
|
-
if (t.xdomain = r, t.xscheme = n, e = new
|
|
1638
|
-
return new
|
|
1637
|
+
if (t.xdomain = r, t.xscheme = n, e = new Jn(t), "open" in e && !t.forceJSONP)
|
|
1638
|
+
return new Vn(t);
|
|
1639
1639
|
if (!o)
|
|
1640
1640
|
throw new Error("JSONP disabled");
|
|
1641
|
-
return new
|
|
1641
|
+
return new $n(t);
|
|
1642
1642
|
}
|
|
1643
|
-
var
|
|
1644
|
-
if (
|
|
1643
|
+
var Qn = [].indexOf, fr = function(t, e) {
|
|
1644
|
+
if (Qn)
|
|
1645
1645
|
return t.indexOf(e);
|
|
1646
1646
|
for (var r = 0; r < t.length; ++r)
|
|
1647
1647
|
if (t[r] === e)
|
|
1648
1648
|
return r;
|
|
1649
1649
|
return -1;
|
|
1650
|
-
},
|
|
1650
|
+
}, Zn = Jt, to = St, G = lt("engine.io-client:socket"), eo = fr, dr = bt, Xe = Ye, ro = Et, no = W;
|
|
1651
1651
|
function W(t, e) {
|
|
1652
1652
|
if (!(this instanceof W))
|
|
1653
1653
|
return new W(t, e);
|
|
1654
|
-
e = e || {}, t && typeof t == "object" && (e = t, t = null), t ? (t =
|
|
1654
|
+
e = e || {}, t && typeof t == "object" && (e = t, t = null), t ? (t = Xe(t), e.hostname = t.host, e.secure = t.protocol === "https" || t.protocol === "wss", e.port = t.port, t.query && (e.query = t.query)) : e.host && (e.hostname = Xe(e.host).host), this.secure = e.secure != null ? e.secure : typeof location < "u" && location.protocol === "https:", e.hostname && !e.port && (e.port = this.secure ? "443" : "80"), this.agent = e.agent || !1, this.hostname = e.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = e.port || (typeof location < "u" && location.port ? location.port : this.secure ? 443 : 80), this.query = e.query || {}, typeof this.query == "string" && (this.query = ro.decode(this.query)), this.upgrade = e.upgrade !== !1, this.path = (e.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!e.forceJSONP, this.jsonp = e.jsonp !== !1, this.forceBase64 = !!e.forceBase64, this.enablesXDR = !!e.enablesXDR, this.withCredentials = e.withCredentials !== !1, this.timestampParam = e.timestampParam || "t", this.timestampRequests = e.timestampRequests, this.transports = e.transports || ["polling", "websocket"], this.transportOptions = e.transportOptions || {}, this.readyState = "", this.writeBuffer = [], this.prevBufferLen = 0, this.policyPort = e.policyPort || 843, this.rememberUpgrade = e.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = e.onlyBinaryUpgrades, this.perMessageDeflate = e.perMessageDeflate !== !1 ? e.perMessageDeflate || {} : !1, this.perMessageDeflate === !0 && (this.perMessageDeflate = {}), this.perMessageDeflate && this.perMessageDeflate.threshold == null && (this.perMessageDeflate.threshold = 1024), this.pfx = e.pfx || void 0, this.key = e.key || void 0, this.passphrase = e.passphrase || void 0, this.cert = e.cert || void 0, this.ca = e.ca || void 0, this.ciphers = e.ciphers || void 0, this.rejectUnauthorized = e.rejectUnauthorized === void 0 ? !0 : e.rejectUnauthorized, this.forceNode = !!e.forceNode, this.isReactNative = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative", (typeof self > "u" || this.isReactNative) && (e.extraHeaders && Object.keys(e.extraHeaders).length > 0 && (this.extraHeaders = e.extraHeaders), e.localAddress && (this.localAddress = e.localAddress)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingIntervalTimer = null, this.pingTimeoutTimer = null, this.open();
|
|
1655
1655
|
}
|
|
1656
1656
|
W.priorWebsocketSuccess = !1;
|
|
1657
|
-
|
|
1658
|
-
W.protocol =
|
|
1657
|
+
to(W.prototype);
|
|
1658
|
+
W.protocol = dr.protocol;
|
|
1659
1659
|
W.Socket = W;
|
|
1660
|
-
W.Transport =
|
|
1661
|
-
W.transports =
|
|
1662
|
-
W.parser =
|
|
1660
|
+
W.Transport = Ae();
|
|
1661
|
+
W.transports = Jt;
|
|
1662
|
+
W.parser = bt;
|
|
1663
1663
|
W.prototype.createTransport = function(t) {
|
|
1664
1664
|
G('creating transport "%s"', t);
|
|
1665
|
-
var e =
|
|
1666
|
-
e.EIO =
|
|
1665
|
+
var e = oo(this.query);
|
|
1666
|
+
e.EIO = dr.protocol, e.transport = t;
|
|
1667
1667
|
var r = this.transportOptions[t] || {};
|
|
1668
1668
|
this.id && (e.sid = this.id);
|
|
1669
|
-
var n = new
|
|
1669
|
+
var n = new Zn[t]({
|
|
1670
1670
|
query: e,
|
|
1671
1671
|
socket: this,
|
|
1672
1672
|
agent: r.agent || this.agent,
|
|
@@ -1699,7 +1699,7 @@ W.prototype.createTransport = function(t) {
|
|
|
1699
1699
|
});
|
|
1700
1700
|
return n;
|
|
1701
1701
|
};
|
|
1702
|
-
function
|
|
1702
|
+
function oo(t) {
|
|
1703
1703
|
var e = {};
|
|
1704
1704
|
for (var r in t)
|
|
1705
1705
|
t.hasOwnProperty(r) && (e[r] = t[r]);
|
|
@@ -1884,37 +1884,37 @@ W.prototype.onClose = function(t, e) {
|
|
|
1884
1884
|
};
|
|
1885
1885
|
W.prototype.filterUpgrades = function(t) {
|
|
1886
1886
|
for (var e = [], r = 0, n = t.length; r < n; r++)
|
|
1887
|
-
~
|
|
1887
|
+
~eo(this.transports, t[r]) && e.push(t[r]);
|
|
1888
1888
|
return e;
|
|
1889
1889
|
};
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
var
|
|
1893
|
-
function
|
|
1890
|
+
Ce.exports = no;
|
|
1891
|
+
Ce.exports.parser = bt;
|
|
1892
|
+
var so = Ce.exports, yr = { exports: {} }, io = ao;
|
|
1893
|
+
function ao(t, e) {
|
|
1894
1894
|
var r = [];
|
|
1895
1895
|
e = e || 0;
|
|
1896
1896
|
for (var n = e || 0; n < t.length; n++)
|
|
1897
1897
|
r[n - e] = t[n];
|
|
1898
1898
|
return r;
|
|
1899
1899
|
}
|
|
1900
|
-
var
|
|
1901
|
-
function
|
|
1900
|
+
var gr = co;
|
|
1901
|
+
function co(t, e, r) {
|
|
1902
1902
|
return t.on(e, r), {
|
|
1903
1903
|
destroy: function() {
|
|
1904
1904
|
t.removeListener(e, r);
|
|
1905
1905
|
}
|
|
1906
1906
|
};
|
|
1907
1907
|
}
|
|
1908
|
-
var
|
|
1908
|
+
var We = [].slice, mr = function(t, e) {
|
|
1909
1909
|
if (typeof e == "string" && (e = t[e]), typeof e != "function")
|
|
1910
1910
|
throw new Error("bind() requires a function");
|
|
1911
|
-
var r =
|
|
1911
|
+
var r = We.call(arguments, 2);
|
|
1912
1912
|
return function() {
|
|
1913
|
-
return e.apply(t, r.concat(
|
|
1913
|
+
return e.apply(t, r.concat(We.call(arguments)));
|
|
1914
1914
|
};
|
|
1915
1915
|
};
|
|
1916
1916
|
(function(t, e) {
|
|
1917
|
-
var r =
|
|
1917
|
+
var r = Kt, n = St, o = io, i = gr, u = mr, h = lt("socket.io-client:socket"), d = Et, c = nr;
|
|
1918
1918
|
t.exports = a;
|
|
1919
1919
|
var l = {
|
|
1920
1920
|
connect: 1,
|
|
@@ -2037,12 +2037,12 @@ var Xe = [].slice, gr = function(t, e) {
|
|
|
2037
2037
|
}, a.prototype.binary = function(s) {
|
|
2038
2038
|
return this.flags.binary = s, this;
|
|
2039
2039
|
};
|
|
2040
|
-
})(
|
|
2041
|
-
var
|
|
2042
|
-
function
|
|
2040
|
+
})(yr);
|
|
2041
|
+
var vr = yr.exports, ho = Nt;
|
|
2042
|
+
function Nt(t) {
|
|
2043
2043
|
t = t || {}, this.ms = t.min || 100, this.max = t.max || 1e4, this.factor = t.factor || 2, this.jitter = t.jitter > 0 && t.jitter <= 1 ? t.jitter : 0, this.attempts = 0;
|
|
2044
2044
|
}
|
|
2045
|
-
|
|
2045
|
+
Nt.prototype.duration = function() {
|
|
2046
2046
|
var t = this.ms * Math.pow(this.factor, this.attempts++);
|
|
2047
2047
|
if (this.jitter) {
|
|
2048
2048
|
var e = Math.random(), r = Math.floor(e * this.jitter * t);
|
|
@@ -2050,28 +2050,28 @@ Tt.prototype.duration = function() {
|
|
|
2050
2050
|
}
|
|
2051
2051
|
return Math.min(t, this.max) | 0;
|
|
2052
2052
|
};
|
|
2053
|
-
|
|
2053
|
+
Nt.prototype.reset = function() {
|
|
2054
2054
|
this.attempts = 0;
|
|
2055
2055
|
};
|
|
2056
|
-
|
|
2056
|
+
Nt.prototype.setMin = function(t) {
|
|
2057
2057
|
this.ms = t;
|
|
2058
2058
|
};
|
|
2059
|
-
|
|
2059
|
+
Nt.prototype.setMax = function(t) {
|
|
2060
2060
|
this.max = t;
|
|
2061
2061
|
};
|
|
2062
|
-
|
|
2062
|
+
Nt.prototype.setJitter = function(t) {
|
|
2063
2063
|
this.jitter = t;
|
|
2064
2064
|
};
|
|
2065
|
-
var
|
|
2065
|
+
var po = so, uo = vr, lo = St, fo = Kt, ft = gr, Ct = mr, Z = lt("socket.io-client:manager"), br = fr, yo = ho, kr = Object.prototype.hasOwnProperty, Ke = K;
|
|
2066
2066
|
function K(t, e) {
|
|
2067
2067
|
if (!(this instanceof K))
|
|
2068
2068
|
return new K(t, e);
|
|
2069
|
-
t && typeof t == "object" && (e = t, t = void 0), e = e || {}, e.path = e.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = e, this.reconnection(e.reconnection !== !1), this.reconnectionAttempts(e.reconnectionAttempts || 1 / 0), this.reconnectionDelay(e.reconnectionDelay || 1e3), this.reconnectionDelayMax(e.reconnectionDelayMax || 5e3), this.randomizationFactor(e.randomizationFactor || 0.5), this.backoff = new
|
|
2069
|
+
t && typeof t == "object" && (e = t, t = void 0), e = e || {}, e.path = e.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = e, this.reconnection(e.reconnection !== !1), this.reconnectionAttempts(e.reconnectionAttempts || 1 / 0), this.reconnectionDelay(e.reconnectionDelay || 1e3), this.reconnectionDelayMax(e.reconnectionDelayMax || 5e3), this.randomizationFactor(e.randomizationFactor || 0.5), this.backoff = new yo({
|
|
2070
2070
|
min: this.reconnectionDelay(),
|
|
2071
2071
|
max: this.reconnectionDelayMax(),
|
|
2072
2072
|
jitter: this.randomizationFactor()
|
|
2073
2073
|
}), this.timeout(e.timeout == null ? 2e4 : e.timeout), this.readyState = "closed", this.uri = t, this.connecting = [], this.lastPing = null, this.encoding = !1, this.packetBuffer = [];
|
|
2074
|
-
var r = e.parser ||
|
|
2074
|
+
var r = e.parser || fo;
|
|
2075
2075
|
this.encoder = new r.Encoder(), this.decoder = new r.Decoder(), this.autoConnect = e.autoConnect !== !1, this.autoConnect && this.open();
|
|
2076
2076
|
}
|
|
2077
2077
|
K.prototype.emitAll = function() {
|
|
@@ -2086,7 +2086,7 @@ K.prototype.updateSocketIds = function() {
|
|
|
2086
2086
|
K.prototype.generateId = function(t) {
|
|
2087
2087
|
return (t === "/" ? "" : t + "#") + this.engine.id;
|
|
2088
2088
|
};
|
|
2089
|
-
|
|
2089
|
+
lo(K.prototype);
|
|
2090
2090
|
K.prototype.reconnection = function(t) {
|
|
2091
2091
|
return arguments.length ? (this._reconnection = !!t, this) : this._reconnection;
|
|
2092
2092
|
};
|
|
@@ -2111,7 +2111,7 @@ K.prototype.maybeReconnectOnOpen = function() {
|
|
|
2111
2111
|
K.prototype.open = K.prototype.connect = function(t, e) {
|
|
2112
2112
|
if (Z("readyState %s", this.readyState), ~this.readyState.indexOf("open"))
|
|
2113
2113
|
return this;
|
|
2114
|
-
Z("opening %s", this.uri), this.engine =
|
|
2114
|
+
Z("opening %s", this.uri), this.engine = po(this.uri, this.opts);
|
|
2115
2115
|
var r = this.engine, n = this;
|
|
2116
2116
|
this.readyState = "opening", this.skipReconnect = !1;
|
|
2117
2117
|
var o = ft(r, "open", function() {
|
|
@@ -2140,7 +2140,7 @@ K.prototype.open = K.prototype.connect = function(t, e) {
|
|
|
2140
2140
|
K.prototype.onopen = function() {
|
|
2141
2141
|
Z("open"), this.cleanup(), this.readyState = "open", this.emit("open");
|
|
2142
2142
|
var t = this.engine;
|
|
2143
|
-
this.subs.push(ft(t, "data",
|
|
2143
|
+
this.subs.push(ft(t, "data", Ct(this, "ondata"))), this.subs.push(ft(t, "ping", Ct(this, "onping"))), this.subs.push(ft(t, "pong", Ct(this, "onpong"))), this.subs.push(ft(t, "error", Ct(this, "onerror"))), this.subs.push(ft(t, "close", Ct(this, "onclose"))), this.subs.push(ft(this.decoder, "decoded", Ct(this, "ondecoded")));
|
|
2144
2144
|
};
|
|
2145
2145
|
K.prototype.onping = function() {
|
|
2146
2146
|
this.lastPing = /* @__PURE__ */ new Date(), this.emitAll("ping");
|
|
@@ -2160,19 +2160,19 @@ K.prototype.onerror = function(t) {
|
|
|
2160
2160
|
K.prototype.socket = function(t, e) {
|
|
2161
2161
|
var r = this.nsps[t];
|
|
2162
2162
|
if (!r) {
|
|
2163
|
-
r = new
|
|
2163
|
+
r = new uo(this, t, e), this.nsps[t] = r;
|
|
2164
2164
|
var n = this;
|
|
2165
2165
|
r.on("connecting", o), r.on("connect", function() {
|
|
2166
2166
|
r.id = n.generateId(t);
|
|
2167
2167
|
}), this.autoConnect && o();
|
|
2168
2168
|
}
|
|
2169
2169
|
function o() {
|
|
2170
|
-
~
|
|
2170
|
+
~br(n.connecting, r) || n.connecting.push(r);
|
|
2171
2171
|
}
|
|
2172
2172
|
return r;
|
|
2173
2173
|
};
|
|
2174
2174
|
K.prototype.destroy = function(t) {
|
|
2175
|
-
var e =
|
|
2175
|
+
var e = br(this.connecting, t);
|
|
2176
2176
|
~e && this.connecting.splice(e, 1), !this.connecting.length && this.close();
|
|
2177
2177
|
};
|
|
2178
2178
|
K.prototype.packet = function(t) {
|
|
@@ -2230,7 +2230,7 @@ K.prototype.onreconnect = function() {
|
|
|
2230
2230
|
this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", t);
|
|
2231
2231
|
};
|
|
2232
2232
|
(function(t, e) {
|
|
2233
|
-
var r =
|
|
2233
|
+
var r = Jr, n = Kt, o = Ke, i = lt("socket.io-client");
|
|
2234
2234
|
t.exports = e = h;
|
|
2235
2235
|
var u = e.managers = {};
|
|
2236
2236
|
function h(d, c) {
|
|
@@ -2238,16 +2238,16 @@ K.prototype.onreconnect = function() {
|
|
|
2238
2238
|
var l = r(d), p = l.source, a = l.id, s = l.path, f = u[a] && s in u[a].nsps, y = c.forceNew || c["force new connection"] || c.multiplex === !1 || f, g;
|
|
2239
2239
|
return y ? (i("ignoring socket cache for %s", p), g = o(p, c)) : (u[a] || (i("new io instance for %s", p), u[a] = o(p, c)), g = u[a]), l.query && !c.query && (c.query = l.query), g.socket(l.path, c);
|
|
2240
2240
|
}
|
|
2241
|
-
e.protocol = n.protocol, e.connect = h, e.Manager =
|
|
2242
|
-
})(
|
|
2243
|
-
var
|
|
2244
|
-
const
|
|
2245
|
-
let
|
|
2246
|
-
const
|
|
2247
|
-
function
|
|
2248
|
-
if (!
|
|
2241
|
+
e.protocol = n.protocol, e.connect = h, e.Manager = Ke, e.Socket = vr;
|
|
2242
|
+
})(pe, pe.exports);
|
|
2243
|
+
var go = pe.exports;
|
|
2244
|
+
const mo = /* @__PURE__ */ Lr(go);
|
|
2245
|
+
let jt;
|
|
2246
|
+
const vo = new Uint8Array(16);
|
|
2247
|
+
function bo() {
|
|
2248
|
+
if (!jt && (jt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !jt))
|
|
2249
2249
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2250
|
-
return
|
|
2250
|
+
return jt(vo);
|
|
2251
2251
|
}
|
|
2252
2252
|
const Q = [];
|
|
2253
2253
|
for (let t = 0; t < 256; ++t)
|
|
@@ -2255,14 +2255,14 @@ for (let t = 0; t < 256; ++t)
|
|
|
2255
2255
|
function ko(t, e = 0) {
|
|
2256
2256
|
return Q[t[e + 0]] + Q[t[e + 1]] + Q[t[e + 2]] + Q[t[e + 3]] + "-" + Q[t[e + 4]] + Q[t[e + 5]] + "-" + Q[t[e + 6]] + Q[t[e + 7]] + "-" + Q[t[e + 8]] + Q[t[e + 9]] + "-" + Q[t[e + 10]] + Q[t[e + 11]] + Q[t[e + 12]] + Q[t[e + 13]] + Q[t[e + 14]] + Q[t[e + 15]];
|
|
2257
2257
|
}
|
|
2258
|
-
const
|
|
2259
|
-
randomUUID:
|
|
2258
|
+
const Co = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), He = {
|
|
2259
|
+
randomUUID: Co
|
|
2260
2260
|
};
|
|
2261
2261
|
function wo(t, e, r) {
|
|
2262
|
-
if (
|
|
2263
|
-
return
|
|
2262
|
+
if (He.randomUUID && !e && !t)
|
|
2263
|
+
return He.randomUUID();
|
|
2264
2264
|
t = t || {};
|
|
2265
|
-
const n = t.random || (t.rng ||
|
|
2265
|
+
const n = t.random || (t.rng || bo)();
|
|
2266
2266
|
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) {
|
|
2267
2267
|
r = r || 0;
|
|
2268
2268
|
for (let o = 0; o < 16; ++o)
|
|
@@ -2271,7 +2271,7 @@ function wo(t, e, r) {
|
|
|
2271
2271
|
}
|
|
2272
2272
|
return ko(n);
|
|
2273
2273
|
}
|
|
2274
|
-
function
|
|
2274
|
+
function So(t, e) {
|
|
2275
2275
|
const r = e.map((o) => JSON.stringify(o)).join(" "), n = (/* @__PURE__ */ new Date()).toISOString();
|
|
2276
2276
|
return JSON.stringify({
|
|
2277
2277
|
level: t,
|
|
@@ -2279,11 +2279,11 @@ function Co(t, e) {
|
|
|
2279
2279
|
message: r
|
|
2280
2280
|
});
|
|
2281
2281
|
}
|
|
2282
|
-
function
|
|
2282
|
+
function Eo(t, e) {
|
|
2283
2283
|
const r = JSON.parse(t);
|
|
2284
2284
|
return e.forEach((n) => delete r[n]), r;
|
|
2285
2285
|
}
|
|
2286
|
-
function
|
|
2286
|
+
function Ao(t) {
|
|
2287
2287
|
if (typeof t == "object" && t !== null)
|
|
2288
2288
|
return t;
|
|
2289
2289
|
try {
|
|
@@ -2292,7 +2292,7 @@ function Eo(t) {
|
|
|
2292
2292
|
return { extraData: t };
|
|
2293
2293
|
}
|
|
2294
2294
|
}
|
|
2295
|
-
function
|
|
2295
|
+
function To(t) {
|
|
2296
2296
|
const e = /\(([^)]+)\)/, r = t.match(e);
|
|
2297
2297
|
if (r && r[1]) {
|
|
2298
2298
|
const n = r[1].split(";");
|
|
@@ -2302,7 +2302,7 @@ function Ao(t) {
|
|
|
2302
2302
|
}
|
|
2303
2303
|
return "Unknown";
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2305
|
+
function Je(t) {
|
|
2306
2306
|
return (...e) => new Promise((r, n) => {
|
|
2307
2307
|
try {
|
|
2308
2308
|
const o = t(...e);
|
|
@@ -2312,7 +2312,7 @@ function He(t) {
|
|
|
2312
2312
|
}
|
|
2313
2313
|
});
|
|
2314
2314
|
}
|
|
2315
|
-
const
|
|
2315
|
+
const No = {
|
|
2316
2316
|
reconnection: !0,
|
|
2317
2317
|
reconnectionDelay: 5e3,
|
|
2318
2318
|
reconnectionAttempts: 10,
|
|
@@ -2320,7 +2320,7 @@ const To = {
|
|
|
2320
2320
|
upgrade: !1,
|
|
2321
2321
|
transports: ["websocket"],
|
|
2322
2322
|
debug: !1
|
|
2323
|
-
},
|
|
2323
|
+
}, ae = {
|
|
2324
2324
|
logToConsole: !0,
|
|
2325
2325
|
overloadGlobalConsole: !1,
|
|
2326
2326
|
socketEmitInterval: 6e4
|
|
@@ -2344,7 +2344,7 @@ const To = {
|
|
|
2344
2344
|
CHECK: "Check",
|
|
2345
2345
|
WEBHOOK: "Webhook",
|
|
2346
2346
|
WSCONNECT: "WSConnect"
|
|
2347
|
-
},
|
|
2347
|
+
}, Oo = {
|
|
2348
2348
|
Create: 1,
|
|
2349
2349
|
Read: 2,
|
|
2350
2350
|
Update: 3,
|
|
@@ -2387,7 +2387,7 @@ class xo {
|
|
|
2387
2387
|
const { loggerOptions: r } = e;
|
|
2388
2388
|
if (!r.system)
|
|
2389
2389
|
throw new Error("Config property 'system' should be provided!");
|
|
2390
|
-
this.isGetItemAsync = r.isGetItemAsync || !1, this.isSetItemAsync = r.isSetItemAsync || !1, this.setupStorageFunctions(r.getItem, r.setItem, r.parseLog), this.system = r.system, this.socketEmitInterval = r.socketEmitInterval ||
|
|
2390
|
+
this.isGetItemAsync = r.isGetItemAsync || !1, this.isSetItemAsync = r.isSetItemAsync || !1, this.setupStorageFunctions(r.getItem, r.setItem, r.parseLog), this.system = r.system, this.socketEmitInterval = r.socketEmitInterval || ae.socketEmitInterval, this.logToConsole = r.logToConsole !== void 0 ? r.logToConsole : ae.logToConsole, this.overloadGlobalConsole = r.overloadGlobalConsole !== void 0 ? r.overloadGlobalConsole : ae.overloadGlobalConsole, this.storageId = this.getStorageName(), this.queue = [], this.processing = !1, this.storageInitialized = !1, this.emitInProgress = !1, this.logIndex = 0, this.init(e);
|
|
2391
2391
|
}
|
|
2392
2392
|
/**
|
|
2393
2393
|
* Used to setup storage functions and logs parser function.
|
|
@@ -2397,7 +2397,7 @@ class xo {
|
|
|
2397
2397
|
* @return void
|
|
2398
2398
|
*/
|
|
2399
2399
|
setupStorageFunctions(e, r, n) {
|
|
2400
|
-
this.getItem = e && typeof e == "function" ? this.isGetItemAsync ? e :
|
|
2400
|
+
this.getItem = e && typeof e == "function" ? this.isGetItemAsync ? e : Je(e) : this.defaultGetItemFunction, this.setItem = r && typeof r == "function" ? this.isSetItemAsync ? r : Je(r) : this.defaultSetItemFunction, this.parseLog = n && typeof n == "function" ? n : So;
|
|
2401
2401
|
}
|
|
2402
2402
|
/**
|
|
2403
2403
|
* Used to initialize logger. Initializes storage, establishes socket connection and overloads console if needed
|
|
@@ -2426,10 +2426,10 @@ class xo {
|
|
|
2426
2426
|
*/
|
|
2427
2427
|
createConnection(e, r = {}) {
|
|
2428
2428
|
const n = {
|
|
2429
|
-
...
|
|
2429
|
+
...No,
|
|
2430
2430
|
...r
|
|
2431
2431
|
};
|
|
2432
|
-
return
|
|
2432
|
+
return mo(e, n);
|
|
2433
2433
|
}
|
|
2434
2434
|
/**
|
|
2435
2435
|
* Emits stored logs to the server and clears the log storage in case the emit operation was successful
|
|
@@ -2452,7 +2452,7 @@ class xo {
|
|
|
2452
2452
|
if (!this.socket || !this.socket.connected)
|
|
2453
2453
|
throw new Error("Socket is disconnected");
|
|
2454
2454
|
for (const d of i) {
|
|
2455
|
-
const c =
|
|
2455
|
+
const c = Ao(n[d]), l = {
|
|
2456
2456
|
...this.staticObject,
|
|
2457
2457
|
...c
|
|
2458
2458
|
}, p = this.populateSendingLog(l);
|
|
@@ -2461,7 +2461,7 @@ class xo {
|
|
|
2461
2461
|
const u = await this.getItem(this.storageId);
|
|
2462
2462
|
if (!u)
|
|
2463
2463
|
return;
|
|
2464
|
-
const h =
|
|
2464
|
+
const h = Eo(u, o);
|
|
2465
2465
|
this.localObject = {}, await this.setItem(this.storageId, JSON.stringify(h));
|
|
2466
2466
|
} catch (e) {
|
|
2467
2467
|
this._errorMethod(e);
|
|
@@ -2477,7 +2477,7 @@ class xo {
|
|
|
2477
2477
|
const r = {
|
|
2478
2478
|
...e
|
|
2479
2479
|
}, n = r.ActionName;
|
|
2480
|
-
return n && (r.ActionID =
|
|
2480
|
+
return n && (r.ActionID = Oo[n]), r;
|
|
2481
2481
|
}
|
|
2482
2482
|
/**
|
|
2483
2483
|
* Used to set a static object which will be send in every message
|
|
@@ -2495,7 +2495,7 @@ class xo {
|
|
|
2495
2495
|
let r;
|
|
2496
2496
|
typeof window < "u" && typeof window.document < "u" ? r = window == null ? void 0 : window.navigator.userAgent : typeof self < "u" && self.navigator && (r = self.navigator.userAgent);
|
|
2497
2497
|
let n;
|
|
2498
|
-
return r && (n =
|
|
2498
|
+
return r && (n = To(r)), {
|
|
2499
2499
|
System: this.system,
|
|
2500
2500
|
DateTime: e,
|
|
2501
2501
|
UserAgent: r,
|
|
@@ -2664,7 +2664,7 @@ class xo {
|
|
|
2664
2664
|
return this.logIndex++, `${e}-${this.system}-${r}-${this.logIndex}`;
|
|
2665
2665
|
}
|
|
2666
2666
|
}
|
|
2667
|
-
class
|
|
2667
|
+
class Ro {
|
|
2668
2668
|
constructor(e) {
|
|
2669
2669
|
H(this, "delay", 1e3);
|
|
2670
2670
|
H(this, "lastLoginTimestamp");
|
|
@@ -2678,23 +2678,26 @@ class Oo {
|
|
|
2678
2678
|
email: e.email,
|
|
2679
2679
|
password: e.password
|
|
2680
2680
|
};
|
|
2681
|
-
if (this.storageKey =
|
|
2681
|
+
if (this.storageKey = Ir(JSON.stringify({
|
|
2682
2682
|
...e,
|
|
2683
2683
|
loggerSocketConnection: null
|
|
2684
2684
|
})), this.lastLoginTimestamp && this.lastLoginTimestamp + this.delay > (/* @__PURE__ */ new Date()).getTime())
|
|
2685
2685
|
return;
|
|
2686
|
-
this.updateLastLoginTimestamp()
|
|
2686
|
+
this.updateLastLoginTimestamp();
|
|
2687
|
+
const n = await this.checkLoginStatus(this.storageKey);
|
|
2688
|
+
return n || (It.clearSessionStorage(), await this.userLoginFunction(r, this.storageKey, e.loginType));
|
|
2687
2689
|
}
|
|
2688
2690
|
updateLastLoginTimestamp() {
|
|
2689
2691
|
this.lastLoginTimestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
2690
2692
|
}
|
|
2691
2693
|
async checkLoginStatus(e) {
|
|
2692
|
-
const r = await
|
|
2693
|
-
|
|
2694
|
+
const r = await It.getSessionStorageDataByKey(e);
|
|
2695
|
+
if (r)
|
|
2696
|
+
return r;
|
|
2694
2697
|
}
|
|
2695
2698
|
async userLoginFunction(e, r, n) {
|
|
2696
2699
|
let o, i, u;
|
|
2697
|
-
this.eventsSdkClass.options.isNewStack ? (o = await this.externalLogin(
|
|
2700
|
+
return this.eventsSdkClass.options.isNewStack ? (o = await this.externalLogin(
|
|
2698
2701
|
this.eventsSdkClass.options.loginUrl,
|
|
2699
2702
|
e,
|
|
2700
2703
|
n
|
|
@@ -2707,7 +2710,7 @@ class Oo {
|
|
|
2707
2710
|
n
|
|
2708
2711
|
), u = {
|
|
2709
2712
|
...o.Data.Socket
|
|
2710
|
-
}),
|
|
2713
|
+
}), await It.updateSessionStorageKey(r, u), u;
|
|
2711
2714
|
}
|
|
2712
2715
|
onLoginResponse(e) {
|
|
2713
2716
|
if (!this.eventsSdkClass.options.isNewStack && this.eventsSdkClass.options.servers && (this.eventsSdkClass.servers = [...this.eventsSdkClass.options.servers], this.eventsSdkClass.server = this.eventsSdkClass.servers.reduce(
|
|
@@ -2720,7 +2723,7 @@ class Oo {
|
|
|
2720
2723
|
throw new Error("Socket servers not defined");
|
|
2721
2724
|
if (this.eventsSdkClass.options.isNewStack && !this.eventsSdkClass.servers.length)
|
|
2722
2725
|
throw new Error("Socket servers not defined");
|
|
2723
|
-
this.eventsSdkClass.server && this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`), !this.eventsSdkClass.server && this.eventsSdkClass.URLList.length && this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${e.Version}`), e.IdentityCode && (this.token = e.IdentityCode, this.eventsSdkClass.connect(
|
|
2726
|
+
this.eventsSdkClass.server && this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`), !this.eventsSdkClass.server && this.eventsSdkClass.URLList.length && this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${e.Version}`), e.IdentityCode && (this.token = e.IdentityCode, this.eventsSdkClass.connect(vt.MAIN)), e.Token && (this.token = e.Token, this.eventsSdkClass.connect(vt.MAIN)), e.RefreshToken && e.IdentityCodeExpiry && this.eventsSdkClass.options.loginType === it.USER && (this.eventsSdkClass.options.refreshToken = e.RefreshToken, this.eventsSdkClass.options.tokenExpiry = e.IdentityCodeExpiry, this.handleTokenExpiry()), e.RefreshToken && e.TokenExpiry && this.normalizeLoginType(this.eventsSdkClass.options.loginType) === it.USER && (this.eventsSdkClass.options.refreshToken = e.RefreshToken, this.eventsSdkClass.options.tokenExpiry = e.TokenExpiry, this.handleTokenExpiry());
|
|
2724
2727
|
}
|
|
2725
2728
|
handleTokenExpiry() {
|
|
2726
2729
|
if (!this.eventsSdkClass.options.refreshTokenUrl)
|
|
@@ -2752,7 +2755,7 @@ class Oo {
|
|
|
2752
2755
|
this.eventsSdkClass.options.refreshToken
|
|
2753
2756
|
)).Data.Socket
|
|
2754
2757
|
};
|
|
2755
|
-
this.onLoginResponse(i), await
|
|
2758
|
+
this.onLoginResponse(i), await It.updateSessionStorageKey(this.storageKey, i);
|
|
2756
2759
|
}
|
|
2757
2760
|
},
|
|
2758
2761
|
n
|
|
@@ -2855,7 +2858,7 @@ class Oo {
|
|
|
2855
2858
|
return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
2856
2859
|
}
|
|
2857
2860
|
}
|
|
2858
|
-
const
|
|
2861
|
+
const Io = {
|
|
2859
2862
|
loginUrl: "https://loginapi.voicenter.co.il/monitorAPI/Login",
|
|
2860
2863
|
refreshTokenUrl: "https://loginapi.voicenter.co.il/monitorAPI/RefreshIdentityToken",
|
|
2861
2864
|
isNewStack: !1,
|
|
@@ -2889,8 +2892,8 @@ const Ro = {
|
|
|
2889
2892
|
debug: !1
|
|
2890
2893
|
}
|
|
2891
2894
|
};
|
|
2892
|
-
function
|
|
2893
|
-
return
|
|
2895
|
+
function Bo() {
|
|
2896
|
+
return function t(e, r, n) {
|
|
2894
2897
|
function o(h, d) {
|
|
2895
2898
|
if (!r[h]) {
|
|
2896
2899
|
if (!e[h]) {
|
|
@@ -2967,17 +2970,17 @@ function Io() {
|
|
|
2967
2970
|
f.onopen(), a && a();
|
|
2968
2971
|
}), g = h(s, "error", function(_) {
|
|
2969
2972
|
if (c("connect_error"), f.cleanup(), f.readyState = "closed", f.emitAll("connect_error", _), a) {
|
|
2970
|
-
var
|
|
2971
|
-
|
|
2973
|
+
var k = new Error("Connection error");
|
|
2974
|
+
k.data = _, a(k);
|
|
2972
2975
|
} else
|
|
2973
2976
|
f.maybeReconnectOnOpen();
|
|
2974
2977
|
});
|
|
2975
2978
|
if (this._timeout !== !1) {
|
|
2976
|
-
var
|
|
2977
|
-
c("connect attempt will timeout after %d",
|
|
2979
|
+
var w = this._timeout;
|
|
2980
|
+
c("connect attempt will timeout after %d", w);
|
|
2978
2981
|
var B = setTimeout(function() {
|
|
2979
|
-
c("connect attempt timed out after %d",
|
|
2980
|
-
},
|
|
2982
|
+
c("connect attempt timed out after %d", w), y.destroy(), s.close(), s.emit("error", "timeout"), f.emitAll("connect_timeout", w);
|
|
2983
|
+
}, w);
|
|
2981
2984
|
this.subs.push({
|
|
2982
2985
|
destroy: function() {
|
|
2983
2986
|
clearTimeout(B);
|
|
@@ -3151,8 +3154,8 @@ function Io() {
|
|
|
3151
3154
|
y = !0;
|
|
3152
3155
|
var g = u(arguments);
|
|
3153
3156
|
c("sending ack %j", g);
|
|
3154
|
-
var
|
|
3155
|
-
f.packet({ type:
|
|
3157
|
+
var w = l(g) ? o.BINARY_ACK : o.ACK;
|
|
3158
|
+
f.packet({ type: w, id: s, data: g });
|
|
3156
3159
|
}
|
|
3157
3160
|
};
|
|
3158
3161
|
}, n.prototype.onack = function(s) {
|
|
@@ -3402,8 +3405,8 @@ function Io() {
|
|
|
3402
3405
|
});
|
|
3403
3406
|
}, n.prototype.probe = function(s) {
|
|
3404
3407
|
function f() {
|
|
3405
|
-
if (
|
|
3406
|
-
var E = !this.supportsBinary &&
|
|
3408
|
+
if (C.onlyBinaryUpgrades) {
|
|
3409
|
+
var E = !this.supportsBinary && C.transport.supportsBinary;
|
|
3407
3410
|
m = m || E;
|
|
3408
3411
|
}
|
|
3409
3412
|
m || (h('probe transport "%s" opened', s), S.send([{
|
|
@@ -3412,26 +3415,26 @@ function Io() {
|
|
|
3412
3415
|
}]), S.once("packet", function(v) {
|
|
3413
3416
|
if (!m)
|
|
3414
3417
|
if (v.type == "pong" && v.data == "probe") {
|
|
3415
|
-
if (h('probe transport "%s" pong', s),
|
|
3418
|
+
if (h('probe transport "%s" pong', s), C.upgrading = !0, C.emit("upgrading", S), !S)
|
|
3416
3419
|
return;
|
|
3417
|
-
n.priorWebsocketSuccess = S.name == "websocket", h('pausing current transport "%s"',
|
|
3418
|
-
m ||
|
|
3420
|
+
n.priorWebsocketSuccess = S.name == "websocket", h('pausing current transport "%s"', C.transport.name), C.transport.pause(function() {
|
|
3421
|
+
m || C.readyState != "closed" && (h("changing transport and sending upgrade packet"), k(), C.setTransport(S), S.send([{ type: "upgrade" }]), C.emit("upgrade", S), S = null, C.upgrading = !1, C.flush());
|
|
3419
3422
|
});
|
|
3420
3423
|
} else {
|
|
3421
3424
|
h('probe transport "%s" failed', s);
|
|
3422
|
-
var
|
|
3423
|
-
|
|
3425
|
+
var b = new Error("probe error");
|
|
3426
|
+
b.transport = S.name, C.emit("upgradeError", b);
|
|
3424
3427
|
}
|
|
3425
3428
|
}));
|
|
3426
3429
|
}
|
|
3427
3430
|
function y() {
|
|
3428
|
-
m || (m = !0,
|
|
3431
|
+
m || (m = !0, k(), S.close(), S = null);
|
|
3429
3432
|
}
|
|
3430
3433
|
function g(E) {
|
|
3431
3434
|
var v = new Error("probe error: " + E);
|
|
3432
|
-
v.transport = S.name, y(), h('probe transport "%s" failed because of error: %s', s, E),
|
|
3435
|
+
v.transport = S.name, y(), h('probe transport "%s" failed because of error: %s', s, E), C.emit("upgradeError", v);
|
|
3433
3436
|
}
|
|
3434
|
-
function
|
|
3437
|
+
function w() {
|
|
3435
3438
|
g("transport closed");
|
|
3436
3439
|
}
|
|
3437
3440
|
function B() {
|
|
@@ -3440,12 +3443,12 @@ function Io() {
|
|
|
3440
3443
|
function _(E) {
|
|
3441
3444
|
S && E.name != S.name && (h('"%s" works - aborting "%s"', E.name, S.name), y());
|
|
3442
3445
|
}
|
|
3443
|
-
function
|
|
3444
|
-
S.removeListener("open", f), S.removeListener("error", g), S.removeListener("close",
|
|
3446
|
+
function k() {
|
|
3447
|
+
S.removeListener("open", f), S.removeListener("error", g), S.removeListener("close", w), C.removeListener("close", B), C.removeListener("upgrading", _);
|
|
3445
3448
|
}
|
|
3446
3449
|
h('probing transport "%s"', s);
|
|
3447
|
-
var S = this.createTransport(s, { probe: 1 }), m = !1,
|
|
3448
|
-
n.priorWebsocketSuccess = !1, S.once("open", f), S.once("error", g), S.once("close",
|
|
3450
|
+
var S = this.createTransport(s, { probe: 1 }), m = !1, C = this;
|
|
3451
|
+
n.priorWebsocketSuccess = !1, S.once("open", f), S.once("error", g), S.once("close", w), this.once("close", B), this.once("upgrading", _), S.open();
|
|
3449
3452
|
}, n.prototype.onOpen = function() {
|
|
3450
3453
|
if (h("socket open"), this.readyState = "open", n.priorWebsocketSuccess = this.transport.name == "websocket", this.emit("open"), this.flush(), this.readyState == "open" && this.upgrade && this.transport.pause) {
|
|
3451
3454
|
h("starting upgrade probes");
|
|
@@ -3626,8 +3629,8 @@ function Io() {
|
|
|
3626
3629
|
if (f.iframe)
|
|
3627
3630
|
try {
|
|
3628
3631
|
f.form.removeChild(f.iframe);
|
|
3629
|
-
} catch (
|
|
3630
|
-
f.onError("jsonp polling iframe removal error",
|
|
3632
|
+
} catch (k) {
|
|
3633
|
+
f.onError("jsonp polling iframe removal error", k);
|
|
3631
3634
|
}
|
|
3632
3635
|
try {
|
|
3633
3636
|
var _ = '<iframe src="javascript:0" name="' + f.iframeId + '">';
|
|
@@ -3639,8 +3642,8 @@ function Io() {
|
|
|
3639
3642
|
}
|
|
3640
3643
|
var f = this;
|
|
3641
3644
|
if (!this.form) {
|
|
3642
|
-
var y, g = document.createElement("form"),
|
|
3643
|
-
g.className = "socketio", g.style.position = "absolute", g.style.top = "-1000px", g.style.left = "-1000px", g.target = B, g.method = "POST", g.setAttribute("accept-charset", "utf-8"),
|
|
3645
|
+
var y, g = document.createElement("form"), w = document.createElement("textarea"), B = this.iframeId = "eio_iframe_" + this.index;
|
|
3646
|
+
g.className = "socketio", g.style.position = "absolute", g.style.top = "-1000px", g.style.left = "-1000px", g.target = B, g.method = "POST", g.setAttribute("accept-charset", "utf-8"), w.name = "d", g.appendChild(w), document.body.appendChild(g), this.form = g, this.area = w;
|
|
3644
3647
|
}
|
|
3645
3648
|
this.form.action = this.uri(), s(), l = l.replace(c, `\\
|
|
3646
3649
|
`), this.area.value = l.replace(d, "\\n");
|
|
@@ -3676,8 +3679,8 @@ function Io() {
|
|
|
3676
3679
|
return a = a || {}, a.uri = this.uri(), a.xd = this.xd, a.xs = this.xs, a.agent = this.agent || !1, a.supportsBinary = this.supportsBinary, a.enablesXDR = this.enablesXDR, a.pfx = this.pfx, a.key = this.key, a.passphrase = this.passphrase, a.cert = this.cert, a.ca = this.ca, a.ciphers = this.ciphers, a.rejectUnauthorized = this.rejectUnauthorized, new i(a);
|
|
3677
3680
|
}, o.prototype.doWrite = function(a, s) {
|
|
3678
3681
|
var f = typeof a != "string" && a !== void 0, y = this.request({ method: "POST", data: a, isBinary: f }), g = this;
|
|
3679
|
-
y.on("success", s), y.on("error", function(
|
|
3680
|
-
g.onError("xhr post error",
|
|
3682
|
+
y.on("success", s), y.on("error", function(w) {
|
|
3683
|
+
g.onError("xhr post error", w);
|
|
3681
3684
|
}), this.sendXhr = y;
|
|
3682
3685
|
}, o.prototype.doPoll = function() {
|
|
3683
3686
|
p("xhr poll");
|
|
@@ -3935,8 +3938,8 @@ function Io() {
|
|
|
3935
3938
|
function a() {
|
|
3936
3939
|
}
|
|
3937
3940
|
function s() {
|
|
3938
|
-
var y = s, g = +/* @__PURE__ */ new Date(),
|
|
3939
|
-
y.diff =
|
|
3941
|
+
var y = s, g = +/* @__PURE__ */ new Date(), w = g - (c || g);
|
|
3942
|
+
y.diff = w, y.prev = c, y.curr = g, c = g, y.useColors == null && (y.useColors = r.useColors()), y.color == null && y.useColors && (y.color = n());
|
|
3940
3943
|
var B = Array.prototype.slice.call(arguments);
|
|
3941
3944
|
B[0] = r.coerce(B[0]), typeof B[0] != "string" && (B = ["%o"].concat(B));
|
|
3942
3945
|
var _ = 0;
|
|
@@ -3944,15 +3947,15 @@ function Io() {
|
|
|
3944
3947
|
if (S === "%%")
|
|
3945
3948
|
return S;
|
|
3946
3949
|
_++;
|
|
3947
|
-
var
|
|
3948
|
-
if (typeof
|
|
3950
|
+
var C = r.formatters[m];
|
|
3951
|
+
if (typeof C == "function") {
|
|
3949
3952
|
var E = B[_];
|
|
3950
|
-
S =
|
|
3953
|
+
S = C.call(y, E), B.splice(_, 1), _--;
|
|
3951
3954
|
}
|
|
3952
3955
|
return S;
|
|
3953
3956
|
}), typeof r.formatArgs == "function" && (B = r.formatArgs.apply(y, B));
|
|
3954
|
-
var
|
|
3955
|
-
|
|
3957
|
+
var k = s.log || r.log || console.log.bind(console);
|
|
3958
|
+
k.apply(y, B);
|
|
3956
3959
|
}
|
|
3957
3960
|
a.enabled = !1, s.enabled = !0;
|
|
3958
3961
|
var f = r.enabled(p) ? s : a;
|
|
@@ -4029,201 +4032,201 @@ function Io() {
|
|
|
4029
4032
|
}, {}],
|
|
4030
4033
|
25: [function(t, e, r) {
|
|
4031
4034
|
(function(n) {
|
|
4032
|
-
function o(m,
|
|
4035
|
+
function o(m, C) {
|
|
4033
4036
|
var E = "b" + r.packets[m.type] + m.data.data;
|
|
4034
|
-
return
|
|
4037
|
+
return C(E);
|
|
4035
4038
|
}
|
|
4036
|
-
function i(m,
|
|
4037
|
-
if (!
|
|
4039
|
+
function i(m, C, E) {
|
|
4040
|
+
if (!C)
|
|
4038
4041
|
return r.encodeBase64Packet(m, E);
|
|
4039
|
-
var v = m.data,
|
|
4042
|
+
var v = m.data, b = new Uint8Array(v), T = new Uint8Array(1 + v.byteLength);
|
|
4040
4043
|
T[0] = B[m.type];
|
|
4041
|
-
for (var
|
|
4042
|
-
T[
|
|
4044
|
+
for (var O = 0; O < b.length; O++)
|
|
4045
|
+
T[O + 1] = b[O];
|
|
4043
4046
|
return E(T.buffer);
|
|
4044
4047
|
}
|
|
4045
|
-
function u(m,
|
|
4046
|
-
if (!
|
|
4048
|
+
function u(m, C, E) {
|
|
4049
|
+
if (!C)
|
|
4047
4050
|
return r.encodeBase64Packet(m, E);
|
|
4048
4051
|
var v = new FileReader();
|
|
4049
4052
|
return v.onload = function() {
|
|
4050
|
-
m.data = v.result, r.encodePacket(m,
|
|
4053
|
+
m.data = v.result, r.encodePacket(m, C, !0, E);
|
|
4051
4054
|
}, v.readAsArrayBuffer(m.data);
|
|
4052
4055
|
}
|
|
4053
|
-
function h(m,
|
|
4054
|
-
if (!
|
|
4056
|
+
function h(m, C, E) {
|
|
4057
|
+
if (!C)
|
|
4055
4058
|
return r.encodeBase64Packet(m, E);
|
|
4056
|
-
if (
|
|
4057
|
-
return u(m,
|
|
4059
|
+
if (w)
|
|
4060
|
+
return u(m, C, E);
|
|
4058
4061
|
var v = new Uint8Array(1);
|
|
4059
4062
|
v[0] = B[m.type];
|
|
4060
|
-
var
|
|
4061
|
-
return E(
|
|
4063
|
+
var b = new S([v.buffer, m.data]);
|
|
4064
|
+
return E(b);
|
|
4062
4065
|
}
|
|
4063
|
-
function d(m,
|
|
4064
|
-
for (var v = new Array(m.length),
|
|
4065
|
-
|
|
4066
|
-
v[
|
|
4066
|
+
function d(m, C, E) {
|
|
4067
|
+
for (var v = new Array(m.length), b = s(m.length, E), T = function(x, A, q) {
|
|
4068
|
+
C(A, function(j, $) {
|
|
4069
|
+
v[x] = $, q(j, v);
|
|
4067
4070
|
});
|
|
4068
|
-
},
|
|
4069
|
-
T(
|
|
4071
|
+
}, O = 0; O < m.length; O++)
|
|
4072
|
+
T(O, m[O], b);
|
|
4070
4073
|
}
|
|
4071
|
-
var c = t("./keys"), l = t("has-binary"), p = t("arraybuffer.slice"), a = t("base64-arraybuffer"), s = t("after"), f = t("utf8"), y = navigator.userAgent.match(/Android/i), g = /PhantomJS/i.test(navigator.userAgent),
|
|
4074
|
+
var c = t("./keys"), l = t("has-binary"), p = t("arraybuffer.slice"), a = t("base64-arraybuffer"), s = t("after"), f = t("utf8"), y = navigator.userAgent.match(/Android/i), g = /PhantomJS/i.test(navigator.userAgent), w = y || g;
|
|
4072
4075
|
r.protocol = 3;
|
|
4073
|
-
var B = r.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, _ = c(B),
|
|
4074
|
-
r.encodePacket = function(m,
|
|
4075
|
-
typeof
|
|
4076
|
-
var
|
|
4077
|
-
if (n.ArrayBuffer &&
|
|
4078
|
-
return i(m,
|
|
4079
|
-
if (S &&
|
|
4080
|
-
return h(m,
|
|
4081
|
-
if (
|
|
4076
|
+
var B = r.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, _ = c(B), k = { type: "error", data: "parser error" }, S = t("blob");
|
|
4077
|
+
r.encodePacket = function(m, C, E, v) {
|
|
4078
|
+
typeof C == "function" && (v = C, C = !1), typeof E == "function" && (v = E, E = null);
|
|
4079
|
+
var b = m.data === void 0 ? void 0 : m.data.buffer || m.data;
|
|
4080
|
+
if (n.ArrayBuffer && b instanceof ArrayBuffer)
|
|
4081
|
+
return i(m, C, v);
|
|
4082
|
+
if (S && b instanceof n.Blob)
|
|
4083
|
+
return h(m, C, v);
|
|
4084
|
+
if (b && b.base64)
|
|
4082
4085
|
return o(m, v);
|
|
4083
4086
|
var T = B[m.type];
|
|
4084
4087
|
return m.data !== void 0 && (T += E ? f.encode(String(m.data)) : String(m.data)), v("" + T);
|
|
4085
|
-
}, r.encodeBase64Packet = function(m,
|
|
4088
|
+
}, r.encodeBase64Packet = function(m, C) {
|
|
4086
4089
|
var E = "b" + r.packets[m.type];
|
|
4087
4090
|
if (S && m.data instanceof S) {
|
|
4088
4091
|
var v = new FileReader();
|
|
4089
4092
|
return v.onload = function() {
|
|
4090
4093
|
var A = v.result.split(",")[1];
|
|
4091
|
-
|
|
4094
|
+
C(E + A);
|
|
4092
4095
|
}, v.readAsDataURL(m.data);
|
|
4093
4096
|
}
|
|
4094
|
-
var
|
|
4097
|
+
var b;
|
|
4095
4098
|
try {
|
|
4096
|
-
|
|
4099
|
+
b = String.fromCharCode.apply(null, new Uint8Array(m.data));
|
|
4097
4100
|
} catch {
|
|
4098
|
-
for (var T = new Uint8Array(m.data),
|
|
4099
|
-
x
|
|
4100
|
-
|
|
4101
|
+
for (var T = new Uint8Array(m.data), O = new Array(T.length), x = 0; x < T.length; x++)
|
|
4102
|
+
O[x] = T[x];
|
|
4103
|
+
b = String.fromCharCode.apply(null, O);
|
|
4101
4104
|
}
|
|
4102
|
-
return E += n.btoa(
|
|
4103
|
-
}, r.decodePacket = function(m,
|
|
4105
|
+
return E += n.btoa(b), C(E);
|
|
4106
|
+
}, r.decodePacket = function(m, C, E) {
|
|
4104
4107
|
if (typeof m == "string" || m === void 0) {
|
|
4105
4108
|
if (m.charAt(0) == "b")
|
|
4106
|
-
return r.decodeBase64Packet(m.substr(1),
|
|
4109
|
+
return r.decodeBase64Packet(m.substr(1), C);
|
|
4107
4110
|
if (E)
|
|
4108
4111
|
try {
|
|
4109
4112
|
m = f.decode(m);
|
|
4110
4113
|
} catch {
|
|
4111
|
-
return
|
|
4114
|
+
return k;
|
|
4112
4115
|
}
|
|
4113
|
-
var
|
|
4114
|
-
return Number(
|
|
4115
|
-
type: _[
|
|
4116
|
+
var b = m.charAt(0);
|
|
4117
|
+
return Number(b) == b && _[b] ? m.length > 1 ? {
|
|
4118
|
+
type: _[b],
|
|
4116
4119
|
data: m.substring(1)
|
|
4117
|
-
} : { type: _[
|
|
4120
|
+
} : { type: _[b] } : k;
|
|
4118
4121
|
}
|
|
4119
|
-
var v = new Uint8Array(m),
|
|
4120
|
-
return S &&
|
|
4121
|
-
}, r.decodeBase64Packet = function(m,
|
|
4122
|
+
var v = new Uint8Array(m), b = v[0], T = p(m, 1);
|
|
4123
|
+
return S && C === "blob" && (T = new S([T])), { type: _[b], data: T };
|
|
4124
|
+
}, r.decodeBase64Packet = function(m, C) {
|
|
4122
4125
|
var E = _[m.charAt(0)];
|
|
4123
4126
|
if (!n.ArrayBuffer)
|
|
4124
4127
|
return { type: E, data: { base64: !0, data: m.substr(1) } };
|
|
4125
4128
|
var v = a.decode(m.substr(1));
|
|
4126
|
-
return
|
|
4127
|
-
}, r.encodePayload = function(m,
|
|
4128
|
-
function v(
|
|
4129
|
-
return
|
|
4129
|
+
return C === "blob" && S && (v = new S([v])), { type: E, data: v };
|
|
4130
|
+
}, r.encodePayload = function(m, C, E) {
|
|
4131
|
+
function v(O) {
|
|
4132
|
+
return O.length + ":" + O;
|
|
4130
4133
|
}
|
|
4131
|
-
function
|
|
4132
|
-
r.encodePacket(
|
|
4133
|
-
|
|
4134
|
+
function b(O, x) {
|
|
4135
|
+
r.encodePacket(O, T ? C : !1, !0, function(A) {
|
|
4136
|
+
x(null, v(A));
|
|
4134
4137
|
});
|
|
4135
4138
|
}
|
|
4136
|
-
typeof
|
|
4139
|
+
typeof C == "function" && (E = C, C = null);
|
|
4137
4140
|
var T = l(m);
|
|
4138
|
-
return
|
|
4139
|
-
return E(
|
|
4141
|
+
return C && T ? S && !w ? r.encodePayloadAsBlob(m, E) : r.encodePayloadAsArrayBuffer(m, E) : m.length ? void d(m, b, function(O, x) {
|
|
4142
|
+
return E(x.join(""));
|
|
4140
4143
|
}) : E("0:");
|
|
4141
|
-
}, r.decodePayload = function(m,
|
|
4144
|
+
}, r.decodePayload = function(m, C, E) {
|
|
4142
4145
|
if (typeof m != "string")
|
|
4143
|
-
return r.decodePayloadAsBinary(m,
|
|
4144
|
-
typeof
|
|
4146
|
+
return r.decodePayloadAsBinary(m, C, E);
|
|
4147
|
+
typeof C == "function" && (E = C, C = null);
|
|
4145
4148
|
var v;
|
|
4146
4149
|
if (m == "")
|
|
4147
|
-
return E(
|
|
4148
|
-
for (var
|
|
4149
|
-
var q = m.charAt(
|
|
4150
|
+
return E(k, 0, 1);
|
|
4151
|
+
for (var b, T, O = "", x = 0, A = m.length; A > x; x++) {
|
|
4152
|
+
var q = m.charAt(x);
|
|
4150
4153
|
if (q != ":")
|
|
4151
|
-
|
|
4154
|
+
O += q;
|
|
4152
4155
|
else {
|
|
4153
|
-
if (
|
|
4154
|
-
return E(
|
|
4156
|
+
if (O == "" || O != (b = Number(O)) || (T = m.substr(x + 1, b), O != T.length))
|
|
4157
|
+
return E(k, 0, 1);
|
|
4155
4158
|
if (T.length) {
|
|
4156
|
-
if (v = r.decodePacket(T,
|
|
4157
|
-
return E(
|
|
4158
|
-
var j = E(v,
|
|
4159
|
+
if (v = r.decodePacket(T, C, !0), k.type == v.type && k.data == v.data)
|
|
4160
|
+
return E(k, 0, 1);
|
|
4161
|
+
var j = E(v, x + b, A);
|
|
4159
4162
|
if (j === !1)
|
|
4160
4163
|
return;
|
|
4161
4164
|
}
|
|
4162
|
-
|
|
4165
|
+
x += b, O = "";
|
|
4163
4166
|
}
|
|
4164
4167
|
}
|
|
4165
|
-
return
|
|
4166
|
-
}, r.encodePayloadAsArrayBuffer = function(m,
|
|
4167
|
-
function E(v,
|
|
4168
|
+
return O != "" ? E(k, 0, 1) : void 0;
|
|
4169
|
+
}, r.encodePayloadAsArrayBuffer = function(m, C) {
|
|
4170
|
+
function E(v, b) {
|
|
4168
4171
|
r.encodePacket(v, !0, !0, function(T) {
|
|
4169
|
-
return
|
|
4172
|
+
return b(null, T);
|
|
4170
4173
|
});
|
|
4171
4174
|
}
|
|
4172
|
-
return m.length ? void d(m, E, function(v,
|
|
4173
|
-
var T =
|
|
4175
|
+
return m.length ? void d(m, E, function(v, b) {
|
|
4176
|
+
var T = b.reduce(function(A, q) {
|
|
4174
4177
|
var j;
|
|
4175
4178
|
return j = typeof q == "string" ? q.length : q.byteLength, A + j.toString().length + j + 2;
|
|
4176
|
-
}, 0),
|
|
4177
|
-
return
|
|
4179
|
+
}, 0), O = new Uint8Array(T), x = 0;
|
|
4180
|
+
return b.forEach(function(A) {
|
|
4178
4181
|
var q = typeof A == "string", j = A;
|
|
4179
4182
|
if (q) {
|
|
4180
4183
|
for (var $ = new Uint8Array(A.length), X = 0; X < A.length; X++)
|
|
4181
4184
|
$[X] = A.charCodeAt(X);
|
|
4182
4185
|
j = $.buffer;
|
|
4183
4186
|
}
|
|
4184
|
-
x
|
|
4187
|
+
O[x++] = q ? 0 : 1;
|
|
4185
4188
|
for (var et = j.byteLength.toString(), X = 0; X < et.length; X++)
|
|
4186
|
-
x
|
|
4187
|
-
x
|
|
4189
|
+
O[x++] = parseInt(et[X]);
|
|
4190
|
+
O[x++] = 255;
|
|
4188
4191
|
for (var $ = new Uint8Array(j), X = 0; X < $.length; X++)
|
|
4189
|
-
x
|
|
4190
|
-
}),
|
|
4191
|
-
}) :
|
|
4192
|
-
}, r.encodePayloadAsBlob = function(m,
|
|
4193
|
-
function E(v,
|
|
4192
|
+
O[x++] = $[X];
|
|
4193
|
+
}), C(O.buffer);
|
|
4194
|
+
}) : C(new ArrayBuffer(0));
|
|
4195
|
+
}, r.encodePayloadAsBlob = function(m, C) {
|
|
4196
|
+
function E(v, b) {
|
|
4194
4197
|
r.encodePacket(v, !0, !0, function(T) {
|
|
4195
|
-
var
|
|
4196
|
-
if (
|
|
4197
|
-
for (var
|
|
4198
|
-
|
|
4199
|
-
T =
|
|
4198
|
+
var O = new Uint8Array(1);
|
|
4199
|
+
if (O[0] = 1, typeof T == "string") {
|
|
4200
|
+
for (var x = new Uint8Array(T.length), A = 0; A < T.length; A++)
|
|
4201
|
+
x[A] = T.charCodeAt(A);
|
|
4202
|
+
T = x.buffer, O[0] = 0;
|
|
4200
4203
|
}
|
|
4201
4204
|
for (var q = T instanceof ArrayBuffer ? T.byteLength : T.size, j = q.toString(), $ = new Uint8Array(j.length + 1), A = 0; A < j.length; A++)
|
|
4202
4205
|
$[A] = parseInt(j[A]);
|
|
4203
4206
|
if ($[j.length] = 255, S) {
|
|
4204
|
-
var X = new S([
|
|
4205
|
-
|
|
4207
|
+
var X = new S([O.buffer, $.buffer, T]);
|
|
4208
|
+
b(null, X);
|
|
4206
4209
|
}
|
|
4207
4210
|
});
|
|
4208
4211
|
}
|
|
4209
|
-
d(m, E, function(v,
|
|
4210
|
-
return
|
|
4212
|
+
d(m, E, function(v, b) {
|
|
4213
|
+
return C(new S(b));
|
|
4211
4214
|
});
|
|
4212
|
-
}, r.decodePayloadAsBinary = function(m,
|
|
4213
|
-
typeof
|
|
4214
|
-
for (var v = m,
|
|
4215
|
-
for (var
|
|
4215
|
+
}, r.decodePayloadAsBinary = function(m, C, E) {
|
|
4216
|
+
typeof C == "function" && (E = C, C = null);
|
|
4217
|
+
for (var v = m, b = [], T = !1; v.byteLength > 0; ) {
|
|
4218
|
+
for (var O = new Uint8Array(v), x = O[0] === 0, A = "", q = 1; O[q] != 255; q++) {
|
|
4216
4219
|
if (A.length > 310) {
|
|
4217
4220
|
T = !0;
|
|
4218
4221
|
break;
|
|
4219
4222
|
}
|
|
4220
|
-
A +=
|
|
4223
|
+
A += O[q];
|
|
4221
4224
|
}
|
|
4222
4225
|
if (T)
|
|
4223
|
-
return E(
|
|
4226
|
+
return E(k, 0, 1);
|
|
4224
4227
|
v = p(v, 2 + A.length), A = parseInt(A);
|
|
4225
4228
|
var j = p(v, 0, A);
|
|
4226
|
-
if (
|
|
4229
|
+
if (x)
|
|
4227
4230
|
try {
|
|
4228
4231
|
j = String.fromCharCode.apply(null, new Uint8Array(j));
|
|
4229
4232
|
} catch {
|
|
@@ -4232,11 +4235,11 @@ function Io() {
|
|
|
4232
4235
|
for (var q = 0; q < $.length; q++)
|
|
4233
4236
|
j += String.fromCharCode($[q]);
|
|
4234
4237
|
}
|
|
4235
|
-
|
|
4238
|
+
b.push(j), v = p(v, A);
|
|
4236
4239
|
}
|
|
4237
|
-
var X =
|
|
4238
|
-
|
|
4239
|
-
E(r.decodePacket(et,
|
|
4240
|
+
var X = b.length;
|
|
4241
|
+
b.forEach(function(et, Ot) {
|
|
4242
|
+
E(r.decodePacket(et, C, !0), Ot, X);
|
|
4240
4243
|
});
|
|
4241
4244
|
};
|
|
4242
4245
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -4350,80 +4353,80 @@ function Io() {
|
|
|
4350
4353
|
(function(n) {
|
|
4351
4354
|
(function(o) {
|
|
4352
4355
|
function i(v) {
|
|
4353
|
-
for (var
|
|
4354
|
-
|
|
4355
|
-
return
|
|
4356
|
+
for (var b, T, O = [], x = 0, A = v.length; A > x; )
|
|
4357
|
+
b = v.charCodeAt(x++), b >= 55296 && 56319 >= b && A > x ? (T = v.charCodeAt(x++), (64512 & T) == 56320 ? O.push(((1023 & b) << 10) + (1023 & T) + 65536) : (O.push(b), x--)) : O.push(b);
|
|
4358
|
+
return O;
|
|
4356
4359
|
}
|
|
4357
4360
|
function u(v) {
|
|
4358
|
-
for (var
|
|
4359
|
-
|
|
4360
|
-
return
|
|
4361
|
+
for (var b, T = v.length, O = -1, x = ""; ++O < T; )
|
|
4362
|
+
b = v[O], b > 65535 && (b -= 65536, x += k(b >>> 10 & 1023 | 55296), b = 56320 | 1023 & b), x += k(b);
|
|
4363
|
+
return x;
|
|
4361
4364
|
}
|
|
4362
4365
|
function h(v) {
|
|
4363
4366
|
if (v >= 55296 && 57343 >= v)
|
|
4364
4367
|
throw Error("Lone surrogate U+" + v.toString(16).toUpperCase() + " is not a scalar value");
|
|
4365
4368
|
}
|
|
4366
|
-
function d(v,
|
|
4367
|
-
return
|
|
4369
|
+
function d(v, b) {
|
|
4370
|
+
return k(v >> b & 63 | 128);
|
|
4368
4371
|
}
|
|
4369
4372
|
function c(v) {
|
|
4370
4373
|
if (!(4294967168 & v))
|
|
4371
|
-
return
|
|
4372
|
-
var
|
|
4373
|
-
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (
|
|
4374
|
+
return k(v);
|
|
4375
|
+
var b = "";
|
|
4376
|
+
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (b = k(v >> 18 & 7 | 240), b += d(v, 12), b += d(v, 6)) : (h(v), b = k(v >> 12 & 15 | 224), b += d(v, 6)) : b = k(v >> 6 & 31 | 192), b += k(63 & v | 128);
|
|
4374
4377
|
}
|
|
4375
4378
|
function l(v) {
|
|
4376
|
-
for (var
|
|
4377
|
-
|
|
4379
|
+
for (var b, T = i(v), O = T.length, x = -1, A = ""; ++x < O; )
|
|
4380
|
+
b = T[x], A += c(b);
|
|
4378
4381
|
return A;
|
|
4379
4382
|
}
|
|
4380
4383
|
function p() {
|
|
4381
4384
|
if (_ >= B)
|
|
4382
4385
|
throw Error("Invalid byte index");
|
|
4383
|
-
var v = 255 &
|
|
4386
|
+
var v = 255 & w[_];
|
|
4384
4387
|
if (_++, (192 & v) == 128)
|
|
4385
4388
|
return 63 & v;
|
|
4386
4389
|
throw Error("Invalid continuation byte");
|
|
4387
4390
|
}
|
|
4388
4391
|
function a() {
|
|
4389
|
-
var v,
|
|
4392
|
+
var v, b, T, O, x;
|
|
4390
4393
|
if (_ > B)
|
|
4391
4394
|
throw Error("Invalid byte index");
|
|
4392
4395
|
if (_ == B)
|
|
4393
4396
|
return !1;
|
|
4394
|
-
if (v = 255 &
|
|
4397
|
+
if (v = 255 & w[_], _++, (128 & v) == 0)
|
|
4395
4398
|
return v;
|
|
4396
4399
|
if ((224 & v) == 192) {
|
|
4397
|
-
var
|
|
4398
|
-
if (
|
|
4399
|
-
return
|
|
4400
|
+
var b = p();
|
|
4401
|
+
if (x = (31 & v) << 6 | b, x >= 128)
|
|
4402
|
+
return x;
|
|
4400
4403
|
throw Error("Invalid continuation byte");
|
|
4401
4404
|
}
|
|
4402
4405
|
if ((240 & v) == 224) {
|
|
4403
|
-
if (
|
|
4404
|
-
return h(
|
|
4406
|
+
if (b = p(), T = p(), x = (15 & v) << 12 | b << 6 | T, x >= 2048)
|
|
4407
|
+
return h(x), x;
|
|
4405
4408
|
throw Error("Invalid continuation byte");
|
|
4406
4409
|
}
|
|
4407
|
-
if ((248 & v) == 240 && (
|
|
4408
|
-
return
|
|
4410
|
+
if ((248 & v) == 240 && (b = p(), T = p(), O = p(), x = (15 & v) << 18 | b << 12 | T << 6 | O, x >= 65536 && 1114111 >= x))
|
|
4411
|
+
return x;
|
|
4409
4412
|
throw Error("Invalid UTF-8 detected");
|
|
4410
4413
|
}
|
|
4411
4414
|
function s(v) {
|
|
4412
|
-
|
|
4413
|
-
for (var
|
|
4414
|
-
T.push(
|
|
4415
|
+
w = i(v), B = w.length, _ = 0;
|
|
4416
|
+
for (var b, T = []; (b = a()) !== !1; )
|
|
4417
|
+
T.push(b);
|
|
4415
4418
|
return u(T);
|
|
4416
4419
|
}
|
|
4417
4420
|
var f = typeof r == "object" && r, y = typeof e == "object" && e && e.exports == f && e, g = typeof n == "object" && n;
|
|
4418
4421
|
(g.global === g || g.window === g) && (o = g);
|
|
4419
|
-
var
|
|
4422
|
+
var w, B, _, k = String.fromCharCode, S = { version: "2.0.0", encode: l, decode: s };
|
|
4420
4423
|
if (f && !f.nodeType)
|
|
4421
4424
|
if (y)
|
|
4422
4425
|
y.exports = S;
|
|
4423
4426
|
else {
|
|
4424
|
-
var m = {},
|
|
4427
|
+
var m = {}, C = m.hasOwnProperty;
|
|
4425
4428
|
for (var E in S)
|
|
4426
|
-
|
|
4429
|
+
C.call(S, E) && (f[E] = S[E]);
|
|
4427
4430
|
}
|
|
4428
4431
|
else
|
|
4429
4432
|
o.utf8 = S;
|
|
@@ -4627,54 +4630,54 @@ function Io() {
|
|
|
4627
4630
|
function n() {
|
|
4628
4631
|
}
|
|
4629
4632
|
function o(y) {
|
|
4630
|
-
var g = "",
|
|
4631
|
-
return g += y.type, (r.BINARY_EVENT == y.type || r.BINARY_ACK == y.type) && (g += y.attachments, g += "-"), y.nsp && y.nsp != "/" && (
|
|
4633
|
+
var g = "", w = !1;
|
|
4634
|
+
return g += y.type, (r.BINARY_EVENT == y.type || r.BINARY_ACK == y.type) && (g += y.attachments, g += "-"), y.nsp && y.nsp != "/" && (w = !0, g += y.nsp), y.id != null && (w && (g += ",", w = !1), g += y.id), y.data != null && (w && (g += ","), g += p.stringify(y.data)), l("encoded %j as %s", y, g), g;
|
|
4632
4635
|
}
|
|
4633
4636
|
function i(y, g) {
|
|
4634
|
-
function
|
|
4635
|
-
var _ = s.deconstructPacket(B),
|
|
4636
|
-
S.unshift(
|
|
4637
|
+
function w(B) {
|
|
4638
|
+
var _ = s.deconstructPacket(B), k = o(_.packet), S = _.buffers;
|
|
4639
|
+
S.unshift(k), g(S);
|
|
4637
4640
|
}
|
|
4638
|
-
s.removeBlobs(y,
|
|
4641
|
+
s.removeBlobs(y, w);
|
|
4639
4642
|
}
|
|
4640
4643
|
function u() {
|
|
4641
4644
|
this.reconstructor = null;
|
|
4642
4645
|
}
|
|
4643
4646
|
function h(y) {
|
|
4644
|
-
var g = {},
|
|
4647
|
+
var g = {}, w = 0;
|
|
4645
4648
|
if (g.type = Number(y.charAt(0)), r.types[g.type] == null)
|
|
4646
4649
|
return c();
|
|
4647
4650
|
if (r.BINARY_EVENT == g.type || r.BINARY_ACK == g.type) {
|
|
4648
|
-
for (var B = ""; y.charAt(++
|
|
4651
|
+
for (var B = ""; y.charAt(++w) != "-" && (B += y.charAt(w), w != y.length); )
|
|
4649
4652
|
;
|
|
4650
|
-
if (B != Number(B) || y.charAt(
|
|
4653
|
+
if (B != Number(B) || y.charAt(w) != "-")
|
|
4651
4654
|
throw new Error("Illegal attachments");
|
|
4652
4655
|
g.attachments = Number(B);
|
|
4653
4656
|
}
|
|
4654
|
-
if (y.charAt(
|
|
4655
|
-
for (g.nsp = ""; ++
|
|
4656
|
-
var _ = y.charAt(
|
|
4657
|
-
if (_ == "," || (g.nsp += _,
|
|
4657
|
+
if (y.charAt(w + 1) == "/")
|
|
4658
|
+
for (g.nsp = ""; ++w; ) {
|
|
4659
|
+
var _ = y.charAt(w);
|
|
4660
|
+
if (_ == "," || (g.nsp += _, w == y.length))
|
|
4658
4661
|
break;
|
|
4659
4662
|
}
|
|
4660
4663
|
else
|
|
4661
4664
|
g.nsp = "/";
|
|
4662
|
-
var
|
|
4663
|
-
if (
|
|
4664
|
-
for (g.id = ""; ++
|
|
4665
|
-
var _ = y.charAt(
|
|
4665
|
+
var k = y.charAt(w + 1);
|
|
4666
|
+
if (k !== "" && Number(k) == k) {
|
|
4667
|
+
for (g.id = ""; ++w; ) {
|
|
4668
|
+
var _ = y.charAt(w);
|
|
4666
4669
|
if (_ == null || Number(_) != _) {
|
|
4667
|
-
--
|
|
4670
|
+
--w;
|
|
4668
4671
|
break;
|
|
4669
4672
|
}
|
|
4670
|
-
if (g.id += y.charAt(
|
|
4673
|
+
if (g.id += y.charAt(w), w == y.length)
|
|
4671
4674
|
break;
|
|
4672
4675
|
}
|
|
4673
4676
|
g.id = Number(g.id);
|
|
4674
4677
|
}
|
|
4675
|
-
if (y.charAt(++
|
|
4678
|
+
if (y.charAt(++w))
|
|
4676
4679
|
try {
|
|
4677
|
-
g.data = p.parse(y.substr(
|
|
4680
|
+
g.data = p.parse(y.substr(w));
|
|
4678
4681
|
} catch {
|
|
4679
4682
|
return c();
|
|
4680
4683
|
}
|
|
@@ -4691,8 +4694,8 @@ function Io() {
|
|
|
4691
4694
|
if (l("encoding packet %j", y), r.BINARY_EVENT == y.type || r.BINARY_ACK == y.type)
|
|
4692
4695
|
i(y, g);
|
|
4693
4696
|
else {
|
|
4694
|
-
var
|
|
4695
|
-
g([
|
|
4697
|
+
var w = o(y);
|
|
4698
|
+
g([w]);
|
|
4696
4699
|
}
|
|
4697
4700
|
}, a(u.prototype), u.prototype.add = function(y) {
|
|
4698
4701
|
var g;
|
|
@@ -4798,10 +4801,10 @@ function Io() {
|
|
|
4798
4801
|
} catch {
|
|
4799
4802
|
}
|
|
4800
4803
|
if (!o("json")) {
|
|
4801
|
-
var a = "[object Function]", s = "[object Date]", f = "[object Number]", y = "[object String]", g = "[object Array]",
|
|
4804
|
+
var a = "[object Function]", s = "[object Date]", f = "[object Number]", y = "[object String]", g = "[object Array]", w = "[object Boolean]", B = o("bug-string-char-index");
|
|
4802
4805
|
if (!p)
|
|
4803
|
-
var _ = Math.floor,
|
|
4804
|
-
return
|
|
4806
|
+
var _ = Math.floor, k = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], S = function(R, U) {
|
|
4807
|
+
return k[U] + 365 * (R - 1970) + _((R - 1969 + (U = +(U > 1))) / 4) - _((R - 1901 + U) / 100) + _((R - 1601 + U) / 400);
|
|
4805
4808
|
};
|
|
4806
4809
|
(i = {}.hasOwnProperty) || (i = function(R) {
|
|
4807
4810
|
var U, I = {};
|
|
@@ -4813,7 +4816,7 @@ function Io() {
|
|
|
4813
4816
|
return F in this && !(F in N && this[F] === N[F]);
|
|
4814
4817
|
}), I = null, i.call(this, R);
|
|
4815
4818
|
});
|
|
4816
|
-
var m = { boolean: 1, number: 1, string: 1, undefined: 1 },
|
|
4819
|
+
var m = { boolean: 1, number: 1, string: 1, undefined: 1 }, C = function(R, U) {
|
|
4817
4820
|
var I = typeof R[U];
|
|
4818
4821
|
return I == "object" ? !!R[U] : !m[I];
|
|
4819
4822
|
};
|
|
@@ -4834,16 +4837,16 @@ function Io() {
|
|
|
4834
4837
|
nt && M == "prototype" || !i.call(P, M) || (J = M === "constructor") || L(M);
|
|
4835
4838
|
(J || i.call(P, M = "constructor")) && L(M);
|
|
4836
4839
|
} : (F = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], u = function(P, L) {
|
|
4837
|
-
var M, J, nt = d.call(P) == a, ot = !nt && typeof P.constructor != "function" &&
|
|
4840
|
+
var M, J, nt = d.call(P) == a, ot = !nt && typeof P.constructor != "function" && C(P, "hasOwnProperty") ? P.hasOwnProperty : i;
|
|
4838
4841
|
for (M in P)
|
|
4839
4842
|
nt && M == "prototype" || !ot.call(P, M) || L(M);
|
|
4840
4843
|
for (J = F.length; M = F[--J]; ot.call(P, M) && L(M))
|
|
4841
4844
|
;
|
|
4842
4845
|
}), u(R, U);
|
|
4843
4846
|
}, !o("json-stringify")) {
|
|
4844
|
-
var E = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, v = "000000",
|
|
4847
|
+
var E = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, v = "000000", b = function(R, U) {
|
|
4845
4848
|
return (v + (U || 0)).slice(-R);
|
|
4846
|
-
}, T = "\\u00",
|
|
4849
|
+
}, T = "\\u00", O = function(R) {
|
|
4847
4850
|
var U, I = '"', F = 0, N = R.length, D = N > 10 && B;
|
|
4848
4851
|
for (D && (U = R.split("")); N > F; F++) {
|
|
4849
4852
|
var P = R.charCodeAt(F);
|
|
@@ -4859,15 +4862,15 @@ function Io() {
|
|
|
4859
4862
|
break;
|
|
4860
4863
|
default:
|
|
4861
4864
|
if (32 > P) {
|
|
4862
|
-
I += T +
|
|
4865
|
+
I += T + b(2, P.toString(16));
|
|
4863
4866
|
break;
|
|
4864
4867
|
}
|
|
4865
4868
|
I += D ? U[F] : B ? R.charAt(F) : R[F];
|
|
4866
4869
|
}
|
|
4867
4870
|
}
|
|
4868
4871
|
return I + '"';
|
|
4869
|
-
},
|
|
4870
|
-
var L, M, J, nt, ot, xt,
|
|
4872
|
+
}, x = function(R, U, I, F, N, D, P) {
|
|
4873
|
+
var L, M, J, nt, ot, xt, $t, Gt, Yt, Qt, ut, Zt, Dt, Rt, te, ee;
|
|
4871
4874
|
try {
|
|
4872
4875
|
L = U[R];
|
|
4873
4876
|
} catch {
|
|
@@ -4881,40 +4884,40 @@ function Io() {
|
|
|
4881
4884
|
;
|
|
4882
4885
|
for (nt = _((ot - S(J, 0)) / 30.42); S(J, nt + 1) <= ot; nt++)
|
|
4883
4886
|
;
|
|
4884
|
-
ot = 1 + ot - S(J, nt), xt = (L % 864e5 + 864e5) % 864e5,
|
|
4887
|
+
ot = 1 + ot - S(J, nt), xt = (L % 864e5 + 864e5) % 864e5, $t = _(xt / 36e5) % 24, Gt = _(xt / 6e4) % 60, Yt = _(xt / 1e3) % 60, Qt = xt % 1e3;
|
|
4885
4888
|
} else
|
|
4886
|
-
J = L.getUTCFullYear(), nt = L.getUTCMonth(), ot = L.getUTCDate(),
|
|
4887
|
-
L = (0 >= J || J >= 1e4 ? (0 > J ? "-" : "+") +
|
|
4889
|
+
J = L.getUTCFullYear(), nt = L.getUTCMonth(), ot = L.getUTCDate(), $t = L.getUTCHours(), Gt = L.getUTCMinutes(), Yt = L.getUTCSeconds(), Qt = L.getUTCMilliseconds();
|
|
4890
|
+
L = (0 >= J || J >= 1e4 ? (0 > J ? "-" : "+") + b(6, 0 > J ? -J : J) : b(4, J)) + "-" + b(2, nt + 1) + "-" + b(2, ot) + "T" + b(2, $t) + ":" + b(2, Gt) + ":" + b(2, Yt) + "." + b(3, Qt) + "Z";
|
|
4888
4891
|
} else
|
|
4889
4892
|
L = null;
|
|
4890
4893
|
if (I && (L = I.call(U, R, L)), L === null)
|
|
4891
4894
|
return "null";
|
|
4892
|
-
if (M = d.call(L), M ==
|
|
4895
|
+
if (M = d.call(L), M == w)
|
|
4893
4896
|
return "" + L;
|
|
4894
4897
|
if (M == f)
|
|
4895
4898
|
return L > -1 / 0 && 1 / 0 > L ? "" + L : "null";
|
|
4896
4899
|
if (M == y)
|
|
4897
|
-
return
|
|
4900
|
+
return O("" + L);
|
|
4898
4901
|
if (typeof L == "object") {
|
|
4899
|
-
for (
|
|
4900
|
-
if (P[
|
|
4902
|
+
for (Rt = P.length; Rt--; )
|
|
4903
|
+
if (P[Rt] === L)
|
|
4901
4904
|
throw TypeError();
|
|
4902
|
-
if (P.push(L), ut = [],
|
|
4903
|
-
for (
|
|
4904
|
-
|
|
4905
|
-
|
|
4905
|
+
if (P.push(L), ut = [], te = D, D += N, M == g) {
|
|
4906
|
+
for (Dt = 0, Rt = L.length; Rt > Dt; Dt++)
|
|
4907
|
+
Zt = x(Dt, L, I, F, N, D, P), ut.push(Zt === h ? "null" : Zt);
|
|
4908
|
+
ee = ut.length ? N ? `[
|
|
4906
4909
|
` + D + ut.join(`,
|
|
4907
4910
|
` + D) + `
|
|
4908
|
-
` +
|
|
4911
|
+
` + te + "]" : "[" + ut.join(",") + "]" : "[]";
|
|
4909
4912
|
} else
|
|
4910
|
-
u(F || L, function(
|
|
4911
|
-
var
|
|
4912
|
-
|
|
4913
|
-
}),
|
|
4913
|
+
u(F || L, function(re) {
|
|
4914
|
+
var Be = x(re, L, I, F, N, D, P);
|
|
4915
|
+
Be !== h && ut.push(O(re) + ":" + (N ? " " : "") + Be);
|
|
4916
|
+
}), ee = ut.length ? N ? `{
|
|
4914
4917
|
` + D + ut.join(`,
|
|
4915
4918
|
` + D) + `
|
|
4916
|
-
` +
|
|
4917
|
-
return P.pop(),
|
|
4919
|
+
` + te + "}" : "{" + ut.join(",") + "}" : "{}";
|
|
4920
|
+
return P.pop(), ee;
|
|
4918
4921
|
}
|
|
4919
4922
|
};
|
|
4920
4923
|
l.stringify = function(R, U, I) {
|
|
@@ -4935,7 +4938,7 @@ function Io() {
|
|
|
4935
4938
|
;
|
|
4936
4939
|
} else
|
|
4937
4940
|
P == y && (F = I.length <= 10 ? I : I.slice(0, 10));
|
|
4938
|
-
return
|
|
4941
|
+
return x("", (L = {}, L[""] = R, L), N, D, F, "", []);
|
|
4939
4942
|
};
|
|
4940
4943
|
}
|
|
4941
4944
|
if (!o("json-parse")) {
|
|
@@ -5017,42 +5020,42 @@ function Io() {
|
|
|
5017
5020
|
X();
|
|
5018
5021
|
}
|
|
5019
5022
|
return "$";
|
|
5020
|
-
},
|
|
5023
|
+
}, Ot = function(R) {
|
|
5021
5024
|
var U, I;
|
|
5022
5025
|
if (R == "$" && X(), typeof R == "string") {
|
|
5023
5026
|
if ((B ? R.charAt(0) : R[0]) == "@")
|
|
5024
5027
|
return R.slice(1);
|
|
5025
5028
|
if (R == "[") {
|
|
5026
5029
|
for (U = []; R = et(), R != "]"; I || (I = !0))
|
|
5027
|
-
I && (R == "," ? (R = et(), R == "]" && X()) : X()), R == "," && X(), U.push(
|
|
5030
|
+
I && (R == "," ? (R = et(), R == "]" && X()) : X()), R == "," && X(), U.push(Ot(R));
|
|
5028
5031
|
return U;
|
|
5029
5032
|
}
|
|
5030
5033
|
if (R == "{") {
|
|
5031
5034
|
for (U = {}; R = et(), R != "}"; I || (I = !0))
|
|
5032
|
-
I && (R == "," ? (R = et(), R == "}" && X()) : X()), (R == "," || typeof R != "string" || (B ? R.charAt(0) : R[0]) != "@" || et() != ":") && X(), U[R.slice(1)] =
|
|
5035
|
+
I && (R == "," ? (R = et(), R == "}" && X()) : X()), (R == "," || typeof R != "string" || (B ? R.charAt(0) : R[0]) != "@" || et() != ":") && X(), U[R.slice(1)] = Ot(et());
|
|
5033
5036
|
return U;
|
|
5034
5037
|
}
|
|
5035
5038
|
X();
|
|
5036
5039
|
}
|
|
5037
5040
|
return R;
|
|
5038
|
-
}, Oe = function(R, U, I) {
|
|
5039
|
-
var F = Re(R, U, I);
|
|
5040
|
-
F === h ? delete R[U] : R[U] = F;
|
|
5041
5041
|
}, Re = function(R, U, I) {
|
|
5042
|
+
var F = Ie(R, U, I);
|
|
5043
|
+
F === h ? delete R[U] : R[U] = F;
|
|
5044
|
+
}, Ie = function(R, U, I) {
|
|
5042
5045
|
var F, N = R[U];
|
|
5043
5046
|
if (typeof N == "object" && N)
|
|
5044
5047
|
if (d.call(N) == g)
|
|
5045
5048
|
for (F = N.length; F--; )
|
|
5046
|
-
|
|
5049
|
+
Re(N, F, I);
|
|
5047
5050
|
else
|
|
5048
5051
|
u(N, function(D) {
|
|
5049
|
-
|
|
5052
|
+
Re(N, D, I);
|
|
5050
5053
|
});
|
|
5051
5054
|
return I.call(R, U, N);
|
|
5052
5055
|
};
|
|
5053
5056
|
l.parse = function(R, U) {
|
|
5054
5057
|
var I, F;
|
|
5055
|
-
return A = 0, q = "" + R, I =
|
|
5058
|
+
return A = 0, q = "" + R, I = Ot(et()), et() != "$" && X(), A = q = null, U && d.call(U) == a ? Ie((F = {}, F[""] = I, F), "", U) : I;
|
|
5056
5059
|
};
|
|
5057
5060
|
}
|
|
5058
5061
|
}
|
|
@@ -5070,33 +5073,33 @@ function Io() {
|
|
|
5070
5073
|
}, {}]
|
|
5071
5074
|
}, {}, [1])(1);
|
|
5072
5075
|
}
|
|
5073
|
-
const
|
|
5076
|
+
const _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5074
5077
|
__proto__: null,
|
|
5075
|
-
default:
|
|
5076
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5077
|
-
"./v1_3_7.js":
|
|
5078
|
-
}),
|
|
5079
|
-
function
|
|
5078
|
+
default: Bo
|
|
5079
|
+
}, Symbol.toStringTag, { value: "Module" })), Lo = /* @__PURE__ */ Object.assign({
|
|
5080
|
+
"./v1_3_7.js": _o
|
|
5081
|
+
}), Uo = /v\d+_\d+_\d+/;
|
|
5082
|
+
function Do(t) {
|
|
5080
5083
|
return typeof t == "function";
|
|
5081
5084
|
}
|
|
5082
|
-
const
|
|
5085
|
+
const ve = Object.entries(Lo).reduce(
|
|
5083
5086
|
(t, e) => {
|
|
5084
5087
|
var o;
|
|
5085
|
-
const r = e[1].default, n = (o = e[0].match(
|
|
5086
|
-
return
|
|
5088
|
+
const r = e[1].default, n = (o = e[0].match(Uo)) == null ? void 0 : o[0];
|
|
5089
|
+
return Do(r) && n && (t[n] = r()), t;
|
|
5087
5090
|
},
|
|
5088
5091
|
{}
|
|
5089
|
-
),
|
|
5090
|
-
if (t in
|
|
5091
|
-
return
|
|
5092
|
+
), Cr = (t) => {
|
|
5093
|
+
if (t in ve)
|
|
5094
|
+
return ve[t];
|
|
5092
5095
|
throw new Error(`Socket version ${t} not found`);
|
|
5093
|
-
},
|
|
5094
|
-
...
|
|
5095
|
-
getSocketVersion:
|
|
5096
|
-
makeSocketVersion:
|
|
5096
|
+
}, Po = (t, ...e) => Cr(t)(...e), Fo = {
|
|
5097
|
+
...ve,
|
|
5098
|
+
getSocketVersion: Cr,
|
|
5099
|
+
makeSocketVersion: Po
|
|
5097
5100
|
};
|
|
5098
|
-
var
|
|
5099
|
-
class
|
|
5101
|
+
var jo = /* @__PURE__ */ ((t) => (t.RINGING = "Ringing", t.TALKING = "Talking", t.DIALING = "Dialing", t.HOLD = "Hold", t))(jo || {}), Mo = /* @__PURE__ */ ((t) => (t.INCOMING = "Incoming", t.OUTGOING = "Outgoing", t))(Mo || {}), mt = /* @__PURE__ */ ((t) => (t.CONNECTED = "connected", t.DISCONNECTED = "disconnected", t.TRYING_TO_CONNECT = "tryingToConnect", t))(mt || {}), qo = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "Automatic", t.IVR = "IVR", t))(qo || {}), zo = /* @__PURE__ */ ((t) => (t.INCOMINC = "Incoming", t.OUTGOING = "Outgoing", t.SPY = "Spy", t.CLICK2CALL = "Click2Call", t))(zo || {}), Xo = /* @__PURE__ */ ((t) => (t.RESPONSE_FROM_API_VALID = "RESPONSE_FROM_API_VALID", t.RESPONSE_FROM_API_INVALID = "RESPONSE_FROM_API_INVALID", t))(Xo || {}), z = /* @__PURE__ */ ((t) => (t.ALL_DIALER_STATUS = "AllDialersStatus", t.ALL_EXTENSION_STATUS = "AllExtensionsStatus", t.ALL_USERS_STATUS = "AllUsersStatus", t.CONNECT = "connect", t.DISCONNECT = "disconnect", t.CONNECT_ERROR_EVENT = "connect_error", t.EXTENSION_EVENT = "ExtensionEvent", t.KEEP_ALIVE = "keepalive", t.KEEP_ALIVE_RESPONSE = "keepaliveResponse", t.LOGIN_STATUS = "loginStatus", t.LOGIN_SUCCESS = "loginSuccess", t.QUEUE_EVENT = "QueueEvent", t.ONLINE_STATUS_EVENT = "onlineStatusEvent", t.DIALER_EVENT = "DialerEvent", t.EXTENSIONS_UPDATED = "ExtensionsUpdated", t))(z || {}), wr = /* @__PURE__ */ ((t) => (t.NEWCALL = "NEWCALL", t.ANSWER = "ANSWER", t.HOLD = "HOLD", t.UNHOLD = "UNHOLD", t.HANGUP = "HANGUP", t.USER_STATUS_UPDATE = "userStatusUpdate", t))(wr || {}), Wo = /* @__PURE__ */ ((t) => (t.NORMAL_HANGUP = "Normal hangup", t.USER_BUSY = "User busy", t.CALL_REJECTED = "Call Rejected", t.UNALLOCATED_NUMBER = "Unallocated (unassigned) number", t.UNKNOWN = "Unknown", t.NO_USER_RESPONDING = "No user responding", t.USER_ALERTING = "User alerting, no answer", t.ANSWERED_ELSEWHERE = "Answered elsewhere", t))(Wo || {}), Ko = /* @__PURE__ */ ((t) => (t.ANSWER = "ANSWER", t.ABANDONED = "ABANDONED", t.EXIT = "EXIT", t.JOIN = "JOIN", t))(Ko || {});
|
|
5102
|
+
class ce {
|
|
5100
5103
|
static mapExtensionEvent(e) {
|
|
5101
5104
|
var u, h;
|
|
5102
5105
|
const r = e.reason;
|
|
@@ -5234,8 +5237,8 @@ class ae {
|
|
|
5234
5237
|
};
|
|
5235
5238
|
}
|
|
5236
5239
|
}
|
|
5237
|
-
var
|
|
5238
|
-
class
|
|
5240
|
+
var Sr = /* @__PURE__ */ ((t) => (t.UPDATE_MONITORED_EXTENSIONS = "updateMonitoredExtensions", t.KEEP_ALIVE = "keepAlive", t))(Sr || {});
|
|
5241
|
+
class Ho {
|
|
5239
5242
|
constructor(e) {
|
|
5240
5243
|
H(this, "io");
|
|
5241
5244
|
H(this, "ioFunction");
|
|
@@ -5248,7 +5251,7 @@ class Ko {
|
|
|
5248
5251
|
}
|
|
5249
5252
|
getSocketIoFunction(e) {
|
|
5250
5253
|
const r = e.split("v="), n = "v".concat(r[r.length - 1]).replaceAll(".", "_");
|
|
5251
|
-
this.ioFunction =
|
|
5254
|
+
this.ioFunction = Fo.getSocketVersion(n);
|
|
5252
5255
|
}
|
|
5253
5256
|
initSocketConnection() {
|
|
5254
5257
|
const e = this.eventsSdkClass.authClass.token, r = this.eventsSdkClass.options.protocol, n = this.eventsSdkClass.server;
|
|
@@ -5257,9 +5260,8 @@ class Ko {
|
|
|
5257
5260
|
this.eventsSdkClass.eventEmitterClass.emit(
|
|
5258
5261
|
z.ONLINE_STATUS_EVENT,
|
|
5259
5262
|
{
|
|
5260
|
-
isSocketConnected: !1,
|
|
5261
5263
|
attemptToConnect: i,
|
|
5262
|
-
|
|
5264
|
+
connectionStatus: mt.TRYING_TO_CONNECT
|
|
5263
5265
|
}
|
|
5264
5266
|
);
|
|
5265
5267
|
const u = {
|
|
@@ -5304,7 +5306,7 @@ class Ko {
|
|
|
5304
5306
|
initKeepAlive() {
|
|
5305
5307
|
this.clearKeepAliveInterval(), this.keepAliveInterval = setInterval(async () => {
|
|
5306
5308
|
if ((/* @__PURE__ */ new Date()).getTime() > this.lastEventTimestamp + this.eventsSdkClass.options.keepAliveTimeout && this.io && this.eventsSdkClass.authClass.token) {
|
|
5307
|
-
this.eventsSdkClass.emit(
|
|
5309
|
+
this.eventsSdkClass.emit(Sr.KEEP_ALIVE, this.eventsSdkClass.authClass.token), this.eventsSdkClass.loggerClass.log({
|
|
5308
5310
|
Message: `Keep alive event emitted with this token: ${this.eventsSdkClass.authClass.token}`,
|
|
5309
5311
|
ActionName: at.WSCONNECT,
|
|
5310
5312
|
isShowClient: !1,
|
|
@@ -5317,7 +5319,7 @@ class Ko {
|
|
|
5317
5319
|
}
|
|
5318
5320
|
closeAllConnections() {
|
|
5319
5321
|
var e;
|
|
5320
|
-
this.io && (this.io.close(), (e = this.io) == null || e.disconnect(), this.io = void 0),
|
|
5322
|
+
this.io && (this.io.close(), (e = this.io) == null || e.disconnect(), this.io = void 0), It.clearSessionStorage();
|
|
5321
5323
|
}
|
|
5322
5324
|
initSocketEvents() {
|
|
5323
5325
|
this.io && this.io.on(z.LOGIN_SUCCESS, (e) => this.onLoginSuccessEvent(e)).on(z.QUEUE_EVENT, (e) => this.onQueueEvent(e)).on(z.EXTENSION_EVENT, (e) => this.onExtensionEvent(e)).on(z.DIALER_EVENT, (e) => this.onDialerEvent(e)).on(z.LOGIN_STATUS, (e) => this.onLoginStatusEvent(e)).on(z.ALL_EXTENSION_STATUS, (e) => this.onAllExtensionStatus(e)).on(z.ALL_DIALER_STATUS, (e) => this.onAllDialerStatus(e)).on(z.KEEP_ALIVE_RESPONSE, (e) => this.onKeepAliveResponse(e)).on(z.EXTENSIONS_UPDATED, (e) => this.onExtensionsUpdatedEvent(e)).on(z.CONNECT, () => this.onConnect()).on(z.DISCONNECT, (e) => this.onDisconnect(e)).on(z.CONNECT_ERROR_EVENT, (e) => this.onConnectError(e));
|
|
@@ -5326,10 +5328,10 @@ class Ko {
|
|
|
5326
5328
|
this.eventsSdkClass.eventEmitterClass.emit(z.LOGIN_SUCCESS, e);
|
|
5327
5329
|
}
|
|
5328
5330
|
onQueueEvent(e) {
|
|
5329
|
-
this.eventsSdkClass.eventEmitterClass.emit(z.QUEUE_EVENT,
|
|
5331
|
+
this.eventsSdkClass.eventEmitterClass.emit(z.QUEUE_EVENT, ce.mapQueueEvent(e));
|
|
5330
5332
|
}
|
|
5331
5333
|
onExtensionEvent(e) {
|
|
5332
|
-
const r =
|
|
5334
|
+
const r = ce.mapExtensionEvent(e);
|
|
5333
5335
|
r && this.eventsSdkClass.eventEmitterClass.emit(z.EXTENSION_EVENT, r);
|
|
5334
5336
|
}
|
|
5335
5337
|
onDialerEvent(e) {
|
|
@@ -5339,7 +5341,7 @@ class Ko {
|
|
|
5339
5341
|
this.eventsSdkClass.eventEmitterClass.emit(z.LOGIN_STATUS, e);
|
|
5340
5342
|
}
|
|
5341
5343
|
onAllExtensionStatus(e) {
|
|
5342
|
-
const r =
|
|
5344
|
+
const r = ce.mapAllExtensionStatus(e);
|
|
5343
5345
|
this.eventsSdkClass.eventEmitterClass.emit(z.ALL_EXTENSION_STATUS, r);
|
|
5344
5346
|
}
|
|
5345
5347
|
onAllDialerStatus(e) {
|
|
@@ -5365,8 +5367,7 @@ class Ko {
|
|
|
5365
5367
|
}
|
|
5366
5368
|
onConnect() {
|
|
5367
5369
|
this.keepReconnectInterval && clearInterval(this.keepReconnectInterval), this.connected = !0, this.eventsSdkClass.eventEmitterClass.emit(z.ONLINE_STATUS_EVENT, {
|
|
5368
|
-
|
|
5369
|
-
doReconnect: this.doReconnect
|
|
5370
|
+
connectionStatus: mt.CONNECTED
|
|
5370
5371
|
}), this.eventsSdkClass.loggerClass.log({
|
|
5371
5372
|
Message: `Sdk connected to the socket server ${this.eventsSdkClass.server && this.eventsSdkClass.server.Domain ? this.eventsSdkClass.server.Domain : this.eventsSdkClass.URL}`,
|
|
5372
5373
|
ActionName: at.WSCONNECT,
|
|
@@ -5379,8 +5380,7 @@ class Ko {
|
|
|
5379
5380
|
}
|
|
5380
5381
|
onDisconnect(e) {
|
|
5381
5382
|
this.connected = !1, this.closeAllConnections(), this.eventsSdkClass.eventEmitterClass.emit(z.ONLINE_STATUS_EVENT, {
|
|
5382
|
-
|
|
5383
|
-
doReconnect: this.doReconnect
|
|
5383
|
+
connectionStatus: this.doReconnect ? mt.TRYING_TO_CONNECT : mt.DISCONNECTED
|
|
5384
5384
|
}), this.eventsSdkClass.loggerClass.log({
|
|
5385
5385
|
Message: `Sdk disconnected from the socket server ${this.eventsSdkClass.server && this.eventsSdkClass.server.Domain ? this.eventsSdkClass.server.Domain : this.eventsSdkClass.URL} (${e})`,
|
|
5386
5386
|
ActionName: at.WSCONNECT,
|
|
@@ -5389,12 +5389,11 @@ class Ko {
|
|
|
5389
5389
|
StatusCode: 200,
|
|
5390
5390
|
Level: tt.INFO,
|
|
5391
5391
|
LogType: ct.INFO
|
|
5392
|
-
}), this.doReconnect && this.eventsSdkClass.connect(
|
|
5392
|
+
}), this.doReconnect && this.eventsSdkClass.connect(vt.NEXT);
|
|
5393
5393
|
}
|
|
5394
5394
|
onConnectError(e) {
|
|
5395
5395
|
this.eventsSdkClass.eventEmitterClass.emit(z.ONLINE_STATUS_EVENT, {
|
|
5396
|
-
|
|
5397
|
-
doReconnect: this.doReconnect
|
|
5396
|
+
connectionStatus: this.doReconnect ? mt.TRYING_TO_CONNECT : mt.DISCONNECTED
|
|
5398
5397
|
}), this.eventsSdkClass.loggerClass.log({
|
|
5399
5398
|
Message: `Sdk tries to connect to the socket server ${this.eventsSdkClass.URL} but error (${e})`,
|
|
5400
5399
|
ActionName: at.WSCONNECT,
|
|
@@ -5405,13 +5404,13 @@ class Ko {
|
|
|
5405
5404
|
LogType: ct.ERROR
|
|
5406
5405
|
}), setTimeout(
|
|
5407
5406
|
() => {
|
|
5408
|
-
this.eventsSdkClass.connect(
|
|
5407
|
+
this.eventsSdkClass.connect(vt.NEXT);
|
|
5409
5408
|
},
|
|
5410
5409
|
this.eventsSdkClass.options.reconnectionDelay
|
|
5411
5410
|
);
|
|
5412
5411
|
}
|
|
5413
5412
|
}
|
|
5414
|
-
class
|
|
5413
|
+
class Jo {
|
|
5415
5414
|
constructor(e) {
|
|
5416
5415
|
H(this, "storageLogger");
|
|
5417
5416
|
this.eventsSdkClass = e, this.eventsSdkClass = e;
|
|
@@ -5453,7 +5452,7 @@ class Ho {
|
|
|
5453
5452
|
});
|
|
5454
5453
|
}
|
|
5455
5454
|
}
|
|
5456
|
-
class
|
|
5455
|
+
class Vo {
|
|
5457
5456
|
constructor(e) {
|
|
5458
5457
|
H(this, "listeners", {
|
|
5459
5458
|
[z.ALL_EXTENSION_STATUS]: [],
|
|
@@ -5497,7 +5496,7 @@ class Jo {
|
|
|
5497
5496
|
this.allListeners.forEach((o) => o(n));
|
|
5498
5497
|
}
|
|
5499
5498
|
}
|
|
5500
|
-
class
|
|
5499
|
+
class Go {
|
|
5501
5500
|
constructor(e) {
|
|
5502
5501
|
H(this, "options");
|
|
5503
5502
|
H(this, "servers", []);
|
|
@@ -5507,12 +5506,12 @@ class $o {
|
|
|
5507
5506
|
H(this, "socket");
|
|
5508
5507
|
H(this, "mainServer");
|
|
5509
5508
|
H(this, "alreadyAttemptedOtherServers", []);
|
|
5510
|
-
H(this, "authClass", new
|
|
5511
|
-
H(this, "socketIoClass", new
|
|
5512
|
-
H(this, "loggerClass", new
|
|
5513
|
-
H(this, "eventEmitterClass", new
|
|
5509
|
+
H(this, "authClass", new Ro(this));
|
|
5510
|
+
H(this, "socketIoClass", new Ho(this));
|
|
5511
|
+
H(this, "loggerClass", new Jo(this));
|
|
5512
|
+
H(this, "eventEmitterClass", new Vo(this));
|
|
5514
5513
|
this.options = {
|
|
5515
|
-
...
|
|
5514
|
+
...Io,
|
|
5516
5515
|
...e
|
|
5517
5516
|
};
|
|
5518
5517
|
}
|
|
@@ -5523,7 +5522,7 @@ class $o {
|
|
|
5523
5522
|
this.socketIoClass.io && this.socketIoClass.io.emit(e, ...r);
|
|
5524
5523
|
}
|
|
5525
5524
|
connect(e) {
|
|
5526
|
-
e ===
|
|
5525
|
+
e === vt.MAIN && this.findMainServer(), e === vt.NEXT && this.findNextServer(), this.socketIoClass.doReconnect = !0, this.loggerClass.init(), this.socketIoClass.initSocketConnection(), this.socketIoClass.initSocketEvents(), this.socketIoClass.initKeepAlive();
|
|
5527
5526
|
}
|
|
5528
5527
|
disconnect() {
|
|
5529
5528
|
this.socketIoClass.doReconnect = !1, this.socketIoClass.closeAllConnections();
|
|
@@ -5557,20 +5556,21 @@ class $o {
|
|
|
5557
5556
|
this.URL = this.URLList[0];
|
|
5558
5557
|
}
|
|
5559
5558
|
async init() {
|
|
5560
|
-
|
|
5559
|
+
const e = await this.authClass.login(this.options);
|
|
5560
|
+
return e && this.authClass.onLoginResponse(e), this.loggerClass.sdkInitializedLog(this.options), !0;
|
|
5561
5561
|
}
|
|
5562
5562
|
}
|
|
5563
5563
|
export {
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5564
|
+
jo as CallStatusEnum,
|
|
5565
|
+
Mo as CallTypeEnum,
|
|
5566
|
+
qo as DialerTypeEnum,
|
|
5567
|
+
zo as DirectionEnum,
|
|
5568
|
+
Xo as DoNotCallMeStatusCodeEnum,
|
|
5569
5569
|
z as EventsEnum,
|
|
5570
5570
|
wr as ExtensionEventReasonEnum,
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5571
|
+
Wo as ExtensionHangupCauseEnum,
|
|
5572
|
+
Ko as QueueEventReasonEnum,
|
|
5573
|
+
Sr as ServerListenerEventsEnum,
|
|
5574
|
+
Go as default
|
|
5575
5575
|
};
|
|
5576
5576
|
//# sourceMappingURL=voicenter-events-sdk.es.js.map
|