@streamlayer/sdk-web 0.28.23 → 0.28.25
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 +6 -6
- package/lib/es/index.js +144 -133
- package/package.json +7 -7
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,29 +1790,34 @@ 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 ===
|
|
1790
|
-
}), t.sdk.authorizationBypass = async (o, s) => {
|
|
1791
|
-
st.getSchema() === o && st.getExternalToken() === s && t.transport.getHeader("authorization")
|
|
1793
|
+
o === Fe.READY && t.auth.reLogin();
|
|
1794
|
+
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (o, s) => {
|
|
1795
|
+
if (!(st.getSchema() === o && st.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
1796
|
+
try {
|
|
1797
|
+
await t.auth.login(o, s), st.setSchema(o), st.setExternalToken(s);
|
|
1798
|
+
} catch {
|
|
1799
|
+
t.sdk.logout();
|
|
1800
|
+
}
|
|
1792
1801
|
}, t.sdk.logout = () => {
|
|
1793
1802
|
t.auth.logout(), st.clear();
|
|
1794
1803
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1795
1804
|
}, xi = (t, e, r) => {
|
|
1796
|
-
t.store = new _i(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = t.
|
|
1805
|
+
t.store = new _i(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([o, s]) => [o, s.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
1797
1806
|
t.store.unsubscribe();
|
|
1798
1807
|
}, r();
|
|
1799
1808
|
}, Bi = (t, e, r) => {
|
|
1800
1809
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1801
1810
|
if (t.stores.enabled.get() === "on")
|
|
1802
1811
|
return { enabled: !0 };
|
|
1803
|
-
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);
|
|
1804
1813
|
try {
|
|
1805
1814
|
const o = await t.stores.organizationSettings.getValue();
|
|
1806
|
-
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" });
|
|
1807
1816
|
} catch (o) {
|
|
1808
|
-
return t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1817
|
+
return t.stores.enabled.setValue(), t.stores.status.setValue(Fe.FAILED), { err: `${o}` };
|
|
1809
1818
|
}
|
|
1810
1819
|
}, t.sdk.disableApp = () => {
|
|
1811
|
-
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());
|
|
1812
1821
|
}, t.sdk.createEventSession = (o) => {
|
|
1813
1822
|
t.stores.providerStreamId.setValue(o);
|
|
1814
1823
|
}, r();
|
|
@@ -1882,7 +1891,7 @@ function dr(t) {
|
|
|
1882
1891
|
let _ = 0;
|
|
1883
1892
|
const D = I.length, U = new Array(D);
|
|
1884
1893
|
for (_ = 0; _ < D; ++_)
|
|
1885
|
-
U[_] =
|
|
1894
|
+
U[_] = F(I[_]);
|
|
1886
1895
|
return U;
|
|
1887
1896
|
}
|
|
1888
1897
|
function o(I) {
|
|
@@ -1890,25 +1899,25 @@ function dr(t) {
|
|
|
1890
1899
|
if (p && Object.getPrototypeOf(I) !== Vi)
|
|
1891
1900
|
return p(I);
|
|
1892
1901
|
const D = f(I);
|
|
1893
|
-
let U,
|
|
1894
|
-
for (U = 0,
|
|
1895
|
-
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]));
|
|
1896
1905
|
return _;
|
|
1897
1906
|
}
|
|
1898
1907
|
function s(I, _) {
|
|
1899
1908
|
const D = I.length, U = _.length;
|
|
1900
|
-
let
|
|
1909
|
+
let T = 0;
|
|
1901
1910
|
const x = new Array(D + U);
|
|
1902
|
-
for (
|
|
1903
|
-
x[
|
|
1904
|
-
for (
|
|
1905
|
-
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]);
|
|
1906
1915
|
return x;
|
|
1907
1916
|
}
|
|
1908
1917
|
const u = Object.prototype.propertyIsEnumerable;
|
|
1909
1918
|
function l(I) {
|
|
1910
1919
|
const _ = Object.keys(I), D = Object.getOwnPropertySymbols(I);
|
|
1911
|
-
for (let U = 0,
|
|
1920
|
+
for (let U = 0, T = D.length; U < T; ++U)
|
|
1912
1921
|
u.call(I, D[U]) && _.push(D[U]);
|
|
1913
1922
|
return _;
|
|
1914
1923
|
}
|
|
@@ -1919,30 +1928,30 @@ function dr(t) {
|
|
|
1919
1928
|
function g(I) {
|
|
1920
1929
|
return typeof I != "object" || I === null;
|
|
1921
1930
|
}
|
|
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
|
|
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) {
|
|
1924
1933
|
return w(I) ? Array.isArray(I) ? r(I) : o(I) : I;
|
|
1925
1934
|
}
|
|
1926
1935
|
function N(I, _) {
|
|
1927
|
-
const D = {}, U = f(I),
|
|
1936
|
+
const D = {}, U = f(I), T = f(_);
|
|
1928
1937
|
let x, k, G;
|
|
1929
1938
|
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] =
|
|
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])));
|
|
1934
1943
|
return D;
|
|
1935
1944
|
}
|
|
1936
1945
|
function P(I, _) {
|
|
1937
1946
|
const D = Array.isArray(_), U = Array.isArray(I);
|
|
1938
|
-
return g(_) ? _ : m(I) ?
|
|
1947
|
+
return g(_) ? _ : m(I) ? F(_) : D && U ? E(I, _) : D !== U ? F(_) : N(I, _);
|
|
1939
1948
|
}
|
|
1940
1949
|
function K() {
|
|
1941
1950
|
switch (arguments.length) {
|
|
1942
1951
|
case 0:
|
|
1943
1952
|
return {};
|
|
1944
1953
|
case 1:
|
|
1945
|
-
return
|
|
1954
|
+
return F(arguments[0]);
|
|
1946
1955
|
case 2:
|
|
1947
1956
|
return P(arguments[0], arguments[1]);
|
|
1948
1957
|
}
|
|
@@ -2187,15 +2196,15 @@ class un extends hr {
|
|
|
2187
2196
|
};
|
|
2188
2197
|
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }) => this.read(At.ONBOARDING, o, e, r);
|
|
2189
2198
|
}
|
|
2190
|
-
const
|
|
2199
|
+
const Fr = {
|
|
2191
2200
|
pageSize: 10
|
|
2192
2201
|
}, eo = (t, e, r) => {
|
|
2193
|
-
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) => {
|
|
2194
2203
|
if (w) {
|
|
2195
2204
|
s.setKey("loading", !0);
|
|
2196
2205
|
const g = {
|
|
2197
2206
|
eventId: w,
|
|
2198
|
-
pagination: { page: 0, pageSize: r?.pageSize ||
|
|
2207
|
+
pagination: { page: 0, pageSize: r?.pageSize || Fr.pageSize }
|
|
2199
2208
|
}, m = await u(g);
|
|
2200
2209
|
s.set({ data: m.data.map((E) => E.attributes), loading: !1 }), o.set(g.pagination);
|
|
2201
2210
|
}
|
|
@@ -2208,12 +2217,12 @@ const Tr = {
|
|
|
2208
2217
|
const g = e.get(), m = s.get().data?.length || 0;
|
|
2209
2218
|
if (w.page > 0 && g && m >= w.page * w.pageSize) {
|
|
2210
2219
|
s.setKey("loading", !0);
|
|
2211
|
-
const
|
|
2220
|
+
const F = await u({
|
|
2212
2221
|
eventId: g,
|
|
2213
2222
|
pagination: w
|
|
2214
2223
|
}), N = s.get().data || [];
|
|
2215
2224
|
s.set({
|
|
2216
|
-
data: [...N, ...
|
|
2225
|
+
data: [...N, ...F.data.map((P) => P.attributes)],
|
|
2217
2226
|
loading: !1
|
|
2218
2227
|
});
|
|
2219
2228
|
}
|
|
@@ -2235,7 +2244,7 @@ var re;
|
|
|
2235
2244
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2236
2245
|
})(re || (re = {}));
|
|
2237
2246
|
const no = (t, e, r, o) => {
|
|
2238
|
-
const s = new un(), u = ne(re.
|
|
2247
|
+
const s = new un(), u = ne(re.Unset), l = () => {
|
|
2239
2248
|
const { inplayGame: w = {} } = t.featureSettings.get(), g = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2240
2249
|
o.add({
|
|
2241
2250
|
type: Ne.ONBOARDING,
|
|
@@ -2246,7 +2255,7 @@ const no = (t, e, r, o) => {
|
|
|
2246
2255
|
},
|
|
2247
2256
|
autoHideDuration: 1e6,
|
|
2248
2257
|
data: {
|
|
2249
|
-
questionType:
|
|
2258
|
+
questionType: Te.UNSET,
|
|
2250
2259
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2251
2260
|
// @ts-ignore
|
|
2252
2261
|
onboarding: { ...w }
|
|
@@ -2258,8 +2267,10 @@ const no = (t, e, r, o) => {
|
|
|
2258
2267
|
});
|
|
2259
2268
|
const f = async () => {
|
|
2260
2269
|
const w = e.userId.get();
|
|
2261
|
-
if (!w)
|
|
2270
|
+
if (!w) {
|
|
2271
|
+
u.set(re.Unset);
|
|
2262
2272
|
return;
|
|
2273
|
+
}
|
|
2263
2274
|
s.getOnboardingStatus({
|
|
2264
2275
|
userId: w,
|
|
2265
2276
|
organizationId: e.organizationId.get() || "",
|
|
@@ -2268,8 +2279,8 @@ const no = (t, e, r, o) => {
|
|
|
2268
2279
|
const m = await e.moderation.getValue();
|
|
2269
2280
|
if (u.get() === re.Completed)
|
|
2270
2281
|
return;
|
|
2271
|
-
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed),
|
|
2272
|
-
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);
|
|
2273
2284
|
};
|
|
2274
2285
|
return f(), e.userId.subscribe((w) => {
|
|
2275
2286
|
w && f();
|
|
@@ -2283,7 +2294,7 @@ const no = (t, e, r, o) => {
|
|
|
2283
2294
|
eventId: w
|
|
2284
2295
|
}, re.Completed));
|
|
2285
2296
|
} };
|
|
2286
|
-
}, io = /* @__PURE__ */ new Set([
|
|
2297
|
+
}, io = /* @__PURE__ */ new Set([Te.POLL, Te.PREDICTION, Te.TRIVIA]);
|
|
2287
2298
|
class oo extends lr {
|
|
2288
2299
|
/** user statistics (leaderboard panel) */
|
|
2289
2300
|
userSummary;
|
|
@@ -2329,7 +2340,7 @@ class oo extends lr {
|
|
|
2329
2340
|
}
|
|
2330
2341
|
}
|
|
2331
2342
|
});
|
|
2332
|
-
else if (s.data.question.type ===
|
|
2343
|
+
else if (s.data.question.type === Te.FACTOID) {
|
|
2333
2344
|
const u = s.data.question.options?.options.value, l = {
|
|
2334
2345
|
heading: s.data.question.notification.title,
|
|
2335
2346
|
body: s.data.question.notification.body,
|
|
@@ -2355,7 +2366,7 @@ class oo extends lr {
|
|
|
2355
2366
|
insight: l
|
|
2356
2367
|
}
|
|
2357
2368
|
});
|
|
2358
|
-
} else if (s.data.question.type ===
|
|
2369
|
+
} else if (s.data.question.type === Te.TWEET) {
|
|
2359
2370
|
const u = s.data.question.options?.options.value, l = {
|
|
2360
2371
|
title: s.data.question.notification.title,
|
|
2361
2372
|
body: s.data.question.notification.body,
|
|
@@ -2391,7 +2402,7 @@ class oo extends lr {
|
|
|
2391
2402
|
if (!o)
|
|
2392
2403
|
return;
|
|
2393
2404
|
const { status: s, type: u, id: l } = o;
|
|
2394
|
-
if (s === dt.RESOLVED && u ===
|
|
2405
|
+
if (s === dt.RESOLVED && u === Te.PREDICTION) {
|
|
2395
2406
|
const f = this.background.getCurrentSessionId({
|
|
2396
2407
|
prefix: `notification-id:${l}`
|
|
2397
2408
|
}), p = await sn(l, e), w = p?.answers.find(({ correct: m }) => m), g = p?.answers.find(({ youVoted: m }) => m);
|
|
@@ -2402,7 +2413,7 @@ class oo extends lr {
|
|
|
2402
2413
|
autoHideDuration: 35e3,
|
|
2403
2414
|
id: f,
|
|
2404
2415
|
data: {
|
|
2405
|
-
questionType:
|
|
2416
|
+
questionType: Te.PREDICTION,
|
|
2406
2417
|
question: {
|
|
2407
2418
|
title: w?.youVoted ? `Congratulations! You answered correctly! You won ${w.points} pts!` : `Better luck next time! Correct: ${w?.text}!`,
|
|
2408
2419
|
votedAnswer: {
|
|
@@ -2454,7 +2465,7 @@ class so extends lr {
|
|
|
2454
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) => {
|
|
2455
2466
|
s === De.Ready ? this.connect() : this.disconnect();
|
|
2456
2467
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2457
|
-
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({
|
|
2458
2469
|
type: Ne.QUESTION,
|
|
2459
2470
|
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2460
2471
|
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
@@ -2571,7 +2582,7 @@ function cn(t, e, r) {
|
|
|
2571
2582
|
paused: !1,
|
|
2572
2583
|
concurrency: r,
|
|
2573
2584
|
running: w,
|
|
2574
|
-
resume:
|
|
2585
|
+
resume: F,
|
|
2575
2586
|
idle: N,
|
|
2576
2587
|
length: m,
|
|
2577
2588
|
getQueue: E,
|
|
@@ -2589,35 +2600,35 @@ function cn(t, e, r) {
|
|
|
2589
2600
|
p.paused = !0;
|
|
2590
2601
|
}
|
|
2591
2602
|
function m() {
|
|
2592
|
-
for (var
|
|
2593
|
-
|
|
2603
|
+
for (var T = s, x = 0; T; )
|
|
2604
|
+
T = T.next, x++;
|
|
2594
2605
|
return x;
|
|
2595
2606
|
}
|
|
2596
2607
|
function E() {
|
|
2597
|
-
for (var
|
|
2598
|
-
x.push(
|
|
2608
|
+
for (var T = s, x = []; T; )
|
|
2609
|
+
x.push(T.value), T = T.next;
|
|
2599
2610
|
return x;
|
|
2600
2611
|
}
|
|
2601
|
-
function
|
|
2612
|
+
function F() {
|
|
2602
2613
|
if (p.paused) {
|
|
2603
2614
|
p.paused = !1;
|
|
2604
|
-
for (var
|
|
2615
|
+
for (var T = 0; T < p.concurrency; T++)
|
|
2605
2616
|
l++, I();
|
|
2606
2617
|
}
|
|
2607
2618
|
}
|
|
2608
2619
|
function N() {
|
|
2609
2620
|
return l === 0 && p.length() === 0;
|
|
2610
2621
|
}
|
|
2611
|
-
function P(
|
|
2622
|
+
function P(T, x) {
|
|
2612
2623
|
var k = o.get();
|
|
2613
|
-
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));
|
|
2614
2625
|
}
|
|
2615
|
-
function K(
|
|
2626
|
+
function K(T, x) {
|
|
2616
2627
|
var k = o.get();
|
|
2617
|
-
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));
|
|
2618
2629
|
}
|
|
2619
|
-
function I(
|
|
2620
|
-
|
|
2630
|
+
function I(T) {
|
|
2631
|
+
T && o.release(T);
|
|
2621
2632
|
var x = s;
|
|
2622
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();
|
|
2623
2634
|
}
|
|
@@ -2627,8 +2638,8 @@ function cn(t, e, r) {
|
|
|
2627
2638
|
function D() {
|
|
2628
2639
|
s = null, u = null, p.drain(), p.drain = ae;
|
|
2629
2640
|
}
|
|
2630
|
-
function U(
|
|
2631
|
-
f =
|
|
2641
|
+
function U(T) {
|
|
2642
|
+
f = T;
|
|
2632
2643
|
}
|
|
2633
2644
|
}
|
|
2634
2645
|
function ae() {
|
|
@@ -2651,10 +2662,10 @@ function yo(t, e, r) {
|
|
|
2651
2662
|
var s = cn(t, o, r), u = s.push, l = s.unshift;
|
|
2652
2663
|
return s.push = f, s.unshift = p, s.drained = w, s;
|
|
2653
2664
|
function f(g) {
|
|
2654
|
-
var m = new Promise(function(E,
|
|
2665
|
+
var m = new Promise(function(E, F) {
|
|
2655
2666
|
u(g, function(N, P) {
|
|
2656
2667
|
if (N) {
|
|
2657
|
-
|
|
2668
|
+
F(N);
|
|
2658
2669
|
return;
|
|
2659
2670
|
}
|
|
2660
2671
|
E(P);
|
|
@@ -2663,10 +2674,10 @@ function yo(t, e, r) {
|
|
|
2663
2674
|
return m.catch(ae), m;
|
|
2664
2675
|
}
|
|
2665
2676
|
function p(g) {
|
|
2666
|
-
var m = new Promise(function(E,
|
|
2677
|
+
var m = new Promise(function(E, F) {
|
|
2667
2678
|
l(g, function(N, P) {
|
|
2668
2679
|
if (N) {
|
|
2669
|
-
|
|
2680
|
+
F(N);
|
|
2670
2681
|
return;
|
|
2671
2682
|
}
|
|
2672
2683
|
E(P);
|
|
@@ -2689,7 +2700,7 @@ function yo(t, e, r) {
|
|
|
2689
2700
|
}
|
|
2690
2701
|
gr.exports = cn;
|
|
2691
2702
|
gr.exports.promise = yo;
|
|
2692
|
-
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) {
|
|
2693
2704
|
return Function.prototype.apply.call(e, r, o);
|
|
2694
2705
|
}, gt;
|
|
2695
2706
|
Je && typeof Je.ownKeys == "function" ? gt = Je.ownKeys : Object.getOwnPropertySymbols ? gt = function(e) {
|
|
@@ -2761,10 +2772,10 @@ q.prototype.emit = function(e) {
|
|
|
2761
2772
|
if (p === void 0)
|
|
2762
2773
|
return !1;
|
|
2763
2774
|
if (typeof p == "function")
|
|
2764
|
-
|
|
2775
|
+
Tr(p, this, r);
|
|
2765
2776
|
else
|
|
2766
2777
|
for (var w = p.length, g = mn(p, w), o = 0; o < w; ++o)
|
|
2767
|
-
|
|
2778
|
+
Tr(g[o], this, r);
|
|
2768
2779
|
return !0;
|
|
2769
2780
|
};
|
|
2770
2781
|
function pn(t, e, r, o) {
|
|
@@ -2942,8 +2953,8 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2942
2953
|
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Eo();
|
|
2943
2954
|
}, Or = {
|
|
2944
2955
|
foo: {}
|
|
2945
|
-
},
|
|
2946
|
-
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);
|
|
2947
2958
|
}, _o = "Function.prototype.bind called on incompatible ", Co = Object.prototype.toString, Oo = Math.max, xo = "[object Function]", xr = function(e, r) {
|
|
2948
2959
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2949
2960
|
o[s] = e[s];
|
|
@@ -3008,7 +3019,7 @@ var Dt = function() {
|
|
|
3008
3019
|
return Dt;
|
|
3009
3020
|
}
|
|
3010
3021
|
}
|
|
3011
|
-
}() : Dt, Qe = Io(), Uo =
|
|
3022
|
+
}() : Dt, Qe = Io(), Uo = To(), X = Object.getPrototypeOf || (Uo ? function(t) {
|
|
3012
3023
|
return t.__proto__;
|
|
3013
3024
|
} : null), ze = {}, $o = typeof Uint8Array > "u" || !X ? $ : X(Uint8Array), Ve = {
|
|
3014
3025
|
"%AggregateError%": typeof AggregateError > "u" ? $ : AggregateError,
|
|
@@ -3187,8 +3198,8 @@ var jo = function t(e) {
|
|
|
3187
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;
|
|
3188
3199
|
w && (s = w[0], Mo(o, Vo([0, 1], w)));
|
|
3189
3200
|
for (var g = 1, m = !0; g < o.length; g += 1) {
|
|
3190
|
-
var E = o[g],
|
|
3191
|
-
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)
|
|
3192
3203
|
throw new Xe("property names with quotes must have matching quotes");
|
|
3193
3204
|
if ((E === "constructor" || !m) && (p = !0), s += "." + E, l = "%" + s + "%", Et(Ve, l))
|
|
3194
3205
|
f = Ve[l];
|
|
@@ -3225,14 +3236,14 @@ tr.hasArrayLengthDefineBug = function() {
|
|
|
3225
3236
|
return !0;
|
|
3226
3237
|
}
|
|
3227
3238
|
};
|
|
3228
|
-
var
|
|
3239
|
+
var Fn = tr, Wo = et, mt = Wo("%Object.getOwnPropertyDescriptor%", !0);
|
|
3229
3240
|
if (mt)
|
|
3230
3241
|
try {
|
|
3231
3242
|
mt([], "length");
|
|
3232
3243
|
} catch {
|
|
3233
3244
|
mt = null;
|
|
3234
3245
|
}
|
|
3235
|
-
var wr = mt, Jo =
|
|
3246
|
+
var wr = mt, Jo = Fn(), vr = et, ut = Jo && vr("%Object.defineProperty%", !0);
|
|
3236
3247
|
if (ut)
|
|
3237
3248
|
try {
|
|
3238
3249
|
ut({}, "a", { value: 1 });
|
|
@@ -3264,7 +3275,7 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3264
3275
|
e[r] = o;
|
|
3265
3276
|
else
|
|
3266
3277
|
throw new Yo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3267
|
-
},
|
|
3278
|
+
}, Tn = et, Nr = Xo, Zo = Fn(), Lr = wr, Ur = Tn("%TypeError%"), es = Tn("%Math.floor%"), ts = function(e, r) {
|
|
3268
3279
|
if (typeof e != "function")
|
|
3269
3280
|
throw new Ur("`fn` is not a function");
|
|
3270
3281
|
if (typeof r != "number" || r < 0 || r > 4294967295 || es(r) !== r)
|
|
@@ -3287,9 +3298,9 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3287
3298
|
t.exports = function(E) {
|
|
3288
3299
|
if (typeof E != "function")
|
|
3289
3300
|
throw new s("a function is required");
|
|
3290
|
-
var
|
|
3301
|
+
var F = f(e, l, arguments);
|
|
3291
3302
|
return o(
|
|
3292
|
-
|
|
3303
|
+
F,
|
|
3293
3304
|
1 + w(0, E.length - (arguments.length - 1)),
|
|
3294
3305
|
!0
|
|
3295
3306
|
);
|
|
@@ -3399,10 +3410,10 @@ var As = He ? function(e) {
|
|
|
3399
3410
|
return !1;
|
|
3400
3411
|
var r = wt.call(e);
|
|
3401
3412
|
return r !== ds && r !== ys && !/^\[object HTML/.test(r) ? !1 : Mt(e);
|
|
3402
|
-
}, 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) {
|
|
3403
3414
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3404
3415
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3405
|
-
},
|
|
3416
|
+
}, Ts = function(e, r, o) {
|
|
3406
3417
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3407
3418
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3408
3419
|
}, _s = function(e, r, o) {
|
|
@@ -3412,7 +3423,7 @@ var As = He ? function(e) {
|
|
|
3412
3423
|
if (!Es(r))
|
|
3413
3424
|
throw new TypeError("iterator must be a function");
|
|
3414
3425
|
var s;
|
|
3415
|
-
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);
|
|
3416
3427
|
}, Os = Cs, qt = [
|
|
3417
3428
|
"BigInt64Array",
|
|
3418
3429
|
"BigUint64Array",
|
|
@@ -3429,13 +3440,13 @@ var As = He ? function(e) {
|
|
|
3429
3440
|
for (var e = [], r = 0; r < qt.length; r++)
|
|
3430
3441
|
typeof xs[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3431
3442
|
return e;
|
|
3432
|
-
},
|
|
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) {
|
|
3433
3444
|
for (var o = 0; o < e.length; o += 1)
|
|
3434
3445
|
if (e[o] === r)
|
|
3435
3446
|
return o;
|
|
3436
3447
|
return -1;
|
|
3437
|
-
},
|
|
3438
|
-
Nn && vt && Qt ?
|
|
3448
|
+
}, Tt = { __proto__: null };
|
|
3449
|
+
Nn && vt && Qt ? Ft(sr, function(t) {
|
|
3439
3450
|
var e = new Dr[t]();
|
|
3440
3451
|
if (Symbol.toStringTag in e) {
|
|
3441
3452
|
var r = Qt(e), o = vt(r, Symbol.toStringTag);
|
|
@@ -3443,15 +3454,15 @@ Nn && vt && Qt ? Tt(sr, function(t) {
|
|
|
3443
3454
|
var s = Qt(r);
|
|
3444
3455
|
o = vt(s, Symbol.toStringTag);
|
|
3445
3456
|
}
|
|
3446
|
-
|
|
3457
|
+
Tt["$" + t] = $r(o.get);
|
|
3447
3458
|
}
|
|
3448
|
-
}) :
|
|
3459
|
+
}) : Ft(sr, function(t) {
|
|
3449
3460
|
var e = new Dr[t](), r = e.slice || e.set;
|
|
3450
|
-
r && (
|
|
3461
|
+
r && (Tt["$" + t] = $r(r));
|
|
3451
3462
|
});
|
|
3452
3463
|
var Ns = function(e) {
|
|
3453
3464
|
var r = !1;
|
|
3454
|
-
return Tt
|
|
3465
|
+
return Ft(Tt, function(o, s) {
|
|
3455
3466
|
if (!r)
|
|
3456
3467
|
try {
|
|
3457
3468
|
"$" + o(e) === s && (r = Ar(s, 1));
|
|
@@ -3460,7 +3471,7 @@ var Ns = function(e) {
|
|
|
3460
3471
|
}), r;
|
|
3461
3472
|
}, Ls = function(e) {
|
|
3462
3473
|
var r = !1;
|
|
3463
|
-
return Tt
|
|
3474
|
+
return Ft(Tt, function(o, s) {
|
|
3464
3475
|
if (!r)
|
|
3465
3476
|
try {
|
|
3466
3477
|
o(e), r = Ar(s, 1);
|
|
@@ -3487,7 +3498,7 @@ var Ns = function(e) {
|
|
|
3487
3498
|
if (l)
|
|
3488
3499
|
var E = u(BigInt.prototype.valueOf);
|
|
3489
3500
|
if (f)
|
|
3490
|
-
var
|
|
3501
|
+
var F = u(Symbol.prototype.valueOf);
|
|
3491
3502
|
function N(S, pt) {
|
|
3492
3503
|
if (typeof S != "object")
|
|
3493
3504
|
return !1;
|
|
@@ -3522,10 +3533,10 @@ var Ns = function(e) {
|
|
|
3522
3533
|
return o(S) === "Uint32Array";
|
|
3523
3534
|
}
|
|
3524
3535
|
t.isUint32Array = U;
|
|
3525
|
-
function
|
|
3536
|
+
function T(S) {
|
|
3526
3537
|
return o(S) === "Int8Array";
|
|
3527
3538
|
}
|
|
3528
|
-
t.isInt8Array =
|
|
3539
|
+
t.isInt8Array = T;
|
|
3529
3540
|
function x(S) {
|
|
3530
3541
|
return o(S) === "Int16Array";
|
|
3531
3542
|
}
|
|
@@ -3643,7 +3654,7 @@ var Ns = function(e) {
|
|
|
3643
3654
|
}
|
|
3644
3655
|
t.isBigIntObject = Me;
|
|
3645
3656
|
function ht(S) {
|
|
3646
|
-
return f && N(S,
|
|
3657
|
+
return f && N(S, F);
|
|
3647
3658
|
}
|
|
3648
3659
|
t.isSymbolObject = ht;
|
|
3649
3660
|
function it(S) {
|
|
@@ -3690,7 +3701,7 @@ var js = ar.exports;
|
|
|
3690
3701
|
return C;
|
|
3691
3702
|
}, r = /%[sdj%]/g;
|
|
3692
3703
|
t.format = function(d) {
|
|
3693
|
-
if (!
|
|
3704
|
+
if (!T(d)) {
|
|
3694
3705
|
for (var v = [], A = 0; A < arguments.length; A++)
|
|
3695
3706
|
v.push(l(arguments[A]));
|
|
3696
3707
|
return v.join(" ");
|
|
@@ -3803,7 +3814,7 @@ var js = ar.exports;
|
|
|
3803
3814
|
v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3804
3815
|
!(v.constructor && v.constructor.prototype === v)) {
|
|
3805
3816
|
var C = v.inspect(A, d);
|
|
3806
|
-
return
|
|
3817
|
+
return T(C) || (C = g(d, C, A)), C;
|
|
3807
3818
|
}
|
|
3808
3819
|
var j = m(d, v);
|
|
3809
3820
|
if (j)
|
|
@@ -3834,14 +3845,14 @@ var js = ar.exports;
|
|
|
3834
3845
|
return G(v) ? d.stylize(RegExp.prototype.toString.call(v), "regexp") : d.stylize("[Object]", "special");
|
|
3835
3846
|
d.seen.push(v);
|
|
3836
3847
|
var oe;
|
|
3837
|
-
return te ? oe =
|
|
3848
|
+
return te ? oe = F(d, v, A, B, V) : oe = V.map(function(Me) {
|
|
3838
3849
|
return N(d, v, A, B, Me, te);
|
|
3839
3850
|
}), d.seen.pop(), P(oe, M, ye);
|
|
3840
3851
|
}
|
|
3841
3852
|
function m(d, v) {
|
|
3842
3853
|
if (k(v))
|
|
3843
3854
|
return d.stylize("undefined", "undefined");
|
|
3844
|
-
if (
|
|
3855
|
+
if (T(v)) {
|
|
3845
3856
|
var A = "'" + JSON.stringify(v).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
3846
3857
|
return d.stylize(A, "string");
|
|
3847
3858
|
}
|
|
@@ -3855,7 +3866,7 @@ var js = ar.exports;
|
|
|
3855
3866
|
function E(d) {
|
|
3856
3867
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
3857
3868
|
}
|
|
3858
|
-
function
|
|
3869
|
+
function F(d, v, A, C, j) {
|
|
3859
3870
|
for (var V = [], B = 0, L = v.length; B < L; ++B)
|
|
3860
3871
|
ke(v, String(B)) ? V.push(N(
|
|
3861
3872
|
d,
|
|
@@ -3925,10 +3936,10 @@ var js = ar.exports;
|
|
|
3925
3936
|
return typeof d == "number";
|
|
3926
3937
|
}
|
|
3927
3938
|
t.isNumber = U;
|
|
3928
|
-
function
|
|
3939
|
+
function T(d) {
|
|
3929
3940
|
return typeof d == "string";
|
|
3930
3941
|
}
|
|
3931
|
-
t.isString =
|
|
3942
|
+
t.isString = T;
|
|
3932
3943
|
function x(d) {
|
|
3933
3944
|
return typeof d == "symbol";
|
|
3934
3945
|
}
|
|
@@ -4221,8 +4232,8 @@ function zs() {
|
|
|
4221
4232
|
g
|
|
4222
4233
|
);
|
|
4223
4234
|
if (m) {
|
|
4224
|
-
var E = parseFloat(m[1]),
|
|
4225
|
-
switch (
|
|
4235
|
+
var E = parseFloat(m[1]), F = (m[2] || "ms").toLowerCase();
|
|
4236
|
+
switch (F) {
|
|
4226
4237
|
case "years":
|
|
4227
4238
|
case "year":
|
|
4228
4239
|
case "yrs":
|
|
@@ -4275,9 +4286,9 @@ function zs() {
|
|
|
4275
4286
|
var m = Math.abs(g);
|
|
4276
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";
|
|
4277
4288
|
}
|
|
4278
|
-
function w(g, m, E,
|
|
4289
|
+
function w(g, m, E, F) {
|
|
4279
4290
|
var N = m >= E * 1.5;
|
|
4280
|
-
return Math.round(g / E) + " " +
|
|
4291
|
+
return Math.round(g / E) + " " + F + (N ? "s" : "");
|
|
4281
4292
|
}
|
|
4282
4293
|
return Kt;
|
|
4283
4294
|
}
|
|
@@ -4293,7 +4304,7 @@ function Ks(t) {
|
|
|
4293
4304
|
}
|
|
4294
4305
|
r.selectColor = e;
|
|
4295
4306
|
function r(g) {
|
|
4296
|
-
let m, E = null,
|
|
4307
|
+
let m, E = null, F, N;
|
|
4297
4308
|
function P(...K) {
|
|
4298
4309
|
if (!P.enabled)
|
|
4299
4310
|
return;
|
|
@@ -4315,7 +4326,7 @@ function Ks(t) {
|
|
|
4315
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", {
|
|
4316
4327
|
enumerable: !0,
|
|
4317
4328
|
configurable: !1,
|
|
4318
|
-
get: () => E !== null ? E : (
|
|
4329
|
+
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, N = r.enabled(g)), N),
|
|
4319
4330
|
set: (K) => {
|
|
4320
4331
|
E = K;
|
|
4321
4332
|
}
|
|
@@ -4328,8 +4339,8 @@ function Ks(t) {
|
|
|
4328
4339
|
function s(g) {
|
|
4329
4340
|
r.save(g), r.namespaces = g, r.names = [], r.skips = [];
|
|
4330
4341
|
let m;
|
|
4331
|
-
const E = (typeof g == "string" ? g : "").split(/[\s,]+/),
|
|
4332
|
-
for (m = 0; m <
|
|
4342
|
+
const E = (typeof g == "string" ? g : "").split(/[\s,]+/), F = E.length;
|
|
4343
|
+
for (m = 0; m < F; m++)
|
|
4333
4344
|
E[m] && (g = E[m].replace(/\*/g, ".*?"), g[0] === "-" ? r.skips.push(new RegExp("^" + g.slice(1) + "$")) : r.names.push(new RegExp("^" + g + "$")));
|
|
4334
4345
|
}
|
|
4335
4346
|
function u() {
|