@streamlayer/sdk-web 1.10.9 → 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 +7 -7
- package/lib/es/index.js +278 -261
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -5,21 +5,21 @@ import { SdkOverlayType as R } from "@streamlayer/sl-eslib/sdkSettings/sdkSettin
|
|
|
5
5
|
import { InvitationCategory as Mr, InvitationFrom as Ur } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
6
|
import { computed as _i, map as ki, atom as Nt, batched as qr, onMount as wr } from "nanostores";
|
|
7
7
|
import { v4 as At } from "uuid";
|
|
8
|
-
import { ConnectError as it, Code as oe, createContextKey as jr, createClient as xr, createContextValues as
|
|
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: {
|
|
@@ -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 = Nt(tt.Suspended), this.config = new
|
|
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();
|
|
@@ -319,7 +319,7 @@ class se extends Dt {
|
|
|
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,
|
|
@@ -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
|
|
@@ -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, {
|
|
@@ -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
|
},
|
|
@@ -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,
|
|
@@ -1521,7 +1538,7 @@ var It;
|
|
|
1521
1538
|
(function(t) {
|
|
1522
1539
|
t.OPENED = "opened";
|
|
1523
1540
|
})(It || (It = {}));
|
|
1524
|
-
class
|
|
1541
|
+
class Co extends Je {
|
|
1525
1542
|
constructor() {
|
|
1526
1543
|
super("notification");
|
|
1527
1544
|
}
|
|
@@ -1533,11 +1550,11 @@ class Po extends Je {
|
|
|
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);
|
|
@@ -1697,7 +1714,7 @@ const Zr = "sldl", Ft = "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 };
|
|
@@ -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);
|
|
@@ -2060,13 +2077,13 @@ const et = new je(), qo = (t, e, r) => {
|
|
|
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,7 +3139,7 @@ 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
|
});
|
|
@@ -3204,16 +3221,16 @@ function Qn(t, e, r) {
|
|
|
3204
3221
|
get concurrency() {
|
|
3205
3222
|
return r;
|
|
3206
3223
|
},
|
|
3207
|
-
set concurrency(
|
|
3208
|
-
if (!(
|
|
3224
|
+
set concurrency(P) {
|
|
3225
|
+
if (!(P >= 1))
|
|
3209
3226
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
3210
|
-
if (r =
|
|
3227
|
+
if (r = P, !u.paused)
|
|
3211
3228
|
for (; i && s < r; )
|
|
3212
|
-
s++,
|
|
3229
|
+
s++, w();
|
|
3213
3230
|
},
|
|
3214
3231
|
running: d,
|
|
3215
3232
|
resume: v,
|
|
3216
|
-
idle:
|
|
3233
|
+
idle: S,
|
|
3217
3234
|
length: f,
|
|
3218
3235
|
getQueue: p,
|
|
3219
3236
|
unshift: g,
|
|
@@ -3230,38 +3247,38 @@ function Qn(t, e, r) {
|
|
|
3230
3247
|
u.paused = !0;
|
|
3231
3248
|
}
|
|
3232
3249
|
function f() {
|
|
3233
|
-
for (var
|
|
3234
|
-
|
|
3250
|
+
for (var P = i, V = 0; P; )
|
|
3251
|
+
P = P.next, V++;
|
|
3235
3252
|
return V;
|
|
3236
3253
|
}
|
|
3237
3254
|
function p() {
|
|
3238
|
-
for (var
|
|
3239
|
-
V.push(
|
|
3255
|
+
for (var P = i, V = []; P; )
|
|
3256
|
+
V.push(P.value), P = P.next;
|
|
3240
3257
|
return V;
|
|
3241
3258
|
}
|
|
3242
3259
|
function v() {
|
|
3243
3260
|
if (u.paused) {
|
|
3244
3261
|
if (u.paused = !1, i === null) {
|
|
3245
|
-
s++,
|
|
3262
|
+
s++, w();
|
|
3246
3263
|
return;
|
|
3247
3264
|
}
|
|
3248
3265
|
for (; i && s < r; )
|
|
3249
|
-
s++,
|
|
3266
|
+
s++, w();
|
|
3250
3267
|
}
|
|
3251
3268
|
}
|
|
3252
|
-
function
|
|
3269
|
+
function S() {
|
|
3253
3270
|
return s === 0 && u.length() === 0;
|
|
3254
3271
|
}
|
|
3255
|
-
function m(
|
|
3272
|
+
function m(P, V) {
|
|
3256
3273
|
var _ = n.get();
|
|
3257
|
-
_.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));
|
|
3258
3275
|
}
|
|
3259
|
-
function g(
|
|
3276
|
+
function g(P, V) {
|
|
3260
3277
|
var _ = n.get();
|
|
3261
|
-
_.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));
|
|
3262
3279
|
}
|
|
3263
|
-
function
|
|
3264
|
-
|
|
3280
|
+
function w(P) {
|
|
3281
|
+
P && n.release(P);
|
|
3265
3282
|
var V = i;
|
|
3266
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();
|
|
3267
3284
|
}
|
|
@@ -3271,8 +3288,8 @@ function Qn(t, e, r) {
|
|
|
3271
3288
|
function H() {
|
|
3272
3289
|
i = null, o = null, u.drain(), u.drain = te;
|
|
3273
3290
|
}
|
|
3274
|
-
function ne(
|
|
3275
|
-
a =
|
|
3291
|
+
function ne(P) {
|
|
3292
|
+
a = P;
|
|
3276
3293
|
}
|
|
3277
3294
|
}
|
|
3278
3295
|
function te() {
|
|
@@ -3296,9 +3313,9 @@ function bs(t, e, r) {
|
|
|
3296
3313
|
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
3297
3314
|
function a(c) {
|
|
3298
3315
|
var f = new Promise(function(p, v) {
|
|
3299
|
-
o(c, function(
|
|
3300
|
-
if (
|
|
3301
|
-
v(
|
|
3316
|
+
o(c, function(S, m) {
|
|
3317
|
+
if (S) {
|
|
3318
|
+
v(S);
|
|
3302
3319
|
return;
|
|
3303
3320
|
}
|
|
3304
3321
|
p(m);
|
|
@@ -3308,9 +3325,9 @@ function bs(t, e, r) {
|
|
|
3308
3325
|
}
|
|
3309
3326
|
function u(c) {
|
|
3310
3327
|
var f = new Promise(function(p, v) {
|
|
3311
|
-
s(c, function(
|
|
3312
|
-
if (
|
|
3313
|
-
v(
|
|
3328
|
+
s(c, function(S, m) {
|
|
3329
|
+
if (S) {
|
|
3330
|
+
v(S);
|
|
3314
3331
|
return;
|
|
3315
3332
|
}
|
|
3316
3333
|
p(m);
|
|
@@ -3581,8 +3598,8 @@ var ei = Tr.exports, Vt = {}, ti = {}, ri = function() {
|
|
|
3581
3598
|
return !0;
|
|
3582
3599
|
}, Os = ri, $t = function() {
|
|
3583
3600
|
return Os() && !!Symbol.toStringTag;
|
|
3584
|
-
}, Ts = Error, _s = EvalError, ks = RangeError,
|
|
3585
|
-
return typeof cn != "function" || typeof Symbol != "function" || typeof cn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
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();
|
|
3586
3603
|
}, xt = {
|
|
3587
3604
|
__proto__: null,
|
|
3588
3605
|
foo: {}
|
|
@@ -3626,26 +3643,26 @@ var ei = Tr.exports, Vt = {}, ti = {}, ri = function() {
|
|
|
3626
3643
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
3627
3644
|
}
|
|
3628
3645
|
return i;
|
|
3629
|
-
}, 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) {
|
|
3630
3647
|
try {
|
|
3631
3648
|
return ii('"use strict"; return (' + t + ").constructor;")();
|
|
3632
3649
|
} catch {
|
|
3633
3650
|
}
|
|
3634
|
-
},
|
|
3635
|
-
if (
|
|
3651
|
+
}, Pe = Object.getOwnPropertyDescriptor;
|
|
3652
|
+
if (Pe)
|
|
3636
3653
|
try {
|
|
3637
|
-
|
|
3654
|
+
Pe({}, "");
|
|
3638
3655
|
} catch {
|
|
3639
|
-
|
|
3656
|
+
Pe = null;
|
|
3640
3657
|
}
|
|
3641
3658
|
var Gt = function() {
|
|
3642
3659
|
throw new ze();
|
|
3643
|
-
}, Xs =
|
|
3660
|
+
}, Xs = Pe ? function() {
|
|
3644
3661
|
try {
|
|
3645
3662
|
return arguments.callee, Gt;
|
|
3646
3663
|
} catch {
|
|
3647
3664
|
try {
|
|
3648
|
-
return
|
|
3665
|
+
return Pe(arguments, "callee").get;
|
|
3649
3666
|
} catch {
|
|
3650
3667
|
return Gt;
|
|
3651
3668
|
}
|
|
@@ -3831,8 +3848,8 @@ var ra = function t(e) {
|
|
|
3831
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;
|
|
3832
3849
|
d && (i = d[0], ia(n, na([0, 1], d)));
|
|
3833
3850
|
for (var c = 1, f = !0; c < n.length; c += 1) {
|
|
3834
|
-
var p = n[c], v = Tt(p, 0, 1),
|
|
3835
|
-
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)
|
|
3836
3853
|
throw new We("property names with quotes must have matching quotes");
|
|
3837
3854
|
if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", Ot(Ne, s))
|
|
3838
3855
|
a = Ne[s];
|
|
@@ -3842,8 +3859,8 @@ var ra = function t(e) {
|
|
|
3842
3859
|
throw new ze("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3843
3860
|
return;
|
|
3844
3861
|
}
|
|
3845
|
-
if (
|
|
3846
|
-
var m =
|
|
3862
|
+
if (Pe && c + 1 >= n.length) {
|
|
3863
|
+
var m = Pe(a, p);
|
|
3847
3864
|
f = !!m, f && "get" in m && !("originalValue" in m.get) ? a = m.get : a = a[p];
|
|
3848
3865
|
} else
|
|
3849
3866
|
f = Ot(a, p), a = a[p];
|
|
@@ -3949,10 +3966,10 @@ var pa = si, ha = at, mn = fa, ya = pa(), gn = Mt, bn = Bt, ma = ha("%Math.floor
|
|
|
3949
3966
|
};
|
|
3950
3967
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3951
3968
|
})(oi);
|
|
3952
|
-
var
|
|
3969
|
+
var Cr = oi.exports, ai = at, ui = Cr, ba = ui(ai("String.prototype.indexOf")), Lr = function(e, r) {
|
|
3953
3970
|
var n = ai(e, !!r);
|
|
3954
3971
|
return typeof n == "function" && ba(e, ".prototype.") > -1 ? ui(n) : n;
|
|
3955
|
-
}, va = $t(), Sa =
|
|
3972
|
+
}, va = $t(), Sa = Lr, fr = Sa("Object.prototype.toString"), Ut = function(e) {
|
|
3956
3973
|
return va && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : fr(e) === "[object Arguments]";
|
|
3957
3974
|
}, ci = function(e) {
|
|
3958
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]";
|
|
@@ -4011,7 +4028,7 @@ var ka = /^\s*class\b/, hr = function(e) {
|
|
|
4011
4028
|
} catch {
|
|
4012
4029
|
return !1;
|
|
4013
4030
|
}
|
|
4014
|
-
}, 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() {
|
|
4015
4032
|
return !1;
|
|
4016
4033
|
};
|
|
4017
4034
|
if (typeof document == "object") {
|
|
@@ -4020,7 +4037,7 @@ if (typeof document == "object") {
|
|
|
4020
4037
|
if ((Va || !e) && (typeof e > "u" || typeof e == "object"))
|
|
4021
4038
|
try {
|
|
4022
4039
|
var r = vt.call(e);
|
|
4023
|
-
return (r === Na || r === Da || r === Fa || r ===
|
|
4040
|
+
return (r === Na || r === Da || r === Fa || r === Ca) && e("") == null;
|
|
4024
4041
|
} catch {
|
|
4025
4042
|
}
|
|
4026
4043
|
return !1;
|
|
@@ -4048,7 +4065,7 @@ var Ba = xe ? function(e) {
|
|
|
4048
4065
|
if (hr(e))
|
|
4049
4066
|
return !1;
|
|
4050
4067
|
var r = vt.call(e);
|
|
4051
|
-
return r !==
|
|
4068
|
+
return r !== La && r !== Pa && !/^\[object HTML/.test(r) ? !1 : Wt(e);
|
|
4052
4069
|
}, Ma = Ba, Ua = Object.prototype.toString, fi = Object.prototype.hasOwnProperty, qa = function(e, r, n) {
|
|
4053
4070
|
for (var i = 0, o = e.length; i < o; i++)
|
|
4054
4071
|
fi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
@@ -4079,7 +4096,7 @@ var Ba = xe ? function(e) {
|
|
|
4079
4096
|
for (var e = [], r = 0; r < Yt.length; r++)
|
|
4080
4097
|
typeof Ka[Yt[r]] == "function" && (e[e.length] = Yt[r]);
|
|
4081
4098
|
return e;
|
|
4082
|
-
}, _t = pi, za = hi, vn =
|
|
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) {
|
|
4083
4100
|
for (var n = 0; n < e.length; n += 1)
|
|
4084
4101
|
if (e[n] === r)
|
|
4085
4102
|
return n;
|
|
@@ -4125,13 +4142,13 @@ var Ya = function(e) {
|
|
|
4125
4142
|
return Wa(mr, r) > -1 ? r : r !== "Object" ? !1 : Ja(e);
|
|
4126
4143
|
}
|
|
4127
4144
|
return St ? Ya(e) : null;
|
|
4128
|
-
},
|
|
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) {
|
|
4129
4146
|
for (var n = 0; n < e.length; n += 1)
|
|
4130
4147
|
if (e[n] === r)
|
|
4131
4148
|
return n;
|
|
4132
4149
|
return -1;
|
|
4133
|
-
},
|
|
4134
|
-
mi && wt && Xt ?
|
|
4150
|
+
}, Lt = { __proto__: null };
|
|
4151
|
+
mi && wt && Xt ? Ct(gr, function(t) {
|
|
4135
4152
|
var e = new An[t]();
|
|
4136
4153
|
if (Symbol.toStringTag in e) {
|
|
4137
4154
|
var r = Xt(e), n = wt(r, Symbol.toStringTag);
|
|
@@ -4139,19 +4156,19 @@ mi && wt && Xt ? Pt(gr, function(t) {
|
|
|
4139
4156
|
var i = Xt(r);
|
|
4140
4157
|
n = wt(i, Symbol.toStringTag);
|
|
4141
4158
|
}
|
|
4142
|
-
|
|
4159
|
+
Lt["$" + t] = wn(n.get);
|
|
4143
4160
|
}
|
|
4144
|
-
}) :
|
|
4161
|
+
}) : Ct(gr, function(t) {
|
|
4145
4162
|
var e = new An[t](), r = e.slice || e.set;
|
|
4146
|
-
r && (
|
|
4163
|
+
r && (Lt["$" + t] = wn(r));
|
|
4147
4164
|
});
|
|
4148
4165
|
var ru = function(e) {
|
|
4149
4166
|
var r = !1;
|
|
4150
|
-
return
|
|
4167
|
+
return Ct(
|
|
4151
4168
|
// eslint-disable-next-line no-extra-parens
|
|
4152
4169
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
4153
4170
|
/** @type {any} */
|
|
4154
|
-
|
|
4171
|
+
Lt,
|
|
4155
4172
|
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
4156
4173
|
function(n, i) {
|
|
4157
4174
|
if (!r)
|
|
@@ -4163,11 +4180,11 @@ var ru = function(e) {
|
|
|
4163
4180
|
), r;
|
|
4164
4181
|
}, nu = function(e) {
|
|
4165
4182
|
var r = !1;
|
|
4166
|
-
return
|
|
4183
|
+
return Ct(
|
|
4167
4184
|
// eslint-disable-next-line no-extra-parens
|
|
4168
4185
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
4169
4186
|
/** @type {any} */
|
|
4170
|
-
|
|
4187
|
+
Lt,
|
|
4171
4188
|
/** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
4172
4189
|
function(n, i) {
|
|
4173
4190
|
if (!r)
|
|
@@ -4198,7 +4215,7 @@ var ru = function(e) {
|
|
|
4198
4215
|
var p = o(BigInt.prototype.valueOf);
|
|
4199
4216
|
if (a)
|
|
4200
4217
|
var v = o(Symbol.prototype.valueOf);
|
|
4201
|
-
function
|
|
4218
|
+
function S(y, Ei) {
|
|
4202
4219
|
if (typeof y != "object")
|
|
4203
4220
|
return !1;
|
|
4204
4221
|
try {
|
|
@@ -4216,10 +4233,10 @@ var ru = function(e) {
|
|
|
4216
4233
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
|
|
4217
4234
|
}
|
|
4218
4235
|
t.isArrayBufferView = g;
|
|
4219
|
-
function
|
|
4236
|
+
function w(y) {
|
|
4220
4237
|
return n(y) === "Uint8Array";
|
|
4221
4238
|
}
|
|
4222
|
-
t.isUint8Array =
|
|
4239
|
+
t.isUint8Array = w;
|
|
4223
4240
|
function D(y) {
|
|
4224
4241
|
return n(y) === "Uint8ClampedArray";
|
|
4225
4242
|
}
|
|
@@ -4232,10 +4249,10 @@ var ru = function(e) {
|
|
|
4232
4249
|
return n(y) === "Uint32Array";
|
|
4233
4250
|
}
|
|
4234
4251
|
t.isUint32Array = ne;
|
|
4235
|
-
function
|
|
4252
|
+
function P(y) {
|
|
4236
4253
|
return n(y) === "Int8Array";
|
|
4237
4254
|
}
|
|
4238
|
-
t.isInt8Array =
|
|
4255
|
+
t.isInt8Array = P;
|
|
4239
4256
|
function V(y) {
|
|
4240
4257
|
return n(y) === "Int16Array";
|
|
4241
4258
|
}
|
|
@@ -4312,14 +4329,14 @@ var ru = function(e) {
|
|
|
4312
4329
|
function A(y) {
|
|
4313
4330
|
return u(y) === "[object SharedArrayBuffer]";
|
|
4314
4331
|
}
|
|
4315
|
-
function
|
|
4332
|
+
function C(y) {
|
|
4316
4333
|
return typeof b > "u" ? !1 : (typeof A.working > "u" && (A.working = A(new b())), A.working ? A(y) : y instanceof b);
|
|
4317
4334
|
}
|
|
4318
|
-
t.isSharedArrayBuffer =
|
|
4319
|
-
function
|
|
4335
|
+
t.isSharedArrayBuffer = C;
|
|
4336
|
+
function L(y) {
|
|
4320
4337
|
return u(y) === "[object AsyncFunction]";
|
|
4321
4338
|
}
|
|
4322
|
-
t.isAsyncFunction =
|
|
4339
|
+
t.isAsyncFunction = L;
|
|
4323
4340
|
function O(y) {
|
|
4324
4341
|
return u(y) === "[object Map Iterator]";
|
|
4325
4342
|
}
|
|
@@ -4337,23 +4354,23 @@ var ru = function(e) {
|
|
|
4337
4354
|
}
|
|
4338
4355
|
t.isWebAssemblyCompiledModule = Y;
|
|
4339
4356
|
function _e(y) {
|
|
4340
|
-
return
|
|
4357
|
+
return S(y, d);
|
|
4341
4358
|
}
|
|
4342
4359
|
t.isNumberObject = _e;
|
|
4343
4360
|
function ct(y) {
|
|
4344
|
-
return
|
|
4361
|
+
return S(y, c);
|
|
4345
4362
|
}
|
|
4346
4363
|
t.isStringObject = ct;
|
|
4347
4364
|
function $e(y) {
|
|
4348
|
-
return
|
|
4365
|
+
return S(y, f);
|
|
4349
4366
|
}
|
|
4350
4367
|
t.isBooleanObject = $e;
|
|
4351
4368
|
function dt(y) {
|
|
4352
|
-
return s &&
|
|
4369
|
+
return s && S(y, p);
|
|
4353
4370
|
}
|
|
4354
4371
|
t.isBigIntObject = dt;
|
|
4355
4372
|
function $r(y) {
|
|
4356
|
-
return a &&
|
|
4373
|
+
return a && S(y, v);
|
|
4357
4374
|
}
|
|
4358
4375
|
t.isSymbolObject = $r;
|
|
4359
4376
|
function wi(y) {
|
|
@@ -4361,7 +4378,7 @@ var ru = function(e) {
|
|
|
4361
4378
|
}
|
|
4362
4379
|
t.isBoxedPrimitive = wi;
|
|
4363
4380
|
function Ai(y) {
|
|
4364
|
-
return typeof Uint8Array < "u" && (ut(y) ||
|
|
4381
|
+
return typeof Uint8Array < "u" && (ut(y) || C(y));
|
|
4365
4382
|
}
|
|
4366
4383
|
t.isAnyArrayBuffer = Ai, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
4367
4384
|
Object.defineProperty(t, y, {
|
|
@@ -4395,19 +4412,19 @@ typeof Object.create == "function" ? br.exports = function(e, r) {
|
|
|
4395
4412
|
var uu = br.exports;
|
|
4396
4413
|
(function(t) {
|
|
4397
4414
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
4398
|
-
for (var b = Object.keys(h), A = {},
|
|
4399
|
-
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]);
|
|
4400
4417
|
return A;
|
|
4401
4418
|
}, r = /%[sdj%]/g;
|
|
4402
4419
|
t.format = function(l) {
|
|
4403
|
-
if (!
|
|
4420
|
+
if (!P(l)) {
|
|
4404
4421
|
for (var h = [], b = 0; b < arguments.length; b++)
|
|
4405
4422
|
h.push(s(arguments[b]));
|
|
4406
4423
|
return h.join(" ");
|
|
4407
4424
|
}
|
|
4408
|
-
for (var b = 1, A = arguments,
|
|
4425
|
+
for (var b = 1, A = arguments, C = A.length, L = String(l).replace(r, function(k) {
|
|
4409
4426
|
if (k === "%%") return "%";
|
|
4410
|
-
if (b >=
|
|
4427
|
+
if (b >= C) return k;
|
|
4411
4428
|
switch (k) {
|
|
4412
4429
|
case "%s":
|
|
4413
4430
|
return String(A[b++]);
|
|
@@ -4422,9 +4439,9 @@ var uu = br.exports;
|
|
|
4422
4439
|
default:
|
|
4423
4440
|
return k;
|
|
4424
4441
|
}
|
|
4425
|
-
}), O = A[b]; b <
|
|
4426
|
-
D(O) || !ue(O) ?
|
|
4427
|
-
return
|
|
4442
|
+
}), O = A[b]; b < C; O = A[++b])
|
|
4443
|
+
D(O) || !ue(O) ? L += " " + O : L += " " + s(O);
|
|
4444
|
+
return L;
|
|
4428
4445
|
}, t.deprecate = function(l, h) {
|
|
4429
4446
|
if (typeof E < "u" && E.noDeprecation === !0)
|
|
4430
4447
|
return l;
|
|
@@ -4466,7 +4483,7 @@ var uu = br.exports;
|
|
|
4466
4483
|
seen: [],
|
|
4467
4484
|
stylize: u
|
|
4468
4485
|
};
|
|
4469
|
-
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);
|
|
4470
4487
|
}
|
|
4471
4488
|
t.inspect = s, s.colors = {
|
|
4472
4489
|
bold: [1, 22],
|
|
@@ -4511,15 +4528,15 @@ var uu = br.exports;
|
|
|
4511
4528
|
h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
4512
4529
|
!(h.constructor && h.constructor.prototype === h)) {
|
|
4513
4530
|
var A = h.inspect(b, l);
|
|
4514
|
-
return
|
|
4531
|
+
return P(A) || (A = c(l, A, b)), A;
|
|
4515
4532
|
}
|
|
4516
|
-
var
|
|
4517
|
-
if (
|
|
4518
|
-
return
|
|
4519
|
-
var
|
|
4520
|
-
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))
|
|
4521
4538
|
return p(h);
|
|
4522
|
-
if (
|
|
4539
|
+
if (L.length === 0) {
|
|
4523
4540
|
if (he(h)) {
|
|
4524
4541
|
var k = h.name ? ": " + h.name : "";
|
|
4525
4542
|
return l.stylize("[Function" + k + "]", "special");
|
|
@@ -4536,26 +4553,26 @@ var uu = br.exports;
|
|
|
4536
4553
|
var ct = h.name ? ": " + h.name : "";
|
|
4537
4554
|
F = " [Function" + ct + "]";
|
|
4538
4555
|
}
|
|
4539
|
-
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))
|
|
4540
4557
|
return _e[0] + F + _e[1];
|
|
4541
4558
|
if (b < 0)
|
|
4542
4559
|
return ae(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
|
|
4543
4560
|
l.seen.push(h);
|
|
4544
4561
|
var $e;
|
|
4545
|
-
return Y ? $e = v(l, h, b, O,
|
|
4546
|
-
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);
|
|
4547
4564
|
}), l.seen.pop(), m($e, F, _e);
|
|
4548
4565
|
}
|
|
4549
4566
|
function f(l, h) {
|
|
4550
4567
|
if (_(h))
|
|
4551
4568
|
return l.stylize("undefined", "undefined");
|
|
4552
|
-
if (
|
|
4569
|
+
if (P(h)) {
|
|
4553
4570
|
var b = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4554
4571
|
return l.stylize(b, "string");
|
|
4555
4572
|
}
|
|
4556
4573
|
if (ne(h))
|
|
4557
4574
|
return l.stylize("" + h, "number");
|
|
4558
|
-
if (
|
|
4575
|
+
if (w(h))
|
|
4559
4576
|
return l.stylize("" + h, "boolean");
|
|
4560
4577
|
if (D(h))
|
|
4561
4578
|
return l.stylize("null", "null");
|
|
@@ -4563,18 +4580,18 @@ var uu = br.exports;
|
|
|
4563
4580
|
function p(l) {
|
|
4564
4581
|
return "[" + Error.prototype.toString.call(l) + "]";
|
|
4565
4582
|
}
|
|
4566
|
-
function v(l, h, b, A,
|
|
4567
|
-
for (var
|
|
4568
|
-
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(
|
|
4569
4586
|
l,
|
|
4570
4587
|
h,
|
|
4571
4588
|
b,
|
|
4572
4589
|
A,
|
|
4573
4590
|
String(O),
|
|
4574
4591
|
!0
|
|
4575
|
-
)) :
|
|
4576
|
-
return
|
|
4577
|
-
F.match(/^\d+$/) ||
|
|
4592
|
+
)) : L.push("");
|
|
4593
|
+
return C.forEach(function(F) {
|
|
4594
|
+
F.match(/^\d+$/) || L.push(S(
|
|
4578
4595
|
l,
|
|
4579
4596
|
h,
|
|
4580
4597
|
b,
|
|
@@ -4582,12 +4599,12 @@ var uu = br.exports;
|
|
|
4582
4599
|
F,
|
|
4583
4600
|
!0
|
|
4584
4601
|
));
|
|
4585
|
-
}),
|
|
4602
|
+
}), L;
|
|
4586
4603
|
}
|
|
4587
|
-
function
|
|
4604
|
+
function S(l, h, b, A, C, L) {
|
|
4588
4605
|
var O, k, F;
|
|
4589
|
-
if (F = Object.getOwnPropertyDescriptor(h,
|
|
4590
|
-
`) > -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(`
|
|
4591
4608
|
`).map(function(Y) {
|
|
4592
4609
|
return " " + Y;
|
|
4593
4610
|
}).join(`
|
|
@@ -4597,16 +4614,16 @@ var uu = br.exports;
|
|
|
4597
4614
|
return " " + Y;
|
|
4598
4615
|
}).join(`
|
|
4599
4616
|
`))) : k = l.stylize("[Circular]", "special")), _(O)) {
|
|
4600
|
-
if (
|
|
4617
|
+
if (L && C.match(/^\d+$/))
|
|
4601
4618
|
return k;
|
|
4602
|
-
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"));
|
|
4603
4620
|
}
|
|
4604
4621
|
return O + ": " + k;
|
|
4605
4622
|
}
|
|
4606
4623
|
function m(l, h, b) {
|
|
4607
|
-
var A = l.reduce(function(
|
|
4608
|
-
return
|
|
4609
|
-
`) >= 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;
|
|
4610
4627
|
}, 0);
|
|
4611
4628
|
return A > 60 ? b[0] + (h === "" ? "" : h + `
|
|
4612
4629
|
`) + " " + l.join(`,
|
|
@@ -4617,10 +4634,10 @@ var uu = br.exports;
|
|
|
4617
4634
|
return Array.isArray(l);
|
|
4618
4635
|
}
|
|
4619
4636
|
t.isArray = g;
|
|
4620
|
-
function
|
|
4637
|
+
function w(l) {
|
|
4621
4638
|
return typeof l == "boolean";
|
|
4622
4639
|
}
|
|
4623
|
-
t.isBoolean =
|
|
4640
|
+
t.isBoolean = w;
|
|
4624
4641
|
function D(l) {
|
|
4625
4642
|
return l === null;
|
|
4626
4643
|
}
|
|
@@ -4633,10 +4650,10 @@ var uu = br.exports;
|
|
|
4633
4650
|
return typeof l == "number";
|
|
4634
4651
|
}
|
|
4635
4652
|
t.isNumber = ne;
|
|
4636
|
-
function
|
|
4653
|
+
function P(l) {
|
|
4637
4654
|
return typeof l == "string";
|
|
4638
4655
|
}
|
|
4639
|
-
t.isString =
|
|
4656
|
+
t.isString = P;
|
|
4640
4657
|
function V(l) {
|
|
4641
4658
|
return typeof l == "symbol";
|
|
4642
4659
|
}
|
|
@@ -4725,19 +4742,19 @@ var uu = br.exports;
|
|
|
4725
4742
|
}), b;
|
|
4726
4743
|
}
|
|
4727
4744
|
function b() {
|
|
4728
|
-
for (var A,
|
|
4729
|
-
A = F,
|
|
4745
|
+
for (var A, C, L = new Promise(function(F, Y) {
|
|
4746
|
+
A = F, C = Y;
|
|
4730
4747
|
}), O = [], k = 0; k < arguments.length; k++)
|
|
4731
4748
|
O.push(arguments[k]);
|
|
4732
4749
|
O.push(function(F, Y) {
|
|
4733
|
-
F ?
|
|
4750
|
+
F ? C(F) : A(Y);
|
|
4734
4751
|
});
|
|
4735
4752
|
try {
|
|
4736
4753
|
h.apply(this, O);
|
|
4737
4754
|
} catch (F) {
|
|
4738
|
-
|
|
4755
|
+
C(F);
|
|
4739
4756
|
}
|
|
4740
|
-
return
|
|
4757
|
+
return L;
|
|
4741
4758
|
}
|
|
4742
4759
|
return Object.setPrototypeOf(b, Object.getPrototypeOf(h)), ye && Object.defineProperty(b, ye, {
|
|
4743
4760
|
value: b,
|
|
@@ -4762,11 +4779,11 @@ var uu = br.exports;
|
|
|
4762
4779
|
function h() {
|
|
4763
4780
|
for (var b = [], A = 0; A < arguments.length; A++)
|
|
4764
4781
|
b.push(arguments[A]);
|
|
4765
|
-
var
|
|
4766
|
-
if (typeof
|
|
4782
|
+
var C = b.pop();
|
|
4783
|
+
if (typeof C != "function")
|
|
4767
4784
|
throw new TypeError("The last argument must be of type Function");
|
|
4768
|
-
var
|
|
4769
|
-
return
|
|
4785
|
+
var L = this, O = function() {
|
|
4786
|
+
return C.apply(L, arguments);
|
|
4770
4787
|
};
|
|
4771
4788
|
l.apply(this, b).then(
|
|
4772
4789
|
function(k) {
|
|
@@ -4980,8 +4997,8 @@ function hu() {
|
|
|
4980
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";
|
|
4981
4998
|
}
|
|
4982
4999
|
function d(c, f, p, v) {
|
|
4983
|
-
var
|
|
4984
|
-
return Math.round(c / p) + " " + v + (
|
|
5000
|
+
var S = f >= p * 1.5;
|
|
5001
|
+
return Math.round(c / p) + " " + v + (S ? "s" : "");
|
|
4985
5002
|
}
|
|
4986
5003
|
return tr;
|
|
4987
5004
|
}
|
|
@@ -4997,12 +5014,12 @@ function yu(t) {
|
|
|
4997
5014
|
}
|
|
4998
5015
|
r.selectColor = e;
|
|
4999
5016
|
function r(c) {
|
|
5000
|
-
let f, p = null, v,
|
|
5017
|
+
let f, p = null, v, S;
|
|
5001
5018
|
function m(...g) {
|
|
5002
5019
|
if (!m.enabled)
|
|
5003
5020
|
return;
|
|
5004
|
-
const
|
|
5005
|
-
|
|
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");
|
|
5006
5023
|
let ne = 0;
|
|
5007
5024
|
g[0] = g[0].replace(/%([a-zA-Z%])/g, (V, _) => {
|
|
5008
5025
|
if (V === "%%")
|
|
@@ -5011,15 +5028,15 @@ function yu(t) {
|
|
|
5011
5028
|
const ae = r.formatters[_];
|
|
5012
5029
|
if (typeof ae == "function") {
|
|
5013
5030
|
const ue = g[ne];
|
|
5014
|
-
V = ae.call(
|
|
5031
|
+
V = ae.call(w, ue), g.splice(ne, 1), ne--;
|
|
5015
5032
|
}
|
|
5016
5033
|
return V;
|
|
5017
|
-
}), r.formatArgs.call(
|
|
5034
|
+
}), r.formatArgs.call(w, g), (w.log || r.log).apply(w, g);
|
|
5018
5035
|
}
|
|
5019
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", {
|
|
5020
5037
|
enumerable: !0,
|
|
5021
5038
|
configurable: !1,
|
|
5022
|
-
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),
|
|
5023
5040
|
set: (g) => {
|
|
5024
5041
|
p = g;
|
|
5025
5042
|
}
|
|
@@ -5318,9 +5335,9 @@ const kn = Gn, Tu = ei.EventEmitter, _u = Vt.inherits, {
|
|
|
5318
5335
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: nr,
|
|
5319
5336
|
AVV_ERR_CALLBACK_NOT_FN: nt,
|
|
5320
5337
|
AVV_ERR_PLUGIN_NOT_VALID: ku,
|
|
5321
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
5322
|
-
AVV_ERR_READY_TIMEOUT:
|
|
5323
|
-
} = 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");
|
|
5324
5341
|
function Nu(t, e, r) {
|
|
5325
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";
|
|
5326
5343
|
if (t[i])
|
|
@@ -5331,7 +5348,7 @@ function Nu(t, e, r) {
|
|
|
5331
5348
|
throw new nr(s);
|
|
5332
5349
|
t[i] = function(d, c) {
|
|
5333
5350
|
return r.use(d, c), this;
|
|
5334
|
-
}, Object.defineProperty(t, "then", { get: vi.bind(r) }), t[
|
|
5351
|
+
}, Object.defineProperty(t, "then", { get: vi.bind(r) }), t[Pt] = !0, t[o] = function(d) {
|
|
5335
5352
|
return typeof d != "function" ? r._loadRegistered() : (r.after(or(d, this)), this);
|
|
5336
5353
|
}, t[s] = function(d) {
|
|
5337
5354
|
if (d && typeof d != "function")
|
|
@@ -5352,10 +5369,10 @@ function z(t, e, r) {
|
|
|
5352
5369
|
const n = new z(t, e, r);
|
|
5353
5370
|
return t && Nu(t, e, n), n;
|
|
5354
5371
|
}
|
|
5355
|
-
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
|
|
5356
|
-
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;
|
|
5357
5374
|
}, this._closeQ = kn(this, Vu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
5358
|
-
this.emit("close"), this._closeQ.drain =
|
|
5375
|
+
this.emit("close"), this._closeQ.drain = Cn;
|
|
5359
5376
|
}, this._doStart = null, this._root = new Sr(this, Du.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5360
5377
|
const s = this.pluginTree.start(null, i, o);
|
|
5361
5378
|
this._root.once("loaded", (a, u, d) => {
|
|
@@ -5391,7 +5408,7 @@ function Fu(t) {
|
|
|
5391
5408
|
throw new ku(typeof t);
|
|
5392
5409
|
return t;
|
|
5393
5410
|
}
|
|
5394
|
-
z.prototype[
|
|
5411
|
+
z.prototype[Pt] = !0;
|
|
5395
5412
|
z.prototype.use = function(t, e) {
|
|
5396
5413
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
5397
5414
|
};
|
|
@@ -5402,7 +5419,7 @@ z.prototype._loadRegistered = function() {
|
|
|
5402
5419
|
Object.defineProperty(z.prototype, "then", { get: vi });
|
|
5403
5420
|
z.prototype._addPlugin = function(t, e, r) {
|
|
5404
5421
|
if (t = Fu(t), e = e || {}, this.booted)
|
|
5405
|
-
throw new
|
|
5422
|
+
throw new Cu();
|
|
5406
5423
|
const n = this._current[0], i = new Sr(this, t, e, r);
|
|
5407
5424
|
if (i.once("start", (o, s, a) => {
|
|
5408
5425
|
const u = this.pluginTree.start(n.name, s, a);
|
|
@@ -5471,7 +5488,7 @@ z.prototype.prettyPrint = function() {
|
|
|
5471
5488
|
z.prototype.toJSON = function() {
|
|
5472
5489
|
return this.pluginTree.toJSON();
|
|
5473
5490
|
};
|
|
5474
|
-
function
|
|
5491
|
+
function Cn() {
|
|
5475
5492
|
}
|
|
5476
5493
|
function vi() {
|
|
5477
5494
|
if (this.booted) {
|
|
@@ -5488,9 +5505,9 @@ function Si(t, e) {
|
|
|
5488
5505
|
const r = this._server, n = this._error;
|
|
5489
5506
|
let i;
|
|
5490
5507
|
if (this._error = null, t.length === 0)
|
|
5491
|
-
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);
|
|
5492
5509
|
else if (t.length === 1)
|
|
5493
|
-
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);
|
|
5494
5511
|
else if (this._timeout === 0) {
|
|
5495
5512
|
const o = (s) => {
|
|
5496
5513
|
this._error = s, e(this._error);
|
|
@@ -5504,7 +5521,7 @@ function Ru(t, e, r, n) {
|
|
|
5504
5521
|
Ye("setting up ready timeout", i, this._timeout);
|
|
5505
5522
|
let o = setTimeout(() => {
|
|
5506
5523
|
Ye("timed out", i), o = null;
|
|
5507
|
-
const a = new
|
|
5524
|
+
const a = new Lu(i);
|
|
5508
5525
|
a.fn = t, this._error = a, n(a);
|
|
5509
5526
|
}, this._timeout);
|
|
5510
5527
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5584,7 +5601,7 @@ function cc(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
|
5584
5601
|
onContentActivate: n?.onContentActivate,
|
|
5585
5602
|
withAd: n?.withAd,
|
|
5586
5603
|
withAdNotification: n?.withAdNotification
|
|
5587
|
-
}), 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) => {
|
|
5588
5605
|
if (a)
|
|
5589
5606
|
throw a;
|
|
5590
5607
|
u.ready(), d();
|