@streamlayer/sdk-web 0.28.21 → 0.28.22
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 +5 -5
- package/lib/es/index.js +302 -277
- package/package.json +4 -4
package/lib/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QuestionType as
|
|
1
|
+
import { QuestionType as Fe, SilenceSetting as Kr, QuestionStatus as dt } 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";
|
|
@@ -22,9 +22,9 @@ var O = {}, Xr = {}, Ot = {};
|
|
|
22
22
|
Ot.byteLength = ei;
|
|
23
23
|
Ot.toByteArray = ri;
|
|
24
24
|
Ot.fromByteArray = oi;
|
|
25
|
-
var we = [], se = [], Xn = typeof Uint8Array < "u" ? Uint8Array : Array,
|
|
26
|
-
for (var qe = 0, Zn =
|
|
27
|
-
we[qe] =
|
|
25
|
+
var we = [], se = [], Xn = typeof Uint8Array < "u" ? Uint8Array : Array, Lt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
26
|
+
for (var qe = 0, Zn = Lt.length; qe < Zn; ++qe)
|
|
27
|
+
we[qe] = Lt[qe], se[Lt.charCodeAt(qe)] = qe;
|
|
28
28
|
se["-".charCodeAt(0)] = 62;
|
|
29
29
|
se["_".charCodeAt(0)] = 63;
|
|
30
30
|
function Zr(t) {
|
|
@@ -69,8 +69,8 @@ function oi(t) {
|
|
|
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, f = s * 8 - o - 1, p = (1 << f) - 1, w = p >> 1, g = -7, m = r ? s - 1 : 0, E = r ? -1 : 1,
|
|
73
|
-
for (m += E, u =
|
|
72
|
+
var u, l, f = s * 8 - o - 1, p = (1 << f) - 1, w = p >> 1, g = -7, m = r ? s - 1 : 0, E = r ? -1 : 1, T = t[e + m];
|
|
73
|
+
for (m += E, u = T & (1 << -g) - 1, T >>= -g, g += f; 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
|
;
|
|
@@ -78,18 +78,18 @@ fr.read = function(t, e, r, o, s) {
|
|
|
78
78
|
u = 1 - w;
|
|
79
79
|
else {
|
|
80
80
|
if (u === p)
|
|
81
|
-
return l ? NaN : (
|
|
81
|
+
return l ? NaN : (T ? -1 : 1) * (1 / 0);
|
|
82
82
|
l = l + Math.pow(2, o), u = u - w;
|
|
83
83
|
}
|
|
84
|
-
return (
|
|
84
|
+
return (T ? -1 : 1) * l * Math.pow(2, u - o);
|
|
85
85
|
};
|
|
86
86
|
fr.write = function(t, e, r, o, s, u) {
|
|
87
|
-
var l, f, p, w = u * 8 - s - 1, g = (1 << w) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
|
|
88
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = 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 ? (f = 0, l = g) : l + m >= 1 ? (f = (e * p - 1) * Math.pow(2, s), l = l + m) : (f = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r +
|
|
87
|
+
var l, f, p, w = u * 8 - s - 1, g = (1 << w) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, T = o ? 0 : u - 1, N = o ? 1 : -1, P = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
88
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = 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 ? (f = 0, l = g) : l + m >= 1 ? (f = (e * p - 1) * Math.pow(2, s), l = l + m) : (f = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + T] = f & 255, T += N, f /= 256, s -= 8)
|
|
89
89
|
;
|
|
90
|
-
for (l = l << s | f, w += s; w > 0; t[r +
|
|
90
|
+
for (l = l << s | f, w += s; w > 0; t[r + T] = l & 255, T += N, l /= 256, w -= 8)
|
|
91
91
|
;
|
|
92
|
-
t[r +
|
|
92
|
+
t[r + T - N] |= P * 128;
|
|
93
93
|
};
|
|
94
94
|
/*!
|
|
95
95
|
* The buffer module from node.js, for the browser.
|
|
@@ -148,7 +148,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
148
148
|
if (typeof a == "string")
|
|
149
149
|
return E(a, n);
|
|
150
150
|
if (ArrayBuffer.isView(a))
|
|
151
|
-
return
|
|
151
|
+
return N(a);
|
|
152
152
|
if (a == null)
|
|
153
153
|
throw new TypeError(
|
|
154
154
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
@@ -202,18 +202,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
202
202
|
const h = c.write(a, n);
|
|
203
203
|
return h !== i && (c = c.slice(0, h)), c;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function T(a) {
|
|
206
206
|
const n = a.length < 0 ? 0 : I(a.length) | 0, i = l(n);
|
|
207
207
|
for (let c = 0; c < n; c += 1)
|
|
208
208
|
i[c] = a[c] & 255;
|
|
209
209
|
return i;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function N(a) {
|
|
212
212
|
if (ge(a, Uint8Array)) {
|
|
213
213
|
const n = new Uint8Array(a);
|
|
214
214
|
return P(n.buffer, n.byteOffset, n.byteLength);
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return T(a);
|
|
217
217
|
}
|
|
218
218
|
function P(a, n, i) {
|
|
219
219
|
if (n < 0 || a.byteLength < n)
|
|
@@ -229,9 +229,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
229
229
|
return i.length === 0 || a.copy(i, 0, 0, n), i;
|
|
230
230
|
}
|
|
231
231
|
if (a.length !== void 0)
|
|
232
|
-
return typeof a.length != "number" ||
|
|
232
|
+
return typeof a.length != "number" || Nt(a.length) ? l(0) : T(a);
|
|
233
233
|
if (a.type === "Buffer" && Array.isArray(a.data))
|
|
234
|
-
return
|
|
234
|
+
return T(a.data);
|
|
235
235
|
}
|
|
236
236
|
function I(a) {
|
|
237
237
|
if (a >= s)
|
|
@@ -354,14 +354,14 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
354
354
|
return nt(this, n, i);
|
|
355
355
|
case "latin1":
|
|
356
356
|
case "binary":
|
|
357
|
-
return
|
|
357
|
+
return ke(this, n, i);
|
|
358
358
|
case "base64":
|
|
359
359
|
return rt(this, n, i);
|
|
360
360
|
case "ucs2":
|
|
361
361
|
case "ucs-2":
|
|
362
362
|
case "utf16le":
|
|
363
363
|
case "utf-16le":
|
|
364
|
-
return
|
|
364
|
+
return Pe(this, n, i);
|
|
365
365
|
default:
|
|
366
366
|
if (c)
|
|
367
367
|
throw new TypeError("Unknown encoding: " + a);
|
|
@@ -369,7 +369,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
f.prototype._isBuffer = !0;
|
|
372
|
-
function
|
|
372
|
+
function F(a, n, i) {
|
|
373
373
|
const c = a[n];
|
|
374
374
|
a[n] = a[i], a[i] = c;
|
|
375
375
|
}
|
|
@@ -378,21 +378,21 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
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
|
+
F(this, i, i + 1);
|
|
382
382
|
return this;
|
|
383
383
|
}, f.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
|
+
F(this, i, i + 3), F(this, i + 1, i + 2);
|
|
389
389
|
return this;
|
|
390
390
|
}, f.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
|
+
F(this, i, i + 7), F(this, i + 1, i + 6), F(this, i + 2, i + 5), F(this, i + 3, i + 4);
|
|
396
396
|
return this;
|
|
397
397
|
}, f.prototype.toString = function() {
|
|
398
398
|
const n = this.length;
|
|
@@ -432,7 +432,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
432
432
|
function x(a, n, i, c, h) {
|
|
433
433
|
if (a.length === 0)
|
|
434
434
|
return -1;
|
|
435
|
-
if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i,
|
|
435
|
+
if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Nt(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;
|
|
@@ -495,7 +495,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
495
495
|
let b;
|
|
496
496
|
for (b = 0; b < c; ++b) {
|
|
497
497
|
const R = parseInt(n.substr(b * 2, 2), 16);
|
|
498
|
-
if (
|
|
498
|
+
if (Nt(R))
|
|
499
499
|
return b;
|
|
500
500
|
a[i + b] = R;
|
|
501
501
|
}
|
|
@@ -504,7 +504,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
504
504
|
function ie(a, n, i, c) {
|
|
505
505
|
return ot(it(n, a.length - i), a, i, c);
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function Oe(a, n, i, c) {
|
|
508
508
|
return ot(Rt(n), a, i, c);
|
|
509
509
|
}
|
|
510
510
|
function Se(a, n, i, c) {
|
|
@@ -539,7 +539,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
539
539
|
case "ascii":
|
|
540
540
|
case "latin1":
|
|
541
541
|
case "binary":
|
|
542
|
-
return
|
|
542
|
+
return Oe(this, n, i, c);
|
|
543
543
|
case "base64":
|
|
544
544
|
return Se(this, n, i, c);
|
|
545
545
|
case "ucs2":
|
|
@@ -586,18 +586,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
586
586
|
}
|
|
587
587
|
b === null ? (b = 65533, R = 1) : b > 65535 && (b -= 65536, c.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), c.push(b), h += R;
|
|
588
588
|
}
|
|
589
|
-
return
|
|
589
|
+
return Be(c);
|
|
590
590
|
}
|
|
591
|
-
const
|
|
592
|
-
function
|
|
591
|
+
const xe = 4096;
|
|
592
|
+
function Be(a) {
|
|
593
593
|
const n = a.length;
|
|
594
|
-
if (n <=
|
|
594
|
+
if (n <= xe)
|
|
595
595
|
return String.fromCharCode.apply(String, a);
|
|
596
596
|
let i = "", c = 0;
|
|
597
597
|
for (; c < n; )
|
|
598
598
|
i += String.fromCharCode.apply(
|
|
599
599
|
String,
|
|
600
|
-
a.slice(c, c +=
|
|
600
|
+
a.slice(c, c += xe)
|
|
601
601
|
);
|
|
602
602
|
return i;
|
|
603
603
|
}
|
|
@@ -608,7 +608,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
608
608
|
c += String.fromCharCode(a[h] & 127);
|
|
609
609
|
return c;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function ke(a, n, i) {
|
|
612
612
|
let c = "";
|
|
613
613
|
i = Math.min(a.length, i);
|
|
614
614
|
for (let h = n; h < i; ++h)
|
|
@@ -623,7 +623,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
623
623
|
h += Vn[a[y]];
|
|
624
624
|
return h;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function Pe(a, n, i) {
|
|
627
627
|
const c = a.slice(n, i);
|
|
628
628
|
let h = "";
|
|
629
629
|
for (let y = 0; y < c.length - 1; y += 2)
|
|
@@ -664,13 +664,13 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
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
|
}, f.prototype.readUint32BE = f.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
|
-
}, f.prototype.readBigUInt64LE =
|
|
667
|
+
}, f.prototype.readBigUInt64LE = Re(function(n) {
|
|
668
668
|
n = n >>> 0, he(n, "offset");
|
|
669
669
|
const i = this[n], c = this[n + 7];
|
|
670
670
|
(i === void 0 || c === void 0) && oe(n, this.length - 8);
|
|
671
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 + c * 2 ** 24;
|
|
672
672
|
return BigInt(h) + (BigInt(y) << BigInt(32));
|
|
673
|
-
}), f.prototype.readBigUInt64BE =
|
|
673
|
+
}), f.prototype.readBigUInt64BE = Re(function(n) {
|
|
674
674
|
n = n >>> 0, he(n, "offset");
|
|
675
675
|
const i = this[n], c = this[n + 7];
|
|
676
676
|
(i === void 0 || c === void 0) && oe(n, this.length - 8);
|
|
@@ -702,13 +702,13 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
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
|
}, f.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
|
-
}, f.prototype.readBigInt64LE =
|
|
705
|
+
}, f.prototype.readBigInt64LE = Re(function(n) {
|
|
706
706
|
n = n >>> 0, he(n, "offset");
|
|
707
707
|
const i = this[n], c = this[n + 7];
|
|
708
708
|
(i === void 0 || c === void 0) && oe(n, this.length - 8);
|
|
709
709
|
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (c << 24);
|
|
710
710
|
return (BigInt(h) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
711
|
-
}), f.prototype.readBigInt64BE =
|
|
711
|
+
}), f.prototype.readBigInt64BE = Re(function(n) {
|
|
712
712
|
n = n >>> 0, he(n, "offset");
|
|
713
713
|
const i = this[n], c = this[n + 7];
|
|
714
714
|
(i === void 0 || c === void 0) && oe(n, this.length - 8);
|
|
@@ -775,9 +775,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
775
775
|
let b = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
776
776
|
return a[i + 3] = b, b = b >> 8, a[i + 2] = b, b = b >> 8, a[i + 1] = b, b = b >> 8, a[i] = b, i + 8;
|
|
777
777
|
}
|
|
778
|
-
f.prototype.writeBigUInt64LE =
|
|
778
|
+
f.prototype.writeBigUInt64LE = Re(function(n, i = 0) {
|
|
779
779
|
return v(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
780
|
-
}), f.prototype.writeBigUInt64BE =
|
|
780
|
+
}), f.prototype.writeBigUInt64BE = Re(function(n, i = 0) {
|
|
781
781
|
return A(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
782
782
|
}), f.prototype.writeIntLE = function(n, i, c, h) {
|
|
783
783
|
if (n = +n, i = i >>> 0, !h) {
|
|
@@ -807,9 +807,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
807
807
|
return n = +n, i = i >>> 0, c || 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
808
|
}, f.prototype.writeInt32BE = function(n, i, c) {
|
|
809
809
|
return n = +n, i = i >>> 0, c || 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
|
-
}, f.prototype.writeBigInt64LE =
|
|
810
|
+
}, f.prototype.writeBigInt64LE = Re(function(n, i = 0) {
|
|
811
811
|
return v(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
812
|
-
}), f.prototype.writeBigInt64BE =
|
|
812
|
+
}), f.prototype.writeBigInt64BE = Re(function(n, i = 0) {
|
|
813
813
|
return A(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
814
814
|
});
|
|
815
815
|
function C(a, n, i, c, h, y) {
|
|
@@ -882,7 +882,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
882
882
|
return this;
|
|
883
883
|
};
|
|
884
884
|
const B = {};
|
|
885
|
-
function
|
|
885
|
+
function L(a, n, i) {
|
|
886
886
|
B[a] = class extends i {
|
|
887
887
|
constructor() {
|
|
888
888
|
super(), Object.defineProperty(this, "message", {
|
|
@@ -907,19 +907,19 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
907
907
|
}
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
|
|
910
|
+
L(
|
|
911
911
|
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
912
912
|
function(a) {
|
|
913
913
|
return a ? `${a} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
914
914
|
},
|
|
915
915
|
RangeError
|
|
916
|
-
),
|
|
916
|
+
), L(
|
|
917
917
|
"ERR_INVALID_ARG_TYPE",
|
|
918
918
|
function(a, n) {
|
|
919
919
|
return `The "${a}" argument must be of type number. Received type ${typeof n}`;
|
|
920
920
|
},
|
|
921
921
|
TypeError
|
|
922
|
-
),
|
|
922
|
+
), L(
|
|
923
923
|
"ERR_OUT_OF_RANGE",
|
|
924
924
|
function(a, n, i) {
|
|
925
925
|
let c = `The value of "${a}" is out of range.`, h = i;
|
|
@@ -1048,7 +1048,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1048
1048
|
function ge(a, n) {
|
|
1049
1049
|
return a instanceof n || a != null && a.constructor != null && a.constructor.name != null && a.constructor.name === n.name;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Nt(a) {
|
|
1052
1052
|
return a !== a;
|
|
1053
1053
|
}
|
|
1054
1054
|
const Vn = function() {
|
|
@@ -1060,7 +1060,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
return n;
|
|
1062
1062
|
}();
|
|
1063
|
-
function
|
|
1063
|
+
function Re(a) {
|
|
1064
1064
|
return typeof BigInt > "u" ? Mn : a;
|
|
1065
1065
|
}
|
|
1066
1066
|
function Mn() {
|
|
@@ -1116,20 +1116,20 @@ function si(t) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
var
|
|
1119
|
+
var _e = [], We = !1, Ue, yt = -1;
|
|
1120
1120
|
function ai() {
|
|
1121
|
-
!We || !
|
|
1121
|
+
!We || !Ue || (We = !1, Ue.length ? _e = Ue.concat(_e) : yt = -1, _e.length && rn());
|
|
1122
1122
|
}
|
|
1123
1123
|
function rn() {
|
|
1124
1124
|
if (!We) {
|
|
1125
1125
|
var t = tn(ai);
|
|
1126
1126
|
We = !0;
|
|
1127
|
-
for (var e =
|
|
1128
|
-
for (
|
|
1129
|
-
|
|
1130
|
-
yt = -1, e =
|
|
1127
|
+
for (var e = _e.length; e; ) {
|
|
1128
|
+
for (Ue = _e, _e = []; ++yt < e; )
|
|
1129
|
+
Ue && Ue[yt].run();
|
|
1130
|
+
yt = -1, e = _e.length;
|
|
1131
1131
|
}
|
|
1132
|
-
|
|
1132
|
+
Ue = null, We = !1, si(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
|
-
|
|
1140
|
+
_e.push(new nn(t, e)), _e.length === 1 && !We && tn(rn);
|
|
1141
1141
|
};
|
|
1142
1142
|
function nn(t, e) {
|
|
1143
1143
|
this.fun = t, this.array = e;
|
|
@@ -1151,17 +1151,17 @@ Y.env = {};
|
|
|
1151
1151
|
Y.argv = [];
|
|
1152
1152
|
Y.version = "";
|
|
1153
1153
|
Y.versions = {};
|
|
1154
|
-
function
|
|
1154
|
+
function Ce() {
|
|
1155
1155
|
}
|
|
1156
|
-
Y.on =
|
|
1157
|
-
Y.addListener =
|
|
1158
|
-
Y.once =
|
|
1159
|
-
Y.off =
|
|
1160
|
-
Y.removeListener =
|
|
1161
|
-
Y.removeAllListeners =
|
|
1162
|
-
Y.emit =
|
|
1163
|
-
Y.prependListener =
|
|
1164
|
-
Y.prependOnceListener =
|
|
1156
|
+
Y.on = Ce;
|
|
1157
|
+
Y.addListener = Ce;
|
|
1158
|
+
Y.once = Ce;
|
|
1159
|
+
Y.off = Ce;
|
|
1160
|
+
Y.removeListener = Ce;
|
|
1161
|
+
Y.removeAllListeners = Ce;
|
|
1162
|
+
Y.emit = Ce;
|
|
1163
|
+
Y.prependListener = Ce;
|
|
1164
|
+
Y.prependOnceListener = Ce;
|
|
1165
1165
|
Y.listeners = function(t) {
|
|
1166
1166
|
return [];
|
|
1167
1167
|
};
|
|
@@ -1213,7 +1213,7 @@ class at extends xt {
|
|
|
1213
1213
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
1214
1214
|
unsubscribe = () => this.getStore().off();
|
|
1215
1215
|
}
|
|
1216
|
-
const
|
|
1216
|
+
const $e = (t) => qn(t);
|
|
1217
1217
|
var Ie;
|
|
1218
1218
|
(function(t) {
|
|
1219
1219
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
@@ -1224,10 +1224,10 @@ const li = {
|
|
|
1224
1224
|
[ue.PUBLIC_CHAT]: "publicChat",
|
|
1225
1225
|
[ue.TWITTER]: "twitter"
|
|
1226
1226
|
};
|
|
1227
|
-
var
|
|
1227
|
+
var De;
|
|
1228
1228
|
(function(t) {
|
|
1229
1229
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
1230
|
-
})(
|
|
1230
|
+
})(De || (De = {}));
|
|
1231
1231
|
class lr {
|
|
1232
1232
|
status;
|
|
1233
1233
|
source;
|
|
@@ -1236,7 +1236,7 @@ class lr {
|
|
|
1236
1236
|
listeners = /* @__PURE__ */ new Set();
|
|
1237
1237
|
settingsKey;
|
|
1238
1238
|
constructor({ settings: e, ...r }, o) {
|
|
1239
|
-
this.settingsKey = li[r.type], this.status = Ct(
|
|
1239
|
+
this.settingsKey = li[r.type], this.status = Ct(De.Suspended), this.config = new at($e(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new at($e(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new at($e({}), `feature:settings:${this.settingsKey}`), this.source = o;
|
|
1240
1240
|
}
|
|
1241
1241
|
get featureConfig() {
|
|
1242
1242
|
return this.config.getStore();
|
|
@@ -1248,10 +1248,10 @@ class lr {
|
|
|
1248
1248
|
this.listeners.add(e);
|
|
1249
1249
|
}
|
|
1250
1250
|
enable = () => {
|
|
1251
|
-
this.status.set(
|
|
1251
|
+
this.status.set(De.Ready);
|
|
1252
1252
|
};
|
|
1253
1253
|
disable = () => {
|
|
1254
|
-
this.status.set(
|
|
1254
|
+
this.status.set(De.Suspended);
|
|
1255
1255
|
};
|
|
1256
1256
|
setFeatureConfig = ({ settings: e, ...r }) => {
|
|
1257
1257
|
let o;
|
|
@@ -1391,7 +1391,7 @@ class di {
|
|
|
1391
1391
|
ts: /* @__PURE__ */ new Date(),
|
|
1392
1392
|
log: []
|
|
1393
1393
|
};
|
|
1394
|
-
this.state = new at(
|
|
1394
|
+
this.state = new at($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(() => {
|
|
1395
1395
|
this.reconnect();
|
|
1396
1396
|
}), this.updateState(Ae.Ready);
|
|
1397
1397
|
}
|
|
@@ -1451,7 +1451,7 @@ class yi {
|
|
|
1451
1451
|
callbackClients;
|
|
1452
1452
|
subscriptions;
|
|
1453
1453
|
constructor(e) {
|
|
1454
|
-
this.host = e, this.$headers = new at(
|
|
1454
|
+
this.host = e, this.$headers = new at($e({
|
|
1455
1455
|
"sl-device-id": O.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
1456
1456
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
1457
1457
|
const [r, o, s] = Hn();
|
|
@@ -1644,10 +1644,10 @@ class Ke extends hr {
|
|
|
1644
1644
|
this.remove(Ee.TOKEN);
|
|
1645
1645
|
};
|
|
1646
1646
|
}
|
|
1647
|
-
var
|
|
1647
|
+
var Te;
|
|
1648
1648
|
(function(t) {
|
|
1649
1649
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
1650
|
-
})(
|
|
1650
|
+
})(Te || (Te = {}));
|
|
1651
1651
|
const Ii = (t) => {
|
|
1652
1652
|
const e = new Ke(), r = new de(ne(e.getExternalToken()), "userKey"), o = new de(ne(e.getToken()), "userToken"), s = new pe(bi(o.getStore(), t), "user", (l) => l?.data?.data?.id), u = new pe(vi(o.getStore(), t), "userSettings");
|
|
1653
1653
|
return {
|
|
@@ -1656,7 +1656,7 @@ const Ii = (t) => {
|
|
|
1656
1656
|
user: s,
|
|
1657
1657
|
userSettings: u
|
|
1658
1658
|
};
|
|
1659
|
-
},
|
|
1659
|
+
}, Ti = (t) => {
|
|
1660
1660
|
const e = new de(ne(void 0), "providerStreamId"), r = new pe(gi(e.getStore(), t), "slStreamId", (s) => s?.data), o = new pe(mi(r.getAtomStore(), t), "streamSettings");
|
|
1661
1661
|
return r.getAtomStore().listen((s) => {
|
|
1662
1662
|
(s === "" || s === void 0) && o.getStore().mutate(void 0);
|
|
@@ -1665,8 +1665,8 @@ const Ii = (t) => {
|
|
|
1665
1665
|
slStreamId: r,
|
|
1666
1666
|
streamSettings: o
|
|
1667
1667
|
};
|
|
1668
|
-
},
|
|
1669
|
-
const e = new de(ne(void 0), "enabled"), r = new de(ne(
|
|
1668
|
+
}, Fi = (t) => {
|
|
1669
|
+
const e = new de(ne(void 0), "enabled"), r = new de(ne(Te.DISABLED), "status"), o = new pe(Si(e.getStore(), t), "organizationSettings", (f) => f?.data?.id), s = new pe(Ai(o.getAtomStore(), t), "organizationAdvertising"), u = Ii(t), l = Ti(t);
|
|
1670
1670
|
return {
|
|
1671
1671
|
enabled: e,
|
|
1672
1672
|
status: r,
|
|
@@ -1684,7 +1684,7 @@ const Ii = (t) => {
|
|
|
1684
1684
|
class _i extends xt {
|
|
1685
1685
|
stores;
|
|
1686
1686
|
constructor(e) {
|
|
1687
|
-
const r =
|
|
1687
|
+
const r = Fi(e), o = fi(r);
|
|
1688
1688
|
super(o, "core"), this.stores = r;
|
|
1689
1689
|
}
|
|
1690
1690
|
getValue() {
|
|
@@ -1786,7 +1786,7 @@ class Ci extends ci {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
const st = new Ke(), Oi = (t, e, r) => {
|
|
1788
1788
|
t.auth = new Ci(t.store, t.transport), t.stores.status.listen((o) => {
|
|
1789
|
-
o ===
|
|
1789
|
+
o === Te.READY && t.auth.reLogin();
|
|
1790
1790
|
}), t.sdk.authorizationBypass = async (o, s) => {
|
|
1791
1791
|
st.getSchema() === o && st.getExternalToken() === s && t.transport.getHeader("authorization") || (await t.auth.login(o, s), st.setSchema(o), st.setExternalToken(s));
|
|
1792
1792
|
}, t.sdk.logout = () => {
|
|
@@ -1800,15 +1800,15 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1800
1800
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1801
1801
|
if (t.stores.enabled.get() === "on")
|
|
1802
1802
|
return { enabled: !0 };
|
|
1803
|
-
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(
|
|
1803
|
+
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(Te.INITIALIZATION);
|
|
1804
1804
|
try {
|
|
1805
1805
|
const o = await t.stores.organizationSettings.getValue();
|
|
1806
|
-
return o ? (t.stores.status.setValue(
|
|
1806
|
+
return o ? (t.stores.status.setValue(Te.READY), { enabled: !!o }) : (t.stores.status.setValue(Te.FAILED), { err: "failed" });
|
|
1807
1807
|
} catch (o) {
|
|
1808
|
-
return t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1808
|
+
return t.stores.enabled.setValue(), t.stores.status.setValue(Te.FAILED), { err: `${o}` };
|
|
1809
1809
|
}
|
|
1810
1810
|
}, t.sdk.disableApp = () => {
|
|
1811
|
-
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1811
|
+
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(Te.DISABLED), t.storeUnsubscribe());
|
|
1812
1812
|
}, t.sdk.createEventSession = (o) => {
|
|
1813
1813
|
t.stores.providerStreamId.setValue(o);
|
|
1814
1814
|
}, r();
|
|
@@ -1828,14 +1828,14 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1828
1828
|
}, Ri = (t) => {
|
|
1829
1829
|
const { client: e } = t.createPromiseClient(Jr, { method: "list" });
|
|
1830
1830
|
return (r) => e.list(r);
|
|
1831
|
-
},
|
|
1831
|
+
}, Ni = (t, e) => {
|
|
1832
1832
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "get", params: [t] });
|
|
1833
1833
|
return e.nanoquery.createFetcherStore(o, {
|
|
1834
1834
|
fetcher: async (s, u, l) => (await r.get({
|
|
1835
1835
|
eventId: l
|
|
1836
1836
|
})).data?.attributes
|
|
1837
1837
|
});
|
|
1838
|
-
},
|
|
1838
|
+
}, Li = (t, e) => {
|
|
1839
1839
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "syncQuestion", params: [t] });
|
|
1840
1840
|
return e.nanoquery.createFetcherStore(o, {
|
|
1841
1841
|
fetcher: async (s, u, l) => l ? (await r.syncQuestion({
|
|
@@ -1882,7 +1882,7 @@ function dr(t) {
|
|
|
1882
1882
|
let _ = 0;
|
|
1883
1883
|
const D = I.length, U = new Array(D);
|
|
1884
1884
|
for (_ = 0; _ < D; ++_)
|
|
1885
|
-
U[_] =
|
|
1885
|
+
U[_] = T(I[_]);
|
|
1886
1886
|
return U;
|
|
1887
1887
|
}
|
|
1888
1888
|
function o(I) {
|
|
@@ -1890,25 +1890,25 @@ function dr(t) {
|
|
|
1890
1890
|
if (p && Object.getPrototypeOf(I) !== Vi)
|
|
1891
1891
|
return p(I);
|
|
1892
1892
|
const D = f(I);
|
|
1893
|
-
let U,
|
|
1894
|
-
for (U = 0,
|
|
1895
|
-
e(x = D[U]) && (_[x] =
|
|
1893
|
+
let U, F, x;
|
|
1894
|
+
for (U = 0, F = D.length; U < F; ++U)
|
|
1895
|
+
e(x = D[U]) && (_[x] = T(I[x]));
|
|
1896
1896
|
return _;
|
|
1897
1897
|
}
|
|
1898
1898
|
function s(I, _) {
|
|
1899
1899
|
const D = I.length, U = _.length;
|
|
1900
|
-
let
|
|
1900
|
+
let F = 0;
|
|
1901
1901
|
const x = new Array(D + U);
|
|
1902
|
-
for (
|
|
1903
|
-
x[
|
|
1904
|
-
for (
|
|
1905
|
-
x[
|
|
1902
|
+
for (F = 0; F < D; ++F)
|
|
1903
|
+
x[F] = T(I[F]);
|
|
1904
|
+
for (F = 0; F < U; ++F)
|
|
1905
|
+
x[F + D] = T(_[F]);
|
|
1906
1906
|
return x;
|
|
1907
1907
|
}
|
|
1908
1908
|
const u = Object.prototype.propertyIsEnumerable;
|
|
1909
1909
|
function l(I) {
|
|
1910
1910
|
const _ = Object.keys(I), D = Object.getOwnPropertySymbols(I);
|
|
1911
|
-
for (let U = 0,
|
|
1911
|
+
for (let U = 0, F = D.length; U < F; ++U)
|
|
1912
1912
|
u.call(I, D[U]) && _.push(D[U]);
|
|
1913
1913
|
return _;
|
|
1914
1914
|
}
|
|
@@ -1919,30 +1919,30 @@ function dr(t) {
|
|
|
1919
1919
|
function g(I) {
|
|
1920
1920
|
return typeof I != "object" || I === null;
|
|
1921
1921
|
}
|
|
1922
|
-
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:
|
|
1923
|
-
function
|
|
1922
|
+
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: T, deepmerge: P, getKeys: f, isMergeableObject: w }) : s;
|
|
1923
|
+
function T(I) {
|
|
1924
1924
|
return w(I) ? Array.isArray(I) ? r(I) : o(I) : I;
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1927
|
-
const D = {}, U = f(I),
|
|
1926
|
+
function N(I, _) {
|
|
1927
|
+
const D = {}, U = f(I), F = f(_);
|
|
1928
1928
|
let x, k, G;
|
|
1929
1929
|
for (x = 0, k = U.length; x < k; ++x)
|
|
1930
|
-
e(G = U[x]) &&
|
|
1931
|
-
for (x = 0, k =
|
|
1932
|
-
e(G =
|
|
1933
|
-
(D[G] =
|
|
1930
|
+
e(G = U[x]) && F.indexOf(G) === -1 && (D[G] = T(I[G]));
|
|
1931
|
+
for (x = 0, k = F.length; x < k; ++x)
|
|
1932
|
+
e(G = F[x]) && (G in I && (U.indexOf(G) !== -1 && (D[G] = P(I[G], _[G])), !0) || // eslint-disable-line no-mixed-operators
|
|
1933
|
+
(D[G] = T(_[G])));
|
|
1934
1934
|
return D;
|
|
1935
1935
|
}
|
|
1936
1936
|
function P(I, _) {
|
|
1937
1937
|
const D = Array.isArray(_), U = Array.isArray(I);
|
|
1938
|
-
return g(_) ? _ : m(I) ?
|
|
1938
|
+
return g(_) ? _ : m(I) ? T(_) : D && U ? E(I, _) : D !== U ? T(_) : N(I, _);
|
|
1939
1939
|
}
|
|
1940
1940
|
function K() {
|
|
1941
1941
|
switch (arguments.length) {
|
|
1942
1942
|
case 0:
|
|
1943
1943
|
return {};
|
|
1944
1944
|
case 1:
|
|
1945
|
-
return
|
|
1945
|
+
return T(arguments[0]);
|
|
1946
1946
|
case 2:
|
|
1947
1947
|
return P(arguments[0], arguments[1]);
|
|
1948
1948
|
}
|
|
@@ -1966,7 +1966,7 @@ const qi = (t) => (e, r) => {
|
|
|
1966
1966
|
const o = Hr([e, r], (l, f) => {
|
|
1967
1967
|
if (l && f.data)
|
|
1968
1968
|
return f.data.find((p) => p.id === l);
|
|
1969
|
-
}), s =
|
|
1969
|
+
}), s = $e({
|
|
1970
1970
|
data: void 0,
|
|
1971
1971
|
loading: void 0,
|
|
1972
1972
|
error: void 0
|
|
@@ -2014,7 +2014,7 @@ class zi {
|
|
|
2014
2014
|
constructor(e) {
|
|
2015
2015
|
if (e.gamification)
|
|
2016
2016
|
throw new Error("GamificationBackground Singleton error");
|
|
2017
|
-
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(
|
|
2017
|
+
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(Ni(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new pe(Di(this.slStreamId, e.transport), "gamification:feedList"), this.activeQuestionId = new pe(Li(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = Gi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2018
2018
|
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = $i(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
|
|
2019
2019
|
window.requestAnimationFrame(() => {
|
|
2020
2020
|
this.openedQuestion.updateExtendedQuestion(o.data?.attributes?.question);
|
|
@@ -2141,10 +2141,10 @@ class Hi extends hr {
|
|
|
2141
2141
|
this.clear();
|
|
2142
2142
|
};
|
|
2143
2143
|
}
|
|
2144
|
-
var
|
|
2144
|
+
var Ne;
|
|
2145
2145
|
(function(t) {
|
|
2146
2146
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2147
|
-
})(
|
|
2147
|
+
})(Ne || (Ne = {}));
|
|
2148
2148
|
class Wi {
|
|
2149
2149
|
queue;
|
|
2150
2150
|
storage;
|
|
@@ -2187,15 +2187,15 @@ class un extends hr {
|
|
|
2187
2187
|
};
|
|
2188
2188
|
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }) => this.read(At.ONBOARDING, o, e, r);
|
|
2189
2189
|
}
|
|
2190
|
-
const
|
|
2190
|
+
const Tr = {
|
|
2191
2191
|
pageSize: 10
|
|
2192
2192
|
}, eo = (t, e, r) => {
|
|
2193
|
-
const o = ne({ pageSize: r?.pageSize ||
|
|
2193
|
+
const o = ne({ pageSize: r?.pageSize || Tr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u = Ri(t), l = async (w) => {
|
|
2194
2194
|
if (w) {
|
|
2195
2195
|
s.setKey("loading", !0);
|
|
2196
2196
|
const g = {
|
|
2197
2197
|
eventId: w,
|
|
2198
|
-
pagination: { page: 0, pageSize: r?.pageSize ||
|
|
2198
|
+
pagination: { page: 0, pageSize: r?.pageSize || Tr.pageSize }
|
|
2199
2199
|
}, m = await u(g);
|
|
2200
2200
|
s.set({ data: m.data.map((E) => E.attributes), loading: !1 }), o.set(g.pagination);
|
|
2201
2201
|
}
|
|
@@ -2208,12 +2208,12 @@ const Fr = {
|
|
|
2208
2208
|
const g = e.get(), m = s.get().data?.length || 0;
|
|
2209
2209
|
if (w.page > 0 && g && m >= w.page * w.pageSize) {
|
|
2210
2210
|
s.setKey("loading", !0);
|
|
2211
|
-
const
|
|
2211
|
+
const T = await u({
|
|
2212
2212
|
eventId: g,
|
|
2213
2213
|
pagination: w
|
|
2214
|
-
}),
|
|
2214
|
+
}), N = s.get().data || [];
|
|
2215
2215
|
s.set({
|
|
2216
|
-
data: [...
|
|
2216
|
+
data: [...N, ...T.data.map((P) => P.attributes)],
|
|
2217
2217
|
loading: !1
|
|
2218
2218
|
});
|
|
2219
2219
|
}
|
|
@@ -2238,7 +2238,7 @@ const no = (t, e, r, o) => {
|
|
|
2238
2238
|
const s = new un(), u = ne(re.Completed), l = () => {
|
|
2239
2239
|
const { inplayGame: w = {} } = t.featureSettings.get(), g = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2240
2240
|
o.add({
|
|
2241
|
-
type:
|
|
2241
|
+
type: Ne.ONBOARDING,
|
|
2242
2242
|
id: g,
|
|
2243
2243
|
action: t.openFeature,
|
|
2244
2244
|
close: () => {
|
|
@@ -2246,7 +2246,7 @@ const no = (t, e, r, o) => {
|
|
|
2246
2246
|
},
|
|
2247
2247
|
autoHideDuration: 1e6,
|
|
2248
2248
|
data: {
|
|
2249
|
-
questionType:
|
|
2249
|
+
questionType: Fe.UNSET,
|
|
2250
2250
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2251
2251
|
// @ts-ignore
|
|
2252
2252
|
onboarding: { ...w }
|
|
@@ -2268,8 +2268,8 @@ const no = (t, e, r, o) => {
|
|
|
2268
2268
|
const m = await e.moderation.getValue();
|
|
2269
2269
|
if (u.get() === re.Completed)
|
|
2270
2270
|
return;
|
|
2271
|
-
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed),
|
|
2272
|
-
E ?
|
|
2271
|
+
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed), T = !!t.featureSettings.get().inplayGame?.titleCard?.optIn;
|
|
2272
|
+
E ? T ? u.set(re.Required) : u.set(re.Optional) : T ? u.set(re.Unavailable) : u.set(re.Disabled);
|
|
2273
2273
|
};
|
|
2274
2274
|
return f(), e.userId.subscribe((w) => {
|
|
2275
2275
|
w && f();
|
|
@@ -2283,7 +2283,7 @@ const no = (t, e, r, o) => {
|
|
|
2283
2283
|
eventId: w
|
|
2284
2284
|
}, re.Completed));
|
|
2285
2285
|
} };
|
|
2286
|
-
}, io = /* @__PURE__ */ new Set([
|
|
2286
|
+
}, io = /* @__PURE__ */ new Set([Fe.POLL, Fe.PREDICTION, Fe.TRIVIA]);
|
|
2287
2287
|
class oo extends lr {
|
|
2288
2288
|
/** user statistics (leaderboard panel) */
|
|
2289
2289
|
userSummary;
|
|
@@ -2310,12 +2310,12 @@ class oo extends lr {
|
|
|
2310
2310
|
storage;
|
|
2311
2311
|
constructor(e, r, o) {
|
|
2312
2312
|
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(Pi(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.openedUser = ne(void 0), this.leaderboardId = new de(ne(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = no(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 = ro(this.transport, this.background.slStreamId), this.leaderboardList = eo(this.transport, this.background.slStreamId), this.status.subscribe((s) => {
|
|
2313
|
-
s ===
|
|
2313
|
+
s === De.Ready ? this.connect(o.transport) : this.disconnect();
|
|
2314
2314
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2315
2315
|
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 === dt.ACTIVE) {
|
|
2316
2316
|
if (io.has(s.data.question.type))
|
|
2317
2317
|
this.notifications.add({
|
|
2318
|
-
type:
|
|
2318
|
+
type: Ne.QUESTION,
|
|
2319
2319
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2320
2320
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2321
2321
|
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
@@ -2327,7 +2327,7 @@ class oo extends lr {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
}
|
|
2329
2329
|
});
|
|
2330
|
-
else if (s.data.question.type ===
|
|
2330
|
+
else if (s.data.question.type === Fe.FACTOID) {
|
|
2331
2331
|
const u = s.data.question.options?.options.value, l = {
|
|
2332
2332
|
heading: s.data.question.notification.title,
|
|
2333
2333
|
body: s.data.question.notification.body,
|
|
@@ -2343,7 +2343,7 @@ class oo extends lr {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
};
|
|
2345
2345
|
this.notifications.add({
|
|
2346
|
-
type:
|
|
2346
|
+
type: Ne.QUESTION,
|
|
2347
2347
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2348
2348
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2349
2349
|
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
@@ -2353,6 +2353,31 @@ class oo extends lr {
|
|
|
2353
2353
|
insight: l
|
|
2354
2354
|
}
|
|
2355
2355
|
});
|
|
2356
|
+
} else if (s.data.question.type === Fe.TWEET) {
|
|
2357
|
+
const u = s.data.question.options?.options.value, l = {
|
|
2358
|
+
title: s.data.question.notification.title,
|
|
2359
|
+
body: s.data.question.notification.body,
|
|
2360
|
+
image: s.data.question.notification.image,
|
|
2361
|
+
account: {
|
|
2362
|
+
// ToDo: add later
|
|
2363
|
+
image: "",
|
|
2364
|
+
name: u?.tweetMeta?.account || "",
|
|
2365
|
+
// ToDo: add later
|
|
2366
|
+
userName: "",
|
|
2367
|
+
verified: !!u?.tweetMeta?.accountVerified
|
|
2368
|
+
}
|
|
2369
|
+
};
|
|
2370
|
+
this.notifications.add({
|
|
2371
|
+
type: Ne.QUESTION,
|
|
2372
|
+
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2373
|
+
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2374
|
+
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
2375
|
+
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2376
|
+
data: {
|
|
2377
|
+
questionType: s.data.question.type,
|
|
2378
|
+
tweet: l
|
|
2379
|
+
}
|
|
2380
|
+
});
|
|
2356
2381
|
}
|
|
2357
2382
|
}
|
|
2358
2383
|
});
|
|
@@ -2364,18 +2389,18 @@ class oo extends lr {
|
|
|
2364
2389
|
if (!o)
|
|
2365
2390
|
return;
|
|
2366
2391
|
const { status: s, type: u, id: l } = o;
|
|
2367
|
-
if (s === dt.RESOLVED && u ===
|
|
2392
|
+
if (s === dt.RESOLVED && u === Fe.PREDICTION) {
|
|
2368
2393
|
const f = this.background.getCurrentSessionId({
|
|
2369
2394
|
prefix: `notification-id:${l}`
|
|
2370
2395
|
}), p = await sn(l, e), w = p?.answers.find(({ correct: m }) => m), g = p?.answers.find(({ youVoted: m }) => m);
|
|
2371
2396
|
this.notifications.add({
|
|
2372
|
-
type:
|
|
2397
|
+
type: Ne.QUESTION_RESOLVED,
|
|
2373
2398
|
action: () => this.openQuestion(l),
|
|
2374
2399
|
close: () => this.closeQuestion(l),
|
|
2375
2400
|
autoHideDuration: 35e3,
|
|
2376
2401
|
id: f,
|
|
2377
2402
|
data: {
|
|
2378
|
-
questionType:
|
|
2403
|
+
questionType: Fe.PREDICTION,
|
|
2379
2404
|
question: {
|
|
2380
2405
|
title: w?.youVoted ? `Congratulations! You answered correctly! You won ${w.points} pts!` : `Better luck next time! Correct: ${w?.text}!`,
|
|
2381
2406
|
votedAnswer: {
|
|
@@ -2425,10 +2450,10 @@ class so extends lr {
|
|
|
2425
2450
|
background;
|
|
2426
2451
|
constructor(e, r, o) {
|
|
2427
2452
|
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) => {
|
|
2428
|
-
s ===
|
|
2453
|
+
s === De.Ready ? this.connect() : this.disconnect();
|
|
2429
2454
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2430
|
-
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type ===
|
|
2431
|
-
type:
|
|
2455
|
+
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Fe.FACTOID && s.data.question.status === dt.ACTIVE && this.notifications.add({
|
|
2456
|
+
type: Ne.QUESTION,
|
|
2432
2457
|
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2433
2458
|
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
2434
2459
|
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
@@ -2544,8 +2569,8 @@ function cn(t, e, r) {
|
|
|
2544
2569
|
paused: !1,
|
|
2545
2570
|
concurrency: r,
|
|
2546
2571
|
running: w,
|
|
2547
|
-
resume:
|
|
2548
|
-
idle:
|
|
2572
|
+
resume: T,
|
|
2573
|
+
idle: N,
|
|
2549
2574
|
length: m,
|
|
2550
2575
|
getQueue: E,
|
|
2551
2576
|
unshift: K,
|
|
@@ -2562,35 +2587,35 @@ function cn(t, e, r) {
|
|
|
2562
2587
|
p.paused = !0;
|
|
2563
2588
|
}
|
|
2564
2589
|
function m() {
|
|
2565
|
-
for (var
|
|
2566
|
-
|
|
2590
|
+
for (var F = s, x = 0; F; )
|
|
2591
|
+
F = F.next, x++;
|
|
2567
2592
|
return x;
|
|
2568
2593
|
}
|
|
2569
2594
|
function E() {
|
|
2570
|
-
for (var
|
|
2571
|
-
x.push(
|
|
2595
|
+
for (var F = s, x = []; F; )
|
|
2596
|
+
x.push(F.value), F = F.next;
|
|
2572
2597
|
return x;
|
|
2573
2598
|
}
|
|
2574
|
-
function
|
|
2599
|
+
function T() {
|
|
2575
2600
|
if (p.paused) {
|
|
2576
2601
|
p.paused = !1;
|
|
2577
|
-
for (var
|
|
2602
|
+
for (var F = 0; F < p.concurrency; F++)
|
|
2578
2603
|
l++, I();
|
|
2579
2604
|
}
|
|
2580
2605
|
}
|
|
2581
|
-
function
|
|
2606
|
+
function N() {
|
|
2582
2607
|
return l === 0 && p.length() === 0;
|
|
2583
2608
|
}
|
|
2584
|
-
function P(
|
|
2609
|
+
function P(F, x) {
|
|
2585
2610
|
var k = o.get();
|
|
2586
|
-
k.context = t, k.release = I, k.value =
|
|
2611
|
+
k.context = t, k.release = I, k.value = F, k.callback = x || ae, k.errorHandler = f, 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));
|
|
2587
2612
|
}
|
|
2588
|
-
function K(
|
|
2613
|
+
function K(F, x) {
|
|
2589
2614
|
var k = o.get();
|
|
2590
|
-
k.context = t, k.release = I, k.value =
|
|
2615
|
+
k.context = t, k.release = I, k.value = F, k.callback = x || ae, l === p.concurrency || p.paused ? s ? (k.next = s, s = k) : (s = k, u = k, p.saturated()) : (l++, e.call(t, k.value, k.worked));
|
|
2591
2616
|
}
|
|
2592
|
-
function I(
|
|
2593
|
-
|
|
2617
|
+
function I(F) {
|
|
2618
|
+
F && o.release(F);
|
|
2594
2619
|
var x = s;
|
|
2595
2620
|
x ? p.paused ? l-- : (u === s && (u = null), s = x.next, x.next = null, e.call(t, x.value, x.worked), u === null && p.empty()) : --l === 0 && p.drain();
|
|
2596
2621
|
}
|
|
@@ -2600,8 +2625,8 @@ function cn(t, e, r) {
|
|
|
2600
2625
|
function D() {
|
|
2601
2626
|
s = null, u = null, p.drain(), p.drain = ae;
|
|
2602
2627
|
}
|
|
2603
|
-
function U(
|
|
2604
|
-
f =
|
|
2628
|
+
function U(F) {
|
|
2629
|
+
f = F;
|
|
2605
2630
|
}
|
|
2606
2631
|
}
|
|
2607
2632
|
function ae() {
|
|
@@ -2624,10 +2649,10 @@ function yo(t, e, r) {
|
|
|
2624
2649
|
var s = cn(t, o, r), u = s.push, l = s.unshift;
|
|
2625
2650
|
return s.push = f, s.unshift = p, s.drained = w, s;
|
|
2626
2651
|
function f(g) {
|
|
2627
|
-
var m = new Promise(function(E,
|
|
2628
|
-
u(g, function(
|
|
2629
|
-
if (
|
|
2630
|
-
|
|
2652
|
+
var m = new Promise(function(E, T) {
|
|
2653
|
+
u(g, function(N, P) {
|
|
2654
|
+
if (N) {
|
|
2655
|
+
T(N);
|
|
2631
2656
|
return;
|
|
2632
2657
|
}
|
|
2633
2658
|
E(P);
|
|
@@ -2636,10 +2661,10 @@ function yo(t, e, r) {
|
|
|
2636
2661
|
return m.catch(ae), m;
|
|
2637
2662
|
}
|
|
2638
2663
|
function p(g) {
|
|
2639
|
-
var m = new Promise(function(E,
|
|
2640
|
-
l(g, function(
|
|
2641
|
-
if (
|
|
2642
|
-
|
|
2664
|
+
var m = new Promise(function(E, T) {
|
|
2665
|
+
l(g, function(N, P) {
|
|
2666
|
+
if (N) {
|
|
2667
|
+
T(N);
|
|
2643
2668
|
return;
|
|
2644
2669
|
}
|
|
2645
2670
|
E(P);
|
|
@@ -2662,7 +2687,7 @@ function yo(t, e, r) {
|
|
|
2662
2687
|
}
|
|
2663
2688
|
gr.exports = cn;
|
|
2664
2689
|
gr.exports.promise = yo;
|
|
2665
|
-
var fn = gr.exports, mr = { exports: {} }, Je = typeof Reflect == "object" ? Reflect : null,
|
|
2690
|
+
var fn = gr.exports, mr = { exports: {} }, Je = typeof Reflect == "object" ? Reflect : null, Fr = Je && typeof Je.apply == "function" ? Je.apply : function(e, r, o) {
|
|
2666
2691
|
return Function.prototype.apply.call(e, r, o);
|
|
2667
2692
|
}, gt;
|
|
2668
2693
|
Je && typeof Je.ownKeys == "function" ? gt = Je.ownKeys : Object.getOwnPropertySymbols ? gt = function(e) {
|
|
@@ -2734,10 +2759,10 @@ q.prototype.emit = function(e) {
|
|
|
2734
2759
|
if (p === void 0)
|
|
2735
2760
|
return !1;
|
|
2736
2761
|
if (typeof p == "function")
|
|
2737
|
-
|
|
2762
|
+
Fr(p, this, r);
|
|
2738
2763
|
else
|
|
2739
2764
|
for (var w = p.length, g = mn(p, w), o = 0; o < w; ++o)
|
|
2740
|
-
|
|
2765
|
+
Fr(g[o], this, r);
|
|
2741
2766
|
return !0;
|
|
2742
2767
|
};
|
|
2743
2768
|
function pn(t, e, r, o) {
|
|
@@ -2915,8 +2940,8 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2915
2940
|
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Eo();
|
|
2916
2941
|
}, Or = {
|
|
2917
2942
|
foo: {}
|
|
2918
|
-
},
|
|
2919
|
-
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof
|
|
2943
|
+
}, To = Object, Fo = function() {
|
|
2944
|
+
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof To);
|
|
2920
2945
|
}, _o = "Function.prototype.bind called on incompatible ", Co = Object.prototype.toString, Oo = Math.max, xo = "[object Function]", xr = function(e, r) {
|
|
2921
2946
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2922
2947
|
o[s] = e[s];
|
|
@@ -2955,7 +2980,7 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2955
2980
|
w.prototype = r.prototype, s.prototype = new w(), w.prototype = null;
|
|
2956
2981
|
}
|
|
2957
2982
|
return s;
|
|
2958
|
-
}, Ro = Po, An = Function.prototype.bind || Ro, Br = {}.hasOwnProperty, Ut = Function.prototype.call,
|
|
2983
|
+
}, Ro = Po, An = Function.prototype.bind || Ro, Br = {}.hasOwnProperty, Ut = Function.prototype.call, No = Ut.bind ? Ut.bind(Br) : function(t, e) {
|
|
2959
2984
|
return Ut.call(Br, t, e);
|
|
2960
2985
|
}, $, Xe = SyntaxError, En = Function, Ye = TypeError, $t = function(t) {
|
|
2961
2986
|
try {
|
|
@@ -2971,7 +2996,7 @@ if (je)
|
|
|
2971
2996
|
}
|
|
2972
2997
|
var Dt = function() {
|
|
2973
2998
|
throw new Ye();
|
|
2974
|
-
},
|
|
2999
|
+
}, Lo = je ? function() {
|
|
2975
3000
|
try {
|
|
2976
3001
|
return arguments.callee, Dt;
|
|
2977
3002
|
} catch {
|
|
@@ -2981,7 +3006,7 @@ var Dt = function() {
|
|
|
2981
3006
|
return Dt;
|
|
2982
3007
|
}
|
|
2983
3008
|
}
|
|
2984
|
-
}() : Dt, Qe = Io(), Uo =
|
|
3009
|
+
}() : Dt, Qe = Io(), Uo = Fo(), X = Object.getPrototypeOf || (Uo ? function(t) {
|
|
2985
3010
|
return t.__proto__;
|
|
2986
3011
|
} : null), ze = {}, $o = typeof Uint8Array > "u" || !X ? $ : X(Uint8Array), Ve = {
|
|
2987
3012
|
"%AggregateError%": typeof AggregateError > "u" ? $ : AggregateError,
|
|
@@ -3040,7 +3065,7 @@ var Dt = function() {
|
|
|
3040
3065
|
"%StringIteratorPrototype%": Qe && X ? X(""[Symbol.iterator]()) : $,
|
|
3041
3066
|
"%Symbol%": Qe ? Symbol : $,
|
|
3042
3067
|
"%SyntaxError%": Xe,
|
|
3043
|
-
"%ThrowTypeError%":
|
|
3068
|
+
"%ThrowTypeError%": Lo,
|
|
3044
3069
|
"%TypedArray%": $o,
|
|
3045
3070
|
"%TypeError%": Ye,
|
|
3046
3071
|
"%Uint8Array%": typeof Uint8Array > "u" ? $ : Uint8Array,
|
|
@@ -3127,7 +3152,7 @@ var jo = function t(e) {
|
|
|
3127
3152
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3128
3153
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3129
3154
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3130
|
-
}, lt = An, Et =
|
|
3155
|
+
}, lt = An, Et = No, Vo = lt.call(Function.call, Array.prototype.concat), Mo = lt.call(Function.apply, Array.prototype.splice), Pr = lt.call(Function.call, String.prototype.replace), It = lt.call(Function.call, String.prototype.slice), qo = lt.call(Function.call, RegExp.prototype.exec), Qo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Go = /\\(\\)?/g, zo = function(e) {
|
|
3131
3156
|
var r = It(e, 0, 1), o = It(e, -1);
|
|
3132
3157
|
if (r === "%" && o !== "%")
|
|
3133
3158
|
throw new Xe("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -3160,8 +3185,8 @@ var jo = function t(e) {
|
|
|
3160
3185
|
var o = zo(e), s = o.length > 0 ? o[0] : "", u = Ko("%" + s + "%", r), l = u.name, f = u.value, p = !1, w = u.alias;
|
|
3161
3186
|
w && (s = w[0], Mo(o, Vo([0, 1], w)));
|
|
3162
3187
|
for (var g = 1, m = !0; g < o.length; g += 1) {
|
|
3163
|
-
var E = o[g],
|
|
3164
|
-
if ((
|
|
3188
|
+
var E = o[g], T = It(E, 0, 1), N = It(E, -1);
|
|
3189
|
+
if ((T === '"' || T === "'" || T === "`" || N === '"' || N === "'" || N === "`") && T !== N)
|
|
3165
3190
|
throw new Xe("property names with quotes must have matching quotes");
|
|
3166
3191
|
if ((E === "constructor" || !m) && (p = !0), s += "." + E, l = "%" + s + "%", Et(Ve, l))
|
|
3167
3192
|
f = Ve[l];
|
|
@@ -3198,14 +3223,14 @@ tr.hasArrayLengthDefineBug = function() {
|
|
|
3198
3223
|
return !0;
|
|
3199
3224
|
}
|
|
3200
3225
|
};
|
|
3201
|
-
var
|
|
3226
|
+
var Tn = tr, Wo = et, mt = Wo("%Object.getOwnPropertyDescriptor%", !0);
|
|
3202
3227
|
if (mt)
|
|
3203
3228
|
try {
|
|
3204
3229
|
mt([], "length");
|
|
3205
3230
|
} catch {
|
|
3206
3231
|
mt = null;
|
|
3207
3232
|
}
|
|
3208
|
-
var wr = mt, Jo =
|
|
3233
|
+
var wr = mt, Jo = Tn(), vr = et, ut = Jo && vr("%Object.defineProperty%", !0);
|
|
3209
3234
|
if (ut)
|
|
3210
3235
|
try {
|
|
3211
3236
|
ut({}, "a", { value: 1 });
|
|
@@ -3237,17 +3262,17 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3237
3262
|
e[r] = o;
|
|
3238
3263
|
else
|
|
3239
3264
|
throw new Yo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3240
|
-
},
|
|
3265
|
+
}, Fn = et, Nr = Xo, Zo = Tn(), Lr = wr, Ur = Fn("%TypeError%"), es = Fn("%Math.floor%"), ts = function(e, r) {
|
|
3241
3266
|
if (typeof e != "function")
|
|
3242
3267
|
throw new Ur("`fn` is not a function");
|
|
3243
3268
|
if (typeof r != "number" || r < 0 || r > 4294967295 || es(r) !== r)
|
|
3244
3269
|
throw new Ur("`length` must be a positive 32-bit integer");
|
|
3245
3270
|
var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
|
|
3246
|
-
if ("length" in e &&
|
|
3247
|
-
var l =
|
|
3271
|
+
if ("length" in e && Lr) {
|
|
3272
|
+
var l = Lr(e, "length");
|
|
3248
3273
|
l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
|
|
3249
3274
|
}
|
|
3250
|
-
return (s || u || !o) && (Zo ?
|
|
3275
|
+
return (s || u || !o) && (Zo ? Nr(e, "length", r, !0, !0) : Nr(e, "length", r)), e;
|
|
3251
3276
|
};
|
|
3252
3277
|
(function(t) {
|
|
3253
3278
|
var e = An, r = et, o = ts, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(l, u), p = r("%Object.defineProperty%", !0), w = r("%Math.max%");
|
|
@@ -3260,9 +3285,9 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3260
3285
|
t.exports = function(E) {
|
|
3261
3286
|
if (typeof E != "function")
|
|
3262
3287
|
throw new s("a function is required");
|
|
3263
|
-
var
|
|
3288
|
+
var T = f(e, l, arguments);
|
|
3264
3289
|
return o(
|
|
3265
|
-
|
|
3290
|
+
T,
|
|
3266
3291
|
1 + w(0, E.length - (arguments.length - 1)),
|
|
3267
3292
|
!0
|
|
3268
3293
|
);
|
|
@@ -3372,10 +3397,10 @@ var As = He ? function(e) {
|
|
|
3372
3397
|
return !1;
|
|
3373
3398
|
var r = wt.call(e);
|
|
3374
3399
|
return r !== ds && r !== ys && !/^\[object HTML/.test(r) ? !1 : Mt(e);
|
|
3375
|
-
}, Es = As, Is = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty,
|
|
3400
|
+
}, Es = As, Is = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty, Ts = function(e, r, o) {
|
|
3376
3401
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3377
3402
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3378
|
-
},
|
|
3403
|
+
}, Fs = function(e, r, o) {
|
|
3379
3404
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3380
3405
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3381
3406
|
}, _s = function(e, r, o) {
|
|
@@ -3385,7 +3410,7 @@ var As = He ? function(e) {
|
|
|
3385
3410
|
if (!Es(r))
|
|
3386
3411
|
throw new TypeError("iterator must be a function");
|
|
3387
3412
|
var s;
|
|
3388
|
-
arguments.length >= 3 && (s = o), Is.call(e) === "[object Array]" ?
|
|
3413
|
+
arguments.length >= 3 && (s = o), Is.call(e) === "[object Array]" ? Ts(e, r, s) : typeof e == "string" ? Fs(e, r, s) : _s(e, r, s);
|
|
3389
3414
|
}, Os = Cs, qt = [
|
|
3390
3415
|
"BigInt64Array",
|
|
3391
3416
|
"BigUint64Array",
|
|
@@ -3402,13 +3427,13 @@ var As = He ? function(e) {
|
|
|
3402
3427
|
for (var e = [], r = 0; r < qt.length; r++)
|
|
3403
3428
|
typeof xs[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3404
3429
|
return e;
|
|
3405
|
-
},
|
|
3430
|
+
}, Tt = Os, ks = Bs, $r = _n, Sr = xn, vt = wr, Ps = Sr("Object.prototype.toString"), Nn = br(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = ks(), Ar = Sr("String.prototype.slice"), Qt = Object.getPrototypeOf, Rs = Sr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3406
3431
|
for (var o = 0; o < e.length; o += 1)
|
|
3407
3432
|
if (e[o] === r)
|
|
3408
3433
|
return o;
|
|
3409
3434
|
return -1;
|
|
3410
|
-
},
|
|
3411
|
-
|
|
3435
|
+
}, Ft = { __proto__: null };
|
|
3436
|
+
Nn && vt && Qt ? Tt(sr, function(t) {
|
|
3412
3437
|
var e = new Dr[t]();
|
|
3413
3438
|
if (Symbol.toStringTag in e) {
|
|
3414
3439
|
var r = Qt(e), o = vt(r, Symbol.toStringTag);
|
|
@@ -3416,43 +3441,43 @@ Ln && vt && Qt ? Ft(sr, function(t) {
|
|
|
3416
3441
|
var s = Qt(r);
|
|
3417
3442
|
o = vt(s, Symbol.toStringTag);
|
|
3418
3443
|
}
|
|
3419
|
-
|
|
3444
|
+
Ft["$" + t] = $r(o.get);
|
|
3420
3445
|
}
|
|
3421
|
-
}) :
|
|
3446
|
+
}) : Tt(sr, function(t) {
|
|
3422
3447
|
var e = new Dr[t](), r = e.slice || e.set;
|
|
3423
|
-
r && (
|
|
3448
|
+
r && (Ft["$" + t] = $r(r));
|
|
3424
3449
|
});
|
|
3425
|
-
var
|
|
3450
|
+
var Ns = function(e) {
|
|
3426
3451
|
var r = !1;
|
|
3427
|
-
return Ft
|
|
3452
|
+
return Tt(Ft, function(o, s) {
|
|
3428
3453
|
if (!r)
|
|
3429
3454
|
try {
|
|
3430
3455
|
"$" + o(e) === s && (r = Ar(s, 1));
|
|
3431
3456
|
} catch {
|
|
3432
3457
|
}
|
|
3433
3458
|
}), r;
|
|
3434
|
-
},
|
|
3459
|
+
}, Ls = function(e) {
|
|
3435
3460
|
var r = !1;
|
|
3436
|
-
return Ft
|
|
3461
|
+
return Tt(Ft, function(o, s) {
|
|
3437
3462
|
if (!r)
|
|
3438
3463
|
try {
|
|
3439
3464
|
o(e), r = Ar(s, 1);
|
|
3440
3465
|
} catch {
|
|
3441
3466
|
}
|
|
3442
3467
|
}), r;
|
|
3443
|
-
},
|
|
3468
|
+
}, Ln = function(e) {
|
|
3444
3469
|
if (!e || typeof e != "object")
|
|
3445
3470
|
return !1;
|
|
3446
|
-
if (!
|
|
3471
|
+
if (!Nn) {
|
|
3447
3472
|
var r = Ar(Ps(e), 8, -1);
|
|
3448
|
-
return Rs(sr, r) > -1 ? r : r !== "Object" ? !1 :
|
|
3473
|
+
return Rs(sr, r) > -1 ? r : r !== "Object" ? !1 : Ls(e);
|
|
3449
3474
|
}
|
|
3450
|
-
return vt ?
|
|
3451
|
-
}, Us =
|
|
3475
|
+
return vt ? Ns(e) : null;
|
|
3476
|
+
}, Us = Ln, $s = function(e) {
|
|
3452
3477
|
return !!Us(e);
|
|
3453
3478
|
};
|
|
3454
3479
|
(function(t) {
|
|
3455
|
-
var e = ss, r = ls, o =
|
|
3480
|
+
var e = ss, r = ls, o = Ln, s = $s;
|
|
3456
3481
|
function u(S) {
|
|
3457
3482
|
return S.call.bind(S);
|
|
3458
3483
|
}
|
|
@@ -3460,8 +3485,8 @@ var Ls = function(e) {
|
|
|
3460
3485
|
if (l)
|
|
3461
3486
|
var E = u(BigInt.prototype.valueOf);
|
|
3462
3487
|
if (f)
|
|
3463
|
-
var
|
|
3464
|
-
function
|
|
3488
|
+
var T = u(Symbol.prototype.valueOf);
|
|
3489
|
+
function N(S, pt) {
|
|
3465
3490
|
if (typeof S != "object")
|
|
3466
3491
|
return !1;
|
|
3467
3492
|
try {
|
|
@@ -3495,10 +3520,10 @@ var Ls = function(e) {
|
|
|
3495
3520
|
return o(S) === "Uint32Array";
|
|
3496
3521
|
}
|
|
3497
3522
|
t.isUint32Array = U;
|
|
3498
|
-
function
|
|
3523
|
+
function F(S) {
|
|
3499
3524
|
return o(S) === "Int8Array";
|
|
3500
3525
|
}
|
|
3501
|
-
t.isInt8Array =
|
|
3526
|
+
t.isInt8Array = F;
|
|
3502
3527
|
function x(S) {
|
|
3503
3528
|
return o(S) === "Int16Array";
|
|
3504
3529
|
}
|
|
@@ -3515,10 +3540,10 @@ var Ls = function(e) {
|
|
|
3515
3540
|
return o(S) === "Float64Array";
|
|
3516
3541
|
}
|
|
3517
3542
|
t.isFloat64Array = ie;
|
|
3518
|
-
function
|
|
3543
|
+
function Oe(S) {
|
|
3519
3544
|
return o(S) === "BigInt64Array";
|
|
3520
3545
|
}
|
|
3521
|
-
t.isBigInt64Array =
|
|
3546
|
+
t.isBigInt64Array = Oe;
|
|
3522
3547
|
function Se(S) {
|
|
3523
3548
|
return o(S) === "BigUint64Array";
|
|
3524
3549
|
}
|
|
@@ -3535,32 +3560,32 @@ var Ls = function(e) {
|
|
|
3535
3560
|
return p(S) === "[object Set]";
|
|
3536
3561
|
}
|
|
3537
3562
|
fe.working = typeof Set < "u" && fe(/* @__PURE__ */ new Set());
|
|
3538
|
-
function
|
|
3563
|
+
function xe(S) {
|
|
3539
3564
|
return typeof Set > "u" ? !1 : fe.working ? fe(S) : S instanceof Set;
|
|
3540
3565
|
}
|
|
3541
|
-
t.isSet =
|
|
3542
|
-
function
|
|
3566
|
+
t.isSet = xe;
|
|
3567
|
+
function Be(S) {
|
|
3543
3568
|
return p(S) === "[object WeakMap]";
|
|
3544
3569
|
}
|
|
3545
|
-
|
|
3570
|
+
Be.working = typeof WeakMap < "u" && Be(/* @__PURE__ */ new WeakMap());
|
|
3546
3571
|
function nt(S) {
|
|
3547
|
-
return typeof WeakMap > "u" ? !1 :
|
|
3572
|
+
return typeof WeakMap > "u" ? !1 : Be.working ? Be(S) : S instanceof WeakMap;
|
|
3548
3573
|
}
|
|
3549
3574
|
t.isWeakMap = nt;
|
|
3550
|
-
function
|
|
3575
|
+
function ke(S) {
|
|
3551
3576
|
return p(S) === "[object WeakSet]";
|
|
3552
3577
|
}
|
|
3553
|
-
|
|
3578
|
+
ke.working = typeof WeakSet < "u" && ke(/* @__PURE__ */ new WeakSet());
|
|
3554
3579
|
function le(S) {
|
|
3555
|
-
return
|
|
3580
|
+
return ke(S);
|
|
3556
3581
|
}
|
|
3557
3582
|
t.isWeakSet = le;
|
|
3558
|
-
function
|
|
3583
|
+
function Pe(S) {
|
|
3559
3584
|
return p(S) === "[object ArrayBuffer]";
|
|
3560
3585
|
}
|
|
3561
|
-
|
|
3586
|
+
Pe.working = typeof ArrayBuffer < "u" && Pe(new ArrayBuffer());
|
|
3562
3587
|
function H(S) {
|
|
3563
|
-
return typeof ArrayBuffer > "u" ? !1 :
|
|
3588
|
+
return typeof ArrayBuffer > "u" ? !1 : Pe.working ? Pe(S) : S instanceof ArrayBuffer;
|
|
3564
3589
|
}
|
|
3565
3590
|
t.isArrayBuffer = H;
|
|
3566
3591
|
function d(S) {
|
|
@@ -3587,10 +3612,10 @@ var Ls = function(e) {
|
|
|
3587
3612
|
return p(S) === "[object Map Iterator]";
|
|
3588
3613
|
}
|
|
3589
3614
|
t.isMapIterator = B;
|
|
3590
|
-
function
|
|
3615
|
+
function L(S) {
|
|
3591
3616
|
return p(S) === "[object Set Iterator]";
|
|
3592
3617
|
}
|
|
3593
|
-
t.isSetIterator =
|
|
3618
|
+
t.isSetIterator = L;
|
|
3594
3619
|
function M(S) {
|
|
3595
3620
|
return p(S) === "[object Generator]";
|
|
3596
3621
|
}
|
|
@@ -3600,23 +3625,23 @@ var Ls = function(e) {
|
|
|
3600
3625
|
}
|
|
3601
3626
|
t.isWebAssemblyCompiledModule = te;
|
|
3602
3627
|
function ye(S) {
|
|
3603
|
-
return
|
|
3628
|
+
return N(S, w);
|
|
3604
3629
|
}
|
|
3605
3630
|
t.isNumberObject = ye;
|
|
3606
3631
|
function he(S) {
|
|
3607
|
-
return
|
|
3632
|
+
return N(S, g);
|
|
3608
3633
|
}
|
|
3609
3634
|
t.isStringObject = he;
|
|
3610
3635
|
function oe(S) {
|
|
3611
|
-
return
|
|
3636
|
+
return N(S, m);
|
|
3612
3637
|
}
|
|
3613
3638
|
t.isBooleanObject = oe;
|
|
3614
3639
|
function Me(S) {
|
|
3615
|
-
return l &&
|
|
3640
|
+
return l && N(S, E);
|
|
3616
3641
|
}
|
|
3617
3642
|
t.isBigIntObject = Me;
|
|
3618
3643
|
function ht(S) {
|
|
3619
|
-
return f &&
|
|
3644
|
+
return f && N(S, T);
|
|
3620
3645
|
}
|
|
3621
3646
|
t.isSymbolObject = ht;
|
|
3622
3647
|
function it(S) {
|
|
@@ -3663,17 +3688,17 @@ var js = ar.exports;
|
|
|
3663
3688
|
return C;
|
|
3664
3689
|
}, r = /%[sdj%]/g;
|
|
3665
3690
|
t.format = function(d) {
|
|
3666
|
-
if (!
|
|
3691
|
+
if (!F(d)) {
|
|
3667
3692
|
for (var v = [], A = 0; A < arguments.length; A++)
|
|
3668
3693
|
v.push(l(arguments[A]));
|
|
3669
3694
|
return v.join(" ");
|
|
3670
3695
|
}
|
|
3671
|
-
for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(
|
|
3672
|
-
if (
|
|
3696
|
+
for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(L) {
|
|
3697
|
+
if (L === "%%")
|
|
3673
3698
|
return "%";
|
|
3674
3699
|
if (A >= j)
|
|
3675
|
-
return
|
|
3676
|
-
switch (
|
|
3700
|
+
return L;
|
|
3701
|
+
switch (L) {
|
|
3677
3702
|
case "%s":
|
|
3678
3703
|
return String(C[A++]);
|
|
3679
3704
|
case "%d":
|
|
@@ -3685,7 +3710,7 @@ var js = ar.exports;
|
|
|
3685
3710
|
return "[Circular]";
|
|
3686
3711
|
}
|
|
3687
3712
|
default:
|
|
3688
|
-
return
|
|
3713
|
+
return L;
|
|
3689
3714
|
}
|
|
3690
3715
|
}), B = C[A]; A < j; B = C[++A])
|
|
3691
3716
|
_(B) || !ie(B) ? V += " " + B : V += " " + l(B);
|
|
@@ -3776,7 +3801,7 @@ var js = ar.exports;
|
|
|
3776
3801
|
v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3777
3802
|
!(v.constructor && v.constructor.prototype === v)) {
|
|
3778
3803
|
var C = v.inspect(A, d);
|
|
3779
|
-
return
|
|
3804
|
+
return F(C) || (C = g(d, C, A)), C;
|
|
3780
3805
|
}
|
|
3781
3806
|
var j = m(d, v);
|
|
3782
3807
|
if (j)
|
|
@@ -3786,12 +3811,12 @@ var js = ar.exports;
|
|
|
3786
3811
|
return E(v);
|
|
3787
3812
|
if (V.length === 0) {
|
|
3788
3813
|
if (ce(v)) {
|
|
3789
|
-
var
|
|
3790
|
-
return d.stylize("[Function" +
|
|
3814
|
+
var L = v.name ? ": " + v.name : "";
|
|
3815
|
+
return d.stylize("[Function" + L + "]", "special");
|
|
3791
3816
|
}
|
|
3792
3817
|
if (G(v))
|
|
3793
3818
|
return d.stylize(RegExp.prototype.toString.call(v), "regexp");
|
|
3794
|
-
if (
|
|
3819
|
+
if (Oe(v))
|
|
3795
3820
|
return d.stylize(Date.prototype.toString.call(v), "date");
|
|
3796
3821
|
if (Se(v))
|
|
3797
3822
|
return E(v);
|
|
@@ -3801,20 +3826,20 @@ var js = ar.exports;
|
|
|
3801
3826
|
var he = v.name ? ": " + v.name : "";
|
|
3802
3827
|
M = " [Function" + he + "]";
|
|
3803
3828
|
}
|
|
3804
|
-
if (G(v) && (M = " " + RegExp.prototype.toString.call(v)),
|
|
3829
|
+
if (G(v) && (M = " " + RegExp.prototype.toString.call(v)), Oe(v) && (M = " " + Date.prototype.toUTCString.call(v)), Se(v) && (M = " " + E(v)), V.length === 0 && (!te || v.length == 0))
|
|
3805
3830
|
return ye[0] + M + ye[1];
|
|
3806
3831
|
if (A < 0)
|
|
3807
3832
|
return G(v) ? d.stylize(RegExp.prototype.toString.call(v), "regexp") : d.stylize("[Object]", "special");
|
|
3808
3833
|
d.seen.push(v);
|
|
3809
3834
|
var oe;
|
|
3810
|
-
return te ? oe =
|
|
3811
|
-
return
|
|
3835
|
+
return te ? oe = T(d, v, A, B, V) : oe = V.map(function(Me) {
|
|
3836
|
+
return N(d, v, A, B, Me, te);
|
|
3812
3837
|
}), d.seen.pop(), P(oe, M, ye);
|
|
3813
3838
|
}
|
|
3814
3839
|
function m(d, v) {
|
|
3815
3840
|
if (k(v))
|
|
3816
3841
|
return d.stylize("undefined", "undefined");
|
|
3817
|
-
if (
|
|
3842
|
+
if (F(v)) {
|
|
3818
3843
|
var A = "'" + JSON.stringify(v).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
3819
3844
|
return d.stylize(A, "string");
|
|
3820
3845
|
}
|
|
@@ -3828,9 +3853,9 @@ var js = ar.exports;
|
|
|
3828
3853
|
function E(d) {
|
|
3829
3854
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
3830
3855
|
}
|
|
3831
|
-
function
|
|
3832
|
-
for (var V = [], B = 0,
|
|
3833
|
-
|
|
3856
|
+
function T(d, v, A, C, j) {
|
|
3857
|
+
for (var V = [], B = 0, L = v.length; B < L; ++B)
|
|
3858
|
+
ke(v, String(B)) ? V.push(N(
|
|
3834
3859
|
d,
|
|
3835
3860
|
v,
|
|
3836
3861
|
A,
|
|
@@ -3839,7 +3864,7 @@ var js = ar.exports;
|
|
|
3839
3864
|
!0
|
|
3840
3865
|
)) : V.push("");
|
|
3841
3866
|
return j.forEach(function(M) {
|
|
3842
|
-
M.match(/^\d+$/) || V.push(
|
|
3867
|
+
M.match(/^\d+$/) || V.push(N(
|
|
3843
3868
|
d,
|
|
3844
3869
|
v,
|
|
3845
3870
|
A,
|
|
@@ -3849,24 +3874,24 @@ var js = ar.exports;
|
|
|
3849
3874
|
));
|
|
3850
3875
|
}), V;
|
|
3851
3876
|
}
|
|
3852
|
-
function
|
|
3853
|
-
var B,
|
|
3854
|
-
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ?
|
|
3855
|
-
`) > -1 && (V ?
|
|
3877
|
+
function N(d, v, A, C, j, V) {
|
|
3878
|
+
var B, L, M;
|
|
3879
|
+
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? L = d.stylize("[Getter/Setter]", "special") : L = d.stylize("[Getter]", "special") : M.set && (L = d.stylize("[Setter]", "special")), ke(C, j) || (B = "[" + j + "]"), L || (d.seen.indexOf(M.value) < 0 ? (_(A) ? L = g(d, M.value, null) : L = g(d, M.value, A - 1), L.indexOf(`
|
|
3880
|
+
`) > -1 && (V ? L = L.split(`
|
|
3856
3881
|
`).map(function(te) {
|
|
3857
3882
|
return " " + te;
|
|
3858
3883
|
}).join(`
|
|
3859
|
-
`).slice(2) :
|
|
3860
|
-
` +
|
|
3884
|
+
`).slice(2) : L = `
|
|
3885
|
+
` + L.split(`
|
|
3861
3886
|
`).map(function(te) {
|
|
3862
3887
|
return " " + te;
|
|
3863
3888
|
}).join(`
|
|
3864
|
-
`))) :
|
|
3889
|
+
`))) : L = d.stylize("[Circular]", "special")), k(B)) {
|
|
3865
3890
|
if (V && j.match(/^\d+$/))
|
|
3866
|
-
return
|
|
3891
|
+
return L;
|
|
3867
3892
|
B = JSON.stringify("" + j), B.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (B = B.slice(1, -1), B = d.stylize(B, "name")) : (B = B.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), B = d.stylize(B, "string"));
|
|
3868
3893
|
}
|
|
3869
|
-
return B + ": " +
|
|
3894
|
+
return B + ": " + L;
|
|
3870
3895
|
}
|
|
3871
3896
|
function P(d, v, A) {
|
|
3872
3897
|
var C = d.reduce(function(j, V) {
|
|
@@ -3898,10 +3923,10 @@ var js = ar.exports;
|
|
|
3898
3923
|
return typeof d == "number";
|
|
3899
3924
|
}
|
|
3900
3925
|
t.isNumber = U;
|
|
3901
|
-
function
|
|
3926
|
+
function F(d) {
|
|
3902
3927
|
return typeof d == "string";
|
|
3903
3928
|
}
|
|
3904
|
-
t.isString =
|
|
3929
|
+
t.isString = F;
|
|
3905
3930
|
function x(d) {
|
|
3906
3931
|
return typeof d == "symbol";
|
|
3907
3932
|
}
|
|
@@ -3918,10 +3943,10 @@ var js = ar.exports;
|
|
|
3918
3943
|
return typeof d == "object" && d !== null;
|
|
3919
3944
|
}
|
|
3920
3945
|
t.isObject = ie;
|
|
3921
|
-
function
|
|
3946
|
+
function Oe(d) {
|
|
3922
3947
|
return ie(d) && fe(d) === "[object Date]";
|
|
3923
3948
|
}
|
|
3924
|
-
t.isDate =
|
|
3949
|
+
t.isDate = Oe, t.types.isDate = Oe;
|
|
3925
3950
|
function Se(d) {
|
|
3926
3951
|
return ie(d) && (fe(d) === "[object Error]" || d instanceof Error);
|
|
3927
3952
|
}
|
|
@@ -3938,10 +3963,10 @@ var js = ar.exports;
|
|
|
3938
3963
|
function fe(d) {
|
|
3939
3964
|
return Object.prototype.toString.call(d);
|
|
3940
3965
|
}
|
|
3941
|
-
function
|
|
3966
|
+
function xe(d) {
|
|
3942
3967
|
return d < 10 ? "0" + d.toString(10) : d.toString(10);
|
|
3943
3968
|
}
|
|
3944
|
-
var
|
|
3969
|
+
var Be = [
|
|
3945
3970
|
"Jan",
|
|
3946
3971
|
"Feb",
|
|
3947
3972
|
"Mar",
|
|
@@ -3957,11 +3982,11 @@ var js = ar.exports;
|
|
|
3957
3982
|
];
|
|
3958
3983
|
function nt() {
|
|
3959
3984
|
var d = /* @__PURE__ */ new Date(), v = [
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3985
|
+
xe(d.getHours()),
|
|
3986
|
+
xe(d.getMinutes()),
|
|
3987
|
+
xe(d.getSeconds())
|
|
3963
3988
|
].join(":");
|
|
3964
|
-
return [d.getDate(),
|
|
3989
|
+
return [d.getDate(), Be[d.getMonth()], v].join(" ");
|
|
3965
3990
|
}
|
|
3966
3991
|
t.log = function() {
|
|
3967
3992
|
console.log("%s - %s", nt(), t.format.apply(t, arguments));
|
|
@@ -3972,7 +3997,7 @@ var js = ar.exports;
|
|
|
3972
3997
|
d[A[C]] = v[A[C]];
|
|
3973
3998
|
return d;
|
|
3974
3999
|
};
|
|
3975
|
-
function
|
|
4000
|
+
function ke(d, v) {
|
|
3976
4001
|
return Object.prototype.hasOwnProperty.call(d, v);
|
|
3977
4002
|
}
|
|
3978
4003
|
var le = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
@@ -3993,8 +4018,8 @@ var js = ar.exports;
|
|
|
3993
4018
|
function A() {
|
|
3994
4019
|
for (var C, j, V = new Promise(function(M, te) {
|
|
3995
4020
|
C = M, j = te;
|
|
3996
|
-
}), B = [],
|
|
3997
|
-
B.push(arguments[
|
|
4021
|
+
}), B = [], L = 0; L < arguments.length; L++)
|
|
4022
|
+
B.push(arguments[L]);
|
|
3998
4023
|
B.push(function(M, te) {
|
|
3999
4024
|
M ? j(M) : C(te);
|
|
4000
4025
|
});
|
|
@@ -4015,7 +4040,7 @@ var js = ar.exports;
|
|
|
4015
4040
|
e(v)
|
|
4016
4041
|
);
|
|
4017
4042
|
}, t.promisify.custom = le;
|
|
4018
|
-
function
|
|
4043
|
+
function Pe(d, v) {
|
|
4019
4044
|
if (!d) {
|
|
4020
4045
|
var A = new Error("Promise was rejected with a falsy value");
|
|
4021
4046
|
A.reason = d, d = A;
|
|
@@ -4035,11 +4060,11 @@ var js = ar.exports;
|
|
|
4035
4060
|
return j.apply(V, arguments);
|
|
4036
4061
|
};
|
|
4037
4062
|
d.apply(this, A).then(
|
|
4038
|
-
function(
|
|
4039
|
-
O.process.nextTick(B.bind(null, null,
|
|
4063
|
+
function(L) {
|
|
4064
|
+
O.process.nextTick(B.bind(null, null, L));
|
|
4040
4065
|
},
|
|
4041
|
-
function(
|
|
4042
|
-
O.process.nextTick(
|
|
4066
|
+
function(L) {
|
|
4067
|
+
O.process.nextTick(Pe.bind(null, L, B));
|
|
4043
4068
|
}
|
|
4044
4069
|
);
|
|
4045
4070
|
}
|
|
@@ -4194,8 +4219,8 @@ function zs() {
|
|
|
4194
4219
|
g
|
|
4195
4220
|
);
|
|
4196
4221
|
if (m) {
|
|
4197
|
-
var E = parseFloat(m[1]),
|
|
4198
|
-
switch (
|
|
4222
|
+
var E = parseFloat(m[1]), T = (m[2] || "ms").toLowerCase();
|
|
4223
|
+
switch (T) {
|
|
4199
4224
|
case "years":
|
|
4200
4225
|
case "year":
|
|
4201
4226
|
case "yrs":
|
|
@@ -4248,9 +4273,9 @@ function zs() {
|
|
|
4248
4273
|
var m = Math.abs(g);
|
|
4249
4274
|
return m >= o ? w(g, m, o, "day") : m >= r ? w(g, m, r, "hour") : m >= e ? w(g, m, e, "minute") : m >= t ? w(g, m, t, "second") : g + " ms";
|
|
4250
4275
|
}
|
|
4251
|
-
function w(g, m, E,
|
|
4252
|
-
var
|
|
4253
|
-
return Math.round(g / E) + " " +
|
|
4276
|
+
function w(g, m, E, T) {
|
|
4277
|
+
var N = m >= E * 1.5;
|
|
4278
|
+
return Math.round(g / E) + " " + T + (N ? "s" : "");
|
|
4254
4279
|
}
|
|
4255
4280
|
return Kt;
|
|
4256
4281
|
}
|
|
@@ -4266,7 +4291,7 @@ function Ks(t) {
|
|
|
4266
4291
|
}
|
|
4267
4292
|
r.selectColor = e;
|
|
4268
4293
|
function r(g) {
|
|
4269
|
-
let m, E = null,
|
|
4294
|
+
let m, E = null, T, N;
|
|
4270
4295
|
function P(...K) {
|
|
4271
4296
|
if (!P.enabled)
|
|
4272
4297
|
return;
|
|
@@ -4288,7 +4313,7 @@ function Ks(t) {
|
|
|
4288
4313
|
return P.namespace = g, P.useColors = r.useColors(), P.color = r.selectColor(g), P.extend = o, P.destroy = r.destroy, Object.defineProperty(P, "enabled", {
|
|
4289
4314
|
enumerable: !0,
|
|
4290
4315
|
configurable: !1,
|
|
4291
|
-
get: () => E !== null ? E : (
|
|
4316
|
+
get: () => E !== null ? E : (T !== r.namespaces && (T = r.namespaces, N = r.enabled(g)), N),
|
|
4292
4317
|
set: (K) => {
|
|
4293
4318
|
E = K;
|
|
4294
4319
|
}
|
|
@@ -4301,8 +4326,8 @@ function Ks(t) {
|
|
|
4301
4326
|
function s(g) {
|
|
4302
4327
|
r.save(g), r.namespaces = g, r.names = [], r.skips = [];
|
|
4303
4328
|
let m;
|
|
4304
|
-
const E = (typeof g == "string" ? g : "").split(/[\s,]+/),
|
|
4305
|
-
for (m = 0; m <
|
|
4329
|
+
const E = (typeof g == "string" ? g : "").split(/[\s,]+/), T = E.length;
|
|
4330
|
+
for (m = 0; m < T; m++)
|
|
4306
4331
|
E[m] && (g = E[m].replace(/\*/g, ".*?"), g[0] === "-" ? r.skips.push(new RegExp("^" + g.slice(1) + "$")) : r.names.push(new RegExp("^" + g + "$")));
|
|
4307
4332
|
}
|
|
4308
4333
|
function u() {
|
|
@@ -4824,7 +4849,7 @@ yr.exports.express = function(t) {
|
|
|
4824
4849
|
};
|
|
4825
4850
|
var ga = yr.exports;
|
|
4826
4851
|
const ma = /* @__PURE__ */ Yn(ga);
|
|
4827
|
-
function
|
|
4852
|
+
function La(t, e = !0, r = !0) {
|
|
4828
4853
|
const o = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = ma(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4829
4854
|
return s.use(Bi), s.use(Ei, { sdkKey: t, host: o }), s.use(xi), s.use(Oi), s.use(co), s.use(Ji), r && s.after(async (u, l, f) => {
|
|
4830
4855
|
if (u)
|
|
@@ -4835,5 +4860,5 @@ function Na(t, e = !0, r = !0) {
|
|
|
4835
4860
|
}), s;
|
|
4836
4861
|
}
|
|
4837
4862
|
export {
|
|
4838
|
-
|
|
4863
|
+
La as StreamLayer
|
|
4839
4864
|
};
|