@voicenter-team/events-sdk 0.0.84 → 0.0.86
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 +7 -7
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.es.js +138 -114
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +7 -7
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +7 -7
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +2 -2
|
@@ -121,8 +121,8 @@ function Ge(s) {
|
|
|
121
121
|
h[a] = (h[a] << 8 | h[a] >>> 24) & 16711935 | (h[a] << 24 | h[a] >>> 8) & 4278255360;
|
|
122
122
|
h[d >>> 5] |= 128 << d % 32, h[(d + 64 >>> 9 << 4) + 14] = d;
|
|
123
123
|
for (var f = r._ff, g = r._gg, y = r._hh, E = r._ii, a = 0; a < h.length; a += 16) {
|
|
124
|
-
var j = c,
|
|
125
|
-
c = f(c, p, l, i, h[a + 0], 7, -680876936), i = f(i, c, p, l, h[a + 1], 12, -389564586), l = f(l, i, c, p, h[a + 2], 17, 606105819), p = f(p, l, i, c, h[a + 3], 22, -1044525330), c = f(c, p, l, i, h[a + 4], 7, -176418897), i = f(i, c, p, l, h[a + 5], 12, 1200080426), l = f(l, i, c, p, h[a + 6], 17, -1473231341), p = f(p, l, i, c, h[a + 7], 22, -45705983), c = f(c, p, l, i, h[a + 8], 7, 1770035416), i = f(i, c, p, l, h[a + 9], 12, -1958414417), l = f(l, i, c, p, h[a + 10], 17, -42063), p = f(p, l, i, c, h[a + 11], 22, -1990404162), c = f(c, p, l, i, h[a + 12], 7, 1804603682), i = f(i, c, p, l, h[a + 13], 12, -40341101), l = f(l, i, c, p, h[a + 14], 17, -1502002290), p = f(p, l, i, c, h[a + 15], 22, 1236535329), c = g(c, p, l, i, h[a + 1], 5, -165796510), i = g(i, c, p, l, h[a + 6], 9, -1069501632), l = g(l, i, c, p, h[a + 11], 14, 643717713), p = g(p, l, i, c, h[a + 0], 20, -373897302), c = g(c, p, l, i, h[a + 5], 5, -701558691), i = g(i, c, p, l, h[a + 10], 9, 38016083), l = g(l, i, c, p, h[a + 15], 14, -660478335), p = g(p, l, i, c, h[a + 4], 20, -405537848), c = g(c, p, l, i, h[a + 9], 5, 568446438), i = g(i, c, p, l, h[a + 14], 9, -1019803690), l = g(l, i, c, p, h[a + 3], 14, -187363961), p = g(p, l, i, c, h[a + 8], 20, 1163531501), c = g(c, p, l, i, h[a + 13], 5, -1444681467), i = g(i, c, p, l, h[a + 2], 9, -51403784), l = g(l, i, c, p, h[a + 7], 14, 1735328473), p = g(p, l, i, c, h[a + 12], 20, -1926607734), c = y(c, p, l, i, h[a + 5], 4, -378558), i = y(i, c, p, l, h[a + 8], 11, -2022574463), l = y(l, i, c, p, h[a + 11], 16, 1839030562), p = y(p, l, i, c, h[a + 14], 23, -35309556), c = y(c, p, l, i, h[a + 1], 4, -1530992060), i = y(i, c, p, l, h[a + 4], 11, 1272893353), l = y(l, i, c, p, h[a + 7], 16, -155497632), p = y(p, l, i, c, h[a + 10], 23, -1094730640), c = y(c, p, l, i, h[a + 13], 4, 681279174), i = y(i, c, p, l, h[a + 0], 11, -358537222), l = y(l, i, c, p, h[a + 3], 16, -722521979), p = y(p, l, i, c, h[a + 6], 23, 76029189), c = y(c, p, l, i, h[a + 9], 4, -640364487), i = y(i, c, p, l, h[a + 12], 11, -421815835), l = y(l, i, c, p, h[a + 15], 16, 530742520), p = y(p, l, i, c, h[a + 2], 23, -995338651), c = E(c, p, l, i, h[a + 0], 6, -198630844), i = E(i, c, p, l, h[a + 7], 10, 1126891415), l = E(l, i, c, p, h[a + 14], 15, -1416354905), p = E(p, l, i, c, h[a + 5], 21, -57434055), c = E(c, p, l, i, h[a + 12], 6, 1700485571), i = E(i, c, p, l, h[a + 3], 10, -1894986606), l = E(l, i, c, p, h[a + 10], 15, -1051523), p = E(p, l, i, c, h[a + 1], 21, -2054922799), c = E(c, p, l, i, h[a + 8], 6, 1873313359), i = E(i, c, p, l, h[a + 15], 10, -30611744), l = E(l, i, c, p, h[a + 6], 15, -1560198380), p = E(p, l, i, c, h[a + 13], 21, 1309151649), c = E(c, p, l, i, h[a + 4], 6, -145523070), i = E(i, c, p, l, h[a + 11], 10, -1120210379), l = E(l, i, c, p, h[a + 2], 15, 718787259), p = E(p, l, i, c, h[a + 9], 21, -343485551), c = c + j >>> 0, p = p +
|
|
124
|
+
var j = c, B = p, F = l, L = i;
|
|
125
|
+
c = f(c, p, l, i, h[a + 0], 7, -680876936), i = f(i, c, p, l, h[a + 1], 12, -389564586), l = f(l, i, c, p, h[a + 2], 17, 606105819), p = f(p, l, i, c, h[a + 3], 22, -1044525330), c = f(c, p, l, i, h[a + 4], 7, -176418897), i = f(i, c, p, l, h[a + 5], 12, 1200080426), l = f(l, i, c, p, h[a + 6], 17, -1473231341), p = f(p, l, i, c, h[a + 7], 22, -45705983), c = f(c, p, l, i, h[a + 8], 7, 1770035416), i = f(i, c, p, l, h[a + 9], 12, -1958414417), l = f(l, i, c, p, h[a + 10], 17, -42063), p = f(p, l, i, c, h[a + 11], 22, -1990404162), c = f(c, p, l, i, h[a + 12], 7, 1804603682), i = f(i, c, p, l, h[a + 13], 12, -40341101), l = f(l, i, c, p, h[a + 14], 17, -1502002290), p = f(p, l, i, c, h[a + 15], 22, 1236535329), c = g(c, p, l, i, h[a + 1], 5, -165796510), i = g(i, c, p, l, h[a + 6], 9, -1069501632), l = g(l, i, c, p, h[a + 11], 14, 643717713), p = g(p, l, i, c, h[a + 0], 20, -373897302), c = g(c, p, l, i, h[a + 5], 5, -701558691), i = g(i, c, p, l, h[a + 10], 9, 38016083), l = g(l, i, c, p, h[a + 15], 14, -660478335), p = g(p, l, i, c, h[a + 4], 20, -405537848), c = g(c, p, l, i, h[a + 9], 5, 568446438), i = g(i, c, p, l, h[a + 14], 9, -1019803690), l = g(l, i, c, p, h[a + 3], 14, -187363961), p = g(p, l, i, c, h[a + 8], 20, 1163531501), c = g(c, p, l, i, h[a + 13], 5, -1444681467), i = g(i, c, p, l, h[a + 2], 9, -51403784), l = g(l, i, c, p, h[a + 7], 14, 1735328473), p = g(p, l, i, c, h[a + 12], 20, -1926607734), c = y(c, p, l, i, h[a + 5], 4, -378558), i = y(i, c, p, l, h[a + 8], 11, -2022574463), l = y(l, i, c, p, h[a + 11], 16, 1839030562), p = y(p, l, i, c, h[a + 14], 23, -35309556), c = y(c, p, l, i, h[a + 1], 4, -1530992060), i = y(i, c, p, l, h[a + 4], 11, 1272893353), l = y(l, i, c, p, h[a + 7], 16, -155497632), p = y(p, l, i, c, h[a + 10], 23, -1094730640), c = y(c, p, l, i, h[a + 13], 4, 681279174), i = y(i, c, p, l, h[a + 0], 11, -358537222), l = y(l, i, c, p, h[a + 3], 16, -722521979), p = y(p, l, i, c, h[a + 6], 23, 76029189), c = y(c, p, l, i, h[a + 9], 4, -640364487), i = y(i, c, p, l, h[a + 12], 11, -421815835), l = y(l, i, c, p, h[a + 15], 16, 530742520), p = y(p, l, i, c, h[a + 2], 23, -995338651), c = E(c, p, l, i, h[a + 0], 6, -198630844), i = E(i, c, p, l, h[a + 7], 10, 1126891415), l = E(l, i, c, p, h[a + 14], 15, -1416354905), p = E(p, l, i, c, h[a + 5], 21, -57434055), c = E(c, p, l, i, h[a + 12], 6, 1700485571), i = E(i, c, p, l, h[a + 3], 10, -1894986606), l = E(l, i, c, p, h[a + 10], 15, -1051523), p = E(p, l, i, c, h[a + 1], 21, -2054922799), c = E(c, p, l, i, h[a + 8], 6, 1873313359), i = E(i, c, p, l, h[a + 15], 10, -30611744), l = E(l, i, c, p, h[a + 6], 15, -1560198380), p = E(p, l, i, c, h[a + 13], 21, 1309151649), c = E(c, p, l, i, h[a + 4], 6, -145523070), i = E(i, c, p, l, h[a + 11], 10, -1120210379), l = E(l, i, c, p, h[a + 2], 15, 718787259), p = E(p, l, i, c, h[a + 9], 21, -343485551), c = c + j >>> 0, p = p + B >>> 0, l = l + F >>> 0, i = i + L >>> 0;
|
|
126
126
|
}
|
|
127
127
|
return s.endian([c, p, l, i]);
|
|
128
128
|
};
|
|
@@ -145,8 +145,8 @@ function Ge(s) {
|
|
|
145
145
|
return u && u.asBytes ? h : u && u.asString ? n.bytesToString(h) : s.bytesToHex(h);
|
|
146
146
|
};
|
|
147
147
|
})();
|
|
148
|
-
var
|
|
149
|
-
const
|
|
148
|
+
var Je = ke.exports;
|
|
149
|
+
const Xe = /* @__PURE__ */ Ve(Je);
|
|
150
150
|
var ut = /* @__PURE__ */ ((s) => (s.BOOTSTRAP = "bootstrap", s.DEBUG_EXTENSIONS = "debugExtensions", s.DEBUG_QUEUE = "debugQueue", s.DEBUG_DIALER = "debugDialer", s.FULL = "full", s))(ut || {}), lt = /* @__PURE__ */ ((s) => (s.MAIN = "main", s.NEXT = "next", s))(lt || {}), it = /* @__PURE__ */ ((s) => (s.USER = "User", s.TOKEN = "Token", s))(it || {});
|
|
151
151
|
class kt {
|
|
152
152
|
static async getSessionStorageDataByKey(e, t = !0) {
|
|
@@ -186,7 +186,7 @@ class $e {
|
|
|
186
186
|
email: this.eventsSdkClass.options.email && this.eventsSdkClass.options.email,
|
|
187
187
|
password: this.eventsSdkClass.options.password && this.eventsSdkClass.options.password
|
|
188
188
|
};
|
|
189
|
-
if (this.storageKey =
|
|
189
|
+
if (this.storageKey = Xe(JSON.stringify({
|
|
190
190
|
...this.eventsSdkClass.options,
|
|
191
191
|
loggerSocketConnection: null
|
|
192
192
|
}, this.eventsSdkClass.getCircularReplacer())), this.lastLoginTimestamp && this.lastLoginTimestamp + this.delay > (/* @__PURE__ */ new Date()).getTime())
|
|
@@ -444,10 +444,10 @@ function He() {
|
|
|
444
444
|
this.readyState = "opening", this.skipReconnect = !1;
|
|
445
445
|
var g = h(a, "open", function() {
|
|
446
446
|
f.onopen(), i && i();
|
|
447
|
-
}), y = h(a, "error", function(
|
|
448
|
-
if (c("connect_error"), f.cleanup(), f.readyState = "closed", f.emitAll("connect_error",
|
|
447
|
+
}), y = h(a, "error", function(B) {
|
|
448
|
+
if (c("connect_error"), f.cleanup(), f.readyState = "closed", f.emitAll("connect_error", B), i) {
|
|
449
449
|
var F = new Error("Connection error");
|
|
450
|
-
F.data =
|
|
450
|
+
F.data = B, i(F);
|
|
451
451
|
} else
|
|
452
452
|
f.maybeReconnectOnOpen();
|
|
453
453
|
});
|
|
@@ -916,15 +916,15 @@ function He() {
|
|
|
916
916
|
function j() {
|
|
917
917
|
y("socket closed");
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function B(A) {
|
|
920
920
|
L && A.name != L.name && (h('"%s" works - aborting "%s"', A.name, L.name), g());
|
|
921
921
|
}
|
|
922
922
|
function F() {
|
|
923
|
-
L.removeListener("open", f), L.removeListener("error", y), L.removeListener("close", E), T.removeListener("close", j), T.removeListener("upgrading",
|
|
923
|
+
L.removeListener("open", f), L.removeListener("error", y), L.removeListener("close", E), T.removeListener("close", j), T.removeListener("upgrading", B);
|
|
924
924
|
}
|
|
925
925
|
h('probing transport "%s"', a);
|
|
926
926
|
var L = this.createTransport(a, { probe: 1 }), S = !1, T = this;
|
|
927
|
-
n.priorWebsocketSuccess = !1, L.once("open", f), L.once("error", y), L.once("close", E), this.once("close", j), this.once("upgrading",
|
|
927
|
+
n.priorWebsocketSuccess = !1, L.once("open", f), L.once("error", y), L.once("close", E), this.once("close", j), this.once("upgrading", B), L.open();
|
|
928
928
|
}, n.prototype.onOpen = function() {
|
|
929
929
|
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) {
|
|
930
930
|
h("starting upgrade probes");
|
|
@@ -1109,8 +1109,8 @@ function He() {
|
|
|
1109
1109
|
f.onError("jsonp polling iframe removal error", F);
|
|
1110
1110
|
}
|
|
1111
1111
|
try {
|
|
1112
|
-
var
|
|
1113
|
-
g = document.createElement(
|
|
1112
|
+
var B = '<iframe src="javascript:0" name="' + f.iframeId + '">';
|
|
1113
|
+
g = document.createElement(B);
|
|
1114
1114
|
} catch {
|
|
1115
1115
|
g = document.createElement("iframe"), g.name = f.iframeId, g.src = "javascript:0";
|
|
1116
1116
|
}
|
|
@@ -1418,15 +1418,15 @@ function He() {
|
|
|
1418
1418
|
g.diff = E, g.prev = c, g.curr = y, c = y, g.useColors == null && (g.useColors = t.useColors()), g.color == null && g.useColors && (g.color = n());
|
|
1419
1419
|
var j = Array.prototype.slice.call(arguments);
|
|
1420
1420
|
j[0] = t.coerce(j[0]), typeof j[0] != "string" && (j = ["%o"].concat(j));
|
|
1421
|
-
var
|
|
1421
|
+
var B = 0;
|
|
1422
1422
|
j[0] = j[0].replace(/%([a-z%])/g, function(L, S) {
|
|
1423
1423
|
if (L === "%%")
|
|
1424
1424
|
return L;
|
|
1425
|
-
|
|
1425
|
+
B++;
|
|
1426
1426
|
var T = t.formatters[S];
|
|
1427
1427
|
if (typeof T == "function") {
|
|
1428
|
-
var A = j[
|
|
1429
|
-
L = T.call(g, A), j.splice(
|
|
1428
|
+
var A = j[B];
|
|
1429
|
+
L = T.call(g, A), j.splice(B, 1), B--;
|
|
1430
1430
|
}
|
|
1431
1431
|
return L;
|
|
1432
1432
|
}), typeof t.formatArgs == "function" && (j = t.formatArgs.apply(g, j));
|
|
@@ -1549,7 +1549,7 @@ function He() {
|
|
|
1549
1549
|
}
|
|
1550
1550
|
var c = s("./keys"), p = s("has-binary"), l = s("arraybuffer.slice"), i = s("base64-arraybuffer"), a = s("after"), f = s("utf8"), g = navigator.userAgent.match(/Android/i), y = /PhantomJS/i.test(navigator.userAgent), E = g || y;
|
|
1551
1551
|
t.protocol = 3;
|
|
1552
|
-
var j = t.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 },
|
|
1552
|
+
var j = t.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, B = c(j), F = { type: "error", data: "parser error" }, L = s("blob");
|
|
1553
1553
|
t.encodePacket = function(S, T, A, m) {
|
|
1554
1554
|
typeof T == "function" && (m = T, T = !1), typeof A == "function" && (m = A, A = null);
|
|
1555
1555
|
var v = S.data === void 0 ? void 0 : S.data.buffer || S.data;
|
|
@@ -1590,15 +1590,15 @@ function He() {
|
|
|
1590
1590
|
return F;
|
|
1591
1591
|
}
|
|
1592
1592
|
var v = S.charAt(0);
|
|
1593
|
-
return Number(v) == v &&
|
|
1594
|
-
type:
|
|
1593
|
+
return Number(v) == v && B[v] ? S.length > 1 ? {
|
|
1594
|
+
type: B[v],
|
|
1595
1595
|
data: S.substring(1)
|
|
1596
|
-
} : { type:
|
|
1596
|
+
} : { type: B[v] } : F;
|
|
1597
1597
|
}
|
|
1598
1598
|
var m = new Uint8Array(S), v = m[0], _ = l(S, 1);
|
|
1599
|
-
return L && T === "blob" && (_ = new L([_])), { type:
|
|
1599
|
+
return L && T === "blob" && (_ = new L([_])), { type: B[v], data: _ };
|
|
1600
1600
|
}, t.decodeBase64Packet = function(S, T) {
|
|
1601
|
-
var A =
|
|
1601
|
+
var A = B[S.charAt(0)];
|
|
1602
1602
|
if (!n.ArrayBuffer)
|
|
1603
1603
|
return { type: A, data: { base64: !0, data: S.substr(1) } };
|
|
1604
1604
|
var m = i.decode(S.substr(1));
|
|
@@ -1857,20 +1857,20 @@ function He() {
|
|
|
1857
1857
|
return k;
|
|
1858
1858
|
}
|
|
1859
1859
|
function l() {
|
|
1860
|
-
if (
|
|
1860
|
+
if (B >= j)
|
|
1861
1861
|
throw Error("Invalid byte index");
|
|
1862
|
-
var m = 255 & E[
|
|
1863
|
-
if (
|
|
1862
|
+
var m = 255 & E[B];
|
|
1863
|
+
if (B++, (192 & m) == 128)
|
|
1864
1864
|
return 63 & m;
|
|
1865
1865
|
throw Error("Invalid continuation byte");
|
|
1866
1866
|
}
|
|
1867
1867
|
function i() {
|
|
1868
1868
|
var m, v, _, I, R;
|
|
1869
|
-
if (
|
|
1869
|
+
if (B > j)
|
|
1870
1870
|
throw Error("Invalid byte index");
|
|
1871
|
-
if (
|
|
1871
|
+
if (B == j)
|
|
1872
1872
|
return !1;
|
|
1873
|
-
if (m = 255 & E[
|
|
1873
|
+
if (m = 255 & E[B], B++, (128 & m) == 0)
|
|
1874
1874
|
return m;
|
|
1875
1875
|
if ((224 & m) == 192) {
|
|
1876
1876
|
var v = l();
|
|
@@ -1888,14 +1888,14 @@ function He() {
|
|
|
1888
1888
|
throw Error("Invalid UTF-8 detected");
|
|
1889
1889
|
}
|
|
1890
1890
|
function a(m) {
|
|
1891
|
-
E = o(m), j = E.length,
|
|
1891
|
+
E = o(m), j = E.length, B = 0;
|
|
1892
1892
|
for (var v, _ = []; (v = i()) !== !1; )
|
|
1893
1893
|
_.push(v);
|
|
1894
1894
|
return u(_);
|
|
1895
1895
|
}
|
|
1896
1896
|
var f = typeof t == "object" && t, g = typeof e == "object" && e && e.exports == f && e, y = typeof n == "object" && n;
|
|
1897
1897
|
(y.global === y || y.window === y) && (r = y);
|
|
1898
|
-
var E, j,
|
|
1898
|
+
var E, j, B, F = String.fromCharCode, L = { version: "2.0.0", encode: p, decode: a };
|
|
1899
1899
|
if (f && !f.nodeType)
|
|
1900
1900
|
if (g)
|
|
1901
1901
|
g.exports = L;
|
|
@@ -2111,7 +2111,7 @@ function He() {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
function o(g, y) {
|
|
2113
2113
|
function E(j) {
|
|
2114
|
-
var
|
|
2114
|
+
var B = a.deconstructPacket(j), F = r(B.packet), L = B.buffers;
|
|
2115
2115
|
L.unshift(F), y(L);
|
|
2116
2116
|
}
|
|
2117
2117
|
a.removeBlobs(g, E);
|
|
@@ -2132,8 +2132,8 @@ function He() {
|
|
|
2132
2132
|
}
|
|
2133
2133
|
if (g.charAt(E + 1) == "/")
|
|
2134
2134
|
for (y.nsp = ""; ++E; ) {
|
|
2135
|
-
var
|
|
2136
|
-
if (
|
|
2135
|
+
var B = g.charAt(E);
|
|
2136
|
+
if (B == "," || (y.nsp += B, E == g.length))
|
|
2137
2137
|
break;
|
|
2138
2138
|
}
|
|
2139
2139
|
else
|
|
@@ -2141,8 +2141,8 @@ function He() {
|
|
|
2141
2141
|
var F = g.charAt(E + 1);
|
|
2142
2142
|
if (F !== "" && Number(F) == F) {
|
|
2143
2143
|
for (y.id = ""; ++E; ) {
|
|
2144
|
-
var
|
|
2145
|
-
if (
|
|
2144
|
+
var B = g.charAt(E);
|
|
2145
|
+
if (B == null || Number(B) != B) {
|
|
2146
2146
|
--E;
|
|
2147
2147
|
break;
|
|
2148
2148
|
}
|
|
@@ -2238,25 +2238,25 @@ function He() {
|
|
|
2238
2238
|
O = x;
|
|
2239
2239
|
}
|
|
2240
2240
|
if (w == "json-parse") {
|
|
2241
|
-
var
|
|
2242
|
-
if (typeof
|
|
2241
|
+
var U = p.parse;
|
|
2242
|
+
if (typeof U == "function")
|
|
2243
2243
|
try {
|
|
2244
|
-
if (
|
|
2245
|
-
C =
|
|
2244
|
+
if (U("0") === 0 && !U(!1)) {
|
|
2245
|
+
C = U(D);
|
|
2246
2246
|
var N = C.a.length == 5 && C.a[0] === 1;
|
|
2247
2247
|
if (N) {
|
|
2248
2248
|
try {
|
|
2249
|
-
N = !
|
|
2249
|
+
N = !U('" "');
|
|
2250
2250
|
} catch {
|
|
2251
2251
|
}
|
|
2252
2252
|
if (N)
|
|
2253
2253
|
try {
|
|
2254
|
-
N =
|
|
2254
|
+
N = U("01") !== 1;
|
|
2255
2255
|
} catch {
|
|
2256
2256
|
}
|
|
2257
2257
|
if (N)
|
|
2258
2258
|
try {
|
|
2259
|
-
N =
|
|
2259
|
+
N = U("1.") !== 1;
|
|
2260
2260
|
} catch {
|
|
2261
2261
|
}
|
|
2262
2262
|
}
|
|
@@ -2279,8 +2279,8 @@ function He() {
|
|
|
2279
2279
|
if (!r("json")) {
|
|
2280
2280
|
var i = "[object Function]", a = "[object Date]", f = "[object Number]", g = "[object String]", y = "[object Array]", E = "[object Boolean]", j = r("bug-string-char-index");
|
|
2281
2281
|
if (!l)
|
|
2282
|
-
var
|
|
2283
|
-
return F[O] + 365 * (w - 1970) +
|
|
2282
|
+
var B = Math.floor, F = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], L = function(w, O) {
|
|
2283
|
+
return F[O] + 365 * (w - 1970) + B((w - 1969 + (O = +(O > 1))) / 4) - B((w - 1901 + O) / 100) + B((w - 1601 + O) / 400);
|
|
2284
2284
|
};
|
|
2285
2285
|
(o = {}.hasOwnProperty) || (o = function(w) {
|
|
2286
2286
|
var O, C = {};
|
|
@@ -2303,20 +2303,20 @@ function He() {
|
|
|
2303
2303
|
}).prototype.valueOf = 0, D = new C();
|
|
2304
2304
|
for (b in D)
|
|
2305
2305
|
o.call(D, b) && x++;
|
|
2306
|
-
return C = D = null, x ? u = x == 2 ? function(
|
|
2307
|
-
var q,
|
|
2308
|
-
for (q in
|
|
2309
|
-
tt && q == "prototype" || o.call(
|
|
2310
|
-
} : function(
|
|
2311
|
-
var q,
|
|
2312
|
-
for (q in
|
|
2313
|
-
tt && q == "prototype" || !o.call(
|
|
2314
|
-
(
|
|
2315
|
-
} : (D = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], u = function(
|
|
2316
|
-
var q,
|
|
2317
|
-
for (q in
|
|
2318
|
-
tt && q == "prototype" || !et.call(
|
|
2319
|
-
for (
|
|
2306
|
+
return C = D = null, x ? u = x == 2 ? function(U, N) {
|
|
2307
|
+
var q, J = {}, tt = d.call(U) == i;
|
|
2308
|
+
for (q in U)
|
|
2309
|
+
tt && q == "prototype" || o.call(J, q) || !(J[q] = 1) || !o.call(U, q) || N(q);
|
|
2310
|
+
} : function(U, N) {
|
|
2311
|
+
var q, J, tt = d.call(U) == i;
|
|
2312
|
+
for (q in U)
|
|
2313
|
+
tt && q == "prototype" || !o.call(U, q) || (J = q === "constructor") || N(q);
|
|
2314
|
+
(J || o.call(U, q = "constructor")) && N(q);
|
|
2315
|
+
} : (D = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], u = function(U, N) {
|
|
2316
|
+
var q, J, tt = d.call(U) == i, et = !tt && typeof U.constructor != "function" && T(U, "hasOwnProperty") ? U.hasOwnProperty : o;
|
|
2317
|
+
for (q in U)
|
|
2318
|
+
tt && q == "prototype" || !et.call(U, q) || N(q);
|
|
2319
|
+
for (J = D.length; q = D[--J]; et.call(U, q) && N(q))
|
|
2320
2320
|
;
|
|
2321
2321
|
}), u(w, O);
|
|
2322
2322
|
}, !r("json-stringify")) {
|
|
@@ -2325,8 +2325,8 @@ function He() {
|
|
|
2325
2325
|
}, _ = "\\u00", I = function(w) {
|
|
2326
2326
|
var O, C = '"', D = 0, b = w.length, x = b > 10 && j;
|
|
2327
2327
|
for (x && (O = w.split("")); b > D; D++) {
|
|
2328
|
-
var
|
|
2329
|
-
switch (
|
|
2328
|
+
var U = w.charCodeAt(D);
|
|
2329
|
+
switch (U) {
|
|
2330
2330
|
case 8:
|
|
2331
2331
|
case 9:
|
|
2332
2332
|
case 10:
|
|
@@ -2334,19 +2334,19 @@ function He() {
|
|
|
2334
2334
|
case 13:
|
|
2335
2335
|
case 34:
|
|
2336
2336
|
case 92:
|
|
2337
|
-
C += A[
|
|
2337
|
+
C += A[U];
|
|
2338
2338
|
break;
|
|
2339
2339
|
default:
|
|
2340
|
-
if (32 >
|
|
2341
|
-
C += _ + v(2,
|
|
2340
|
+
if (32 > U) {
|
|
2341
|
+
C += _ + v(2, U.toString(16));
|
|
2342
2342
|
break;
|
|
2343
2343
|
}
|
|
2344
2344
|
C += x ? O[D] : j ? w.charAt(D) : w[D];
|
|
2345
2345
|
}
|
|
2346
2346
|
}
|
|
2347
2347
|
return C + '"';
|
|
2348
|
-
}, R = function(w, O, C, D, b, x,
|
|
2349
|
-
var N, q,
|
|
2348
|
+
}, R = function(w, O, C, D, b, x, U) {
|
|
2349
|
+
var N, q, J, tt, et, yt, Rt, It, xt, Bt, ht, Ut, St, mt, Dt, Pt;
|
|
2350
2350
|
try {
|
|
2351
2351
|
N = O[w];
|
|
2352
2352
|
} catch {
|
|
@@ -2356,14 +2356,14 @@ function He() {
|
|
|
2356
2356
|
typeof N.toJSON == "function" && (q != f && q != g && q != y || o.call(N, "toJSON")) && (N = N.toJSON(w));
|
|
2357
2357
|
else if (N > -1 / 0 && 1 / 0 > N) {
|
|
2358
2358
|
if (L) {
|
|
2359
|
-
for (et =
|
|
2359
|
+
for (et = B(N / 864e5), J = B(et / 365.2425) + 1970 - 1; L(J + 1, 0) <= et; J++)
|
|
2360
2360
|
;
|
|
2361
|
-
for (tt =
|
|
2361
|
+
for (tt = B((et - L(J, 0)) / 30.42); L(J, tt + 1) <= et; tt++)
|
|
2362
2362
|
;
|
|
2363
|
-
et = 1 + et - L(
|
|
2363
|
+
et = 1 + et - L(J, tt), yt = (N % 864e5 + 864e5) % 864e5, Rt = B(yt / 36e5) % 24, It = B(yt / 6e4) % 60, xt = B(yt / 1e3) % 60, Bt = yt % 1e3;
|
|
2364
2364
|
} else
|
|
2365
|
-
|
|
2366
|
-
N = (0 >=
|
|
2365
|
+
J = N.getUTCFullYear(), tt = N.getUTCMonth(), et = N.getUTCDate(), Rt = N.getUTCHours(), It = N.getUTCMinutes(), xt = N.getUTCSeconds(), Bt = N.getUTCMilliseconds();
|
|
2366
|
+
N = (0 >= J || J >= 1e4 ? (0 > J ? "-" : "+") + v(6, 0 > J ? -J : J) : v(4, J)) + "-" + v(2, tt + 1) + "-" + v(2, et) + "T" + v(2, Rt) + ":" + v(2, It) + ":" + v(2, xt) + "." + v(3, Bt) + "Z";
|
|
2367
2367
|
} else
|
|
2368
2368
|
N = null;
|
|
2369
2369
|
if (C && (N = C.call(O, w, N)), N === null)
|
|
@@ -2375,45 +2375,45 @@ function He() {
|
|
|
2375
2375
|
if (q == g)
|
|
2376
2376
|
return I("" + N);
|
|
2377
2377
|
if (typeof N == "object") {
|
|
2378
|
-
for (mt =
|
|
2379
|
-
if (
|
|
2378
|
+
for (mt = U.length; mt--; )
|
|
2379
|
+
if (U[mt] === N)
|
|
2380
2380
|
throw TypeError();
|
|
2381
|
-
if (
|
|
2381
|
+
if (U.push(N), ht = [], Dt = x, x += b, q == y) {
|
|
2382
2382
|
for (St = 0, mt = N.length; mt > St; St++)
|
|
2383
|
-
|
|
2383
|
+
Ut = R(St, N, C, D, b, x, U), ht.push(Ut === h ? "null" : Ut);
|
|
2384
2384
|
Pt = ht.length ? b ? `[
|
|
2385
2385
|
` + x + ht.join(`,
|
|
2386
2386
|
` + x) + `
|
|
2387
2387
|
` + Dt + "]" : "[" + ht.join(",") + "]" : "[]";
|
|
2388
2388
|
} else
|
|
2389
2389
|
u(D || N, function(jt) {
|
|
2390
|
-
var oe = R(jt, N, C, D, b, x,
|
|
2390
|
+
var oe = R(jt, N, C, D, b, x, U);
|
|
2391
2391
|
oe !== h && ht.push(I(jt) + ":" + (b ? " " : "") + oe);
|
|
2392
2392
|
}), Pt = ht.length ? b ? `{
|
|
2393
2393
|
` + x + ht.join(`,
|
|
2394
2394
|
` + x) + `
|
|
2395
2395
|
` + Dt + "}" : "{" + ht.join(",") + "}" : "{}";
|
|
2396
|
-
return
|
|
2396
|
+
return U.pop(), Pt;
|
|
2397
2397
|
}
|
|
2398
2398
|
};
|
|
2399
2399
|
p.stringify = function(w, O, C) {
|
|
2400
|
-
var D, b, x,
|
|
2400
|
+
var D, b, x, U;
|
|
2401
2401
|
if (typeof O == "function" || typeof O == "object" && O) {
|
|
2402
|
-
if ((
|
|
2402
|
+
if ((U = d.call(O)) == i)
|
|
2403
2403
|
b = O;
|
|
2404
|
-
else if (
|
|
2404
|
+
else if (U == y) {
|
|
2405
2405
|
x = {};
|
|
2406
|
-
for (var N, q = 0,
|
|
2406
|
+
for (var N, q = 0, J = O.length; J > q; N = O[q++], U = d.call(N), (U == g || U == f) && (x[N] = 1))
|
|
2407
2407
|
;
|
|
2408
2408
|
}
|
|
2409
2409
|
}
|
|
2410
2410
|
if (C)
|
|
2411
|
-
if ((
|
|
2411
|
+
if ((U = d.call(C)) == f) {
|
|
2412
2412
|
if ((C -= C % 1) > 0)
|
|
2413
2413
|
for (D = "", C > 10 && (C = 10); D.length < C; D += " ")
|
|
2414
2414
|
;
|
|
2415
2415
|
} else
|
|
2416
|
-
|
|
2416
|
+
U == g && (D = C.length <= 10 ? C : C.slice(0, 10));
|
|
2417
2417
|
return R("", (N = {}, N[""] = w, N), b, x, D, "", []);
|
|
2418
2418
|
};
|
|
2419
2419
|
}
|
|
@@ -2422,7 +2422,7 @@ function He() {
|
|
|
2422
2422
|
`, 102: "\f", 114: "\r" }, M = function() {
|
|
2423
2423
|
throw k = W = null, SyntaxError();
|
|
2424
2424
|
}, Y = function() {
|
|
2425
|
-
for (var w, O, C, D, b, x = W,
|
|
2425
|
+
for (var w, O, C, D, b, x = W, U = x.length; U > k; )
|
|
2426
2426
|
switch (b = x.charCodeAt(k)) {
|
|
2427
2427
|
case 9:
|
|
2428
2428
|
case 10:
|
|
@@ -2438,7 +2438,7 @@ function He() {
|
|
|
2438
2438
|
case 44:
|
|
2439
2439
|
return w = j ? x.charAt(k) : x[k], k++, w;
|
|
2440
2440
|
case 34:
|
|
2441
|
-
for (w = "@", k++;
|
|
2441
|
+
for (w = "@", k++; U > k; )
|
|
2442
2442
|
if (b = x.charCodeAt(k), 32 > b)
|
|
2443
2443
|
M();
|
|
2444
2444
|
else if (b == 92)
|
|
@@ -2473,15 +2473,15 @@ function He() {
|
|
|
2473
2473
|
M();
|
|
2474
2474
|
default:
|
|
2475
2475
|
if (O = k, b == 45 && (D = !0, b = x.charCodeAt(++k)), b >= 48 && 57 >= b) {
|
|
2476
|
-
for (b == 48 && (b = x.charCodeAt(k + 1), b >= 48 && 57 >= b) && M(), D = !1;
|
|
2476
|
+
for (b == 48 && (b = x.charCodeAt(k + 1), b >= 48 && 57 >= b) && M(), D = !1; U > k && (b = x.charCodeAt(k), b >= 48 && 57 >= b); k++)
|
|
2477
2477
|
;
|
|
2478
2478
|
if (x.charCodeAt(k) == 46) {
|
|
2479
|
-
for (C = ++k;
|
|
2479
|
+
for (C = ++k; U > C && (b = x.charCodeAt(C), b >= 48 && 57 >= b); C++)
|
|
2480
2480
|
;
|
|
2481
2481
|
C == k && M(), k = C;
|
|
2482
2482
|
}
|
|
2483
2483
|
if (b = x.charCodeAt(k), b == 101 || b == 69) {
|
|
2484
|
-
for (b = x.charCodeAt(++k), (b == 43 || b == 45) && k++, C = k;
|
|
2484
|
+
for (b = x.charCodeAt(++k), (b == 43 || b == 45) && k++, C = k; U > C && (b = x.charCodeAt(C), b >= 48 && 57 >= b); C++)
|
|
2485
2485
|
;
|
|
2486
2486
|
C == k && M(), k = C;
|
|
2487
2487
|
}
|
|
@@ -2688,13 +2688,31 @@ class qt {
|
|
|
2688
2688
|
e[t] = n;
|
|
2689
2689
|
}
|
|
2690
2690
|
/**
|
|
2691
|
-
* Configures UTC for
|
|
2691
|
+
* Configures UTC timestamps for an object by converting server-time properties to both UTC and client-local UTC timestamps
|
|
2692
2692
|
*
|
|
2693
|
-
*
|
|
2694
|
-
*
|
|
2695
|
-
*
|
|
2696
|
-
*
|
|
2693
|
+
* For each specified property, creates two new timestamp properties:
|
|
2694
|
+
* - property_UTC: Server timestamp converted to UTC milliseconds
|
|
2695
|
+
* - property_UTC_CLIENT: Server timestamp converted to client-local UTC milliseconds
|
|
2696
|
+
*
|
|
2697
|
+
* @example
|
|
2698
|
+
* // Input object
|
|
2699
|
+
* const data = {
|
|
2700
|
+
* callStarted: 1634567890 // Unix timestamp in seconds
|
|
2701
|
+
* }
|
|
2702
|
+
*
|
|
2703
|
+
* // After configureUTCForObject:
|
|
2704
|
+
* {
|
|
2705
|
+
* callStarted: 1634567890,
|
|
2706
|
+
* callStarted_UTC: 1634567890000, // Converted to UTC ms
|
|
2707
|
+
* callStarted_UTC_CLIENT: 1634571490000 // Converted to client-local UTC ms
|
|
2708
|
+
* }
|
|
2709
|
+
*
|
|
2710
|
+
* @param data - Source object containing server timestamp properties
|
|
2711
|
+
* @param properties - Array of property configs specifying which properties to convert and their format
|
|
2712
|
+
* @param servertime - Current server time in seconds
|
|
2713
|
+
* @param servertimeoffset - Server timezone offset in minutes
|
|
2697
2714
|
* @private
|
|
2715
|
+
* @returns Original object extended with new _UTC and _UTC_CLIENT properties for each configured timestamp
|
|
2698
2716
|
*/
|
|
2699
2717
|
static configureUTCForObject(e, t, n, r) {
|
|
2700
2718
|
const o = (n - r * 60) * 1e3, u = Date.now() - o, h = {};
|
|
@@ -2770,6 +2788,9 @@ class un {
|
|
|
2770
2788
|
this.eventsSdkClass.loggerClass.sdkAttemptToConnectError(r);
|
|
2771
2789
|
}
|
|
2772
2790
|
}
|
|
2791
|
+
clearKeepAliveInterval() {
|
|
2792
|
+
this.keepAliveInterval && clearInterval(this.keepAliveInterval);
|
|
2793
|
+
}
|
|
2773
2794
|
initKeepAlive() {
|
|
2774
2795
|
this.keepAliveInterval && clearInterval(this.keepAliveInterval), this.keepAliveInterval = setInterval(async () => {
|
|
2775
2796
|
if ((/* @__PURE__ */ new Date()).getTime() > this.lastEventTimestamp + this.eventsSdkClass.options.keepAliveTimeout && this.io && this.eventsSdkClass.authClass.token) {
|
|
@@ -2846,7 +2867,7 @@ class un {
|
|
|
2846
2867
|
);
|
|
2847
2868
|
}
|
|
2848
2869
|
}
|
|
2849
|
-
var pn = Object.defineProperty, fn = (s, e, t) => e in s ? pn(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t,
|
|
2870
|
+
var pn = Object.defineProperty, fn = (s, e, t) => e in s ? pn(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, X = (s, e, t) => (fn(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
2850
2871
|
const ct = /* @__PURE__ */ Object.create(null);
|
|
2851
2872
|
ct.open = "0";
|
|
2852
2873
|
ct.close = "1";
|
|
@@ -3198,12 +3219,12 @@ class Zt extends $ {
|
|
|
3198
3219
|
return t.length ? "?" + t : "";
|
|
3199
3220
|
}
|
|
3200
3221
|
}
|
|
3201
|
-
const Ie = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),
|
|
3222
|
+
const Ie = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), Jt = 64, Rn = {};
|
|
3202
3223
|
let le = 0, Et = 0, ue;
|
|
3203
3224
|
function pe(s) {
|
|
3204
3225
|
let e = "";
|
|
3205
3226
|
do
|
|
3206
|
-
e = Ie[s %
|
|
3227
|
+
e = Ie[s % Jt] + e, s = Math.floor(s / Jt);
|
|
3207
3228
|
while (s > 0);
|
|
3208
3229
|
return e;
|
|
3209
3230
|
}
|
|
@@ -3211,15 +3232,15 @@ function xe() {
|
|
|
3211
3232
|
const s = pe(+/* @__PURE__ */ new Date());
|
|
3212
3233
|
return s !== ue ? (le = 0, ue = s) : s + "." + pe(le++);
|
|
3213
3234
|
}
|
|
3214
|
-
for (; Et <
|
|
3235
|
+
for (; Et < Jt; Et++)
|
|
3215
3236
|
Rn[Ie[Et]] = Et;
|
|
3216
|
-
let
|
|
3237
|
+
let Be = !1;
|
|
3217
3238
|
try {
|
|
3218
|
-
|
|
3239
|
+
Be = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
|
3219
3240
|
} catch {
|
|
3220
3241
|
}
|
|
3221
|
-
const In =
|
|
3222
|
-
function
|
|
3242
|
+
const In = Be;
|
|
3243
|
+
function Ue(s) {
|
|
3223
3244
|
const e = s.xdomain;
|
|
3224
3245
|
try {
|
|
3225
3246
|
if (typeof XMLHttpRequest < "u" && (!e || In))
|
|
@@ -3234,12 +3255,12 @@ function Be(s) {
|
|
|
3234
3255
|
}
|
|
3235
3256
|
function xn() {
|
|
3236
3257
|
}
|
|
3237
|
-
const
|
|
3238
|
-
return new
|
|
3258
|
+
const Bn = function() {
|
|
3259
|
+
return new Ue({
|
|
3239
3260
|
xdomain: !1
|
|
3240
3261
|
}).responseType != null;
|
|
3241
3262
|
}();
|
|
3242
|
-
class
|
|
3263
|
+
class Un extends Zt {
|
|
3243
3264
|
/**
|
|
3244
3265
|
* XHR Polling constructor.
|
|
3245
3266
|
*
|
|
@@ -3253,7 +3274,7 @@ class Bn extends Zt {
|
|
|
3253
3274
|
r || (r = n ? "443" : "80"), this.xd = typeof location < "u" && e.hostname !== location.hostname || r !== e.port;
|
|
3254
3275
|
}
|
|
3255
3276
|
const t = e && e.forceBase64;
|
|
3256
|
-
this.supportsBinary =
|
|
3277
|
+
this.supportsBinary = Bn && !t, this.opts.withCredentials && (this.cookieJar = void 0);
|
|
3257
3278
|
}
|
|
3258
3279
|
get name() {
|
|
3259
3280
|
return "polling";
|
|
@@ -3398,7 +3419,7 @@ class at extends $ {
|
|
|
3398
3419
|
var e;
|
|
3399
3420
|
const t = Re(this.opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
|
|
3400
3421
|
t.xdomain = !!this.opts.xd;
|
|
3401
|
-
const n = this.xhr = new
|
|
3422
|
+
const n = this.xhr = new Ue(t);
|
|
3402
3423
|
try {
|
|
3403
3424
|
n.open(this.method, this.uri, !0);
|
|
3404
3425
|
try {
|
|
@@ -3607,7 +3628,7 @@ class jn extends Zt {
|
|
|
3607
3628
|
const qn = {
|
|
3608
3629
|
websocket: Pn,
|
|
3609
3630
|
webtransport: jn,
|
|
3610
|
-
polling:
|
|
3631
|
+
polling: Un
|
|
3611
3632
|
}, Fn = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, Mn = [
|
|
3612
3633
|
"source",
|
|
3613
3634
|
"protocol",
|
|
@@ -3624,7 +3645,7 @@ const qn = {
|
|
|
3624
3645
|
"query",
|
|
3625
3646
|
"anchor"
|
|
3626
3647
|
];
|
|
3627
|
-
function
|
|
3648
|
+
function Xt(s) {
|
|
3628
3649
|
if (s.length > 2e3)
|
|
3629
3650
|
throw "URI too long";
|
|
3630
3651
|
const e = s, t = s.indexOf("["), n = s.indexOf("]");
|
|
@@ -3652,7 +3673,7 @@ let De = class ft extends $ {
|
|
|
3652
3673
|
* @param {Object} opts - options
|
|
3653
3674
|
*/
|
|
3654
3675
|
constructor(e, t = {}) {
|
|
3655
|
-
super(), this.binaryType = Dn, this.writeBuffer = [], e && typeof e == "object" && (t = e, e = null), e ? (e =
|
|
3676
|
+
super(), this.binaryType = Dn, this.writeBuffer = [], e && typeof e == "object" && (t = e, e = null), e ? (e = Xt(e), t.hostname = e.host, t.secure = e.protocol === "https" || e.protocol === "wss", t.port = e.port, e.query && (t.query = e.query)) : t.host && (t.hostname = Xt(t.host).host), Lt(this, t), this.secure = t.secure != null ? t.secure : typeof location < "u" && location.protocol === "https:", t.hostname && !t.port && (t.port = this.secure ? "443" : "80"), this.hostname = t.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = t.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = t.transports || [
|
|
3656
3677
|
"polling",
|
|
3657
3678
|
"websocket",
|
|
3658
3679
|
"webtransport"
|
|
@@ -3952,13 +3973,13 @@ let De = class ft extends $ {
|
|
|
3952
3973
|
De.protocol = Le;
|
|
3953
3974
|
function Wn(s, e = "", t) {
|
|
3954
3975
|
let n = s;
|
|
3955
|
-
t = t || typeof location < "u" && location, s == null && (s = t.protocol + "//" + t.host), typeof s == "string" && (s.charAt(0) === "/" && (s.charAt(1) === "/" ? s = t.protocol + s : s = t.host + s), /^(https?|wss?):\/\//.test(s) || (typeof t < "u" ? s = t.protocol + "//" + s : s = "https://" + s), n =
|
|
3976
|
+
t = t || typeof location < "u" && location, s == null && (s = t.protocol + "//" + t.host), typeof s == "string" && (s.charAt(0) === "/" && (s.charAt(1) === "/" ? s = t.protocol + s : s = t.host + s), /^(https?|wss?):\/\//.test(s) || (typeof t < "u" ? s = t.protocol + "//" + s : s = "https://" + s), n = Xt(s)), n.port || (/^(http|ws)$/.test(n.protocol) ? n.port = "80" : /^(http|ws)s$/.test(n.protocol) && (n.port = "443")), n.path = n.path || "/";
|
|
3956
3977
|
const r = n.host.indexOf(":") !== -1 ? "[" + n.host + "]" : n.host;
|
|
3957
3978
|
return n.id = n.protocol + "://" + r + ":" + n.port + e, n.href = n.protocol + "://" + r + (t && t.port === n.port ? "" : ":" + n.port), n;
|
|
3958
3979
|
}
|
|
3959
|
-
const Gn = typeof ArrayBuffer == "function",
|
|
3980
|
+
const Gn = typeof ArrayBuffer == "function", Jn = (s) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(s) : s.buffer instanceof ArrayBuffer, Pe = Object.prototype.toString, Xn = typeof Blob == "function" || typeof Blob < "u" && Pe.call(Blob) === "[object BlobConstructor]", $n = typeof File == "function" || typeof File < "u" && Pe.call(File) === "[object FileConstructor]";
|
|
3960
3981
|
function ee(s) {
|
|
3961
|
-
return Gn && (s instanceof ArrayBuffer ||
|
|
3982
|
+
return Gn && (s instanceof ArrayBuffer || Jn(s)) || Xn && s instanceof Blob || $n && s instanceof File;
|
|
3962
3983
|
}
|
|
3963
3984
|
function _t(s, e) {
|
|
3964
3985
|
if (!s || typeof s != "object")
|
|
@@ -5216,7 +5237,7 @@ class ds {
|
|
|
5216
5237
|
* @param options The configuration of the logger.
|
|
5217
5238
|
*/
|
|
5218
5239
|
constructor(e) {
|
|
5219
|
-
|
|
5240
|
+
X(this, "logToConsole"), X(this, "overloadGlobalConsole"), X(this, "system"), X(this, "socketEmitInterval"), X(this, "storageId"), X(this, "emitInProgress"), X(this, "queue"), X(this, "processing"), X(this, "storageInitialized"), X(this, "interval"), X(this, "logIndex"), X(this, "socket"), X(this, "requestUrl"), X(this, "staticObject", {}), X(this, "localObject", {}), X(this, "isGetItemAsync"), X(this, "isSetItemAsync"), X(this, "getItem"), X(this, "setItem"), X(this, "parseLog"), X(this, "_logMethod"), X(this, "_warnMethod"), X(this, "_errorMethod"), X(this, "_debugMethod");
|
|
5220
5241
|
const { loggerOptions: t } = e;
|
|
5221
5242
|
if (!t.system)
|
|
5222
5243
|
throw new Error("Config property 'system' should be provided!");
|
|
@@ -5311,7 +5332,7 @@ class ds {
|
|
|
5311
5332
|
...this.staticObject,
|
|
5312
5333
|
...p
|
|
5313
5334
|
}, i = this.populateSendingLog(l);
|
|
5314
|
-
this.socket ? await this.socket.emit("Log", i) : this.requestUrl && u.push(i), r.push(c);
|
|
5335
|
+
i.Body && typeof i.Body == "string" && (i.Body = JSON.parse(i.Body)), this.socket ? await this.socket.emit("Log", i) : this.requestUrl && u.push(i), r.push(c);
|
|
5315
5336
|
}
|
|
5316
5337
|
u.length && await this.sendHttpRequest(u);
|
|
5317
5338
|
const h = await this.getItem(this.storageId);
|
|
@@ -5775,6 +5796,9 @@ class ks {
|
|
|
5775
5796
|
disconnect() {
|
|
5776
5797
|
this.socketIoClass.doReconnect = !1, this.socketIoClass.closeAllConnections(), this.loggerClass.stop();
|
|
5777
5798
|
}
|
|
5799
|
+
clearKeepAliveInterval() {
|
|
5800
|
+
this.socketIoClass.clearKeepAliveInterval();
|
|
5801
|
+
}
|
|
5778
5802
|
findMainServer() {
|
|
5779
5803
|
this.servers.length ? (this.mainServer = this.servers.reduce((e, t) => t.Priority > e.Priority ? t : e), this.server = this.mainServer) : this.URLList.length && (this.URL = this.URLList[0]);
|
|
5780
5804
|
}
|