@streamlayer/sdk-web 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +7 -7
- package/lib/es/index.js +353 -333
- package/lib/index.d.ts +1 -0
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { computed as vi, map as Si, atom as Ct, batched as $r, onMount as gr } f
|
|
|
7
7
|
import { nanoid as rr } from "nanoid";
|
|
8
8
|
import { ConnectError as tt, Code as oe, createContextKey as Mr, createPromiseClient as Br, createContextValues as wi } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as jr } from "@connectrpc/connect-web";
|
|
10
|
-
import { nanoquery as
|
|
10
|
+
import { nanoquery as qr } from "@nanostores/query";
|
|
11
11
|
import { Events as An } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as nt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
13
|
import { Users as br } from "@streamlayer/sl-eslib/users/users_connect";
|
|
@@ -15,7 +15,7 @@ import { Feed as Z } from "@streamlayer/sl-eslib/interactive/feed/interactive.fe
|
|
|
15
15
|
import { Leaderboard as En } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
17
|
import { LinksClient as Ai } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
-
import { Kind as x, TopicSubType as we, TopicType as H, PollOpenedFrom as re, Category as
|
|
18
|
+
import { Kind as x, TopicSubType as we, TopicType as H, PollOpenedFrom as re, Category as K, ScreenOrientation as Ur } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
19
|
import { AnalyticsService as In } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
20
|
import { InteractionActionType as xr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
21
|
import { NotificationKind as fe, NotificationType as Qr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
@@ -283,7 +283,7 @@ class X extends Lt {
|
|
|
283
283
|
return this.getStore().get();
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const q = (t) => Ct(t);
|
|
287
287
|
class ce extends Lt {
|
|
288
288
|
atomStore;
|
|
289
289
|
constructor(e, r, n) {
|
|
@@ -315,7 +315,7 @@ class ce extends Lt {
|
|
|
315
315
|
key = () => this.getStore().key;
|
|
316
316
|
off = () => this.getStore().off();
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const Q = new ki();
|
|
319
319
|
async function* Di(t, e) {
|
|
320
320
|
for await (const r of e) {
|
|
321
321
|
t.response.message = r, t.received_at = Date.now(), t.id = kn++;
|
|
@@ -444,7 +444,7 @@ class Vi {
|
|
|
444
444
|
reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
|
|
445
445
|
reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
|
|
446
446
|
withStore: i.withStore ?? !1
|
|
447
|
-
}, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new X(
|
|
447
|
+
}, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new X(q(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
|
|
448
448
|
this.state.getValue("status") === te.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
|
|
449
449
|
})), this.updateState(te.Ready);
|
|
450
450
|
}
|
|
@@ -548,8 +548,8 @@ const $i = /* @__PURE__ */ new Set([
|
|
|
548
548
|
const a = tt.from(s);
|
|
549
549
|
if (o >= r || !(a instanceof tt) || !$i.has(a.code))
|
|
550
550
|
throw s;
|
|
551
|
-
const u = Math.min(i, Math.pow(2, o) * n),
|
|
552
|
-
await new Promise((c) => setTimeout(c,
|
|
551
|
+
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
552
|
+
await new Promise((c) => setTimeout(c, d));
|
|
553
553
|
}
|
|
554
554
|
}, or = {
|
|
555
555
|
retryAttempts: Mr(10, { description: "Number of attempts to retry" }),
|
|
@@ -584,7 +584,7 @@ class Kr {
|
|
|
584
584
|
"sl-device-id": Bi(),
|
|
585
585
|
"sl-device-os": ji()
|
|
586
586
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
587
|
-
const [n, i, o] =
|
|
587
|
+
const [n, i, o] = qr({
|
|
588
588
|
dedupeTime: r?.dedupeTime,
|
|
589
589
|
refetchInterval: r?.refetchInterval
|
|
590
590
|
});
|
|
@@ -617,7 +617,7 @@ class Kr {
|
|
|
617
617
|
for (const [i, o] of this.subscriptions)
|
|
618
618
|
o.disconnect(), this.subscriptions.delete(i);
|
|
619
619
|
this.clients.clear(), this.streamClients.clear(), this.subscriptions.clear();
|
|
620
|
-
const [e, r, n] =
|
|
620
|
+
const [e, r, n] = qr({
|
|
621
621
|
dedupeTime: this.opts?.dedupeTime,
|
|
622
622
|
refetchInterval: this.opts?.refetchInterval
|
|
623
623
|
});
|
|
@@ -650,11 +650,11 @@ class Kr {
|
|
|
650
650
|
o.charAt(0).toLowerCase() + o.slice(1),
|
|
651
651
|
...Array.isArray(r) ? r : [r]
|
|
652
652
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
653
|
-
return { client: i, createRequestOptions: (
|
|
653
|
+
return { client: i, createRequestOptions: (d) => {
|
|
654
654
|
const c = wi();
|
|
655
|
-
for (const f in
|
|
655
|
+
for (const f in d) {
|
|
656
656
|
const p = or[f];
|
|
657
|
-
c.set(p,
|
|
657
|
+
c.set(p, d[f]);
|
|
658
658
|
}
|
|
659
659
|
return c;
|
|
660
660
|
}, queryKey: s, queryKeyStr: a.join("") };
|
|
@@ -682,7 +682,7 @@ class Kr {
|
|
|
682
682
|
this.interceptors.push(e), this.interceptors.push(Ri()), this.opts?.retryable && this.interceptors.push(Mi);
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
const
|
|
685
|
+
const qi = (t, e) => {
|
|
686
686
|
const { client: r, queryKey: n } = e.createPromiseClient(An, {
|
|
687
687
|
method: "retrieveEventId",
|
|
688
688
|
params: [t]
|
|
@@ -700,7 +700,7 @@ const Ui = (t, e) => {
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
|
-
},
|
|
703
|
+
}, Ui = (t, e) => {
|
|
704
704
|
const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "getStream", params: [t] });
|
|
705
705
|
return e.nanoquery.createFetcherStore(n, {
|
|
706
706
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
@@ -793,9 +793,9 @@ var ye;
|
|
|
793
793
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
794
794
|
})(ye || (ye = {}));
|
|
795
795
|
const Yi = (t) => {
|
|
796
|
-
const e = new je(), r = new X(
|
|
796
|
+
const e = new je(), r = new X(q(e.getExternalToken()), "userKey"), n = new X(q(e.getToken()), "userToken"), i = new ce(Qi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
|
|
797
797
|
if (!a)
|
|
798
|
-
return s?.data?.id ? s.data.id : u === !1 ? void 0 :
|
|
798
|
+
return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
|
|
799
799
|
}), o = new ce(Ki(n.getStore(), t), "userSettings");
|
|
800
800
|
return {
|
|
801
801
|
userKey: r,
|
|
@@ -804,7 +804,7 @@ const Yi = (t) => {
|
|
|
804
804
|
userSettings: o
|
|
805
805
|
};
|
|
806
806
|
}, Ji = (t) => {
|
|
807
|
-
const e = new X(
|
|
807
|
+
const e = new X(q(void 0), "providerStreamId"), r = new ce(qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new ce(Ui(r.getAtomStore(), t), "streamSettings"), i = new ce(xi(r.getAtomStore(), t), "streamSettings");
|
|
808
808
|
return r.getAtomStore().listen((o) => {
|
|
809
809
|
(o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
|
|
810
810
|
}), {
|
|
@@ -814,7 +814,7 @@ const Yi = (t) => {
|
|
|
814
814
|
streamSummary: i
|
|
815
815
|
};
|
|
816
816
|
}, Xi = (t) => {
|
|
817
|
-
const e = new X(
|
|
817
|
+
const e = new X(q(void 0), "enabled"), r = new X(q(ye.DISABLED), "status"), n = new ce(zi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(Hi(n.getAtomStore(), t), "organizationAdvertising"), o = Yi(t), s = Ji(t);
|
|
818
818
|
return {
|
|
819
819
|
enabled: e,
|
|
820
820
|
status: r,
|
|
@@ -990,11 +990,11 @@ const eo = (t, e, r) => {
|
|
|
990
990
|
const a = e.get();
|
|
991
991
|
if (!a)
|
|
992
992
|
return;
|
|
993
|
-
const u = r.get().data?.find((c) => c.id === a?.questionId),
|
|
994
|
-
return u ? (u.openedFrom =
|
|
993
|
+
const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
|
|
994
|
+
return u ? (u.openedFrom = d, u) : a.question;
|
|
995
995
|
}), i = $r(n, (a) => a && a.type === "question" ? a.id : void 0), o = sr(i, t);
|
|
996
996
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
997
|
-
const u = o.get().data,
|
|
997
|
+
const u = o.get().data, d = (c, f) => {
|
|
998
998
|
if (!c || !f)
|
|
999
999
|
return c || f || [];
|
|
1000
1000
|
const p = [];
|
|
@@ -1013,7 +1013,7 @@ const eo = (t, e, r) => {
|
|
|
1013
1013
|
options: u?.options,
|
|
1014
1014
|
subject: u?.subject,
|
|
1015
1015
|
appearance: u?.appearance,
|
|
1016
|
-
answers:
|
|
1016
|
+
answers: d(u?.answers, a?.answers)
|
|
1017
1017
|
});
|
|
1018
1018
|
} };
|
|
1019
1019
|
};
|
|
@@ -1043,11 +1043,19 @@ const ho = (t) => {
|
|
|
1043
1043
|
};
|
|
1044
1044
|
}, yo = (t, e, r) => {
|
|
1045
1045
|
let n = !1;
|
|
1046
|
-
const i = r.transport, o = ve("advertisement"), s = new po(), a = J({}), u = lo(t, i),
|
|
1046
|
+
const i = r.transport, o = ve("advertisement"), s = new po(), a = J({}), u = lo(t, i), d = () => {
|
|
1047
1047
|
a.setKey("hasNotification", !1);
|
|
1048
|
+
const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type;
|
|
1049
|
+
g && Q.emit("advertisement", {
|
|
1050
|
+
action: "notification-opened",
|
|
1051
|
+
payload: {
|
|
1052
|
+
id: g,
|
|
1053
|
+
type: S
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1048
1056
|
}, c = () => {
|
|
1049
1057
|
const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type, C = a.get()?.isOpened;
|
|
1050
|
-
g && !C && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0),
|
|
1058
|
+
g && !C && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0), Q.emit("advertisement", {
|
|
1051
1059
|
action: "opened",
|
|
1052
1060
|
payload: {
|
|
1053
1061
|
id: g,
|
|
@@ -1076,7 +1084,7 @@ const ho = (t) => {
|
|
|
1076
1084
|
})));
|
|
1077
1085
|
};
|
|
1078
1086
|
a.subscribe((b, g) => {
|
|
1079
|
-
b.data && !b.isOpened &&
|
|
1087
|
+
b.data && !b.isOpened && Q.emit("advertisement", {
|
|
1080
1088
|
action: "received",
|
|
1081
1089
|
payload: {
|
|
1082
1090
|
id: b.data.question.id,
|
|
@@ -1085,7 +1093,7 @@ const ho = (t) => {
|
|
|
1085
1093
|
isViewed: !!s.isViewed(b.data.question.id)
|
|
1086
1094
|
},
|
|
1087
1095
|
skipAnalytics: b.data.question.id === g?.data?.question.id
|
|
1088
|
-
}), !b?.data && g?.data &&
|
|
1096
|
+
}), !b?.data && g?.data && Q.emit("advertisement", {
|
|
1089
1097
|
action: "closed",
|
|
1090
1098
|
payload: {
|
|
1091
1099
|
id: g.data.question.id,
|
|
@@ -1115,7 +1123,7 @@ const ho = (t) => {
|
|
|
1115
1123
|
o.debug({ promotion: g }, "skip: %o");
|
|
1116
1124
|
}
|
|
1117
1125
|
}));
|
|
1118
|
-
}, hide: p, show: f, open:
|
|
1126
|
+
}, hide: p, show: f, open: d, markAsViewed: c, $store: a };
|
|
1119
1127
|
};
|
|
1120
1128
|
var Le;
|
|
1121
1129
|
(function(t) {
|
|
@@ -1154,7 +1162,7 @@ class mo {
|
|
|
1154
1162
|
transport;
|
|
1155
1163
|
cancels = /* @__PURE__ */ new Set();
|
|
1156
1164
|
constructor(e) {
|
|
1157
|
-
this.transport = e.transport, this.log = ve("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new X(
|
|
1165
|
+
this.transport = e.transport, this.log = ve("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new X(q(void 0), "moderationId").getStore(), this.interactiveAllowed = new X(q(Le.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new X(q(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(no(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ce(co(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = io(this.slStreamId, e.transport), this.openedQuestion = fo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
|
|
1158
1166
|
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = ao(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
1159
1167
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
1160
1168
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
@@ -1240,7 +1248,7 @@ class go {
|
|
|
1240
1248
|
options;
|
|
1241
1249
|
logger;
|
|
1242
1250
|
constructor(e) {
|
|
1243
|
-
this.options = e, this.logger = ve("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList =
|
|
1251
|
+
this.options = e, this.logger = ve("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = q(/* @__PURE__ */ new Map());
|
|
1244
1252
|
}
|
|
1245
1253
|
addToQueue = (e) => {
|
|
1246
1254
|
if (this.store.has(e.id)) {
|
|
@@ -1284,7 +1292,7 @@ class go {
|
|
|
1284
1292
|
this.logger.debug({ notificationId: e }, "active queue tick skipped, notification not exist");
|
|
1285
1293
|
return;
|
|
1286
1294
|
}
|
|
1287
|
-
|
|
1295
|
+
Q.emit("notification", {
|
|
1288
1296
|
action: "received",
|
|
1289
1297
|
payload: {
|
|
1290
1298
|
questionId: r.data.questionId,
|
|
@@ -1309,7 +1317,7 @@ class go {
|
|
|
1309
1317
|
const s = new Map(this.notificationsList.get());
|
|
1310
1318
|
s.delete(e), this.notificationsList.set(s);
|
|
1311
1319
|
const a = this.timeouts.get(e);
|
|
1312
|
-
a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding &&
|
|
1320
|
+
a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding && Q.emit("notification", {
|
|
1313
1321
|
action: "closed",
|
|
1314
1322
|
payload: {
|
|
1315
1323
|
questionId: i.data.questionId,
|
|
@@ -1357,7 +1365,7 @@ class vo {
|
|
|
1357
1365
|
if (e.data && e.emitEvent) {
|
|
1358
1366
|
const n = e.action;
|
|
1359
1367
|
e.action = (...i) => {
|
|
1360
|
-
n && n(...i),
|
|
1368
|
+
n && n(...i), Q.emit("notification", {
|
|
1361
1369
|
action: "opened",
|
|
1362
1370
|
payload: {
|
|
1363
1371
|
questionId: e.data.questionId,
|
|
@@ -1406,10 +1414,10 @@ const wo = async (t, e) => {
|
|
|
1406
1414
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(Z, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1407
1415
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1408
1416
|
};
|
|
1409
|
-
var
|
|
1417
|
+
var qe;
|
|
1410
1418
|
(function(t) {
|
|
1411
1419
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1412
|
-
})(
|
|
1420
|
+
})(qe || (qe = {}));
|
|
1413
1421
|
class Eo extends He {
|
|
1414
1422
|
constructor() {
|
|
1415
1423
|
super("gamification-session", window.sessionStorage);
|
|
@@ -1425,25 +1433,25 @@ class Dn extends He {
|
|
|
1425
1433
|
super("gamification"), this.sessionStorage = new Eo();
|
|
1426
1434
|
}
|
|
1427
1435
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1428
|
-
this.write(
|
|
1436
|
+
this.write(qe.ONBOARDING, n, e, r, i);
|
|
1429
1437
|
};
|
|
1430
|
-
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(
|
|
1438
|
+
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(qe.ONBOARDING, n, e, r);
|
|
1431
1439
|
setOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
|
|
1432
|
-
this.sessionStorage.writeValue([
|
|
1440
|
+
this.sessionStorage.writeValue([qe.ONBOARDING_IO, n, e, r], "1");
|
|
1433
1441
|
};
|
|
1434
|
-
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([
|
|
1442
|
+
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([qe.ONBOARDING_IO, n, e, r]);
|
|
1435
1443
|
}
|
|
1436
1444
|
const Io = {
|
|
1437
1445
|
pageSize: 10
|
|
1438
1446
|
}, To = (t, e, r, n, i) => {
|
|
1439
1447
|
let o = 0;
|
|
1440
|
-
const s =
|
|
1448
|
+
const s = q({ pageSize: Io.pageSize, page: 0 }), a = J({
|
|
1441
1449
|
data: [],
|
|
1442
1450
|
key: Date.now(),
|
|
1443
1451
|
hasMore: !0,
|
|
1444
1452
|
loading: void 0,
|
|
1445
1453
|
error: void 0
|
|
1446
|
-
}), u = to(t),
|
|
1454
|
+
}), u = to(t), d = async () => {
|
|
1447
1455
|
const p = e.get(), v = n.getStore().get().data?.map((b) => b.slId) || [];
|
|
1448
1456
|
if (p && v?.length) {
|
|
1449
1457
|
const b = r.get();
|
|
@@ -1463,13 +1471,13 @@ const Io = {
|
|
|
1463
1471
|
}), S.meta && (o = Math.round(S.meta.count / S.meta.pageSize));
|
|
1464
1472
|
}
|
|
1465
1473
|
}, c = () => {
|
|
1466
|
-
|
|
1474
|
+
d();
|
|
1467
1475
|
}, f = (p) => {
|
|
1468
1476
|
const v = s.get(), b = p || v.page + 1;
|
|
1469
1477
|
b <= o && s.set({ ...v, page: b });
|
|
1470
1478
|
};
|
|
1471
1479
|
return gr(a, () => {
|
|
1472
|
-
const p = e.listen(
|
|
1480
|
+
const p = e.listen(d), v = n.listen(d);
|
|
1473
1481
|
return () => {
|
|
1474
1482
|
p(), v();
|
|
1475
1483
|
};
|
|
@@ -1513,14 +1521,14 @@ const zr = "sldl", kt = "sldl_uid", Rn = "sldl_eid", Vn = "sldl_e_eid", _o = /*
|
|
|
1513
1521
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1514
1522
|
if (Object.keys(a).length !== 0) {
|
|
1515
1523
|
t.setValue("data", a);
|
|
1516
|
-
const
|
|
1524
|
+
const d = Object.keys(u).length !== 0;
|
|
1517
1525
|
if (o) {
|
|
1518
1526
|
let c = "";
|
|
1519
|
-
|
|
1527
|
+
d && (c = `#${new URLSearchParams(u).toString()}`, ue.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
|
|
1520
1528
|
}
|
|
1521
1529
|
if (s) {
|
|
1522
1530
|
let c = "";
|
|
1523
|
-
|
|
1531
|
+
d && (c = `?${new URLSearchParams(u).toString()}`, ue.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
|
|
1524
1532
|
}
|
|
1525
1533
|
e(a);
|
|
1526
1534
|
}
|
|
@@ -1562,8 +1570,8 @@ const zr = "sldl", kt = "sldl_uid", Rn = "sldl_eid", Vn = "sldl_e_eid", _o = /*
|
|
|
1562
1570
|
for (const u of t.deepLink.onDeepLinkHandlers)
|
|
1563
1571
|
try {
|
|
1564
1572
|
ue.trace("called handler"), u(a);
|
|
1565
|
-
} catch (
|
|
1566
|
-
console.error(
|
|
1573
|
+
} catch (d) {
|
|
1574
|
+
console.error(d);
|
|
1567
1575
|
}
|
|
1568
1576
|
};
|
|
1569
1577
|
Lo(t.deepLink.$store, s), r();
|
|
@@ -1740,14 +1748,22 @@ const Je = new je(), Fo = (t, e, r) => {
|
|
|
1740
1748
|
t.ui.disableAppNotification();
|
|
1741
1749
|
break;
|
|
1742
1750
|
}
|
|
1743
|
-
if (a.slEventBus?.type === "advertisement") {
|
|
1744
|
-
const u = a.slEventBus, { hasNotification:
|
|
1751
|
+
if (a.slEventBus?.type === "advertisement" && e.withAd) {
|
|
1752
|
+
const u = a.slEventBus, { hasNotification: d, id: c, isViewed: f } = u.payload;
|
|
1745
1753
|
switch (u.action) {
|
|
1754
|
+
case "notification-opened":
|
|
1755
|
+
t.sdk.uiState.set({
|
|
1756
|
+
promotionBanner: !0,
|
|
1757
|
+
promotionNotification: !1,
|
|
1758
|
+
promotionOverlay: !0,
|
|
1759
|
+
promotionSidebar: !0
|
|
1760
|
+
});
|
|
1761
|
+
break;
|
|
1746
1762
|
case "received":
|
|
1747
1763
|
if (t.sdk.closeFeature(), n({
|
|
1748
1764
|
stage: "activate",
|
|
1749
1765
|
id: c,
|
|
1750
|
-
hasNotification:
|
|
1766
|
+
hasNotification: d,
|
|
1751
1767
|
isViewed: f
|
|
1752
1768
|
}), !e.withAdNotification) {
|
|
1753
1769
|
t.sdk.uiState.set({
|
|
@@ -1757,7 +1773,7 @@ const Je = new je(), Fo = (t, e, r) => {
|
|
|
1757
1773
|
});
|
|
1758
1774
|
break;
|
|
1759
1775
|
}
|
|
1760
|
-
|
|
1776
|
+
d ? t.sdk.uiState.set({
|
|
1761
1777
|
promotionNotification: !0
|
|
1762
1778
|
}) : t.sdk.uiState.set({
|
|
1763
1779
|
promotionBanner: !0,
|
|
@@ -1775,13 +1791,13 @@ const Je = new je(), Fo = (t, e, r) => {
|
|
|
1775
1791
|
}), n({
|
|
1776
1792
|
stage: "deactivate",
|
|
1777
1793
|
id: c,
|
|
1778
|
-
hasNotification:
|
|
1794
|
+
hasNotification: d,
|
|
1779
1795
|
isViewed: f
|
|
1780
1796
|
});
|
|
1781
1797
|
break;
|
|
1782
1798
|
}
|
|
1783
1799
|
}
|
|
1784
|
-
}, o =
|
|
1800
|
+
}, o = Q.listen(i), s = t.activeFeature.subscribe((a) => {
|
|
1785
1801
|
a ? t.ui.enableApp() : t.ui.disableApp();
|
|
1786
1802
|
});
|
|
1787
1803
|
return () => {
|
|
@@ -1792,8 +1808,8 @@ const Je = new je(), Fo = (t, e, r) => {
|
|
|
1792
1808
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1793
1809
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1794
1810
|
if (i.has(s)) {
|
|
1795
|
-
const
|
|
1796
|
-
|
|
1811
|
+
const d = o.get(s);
|
|
1812
|
+
d && d(), i.delete(s), o.delete(s);
|
|
1797
1813
|
}
|
|
1798
1814
|
i.set(s, { cb: u, clear: a }), t?.stores?.enabled?.get() === "on" && o.set(s, u());
|
|
1799
1815
|
}, t.ready = () => {
|
|
@@ -1846,13 +1862,13 @@ const Je = new je(), Fo = (t, e, r) => {
|
|
|
1846
1862
|
return r.toString();
|
|
1847
1863
|
}, jo = (t, e, r, n) => {
|
|
1848
1864
|
const i = J({});
|
|
1849
|
-
return gr(i, () => Mo(t, [e, r]).subscribe(async ({ data: a, error: u, loading:
|
|
1865
|
+
return gr(i, () => Mo(t, [e, r]).subscribe(async ({ data: a, error: u, loading: d }) => {
|
|
1850
1866
|
const c = u ? "https://masters.com" : a?.url, f = n.get() || "", p = e.get() || "", v = r.get() || "", b = {
|
|
1851
1867
|
[kt]: f,
|
|
1852
1868
|
[Rn]: p,
|
|
1853
1869
|
[Vn]: v
|
|
1854
1870
|
};
|
|
1855
|
-
if (!
|
|
1871
|
+
if (!d && c) {
|
|
1856
1872
|
i.setKey("loading", !0);
|
|
1857
1873
|
let g = window.location.search, S = window.location.hash;
|
|
1858
1874
|
g && S || S ? g = `?${Jr(g, b)}` : S = `#${Jr("", b)}`;
|
|
@@ -1878,7 +1894,7 @@ var M;
|
|
|
1878
1894
|
(function(t) {
|
|
1879
1895
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1880
1896
|
})(M || (M = {}));
|
|
1881
|
-
const
|
|
1897
|
+
const qo = (t, e, r, n) => {
|
|
1882
1898
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1883
1899
|
i && r.add({
|
|
1884
1900
|
type: Ae.ONBOARDING,
|
|
@@ -1917,39 +1933,39 @@ const Uo = (t, e, r, n) => {
|
|
|
1917
1933
|
p();
|
|
1918
1934
|
return;
|
|
1919
1935
|
}
|
|
1920
|
-
const u = e.moderation.getStore().value?.data,
|
|
1921
|
-
if (u === void 0 ||
|
|
1936
|
+
const u = e.moderation.getStore().value?.data, d = r.featureSettings.get().inplayGame;
|
|
1937
|
+
if (u === void 0 || d === void 0)
|
|
1922
1938
|
return;
|
|
1923
|
-
const c = u?.options?.onboardingEnabled, f =
|
|
1939
|
+
const c = u?.options?.onboardingEnabled, f = d?.titleCard?.optIn;
|
|
1924
1940
|
c ? f ? t.set(M.Required) : t.set(M.Optional) : (f ? t.set(M.Unavailable) : t.set(M.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
|
|
1925
1941
|
} catch (s) {
|
|
1926
1942
|
console.error(s);
|
|
1927
1943
|
}
|
|
1928
|
-
},
|
|
1944
|
+
}, Uo = (t, e, r, n) => {
|
|
1929
1945
|
let i = !1;
|
|
1930
|
-
const o = new Dn(), s =
|
|
1931
|
-
s.subscribe((
|
|
1932
|
-
|
|
1946
|
+
const o = new Dn(), s = q(M.Unset);
|
|
1947
|
+
s.subscribe((d) => {
|
|
1948
|
+
d !== M.Unset && (d === M.Optional || d === M.Required ? i === !1 && (qo(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), d === M.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1933
1949
|
userId: e.userId.get() || "",
|
|
1934
1950
|
organizationId: e.organizationId.get() || "",
|
|
1935
1951
|
eventId: e.slStreamId.get() || ""
|
|
1936
1952
|
}));
|
|
1937
1953
|
});
|
|
1938
1954
|
const a = [];
|
|
1939
|
-
return dt(s, e, t, n, o, a), s.get() !== M.Completed && (a.push(e.userId.listen((
|
|
1940
|
-
|
|
1941
|
-
})), a.push(e.moderation.listen((
|
|
1942
|
-
|
|
1943
|
-
})), a.push(t.featureSettings.listen((
|
|
1944
|
-
|
|
1955
|
+
return dt(s, e, t, n, o, a), s.get() !== M.Completed && (a.push(e.userId.listen((d) => {
|
|
1956
|
+
d && dt(s, e, t, n, o, a);
|
|
1957
|
+
})), a.push(e.moderation.listen((d) => {
|
|
1958
|
+
d.data && dt(s, e, t, n, o, a);
|
|
1959
|
+
})), a.push(t.featureSettings.listen((d) => {
|
|
1960
|
+
d && dt(s, e, t, n, o, a);
|
|
1945
1961
|
}))), { $store: s, submitInplay: async () => {
|
|
1946
|
-
const
|
|
1947
|
-
if (
|
|
1948
|
-
await Ao(r,
|
|
1962
|
+
const d = e.slStreamId.get();
|
|
1963
|
+
if (d) {
|
|
1964
|
+
await Ao(r, d), s.set(M.Completed), o.saveOnboardingStatus({
|
|
1949
1965
|
organizationId: e.organizationId.get() || "",
|
|
1950
1966
|
userId: e.userId.get() || "",
|
|
1951
|
-
eventId:
|
|
1952
|
-
}, M.Completed),
|
|
1967
|
+
eventId: d
|
|
1968
|
+
}, M.Completed), Q.emit("poll", {
|
|
1953
1969
|
action: "onboardingPassed",
|
|
1954
1970
|
payload: {}
|
|
1955
1971
|
}), t.openFeature();
|
|
@@ -1959,31 +1975,31 @@ const Uo = (t, e, r, n) => {
|
|
|
1959
1975
|
} };
|
|
1960
1976
|
}, xo = (t, e, r, n) => {
|
|
1961
1977
|
const i = J(void 0), o = Nn(n), s = async () => {
|
|
1962
|
-
const u = t.get(),
|
|
1978
|
+
const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((v) => v.slId);
|
|
1963
1979
|
if (!c)
|
|
1964
1980
|
return;
|
|
1965
1981
|
const f = {
|
|
1966
1982
|
eventId: u,
|
|
1967
|
-
userId:
|
|
1968
|
-
usersIds: [...c,
|
|
1983
|
+
userId: d,
|
|
1984
|
+
usersIds: [...c, d]
|
|
1969
1985
|
}, p = await o(f);
|
|
1970
1986
|
i.set(p.data?.attributes);
|
|
1971
1987
|
}, a = () => {
|
|
1972
1988
|
s();
|
|
1973
1989
|
};
|
|
1974
1990
|
return gr(i, () => {
|
|
1975
|
-
const u = t.listen(s),
|
|
1991
|
+
const u = t.listen(s), d = r.listen(s), c = e.listen(s);
|
|
1976
1992
|
return () => {
|
|
1977
|
-
u(),
|
|
1993
|
+
u(), d(), c();
|
|
1978
1994
|
};
|
|
1979
1995
|
}), { $store: i, invalidate: a };
|
|
1980
1996
|
}, Qo = async (t, e, r, n, i) => {
|
|
1981
|
-
const o = Nn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [],
|
|
1997
|
+
const o = Nn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], d = {
|
|
1982
1998
|
eventId: s,
|
|
1983
1999
|
userId: n,
|
|
1984
2000
|
usersIds: [...u, a]
|
|
1985
2001
|
};
|
|
1986
|
-
return (await o(
|
|
2002
|
+
return (await o(d)).data?.attributes?.summary;
|
|
1987
2003
|
}, Go = /* @__PURE__ */ new Set([_.POLL, _.PREDICTION, _.TRIVIA]);
|
|
1988
2004
|
class Ko extends Ln {
|
|
1989
2005
|
/** user statistics (leaderboard panel) */
|
|
@@ -2022,7 +2038,7 @@ class Ko extends Ln {
|
|
|
2022
2038
|
cancels = /* @__PURE__ */ new Set();
|
|
2023
2039
|
onQuestionActivate;
|
|
2024
2040
|
constructor(e, r, n) {
|
|
2025
|
-
super(e, r), this.background = new mo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Dn(), this.feedList = this.background.feedList, this.friends = new ce(ro(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser =
|
|
2041
|
+
super(e, r), this.background = new mo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Dn(), this.feedList = this.background.feedList, this.friends = new ce(ro(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = q(void 0), this.onboardingProcessed = q(!1), this.leaderboardId = new X(q(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Uo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = jo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = xo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = To(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
|
|
2026
2042
|
o?.summary && i?.summary && this.leaderboardList.invalidate();
|
|
2027
2043
|
})), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
|
|
2028
2044
|
(o === void 0 || i !== M.Unset) && this.background.activeQuestionId.invalidate();
|
|
@@ -2040,7 +2056,7 @@ class Ko extends Ln {
|
|
|
2040
2056
|
};
|
|
2041
2057
|
connect = () => {
|
|
2042
2058
|
this.onboardingProcessed.subscribe((e) => {
|
|
2043
|
-
|
|
2059
|
+
e && this.advertisement.connect();
|
|
2044
2060
|
}), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-prediction-close", async (e) => {
|
|
2045
2061
|
if (!this.isInteractiveAllowed)
|
|
2046
2062
|
return;
|
|
@@ -2051,7 +2067,7 @@ class Ko extends Ln {
|
|
|
2051
2067
|
if (i === Y.RESOLVED && o === _.PREDICTION) {
|
|
2052
2068
|
const u = this.background.getCurrentSessionId({
|
|
2053
2069
|
prefix: `notification-id:${s}`
|
|
2054
|
-
}),
|
|
2070
|
+
}), d = [...this.feedList.getValues().data || []], c = d.findIndex((G) => G.id === s), f = d[c];
|
|
2055
2071
|
let p = f?.attributes?.attributes?.value?.answerId;
|
|
2056
2072
|
const v = sr(s, this.transport), b = v.subscribe(() => {
|
|
2057
2073
|
});
|
|
@@ -2059,14 +2075,14 @@ class Ko extends Ln {
|
|
|
2059
2075
|
let g = v.get().data;
|
|
2060
2076
|
g || (g = await uo(s, this.transport)), b(), window.requestAnimationFrame(() => {
|
|
2061
2077
|
v.invalidate();
|
|
2062
|
-
}), p || (p = g?.answers.find(({ youVoted:
|
|
2063
|
-
const S = a.find(({ correct:
|
|
2064
|
-
if (f &&
|
|
2078
|
+
}), p || (p = g?.answers.find(({ youVoted: G }) => G)?.id);
|
|
2079
|
+
const S = a.find(({ correct: G }) => G), C = p ? a.find(({ id: G }) => G === p) : void 0, R = !!C?.correct;
|
|
2080
|
+
if (f && d[c]?.attributes?.attributes.case === "question") {
|
|
2065
2081
|
try {
|
|
2066
|
-
|
|
2082
|
+
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = R ? ct.WON : ct.LOST);
|
|
2067
2083
|
} catch {
|
|
2068
2084
|
}
|
|
2069
|
-
this.feedList.getStore().mutate(
|
|
2085
|
+
this.feedList.getStore().mutate(d);
|
|
2070
2086
|
}
|
|
2071
2087
|
if (!C || !S)
|
|
2072
2088
|
return;
|
|
@@ -2142,7 +2158,7 @@ class Ko extends Ln {
|
|
|
2142
2158
|
}
|
|
2143
2159
|
});
|
|
2144
2160
|
}
|
|
2145
|
-
i === -1 && (r.unshift(n),
|
|
2161
|
+
i === -1 && (r.unshift(n), Q.emit("poll", {
|
|
2146
2162
|
action: "received",
|
|
2147
2163
|
payload: {
|
|
2148
2164
|
questionId: n.id,
|
|
@@ -2162,9 +2178,9 @@ class Ko extends Ln {
|
|
|
2162
2178
|
const a = this.feedList.getValues().data;
|
|
2163
2179
|
if (!a)
|
|
2164
2180
|
return;
|
|
2165
|
-
const u = a.findIndex((f) => f.id === e),
|
|
2181
|
+
const u = a.findIndex((f) => f.id === e), d = a[u], c = d?.attributes?.attributes.case === "question" && d.attributes.attributes.value;
|
|
2166
2182
|
if (c) {
|
|
2167
|
-
|
|
2183
|
+
Q.emit("poll", {
|
|
2168
2184
|
action: "voted",
|
|
2169
2185
|
payload: {
|
|
2170
2186
|
questionId: e,
|
|
@@ -2206,7 +2222,7 @@ class Ko extends Ln {
|
|
|
2206
2222
|
animateHiding: !1
|
|
2207
2223
|
});
|
|
2208
2224
|
let n = r?.attributes?.type;
|
|
2209
|
-
return n || (n = (this.feedList.getStore().value?.data || []).find((o) => o.id === e)?.attributes?.type),
|
|
2225
|
+
return n || (n = (this.feedList.getStore().value?.data || []).find((o) => o.id === e)?.attributes?.type), Q.emit("poll", {
|
|
2210
2226
|
action: "opened",
|
|
2211
2227
|
payload: {
|
|
2212
2228
|
questionId: e,
|
|
@@ -2340,7 +2356,7 @@ class Ho extends Ln {
|
|
|
2340
2356
|
}
|
|
2341
2357
|
}
|
|
2342
2358
|
const Wo = (t, e, r) => t.type === D.GAMES ? new Ko(t, e, r) : new Ho(t, e), Yo = (t, e, r) => {
|
|
2343
|
-
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new X(
|
|
2359
|
+
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new X(q(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new X(q(D.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
|
|
2344
2360
|
t.activeFeature.setValue(n);
|
|
2345
2361
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
2346
2362
|
const i = t.activeFeature.getValue();
|
|
@@ -2416,7 +2432,7 @@ class Jo {
|
|
|
2416
2432
|
break;
|
|
2417
2433
|
}
|
|
2418
2434
|
};
|
|
2419
|
-
return
|
|
2435
|
+
return Q.listen(r);
|
|
2420
2436
|
});
|
|
2421
2437
|
}
|
|
2422
2438
|
accepted = () => {
|
|
@@ -2455,7 +2471,7 @@ class Xo {
|
|
|
2455
2471
|
break;
|
|
2456
2472
|
}
|
|
2457
2473
|
};
|
|
2458
|
-
return
|
|
2474
|
+
return Q.listen(r);
|
|
2459
2475
|
});
|
|
2460
2476
|
}
|
|
2461
2477
|
tap = () => {
|
|
@@ -2512,7 +2528,7 @@ class es {
|
|
|
2512
2528
|
}
|
|
2513
2529
|
}
|
|
2514
2530
|
};
|
|
2515
|
-
return
|
|
2531
|
+
return Q.listen(r);
|
|
2516
2532
|
});
|
|
2517
2533
|
}
|
|
2518
2534
|
received = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -2584,24 +2600,24 @@ const Ze = {
|
|
|
2584
2600
|
};
|
|
2585
2601
|
_.UNSET + "", fe.UNSET, _.FACTOID + "", fe.POLLS, _.POLL + "", fe.POLLS, _.PREDICTION + "", fe.POLLS, _.PROMOTION + "", fe.POLLS, _.TRIVIA + "", fe.POLLS, _.TWEET + "", fe.POLLS;
|
|
2586
2602
|
const ts = {
|
|
2587
|
-
[D.UNSET]:
|
|
2588
|
-
[D.INPLAY]:
|
|
2589
|
-
[D.MESSAGING]:
|
|
2590
|
-
[D.STATISTICS]:
|
|
2591
|
-
[D.BETTING]:
|
|
2592
|
-
[D.TWITTER]:
|
|
2593
|
-
[D.MERCHANDISE]:
|
|
2594
|
-
[D.CONTESTS]:
|
|
2595
|
-
[D.VOICE_CHAT]:
|
|
2596
|
-
[D.TICKETS]:
|
|
2597
|
-
[D.WHOIS_WATCHING]:
|
|
2598
|
-
[D.PROFILE]:
|
|
2599
|
-
[D.GAMES]:
|
|
2603
|
+
[D.UNSET]: K.UNSET,
|
|
2604
|
+
[D.INPLAY]: K.INPLAY,
|
|
2605
|
+
[D.MESSAGING]: K.MESSAGING,
|
|
2606
|
+
[D.STATISTICS]: K.STATS,
|
|
2607
|
+
[D.BETTING]: K.BETTING,
|
|
2608
|
+
[D.TWITTER]: K.TWITTER,
|
|
2609
|
+
[D.MERCHANDISE]: K.MERCHANDISE,
|
|
2610
|
+
[D.CONTESTS]: K.CONTESTS,
|
|
2611
|
+
[D.VOICE_CHAT]: K.CALLING,
|
|
2612
|
+
[D.TICKETS]: K.TICKETS,
|
|
2613
|
+
[D.WHOIS_WATCHING]: K.WHOISWATCHING,
|
|
2614
|
+
[D.PROFILE]: K.PROFILE,
|
|
2615
|
+
[D.GAMES]: K.POLLS,
|
|
2600
2616
|
// ??
|
|
2601
|
-
[D.GOLF_STATISTICS]:
|
|
2617
|
+
[D.GOLF_STATISTICS]: K.STATS,
|
|
2602
2618
|
// ??
|
|
2603
|
-
[D.HIGHLIGHTS]:
|
|
2604
|
-
[D.PUBLIC_CHAT]:
|
|
2619
|
+
[D.HIGHLIGHTS]: K.HIGHLIGHTS,
|
|
2620
|
+
[D.PUBLIC_CHAT]: K.PUBLIC_CHAT
|
|
2605
2621
|
};
|
|
2606
2622
|
class rs {
|
|
2607
2623
|
analytics;
|
|
@@ -2618,7 +2634,7 @@ class rs {
|
|
|
2618
2634
|
break;
|
|
2619
2635
|
}
|
|
2620
2636
|
};
|
|
2621
|
-
return
|
|
2637
|
+
return Q.listen(r);
|
|
2622
2638
|
});
|
|
2623
2639
|
}
|
|
2624
2640
|
received = ({ questionId: e, questionType: r }) => {
|
|
@@ -2670,7 +2686,7 @@ class ns {
|
|
|
2670
2686
|
break;
|
|
2671
2687
|
}
|
|
2672
2688
|
};
|
|
2673
|
-
return
|
|
2689
|
+
return Q.listen(r);
|
|
2674
2690
|
});
|
|
2675
2691
|
}
|
|
2676
2692
|
// event when a poll is received from subscription or active question request
|
|
@@ -2732,7 +2748,7 @@ class ns {
|
|
|
2732
2748
|
}
|
|
2733
2749
|
const is = ({ transport: t, $commonStore: e }) => {
|
|
2734
2750
|
let r;
|
|
2735
|
-
const n =
|
|
2751
|
+
const n = q(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(In, {
|
|
2736
2752
|
method: "send",
|
|
2737
2753
|
params: [n]
|
|
2738
2754
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
@@ -2759,12 +2775,12 @@ const is = ({ transport: t, $commonStore: e }) => {
|
|
|
2759
2775
|
}), u = () => {
|
|
2760
2776
|
me.debug("mounted heartbeat"), r = a.subscribe(() => {
|
|
2761
2777
|
});
|
|
2762
|
-
},
|
|
2778
|
+
}, d = () => {
|
|
2763
2779
|
me.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
|
|
2764
2780
|
}, c = () => {
|
|
2765
2781
|
me.debug("disabled heartbeat"), n.set(!1);
|
|
2766
2782
|
};
|
|
2767
|
-
return { enable:
|
|
2783
|
+
return { enable: d, disable: c, mount: u, unmount: () => {
|
|
2768
2784
|
me.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2769
2785
|
} };
|
|
2770
2786
|
}, me = ve("analytics");
|
|
@@ -2814,7 +2830,7 @@ class os {
|
|
|
2814
2830
|
r && this.writeCommon("category", ts[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", rr()) : this.writeCommon("overlaySessionId", "");
|
|
2815
2831
|
})), this.onConnect(() => {
|
|
2816
2832
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2817
|
-
this.writeCommon("screenOrientation", i.matches ?
|
|
2833
|
+
this.writeCommon("screenOrientation", i.matches ? Ur.PORTRAIT : Ur.LANDSCAPE);
|
|
2818
2834
|
};
|
|
2819
2835
|
return r.addEventListener("change", n), () => {
|
|
2820
2836
|
r.removeEventListener("change", n);
|
|
@@ -2868,7 +2884,7 @@ function $n(t, e, r) {
|
|
|
2868
2884
|
for (; i && s < r; )
|
|
2869
2885
|
s++, C();
|
|
2870
2886
|
},
|
|
2871
|
-
running:
|
|
2887
|
+
running: d,
|
|
2872
2888
|
resume: v,
|
|
2873
2889
|
idle: b,
|
|
2874
2890
|
length: f,
|
|
@@ -2876,11 +2892,11 @@ function $n(t, e, r) {
|
|
|
2876
2892
|
unshift: S,
|
|
2877
2893
|
empty: W,
|
|
2878
2894
|
kill: R,
|
|
2879
|
-
killAndDrain:
|
|
2895
|
+
killAndDrain: G,
|
|
2880
2896
|
error: ee
|
|
2881
2897
|
};
|
|
2882
2898
|
return u;
|
|
2883
|
-
function
|
|
2899
|
+
function d() {
|
|
2884
2900
|
return s;
|
|
2885
2901
|
}
|
|
2886
2902
|
function c() {
|
|
@@ -2925,7 +2941,7 @@ function $n(t, e, r) {
|
|
|
2925
2941
|
function R() {
|
|
2926
2942
|
i = null, o = null, u.drain = W;
|
|
2927
2943
|
}
|
|
2928
|
-
function
|
|
2944
|
+
function G() {
|
|
2929
2945
|
i = null, o = null, u.drain(), u.drain = W;
|
|
2930
2946
|
}
|
|
2931
2947
|
function ee(P) {
|
|
@@ -2950,7 +2966,7 @@ function fs(t, e, r) {
|
|
|
2950
2966
|
}, f);
|
|
2951
2967
|
}
|
|
2952
2968
|
var i = $n(t, n, r), o = i.push, s = i.unshift;
|
|
2953
|
-
return i.push = a, i.unshift = u, i.drained =
|
|
2969
|
+
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
2954
2970
|
function a(c) {
|
|
2955
2971
|
var f = new Promise(function(p, v) {
|
|
2956
2972
|
o(c, function(b, g) {
|
|
@@ -2975,7 +2991,7 @@ function fs(t, e, r) {
|
|
|
2975
2991
|
});
|
|
2976
2992
|
return f.catch(W), f;
|
|
2977
2993
|
}
|
|
2978
|
-
function
|
|
2994
|
+
function d() {
|
|
2979
2995
|
if (i.idle())
|
|
2980
2996
|
return new Promise(function(p) {
|
|
2981
2997
|
p();
|
|
@@ -3063,11 +3079,11 @@ N.prototype.emit = function(e) {
|
|
|
3063
3079
|
if (typeof u == "function")
|
|
3064
3080
|
Xr(u, this, r);
|
|
3065
3081
|
else
|
|
3066
|
-
for (var
|
|
3082
|
+
for (var d = u.length, c = Gn(u, d), n = 0; n < d; ++n)
|
|
3067
3083
|
Xr(c[n], this, r);
|
|
3068
3084
|
return !0;
|
|
3069
3085
|
};
|
|
3070
|
-
function
|
|
3086
|
+
function qn(t, e, r, n) {
|
|
3071
3087
|
var i, o, s;
|
|
3072
3088
|
if (Pt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
3073
3089
|
"newListener",
|
|
@@ -3083,25 +3099,25 @@ function Un(t, e, r, n) {
|
|
|
3083
3099
|
return t;
|
|
3084
3100
|
}
|
|
3085
3101
|
N.prototype.addListener = function(e, r) {
|
|
3086
|
-
return
|
|
3102
|
+
return qn(this, e, r, !1);
|
|
3087
3103
|
};
|
|
3088
3104
|
N.prototype.on = N.prototype.addListener;
|
|
3089
3105
|
N.prototype.prependListener = function(e, r) {
|
|
3090
|
-
return
|
|
3106
|
+
return qn(this, e, r, !0);
|
|
3091
3107
|
};
|
|
3092
3108
|
function hs() {
|
|
3093
3109
|
if (!this.fired)
|
|
3094
3110
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
3095
3111
|
}
|
|
3096
|
-
function
|
|
3112
|
+
function Un(t, e, r) {
|
|
3097
3113
|
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = hs.bind(n);
|
|
3098
3114
|
return i.listener = r, n.wrapFn = i, i;
|
|
3099
3115
|
}
|
|
3100
3116
|
N.prototype.once = function(e, r) {
|
|
3101
|
-
return Pt(r), this.on(e,
|
|
3117
|
+
return Pt(r), this.on(e, Un(this, e, r)), this;
|
|
3102
3118
|
};
|
|
3103
3119
|
N.prototype.prependOnceListener = function(e, r) {
|
|
3104
|
-
return Pt(r), this.prependListener(e,
|
|
3120
|
+
return Pt(r), this.prependListener(e, Un(this, e, r)), this;
|
|
3105
3121
|
};
|
|
3106
3122
|
N.prototype.removeListener = function(e, r) {
|
|
3107
3123
|
var n, i, o, s, a;
|
|
@@ -3278,12 +3294,12 @@ var zn = Ar.exports, Nt = {}, Hn = {}, Wn = function() {
|
|
|
3278
3294
|
}, s = Ps(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3279
3295
|
a[u] = "$" + u;
|
|
3280
3296
|
if (i = Function("binder", "return function (" + Ds(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
3281
|
-
var
|
|
3297
|
+
var d = function() {
|
|
3282
3298
|
};
|
|
3283
|
-
|
|
3299
|
+
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
3284
3300
|
}
|
|
3285
3301
|
return i;
|
|
3286
|
-
}, Vs = Rs, Er = Function.prototype.bind || Vs, $s = Function.prototype.call, Ms = Object.prototype.hasOwnProperty, Bs = Er, js = Bs.call($s, Ms), I,
|
|
3302
|
+
}, Vs = Rs, Er = Function.prototype.bind || Vs, $s = Function.prototype.call, Ms = Object.prototype.hasOwnProperty, Bs = Er, js = Bs.call($s, Ms), I, qs = Ss, Us = ws, xs = As, Qs = Es, Ke = Yn, Ge = Dt, Gs = Is, Jn = Function, jt = function(t) {
|
|
3287
3303
|
try {
|
|
3288
3304
|
return Jn('"use strict"; return (' + t + ").constructor;")();
|
|
3289
3305
|
} catch {
|
|
@@ -3295,19 +3311,19 @@ if (ke)
|
|
|
3295
3311
|
} catch {
|
|
3296
3312
|
ke = null;
|
|
3297
3313
|
}
|
|
3298
|
-
var
|
|
3314
|
+
var qt = function() {
|
|
3299
3315
|
throw new Ge();
|
|
3300
3316
|
}, Ks = ke ? function() {
|
|
3301
3317
|
try {
|
|
3302
|
-
return arguments.callee,
|
|
3318
|
+
return arguments.callee, qt;
|
|
3303
3319
|
} catch {
|
|
3304
3320
|
try {
|
|
3305
3321
|
return ke(arguments, "callee").get;
|
|
3306
3322
|
} catch {
|
|
3307
|
-
return
|
|
3323
|
+
return qt;
|
|
3308
3324
|
}
|
|
3309
3325
|
}
|
|
3310
|
-
}() :
|
|
3326
|
+
}() : qt, $e = Os(), zs = Cs(), B = Object.getPrototypeOf || (zs ? function(t) {
|
|
3311
3327
|
return t.__proto__;
|
|
3312
3328
|
} : null), Be = {}, Hs = typeof Uint8Array > "u" || !B ? I : B(Uint8Array), Pe = {
|
|
3313
3329
|
__proto__: null,
|
|
@@ -3331,10 +3347,10 @@ var Ut = function() {
|
|
|
3331
3347
|
"%decodeURIComponent%": decodeURIComponent,
|
|
3332
3348
|
"%encodeURI%": encodeURI,
|
|
3333
3349
|
"%encodeURIComponent%": encodeURIComponent,
|
|
3334
|
-
"%Error%":
|
|
3350
|
+
"%Error%": qs,
|
|
3335
3351
|
"%eval%": eval,
|
|
3336
3352
|
// eslint-disable-line no-eval
|
|
3337
|
-
"%EvalError%":
|
|
3353
|
+
"%EvalError%": Us,
|
|
3338
3354
|
"%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
|
|
3339
3355
|
"%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
|
|
3340
3356
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
|
|
@@ -3485,8 +3501,8 @@ var Ys = function t(e) {
|
|
|
3485
3501
|
throw new Ge('"allowMissing" argument must be a boolean');
|
|
3486
3502
|
if (Zs(/^%?[^%]*%?$/, e) === null)
|
|
3487
3503
|
throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3488
|
-
var n = ra(e), i = n.length > 0 ? n[0] : "", o = na("%" + i + "%", r), s = o.name, a = o.value, u = !1,
|
|
3489
|
-
|
|
3504
|
+
var n = ra(e), i = n.length > 0 ? n[0] : "", o = na("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
|
|
3505
|
+
d && (i = d[0], Xs(n, Js([0, 1], d)));
|
|
3490
3506
|
for (var c = 1, f = !0; c < n.length; c += 1) {
|
|
3491
3507
|
var p = n[c], v = At(p, 0, 1), b = At(p, -1);
|
|
3492
3508
|
if ((v === '"' || v === "'" || v === "`" || b === '"' || b === "'" || b === "`") && v !== b)
|
|
@@ -3508,9 +3524,9 @@ var Ys = function t(e) {
|
|
|
3508
3524
|
}
|
|
3509
3525
|
}
|
|
3510
3526
|
return a;
|
|
3511
|
-
}, Xn = { exports: {} },
|
|
3527
|
+
}, Xn = { exports: {} }, Ut, on;
|
|
3512
3528
|
function Ir() {
|
|
3513
|
-
if (on) return
|
|
3529
|
+
if (on) return Ut;
|
|
3514
3530
|
on = 1;
|
|
3515
3531
|
var t = ot, e = t("%Object.defineProperty%", !0) || !1;
|
|
3516
3532
|
if (e)
|
|
@@ -3519,7 +3535,7 @@ function Ir() {
|
|
|
3519
3535
|
} catch {
|
|
3520
3536
|
e = !1;
|
|
3521
3537
|
}
|
|
3522
|
-
return
|
|
3538
|
+
return Ut = e, Ut;
|
|
3523
3539
|
}
|
|
3524
3540
|
var ia = ot, ht = ia("%Object.getOwnPropertyDescriptor%", !0);
|
|
3525
3541
|
if (ht)
|
|
@@ -3590,14 +3606,14 @@ var aa = Zn, ua = ot, un = sa, ca = aa(), cn = Rt, ln = Dt, la = ua("%Math.floor
|
|
|
3590
3606
|
)), e;
|
|
3591
3607
|
};
|
|
3592
3608
|
(function(t) {
|
|
3593
|
-
var e = Er, r = ot, n = da, i = Dt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Ir(),
|
|
3609
|
+
var e = Er, r = ot, n = da, i = Dt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Ir(), d = r("%Math.max%");
|
|
3594
3610
|
t.exports = function(p) {
|
|
3595
3611
|
if (typeof p != "function")
|
|
3596
3612
|
throw new i("a function is required");
|
|
3597
3613
|
var v = a(e, s, arguments);
|
|
3598
3614
|
return n(
|
|
3599
3615
|
v,
|
|
3600
|
-
1 +
|
|
3616
|
+
1 + d(0, p.length - (arguments.length - 1)),
|
|
3601
3617
|
!0
|
|
3602
3618
|
);
|
|
3603
3619
|
};
|
|
@@ -3640,21 +3656,21 @@ var ma = ya ? Vt : ri, ga = Object.prototype.toString, ba = Function.prototype.t
|
|
|
3640
3656
|
Qt = n ? xt(n) : !1;
|
|
3641
3657
|
}
|
|
3642
3658
|
return xt(e) === Qt;
|
|
3643
|
-
}, ii = Function.prototype.toString,
|
|
3644
|
-
if (typeof
|
|
3659
|
+
}, ii = Function.prototype.toString, Ue = typeof Reflect == "object" && Reflect !== null && Reflect.apply, cr, yt;
|
|
3660
|
+
if (typeof Ue == "function" && typeof Object.defineProperty == "function")
|
|
3645
3661
|
try {
|
|
3646
3662
|
cr = Object.defineProperty({}, "length", {
|
|
3647
3663
|
get: function() {
|
|
3648
3664
|
throw yt;
|
|
3649
3665
|
}
|
|
3650
|
-
}), yt = {},
|
|
3666
|
+
}), yt = {}, Ue(function() {
|
|
3651
3667
|
throw 42;
|
|
3652
3668
|
}, null, cr);
|
|
3653
3669
|
} catch (t) {
|
|
3654
|
-
t !== yt && (
|
|
3670
|
+
t !== yt && (Ue = null);
|
|
3655
3671
|
}
|
|
3656
3672
|
else
|
|
3657
|
-
|
|
3673
|
+
Ue = null;
|
|
3658
3674
|
var Aa = /^\s*class\b/, lr = function(e) {
|
|
3659
3675
|
try {
|
|
3660
3676
|
var r = ii.call(e);
|
|
@@ -3683,13 +3699,13 @@ if (typeof document == "object") {
|
|
|
3683
3699
|
return !1;
|
|
3684
3700
|
});
|
|
3685
3701
|
}
|
|
3686
|
-
var Na =
|
|
3702
|
+
var Na = Ue ? function(e) {
|
|
3687
3703
|
if (dr(e))
|
|
3688
3704
|
return !0;
|
|
3689
3705
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3690
3706
|
return !1;
|
|
3691
3707
|
try {
|
|
3692
|
-
|
|
3708
|
+
Ue(e, null, cr);
|
|
3693
3709
|
} catch (r) {
|
|
3694
3710
|
if (r !== yt)
|
|
3695
3711
|
return !1;
|
|
@@ -3736,7 +3752,7 @@ var Na = qe ? function(e) {
|
|
|
3736
3752
|
for (var e = [], r = 0; r < Kt.length; r++)
|
|
3737
3753
|
typeof ja[Kt[r]] == "function" && (e[e.length] = Kt[r]);
|
|
3738
3754
|
return e;
|
|
3739
|
-
}, Et = si,
|
|
3755
|
+
}, Et = si, qa = ai, dn = Tr, _r = Or, gt = Rt, Ua = _r("Object.prototype.toString"), ui = Ft(), fn = typeof globalThis > "u" ? vr : globalThis, fr = qa(), Cr = _r("String.prototype.slice"), zt = Object.getPrototypeOf, xa = _r("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3740
3756
|
for (var n = 0; n < e.length; n += 1)
|
|
3741
3757
|
if (e[n] === r)
|
|
3742
3758
|
return n;
|
|
@@ -3778,7 +3794,7 @@ var Qa = function(e) {
|
|
|
3778
3794
|
if (!e || typeof e != "object")
|
|
3779
3795
|
return !1;
|
|
3780
3796
|
if (!ui) {
|
|
3781
|
-
var r = Cr(
|
|
3797
|
+
var r = Cr(Ua(e), 8, -1);
|
|
3782
3798
|
return xa(fr, r) > -1 ? r : r !== "Object" ? !1 : Ga(e);
|
|
3783
3799
|
}
|
|
3784
3800
|
return gt ? Qa(e) : null;
|
|
@@ -3850,7 +3866,7 @@ var Ya = function(e) {
|
|
|
3850
3866
|
function o(y) {
|
|
3851
3867
|
return y.call.bind(y);
|
|
3852
3868
|
}
|
|
3853
|
-
var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString),
|
|
3869
|
+
var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), d = o(Number.prototype.valueOf), c = o(String.prototype.valueOf), f = o(Boolean.prototype.valueOf);
|
|
3854
3870
|
if (s)
|
|
3855
3871
|
var p = o(BigInt.prototype.valueOf);
|
|
3856
3872
|
if (a)
|
|
@@ -3881,10 +3897,10 @@ var Ya = function(e) {
|
|
|
3881
3897
|
return n(y) === "Uint8ClampedArray";
|
|
3882
3898
|
}
|
|
3883
3899
|
t.isUint8ClampedArray = R;
|
|
3884
|
-
function
|
|
3900
|
+
function G(y) {
|
|
3885
3901
|
return n(y) === "Uint16Array";
|
|
3886
3902
|
}
|
|
3887
|
-
t.isUint16Array =
|
|
3903
|
+
t.isUint16Array = G;
|
|
3888
3904
|
function ee(y) {
|
|
3889
3905
|
return n(y) === "Uint32Array";
|
|
3890
3906
|
}
|
|
@@ -3957,12 +3973,12 @@ var Ya = function(e) {
|
|
|
3957
3973
|
return typeof ArrayBuffer > "u" ? !1 : Re.working ? Re(y) : y instanceof ArrayBuffer;
|
|
3958
3974
|
}
|
|
3959
3975
|
t.isArrayBuffer = st;
|
|
3960
|
-
function
|
|
3976
|
+
function l(y) {
|
|
3961
3977
|
return u(y) === "[object DataView]";
|
|
3962
3978
|
}
|
|
3963
|
-
|
|
3979
|
+
l.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && l(new DataView(new ArrayBuffer(1), 0, 1));
|
|
3964
3980
|
function h(y) {
|
|
3965
|
-
return typeof DataView > "u" ? !1 :
|
|
3981
|
+
return typeof DataView > "u" ? !1 : l.working ? l(y) : y instanceof DataView;
|
|
3966
3982
|
}
|
|
3967
3983
|
t.isDataView = h;
|
|
3968
3984
|
var m = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
@@ -3994,7 +4010,7 @@ var Ya = function(e) {
|
|
|
3994
4010
|
}
|
|
3995
4011
|
t.isWebAssemblyCompiledModule = z;
|
|
3996
4012
|
function Ie(y) {
|
|
3997
|
-
return b(y,
|
|
4013
|
+
return b(y, d);
|
|
3998
4014
|
}
|
|
3999
4015
|
t.isNumberObject = Ie;
|
|
4000
4016
|
function at(y) {
|
|
@@ -4056,13 +4072,13 @@ var ru = hr.exports;
|
|
|
4056
4072
|
w[m[L]] = Object.getOwnPropertyDescriptor(h, m[L]);
|
|
4057
4073
|
return w;
|
|
4058
4074
|
}, r = /%[sdj%]/g;
|
|
4059
|
-
t.format = function(
|
|
4060
|
-
if (!P(
|
|
4075
|
+
t.format = function(l) {
|
|
4076
|
+
if (!P(l)) {
|
|
4061
4077
|
for (var h = [], m = 0; m < arguments.length; m++)
|
|
4062
4078
|
h.push(s(arguments[m]));
|
|
4063
4079
|
return h.join(" ");
|
|
4064
4080
|
}
|
|
4065
|
-
for (var m = 1, w = arguments, L = w.length, k = String(
|
|
4081
|
+
for (var m = 1, w = arguments, L = w.length, k = String(l).replace(r, function(O) {
|
|
4066
4082
|
if (O === "%%") return "%";
|
|
4067
4083
|
if (m >= L) return O;
|
|
4068
4084
|
switch (O) {
|
|
@@ -4082,12 +4098,12 @@ var ru = hr.exports;
|
|
|
4082
4098
|
}), E = w[m]; m < L; E = w[++m])
|
|
4083
4099
|
R(E) || !ie(E) ? k += " " + E : k += " " + s(E);
|
|
4084
4100
|
return k;
|
|
4085
|
-
}, t.deprecate = function(
|
|
4101
|
+
}, t.deprecate = function(l, h) {
|
|
4086
4102
|
if (typeof A < "u" && A.noDeprecation === !0)
|
|
4087
|
-
return
|
|
4103
|
+
return l;
|
|
4088
4104
|
if (typeof A > "u")
|
|
4089
4105
|
return function() {
|
|
4090
|
-
return t.deprecate(
|
|
4106
|
+
return t.deprecate(l, h).apply(this, arguments);
|
|
4091
4107
|
};
|
|
4092
4108
|
var m = !1;
|
|
4093
4109
|
function w() {
|
|
@@ -4096,7 +4112,7 @@ var ru = hr.exports;
|
|
|
4096
4112
|
throw new Error(h);
|
|
4097
4113
|
A.traceDeprecation ? console.trace(h) : console.error(h), m = !0;
|
|
4098
4114
|
}
|
|
4099
|
-
return
|
|
4115
|
+
return l.apply(this, arguments);
|
|
4100
4116
|
}
|
|
4101
4117
|
return w;
|
|
4102
4118
|
};
|
|
@@ -4105,25 +4121,25 @@ var ru = hr.exports;
|
|
|
4105
4121
|
var o = A.env.NODE_DEBUG;
|
|
4106
4122
|
o = o.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + o + "$", "i");
|
|
4107
4123
|
}
|
|
4108
|
-
t.debuglog = function(
|
|
4109
|
-
if (
|
|
4110
|
-
if (i.test(
|
|
4124
|
+
t.debuglog = function(l) {
|
|
4125
|
+
if (l = l.toUpperCase(), !n[l])
|
|
4126
|
+
if (i.test(l)) {
|
|
4111
4127
|
var h = A.pid;
|
|
4112
|
-
n[
|
|
4128
|
+
n[l] = function() {
|
|
4113
4129
|
var m = t.format.apply(t, arguments);
|
|
4114
|
-
console.error("%s %d: %s",
|
|
4130
|
+
console.error("%s %d: %s", l, h, m);
|
|
4115
4131
|
};
|
|
4116
4132
|
} else
|
|
4117
|
-
n[
|
|
4133
|
+
n[l] = function() {
|
|
4118
4134
|
};
|
|
4119
|
-
return n[
|
|
4135
|
+
return n[l];
|
|
4120
4136
|
};
|
|
4121
|
-
function s(
|
|
4137
|
+
function s(l, h) {
|
|
4122
4138
|
var m = {
|
|
4123
4139
|
seen: [],
|
|
4124
4140
|
stylize: u
|
|
4125
4141
|
};
|
|
4126
|
-
return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), C(h) ? m.showHidden = h : h && t._extend(m, h), T(m.showHidden) && (m.showHidden = !1), T(m.depth) && (m.depth = 2), T(m.colors) && (m.colors = !1), T(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m,
|
|
4142
|
+
return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), C(h) ? m.showHidden = h : h && t._extend(m, h), T(m.showHidden) && (m.showHidden = !1), T(m.depth) && (m.depth = 2), T(m.colors) && (m.colors = !1), T(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m, l, m.depth);
|
|
4127
4143
|
}
|
|
4128
4144
|
t.inspect = s, s.colors = {
|
|
4129
4145
|
bold: [1, 22],
|
|
@@ -4150,41 +4166,41 @@ var ru = hr.exports;
|
|
|
4150
4166
|
// "name": intentionally not styling
|
|
4151
4167
|
regexp: "red"
|
|
4152
4168
|
};
|
|
4153
|
-
function a(
|
|
4169
|
+
function a(l, h) {
|
|
4154
4170
|
var m = s.styles[h];
|
|
4155
|
-
return m ? "\x1B[" + s.colors[m][0] + "m" +
|
|
4171
|
+
return m ? "\x1B[" + s.colors[m][0] + "m" + l + "\x1B[" + s.colors[m][1] + "m" : l;
|
|
4156
4172
|
}
|
|
4157
|
-
function u(
|
|
4158
|
-
return
|
|
4173
|
+
function u(l, h) {
|
|
4174
|
+
return l;
|
|
4159
4175
|
}
|
|
4160
|
-
function l
|
|
4176
|
+
function d(l) {
|
|
4161
4177
|
var h = {};
|
|
4162
|
-
return
|
|
4178
|
+
return l.forEach(function(m, w) {
|
|
4163
4179
|
h[m] = !0;
|
|
4164
4180
|
}), h;
|
|
4165
4181
|
}
|
|
4166
|
-
function c(
|
|
4167
|
-
if (
|
|
4182
|
+
function c(l, h, m) {
|
|
4183
|
+
if (l.customInspect && h && le(h.inspect) && // Filter out the util module, it's inspect function is special
|
|
4168
4184
|
h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
4169
4185
|
!(h.constructor && h.constructor.prototype === h)) {
|
|
4170
|
-
var w = h.inspect(m,
|
|
4171
|
-
return P(w) || (w = c(
|
|
4186
|
+
var w = h.inspect(m, l);
|
|
4187
|
+
return P(w) || (w = c(l, w, m)), w;
|
|
4172
4188
|
}
|
|
4173
|
-
var L = f(
|
|
4189
|
+
var L = f(l, h);
|
|
4174
4190
|
if (L)
|
|
4175
4191
|
return L;
|
|
4176
|
-
var k = Object.keys(h), E =
|
|
4177
|
-
if (
|
|
4192
|
+
var k = Object.keys(h), E = d(k);
|
|
4193
|
+
if (l.showHidden && (k = Object.getOwnPropertyNames(h)), Ee(h) && (k.indexOf("message") >= 0 || k.indexOf("description") >= 0))
|
|
4178
4194
|
return p(h);
|
|
4179
4195
|
if (k.length === 0) {
|
|
4180
4196
|
if (le(h)) {
|
|
4181
4197
|
var O = h.name ? ": " + h.name : "";
|
|
4182
|
-
return
|
|
4198
|
+
return l.stylize("[Function" + O + "]", "special");
|
|
4183
4199
|
}
|
|
4184
4200
|
if (ne(h))
|
|
4185
|
-
return
|
|
4201
|
+
return l.stylize(RegExp.prototype.toString.call(h), "regexp");
|
|
4186
4202
|
if (Ne(h))
|
|
4187
|
-
return
|
|
4203
|
+
return l.stylize(Date.prototype.toString.call(h), "date");
|
|
4188
4204
|
if (Ee(h))
|
|
4189
4205
|
return p(h);
|
|
4190
4206
|
}
|
|
@@ -4196,34 +4212,34 @@ var ru = hr.exports;
|
|
|
4196
4212
|
if (ne(h) && (F = " " + RegExp.prototype.toString.call(h)), Ne(h) && (F = " " + Date.prototype.toUTCString.call(h)), Ee(h) && (F = " " + p(h)), k.length === 0 && (!z || h.length == 0))
|
|
4197
4213
|
return Ie[0] + F + Ie[1];
|
|
4198
4214
|
if (m < 0)
|
|
4199
|
-
return ne(h) ?
|
|
4200
|
-
|
|
4215
|
+
return ne(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
|
|
4216
|
+
l.seen.push(h);
|
|
4201
4217
|
var Ve;
|
|
4202
|
-
return z ? Ve = v(
|
|
4203
|
-
return b(
|
|
4204
|
-
}),
|
|
4218
|
+
return z ? Ve = v(l, h, m, E, k) : Ve = k.map(function(ut) {
|
|
4219
|
+
return b(l, h, m, E, ut, z);
|
|
4220
|
+
}), l.seen.pop(), g(Ve, F, Ie);
|
|
4205
4221
|
}
|
|
4206
|
-
function f(
|
|
4222
|
+
function f(l, h) {
|
|
4207
4223
|
if (T(h))
|
|
4208
|
-
return
|
|
4224
|
+
return l.stylize("undefined", "undefined");
|
|
4209
4225
|
if (P(h)) {
|
|
4210
4226
|
var m = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4211
|
-
return
|
|
4227
|
+
return l.stylize(m, "string");
|
|
4212
4228
|
}
|
|
4213
4229
|
if (ee(h))
|
|
4214
|
-
return
|
|
4230
|
+
return l.stylize("" + h, "number");
|
|
4215
4231
|
if (C(h))
|
|
4216
|
-
return
|
|
4232
|
+
return l.stylize("" + h, "boolean");
|
|
4217
4233
|
if (R(h))
|
|
4218
|
-
return
|
|
4234
|
+
return l.stylize("null", "null");
|
|
4219
4235
|
}
|
|
4220
|
-
function p(
|
|
4221
|
-
return "[" + Error.prototype.toString.call(
|
|
4236
|
+
function p(l) {
|
|
4237
|
+
return "[" + Error.prototype.toString.call(l) + "]";
|
|
4222
4238
|
}
|
|
4223
|
-
function v(
|
|
4239
|
+
function v(l, h, m, w, L) {
|
|
4224
4240
|
for (var k = [], E = 0, O = h.length; E < O; ++E)
|
|
4225
4241
|
De(h, String(E)) ? k.push(b(
|
|
4226
|
-
|
|
4242
|
+
l,
|
|
4227
4243
|
h,
|
|
4228
4244
|
m,
|
|
4229
4245
|
w,
|
|
@@ -4232,7 +4248,7 @@ var ru = hr.exports;
|
|
|
4232
4248
|
)) : k.push("");
|
|
4233
4249
|
return L.forEach(function(F) {
|
|
4234
4250
|
F.match(/^\d+$/) || k.push(b(
|
|
4235
|
-
|
|
4251
|
+
l,
|
|
4236
4252
|
h,
|
|
4237
4253
|
m,
|
|
4238
4254
|
w,
|
|
@@ -4241,9 +4257,9 @@ var ru = hr.exports;
|
|
|
4241
4257
|
));
|
|
4242
4258
|
}), k;
|
|
4243
4259
|
}
|
|
4244
|
-
function b(
|
|
4260
|
+
function b(l, h, m, w, L, k) {
|
|
4245
4261
|
var E, O, F;
|
|
4246
|
-
if (F = Object.getOwnPropertyDescriptor(h, L) || { value: h[L] }, F.get ? F.set ? O =
|
|
4262
|
+
if (F = Object.getOwnPropertyDescriptor(h, L) || { value: h[L] }, F.get ? F.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : F.set && (O = l.stylize("[Setter]", "special")), De(w, L) || (E = "[" + L + "]"), O || (l.seen.indexOf(F.value) < 0 ? (R(m) ? O = c(l, F.value, null) : O = c(l, F.value, m - 1), O.indexOf(`
|
|
4247
4263
|
`) > -1 && (k ? O = O.split(`
|
|
4248
4264
|
`).map(function(z) {
|
|
4249
4265
|
return " " + z;
|
|
@@ -4253,85 +4269,85 @@ var ru = hr.exports;
|
|
|
4253
4269
|
`).map(function(z) {
|
|
4254
4270
|
return " " + z;
|
|
4255
4271
|
}).join(`
|
|
4256
|
-
`))) : O =
|
|
4272
|
+
`))) : O = l.stylize("[Circular]", "special")), T(E)) {
|
|
4257
4273
|
if (k && L.match(/^\d+$/))
|
|
4258
4274
|
return O;
|
|
4259
|
-
E = JSON.stringify("" + L), E.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (E = E.slice(1, -1), E =
|
|
4275
|
+
E = JSON.stringify("" + L), E.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (E = E.slice(1, -1), E = l.stylize(E, "name")) : (E = E.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), E = l.stylize(E, "string"));
|
|
4260
4276
|
}
|
|
4261
4277
|
return E + ": " + O;
|
|
4262
4278
|
}
|
|
4263
|
-
function g(
|
|
4264
|
-
var w =
|
|
4279
|
+
function g(l, h, m) {
|
|
4280
|
+
var w = l.reduce(function(L, k) {
|
|
4265
4281
|
return k.indexOf(`
|
|
4266
4282
|
`) >= 0, L + k.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
4267
4283
|
}, 0);
|
|
4268
4284
|
return w > 60 ? m[0] + (h === "" ? "" : h + `
|
|
4269
|
-
`) + " " +
|
|
4270
|
-
`) + " " + m[1] : m[0] + h + " " +
|
|
4285
|
+
`) + " " + l.join(`,
|
|
4286
|
+
`) + " " + m[1] : m[0] + h + " " + l.join(", ") + " " + m[1];
|
|
4271
4287
|
}
|
|
4272
4288
|
t.types = Hn;
|
|
4273
|
-
function S(
|
|
4274
|
-
return Array.isArray(
|
|
4289
|
+
function S(l) {
|
|
4290
|
+
return Array.isArray(l);
|
|
4275
4291
|
}
|
|
4276
4292
|
t.isArray = S;
|
|
4277
|
-
function C(
|
|
4278
|
-
return typeof
|
|
4293
|
+
function C(l) {
|
|
4294
|
+
return typeof l == "boolean";
|
|
4279
4295
|
}
|
|
4280
4296
|
t.isBoolean = C;
|
|
4281
|
-
function R(
|
|
4282
|
-
return
|
|
4297
|
+
function R(l) {
|
|
4298
|
+
return l === null;
|
|
4283
4299
|
}
|
|
4284
4300
|
t.isNull = R;
|
|
4285
|
-
function
|
|
4286
|
-
return
|
|
4301
|
+
function G(l) {
|
|
4302
|
+
return l == null;
|
|
4287
4303
|
}
|
|
4288
|
-
t.isNullOrUndefined =
|
|
4289
|
-
function ee(
|
|
4290
|
-
return typeof
|
|
4304
|
+
t.isNullOrUndefined = G;
|
|
4305
|
+
function ee(l) {
|
|
4306
|
+
return typeof l == "number";
|
|
4291
4307
|
}
|
|
4292
4308
|
t.isNumber = ee;
|
|
4293
|
-
function P(
|
|
4294
|
-
return typeof
|
|
4309
|
+
function P(l) {
|
|
4310
|
+
return typeof l == "string";
|
|
4295
4311
|
}
|
|
4296
4312
|
t.isString = P;
|
|
4297
|
-
function V(
|
|
4298
|
-
return typeof
|
|
4313
|
+
function V(l) {
|
|
4314
|
+
return typeof l == "symbol";
|
|
4299
4315
|
}
|
|
4300
4316
|
t.isSymbol = V;
|
|
4301
|
-
function T(
|
|
4302
|
-
return
|
|
4317
|
+
function T(l) {
|
|
4318
|
+
return l === void 0;
|
|
4303
4319
|
}
|
|
4304
4320
|
t.isUndefined = T;
|
|
4305
|
-
function ne(
|
|
4306
|
-
return ie(
|
|
4321
|
+
function ne(l) {
|
|
4322
|
+
return ie(l) && Se(l) === "[object RegExp]";
|
|
4307
4323
|
}
|
|
4308
4324
|
t.isRegExp = ne, t.types.isRegExp = ne;
|
|
4309
|
-
function ie(
|
|
4310
|
-
return typeof
|
|
4325
|
+
function ie(l) {
|
|
4326
|
+
return typeof l == "object" && l !== null;
|
|
4311
4327
|
}
|
|
4312
4328
|
t.isObject = ie;
|
|
4313
|
-
function Ne(
|
|
4314
|
-
return ie(
|
|
4329
|
+
function Ne(l) {
|
|
4330
|
+
return ie(l) && Se(l) === "[object Date]";
|
|
4315
4331
|
}
|
|
4316
4332
|
t.isDate = Ne, t.types.isDate = Ne;
|
|
4317
|
-
function Ee(
|
|
4318
|
-
return ie(
|
|
4333
|
+
function Ee(l) {
|
|
4334
|
+
return ie(l) && (Se(l) === "[object Error]" || l instanceof Error);
|
|
4319
4335
|
}
|
|
4320
4336
|
t.isError = Ee, t.types.isNativeError = Ee;
|
|
4321
|
-
function le(
|
|
4322
|
-
return typeof
|
|
4337
|
+
function le(l) {
|
|
4338
|
+
return typeof l == "function";
|
|
4323
4339
|
}
|
|
4324
4340
|
t.isFunction = le;
|
|
4325
|
-
function $t(
|
|
4326
|
-
return
|
|
4327
|
-
typeof
|
|
4341
|
+
function $t(l) {
|
|
4342
|
+
return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
|
|
4343
|
+
typeof l > "u";
|
|
4328
4344
|
}
|
|
4329
4345
|
t.isPrimitive = $t, t.isBuffer = tu;
|
|
4330
|
-
function Se(
|
|
4331
|
-
return Object.prototype.toString.call(
|
|
4346
|
+
function Se(l) {
|
|
4347
|
+
return Object.prototype.toString.call(l);
|
|
4332
4348
|
}
|
|
4333
|
-
function Ye(
|
|
4334
|
-
return
|
|
4349
|
+
function Ye(l) {
|
|
4350
|
+
return l < 10 ? "0" + l.toString(10) : l.toString(10);
|
|
4335
4351
|
}
|
|
4336
4352
|
var Fe = [
|
|
4337
4353
|
"Jan",
|
|
@@ -4348,23 +4364,23 @@ var ru = hr.exports;
|
|
|
4348
4364
|
"Dec"
|
|
4349
4365
|
];
|
|
4350
4366
|
function Mt() {
|
|
4351
|
-
var
|
|
4352
|
-
Ye(
|
|
4353
|
-
Ye(
|
|
4354
|
-
Ye(
|
|
4367
|
+
var l = /* @__PURE__ */ new Date(), h = [
|
|
4368
|
+
Ye(l.getHours()),
|
|
4369
|
+
Ye(l.getMinutes()),
|
|
4370
|
+
Ye(l.getSeconds())
|
|
4355
4371
|
].join(":");
|
|
4356
|
-
return [
|
|
4372
|
+
return [l.getDate(), Fe[l.getMonth()], h].join(" ");
|
|
4357
4373
|
}
|
|
4358
4374
|
t.log = function() {
|
|
4359
4375
|
console.log("%s - %s", Mt(), t.format.apply(t, arguments));
|
|
4360
|
-
}, t.inherits = ru, t._extend = function(
|
|
4361
|
-
if (!h || !ie(h)) return
|
|
4376
|
+
}, t.inherits = ru, t._extend = function(l, h) {
|
|
4377
|
+
if (!h || !ie(h)) return l;
|
|
4362
4378
|
for (var m = Object.keys(h), w = m.length; w--; )
|
|
4363
|
-
|
|
4364
|
-
return
|
|
4379
|
+
l[m[w]] = h[m[w]];
|
|
4380
|
+
return l;
|
|
4365
4381
|
};
|
|
4366
|
-
function De(
|
|
4367
|
-
return Object.prototype.hasOwnProperty.call(
|
|
4382
|
+
function De(l, h) {
|
|
4383
|
+
return Object.prototype.hasOwnProperty.call(l, h);
|
|
4368
4384
|
}
|
|
4369
4385
|
var de = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
4370
4386
|
t.promisify = function(h) {
|
|
@@ -4406,15 +4422,15 @@ var ru = hr.exports;
|
|
|
4406
4422
|
e(h)
|
|
4407
4423
|
);
|
|
4408
4424
|
}, t.promisify.custom = de;
|
|
4409
|
-
function Re(
|
|
4410
|
-
if (!
|
|
4425
|
+
function Re(l, h) {
|
|
4426
|
+
if (!l) {
|
|
4411
4427
|
var m = new Error("Promise was rejected with a falsy value");
|
|
4412
|
-
m.reason =
|
|
4428
|
+
m.reason = l, l = m;
|
|
4413
4429
|
}
|
|
4414
|
-
return h(
|
|
4430
|
+
return h(l);
|
|
4415
4431
|
}
|
|
4416
|
-
function st(
|
|
4417
|
-
if (typeof
|
|
4432
|
+
function st(l) {
|
|
4433
|
+
if (typeof l != "function")
|
|
4418
4434
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4419
4435
|
function h() {
|
|
4420
4436
|
for (var m = [], w = 0; w < arguments.length; w++)
|
|
@@ -4425,7 +4441,7 @@ var ru = hr.exports;
|
|
|
4425
4441
|
var k = this, E = function() {
|
|
4426
4442
|
return L.apply(k, arguments);
|
|
4427
4443
|
};
|
|
4428
|
-
|
|
4444
|
+
l.apply(this, m).then(
|
|
4429
4445
|
function(O) {
|
|
4430
4446
|
A.nextTick(E.bind(null, null, O));
|
|
4431
4447
|
},
|
|
@@ -4434,9 +4450,9 @@ var ru = hr.exports;
|
|
|
4434
4450
|
}
|
|
4435
4451
|
);
|
|
4436
4452
|
}
|
|
4437
|
-
return Object.setPrototypeOf(h, Object.getPrototypeOf(
|
|
4453
|
+
return Object.setPrototypeOf(h, Object.getPrototypeOf(l)), Object.defineProperties(
|
|
4438
4454
|
h,
|
|
4439
|
-
e(
|
|
4455
|
+
e(l)
|
|
4440
4456
|
), h;
|
|
4441
4457
|
}
|
|
4442
4458
|
t.callbackify = st;
|
|
@@ -4483,22 +4499,22 @@ var li = {
|
|
|
4483
4499
|
}, iu = function t(e, r, n) {
|
|
4484
4500
|
r === void 0 && (r = ""), n || (n = {});
|
|
4485
4501
|
var i = function(u) {
|
|
4486
|
-
var
|
|
4502
|
+
var d = {
|
|
4487
4503
|
"│": "|",
|
|
4488
4504
|
"└": "`",
|
|
4489
4505
|
"├": "+",
|
|
4490
4506
|
"─": "-",
|
|
4491
4507
|
"┬": "-"
|
|
4492
4508
|
};
|
|
4493
|
-
return n.unicode === !1 ?
|
|
4509
|
+
return n.unicode === !1 ? d[u] : u;
|
|
4494
4510
|
};
|
|
4495
4511
|
typeof e == "string" && (e = { label: e });
|
|
4496
4512
|
var o = e.nodes || [], s = (e.label || "").split(`
|
|
4497
4513
|
`), a = `
|
|
4498
4514
|
` + r + (o.length ? i("│") : " ") + " ";
|
|
4499
4515
|
return r + s.join(a) + `
|
|
4500
|
-
` + o.map(function(u,
|
|
4501
|
-
var c =
|
|
4516
|
+
` + o.map(function(u, d) {
|
|
4517
|
+
var c = d === o.length - 1, f = u.nodes && u.nodes.length, p = r + (c ? " " : i("│")) + " ";
|
|
4502
4518
|
return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
4503
4519
|
}).join("");
|
|
4504
4520
|
};
|
|
@@ -4634,16 +4650,16 @@ function uu() {
|
|
|
4634
4650
|
}
|
|
4635
4651
|
function u(c) {
|
|
4636
4652
|
var f = Math.abs(c);
|
|
4637
|
-
return f >= n ?
|
|
4653
|
+
return f >= n ? d(c, f, n, "day") : f >= r ? d(c, f, r, "hour") : f >= e ? d(c, f, e, "minute") : f >= t ? d(c, f, t, "second") : c + " ms";
|
|
4638
4654
|
}
|
|
4639
|
-
function
|
|
4655
|
+
function d(c, f, p, v) {
|
|
4640
4656
|
var b = f >= p * 1.5;
|
|
4641
4657
|
return Math.round(c / p) + " " + v + (b ? "s" : "");
|
|
4642
4658
|
}
|
|
4643
4659
|
return Jt;
|
|
4644
4660
|
}
|
|
4645
4661
|
function cu(t) {
|
|
4646
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = uu(), r.destroy =
|
|
4662
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = uu(), r.destroy = d, Object.keys(t).forEach((c) => {
|
|
4647
4663
|
r[c] = t[c];
|
|
4648
4664
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4649
4665
|
function e(c) {
|
|
@@ -4658,8 +4674,8 @@ function cu(t) {
|
|
|
4658
4674
|
function g(...S) {
|
|
4659
4675
|
if (!g.enabled)
|
|
4660
4676
|
return;
|
|
4661
|
-
const C = g, R = Number(/* @__PURE__ */ new Date()),
|
|
4662
|
-
C.diff =
|
|
4677
|
+
const C = g, R = Number(/* @__PURE__ */ new Date()), G = R - (f || R);
|
|
4678
|
+
C.diff = G, C.prev = f, C.curr = R, f = R, S[0] = r.coerce(S[0]), typeof S[0] != "string" && S.unshift("%O");
|
|
4663
4679
|
let ee = 0;
|
|
4664
4680
|
S[0] = S[0].replace(/%([a-zA-Z%])/g, (V, T) => {
|
|
4665
4681
|
if (V === "%%")
|
|
@@ -4718,7 +4734,7 @@ function cu(t) {
|
|
|
4718
4734
|
function u(c) {
|
|
4719
4735
|
return c instanceof Error ? c.stack || c.message : c;
|
|
4720
4736
|
}
|
|
4721
|
-
function
|
|
4737
|
+
function d() {
|
|
4722
4738
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
4723
4739
|
}
|
|
4724
4740
|
return r.enable(r.load()), r;
|
|
@@ -4818,12 +4834,12 @@ var lu = cu;
|
|
|
4818
4834
|
function n(u) {
|
|
4819
4835
|
if (u[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + u[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
|
|
4820
4836
|
return;
|
|
4821
|
-
const
|
|
4822
|
-
u.splice(1, 0,
|
|
4837
|
+
const d = "color: " + this.color;
|
|
4838
|
+
u.splice(1, 0, d, "color: inherit");
|
|
4823
4839
|
let c = 0, f = 0;
|
|
4824
4840
|
u[0].replace(/%[a-zA-Z%]/g, (p) => {
|
|
4825
4841
|
p !== "%%" && (c++, p === "%c" && (f = c));
|
|
4826
|
-
}), u.splice(f, 0,
|
|
4842
|
+
}), u.splice(f, 0, d);
|
|
4827
4843
|
}
|
|
4828
4844
|
e.log = console.debug || console.log || (() => {
|
|
4829
4845
|
});
|
|
@@ -4852,8 +4868,8 @@ var lu = cu;
|
|
|
4852
4868
|
a.j = function(u) {
|
|
4853
4869
|
try {
|
|
4854
4870
|
return JSON.stringify(u);
|
|
4855
|
-
} catch (
|
|
4856
|
-
return "[UnexpectedJSONParseError]: " +
|
|
4871
|
+
} catch (d) {
|
|
4872
|
+
return "[UnexpectedJSONParseError]: " + d.message;
|
|
4857
4873
|
}
|
|
4858
4874
|
};
|
|
4859
4875
|
})(yr, yr.exports);
|
|
@@ -4986,27 +5002,27 @@ function Ou(t, e, r) {
|
|
|
4986
5002
|
throw new Zt(o);
|
|
4987
5003
|
if (t[s])
|
|
4988
5004
|
throw new Zt(s);
|
|
4989
|
-
t[i] = function(
|
|
4990
|
-
return r.use(
|
|
4991
|
-
}, Object.defineProperty(t, "then", { get: fi.bind(r) }), t[_t] = !0, t[o] = function(
|
|
4992
|
-
return typeof
|
|
4993
|
-
}, t[s] = function(
|
|
4994
|
-
if (
|
|
4995
|
-
throw new et(s, typeof
|
|
4996
|
-
return r.ready(
|
|
4997
|
-
}, t[a] = function(
|
|
4998
|
-
if (typeof
|
|
4999
|
-
throw new et(a, typeof
|
|
5000
|
-
return r.onClose(Pu(
|
|
5001
|
-
}, t[u] = function(
|
|
5002
|
-
if (
|
|
5003
|
-
throw new et(u, typeof
|
|
5004
|
-
return
|
|
5005
|
+
t[i] = function(d, c) {
|
|
5006
|
+
return r.use(d, c), this;
|
|
5007
|
+
}, Object.defineProperty(t, "then", { get: fi.bind(r) }), t[_t] = !0, t[o] = function(d) {
|
|
5008
|
+
return typeof d != "function" ? r._loadRegistered() : (r.after(tr(d, this)), this);
|
|
5009
|
+
}, t[s] = function(d) {
|
|
5010
|
+
if (d && typeof d != "function")
|
|
5011
|
+
throw new et(s, typeof d);
|
|
5012
|
+
return r.ready(d ? tr(d, this) : void 0);
|
|
5013
|
+
}, t[a] = function(d) {
|
|
5014
|
+
if (typeof d != "function")
|
|
5015
|
+
throw new et(a, typeof d);
|
|
5016
|
+
return r.onClose(Pu(d, this)), this;
|
|
5017
|
+
}, t[u] = function(d) {
|
|
5018
|
+
if (d && typeof d != "function")
|
|
5019
|
+
throw new et(u, typeof d);
|
|
5020
|
+
return d ? (r.close(tr(d, this)), this) : r.close();
|
|
5005
5021
|
};
|
|
5006
5022
|
}
|
|
5007
|
-
function
|
|
5008
|
-
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof
|
|
5009
|
-
const n = new
|
|
5023
|
+
function U(t, e, r) {
|
|
5024
|
+
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof U)) {
|
|
5025
|
+
const n = new U(t, e, r);
|
|
5010
5026
|
return t && Ou(t, e, n), n;
|
|
5011
5027
|
}
|
|
5012
5028
|
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new Tu(), this._readyQ = Sn(this, pi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
@@ -5015,8 +5031,8 @@ function q(t, e, r) {
|
|
|
5015
5031
|
this.emit("close"), this._closeQ.drain = wn;
|
|
5016
5032
|
}, this._doStart = null, this._root = new mr(this, _u.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5017
5033
|
const s = this.pluginTree.start(null, i, o);
|
|
5018
|
-
this._root.once("loaded", (a, u,
|
|
5019
|
-
this.pluginTree.stop(s,
|
|
5034
|
+
this._root.once("loaded", (a, u, d) => {
|
|
5035
|
+
this.pluginTree.stop(s, d);
|
|
5020
5036
|
});
|
|
5021
5037
|
}), mr.loadPlugin.call(this, this._root, (n) => {
|
|
5022
5038
|
ze("root plugin ready");
|
|
@@ -5036,11 +5052,11 @@ function q(t, e, r) {
|
|
|
5036
5052
|
function _u(t, e, r) {
|
|
5037
5053
|
this._doStart = r, e.autostart && this.start();
|
|
5038
5054
|
}
|
|
5039
|
-
wu(
|
|
5040
|
-
|
|
5055
|
+
wu(U, Su);
|
|
5056
|
+
U.prototype.start = function() {
|
|
5041
5057
|
return this.started = !0, A.nextTick(this._doStart), this;
|
|
5042
5058
|
};
|
|
5043
|
-
|
|
5059
|
+
U.prototype.override = function(t, e, r) {
|
|
5044
5060
|
return t;
|
|
5045
5061
|
};
|
|
5046
5062
|
function Cu(t) {
|
|
@@ -5048,22 +5064,22 @@ function Cu(t) {
|
|
|
5048
5064
|
throw new Au(typeof t);
|
|
5049
5065
|
return t;
|
|
5050
5066
|
}
|
|
5051
|
-
|
|
5052
|
-
|
|
5067
|
+
U.prototype[_t] = !0;
|
|
5068
|
+
U.prototype.use = function(t, e) {
|
|
5053
5069
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
5054
5070
|
};
|
|
5055
|
-
|
|
5071
|
+
U.prototype._loadRegistered = function() {
|
|
5056
5072
|
const t = this._current[0];
|
|
5057
5073
|
return !this.started && !this.booted && A.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
5058
5074
|
};
|
|
5059
|
-
Object.defineProperty(
|
|
5060
|
-
|
|
5075
|
+
Object.defineProperty(U.prototype, "then", { get: fi });
|
|
5076
|
+
U.prototype._addPlugin = function(t, e, r) {
|
|
5061
5077
|
if (t = Cu(t), e = e || {}, this.booted)
|
|
5062
5078
|
throw new Eu();
|
|
5063
5079
|
const n = this._current[0], i = new mr(this, t, e, r);
|
|
5064
5080
|
if (i.once("start", (o, s, a) => {
|
|
5065
5081
|
const u = this.pluginTree.start(n.name, s, a);
|
|
5066
|
-
i.once("loaded", (
|
|
5082
|
+
i.once("loaded", (d, c, f) => {
|
|
5067
5083
|
this.pluginTree.stop(u, f);
|
|
5068
5084
|
});
|
|
5069
5085
|
}), n.loaded)
|
|
@@ -5072,7 +5088,7 @@ q.prototype._addPlugin = function(t, e, r) {
|
|
|
5072
5088
|
o && (this._error = o);
|
|
5073
5089
|
}), i;
|
|
5074
5090
|
};
|
|
5075
|
-
|
|
5091
|
+
U.prototype.after = function(t) {
|
|
5076
5092
|
if (!t)
|
|
5077
5093
|
return this._loadRegistered();
|
|
5078
5094
|
this._addPlugin(e.bind(this), {}, !0);
|
|
@@ -5081,7 +5097,7 @@ q.prototype.after = function(t) {
|
|
|
5081
5097
|
}
|
|
5082
5098
|
return this;
|
|
5083
5099
|
};
|
|
5084
|
-
|
|
5100
|
+
U.prototype.onClose = function(t) {
|
|
5085
5101
|
if (typeof t != "function")
|
|
5086
5102
|
throw new Error("not a function");
|
|
5087
5103
|
t[this._isOnCloseHandlerKey] = !0, this._closeQ.unshift(t, e.bind(this));
|
|
@@ -5090,7 +5106,7 @@ q.prototype.onClose = function(t) {
|
|
|
5090
5106
|
}
|
|
5091
5107
|
return this;
|
|
5092
5108
|
};
|
|
5093
|
-
|
|
5109
|
+
U.prototype.close = function(t) {
|
|
5094
5110
|
let e;
|
|
5095
5111
|
if (t) {
|
|
5096
5112
|
if (typeof t != "function")
|
|
@@ -5107,7 +5123,7 @@ q.prototype.close = function(t) {
|
|
|
5107
5123
|
this._error = null, this._closeQ.push(t), A.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
5108
5124
|
}), e;
|
|
5109
5125
|
};
|
|
5110
|
-
|
|
5126
|
+
U.prototype.ready = function(t) {
|
|
5111
5127
|
if (t) {
|
|
5112
5128
|
if (typeof t != "function")
|
|
5113
5129
|
throw new et("ready", typeof t);
|
|
@@ -5122,10 +5138,10 @@ q.prototype.ready = function(t) {
|
|
|
5122
5138
|
}
|
|
5123
5139
|
});
|
|
5124
5140
|
};
|
|
5125
|
-
|
|
5141
|
+
U.prototype.prettyPrint = function() {
|
|
5126
5142
|
return this.pluginTree.prittyPrint();
|
|
5127
5143
|
};
|
|
5128
|
-
|
|
5144
|
+
U.prototype.toJSON = function() {
|
|
5129
5145
|
return this.pluginTree.toJSON();
|
|
5130
5146
|
};
|
|
5131
5147
|
function wn() {
|
|
@@ -5201,9 +5217,9 @@ function tr(t, e) {
|
|
|
5201
5217
|
}, i) : A.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : A.nextTick(i);
|
|
5202
5218
|
}
|
|
5203
5219
|
}
|
|
5204
|
-
Sr.exports =
|
|
5220
|
+
Sr.exports = U;
|
|
5205
5221
|
Sr.exports.express = function(t) {
|
|
5206
|
-
return
|
|
5222
|
+
return U(t, {
|
|
5207
5223
|
expose: {
|
|
5208
5224
|
use: "load"
|
|
5209
5225
|
}
|
|
@@ -5230,14 +5246,18 @@ const Fu = /* @__PURE__ */ as(Nu);
|
|
|
5230
5246
|
})();
|
|
5231
5247
|
function nc(t, e = !0, r = !0, n) {
|
|
5232
5248
|
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = Fu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5233
|
-
return s.use($o), s.use(ko, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Do, { videoPlayerController: n?.videoPlayerController }), s.use(Vo, {
|
|
5249
|
+
return s.use($o), s.use(ko, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Do, { videoPlayerController: n?.videoPlayerController }), s.use(Vo, {
|
|
5250
|
+
onContentActivate: n?.onContentActivate,
|
|
5251
|
+
withAd: n?.withAd,
|
|
5252
|
+
withAdNotification: n?.withAdNotification
|
|
5253
|
+
}), s.use(Wi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(eo), s.use(Fo), s.use(Yo), s.use(So), s.use(ss), s.after((a, u, d) => {
|
|
5234
5254
|
if (a)
|
|
5235
5255
|
throw a;
|
|
5236
|
-
u.ready(),
|
|
5237
|
-
}), r && s.after(async (a, u,
|
|
5256
|
+
u.ready(), d();
|
|
5257
|
+
}), r && s.after(async (a, u, d) => {
|
|
5238
5258
|
if (a)
|
|
5239
5259
|
throw a;
|
|
5240
|
-
await u.sdk.initializeApp(),
|
|
5260
|
+
await u.sdk.initializeApp(), d();
|
|
5241
5261
|
}), s.onClose(() => {
|
|
5242
5262
|
console.log("close");
|
|
5243
5263
|
}), s;
|