@streamlayer/sdk-web 1.10.8 → 1.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +5 -5
- package/lib/es/index.js +391 -372
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -3,23 +3,23 @@ import { QuestionType as I, QuestionStatus as G, PromotionType as q, Notificatio
|
|
|
3
3
|
import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as R } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
5
|
import { InvitationCategory as Mr, InvitationFrom as Ur } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
-
import { computed as _i, map as ki, atom as
|
|
7
|
-
import { v4 as
|
|
8
|
-
import { ConnectError as it, Code as oe, createContextKey as jr, createClient as xr, createContextValues as
|
|
6
|
+
import { computed as _i, map as ki, atom as Nt, batched as qr, onMount as wr } from "nanostores";
|
|
7
|
+
import { v4 as At } from "uuid";
|
|
8
|
+
import { ConnectError as it, Code as oe, createContextKey as jr, createClient as xr, createContextValues as Ci } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as Qr } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Gr } from "@nanostores/query";
|
|
11
|
-
import { Events as
|
|
11
|
+
import { Events as Ln } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as ot } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
13
|
import { Users as Ar } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
14
|
import { Feed as ee } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
-
import { Leaderboard as
|
|
15
|
+
import { Leaderboard as Pn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
|
-
import { LinksClient as
|
|
17
|
+
import { LinksClient as Li } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
18
|
import { Kind as K, TopicSubType as J, TopicType as Q, PollOpenedFrom as X, Category as W, ScreenOrientation as Kr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
19
|
import { AnalyticsService as Nn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
20
|
import { InteractionActionType as zr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
21
|
import { NotificationKind as me, NotificationType as Hr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
-
function
|
|
22
|
+
function Pi(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
25
|
var Dn = { exports: {} }, M = Dn.exports = {}, de, le;
|
|
@@ -71,20 +71,20 @@ function Ni(t) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var we = [], Qe = !1,
|
|
74
|
+
var we = [], Qe = !1, Ce, yt = -1;
|
|
75
75
|
function Di() {
|
|
76
|
-
!Qe || !
|
|
76
|
+
!Qe || !Ce || (Qe = !1, Ce.length ? we = Ce.concat(we) : yt = -1, we.length && Rn());
|
|
77
77
|
}
|
|
78
78
|
function Rn() {
|
|
79
79
|
if (!Qe) {
|
|
80
80
|
var t = Fn(Di);
|
|
81
81
|
Qe = !0;
|
|
82
82
|
for (var e = we.length; e; ) {
|
|
83
|
-
for (
|
|
84
|
-
|
|
83
|
+
for (Ce = we, we = []; ++yt < e; )
|
|
84
|
+
Ce && Ce[yt].run();
|
|
85
85
|
yt = -1, e = we.length;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
Ce = null, Qe = !1, Ni(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
M.nextTick = function(t) {
|
|
@@ -133,7 +133,7 @@ M.umask = function() {
|
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
135
|
var Fi = Dn.exports;
|
|
136
|
-
const E = /* @__PURE__ */
|
|
136
|
+
const E = /* @__PURE__ */ Pi(Fi), Ri = Ii({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -180,7 +180,7 @@ var Ae;
|
|
|
180
180
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
181
181
|
})(Ae || (Ae = {}));
|
|
182
182
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
183
|
-
class
|
|
183
|
+
class Dt {
|
|
184
184
|
/**
|
|
185
185
|
* store instance (nanostores)
|
|
186
186
|
*/
|
|
@@ -200,7 +200,7 @@ const Ui = (t) => {
|
|
|
200
200
|
const e = Object.keys(t);
|
|
201
201
|
return _i(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
202
202
|
};
|
|
203
|
-
class
|
|
203
|
+
class Le extends Dt {
|
|
204
204
|
getValues = () => this.getStore().get();
|
|
205
205
|
getValue = (e) => this.getStore().get()[e];
|
|
206
206
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
@@ -230,7 +230,7 @@ class $n {
|
|
|
230
230
|
listeners = /* @__PURE__ */ new Set();
|
|
231
231
|
settingsKey;
|
|
232
232
|
constructor({ settings: e, ...r }, n) {
|
|
233
|
-
this.settingsKey = qi[r.type], this.status =
|
|
233
|
+
this.settingsKey = qi[r.type], this.status = Nt(tt.Suspended), this.config = new Le(Z(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(Z(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(Z({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
234
234
|
}
|
|
235
235
|
get featureConfig() {
|
|
236
236
|
return this.config.getStore();
|
|
@@ -272,7 +272,7 @@ class $n {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
class re extends
|
|
275
|
+
class re extends Dt {
|
|
276
276
|
getValue = () => this.getStore().get();
|
|
277
277
|
getValues() {
|
|
278
278
|
throw new Error("not implemented");
|
|
@@ -287,11 +287,11 @@ class re extends Nt {
|
|
|
287
287
|
return this.getStore().get();
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
const U = (t) =>
|
|
291
|
-
class se extends
|
|
290
|
+
const U = (t) => Nt(t);
|
|
291
|
+
class se extends Dt {
|
|
292
292
|
atomStore;
|
|
293
293
|
constructor(e, r, n) {
|
|
294
|
-
super(e, `api:${r}`), this.atomStore =
|
|
294
|
+
super(e, `api:${r}`), this.atomStore = Nt(), n && e.subscribe((i) => {
|
|
295
295
|
const o = this.atomStore.get(), s = n(i, o);
|
|
296
296
|
o !== s && this.atomStore.set(s);
|
|
297
297
|
});
|
|
@@ -319,7 +319,7 @@ class se extends Nt {
|
|
|
319
319
|
key = () => this.getStore().key;
|
|
320
320
|
off = () => this.getStore().off();
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const $ = new Bi();
|
|
323
323
|
async function* ji(t, e) {
|
|
324
324
|
for await (const r of e) {
|
|
325
325
|
t.response.message = r, t.received_at = Date.now(), t.id = Date.now();
|
|
@@ -442,7 +442,7 @@ class Qi {
|
|
|
442
442
|
ts: /* @__PURE__ */ new Date(),
|
|
443
443
|
log: []
|
|
444
444
|
};
|
|
445
|
-
this.state = new
|
|
445
|
+
this.state = new Le(Z(o), `subscription:${i.name}:state`), this.options = {
|
|
446
446
|
...i,
|
|
447
447
|
reconnectDelay: i.reconnectDelay ?? 1e3,
|
|
448
448
|
reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
|
|
@@ -564,7 +564,7 @@ const Gi = /* @__PURE__ */ new Set([
|
|
|
564
564
|
const t = localStorage.getItem("sl-device-id");
|
|
565
565
|
if (t)
|
|
566
566
|
return t;
|
|
567
|
-
const e =
|
|
567
|
+
const e = At();
|
|
568
568
|
return localStorage.setItem("sl-device-id", e), e;
|
|
569
569
|
}, Hi = () => navigator.userAgentData?.platform || navigator.platform;
|
|
570
570
|
class Jr {
|
|
@@ -586,7 +586,7 @@ class Jr {
|
|
|
586
586
|
subscriptions;
|
|
587
587
|
opts;
|
|
588
588
|
constructor(e, r) {
|
|
589
|
-
this.host = e, this.opts = r, this.$headers = new
|
|
589
|
+
this.host = e, this.opts = r, this.$headers = new Le(Z({
|
|
590
590
|
"sl-device-id": zi(),
|
|
591
591
|
"sl-device-os": Hi()
|
|
592
592
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
@@ -657,7 +657,7 @@ class Jr {
|
|
|
657
657
|
...Array.isArray(r) ? r : [r]
|
|
658
658
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
659
659
|
return { client: i, createRequestOptions: (d) => {
|
|
660
|
-
const c =
|
|
660
|
+
const c = Ci();
|
|
661
661
|
for (const f in d) {
|
|
662
662
|
const p = ur[f];
|
|
663
663
|
c.set(p, d[f]);
|
|
@@ -689,7 +689,7 @@ class Jr {
|
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
const Wi = (t, e) => {
|
|
692
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
692
|
+
const { client: r, queryKey: n } = e.createPromiseClient(Ln, {
|
|
693
693
|
method: "retrieveEventId",
|
|
694
694
|
params: [t]
|
|
695
695
|
});
|
|
@@ -715,7 +715,7 @@ const Wi = (t, e) => {
|
|
|
715
715
|
})).data?.attributes : void 0
|
|
716
716
|
});
|
|
717
717
|
}, Ji = (t, e) => {
|
|
718
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
718
|
+
const { client: r, queryKey: n } = e.createPromiseClient(Ln, { method: "summary", params: [t] });
|
|
719
719
|
return e.nanoquery.createFetcherStore(n, {
|
|
720
720
|
fetcher: async (i, o, s) => s ? (await r.summary({
|
|
721
721
|
id: s
|
|
@@ -838,7 +838,7 @@ const io = (t) => {
|
|
|
838
838
|
organizationAdvertising: i
|
|
839
839
|
};
|
|
840
840
|
};
|
|
841
|
-
class ao extends
|
|
841
|
+
class ao extends Dt {
|
|
842
842
|
stores;
|
|
843
843
|
constructor(e) {
|
|
844
844
|
const r = so(e), n = Ui(r);
|
|
@@ -867,10 +867,10 @@ const uo = (t, e, r) => {
|
|
|
867
867
|
t.store.unsubscribe();
|
|
868
868
|
}, r();
|
|
869
869
|
}, co = (t) => {
|
|
870
|
-
const { client: e } = t.createPromiseClient(
|
|
870
|
+
const { client: e } = t.createPromiseClient(Pn, { method: "list" });
|
|
871
871
|
return (r) => e.list(r);
|
|
872
872
|
}, Mn = (t) => {
|
|
873
|
-
const { client: e } = t.createPromiseClient(
|
|
873
|
+
const { client: e } = t.createPromiseClient(Pn, { method: "summary" });
|
|
874
874
|
return (r) => e.summary(r);
|
|
875
875
|
}, lo = (t, e) => {
|
|
876
876
|
const { client: r, queryKey: n } = e.createPromiseClient(Ar, {
|
|
@@ -924,7 +924,7 @@ const uo = (t, e, r) => {
|
|
|
924
924
|
id: t
|
|
925
925
|
})).data;
|
|
926
926
|
}, yo = (t, e) => {
|
|
927
|
-
const { client: r } = e.createStreamClient(ee), n =
|
|
927
|
+
const { client: r } = e.createStreamClient(ee), n = Nt({ eventId: t.get() || "", feedId: "" });
|
|
928
928
|
return t.subscribe((o = "") => {
|
|
929
929
|
n.set({ eventId: o, feedId: "" });
|
|
930
930
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
@@ -954,19 +954,36 @@ const uo = (t, e, r) => {
|
|
|
954
954
|
return;
|
|
955
955
|
const { options: i, notification: o, ...s } = n.data.attributes, a = i?.options.case === "promotion" ? i?.options.value : void 0;
|
|
956
956
|
return { id: s.id, question: s, promotion: a, notification: o };
|
|
957
|
-
}, go = (t, e, r, n) => {
|
|
958
|
-
const { client:
|
|
957
|
+
}, go = (t, e, r, n, i, o, s) => {
|
|
958
|
+
const { client: a, queryKey: u } = s.createPromiseClient(ee, {
|
|
959
959
|
method: "list",
|
|
960
|
-
params: [t, e,
|
|
960
|
+
params: [t, e, o ? "true" : ""]
|
|
961
961
|
});
|
|
962
|
-
return
|
|
963
|
-
fetcher: async (
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
962
|
+
return s.nanoquery.createFetcherStore(u, {
|
|
963
|
+
fetcher: async (d, c, f, p, v) => {
|
|
964
|
+
if (!f || v)
|
|
965
|
+
return [];
|
|
966
|
+
const S = await a.list({
|
|
967
|
+
eventId: f,
|
|
968
|
+
filter: {
|
|
969
|
+
types: p === Oe.ALLOWED ? [] : [I.FACTOID, I.PROMOTION, I.TWEET],
|
|
970
|
+
statuses: [G.ACTIVE, G.RESOLVED]
|
|
971
|
+
}
|
|
972
|
+
}), m = {
|
|
973
|
+
eventId: f,
|
|
974
|
+
userId: r.get(),
|
|
975
|
+
organizationId: n.get()
|
|
976
|
+
};
|
|
977
|
+
for (const g of S.data)
|
|
978
|
+
i.isQuestionReceived(m, g.id) || ($.emit("poll", {
|
|
979
|
+
action: "received",
|
|
980
|
+
payload: {
|
|
981
|
+
questionId: g.id,
|
|
982
|
+
questionType: g.attributes?.type
|
|
983
|
+
}
|
|
984
|
+
}), i.saveQuestionReceived(m, g.id));
|
|
985
|
+
return S.data;
|
|
986
|
+
},
|
|
970
987
|
dedupeTime: 0,
|
|
971
988
|
refetchInterval: 0
|
|
972
989
|
});
|
|
@@ -1023,8 +1040,8 @@ const uo = (t, e, r) => {
|
|
|
1023
1040
|
data: null
|
|
1024
1041
|
} : {
|
|
1025
1042
|
timestamp: Date.now(),
|
|
1026
|
-
data: p.data?.reduce((v,
|
|
1027
|
-
const m =
|
|
1043
|
+
data: p.data?.reduce((v, S) => {
|
|
1044
|
+
const m = S?.attributes?.question;
|
|
1028
1045
|
if (!m?.id)
|
|
1029
1046
|
return v;
|
|
1030
1047
|
const g = {
|
|
@@ -1032,13 +1049,13 @@ const uo = (t, e, r) => {
|
|
|
1032
1049
|
userId: c,
|
|
1033
1050
|
organizationId: f
|
|
1034
1051
|
};
|
|
1035
|
-
return n.
|
|
1052
|
+
return n.isQuestionReceived(g, m.id) || ($.emit("poll", {
|
|
1036
1053
|
action: "received",
|
|
1037
1054
|
payload: {
|
|
1038
1055
|
questionId: m.id,
|
|
1039
1056
|
questionType: m.type
|
|
1040
1057
|
}
|
|
1041
|
-
}), n.
|
|
1058
|
+
}), n.saveQuestionReceived(g, m.id)), { ...v, [m.id]: m };
|
|
1042
1059
|
}, {})
|
|
1043
1060
|
};
|
|
1044
1061
|
},
|
|
@@ -1077,18 +1094,18 @@ const uo = (t, e, r) => {
|
|
|
1077
1094
|
});
|
|
1078
1095
|
} };
|
|
1079
1096
|
};
|
|
1080
|
-
var
|
|
1097
|
+
var Et;
|
|
1081
1098
|
(function(t) {
|
|
1082
1099
|
t.SHOWED = "showed";
|
|
1083
|
-
})(
|
|
1100
|
+
})(Et || (Et = {}));
|
|
1084
1101
|
class wo extends Je {
|
|
1085
1102
|
constructor() {
|
|
1086
1103
|
super("advertisement");
|
|
1087
1104
|
}
|
|
1088
1105
|
setShowed = (e) => {
|
|
1089
|
-
this.write(
|
|
1106
|
+
this.write(Et.SHOWED, e, "true");
|
|
1090
1107
|
};
|
|
1091
|
-
isViewed = (e) => this.read(
|
|
1108
|
+
isViewed = (e) => this.read(Et.SHOWED, e);
|
|
1092
1109
|
}
|
|
1093
1110
|
const Ao = (t) => {
|
|
1094
1111
|
const e = t.data?.attributes?.question;
|
|
@@ -1119,30 +1136,30 @@ const Ao = (t) => {
|
|
|
1119
1136
|
}, Be = (t) => (t?.promotion?.type === q.INGAME_IAB11_LBAR || t?.promotion?.type === q.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, Io = (t, e, r) => {
|
|
1120
1137
|
let n = !1;
|
|
1121
1138
|
const i = r.transport, o = pe("advertisement"), s = new wo(), a = Z({}), u = bo(t, i), d = (m) => {
|
|
1122
|
-
const g = a.get(),
|
|
1123
|
-
|
|
1139
|
+
const g = a.get(), w = g.data?.question.id, D = g.data?.promotion?.type;
|
|
1140
|
+
w && ($.emit("advertisement", {
|
|
1124
1141
|
action: "opened",
|
|
1125
1142
|
payload: {
|
|
1126
|
-
id:
|
|
1143
|
+
id: w,
|
|
1127
1144
|
type: D,
|
|
1128
1145
|
hasBanner: Be(g.data),
|
|
1129
1146
|
openedFrom: m?.fromNotification ? "notification" : "auto"
|
|
1130
1147
|
}
|
|
1131
|
-
}), m?.fromNotification && (a.setKey("hasNotification", !1),
|
|
1148
|
+
}), m?.fromNotification && (a.setKey("hasNotification", !1), $.emit("advertisement", {
|
|
1132
1149
|
action: "notification-opened",
|
|
1133
1150
|
payload: {
|
|
1134
|
-
id:
|
|
1151
|
+
id: w,
|
|
1135
1152
|
type: D,
|
|
1136
1153
|
hasBanner: Be(g.data)
|
|
1137
1154
|
}
|
|
1138
1155
|
})));
|
|
1139
1156
|
}, c = () => {
|
|
1140
|
-
const m = a.get(), g = m.data?.question.id,
|
|
1141
|
-
g && !D && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0),
|
|
1157
|
+
const m = a.get(), g = m.data?.question.id, w = m.data?.promotion?.type, D = a.get()?.isOpened;
|
|
1158
|
+
g && !D && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0), $.emit("advertisement", {
|
|
1142
1159
|
action: "viewed",
|
|
1143
1160
|
payload: {
|
|
1144
1161
|
id: g,
|
|
1145
|
-
type:
|
|
1162
|
+
type: w,
|
|
1146
1163
|
hasBanner: Be(m.data)
|
|
1147
1164
|
}
|
|
1148
1165
|
}));
|
|
@@ -1153,29 +1170,29 @@ const Ao = (t) => {
|
|
|
1153
1170
|
data: g,
|
|
1154
1171
|
hasNotification: g?.notification?.enabled === Br.NOTIFICATION_ENABLED,
|
|
1155
1172
|
close: () => p(g.question.id),
|
|
1156
|
-
togglePause: (
|
|
1173
|
+
togglePause: (w) => v(g.question.id, w),
|
|
1157
1174
|
isViewed: !!s.isViewed(g.question.id)
|
|
1158
|
-
}) : (a.setKey("loading", !0), Un(m, i).then((
|
|
1175
|
+
}) : (a.setKey("loading", !0), Un(m, i).then((w) => a.set({
|
|
1159
1176
|
loading: !1,
|
|
1160
1177
|
error: void 0,
|
|
1161
|
-
data:
|
|
1162
|
-
hasNotification:
|
|
1163
|
-
close: () => p(
|
|
1164
|
-
togglePause: (D) => v(
|
|
1165
|
-
isViewed:
|
|
1166
|
-
})).catch((
|
|
1178
|
+
data: w,
|
|
1179
|
+
hasNotification: w?.notification?.enabled === Br.NOTIFICATION_ENABLED,
|
|
1180
|
+
close: () => p(w?.question.id),
|
|
1181
|
+
togglePause: (D) => v(w?.question.id, D),
|
|
1182
|
+
isViewed: w && !!s.isViewed(w.question.id)
|
|
1183
|
+
})).catch((w) => a.set({
|
|
1167
1184
|
loading: !1,
|
|
1168
|
-
error:
|
|
1185
|
+
error: w,
|
|
1169
1186
|
data: void 0
|
|
1170
1187
|
})));
|
|
1171
1188
|
};
|
|
1172
1189
|
a.subscribe((m, g) => {
|
|
1173
1190
|
if (!(m.data?.id === g?.data?.id && m.isPaused !== g?.isPaused)) {
|
|
1174
1191
|
if (m.data?.promotion?.type === q.EXTERNAL_AD && !m?.externalAd && m.data.promotion.adCampaigns?.gamOptions && m.data.promotion.adCampaigns?.gamBaseUrl) {
|
|
1175
|
-
const
|
|
1176
|
-
a.setKey("externalAd", { type: "gam", url:
|
|
1192
|
+
const w = Eo(m.data.promotion.adCampaigns);
|
|
1193
|
+
a.setKey("externalAd", { type: "gam", url: w });
|
|
1177
1194
|
}
|
|
1178
|
-
m.data?.promotion && !m.isOpened && (
|
|
1195
|
+
m.data?.promotion && !m.isOpened && ($.emit("advertisement", {
|
|
1179
1196
|
action: "received",
|
|
1180
1197
|
payload: {
|
|
1181
1198
|
id: m.data.question.id,
|
|
@@ -1185,7 +1202,7 @@ const Ao = (t) => {
|
|
|
1185
1202
|
isViewed: !!s.isViewed(m.data.question.id)
|
|
1186
1203
|
},
|
|
1187
1204
|
skipAnalytics: m.data.question.id === g?.data?.question.id
|
|
1188
|
-
}), m.data.question.id !== g?.data?.question.id && !s.isViewed(m.data.question.id) &&
|
|
1205
|
+
}), m.data.question.id !== g?.data?.question.id && !s.isViewed(m.data.question.id) && $.emit("advertisement", {
|
|
1189
1206
|
action: "notification-received",
|
|
1190
1207
|
payload: {
|
|
1191
1208
|
id: m.data.question.id,
|
|
@@ -1194,7 +1211,7 @@ const Ao = (t) => {
|
|
|
1194
1211
|
hasBanner: Be(m.data),
|
|
1195
1212
|
isViewed: !1
|
|
1196
1213
|
}
|
|
1197
|
-
})), !m?.data && g?.data &&
|
|
1214
|
+
})), !m?.data && g?.data && $.emit("advertisement", {
|
|
1198
1215
|
action: "closed",
|
|
1199
1216
|
payload: {
|
|
1200
1217
|
id: g.data.question.id,
|
|
@@ -1232,7 +1249,7 @@ const Ao = (t) => {
|
|
|
1232
1249
|
};
|
|
1233
1250
|
var ce;
|
|
1234
1251
|
(function(t) {
|
|
1235
|
-
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.
|
|
1252
|
+
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.QUESTION_RECEIVED = "q-received", t.QUESTION_OPENED = "q-opened";
|
|
1236
1253
|
})(ce || (ce = {}));
|
|
1237
1254
|
class Oo extends Je {
|
|
1238
1255
|
constructor() {
|
|
@@ -1248,10 +1265,10 @@ class To extends Je {
|
|
|
1248
1265
|
constructor() {
|
|
1249
1266
|
super("gamification"), this.sessionStorage = new Oo();
|
|
1250
1267
|
}
|
|
1251
|
-
|
|
1252
|
-
this.write(ce.
|
|
1268
|
+
saveQuestionReceived = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1269
|
+
this.write(ce.QUESTION_RECEIVED, n, e, r, i, "1");
|
|
1253
1270
|
};
|
|
1254
|
-
|
|
1271
|
+
isQuestionReceived = ({ userId: e, eventId: r, organizationId: n }, i) => !!this.read(ce.QUESTION_RECEIVED, n, e, r, i);
|
|
1255
1272
|
saveQuestionOpened = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1256
1273
|
this.write(ce.QUESTION_OPENED, n, e, r, i, "1");
|
|
1257
1274
|
};
|
|
@@ -1306,7 +1323,7 @@ class _o {
|
|
|
1306
1323
|
constructor(e) {
|
|
1307
1324
|
this.transport = e.transport, this.log = pe("gamification-background"), this.storage = new To(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new re(U(void 0), "moderationId").getStore(), this.interactiveAllowed = new re(U(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new re(U(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new se(fo(this.slStreamId, e.transport), "gamification:moderation");
|
|
1308
1325
|
const r = !!e.sdk.options.get().betPack;
|
|
1309
|
-
this.feedList = new se(go(this.slStreamId, this.interactiveAllowed, r, e.transport), "gamification:feedList"), this.betPack = new se(vo(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = po(this.slStreamId, r, e.transport), this.openedQuestion = So(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
|
|
1326
|
+
this.feedList = new se(go(this.slStreamId, this.interactiveAllowed, this.userId, this.organizationId, this.storage, r, e.transport), "gamification:feedList"), this.betPack = new se(vo(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = po(this.slStreamId, r, e.transport), this.openedQuestion = So(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
|
|
1310
1327
|
this.log.debug({ item: n }, "received question"), n?.questionId ? (this.questionSubscription = mo(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", async (i) => {
|
|
1311
1328
|
const o = i.data?.attributes?.question;
|
|
1312
1329
|
if (this.openedQuestion.updateExtendedQuestion(o), o?.type === I.PREDICTION && (o.status === G.ACTIVE || o.status === G.RESOLVED)) {
|
|
@@ -1474,7 +1491,7 @@ class ko {
|
|
|
1474
1491
|
this.logger.debug({ notificationId: e }, "active queue tick skipped, notification not exist");
|
|
1475
1492
|
return;
|
|
1476
1493
|
}
|
|
1477
|
-
|
|
1494
|
+
$.emit("notification", {
|
|
1478
1495
|
action: "received",
|
|
1479
1496
|
payload: {
|
|
1480
1497
|
type: r.type,
|
|
@@ -1500,7 +1517,7 @@ class ko {
|
|
|
1500
1517
|
const s = new Map(this.notificationsList.get());
|
|
1501
1518
|
s.delete(e), this.notificationsList.set(s);
|
|
1502
1519
|
const a = this.timeouts.get(e);
|
|
1503
|
-
a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding &&
|
|
1520
|
+
a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding && $.emit("notification", {
|
|
1504
1521
|
action: "closed",
|
|
1505
1522
|
payload: {
|
|
1506
1523
|
type: i.type,
|
|
@@ -1517,27 +1534,27 @@ class ko {
|
|
|
1517
1534
|
this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.notificationsList.off(), this.notificationsList.set(/* @__PURE__ */ new Map());
|
|
1518
1535
|
};
|
|
1519
1536
|
}
|
|
1520
|
-
var
|
|
1537
|
+
var It;
|
|
1521
1538
|
(function(t) {
|
|
1522
1539
|
t.OPENED = "opened";
|
|
1523
|
-
})(
|
|
1524
|
-
class
|
|
1540
|
+
})(It || (It = {}));
|
|
1541
|
+
class Co extends Je {
|
|
1525
1542
|
constructor() {
|
|
1526
1543
|
super("notification");
|
|
1527
1544
|
}
|
|
1528
1545
|
setOpened = (e) => {
|
|
1529
|
-
this.write(
|
|
1546
|
+
this.write(It.OPENED, e, "true");
|
|
1530
1547
|
};
|
|
1531
|
-
isOpened = (e) => this.read(
|
|
1548
|
+
isOpened = (e) => this.read(It.OPENED, e);
|
|
1532
1549
|
clearNotification = () => {
|
|
1533
1550
|
this.clear();
|
|
1534
1551
|
};
|
|
1535
1552
|
}
|
|
1536
|
-
class
|
|
1553
|
+
class Lo {
|
|
1537
1554
|
queue;
|
|
1538
1555
|
storage;
|
|
1539
1556
|
constructor(e = {}) {
|
|
1540
|
-
this.storage = new
|
|
1557
|
+
this.storage = new Co(), this.queue = new ko({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1541
1558
|
}
|
|
1542
1559
|
isViewed = (e) => this.storage.isOpened(e);
|
|
1543
1560
|
add = (e) => {
|
|
@@ -1545,7 +1562,7 @@ class Co {
|
|
|
1545
1562
|
if (e.data && e.emitEvent) {
|
|
1546
1563
|
const n = e.action;
|
|
1547
1564
|
e.action = (...i) => {
|
|
1548
|
-
n && n(...i),
|
|
1565
|
+
n && n(...i), $.emit("notification", {
|
|
1549
1566
|
action: "opened",
|
|
1550
1567
|
payload: {
|
|
1551
1568
|
questionId: e.data.questionId,
|
|
@@ -1574,8 +1591,8 @@ class Co {
|
|
|
1574
1591
|
this.storage.setOpened(e);
|
|
1575
1592
|
};
|
|
1576
1593
|
}
|
|
1577
|
-
const
|
|
1578
|
-
t.notifications = new
|
|
1594
|
+
const Po = (t, e, r) => {
|
|
1595
|
+
t.notifications = new Lo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1579
1596
|
t.notifications.queue.drain();
|
|
1580
1597
|
}), r();
|
|
1581
1598
|
};
|
|
@@ -1604,17 +1621,17 @@ const Xr = async (t, e) => {
|
|
|
1604
1621
|
loading: void 0,
|
|
1605
1622
|
error: void 0
|
|
1606
1623
|
}), u = co(t), d = async () => {
|
|
1607
|
-
const p = e.get(), v = n?.getStore().get().data?.map((
|
|
1624
|
+
const p = e.get(), v = n?.getStore().get().data?.map((S) => S.slId) || [];
|
|
1608
1625
|
if (p && v?.length) {
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1626
|
+
const S = r.get();
|
|
1627
|
+
S && v.push(S), a.setKey("loading", !0), a.setKey("data", []);
|
|
1611
1628
|
const g = await u({
|
|
1612
1629
|
eventId: p,
|
|
1613
1630
|
usersIds: v
|
|
1614
1631
|
});
|
|
1615
1632
|
a.set({
|
|
1616
|
-
data: g.data.map((
|
|
1617
|
-
...
|
|
1633
|
+
data: g.data.map((w, D) => ({
|
|
1634
|
+
...w.attributes,
|
|
1618
1635
|
friendsRank: D + 1
|
|
1619
1636
|
})),
|
|
1620
1637
|
hasMore: !1,
|
|
@@ -1625,8 +1642,8 @@ const Xr = async (t, e) => {
|
|
|
1625
1642
|
}, c = () => {
|
|
1626
1643
|
d();
|
|
1627
1644
|
}, f = (p) => {
|
|
1628
|
-
const v = s.get(),
|
|
1629
|
-
|
|
1645
|
+
const v = s.get(), S = p || v.page + 1;
|
|
1646
|
+
S <= o && s.set({ ...v, page: S });
|
|
1630
1647
|
};
|
|
1631
1648
|
return wr(a, () => {
|
|
1632
1649
|
const p = e.listen(d), v = n?.listen(d);
|
|
@@ -1643,7 +1660,7 @@ class Fo extends Je {
|
|
|
1643
1660
|
super("deep-link-context", window.sessionStorage);
|
|
1644
1661
|
}
|
|
1645
1662
|
}
|
|
1646
|
-
const Zr = "sldl",
|
|
1663
|
+
const Zr = "sldl", Ft = "sldl_uid", jn = "sldl_eid", xn = "sldl_e_eid", Ro = /* @__PURE__ */ new Set([Ft, jn, xn]), en = (t) => {
|
|
1647
1664
|
const e = {}, r = {};
|
|
1648
1665
|
for (const [n, i] of t)
|
|
1649
1666
|
Ro.has(n) ? e[n] = i : r[n] = i;
|
|
@@ -1697,7 +1714,7 @@ const Zr = "sldl", Dt = "sldl_uid", jn = "sldl_eid", xn = "sldl_e_eid", Ro = /*
|
|
|
1697
1714
|
fe.debug(a);
|
|
1698
1715
|
}
|
|
1699
1716
|
t.deepLink = {
|
|
1700
|
-
$store: new
|
|
1717
|
+
$store: new Le(Z(o), "deep-link-context"),
|
|
1701
1718
|
getDeepLinkData: () => {
|
|
1702
1719
|
const { data: a, used: u } = t.deepLink.$store.getValues();
|
|
1703
1720
|
return { data: a, used: u };
|
|
@@ -1709,7 +1726,7 @@ const Zr = "sldl", Dt = "sldl_uid", jn = "sldl_eid", xn = "sldl_e_eid", Ro = /*
|
|
|
1709
1726
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
1710
1727
|
}, t.sdk.getInviter = () => {
|
|
1711
1728
|
const { data: a, used: u } = t.deepLink.getDeepLinkData();
|
|
1712
|
-
return u ? a?.[
|
|
1729
|
+
return u ? a?.[Ft] : void 0;
|
|
1713
1730
|
}, t.sdk.inviteDisplayed = () => {
|
|
1714
1731
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
|
|
1715
1732
|
}, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
|
|
@@ -1745,7 +1762,7 @@ class Uo extends Mi {
|
|
|
1745
1762
|
*/
|
|
1746
1763
|
login = async (e, r) => {
|
|
1747
1764
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1748
|
-
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[
|
|
1765
|
+
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Ft];
|
|
1749
1766
|
Mo.debug({ inviterKey: o }, "login with inviterKey");
|
|
1750
1767
|
const s = await this.bypassLogin({
|
|
1751
1768
|
schema: e,
|
|
@@ -1987,7 +2004,7 @@ const et = new je(), qo = (t, e, r) => {
|
|
|
1987
2004
|
break;
|
|
1988
2005
|
}
|
|
1989
2006
|
}
|
|
1990
|
-
}, o =
|
|
2007
|
+
}, o = $.listen(i), s = t.activeFeature.subscribe((a) => {
|
|
1991
2008
|
a ? (t.ui.enableApp(), t.sdk.uiState.set({ app: !0 })) : t.ui.disableApp();
|
|
1992
2009
|
});
|
|
1993
2010
|
return () => {
|
|
@@ -2043,7 +2060,7 @@ const et = new je(), qo = (t, e, r) => {
|
|
|
2043
2060
|
refetchInterval: 0
|
|
2044
2061
|
});
|
|
2045
2062
|
}, zo = (t, { web: e, mobile: r }) => {
|
|
2046
|
-
const { client: n } = t.createPromiseClient(
|
|
2063
|
+
const { client: n } = t.createPromiseClient(Li, { method: "generate" });
|
|
2047
2064
|
return n.generate({ web: e, mobile: r });
|
|
2048
2065
|
}, nn = (t, e) => {
|
|
2049
2066
|
const r = new URLSearchParams(t);
|
|
@@ -2054,19 +2071,19 @@ const et = new je(), qo = (t, e, r) => {
|
|
|
2054
2071
|
const i = Z({});
|
|
2055
2072
|
return wr(i, () => Ko(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
|
|
2056
2073
|
const d = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", f = e.get() || "", p = r.get() || "", v = {
|
|
2057
|
-
[
|
|
2074
|
+
[Ft]: c,
|
|
2058
2075
|
[jn]: f,
|
|
2059
2076
|
[xn]: p
|
|
2060
2077
|
};
|
|
2061
2078
|
if (!u && d) {
|
|
2062
2079
|
i.setKey("loading", !0);
|
|
2063
|
-
let
|
|
2064
|
-
|
|
2065
|
-
const g = window.location.origin + window.location.pathname +
|
|
2080
|
+
let S = window.location.search, m = window.location.hash;
|
|
2081
|
+
S && m || m ? S = `?${nn(S, v)}` : m = `#${nn("", v)}`;
|
|
2082
|
+
const g = window.location.origin + window.location.pathname + S + m;
|
|
2066
2083
|
try {
|
|
2067
|
-
const
|
|
2084
|
+
const w = await zo(t, { web: g, mobile: d });
|
|
2068
2085
|
i.set({
|
|
2069
|
-
data:
|
|
2086
|
+
data: w.data?.link,
|
|
2070
2087
|
loading: !1
|
|
2071
2088
|
});
|
|
2072
2089
|
} catch {
|
|
@@ -2080,10 +2097,10 @@ const et = new je(), qo = (t, e, r) => {
|
|
|
2080
2097
|
i.setKey("loading", !0);
|
|
2081
2098
|
})), { $store: i, fetch };
|
|
2082
2099
|
};
|
|
2083
|
-
var
|
|
2100
|
+
var B;
|
|
2084
2101
|
(function(t) {
|
|
2085
2102
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2086
|
-
})(
|
|
2103
|
+
})(B || (B = {}));
|
|
2087
2104
|
const Wo = (t, e, r, n) => {
|
|
2088
2105
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2089
2106
|
i && r.add({
|
|
@@ -2118,37 +2135,37 @@ const Wo = (t, e, r, n) => {
|
|
|
2118
2135
|
organizationId: d,
|
|
2119
2136
|
eventId: c
|
|
2120
2137
|
});
|
|
2121
|
-
if (f ===
|
|
2122
|
-
t.set(
|
|
2138
|
+
if (f === B.Completed || a?.skipOnboarding) {
|
|
2139
|
+
t.set(B.Completed);
|
|
2123
2140
|
for (const g of o)
|
|
2124
2141
|
g();
|
|
2125
|
-
a?.skipOnboarding && f !==
|
|
2142
|
+
a?.skipOnboarding && f !== B.Completed && (i.saveOnboardingStatus({
|
|
2126
2143
|
organizationId: d,
|
|
2127
2144
|
userId: u,
|
|
2128
2145
|
eventId: c
|
|
2129
|
-
},
|
|
2146
|
+
}, B.Completed), qn(s, c));
|
|
2130
2147
|
return;
|
|
2131
2148
|
}
|
|
2132
2149
|
const p = e.moderation.getStore().value?.data, v = r.featureSettings.get().inplayGame;
|
|
2133
2150
|
if (p === void 0 || v === void 0)
|
|
2134
2151
|
return;
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2152
|
+
const S = p?.options?.onboardingEnabled, m = v?.titleCard?.optIn;
|
|
2153
|
+
S ? m ? t.set(B.Required) : t.set(B.Optional) : (m ? t.set(B.Unavailable) : t.set(B.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
|
|
2137
2154
|
} catch (u) {
|
|
2138
2155
|
console.error(u);
|
|
2139
2156
|
}
|
|
2140
2157
|
}, on = (t, e, r, n, i) => {
|
|
2141
2158
|
let o = !!i?.skipOnboarding;
|
|
2142
|
-
const s = e.storage, a = U(
|
|
2159
|
+
const s = e.storage, a = U(B.Unset);
|
|
2143
2160
|
a.subscribe((c) => {
|
|
2144
|
-
c !==
|
|
2161
|
+
c !== B.Unset && (c === B.Optional || c === B.Required ? o === !1 && (Wo(t, e, n, s), o = !0) : t.onboardingProcessed.set(!0), c === B.Completed && e.activeQuestionId.invalidate(), s.setOnboardingInstantOpen({
|
|
2145
2162
|
userId: e.userId.get() || "",
|
|
2146
2163
|
organizationId: e.organizationId.get() || "",
|
|
2147
2164
|
eventId: e.slStreamId.get() || ""
|
|
2148
2165
|
}));
|
|
2149
2166
|
});
|
|
2150
2167
|
const u = [];
|
|
2151
|
-
return a.get() !==
|
|
2168
|
+
return a.get() !== B.Completed && (u.push(e.userId.listen((c) => {
|
|
2152
2169
|
c && ht(a, e, t, n, s, u, r, i);
|
|
2153
2170
|
})), u.push(e.moderation.listen((c) => {
|
|
2154
2171
|
c.data && ht(a, e, t, n, s, u, r, i);
|
|
@@ -2157,11 +2174,11 @@ const Wo = (t, e, r, n) => {
|
|
|
2157
2174
|
}))), ht(a, e, t, n, s, u, r, i), { $store: a, submitInplay: async () => {
|
|
2158
2175
|
const c = e.slStreamId.get();
|
|
2159
2176
|
if (c) {
|
|
2160
|
-
await qn(r, c), a.set(
|
|
2177
|
+
await qn(r, c), a.set(B.Completed), s.saveOnboardingStatus({
|
|
2161
2178
|
organizationId: e.organizationId.get() || "",
|
|
2162
2179
|
userId: e.userId.get() || "",
|
|
2163
2180
|
eventId: c
|
|
2164
|
-
},
|
|
2181
|
+
}, B.Completed), $.emit("poll", {
|
|
2165
2182
|
action: "onboardingPassed",
|
|
2166
2183
|
payload: {}
|
|
2167
2184
|
}), t.openFeature();
|
|
@@ -2251,7 +2268,7 @@ class Xo extends $n {
|
|
|
2251
2268
|
}), n.sdk.options.get().skipOnboarding || (this.onboardingStatus = on(this, this.background, n.transport, n.notifications, {
|
|
2252
2269
|
skipOnboarding: n.sdk.options.get().skipOnboarding
|
|
2253
2270
|
})), 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) => {
|
|
2254
|
-
(o === void 0 || i !==
|
|
2271
|
+
(o === void 0 || i !== B.Unset) && this.background.activeQuestionId.invalidate();
|
|
2255
2272
|
})), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled = U(!1), this.cancels.add(n.sdk.options.subscribe((i) => {
|
|
2256
2273
|
i.friendsTab === "disabled" ? this.friendsTabEnabled.set(!1) : i.friendsTab === "enabled" && this.friendsTabEnabled.set(!0);
|
|
2257
2274
|
})), this.cancels.add(this.settings.subscribe((i) => {
|
|
@@ -2268,7 +2285,7 @@ class Xo extends $n {
|
|
|
2268
2285
|
if (this.skipOnboarding)
|
|
2269
2286
|
this.background.interactiveAllowed.set(Oe.ALLOWED);
|
|
2270
2287
|
else {
|
|
2271
|
-
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e ===
|
|
2288
|
+
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e === B.Completed, o = !r || i || n !== !0;
|
|
2272
2289
|
this.background.interactiveAllowed.set(o ? Oe.ALLOWED : Oe.DISALLOWED);
|
|
2273
2290
|
}
|
|
2274
2291
|
};
|
|
@@ -2287,14 +2304,14 @@ class Xo extends $n {
|
|
|
2287
2304
|
prefix: `notification-id:${s}`
|
|
2288
2305
|
}), d = [...this.feedList.getValues().data || []], c = d.findIndex((H) => H.id === s), f = d[c];
|
|
2289
2306
|
let p = f?.attributes?.attributes?.value?.answerId;
|
|
2290
|
-
const v = Ge(s, this.transport),
|
|
2307
|
+
const v = Ge(s, this.transport), S = v.subscribe(() => {
|
|
2291
2308
|
});
|
|
2292
2309
|
await v.get().promise;
|
|
2293
2310
|
let m = v.get().data;
|
|
2294
|
-
m || (m = await cr(s, this.transport)),
|
|
2311
|
+
m || (m = await cr(s, this.transport)), S(), window.requestAnimationFrame(() => {
|
|
2295
2312
|
v.invalidate();
|
|
2296
2313
|
}), p || (p = m?.answers.find(({ youVoted: H }) => H)?.id);
|
|
2297
|
-
const g = a.find(({ correct: H }) => H),
|
|
2314
|
+
const g = a.find(({ correct: H }) => H), w = p ? a.find(({ id: H }) => H === p) : void 0, D = !!w?.correct;
|
|
2298
2315
|
if (f && d[c]?.attributes?.attributes.case === "question") {
|
|
2299
2316
|
try {
|
|
2300
2317
|
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = D ? lt.WON : lt.LOST);
|
|
@@ -2302,7 +2319,7 @@ class Xo extends $n {
|
|
|
2302
2319
|
}
|
|
2303
2320
|
this.feedList.getStore().mutate(d);
|
|
2304
2321
|
}
|
|
2305
|
-
if (!
|
|
2322
|
+
if (!w || !g)
|
|
2306
2323
|
return;
|
|
2307
2324
|
this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
|
|
2308
2325
|
type: Ae.QUESTION_RESOLVED,
|
|
@@ -2317,8 +2334,8 @@ class Xo extends $n {
|
|
|
2317
2334
|
question: {
|
|
2318
2335
|
title: D ? `Congratulations! You answered correctly! You won ${g.points} pts!` : `Better luck next time! Correct: ${g?.text}!`,
|
|
2319
2336
|
votedAnswer: {
|
|
2320
|
-
title:
|
|
2321
|
-
points:
|
|
2337
|
+
title: w?.text,
|
|
2338
|
+
points: w?.points
|
|
2322
2339
|
},
|
|
2323
2340
|
correctAnswerTitle: g?.text,
|
|
2324
2341
|
correct: !!D,
|
|
@@ -2376,7 +2393,7 @@ class Xo extends $n {
|
|
|
2376
2393
|
}
|
|
2377
2394
|
});
|
|
2378
2395
|
}
|
|
2379
|
-
i === -1 && (r.unshift(n),
|
|
2396
|
+
i === -1 && (r.unshift(n), $.emit("poll", {
|
|
2380
2397
|
action: "received",
|
|
2381
2398
|
payload: {
|
|
2382
2399
|
questionId: n.id,
|
|
@@ -2402,7 +2419,7 @@ class Xo extends $n {
|
|
|
2402
2419
|
throw o;
|
|
2403
2420
|
}
|
|
2404
2421
|
const n = { ...this.betPack.getValues().data?.data }, i = n?.[e];
|
|
2405
|
-
i && (
|
|
2422
|
+
i && ($.emit("poll", {
|
|
2406
2423
|
action: "voted",
|
|
2407
2424
|
payload: {
|
|
2408
2425
|
questionId: e,
|
|
@@ -2421,7 +2438,7 @@ class Xo extends $n {
|
|
|
2421
2438
|
return;
|
|
2422
2439
|
const u = a.findIndex((f) => f.id === e), d = a[u], c = d?.attributes?.attributes.case === "question" && d.attributes.attributes.value;
|
|
2423
2440
|
if (c) {
|
|
2424
|
-
|
|
2441
|
+
$.emit("poll", {
|
|
2425
2442
|
action: "voted",
|
|
2426
2443
|
payload: {
|
|
2427
2444
|
questionId: e,
|
|
@@ -2430,8 +2447,8 @@ class Xo extends $n {
|
|
|
2430
2447
|
});
|
|
2431
2448
|
const f = n.get().data;
|
|
2432
2449
|
if (i(), f) {
|
|
2433
|
-
const p = f.answers.find((g) => g.correct === !0), v = f.answers.findIndex((g) => g.id === r),
|
|
2434
|
-
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text =
|
|
2450
|
+
const p = f.answers.find((g) => g.correct === !0), v = f.answers.findIndex((g) => g.id === r), S = f.answers[v], m = f.answers.every(({ percentageDecimal: g }, w) => g === o?.answers[w].percentageDecimal);
|
|
2451
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = S?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? lt.WON : lt.LOST), this.feedList.getStore().mutate([...a]), f.answers[v].correct = p?.id === r, f.answers[v].youVoted = !0, m && f.answers.forEach((g) => {
|
|
2435
2452
|
g.percentageDecimal = 0;
|
|
2436
2453
|
}), p?.id === r && (f.answers[v].pointsEarned = f.status === G.RESOLVED ? 0 : p.points), n.mutate({ ...f });
|
|
2437
2454
|
}
|
|
@@ -2470,7 +2487,7 @@ class Xo extends $n {
|
|
|
2470
2487
|
userId: this.background.userId.get() || "",
|
|
2471
2488
|
organizationId: this.background.organizationId.get() || ""
|
|
2472
2489
|
};
|
|
2473
|
-
return this.storage.isQuestionOpened(o, e) || (
|
|
2490
|
+
return this.storage.isQuestionOpened(o, e) || ($.emit("poll", {
|
|
2474
2491
|
action: "opened",
|
|
2475
2492
|
payload: {
|
|
2476
2493
|
questionId: e,
|
|
@@ -2524,7 +2541,7 @@ class Xo extends $n {
|
|
|
2524
2541
|
*/
|
|
2525
2542
|
showInApp = (e) => {
|
|
2526
2543
|
const r = this.onboardingStatus.$store.get();
|
|
2527
|
-
if (e && e.data && r && r !==
|
|
2544
|
+
if (e && e.data && r && r !== B.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Oi.ON && e.data.question.status === G.ACTIVE && !e.data.question.marketClosed) {
|
|
2528
2545
|
if (sn.has(e.data.question.type))
|
|
2529
2546
|
this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
|
|
2530
2547
|
type: Ae.QUESTION,
|
|
@@ -2715,7 +2732,7 @@ class ns {
|
|
|
2715
2732
|
break;
|
|
2716
2733
|
}
|
|
2717
2734
|
};
|
|
2718
|
-
return
|
|
2735
|
+
return $.listen(r);
|
|
2719
2736
|
});
|
|
2720
2737
|
}
|
|
2721
2738
|
accepted = () => {
|
|
@@ -2754,7 +2771,7 @@ class is {
|
|
|
2754
2771
|
break;
|
|
2755
2772
|
}
|
|
2756
2773
|
};
|
|
2757
|
-
return
|
|
2774
|
+
return $.listen(r);
|
|
2758
2775
|
});
|
|
2759
2776
|
}
|
|
2760
2777
|
tap = () => {
|
|
@@ -2819,7 +2836,7 @@ class ss {
|
|
|
2819
2836
|
}
|
|
2820
2837
|
}
|
|
2821
2838
|
};
|
|
2822
|
-
return
|
|
2839
|
+
return $.listen(r);
|
|
2823
2840
|
});
|
|
2824
2841
|
}
|
|
2825
2842
|
received = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -2957,7 +2974,7 @@ class us {
|
|
|
2957
2974
|
break;
|
|
2958
2975
|
}
|
|
2959
2976
|
};
|
|
2960
|
-
return
|
|
2977
|
+
return $.listen(r);
|
|
2961
2978
|
});
|
|
2962
2979
|
}
|
|
2963
2980
|
received = ({ questionId: e, questionType: r, topicSubType: n }) => {
|
|
@@ -3011,7 +3028,7 @@ class cs {
|
|
|
3011
3028
|
break;
|
|
3012
3029
|
}
|
|
3013
3030
|
};
|
|
3014
|
-
return
|
|
3031
|
+
return $.listen(r);
|
|
3015
3032
|
});
|
|
3016
3033
|
}
|
|
3017
3034
|
// event when a poll is received from subscription or active question request
|
|
@@ -3122,14 +3139,14 @@ class ls {
|
|
|
3122
3139
|
listenersCancels;
|
|
3123
3140
|
connected = !1;
|
|
3124
3141
|
constructor(e) {
|
|
3125
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new
|
|
3142
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(Z({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ds({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new us(this), this.polls = new cs(this), this.invitation = new ns(this), this.interactions = new is(this), this.advertisement = new ss(this);
|
|
3126
3143
|
const { client: r } = e.analyticsTransport.createPromiseClient(Nn, {
|
|
3127
3144
|
method: "send"
|
|
3128
3145
|
});
|
|
3129
3146
|
this.analyticsClient = r;
|
|
3130
3147
|
}
|
|
3131
3148
|
connect = () => {
|
|
3132
|
-
this.writeCommon("sessionId",
|
|
3149
|
+
this.writeCommon("sessionId", At()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, Se.debug("analytics connected");
|
|
3133
3150
|
};
|
|
3134
3151
|
disconnect = () => {
|
|
3135
3152
|
this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, Se.debug("analytics disconnected");
|
|
@@ -3152,7 +3169,7 @@ class ls {
|
|
|
3152
3169
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
3153
3170
|
this.writeCommon("eventId", r);
|
|
3154
3171
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
3155
|
-
r && this.writeCommon("category", as[r]), r !== R.UNSET ? this.writeCommon("overlaySessionId",
|
|
3172
|
+
r && this.writeCommon("category", as[r]), r !== R.UNSET ? this.writeCommon("overlaySessionId", At()) : this.writeCommon("overlaySessionId", "");
|
|
3156
3173
|
})), this.onConnect(() => {
|
|
3157
3174
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
3158
3175
|
this.writeCommon("screenOrientation", i.matches ? Kr.PORTRAIT : Kr.LANDSCAPE);
|
|
@@ -3166,7 +3183,9 @@ class ls {
|
|
|
3166
3183
|
};
|
|
3167
3184
|
}
|
|
3168
3185
|
const fs = (t, e, r) => {
|
|
3169
|
-
t.analytics = new ls(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
3186
|
+
t.analytics = new ls(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), t.sdk.writeOverlaySessionId = (n) => {
|
|
3187
|
+
n === "" ? t.analytics.writeCommon("overlaySessionId", "") : t.analytics.writeCommon("overlaySessionId", At());
|
|
3188
|
+
}, () => {
|
|
3170
3189
|
t.analytics.disconnect();
|
|
3171
3190
|
})), r();
|
|
3172
3191
|
};
|
|
@@ -3202,16 +3221,16 @@ function Qn(t, e, r) {
|
|
|
3202
3221
|
get concurrency() {
|
|
3203
3222
|
return r;
|
|
3204
3223
|
},
|
|
3205
|
-
set concurrency(
|
|
3206
|
-
if (!(
|
|
3224
|
+
set concurrency(P) {
|
|
3225
|
+
if (!(P >= 1))
|
|
3207
3226
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
3208
|
-
if (r =
|
|
3227
|
+
if (r = P, !u.paused)
|
|
3209
3228
|
for (; i && s < r; )
|
|
3210
|
-
s++,
|
|
3229
|
+
s++, w();
|
|
3211
3230
|
},
|
|
3212
3231
|
running: d,
|
|
3213
3232
|
resume: v,
|
|
3214
|
-
idle:
|
|
3233
|
+
idle: S,
|
|
3215
3234
|
length: f,
|
|
3216
3235
|
getQueue: p,
|
|
3217
3236
|
unshift: g,
|
|
@@ -3228,38 +3247,38 @@ function Qn(t, e, r) {
|
|
|
3228
3247
|
u.paused = !0;
|
|
3229
3248
|
}
|
|
3230
3249
|
function f() {
|
|
3231
|
-
for (var
|
|
3232
|
-
|
|
3250
|
+
for (var P = i, V = 0; P; )
|
|
3251
|
+
P = P.next, V++;
|
|
3233
3252
|
return V;
|
|
3234
3253
|
}
|
|
3235
3254
|
function p() {
|
|
3236
|
-
for (var
|
|
3237
|
-
V.push(
|
|
3255
|
+
for (var P = i, V = []; P; )
|
|
3256
|
+
V.push(P.value), P = P.next;
|
|
3238
3257
|
return V;
|
|
3239
3258
|
}
|
|
3240
3259
|
function v() {
|
|
3241
3260
|
if (u.paused) {
|
|
3242
3261
|
if (u.paused = !1, i === null) {
|
|
3243
|
-
s++,
|
|
3262
|
+
s++, w();
|
|
3244
3263
|
return;
|
|
3245
3264
|
}
|
|
3246
3265
|
for (; i && s < r; )
|
|
3247
|
-
s++,
|
|
3266
|
+
s++, w();
|
|
3248
3267
|
}
|
|
3249
3268
|
}
|
|
3250
|
-
function
|
|
3269
|
+
function S() {
|
|
3251
3270
|
return s === 0 && u.length() === 0;
|
|
3252
3271
|
}
|
|
3253
|
-
function m(
|
|
3272
|
+
function m(P, V) {
|
|
3254
3273
|
var _ = n.get();
|
|
3255
|
-
_.context = t, _.release =
|
|
3274
|
+
_.context = t, _.release = w, _.value = P, _.callback = V || te, _.errorHandler = a, s >= r || u.paused ? o ? (o.next = _, o = _) : (i = _, o = _, u.saturated()) : (s++, e.call(t, _.value, _.worked));
|
|
3256
3275
|
}
|
|
3257
|
-
function g(
|
|
3276
|
+
function g(P, V) {
|
|
3258
3277
|
var _ = n.get();
|
|
3259
|
-
_.context = t, _.release =
|
|
3278
|
+
_.context = t, _.release = w, _.value = P, _.callback = V || te, _.errorHandler = a, s >= r || u.paused ? i ? (_.next = i, i = _) : (i = _, o = _, u.saturated()) : (s++, e.call(t, _.value, _.worked));
|
|
3260
3279
|
}
|
|
3261
|
-
function
|
|
3262
|
-
|
|
3280
|
+
function w(P) {
|
|
3281
|
+
P && n.release(P);
|
|
3263
3282
|
var V = i;
|
|
3264
3283
|
V && s <= r ? u.paused ? s-- : (o === i && (o = null), i = V.next, V.next = null, e.call(t, V.value, V.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
3265
3284
|
}
|
|
@@ -3269,8 +3288,8 @@ function Qn(t, e, r) {
|
|
|
3269
3288
|
function H() {
|
|
3270
3289
|
i = null, o = null, u.drain(), u.drain = te;
|
|
3271
3290
|
}
|
|
3272
|
-
function ne(
|
|
3273
|
-
a =
|
|
3291
|
+
function ne(P) {
|
|
3292
|
+
a = P;
|
|
3274
3293
|
}
|
|
3275
3294
|
}
|
|
3276
3295
|
function te() {
|
|
@@ -3294,9 +3313,9 @@ function bs(t, e, r) {
|
|
|
3294
3313
|
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
3295
3314
|
function a(c) {
|
|
3296
3315
|
var f = new Promise(function(p, v) {
|
|
3297
|
-
o(c, function(
|
|
3298
|
-
if (
|
|
3299
|
-
v(
|
|
3316
|
+
o(c, function(S, m) {
|
|
3317
|
+
if (S) {
|
|
3318
|
+
v(S);
|
|
3300
3319
|
return;
|
|
3301
3320
|
}
|
|
3302
3321
|
p(m);
|
|
@@ -3306,9 +3325,9 @@ function bs(t, e, r) {
|
|
|
3306
3325
|
}
|
|
3307
3326
|
function u(c) {
|
|
3308
3327
|
var f = new Promise(function(p, v) {
|
|
3309
|
-
s(c, function(
|
|
3310
|
-
if (
|
|
3311
|
-
v(
|
|
3328
|
+
s(c, function(S, m) {
|
|
3329
|
+
if (S) {
|
|
3330
|
+
v(S);
|
|
3312
3331
|
return;
|
|
3313
3332
|
}
|
|
3314
3333
|
p(m);
|
|
@@ -3355,7 +3374,7 @@ N.prototype._events = void 0;
|
|
|
3355
3374
|
N.prototype._eventsCount = 0;
|
|
3356
3375
|
N.prototype._maxListeners = void 0;
|
|
3357
3376
|
var un = 10;
|
|
3358
|
-
function
|
|
3377
|
+
function Rt(t) {
|
|
3359
3378
|
if (typeof t != "function")
|
|
3360
3379
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
3361
3380
|
}
|
|
@@ -3410,7 +3429,7 @@ N.prototype.emit = function(e) {
|
|
|
3410
3429
|
};
|
|
3411
3430
|
function Hn(t, e, r, n) {
|
|
3412
3431
|
var i, o, s;
|
|
3413
|
-
if (
|
|
3432
|
+
if (Rt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
3414
3433
|
"newListener",
|
|
3415
3434
|
e,
|
|
3416
3435
|
r.listener ? r.listener : r
|
|
@@ -3439,14 +3458,14 @@ function Wn(t, e, r) {
|
|
|
3439
3458
|
return i.listener = r, n.wrapFn = i, i;
|
|
3440
3459
|
}
|
|
3441
3460
|
N.prototype.once = function(e, r) {
|
|
3442
|
-
return
|
|
3461
|
+
return Rt(r), this.on(e, Wn(this, e, r)), this;
|
|
3443
3462
|
};
|
|
3444
3463
|
N.prototype.prependOnceListener = function(e, r) {
|
|
3445
|
-
return
|
|
3464
|
+
return Rt(r), this.prependListener(e, Wn(this, e, r)), this;
|
|
3446
3465
|
};
|
|
3447
3466
|
N.prototype.removeListener = function(e, r) {
|
|
3448
3467
|
var n, i, o, s, a;
|
|
3449
|
-
if (
|
|
3468
|
+
if (Rt(r), i = this._events, i === void 0)
|
|
3450
3469
|
return this;
|
|
3451
3470
|
if (n = i[e], n === void 0)
|
|
3452
3471
|
return this;
|
|
@@ -3554,7 +3573,7 @@ function Zn(t, e, r, n) {
|
|
|
3554
3573
|
else
|
|
3555
3574
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3556
3575
|
}
|
|
3557
|
-
var ei = Tr.exports,
|
|
3576
|
+
var ei = Tr.exports, Vt = {}, ti = {}, ri = function() {
|
|
3558
3577
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3559
3578
|
return !1;
|
|
3560
3579
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3577,15 +3596,15 @@ var ei = Tr.exports, Rt = {}, ti = {}, ri = function() {
|
|
|
3577
3596
|
return !1;
|
|
3578
3597
|
}
|
|
3579
3598
|
return !0;
|
|
3580
|
-
}, Os = ri,
|
|
3599
|
+
}, Os = ri, $t = function() {
|
|
3581
3600
|
return Os() && !!Symbol.toStringTag;
|
|
3582
|
-
}, Ts = Error, _s = EvalError, ks = RangeError,
|
|
3583
|
-
return typeof cn != "function" || typeof Symbol != "function" || typeof cn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3584
|
-
},
|
|
3601
|
+
}, Ts = Error, _s = EvalError, ks = RangeError, Cs = ReferenceError, ni = SyntaxError, Bt = TypeError, Ls = URIError, cn = typeof Symbol < "u" && Symbol, Ps = ri, Ns = function() {
|
|
3602
|
+
return typeof cn != "function" || typeof Symbol != "function" || typeof cn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ps();
|
|
3603
|
+
}, xt = {
|
|
3585
3604
|
__proto__: null,
|
|
3586
3605
|
foo: {}
|
|
3587
3606
|
}, Ds = Object, Fs = function() {
|
|
3588
|
-
return { __proto__:
|
|
3607
|
+
return { __proto__: xt }.foo === xt.foo && !(xt instanceof Ds);
|
|
3589
3608
|
}, Rs = "Function.prototype.bind called on incompatible ", Vs = Object.prototype.toString, $s = Math.max, Bs = "[object Function]", dn = function(e, r) {
|
|
3590
3609
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3591
3610
|
n[i] = e[i];
|
|
@@ -3624,31 +3643,31 @@ var ei = Tr.exports, Rt = {}, ti = {}, ri = function() {
|
|
|
3624
3643
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
3625
3644
|
}
|
|
3626
3645
|
return i;
|
|
3627
|
-
}, js = qs, _r = Function.prototype.bind || js, xs = Function.prototype.call, Qs = Object.prototype.hasOwnProperty, Gs = _r, Ks = Gs.call(xs, Qs), T, zs = Ts, Hs = _s, Ws = ks, Ys =
|
|
3646
|
+
}, js = qs, _r = Function.prototype.bind || js, xs = Function.prototype.call, Qs = Object.prototype.hasOwnProperty, Gs = _r, Ks = Gs.call(xs, Qs), T, zs = Ts, Hs = _s, Ws = ks, Ys = Cs, We = ni, ze = Bt, Js = Ls, ii = Function, Qt = function(t) {
|
|
3628
3647
|
try {
|
|
3629
3648
|
return ii('"use strict"; return (' + t + ").constructor;")();
|
|
3630
3649
|
} catch {
|
|
3631
3650
|
}
|
|
3632
|
-
},
|
|
3633
|
-
if (
|
|
3651
|
+
}, Pe = Object.getOwnPropertyDescriptor;
|
|
3652
|
+
if (Pe)
|
|
3634
3653
|
try {
|
|
3635
|
-
|
|
3654
|
+
Pe({}, "");
|
|
3636
3655
|
} catch {
|
|
3637
|
-
|
|
3656
|
+
Pe = null;
|
|
3638
3657
|
}
|
|
3639
|
-
var
|
|
3658
|
+
var Gt = function() {
|
|
3640
3659
|
throw new ze();
|
|
3641
|
-
}, Xs =
|
|
3660
|
+
}, Xs = Pe ? function() {
|
|
3642
3661
|
try {
|
|
3643
|
-
return arguments.callee,
|
|
3662
|
+
return arguments.callee, Gt;
|
|
3644
3663
|
} catch {
|
|
3645
3664
|
try {
|
|
3646
|
-
return
|
|
3665
|
+
return Pe(arguments, "callee").get;
|
|
3647
3666
|
} catch {
|
|
3648
|
-
return
|
|
3667
|
+
return Gt;
|
|
3649
3668
|
}
|
|
3650
3669
|
}
|
|
3651
|
-
}() :
|
|
3670
|
+
}() : Gt, Me = Ns(), Zs = Fs(), j = Object.getPrototypeOf || (Zs ? function(t) {
|
|
3652
3671
|
return t.__proto__;
|
|
3653
3672
|
} : null), qe = {}, ea = typeof Uint8Array > "u" || !j ? T : j(Uint8Array), Ne = {
|
|
3654
3673
|
__proto__: null,
|
|
@@ -3730,11 +3749,11 @@ if (j)
|
|
|
3730
3749
|
var ra = function t(e) {
|
|
3731
3750
|
var r;
|
|
3732
3751
|
if (e === "%AsyncFunction%")
|
|
3733
|
-
r =
|
|
3752
|
+
r = Qt("async function () {}");
|
|
3734
3753
|
else if (e === "%GeneratorFunction%")
|
|
3735
|
-
r =
|
|
3754
|
+
r = Qt("function* () {}");
|
|
3736
3755
|
else if (e === "%AsyncGeneratorFunction%")
|
|
3737
|
-
r =
|
|
3756
|
+
r = Qt("async function* () {}");
|
|
3738
3757
|
else if (e === "%AsyncGenerator%") {
|
|
3739
3758
|
var n = t("%AsyncGeneratorFunction%");
|
|
3740
3759
|
n && (r = n.prototype);
|
|
@@ -3796,8 +3815,8 @@ var ra = function t(e) {
|
|
|
3796
3815
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3797
3816
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3798
3817
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3799
|
-
}, st = _r,
|
|
3800
|
-
var r =
|
|
3818
|
+
}, st = _r, Ot = Ks, na = st.call(Function.call, Array.prototype.concat), ia = st.call(Function.apply, Array.prototype.splice), fn = st.call(Function.call, String.prototype.replace), Tt = st.call(Function.call, String.prototype.slice), oa = st.call(Function.call, RegExp.prototype.exec), sa = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, aa = /\\(\\)?/g, ua = function(e) {
|
|
3819
|
+
var r = Tt(e, 0, 1), n = Tt(e, -1);
|
|
3801
3820
|
if (r === "%" && n !== "%")
|
|
3802
3821
|
throw new We("invalid intrinsic syntax, expected closing `%`");
|
|
3803
3822
|
if (n === "%" && r !== "%")
|
|
@@ -3808,7 +3827,7 @@ var ra = function t(e) {
|
|
|
3808
3827
|
}), i;
|
|
3809
3828
|
}, ca = function(e, r) {
|
|
3810
3829
|
var n = e, i;
|
|
3811
|
-
if (
|
|
3830
|
+
if (Ot(ln, n) && (i = ln[n], n = "%" + i[0] + "%"), Ot(Ne, n)) {
|
|
3812
3831
|
var o = Ne[n];
|
|
3813
3832
|
if (o === qe && (o = ra(n)), typeof o > "u" && !r)
|
|
3814
3833
|
throw new ze("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
@@ -3829,10 +3848,10 @@ var ra = function t(e) {
|
|
|
3829
3848
|
var n = ua(e), i = n.length > 0 ? n[0] : "", o = ca("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
|
|
3830
3849
|
d && (i = d[0], ia(n, na([0, 1], d)));
|
|
3831
3850
|
for (var c = 1, f = !0; c < n.length; c += 1) {
|
|
3832
|
-
var p = n[c], v =
|
|
3833
|
-
if ((v === '"' || v === "'" || v === "`" ||
|
|
3851
|
+
var p = n[c], v = Tt(p, 0, 1), S = Tt(p, -1);
|
|
3852
|
+
if ((v === '"' || v === "'" || v === "`" || S === '"' || S === "'" || S === "`") && v !== S)
|
|
3834
3853
|
throw new We("property names with quotes must have matching quotes");
|
|
3835
|
-
if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%",
|
|
3854
|
+
if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", Ot(Ne, s))
|
|
3836
3855
|
a = Ne[s];
|
|
3837
3856
|
else if (a != null) {
|
|
3838
3857
|
if (!(p in a)) {
|
|
@@ -3840,18 +3859,18 @@ var ra = function t(e) {
|
|
|
3840
3859
|
throw new ze("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3841
3860
|
return;
|
|
3842
3861
|
}
|
|
3843
|
-
if (
|
|
3844
|
-
var m =
|
|
3862
|
+
if (Pe && c + 1 >= n.length) {
|
|
3863
|
+
var m = Pe(a, p);
|
|
3845
3864
|
f = !!m, f && "get" in m && !("originalValue" in m.get) ? a = m.get : a = a[p];
|
|
3846
3865
|
} else
|
|
3847
|
-
f =
|
|
3866
|
+
f = Ot(a, p), a = a[p];
|
|
3848
3867
|
f && !u && (Ne[s] = a);
|
|
3849
3868
|
}
|
|
3850
3869
|
}
|
|
3851
3870
|
return a;
|
|
3852
|
-
}, oi = { exports: {} },
|
|
3871
|
+
}, oi = { exports: {} }, Kt, pn;
|
|
3853
3872
|
function kr() {
|
|
3854
|
-
if (pn) return
|
|
3873
|
+
if (pn) return Kt;
|
|
3855
3874
|
pn = 1;
|
|
3856
3875
|
var t = at, e = t("%Object.defineProperty%", !0) || !1;
|
|
3857
3876
|
if (e)
|
|
@@ -3860,7 +3879,7 @@ function kr() {
|
|
|
3860
3879
|
} catch {
|
|
3861
3880
|
e = !1;
|
|
3862
3881
|
}
|
|
3863
|
-
return
|
|
3882
|
+
return Kt = e, Kt;
|
|
3864
3883
|
}
|
|
3865
3884
|
var da = at, gt = da("%Object.getOwnPropertyDescriptor%", !0);
|
|
3866
3885
|
if (gt)
|
|
@@ -3869,7 +3888,7 @@ if (gt)
|
|
|
3869
3888
|
} catch {
|
|
3870
3889
|
gt = null;
|
|
3871
3890
|
}
|
|
3872
|
-
var
|
|
3891
|
+
var Mt = gt, hn = kr(), la = ni, Ue = Bt, yn = Mt, fa = function(e, r, n) {
|
|
3873
3892
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3874
3893
|
throw new Ue("`obj` must be an object or a function`");
|
|
3875
3894
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3906,7 +3925,7 @@ si.hasArrayLengthDefineBug = function() {
|
|
|
3906
3925
|
return !0;
|
|
3907
3926
|
}
|
|
3908
3927
|
};
|
|
3909
|
-
var pa = si, ha = at, mn = fa, ya = pa(), gn =
|
|
3928
|
+
var pa = si, ha = at, mn = fa, ya = pa(), gn = Mt, bn = Bt, ma = ha("%Math.floor%"), ga = function(e, r) {
|
|
3910
3929
|
if (typeof e != "function")
|
|
3911
3930
|
throw new bn("`fn` is not a function");
|
|
3912
3931
|
if (typeof r != "number" || r < 0 || r > 4294967295 || ma(r) !== r)
|
|
@@ -3931,7 +3950,7 @@ var pa = si, ha = at, mn = fa, ya = pa(), gn = Bt, bn = $t, ma = ha("%Math.floor
|
|
|
3931
3950
|
)), e;
|
|
3932
3951
|
};
|
|
3933
3952
|
(function(t) {
|
|
3934
|
-
var e = _r, r = at, n = ga, i =
|
|
3953
|
+
var e = _r, r = at, n = ga, i = Bt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = kr(), d = r("%Math.max%");
|
|
3935
3954
|
t.exports = function(p) {
|
|
3936
3955
|
if (typeof p != "function")
|
|
3937
3956
|
throw new i("a function is required");
|
|
@@ -3947,25 +3966,25 @@ var pa = si, ha = at, mn = fa, ya = pa(), gn = Bt, bn = $t, ma = ha("%Math.floor
|
|
|
3947
3966
|
};
|
|
3948
3967
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3949
3968
|
})(oi);
|
|
3950
|
-
var
|
|
3969
|
+
var Cr = oi.exports, ai = at, ui = Cr, ba = ui(ai("String.prototype.indexOf")), Lr = function(e, r) {
|
|
3951
3970
|
var n = ai(e, !!r);
|
|
3952
3971
|
return typeof n == "function" && ba(e, ".prototype.") > -1 ? ui(n) : n;
|
|
3953
|
-
}, va =
|
|
3972
|
+
}, va = $t(), Sa = Lr, fr = Sa("Object.prototype.toString"), Ut = function(e) {
|
|
3954
3973
|
return va && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : fr(e) === "[object Arguments]";
|
|
3955
3974
|
}, ci = function(e) {
|
|
3956
|
-
return
|
|
3975
|
+
return Ut(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && fr(e) !== "[object Array]" && fr(e.callee) === "[object Function]";
|
|
3957
3976
|
}, wa = function() {
|
|
3958
|
-
return
|
|
3977
|
+
return Ut(arguments);
|
|
3959
3978
|
}();
|
|
3960
|
-
|
|
3961
|
-
var Aa = wa ?
|
|
3979
|
+
Ut.isLegacyArguments = ci;
|
|
3980
|
+
var Aa = wa ? Ut : ci, Ea = Object.prototype.toString, Ia = Function.prototype.toString, Oa = /^\s*(?:function)?\*/, di = $t(), zt = Object.getPrototypeOf, Ta = function() {
|
|
3962
3981
|
if (!di)
|
|
3963
3982
|
return !1;
|
|
3964
3983
|
try {
|
|
3965
3984
|
return Function("return function*() {}")();
|
|
3966
3985
|
} catch {
|
|
3967
3986
|
}
|
|
3968
|
-
},
|
|
3987
|
+
}, Ht, _a = function(e) {
|
|
3969
3988
|
if (typeof e != "function")
|
|
3970
3989
|
return !1;
|
|
3971
3990
|
if (Oa.test(Ia.call(e)))
|
|
@@ -3974,13 +3993,13 @@ var Aa = wa ? Mt : ci, Ea = Object.prototype.toString, Ia = Function.prototype.t
|
|
|
3974
3993
|
var r = Ea.call(e);
|
|
3975
3994
|
return r === "[object GeneratorFunction]";
|
|
3976
3995
|
}
|
|
3977
|
-
if (!
|
|
3996
|
+
if (!zt)
|
|
3978
3997
|
return !1;
|
|
3979
|
-
if (typeof
|
|
3998
|
+
if (typeof Ht > "u") {
|
|
3980
3999
|
var n = Ta();
|
|
3981
|
-
|
|
4000
|
+
Ht = n ? zt(n) : !1;
|
|
3982
4001
|
}
|
|
3983
|
-
return
|
|
4002
|
+
return zt(e) === Ht;
|
|
3984
4003
|
}, li = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, pr, bt;
|
|
3985
4004
|
if (typeof xe == "function" && typeof Object.defineProperty == "function")
|
|
3986
4005
|
try {
|
|
@@ -4003,13 +4022,13 @@ var ka = /^\s*class\b/, hr = function(e) {
|
|
|
4003
4022
|
} catch {
|
|
4004
4023
|
return !1;
|
|
4005
4024
|
}
|
|
4006
|
-
},
|
|
4025
|
+
}, Wt = function(e) {
|
|
4007
4026
|
try {
|
|
4008
4027
|
return hr(e) ? !1 : (li.call(e), !0);
|
|
4009
4028
|
} catch {
|
|
4010
4029
|
return !1;
|
|
4011
4030
|
}
|
|
4012
|
-
}, vt = Object.prototype.toString,
|
|
4031
|
+
}, vt = Object.prototype.toString, Ca = "[object Object]", La = "[object Function]", Pa = "[object GeneratorFunction]", Na = "[object HTMLAllCollection]", Da = "[object HTML document.all class]", Fa = "[object HTMLCollection]", Ra = typeof Symbol == "function" && !!Symbol.toStringTag, Va = !(0 in [,]), yr = function() {
|
|
4013
4032
|
return !1;
|
|
4014
4033
|
};
|
|
4015
4034
|
if (typeof document == "object") {
|
|
@@ -4018,7 +4037,7 @@ if (typeof document == "object") {
|
|
|
4018
4037
|
if ((Va || !e) && (typeof e > "u" || typeof e == "object"))
|
|
4019
4038
|
try {
|
|
4020
4039
|
var r = vt.call(e);
|
|
4021
|
-
return (r === Na || r === Da || r === Fa || r ===
|
|
4040
|
+
return (r === Na || r === Da || r === Fa || r === Ca) && e("") == null;
|
|
4022
4041
|
} catch {
|
|
4023
4042
|
}
|
|
4024
4043
|
return !1;
|
|
@@ -4035,18 +4054,18 @@ var Ba = xe ? function(e) {
|
|
|
4035
4054
|
if (r !== bt)
|
|
4036
4055
|
return !1;
|
|
4037
4056
|
}
|
|
4038
|
-
return !hr(e) &&
|
|
4057
|
+
return !hr(e) && Wt(e);
|
|
4039
4058
|
} : function(e) {
|
|
4040
4059
|
if (yr(e))
|
|
4041
4060
|
return !0;
|
|
4042
4061
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
4043
4062
|
return !1;
|
|
4044
4063
|
if (Ra)
|
|
4045
|
-
return
|
|
4064
|
+
return Wt(e);
|
|
4046
4065
|
if (hr(e))
|
|
4047
4066
|
return !1;
|
|
4048
4067
|
var r = vt.call(e);
|
|
4049
|
-
return r !==
|
|
4068
|
+
return r !== La && r !== Pa && !/^\[object HTML/.test(r) ? !1 : Wt(e);
|
|
4050
4069
|
}, Ma = Ba, Ua = Object.prototype.toString, fi = Object.prototype.hasOwnProperty, qa = function(e, r, n) {
|
|
4051
4070
|
for (var i = 0, o = e.length; i < o; i++)
|
|
4052
4071
|
fi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
@@ -4073,33 +4092,33 @@ var Ba = xe ? function(e) {
|
|
|
4073
4092
|
"Uint32Array",
|
|
4074
4093
|
"BigInt64Array",
|
|
4075
4094
|
"BigUint64Array"
|
|
4076
|
-
],
|
|
4077
|
-
for (var e = [], r = 0; r <
|
|
4078
|
-
typeof Ka[
|
|
4095
|
+
], Yt = Ga, Ka = typeof globalThis > "u" ? Er : globalThis, hi = function() {
|
|
4096
|
+
for (var e = [], r = 0; r < Yt.length; r++)
|
|
4097
|
+
typeof Ka[Yt[r]] == "function" && (e[e.length] = Yt[r]);
|
|
4079
4098
|
return e;
|
|
4080
|
-
},
|
|
4099
|
+
}, _t = pi, za = hi, vn = Cr, Pr = Lr, St = Mt, Ha = Pr("Object.prototype.toString"), yi = $t(), Sn = typeof globalThis > "u" ? Er : globalThis, mr = za(), Nr = Pr("String.prototype.slice"), Jt = Object.getPrototypeOf, Wa = Pr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
4081
4100
|
for (var n = 0; n < e.length; n += 1)
|
|
4082
4101
|
if (e[n] === r)
|
|
4083
4102
|
return n;
|
|
4084
4103
|
return -1;
|
|
4085
|
-
},
|
|
4086
|
-
yi && St &&
|
|
4104
|
+
}, kt = { __proto__: null };
|
|
4105
|
+
yi && St && Jt ? _t(mr, function(t) {
|
|
4087
4106
|
var e = new Sn[t]();
|
|
4088
4107
|
if (Symbol.toStringTag in e) {
|
|
4089
|
-
var r =
|
|
4108
|
+
var r = Jt(e), n = St(r, Symbol.toStringTag);
|
|
4090
4109
|
if (!n) {
|
|
4091
|
-
var i =
|
|
4110
|
+
var i = Jt(r);
|
|
4092
4111
|
n = St(i, Symbol.toStringTag);
|
|
4093
4112
|
}
|
|
4094
|
-
|
|
4113
|
+
kt["$" + t] = vn(n.get);
|
|
4095
4114
|
}
|
|
4096
|
-
}) :
|
|
4115
|
+
}) : _t(mr, function(t) {
|
|
4097
4116
|
var e = new Sn[t](), r = e.slice || e.set;
|
|
4098
|
-
r && (
|
|
4117
|
+
r && (kt["$" + t] = vn(r));
|
|
4099
4118
|
});
|
|
4100
4119
|
var Ya = function(e) {
|
|
4101
4120
|
var r = !1;
|
|
4102
|
-
return
|
|
4121
|
+
return _t(kt, function(n, i) {
|
|
4103
4122
|
if (!r)
|
|
4104
4123
|
try {
|
|
4105
4124
|
"$" + n(e) === i && (r = Nr(i, 1));
|
|
@@ -4108,7 +4127,7 @@ var Ya = function(e) {
|
|
|
4108
4127
|
}), r;
|
|
4109
4128
|
}, Ja = function(e) {
|
|
4110
4129
|
var r = !1;
|
|
4111
|
-
return
|
|
4130
|
+
return _t(kt, function(n, i) {
|
|
4112
4131
|
if (!r)
|
|
4113
4132
|
try {
|
|
4114
4133
|
n(e), r = Nr(i, 1);
|
|
@@ -4123,33 +4142,33 @@ var Ya = function(e) {
|
|
|
4123
4142
|
return Wa(mr, r) > -1 ? r : r !== "Object" ? !1 : Ja(e);
|
|
4124
4143
|
}
|
|
4125
4144
|
return St ? Ya(e) : null;
|
|
4126
|
-
},
|
|
4145
|
+
}, Ct = pi, Za = hi, wn = Cr, Dr = Lr, wt = Mt, eu = Dr("Object.prototype.toString"), mi = $t(), An = typeof globalThis > "u" ? Er : globalThis, gr = Za(), Fr = Dr("String.prototype.slice"), Xt = Object.getPrototypeOf, tu = Dr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
4127
4146
|
for (var n = 0; n < e.length; n += 1)
|
|
4128
4147
|
if (e[n] === r)
|
|
4129
4148
|
return n;
|
|
4130
4149
|
return -1;
|
|
4131
|
-
},
|
|
4132
|
-
mi && wt &&
|
|
4150
|
+
}, Lt = { __proto__: null };
|
|
4151
|
+
mi && wt && Xt ? Ct(gr, function(t) {
|
|
4133
4152
|
var e = new An[t]();
|
|
4134
4153
|
if (Symbol.toStringTag in e) {
|
|
4135
|
-
var r =
|
|
4154
|
+
var r = Xt(e), n = wt(r, Symbol.toStringTag);
|
|
4136
4155
|
if (!n) {
|
|
4137
|
-
var i =
|
|
4156
|
+
var i = Xt(r);
|
|
4138
4157
|
n = wt(i, Symbol.toStringTag);
|
|
4139
4158
|
}
|
|
4140
|
-
|
|
4159
|
+
Lt["$" + t] = wn(n.get);
|
|
4141
4160
|
}
|
|
4142
|
-
}) :
|
|
4161
|
+
}) : Ct(gr, function(t) {
|
|
4143
4162
|
var e = new An[t](), r = e.slice || e.set;
|
|
4144
|
-
r && (
|
|
4163
|
+
r && (Lt["$" + t] = wn(r));
|
|
4145
4164
|
});
|
|
4146
4165
|
var ru = function(e) {
|
|
4147
4166
|
var r = !1;
|
|
4148
|
-
return
|
|
4167
|
+
return Ct(
|
|
4149
4168
|
// eslint-disable-next-line no-extra-parens
|
|
4150
4169
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
4151
4170
|
/** @type {any} */
|
|
4152
|
-
|
|
4171
|
+
Lt,
|
|
4153
4172
|
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
4154
4173
|
function(n, i) {
|
|
4155
4174
|
if (!r)
|
|
@@ -4161,11 +4180,11 @@ var ru = function(e) {
|
|
|
4161
4180
|
), r;
|
|
4162
4181
|
}, nu = function(e) {
|
|
4163
4182
|
var r = !1;
|
|
4164
|
-
return
|
|
4183
|
+
return Ct(
|
|
4165
4184
|
// eslint-disable-next-line no-extra-parens
|
|
4166
4185
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
4167
4186
|
/** @type {any} */
|
|
4168
|
-
|
|
4187
|
+
Lt,
|
|
4169
4188
|
/** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
4170
4189
|
function(n, i) {
|
|
4171
4190
|
if (!r)
|
|
@@ -4196,7 +4215,7 @@ var ru = function(e) {
|
|
|
4196
4215
|
var p = o(BigInt.prototype.valueOf);
|
|
4197
4216
|
if (a)
|
|
4198
4217
|
var v = o(Symbol.prototype.valueOf);
|
|
4199
|
-
function
|
|
4218
|
+
function S(y, Ei) {
|
|
4200
4219
|
if (typeof y != "object")
|
|
4201
4220
|
return !1;
|
|
4202
4221
|
try {
|
|
@@ -4214,10 +4233,10 @@ var ru = function(e) {
|
|
|
4214
4233
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
|
|
4215
4234
|
}
|
|
4216
4235
|
t.isArrayBufferView = g;
|
|
4217
|
-
function
|
|
4236
|
+
function w(y) {
|
|
4218
4237
|
return n(y) === "Uint8Array";
|
|
4219
4238
|
}
|
|
4220
|
-
t.isUint8Array =
|
|
4239
|
+
t.isUint8Array = w;
|
|
4221
4240
|
function D(y) {
|
|
4222
4241
|
return n(y) === "Uint8ClampedArray";
|
|
4223
4242
|
}
|
|
@@ -4230,10 +4249,10 @@ var ru = function(e) {
|
|
|
4230
4249
|
return n(y) === "Uint32Array";
|
|
4231
4250
|
}
|
|
4232
4251
|
t.isUint32Array = ne;
|
|
4233
|
-
function
|
|
4252
|
+
function P(y) {
|
|
4234
4253
|
return n(y) === "Int8Array";
|
|
4235
4254
|
}
|
|
4236
|
-
t.isInt8Array =
|
|
4255
|
+
t.isInt8Array = P;
|
|
4237
4256
|
function V(y) {
|
|
4238
4257
|
return n(y) === "Int16Array";
|
|
4239
4258
|
}
|
|
@@ -4262,10 +4281,10 @@ var ru = function(e) {
|
|
|
4262
4281
|
return u(y) === "[object Map]";
|
|
4263
4282
|
}
|
|
4264
4283
|
he.working = typeof Map < "u" && he(/* @__PURE__ */ new Map());
|
|
4265
|
-
function
|
|
4284
|
+
function qt(y) {
|
|
4266
4285
|
return typeof Map > "u" ? !1 : he.working ? he(y) : y instanceof Map;
|
|
4267
4286
|
}
|
|
4268
|
-
t.isMap =
|
|
4287
|
+
t.isMap = qt;
|
|
4269
4288
|
function Ie(y) {
|
|
4270
4289
|
return u(y) === "[object Set]";
|
|
4271
4290
|
}
|
|
@@ -4278,10 +4297,10 @@ var ru = function(e) {
|
|
|
4278
4297
|
return u(y) === "[object WeakMap]";
|
|
4279
4298
|
}
|
|
4280
4299
|
Fe.working = typeof WeakMap < "u" && Fe(/* @__PURE__ */ new WeakMap());
|
|
4281
|
-
function
|
|
4300
|
+
function jt(y) {
|
|
4282
4301
|
return typeof WeakMap > "u" ? !1 : Fe.working ? Fe(y) : y instanceof WeakMap;
|
|
4283
4302
|
}
|
|
4284
|
-
t.isWeakMap =
|
|
4303
|
+
t.isWeakMap = jt;
|
|
4285
4304
|
function Re(y) {
|
|
4286
4305
|
return u(y) === "[object WeakSet]";
|
|
4287
4306
|
}
|
|
@@ -4310,14 +4329,14 @@ var ru = function(e) {
|
|
|
4310
4329
|
function A(y) {
|
|
4311
4330
|
return u(y) === "[object SharedArrayBuffer]";
|
|
4312
4331
|
}
|
|
4313
|
-
function
|
|
4332
|
+
function C(y) {
|
|
4314
4333
|
return typeof b > "u" ? !1 : (typeof A.working > "u" && (A.working = A(new b())), A.working ? A(y) : y instanceof b);
|
|
4315
4334
|
}
|
|
4316
|
-
t.isSharedArrayBuffer =
|
|
4317
|
-
function
|
|
4335
|
+
t.isSharedArrayBuffer = C;
|
|
4336
|
+
function L(y) {
|
|
4318
4337
|
return u(y) === "[object AsyncFunction]";
|
|
4319
4338
|
}
|
|
4320
|
-
t.isAsyncFunction =
|
|
4339
|
+
t.isAsyncFunction = L;
|
|
4321
4340
|
function O(y) {
|
|
4322
4341
|
return u(y) === "[object Map Iterator]";
|
|
4323
4342
|
}
|
|
@@ -4335,23 +4354,23 @@ var ru = function(e) {
|
|
|
4335
4354
|
}
|
|
4336
4355
|
t.isWebAssemblyCompiledModule = Y;
|
|
4337
4356
|
function _e(y) {
|
|
4338
|
-
return
|
|
4357
|
+
return S(y, d);
|
|
4339
4358
|
}
|
|
4340
4359
|
t.isNumberObject = _e;
|
|
4341
4360
|
function ct(y) {
|
|
4342
|
-
return
|
|
4361
|
+
return S(y, c);
|
|
4343
4362
|
}
|
|
4344
4363
|
t.isStringObject = ct;
|
|
4345
4364
|
function $e(y) {
|
|
4346
|
-
return
|
|
4365
|
+
return S(y, f);
|
|
4347
4366
|
}
|
|
4348
4367
|
t.isBooleanObject = $e;
|
|
4349
4368
|
function dt(y) {
|
|
4350
|
-
return s &&
|
|
4369
|
+
return s && S(y, p);
|
|
4351
4370
|
}
|
|
4352
4371
|
t.isBigIntObject = dt;
|
|
4353
4372
|
function $r(y) {
|
|
4354
|
-
return a &&
|
|
4373
|
+
return a && S(y, v);
|
|
4355
4374
|
}
|
|
4356
4375
|
t.isSymbolObject = $r;
|
|
4357
4376
|
function wi(y) {
|
|
@@ -4359,7 +4378,7 @@ var ru = function(e) {
|
|
|
4359
4378
|
}
|
|
4360
4379
|
t.isBoxedPrimitive = wi;
|
|
4361
4380
|
function Ai(y) {
|
|
4362
|
-
return typeof Uint8Array < "u" && (ut(y) ||
|
|
4381
|
+
return typeof Uint8Array < "u" && (ut(y) || C(y));
|
|
4363
4382
|
}
|
|
4364
4383
|
t.isAnyArrayBuffer = Ai, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
4365
4384
|
Object.defineProperty(t, y, {
|
|
@@ -4393,19 +4412,19 @@ typeof Object.create == "function" ? br.exports = function(e, r) {
|
|
|
4393
4412
|
var uu = br.exports;
|
|
4394
4413
|
(function(t) {
|
|
4395
4414
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
4396
|
-
for (var b = Object.keys(h), A = {},
|
|
4397
|
-
A[b[
|
|
4415
|
+
for (var b = Object.keys(h), A = {}, C = 0; C < b.length; C++)
|
|
4416
|
+
A[b[C]] = Object.getOwnPropertyDescriptor(h, b[C]);
|
|
4398
4417
|
return A;
|
|
4399
4418
|
}, r = /%[sdj%]/g;
|
|
4400
4419
|
t.format = function(l) {
|
|
4401
|
-
if (!
|
|
4420
|
+
if (!P(l)) {
|
|
4402
4421
|
for (var h = [], b = 0; b < arguments.length; b++)
|
|
4403
4422
|
h.push(s(arguments[b]));
|
|
4404
4423
|
return h.join(" ");
|
|
4405
4424
|
}
|
|
4406
|
-
for (var b = 1, A = arguments,
|
|
4425
|
+
for (var b = 1, A = arguments, C = A.length, L = String(l).replace(r, function(k) {
|
|
4407
4426
|
if (k === "%%") return "%";
|
|
4408
|
-
if (b >=
|
|
4427
|
+
if (b >= C) return k;
|
|
4409
4428
|
switch (k) {
|
|
4410
4429
|
case "%s":
|
|
4411
4430
|
return String(A[b++]);
|
|
@@ -4420,9 +4439,9 @@ var uu = br.exports;
|
|
|
4420
4439
|
default:
|
|
4421
4440
|
return k;
|
|
4422
4441
|
}
|
|
4423
|
-
}), O = A[b]; b <
|
|
4424
|
-
D(O) || !ue(O) ?
|
|
4425
|
-
return
|
|
4442
|
+
}), O = A[b]; b < C; O = A[++b])
|
|
4443
|
+
D(O) || !ue(O) ? L += " " + O : L += " " + s(O);
|
|
4444
|
+
return L;
|
|
4426
4445
|
}, t.deprecate = function(l, h) {
|
|
4427
4446
|
if (typeof E < "u" && E.noDeprecation === !0)
|
|
4428
4447
|
return l;
|
|
@@ -4464,7 +4483,7 @@ var uu = br.exports;
|
|
|
4464
4483
|
seen: [],
|
|
4465
4484
|
stylize: u
|
|
4466
4485
|
};
|
|
4467
|
-
return arguments.length >= 3 && (b.depth = arguments[2]), arguments.length >= 4 && (b.colors = arguments[3]),
|
|
4486
|
+
return arguments.length >= 3 && (b.depth = arguments[2]), arguments.length >= 4 && (b.colors = arguments[3]), w(h) ? b.showHidden = h : h && t._extend(b, h), _(b.showHidden) && (b.showHidden = !1), _(b.depth) && (b.depth = 2), _(b.colors) && (b.colors = !1), _(b.customInspect) && (b.customInspect = !0), b.colors && (b.stylize = a), c(b, l, b.depth);
|
|
4468
4487
|
}
|
|
4469
4488
|
t.inspect = s, s.colors = {
|
|
4470
4489
|
bold: [1, 22],
|
|
@@ -4509,15 +4528,15 @@ var uu = br.exports;
|
|
|
4509
4528
|
h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
4510
4529
|
!(h.constructor && h.constructor.prototype === h)) {
|
|
4511
4530
|
var A = h.inspect(b, l);
|
|
4512
|
-
return
|
|
4531
|
+
return P(A) || (A = c(l, A, b)), A;
|
|
4513
4532
|
}
|
|
4514
|
-
var
|
|
4515
|
-
if (
|
|
4516
|
-
return
|
|
4517
|
-
var
|
|
4518
|
-
if (l.showHidden && (
|
|
4533
|
+
var C = f(l, h);
|
|
4534
|
+
if (C)
|
|
4535
|
+
return C;
|
|
4536
|
+
var L = Object.keys(h), O = d(L);
|
|
4537
|
+
if (l.showHidden && (L = Object.getOwnPropertyNames(h)), Te(h) && (L.indexOf("message") >= 0 || L.indexOf("description") >= 0))
|
|
4519
4538
|
return p(h);
|
|
4520
|
-
if (
|
|
4539
|
+
if (L.length === 0) {
|
|
4521
4540
|
if (he(h)) {
|
|
4522
4541
|
var k = h.name ? ": " + h.name : "";
|
|
4523
4542
|
return l.stylize("[Function" + k + "]", "special");
|
|
@@ -4534,26 +4553,26 @@ var uu = br.exports;
|
|
|
4534
4553
|
var ct = h.name ? ": " + h.name : "";
|
|
4535
4554
|
F = " [Function" + ct + "]";
|
|
4536
4555
|
}
|
|
4537
|
-
if (ae(h) && (F = " " + RegExp.prototype.toString.call(h)), De(h) && (F = " " + Date.prototype.toUTCString.call(h)), Te(h) && (F = " " + p(h)),
|
|
4556
|
+
if (ae(h) && (F = " " + RegExp.prototype.toString.call(h)), De(h) && (F = " " + Date.prototype.toUTCString.call(h)), Te(h) && (F = " " + p(h)), L.length === 0 && (!Y || h.length == 0))
|
|
4538
4557
|
return _e[0] + F + _e[1];
|
|
4539
4558
|
if (b < 0)
|
|
4540
4559
|
return ae(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
|
|
4541
4560
|
l.seen.push(h);
|
|
4542
4561
|
var $e;
|
|
4543
|
-
return Y ? $e = v(l, h, b, O,
|
|
4544
|
-
return
|
|
4562
|
+
return Y ? $e = v(l, h, b, O, L) : $e = L.map(function(dt) {
|
|
4563
|
+
return S(l, h, b, O, dt, Y);
|
|
4545
4564
|
}), l.seen.pop(), m($e, F, _e);
|
|
4546
4565
|
}
|
|
4547
4566
|
function f(l, h) {
|
|
4548
4567
|
if (_(h))
|
|
4549
4568
|
return l.stylize("undefined", "undefined");
|
|
4550
|
-
if (
|
|
4569
|
+
if (P(h)) {
|
|
4551
4570
|
var b = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4552
4571
|
return l.stylize(b, "string");
|
|
4553
4572
|
}
|
|
4554
4573
|
if (ne(h))
|
|
4555
4574
|
return l.stylize("" + h, "number");
|
|
4556
|
-
if (
|
|
4575
|
+
if (w(h))
|
|
4557
4576
|
return l.stylize("" + h, "boolean");
|
|
4558
4577
|
if (D(h))
|
|
4559
4578
|
return l.stylize("null", "null");
|
|
@@ -4561,18 +4580,18 @@ var uu = br.exports;
|
|
|
4561
4580
|
function p(l) {
|
|
4562
4581
|
return "[" + Error.prototype.toString.call(l) + "]";
|
|
4563
4582
|
}
|
|
4564
|
-
function v(l, h, b, A,
|
|
4565
|
-
for (var
|
|
4566
|
-
Re(h, String(O)) ?
|
|
4583
|
+
function v(l, h, b, A, C) {
|
|
4584
|
+
for (var L = [], O = 0, k = h.length; O < k; ++O)
|
|
4585
|
+
Re(h, String(O)) ? L.push(S(
|
|
4567
4586
|
l,
|
|
4568
4587
|
h,
|
|
4569
4588
|
b,
|
|
4570
4589
|
A,
|
|
4571
4590
|
String(O),
|
|
4572
4591
|
!0
|
|
4573
|
-
)) :
|
|
4574
|
-
return
|
|
4575
|
-
F.match(/^\d+$/) ||
|
|
4592
|
+
)) : L.push("");
|
|
4593
|
+
return C.forEach(function(F) {
|
|
4594
|
+
F.match(/^\d+$/) || L.push(S(
|
|
4576
4595
|
l,
|
|
4577
4596
|
h,
|
|
4578
4597
|
b,
|
|
@@ -4580,12 +4599,12 @@ var uu = br.exports;
|
|
|
4580
4599
|
F,
|
|
4581
4600
|
!0
|
|
4582
4601
|
));
|
|
4583
|
-
}),
|
|
4602
|
+
}), L;
|
|
4584
4603
|
}
|
|
4585
|
-
function
|
|
4604
|
+
function S(l, h, b, A, C, L) {
|
|
4586
4605
|
var O, k, F;
|
|
4587
|
-
if (F = Object.getOwnPropertyDescriptor(h,
|
|
4588
|
-
`) > -1 && (
|
|
4606
|
+
if (F = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, F.get ? F.set ? k = l.stylize("[Getter/Setter]", "special") : k = l.stylize("[Getter]", "special") : F.set && (k = l.stylize("[Setter]", "special")), Re(A, C) || (O = "[" + C + "]"), k || (l.seen.indexOf(F.value) < 0 ? (D(b) ? k = c(l, F.value, null) : k = c(l, F.value, b - 1), k.indexOf(`
|
|
4607
|
+
`) > -1 && (L ? k = k.split(`
|
|
4589
4608
|
`).map(function(Y) {
|
|
4590
4609
|
return " " + Y;
|
|
4591
4610
|
}).join(`
|
|
@@ -4595,16 +4614,16 @@ var uu = br.exports;
|
|
|
4595
4614
|
return " " + Y;
|
|
4596
4615
|
}).join(`
|
|
4597
4616
|
`))) : k = l.stylize("[Circular]", "special")), _(O)) {
|
|
4598
|
-
if (
|
|
4617
|
+
if (L && C.match(/^\d+$/))
|
|
4599
4618
|
return k;
|
|
4600
|
-
O = JSON.stringify("" +
|
|
4619
|
+
O = JSON.stringify("" + C), O.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (O = O.slice(1, -1), O = l.stylize(O, "name")) : (O = O.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), O = l.stylize(O, "string"));
|
|
4601
4620
|
}
|
|
4602
4621
|
return O + ": " + k;
|
|
4603
4622
|
}
|
|
4604
4623
|
function m(l, h, b) {
|
|
4605
|
-
var A = l.reduce(function(
|
|
4606
|
-
return
|
|
4607
|
-
`) >= 0,
|
|
4624
|
+
var A = l.reduce(function(C, L) {
|
|
4625
|
+
return L.indexOf(`
|
|
4626
|
+
`) >= 0, C + L.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
4608
4627
|
}, 0);
|
|
4609
4628
|
return A > 60 ? b[0] + (h === "" ? "" : h + `
|
|
4610
4629
|
`) + " " + l.join(`,
|
|
@@ -4615,10 +4634,10 @@ var uu = br.exports;
|
|
|
4615
4634
|
return Array.isArray(l);
|
|
4616
4635
|
}
|
|
4617
4636
|
t.isArray = g;
|
|
4618
|
-
function
|
|
4637
|
+
function w(l) {
|
|
4619
4638
|
return typeof l == "boolean";
|
|
4620
4639
|
}
|
|
4621
|
-
t.isBoolean =
|
|
4640
|
+
t.isBoolean = w;
|
|
4622
4641
|
function D(l) {
|
|
4623
4642
|
return l === null;
|
|
4624
4643
|
}
|
|
@@ -4631,10 +4650,10 @@ var uu = br.exports;
|
|
|
4631
4650
|
return typeof l == "number";
|
|
4632
4651
|
}
|
|
4633
4652
|
t.isNumber = ne;
|
|
4634
|
-
function
|
|
4653
|
+
function P(l) {
|
|
4635
4654
|
return typeof l == "string";
|
|
4636
4655
|
}
|
|
4637
|
-
t.isString =
|
|
4656
|
+
t.isString = P;
|
|
4638
4657
|
function V(l) {
|
|
4639
4658
|
return typeof l == "symbol";
|
|
4640
4659
|
}
|
|
@@ -4663,11 +4682,11 @@ var uu = br.exports;
|
|
|
4663
4682
|
return typeof l == "function";
|
|
4664
4683
|
}
|
|
4665
4684
|
t.isFunction = he;
|
|
4666
|
-
function
|
|
4685
|
+
function qt(l) {
|
|
4667
4686
|
return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
|
|
4668
4687
|
typeof l > "u";
|
|
4669
4688
|
}
|
|
4670
|
-
t.isPrimitive =
|
|
4689
|
+
t.isPrimitive = qt, t.isBuffer = au;
|
|
4671
4690
|
function Ie(l) {
|
|
4672
4691
|
return Object.prototype.toString.call(l);
|
|
4673
4692
|
}
|
|
@@ -4688,7 +4707,7 @@ var uu = br.exports;
|
|
|
4688
4707
|
"Nov",
|
|
4689
4708
|
"Dec"
|
|
4690
4709
|
];
|
|
4691
|
-
function
|
|
4710
|
+
function jt() {
|
|
4692
4711
|
var l = /* @__PURE__ */ new Date(), h = [
|
|
4693
4712
|
Ze(l.getHours()),
|
|
4694
4713
|
Ze(l.getMinutes()),
|
|
@@ -4697,7 +4716,7 @@ var uu = br.exports;
|
|
|
4697
4716
|
return [l.getDate(), Fe[l.getMonth()], h].join(" ");
|
|
4698
4717
|
}
|
|
4699
4718
|
t.log = function() {
|
|
4700
|
-
console.log("%s - %s",
|
|
4719
|
+
console.log("%s - %s", jt(), t.format.apply(t, arguments));
|
|
4701
4720
|
}, t.inherits = uu, t._extend = function(l, h) {
|
|
4702
4721
|
if (!h || !ue(h)) return l;
|
|
4703
4722
|
for (var b = Object.keys(h), A = b.length; A--; )
|
|
@@ -4723,19 +4742,19 @@ var uu = br.exports;
|
|
|
4723
4742
|
}), b;
|
|
4724
4743
|
}
|
|
4725
4744
|
function b() {
|
|
4726
|
-
for (var A,
|
|
4727
|
-
A = F,
|
|
4745
|
+
for (var A, C, L = new Promise(function(F, Y) {
|
|
4746
|
+
A = F, C = Y;
|
|
4728
4747
|
}), O = [], k = 0; k < arguments.length; k++)
|
|
4729
4748
|
O.push(arguments[k]);
|
|
4730
4749
|
O.push(function(F, Y) {
|
|
4731
|
-
F ?
|
|
4750
|
+
F ? C(F) : A(Y);
|
|
4732
4751
|
});
|
|
4733
4752
|
try {
|
|
4734
4753
|
h.apply(this, O);
|
|
4735
4754
|
} catch (F) {
|
|
4736
|
-
|
|
4755
|
+
C(F);
|
|
4737
4756
|
}
|
|
4738
|
-
return
|
|
4757
|
+
return L;
|
|
4739
4758
|
}
|
|
4740
4759
|
return Object.setPrototypeOf(b, Object.getPrototypeOf(h)), ye && Object.defineProperty(b, ye, {
|
|
4741
4760
|
value: b,
|
|
@@ -4760,11 +4779,11 @@ var uu = br.exports;
|
|
|
4760
4779
|
function h() {
|
|
4761
4780
|
for (var b = [], A = 0; A < arguments.length; A++)
|
|
4762
4781
|
b.push(arguments[A]);
|
|
4763
|
-
var
|
|
4764
|
-
if (typeof
|
|
4782
|
+
var C = b.pop();
|
|
4783
|
+
if (typeof C != "function")
|
|
4765
4784
|
throw new TypeError("The last argument must be of type Function");
|
|
4766
|
-
var
|
|
4767
|
-
return
|
|
4785
|
+
var L = this, O = function() {
|
|
4786
|
+
return C.apply(L, arguments);
|
|
4768
4787
|
};
|
|
4769
4788
|
l.apply(this, b).then(
|
|
4770
4789
|
function(k) {
|
|
@@ -4781,15 +4800,15 @@ var uu = br.exports;
|
|
|
4781
4800
|
), h;
|
|
4782
4801
|
}
|
|
4783
4802
|
t.callbackify = ut;
|
|
4784
|
-
})(
|
|
4785
|
-
const { inherits: cu, format:
|
|
4803
|
+
})(Vt);
|
|
4804
|
+
const { inherits: cu, format: Zt } = Vt;
|
|
4786
4805
|
function ke(t, e, r = Error) {
|
|
4787
4806
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
4788
4807
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
4789
4808
|
function n(i, o, s) {
|
|
4790
4809
|
if (!new.target)
|
|
4791
4810
|
return new n(i, o, s);
|
|
4792
|
-
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message =
|
|
4811
|
+
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = Zt(e, i, o, s) : i && o ? this.message = Zt(e, i, o) : i ? this.message = Zt(e, i) : this.message = e;
|
|
4793
4812
|
}
|
|
4794
4813
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
4795
4814
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
@@ -4843,12 +4862,12 @@ var gi = {
|
|
|
4843
4862
|
return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
4844
4863
|
}).join("");
|
|
4845
4864
|
};
|
|
4846
|
-
const lu = du, En = Symbol("avvio.TimeTree.untrackNode"),
|
|
4865
|
+
const lu = du, En = Symbol("avvio.TimeTree.untrackNode"), er = Symbol("avvio.TimeTree.trackNode"), In = Symbol("avvio.TimeTree.getParent"), On = Symbol("avvio.TimeTree.getNode"), Tn = Symbol("avvio.TimeTree.addNode");
|
|
4847
4866
|
let fu = class {
|
|
4848
4867
|
constructor() {
|
|
4849
4868
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4850
4869
|
}
|
|
4851
|
-
[
|
|
4870
|
+
[er](e) {
|
|
4852
4871
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4853
4872
|
}
|
|
4854
4873
|
[En](e) {
|
|
@@ -4876,7 +4895,7 @@ let fu = class {
|
|
|
4876
4895
|
label: r,
|
|
4877
4896
|
start: n,
|
|
4878
4897
|
nodes: []
|
|
4879
|
-
}, this[
|
|
4898
|
+
}, this[er](this.root), this.root.id;
|
|
4880
4899
|
const o = this[In](e), s = `${r}-${Math.random()}`, a = {
|
|
4881
4900
|
id: s,
|
|
4882
4901
|
parent: e,
|
|
@@ -4884,7 +4903,7 @@ let fu = class {
|
|
|
4884
4903
|
label: r,
|
|
4885
4904
|
nodes: []
|
|
4886
4905
|
};
|
|
4887
|
-
return o.nodes.push(a), this[
|
|
4906
|
+
return o.nodes.push(a), this[er](a), s;
|
|
4888
4907
|
}
|
|
4889
4908
|
start(e, r, n = Date.now()) {
|
|
4890
4909
|
return this[Tn](e, r, n);
|
|
@@ -4901,12 +4920,12 @@ let fu = class {
|
|
|
4901
4920
|
return lu(r);
|
|
4902
4921
|
}
|
|
4903
4922
|
};
|
|
4904
|
-
var pu = fu, Rr = { exports: {} }, vr = { exports: {} },
|
|
4923
|
+
var pu = fu, Rr = { exports: {} }, vr = { exports: {} }, tr, _n;
|
|
4905
4924
|
function hu() {
|
|
4906
|
-
if (_n) return
|
|
4925
|
+
if (_n) return tr;
|
|
4907
4926
|
_n = 1;
|
|
4908
4927
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4909
|
-
|
|
4928
|
+
tr = function(c, f) {
|
|
4910
4929
|
f = f || {};
|
|
4911
4930
|
var p = typeof c;
|
|
4912
4931
|
if (p === "string" && c.length > 0)
|
|
@@ -4978,10 +4997,10 @@ function hu() {
|
|
|
4978
4997
|
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";
|
|
4979
4998
|
}
|
|
4980
4999
|
function d(c, f, p, v) {
|
|
4981
|
-
var
|
|
4982
|
-
return Math.round(c / p) + " " + v + (
|
|
5000
|
+
var S = f >= p * 1.5;
|
|
5001
|
+
return Math.round(c / p) + " " + v + (S ? "s" : "");
|
|
4983
5002
|
}
|
|
4984
|
-
return
|
|
5003
|
+
return tr;
|
|
4985
5004
|
}
|
|
4986
5005
|
function yu(t) {
|
|
4987
5006
|
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = hu(), r.destroy = d, Object.keys(t).forEach((c) => {
|
|
@@ -4995,12 +5014,12 @@ function yu(t) {
|
|
|
4995
5014
|
}
|
|
4996
5015
|
r.selectColor = e;
|
|
4997
5016
|
function r(c) {
|
|
4998
|
-
let f, p = null, v,
|
|
5017
|
+
let f, p = null, v, S;
|
|
4999
5018
|
function m(...g) {
|
|
5000
5019
|
if (!m.enabled)
|
|
5001
5020
|
return;
|
|
5002
|
-
const
|
|
5003
|
-
|
|
5021
|
+
const w = m, D = Number(/* @__PURE__ */ new Date()), H = D - (f || D);
|
|
5022
|
+
w.diff = H, w.prev = f, w.curr = D, f = D, g[0] = r.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
|
|
5004
5023
|
let ne = 0;
|
|
5005
5024
|
g[0] = g[0].replace(/%([a-zA-Z%])/g, (V, _) => {
|
|
5006
5025
|
if (V === "%%")
|
|
@@ -5009,15 +5028,15 @@ function yu(t) {
|
|
|
5009
5028
|
const ae = r.formatters[_];
|
|
5010
5029
|
if (typeof ae == "function") {
|
|
5011
5030
|
const ue = g[ne];
|
|
5012
|
-
V = ae.call(
|
|
5031
|
+
V = ae.call(w, ue), g.splice(ne, 1), ne--;
|
|
5013
5032
|
}
|
|
5014
5033
|
return V;
|
|
5015
|
-
}), r.formatArgs.call(
|
|
5034
|
+
}), r.formatArgs.call(w, g), (w.log || r.log).apply(w, g);
|
|
5016
5035
|
}
|
|
5017
5036
|
return m.namespace = c, m.useColors = r.useColors(), m.color = r.selectColor(c), m.extend = n, m.destroy = r.destroy, Object.defineProperty(m, "enabled", {
|
|
5018
5037
|
enumerable: !0,
|
|
5019
5038
|
configurable: !1,
|
|
5020
|
-
get: () => p !== null ? p : (v !== r.namespaces && (v = r.namespaces,
|
|
5039
|
+
get: () => p !== null ? p : (v !== r.namespaces && (v = r.namespaces, S = r.enabled(c)), S),
|
|
5021
5040
|
set: (g) => {
|
|
5022
5041
|
p = g;
|
|
5023
5042
|
}
|
|
@@ -5199,9 +5218,9 @@ var mu = yu;
|
|
|
5199
5218
|
};
|
|
5200
5219
|
})(vr, vr.exports);
|
|
5201
5220
|
var bi = vr.exports;
|
|
5202
|
-
const gu = Gn, bu = ei.EventEmitter, vu =
|
|
5221
|
+
const gu = Gn, bu = ei.EventEmitter, vu = Vt.inherits, x = bi("avvio"), { AVV_ERR_READY_TIMEOUT: Su } = gi, rr = Symbol.for("plugin-meta");
|
|
5203
5222
|
function wu(t, e) {
|
|
5204
|
-
return t[
|
|
5223
|
+
return t[rr] && t[rr].name ? t[rr].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
5205
5224
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
5206
5225
|
}
|
|
5207
5226
|
function Au() {
|
|
@@ -5312,29 +5331,29 @@ function Iu() {
|
|
|
5312
5331
|
Rr.exports = Xe;
|
|
5313
5332
|
Rr.exports.loadPlugin = Vr;
|
|
5314
5333
|
var Ou = Rr.exports;
|
|
5315
|
-
const kn = Gn, Tu = ei.EventEmitter, _u =
|
|
5316
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
5334
|
+
const kn = Gn, Tu = ei.EventEmitter, _u = Vt.inherits, {
|
|
5335
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: nr,
|
|
5317
5336
|
AVV_ERR_CALLBACK_NOT_FN: nt,
|
|
5318
5337
|
AVV_ERR_PLUGIN_NOT_VALID: ku,
|
|
5319
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
5320
|
-
AVV_ERR_READY_TIMEOUT:
|
|
5321
|
-
} = gi,
|
|
5338
|
+
AVV_ERR_ROOT_PLG_BOOTED: Cu,
|
|
5339
|
+
AVV_ERR_READY_TIMEOUT: Lu
|
|
5340
|
+
} = gi, Pu = pu, Sr = Ou, Ye = bi("avvio"), Pt = Symbol("kAvvio"), ir = Symbol("kThenifyDoNotWrap");
|
|
5322
5341
|
function Nu(t, e, r) {
|
|
5323
5342
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
5324
5343
|
if (t[i])
|
|
5325
|
-
throw new
|
|
5344
|
+
throw new nr(i);
|
|
5326
5345
|
if (t[o])
|
|
5327
|
-
throw new
|
|
5346
|
+
throw new nr(o);
|
|
5328
5347
|
if (t[s])
|
|
5329
|
-
throw new
|
|
5348
|
+
throw new nr(s);
|
|
5330
5349
|
t[i] = function(d, c) {
|
|
5331
5350
|
return r.use(d, c), this;
|
|
5332
|
-
}, Object.defineProperty(t, "then", { get: vi.bind(r) }), t[
|
|
5333
|
-
return typeof d != "function" ? r._loadRegistered() : (r.after(
|
|
5351
|
+
}, Object.defineProperty(t, "then", { get: vi.bind(r) }), t[Pt] = !0, t[o] = function(d) {
|
|
5352
|
+
return typeof d != "function" ? r._loadRegistered() : (r.after(or(d, this)), this);
|
|
5334
5353
|
}, t[s] = function(d) {
|
|
5335
5354
|
if (d && typeof d != "function")
|
|
5336
5355
|
throw new nt(s, typeof d);
|
|
5337
|
-
return r.ready(d ?
|
|
5356
|
+
return r.ready(d ? or(d, this) : void 0);
|
|
5338
5357
|
}, t[a] = function(d) {
|
|
5339
5358
|
if (typeof d != "function")
|
|
5340
5359
|
throw new nt(a, typeof d);
|
|
@@ -5342,7 +5361,7 @@ function Nu(t, e, r) {
|
|
|
5342
5361
|
}, t[u] = function(d) {
|
|
5343
5362
|
if (d && typeof d != "function")
|
|
5344
5363
|
throw new nt(u, typeof d);
|
|
5345
|
-
return d ? (r.close(
|
|
5364
|
+
return d ? (r.close(or(d, this)), this) : r.close();
|
|
5346
5365
|
};
|
|
5347
5366
|
}
|
|
5348
5367
|
function z(t, e, r) {
|
|
@@ -5350,10 +5369,10 @@ function z(t, e, r) {
|
|
|
5350
5369
|
const n = new z(t, e, r);
|
|
5351
5370
|
return t && Nu(t, e, n), n;
|
|
5352
5371
|
}
|
|
5353
|
-
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
|
|
5354
|
-
this.emit("start"), this._readyQ.drain =
|
|
5372
|
+
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 Pu(), this._readyQ = kn(this, Si, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
5373
|
+
this.emit("start"), this._readyQ.drain = Cn;
|
|
5355
5374
|
}, this._closeQ = kn(this, Vu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
5356
|
-
this.emit("close"), this._closeQ.drain =
|
|
5375
|
+
this.emit("close"), this._closeQ.drain = Cn;
|
|
5357
5376
|
}, this._doStart = null, this._root = new Sr(this, Du.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5358
5377
|
const s = this.pluginTree.start(null, i, o);
|
|
5359
5378
|
this._root.once("loaded", (a, u, d) => {
|
|
@@ -5389,7 +5408,7 @@ function Fu(t) {
|
|
|
5389
5408
|
throw new ku(typeof t);
|
|
5390
5409
|
return t;
|
|
5391
5410
|
}
|
|
5392
|
-
z.prototype[
|
|
5411
|
+
z.prototype[Pt] = !0;
|
|
5393
5412
|
z.prototype.use = function(t, e) {
|
|
5394
5413
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
5395
5414
|
};
|
|
@@ -5400,7 +5419,7 @@ z.prototype._loadRegistered = function() {
|
|
|
5400
5419
|
Object.defineProperty(z.prototype, "then", { get: vi });
|
|
5401
5420
|
z.prototype._addPlugin = function(t, e, r) {
|
|
5402
5421
|
if (t = Fu(t), e = e || {}, this.booted)
|
|
5403
|
-
throw new
|
|
5422
|
+
throw new Cu();
|
|
5404
5423
|
const n = this._current[0], i = new Sr(this, t, e, r);
|
|
5405
5424
|
if (i.once("start", (o, s, a) => {
|
|
5406
5425
|
const u = this.pluginTree.start(n.name, s, a);
|
|
@@ -5469,26 +5488,26 @@ z.prototype.prettyPrint = function() {
|
|
|
5469
5488
|
z.prototype.toJSON = function() {
|
|
5470
5489
|
return this.pluginTree.toJSON();
|
|
5471
5490
|
};
|
|
5472
|
-
function
|
|
5491
|
+
function Cn() {
|
|
5473
5492
|
}
|
|
5474
5493
|
function vi() {
|
|
5475
5494
|
if (this.booted) {
|
|
5476
5495
|
Ye("thenify returning null because we are already booted");
|
|
5477
5496
|
return;
|
|
5478
5497
|
}
|
|
5479
|
-
if (this[
|
|
5480
|
-
this[
|
|
5498
|
+
if (this[ir]) {
|
|
5499
|
+
this[ir] = !1;
|
|
5481
5500
|
return;
|
|
5482
5501
|
}
|
|
5483
|
-
return Ye("thenify"), (t, e) => this._loadRegistered().then(() => (this[
|
|
5502
|
+
return Ye("thenify"), (t, e) => this._loadRegistered().then(() => (this[ir] = !0, t(this._server)), e);
|
|
5484
5503
|
}
|
|
5485
5504
|
function Si(t, e) {
|
|
5486
5505
|
const r = this._server, n = this._error;
|
|
5487
5506
|
let i;
|
|
5488
5507
|
if (this._error = null, t.length === 0)
|
|
5489
|
-
this._error = n, i = t(), i && !i[
|
|
5508
|
+
this._error = n, i = t(), i && !i[Pt] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
|
|
5490
5509
|
else if (t.length === 1)
|
|
5491
|
-
i = t(n), i && !i[
|
|
5510
|
+
i = t(n), i && !i[Pt] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
|
|
5492
5511
|
else if (this._timeout === 0) {
|
|
5493
5512
|
const o = (s) => {
|
|
5494
5513
|
this._error = s, e(this._error);
|
|
@@ -5502,7 +5521,7 @@ function Ru(t, e, r, n) {
|
|
|
5502
5521
|
Ye("setting up ready timeout", i, this._timeout);
|
|
5503
5522
|
let o = setTimeout(() => {
|
|
5504
5523
|
Ye("timed out", i), o = null;
|
|
5505
|
-
const a = new
|
|
5524
|
+
const a = new Lu(i);
|
|
5506
5525
|
a.fn = t, this._error = a, n(a);
|
|
5507
5526
|
}, this._timeout);
|
|
5508
5527
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5531,7 +5550,7 @@ function $u(t, e) {
|
|
|
5531
5550
|
}, i) : E.nextTick(i)) : t(this, i);
|
|
5532
5551
|
}
|
|
5533
5552
|
}
|
|
5534
|
-
function
|
|
5553
|
+
function or(t, e) {
|
|
5535
5554
|
return r.bind(e);
|
|
5536
5555
|
function r(n, i) {
|
|
5537
5556
|
let o;
|
|
@@ -5582,7 +5601,7 @@ function cc(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
|
5582
5601
|
onContentActivate: n?.onContentActivate,
|
|
5583
5602
|
withAd: n?.withAd,
|
|
5584
5603
|
withAdNotification: n?.withAdNotification
|
|
5585
|
-
}), s.use(no, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(uo), s.use(qo), s.use(rs), s.use(
|
|
5604
|
+
}), s.use(no, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(uo), s.use(qo), s.use(rs), s.use(Po), s.use(fs), s.after((a, u, d) => {
|
|
5586
5605
|
if (a)
|
|
5587
5606
|
throw a;
|
|
5588
5607
|
u.ready(), d();
|