@streamlayer/sdk-web 0.28.24 → 0.28.26
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 +1 -1
- package/lib/es/index.js +134 -130
- package/package.json +6 -6
package/lib/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QuestionType as
|
|
1
|
+
import { QuestionType as Te, 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";
|
|
@@ -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, F = t[e + m];
|
|
73
|
+
for (m += E, u = F & (1 << -g) - 1, F >>= -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 : (F ? -1 : 1) * (1 / 0);
|
|
82
82
|
l = l + Math.pow(2, o), u = u - w;
|
|
83
83
|
}
|
|
84
|
-
return (
|
|
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, 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, F = 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 + F] = f & 255, F += 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 + F] = l & 255, F += N, l /= 256, w -= 8)
|
|
91
91
|
;
|
|
92
|
-
t[r +
|
|
92
|
+
t[r + F - N] |= P * 128;
|
|
93
93
|
};
|
|
94
94
|
/*!
|
|
95
95
|
* The buffer module from node.js, for the browser.
|
|
@@ -202,7 +202,7 @@ 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 F(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;
|
|
@@ -213,7 +213,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
213
213
|
const n = new Uint8Array(a);
|
|
214
214
|
return P(n.buffer, n.byteOffset, n.byteLength);
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return F(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" || Nt(a.length) ? l(0) :
|
|
232
|
+
return typeof a.length != "number" || Nt(a.length) ? l(0) : F(a);
|
|
233
233
|
if (a.type === "Buffer" && Array.isArray(a.data))
|
|
234
|
-
return
|
|
234
|
+
return F(a.data);
|
|
235
235
|
}
|
|
236
236
|
function I(a) {
|
|
237
237
|
if (a >= s)
|
|
@@ -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 T(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
|
+
T(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
|
+
T(this, i, i + 3), T(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
|
+
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
|
}, f.prototype.toString = function() {
|
|
398
398
|
const n = this.length;
|
|
@@ -1257,7 +1257,7 @@ class lr {
|
|
|
1257
1257
|
let o;
|
|
1258
1258
|
for (o in r)
|
|
1259
1259
|
this.config.setValue(o, r[o]);
|
|
1260
|
-
if (e?.overlaySettings.case === this.settingsKey) {
|
|
1260
|
+
if (e?.overlaySettings?.case !== void 0 && e?.overlaySettings.case === this.settingsKey) {
|
|
1261
1261
|
const s = e.overlaySettings.value;
|
|
1262
1262
|
if (s !== void 0) {
|
|
1263
1263
|
let u;
|
|
@@ -1298,7 +1298,8 @@ class pe extends xt {
|
|
|
1298
1298
|
atomStore;
|
|
1299
1299
|
constructor(e, r, o) {
|
|
1300
1300
|
super(e, `api:${r}`), this.atomStore = Ct(), o && e.subscribe((s) => {
|
|
1301
|
-
this.atomStore.
|
|
1301
|
+
const u = this.atomStore.get(), l = o(s, u);
|
|
1302
|
+
u !== l && this.atomStore.set(l);
|
|
1302
1303
|
});
|
|
1303
1304
|
}
|
|
1304
1305
|
getAtomStore = () => this.atomStore;
|
|
@@ -1644,19 +1645,22 @@ class Ke extends hr {
|
|
|
1644
1645
|
this.remove(Ee.TOKEN);
|
|
1645
1646
|
};
|
|
1646
1647
|
}
|
|
1647
|
-
var
|
|
1648
|
+
var Fe;
|
|
1648
1649
|
(function(t) {
|
|
1649
1650
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
1650
|
-
})(
|
|
1651
|
+
})(Fe || (Fe = {}));
|
|
1651
1652
|
const Ii = (t) => {
|
|
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", (
|
|
1653
|
+
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", ({ data: l, error: f, loading: p }, w) => {
|
|
1654
|
+
if (!f)
|
|
1655
|
+
return l?.data?.id ? l.data.id : p === !1 ? void 0 : w;
|
|
1656
|
+
}), u = new pe(vi(o.getStore(), t), "userSettings");
|
|
1653
1657
|
return {
|
|
1654
1658
|
userKey: r,
|
|
1655
1659
|
userToken: o,
|
|
1656
1660
|
user: s,
|
|
1657
1661
|
userSettings: u
|
|
1658
1662
|
};
|
|
1659
|
-
},
|
|
1663
|
+
}, Fi = (t) => {
|
|
1660
1664
|
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
1665
|
return r.getAtomStore().listen((s) => {
|
|
1662
1666
|
(s === "" || s === void 0) && o.getStore().mutate(void 0);
|
|
@@ -1665,8 +1669,8 @@ const Ii = (t) => {
|
|
|
1665
1669
|
slStreamId: r,
|
|
1666
1670
|
streamSettings: o
|
|
1667
1671
|
};
|
|
1668
|
-
},
|
|
1669
|
-
const e = new de(ne(void 0), "enabled"), r = new de(ne(
|
|
1672
|
+
}, Ti = (t) => {
|
|
1673
|
+
const e = new de(ne(void 0), "enabled"), r = new de(ne(Fe.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 = Fi(t);
|
|
1670
1674
|
return {
|
|
1671
1675
|
enabled: e,
|
|
1672
1676
|
status: r,
|
|
@@ -1684,7 +1688,7 @@ const Ii = (t) => {
|
|
|
1684
1688
|
class _i extends xt {
|
|
1685
1689
|
stores;
|
|
1686
1690
|
constructor(e) {
|
|
1687
|
-
const r =
|
|
1691
|
+
const r = Ti(e), o = fi(r);
|
|
1688
1692
|
super(o, "core"), this.stores = r;
|
|
1689
1693
|
}
|
|
1690
1694
|
getValue() {
|
|
@@ -1739,7 +1743,7 @@ class Ci extends ci {
|
|
|
1739
1743
|
*/
|
|
1740
1744
|
softLogout = () => {
|
|
1741
1745
|
const e = new Ke();
|
|
1742
|
-
this
|
|
1746
|
+
this.transport.setAuth("", ""), e.setToken(""), this.reLogin();
|
|
1743
1747
|
};
|
|
1744
1748
|
/**
|
|
1745
1749
|
* Try to re-login.
|
|
@@ -1750,7 +1754,7 @@ class Ci extends ci {
|
|
|
1750
1754
|
*/
|
|
1751
1755
|
reLogin = () => {
|
|
1752
1756
|
const e = new Ke(), r = e.getToken(), o = e.getExternalToken();
|
|
1753
|
-
if (this.$coreStore.getValues().userKey.setValue(o),
|
|
1757
|
+
if (this.$coreStore.getValues().userKey.setValue(o), r)
|
|
1754
1758
|
return this.saveUser(r, ""), this.me().then((s) => {
|
|
1755
1759
|
if (console.log("user", s), s?.id) {
|
|
1756
1760
|
const u = s.id;
|
|
@@ -1786,7 +1790,7 @@ class Ci extends ci {
|
|
|
1786
1790
|
}
|
|
1787
1791
|
const st = new Ke(), Oi = (t, e, r) => {
|
|
1788
1792
|
t.auth = new Ci(t.store, t.transport), t.stores.status.listen((o) => {
|
|
1789
|
-
o ===
|
|
1793
|
+
o === Fe.READY && t.auth.reLogin();
|
|
1790
1794
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (o, s) => {
|
|
1791
1795
|
if (!(st.getSchema() === o && st.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
1792
1796
|
try {
|
|
@@ -1805,15 +1809,15 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1805
1809
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1806
1810
|
if (t.stores.enabled.get() === "on")
|
|
1807
1811
|
return { enabled: !0 };
|
|
1808
|
-
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(
|
|
1812
|
+
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(Fe.INITIALIZATION);
|
|
1809
1813
|
try {
|
|
1810
1814
|
const o = await t.stores.organizationSettings.getValue();
|
|
1811
|
-
return o ? (t.stores.status.setValue(
|
|
1815
|
+
return o ? (t.stores.status.setValue(Fe.READY), { enabled: !!o }) : (t.stores.status.setValue(Fe.FAILED), { err: "failed" });
|
|
1812
1816
|
} catch (o) {
|
|
1813
|
-
return t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1817
|
+
return t.stores.enabled.setValue(), t.stores.status.setValue(Fe.FAILED), { err: `${o}` };
|
|
1814
1818
|
}
|
|
1815
1819
|
}, t.sdk.disableApp = () => {
|
|
1816
|
-
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1820
|
+
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(Fe.DISABLED), t.sdk.closeFeature(), t.storeUnsubscribe());
|
|
1817
1821
|
}, t.sdk.createEventSession = (o) => {
|
|
1818
1822
|
t.stores.providerStreamId.setValue(o);
|
|
1819
1823
|
}, r();
|
|
@@ -1887,7 +1891,7 @@ function dr(t) {
|
|
|
1887
1891
|
let _ = 0;
|
|
1888
1892
|
const D = I.length, U = new Array(D);
|
|
1889
1893
|
for (_ = 0; _ < D; ++_)
|
|
1890
|
-
U[_] =
|
|
1894
|
+
U[_] = F(I[_]);
|
|
1891
1895
|
return U;
|
|
1892
1896
|
}
|
|
1893
1897
|
function o(I) {
|
|
@@ -1895,25 +1899,25 @@ function dr(t) {
|
|
|
1895
1899
|
if (p && Object.getPrototypeOf(I) !== Vi)
|
|
1896
1900
|
return p(I);
|
|
1897
1901
|
const D = f(I);
|
|
1898
|
-
let U,
|
|
1899
|
-
for (U = 0,
|
|
1900
|
-
e(x = D[U]) && (_[x] =
|
|
1902
|
+
let U, T, x;
|
|
1903
|
+
for (U = 0, T = D.length; U < T; ++U)
|
|
1904
|
+
e(x = D[U]) && (_[x] = F(I[x]));
|
|
1901
1905
|
return _;
|
|
1902
1906
|
}
|
|
1903
1907
|
function s(I, _) {
|
|
1904
1908
|
const D = I.length, U = _.length;
|
|
1905
|
-
let
|
|
1909
|
+
let T = 0;
|
|
1906
1910
|
const x = new Array(D + U);
|
|
1907
|
-
for (
|
|
1908
|
-
x[
|
|
1909
|
-
for (
|
|
1910
|
-
x[
|
|
1911
|
+
for (T = 0; T < D; ++T)
|
|
1912
|
+
x[T] = F(I[T]);
|
|
1913
|
+
for (T = 0; T < U; ++T)
|
|
1914
|
+
x[T + D] = F(_[T]);
|
|
1911
1915
|
return x;
|
|
1912
1916
|
}
|
|
1913
1917
|
const u = Object.prototype.propertyIsEnumerable;
|
|
1914
1918
|
function l(I) {
|
|
1915
1919
|
const _ = Object.keys(I), D = Object.getOwnPropertySymbols(I);
|
|
1916
|
-
for (let U = 0,
|
|
1920
|
+
for (let U = 0, T = D.length; U < T; ++U)
|
|
1917
1921
|
u.call(I, D[U]) && _.push(D[U]);
|
|
1918
1922
|
return _;
|
|
1919
1923
|
}
|
|
@@ -1924,30 +1928,30 @@ function dr(t) {
|
|
|
1924
1928
|
function g(I) {
|
|
1925
1929
|
return typeof I != "object" || I === null;
|
|
1926
1930
|
}
|
|
1927
|
-
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:
|
|
1928
|
-
function
|
|
1931
|
+
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: f, isMergeableObject: w }) : s;
|
|
1932
|
+
function F(I) {
|
|
1929
1933
|
return w(I) ? Array.isArray(I) ? r(I) : o(I) : I;
|
|
1930
1934
|
}
|
|
1931
1935
|
function N(I, _) {
|
|
1932
|
-
const D = {}, U = f(I),
|
|
1936
|
+
const D = {}, U = f(I), T = f(_);
|
|
1933
1937
|
let x, k, G;
|
|
1934
1938
|
for (x = 0, k = U.length; x < k; ++x)
|
|
1935
|
-
e(G = U[x]) &&
|
|
1936
|
-
for (x = 0, k =
|
|
1937
|
-
e(G =
|
|
1938
|
-
(D[G] =
|
|
1939
|
+
e(G = U[x]) && T.indexOf(G) === -1 && (D[G] = F(I[G]));
|
|
1940
|
+
for (x = 0, k = T.length; x < k; ++x)
|
|
1941
|
+
e(G = T[x]) && (G in I && (U.indexOf(G) !== -1 && (D[G] = P(I[G], _[G])), !0) || // eslint-disable-line no-mixed-operators
|
|
1942
|
+
(D[G] = F(_[G])));
|
|
1939
1943
|
return D;
|
|
1940
1944
|
}
|
|
1941
1945
|
function P(I, _) {
|
|
1942
1946
|
const D = Array.isArray(_), U = Array.isArray(I);
|
|
1943
|
-
return g(_) ? _ : m(I) ?
|
|
1947
|
+
return g(_) ? _ : m(I) ? F(_) : D && U ? E(I, _) : D !== U ? F(_) : N(I, _);
|
|
1944
1948
|
}
|
|
1945
1949
|
function K() {
|
|
1946
1950
|
switch (arguments.length) {
|
|
1947
1951
|
case 0:
|
|
1948
1952
|
return {};
|
|
1949
1953
|
case 1:
|
|
1950
|
-
return
|
|
1954
|
+
return F(arguments[0]);
|
|
1951
1955
|
case 2:
|
|
1952
1956
|
return P(arguments[0], arguments[1]);
|
|
1953
1957
|
}
|
|
@@ -2192,15 +2196,15 @@ class un extends hr {
|
|
|
2192
2196
|
};
|
|
2193
2197
|
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }) => this.read(At.ONBOARDING, o, e, r);
|
|
2194
2198
|
}
|
|
2195
|
-
const
|
|
2199
|
+
const Fr = {
|
|
2196
2200
|
pageSize: 10
|
|
2197
2201
|
}, eo = (t, e, r) => {
|
|
2198
|
-
const o = ne({ pageSize: r?.pageSize ||
|
|
2202
|
+
const o = ne({ pageSize: r?.pageSize || Fr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u = Ri(t), l = async (w) => {
|
|
2199
2203
|
if (w) {
|
|
2200
2204
|
s.setKey("loading", !0);
|
|
2201
2205
|
const g = {
|
|
2202
2206
|
eventId: w,
|
|
2203
|
-
pagination: { page: 0, pageSize: r?.pageSize ||
|
|
2207
|
+
pagination: { page: 0, pageSize: r?.pageSize || Fr.pageSize }
|
|
2204
2208
|
}, m = await u(g);
|
|
2205
2209
|
s.set({ data: m.data.map((E) => E.attributes), loading: !1 }), o.set(g.pagination);
|
|
2206
2210
|
}
|
|
@@ -2213,12 +2217,12 @@ const Tr = {
|
|
|
2213
2217
|
const g = e.get(), m = s.get().data?.length || 0;
|
|
2214
2218
|
if (w.page > 0 && g && m >= w.page * w.pageSize) {
|
|
2215
2219
|
s.setKey("loading", !0);
|
|
2216
|
-
const
|
|
2220
|
+
const F = await u({
|
|
2217
2221
|
eventId: g,
|
|
2218
2222
|
pagination: w
|
|
2219
2223
|
}), N = s.get().data || [];
|
|
2220
2224
|
s.set({
|
|
2221
|
-
data: [...N, ...
|
|
2225
|
+
data: [...N, ...F.data.map((P) => P.attributes)],
|
|
2222
2226
|
loading: !1
|
|
2223
2227
|
});
|
|
2224
2228
|
}
|
|
@@ -2241,8 +2245,8 @@ var re;
|
|
|
2241
2245
|
})(re || (re = {}));
|
|
2242
2246
|
const no = (t, e, r, o) => {
|
|
2243
2247
|
const s = new un(), u = ne(re.Unset), l = () => {
|
|
2244
|
-
const { inplayGame: w
|
|
2245
|
-
o.add({
|
|
2248
|
+
const { inplayGame: w } = t.featureSettings.get(), g = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2249
|
+
w && o.add({
|
|
2246
2250
|
type: Ne.ONBOARDING,
|
|
2247
2251
|
id: g,
|
|
2248
2252
|
action: t.openFeature,
|
|
@@ -2251,7 +2255,7 @@ const no = (t, e, r, o) => {
|
|
|
2251
2255
|
},
|
|
2252
2256
|
autoHideDuration: 1e6,
|
|
2253
2257
|
data: {
|
|
2254
|
-
questionType:
|
|
2258
|
+
questionType: Te.UNSET,
|
|
2255
2259
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2256
2260
|
// @ts-ignore
|
|
2257
2261
|
onboarding: { ...w }
|
|
@@ -2275,8 +2279,8 @@ const no = (t, e, r, o) => {
|
|
|
2275
2279
|
const m = await e.moderation.getValue();
|
|
2276
2280
|
if (u.get() === re.Completed)
|
|
2277
2281
|
return;
|
|
2278
|
-
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed),
|
|
2279
|
-
E ?
|
|
2282
|
+
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed), F = !!t.featureSettings.get().inplayGame?.titleCard?.optIn;
|
|
2283
|
+
E ? F ? u.set(re.Required) : u.set(re.Optional) : F ? u.set(re.Unavailable) : u.set(re.Disabled);
|
|
2280
2284
|
};
|
|
2281
2285
|
return f(), e.userId.subscribe((w) => {
|
|
2282
2286
|
w && f();
|
|
@@ -2290,7 +2294,7 @@ const no = (t, e, r, o) => {
|
|
|
2290
2294
|
eventId: w
|
|
2291
2295
|
}, re.Completed));
|
|
2292
2296
|
} };
|
|
2293
|
-
}, io = /* @__PURE__ */ new Set([
|
|
2297
|
+
}, io = /* @__PURE__ */ new Set([Te.POLL, Te.PREDICTION, Te.TRIVIA]);
|
|
2294
2298
|
class oo extends lr {
|
|
2295
2299
|
/** user statistics (leaderboard panel) */
|
|
2296
2300
|
userSummary;
|
|
@@ -2336,7 +2340,7 @@ class oo extends lr {
|
|
|
2336
2340
|
}
|
|
2337
2341
|
}
|
|
2338
2342
|
});
|
|
2339
|
-
else if (s.data.question.type ===
|
|
2343
|
+
else if (s.data.question.type === Te.FACTOID) {
|
|
2340
2344
|
const u = s.data.question.options?.options.value, l = {
|
|
2341
2345
|
heading: s.data.question.notification.title,
|
|
2342
2346
|
body: s.data.question.notification.body,
|
|
@@ -2362,7 +2366,7 @@ class oo extends lr {
|
|
|
2362
2366
|
insight: l
|
|
2363
2367
|
}
|
|
2364
2368
|
});
|
|
2365
|
-
} else if (s.data.question.type ===
|
|
2369
|
+
} else if (s.data.question.type === Te.TWEET) {
|
|
2366
2370
|
const u = s.data.question.options?.options.value, l = {
|
|
2367
2371
|
title: s.data.question.notification.title,
|
|
2368
2372
|
body: s.data.question.notification.body,
|
|
@@ -2398,7 +2402,7 @@ class oo extends lr {
|
|
|
2398
2402
|
if (!o)
|
|
2399
2403
|
return;
|
|
2400
2404
|
const { status: s, type: u, id: l } = o;
|
|
2401
|
-
if (s === dt.RESOLVED && u ===
|
|
2405
|
+
if (s === dt.RESOLVED && u === Te.PREDICTION) {
|
|
2402
2406
|
const f = this.background.getCurrentSessionId({
|
|
2403
2407
|
prefix: `notification-id:${l}`
|
|
2404
2408
|
}), p = await sn(l, e), w = p?.answers.find(({ correct: m }) => m), g = p?.answers.find(({ youVoted: m }) => m);
|
|
@@ -2409,7 +2413,7 @@ class oo extends lr {
|
|
|
2409
2413
|
autoHideDuration: 35e3,
|
|
2410
2414
|
id: f,
|
|
2411
2415
|
data: {
|
|
2412
|
-
questionType:
|
|
2416
|
+
questionType: Te.PREDICTION,
|
|
2413
2417
|
question: {
|
|
2414
2418
|
title: w?.youVoted ? `Congratulations! You answered correctly! You won ${w.points} pts!` : `Better luck next time! Correct: ${w?.text}!`,
|
|
2415
2419
|
votedAnswer: {
|
|
@@ -2461,7 +2465,7 @@ class so extends lr {
|
|
|
2461
2465
|
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) => {
|
|
2462
2466
|
s === De.Ready ? this.connect() : this.disconnect();
|
|
2463
2467
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2464
|
-
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type ===
|
|
2468
|
+
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 === dt.ACTIVE && this.notifications.add({
|
|
2465
2469
|
type: Ne.QUESTION,
|
|
2466
2470
|
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2467
2471
|
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
@@ -2578,7 +2582,7 @@ function cn(t, e, r) {
|
|
|
2578
2582
|
paused: !1,
|
|
2579
2583
|
concurrency: r,
|
|
2580
2584
|
running: w,
|
|
2581
|
-
resume:
|
|
2585
|
+
resume: F,
|
|
2582
2586
|
idle: N,
|
|
2583
2587
|
length: m,
|
|
2584
2588
|
getQueue: E,
|
|
@@ -2596,35 +2600,35 @@ function cn(t, e, r) {
|
|
|
2596
2600
|
p.paused = !0;
|
|
2597
2601
|
}
|
|
2598
2602
|
function m() {
|
|
2599
|
-
for (var
|
|
2600
|
-
|
|
2603
|
+
for (var T = s, x = 0; T; )
|
|
2604
|
+
T = T.next, x++;
|
|
2601
2605
|
return x;
|
|
2602
2606
|
}
|
|
2603
2607
|
function E() {
|
|
2604
|
-
for (var
|
|
2605
|
-
x.push(
|
|
2608
|
+
for (var T = s, x = []; T; )
|
|
2609
|
+
x.push(T.value), T = T.next;
|
|
2606
2610
|
return x;
|
|
2607
2611
|
}
|
|
2608
|
-
function
|
|
2612
|
+
function F() {
|
|
2609
2613
|
if (p.paused) {
|
|
2610
2614
|
p.paused = !1;
|
|
2611
|
-
for (var
|
|
2615
|
+
for (var T = 0; T < p.concurrency; T++)
|
|
2612
2616
|
l++, I();
|
|
2613
2617
|
}
|
|
2614
2618
|
}
|
|
2615
2619
|
function N() {
|
|
2616
2620
|
return l === 0 && p.length() === 0;
|
|
2617
2621
|
}
|
|
2618
|
-
function P(
|
|
2622
|
+
function P(T, x) {
|
|
2619
2623
|
var k = o.get();
|
|
2620
|
-
k.context = t, k.release = I, k.value =
|
|
2624
|
+
k.context = t, k.release = I, k.value = T, 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));
|
|
2621
2625
|
}
|
|
2622
|
-
function K(
|
|
2626
|
+
function K(T, x) {
|
|
2623
2627
|
var k = o.get();
|
|
2624
|
-
k.context = t, k.release = I, k.value =
|
|
2628
|
+
k.context = t, k.release = I, k.value = T, 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));
|
|
2625
2629
|
}
|
|
2626
|
-
function I(
|
|
2627
|
-
|
|
2630
|
+
function I(T) {
|
|
2631
|
+
T && o.release(T);
|
|
2628
2632
|
var x = s;
|
|
2629
2633
|
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();
|
|
2630
2634
|
}
|
|
@@ -2634,8 +2638,8 @@ function cn(t, e, r) {
|
|
|
2634
2638
|
function D() {
|
|
2635
2639
|
s = null, u = null, p.drain(), p.drain = ae;
|
|
2636
2640
|
}
|
|
2637
|
-
function U(
|
|
2638
|
-
f =
|
|
2641
|
+
function U(T) {
|
|
2642
|
+
f = T;
|
|
2639
2643
|
}
|
|
2640
2644
|
}
|
|
2641
2645
|
function ae() {
|
|
@@ -2658,10 +2662,10 @@ function yo(t, e, r) {
|
|
|
2658
2662
|
var s = cn(t, o, r), u = s.push, l = s.unshift;
|
|
2659
2663
|
return s.push = f, s.unshift = p, s.drained = w, s;
|
|
2660
2664
|
function f(g) {
|
|
2661
|
-
var m = new Promise(function(E,
|
|
2665
|
+
var m = new Promise(function(E, F) {
|
|
2662
2666
|
u(g, function(N, P) {
|
|
2663
2667
|
if (N) {
|
|
2664
|
-
|
|
2668
|
+
F(N);
|
|
2665
2669
|
return;
|
|
2666
2670
|
}
|
|
2667
2671
|
E(P);
|
|
@@ -2670,10 +2674,10 @@ function yo(t, e, r) {
|
|
|
2670
2674
|
return m.catch(ae), m;
|
|
2671
2675
|
}
|
|
2672
2676
|
function p(g) {
|
|
2673
|
-
var m = new Promise(function(E,
|
|
2677
|
+
var m = new Promise(function(E, F) {
|
|
2674
2678
|
l(g, function(N, P) {
|
|
2675
2679
|
if (N) {
|
|
2676
|
-
|
|
2680
|
+
F(N);
|
|
2677
2681
|
return;
|
|
2678
2682
|
}
|
|
2679
2683
|
E(P);
|
|
@@ -2696,7 +2700,7 @@ function yo(t, e, r) {
|
|
|
2696
2700
|
}
|
|
2697
2701
|
gr.exports = cn;
|
|
2698
2702
|
gr.exports.promise = yo;
|
|
2699
|
-
var fn = gr.exports, mr = { exports: {} }, Je = typeof Reflect == "object" ? Reflect : null,
|
|
2703
|
+
var fn = gr.exports, mr = { exports: {} }, Je = typeof Reflect == "object" ? Reflect : null, Tr = Je && typeof Je.apply == "function" ? Je.apply : function(e, r, o) {
|
|
2700
2704
|
return Function.prototype.apply.call(e, r, o);
|
|
2701
2705
|
}, gt;
|
|
2702
2706
|
Je && typeof Je.ownKeys == "function" ? gt = Je.ownKeys : Object.getOwnPropertySymbols ? gt = function(e) {
|
|
@@ -2768,10 +2772,10 @@ q.prototype.emit = function(e) {
|
|
|
2768
2772
|
if (p === void 0)
|
|
2769
2773
|
return !1;
|
|
2770
2774
|
if (typeof p == "function")
|
|
2771
|
-
|
|
2775
|
+
Tr(p, this, r);
|
|
2772
2776
|
else
|
|
2773
2777
|
for (var w = p.length, g = mn(p, w), o = 0; o < w; ++o)
|
|
2774
|
-
|
|
2778
|
+
Tr(g[o], this, r);
|
|
2775
2779
|
return !0;
|
|
2776
2780
|
};
|
|
2777
2781
|
function pn(t, e, r, o) {
|
|
@@ -2949,8 +2953,8 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2949
2953
|
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Eo();
|
|
2950
2954
|
}, Or = {
|
|
2951
2955
|
foo: {}
|
|
2952
|
-
},
|
|
2953
|
-
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof
|
|
2956
|
+
}, Fo = Object, To = function() {
|
|
2957
|
+
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof Fo);
|
|
2954
2958
|
}, _o = "Function.prototype.bind called on incompatible ", Co = Object.prototype.toString, Oo = Math.max, xo = "[object Function]", xr = function(e, r) {
|
|
2955
2959
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2956
2960
|
o[s] = e[s];
|
|
@@ -3015,7 +3019,7 @@ var Dt = function() {
|
|
|
3015
3019
|
return Dt;
|
|
3016
3020
|
}
|
|
3017
3021
|
}
|
|
3018
|
-
}() : Dt, Qe = Io(), Uo =
|
|
3022
|
+
}() : Dt, Qe = Io(), Uo = To(), X = Object.getPrototypeOf || (Uo ? function(t) {
|
|
3019
3023
|
return t.__proto__;
|
|
3020
3024
|
} : null), ze = {}, $o = typeof Uint8Array > "u" || !X ? $ : X(Uint8Array), Ve = {
|
|
3021
3025
|
"%AggregateError%": typeof AggregateError > "u" ? $ : AggregateError,
|
|
@@ -3194,8 +3198,8 @@ var jo = function t(e) {
|
|
|
3194
3198
|
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;
|
|
3195
3199
|
w && (s = w[0], Mo(o, Vo([0, 1], w)));
|
|
3196
3200
|
for (var g = 1, m = !0; g < o.length; g += 1) {
|
|
3197
|
-
var E = o[g],
|
|
3198
|
-
if ((
|
|
3201
|
+
var E = o[g], F = It(E, 0, 1), N = It(E, -1);
|
|
3202
|
+
if ((F === '"' || F === "'" || F === "`" || N === '"' || N === "'" || N === "`") && F !== N)
|
|
3199
3203
|
throw new Xe("property names with quotes must have matching quotes");
|
|
3200
3204
|
if ((E === "constructor" || !m) && (p = !0), s += "." + E, l = "%" + s + "%", Et(Ve, l))
|
|
3201
3205
|
f = Ve[l];
|
|
@@ -3232,14 +3236,14 @@ tr.hasArrayLengthDefineBug = function() {
|
|
|
3232
3236
|
return !0;
|
|
3233
3237
|
}
|
|
3234
3238
|
};
|
|
3235
|
-
var
|
|
3239
|
+
var Fn = tr, Wo = et, mt = Wo("%Object.getOwnPropertyDescriptor%", !0);
|
|
3236
3240
|
if (mt)
|
|
3237
3241
|
try {
|
|
3238
3242
|
mt([], "length");
|
|
3239
3243
|
} catch {
|
|
3240
3244
|
mt = null;
|
|
3241
3245
|
}
|
|
3242
|
-
var wr = mt, Jo =
|
|
3246
|
+
var wr = mt, Jo = Fn(), vr = et, ut = Jo && vr("%Object.defineProperty%", !0);
|
|
3243
3247
|
if (ut)
|
|
3244
3248
|
try {
|
|
3245
3249
|
ut({}, "a", { value: 1 });
|
|
@@ -3271,7 +3275,7 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3271
3275
|
e[r] = o;
|
|
3272
3276
|
else
|
|
3273
3277
|
throw new Yo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3274
|
-
},
|
|
3278
|
+
}, Tn = et, Nr = Xo, Zo = Fn(), Lr = wr, Ur = Tn("%TypeError%"), es = Tn("%Math.floor%"), ts = function(e, r) {
|
|
3275
3279
|
if (typeof e != "function")
|
|
3276
3280
|
throw new Ur("`fn` is not a function");
|
|
3277
3281
|
if (typeof r != "number" || r < 0 || r > 4294967295 || es(r) !== r)
|
|
@@ -3294,9 +3298,9 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3294
3298
|
t.exports = function(E) {
|
|
3295
3299
|
if (typeof E != "function")
|
|
3296
3300
|
throw new s("a function is required");
|
|
3297
|
-
var
|
|
3301
|
+
var F = f(e, l, arguments);
|
|
3298
3302
|
return o(
|
|
3299
|
-
|
|
3303
|
+
F,
|
|
3300
3304
|
1 + w(0, E.length - (arguments.length - 1)),
|
|
3301
3305
|
!0
|
|
3302
3306
|
);
|
|
@@ -3406,10 +3410,10 @@ var As = He ? function(e) {
|
|
|
3406
3410
|
return !1;
|
|
3407
3411
|
var r = wt.call(e);
|
|
3408
3412
|
return r !== ds && r !== ys && !/^\[object HTML/.test(r) ? !1 : Mt(e);
|
|
3409
|
-
}, Es = As, Is = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty,
|
|
3413
|
+
}, Es = As, Is = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty, Fs = function(e, r, o) {
|
|
3410
3414
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3411
3415
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3412
|
-
},
|
|
3416
|
+
}, Ts = function(e, r, o) {
|
|
3413
3417
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3414
3418
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3415
3419
|
}, _s = function(e, r, o) {
|
|
@@ -3419,7 +3423,7 @@ var As = He ? function(e) {
|
|
|
3419
3423
|
if (!Es(r))
|
|
3420
3424
|
throw new TypeError("iterator must be a function");
|
|
3421
3425
|
var s;
|
|
3422
|
-
arguments.length >= 3 && (s = o), Is.call(e) === "[object Array]" ?
|
|
3426
|
+
arguments.length >= 3 && (s = o), Is.call(e) === "[object Array]" ? Fs(e, r, s) : typeof e == "string" ? Ts(e, r, s) : _s(e, r, s);
|
|
3423
3427
|
}, Os = Cs, qt = [
|
|
3424
3428
|
"BigInt64Array",
|
|
3425
3429
|
"BigUint64Array",
|
|
@@ -3436,13 +3440,13 @@ var As = He ? function(e) {
|
|
|
3436
3440
|
for (var e = [], r = 0; r < qt.length; r++)
|
|
3437
3441
|
typeof xs[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3438
3442
|
return e;
|
|
3439
|
-
},
|
|
3443
|
+
}, Ft = 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) {
|
|
3440
3444
|
for (var o = 0; o < e.length; o += 1)
|
|
3441
3445
|
if (e[o] === r)
|
|
3442
3446
|
return o;
|
|
3443
3447
|
return -1;
|
|
3444
|
-
},
|
|
3445
|
-
Nn && vt && Qt ?
|
|
3448
|
+
}, Tt = { __proto__: null };
|
|
3449
|
+
Nn && vt && Qt ? Ft(sr, function(t) {
|
|
3446
3450
|
var e = new Dr[t]();
|
|
3447
3451
|
if (Symbol.toStringTag in e) {
|
|
3448
3452
|
var r = Qt(e), o = vt(r, Symbol.toStringTag);
|
|
@@ -3450,15 +3454,15 @@ Nn && vt && Qt ? Tt(sr, function(t) {
|
|
|
3450
3454
|
var s = Qt(r);
|
|
3451
3455
|
o = vt(s, Symbol.toStringTag);
|
|
3452
3456
|
}
|
|
3453
|
-
|
|
3457
|
+
Tt["$" + t] = $r(o.get);
|
|
3454
3458
|
}
|
|
3455
|
-
}) :
|
|
3459
|
+
}) : Ft(sr, function(t) {
|
|
3456
3460
|
var e = new Dr[t](), r = e.slice || e.set;
|
|
3457
|
-
r && (
|
|
3461
|
+
r && (Tt["$" + t] = $r(r));
|
|
3458
3462
|
});
|
|
3459
3463
|
var Ns = function(e) {
|
|
3460
3464
|
var r = !1;
|
|
3461
|
-
return Tt
|
|
3465
|
+
return Ft(Tt, function(o, s) {
|
|
3462
3466
|
if (!r)
|
|
3463
3467
|
try {
|
|
3464
3468
|
"$" + o(e) === s && (r = Ar(s, 1));
|
|
@@ -3467,7 +3471,7 @@ var Ns = function(e) {
|
|
|
3467
3471
|
}), r;
|
|
3468
3472
|
}, Ls = function(e) {
|
|
3469
3473
|
var r = !1;
|
|
3470
|
-
return Tt
|
|
3474
|
+
return Ft(Tt, function(o, s) {
|
|
3471
3475
|
if (!r)
|
|
3472
3476
|
try {
|
|
3473
3477
|
o(e), r = Ar(s, 1);
|
|
@@ -3494,7 +3498,7 @@ var Ns = function(e) {
|
|
|
3494
3498
|
if (l)
|
|
3495
3499
|
var E = u(BigInt.prototype.valueOf);
|
|
3496
3500
|
if (f)
|
|
3497
|
-
var
|
|
3501
|
+
var F = u(Symbol.prototype.valueOf);
|
|
3498
3502
|
function N(S, pt) {
|
|
3499
3503
|
if (typeof S != "object")
|
|
3500
3504
|
return !1;
|
|
@@ -3529,10 +3533,10 @@ var Ns = function(e) {
|
|
|
3529
3533
|
return o(S) === "Uint32Array";
|
|
3530
3534
|
}
|
|
3531
3535
|
t.isUint32Array = U;
|
|
3532
|
-
function
|
|
3536
|
+
function T(S) {
|
|
3533
3537
|
return o(S) === "Int8Array";
|
|
3534
3538
|
}
|
|
3535
|
-
t.isInt8Array =
|
|
3539
|
+
t.isInt8Array = T;
|
|
3536
3540
|
function x(S) {
|
|
3537
3541
|
return o(S) === "Int16Array";
|
|
3538
3542
|
}
|
|
@@ -3650,7 +3654,7 @@ var Ns = function(e) {
|
|
|
3650
3654
|
}
|
|
3651
3655
|
t.isBigIntObject = Me;
|
|
3652
3656
|
function ht(S) {
|
|
3653
|
-
return f && N(S,
|
|
3657
|
+
return f && N(S, F);
|
|
3654
3658
|
}
|
|
3655
3659
|
t.isSymbolObject = ht;
|
|
3656
3660
|
function it(S) {
|
|
@@ -3697,7 +3701,7 @@ var js = ar.exports;
|
|
|
3697
3701
|
return C;
|
|
3698
3702
|
}, r = /%[sdj%]/g;
|
|
3699
3703
|
t.format = function(d) {
|
|
3700
|
-
if (!
|
|
3704
|
+
if (!T(d)) {
|
|
3701
3705
|
for (var v = [], A = 0; A < arguments.length; A++)
|
|
3702
3706
|
v.push(l(arguments[A]));
|
|
3703
3707
|
return v.join(" ");
|
|
@@ -3810,7 +3814,7 @@ var js = ar.exports;
|
|
|
3810
3814
|
v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3811
3815
|
!(v.constructor && v.constructor.prototype === v)) {
|
|
3812
3816
|
var C = v.inspect(A, d);
|
|
3813
|
-
return
|
|
3817
|
+
return T(C) || (C = g(d, C, A)), C;
|
|
3814
3818
|
}
|
|
3815
3819
|
var j = m(d, v);
|
|
3816
3820
|
if (j)
|
|
@@ -3841,14 +3845,14 @@ var js = ar.exports;
|
|
|
3841
3845
|
return G(v) ? d.stylize(RegExp.prototype.toString.call(v), "regexp") : d.stylize("[Object]", "special");
|
|
3842
3846
|
d.seen.push(v);
|
|
3843
3847
|
var oe;
|
|
3844
|
-
return te ? oe =
|
|
3848
|
+
return te ? oe = F(d, v, A, B, V) : oe = V.map(function(Me) {
|
|
3845
3849
|
return N(d, v, A, B, Me, te);
|
|
3846
3850
|
}), d.seen.pop(), P(oe, M, ye);
|
|
3847
3851
|
}
|
|
3848
3852
|
function m(d, v) {
|
|
3849
3853
|
if (k(v))
|
|
3850
3854
|
return d.stylize("undefined", "undefined");
|
|
3851
|
-
if (
|
|
3855
|
+
if (T(v)) {
|
|
3852
3856
|
var A = "'" + JSON.stringify(v).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
3853
3857
|
return d.stylize(A, "string");
|
|
3854
3858
|
}
|
|
@@ -3862,7 +3866,7 @@ var js = ar.exports;
|
|
|
3862
3866
|
function E(d) {
|
|
3863
3867
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
3864
3868
|
}
|
|
3865
|
-
function
|
|
3869
|
+
function F(d, v, A, C, j) {
|
|
3866
3870
|
for (var V = [], B = 0, L = v.length; B < L; ++B)
|
|
3867
3871
|
ke(v, String(B)) ? V.push(N(
|
|
3868
3872
|
d,
|
|
@@ -3932,10 +3936,10 @@ var js = ar.exports;
|
|
|
3932
3936
|
return typeof d == "number";
|
|
3933
3937
|
}
|
|
3934
3938
|
t.isNumber = U;
|
|
3935
|
-
function
|
|
3939
|
+
function T(d) {
|
|
3936
3940
|
return typeof d == "string";
|
|
3937
3941
|
}
|
|
3938
|
-
t.isString =
|
|
3942
|
+
t.isString = T;
|
|
3939
3943
|
function x(d) {
|
|
3940
3944
|
return typeof d == "symbol";
|
|
3941
3945
|
}
|
|
@@ -4228,8 +4232,8 @@ function zs() {
|
|
|
4228
4232
|
g
|
|
4229
4233
|
);
|
|
4230
4234
|
if (m) {
|
|
4231
|
-
var E = parseFloat(m[1]),
|
|
4232
|
-
switch (
|
|
4235
|
+
var E = parseFloat(m[1]), F = (m[2] || "ms").toLowerCase();
|
|
4236
|
+
switch (F) {
|
|
4233
4237
|
case "years":
|
|
4234
4238
|
case "year":
|
|
4235
4239
|
case "yrs":
|
|
@@ -4282,9 +4286,9 @@ function zs() {
|
|
|
4282
4286
|
var m = Math.abs(g);
|
|
4283
4287
|
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";
|
|
4284
4288
|
}
|
|
4285
|
-
function w(g, m, E,
|
|
4289
|
+
function w(g, m, E, F) {
|
|
4286
4290
|
var N = m >= E * 1.5;
|
|
4287
|
-
return Math.round(g / E) + " " +
|
|
4291
|
+
return Math.round(g / E) + " " + F + (N ? "s" : "");
|
|
4288
4292
|
}
|
|
4289
4293
|
return Kt;
|
|
4290
4294
|
}
|
|
@@ -4300,7 +4304,7 @@ function Ks(t) {
|
|
|
4300
4304
|
}
|
|
4301
4305
|
r.selectColor = e;
|
|
4302
4306
|
function r(g) {
|
|
4303
|
-
let m, E = null,
|
|
4307
|
+
let m, E = null, F, N;
|
|
4304
4308
|
function P(...K) {
|
|
4305
4309
|
if (!P.enabled)
|
|
4306
4310
|
return;
|
|
@@ -4322,7 +4326,7 @@ function Ks(t) {
|
|
|
4322
4326
|
return P.namespace = g, P.useColors = r.useColors(), P.color = r.selectColor(g), P.extend = o, P.destroy = r.destroy, Object.defineProperty(P, "enabled", {
|
|
4323
4327
|
enumerable: !0,
|
|
4324
4328
|
configurable: !1,
|
|
4325
|
-
get: () => E !== null ? E : (
|
|
4329
|
+
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, N = r.enabled(g)), N),
|
|
4326
4330
|
set: (K) => {
|
|
4327
4331
|
E = K;
|
|
4328
4332
|
}
|
|
@@ -4335,8 +4339,8 @@ function Ks(t) {
|
|
|
4335
4339
|
function s(g) {
|
|
4336
4340
|
r.save(g), r.namespaces = g, r.names = [], r.skips = [];
|
|
4337
4341
|
let m;
|
|
4338
|
-
const E = (typeof g == "string" ? g : "").split(/[\s,]+/),
|
|
4339
|
-
for (m = 0; m <
|
|
4342
|
+
const E = (typeof g == "string" ? g : "").split(/[\s,]+/), F = E.length;
|
|
4343
|
+
for (m = 0; m < F; m++)
|
|
4340
4344
|
E[m] && (g = E[m].replace(/\*/g, ".*?"), g[0] === "-" ? r.skips.push(new RegExp("^" + g.slice(1) + "$")) : r.names.push(new RegExp("^" + g + "$")));
|
|
4341
4345
|
}
|
|
4342
4346
|
function u() {
|