@streamlayer/sdk-web 0.28.29 → 0.29.1
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/lib/cjs/index.js +12 -12
- package/lib/es/index.js +976 -924
- package/package.json +5 -5
package/lib/es/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionStatus as We, QuestionType as Te, SilenceSetting as Kr } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
3
|
import { SdkOverlayType as ue } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
4
|
import { computed as Hr, map as qn, atom as Ct } from "nanostores";
|
|
5
|
-
import "@nanostores/logger";
|
|
6
|
-
import "microdiff";
|
|
7
|
-
import { Code as
|
|
8
|
-
import { createGrpcWebTransport as
|
|
9
|
-
import { nanoquery as
|
|
10
|
-
import { Events as
|
|
11
|
-
import { Client as
|
|
5
|
+
import { buildLogger as Qn } from "@nanostores/logger";
|
|
6
|
+
import Gn from "microdiff";
|
|
7
|
+
import { Code as zn, createPromiseClient as Kn, createCallbackClient as Hn } from "@connectrpc/connect";
|
|
8
|
+
import { createGrpcWebTransport as Wn } from "@connectrpc/connect-web";
|
|
9
|
+
import { nanoquery as Jn } from "@nanostores/query";
|
|
10
|
+
import { Events as Yn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
11
|
+
import { Client as lt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
12
12
|
import { Users as Wr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
13
|
-
import { pino as
|
|
13
|
+
import { pino as Xn } from "pino";
|
|
14
14
|
import { Feed as ve } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
15
|
import { Leaderboard as Jr } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
17
|
var Yr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
18
|
-
function
|
|
18
|
+
function Zn(t) {
|
|
19
19
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
20
20
|
}
|
|
21
|
-
var
|
|
22
|
-
Ot.byteLength =
|
|
23
|
-
Ot.toByteArray =
|
|
24
|
-
Ot.fromByteArray =
|
|
25
|
-
var
|
|
26
|
-
for (var qe = 0,
|
|
27
|
-
|
|
21
|
+
var O = {}, Xr = {}, Ot = {};
|
|
22
|
+
Ot.byteLength = ri;
|
|
23
|
+
Ot.toByteArray = ii;
|
|
24
|
+
Ot.fromByteArray = ai;
|
|
25
|
+
var be = [], se = [], ei = typeof Uint8Array < "u" ? Uint8Array : Array, Nt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
26
|
+
for (var qe = 0, ti = Nt.length; qe < ti; ++qe)
|
|
27
|
+
be[qe] = Nt[qe], se[Nt.charCodeAt(qe)] = qe;
|
|
28
28
|
se["-".charCodeAt(0)] = 62;
|
|
29
29
|
se["_".charCodeAt(0)] = 63;
|
|
30
30
|
function Zr(t) {
|
|
@@ -36,58 +36,58 @@ function Zr(t) {
|
|
|
36
36
|
var o = r === e ? 0 : 4 - r % 4;
|
|
37
37
|
return [r, o];
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ri(t) {
|
|
40
40
|
var e = Zr(t), r = e[0], o = e[1];
|
|
41
41
|
return (r + o) * 3 / 4 - o;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ni(t, e, r) {
|
|
44
44
|
return (e + r) * 3 / 4 - r;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
var e, r = Zr(t), o = r[0], s = r[1], u = new
|
|
48
|
-
for (p = 0; p <
|
|
46
|
+
function ii(t) {
|
|
47
|
+
var e, r = Zr(t), o = r[0], s = r[1], u = new ei(ni(t, o, s)), l = 0, c = s > 0 ? o - 4 : o, p;
|
|
48
|
+
for (p = 0; p < c; p += 4)
|
|
49
49
|
e = se[t.charCodeAt(p)] << 18 | se[t.charCodeAt(p + 1)] << 12 | se[t.charCodeAt(p + 2)] << 6 | se[t.charCodeAt(p + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
|
|
50
50
|
return s === 2 && (e = se[t.charCodeAt(p)] << 2 | se[t.charCodeAt(p + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = se[t.charCodeAt(p)] << 10 | se[t.charCodeAt(p + 1)] << 4 | se[t.charCodeAt(p + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function oi(t) {
|
|
53
|
+
return be[t >> 18 & 63] + be[t >> 12 & 63] + be[t >> 6 & 63] + be[t & 63];
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function si(t, e, r) {
|
|
56
56
|
for (var o, s = [], u = e; u < r; u += 3)
|
|
57
|
-
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(
|
|
57
|
+
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(oi(o));
|
|
58
58
|
return s.join("");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0,
|
|
62
|
-
s.push(
|
|
60
|
+
function ai(t) {
|
|
61
|
+
for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0, c = r - o; l < c; l += u)
|
|
62
|
+
s.push(si(t, l, l + u > c ? c : l + u));
|
|
63
63
|
return o === 1 ? (e = t[r - 1], s.push(
|
|
64
|
-
|
|
64
|
+
be[e >> 2] + be[e << 4 & 63] + "=="
|
|
65
65
|
)) : o === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
66
|
-
|
|
66
|
+
be[e >> 10] + be[e >> 4 & 63] + be[e << 2 & 63] + "="
|
|
67
67
|
)), s.join("");
|
|
68
68
|
}
|
|
69
69
|
var fr = {};
|
|
70
70
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
71
71
|
fr.read = function(t, e, r, o, s) {
|
|
72
|
-
var u, l,
|
|
73
|
-
for (m += E, u = F & (1 << -g) - 1, F >>= -g, g +=
|
|
72
|
+
var u, l, c = s * 8 - o - 1, p = (1 << c) - 1, b = p >> 1, g = -7, m = r ? s - 1 : 0, E = r ? -1 : 1, F = t[e + m];
|
|
73
|
+
for (m += E, u = F & (1 << -g) - 1, F >>= -g, g += c; g > 0; u = u * 256 + t[e + m], m += E, g -= 8)
|
|
74
74
|
;
|
|
75
75
|
for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e + m], m += E, g -= 8)
|
|
76
76
|
;
|
|
77
77
|
if (u === 0)
|
|
78
|
-
u = 1 -
|
|
78
|
+
u = 1 - b;
|
|
79
79
|
else {
|
|
80
80
|
if (u === p)
|
|
81
81
|
return l ? NaN : (F ? -1 : 1) * (1 / 0);
|
|
82
|
-
l = l + Math.pow(2, o), u = u -
|
|
82
|
+
l = l + Math.pow(2, o), u = u - b;
|
|
83
83
|
}
|
|
84
84
|
return (F ? -1 : 1) * l * Math.pow(2, u - o);
|
|
85
85
|
};
|
|
86
86
|
fr.write = function(t, e, r, o, s, u) {
|
|
87
|
-
var l,
|
|
88
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (
|
|
87
|
+
var l, c, p, b = u * 8 - s - 1, g = (1 << b) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = o ? 0 : u - 1, L = o ? 1 : -1, P = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
88
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (c = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -l)) < 1 && (l--, p *= 2), l + m >= 1 ? e += E / p : e += E * Math.pow(2, 1 - m), e * p >= 2 && (l++, p /= 2), l + m >= g ? (c = 0, l = g) : l + m >= 1 ? (c = (e * p - 1) * Math.pow(2, s), l = l + m) : (c = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + F] = c & 255, F += L, c /= 256, s -= 8)
|
|
89
89
|
;
|
|
90
|
-
for (l = l << s |
|
|
90
|
+
for (l = l << s | c, b += s; b > 0; t[r + F] = l & 255, F += L, l /= 256, b -= 8)
|
|
91
91
|
;
|
|
92
92
|
t[r + F - L] |= P * 128;
|
|
93
93
|
};
|
|
@@ -99,9 +99,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
99
99
|
*/
|
|
100
100
|
(function(t) {
|
|
101
101
|
const e = Ot, r = fr, o = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
102
|
-
t.Buffer =
|
|
102
|
+
t.Buffer = c, t.SlowBuffer = _, t.INSPECT_MAX_BYTES = 50;
|
|
103
103
|
const s = 2147483647;
|
|
104
|
-
t.kMaxLength = s,
|
|
104
|
+
t.kMaxLength = s, c.TYPED_ARRAY_SUPPORT = u(), !c.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
105
105
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
106
106
|
);
|
|
107
107
|
function u() {
|
|
@@ -114,16 +114,16 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
114
114
|
return !1;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
Object.defineProperty(
|
|
117
|
+
Object.defineProperty(c.prototype, "parent", {
|
|
118
118
|
enumerable: !0,
|
|
119
119
|
get: function() {
|
|
120
|
-
if (
|
|
120
|
+
if (c.isBuffer(this))
|
|
121
121
|
return this.buffer;
|
|
122
122
|
}
|
|
123
|
-
}), Object.defineProperty(
|
|
123
|
+
}), Object.defineProperty(c.prototype, "offset", {
|
|
124
124
|
enumerable: !0,
|
|
125
125
|
get: function() {
|
|
126
|
-
if (
|
|
126
|
+
if (c.isBuffer(this))
|
|
127
127
|
return this.byteOffset;
|
|
128
128
|
}
|
|
129
129
|
});
|
|
@@ -131,9 +131,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
131
131
|
if (a > s)
|
|
132
132
|
throw new RangeError('The value "' + a + '" is invalid for option "size"');
|
|
133
133
|
const n = new Uint8Array(a);
|
|
134
|
-
return Object.setPrototypeOf(n,
|
|
134
|
+
return Object.setPrototypeOf(n, c.prototype), n;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function c(a, n, i) {
|
|
137
137
|
if (typeof a == "number") {
|
|
138
138
|
if (typeof n == "string")
|
|
139
139
|
throw new TypeError(
|
|
@@ -143,7 +143,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
143
143
|
}
|
|
144
144
|
return p(a, n, i);
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
c.poolSize = 8192;
|
|
147
147
|
function p(a, n, i) {
|
|
148
148
|
if (typeof a == "string")
|
|
149
149
|
return E(a, n);
|
|
@@ -159,53 +159,53 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
159
159
|
throw new TypeError(
|
|
160
160
|
'The "value" argument must not be of type number. Received type number'
|
|
161
161
|
);
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
return
|
|
162
|
+
const f = a.valueOf && a.valueOf();
|
|
163
|
+
if (f != null && f !== a)
|
|
164
|
+
return c.from(f, n, i);
|
|
165
165
|
const h = K(a);
|
|
166
166
|
if (h)
|
|
167
167
|
return h;
|
|
168
168
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof a[Symbol.toPrimitive] == "function")
|
|
169
|
-
return
|
|
169
|
+
return c.from(a[Symbol.toPrimitive]("string"), n, i);
|
|
170
170
|
throw new TypeError(
|
|
171
171
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
c.from = function(a, n, i) {
|
|
175
175
|
return p(a, n, i);
|
|
176
|
-
}, Object.setPrototypeOf(
|
|
177
|
-
function
|
|
176
|
+
}, Object.setPrototypeOf(c.prototype, Uint8Array.prototype), Object.setPrototypeOf(c, Uint8Array);
|
|
177
|
+
function b(a) {
|
|
178
178
|
if (typeof a != "number")
|
|
179
179
|
throw new TypeError('"size" argument must be of type number');
|
|
180
180
|
if (a < 0)
|
|
181
181
|
throw new RangeError('The value "' + a + '" is invalid for option "size"');
|
|
182
182
|
}
|
|
183
183
|
function g(a, n, i) {
|
|
184
|
-
return
|
|
184
|
+
return b(a), a <= 0 ? l(a) : n !== void 0 ? typeof i == "string" ? l(a).fill(n, i) : l(a).fill(n) : l(a);
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
c.alloc = function(a, n, i) {
|
|
187
187
|
return g(a, n, i);
|
|
188
188
|
};
|
|
189
189
|
function m(a) {
|
|
190
|
-
return
|
|
190
|
+
return b(a), l(a < 0 ? 0 : I(a) | 0);
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
c.allocUnsafe = function(a) {
|
|
193
193
|
return m(a);
|
|
194
|
-
},
|
|
194
|
+
}, c.allocUnsafeSlow = function(a) {
|
|
195
195
|
return m(a);
|
|
196
196
|
};
|
|
197
197
|
function E(a, n) {
|
|
198
|
-
if ((typeof n != "string" || n === "") && (n = "utf8"), !
|
|
198
|
+
if ((typeof n != "string" || n === "") && (n = "utf8"), !c.isEncoding(n))
|
|
199
199
|
throw new TypeError("Unknown encoding: " + n);
|
|
200
200
|
const i = D(a, n) | 0;
|
|
201
|
-
let
|
|
202
|
-
const h =
|
|
203
|
-
return h !== i && (
|
|
201
|
+
let f = l(i);
|
|
202
|
+
const h = f.write(a, n);
|
|
203
|
+
return h !== i && (f = f.slice(0, h)), f;
|
|
204
204
|
}
|
|
205
205
|
function F(a) {
|
|
206
206
|
const n = a.length < 0 ? 0 : I(a.length) | 0, i = l(n);
|
|
207
|
-
for (let
|
|
208
|
-
i[
|
|
207
|
+
for (let f = 0; f < n; f += 1)
|
|
208
|
+
i[f] = a[f] & 255;
|
|
209
209
|
return i;
|
|
210
210
|
}
|
|
211
211
|
function L(a) {
|
|
@@ -220,11 +220,11 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
220
220
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
221
221
|
if (a.byteLength < n + (i || 0))
|
|
222
222
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
223
|
-
let
|
|
224
|
-
return n === void 0 && i === void 0 ?
|
|
223
|
+
let f;
|
|
224
|
+
return n === void 0 && i === void 0 ? f = new Uint8Array(a) : i === void 0 ? f = new Uint8Array(a, n) : f = new Uint8Array(a, n, i), Object.setPrototypeOf(f, c.prototype), f;
|
|
225
225
|
}
|
|
226
226
|
function K(a) {
|
|
227
|
-
if (
|
|
227
|
+
if (c.isBuffer(a)) {
|
|
228
228
|
const n = I(a.length) | 0, i = l(n);
|
|
229
229
|
return i.length === 0 || a.copy(i, 0, 0, n), i;
|
|
230
230
|
}
|
|
@@ -239,25 +239,25 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
239
239
|
return a | 0;
|
|
240
240
|
}
|
|
241
241
|
function _(a) {
|
|
242
|
-
return +a != a && (a = 0),
|
|
242
|
+
return +a != a && (a = 0), c.alloc(+a);
|
|
243
243
|
}
|
|
244
|
-
|
|
245
|
-
return n != null && n._isBuffer === !0 && n !==
|
|
246
|
-
},
|
|
247
|
-
if (ge(n, Uint8Array) && (n =
|
|
244
|
+
c.isBuffer = function(n) {
|
|
245
|
+
return n != null && n._isBuffer === !0 && n !== c.prototype;
|
|
246
|
+
}, c.compare = function(n, i) {
|
|
247
|
+
if (ge(n, Uint8Array) && (n = c.from(n, n.offset, n.byteLength)), ge(i, Uint8Array) && (i = c.from(i, i.offset, i.byteLength)), !c.isBuffer(n) || !c.isBuffer(i))
|
|
248
248
|
throw new TypeError(
|
|
249
249
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
250
250
|
);
|
|
251
251
|
if (n === i)
|
|
252
252
|
return 0;
|
|
253
|
-
let
|
|
254
|
-
for (let y = 0,
|
|
253
|
+
let f = n.length, h = i.length;
|
|
254
|
+
for (let y = 0, w = Math.min(f, h); y < w; ++y)
|
|
255
255
|
if (n[y] !== i[y]) {
|
|
256
|
-
|
|
256
|
+
f = n[y], h = i[y];
|
|
257
257
|
break;
|
|
258
258
|
}
|
|
259
|
-
return
|
|
260
|
-
},
|
|
259
|
+
return f < h ? -1 : h < f ? 1 : 0;
|
|
260
|
+
}, c.isEncoding = function(n) {
|
|
261
261
|
switch (String(n).toLowerCase()) {
|
|
262
262
|
case "hex":
|
|
263
263
|
case "utf8":
|
|
@@ -274,35 +274,35 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
274
274
|
default:
|
|
275
275
|
return !1;
|
|
276
276
|
}
|
|
277
|
-
},
|
|
277
|
+
}, c.concat = function(n, i) {
|
|
278
278
|
if (!Array.isArray(n))
|
|
279
279
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
280
280
|
if (n.length === 0)
|
|
281
|
-
return
|
|
282
|
-
let
|
|
281
|
+
return c.alloc(0);
|
|
282
|
+
let f;
|
|
283
283
|
if (i === void 0)
|
|
284
|
-
for (i = 0,
|
|
285
|
-
i += n[
|
|
286
|
-
const h =
|
|
284
|
+
for (i = 0, f = 0; f < n.length; ++f)
|
|
285
|
+
i += n[f].length;
|
|
286
|
+
const h = c.allocUnsafe(i);
|
|
287
287
|
let y = 0;
|
|
288
|
-
for (
|
|
289
|
-
let
|
|
290
|
-
if (ge(
|
|
291
|
-
y +
|
|
288
|
+
for (f = 0; f < n.length; ++f) {
|
|
289
|
+
let w = n[f];
|
|
290
|
+
if (ge(w, Uint8Array))
|
|
291
|
+
y + w.length > h.length ? (c.isBuffer(w) || (w = c.from(w)), w.copy(h, y)) : Uint8Array.prototype.set.call(
|
|
292
292
|
h,
|
|
293
|
-
|
|
293
|
+
w,
|
|
294
294
|
y
|
|
295
295
|
);
|
|
296
|
-
else if (
|
|
297
|
-
|
|
296
|
+
else if (c.isBuffer(w))
|
|
297
|
+
w.copy(h, y);
|
|
298
298
|
else
|
|
299
299
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
300
|
-
y +=
|
|
300
|
+
y += w.length;
|
|
301
301
|
}
|
|
302
302
|
return h;
|
|
303
303
|
};
|
|
304
304
|
function D(a, n) {
|
|
305
|
-
if (
|
|
305
|
+
if (c.isBuffer(a))
|
|
306
306
|
return a.length;
|
|
307
307
|
if (ArrayBuffer.isView(a) || ge(a, ArrayBuffer))
|
|
308
308
|
return a.byteLength;
|
|
@@ -310,8 +310,8 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
310
310
|
throw new TypeError(
|
|
311
311
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof a
|
|
312
312
|
);
|
|
313
|
-
const i = a.length,
|
|
314
|
-
if (!
|
|
313
|
+
const i = a.length, f = arguments.length > 2 && arguments[2] === !0;
|
|
314
|
+
if (!f && i === 0)
|
|
315
315
|
return 0;
|
|
316
316
|
let h = !1;
|
|
317
317
|
for (; ; )
|
|
@@ -322,7 +322,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
322
322
|
return i;
|
|
323
323
|
case "utf8":
|
|
324
324
|
case "utf-8":
|
|
325
|
-
return
|
|
325
|
+
return ot(a).length;
|
|
326
326
|
case "ucs2":
|
|
327
327
|
case "ucs-2":
|
|
328
328
|
case "utf16le":
|
|
@@ -331,16 +331,16 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
331
331
|
case "hex":
|
|
332
332
|
return i >>> 1;
|
|
333
333
|
case "base64":
|
|
334
|
-
return
|
|
334
|
+
return dt(a).length;
|
|
335
335
|
default:
|
|
336
336
|
if (h)
|
|
337
|
-
return
|
|
337
|
+
return f ? -1 : ot(a).length;
|
|
338
338
|
n = ("" + n).toLowerCase(), h = !0;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
c.byteLength = D;
|
|
342
342
|
function U(a, n, i) {
|
|
343
|
-
let
|
|
343
|
+
let f = !1;
|
|
344
344
|
if ((n === void 0 || n < 0) && (n = 0), n > this.length || ((i === void 0 || i > this.length) && (i = this.length), i <= 0) || (i >>>= 0, n >>>= 0, i <= n))
|
|
345
345
|
return "";
|
|
346
346
|
for (a || (a = "utf8"); ; )
|
|
@@ -351,88 +351,88 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
351
351
|
case "utf-8":
|
|
352
352
|
return fe(this, n, i);
|
|
353
353
|
case "ascii":
|
|
354
|
-
return
|
|
354
|
+
return it(this, n, i);
|
|
355
355
|
case "latin1":
|
|
356
356
|
case "binary":
|
|
357
357
|
return ke(this, n, i);
|
|
358
358
|
case "base64":
|
|
359
|
-
return
|
|
359
|
+
return nt(this, n, i);
|
|
360
360
|
case "ucs2":
|
|
361
361
|
case "ucs-2":
|
|
362
362
|
case "utf16le":
|
|
363
363
|
case "utf-16le":
|
|
364
364
|
return Pe(this, n, i);
|
|
365
365
|
default:
|
|
366
|
-
if (
|
|
366
|
+
if (f)
|
|
367
367
|
throw new TypeError("Unknown encoding: " + a);
|
|
368
|
-
a = (a + "").toLowerCase(),
|
|
368
|
+
a = (a + "").toLowerCase(), f = !0;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
|
|
371
|
+
c.prototype._isBuffer = !0;
|
|
372
372
|
function T(a, n, i) {
|
|
373
|
-
const
|
|
374
|
-
a[n] = a[i], a[i] =
|
|
373
|
+
const f = a[n];
|
|
374
|
+
a[n] = a[i], a[i] = f;
|
|
375
375
|
}
|
|
376
|
-
|
|
376
|
+
c.prototype.swap16 = function() {
|
|
377
377
|
const n = this.length;
|
|
378
378
|
if (n % 2 !== 0)
|
|
379
379
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
380
380
|
for (let i = 0; i < n; i += 2)
|
|
381
381
|
T(this, i, i + 1);
|
|
382
382
|
return this;
|
|
383
|
-
},
|
|
383
|
+
}, c.prototype.swap32 = function() {
|
|
384
384
|
const n = this.length;
|
|
385
385
|
if (n % 4 !== 0)
|
|
386
386
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
387
387
|
for (let i = 0; i < n; i += 4)
|
|
388
388
|
T(this, i, i + 3), T(this, i + 1, i + 2);
|
|
389
389
|
return this;
|
|
390
|
-
},
|
|
390
|
+
}, c.prototype.swap64 = function() {
|
|
391
391
|
const n = this.length;
|
|
392
392
|
if (n % 8 !== 0)
|
|
393
393
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
394
394
|
for (let i = 0; i < n; i += 8)
|
|
395
395
|
T(this, i, i + 7), T(this, i + 1, i + 6), T(this, i + 2, i + 5), T(this, i + 3, i + 4);
|
|
396
396
|
return this;
|
|
397
|
-
},
|
|
397
|
+
}, c.prototype.toString = function() {
|
|
398
398
|
const n = this.length;
|
|
399
399
|
return n === 0 ? "" : arguments.length === 0 ? fe(this, 0, n) : U.apply(this, arguments);
|
|
400
|
-
},
|
|
401
|
-
if (!
|
|
400
|
+
}, c.prototype.toLocaleString = c.prototype.toString, c.prototype.equals = function(n) {
|
|
401
|
+
if (!c.isBuffer(n))
|
|
402
402
|
throw new TypeError("Argument must be a Buffer");
|
|
403
|
-
return this === n ? !0 :
|
|
404
|
-
},
|
|
403
|
+
return this === n ? !0 : c.compare(this, n) === 0;
|
|
404
|
+
}, c.prototype.inspect = function() {
|
|
405
405
|
let n = "";
|
|
406
406
|
const i = t.INSPECT_MAX_BYTES;
|
|
407
407
|
return n = this.toString("hex", 0, i).replace(/(.{2})/g, "$1 ").trim(), this.length > i && (n += " ... "), "<Buffer " + n + ">";
|
|
408
|
-
}, o && (
|
|
409
|
-
if (ge(n, Uint8Array) && (n =
|
|
408
|
+
}, o && (c.prototype[o] = c.prototype.inspect), c.prototype.compare = function(n, i, f, h, y) {
|
|
409
|
+
if (ge(n, Uint8Array) && (n = c.from(n, n.offset, n.byteLength)), !c.isBuffer(n))
|
|
410
410
|
throw new TypeError(
|
|
411
411
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof n
|
|
412
412
|
);
|
|
413
|
-
if (i === void 0 && (i = 0),
|
|
413
|
+
if (i === void 0 && (i = 0), f === void 0 && (f = n ? n.length : 0), h === void 0 && (h = 0), y === void 0 && (y = this.length), i < 0 || f > n.length || h < 0 || y > this.length)
|
|
414
414
|
throw new RangeError("out of range index");
|
|
415
|
-
if (h >= y && i >=
|
|
415
|
+
if (h >= y && i >= f)
|
|
416
416
|
return 0;
|
|
417
417
|
if (h >= y)
|
|
418
418
|
return -1;
|
|
419
|
-
if (i >=
|
|
419
|
+
if (i >= f)
|
|
420
420
|
return 1;
|
|
421
|
-
if (i >>>= 0,
|
|
421
|
+
if (i >>>= 0, f >>>= 0, h >>>= 0, y >>>= 0, this === n)
|
|
422
422
|
return 0;
|
|
423
|
-
let
|
|
424
|
-
const W = Math.min(
|
|
423
|
+
let w = y - h, R = f - i;
|
|
424
|
+
const W = Math.min(w, R), z = this.slice(h, y), J = n.slice(i, f);
|
|
425
425
|
for (let Q = 0; Q < W; ++Q)
|
|
426
426
|
if (z[Q] !== J[Q]) {
|
|
427
|
-
|
|
427
|
+
w = z[Q], R = J[Q];
|
|
428
428
|
break;
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return w < R ? -1 : R < w ? 1 : 0;
|
|
431
431
|
};
|
|
432
|
-
function x(a, n, i,
|
|
432
|
+
function x(a, n, i, f, h) {
|
|
433
433
|
if (a.length === 0)
|
|
434
434
|
return -1;
|
|
435
|
-
if (typeof i == "string" ? (
|
|
435
|
+
if (typeof i == "string" ? (f = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Lt(i) && (i = h ? 0 : a.length - 1), i < 0 && (i = a.length + i), i >= a.length) {
|
|
436
436
|
if (h)
|
|
437
437
|
return -1;
|
|
438
438
|
i = a.length - 1;
|
|
@@ -441,18 +441,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
441
441
|
i = 0;
|
|
442
442
|
else
|
|
443
443
|
return -1;
|
|
444
|
-
if (typeof n == "string" && (n =
|
|
445
|
-
return n.length === 0 ? -1 : k(a, n, i,
|
|
444
|
+
if (typeof n == "string" && (n = c.from(n, f)), c.isBuffer(n))
|
|
445
|
+
return n.length === 0 ? -1 : k(a, n, i, f, h);
|
|
446
446
|
if (typeof n == "number")
|
|
447
|
-
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? h ? Uint8Array.prototype.indexOf.call(a, n, i) : Uint8Array.prototype.lastIndexOf.call(a, n, i) : k(a, [n], i,
|
|
447
|
+
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? h ? Uint8Array.prototype.indexOf.call(a, n, i) : Uint8Array.prototype.lastIndexOf.call(a, n, i) : k(a, [n], i, f, h);
|
|
448
448
|
throw new TypeError("val must be string, number or Buffer");
|
|
449
449
|
}
|
|
450
|
-
function k(a, n, i,
|
|
451
|
-
let y = 1,
|
|
452
|
-
if (
|
|
450
|
+
function k(a, n, i, f, h) {
|
|
451
|
+
let y = 1, w = a.length, R = n.length;
|
|
452
|
+
if (f !== void 0 && (f = String(f).toLowerCase(), f === "ucs2" || f === "ucs-2" || f === "utf16le" || f === "utf-16le")) {
|
|
453
453
|
if (a.length < 2 || n.length < 2)
|
|
454
454
|
return -1;
|
|
455
|
-
y = 2,
|
|
455
|
+
y = 2, w /= 2, R /= 2, i /= 2;
|
|
456
456
|
}
|
|
457
457
|
function W(J, Q) {
|
|
458
458
|
return y === 1 ? J[Q] : J.readUInt16BE(Q * y);
|
|
@@ -460,14 +460,14 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
460
460
|
let z;
|
|
461
461
|
if (h) {
|
|
462
462
|
let J = -1;
|
|
463
|
-
for (z = i; z <
|
|
463
|
+
for (z = i; z < w; z++)
|
|
464
464
|
if (W(a, z) === W(n, J === -1 ? 0 : z - J)) {
|
|
465
465
|
if (J === -1 && (J = z), z - J + 1 === R)
|
|
466
466
|
return J * y;
|
|
467
467
|
} else
|
|
468
468
|
J !== -1 && (z -= z - J), J = -1;
|
|
469
469
|
} else
|
|
470
|
-
for (i + R >
|
|
470
|
+
for (i + R > w && (i = w - R), z = i; z >= 0; z--) {
|
|
471
471
|
let J = !0;
|
|
472
472
|
for (let Q = 0; Q < R; Q++)
|
|
473
473
|
if (W(a, z + Q) !== W(n, Q)) {
|
|
@@ -479,162 +479,162 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
479
479
|
}
|
|
480
480
|
return -1;
|
|
481
481
|
}
|
|
482
|
-
|
|
483
|
-
return this.indexOf(n, i,
|
|
484
|
-
},
|
|
485
|
-
return x(this, n, i,
|
|
486
|
-
},
|
|
487
|
-
return x(this, n, i,
|
|
482
|
+
c.prototype.includes = function(n, i, f) {
|
|
483
|
+
return this.indexOf(n, i, f) !== -1;
|
|
484
|
+
}, c.prototype.indexOf = function(n, i, f) {
|
|
485
|
+
return x(this, n, i, f, !0);
|
|
486
|
+
}, c.prototype.lastIndexOf = function(n, i, f) {
|
|
487
|
+
return x(this, n, i, f, !1);
|
|
488
488
|
};
|
|
489
|
-
function G(a, n, i,
|
|
489
|
+
function G(a, n, i, f) {
|
|
490
490
|
i = Number(i) || 0;
|
|
491
491
|
const h = a.length - i;
|
|
492
|
-
|
|
492
|
+
f ? (f = Number(f), f > h && (f = h)) : f = h;
|
|
493
493
|
const y = n.length;
|
|
494
|
-
|
|
495
|
-
let
|
|
496
|
-
for (
|
|
497
|
-
const R = parseInt(n.substr(
|
|
494
|
+
f > y / 2 && (f = y / 2);
|
|
495
|
+
let w;
|
|
496
|
+
for (w = 0; w < f; ++w) {
|
|
497
|
+
const R = parseInt(n.substr(w * 2, 2), 16);
|
|
498
498
|
if (Lt(R))
|
|
499
|
-
return
|
|
500
|
-
a[i +
|
|
499
|
+
return w;
|
|
500
|
+
a[i + w] = R;
|
|
501
501
|
}
|
|
502
|
-
return
|
|
502
|
+
return w;
|
|
503
503
|
}
|
|
504
|
-
function ie(a, n, i,
|
|
505
|
-
return ot(
|
|
504
|
+
function ie(a, n, i, f) {
|
|
505
|
+
return st(ot(n, a.length - i), a, i, f);
|
|
506
506
|
}
|
|
507
|
-
function Oe(a, n, i,
|
|
508
|
-
return
|
|
507
|
+
function Oe(a, n, i, f) {
|
|
508
|
+
return st(Rt(n), a, i, f);
|
|
509
509
|
}
|
|
510
|
-
function Se(a, n, i,
|
|
511
|
-
return
|
|
510
|
+
function Se(a, n, i, f) {
|
|
511
|
+
return st(dt(n), a, i, f);
|
|
512
512
|
}
|
|
513
|
-
function ce(a, n, i,
|
|
514
|
-
return
|
|
513
|
+
function ce(a, n, i, f) {
|
|
514
|
+
return st(S(n, a.length - i), a, i, f);
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
c.prototype.write = function(n, i, f, h) {
|
|
517
517
|
if (i === void 0)
|
|
518
|
-
h = "utf8",
|
|
519
|
-
else if (
|
|
520
|
-
h = i,
|
|
518
|
+
h = "utf8", f = this.length, i = 0;
|
|
519
|
+
else if (f === void 0 && typeof i == "string")
|
|
520
|
+
h = i, f = this.length, i = 0;
|
|
521
521
|
else if (isFinite(i))
|
|
522
|
-
i = i >>> 0, isFinite(
|
|
522
|
+
i = i >>> 0, isFinite(f) ? (f = f >>> 0, h === void 0 && (h = "utf8")) : (h = f, f = void 0);
|
|
523
523
|
else
|
|
524
524
|
throw new Error(
|
|
525
525
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
526
526
|
);
|
|
527
527
|
const y = this.length - i;
|
|
528
|
-
if ((
|
|
528
|
+
if ((f === void 0 || f > y) && (f = y), n.length > 0 && (f < 0 || i < 0) || i > this.length)
|
|
529
529
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
530
530
|
h || (h = "utf8");
|
|
531
|
-
let
|
|
531
|
+
let w = !1;
|
|
532
532
|
for (; ; )
|
|
533
533
|
switch (h) {
|
|
534
534
|
case "hex":
|
|
535
|
-
return G(this, n, i,
|
|
535
|
+
return G(this, n, i, f);
|
|
536
536
|
case "utf8":
|
|
537
537
|
case "utf-8":
|
|
538
|
-
return ie(this, n, i,
|
|
538
|
+
return ie(this, n, i, f);
|
|
539
539
|
case "ascii":
|
|
540
540
|
case "latin1":
|
|
541
541
|
case "binary":
|
|
542
|
-
return Oe(this, n, i,
|
|
542
|
+
return Oe(this, n, i, f);
|
|
543
543
|
case "base64":
|
|
544
|
-
return Se(this, n, i,
|
|
544
|
+
return Se(this, n, i, f);
|
|
545
545
|
case "ucs2":
|
|
546
546
|
case "ucs-2":
|
|
547
547
|
case "utf16le":
|
|
548
548
|
case "utf-16le":
|
|
549
|
-
return ce(this, n, i,
|
|
549
|
+
return ce(this, n, i, f);
|
|
550
550
|
default:
|
|
551
|
-
if (
|
|
551
|
+
if (w)
|
|
552
552
|
throw new TypeError("Unknown encoding: " + h);
|
|
553
|
-
h = ("" + h).toLowerCase(),
|
|
553
|
+
h = ("" + h).toLowerCase(), w = !0;
|
|
554
554
|
}
|
|
555
|
-
},
|
|
555
|
+
}, c.prototype.toJSON = function() {
|
|
556
556
|
return {
|
|
557
557
|
type: "Buffer",
|
|
558
558
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
559
559
|
};
|
|
560
560
|
};
|
|
561
|
-
function
|
|
561
|
+
function nt(a, n, i) {
|
|
562
562
|
return n === 0 && i === a.length ? e.fromByteArray(a) : e.fromByteArray(a.slice(n, i));
|
|
563
563
|
}
|
|
564
564
|
function fe(a, n, i) {
|
|
565
565
|
i = Math.min(a.length, i);
|
|
566
|
-
const
|
|
566
|
+
const f = [];
|
|
567
567
|
let h = n;
|
|
568
568
|
for (; h < i; ) {
|
|
569
569
|
const y = a[h];
|
|
570
|
-
let
|
|
570
|
+
let w = null, R = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
|
|
571
571
|
if (h + R <= i) {
|
|
572
572
|
let W, z, J, Q;
|
|
573
573
|
switch (R) {
|
|
574
574
|
case 1:
|
|
575
|
-
y < 128 && (
|
|
575
|
+
y < 128 && (w = y);
|
|
576
576
|
break;
|
|
577
577
|
case 2:
|
|
578
|
-
W = a[h + 1], (W & 192) === 128 && (Q = (y & 31) << 6 | W & 63, Q > 127 && (
|
|
578
|
+
W = a[h + 1], (W & 192) === 128 && (Q = (y & 31) << 6 | W & 63, Q > 127 && (w = Q));
|
|
579
579
|
break;
|
|
580
580
|
case 3:
|
|
581
|
-
W = a[h + 1], z = a[h + 2], (W & 192) === 128 && (z & 192) === 128 && (Q = (y & 15) << 12 | (W & 63) << 6 | z & 63, Q > 2047 && (Q < 55296 || Q > 57343) && (
|
|
581
|
+
W = a[h + 1], z = a[h + 2], (W & 192) === 128 && (z & 192) === 128 && (Q = (y & 15) << 12 | (W & 63) << 6 | z & 63, Q > 2047 && (Q < 55296 || Q > 57343) && (w = Q));
|
|
582
582
|
break;
|
|
583
583
|
case 4:
|
|
584
|
-
W = a[h + 1], z = a[h + 2], J = a[h + 3], (W & 192) === 128 && (z & 192) === 128 && (J & 192) === 128 && (Q = (y & 15) << 18 | (W & 63) << 12 | (z & 63) << 6 | J & 63, Q > 65535 && Q < 1114112 && (
|
|
584
|
+
W = a[h + 1], z = a[h + 2], J = a[h + 3], (W & 192) === 128 && (z & 192) === 128 && (J & 192) === 128 && (Q = (y & 15) << 18 | (W & 63) << 12 | (z & 63) << 6 | J & 63, Q > 65535 && Q < 1114112 && (w = Q));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
|
|
587
|
+
w === null ? (w = 65533, R = 1) : w > 65535 && (w -= 65536, f.push(w >>> 10 & 1023 | 55296), w = 56320 | w & 1023), f.push(w), h += R;
|
|
588
588
|
}
|
|
589
|
-
return Be(
|
|
589
|
+
return Be(f);
|
|
590
590
|
}
|
|
591
591
|
const xe = 4096;
|
|
592
592
|
function Be(a) {
|
|
593
593
|
const n = a.length;
|
|
594
594
|
if (n <= xe)
|
|
595
595
|
return String.fromCharCode.apply(String, a);
|
|
596
|
-
let i = "",
|
|
597
|
-
for (;
|
|
596
|
+
let i = "", f = 0;
|
|
597
|
+
for (; f < n; )
|
|
598
598
|
i += String.fromCharCode.apply(
|
|
599
599
|
String,
|
|
600
|
-
a.slice(
|
|
600
|
+
a.slice(f, f += xe)
|
|
601
601
|
);
|
|
602
602
|
return i;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
let
|
|
604
|
+
function it(a, n, i) {
|
|
605
|
+
let f = "";
|
|
606
606
|
i = Math.min(a.length, i);
|
|
607
607
|
for (let h = n; h < i; ++h)
|
|
608
|
-
|
|
609
|
-
return
|
|
608
|
+
f += String.fromCharCode(a[h] & 127);
|
|
609
|
+
return f;
|
|
610
610
|
}
|
|
611
611
|
function ke(a, n, i) {
|
|
612
|
-
let
|
|
612
|
+
let f = "";
|
|
613
613
|
i = Math.min(a.length, i);
|
|
614
614
|
for (let h = n; h < i; ++h)
|
|
615
|
-
|
|
616
|
-
return
|
|
615
|
+
f += String.fromCharCode(a[h]);
|
|
616
|
+
return f;
|
|
617
617
|
}
|
|
618
618
|
function le(a, n, i) {
|
|
619
|
-
const
|
|
620
|
-
(!n || n < 0) && (n = 0), (!i || i < 0 || i >
|
|
619
|
+
const f = a.length;
|
|
620
|
+
(!n || n < 0) && (n = 0), (!i || i < 0 || i > f) && (i = f);
|
|
621
621
|
let h = "";
|
|
622
622
|
for (let y = n; y < i; ++y)
|
|
623
623
|
h += Vn[a[y]];
|
|
624
624
|
return h;
|
|
625
625
|
}
|
|
626
626
|
function Pe(a, n, i) {
|
|
627
|
-
const
|
|
627
|
+
const f = a.slice(n, i);
|
|
628
628
|
let h = "";
|
|
629
|
-
for (let y = 0; y <
|
|
630
|
-
h += String.fromCharCode(
|
|
629
|
+
for (let y = 0; y < f.length - 1; y += 2)
|
|
630
|
+
h += String.fromCharCode(f[y] + f[y + 1] * 256);
|
|
631
631
|
return h;
|
|
632
632
|
}
|
|
633
|
-
|
|
634
|
-
const
|
|
635
|
-
n = ~~n, i = i === void 0 ?
|
|
633
|
+
c.prototype.slice = function(n, i) {
|
|
634
|
+
const f = this.length;
|
|
635
|
+
n = ~~n, i = i === void 0 ? f : ~~i, n < 0 ? (n += f, n < 0 && (n = 0)) : n > f && (n = f), i < 0 ? (i += f, i < 0 && (i = 0)) : i > f && (i = f), i < n && (i = n);
|
|
636
636
|
const h = this.subarray(n, i);
|
|
637
|
-
return Object.setPrototypeOf(h,
|
|
637
|
+
return Object.setPrototypeOf(h, c.prototype), h;
|
|
638
638
|
};
|
|
639
639
|
function H(a, n, i) {
|
|
640
640
|
if (a % 1 !== 0 || a < 0)
|
|
@@ -642,242 +642,242 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
642
642
|
if (a + n > i)
|
|
643
643
|
throw new RangeError("Trying to access beyond buffer length");
|
|
644
644
|
}
|
|
645
|
-
|
|
646
|
-
n = n >>> 0, i = i >>> 0,
|
|
647
|
-
let h = this[n], y = 1,
|
|
648
|
-
for (; ++
|
|
649
|
-
h += this[n +
|
|
645
|
+
c.prototype.readUintLE = c.prototype.readUIntLE = function(n, i, f) {
|
|
646
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
647
|
+
let h = this[n], y = 1, w = 0;
|
|
648
|
+
for (; ++w < i && (y *= 256); )
|
|
649
|
+
h += this[n + w] * y;
|
|
650
650
|
return h;
|
|
651
|
-
},
|
|
652
|
-
n = n >>> 0, i = i >>> 0,
|
|
651
|
+
}, c.prototype.readUintBE = c.prototype.readUIntBE = function(n, i, f) {
|
|
652
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
653
653
|
let h = this[n + --i], y = 1;
|
|
654
654
|
for (; i > 0 && (y *= 256); )
|
|
655
655
|
h += this[n + --i] * y;
|
|
656
656
|
return h;
|
|
657
|
-
},
|
|
657
|
+
}, c.prototype.readUint8 = c.prototype.readUInt8 = function(n, i) {
|
|
658
658
|
return n = n >>> 0, i || H(n, 1, this.length), this[n];
|
|
659
|
-
},
|
|
659
|
+
}, c.prototype.readUint16LE = c.prototype.readUInt16LE = function(n, i) {
|
|
660
660
|
return n = n >>> 0, i || H(n, 2, this.length), this[n] | this[n + 1] << 8;
|
|
661
|
-
},
|
|
661
|
+
}, c.prototype.readUint16BE = c.prototype.readUInt16BE = function(n, i) {
|
|
662
662
|
return n = n >>> 0, i || H(n, 2, this.length), this[n] << 8 | this[n + 1];
|
|
663
|
-
},
|
|
663
|
+
}, c.prototype.readUint32LE = c.prototype.readUInt32LE = function(n, i) {
|
|
664
664
|
return n = n >>> 0, i || H(n, 4, this.length), (this[n] | this[n + 1] << 8 | this[n + 2] << 16) + this[n + 3] * 16777216;
|
|
665
|
-
},
|
|
665
|
+
}, c.prototype.readUint32BE = c.prototype.readUInt32BE = function(n, i) {
|
|
666
666
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] * 16777216 + (this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3]);
|
|
667
|
-
},
|
|
667
|
+
}, c.prototype.readBigUInt64LE = Re(function(n) {
|
|
668
668
|
n = n >>> 0, he(n, "offset");
|
|
669
|
-
const i = this[n],
|
|
670
|
-
(i === void 0 ||
|
|
671
|
-
const h = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, y = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 +
|
|
669
|
+
const i = this[n], f = this[n + 7];
|
|
670
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
671
|
+
const h = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, y = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + f * 2 ** 24;
|
|
672
672
|
return BigInt(h) + (BigInt(y) << BigInt(32));
|
|
673
|
-
}),
|
|
673
|
+
}), c.prototype.readBigUInt64BE = Re(function(n) {
|
|
674
674
|
n = n >>> 0, he(n, "offset");
|
|
675
|
-
const i = this[n],
|
|
676
|
-
(i === void 0 ||
|
|
677
|
-
const h = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], y = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 +
|
|
675
|
+
const i = this[n], f = this[n + 7];
|
|
676
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
677
|
+
const h = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], y = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f;
|
|
678
678
|
return (BigInt(h) << BigInt(32)) + BigInt(y);
|
|
679
|
-
}),
|
|
680
|
-
n = n >>> 0, i = i >>> 0,
|
|
681
|
-
let h = this[n], y = 1,
|
|
682
|
-
for (; ++
|
|
683
|
-
h += this[n +
|
|
679
|
+
}), c.prototype.readIntLE = function(n, i, f) {
|
|
680
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
681
|
+
let h = this[n], y = 1, w = 0;
|
|
682
|
+
for (; ++w < i && (y *= 256); )
|
|
683
|
+
h += this[n + w] * y;
|
|
684
684
|
return y *= 128, h >= y && (h -= Math.pow(2, 8 * i)), h;
|
|
685
|
-
},
|
|
686
|
-
n = n >>> 0, i = i >>> 0,
|
|
687
|
-
let h = i, y = 1,
|
|
685
|
+
}, c.prototype.readIntBE = function(n, i, f) {
|
|
686
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
687
|
+
let h = i, y = 1, w = this[n + --h];
|
|
688
688
|
for (; h > 0 && (y *= 256); )
|
|
689
|
-
|
|
690
|
-
return y *= 128,
|
|
691
|
-
},
|
|
689
|
+
w += this[n + --h] * y;
|
|
690
|
+
return y *= 128, w >= y && (w -= Math.pow(2, 8 * i)), w;
|
|
691
|
+
}, c.prototype.readInt8 = function(n, i) {
|
|
692
692
|
return n = n >>> 0, i || H(n, 1, this.length), this[n] & 128 ? (255 - this[n] + 1) * -1 : this[n];
|
|
693
|
-
},
|
|
693
|
+
}, c.prototype.readInt16LE = function(n, i) {
|
|
694
694
|
n = n >>> 0, i || H(n, 2, this.length);
|
|
695
|
-
const
|
|
696
|
-
return
|
|
697
|
-
},
|
|
695
|
+
const f = this[n] | this[n + 1] << 8;
|
|
696
|
+
return f & 32768 ? f | 4294901760 : f;
|
|
697
|
+
}, c.prototype.readInt16BE = function(n, i) {
|
|
698
698
|
n = n >>> 0, i || H(n, 2, this.length);
|
|
699
|
-
const
|
|
700
|
-
return
|
|
701
|
-
},
|
|
699
|
+
const f = this[n + 1] | this[n] << 8;
|
|
700
|
+
return f & 32768 ? f | 4294901760 : f;
|
|
701
|
+
}, c.prototype.readInt32LE = function(n, i) {
|
|
702
702
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] | this[n + 1] << 8 | this[n + 2] << 16 | this[n + 3] << 24;
|
|
703
|
-
},
|
|
703
|
+
}, c.prototype.readInt32BE = function(n, i) {
|
|
704
704
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] << 24 | this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3];
|
|
705
|
-
},
|
|
705
|
+
}, c.prototype.readBigInt64LE = Re(function(n) {
|
|
706
706
|
n = n >>> 0, he(n, "offset");
|
|
707
|
-
const i = this[n],
|
|
708
|
-
(i === void 0 ||
|
|
709
|
-
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (
|
|
707
|
+
const i = this[n], f = this[n + 7];
|
|
708
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
709
|
+
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (f << 24);
|
|
710
710
|
return (BigInt(h) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
711
|
-
}),
|
|
711
|
+
}), c.prototype.readBigInt64BE = Re(function(n) {
|
|
712
712
|
n = n >>> 0, he(n, "offset");
|
|
713
|
-
const i = this[n],
|
|
714
|
-
(i === void 0 ||
|
|
713
|
+
const i = this[n], f = this[n + 7];
|
|
714
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
715
715
|
const h = (i << 24) + // Overflow
|
|
716
716
|
this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n];
|
|
717
|
-
return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 +
|
|
718
|
-
}),
|
|
717
|
+
return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f);
|
|
718
|
+
}), c.prototype.readFloatLE = function(n, i) {
|
|
719
719
|
return n = n >>> 0, i || H(n, 4, this.length), r.read(this, n, !0, 23, 4);
|
|
720
|
-
},
|
|
720
|
+
}, c.prototype.readFloatBE = function(n, i) {
|
|
721
721
|
return n = n >>> 0, i || H(n, 4, this.length), r.read(this, n, !1, 23, 4);
|
|
722
|
-
},
|
|
722
|
+
}, c.prototype.readDoubleLE = function(n, i) {
|
|
723
723
|
return n = n >>> 0, i || H(n, 8, this.length), r.read(this, n, !0, 52, 8);
|
|
724
|
-
},
|
|
724
|
+
}, c.prototype.readDoubleBE = function(n, i) {
|
|
725
725
|
return n = n >>> 0, i || H(n, 8, this.length), r.read(this, n, !1, 52, 8);
|
|
726
726
|
};
|
|
727
|
-
function d(a, n, i,
|
|
728
|
-
if (!
|
|
727
|
+
function d(a, n, i, f, h, y) {
|
|
728
|
+
if (!c.isBuffer(a))
|
|
729
729
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
730
730
|
if (n > h || n < y)
|
|
731
731
|
throw new RangeError('"value" argument is out of bounds');
|
|
732
|
-
if (i +
|
|
732
|
+
if (i + f > a.length)
|
|
733
733
|
throw new RangeError("Index out of range");
|
|
734
734
|
}
|
|
735
|
-
|
|
736
|
-
if (n = +n, i = i >>> 0,
|
|
737
|
-
const R = Math.pow(2, 8 *
|
|
738
|
-
d(this, n, i,
|
|
735
|
+
c.prototype.writeUintLE = c.prototype.writeUIntLE = function(n, i, f, h) {
|
|
736
|
+
if (n = +n, i = i >>> 0, f = f >>> 0, !h) {
|
|
737
|
+
const R = Math.pow(2, 8 * f) - 1;
|
|
738
|
+
d(this, n, i, f, R, 0);
|
|
739
739
|
}
|
|
740
|
-
let y = 1,
|
|
741
|
-
for (this[i] = n & 255; ++
|
|
742
|
-
this[i +
|
|
743
|
-
return i +
|
|
744
|
-
},
|
|
745
|
-
if (n = +n, i = i >>> 0,
|
|
746
|
-
const R = Math.pow(2, 8 *
|
|
747
|
-
d(this, n, i,
|
|
740
|
+
let y = 1, w = 0;
|
|
741
|
+
for (this[i] = n & 255; ++w < f && (y *= 256); )
|
|
742
|
+
this[i + w] = n / y & 255;
|
|
743
|
+
return i + f;
|
|
744
|
+
}, c.prototype.writeUintBE = c.prototype.writeUIntBE = function(n, i, f, h) {
|
|
745
|
+
if (n = +n, i = i >>> 0, f = f >>> 0, !h) {
|
|
746
|
+
const R = Math.pow(2, 8 * f) - 1;
|
|
747
|
+
d(this, n, i, f, R, 0);
|
|
748
748
|
}
|
|
749
|
-
let y =
|
|
750
|
-
for (this[i + y] = n & 255; --y >= 0 && (
|
|
751
|
-
this[i + y] = n /
|
|
752
|
-
return i +
|
|
753
|
-
},
|
|
754
|
-
return n = +n, i = i >>> 0,
|
|
755
|
-
},
|
|
756
|
-
return n = +n, i = i >>> 0,
|
|
757
|
-
},
|
|
758
|
-
return n = +n, i = i >>> 0,
|
|
759
|
-
},
|
|
760
|
-
return n = +n, i = i >>> 0,
|
|
761
|
-
},
|
|
762
|
-
return n = +n, i = i >>> 0,
|
|
749
|
+
let y = f - 1, w = 1;
|
|
750
|
+
for (this[i + y] = n & 255; --y >= 0 && (w *= 256); )
|
|
751
|
+
this[i + y] = n / w & 255;
|
|
752
|
+
return i + f;
|
|
753
|
+
}, c.prototype.writeUint8 = c.prototype.writeUInt8 = function(n, i, f) {
|
|
754
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
|
|
755
|
+
}, c.prototype.writeUint16LE = c.prototype.writeUInt16LE = function(n, i, f) {
|
|
756
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
757
|
+
}, c.prototype.writeUint16BE = c.prototype.writeUInt16BE = function(n, i, f) {
|
|
758
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
759
|
+
}, c.prototype.writeUint32LE = c.prototype.writeUInt32LE = function(n, i, f) {
|
|
760
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 4, 4294967295, 0), this[i + 3] = n >>> 24, this[i + 2] = n >>> 16, this[i + 1] = n >>> 8, this[i] = n & 255, i + 4;
|
|
761
|
+
}, c.prototype.writeUint32BE = c.prototype.writeUInt32BE = function(n, i, f) {
|
|
762
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 4, 4294967295, 0), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
|
|
763
763
|
};
|
|
764
|
-
function v(a, n, i,
|
|
765
|
-
ye(n,
|
|
764
|
+
function v(a, n, i, f, h) {
|
|
765
|
+
ye(n, f, h, a, i, 7);
|
|
766
766
|
let y = Number(n & BigInt(4294967295));
|
|
767
767
|
a[i++] = y, y = y >> 8, a[i++] = y, y = y >> 8, a[i++] = y, y = y >> 8, a[i++] = y;
|
|
768
|
-
let
|
|
769
|
-
return a[i++] =
|
|
768
|
+
let w = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
769
|
+
return a[i++] = w, w = w >> 8, a[i++] = w, w = w >> 8, a[i++] = w, w = w >> 8, a[i++] = w, i;
|
|
770
770
|
}
|
|
771
|
-
function A(a, n, i,
|
|
772
|
-
ye(n,
|
|
771
|
+
function A(a, n, i, f, h) {
|
|
772
|
+
ye(n, f, h, a, i, 7);
|
|
773
773
|
let y = Number(n & BigInt(4294967295));
|
|
774
774
|
a[i + 7] = y, y = y >> 8, a[i + 6] = y, y = y >> 8, a[i + 5] = y, y = y >> 8, a[i + 4] = y;
|
|
775
|
-
let
|
|
776
|
-
return a[i + 3] =
|
|
775
|
+
let w = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
776
|
+
return a[i + 3] = w, w = w >> 8, a[i + 2] = w, w = w >> 8, a[i + 1] = w, w = w >> 8, a[i] = w, i + 8;
|
|
777
777
|
}
|
|
778
|
-
|
|
778
|
+
c.prototype.writeBigUInt64LE = Re(function(n, i = 0) {
|
|
779
779
|
return v(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
780
|
-
}),
|
|
780
|
+
}), c.prototype.writeBigUInt64BE = Re(function(n, i = 0) {
|
|
781
781
|
return A(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
782
|
-
}),
|
|
782
|
+
}), c.prototype.writeIntLE = function(n, i, f, h) {
|
|
783
783
|
if (n = +n, i = i >>> 0, !h) {
|
|
784
|
-
const W = Math.pow(2, 8 *
|
|
785
|
-
d(this, n, i,
|
|
784
|
+
const W = Math.pow(2, 8 * f - 1);
|
|
785
|
+
d(this, n, i, f, W - 1, -W);
|
|
786
786
|
}
|
|
787
|
-
let y = 0,
|
|
788
|
-
for (this[i] = n & 255; ++y <
|
|
789
|
-
n < 0 && R === 0 && this[i + y - 1] !== 0 && (R = 1), this[i + y] = (n /
|
|
790
|
-
return i +
|
|
791
|
-
},
|
|
787
|
+
let y = 0, w = 1, R = 0;
|
|
788
|
+
for (this[i] = n & 255; ++y < f && (w *= 256); )
|
|
789
|
+
n < 0 && R === 0 && this[i + y - 1] !== 0 && (R = 1), this[i + y] = (n / w >> 0) - R & 255;
|
|
790
|
+
return i + f;
|
|
791
|
+
}, c.prototype.writeIntBE = function(n, i, f, h) {
|
|
792
792
|
if (n = +n, i = i >>> 0, !h) {
|
|
793
|
-
const W = Math.pow(2, 8 *
|
|
794
|
-
d(this, n, i,
|
|
793
|
+
const W = Math.pow(2, 8 * f - 1);
|
|
794
|
+
d(this, n, i, f, W - 1, -W);
|
|
795
795
|
}
|
|
796
|
-
let y =
|
|
797
|
-
for (this[i + y] = n & 255; --y >= 0 && (
|
|
798
|
-
n < 0 && R === 0 && this[i + y + 1] !== 0 && (R = 1), this[i + y] = (n /
|
|
799
|
-
return i +
|
|
800
|
-
},
|
|
801
|
-
return n = +n, i = i >>> 0,
|
|
802
|
-
},
|
|
803
|
-
return n = +n, i = i >>> 0,
|
|
804
|
-
},
|
|
805
|
-
return n = +n, i = i >>> 0,
|
|
806
|
-
},
|
|
807
|
-
return n = +n, i = i >>> 0,
|
|
808
|
-
},
|
|
809
|
-
return n = +n, i = i >>> 0,
|
|
810
|
-
},
|
|
796
|
+
let y = f - 1, w = 1, R = 0;
|
|
797
|
+
for (this[i + y] = n & 255; --y >= 0 && (w *= 256); )
|
|
798
|
+
n < 0 && R === 0 && this[i + y + 1] !== 0 && (R = 1), this[i + y] = (n / w >> 0) - R & 255;
|
|
799
|
+
return i + f;
|
|
800
|
+
}, c.prototype.writeInt8 = function(n, i, f) {
|
|
801
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
|
|
802
|
+
}, c.prototype.writeInt16LE = function(n, i, f) {
|
|
803
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
804
|
+
}, c.prototype.writeInt16BE = function(n, i, f) {
|
|
805
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
806
|
+
}, c.prototype.writeInt32LE = function(n, i, f) {
|
|
807
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 4, 2147483647, -2147483648), this[i] = n & 255, this[i + 1] = n >>> 8, this[i + 2] = n >>> 16, this[i + 3] = n >>> 24, i + 4;
|
|
808
|
+
}, c.prototype.writeInt32BE = function(n, i, f) {
|
|
809
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
|
|
810
|
+
}, c.prototype.writeBigInt64LE = Re(function(n, i = 0) {
|
|
811
811
|
return v(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
812
|
-
}),
|
|
812
|
+
}), c.prototype.writeBigInt64BE = Re(function(n, i = 0) {
|
|
813
813
|
return A(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
814
814
|
});
|
|
815
|
-
function
|
|
816
|
-
if (i +
|
|
815
|
+
function C(a, n, i, f, h, y) {
|
|
816
|
+
if (i + f > a.length)
|
|
817
817
|
throw new RangeError("Index out of range");
|
|
818
818
|
if (i < 0)
|
|
819
819
|
throw new RangeError("Index out of range");
|
|
820
820
|
}
|
|
821
|
-
function j(a, n, i,
|
|
822
|
-
return n = +n, i = i >>> 0, h ||
|
|
821
|
+
function j(a, n, i, f, h) {
|
|
822
|
+
return n = +n, i = i >>> 0, h || C(a, n, i, 4), r.write(a, n, i, f, 23, 4), i + 4;
|
|
823
823
|
}
|
|
824
|
-
|
|
825
|
-
return j(this, n, i, !0,
|
|
826
|
-
},
|
|
827
|
-
return j(this, n, i, !1,
|
|
824
|
+
c.prototype.writeFloatLE = function(n, i, f) {
|
|
825
|
+
return j(this, n, i, !0, f);
|
|
826
|
+
}, c.prototype.writeFloatBE = function(n, i, f) {
|
|
827
|
+
return j(this, n, i, !1, f);
|
|
828
828
|
};
|
|
829
|
-
function V(a, n, i,
|
|
830
|
-
return n = +n, i = i >>> 0, h ||
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
return V(this, n, i, !0,
|
|
834
|
-
},
|
|
835
|
-
return V(this, n, i, !1,
|
|
836
|
-
},
|
|
837
|
-
if (!
|
|
829
|
+
function V(a, n, i, f, h) {
|
|
830
|
+
return n = +n, i = i >>> 0, h || C(a, n, i, 8), r.write(a, n, i, f, 52, 8), i + 8;
|
|
831
|
+
}
|
|
832
|
+
c.prototype.writeDoubleLE = function(n, i, f) {
|
|
833
|
+
return V(this, n, i, !0, f);
|
|
834
|
+
}, c.prototype.writeDoubleBE = function(n, i, f) {
|
|
835
|
+
return V(this, n, i, !1, f);
|
|
836
|
+
}, c.prototype.copy = function(n, i, f, h) {
|
|
837
|
+
if (!c.isBuffer(n))
|
|
838
838
|
throw new TypeError("argument should be a Buffer");
|
|
839
|
-
if (
|
|
839
|
+
if (f || (f = 0), !h && h !== 0 && (h = this.length), i >= n.length && (i = n.length), i || (i = 0), h > 0 && h < f && (h = f), h === f || n.length === 0 || this.length === 0)
|
|
840
840
|
return 0;
|
|
841
841
|
if (i < 0)
|
|
842
842
|
throw new RangeError("targetStart out of bounds");
|
|
843
|
-
if (
|
|
843
|
+
if (f < 0 || f >= this.length)
|
|
844
844
|
throw new RangeError("Index out of range");
|
|
845
845
|
if (h < 0)
|
|
846
846
|
throw new RangeError("sourceEnd out of bounds");
|
|
847
|
-
h > this.length && (h = this.length), n.length - i < h -
|
|
848
|
-
const y = h -
|
|
849
|
-
return this === n && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(i,
|
|
847
|
+
h > this.length && (h = this.length), n.length - i < h - f && (h = n.length - i + f);
|
|
848
|
+
const y = h - f;
|
|
849
|
+
return this === n && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(i, f, h) : Uint8Array.prototype.set.call(
|
|
850
850
|
n,
|
|
851
|
-
this.subarray(
|
|
851
|
+
this.subarray(f, h),
|
|
852
852
|
i
|
|
853
853
|
), y;
|
|
854
|
-
},
|
|
854
|
+
}, c.prototype.fill = function(n, i, f, h) {
|
|
855
855
|
if (typeof n == "string") {
|
|
856
|
-
if (typeof i == "string" ? (h = i, i = 0,
|
|
856
|
+
if (typeof i == "string" ? (h = i, i = 0, f = this.length) : typeof f == "string" && (h = f, f = this.length), h !== void 0 && typeof h != "string")
|
|
857
857
|
throw new TypeError("encoding must be a string");
|
|
858
|
-
if (typeof h == "string" && !
|
|
858
|
+
if (typeof h == "string" && !c.isEncoding(h))
|
|
859
859
|
throw new TypeError("Unknown encoding: " + h);
|
|
860
860
|
if (n.length === 1) {
|
|
861
|
-
const
|
|
862
|
-
(h === "utf8" &&
|
|
861
|
+
const w = n.charCodeAt(0);
|
|
862
|
+
(h === "utf8" && w < 128 || h === "latin1") && (n = w);
|
|
863
863
|
}
|
|
864
864
|
} else
|
|
865
865
|
typeof n == "number" ? n = n & 255 : typeof n == "boolean" && (n = Number(n));
|
|
866
|
-
if (i < 0 || this.length < i || this.length <
|
|
866
|
+
if (i < 0 || this.length < i || this.length < f)
|
|
867
867
|
throw new RangeError("Out of range index");
|
|
868
|
-
if (
|
|
868
|
+
if (f <= i)
|
|
869
869
|
return this;
|
|
870
|
-
i = i >>> 0,
|
|
870
|
+
i = i >>> 0, f = f === void 0 ? this.length : f >>> 0, n || (n = 0);
|
|
871
871
|
let y;
|
|
872
872
|
if (typeof n == "number")
|
|
873
|
-
for (y = i; y <
|
|
873
|
+
for (y = i; y < f; ++y)
|
|
874
874
|
this[y] = n;
|
|
875
875
|
else {
|
|
876
|
-
const
|
|
876
|
+
const w = c.isBuffer(n) ? n : c.from(n, h), R = w.length;
|
|
877
877
|
if (R === 0)
|
|
878
878
|
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
|
|
879
|
-
for (y = 0; y <
|
|
880
|
-
this[y + i] =
|
|
879
|
+
for (y = 0; y < f - i; ++y)
|
|
880
|
+
this[y + i] = w[y % R];
|
|
881
881
|
}
|
|
882
882
|
return this;
|
|
883
883
|
};
|
|
@@ -922,28 +922,28 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
922
922
|
), N(
|
|
923
923
|
"ERR_OUT_OF_RANGE",
|
|
924
924
|
function(a, n, i) {
|
|
925
|
-
let
|
|
926
|
-
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = M(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = M(h)), h += "n"),
|
|
925
|
+
let f = `The value of "${a}" is out of range.`, h = i;
|
|
926
|
+
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = M(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = M(h)), h += "n"), f += ` It must be ${n}. Received ${h}`, f;
|
|
927
927
|
},
|
|
928
928
|
RangeError
|
|
929
929
|
);
|
|
930
930
|
function M(a) {
|
|
931
931
|
let n = "", i = a.length;
|
|
932
|
-
const
|
|
933
|
-
for (; i >=
|
|
932
|
+
const f = a[0] === "-" ? 1 : 0;
|
|
933
|
+
for (; i >= f + 4; i -= 3)
|
|
934
934
|
n = `_${a.slice(i - 3, i)}${n}`;
|
|
935
935
|
return `${a.slice(0, i)}${n}`;
|
|
936
936
|
}
|
|
937
937
|
function te(a, n, i) {
|
|
938
938
|
he(n, "offset"), (a[n] === void 0 || a[n + i] === void 0) && oe(n, a.length - (i + 1));
|
|
939
939
|
}
|
|
940
|
-
function ye(a, n, i,
|
|
940
|
+
function ye(a, n, i, f, h, y) {
|
|
941
941
|
if (a > i || a < n) {
|
|
942
|
-
const
|
|
942
|
+
const w = typeof n == "bigint" ? "n" : "";
|
|
943
943
|
let R;
|
|
944
|
-
throw y > 3 ? n === 0 || n === BigInt(0) ? R = `>= 0${
|
|
944
|
+
throw y > 3 ? n === 0 || n === BigInt(0) ? R = `>= 0${w} and < 2${w} ** ${(y + 1) * 8}${w}` : R = `>= -(2${w} ** ${(y + 1) * 8 - 1}${w}) and < 2 ** ${(y + 1) * 8 - 1}${w}` : R = `>= ${n}${w} and <= ${i}${w}`, new B.ERR_OUT_OF_RANGE("value", R, a);
|
|
945
945
|
}
|
|
946
|
-
te(
|
|
946
|
+
te(f, h, y);
|
|
947
947
|
}
|
|
948
948
|
function he(a, n) {
|
|
949
949
|
if (typeof a != "number")
|
|
@@ -957,26 +957,26 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
957
957
|
);
|
|
958
958
|
}
|
|
959
959
|
const Me = /[^+/0-9A-Za-z-_]/g;
|
|
960
|
-
function
|
|
960
|
+
function pt(a) {
|
|
961
961
|
if (a = a.split("=")[0], a = a.trim().replace(Me, ""), a.length < 2)
|
|
962
962
|
return "";
|
|
963
963
|
for (; a.length % 4 !== 0; )
|
|
964
964
|
a = a + "=";
|
|
965
965
|
return a;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function ot(a, n) {
|
|
968
968
|
n = n || 1 / 0;
|
|
969
969
|
let i;
|
|
970
|
-
const
|
|
970
|
+
const f = a.length;
|
|
971
971
|
let h = null;
|
|
972
972
|
const y = [];
|
|
973
|
-
for (let
|
|
974
|
-
if (i = a.charCodeAt(
|
|
973
|
+
for (let w = 0; w < f; ++w) {
|
|
974
|
+
if (i = a.charCodeAt(w), i > 55295 && i < 57344) {
|
|
975
975
|
if (!h) {
|
|
976
976
|
if (i > 56319) {
|
|
977
977
|
(n -= 3) > -1 && y.push(239, 191, 189);
|
|
978
978
|
continue;
|
|
979
|
-
} else if (
|
|
979
|
+
} else if (w + 1 === f) {
|
|
980
980
|
(n -= 3) > -1 && y.push(239, 191, 189);
|
|
981
981
|
continue;
|
|
982
982
|
}
|
|
@@ -1030,18 +1030,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1030
1030
|
return n;
|
|
1031
1031
|
}
|
|
1032
1032
|
function S(a, n) {
|
|
1033
|
-
let i,
|
|
1033
|
+
let i, f, h;
|
|
1034
1034
|
const y = [];
|
|
1035
|
-
for (let
|
|
1036
|
-
i = a.charCodeAt(
|
|
1035
|
+
for (let w = 0; w < a.length && !((n -= 2) < 0); ++w)
|
|
1036
|
+
i = a.charCodeAt(w), f = i >> 8, h = i % 256, y.push(h), y.push(f);
|
|
1037
1037
|
return y;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return e.toByteArray(
|
|
1039
|
+
function dt(a) {
|
|
1040
|
+
return e.toByteArray(pt(a));
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function st(a, n, i, f) {
|
|
1043
1043
|
let h;
|
|
1044
|
-
for (h = 0; h <
|
|
1044
|
+
for (h = 0; h < f && !(h + i >= n.length || h >= a.length); ++h)
|
|
1045
1045
|
n[h + i] = a[h];
|
|
1046
1046
|
return h;
|
|
1047
1047
|
}
|
|
@@ -1054,9 +1054,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1054
1054
|
const Vn = function() {
|
|
1055
1055
|
const a = "0123456789abcdef", n = new Array(256);
|
|
1056
1056
|
for (let i = 0; i < 16; ++i) {
|
|
1057
|
-
const
|
|
1057
|
+
const f = i * 16;
|
|
1058
1058
|
for (let h = 0; h < 16; ++h)
|
|
1059
|
-
n[
|
|
1059
|
+
n[f + h] = a[i] + a[h];
|
|
1060
1060
|
}
|
|
1061
1061
|
return n;
|
|
1062
1062
|
}();
|
|
@@ -1067,7 +1067,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1067
1067
|
throw new Error("BigInt not supported");
|
|
1068
1068
|
}
|
|
1069
1069
|
})(Xr);
|
|
1070
|
-
var en = { exports: {} }, Y = en.exports = {}, me,
|
|
1070
|
+
var en = { exports: {} }, Y = en.exports = {}, me, we;
|
|
1071
1071
|
function Xt() {
|
|
1072
1072
|
throw new Error("setTimeout has not been defined");
|
|
1073
1073
|
}
|
|
@@ -1081,9 +1081,9 @@ function Zt() {
|
|
|
1081
1081
|
me = Xt;
|
|
1082
1082
|
}
|
|
1083
1083
|
try {
|
|
1084
|
-
typeof clearTimeout == "function" ?
|
|
1084
|
+
typeof clearTimeout == "function" ? we = clearTimeout : we = Zt;
|
|
1085
1085
|
} catch {
|
|
1086
|
-
|
|
1086
|
+
we = Zt;
|
|
1087
1087
|
}
|
|
1088
1088
|
})();
|
|
1089
1089
|
function tn(t) {
|
|
@@ -1101,35 +1101,35 @@ function tn(t) {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1105
|
-
if (
|
|
1104
|
+
function ui(t) {
|
|
1105
|
+
if (we === clearTimeout)
|
|
1106
1106
|
return clearTimeout(t);
|
|
1107
|
-
if ((
|
|
1108
|
-
return
|
|
1107
|
+
if ((we === Zt || !we) && clearTimeout)
|
|
1108
|
+
return we = clearTimeout, clearTimeout(t);
|
|
1109
1109
|
try {
|
|
1110
|
-
return
|
|
1110
|
+
return we(t);
|
|
1111
1111
|
} catch {
|
|
1112
1112
|
try {
|
|
1113
|
-
return
|
|
1113
|
+
return we.call(null, t);
|
|
1114
1114
|
} catch {
|
|
1115
|
-
return
|
|
1115
|
+
return we.call(this, t);
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
var _e = [],
|
|
1120
|
-
function
|
|
1121
|
-
!
|
|
1119
|
+
var _e = [], Je = !1, Ue, yt = -1;
|
|
1120
|
+
function ci() {
|
|
1121
|
+
!Je || !Ue || (Je = !1, Ue.length ? _e = Ue.concat(_e) : yt = -1, _e.length && rn());
|
|
1122
1122
|
}
|
|
1123
1123
|
function rn() {
|
|
1124
|
-
if (!
|
|
1125
|
-
var t = tn(
|
|
1126
|
-
|
|
1124
|
+
if (!Je) {
|
|
1125
|
+
var t = tn(ci);
|
|
1126
|
+
Je = !0;
|
|
1127
1127
|
for (var e = _e.length; e; ) {
|
|
1128
1128
|
for (Ue = _e, _e = []; ++yt < e; )
|
|
1129
1129
|
Ue && Ue[yt].run();
|
|
1130
1130
|
yt = -1, e = _e.length;
|
|
1131
1131
|
}
|
|
1132
|
-
Ue = null,
|
|
1132
|
+
Ue = null, Je = !1, ui(t);
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
1135
|
Y.nextTick = function(t) {
|
|
@@ -1137,7 +1137,7 @@ Y.nextTick = function(t) {
|
|
|
1137
1137
|
if (arguments.length > 1)
|
|
1138
1138
|
for (var r = 1; r < arguments.length; r++)
|
|
1139
1139
|
e[r - 1] = arguments[r];
|
|
1140
|
-
_e.push(new nn(t, e)), _e.length === 1 && !
|
|
1140
|
+
_e.push(new nn(t, e)), _e.length === 1 && !Je && tn(rn);
|
|
1141
1141
|
};
|
|
1142
1142
|
function nn(t, e) {
|
|
1143
1143
|
this.fun = t, this.array = e;
|
|
@@ -1177,15 +1177,57 @@ Y.chdir = function(t) {
|
|
|
1177
1177
|
Y.umask = function() {
|
|
1178
1178
|
return 0;
|
|
1179
1179
|
};
|
|
1180
|
-
var
|
|
1180
|
+
var fi = en.exports;
|
|
1181
1181
|
(function(t) {
|
|
1182
1182
|
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
|
|
1183
|
-
const e = Xr, r =
|
|
1183
|
+
const e = Xr, r = fi, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
|
|
1184
1184
|
Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
|
|
1185
|
-
})(
|
|
1186
|
-
class
|
|
1185
|
+
})(O);
|
|
1186
|
+
class li {
|
|
1187
1187
|
}
|
|
1188
1188
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
1189
|
+
const hi = (t, e) => Qn(t, e, {
|
|
1190
|
+
mount: ({ storeName: r }) => {
|
|
1191
|
+
window.slStore[r] || (window.slStore[r] = { mounted: !0, history: [{ type: "mount" }] }), window.slStore[r].store = t;
|
|
1192
|
+
},
|
|
1193
|
+
unmount: ({ storeName: r }) => {
|
|
1194
|
+
window.slStore[r].mounted = !1, window.slStore[r]?.history.push({ type: "unmount" });
|
|
1195
|
+
},
|
|
1196
|
+
change: ({ actionName: r, storeName: o, changed: s, newValue: u, oldValue: l, valueMessage: c }) => {
|
|
1197
|
+
window.slStore[o]?.history.push({
|
|
1198
|
+
type: "change",
|
|
1199
|
+
changed: s,
|
|
1200
|
+
newValue: u,
|
|
1201
|
+
oldValue: l,
|
|
1202
|
+
diff: Gn({ ...l }, { ...u }, { cyclesFix: !1 }),
|
|
1203
|
+
actionName: r,
|
|
1204
|
+
valueMessage: c
|
|
1205
|
+
});
|
|
1206
|
+
},
|
|
1207
|
+
action: {
|
|
1208
|
+
start: ({ actionName: r, args: o, storeName: s }) => {
|
|
1209
|
+
window.slStore[s]?.history.push({
|
|
1210
|
+
type: "action:start",
|
|
1211
|
+
actionName: r,
|
|
1212
|
+
args: o,
|
|
1213
|
+
storeName: s
|
|
1214
|
+
});
|
|
1215
|
+
},
|
|
1216
|
+
error: ({ actionName: r, error: o, storeName: s }) => {
|
|
1217
|
+
window.slStore[s]?.history.push({
|
|
1218
|
+
type: "action:error",
|
|
1219
|
+
actionName: r,
|
|
1220
|
+
error: o
|
|
1221
|
+
});
|
|
1222
|
+
},
|
|
1223
|
+
end: ({ actionName: r, storeName: o }) => {
|
|
1224
|
+
window.slStore[o]?.history.push({
|
|
1225
|
+
type: "action:end",
|
|
1226
|
+
actionName: r
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1189
1231
|
class xt {
|
|
1190
1232
|
/**
|
|
1191
1233
|
* store instance (nanostores)
|
|
@@ -1193,7 +1235,7 @@ class xt {
|
|
|
1193
1235
|
store;
|
|
1194
1236
|
name;
|
|
1195
1237
|
constructor(e, r) {
|
|
1196
|
-
this.store = e, this.name = r;
|
|
1238
|
+
this.store = e, this.name = r, hi(this.store, this.name);
|
|
1197
1239
|
}
|
|
1198
1240
|
/**
|
|
1199
1241
|
* return store instance
|
|
@@ -1202,11 +1244,11 @@ class xt {
|
|
|
1202
1244
|
return this.store;
|
|
1203
1245
|
}
|
|
1204
1246
|
}
|
|
1205
|
-
const
|
|
1247
|
+
const pi = (t) => {
|
|
1206
1248
|
const e = Object.keys(t);
|
|
1207
1249
|
return Hr(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((o, s) => [o, r[s]])));
|
|
1208
1250
|
};
|
|
1209
|
-
class
|
|
1251
|
+
class ut extends xt {
|
|
1210
1252
|
getValues = () => this.getStore().get();
|
|
1211
1253
|
getValue = (e) => this.getStore().get()[e];
|
|
1212
1254
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
@@ -1218,7 +1260,7 @@ var Ie;
|
|
|
1218
1260
|
(function(t) {
|
|
1219
1261
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
1220
1262
|
})(Ie || (Ie = {}));
|
|
1221
|
-
const
|
|
1263
|
+
const di = {
|
|
1222
1264
|
[ue.BETTING]: "betting",
|
|
1223
1265
|
[ue.GAMES]: "games",
|
|
1224
1266
|
[ue.PUBLIC_CHAT]: "publicChat",
|
|
@@ -1236,7 +1278,7 @@ class lr {
|
|
|
1236
1278
|
listeners = /* @__PURE__ */ new Set();
|
|
1237
1279
|
settingsKey;
|
|
1238
1280
|
constructor({ settings: e, ...r }, o) {
|
|
1239
|
-
this.settingsKey =
|
|
1281
|
+
this.settingsKey = di[r.type], this.status = Ct(De.Suspended), this.config = new ut($e(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new ut($e(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new ut($e({}), `feature:settings:${this.settingsKey}`), this.source = o;
|
|
1240
1282
|
}
|
|
1241
1283
|
get featureConfig() {
|
|
1242
1284
|
return this.config.getStore();
|
|
@@ -1327,7 +1369,7 @@ class pe extends xt {
|
|
|
1327
1369
|
key = () => this.getStore().key;
|
|
1328
1370
|
off = () => this.getStore().off();
|
|
1329
1371
|
}
|
|
1330
|
-
async function*
|
|
1372
|
+
async function* yi(t, e) {
|
|
1331
1373
|
for await (const r of e) {
|
|
1332
1374
|
t.response.message = r, t.received_at = Date.now();
|
|
1333
1375
|
const o = {
|
|
@@ -1337,7 +1379,7 @@ async function* hi(t, e) {
|
|
|
1337
1379
|
window.postMessage(o), yield r;
|
|
1338
1380
|
}
|
|
1339
1381
|
}
|
|
1340
|
-
const
|
|
1382
|
+
const gi = () => (t) => async (e) => {
|
|
1341
1383
|
const r = {
|
|
1342
1384
|
name: e.url,
|
|
1343
1385
|
request: {},
|
|
@@ -1349,7 +1391,7 @@ const pi = () => (t) => async (e) => {
|
|
|
1349
1391
|
if (r.received_at = Date.now(), r.stream = o.stream, r.response.header = Object.fromEntries(o.header.entries()), r.response.trailer = Object.fromEntries(o.trailer.entries()), o.stream)
|
|
1350
1392
|
return {
|
|
1351
1393
|
...o,
|
|
1352
|
-
message:
|
|
1394
|
+
message: yi(r, o.message)
|
|
1353
1395
|
};
|
|
1354
1396
|
{
|
|
1355
1397
|
r.request.message = e.message, r.response.message = o.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -1377,7 +1419,7 @@ var Ae;
|
|
|
1377
1419
|
(function(t) {
|
|
1378
1420
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnecting = "reconnecting";
|
|
1379
1421
|
})(Ae || (Ae = {}));
|
|
1380
|
-
class
|
|
1422
|
+
class mi {
|
|
1381
1423
|
params;
|
|
1382
1424
|
stream;
|
|
1383
1425
|
method;
|
|
@@ -1392,7 +1434,7 @@ class di {
|
|
|
1392
1434
|
ts: /* @__PURE__ */ new Date(),
|
|
1393
1435
|
log: []
|
|
1394
1436
|
};
|
|
1395
|
-
this.state = new
|
|
1437
|
+
this.state = new ut($e(u), `subscription:${s.name}:state`), this.name = s.name, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = o, this.method = r, s.withStore && (this.store = new de(ne(null), `subscription:${s.name}:store`)), "subscribe" in o && typeof o.subscribe == "function" && o.subscribe(() => {
|
|
1396
1438
|
this.reconnect();
|
|
1397
1439
|
}), this.updateState(Ae.Ready);
|
|
1398
1440
|
}
|
|
@@ -1434,10 +1476,10 @@ class di {
|
|
|
1434
1476
|
this.addStateLog(`data routed to ${this.listeners.size} listeners`);
|
|
1435
1477
|
};
|
|
1436
1478
|
onStreamError = (e) => {
|
|
1437
|
-
e !== void 0 && (e.code !==
|
|
1479
|
+
e !== void 0 && (e.code !== zn.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e), this.reconnect()) : this.disconnect());
|
|
1438
1480
|
};
|
|
1439
1481
|
}
|
|
1440
|
-
class
|
|
1482
|
+
class wi {
|
|
1441
1483
|
toJsonOptions = {
|
|
1442
1484
|
emitDefaultValues: !1,
|
|
1443
1485
|
enumAsInteger: !0,
|
|
@@ -1452,11 +1494,11 @@ class yi {
|
|
|
1452
1494
|
callbackClients;
|
|
1453
1495
|
subscriptions;
|
|
1454
1496
|
constructor(e) {
|
|
1455
|
-
this.host = e, this.$headers = new
|
|
1456
|
-
"sl-device-id":
|
|
1497
|
+
this.host = e, this.$headers = new ut($e({
|
|
1498
|
+
"sl-device-id": O.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
1457
1499
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
1458
|
-
const [r, o, s] =
|
|
1459
|
-
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport =
|
|
1500
|
+
const [r, o, s] = Jn();
|
|
1501
|
+
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Wn({
|
|
1460
1502
|
baseUrl: e,
|
|
1461
1503
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1462
1504
|
// @ts-ignore
|
|
@@ -1471,7 +1513,7 @@ class yi {
|
|
|
1471
1513
|
const s = this.subscriptions.get(r);
|
|
1472
1514
|
if (s)
|
|
1473
1515
|
return s;
|
|
1474
|
-
const u = new
|
|
1516
|
+
const u = new mi(this.$headers, e, r, o);
|
|
1475
1517
|
return this.subscriptions.set(r, u), u;
|
|
1476
1518
|
};
|
|
1477
1519
|
removeSubscription = (e) => {
|
|
@@ -1492,14 +1534,14 @@ class yi {
|
|
|
1492
1534
|
const r = e.typeName;
|
|
1493
1535
|
if (this.clients.has(r))
|
|
1494
1536
|
return this.clients.get(r);
|
|
1495
|
-
const o =
|
|
1537
|
+
const o = Kn(e, this.transport);
|
|
1496
1538
|
return this.clients.set(r, o), o;
|
|
1497
1539
|
};
|
|
1498
1540
|
getCallbackClient = (e) => {
|
|
1499
1541
|
const r = e.typeName;
|
|
1500
1542
|
if (this.callbackClients.has(r))
|
|
1501
1543
|
return this.callbackClients.get(r);
|
|
1502
|
-
const o =
|
|
1544
|
+
const o = Hn(e, this.transport);
|
|
1503
1545
|
return this.callbackClients.set(r, o), o;
|
|
1504
1546
|
};
|
|
1505
1547
|
// create unary client, used for query request
|
|
@@ -1508,8 +1550,8 @@ class yi {
|
|
|
1508
1550
|
e.typeName,
|
|
1509
1551
|
u.charAt(0).toLowerCase() + u.slice(1),
|
|
1510
1552
|
...Array.isArray(r) ? r : [r]
|
|
1511
|
-
],
|
|
1512
|
-
return { client: s, queryKey: l, queryKeyStr:
|
|
1553
|
+
], c = [e.typeName, u.charAt(0).toLowerCase() + u.slice(1)];
|
|
1554
|
+
return { client: s, queryKey: l, queryKeyStr: c.join("") };
|
|
1513
1555
|
};
|
|
1514
1556
|
// create callback client, used for server stream subscriptions
|
|
1515
1557
|
createCallbackClient = (e) => ({ client: this.getCallbackClient(e) });
|
|
@@ -1531,11 +1573,11 @@ class yi {
|
|
|
1531
1573
|
o.header.set(u, s[u]);
|
|
1532
1574
|
return r(o);
|
|
1533
1575
|
};
|
|
1534
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
1576
|
+
this.interceptors.push(e), this.interceptors.push(gi());
|
|
1535
1577
|
};
|
|
1536
1578
|
}
|
|
1537
|
-
const
|
|
1538
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1579
|
+
const bi = (t, e) => {
|
|
1580
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Yn, {
|
|
1539
1581
|
method: "retrieveEventId",
|
|
1540
1582
|
params: [t]
|
|
1541
1583
|
});
|
|
@@ -1552,29 +1594,29 @@ const gi = (t, e) => {
|
|
|
1552
1594
|
}
|
|
1553
1595
|
}
|
|
1554
1596
|
});
|
|
1555
|
-
},
|
|
1556
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1597
|
+
}, vi = (t, e) => {
|
|
1598
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "getStream", params: [t] });
|
|
1557
1599
|
return e.nanoquery.createFetcherStore(o, {
|
|
1558
1600
|
fetcher: async (s, u, l) => l ? (await r.getStream({
|
|
1559
1601
|
id: l
|
|
1560
1602
|
// we are sure that id is a string
|
|
1561
1603
|
})).data?.attributes : void 0
|
|
1562
1604
|
});
|
|
1563
|
-
},
|
|
1605
|
+
}, Si = (t, e) => {
|
|
1564
1606
|
const { queryKey: r, client: o } = e.createPromiseClient(Wr, { method: "me", params: [t] });
|
|
1565
1607
|
return e.nanoquery.createFetcherStore(r, {
|
|
1566
1608
|
fetcher: () => o.me({})
|
|
1567
1609
|
});
|
|
1568
|
-
},
|
|
1610
|
+
}, Ai = (t) => {
|
|
1569
1611
|
const { client: e } = t.createPromiseClient(Wr, { method: "bypassAuth" });
|
|
1570
1612
|
return ({ userKey: r, schema: o, init: s }) => e.bypassAuth({ userKey: r, schema: o, init: s });
|
|
1571
|
-
},
|
|
1572
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1613
|
+
}, Ei = (t, e) => {
|
|
1614
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "get", params: [t] });
|
|
1573
1615
|
return e.nanoquery.createFetcherStore(o, {
|
|
1574
1616
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
1575
1617
|
});
|
|
1576
|
-
},
|
|
1577
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1618
|
+
}, Ii = (t, e) => {
|
|
1619
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "getOrganization", params: [t] });
|
|
1578
1620
|
return e.nanoquery.createFetcherStore(o, {
|
|
1579
1621
|
fetcher: async () => {
|
|
1580
1622
|
const s = await r.getOrganization({});
|
|
@@ -1584,16 +1626,16 @@ const gi = (t, e) => {
|
|
|
1584
1626
|
} : void 0;
|
|
1585
1627
|
}
|
|
1586
1628
|
});
|
|
1587
|
-
},
|
|
1588
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1629
|
+
}, Fi = (t, e) => {
|
|
1630
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, {
|
|
1589
1631
|
method: "getOrganizationAdvertising",
|
|
1590
1632
|
params: [t]
|
|
1591
1633
|
});
|
|
1592
1634
|
return e.nanoquery.createFetcherStore(o, {
|
|
1593
1635
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
1594
1636
|
});
|
|
1595
|
-
},
|
|
1596
|
-
t.transport = new
|
|
1637
|
+
}, Ti = (t, e, r) => {
|
|
1638
|
+
t.transport = new wi(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), r();
|
|
1597
1639
|
};
|
|
1598
1640
|
class hr {
|
|
1599
1641
|
delimiter = ":";
|
|
@@ -1649,19 +1691,19 @@ var Fe;
|
|
|
1649
1691
|
(function(t) {
|
|
1650
1692
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
1651
1693
|
})(Fe || (Fe = {}));
|
|
1652
|
-
const
|
|
1653
|
-
const e = new Ke(), r = new de(ne(e.getExternalToken()), "userKey"), o = new de(ne(e.getToken()), "userToken"), s = new pe(
|
|
1654
|
-
if (!
|
|
1655
|
-
return l?.data?.id ? l.data.id : p === !1 ? void 0 :
|
|
1656
|
-
}), u = new pe(
|
|
1694
|
+
const _i = (t) => {
|
|
1695
|
+
const e = new Ke(), r = new de(ne(e.getExternalToken()), "userKey"), o = new de(ne(e.getToken()), "userToken"), s = new pe(Si(o.getStore(), t), "user", ({ data: l, error: c, loading: p }, b) => {
|
|
1696
|
+
if (!c)
|
|
1697
|
+
return l?.data?.id ? l.data.id : p === !1 ? void 0 : b;
|
|
1698
|
+
}), u = new pe(Ei(o.getStore(), t), "userSettings");
|
|
1657
1699
|
return {
|
|
1658
1700
|
userKey: r,
|
|
1659
1701
|
userToken: o,
|
|
1660
1702
|
user: s,
|
|
1661
1703
|
userSettings: u
|
|
1662
1704
|
};
|
|
1663
|
-
},
|
|
1664
|
-
const e = new de(ne(void 0), "providerStreamId"), r = new pe(
|
|
1705
|
+
}, Ci = (t) => {
|
|
1706
|
+
const e = new de(ne(void 0), "providerStreamId"), r = new pe(bi(e.getStore(), t), "slStreamId", (s) => s?.data), o = new pe(vi(r.getAtomStore(), t), "streamSettings");
|
|
1665
1707
|
return r.getAtomStore().listen((s) => {
|
|
1666
1708
|
(s === "" || s === void 0) && o.getStore().mutate(void 0);
|
|
1667
1709
|
}), {
|
|
@@ -1669,8 +1711,8 @@ const Ii = (t) => {
|
|
|
1669
1711
|
slStreamId: r,
|
|
1670
1712
|
streamSettings: o
|
|
1671
1713
|
};
|
|
1672
|
-
},
|
|
1673
|
-
const e = new de(ne(void 0), "enabled"), r = new de(ne(Fe.DISABLED), "status"), o = new pe(
|
|
1714
|
+
}, Oi = (t) => {
|
|
1715
|
+
const e = new de(ne(void 0), "enabled"), r = new de(ne(Fe.DISABLED), "status"), o = new pe(Ii(e.getStore(), t), "organizationSettings", (c) => c?.data?.id), s = new pe(Fi(o.getAtomStore(), t), "organizationAdvertising"), u = _i(t), l = Ci(t);
|
|
1674
1716
|
return {
|
|
1675
1717
|
enabled: e,
|
|
1676
1718
|
status: r,
|
|
@@ -1685,10 +1727,10 @@ const Ii = (t) => {
|
|
|
1685
1727
|
organizationAdvertising: s
|
|
1686
1728
|
};
|
|
1687
1729
|
};
|
|
1688
|
-
class
|
|
1730
|
+
class xi extends xt {
|
|
1689
1731
|
stores;
|
|
1690
1732
|
constructor(e) {
|
|
1691
|
-
const r =
|
|
1733
|
+
const r = Oi(e), o = pi(r);
|
|
1692
1734
|
super(o, "core"), this.stores = r;
|
|
1693
1735
|
}
|
|
1694
1736
|
getValue() {
|
|
@@ -1709,12 +1751,12 @@ class _i extends xt {
|
|
|
1709
1751
|
};
|
|
1710
1752
|
unsubscribe = () => this.getStore().off();
|
|
1711
1753
|
}
|
|
1712
|
-
class
|
|
1754
|
+
class Bi extends li {
|
|
1713
1755
|
$coreStore;
|
|
1714
1756
|
transport;
|
|
1715
1757
|
bypassLogin;
|
|
1716
1758
|
constructor(e, r) {
|
|
1717
|
-
super(), this.$coreStore = e, this.transport = r, this.bypassLogin =
|
|
1759
|
+
super(), this.$coreStore = e, this.transport = r, this.bypassLogin = Ai(this.transport), this.connect();
|
|
1718
1760
|
}
|
|
1719
1761
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1720
1762
|
/**
|
|
@@ -1788,24 +1830,24 @@ class Ci extends ci {
|
|
|
1788
1830
|
});
|
|
1789
1831
|
};
|
|
1790
1832
|
}
|
|
1791
|
-
const
|
|
1792
|
-
t.auth = new
|
|
1833
|
+
const at = new Ke(), ki = (t, e, r) => {
|
|
1834
|
+
t.auth = new Bi(t.store, t.transport), t.stores.status.listen((o) => {
|
|
1793
1835
|
o === Fe.READY && t.auth.reLogin();
|
|
1794
1836
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (o, s) => {
|
|
1795
|
-
if (!(
|
|
1837
|
+
if (!(at.getSchema() === o && at.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
1796
1838
|
try {
|
|
1797
|
-
await t.auth.login(o, s),
|
|
1839
|
+
await t.auth.login(o, s), at.setSchema(o), at.setExternalToken(s);
|
|
1798
1840
|
} catch {
|
|
1799
1841
|
t.sdk.logout();
|
|
1800
1842
|
}
|
|
1801
1843
|
}, t.sdk.logout = () => {
|
|
1802
|
-
t.auth.logout(),
|
|
1844
|
+
t.auth.logout(), at.clear();
|
|
1803
1845
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1804
|
-
},
|
|
1805
|
-
t.store = new
|
|
1846
|
+
}, Pi = (t, e, r) => {
|
|
1847
|
+
t.store = new xi(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([o, s]) => [o, s.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
1806
1848
|
t.store.unsubscribe();
|
|
1807
1849
|
}, r();
|
|
1808
|
-
},
|
|
1850
|
+
}, Ri = (t, e, r) => {
|
|
1809
1851
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1810
1852
|
if (t.stores.enabled.get() === "on")
|
|
1811
1853
|
return { enabled: !0 };
|
|
@@ -1821,36 +1863,36 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1821
1863
|
}, t.sdk.createEventSession = (o) => {
|
|
1822
1864
|
t.stores.providerStreamId.setValue(o);
|
|
1823
1865
|
}, r();
|
|
1824
|
-
},
|
|
1866
|
+
}, Li = Xn({
|
|
1825
1867
|
level: "trace",
|
|
1826
|
-
enabled:
|
|
1868
|
+
enabled: !1,
|
|
1827
1869
|
browser: {
|
|
1828
1870
|
write: (t) => {
|
|
1829
1871
|
console.log(t);
|
|
1830
1872
|
}
|
|
1831
1873
|
}
|
|
1832
|
-
}), on = (t, e) =>
|
|
1874
|
+
}), on = (t, e) => Li.child({ name: t }, e), Ni = (t, e, r) => {
|
|
1833
1875
|
const { client: o, queryKey: s } = r.createPromiseClient(Jr, {
|
|
1834
1876
|
method: "summary",
|
|
1835
1877
|
params: [t, e]
|
|
1836
1878
|
});
|
|
1837
1879
|
return r.nanoquery.createFetcherStore(s, {
|
|
1838
|
-
fetcher: async (u, l,
|
|
1839
|
-
eventId:
|
|
1880
|
+
fetcher: async (u, l, c, p) => (await o.summary({
|
|
1881
|
+
eventId: c,
|
|
1840
1882
|
userId: p
|
|
1841
1883
|
})).data?.attributes
|
|
1842
1884
|
});
|
|
1843
|
-
},
|
|
1885
|
+
}, Ui = (t) => {
|
|
1844
1886
|
const { client: e } = t.createPromiseClient(Jr, { method: "list" });
|
|
1845
1887
|
return (r) => e.list(r);
|
|
1846
|
-
},
|
|
1888
|
+
}, $i = (t, e) => {
|
|
1847
1889
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "get", params: [t] });
|
|
1848
1890
|
return e.nanoquery.createFetcherStore(o, {
|
|
1849
1891
|
fetcher: async (s, u, l) => (await r.get({
|
|
1850
1892
|
eventId: l
|
|
1851
1893
|
})).data?.attributes
|
|
1852
1894
|
});
|
|
1853
|
-
},
|
|
1895
|
+
}, Di = (t, e) => {
|
|
1854
1896
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "syncQuestion", params: [t] });
|
|
1855
1897
|
return e.nanoquery.createFetcherStore(o, {
|
|
1856
1898
|
fetcher: async (s, u, l) => l ? (await r.syncQuestion({
|
|
@@ -1859,12 +1901,12 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1859
1901
|
}
|
|
1860
1902
|
})).data?.attributes : void 0
|
|
1861
1903
|
});
|
|
1862
|
-
},
|
|
1904
|
+
}, ji = (t, e) => {
|
|
1863
1905
|
const { client: r } = e.createCallbackClient(ve), o = Ct({ eventId: t.get() || "", feedId: "" });
|
|
1864
1906
|
return t.subscribe((u = "") => {
|
|
1865
1907
|
o.set({ eventId: u, feedId: "" });
|
|
1866
1908
|
}), e.addSubscription(r.subscription, o, { name: "feedSubscription" });
|
|
1867
|
-
},
|
|
1909
|
+
}, Vi = (t, e) => {
|
|
1868
1910
|
const { client: r } = e.createCallbackClient(ve);
|
|
1869
1911
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
1870
1912
|
}, sn = async (t, e) => {
|
|
@@ -1872,14 +1914,17 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1872
1914
|
return (await r.questionByUser({
|
|
1873
1915
|
questionId: t
|
|
1874
1916
|
})).data?.attributes?.question;
|
|
1875
|
-
},
|
|
1917
|
+
}, Mi = (t, e) => {
|
|
1876
1918
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "list", params: [t] });
|
|
1877
1919
|
return e.nanoquery.createFetcherStore(o, {
|
|
1878
1920
|
fetcher: async (s, u, l) => l ? (await r.list({
|
|
1879
|
-
eventId: l
|
|
1921
|
+
eventId: l,
|
|
1922
|
+
filter: {
|
|
1923
|
+
statuses: [We.ACTIVE, We.RESOLVED]
|
|
1924
|
+
}
|
|
1880
1925
|
})).data : []
|
|
1881
1926
|
});
|
|
1882
|
-
},
|
|
1927
|
+
}, qi = (t, e) => {
|
|
1883
1928
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "insightHistory", params: [t] });
|
|
1884
1929
|
return e.nanoquery.createFetcherStore(o, {
|
|
1885
1930
|
fetcher: async (s, u, l) => l ? (await r.insightHistory({
|
|
@@ -1888,7 +1933,7 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1888
1933
|
});
|
|
1889
1934
|
};
|
|
1890
1935
|
var pr = { exports: {} };
|
|
1891
|
-
const
|
|
1936
|
+
const Qi = Object.getPrototypeOf({});
|
|
1892
1937
|
function dr(t) {
|
|
1893
1938
|
function e(I) {
|
|
1894
1939
|
return I !== "constructor" && I !== "prototype" && I !== "__proto__";
|
|
@@ -1902,9 +1947,9 @@ function dr(t) {
|
|
|
1902
1947
|
}
|
|
1903
1948
|
function o(I) {
|
|
1904
1949
|
const _ = {};
|
|
1905
|
-
if (p && Object.getPrototypeOf(I) !==
|
|
1950
|
+
if (p && Object.getPrototypeOf(I) !== Qi)
|
|
1906
1951
|
return p(I);
|
|
1907
|
-
const D =
|
|
1952
|
+
const D = c(I);
|
|
1908
1953
|
let U, T, x;
|
|
1909
1954
|
for (U = 0, T = D.length; U < T; ++U)
|
|
1910
1955
|
e(x = D[U]) && (_[x] = F(I[x]));
|
|
@@ -1927,19 +1972,19 @@ function dr(t) {
|
|
|
1927
1972
|
u.call(I, D[U]) && _.push(D[U]);
|
|
1928
1973
|
return _;
|
|
1929
1974
|
}
|
|
1930
|
-
const
|
|
1931
|
-
function
|
|
1975
|
+
const c = t && t.symbols ? l : Object.keys, p = typeof t?.cloneProtoObject == "function" ? t.cloneProtoObject : void 0;
|
|
1976
|
+
function b(I) {
|
|
1932
1977
|
return typeof I == "object" && I !== null && !(I instanceof RegExp) && !(I instanceof Date);
|
|
1933
1978
|
}
|
|
1934
1979
|
function g(I) {
|
|
1935
1980
|
return typeof I != "object" || I === null;
|
|
1936
1981
|
}
|
|
1937
|
-
const m = typeof
|
|
1982
|
+
const m = typeof O.Buffer < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof O.Buffer : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: P, getKeys: c, isMergeableObject: b }) : s;
|
|
1938
1983
|
function F(I) {
|
|
1939
|
-
return
|
|
1984
|
+
return b(I) ? Array.isArray(I) ? r(I) : o(I) : I;
|
|
1940
1985
|
}
|
|
1941
1986
|
function L(I, _) {
|
|
1942
|
-
const D = {}, U =
|
|
1987
|
+
const D = {}, U = c(I), T = c(_);
|
|
1943
1988
|
let x, k, G;
|
|
1944
1989
|
for (x = 0, k = U.length; x < k; ++x)
|
|
1945
1990
|
e(G = U[x]) && T.indexOf(G) === -1 && (D[G] = F(I[G]));
|
|
@@ -1970,17 +2015,17 @@ function dr(t) {
|
|
|
1970
2015
|
}
|
|
1971
2016
|
pr.exports = dr;
|
|
1972
2017
|
pr.exports.default = dr;
|
|
1973
|
-
var
|
|
1974
|
-
const
|
|
2018
|
+
var Gi = pr.exports.deepmerge = dr;
|
|
2019
|
+
const zi = (t) => (e, r) => {
|
|
1975
2020
|
let o = 0;
|
|
1976
|
-
const s = e.length, u = r.length, l = Math.max(s, u),
|
|
2021
|
+
const s = e.length, u = r.length, l = Math.max(s, u), c = new Array(l);
|
|
1977
2022
|
for (o = 0; o < l; ++o)
|
|
1978
|
-
o < u ?
|
|
1979
|
-
return
|
|
1980
|
-
},
|
|
1981
|
-
const o = Hr([e, r], (l,
|
|
1982
|
-
if (l &&
|
|
1983
|
-
return
|
|
2023
|
+
o < u ? c[o] = t.deepmerge(e[o], r[o]) : c[o] = t.clone(e[o]);
|
|
2024
|
+
return c;
|
|
2025
|
+
}, Ki = Gi({ mergeArray: zi }), Hi = (t, e, r) => {
|
|
2026
|
+
const o = Hr([e, r], (l, c) => {
|
|
2027
|
+
if (l && c.data)
|
|
2028
|
+
return c.data.find((p) => p.id === l);
|
|
1984
2029
|
}), s = $e({
|
|
1985
2030
|
data: void 0,
|
|
1986
2031
|
loading: void 0,
|
|
@@ -1989,20 +2034,20 @@ const qi = (t) => (e, r) => {
|
|
|
1989
2034
|
return o.subscribe(async (l) => {
|
|
1990
2035
|
if (l && l.type === "question") {
|
|
1991
2036
|
s.setKey("loading", !0);
|
|
1992
|
-
const
|
|
1993
|
-
s.set({ data:
|
|
2037
|
+
const c = await sn(l.id, t);
|
|
2038
|
+
s.set({ data: c, loading: !1 });
|
|
1994
2039
|
return;
|
|
1995
2040
|
}
|
|
1996
2041
|
s.set({ data: void 0, loading: !1 });
|
|
1997
2042
|
}), { $store: o, $extendedStore: s, updateExtendedQuestion: (l) => {
|
|
1998
|
-
const
|
|
1999
|
-
if (
|
|
2043
|
+
const c = s.get().data;
|
|
2044
|
+
if (c)
|
|
2000
2045
|
for (const p of l?.answers || [])
|
|
2001
2046
|
p.youVoted !== !0 && delete p.youVoted;
|
|
2002
|
-
s.set({ data:
|
|
2047
|
+
s.set({ data: Ki(c, l) });
|
|
2003
2048
|
} };
|
|
2004
|
-
}, an = (t) => (t.gamification || (t.gamification = new
|
|
2005
|
-
class
|
|
2049
|
+
}, an = (t) => (t.gamification || (t.gamification = new Wi(t)), t.gamification);
|
|
2050
|
+
class Wi {
|
|
2006
2051
|
/** sl event id */
|
|
2007
2052
|
slStreamId;
|
|
2008
2053
|
/** organization id */
|
|
@@ -2029,13 +2074,13 @@ class zi {
|
|
|
2029
2074
|
constructor(e) {
|
|
2030
2075
|
if (e.gamification)
|
|
2031
2076
|
throw new Error("GamificationBackground Singleton error");
|
|
2032
|
-
this.log = on("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new de(ne(void 0), "moderationId").getStore(), this.openedQuestionId = new de(ne(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new pe(
|
|
2033
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
2077
|
+
this.log = on("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new de(ne(void 0), "moderationId").getStore(), this.openedQuestionId = new de(ne(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new pe($i(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new pe(Mi(this.slStreamId, e.transport), "gamification:feedList"), this.activeQuestionId = new pe(Di(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = Hi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2078
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Vi(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
|
|
2034
2079
|
window.requestAnimationFrame(() => {
|
|
2035
2080
|
this.openedQuestion.updateExtendedQuestion(o.data?.attributes?.question);
|
|
2036
2081
|
});
|
|
2037
2082
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
2038
|
-
}), this.feedSubscription =
|
|
2083
|
+
}), this.feedSubscription = ji(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
2039
2084
|
window.requestAnimationFrame(() => {
|
|
2040
2085
|
const o = this.activeQuestionId.getStore();
|
|
2041
2086
|
o && o.mutate(r.data?.attributes);
|
|
@@ -2070,7 +2115,7 @@ class zi {
|
|
|
2070
2115
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
2071
2116
|
};
|
|
2072
2117
|
}
|
|
2073
|
-
class
|
|
2118
|
+
class Ji {
|
|
2074
2119
|
notificationsList;
|
|
2075
2120
|
notifications;
|
|
2076
2121
|
store;
|
|
@@ -2088,7 +2133,7 @@ class Ki {
|
|
|
2088
2133
|
return;
|
|
2089
2134
|
}
|
|
2090
2135
|
const r = e.close, o = e.action;
|
|
2091
|
-
this.store.set(e.id, {
|
|
2136
|
+
if (this.store.set(e.id, {
|
|
2092
2137
|
...e,
|
|
2093
2138
|
close: (...s) => {
|
|
2094
2139
|
r && r(...s), this.closeNotification(e.id);
|
|
@@ -2096,7 +2141,11 @@ class Ki {
|
|
|
2096
2141
|
action: (...s) => {
|
|
2097
2142
|
o && o(...s), this.closeNotification(e.id);
|
|
2098
2143
|
}
|
|
2099
|
-
}), this.waitingQueue.add(e.id), this.
|
|
2144
|
+
}), this.waitingQueue.add(e.id), this.activeQueue.size === this.options.concurrency) {
|
|
2145
|
+
const [s] = this.activeQueue;
|
|
2146
|
+
this.closeNotification(s);
|
|
2147
|
+
} else
|
|
2148
|
+
this.tickWaitingQueue();
|
|
2100
2149
|
};
|
|
2101
2150
|
tickWaitingQueue = () => {
|
|
2102
2151
|
if (this.activeQueue.size < this.options.concurrency) {
|
|
@@ -2144,7 +2193,7 @@ var St;
|
|
|
2144
2193
|
(function(t) {
|
|
2145
2194
|
t.OPENED = "opened";
|
|
2146
2195
|
})(St || (St = {}));
|
|
2147
|
-
class
|
|
2196
|
+
class Yi extends hr {
|
|
2148
2197
|
constructor() {
|
|
2149
2198
|
super("notification");
|
|
2150
2199
|
}
|
|
@@ -2160,11 +2209,11 @@ var Le;
|
|
|
2160
2209
|
(function(t) {
|
|
2161
2210
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2162
2211
|
})(Le || (Le = {}));
|
|
2163
|
-
class
|
|
2212
|
+
class Xi {
|
|
2164
2213
|
queue;
|
|
2165
2214
|
storage;
|
|
2166
2215
|
constructor(e = {}) {
|
|
2167
|
-
this.storage = new
|
|
2216
|
+
this.storage = new Yi(), this.queue = new Ji({ concurrency: 1, animationDelay: 1600, ...e });
|
|
2168
2217
|
}
|
|
2169
2218
|
add = (e) => {
|
|
2170
2219
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -2177,15 +2226,15 @@ class Wi {
|
|
|
2177
2226
|
this.storage.setOpened(e);
|
|
2178
2227
|
};
|
|
2179
2228
|
}
|
|
2180
|
-
const
|
|
2181
|
-
t.notifications = new
|
|
2182
|
-
},
|
|
2229
|
+
const Zi = (t, e, r) => {
|
|
2230
|
+
t.notifications = new Xi(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
2231
|
+
}, eo = (t, e) => {
|
|
2183
2232
|
const { client: r } = t.createPromiseClient(ve, { method: "submitAnswer" });
|
|
2184
2233
|
return r.submitAnswer({ data: e });
|
|
2185
|
-
},
|
|
2234
|
+
}, to = (t, e) => {
|
|
2186
2235
|
const { client: r } = t.createPromiseClient(ve, { method: "submitInplay" });
|
|
2187
2236
|
return r.submitInplay({ data: { eventId: +e } });
|
|
2188
|
-
},
|
|
2237
|
+
}, ro = (t, e) => {
|
|
2189
2238
|
const { client: r } = t.createPromiseClient(ve, { method: "skipQuestion" });
|
|
2190
2239
|
return r.skipQuestion({ data: { id: e } });
|
|
2191
2240
|
};
|
|
@@ -2204,28 +2253,28 @@ class un extends hr {
|
|
|
2204
2253
|
}
|
|
2205
2254
|
const Fr = {
|
|
2206
2255
|
pageSize: 10
|
|
2207
|
-
},
|
|
2208
|
-
const o = ne({ pageSize: r?.pageSize || Fr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u =
|
|
2209
|
-
if (
|
|
2256
|
+
}, no = (t, e, r) => {
|
|
2257
|
+
const o = ne({ pageSize: r?.pageSize || Fr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u = Ui(t), l = async (b) => {
|
|
2258
|
+
if (b) {
|
|
2210
2259
|
s.setKey("loading", !0);
|
|
2211
2260
|
const g = {
|
|
2212
|
-
eventId:
|
|
2261
|
+
eventId: b,
|
|
2213
2262
|
pagination: { page: 0, pageSize: r?.pageSize || Fr.pageSize }
|
|
2214
2263
|
}, m = await u(g);
|
|
2215
2264
|
s.set({ data: m.data.map((E) => E.attributes), loading: !1 }), o.set(g.pagination);
|
|
2216
2265
|
}
|
|
2217
2266
|
};
|
|
2218
2267
|
e.listen(l);
|
|
2219
|
-
const
|
|
2268
|
+
const c = () => {
|
|
2220
2269
|
l(e.get());
|
|
2221
2270
|
};
|
|
2222
|
-
return o.listen(async (
|
|
2271
|
+
return o.listen(async (b) => {
|
|
2223
2272
|
const g = e.get(), m = s.get().data?.length || 0;
|
|
2224
|
-
if (
|
|
2273
|
+
if (b.page > 0 && g && m >= b.page * b.pageSize) {
|
|
2225
2274
|
s.setKey("loading", !0);
|
|
2226
2275
|
const F = await u({
|
|
2227
2276
|
eventId: g,
|
|
2228
|
-
pagination:
|
|
2277
|
+
pagination: b
|
|
2229
2278
|
}), L = s.get().data || [];
|
|
2230
2279
|
s.set({
|
|
2231
2280
|
data: [...L, ...F.data.map((P) => P.attributes)],
|
|
@@ -2233,26 +2282,29 @@ const Fr = {
|
|
|
2233
2282
|
});
|
|
2234
2283
|
}
|
|
2235
2284
|
}), { $store: s, fetchMore: () => {
|
|
2236
|
-
const
|
|
2237
|
-
o.set({ ...
|
|
2238
|
-
}, invalidate:
|
|
2239
|
-
},
|
|
2240
|
-
const { client: r, queryKey: o } = t.createPromiseClient(
|
|
2285
|
+
const b = o.get();
|
|
2286
|
+
o.set({ ...b, page: b.page + 1 });
|
|
2287
|
+
}, invalidate: c };
|
|
2288
|
+
}, io = (t, e) => {
|
|
2289
|
+
const { client: r, queryKey: o } = t.createPromiseClient(lt, {
|
|
2241
2290
|
method: "generateDeepLink",
|
|
2242
2291
|
params: e
|
|
2243
2292
|
});
|
|
2244
2293
|
return t.nanoquery.createFetcherStore(o, {
|
|
2245
2294
|
fetcher: async (s, u, l) => l ? (await r.generateDeepLink({ data: { eventId: l } })).data?.attributes : {}
|
|
2246
2295
|
});
|
|
2247
|
-
},
|
|
2296
|
+
}, oo = (t, e, r) => {
|
|
2297
|
+
const o = io(t, [e]), s = `${window.location.host + window.location.pathname}%23sl_eid=${e.get()}&sl_uid=${r.get()}`;
|
|
2298
|
+
return { $store: o, fetch, desktopLink: s };
|
|
2299
|
+
};
|
|
2248
2300
|
var re;
|
|
2249
2301
|
(function(t) {
|
|
2250
2302
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2251
2303
|
})(re || (re = {}));
|
|
2252
|
-
const
|
|
2304
|
+
const so = (t, e, r, o) => {
|
|
2253
2305
|
const s = new un(), u = ne(re.Unset), l = () => {
|
|
2254
|
-
const { inplayGame:
|
|
2255
|
-
|
|
2306
|
+
const { inplayGame: b } = t.featureSettings.get(), g = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2307
|
+
b && o.add({
|
|
2256
2308
|
type: Le.ONBOARDING,
|
|
2257
2309
|
id: g,
|
|
2258
2310
|
action: t.openFeature,
|
|
@@ -2264,21 +2316,21 @@ const no = (t, e, r, o) => {
|
|
|
2264
2316
|
questionType: Te.UNSET,
|
|
2265
2317
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2266
2318
|
// @ts-ignore
|
|
2267
|
-
onboarding: { ...
|
|
2319
|
+
onboarding: { ...b }
|
|
2268
2320
|
}
|
|
2269
2321
|
});
|
|
2270
2322
|
};
|
|
2271
|
-
u.subscribe((
|
|
2272
|
-
(
|
|
2323
|
+
u.subscribe((b) => {
|
|
2324
|
+
(b === re.Optional || re.Required) && l(), b === re.Completed && e.activeQuestionId.invalidate();
|
|
2273
2325
|
});
|
|
2274
|
-
const
|
|
2275
|
-
const
|
|
2276
|
-
if (!
|
|
2326
|
+
const c = async () => {
|
|
2327
|
+
const b = e.userId.get();
|
|
2328
|
+
if (!b) {
|
|
2277
2329
|
u.set(re.Unset);
|
|
2278
2330
|
return;
|
|
2279
2331
|
}
|
|
2280
2332
|
s.getOnboardingStatus({
|
|
2281
|
-
userId:
|
|
2333
|
+
userId: b,
|
|
2282
2334
|
organizationId: e.organizationId.get() || "",
|
|
2283
2335
|
eventId: e.slStreamId.get() || ""
|
|
2284
2336
|
}) === re.Completed && u.set(re.Completed);
|
|
@@ -2288,20 +2340,20 @@ const no = (t, e, r, o) => {
|
|
|
2288
2340
|
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed), F = !!t.featureSettings.get().inplayGame?.titleCard?.optIn;
|
|
2289
2341
|
E ? F ? u.set(re.Required) : u.set(re.Optional) : F ? u.set(re.Unavailable) : u.set(re.Disabled);
|
|
2290
2342
|
};
|
|
2291
|
-
return
|
|
2292
|
-
|
|
2293
|
-
}), e.moderation.subscribe((
|
|
2294
|
-
|
|
2343
|
+
return c(), e.userId.subscribe((b) => {
|
|
2344
|
+
b && c();
|
|
2345
|
+
}), e.moderation.subscribe((b) => {
|
|
2346
|
+
b.data && c();
|
|
2295
2347
|
}), { $store: u, submitInplay: async () => {
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2348
|
+
const b = e.slStreamId.get();
|
|
2349
|
+
b && (await to(r, b), u.set(re.Completed), s.saveOnboardingStatus({
|
|
2298
2350
|
organizationId: e.organizationId.get() || "",
|
|
2299
2351
|
userId: e.userId.get() || "",
|
|
2300
|
-
eventId:
|
|
2352
|
+
eventId: b
|
|
2301
2353
|
}, re.Completed));
|
|
2302
2354
|
} };
|
|
2303
|
-
},
|
|
2304
|
-
class
|
|
2355
|
+
}, ao = /* @__PURE__ */ new Set([Te.POLL, Te.PREDICTION, Te.TRIVIA]);
|
|
2356
|
+
class uo extends lr {
|
|
2305
2357
|
/** user statistics (leaderboard panel) */
|
|
2306
2358
|
userSummary;
|
|
2307
2359
|
/** feed list (pick history) */
|
|
@@ -2328,16 +2380,16 @@ class oo extends lr {
|
|
|
2328
2380
|
/** Browser cache */
|
|
2329
2381
|
storage;
|
|
2330
2382
|
constructor(e, r, o) {
|
|
2331
|
-
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(
|
|
2383
|
+
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(Ni(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.currentUserId = this.background.userId, this.openedUser = ne(void 0), this.leaderboardId = new de(ne(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = so(this, this.background, o.transport, o.notifications), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ue.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = oo(this.transport, this.background.slStreamId, this.background.userId), this.leaderboardList = no(this.transport, this.background.slStreamId), this.status.subscribe((s) => {
|
|
2332
2384
|
s === De.Ready ? this.connect(o.transport) : this.disconnect();
|
|
2333
2385
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2334
|
-
if (s && s.data && this.onboardingStatus.$store.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.status ===
|
|
2335
|
-
if (
|
|
2386
|
+
if (s && s.data && this.onboardingStatus.$store.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.status === We.ACTIVE) {
|
|
2387
|
+
if (ao.has(s.data.question.type))
|
|
2336
2388
|
this.notifications.add({
|
|
2337
2389
|
type: Le.QUESTION,
|
|
2338
2390
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2339
2391
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2340
|
-
autoHideDuration: 1e3 *
|
|
2392
|
+
autoHideDuration: 1e3 * 60,
|
|
2341
2393
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2342
2394
|
data: {
|
|
2343
2395
|
questionType: s.data.question.type,
|
|
@@ -2365,7 +2417,7 @@ class oo extends lr {
|
|
|
2365
2417
|
type: Le.QUESTION,
|
|
2366
2418
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2367
2419
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2368
|
-
autoHideDuration: 1e3 *
|
|
2420
|
+
autoHideDuration: 1e3 * 120,
|
|
2369
2421
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2370
2422
|
data: {
|
|
2371
2423
|
questionType: s.data.question.type,
|
|
@@ -2390,7 +2442,7 @@ class oo extends lr {
|
|
|
2390
2442
|
type: Le.QUESTION,
|
|
2391
2443
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2392
2444
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2393
|
-
autoHideDuration: 1e3 *
|
|
2445
|
+
autoHideDuration: 1e3 * 120,
|
|
2394
2446
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2395
2447
|
data: {
|
|
2396
2448
|
questionType: s.data.question.type,
|
|
@@ -2408,10 +2460,10 @@ class oo extends lr {
|
|
|
2408
2460
|
if (!o)
|
|
2409
2461
|
return;
|
|
2410
2462
|
const { status: s, type: u, id: l } = o;
|
|
2411
|
-
if (s ===
|
|
2412
|
-
const
|
|
2463
|
+
if (s === We.RESOLVED && u === Te.PREDICTION) {
|
|
2464
|
+
const c = this.background.getCurrentSessionId({
|
|
2413
2465
|
prefix: `notification-id:${l}`
|
|
2414
|
-
}), p = await sn(l, e),
|
|
2466
|
+
}), p = await sn(l, e), b = p?.answers.find(({ correct: m }) => m), g = p?.answers.find(({ youVoted: m }) => m);
|
|
2415
2467
|
if (!g)
|
|
2416
2468
|
return;
|
|
2417
2469
|
this.notifications.add({
|
|
@@ -2419,18 +2471,18 @@ class oo extends lr {
|
|
|
2419
2471
|
action: () => this.openQuestion(l),
|
|
2420
2472
|
close: () => this.closeQuestion(l),
|
|
2421
2473
|
autoHideDuration: 35e3,
|
|
2422
|
-
id:
|
|
2474
|
+
id: c,
|
|
2423
2475
|
data: {
|
|
2424
2476
|
questionType: Te.PREDICTION,
|
|
2425
2477
|
question: {
|
|
2426
|
-
title:
|
|
2478
|
+
title: b?.youVoted ? `Congratulations! You answered correctly! You won ${b.points} pts!` : `Better luck next time! Correct: ${b?.text}!`,
|
|
2427
2479
|
votedAnswer: {
|
|
2428
2480
|
title: g?.text,
|
|
2429
2481
|
points: g?.points
|
|
2430
2482
|
},
|
|
2431
|
-
correctAnswerTitle:
|
|
2432
|
-
correct:
|
|
2433
|
-
predictionResult: s ===
|
|
2483
|
+
correctAnswerTitle: b?.text,
|
|
2484
|
+
correct: b?.youVoted,
|
|
2485
|
+
predictionResult: s === We.RESOLVED
|
|
2434
2486
|
}
|
|
2435
2487
|
}
|
|
2436
2488
|
});
|
|
@@ -2446,10 +2498,10 @@ class oo extends lr {
|
|
|
2446
2498
|
this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
2447
2499
|
};
|
|
2448
2500
|
submitAnswer = async (e, r) => {
|
|
2449
|
-
await
|
|
2501
|
+
await eo(this.transport, { questionId: e, answerId: r }), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2450
2502
|
};
|
|
2451
2503
|
skipQuestion = async (e) => {
|
|
2452
|
-
await
|
|
2504
|
+
await ro(this.transport, e), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2453
2505
|
};
|
|
2454
2506
|
openQuestion = (e) => (this.openFeature(), this.background.openQuestion(e));
|
|
2455
2507
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
@@ -2461,7 +2513,7 @@ class oo extends lr {
|
|
|
2461
2513
|
this.openedUser.set(void 0);
|
|
2462
2514
|
};
|
|
2463
2515
|
}
|
|
2464
|
-
class
|
|
2516
|
+
class co extends lr {
|
|
2465
2517
|
insights;
|
|
2466
2518
|
closeFeature;
|
|
2467
2519
|
openFeature;
|
|
@@ -2473,7 +2525,7 @@ class so extends lr {
|
|
|
2473
2525
|
super(e, r), this.background = an(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ue.HIGHLIGHTS), this.status.subscribe((s) => {
|
|
2474
2526
|
s === De.Ready ? this.connect() : this.disconnect();
|
|
2475
2527
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2476
|
-
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Te.FACTOID && s.data.question.status ===
|
|
2528
|
+
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Te.FACTOID && s.data.question.status === We.ACTIVE && this.notifications.add({
|
|
2477
2529
|
type: Le.QUESTION,
|
|
2478
2530
|
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2479
2531
|
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
@@ -2489,7 +2541,7 @@ class so extends lr {
|
|
|
2489
2541
|
}), this.openedInsight = this.background.openedQuestion;
|
|
2490
2542
|
}
|
|
2491
2543
|
connect = () => {
|
|
2492
|
-
this.insights ? this.insights.invalidate() : this.insights = new pe(
|
|
2544
|
+
this.insights ? this.insights.invalidate() : this.insights = new pe(qi(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
|
|
2493
2545
|
window.requestAnimationFrame(() => {
|
|
2494
2546
|
this.insights?.invalidate();
|
|
2495
2547
|
});
|
|
@@ -2502,18 +2554,18 @@ class so extends lr {
|
|
|
2502
2554
|
closeHighlight = (e) => this.background.closeQuestion(e);
|
|
2503
2555
|
}
|
|
2504
2556
|
ue.GAMES + "", ue.HIGHLIGHTS + "";
|
|
2505
|
-
class
|
|
2557
|
+
class fo extends lr {
|
|
2506
2558
|
constructor(e, r) {
|
|
2507
2559
|
super(e, r);
|
|
2508
2560
|
}
|
|
2509
2561
|
}
|
|
2510
|
-
const
|
|
2562
|
+
const lo = (t, e, r) => t.type === ue.GAMES ? new uo(t, e, r) : t.type === ue.HIGHLIGHTS ? new co(t, e, r) : new fo(t, e), ho = (t, e, r) => {
|
|
2511
2563
|
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new de(ne(ue.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (o) => t.features.get(o), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (o) => {
|
|
2512
2564
|
t.activeFeature.setValue(o);
|
|
2513
2565
|
}, t.sdk.closeFeature = () => {
|
|
2514
2566
|
t.activeFeature.setValue(ue.UNSET);
|
|
2515
2567
|
}, t.initFeature = (o, s = Ie.ORGANIZATION) => {
|
|
2516
|
-
const u =
|
|
2568
|
+
const u = lo(o, s, t);
|
|
2517
2569
|
t.features.set(o.type, u);
|
|
2518
2570
|
}, t.updateFeature = (o, s) => {
|
|
2519
2571
|
t.features.get(o.type)?.update(o, s);
|
|
@@ -2530,8 +2582,8 @@ const uo = (t, e, r) => t.type === ue.GAMES ? new oo(t, e, r) : t.type === ue.HI
|
|
|
2530
2582
|
const o = (u, l) => {
|
|
2531
2583
|
if (l?.overlays) {
|
|
2532
2584
|
u === Ie.STREAM && t.features.clear();
|
|
2533
|
-
for (const
|
|
2534
|
-
|
|
2585
|
+
for (const c of l.overlays)
|
|
2586
|
+
c.sdkEnable === !0 && (t.features.has(c.type) ? t.updateFeature(c, u) : t.initFeature(c, u));
|
|
2535
2587
|
}
|
|
2536
2588
|
}, s = {
|
|
2537
2589
|
/**
|
|
@@ -2564,7 +2616,7 @@ const uo = (t, e, r) => t.type === ue.GAMES ? new oo(t, e, r) : t.type === ue.HI
|
|
|
2564
2616
|
}, r();
|
|
2565
2617
|
};
|
|
2566
2618
|
var yr = { exports: {} }, gr = { exports: {} };
|
|
2567
|
-
function
|
|
2619
|
+
function po(t) {
|
|
2568
2620
|
var e = new t(), r = e;
|
|
2569
2621
|
function o() {
|
|
2570
2622
|
var u = e;
|
|
@@ -2578,18 +2630,18 @@ function fo(t) {
|
|
|
2578
2630
|
release: s
|
|
2579
2631
|
};
|
|
2580
2632
|
}
|
|
2581
|
-
var
|
|
2633
|
+
var yo = po, go = yo;
|
|
2582
2634
|
function cn(t, e, r) {
|
|
2583
2635
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2584
2636
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2585
|
-
var o =
|
|
2637
|
+
var o = go(mo), s = null, u = null, l = 0, c = null, p = {
|
|
2586
2638
|
push: P,
|
|
2587
2639
|
drain: ae,
|
|
2588
2640
|
saturated: ae,
|
|
2589
2641
|
pause: g,
|
|
2590
2642
|
paused: !1,
|
|
2591
2643
|
concurrency: r,
|
|
2592
|
-
running:
|
|
2644
|
+
running: b,
|
|
2593
2645
|
resume: F,
|
|
2594
2646
|
idle: L,
|
|
2595
2647
|
length: m,
|
|
@@ -2601,7 +2653,7 @@ function cn(t, e, r) {
|
|
|
2601
2653
|
error: U
|
|
2602
2654
|
};
|
|
2603
2655
|
return p;
|
|
2604
|
-
function
|
|
2656
|
+
function b() {
|
|
2605
2657
|
return l;
|
|
2606
2658
|
}
|
|
2607
2659
|
function g() {
|
|
@@ -2629,7 +2681,7 @@ function cn(t, e, r) {
|
|
|
2629
2681
|
}
|
|
2630
2682
|
function P(T, x) {
|
|
2631
2683
|
var k = o.get();
|
|
2632
|
-
k.context = t, k.release = I, k.value = T, k.callback = x || ae, k.errorHandler =
|
|
2684
|
+
k.context = t, k.release = I, k.value = T, k.callback = x || ae, k.errorHandler = c, l === p.concurrency || p.paused ? u ? (u.next = k, u = k) : (s = k, u = k, p.saturated()) : (l++, e.call(t, k.value, k.worked));
|
|
2633
2685
|
}
|
|
2634
2686
|
function K(T, x) {
|
|
2635
2687
|
var k = o.get();
|
|
@@ -2647,12 +2699,12 @@ function cn(t, e, r) {
|
|
|
2647
2699
|
s = null, u = null, p.drain(), p.drain = ae;
|
|
2648
2700
|
}
|
|
2649
2701
|
function U(T) {
|
|
2650
|
-
|
|
2702
|
+
c = T;
|
|
2651
2703
|
}
|
|
2652
2704
|
}
|
|
2653
2705
|
function ae() {
|
|
2654
2706
|
}
|
|
2655
|
-
function
|
|
2707
|
+
function mo() {
|
|
2656
2708
|
this.value = null, this.callback = ae, this.next = null, this.release = ae, this.context = null, this.errorHandler = null;
|
|
2657
2709
|
var t = this;
|
|
2658
2710
|
this.worked = function(r, o) {
|
|
@@ -2660,7 +2712,7 @@ function po() {
|
|
|
2660
2712
|
t.value = null, t.callback = ae, t.errorHandler && u(r, l), s.call(t.context, r, o), t.release(t);
|
|
2661
2713
|
};
|
|
2662
2714
|
}
|
|
2663
|
-
function
|
|
2715
|
+
function wo(t, e, r) {
|
|
2664
2716
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2665
2717
|
function o(g, m) {
|
|
2666
2718
|
e.call(this, g).then(function(E) {
|
|
@@ -2668,8 +2720,8 @@ function yo(t, e, r) {
|
|
|
2668
2720
|
}, m);
|
|
2669
2721
|
}
|
|
2670
2722
|
var s = cn(t, o, r), u = s.push, l = s.unshift;
|
|
2671
|
-
return s.push =
|
|
2672
|
-
function
|
|
2723
|
+
return s.push = c, s.unshift = p, s.drained = b, s;
|
|
2724
|
+
function c(g) {
|
|
2673
2725
|
var m = new Promise(function(E, F) {
|
|
2674
2726
|
u(g, function(L, P) {
|
|
2675
2727
|
if (L) {
|
|
@@ -2693,7 +2745,7 @@ function yo(t, e, r) {
|
|
|
2693
2745
|
});
|
|
2694
2746
|
return m.catch(ae), m;
|
|
2695
2747
|
}
|
|
2696
|
-
function
|
|
2748
|
+
function b() {
|
|
2697
2749
|
if (s.idle())
|
|
2698
2750
|
return new Promise(function(E) {
|
|
2699
2751
|
E();
|
|
@@ -2707,16 +2759,16 @@ function yo(t, e, r) {
|
|
|
2707
2759
|
}
|
|
2708
2760
|
}
|
|
2709
2761
|
gr.exports = cn;
|
|
2710
|
-
gr.exports.promise =
|
|
2711
|
-
var fn = gr.exports, mr = { exports: {} },
|
|
2762
|
+
gr.exports.promise = wo;
|
|
2763
|
+
var fn = gr.exports, mr = { exports: {} }, Ye = typeof Reflect == "object" ? Reflect : null, Tr = Ye && typeof Ye.apply == "function" ? Ye.apply : function(e, r, o) {
|
|
2712
2764
|
return Function.prototype.apply.call(e, r, o);
|
|
2713
2765
|
}, gt;
|
|
2714
|
-
|
|
2766
|
+
Ye && typeof Ye.ownKeys == "function" ? gt = Ye.ownKeys : Object.getOwnPropertySymbols ? gt = function(e) {
|
|
2715
2767
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2716
2768
|
} : gt = function(e) {
|
|
2717
2769
|
return Object.getOwnPropertyNames(e);
|
|
2718
2770
|
};
|
|
2719
|
-
function
|
|
2771
|
+
function bo(t) {
|
|
2720
2772
|
console && console.warn && console.warn(t);
|
|
2721
2773
|
}
|
|
2722
2774
|
var ln = Number.isNaN || function(e) {
|
|
@@ -2726,7 +2778,7 @@ function q() {
|
|
|
2726
2778
|
q.init.call(this);
|
|
2727
2779
|
}
|
|
2728
2780
|
mr.exports = q;
|
|
2729
|
-
mr.exports.once =
|
|
2781
|
+
mr.exports.once = Eo;
|
|
2730
2782
|
q.EventEmitter = q;
|
|
2731
2783
|
q.prototype._events = void 0;
|
|
2732
2784
|
q.prototype._eventsCount = 0;
|
|
@@ -2773,8 +2825,8 @@ q.prototype.emit = function(e) {
|
|
|
2773
2825
|
var l;
|
|
2774
2826
|
if (r.length > 0 && (l = r[0]), l instanceof Error)
|
|
2775
2827
|
throw l;
|
|
2776
|
-
var
|
|
2777
|
-
throw
|
|
2828
|
+
var c = new Error("Unhandled error." + (l ? " (" + l.message + ")" : ""));
|
|
2829
|
+
throw c.context = l, c;
|
|
2778
2830
|
}
|
|
2779
2831
|
var p = u[e];
|
|
2780
2832
|
if (p === void 0)
|
|
@@ -2782,7 +2834,7 @@ q.prototype.emit = function(e) {
|
|
|
2782
2834
|
if (typeof p == "function")
|
|
2783
2835
|
Tr(p, this, r);
|
|
2784
2836
|
else
|
|
2785
|
-
for (var
|
|
2837
|
+
for (var b = p.length, g = mn(p, b), o = 0; o < b; ++o)
|
|
2786
2838
|
Tr(g[o], this, r);
|
|
2787
2839
|
return !0;
|
|
2788
2840
|
};
|
|
@@ -2796,8 +2848,8 @@ function pn(t, e, r, o) {
|
|
|
2796
2848
|
l = u[e] = r, ++t._eventsCount;
|
|
2797
2849
|
else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = hn(t), s > 0 && l.length > s && !l.warned) {
|
|
2798
2850
|
l.warned = !0;
|
|
2799
|
-
var
|
|
2800
|
-
|
|
2851
|
+
var c = new Error("Possible EventEmitter memory leak detected. " + l.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2852
|
+
c.name = "MaxListenersExceededWarning", c.emitter = t, c.type = e, c.count = l.length, bo(c);
|
|
2801
2853
|
}
|
|
2802
2854
|
return t;
|
|
2803
2855
|
}
|
|
@@ -2808,12 +2860,12 @@ q.prototype.on = q.prototype.addListener;
|
|
|
2808
2860
|
q.prototype.prependListener = function(e, r) {
|
|
2809
2861
|
return pn(this, e, r, !0);
|
|
2810
2862
|
};
|
|
2811
|
-
function
|
|
2863
|
+
function vo() {
|
|
2812
2864
|
if (!this.fired)
|
|
2813
2865
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
2814
2866
|
}
|
|
2815
2867
|
function dn(t, e, r) {
|
|
2816
|
-
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
2868
|
+
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = vo.bind(o);
|
|
2817
2869
|
return s.listener = r, o.wrapFn = s, s;
|
|
2818
2870
|
}
|
|
2819
2871
|
q.prototype.once = function(e, r) {
|
|
@@ -2823,7 +2875,7 @@ q.prototype.prependOnceListener = function(e, r) {
|
|
|
2823
2875
|
return Bt(r), this.prependListener(e, dn(this, e, r)), this;
|
|
2824
2876
|
};
|
|
2825
2877
|
q.prototype.removeListener = function(e, r) {
|
|
2826
|
-
var o, s, u, l,
|
|
2878
|
+
var o, s, u, l, c;
|
|
2827
2879
|
if (Bt(r), s = this._events, s === void 0)
|
|
2828
2880
|
return this;
|
|
2829
2881
|
if (o = s[e], o === void 0)
|
|
@@ -2833,12 +2885,12 @@ q.prototype.removeListener = function(e, r) {
|
|
|
2833
2885
|
else if (typeof o != "function") {
|
|
2834
2886
|
for (u = -1, l = o.length - 1; l >= 0; l--)
|
|
2835
2887
|
if (o[l] === r || o[l].listener === r) {
|
|
2836
|
-
|
|
2888
|
+
c = o[l].listener, u = l;
|
|
2837
2889
|
break;
|
|
2838
2890
|
}
|
|
2839
2891
|
if (u < 0)
|
|
2840
2892
|
return this;
|
|
2841
|
-
u === 0 ? o.shift() :
|
|
2893
|
+
u === 0 ? o.shift() : So(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, c || r);
|
|
2842
2894
|
}
|
|
2843
2895
|
return this;
|
|
2844
2896
|
};
|
|
@@ -2867,7 +2919,7 @@ function yn(t, e, r) {
|
|
|
2867
2919
|
if (o === void 0)
|
|
2868
2920
|
return [];
|
|
2869
2921
|
var s = o[e];
|
|
2870
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
2922
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? Ao(s) : mn(s, s.length);
|
|
2871
2923
|
}
|
|
2872
2924
|
q.prototype.listeners = function(e) {
|
|
2873
2925
|
return yn(this, e, !0);
|
|
@@ -2898,17 +2950,17 @@ function mn(t, e) {
|
|
|
2898
2950
|
r[o] = t[o];
|
|
2899
2951
|
return r;
|
|
2900
2952
|
}
|
|
2901
|
-
function
|
|
2953
|
+
function So(t, e) {
|
|
2902
2954
|
for (; e + 1 < t.length; e++)
|
|
2903
2955
|
t[e] = t[e + 1];
|
|
2904
2956
|
t.pop();
|
|
2905
2957
|
}
|
|
2906
|
-
function
|
|
2958
|
+
function Ao(t) {
|
|
2907
2959
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2908
2960
|
e[r] = t[r].listener || t[r];
|
|
2909
2961
|
return e;
|
|
2910
2962
|
}
|
|
2911
|
-
function
|
|
2963
|
+
function Eo(t, e) {
|
|
2912
2964
|
return new Promise(function(r, o) {
|
|
2913
2965
|
function s(l) {
|
|
2914
2966
|
t.removeListener(e, u), o(l);
|
|
@@ -2916,13 +2968,13 @@ function vo(t, e) {
|
|
|
2916
2968
|
function u() {
|
|
2917
2969
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
2918
2970
|
}
|
|
2919
|
-
|
|
2971
|
+
wn(t, e, u, { once: !0 }), e !== "error" && Io(t, s, { once: !0 });
|
|
2920
2972
|
});
|
|
2921
2973
|
}
|
|
2922
|
-
function
|
|
2923
|
-
typeof t.on == "function" &&
|
|
2974
|
+
function Io(t, e, r) {
|
|
2975
|
+
typeof t.on == "function" && wn(t, "error", e, r);
|
|
2924
2976
|
}
|
|
2925
|
-
function
|
|
2977
|
+
function wn(t, e, r, o) {
|
|
2926
2978
|
if (typeof t.on == "function")
|
|
2927
2979
|
o.once ? t.once(e, r) : t.on(e, r);
|
|
2928
2980
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2932,7 +2984,7 @@ function bn(t, e, r, o) {
|
|
|
2932
2984
|
else
|
|
2933
2985
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2934
2986
|
}
|
|
2935
|
-
var
|
|
2987
|
+
var bn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
2936
2988
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2937
2989
|
return !1;
|
|
2938
2990
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2955,33 +3007,33 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2955
3007
|
return !1;
|
|
2956
3008
|
}
|
|
2957
3009
|
return !0;
|
|
2958
|
-
},
|
|
2959
|
-
return
|
|
2960
|
-
}, Cr = typeof Symbol < "u" && Symbol,
|
|
2961
|
-
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3010
|
+
}, Fo = Sn, wr = function() {
|
|
3011
|
+
return Fo() && !!Symbol.toStringTag;
|
|
3012
|
+
}, Cr = typeof Symbol < "u" && Symbol, To = Sn, _o = function() {
|
|
3013
|
+
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : To();
|
|
2962
3014
|
}, Or = {
|
|
2963
3015
|
foo: {}
|
|
2964
|
-
},
|
|
2965
|
-
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof
|
|
2966
|
-
},
|
|
3016
|
+
}, Co = Object, Oo = function() {
|
|
3017
|
+
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof Co);
|
|
3018
|
+
}, xo = "Function.prototype.bind called on incompatible ", Bo = Object.prototype.toString, ko = Math.max, Po = "[object Function]", xr = function(e, r) {
|
|
2967
3019
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2968
3020
|
o[s] = e[s];
|
|
2969
3021
|
for (var u = 0; u < r.length; u += 1)
|
|
2970
3022
|
o[u + e.length] = r[u];
|
|
2971
3023
|
return o;
|
|
2972
|
-
},
|
|
3024
|
+
}, Ro = function(e, r) {
|
|
2973
3025
|
for (var o = [], s = r || 0, u = 0; s < e.length; s += 1, u += 1)
|
|
2974
3026
|
o[u] = e[s];
|
|
2975
3027
|
return o;
|
|
2976
|
-
},
|
|
3028
|
+
}, Lo = function(t, e) {
|
|
2977
3029
|
for (var r = "", o = 0; o < t.length; o += 1)
|
|
2978
3030
|
r += t[o], o + 1 < t.length && (r += e);
|
|
2979
3031
|
return r;
|
|
2980
|
-
},
|
|
3032
|
+
}, No = function(e) {
|
|
2981
3033
|
var r = this;
|
|
2982
|
-
if (typeof r != "function" ||
|
|
2983
|
-
throw new TypeError(
|
|
2984
|
-
for (var o =
|
|
3034
|
+
if (typeof r != "function" || Bo.apply(r) !== Po)
|
|
3035
|
+
throw new TypeError(xo + r);
|
|
3036
|
+
for (var o = Ro(arguments, 1), s, u = function() {
|
|
2985
3037
|
if (this instanceof s) {
|
|
2986
3038
|
var g = r.apply(
|
|
2987
3039
|
this,
|
|
@@ -2993,17 +3045,17 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2993
3045
|
e,
|
|
2994
3046
|
xr(o, arguments)
|
|
2995
3047
|
);
|
|
2996
|
-
}, l =
|
|
2997
|
-
|
|
2998
|
-
if (s = Function("binder", "return function (" +
|
|
2999
|
-
var
|
|
3048
|
+
}, l = ko(0, r.length - o.length), c = [], p = 0; p < l; p++)
|
|
3049
|
+
c[p] = "$" + p;
|
|
3050
|
+
if (s = Function("binder", "return function (" + Lo(c, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
|
|
3051
|
+
var b = function() {
|
|
3000
3052
|
};
|
|
3001
|
-
|
|
3053
|
+
b.prototype = r.prototype, s.prototype = new b(), b.prototype = null;
|
|
3002
3054
|
}
|
|
3003
3055
|
return s;
|
|
3004
|
-
},
|
|
3056
|
+
}, Uo = No, An = Function.prototype.bind || Uo, Br = {}.hasOwnProperty, Ut = Function.prototype.call, $o = Ut.bind ? Ut.bind(Br) : function(t, e) {
|
|
3005
3057
|
return Ut.call(Br, t, e);
|
|
3006
|
-
}, $,
|
|
3058
|
+
}, $, Ze = SyntaxError, En = Function, Xe = TypeError, $t = function(t) {
|
|
3007
3059
|
try {
|
|
3008
3060
|
return En('"use strict"; return (' + t + ").constructor;")();
|
|
3009
3061
|
} catch {
|
|
@@ -3016,8 +3068,8 @@ if (je)
|
|
|
3016
3068
|
je = null;
|
|
3017
3069
|
}
|
|
3018
3070
|
var Dt = function() {
|
|
3019
|
-
throw new
|
|
3020
|
-
},
|
|
3071
|
+
throw new Xe();
|
|
3072
|
+
}, Do = je ? function() {
|
|
3021
3073
|
try {
|
|
3022
3074
|
return arguments.callee, Dt;
|
|
3023
3075
|
} catch {
|
|
@@ -3027,9 +3079,9 @@ var Dt = function() {
|
|
|
3027
3079
|
return Dt;
|
|
3028
3080
|
}
|
|
3029
3081
|
}
|
|
3030
|
-
}() : Dt, Qe =
|
|
3082
|
+
}() : Dt, Qe = _o(), jo = Oo(), X = Object.getPrototypeOf || (jo ? function(t) {
|
|
3031
3083
|
return t.__proto__;
|
|
3032
|
-
} : null), ze = {},
|
|
3084
|
+
} : null), ze = {}, Vo = typeof Uint8Array > "u" || !X ? $ : X(Uint8Array), Ve = {
|
|
3033
3085
|
"%AggregateError%": typeof AggregateError > "u" ? $ : AggregateError,
|
|
3034
3086
|
"%Array%": Array,
|
|
3035
3087
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? $ : ArrayBuffer,
|
|
@@ -3085,10 +3137,10 @@ var Dt = function() {
|
|
|
3085
3137
|
"%String%": String,
|
|
3086
3138
|
"%StringIteratorPrototype%": Qe && X ? X(""[Symbol.iterator]()) : $,
|
|
3087
3139
|
"%Symbol%": Qe ? Symbol : $,
|
|
3088
|
-
"%SyntaxError%":
|
|
3089
|
-
"%ThrowTypeError%":
|
|
3090
|
-
"%TypedArray%":
|
|
3091
|
-
"%TypeError%":
|
|
3140
|
+
"%SyntaxError%": Ze,
|
|
3141
|
+
"%ThrowTypeError%": Do,
|
|
3142
|
+
"%TypedArray%": Vo,
|
|
3143
|
+
"%TypeError%": Xe,
|
|
3092
3144
|
"%Uint8Array%": typeof Uint8Array > "u" ? $ : Uint8Array,
|
|
3093
3145
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? $ : Uint8ClampedArray,
|
|
3094
3146
|
"%Uint16Array%": typeof Uint16Array > "u" ? $ : Uint16Array,
|
|
@@ -3102,10 +3154,10 @@ if (X)
|
|
|
3102
3154
|
try {
|
|
3103
3155
|
null.error;
|
|
3104
3156
|
} catch (t) {
|
|
3105
|
-
var
|
|
3106
|
-
Ve["%Error.prototype%"] =
|
|
3157
|
+
var Mo = X(X(t));
|
|
3158
|
+
Ve["%Error.prototype%"] = Mo;
|
|
3107
3159
|
}
|
|
3108
|
-
var
|
|
3160
|
+
var qo = function t(e) {
|
|
3109
3161
|
var r;
|
|
3110
3162
|
if (e === "%AsyncFunction%")
|
|
3111
3163
|
r = $t("async function () {}");
|
|
@@ -3173,60 +3225,60 @@ var jo = function t(e) {
|
|
|
3173
3225
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3174
3226
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3175
3227
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3176
|
-
},
|
|
3228
|
+
}, ht = An, Et = $o, Qo = ht.call(Function.call, Array.prototype.concat), Go = ht.call(Function.apply, Array.prototype.splice), Pr = ht.call(Function.call, String.prototype.replace), It = ht.call(Function.call, String.prototype.slice), zo = ht.call(Function.call, RegExp.prototype.exec), Ko = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Ho = /\\(\\)?/g, Wo = function(e) {
|
|
3177
3229
|
var r = It(e, 0, 1), o = It(e, -1);
|
|
3178
3230
|
if (r === "%" && o !== "%")
|
|
3179
|
-
throw new
|
|
3231
|
+
throw new Ze("invalid intrinsic syntax, expected closing `%`");
|
|
3180
3232
|
if (o === "%" && r !== "%")
|
|
3181
|
-
throw new
|
|
3233
|
+
throw new Ze("invalid intrinsic syntax, expected opening `%`");
|
|
3182
3234
|
var s = [];
|
|
3183
|
-
return Pr(e,
|
|
3184
|
-
s[s.length] =
|
|
3235
|
+
return Pr(e, Ko, function(u, l, c, p) {
|
|
3236
|
+
s[s.length] = c ? Pr(p, Ho, "$1") : l || u;
|
|
3185
3237
|
}), s;
|
|
3186
|
-
},
|
|
3238
|
+
}, Jo = function(e, r) {
|
|
3187
3239
|
var o = e, s;
|
|
3188
3240
|
if (Et(kr, o) && (s = kr[o], o = "%" + s[0] + "%"), Et(Ve, o)) {
|
|
3189
3241
|
var u = Ve[o];
|
|
3190
|
-
if (u === ze && (u =
|
|
3191
|
-
throw new
|
|
3242
|
+
if (u === ze && (u = qo(o)), typeof u > "u" && !r)
|
|
3243
|
+
throw new Xe("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3192
3244
|
return {
|
|
3193
3245
|
alias: s,
|
|
3194
3246
|
name: o,
|
|
3195
3247
|
value: u
|
|
3196
3248
|
};
|
|
3197
3249
|
}
|
|
3198
|
-
throw new
|
|
3199
|
-
},
|
|
3250
|
+
throw new Ze("intrinsic " + e + " does not exist!");
|
|
3251
|
+
}, tt = function(e, r) {
|
|
3200
3252
|
if (typeof e != "string" || e.length === 0)
|
|
3201
|
-
throw new
|
|
3253
|
+
throw new Xe("intrinsic name must be a non-empty string");
|
|
3202
3254
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3203
|
-
throw new
|
|
3204
|
-
if (
|
|
3205
|
-
throw new
|
|
3206
|
-
var o =
|
|
3207
|
-
|
|
3255
|
+
throw new Xe('"allowMissing" argument must be a boolean');
|
|
3256
|
+
if (zo(/^%?[^%]*%?$/, e) === null)
|
|
3257
|
+
throw new Ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3258
|
+
var o = Wo(e), s = o.length > 0 ? o[0] : "", u = Jo("%" + s + "%", r), l = u.name, c = u.value, p = !1, b = u.alias;
|
|
3259
|
+
b && (s = b[0], Go(o, Qo([0, 1], b)));
|
|
3208
3260
|
for (var g = 1, m = !0; g < o.length; g += 1) {
|
|
3209
3261
|
var E = o[g], F = It(E, 0, 1), L = It(E, -1);
|
|
3210
3262
|
if ((F === '"' || F === "'" || F === "`" || L === '"' || L === "'" || L === "`") && F !== L)
|
|
3211
|
-
throw new
|
|
3263
|
+
throw new Ze("property names with quotes must have matching quotes");
|
|
3212
3264
|
if ((E === "constructor" || !m) && (p = !0), s += "." + E, l = "%" + s + "%", Et(Ve, l))
|
|
3213
|
-
|
|
3214
|
-
else if (
|
|
3215
|
-
if (!(E in
|
|
3265
|
+
c = Ve[l];
|
|
3266
|
+
else if (c != null) {
|
|
3267
|
+
if (!(E in c)) {
|
|
3216
3268
|
if (!r)
|
|
3217
|
-
throw new
|
|
3269
|
+
throw new Xe("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3218
3270
|
return;
|
|
3219
3271
|
}
|
|
3220
3272
|
if (je && g + 1 >= o.length) {
|
|
3221
|
-
var P = je(
|
|
3222
|
-
m = !!P, m && "get" in P && !("originalValue" in P.get) ?
|
|
3273
|
+
var P = je(c, E);
|
|
3274
|
+
m = !!P, m && "get" in P && !("originalValue" in P.get) ? c = P.get : c = c[E];
|
|
3223
3275
|
} else
|
|
3224
|
-
m = Et(
|
|
3225
|
-
m && !p && (Ve[l] =
|
|
3276
|
+
m = Et(c, E), c = c[E];
|
|
3277
|
+
m && !p && (Ve[l] = c);
|
|
3226
3278
|
}
|
|
3227
3279
|
}
|
|
3228
|
-
return
|
|
3229
|
-
}, In = { exports: {} },
|
|
3280
|
+
return c;
|
|
3281
|
+
}, In = { exports: {} }, Yo = tt, er = Yo("%Object.defineProperty%", !0), tr = function() {
|
|
3230
3282
|
if (er)
|
|
3231
3283
|
try {
|
|
3232
3284
|
return er({}, "a", { value: 1 }), !0;
|
|
@@ -3244,21 +3296,21 @@ tr.hasArrayLengthDefineBug = function() {
|
|
|
3244
3296
|
return !0;
|
|
3245
3297
|
}
|
|
3246
3298
|
};
|
|
3247
|
-
var Fn = tr,
|
|
3299
|
+
var Fn = tr, Xo = tt, mt = Xo("%Object.getOwnPropertyDescriptor%", !0);
|
|
3248
3300
|
if (mt)
|
|
3249
3301
|
try {
|
|
3250
3302
|
mt([], "length");
|
|
3251
3303
|
} catch {
|
|
3252
3304
|
mt = null;
|
|
3253
3305
|
}
|
|
3254
|
-
var
|
|
3255
|
-
if (
|
|
3306
|
+
var br = mt, Zo = Fn(), vr = tt, ct = Zo && vr("%Object.defineProperty%", !0);
|
|
3307
|
+
if (ct)
|
|
3256
3308
|
try {
|
|
3257
|
-
|
|
3309
|
+
ct({}, "a", { value: 1 });
|
|
3258
3310
|
} catch {
|
|
3259
|
-
|
|
3311
|
+
ct = !1;
|
|
3260
3312
|
}
|
|
3261
|
-
var
|
|
3313
|
+
var es = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = br, ts = function(e, r, o) {
|
|
3262
3314
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3263
3315
|
throw new Ge("`obj` must be an object or a function`");
|
|
3264
3316
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3271,32 +3323,32 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3271
3323
|
throw new Ge("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3272
3324
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3273
3325
|
throw new Ge("`loose`, if provided, must be a boolean");
|
|
3274
|
-
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null,
|
|
3275
|
-
if (
|
|
3276
|
-
|
|
3326
|
+
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, c = arguments.length > 6 ? arguments[6] : !1, p = !!Rr && Rr(e, r);
|
|
3327
|
+
if (ct)
|
|
3328
|
+
ct(e, r, {
|
|
3277
3329
|
configurable: l === null && p ? p.configurable : !l,
|
|
3278
3330
|
enumerable: s === null && p ? p.enumerable : !s,
|
|
3279
3331
|
value: o,
|
|
3280
3332
|
writable: u === null && p ? p.writable : !u
|
|
3281
3333
|
});
|
|
3282
|
-
else if (
|
|
3334
|
+
else if (c || !s && !u && !l)
|
|
3283
3335
|
e[r] = o;
|
|
3284
3336
|
else
|
|
3285
|
-
throw new
|
|
3286
|
-
}, Tn =
|
|
3337
|
+
throw new es("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3338
|
+
}, Tn = tt, Lr = ts, rs = Fn(), Nr = br, Ur = Tn("%TypeError%"), ns = Tn("%Math.floor%"), is = function(e, r) {
|
|
3287
3339
|
if (typeof e != "function")
|
|
3288
3340
|
throw new Ur("`fn` is not a function");
|
|
3289
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3341
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || ns(r) !== r)
|
|
3290
3342
|
throw new Ur("`length` must be a positive 32-bit integer");
|
|
3291
3343
|
var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
|
|
3292
3344
|
if ("length" in e && Nr) {
|
|
3293
3345
|
var l = Nr(e, "length");
|
|
3294
3346
|
l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
|
|
3295
3347
|
}
|
|
3296
|
-
return (s || u || !o) && (
|
|
3348
|
+
return (s || u || !o) && (rs ? Lr(e, "length", r, !0, !0) : Lr(e, "length", r)), e;
|
|
3297
3349
|
};
|
|
3298
3350
|
(function(t) {
|
|
3299
|
-
var e = An, r =
|
|
3351
|
+
var e = An, r = tt, o = is, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), c = r("%Reflect.apply%", !0) || e.call(l, u), p = r("%Object.defineProperty%", !0), b = r("%Math.max%");
|
|
3300
3352
|
if (p)
|
|
3301
3353
|
try {
|
|
3302
3354
|
p({}, "a", { value: 1 });
|
|
@@ -3306,71 +3358,71 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3306
3358
|
t.exports = function(E) {
|
|
3307
3359
|
if (typeof E != "function")
|
|
3308
3360
|
throw new s("a function is required");
|
|
3309
|
-
var F =
|
|
3361
|
+
var F = c(e, l, arguments);
|
|
3310
3362
|
return o(
|
|
3311
3363
|
F,
|
|
3312
|
-
1 +
|
|
3364
|
+
1 + b(0, E.length - (arguments.length - 1)),
|
|
3313
3365
|
!0
|
|
3314
3366
|
);
|
|
3315
3367
|
};
|
|
3316
3368
|
var g = function() {
|
|
3317
|
-
return
|
|
3369
|
+
return c(e, u, arguments);
|
|
3318
3370
|
};
|
|
3319
3371
|
p ? p(t.exports, "apply", { value: g }) : t.exports.apply = g;
|
|
3320
3372
|
})(In);
|
|
3321
|
-
var _n = In.exports, Cn =
|
|
3373
|
+
var _n = In.exports, Cn = tt, On = _n, os = On(Cn("String.prototype.indexOf")), xn = function(e, r) {
|
|
3322
3374
|
var o = Cn(e, !!r);
|
|
3323
|
-
return typeof o == "function" &&
|
|
3324
|
-
},
|
|
3325
|
-
return
|
|
3375
|
+
return typeof o == "function" && os(e, ".prototype.") > -1 ? On(o) : o;
|
|
3376
|
+
}, ss = wr(), as = xn, rr = as("Object.prototype.toString"), Pt = function(e) {
|
|
3377
|
+
return ss && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : rr(e) === "[object Arguments]";
|
|
3326
3378
|
}, Bn = function(e) {
|
|
3327
3379
|
return Pt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && rr(e) !== "[object Array]" && rr(e.callee) === "[object Function]";
|
|
3328
|
-
},
|
|
3380
|
+
}, us = function() {
|
|
3329
3381
|
return Pt(arguments);
|
|
3330
3382
|
}();
|
|
3331
3383
|
Pt.isLegacyArguments = Bn;
|
|
3332
|
-
var
|
|
3384
|
+
var cs = us ? Pt : Bn, fs = Object.prototype.toString, ls = Function.prototype.toString, hs = /^\s*(?:function)?\*/, kn = wr(), jt = Object.getPrototypeOf, ps = function() {
|
|
3333
3385
|
if (!kn)
|
|
3334
3386
|
return !1;
|
|
3335
3387
|
try {
|
|
3336
3388
|
return Function("return function*() {}")();
|
|
3337
3389
|
} catch {
|
|
3338
3390
|
}
|
|
3339
|
-
}, Vt,
|
|
3391
|
+
}, Vt, ds = function(e) {
|
|
3340
3392
|
if (typeof e != "function")
|
|
3341
3393
|
return !1;
|
|
3342
|
-
if (
|
|
3394
|
+
if (hs.test(ls.call(e)))
|
|
3343
3395
|
return !0;
|
|
3344
3396
|
if (!kn) {
|
|
3345
|
-
var r =
|
|
3397
|
+
var r = fs.call(e);
|
|
3346
3398
|
return r === "[object GeneratorFunction]";
|
|
3347
3399
|
}
|
|
3348
3400
|
if (!jt)
|
|
3349
3401
|
return !1;
|
|
3350
3402
|
if (typeof Vt > "u") {
|
|
3351
|
-
var o =
|
|
3403
|
+
var o = ps();
|
|
3352
3404
|
Vt = o ? jt(o) : !1;
|
|
3353
3405
|
}
|
|
3354
3406
|
return jt(e) === Vt;
|
|
3355
|
-
}, Pn = Function.prototype.toString, He = typeof Reflect == "object" && Reflect !== null && Reflect.apply, nr,
|
|
3407
|
+
}, Pn = Function.prototype.toString, He = typeof Reflect == "object" && Reflect !== null && Reflect.apply, nr, wt;
|
|
3356
3408
|
if (typeof He == "function" && typeof Object.defineProperty == "function")
|
|
3357
3409
|
try {
|
|
3358
3410
|
nr = Object.defineProperty({}, "length", {
|
|
3359
3411
|
get: function() {
|
|
3360
|
-
throw
|
|
3412
|
+
throw wt;
|
|
3361
3413
|
}
|
|
3362
|
-
}),
|
|
3414
|
+
}), wt = {}, He(function() {
|
|
3363
3415
|
throw 42;
|
|
3364
3416
|
}, null, nr);
|
|
3365
3417
|
} catch (t) {
|
|
3366
|
-
t !==
|
|
3418
|
+
t !== wt && (He = null);
|
|
3367
3419
|
}
|
|
3368
3420
|
else
|
|
3369
3421
|
He = null;
|
|
3370
|
-
var
|
|
3422
|
+
var ys = /^\s*class\b/, ir = function(e) {
|
|
3371
3423
|
try {
|
|
3372
3424
|
var r = Pn.call(e);
|
|
3373
|
-
return
|
|
3425
|
+
return ys.test(r);
|
|
3374
3426
|
} catch {
|
|
3375
3427
|
return !1;
|
|
3376
3428
|
}
|
|
@@ -3380,22 +3432,22 @@ var hs = /^\s*class\b/, ir = function(e) {
|
|
|
3380
3432
|
} catch {
|
|
3381
3433
|
return !1;
|
|
3382
3434
|
}
|
|
3383
|
-
},
|
|
3435
|
+
}, bt = Object.prototype.toString, gs = "[object Object]", ms = "[object Function]", ws = "[object GeneratorFunction]", bs = "[object HTMLAllCollection]", vs = "[object HTML document.all class]", Ss = "[object HTMLCollection]", As = typeof Symbol == "function" && !!Symbol.toStringTag, Es = !(0 in [,]), or = function() {
|
|
3384
3436
|
return !1;
|
|
3385
3437
|
};
|
|
3386
3438
|
if (typeof document == "object") {
|
|
3387
|
-
var
|
|
3388
|
-
|
|
3389
|
-
if ((
|
|
3439
|
+
var Is = document.all;
|
|
3440
|
+
bt.call(Is) === bt.call(document.all) && (or = function(e) {
|
|
3441
|
+
if ((Es || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3390
3442
|
try {
|
|
3391
|
-
var r =
|
|
3392
|
-
return (r ===
|
|
3443
|
+
var r = bt.call(e);
|
|
3444
|
+
return (r === bs || r === vs || r === Ss || r === gs) && e("") == null;
|
|
3393
3445
|
} catch {
|
|
3394
3446
|
}
|
|
3395
3447
|
return !1;
|
|
3396
3448
|
});
|
|
3397
3449
|
}
|
|
3398
|
-
var
|
|
3450
|
+
var Fs = He ? function(e) {
|
|
3399
3451
|
if (or(e))
|
|
3400
3452
|
return !0;
|
|
3401
3453
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3403,7 +3455,7 @@ var As = He ? function(e) {
|
|
|
3403
3455
|
try {
|
|
3404
3456
|
He(e, null, nr);
|
|
3405
3457
|
} catch (r) {
|
|
3406
|
-
if (r !==
|
|
3458
|
+
if (r !== wt)
|
|
3407
3459
|
return !1;
|
|
3408
3460
|
}
|
|
3409
3461
|
return !ir(e) && Mt(e);
|
|
@@ -3412,27 +3464,27 @@ var As = He ? function(e) {
|
|
|
3412
3464
|
return !0;
|
|
3413
3465
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3414
3466
|
return !1;
|
|
3415
|
-
if (
|
|
3467
|
+
if (As)
|
|
3416
3468
|
return Mt(e);
|
|
3417
3469
|
if (ir(e))
|
|
3418
3470
|
return !1;
|
|
3419
|
-
var r =
|
|
3420
|
-
return r !==
|
|
3421
|
-
},
|
|
3471
|
+
var r = bt.call(e);
|
|
3472
|
+
return r !== ms && r !== ws && !/^\[object HTML/.test(r) ? !1 : Mt(e);
|
|
3473
|
+
}, Ts = Fs, _s = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty, Cs = function(e, r, o) {
|
|
3422
3474
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3423
3475
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3424
|
-
},
|
|
3476
|
+
}, Os = function(e, r, o) {
|
|
3425
3477
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3426
3478
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3427
|
-
},
|
|
3479
|
+
}, xs = function(e, r, o) {
|
|
3428
3480
|
for (var s in e)
|
|
3429
3481
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3430
|
-
},
|
|
3431
|
-
if (!
|
|
3482
|
+
}, Bs = function(e, r, o) {
|
|
3483
|
+
if (!Ts(r))
|
|
3432
3484
|
throw new TypeError("iterator must be a function");
|
|
3433
3485
|
var s;
|
|
3434
|
-
arguments.length >= 3 && (s = o),
|
|
3435
|
-
},
|
|
3486
|
+
arguments.length >= 3 && (s = o), _s.call(e) === "[object Array]" ? Cs(e, r, s) : typeof e == "string" ? Os(e, r, s) : xs(e, r, s);
|
|
3487
|
+
}, ks = Bs, qt = [
|
|
3436
3488
|
"BigInt64Array",
|
|
3437
3489
|
"BigUint64Array",
|
|
3438
3490
|
"Float32Array",
|
|
@@ -3444,11 +3496,11 @@ var As = He ? function(e) {
|
|
|
3444
3496
|
"Uint32Array",
|
|
3445
3497
|
"Uint8Array",
|
|
3446
3498
|
"Uint8ClampedArray"
|
|
3447
|
-
],
|
|
3499
|
+
], Ps = typeof globalThis > "u" ? Yr : globalThis, Rs = function() {
|
|
3448
3500
|
for (var e = [], r = 0; r < qt.length; r++)
|
|
3449
|
-
typeof
|
|
3501
|
+
typeof Ps[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3450
3502
|
return e;
|
|
3451
|
-
}, Ft =
|
|
3503
|
+
}, Ft = ks, Ls = Rs, $r = _n, Sr = xn, vt = br, Ns = Sr("Object.prototype.toString"), Ln = wr(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = Ls(), Ar = Sr("String.prototype.slice"), Qt = Object.getPrototypeOf, Us = Sr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3452
3504
|
for (var o = 0; o < e.length; o += 1)
|
|
3453
3505
|
if (e[o] === r)
|
|
3454
3506
|
return o;
|
|
@@ -3468,7 +3520,7 @@ Ln && vt && Qt ? Ft(sr, function(t) {
|
|
|
3468
3520
|
var e = new Dr[t](), r = e.slice || e.set;
|
|
3469
3521
|
r && (Tt["$" + t] = $r(r));
|
|
3470
3522
|
});
|
|
3471
|
-
var
|
|
3523
|
+
var $s = function(e) {
|
|
3472
3524
|
var r = !1;
|
|
3473
3525
|
return Ft(Tt, function(o, s) {
|
|
3474
3526
|
if (!r)
|
|
@@ -3477,7 +3529,7 @@ var Ls = function(e) {
|
|
|
3477
3529
|
} catch {
|
|
3478
3530
|
}
|
|
3479
3531
|
}), r;
|
|
3480
|
-
},
|
|
3532
|
+
}, Ds = function(e) {
|
|
3481
3533
|
var r = !1;
|
|
3482
3534
|
return Ft(Tt, function(o, s) {
|
|
3483
3535
|
if (!r)
|
|
@@ -3490,28 +3542,28 @@ var Ls = function(e) {
|
|
|
3490
3542
|
if (!e || typeof e != "object")
|
|
3491
3543
|
return !1;
|
|
3492
3544
|
if (!Ln) {
|
|
3493
|
-
var r = Ar(
|
|
3494
|
-
return
|
|
3545
|
+
var r = Ar(Ns(e), 8, -1);
|
|
3546
|
+
return Us(sr, r) > -1 ? r : r !== "Object" ? !1 : Ds(e);
|
|
3495
3547
|
}
|
|
3496
|
-
return vt ?
|
|
3497
|
-
},
|
|
3498
|
-
return !!
|
|
3548
|
+
return vt ? $s(e) : null;
|
|
3549
|
+
}, js = Nn, Vs = function(e) {
|
|
3550
|
+
return !!js(e);
|
|
3499
3551
|
};
|
|
3500
3552
|
(function(t) {
|
|
3501
|
-
var e =
|
|
3553
|
+
var e = cs, r = ds, o = Nn, s = Vs;
|
|
3502
3554
|
function u(S) {
|
|
3503
3555
|
return S.call.bind(S);
|
|
3504
3556
|
}
|
|
3505
|
-
var l = typeof BigInt < "u",
|
|
3557
|
+
var l = typeof BigInt < "u", c = typeof Symbol < "u", p = u(Object.prototype.toString), b = u(Number.prototype.valueOf), g = u(String.prototype.valueOf), m = u(Boolean.prototype.valueOf);
|
|
3506
3558
|
if (l)
|
|
3507
3559
|
var E = u(BigInt.prototype.valueOf);
|
|
3508
|
-
if (
|
|
3560
|
+
if (c)
|
|
3509
3561
|
var F = u(Symbol.prototype.valueOf);
|
|
3510
|
-
function L(S,
|
|
3562
|
+
function L(S, dt) {
|
|
3511
3563
|
if (typeof S != "object")
|
|
3512
3564
|
return !1;
|
|
3513
3565
|
try {
|
|
3514
|
-
return
|
|
3566
|
+
return dt(S), !0;
|
|
3515
3567
|
} catch {
|
|
3516
3568
|
return !1;
|
|
3517
3569
|
}
|
|
@@ -3573,10 +3625,10 @@ var Ls = function(e) {
|
|
|
3573
3625
|
return p(S) === "[object Map]";
|
|
3574
3626
|
}
|
|
3575
3627
|
ce.working = typeof Map < "u" && ce(/* @__PURE__ */ new Map());
|
|
3576
|
-
function
|
|
3628
|
+
function nt(S) {
|
|
3577
3629
|
return typeof Map > "u" ? !1 : ce.working ? ce(S) : S instanceof Map;
|
|
3578
3630
|
}
|
|
3579
|
-
t.isMap =
|
|
3631
|
+
t.isMap = nt;
|
|
3580
3632
|
function fe(S) {
|
|
3581
3633
|
return p(S) === "[object Set]";
|
|
3582
3634
|
}
|
|
@@ -3589,10 +3641,10 @@ var Ls = function(e) {
|
|
|
3589
3641
|
return p(S) === "[object WeakMap]";
|
|
3590
3642
|
}
|
|
3591
3643
|
Be.working = typeof WeakMap < "u" && Be(/* @__PURE__ */ new WeakMap());
|
|
3592
|
-
function
|
|
3644
|
+
function it(S) {
|
|
3593
3645
|
return typeof WeakMap > "u" ? !1 : Be.working ? Be(S) : S instanceof WeakMap;
|
|
3594
3646
|
}
|
|
3595
|
-
t.isWeakMap =
|
|
3647
|
+
t.isWeakMap = it;
|
|
3596
3648
|
function ke(S) {
|
|
3597
3649
|
return p(S) === "[object WeakSet]";
|
|
3598
3650
|
}
|
|
@@ -3618,11 +3670,11 @@ var Ls = function(e) {
|
|
|
3618
3670
|
}
|
|
3619
3671
|
t.isDataView = v;
|
|
3620
3672
|
var A = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
3621
|
-
function
|
|
3673
|
+
function C(S) {
|
|
3622
3674
|
return p(S) === "[object SharedArrayBuffer]";
|
|
3623
3675
|
}
|
|
3624
3676
|
function j(S) {
|
|
3625
|
-
return typeof A > "u" ? !1 : (typeof
|
|
3677
|
+
return typeof A > "u" ? !1 : (typeof C.working > "u" && (C.working = C(new A())), C.working ? C(S) : S instanceof A);
|
|
3626
3678
|
}
|
|
3627
3679
|
t.isSharedArrayBuffer = j;
|
|
3628
3680
|
function V(S) {
|
|
@@ -3646,7 +3698,7 @@ var Ls = function(e) {
|
|
|
3646
3698
|
}
|
|
3647
3699
|
t.isWebAssemblyCompiledModule = te;
|
|
3648
3700
|
function ye(S) {
|
|
3649
|
-
return L(S,
|
|
3701
|
+
return L(S, b);
|
|
3650
3702
|
}
|
|
3651
3703
|
t.isNumberObject = ye;
|
|
3652
3704
|
function he(S) {
|
|
@@ -3661,14 +3713,14 @@ var Ls = function(e) {
|
|
|
3661
3713
|
return l && L(S, E);
|
|
3662
3714
|
}
|
|
3663
3715
|
t.isBigIntObject = Me;
|
|
3664
|
-
function
|
|
3665
|
-
return
|
|
3716
|
+
function pt(S) {
|
|
3717
|
+
return c && L(S, F);
|
|
3666
3718
|
}
|
|
3667
|
-
t.isSymbolObject =
|
|
3668
|
-
function
|
|
3669
|
-
return ye(S) || he(S) || oe(S) || Me(S) ||
|
|
3719
|
+
t.isSymbolObject = pt;
|
|
3720
|
+
function ot(S) {
|
|
3721
|
+
return ye(S) || he(S) || oe(S) || Me(S) || pt(S);
|
|
3670
3722
|
}
|
|
3671
|
-
t.isBoxedPrimitive =
|
|
3723
|
+
t.isBoxedPrimitive = ot;
|
|
3672
3724
|
function Rt(S) {
|
|
3673
3725
|
return typeof Uint8Array < "u" && (H(S) || j(S));
|
|
3674
3726
|
}
|
|
@@ -3681,7 +3733,7 @@ var Ls = function(e) {
|
|
|
3681
3733
|
});
|
|
3682
3734
|
});
|
|
3683
3735
|
})(vn);
|
|
3684
|
-
var
|
|
3736
|
+
var Ms = function(e) {
|
|
3685
3737
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3686
3738
|
}, ar = { exports: {} };
|
|
3687
3739
|
typeof Object.create == "function" ? ar.exports = function(e, r) {
|
|
@@ -3701,12 +3753,12 @@ typeof Object.create == "function" ? ar.exports = function(e, r) {
|
|
|
3701
3753
|
o.prototype = r.prototype, e.prototype = new o(), e.prototype.constructor = e;
|
|
3702
3754
|
}
|
|
3703
3755
|
};
|
|
3704
|
-
var
|
|
3756
|
+
var qs = ar.exports;
|
|
3705
3757
|
(function(t) {
|
|
3706
3758
|
var e = Object.getOwnPropertyDescriptors || function(v) {
|
|
3707
|
-
for (var A = Object.keys(v),
|
|
3708
|
-
|
|
3709
|
-
return
|
|
3759
|
+
for (var A = Object.keys(v), C = {}, j = 0; j < A.length; j++)
|
|
3760
|
+
C[A[j]] = Object.getOwnPropertyDescriptor(v, A[j]);
|
|
3761
|
+
return C;
|
|
3710
3762
|
}, r = /%[sdj%]/g;
|
|
3711
3763
|
t.format = function(d) {
|
|
3712
3764
|
if (!T(d)) {
|
|
@@ -3714,55 +3766,55 @@ var js = ar.exports;
|
|
|
3714
3766
|
v.push(l(arguments[A]));
|
|
3715
3767
|
return v.join(" ");
|
|
3716
3768
|
}
|
|
3717
|
-
for (var A = 1,
|
|
3769
|
+
for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(N) {
|
|
3718
3770
|
if (N === "%%")
|
|
3719
3771
|
return "%";
|
|
3720
3772
|
if (A >= j)
|
|
3721
3773
|
return N;
|
|
3722
3774
|
switch (N) {
|
|
3723
3775
|
case "%s":
|
|
3724
|
-
return String(
|
|
3776
|
+
return String(C[A++]);
|
|
3725
3777
|
case "%d":
|
|
3726
|
-
return Number(
|
|
3778
|
+
return Number(C[A++]);
|
|
3727
3779
|
case "%j":
|
|
3728
3780
|
try {
|
|
3729
|
-
return JSON.stringify(
|
|
3781
|
+
return JSON.stringify(C[A++]);
|
|
3730
3782
|
} catch {
|
|
3731
3783
|
return "[Circular]";
|
|
3732
3784
|
}
|
|
3733
3785
|
default:
|
|
3734
3786
|
return N;
|
|
3735
3787
|
}
|
|
3736
|
-
}), B =
|
|
3788
|
+
}), B = C[A]; A < j; B = C[++A])
|
|
3737
3789
|
_(B) || !ie(B) ? V += " " + B : V += " " + l(B);
|
|
3738
3790
|
return V;
|
|
3739
3791
|
}, t.deprecate = function(d, v) {
|
|
3740
|
-
if (typeof
|
|
3792
|
+
if (typeof O.process < "u" && O.process.noDeprecation === !0)
|
|
3741
3793
|
return d;
|
|
3742
|
-
if (typeof
|
|
3794
|
+
if (typeof O.process > "u")
|
|
3743
3795
|
return function() {
|
|
3744
3796
|
return t.deprecate(d, v).apply(this, arguments);
|
|
3745
3797
|
};
|
|
3746
3798
|
var A = !1;
|
|
3747
|
-
function
|
|
3799
|
+
function C() {
|
|
3748
3800
|
if (!A) {
|
|
3749
|
-
if (
|
|
3801
|
+
if (O.process.throwDeprecation)
|
|
3750
3802
|
throw new Error(v);
|
|
3751
|
-
|
|
3803
|
+
O.process.traceDeprecation ? console.trace(v) : console.error(v), A = !0;
|
|
3752
3804
|
}
|
|
3753
3805
|
return d.apply(this, arguments);
|
|
3754
3806
|
}
|
|
3755
|
-
return
|
|
3807
|
+
return C;
|
|
3756
3808
|
};
|
|
3757
3809
|
var o = {}, s = /^$/;
|
|
3758
|
-
if (
|
|
3759
|
-
var u =
|
|
3810
|
+
if (O.process.env.NODE_DEBUG) {
|
|
3811
|
+
var u = O.process.env.NODE_DEBUG;
|
|
3760
3812
|
u = u.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = new RegExp("^" + u + "$", "i");
|
|
3761
3813
|
}
|
|
3762
3814
|
t.debuglog = function(d) {
|
|
3763
3815
|
if (d = d.toUpperCase(), !o[d])
|
|
3764
3816
|
if (s.test(d)) {
|
|
3765
|
-
var v =
|
|
3817
|
+
var v = O.process.pid;
|
|
3766
3818
|
o[d] = function() {
|
|
3767
3819
|
var A = t.format.apply(t, arguments);
|
|
3768
3820
|
console.error("%s %d: %s", d, v, A);
|
|
@@ -3777,7 +3829,7 @@ var js = ar.exports;
|
|
|
3777
3829
|
seen: [],
|
|
3778
3830
|
stylize: p
|
|
3779
3831
|
};
|
|
3780
|
-
return arguments.length >= 3 && (A.depth = arguments[2]), arguments.length >= 4 && (A.colors = arguments[3]), I(v) ? A.showHidden = v : v && t._extend(A, v), k(A.showHidden) && (A.showHidden = !1), k(A.depth) && (A.depth = 2), k(A.colors) && (A.colors = !1), k(A.customInspect) && (A.customInspect = !0), A.colors && (A.stylize =
|
|
3832
|
+
return arguments.length >= 3 && (A.depth = arguments[2]), arguments.length >= 4 && (A.colors = arguments[3]), I(v) ? A.showHidden = v : v && t._extend(A, v), k(A.showHidden) && (A.showHidden = !1), k(A.depth) && (A.depth = 2), k(A.colors) && (A.colors = !1), k(A.customInspect) && (A.customInspect = !0), A.colors && (A.stylize = c), g(A, d, A.depth);
|
|
3781
3833
|
}
|
|
3782
3834
|
t.inspect = l, l.colors = {
|
|
3783
3835
|
bold: [1, 22],
|
|
@@ -3804,16 +3856,16 @@ var js = ar.exports;
|
|
|
3804
3856
|
// "name": intentionally not styling
|
|
3805
3857
|
regexp: "red"
|
|
3806
3858
|
};
|
|
3807
|
-
function
|
|
3859
|
+
function c(d, v) {
|
|
3808
3860
|
var A = l.styles[v];
|
|
3809
3861
|
return A ? "\x1B[" + l.colors[A][0] + "m" + d + "\x1B[" + l.colors[A][1] + "m" : d;
|
|
3810
3862
|
}
|
|
3811
3863
|
function p(d, v) {
|
|
3812
3864
|
return d;
|
|
3813
3865
|
}
|
|
3814
|
-
function
|
|
3866
|
+
function b(d) {
|
|
3815
3867
|
var v = {};
|
|
3816
|
-
return d.forEach(function(A,
|
|
3868
|
+
return d.forEach(function(A, C) {
|
|
3817
3869
|
v[A] = !0;
|
|
3818
3870
|
}), v;
|
|
3819
3871
|
}
|
|
@@ -3821,13 +3873,13 @@ var js = ar.exports;
|
|
|
3821
3873
|
if (d.customInspect && v && ce(v.inspect) && // Filter out the util module, it's inspect function is special
|
|
3822
3874
|
v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3823
3875
|
!(v.constructor && v.constructor.prototype === v)) {
|
|
3824
|
-
var
|
|
3825
|
-
return T(
|
|
3876
|
+
var C = v.inspect(A, d);
|
|
3877
|
+
return T(C) || (C = g(d, C, A)), C;
|
|
3826
3878
|
}
|
|
3827
3879
|
var j = m(d, v);
|
|
3828
3880
|
if (j)
|
|
3829
3881
|
return j;
|
|
3830
|
-
var V = Object.keys(v), B =
|
|
3882
|
+
var V = Object.keys(v), B = b(V);
|
|
3831
3883
|
if (d.showHidden && (V = Object.getOwnPropertyNames(v)), Se(v) && (V.indexOf("message") >= 0 || V.indexOf("description") >= 0))
|
|
3832
3884
|
return E(v);
|
|
3833
3885
|
if (V.length === 0) {
|
|
@@ -3874,13 +3926,13 @@ var js = ar.exports;
|
|
|
3874
3926
|
function E(d) {
|
|
3875
3927
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
3876
3928
|
}
|
|
3877
|
-
function F(d, v, A,
|
|
3929
|
+
function F(d, v, A, C, j) {
|
|
3878
3930
|
for (var V = [], B = 0, N = v.length; B < N; ++B)
|
|
3879
3931
|
ke(v, String(B)) ? V.push(L(
|
|
3880
3932
|
d,
|
|
3881
3933
|
v,
|
|
3882
3934
|
A,
|
|
3883
|
-
|
|
3935
|
+
C,
|
|
3884
3936
|
String(B),
|
|
3885
3937
|
!0
|
|
3886
3938
|
)) : V.push("");
|
|
@@ -3889,15 +3941,15 @@ var js = ar.exports;
|
|
|
3889
3941
|
d,
|
|
3890
3942
|
v,
|
|
3891
3943
|
A,
|
|
3892
|
-
|
|
3944
|
+
C,
|
|
3893
3945
|
M,
|
|
3894
3946
|
!0
|
|
3895
3947
|
));
|
|
3896
3948
|
}), V;
|
|
3897
3949
|
}
|
|
3898
|
-
function L(d, v, A,
|
|
3950
|
+
function L(d, v, A, C, j, V) {
|
|
3899
3951
|
var B, N, M;
|
|
3900
|
-
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? N = d.stylize("[Getter/Setter]", "special") : N = d.stylize("[Getter]", "special") : M.set && (N = d.stylize("[Setter]", "special")), ke(
|
|
3952
|
+
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? N = d.stylize("[Getter/Setter]", "special") : N = d.stylize("[Getter]", "special") : M.set && (N = d.stylize("[Setter]", "special")), ke(C, j) || (B = "[" + j + "]"), N || (d.seen.indexOf(M.value) < 0 ? (_(A) ? N = g(d, M.value, null) : N = g(d, M.value, A - 1), N.indexOf(`
|
|
3901
3953
|
`) > -1 && (V ? N = N.split(`
|
|
3902
3954
|
`).map(function(te) {
|
|
3903
3955
|
return " " + te;
|
|
@@ -3915,11 +3967,11 @@ var js = ar.exports;
|
|
|
3915
3967
|
return B + ": " + N;
|
|
3916
3968
|
}
|
|
3917
3969
|
function P(d, v, A) {
|
|
3918
|
-
var
|
|
3970
|
+
var C = d.reduce(function(j, V) {
|
|
3919
3971
|
return V.indexOf(`
|
|
3920
3972
|
`) >= 0, j + V.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3921
3973
|
}, 0);
|
|
3922
|
-
return
|
|
3974
|
+
return C > 60 ? A[0] + (v === "" ? "" : v + `
|
|
3923
3975
|
`) + " " + d.join(`,
|
|
3924
3976
|
`) + " " + A[1] : A[0] + v + " " + d.join(", ") + " " + A[1];
|
|
3925
3977
|
}
|
|
@@ -3976,11 +4028,11 @@ var js = ar.exports;
|
|
|
3976
4028
|
return typeof d == "function";
|
|
3977
4029
|
}
|
|
3978
4030
|
t.isFunction = ce;
|
|
3979
|
-
function
|
|
4031
|
+
function nt(d) {
|
|
3980
4032
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
3981
4033
|
typeof d > "u";
|
|
3982
4034
|
}
|
|
3983
|
-
t.isPrimitive =
|
|
4035
|
+
t.isPrimitive = nt, t.isBuffer = Ms;
|
|
3984
4036
|
function fe(d) {
|
|
3985
4037
|
return Object.prototype.toString.call(d);
|
|
3986
4038
|
}
|
|
@@ -4001,7 +4053,7 @@ var js = ar.exports;
|
|
|
4001
4053
|
"Nov",
|
|
4002
4054
|
"Dec"
|
|
4003
4055
|
];
|
|
4004
|
-
function
|
|
4056
|
+
function it() {
|
|
4005
4057
|
var d = /* @__PURE__ */ new Date(), v = [
|
|
4006
4058
|
xe(d.getHours()),
|
|
4007
4059
|
xe(d.getMinutes()),
|
|
@@ -4010,12 +4062,12 @@ var js = ar.exports;
|
|
|
4010
4062
|
return [d.getDate(), Be[d.getMonth()], v].join(" ");
|
|
4011
4063
|
}
|
|
4012
4064
|
t.log = function() {
|
|
4013
|
-
console.log("%s - %s",
|
|
4014
|
-
}, t.inherits =
|
|
4065
|
+
console.log("%s - %s", it(), t.format.apply(t, arguments));
|
|
4066
|
+
}, t.inherits = qs, t._extend = function(d, v) {
|
|
4015
4067
|
if (!v || !ie(v))
|
|
4016
4068
|
return d;
|
|
4017
|
-
for (var A = Object.keys(v),
|
|
4018
|
-
d[A[
|
|
4069
|
+
for (var A = Object.keys(v), C = A.length; C--; )
|
|
4070
|
+
d[A[C]] = v[A[C]];
|
|
4019
4071
|
return d;
|
|
4020
4072
|
};
|
|
4021
4073
|
function ke(d, v) {
|
|
@@ -4037,12 +4089,12 @@ var js = ar.exports;
|
|
|
4037
4089
|
}), A;
|
|
4038
4090
|
}
|
|
4039
4091
|
function A() {
|
|
4040
|
-
for (var
|
|
4041
|
-
|
|
4092
|
+
for (var C, j, V = new Promise(function(M, te) {
|
|
4093
|
+
C = M, j = te;
|
|
4042
4094
|
}), B = [], N = 0; N < arguments.length; N++)
|
|
4043
4095
|
B.push(arguments[N]);
|
|
4044
4096
|
B.push(function(M, te) {
|
|
4045
|
-
M ? j(M) :
|
|
4097
|
+
M ? j(M) : C(te);
|
|
4046
4098
|
});
|
|
4047
4099
|
try {
|
|
4048
4100
|
v.apply(this, B);
|
|
@@ -4072,8 +4124,8 @@ var js = ar.exports;
|
|
|
4072
4124
|
if (typeof d != "function")
|
|
4073
4125
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4074
4126
|
function v() {
|
|
4075
|
-
for (var A = [],
|
|
4076
|
-
A.push(arguments[
|
|
4127
|
+
for (var A = [], C = 0; C < arguments.length; C++)
|
|
4128
|
+
A.push(arguments[C]);
|
|
4077
4129
|
var j = A.pop();
|
|
4078
4130
|
if (typeof j != "function")
|
|
4079
4131
|
throw new TypeError("The last argument must be of type Function");
|
|
@@ -4082,10 +4134,10 @@ var js = ar.exports;
|
|
|
4082
4134
|
};
|
|
4083
4135
|
d.apply(this, A).then(
|
|
4084
4136
|
function(N) {
|
|
4085
|
-
|
|
4137
|
+
O.process.nextTick(B.bind(null, null, N));
|
|
4086
4138
|
},
|
|
4087
4139
|
function(N) {
|
|
4088
|
-
|
|
4140
|
+
O.process.nextTick(Pe.bind(null, N, B));
|
|
4089
4141
|
}
|
|
4090
4142
|
);
|
|
4091
4143
|
}
|
|
@@ -4096,7 +4148,7 @@ var js = ar.exports;
|
|
|
4096
4148
|
}
|
|
4097
4149
|
t.callbackify = H;
|
|
4098
4150
|
})(kt);
|
|
4099
|
-
const { inherits:
|
|
4151
|
+
const { inherits: Qs, format: Gt } = kt;
|
|
4100
4152
|
function Ne(t, e, r = Error) {
|
|
4101
4153
|
if (!t)
|
|
4102
4154
|
throw new Error("Avvio error code must not be empty");
|
|
@@ -4109,7 +4161,7 @@ function Ne(t, e, r = Error) {
|
|
|
4109
4161
|
}
|
|
4110
4162
|
return o.prototype[Symbol.toStringTag] = "Error", o.prototype.toString = function() {
|
|
4111
4163
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4112
|
-
},
|
|
4164
|
+
}, Qs(o, r), o;
|
|
4113
4165
|
}
|
|
4114
4166
|
var Un = {
|
|
4115
4167
|
createError: Ne,
|
|
@@ -4137,30 +4189,30 @@ var Un = {
|
|
|
4137
4189
|
"AVV_ERR_READY_TIMEOUT",
|
|
4138
4190
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4139
4191
|
)
|
|
4140
|
-
},
|
|
4192
|
+
}, Gs = function t(e, r, o) {
|
|
4141
4193
|
r === void 0 && (r = ""), o || (o = {});
|
|
4142
4194
|
var s = function(p) {
|
|
4143
|
-
var
|
|
4195
|
+
var b = {
|
|
4144
4196
|
"│": "|",
|
|
4145
4197
|
"└": "`",
|
|
4146
4198
|
"├": "+",
|
|
4147
4199
|
"─": "-",
|
|
4148
4200
|
"┬": "-"
|
|
4149
4201
|
};
|
|
4150
|
-
return o.unicode === !1 ?
|
|
4202
|
+
return o.unicode === !1 ? b[p] : p;
|
|
4151
4203
|
};
|
|
4152
4204
|
typeof e == "string" && (e = { label: e });
|
|
4153
4205
|
var u = e.nodes || [], l = (e.label || "").split(`
|
|
4154
|
-
`),
|
|
4206
|
+
`), c = `
|
|
4155
4207
|
` + r + (u.length ? s("│") : " ") + " ";
|
|
4156
|
-
return r + l.join(
|
|
4157
|
-
` + u.map(function(p,
|
|
4158
|
-
var g =
|
|
4208
|
+
return r + l.join(c) + `
|
|
4209
|
+
` + u.map(function(p, b) {
|
|
4210
|
+
var g = b === u.length - 1, m = p.nodes && p.nodes.length, E = r + (g ? " " : s("│")) + " ";
|
|
4159
4211
|
return r + s(g ? "└" : "├") + s("─") + s(m ? "┬" : "─") + " " + t(p, E, o).slice(r.length + 2);
|
|
4160
4212
|
}).join("");
|
|
4161
4213
|
};
|
|
4162
|
-
const
|
|
4163
|
-
let
|
|
4214
|
+
const zs = Gs, jr = Symbol("avvio.TimeTree.untrackNode"), zt = Symbol("avvio.TimeTree.trackNode"), Vr = Symbol("avvio.TimeTree.getParent"), Mr = Symbol("avvio.TimeTree.getNode"), qr = Symbol("avvio.TimeTree.addNode");
|
|
4215
|
+
let Ks = class {
|
|
4164
4216
|
constructor() {
|
|
4165
4217
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4166
4218
|
}
|
|
@@ -4193,14 +4245,14 @@ let Qs = class {
|
|
|
4193
4245
|
start: o,
|
|
4194
4246
|
nodes: []
|
|
4195
4247
|
}, this[zt](this.root), this.root.id;
|
|
4196
|
-
const u = this[Vr](e), l = `${r}-${Math.random()}`,
|
|
4248
|
+
const u = this[Vr](e), l = `${r}-${Math.random()}`, c = {
|
|
4197
4249
|
id: l,
|
|
4198
4250
|
parent: e,
|
|
4199
4251
|
start: o,
|
|
4200
4252
|
label: r,
|
|
4201
4253
|
nodes: []
|
|
4202
4254
|
};
|
|
4203
|
-
return u.nodes.push(
|
|
4255
|
+
return u.nodes.push(c), this[zt](c), l;
|
|
4204
4256
|
}
|
|
4205
4257
|
start(e, r, o = Date.now()) {
|
|
4206
4258
|
return this[qr](e, r, o);
|
|
@@ -4214,11 +4266,11 @@ let Qs = class {
|
|
|
4214
4266
|
}
|
|
4215
4267
|
prittyPrint() {
|
|
4216
4268
|
const e = (o) => (o.label = `${o.label} ${o.diff} ms`, o.nodes.length > 0 && (o.nodes = o.nodes.map((s) => e(s))), o), r = e(this.toJSON());
|
|
4217
|
-
return
|
|
4269
|
+
return zs(r);
|
|
4218
4270
|
}
|
|
4219
4271
|
};
|
|
4220
|
-
var
|
|
4221
|
-
function
|
|
4272
|
+
var Hs = Ks, Er = { exports: {} }, ur = { exports: {} }, Kt, Qr;
|
|
4273
|
+
function Ws() {
|
|
4222
4274
|
if (Qr)
|
|
4223
4275
|
return Kt;
|
|
4224
4276
|
Qr = 1;
|
|
@@ -4229,7 +4281,7 @@ function zs() {
|
|
|
4229
4281
|
if (E === "string" && g.length > 0)
|
|
4230
4282
|
return l(g);
|
|
4231
4283
|
if (E === "number" && isFinite(g))
|
|
4232
|
-
return m.long ? p(g) :
|
|
4284
|
+
return m.long ? p(g) : c(g);
|
|
4233
4285
|
throw new Error(
|
|
4234
4286
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(g)
|
|
4235
4287
|
);
|
|
@@ -4286,22 +4338,22 @@ function zs() {
|
|
|
4286
4338
|
}
|
|
4287
4339
|
}
|
|
4288
4340
|
}
|
|
4289
|
-
function
|
|
4341
|
+
function c(g) {
|
|
4290
4342
|
var m = Math.abs(g);
|
|
4291
4343
|
return m >= o ? Math.round(g / o) + "d" : m >= r ? Math.round(g / r) + "h" : m >= e ? Math.round(g / e) + "m" : m >= t ? Math.round(g / t) + "s" : g + "ms";
|
|
4292
4344
|
}
|
|
4293
4345
|
function p(g) {
|
|
4294
4346
|
var m = Math.abs(g);
|
|
4295
|
-
return m >= o ?
|
|
4347
|
+
return m >= o ? b(g, m, o, "day") : m >= r ? b(g, m, r, "hour") : m >= e ? b(g, m, e, "minute") : m >= t ? b(g, m, t, "second") : g + " ms";
|
|
4296
4348
|
}
|
|
4297
|
-
function
|
|
4349
|
+
function b(g, m, E, F) {
|
|
4298
4350
|
var L = m >= E * 1.5;
|
|
4299
4351
|
return Math.round(g / E) + " " + F + (L ? "s" : "");
|
|
4300
4352
|
}
|
|
4301
4353
|
return Kt;
|
|
4302
4354
|
}
|
|
4303
|
-
function
|
|
4304
|
-
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize =
|
|
4355
|
+
function Js(t) {
|
|
4356
|
+
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize = Ws(), r.destroy = b, Object.keys(t).forEach((g) => {
|
|
4305
4357
|
r[g] = t[g];
|
|
4306
4358
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4307
4359
|
function e(g) {
|
|
@@ -4353,8 +4405,8 @@ function Ks(t) {
|
|
|
4353
4405
|
}
|
|
4354
4406
|
function u() {
|
|
4355
4407
|
const g = [
|
|
4356
|
-
...r.names.map(
|
|
4357
|
-
...r.skips.map(
|
|
4408
|
+
...r.names.map(c),
|
|
4409
|
+
...r.skips.map(c).map((m) => "-" + m)
|
|
4358
4410
|
].join(",");
|
|
4359
4411
|
return r.enable(""), g;
|
|
4360
4412
|
}
|
|
@@ -4370,18 +4422,18 @@ function Ks(t) {
|
|
|
4370
4422
|
return !0;
|
|
4371
4423
|
return !1;
|
|
4372
4424
|
}
|
|
4373
|
-
function
|
|
4425
|
+
function c(g) {
|
|
4374
4426
|
return g.toString().substring(2, g.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
4375
4427
|
}
|
|
4376
4428
|
function p(g) {
|
|
4377
4429
|
return g instanceof Error ? g.stack || g.message : g;
|
|
4378
4430
|
}
|
|
4379
|
-
function
|
|
4431
|
+
function b() {
|
|
4380
4432
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
4381
4433
|
}
|
|
4382
4434
|
return r.enable(r.load()), r;
|
|
4383
4435
|
}
|
|
4384
|
-
var
|
|
4436
|
+
var Ys = Js;
|
|
4385
4437
|
(function(t, e) {
|
|
4386
4438
|
e.formatArgs = o, e.save = s, e.load = u, e.useColors = r, e.storage = l(), e.destroy = (() => {
|
|
4387
4439
|
let p = !1;
|
|
@@ -4476,12 +4528,12 @@ var Hs = Ks;
|
|
|
4476
4528
|
function o(p) {
|
|
4477
4529
|
if (p[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + p[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
|
|
4478
4530
|
return;
|
|
4479
|
-
const
|
|
4480
|
-
p.splice(1, 0,
|
|
4531
|
+
const b = "color: " + this.color;
|
|
4532
|
+
p.splice(1, 0, b, "color: inherit");
|
|
4481
4533
|
let g = 0, m = 0;
|
|
4482
4534
|
p[0].replace(/%[a-zA-Z%]/g, (E) => {
|
|
4483
4535
|
E !== "%%" && (g++, E === "%c" && (m = g));
|
|
4484
|
-
}), p.splice(m, 0,
|
|
4536
|
+
}), p.splice(m, 0, b);
|
|
4485
4537
|
}
|
|
4486
4538
|
e.log = console.debug || console.log || (() => {
|
|
4487
4539
|
});
|
|
@@ -4497,7 +4549,7 @@ var Hs = Ks;
|
|
|
4497
4549
|
p = e.storage.getItem("debug");
|
|
4498
4550
|
} catch {
|
|
4499
4551
|
}
|
|
4500
|
-
return !p && typeof
|
|
4552
|
+
return !p && typeof O.process < "u" && "env" in O.process && (p = O.process.env.DEBUG), p;
|
|
4501
4553
|
}
|
|
4502
4554
|
function l() {
|
|
4503
4555
|
try {
|
|
@@ -4505,38 +4557,38 @@ var Hs = Ks;
|
|
|
4505
4557
|
} catch {
|
|
4506
4558
|
}
|
|
4507
4559
|
}
|
|
4508
|
-
t.exports =
|
|
4509
|
-
const { formatters:
|
|
4510
|
-
|
|
4560
|
+
t.exports = Ys(e);
|
|
4561
|
+
const { formatters: c } = t.exports;
|
|
4562
|
+
c.j = function(p) {
|
|
4511
4563
|
try {
|
|
4512
4564
|
return JSON.stringify(p);
|
|
4513
|
-
} catch (
|
|
4514
|
-
return "[UnexpectedJSONParseError]: " +
|
|
4565
|
+
} catch (b) {
|
|
4566
|
+
return "[UnexpectedJSONParseError]: " + b.message;
|
|
4515
4567
|
}
|
|
4516
4568
|
};
|
|
4517
4569
|
})(ur, ur.exports);
|
|
4518
4570
|
var $n = ur.exports;
|
|
4519
|
-
const
|
|
4520
|
-
function
|
|
4571
|
+
const Xs = fn, Zs = bn.EventEmitter, ea = kt.inherits, Z = $n("avvio"), { AVV_ERR_READY_TIMEOUT: ta } = Un, Ht = Symbol.for("plugin-meta");
|
|
4572
|
+
function ra(t, e) {
|
|
4521
4573
|
return t[Ht] && t[Ht].name ? t[Ht].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4522
4574
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4523
4575
|
}
|
|
4524
|
-
function
|
|
4576
|
+
function na() {
|
|
4525
4577
|
const t = {};
|
|
4526
4578
|
return t.promise = new Promise((e, r) => {
|
|
4527
4579
|
t.resolve = e, t.reject = r;
|
|
4528
4580
|
}), t;
|
|
4529
4581
|
}
|
|
4530
|
-
function
|
|
4531
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name =
|
|
4582
|
+
function rt(t, e, r, o, s) {
|
|
4583
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = ra(e, r), this.isAfter = o, this.q = Xs(t, ia, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4532
4584
|
}
|
|
4533
|
-
|
|
4534
|
-
|
|
4585
|
+
ea(rt, Zs);
|
|
4586
|
+
rt.prototype.exec = function(t, e) {
|
|
4535
4587
|
const r = this.func;
|
|
4536
4588
|
let o = !1;
|
|
4537
4589
|
const s = this.name;
|
|
4538
4590
|
if (this.parent._error && !this.isAfter) {
|
|
4539
|
-
Z("skipping loading of plugin as parent errored and it is not an after", s),
|
|
4591
|
+
Z("skipping loading of plugin as parent errored and it is not an after", s), O.process.nextTick(e);
|
|
4540
4592
|
return;
|
|
4541
4593
|
}
|
|
4542
4594
|
if (this.isAfter)
|
|
@@ -4558,30 +4610,30 @@ tt.prototype.exec = function(t, e) {
|
|
|
4558
4610
|
};
|
|
4559
4611
|
this.timeout > 0 && (Z("setting up timeout", s, this.timeout), u = setTimeout(function() {
|
|
4560
4612
|
Z("timed out", s), u = null;
|
|
4561
|
-
const p = new
|
|
4613
|
+
const p = new ta(s);
|
|
4562
4614
|
p.fn = r, l(p);
|
|
4563
4615
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4564
|
-
const
|
|
4565
|
-
|
|
4566
|
-
() =>
|
|
4567
|
-
(p) =>
|
|
4616
|
+
const c = r(this.server, this.opts, l);
|
|
4617
|
+
c && typeof c.then == "function" && (Z("exec: resolving promise", s), c.then(
|
|
4618
|
+
() => O.process.nextTick(l),
|
|
4619
|
+
(p) => O.process.nextTick(l, p)
|
|
4568
4620
|
));
|
|
4569
4621
|
};
|
|
4570
|
-
|
|
4622
|
+
rt.prototype.loadedSoFar = function() {
|
|
4571
4623
|
if (this.loaded)
|
|
4572
4624
|
return Promise.resolve();
|
|
4573
4625
|
const t = () => {
|
|
4574
4626
|
this.server.after((r, o) => {
|
|
4575
|
-
this._error = r, this.q.pause(), r ? (Z("rejecting promise", this.name, r), this._promise.reject(r)) : (Z("resolving promise", this.name), this._promise.resolve()), this._promise = null,
|
|
4627
|
+
this._error = r, this.q.pause(), r ? (Z("rejecting promise", this.name, r), this._promise.reject(r)) : (Z("resolving promise", this.name), this._promise.resolve()), this._promise = null, O.process.nextTick(o, r);
|
|
4576
4628
|
}), this.q.resume();
|
|
4577
4629
|
};
|
|
4578
4630
|
let e;
|
|
4579
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4631
|
+
return this._promise ? e = Promise.resolve() : (this._promise = na(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4580
4632
|
};
|
|
4581
|
-
|
|
4633
|
+
rt.prototype.enqueue = function(t, e) {
|
|
4582
4634
|
Z("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4583
4635
|
};
|
|
4584
|
-
|
|
4636
|
+
rt.prototype.finish = function(t, e) {
|
|
4585
4637
|
Z("finish", this.name, t);
|
|
4586
4638
|
const r = () => {
|
|
4587
4639
|
this.loaded || (Z("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -4601,14 +4653,14 @@ tt.prototype.finish = function(t, e) {
|
|
|
4601
4653
|
r();
|
|
4602
4654
|
else
|
|
4603
4655
|
Z("delayed", this.name), this.q.drain = () => {
|
|
4604
|
-
Z("drain", this.name), this.q.drain =
|
|
4656
|
+
Z("drain", this.name), this.q.drain = oa, queueMicrotask(o);
|
|
4605
4657
|
};
|
|
4606
4658
|
};
|
|
4607
4659
|
queueMicrotask(o), this.q.resume();
|
|
4608
4660
|
};
|
|
4609
|
-
function
|
|
4661
|
+
function ia(t, e) {
|
|
4610
4662
|
const r = this;
|
|
4611
|
-
|
|
4663
|
+
O.process.nextTick(Ir.bind(r), t, e);
|
|
4612
4664
|
}
|
|
4613
4665
|
function Ir(t, e) {
|
|
4614
4666
|
if (typeof t.func.then == "function") {
|
|
@@ -4624,60 +4676,60 @@ function Ir(t, e) {
|
|
|
4624
4676
|
});
|
|
4625
4677
|
});
|
|
4626
4678
|
}
|
|
4627
|
-
function
|
|
4679
|
+
function oa() {
|
|
4628
4680
|
}
|
|
4629
|
-
Er.exports =
|
|
4681
|
+
Er.exports = rt;
|
|
4630
4682
|
Er.exports.loadPlugin = Ir;
|
|
4631
|
-
var
|
|
4632
|
-
const Gr = fn,
|
|
4683
|
+
var sa = Er.exports;
|
|
4684
|
+
const Gr = fn, aa = bn.EventEmitter, ua = kt.inherits, {
|
|
4633
4685
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Wt,
|
|
4634
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
4635
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4636
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4637
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4638
|
-
} = Un,
|
|
4639
|
-
function
|
|
4640
|
-
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready",
|
|
4686
|
+
AVV_ERR_CALLBACK_NOT_FN: ft,
|
|
4687
|
+
AVV_ERR_PLUGIN_NOT_VALID: ca,
|
|
4688
|
+
AVV_ERR_ROOT_PLG_BOOTED: fa,
|
|
4689
|
+
AVV_ERR_READY_TIMEOUT: la
|
|
4690
|
+
} = Un, ha = Hs, cr = sa, et = $n("avvio"), _t = Symbol("kAvvio"), Jt = Symbol("kThenifyDoNotWrap");
|
|
4691
|
+
function pa(t, e, r) {
|
|
4692
|
+
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", c = o.onClose || "onClose", p = o.close || "close";
|
|
4641
4693
|
if (t[s])
|
|
4642
4694
|
throw new Wt(s);
|
|
4643
4695
|
if (t[u])
|
|
4644
4696
|
throw new Wt(u);
|
|
4645
4697
|
if (t[l])
|
|
4646
4698
|
throw new Wt(l);
|
|
4647
|
-
t[s] = function(
|
|
4648
|
-
return r.use(
|
|
4649
|
-
}, Object.defineProperty(t, "then", { get: Dn.bind(r) }), t[_t] = !0, t[u] = function(
|
|
4650
|
-
return typeof
|
|
4651
|
-
}, t[l] = function(
|
|
4652
|
-
if (
|
|
4653
|
-
throw new
|
|
4654
|
-
return r.ready(
|
|
4655
|
-
}, t[
|
|
4656
|
-
if (typeof
|
|
4657
|
-
throw new
|
|
4658
|
-
return r.onClose(
|
|
4659
|
-
}, t[p] = function(
|
|
4660
|
-
if (
|
|
4661
|
-
throw new
|
|
4662
|
-
return
|
|
4699
|
+
t[s] = function(b, g) {
|
|
4700
|
+
return r.use(b, g), this;
|
|
4701
|
+
}, Object.defineProperty(t, "then", { get: Dn.bind(r) }), t[_t] = !0, t[u] = function(b) {
|
|
4702
|
+
return typeof b != "function" ? r._loadRegistered() : (r.after(Yt(b, this)), this);
|
|
4703
|
+
}, t[l] = function(b) {
|
|
4704
|
+
if (b && typeof b != "function")
|
|
4705
|
+
throw new ft(l, typeof b);
|
|
4706
|
+
return r.ready(b ? Yt(b, this) : void 0);
|
|
4707
|
+
}, t[c] = function(b) {
|
|
4708
|
+
if (typeof b != "function")
|
|
4709
|
+
throw new ft(c, typeof b);
|
|
4710
|
+
return r.onClose(wa(b, this)), this;
|
|
4711
|
+
}, t[p] = function(b) {
|
|
4712
|
+
if (b && typeof b != "function")
|
|
4713
|
+
throw new ft(p, typeof b);
|
|
4714
|
+
return b ? (r.close(Yt(b, this)), this) : r.close();
|
|
4663
4715
|
};
|
|
4664
4716
|
}
|
|
4665
4717
|
function ee(t, e, r) {
|
|
4666
4718
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof ee)) {
|
|
4667
4719
|
const o = new ee(t, e, r);
|
|
4668
|
-
return t &&
|
|
4720
|
+
return t && pa(t, e, o), o;
|
|
4669
4721
|
}
|
|
4670
|
-
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new
|
|
4722
|
+
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new ha(), this._readyQ = Gr(this, jn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4671
4723
|
this.emit("start"), this._readyQ.drain = zr;
|
|
4672
|
-
}, this._closeQ = Gr(this,
|
|
4724
|
+
}, this._closeQ = Gr(this, ma, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4673
4725
|
this.emit("close"), this._closeQ.drain = zr;
|
|
4674
|
-
}, this._doStart = null, this._root = new cr(this,
|
|
4726
|
+
}, this._doStart = null, this._root = new cr(this, da.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
|
|
4675
4727
|
const l = this.pluginTree.start(null, s, u);
|
|
4676
|
-
this._root.once("loaded", (
|
|
4677
|
-
this.pluginTree.stop(l,
|
|
4728
|
+
this._root.once("loaded", (c, p, b) => {
|
|
4729
|
+
this.pluginTree.stop(l, b);
|
|
4678
4730
|
});
|
|
4679
4731
|
}), cr.loadPlugin.call(this, this._root, (o) => {
|
|
4680
|
-
|
|
4732
|
+
et("root plugin ready");
|
|
4681
4733
|
try {
|
|
4682
4734
|
this.emit("preReady"), this._root = null;
|
|
4683
4735
|
} catch (s) {
|
|
@@ -4691,19 +4743,19 @@ function ee(t, e, r) {
|
|
|
4691
4743
|
this._readyQ.resume();
|
|
4692
4744
|
});
|
|
4693
4745
|
}
|
|
4694
|
-
function
|
|
4746
|
+
function da(t, e, r) {
|
|
4695
4747
|
this._doStart = r, e.autostart && this.start();
|
|
4696
4748
|
}
|
|
4697
|
-
|
|
4749
|
+
ua(ee, aa);
|
|
4698
4750
|
ee.prototype.start = function() {
|
|
4699
|
-
return this.started = !0,
|
|
4751
|
+
return this.started = !0, O.process.nextTick(this._doStart), this;
|
|
4700
4752
|
};
|
|
4701
4753
|
ee.prototype.override = function(t, e, r) {
|
|
4702
4754
|
return t;
|
|
4703
4755
|
};
|
|
4704
|
-
function
|
|
4756
|
+
function ya(t) {
|
|
4705
4757
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4706
|
-
throw new
|
|
4758
|
+
throw new ca(typeof t);
|
|
4707
4759
|
return t;
|
|
4708
4760
|
}
|
|
4709
4761
|
ee.prototype[_t] = !0;
|
|
@@ -4712,16 +4764,16 @@ ee.prototype.use = function(t, e) {
|
|
|
4712
4764
|
};
|
|
4713
4765
|
ee.prototype._loadRegistered = function() {
|
|
4714
4766
|
const t = this._current[0];
|
|
4715
|
-
return !this.started && !this.booted &&
|
|
4767
|
+
return !this.started && !this.booted && O.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4716
4768
|
};
|
|
4717
4769
|
Object.defineProperty(ee.prototype, "then", { get: Dn });
|
|
4718
4770
|
ee.prototype._addPlugin = function(t, e, r) {
|
|
4719
|
-
if (t =
|
|
4720
|
-
throw new
|
|
4771
|
+
if (t = ya(t), e = e || {}, this.booted)
|
|
4772
|
+
throw new fa();
|
|
4721
4773
|
const o = this._current[0], s = new cr(this, t, e, r);
|
|
4722
|
-
if (s.once("start", (u, l,
|
|
4723
|
-
const p = this.pluginTree.start(o.name, l,
|
|
4724
|
-
s.once("loaded", (
|
|
4774
|
+
if (s.once("start", (u, l, c) => {
|
|
4775
|
+
const p = this.pluginTree.start(o.name, l, c);
|
|
4776
|
+
s.once("loaded", (b, g, m) => {
|
|
4725
4777
|
this.pluginTree.stop(p, m);
|
|
4726
4778
|
});
|
|
4727
4779
|
}), o.loaded)
|
|
@@ -4752,7 +4804,7 @@ ee.prototype.close = function(t) {
|
|
|
4752
4804
|
let e;
|
|
4753
4805
|
if (t) {
|
|
4754
4806
|
if (typeof t != "function")
|
|
4755
|
-
throw new
|
|
4807
|
+
throw new ft("close", typeof t);
|
|
4756
4808
|
} else
|
|
4757
4809
|
e = new Promise(function(r, o) {
|
|
4758
4810
|
t = function(s) {
|
|
@@ -4762,21 +4814,21 @@ ee.prototype.close = function(t) {
|
|
|
4762
4814
|
};
|
|
4763
4815
|
});
|
|
4764
4816
|
return this.ready(() => {
|
|
4765
|
-
this._error = null, this._closeQ.push(t),
|
|
4817
|
+
this._error = null, this._closeQ.push(t), O.process.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
4766
4818
|
}), e;
|
|
4767
4819
|
};
|
|
4768
4820
|
ee.prototype.ready = function(t) {
|
|
4769
4821
|
if (t) {
|
|
4770
4822
|
if (typeof t != "function")
|
|
4771
|
-
throw new
|
|
4823
|
+
throw new ft("ready", typeof t);
|
|
4772
4824
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
4773
4825
|
return;
|
|
4774
4826
|
}
|
|
4775
4827
|
return new Promise((e, r) => {
|
|
4776
4828
|
this._readyQ.push(s), this.start();
|
|
4777
4829
|
const o = this._current[0].server;
|
|
4778
|
-
function s(u, l,
|
|
4779
|
-
u ? r(u) : e(o),
|
|
4830
|
+
function s(u, l, c) {
|
|
4831
|
+
u ? r(u) : e(o), O.process.nextTick(c);
|
|
4780
4832
|
}
|
|
4781
4833
|
});
|
|
4782
4834
|
};
|
|
@@ -4790,63 +4842,63 @@ function zr() {
|
|
|
4790
4842
|
}
|
|
4791
4843
|
function Dn() {
|
|
4792
4844
|
if (this.booted) {
|
|
4793
|
-
|
|
4845
|
+
et("thenify returning null because we are already booted");
|
|
4794
4846
|
return;
|
|
4795
4847
|
}
|
|
4796
4848
|
if (this[Jt]) {
|
|
4797
4849
|
this[Jt] = !1;
|
|
4798
4850
|
return;
|
|
4799
4851
|
}
|
|
4800
|
-
return
|
|
4852
|
+
return et("thenify"), (t, e) => this._loadRegistered().then(() => (this[Jt] = !0, t(this._server)), e);
|
|
4801
4853
|
}
|
|
4802
4854
|
function jn(t, e) {
|
|
4803
4855
|
const r = this._server, o = this._error;
|
|
4804
4856
|
let s;
|
|
4805
4857
|
if (this._error = null, t.length === 0)
|
|
4806
|
-
this._error = o, s = t(), s && !s[_t] && typeof s.then == "function" ? s.then(() =>
|
|
4858
|
+
this._error = o, s = t(), s && !s[_t] && typeof s.then == "function" ? s.then(() => O.process.nextTick(e), (u) => O.process.nextTick(e, u)) : O.process.nextTick(e);
|
|
4807
4859
|
else if (t.length === 1)
|
|
4808
|
-
s = t(o), s && !s[_t] && typeof s.then == "function" ? s.then(() =>
|
|
4860
|
+
s = t(o), s && !s[_t] && typeof s.then == "function" ? s.then(() => O.process.nextTick(e), (u) => O.process.nextTick(e, u)) : O.process.nextTick(e);
|
|
4809
4861
|
else if (this._timeout === 0) {
|
|
4810
4862
|
const u = (l) => {
|
|
4811
4863
|
this._error = l, e(this._error);
|
|
4812
4864
|
};
|
|
4813
4865
|
t.length === 2 ? t(o, u) : t(o, r, u);
|
|
4814
4866
|
} else
|
|
4815
|
-
|
|
4867
|
+
ga.call(this, t, o, r, e);
|
|
4816
4868
|
}
|
|
4817
|
-
function
|
|
4869
|
+
function ga(t, e, r, o) {
|
|
4818
4870
|
const s = t.name;
|
|
4819
|
-
|
|
4871
|
+
et("setting up ready timeout", s, this._timeout);
|
|
4820
4872
|
let u = setTimeout(() => {
|
|
4821
|
-
|
|
4822
|
-
const
|
|
4823
|
-
|
|
4873
|
+
et("timed out", s), u = null;
|
|
4874
|
+
const c = new la(s);
|
|
4875
|
+
c.fn = t, this._error = c, o(c);
|
|
4824
4876
|
}, this._timeout);
|
|
4825
4877
|
t.length === 2 ? t(e, l.bind(this)) : t(e, r, l.bind(this));
|
|
4826
|
-
function l(
|
|
4827
|
-
u && (clearTimeout(u), this._error =
|
|
4878
|
+
function l(c) {
|
|
4879
|
+
u && (clearTimeout(u), this._error = c, o(this._error));
|
|
4828
4880
|
}
|
|
4829
4881
|
}
|
|
4830
|
-
function
|
|
4882
|
+
function ma(t, e) {
|
|
4831
4883
|
const r = this._server, o = t[this._isOnCloseHandlerKey];
|
|
4832
4884
|
if (t.length === 0 || t.length === 1) {
|
|
4833
4885
|
let s;
|
|
4834
|
-
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (
|
|
4835
|
-
() =>
|
|
4836
|
-
(u) =>
|
|
4837
|
-
)) :
|
|
4886
|
+
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (et("resolving close/onClose promise"), s.then(
|
|
4887
|
+
() => O.process.nextTick(e),
|
|
4888
|
+
(u) => O.process.nextTick(e, u)
|
|
4889
|
+
)) : O.process.nextTick(e);
|
|
4838
4890
|
} else
|
|
4839
4891
|
t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
|
|
4840
4892
|
}
|
|
4841
|
-
function
|
|
4893
|
+
function wa(t, e) {
|
|
4842
4894
|
return r.bind(e);
|
|
4843
4895
|
function r(o, s) {
|
|
4844
4896
|
let u;
|
|
4845
4897
|
t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
|
|
4846
|
-
|
|
4847
|
-
}, s) :
|
|
4848
|
-
|
|
4849
|
-
}, s) :
|
|
4898
|
+
O.process.nextTick(s);
|
|
4899
|
+
}, s) : O.process.nextTick(s)) : t.length === 1 ? (u = t(this), u && u.then ? u.then(function() {
|
|
4900
|
+
O.process.nextTick(s);
|
|
4901
|
+
}, s) : O.process.nextTick(s)) : t(this, s);
|
|
4850
4902
|
}
|
|
4851
4903
|
}
|
|
4852
4904
|
function Yt(t, e) {
|
|
@@ -4854,10 +4906,10 @@ function Yt(t, e) {
|
|
|
4854
4906
|
function r(o, s) {
|
|
4855
4907
|
let u;
|
|
4856
4908
|
t ? t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
|
|
4857
|
-
|
|
4858
|
-
}, s) :
|
|
4859
|
-
|
|
4860
|
-
}, s) :
|
|
4909
|
+
O.process.nextTick(s, o);
|
|
4910
|
+
}, s) : O.process.nextTick(s, o)) : t.length === 1 ? (u = t(o), u && u.then ? u.then(function() {
|
|
4911
|
+
O.process.nextTick(s);
|
|
4912
|
+
}, s) : O.process.nextTick(s)) : t.length === 2 ? t(o, s) : t(o, this, s) : O.process.nextTick(s);
|
|
4861
4913
|
}
|
|
4862
4914
|
}
|
|
4863
4915
|
yr.exports = ee;
|
|
@@ -4868,18 +4920,18 @@ yr.exports.express = function(t) {
|
|
|
4868
4920
|
}
|
|
4869
4921
|
});
|
|
4870
4922
|
};
|
|
4871
|
-
var
|
|
4872
|
-
const
|
|
4873
|
-
function
|
|
4874
|
-
const o = e ? "https://grpc-
|
|
4875
|
-
return s.use(
|
|
4923
|
+
var ba = yr.exports;
|
|
4924
|
+
const va = /* @__PURE__ */ Zn(ba);
|
|
4925
|
+
function Da(t, e = !0, r = !0) {
|
|
4926
|
+
const o = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = va(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4927
|
+
return s.use(Ri), s.use(Ti, { sdkKey: t, host: o }), s.use(Pi), s.use(ki), s.use(ho), s.use(Zi), r && s.after(async (u, l, c) => {
|
|
4876
4928
|
if (u)
|
|
4877
4929
|
throw u;
|
|
4878
|
-
await l.sdk.initializeApp(),
|
|
4930
|
+
await l.sdk.initializeApp(), c();
|
|
4879
4931
|
}), s.onClose(() => {
|
|
4880
4932
|
console.log("close");
|
|
4881
4933
|
}), s;
|
|
4882
4934
|
}
|
|
4883
4935
|
export {
|
|
4884
|
-
|
|
4936
|
+
Da as StreamLayer
|
|
4885
4937
|
};
|