@streamlayer/sdk-web 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +332 -335
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { pino as pi } from "pino";
|
|
2
|
-
import { QuestionType as F, QuestionStatus as H,
|
|
2
|
+
import { QuestionType as F, QuestionStatus as H, NotificationEnabled as yi, SilenceSetting as gi, PromotionType as Te } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
3
|
import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as D } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
5
|
import { InvitationCategory as Dr, InvitationFrom as Rr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
-
import { computed as
|
|
6
|
+
import { computed as mi, map as vi, atom as Ct, batched as Vr, onMount as nt } from "nanostores";
|
|
7
7
|
import { nanoid as nr } from "nanoid";
|
|
8
|
-
import { ConnectError as tt, Code as oe, createContextKey as $r, createPromiseClient as Mr, createContextValues as
|
|
8
|
+
import { ConnectError as tt, Code as oe, createContextKey as $r, createPromiseClient as Mr, createContextValues as bi } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as jr } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Ur } from "@nanostores/query";
|
|
11
|
-
import { Events as
|
|
11
|
+
import { Events as Si } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as it } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
13
|
import { Users as vr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
14
|
import { Feed as re } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
15
|
import { Leaderboard as wn } 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 wi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
18
|
import { Kind as q, TopicSubType as we, TopicType as z, PollOpenedFrom as ee, Category as G, ScreenOrientation as Br } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
19
|
import { AnalyticsService as An } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
20
|
import { InteractionActionType as xr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
21
|
import { NotificationKind as he, NotificationType as qr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
-
function
|
|
22
|
+
function Ai(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
25
|
var En = { exports: {} }, $ = En.exports = {}, se, ae;
|
|
@@ -56,7 +56,7 @@ function In(t) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function Ei(t) {
|
|
60
60
|
if (ae === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
62
|
if ((ae === or || !ae) && clearTimeout)
|
|
@@ -72,19 +72,19 @@ function Ai(t) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
var ve = [], qe = !1, _e, ht = -1;
|
|
75
|
-
function
|
|
75
|
+
function Ii() {
|
|
76
76
|
!qe || !_e || (qe = !1, _e.length ? ve = _e.concat(ve) : ht = -1, ve.length && Tn());
|
|
77
77
|
}
|
|
78
78
|
function Tn() {
|
|
79
79
|
if (!qe) {
|
|
80
|
-
var t = In(
|
|
80
|
+
var t = In(Ii);
|
|
81
81
|
qe = !0;
|
|
82
82
|
for (var e = ve.length; e; ) {
|
|
83
83
|
for (_e = ve, ve = []; ++ht < e; )
|
|
84
84
|
_e && _e[ht].run();
|
|
85
85
|
ht = -1, e = ve.length;
|
|
86
86
|
}
|
|
87
|
-
_e = null, qe = !1,
|
|
87
|
+
_e = null, qe = !1, Ei(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
$.nextTick = function(t) {
|
|
@@ -132,8 +132,8 @@ $.chdir = function(t) {
|
|
|
132
132
|
$.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
const A = /* @__PURE__ */
|
|
135
|
+
var Ti = En.exports;
|
|
136
|
+
const A = /* @__PURE__ */ Ai(Ti), Oi = pi({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -141,23 +141,23 @@ const A = /* @__PURE__ */ wi(Ii), Ti = pi({
|
|
|
141
141
|
console.log(t);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}), le = (t, e) =>
|
|
145
|
-
class
|
|
144
|
+
}), le = (t, e) => Oi.child({ name: t }, e);
|
|
145
|
+
class _i extends Event {
|
|
146
146
|
slEventBus;
|
|
147
147
|
constructor(e, r) {
|
|
148
148
|
super(e), this.slEventBus = r;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
class
|
|
151
|
+
const Li = le("event-bus");
|
|
152
|
+
class Ci {
|
|
153
153
|
name;
|
|
154
154
|
listeners;
|
|
155
155
|
constructor(e = "sl-event-bus") {
|
|
156
156
|
this.name = e, this.listeners = /* @__PURE__ */ new Set();
|
|
157
157
|
}
|
|
158
158
|
emit = (e, r) => {
|
|
159
|
-
const n = new
|
|
160
|
-
|
|
159
|
+
const n = new _i(this.name, { ...r, type: e });
|
|
160
|
+
Li.debug(n, "Emitting event"), window.dispatchEvent(n);
|
|
161
161
|
};
|
|
162
162
|
listen(e) {
|
|
163
163
|
return window.addEventListener(this.name, e), this.listeners.add(e), () => {
|
|
@@ -173,7 +173,7 @@ class Li {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class ki {
|
|
177
177
|
}
|
|
178
178
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
179
179
|
class kt {
|
|
@@ -192,9 +192,9 @@ class kt {
|
|
|
192
192
|
return this.store;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const Pi = (t) => {
|
|
196
196
|
const e = Object.keys(t);
|
|
197
|
-
return
|
|
197
|
+
return mi(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
198
198
|
};
|
|
199
199
|
class Le extends kt {
|
|
200
200
|
getValues = () => this.getStore().get();
|
|
@@ -203,12 +203,12 @@ class Le extends kt {
|
|
|
203
203
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
204
204
|
unsubscribe = () => this.getStore().off();
|
|
205
205
|
}
|
|
206
|
-
const te = (t) =>
|
|
206
|
+
const te = (t) => vi(t);
|
|
207
207
|
var ye;
|
|
208
208
|
(function(t) {
|
|
209
209
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
210
210
|
})(ye || (ye = {}));
|
|
211
|
-
const
|
|
211
|
+
const Ni = {
|
|
212
212
|
[D.BETTING]: "betting",
|
|
213
213
|
[D.GAMES]: "games",
|
|
214
214
|
[D.PUBLIC_CHAT]: "publicChat",
|
|
@@ -226,7 +226,7 @@ class _n {
|
|
|
226
226
|
listeners = /* @__PURE__ */ new Set();
|
|
227
227
|
settingsKey;
|
|
228
228
|
constructor({ settings: e, ...r }, n) {
|
|
229
|
-
this.settingsKey =
|
|
229
|
+
this.settingsKey = Ni[r.type], this.status = Ct(Xe.Suspended), this.config = new Le(te(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(te(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(te({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
230
230
|
}
|
|
231
231
|
get featureConfig() {
|
|
232
232
|
return this.config.getStore();
|
|
@@ -315,8 +315,8 @@ class ce extends kt {
|
|
|
315
315
|
key = () => this.getStore().key;
|
|
316
316
|
off = () => this.getStore().off();
|
|
317
317
|
}
|
|
318
|
-
const J = new
|
|
319
|
-
async function*
|
|
318
|
+
const J = new Ci();
|
|
319
|
+
async function* Fi(t, e) {
|
|
320
320
|
for await (const r of e) {
|
|
321
321
|
t.response.message = r, t.received_at = Date.now(), t.id = Ln++;
|
|
322
322
|
const n = {
|
|
@@ -327,7 +327,7 @@ async function* Ni(t, e) {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
let Ln = 0;
|
|
330
|
-
const
|
|
330
|
+
const Di = () => (t) => async (e) => {
|
|
331
331
|
const r = {
|
|
332
332
|
id: Ln++,
|
|
333
333
|
name: e.url,
|
|
@@ -356,7 +356,7 @@ const Fi = () => (t) => async (e) => {
|
|
|
356
356
|
};
|
|
357
357
|
return window.postMessage(i), {
|
|
358
358
|
...n,
|
|
359
|
-
message:
|
|
359
|
+
message: Fi(r, n.message)
|
|
360
360
|
};
|
|
361
361
|
} else {
|
|
362
362
|
r.response.message = n.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -420,7 +420,7 @@ var Z;
|
|
|
420
420
|
(function(t) {
|
|
421
421
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
422
422
|
})(Z || (Z = {}));
|
|
423
|
-
class
|
|
423
|
+
class Ri {
|
|
424
424
|
params;
|
|
425
425
|
streamCancel;
|
|
426
426
|
method;
|
|
@@ -527,7 +527,7 @@ class Di {
|
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const Vi = /* @__PURE__ */ new Set([
|
|
531
531
|
oe.Unknown,
|
|
532
532
|
oe.Internal,
|
|
533
533
|
oe.DeadlineExceeded,
|
|
@@ -535,7 +535,7 @@ const Ri = /* @__PURE__ */ new Set([
|
|
|
535
535
|
oe.FailedPrecondition,
|
|
536
536
|
oe.Unavailable,
|
|
537
537
|
oe.DataLoss
|
|
538
|
-
]), Qr = le("grpc:retry"),
|
|
538
|
+
]), Qr = le("grpc:retry"), $i = (t) => async (e) => {
|
|
539
539
|
const r = e.contextValues.get(sr.retryAttempts), n = 300, i = e.contextValues.get(sr.retryDelay);
|
|
540
540
|
if (e.stream || r === 0)
|
|
541
541
|
return t(e);
|
|
@@ -546,7 +546,7 @@ const Ri = /* @__PURE__ */ new Set([
|
|
|
546
546
|
} catch (s) {
|
|
547
547
|
Qr.trace({ attempt: o, error: s }, "retry attempt");
|
|
548
548
|
const a = tt.from(s);
|
|
549
|
-
if (o >= r || !(a instanceof tt) || !
|
|
549
|
+
if (o >= r || !(a instanceof tt) || !Vi.has(a.code))
|
|
550
550
|
throw s;
|
|
551
551
|
const u = Math.min(i, Math.pow(2, o) * n), f = Math.round(u * (1 + Math.random()) / 2);
|
|
552
552
|
await new Promise((c) => setTimeout(c, f));
|
|
@@ -554,13 +554,13 @@ const Ri = /* @__PURE__ */ new Set([
|
|
|
554
554
|
}, sr = {
|
|
555
555
|
retryAttempts: $r(10, { description: "Number of attempts to retry" }),
|
|
556
556
|
retryDelay: $r(3e4, { description: "Max delay between retries in milliseconds" })
|
|
557
|
-
},
|
|
557
|
+
}, Mi = () => {
|
|
558
558
|
const t = localStorage.getItem("sl-device-id");
|
|
559
559
|
if (t)
|
|
560
560
|
return t;
|
|
561
561
|
const e = nr();
|
|
562
562
|
return localStorage.setItem("sl-device-id", e), e;
|
|
563
|
-
},
|
|
563
|
+
}, ji = () => navigator.userAgentData?.platform || navigator.platform;
|
|
564
564
|
class Gr {
|
|
565
565
|
toJsonOptions = {
|
|
566
566
|
emitDefaultValues: !1,
|
|
@@ -581,8 +581,8 @@ class Gr {
|
|
|
581
581
|
opts;
|
|
582
582
|
constructor(e, r) {
|
|
583
583
|
this.host = e, this.opts = r, this.$headers = new Le(te({
|
|
584
|
-
"sl-device-id":
|
|
585
|
-
"sl-device-os":
|
|
584
|
+
"sl-device-id": Mi(),
|
|
585
|
+
"sl-device-os": ji()
|
|
586
586
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
587
587
|
const [n, i, o] = Ur({
|
|
588
588
|
dedupeTime: r?.dedupeTime,
|
|
@@ -606,7 +606,7 @@ class Gr {
|
|
|
606
606
|
const i = this.subscriptions.get(r);
|
|
607
607
|
if (i)
|
|
608
608
|
return i;
|
|
609
|
-
const o = new
|
|
609
|
+
const o = new Ri(this.$headers, e, r, n);
|
|
610
610
|
return this.subscriptions.set(r, o), o;
|
|
611
611
|
};
|
|
612
612
|
removeSubscription = (e) => {
|
|
@@ -651,7 +651,7 @@ class Gr {
|
|
|
651
651
|
...Array.isArray(r) ? r : [r]
|
|
652
652
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
653
653
|
return { client: i, createRequestOptions: (f) => {
|
|
654
|
-
const c =
|
|
654
|
+
const c = bi();
|
|
655
655
|
for (const h in f) {
|
|
656
656
|
const l = sr[h];
|
|
657
657
|
c.set(l, f[h]);
|
|
@@ -679,11 +679,11 @@ class Gr {
|
|
|
679
679
|
n.header.set(o, i[o]);
|
|
680
680
|
return r(n);
|
|
681
681
|
};
|
|
682
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
682
|
+
this.interceptors.push(e), this.interceptors.push(Di()), this.opts?.retryable && this.interceptors.push($i);
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
const
|
|
686
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
685
|
+
const Ui = (t, e) => {
|
|
686
|
+
const { client: r, queryKey: n } = e.createPromiseClient(Si, {
|
|
687
687
|
method: "retrieveEventId",
|
|
688
688
|
params: [t]
|
|
689
689
|
});
|
|
@@ -700,7 +700,7 @@ const ji = (t, e) => {
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
|
-
},
|
|
703
|
+
}, Bi = (t, e) => {
|
|
704
704
|
const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "getStream", params: [t] });
|
|
705
705
|
return e.nanoquery.createFetcherStore(n, {
|
|
706
706
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
@@ -708,7 +708,7 @@ const ji = (t, e) => {
|
|
|
708
708
|
// we are sure that id is a string
|
|
709
709
|
})).data?.attributes : void 0
|
|
710
710
|
});
|
|
711
|
-
},
|
|
711
|
+
}, xi = (t, e) => {
|
|
712
712
|
const { queryKey: r, client: n } = e.createPromiseClient(vr, { method: "me", params: [t] });
|
|
713
713
|
return e.nanoquery.createFetcherStore(r, {
|
|
714
714
|
fetcher: async () => {
|
|
@@ -716,15 +716,15 @@ const ji = (t, e) => {
|
|
|
716
716
|
return { data: i };
|
|
717
717
|
}
|
|
718
718
|
});
|
|
719
|
-
},
|
|
719
|
+
}, qi = (t) => {
|
|
720
720
|
const { client: e, createRequestOptions: r } = t.createPromiseClient(vr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
721
721
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
722
|
-
},
|
|
722
|
+
}, Qi = (t, e) => {
|
|
723
723
|
const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "get", params: [t] });
|
|
724
724
|
return e.nanoquery.createFetcherStore(n, {
|
|
725
725
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
726
726
|
});
|
|
727
|
-
},
|
|
727
|
+
}, Gi = (t, e) => {
|
|
728
728
|
const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "getOrganization", params: [t] });
|
|
729
729
|
return e.nanoquery.createFetcherStore(n, {
|
|
730
730
|
fetcher: async () => {
|
|
@@ -735,7 +735,7 @@ const ji = (t, e) => {
|
|
|
735
735
|
} : void 0;
|
|
736
736
|
}
|
|
737
737
|
});
|
|
738
|
-
},
|
|
738
|
+
}, Ki = (t, e) => {
|
|
739
739
|
const { client: r, queryKey: n } = e.createPromiseClient(it, {
|
|
740
740
|
method: "getOrganizationAdvertising",
|
|
741
741
|
params: [t]
|
|
@@ -743,7 +743,7 @@ const ji = (t, e) => {
|
|
|
743
743
|
return e.nanoquery.createFetcherStore(n, {
|
|
744
744
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
745
745
|
});
|
|
746
|
-
},
|
|
746
|
+
}, zi = (t, e, r) => {
|
|
747
747
|
t.transport = new Gr(e.host, {
|
|
748
748
|
dedupeTime: 1e3 * 60 * 5,
|
|
749
749
|
refetchInterval: 1e3 * 60 * 5,
|
|
@@ -785,19 +785,19 @@ var ge;
|
|
|
785
785
|
(function(t) {
|
|
786
786
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
787
787
|
})(ge || (ge = {}));
|
|
788
|
-
const
|
|
789
|
-
const e = new Ue(), r = new Y(B(e.getExternalToken()), "userKey"), n = new Y(B(e.getToken()), "userToken"), i = new ce(
|
|
788
|
+
const Hi = (t) => {
|
|
789
|
+
const e = new Ue(), r = new Y(B(e.getExternalToken()), "userKey"), n = new Y(B(e.getToken()), "userToken"), i = new ce(xi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, f) => {
|
|
790
790
|
if (!a)
|
|
791
791
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : f;
|
|
792
|
-
}), o = new ce(
|
|
792
|
+
}), o = new ce(Qi(n.getStore(), t), "userSettings");
|
|
793
793
|
return {
|
|
794
794
|
userKey: r,
|
|
795
795
|
userToken: n,
|
|
796
796
|
user: i,
|
|
797
797
|
userSettings: o
|
|
798
798
|
};
|
|
799
|
-
},
|
|
800
|
-
const e = new Y(B(void 0), "providerStreamId"), r = new ce(
|
|
799
|
+
}, Wi = (t) => {
|
|
800
|
+
const e = new Y(B(void 0), "providerStreamId"), r = new ce(Ui(e.getStore(), t), "slStreamId", (i) => i?.data), n = new ce(Bi(r.getAtomStore(), t), "streamSettings");
|
|
801
801
|
return r.getAtomStore().listen((i) => {
|
|
802
802
|
(i === "" || i === void 0) && n.getStore().mutate(void 0);
|
|
803
803
|
}), {
|
|
@@ -805,8 +805,8 @@ const zi = (t) => {
|
|
|
805
805
|
slStreamId: r,
|
|
806
806
|
streamSettings: n
|
|
807
807
|
};
|
|
808
|
-
},
|
|
809
|
-
const e = new Y(B(void 0), "enabled"), r = new Y(B(ge.DISABLED), "status"), n = new ce(
|
|
808
|
+
}, Yi = (t) => {
|
|
809
|
+
const e = new Y(B(void 0), "enabled"), r = new Y(B(ge.DISABLED), "status"), n = new ce(Gi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(Ki(n.getAtomStore(), t), "organizationAdvertising"), o = Hi(t), s = Wi(t);
|
|
810
810
|
return {
|
|
811
811
|
enabled: e,
|
|
812
812
|
status: r,
|
|
@@ -821,10 +821,10 @@ const zi = (t) => {
|
|
|
821
821
|
organizationAdvertising: i
|
|
822
822
|
};
|
|
823
823
|
};
|
|
824
|
-
class
|
|
824
|
+
class Ji extends kt {
|
|
825
825
|
stores;
|
|
826
826
|
constructor(e) {
|
|
827
|
-
const r =
|
|
827
|
+
const r = Yi(e), n = Pi(r);
|
|
828
828
|
super(n, "core"), this.stores = r;
|
|
829
829
|
}
|
|
830
830
|
getValue() {
|
|
@@ -845,17 +845,17 @@ class Yi extends kt {
|
|
|
845
845
|
};
|
|
846
846
|
unsubscribe = () => this.getStore().off();
|
|
847
847
|
}
|
|
848
|
-
const
|
|
849
|
-
t.store = new
|
|
848
|
+
const Xi = (t, e, r) => {
|
|
849
|
+
t.store = new Ji(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
850
850
|
t.store.unsubscribe();
|
|
851
851
|
}, r();
|
|
852
|
-
},
|
|
852
|
+
}, Zi = (t) => {
|
|
853
853
|
const { client: e } = t.createPromiseClient(wn, { method: "list" });
|
|
854
854
|
return (r) => e.list(r);
|
|
855
855
|
}, kn = (t) => {
|
|
856
856
|
const { client: e } = t.createPromiseClient(wn, { method: "summary" });
|
|
857
857
|
return (r) => e.summary(r);
|
|
858
|
-
},
|
|
858
|
+
}, eo = (t, e) => {
|
|
859
859
|
const { client: r, queryKey: n } = e.createPromiseClient(vr, {
|
|
860
860
|
method: "getFriends",
|
|
861
861
|
params: [t]
|
|
@@ -871,7 +871,7 @@ const Ji = (t, e, r) => {
|
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
873
|
});
|
|
874
|
-
},
|
|
874
|
+
}, to = (t, e) => {
|
|
875
875
|
const { client: r, queryKey: n } = e.createPromiseClient(re, { method: "get", params: [t] });
|
|
876
876
|
return e.nanoquery.createFetcherStore(n, {
|
|
877
877
|
fetcher: async (i, o, s) => (await r.get({
|
|
@@ -880,7 +880,7 @@ const Ji = (t, e, r) => {
|
|
|
880
880
|
refetchInterval: 0,
|
|
881
881
|
dedupeTime: 1e3 * 60 * 60
|
|
882
882
|
});
|
|
883
|
-
},
|
|
883
|
+
}, ro = (t, e) => {
|
|
884
884
|
const { client: r, queryKey: n } = e.createPromiseClient(re, { method: "syncQuestion", params: [t] });
|
|
885
885
|
return e.nanoquery.createFetcherStore(n, {
|
|
886
886
|
fetcher: async (i, o, s) => s ? (await r.syncQuestion({
|
|
@@ -892,17 +892,17 @@ const Ji = (t, e, r) => {
|
|
|
892
892
|
// 10 minutes
|
|
893
893
|
refetchInterval: 0
|
|
894
894
|
});
|
|
895
|
-
},
|
|
895
|
+
}, no = async (t, e) => {
|
|
896
896
|
const { client: r } = e.createPromiseClient(re, { method: "item", params: [t] });
|
|
897
897
|
return (await r.item({
|
|
898
898
|
id: t
|
|
899
899
|
})).data;
|
|
900
|
-
},
|
|
900
|
+
}, io = (t, e) => {
|
|
901
901
|
const { client: r } = e.createStreamClient(re), n = Ct({ eventId: t.get() || "", feedId: "" });
|
|
902
902
|
return t.subscribe((o = "") => {
|
|
903
903
|
n.set({ eventId: o, feedId: "" });
|
|
904
904
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
905
|
-
},
|
|
905
|
+
}, oo = (t, e) => {
|
|
906
906
|
const { client: r } = e.createStreamClient(re);
|
|
907
907
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
908
908
|
}, ar = (t, e) => {
|
|
@@ -913,14 +913,14 @@ const Ji = (t, e, r) => {
|
|
|
913
913
|
})).data?.attributes?.question,
|
|
914
914
|
dedupeTime: 1e3 * 60 * 5
|
|
915
915
|
});
|
|
916
|
-
},
|
|
916
|
+
}, so = async (t, e) => {
|
|
917
917
|
if (!t)
|
|
918
918
|
return;
|
|
919
919
|
const { client: r } = e.createPromiseClient(re, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
|
|
920
920
|
id: t
|
|
921
|
-
});
|
|
922
|
-
return
|
|
923
|
-
},
|
|
921
|
+
}), i = n.data?.attributes?.options?.options.case === "promotion" ? n.data?.attributes?.options?.options.value : void 0;
|
|
922
|
+
return i ? { promotions: i, notification: n.data?.attributes?.notification } : void 0;
|
|
923
|
+
}, ao = (t, e, r) => {
|
|
924
924
|
const { client: n, queryKey: i } = r.createPromiseClient(re, {
|
|
925
925
|
method: "list",
|
|
926
926
|
params: [t, e]
|
|
@@ -936,7 +936,7 @@ const Ji = (t, e, r) => {
|
|
|
936
936
|
dedupeTime: 0,
|
|
937
937
|
refetchInterval: 0
|
|
938
938
|
});
|
|
939
|
-
},
|
|
939
|
+
}, uo = (t, e) => {
|
|
940
940
|
const { client: r, queryKey: n } = e.createPromiseClient(re, {
|
|
941
941
|
method: "list",
|
|
942
942
|
params: [t]
|
|
@@ -958,7 +958,7 @@ const Ji = (t, e, r) => {
|
|
|
958
958
|
dedupeTime: 0,
|
|
959
959
|
refetchInterval: 0
|
|
960
960
|
});
|
|
961
|
-
},
|
|
961
|
+
}, co = (t, e, r) => {
|
|
962
962
|
const n = Vr([e, r], () => {
|
|
963
963
|
const a = e.get();
|
|
964
964
|
if (!a)
|
|
@@ -994,7 +994,7 @@ var St;
|
|
|
994
994
|
(function(t) {
|
|
995
995
|
t.SHOWED = "showed";
|
|
996
996
|
})(St || (St = {}));
|
|
997
|
-
class
|
|
997
|
+
class lo extends He {
|
|
998
998
|
constructor() {
|
|
999
999
|
super("advertisement");
|
|
1000
1000
|
}
|
|
@@ -1003,7 +1003,7 @@ class co extends He {
|
|
|
1003
1003
|
};
|
|
1004
1004
|
isShowed = (e) => this.read(St.SHOWED, e);
|
|
1005
1005
|
}
|
|
1006
|
-
class
|
|
1006
|
+
class fo {
|
|
1007
1007
|
advertisementList;
|
|
1008
1008
|
store;
|
|
1009
1009
|
timeouts;
|
|
@@ -1085,13 +1085,13 @@ class lo {
|
|
|
1085
1085
|
this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.advertisementList.off(), this.advertisementList.set(/* @__PURE__ */ new Map());
|
|
1086
1086
|
};
|
|
1087
1087
|
}
|
|
1088
|
-
const
|
|
1089
|
-
const n = r.transport, i = le("advertisement_queue"), o = new
|
|
1088
|
+
const ho = (t, e, r) => {
|
|
1089
|
+
const n = r.transport, i = le("advertisement_queue"), o = new fo({ concurrency: 1, animationDelay: 1e3 }), s = new lo(), a = new ce(uo(t, n), "gamification:promotionList"), u = (l, g) => {
|
|
1090
1090
|
J.emit("advertisement", {
|
|
1091
1091
|
action: "received",
|
|
1092
1092
|
payload: {
|
|
1093
1093
|
advertisementId: l,
|
|
1094
|
-
advertisementType: g?.type
|
|
1094
|
+
advertisementType: g?.promotions.type
|
|
1095
1095
|
}
|
|
1096
1096
|
}), o.addToQueue({
|
|
1097
1097
|
id: l,
|
|
@@ -1101,8 +1101,13 @@ const fo = (t, e, r) => {
|
|
|
1101
1101
|
promise: async function() {
|
|
1102
1102
|
this.data.setKey("loading", !0);
|
|
1103
1103
|
try {
|
|
1104
|
-
const v = g || await
|
|
1105
|
-
|
|
1104
|
+
const v = g || await so(l, n);
|
|
1105
|
+
r.sdk.onAdvertisementActivate({
|
|
1106
|
+
stage: "activate",
|
|
1107
|
+
id: l,
|
|
1108
|
+
hasNotification: v?.notification?.enabled === yi.NOTIFICATION_ENABLED,
|
|
1109
|
+
isShowed: !!s.isShowed(l)
|
|
1110
|
+
}), v ? this.data.setKey("data", v) : this.data.setKey("error", new Error("No promotion found"));
|
|
1106
1111
|
} catch (v) {
|
|
1107
1112
|
this.data.setKey("error", v);
|
|
1108
1113
|
} finally {
|
|
@@ -1126,18 +1131,14 @@ const fo = (t, e, r) => {
|
|
|
1126
1131
|
action: "opened",
|
|
1127
1132
|
payload: {
|
|
1128
1133
|
advertisementId: v.id,
|
|
1129
|
-
advertisementType: w.data?.type
|
|
1134
|
+
advertisementType: w.data?.promotions.type
|
|
1130
1135
|
}
|
|
1131
1136
|
}), v);
|
|
1132
1137
|
};
|
|
1133
1138
|
return a.subscribe((l) => {
|
|
1134
1139
|
if (l.data) {
|
|
1135
1140
|
const g = l.data[l.data.length - 1];
|
|
1136
|
-
g &&
|
|
1137
|
-
stage: "activate",
|
|
1138
|
-
id: g.id,
|
|
1139
|
-
isShowed: !!s.isShowed(g.id)
|
|
1140
|
-
});
|
|
1141
|
+
g && u(g.id);
|
|
1141
1142
|
}
|
|
1142
1143
|
}), e.addListener("promotion cb", (l) => {
|
|
1143
1144
|
const g = l.data?.attributes?.feedItem?.attributes?.attributes?.case === "promotion" ? l.data.attributes.feedItem.attributes : void 0, v = l.data?.attributes?.question?.options?.options.case === "promotion" ? l.data.attributes.question.options.options.value : void 0;
|
|
@@ -1146,18 +1147,11 @@ const fo = (t, e, r) => {
|
|
|
1146
1147
|
return;
|
|
1147
1148
|
}
|
|
1148
1149
|
if (g.status === H.RESOLVED) {
|
|
1149
|
-
|
|
1150
|
-
stage: "deactivate",
|
|
1151
|
-
id: g.id
|
|
1152
|
-
}), i.debug({ feedItem: g }, "resolved: %o");
|
|
1150
|
+
c(g.id), i.debug({ feedItem: g }, "resolved: %o");
|
|
1153
1151
|
return;
|
|
1154
1152
|
}
|
|
1155
1153
|
if (g.status === H.ACTIVE) {
|
|
1156
|
-
i.debug({ feedItem: g }, "active: %o"),
|
|
1157
|
-
stage: "activate",
|
|
1158
|
-
id: g.id,
|
|
1159
|
-
isShowed: !!s.isShowed(g.id)
|
|
1160
|
-
});
|
|
1154
|
+
i.debug({ feedItem: g }, "active: %o"), u(g.id);
|
|
1161
1155
|
return;
|
|
1162
1156
|
}
|
|
1163
1157
|
i.debug({ feedItem: g }, "skip: %o");
|
|
@@ -1178,7 +1172,10 @@ const fo = (t, e, r) => {
|
|
|
1178
1172
|
return;
|
|
1179
1173
|
}
|
|
1180
1174
|
if (g.status === H.ACTIVE) {
|
|
1181
|
-
i.debug({ feedItem: g }, "active: %o"), u(g.id,
|
|
1175
|
+
i.debug({ feedItem: g }, "active: %o"), u(g.id, {
|
|
1176
|
+
promotions: v,
|
|
1177
|
+
notification: l.data?.attributes?.question?.notification
|
|
1178
|
+
});
|
|
1182
1179
|
return;
|
|
1183
1180
|
}
|
|
1184
1181
|
i.debug({ feedItem: g }, "skip: %o");
|
|
@@ -1189,7 +1186,7 @@ var Ce;
|
|
|
1189
1186
|
(function(t) {
|
|
1190
1187
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
1191
1188
|
})(Ce || (Ce = {}));
|
|
1192
|
-
class
|
|
1189
|
+
class po {
|
|
1193
1190
|
/** sl event id */
|
|
1194
1191
|
slStreamId;
|
|
1195
1192
|
/** organization id */
|
|
@@ -1222,11 +1219,11 @@ class ho {
|
|
|
1222
1219
|
transport;
|
|
1223
1220
|
cancels = /* @__PURE__ */ new Set();
|
|
1224
1221
|
constructor(e) {
|
|
1225
|
-
this.transport = e.transport, this.log = le("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new Y(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new Y(B(Ce.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new Y(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(
|
|
1226
|
-
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription =
|
|
1222
|
+
this.transport = e.transport, this.log = le("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new Y(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new Y(B(Ce.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new Y(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(to(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ce(ao(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = ro(this.slStreamId, e.transport), this.openedQuestion = co(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
|
|
1223
|
+
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = oo(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
1227
1224
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
1228
1225
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1229
|
-
})), this.feedSubscription =
|
|
1226
|
+
})), this.feedSubscription = io(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
1230
1227
|
const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
|
|
1231
1228
|
!i || i.type === F.PROMOTION || n && i.status === H.RESOLVED && i.id !== n || this.activeQuestionId.mutate(r.data?.attributes);
|
|
1232
1229
|
})), this.cancels.add(this.feedSubscription.addListener("moderation update", (r) => {
|
|
@@ -1241,7 +1238,7 @@ class ho {
|
|
|
1241
1238
|
this.activeQuestionId.off();
|
|
1242
1239
|
for (const r of this.cancels)
|
|
1243
1240
|
r(), this.cancels.delete(r);
|
|
1244
|
-
}), this.advertisement =
|
|
1241
|
+
}), this.advertisement = ho(this.slStreamId, this.feedSubscription, e);
|
|
1245
1242
|
}
|
|
1246
1243
|
/**
|
|
1247
1244
|
* Get id for notifications and link with current session
|
|
@@ -1271,7 +1268,7 @@ class ho {
|
|
|
1271
1268
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1272
1269
|
};
|
|
1273
1270
|
}
|
|
1274
|
-
class
|
|
1271
|
+
class yo {
|
|
1275
1272
|
notificationsList;
|
|
1276
1273
|
store;
|
|
1277
1274
|
timeouts;
|
|
@@ -1356,7 +1353,7 @@ var wt;
|
|
|
1356
1353
|
(function(t) {
|
|
1357
1354
|
t.OPENED = "opened";
|
|
1358
1355
|
})(wt || (wt = {}));
|
|
1359
|
-
class
|
|
1356
|
+
class go extends He {
|
|
1360
1357
|
constructor() {
|
|
1361
1358
|
super("notification");
|
|
1362
1359
|
}
|
|
@@ -1372,11 +1369,11 @@ var Ae;
|
|
|
1372
1369
|
(function(t) {
|
|
1373
1370
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1374
1371
|
})(Ae || (Ae = {}));
|
|
1375
|
-
class
|
|
1372
|
+
class mo {
|
|
1376
1373
|
queue;
|
|
1377
1374
|
storage;
|
|
1378
1375
|
constructor(e = {}) {
|
|
1379
|
-
this.storage = new
|
|
1376
|
+
this.storage = new go(), this.queue = new yo({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1380
1377
|
}
|
|
1381
1378
|
isViewed = (e) => this.storage.isOpened(e);
|
|
1382
1379
|
add = (e) => {
|
|
@@ -1413,8 +1410,8 @@ class go {
|
|
|
1413
1410
|
this.storage.setOpened(e);
|
|
1414
1411
|
};
|
|
1415
1412
|
}
|
|
1416
|
-
const
|
|
1417
|
-
t.notifications = new
|
|
1413
|
+
const vo = (t, e, r) => {
|
|
1414
|
+
t.notifications = new mo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1418
1415
|
t.notifications.queue.drain();
|
|
1419
1416
|
}), r();
|
|
1420
1417
|
};
|
|
@@ -1422,14 +1419,14 @@ var rt;
|
|
|
1422
1419
|
(function(t) {
|
|
1423
1420
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1424
1421
|
})(rt || (rt = {}));
|
|
1425
|
-
const
|
|
1422
|
+
const bo = async (t, e) => {
|
|
1426
1423
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1427
1424
|
try {
|
|
1428
1425
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1429
1426
|
} catch (o) {
|
|
1430
1427
|
throw tt.from(o)?.code === oe.AlreadyExists ? new Error(rt.ALREADY_VOTED) : new Error(rt.UNKNOWN);
|
|
1431
1428
|
}
|
|
1432
|
-
},
|
|
1429
|
+
}, So = (t, e) => {
|
|
1433
1430
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1434
1431
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1435
1432
|
};
|
|
@@ -1437,7 +1434,7 @@ var Be;
|
|
|
1437
1434
|
(function(t) {
|
|
1438
1435
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1439
1436
|
})(Be || (Be = {}));
|
|
1440
|
-
class
|
|
1437
|
+
class wo extends He {
|
|
1441
1438
|
constructor() {
|
|
1442
1439
|
super("gamification-session", window.sessionStorage);
|
|
1443
1440
|
}
|
|
@@ -1449,7 +1446,7 @@ class So extends He {
|
|
|
1449
1446
|
class Pn extends He {
|
|
1450
1447
|
sessionStorage;
|
|
1451
1448
|
constructor() {
|
|
1452
|
-
super("gamification"), this.sessionStorage = new
|
|
1449
|
+
super("gamification"), this.sessionStorage = new wo();
|
|
1453
1450
|
}
|
|
1454
1451
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1455
1452
|
this.write(Be.ONBOARDING, n, e, r, i);
|
|
@@ -1460,17 +1457,17 @@ class Pn extends He {
|
|
|
1460
1457
|
};
|
|
1461
1458
|
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Be.ONBOARDING_IO, n, e, r]);
|
|
1462
1459
|
}
|
|
1463
|
-
const
|
|
1460
|
+
const Ao = {
|
|
1464
1461
|
pageSize: 10
|
|
1465
|
-
},
|
|
1462
|
+
}, Eo = (t, e, r, n, i) => {
|
|
1466
1463
|
let o = 0;
|
|
1467
|
-
const s = B({ pageSize:
|
|
1464
|
+
const s = B({ pageSize: Ao.pageSize, page: 0 }), a = te({
|
|
1468
1465
|
data: [],
|
|
1469
1466
|
key: Date.now(),
|
|
1470
1467
|
hasMore: !0,
|
|
1471
1468
|
loading: void 0,
|
|
1472
1469
|
error: void 0
|
|
1473
|
-
}), u =
|
|
1470
|
+
}), u = Zi(t), f = async () => {
|
|
1474
1471
|
const l = e.get(), g = n.getStore().get().data?.map((v) => v.slId) || [];
|
|
1475
1472
|
if (l && g?.length) {
|
|
1476
1473
|
const v = r.get();
|
|
@@ -1502,7 +1499,7 @@ const wo = {
|
|
|
1502
1499
|
};
|
|
1503
1500
|
}), { $store: a, fetchMore: h, invalidate: c };
|
|
1504
1501
|
};
|
|
1505
|
-
class
|
|
1502
|
+
class Io extends He {
|
|
1506
1503
|
get = this.read;
|
|
1507
1504
|
set = this.write;
|
|
1508
1505
|
del = this.remove;
|
|
@@ -1510,12 +1507,12 @@ class Eo extends He {
|
|
|
1510
1507
|
super("deep-link-context", window.sessionStorage);
|
|
1511
1508
|
}
|
|
1512
1509
|
}
|
|
1513
|
-
const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid",
|
|
1510
|
+
const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", To = /* @__PURE__ */ new Set([Pt, Nn, Fn]), zr = (t) => {
|
|
1514
1511
|
const e = {}, r = {};
|
|
1515
1512
|
for (const [n, i] of t)
|
|
1516
|
-
|
|
1513
|
+
To.has(n) ? e[n] = i : r[n] = i;
|
|
1517
1514
|
return { result: e, remain: r };
|
|
1518
|
-
},
|
|
1515
|
+
}, Oo = ({ hash: t, search: e }) => {
|
|
1519
1516
|
if (t && t.includes(Kr)) {
|
|
1520
1517
|
const r = new URLSearchParams(t.substr(1));
|
|
1521
1518
|
return { hash: zr(r) };
|
|
@@ -1532,10 +1529,10 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Io = /*
|
|
|
1532
1529
|
trace: (...t) => {
|
|
1533
1530
|
Hr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1534
1531
|
}
|
|
1535
|
-
},
|
|
1532
|
+
}, _o = (t, e) => {
|
|
1536
1533
|
const { hash: r, search: n } = window.location;
|
|
1537
1534
|
if (ue.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1538
|
-
const i =
|
|
1535
|
+
const i = Oo({ hash: r, search: n });
|
|
1539
1536
|
if (ue.debug(i, "parse deep link result"), i) {
|
|
1540
1537
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1541
1538
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1554,8 +1551,8 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Io = /*
|
|
|
1554
1551
|
}
|
|
1555
1552
|
}
|
|
1556
1553
|
t.setValue("parsed", !0);
|
|
1557
|
-
},
|
|
1558
|
-
const n = new
|
|
1554
|
+
}, Lo = (t, e, r) => {
|
|
1555
|
+
const n = new Io(), i = n.get("sl-deep-link-store");
|
|
1559
1556
|
let o = {};
|
|
1560
1557
|
if (i)
|
|
1561
1558
|
try {
|
|
@@ -1593,15 +1590,15 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Io = /*
|
|
|
1593
1590
|
console.error(f);
|
|
1594
1591
|
}
|
|
1595
1592
|
};
|
|
1596
|
-
|
|
1597
|
-
},
|
|
1598
|
-
class
|
|
1593
|
+
_o(t.deepLink.$store, s), r();
|
|
1594
|
+
}, Co = le("bypass");
|
|
1595
|
+
class ko extends ki {
|
|
1599
1596
|
$coreStore;
|
|
1600
1597
|
deepLink;
|
|
1601
1598
|
transport;
|
|
1602
1599
|
bypassLogin;
|
|
1603
1600
|
constructor(e, r, n) {
|
|
1604
|
-
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin =
|
|
1601
|
+
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = qi(this.transport), this.connect();
|
|
1605
1602
|
}
|
|
1606
1603
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1607
1604
|
/**
|
|
@@ -1613,7 +1610,7 @@ class Co extends Ci {
|
|
|
1613
1610
|
login = async (e, r) => {
|
|
1614
1611
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1615
1612
|
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Pt];
|
|
1616
|
-
|
|
1613
|
+
Co.debug({ inviterKey: o }, "login with inviterKey");
|
|
1617
1614
|
const s = await this.bypassLogin({
|
|
1618
1615
|
schema: e,
|
|
1619
1616
|
userKey: r,
|
|
@@ -1682,8 +1679,8 @@ class Co extends Ci {
|
|
|
1682
1679
|
});
|
|
1683
1680
|
};
|
|
1684
1681
|
}
|
|
1685
|
-
const Je = new Ue(),
|
|
1686
|
-
t.auth = new
|
|
1682
|
+
const Je = new Ue(), Po = (t, e, r) => {
|
|
1683
|
+
t.auth = new ko(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1687
1684
|
n === ge.READY && t.auth.reLogin();
|
|
1688
1685
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1689
1686
|
if (!(Je.getSchema() === n && Je.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
@@ -1702,7 +1699,7 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1702
1699
|
trace: (...t) => {
|
|
1703
1700
|
Wr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1704
1701
|
}
|
|
1705
|
-
},
|
|
1702
|
+
}, No = (t, e, r) => {
|
|
1706
1703
|
t.videoPlayer = {
|
|
1707
1704
|
controllers: /* @__PURE__ */ new Set()
|
|
1708
1705
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
@@ -1720,13 +1717,13 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1720
1717
|
}
|
|
1721
1718
|
}
|
|
1722
1719
|
}, r();
|
|
1723
|
-
},
|
|
1720
|
+
}, Fo = (t, e, r) => {
|
|
1724
1721
|
t.ui = {
|
|
1725
1722
|
state: /* @__PURE__ */ new Set()
|
|
1726
1723
|
}, e.onContentActivate && (t.ui.onContentActivate = e.onContentActivate), t.sdk.onAdvertisementActivate = (n) => {
|
|
1727
1724
|
t.ui.onContentActivate && t.ui.onContentActivate({ ...n, type: "advertisement" });
|
|
1728
1725
|
}, r();
|
|
1729
|
-
},
|
|
1726
|
+
}, Do = (t, e, r) => {
|
|
1730
1727
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1731
1728
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1732
1729
|
if (i.has(s)) {
|
|
@@ -1753,7 +1750,7 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1753
1750
|
}, t.sdk.createEventSession = (s) => {
|
|
1754
1751
|
t.stores.providerStreamId.setValue(s);
|
|
1755
1752
|
}, r();
|
|
1756
|
-
},
|
|
1753
|
+
}, Ro = (t, e) => {
|
|
1757
1754
|
const { client: r, queryKey: n } = t.createPromiseClient(it, {
|
|
1758
1755
|
method: "generateDeepLink",
|
|
1759
1756
|
params: e
|
|
@@ -1774,17 +1771,17 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1774
1771
|
// 24 hours
|
|
1775
1772
|
refetchInterval: 0
|
|
1776
1773
|
});
|
|
1777
|
-
},
|
|
1778
|
-
const { client: n } = t.createPromiseClient(
|
|
1774
|
+
}, Vo = (t, { web: e, mobile: r }) => {
|
|
1775
|
+
const { client: n } = t.createPromiseClient(wi, { method: "generate" });
|
|
1779
1776
|
return n.generate({ web: e, mobile: r });
|
|
1780
1777
|
}, Yr = (t, e) => {
|
|
1781
1778
|
const r = new URLSearchParams(t);
|
|
1782
1779
|
for (const [n, i] of Object.entries(e))
|
|
1783
1780
|
r.append(n, i);
|
|
1784
1781
|
return r.toString();
|
|
1785
|
-
},
|
|
1782
|
+
}, $o = (t, e, r, n) => {
|
|
1786
1783
|
const i = te({});
|
|
1787
|
-
return nt(i, () =>
|
|
1784
|
+
return nt(i, () => Ro(t, [e, r]).subscribe(async ({ data: a, error: u, loading: f }) => {
|
|
1788
1785
|
const c = u ? "https://masters.com" : a?.url, h = n.get() || "", l = e.get() || "", g = r.get() || "", v = {
|
|
1789
1786
|
[Pt]: h,
|
|
1790
1787
|
[Nn]: l,
|
|
@@ -1796,7 +1793,7 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1796
1793
|
w && b || b ? w = `?${Yr(w, v)}` : b = `#${Yr("", v)}`;
|
|
1797
1794
|
const L = window.location.origin + window.location.pathname + w + b;
|
|
1798
1795
|
try {
|
|
1799
|
-
const R = await
|
|
1796
|
+
const R = await Vo(t, { web: L, mobile: c });
|
|
1800
1797
|
i.set({
|
|
1801
1798
|
data: R.data?.link,
|
|
1802
1799
|
loading: !1
|
|
@@ -1816,7 +1813,7 @@ var U;
|
|
|
1816
1813
|
(function(t) {
|
|
1817
1814
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1818
1815
|
})(U || (U = {}));
|
|
1819
|
-
const
|
|
1816
|
+
const Mo = (t, e, r, n) => {
|
|
1820
1817
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1821
1818
|
i && r.add({
|
|
1822
1819
|
type: Ae.ONBOARDING,
|
|
@@ -1860,11 +1857,11 @@ const $o = (t, e, r, n) => {
|
|
|
1860
1857
|
} catch (s) {
|
|
1861
1858
|
console.error(s);
|
|
1862
1859
|
}
|
|
1863
|
-
},
|
|
1860
|
+
}, jo = (t, e, r, n) => {
|
|
1864
1861
|
let i = !1;
|
|
1865
1862
|
const o = new Pn(), s = B(U.Unset);
|
|
1866
1863
|
s.subscribe((f) => {
|
|
1867
|
-
f !== U.Unset && ((f === U.Optional || f === U.Required) && i === !1 && (
|
|
1864
|
+
f !== U.Unset && ((f === U.Optional || f === U.Required) && i === !1 && (Mo(t, e, n, o), i = !0), f === U.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1868
1865
|
userId: e.userId.get() || "",
|
|
1869
1866
|
organizationId: e.organizationId.get() || "",
|
|
1870
1867
|
eventId: e.slStreamId.get() || ""
|
|
@@ -1880,7 +1877,7 @@ const $o = (t, e, r, n) => {
|
|
|
1880
1877
|
}))), { $store: s, submitInplay: async () => {
|
|
1881
1878
|
const f = e.slStreamId.get();
|
|
1882
1879
|
if (f) {
|
|
1883
|
-
await
|
|
1880
|
+
await So(r, f), s.set(U.Completed), o.saveOnboardingStatus({
|
|
1884
1881
|
organizationId: e.organizationId.get() || "",
|
|
1885
1882
|
userId: e.userId.get() || "",
|
|
1886
1883
|
eventId: f
|
|
@@ -1892,7 +1889,7 @@ const $o = (t, e, r, n) => {
|
|
|
1892
1889
|
n.close(c);
|
|
1893
1890
|
}
|
|
1894
1891
|
} };
|
|
1895
|
-
},
|
|
1892
|
+
}, Uo = (t, e, r, n) => {
|
|
1896
1893
|
const i = te(void 0), o = kn(n), s = async () => {
|
|
1897
1894
|
const u = t.get(), f = e.get(), c = r.getStore().get().data?.map((g) => g.slId);
|
|
1898
1895
|
if (!c)
|
|
@@ -1912,15 +1909,15 @@ const $o = (t, e, r, n) => {
|
|
|
1912
1909
|
u(), f(), c();
|
|
1913
1910
|
};
|
|
1914
1911
|
}), { $store: i, invalidate: a };
|
|
1915
|
-
},
|
|
1912
|
+
}, Bo = async (t, e, r, n, i) => {
|
|
1916
1913
|
const o = kn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((l) => l.slId) || [], f = {
|
|
1917
1914
|
eventId: s,
|
|
1918
1915
|
userId: n,
|
|
1919
1916
|
usersIds: [...u, a]
|
|
1920
1917
|
};
|
|
1921
1918
|
return (await o(f)).data?.attributes?.summary;
|
|
1922
|
-
},
|
|
1923
|
-
class
|
|
1919
|
+
}, xo = /* @__PURE__ */ new Set([F.POLL, F.PREDICTION, F.TRIVIA]);
|
|
1920
|
+
class qo extends _n {
|
|
1924
1921
|
/** user statistics (leaderboard panel) */
|
|
1925
1922
|
userSummary;
|
|
1926
1923
|
/** feed list (pick history) */
|
|
@@ -1955,7 +1952,7 @@ class xo extends _n {
|
|
|
1955
1952
|
submitAnswerTimeout;
|
|
1956
1953
|
cancels = /* @__PURE__ */ new Set();
|
|
1957
1954
|
constructor(e, r, n) {
|
|
1958
|
-
super(e, r), this.background = new
|
|
1955
|
+
super(e, r), this.background = new po(n), this.advertisement = this.background.advertisement, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Pn(), this.feedList = this.background.feedList, this.friends = new ce(eo(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = B(void 0), this.leaderboardId = new Y(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = jo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = () => n.sdk.closeFeature(!0), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = $o(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Uo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Eo(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
|
|
1959
1956
|
o?.summary && i?.summary && this.leaderboardList.invalidate();
|
|
1960
1957
|
})), 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)), nt(this.background.activeQuestionId, () => {
|
|
1961
1958
|
this.background.activeQuestionId.listen(this.showInApp);
|
|
@@ -2115,7 +2112,7 @@ class xo extends _n {
|
|
|
2115
2112
|
}
|
|
2116
2113
|
};
|
|
2117
2114
|
try {
|
|
2118
|
-
await
|
|
2115
|
+
await bo(this.transport, { questionId: e, answerId: r }), s();
|
|
2119
2116
|
} catch (a) {
|
|
2120
2117
|
if (a.message === rt.ALREADY_VOTED) {
|
|
2121
2118
|
this.userSummary.invalidate();
|
|
@@ -2146,7 +2143,7 @@ class xo extends _n {
|
|
|
2146
2143
|
}
|
|
2147
2144
|
}), this.background.openQuestion(e, r);
|
|
2148
2145
|
};
|
|
2149
|
-
getFeedItem = (e) =>
|
|
2146
|
+
getFeedItem = (e) => no(e, this.transport);
|
|
2150
2147
|
isOpenedQuestion = (e) => this.notifications.isViewed(e);
|
|
2151
2148
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
2152
2149
|
openUser = async (e) => {
|
|
@@ -2161,7 +2158,7 @@ class xo extends _n {
|
|
|
2161
2158
|
}
|
|
2162
2159
|
const n = { ...r };
|
|
2163
2160
|
try {
|
|
2164
|
-
const i = await
|
|
2161
|
+
const i = await Bo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
2165
2162
|
i?.inTop !== void 0 && (this.leaderboardList.$store.setKey("data", this.leaderboardList.$store.get().data?.map((o) => (o.userId === e && (o.inTop = i.inTop), o))), n.inTop = i.inTop);
|
|
2166
2163
|
} catch (i) {
|
|
2167
2164
|
console.error(i);
|
|
@@ -2179,8 +2176,8 @@ class xo extends _n {
|
|
|
2179
2176
|
*/
|
|
2180
2177
|
showInApp = (e) => {
|
|
2181
2178
|
const r = this.onboardingStatus.$store.get();
|
|
2182
|
-
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !==
|
|
2183
|
-
if (
|
|
2179
|
+
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== gi.ON && e.data.question.status === H.ACTIVE && !e.data.question.marketClosed) {
|
|
2180
|
+
if (xo.has(e.data.question.type))
|
|
2184
2181
|
this.isInteractiveAllowed && this.notifications.add({
|
|
2185
2182
|
type: Ae.QUESTION,
|
|
2186
2183
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
@@ -2255,15 +2252,15 @@ class xo extends _n {
|
|
|
2255
2252
|
}
|
|
2256
2253
|
};
|
|
2257
2254
|
}
|
|
2258
|
-
const
|
|
2255
|
+
const Qo = {
|
|
2259
2256
|
[D.GAMES]: !0
|
|
2260
2257
|
};
|
|
2261
|
-
class
|
|
2258
|
+
class Go extends _n {
|
|
2262
2259
|
constructor(e, r) {
|
|
2263
2260
|
super(e, r);
|
|
2264
2261
|
}
|
|
2265
2262
|
}
|
|
2266
|
-
const
|
|
2263
|
+
const Ko = (t, e, r) => t.type === D.GAMES ? new qo(t, e, r) : new Go(t, e), zo = (t, e, r) => {
|
|
2267
2264
|
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new Y(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new Y(B(D.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
|
|
2268
2265
|
t.activeFeature.setValue(n);
|
|
2269
2266
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
@@ -2274,8 +2271,8 @@ const Go = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Qo(t, e), Ko
|
|
|
2274
2271
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
2275
2272
|
}
|
|
2276
2273
|
}, t.initFeature = (n, i = ye.ORGANIZATION) => {
|
|
2277
|
-
if (n.type in
|
|
2278
|
-
const o =
|
|
2274
|
+
if (n.type in Qo && !t.features.has(n.type)) {
|
|
2275
|
+
const o = Ko(n, i, t);
|
|
2279
2276
|
t.features.set(n.type, o);
|
|
2280
2277
|
let s = t.sdk.featuresList.getValue();
|
|
2281
2278
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2328,7 +2325,7 @@ const Go = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Qo(t, e), Ko
|
|
|
2328
2325
|
t.store.subscribe(i);
|
|
2329
2326
|
}, r();
|
|
2330
2327
|
};
|
|
2331
|
-
class
|
|
2328
|
+
class Ho {
|
|
2332
2329
|
analytics;
|
|
2333
2330
|
constructor(e) {
|
|
2334
2331
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2364,7 +2361,7 @@ class zo {
|
|
|
2364
2361
|
});
|
|
2365
2362
|
};
|
|
2366
2363
|
}
|
|
2367
|
-
class
|
|
2364
|
+
class Wo {
|
|
2368
2365
|
analytics;
|
|
2369
2366
|
constructor(e) {
|
|
2370
2367
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2401,7 +2398,7 @@ class Ho {
|
|
|
2401
2398
|
});
|
|
2402
2399
|
};
|
|
2403
2400
|
}
|
|
2404
|
-
const
|
|
2401
|
+
const Yo = {
|
|
2405
2402
|
[Te.UNSET]: we.UNSET,
|
|
2406
2403
|
[Te.INGAME_IAB21]: we.PROMOTION_INGAME_IAB21,
|
|
2407
2404
|
[Te.INGAME_IAB11_LBAR]: we.PROMOTION_INGAME_IAB11_LBAR,
|
|
@@ -2410,13 +2407,13 @@ const Wo = {
|
|
|
2410
2407
|
[Te.INGAME_IAB61]: we.PROMOTION_INGAME_IAB61,
|
|
2411
2408
|
[Te.EXTERNAL_AD]: we.PROMOTION_GAM
|
|
2412
2409
|
};
|
|
2413
|
-
class
|
|
2410
|
+
class Jo {
|
|
2414
2411
|
analytics;
|
|
2415
2412
|
constructor(e) {
|
|
2416
2413
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
2417
2414
|
const r = (n) => {
|
|
2418
2415
|
if (n.slEventBus?.type === "advertisement") {
|
|
2419
|
-
const i = n.slEventBus.payload.advertisementType ?
|
|
2416
|
+
const i = n.slEventBus.payload.advertisementType ? Yo[n.slEventBus.payload.advertisementType] : we.UNSET;
|
|
2420
2417
|
switch (n.slEventBus.action) {
|
|
2421
2418
|
case "videoPlay":
|
|
2422
2419
|
this.videoPlay(n.slEventBus.payload, { topicSubType: i });
|
|
@@ -2507,7 +2504,7 @@ const Ze = {
|
|
|
2507
2504
|
[F.TWEET]: z.POLLS_TWITTER
|
|
2508
2505
|
};
|
|
2509
2506
|
F.UNSET + "", he.UNSET, F.FACTOID + "", he.POLLS, F.POLL + "", he.POLLS, F.PREDICTION + "", he.POLLS, F.PROMOTION + "", he.POLLS, F.TRIVIA + "", he.POLLS, F.TWEET + "", he.POLLS;
|
|
2510
|
-
const
|
|
2507
|
+
const Xo = {
|
|
2511
2508
|
[D.UNSET]: G.UNSET,
|
|
2512
2509
|
[D.INPLAY]: G.INPLAY,
|
|
2513
2510
|
[D.MESSAGING]: G.MESSAGING,
|
|
@@ -2527,7 +2524,7 @@ const Jo = {
|
|
|
2527
2524
|
[D.HIGHLIGHTS]: G.HIGHLIGHTS,
|
|
2528
2525
|
[D.PUBLIC_CHAT]: G.PUBLIC_CHAT
|
|
2529
2526
|
};
|
|
2530
|
-
class
|
|
2527
|
+
class Zo {
|
|
2531
2528
|
analytics;
|
|
2532
2529
|
constructor(e) {
|
|
2533
2530
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2570,7 +2567,7 @@ class Xo {
|
|
|
2570
2567
|
});
|
|
2571
2568
|
};
|
|
2572
2569
|
}
|
|
2573
|
-
class
|
|
2570
|
+
class es {
|
|
2574
2571
|
analytics;
|
|
2575
2572
|
constructor(e) {
|
|
2576
2573
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2654,7 +2651,7 @@ class Zo {
|
|
|
2654
2651
|
});
|
|
2655
2652
|
};
|
|
2656
2653
|
}
|
|
2657
|
-
const
|
|
2654
|
+
const ts = ({ transport: t, $commonStore: e }) => {
|
|
2658
2655
|
let r;
|
|
2659
2656
|
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(An, {
|
|
2660
2657
|
method: "send",
|
|
@@ -2692,7 +2689,7 @@ const es = ({ transport: t, $commonStore: e }) => {
|
|
|
2692
2689
|
me.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2693
2690
|
} };
|
|
2694
2691
|
}, me = le("analytics");
|
|
2695
|
-
class
|
|
2692
|
+
class rs {
|
|
2696
2693
|
commonStore;
|
|
2697
2694
|
notifications;
|
|
2698
2695
|
polls;
|
|
@@ -2705,7 +2702,7 @@ class ts {
|
|
|
2705
2702
|
listenersCancels;
|
|
2706
2703
|
connected = !1;
|
|
2707
2704
|
constructor(e) {
|
|
2708
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(te({}), "common-analytics"), this.connectToSDK(e), this.heartbeat =
|
|
2705
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(te({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ts({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Zo(this), this.polls = new es(this), this.invitation = new Ho(this), this.interactions = new Wo(this), this.advertisement = new Jo(this);
|
|
2709
2706
|
const { client: r } = e.analyticsTransport.createPromiseClient(An, {
|
|
2710
2707
|
method: "send"
|
|
2711
2708
|
});
|
|
@@ -2735,7 +2732,7 @@ class ts {
|
|
|
2735
2732
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2736
2733
|
this.writeCommon("eventId", r);
|
|
2737
2734
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2738
|
-
r && this.writeCommon("category",
|
|
2735
|
+
r && this.writeCommon("category", Xo[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", nr()) : this.writeCommon("overlaySessionId", "");
|
|
2739
2736
|
})), this.onConnect(() => {
|
|
2740
2737
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2741
2738
|
this.writeCommon("screenOrientation", i.matches ? Br.PORTRAIT : Br.LANDSCAPE);
|
|
@@ -2748,17 +2745,17 @@ class ts {
|
|
|
2748
2745
|
}));
|
|
2749
2746
|
};
|
|
2750
2747
|
}
|
|
2751
|
-
const
|
|
2752
|
-
t.analytics = new
|
|
2748
|
+
const ns = (t, e, r) => {
|
|
2749
|
+
t.analytics = new rs(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
2753
2750
|
t.analytics.disconnect();
|
|
2754
2751
|
})), r();
|
|
2755
2752
|
};
|
|
2756
2753
|
var br = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2757
|
-
function
|
|
2754
|
+
function is(t) {
|
|
2758
2755
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2759
2756
|
}
|
|
2760
2757
|
var Sr = { exports: {} }, wr = { exports: {} };
|
|
2761
|
-
function
|
|
2758
|
+
function os(t) {
|
|
2762
2759
|
var e = new t(), r = e;
|
|
2763
2760
|
function n() {
|
|
2764
2761
|
var o = e;
|
|
@@ -2772,11 +2769,11 @@ function is(t) {
|
|
|
2772
2769
|
release: i
|
|
2773
2770
|
};
|
|
2774
2771
|
}
|
|
2775
|
-
var
|
|
2772
|
+
var ss = os, as = ss;
|
|
2776
2773
|
function Dn(t, e, r) {
|
|
2777
2774
|
if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
|
|
2778
2775
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2779
|
-
var n =
|
|
2776
|
+
var n = as(us), i = null, o = null, s = 0, a = null, u = {
|
|
2780
2777
|
push: w,
|
|
2781
2778
|
drain: W,
|
|
2782
2779
|
saturated: W,
|
|
@@ -2858,7 +2855,7 @@ function Dn(t, e, r) {
|
|
|
2858
2855
|
}
|
|
2859
2856
|
function W() {
|
|
2860
2857
|
}
|
|
2861
|
-
function
|
|
2858
|
+
function us() {
|
|
2862
2859
|
this.value = null, this.callback = W, this.next = null, this.release = W, this.context = null, this.errorHandler = null;
|
|
2863
2860
|
var t = this;
|
|
2864
2861
|
this.worked = function(r, n) {
|
|
@@ -2866,7 +2863,7 @@ function as() {
|
|
|
2866
2863
|
t.value = null, t.callback = W, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
2867
2864
|
};
|
|
2868
2865
|
}
|
|
2869
|
-
function
|
|
2866
|
+
function cs(t, e, r) {
|
|
2870
2867
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2871
2868
|
function n(c, h) {
|
|
2872
2869
|
e.call(this, c).then(function(l) {
|
|
@@ -2913,7 +2910,7 @@ function us(t, e, r) {
|
|
|
2913
2910
|
}
|
|
2914
2911
|
}
|
|
2915
2912
|
wr.exports = Dn;
|
|
2916
|
-
wr.exports.promise =
|
|
2913
|
+
wr.exports.promise = cs;
|
|
2917
2914
|
var Rn = wr.exports, Ar = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, Jr = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
|
|
2918
2915
|
return Function.prototype.apply.call(e, r, n);
|
|
2919
2916
|
}, pt;
|
|
@@ -2922,7 +2919,7 @@ Qe && typeof Qe.ownKeys == "function" ? pt = Qe.ownKeys : Object.getOwnPropertyS
|
|
|
2922
2919
|
} : pt = function(e) {
|
|
2923
2920
|
return Object.getOwnPropertyNames(e);
|
|
2924
2921
|
};
|
|
2925
|
-
function
|
|
2922
|
+
function ls(t) {
|
|
2926
2923
|
console && console.warn && console.warn(t);
|
|
2927
2924
|
}
|
|
2928
2925
|
var Vn = Number.isNaN || function(e) {
|
|
@@ -2932,7 +2929,7 @@ function P() {
|
|
|
2932
2929
|
P.init.call(this);
|
|
2933
2930
|
}
|
|
2934
2931
|
Ar.exports = P;
|
|
2935
|
-
Ar.exports.once =
|
|
2932
|
+
Ar.exports.once = ps;
|
|
2936
2933
|
P.EventEmitter = P;
|
|
2937
2934
|
P.prototype._events = void 0;
|
|
2938
2935
|
P.prototype._eventsCount = 0;
|
|
@@ -3002,7 +2999,7 @@ function Mn(t, e, r, n) {
|
|
|
3002
2999
|
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = $n(t), i > 0 && s.length > i && !s.warned) {
|
|
3003
3000
|
s.warned = !0;
|
|
3004
3001
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3005
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
3002
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, ls(a);
|
|
3006
3003
|
}
|
|
3007
3004
|
return t;
|
|
3008
3005
|
}
|
|
@@ -3013,12 +3010,12 @@ P.prototype.on = P.prototype.addListener;
|
|
|
3013
3010
|
P.prototype.prependListener = function(e, r) {
|
|
3014
3011
|
return Mn(this, e, r, !0);
|
|
3015
3012
|
};
|
|
3016
|
-
function
|
|
3013
|
+
function ds() {
|
|
3017
3014
|
if (!this.fired)
|
|
3018
3015
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
3019
3016
|
}
|
|
3020
3017
|
function jn(t, e, r) {
|
|
3021
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
3018
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = ds.bind(n);
|
|
3022
3019
|
return i.listener = r, n.wrapFn = i, i;
|
|
3023
3020
|
}
|
|
3024
3021
|
P.prototype.once = function(e, r) {
|
|
@@ -3043,7 +3040,7 @@ P.prototype.removeListener = function(e, r) {
|
|
|
3043
3040
|
}
|
|
3044
3041
|
if (o < 0)
|
|
3045
3042
|
return this;
|
|
3046
|
-
o === 0 ? n.shift() :
|
|
3043
|
+
o === 0 ? n.shift() : fs(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
3047
3044
|
}
|
|
3048
3045
|
return this;
|
|
3049
3046
|
};
|
|
@@ -3072,7 +3069,7 @@ function Un(t, e, r) {
|
|
|
3072
3069
|
if (n === void 0)
|
|
3073
3070
|
return [];
|
|
3074
3071
|
var i = n[e];
|
|
3075
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
3072
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? hs(i) : xn(i, i.length);
|
|
3076
3073
|
}
|
|
3077
3074
|
P.prototype.listeners = function(e) {
|
|
3078
3075
|
return Un(this, e, !0);
|
|
@@ -3103,17 +3100,17 @@ function xn(t, e) {
|
|
|
3103
3100
|
r[n] = t[n];
|
|
3104
3101
|
return r;
|
|
3105
3102
|
}
|
|
3106
|
-
function
|
|
3103
|
+
function fs(t, e) {
|
|
3107
3104
|
for (; e + 1 < t.length; e++)
|
|
3108
3105
|
t[e] = t[e + 1];
|
|
3109
3106
|
t.pop();
|
|
3110
3107
|
}
|
|
3111
|
-
function
|
|
3108
|
+
function hs(t) {
|
|
3112
3109
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3113
3110
|
e[r] = t[r].listener || t[r];
|
|
3114
3111
|
return e;
|
|
3115
3112
|
}
|
|
3116
|
-
function
|
|
3113
|
+
function ps(t, e) {
|
|
3117
3114
|
return new Promise(function(r, n) {
|
|
3118
3115
|
function i(s) {
|
|
3119
3116
|
t.removeListener(e, o), n(s);
|
|
@@ -3121,10 +3118,10 @@ function hs(t, e) {
|
|
|
3121
3118
|
function o() {
|
|
3122
3119
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
3123
3120
|
}
|
|
3124
|
-
qn(t, e, o, { once: !0 }), e !== "error" &&
|
|
3121
|
+
qn(t, e, o, { once: !0 }), e !== "error" && ys(t, i, { once: !0 });
|
|
3125
3122
|
});
|
|
3126
3123
|
}
|
|
3127
|
-
function
|
|
3124
|
+
function ys(t, e, r) {
|
|
3128
3125
|
typeof t.on == "function" && qn(t, "error", e, r);
|
|
3129
3126
|
}
|
|
3130
3127
|
function qn(t, e, r, n) {
|
|
@@ -3160,34 +3157,34 @@ var Qn = Ar.exports, Ft = {}, Gn = {}, Kn = function() {
|
|
|
3160
3157
|
return !1;
|
|
3161
3158
|
}
|
|
3162
3159
|
return !0;
|
|
3163
|
-
},
|
|
3164
|
-
return
|
|
3165
|
-
},
|
|
3166
|
-
return typeof Zr != "function" || typeof Symbol != "function" || typeof Zr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3160
|
+
}, gs = Kn, Dt = function() {
|
|
3161
|
+
return gs() && !!Symbol.toStringTag;
|
|
3162
|
+
}, ms = Error, vs = EvalError, bs = RangeError, Ss = ReferenceError, zn = SyntaxError, Rt = TypeError, ws = URIError, Zr = typeof Symbol < "u" && Symbol, As = Kn, Es = function() {
|
|
3163
|
+
return typeof Zr != "function" || typeof Symbol != "function" || typeof Zr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : As();
|
|
3167
3164
|
}, Ut = {
|
|
3168
3165
|
__proto__: null,
|
|
3169
3166
|
foo: {}
|
|
3170
|
-
},
|
|
3171
|
-
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof
|
|
3172
|
-
},
|
|
3167
|
+
}, Is = Object, Ts = function() {
|
|
3168
|
+
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof Is);
|
|
3169
|
+
}, Os = "Function.prototype.bind called on incompatible ", _s = Object.prototype.toString, Ls = Math.max, Cs = "[object Function]", en = function(e, r) {
|
|
3173
3170
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3174
3171
|
n[i] = e[i];
|
|
3175
3172
|
for (var o = 0; o < r.length; o += 1)
|
|
3176
3173
|
n[o + e.length] = r[o];
|
|
3177
3174
|
return n;
|
|
3178
|
-
},
|
|
3175
|
+
}, ks = function(e, r) {
|
|
3179
3176
|
for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
|
|
3180
3177
|
n[o] = e[i];
|
|
3181
3178
|
return n;
|
|
3182
|
-
},
|
|
3179
|
+
}, Ps = function(t, e) {
|
|
3183
3180
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
3184
3181
|
r += t[n], n + 1 < t.length && (r += e);
|
|
3185
3182
|
return r;
|
|
3186
|
-
},
|
|
3183
|
+
}, Ns = function(e) {
|
|
3187
3184
|
var r = this;
|
|
3188
|
-
if (typeof r != "function" ||
|
|
3189
|
-
throw new TypeError(
|
|
3190
|
-
for (var n =
|
|
3185
|
+
if (typeof r != "function" || _s.apply(r) !== Cs)
|
|
3186
|
+
throw new TypeError(Os + r);
|
|
3187
|
+
for (var n = ks(arguments, 1), i, o = function() {
|
|
3191
3188
|
if (this instanceof i) {
|
|
3192
3189
|
var c = r.apply(
|
|
3193
3190
|
this,
|
|
@@ -3199,15 +3196,15 @@ var Qn = Ar.exports, Ft = {}, Gn = {}, Kn = function() {
|
|
|
3199
3196
|
e,
|
|
3200
3197
|
en(n, arguments)
|
|
3201
3198
|
);
|
|
3202
|
-
}, s =
|
|
3199
|
+
}, s = Ls(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3203
3200
|
a[u] = "$" + u;
|
|
3204
|
-
if (i = Function("binder", "return function (" +
|
|
3201
|
+
if (i = Function("binder", "return function (" + Ps(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
3205
3202
|
var f = function() {
|
|
3206
3203
|
};
|
|
3207
3204
|
f.prototype = r.prototype, i.prototype = new f(), f.prototype = null;
|
|
3208
3205
|
}
|
|
3209
3206
|
return i;
|
|
3210
|
-
},
|
|
3207
|
+
}, Fs = Ns, Er = Function.prototype.bind || Fs, Ds = Function.prototype.call, Rs = Object.prototype.hasOwnProperty, Vs = Er, $s = Vs.call(Ds, Rs), I, Ms = ms, js = vs, Us = bs, Bs = Ss, Ke = zn, Ge = Rt, xs = ws, Hn = Function, Bt = function(t) {
|
|
3211
3208
|
try {
|
|
3212
3209
|
return Hn('"use strict"; return (' + t + ").constructor;")();
|
|
3213
3210
|
} catch {
|
|
@@ -3221,7 +3218,7 @@ if (ke)
|
|
|
3221
3218
|
}
|
|
3222
3219
|
var xt = function() {
|
|
3223
3220
|
throw new Ge();
|
|
3224
|
-
},
|
|
3221
|
+
}, qs = ke ? function() {
|
|
3225
3222
|
try {
|
|
3226
3223
|
return arguments.callee, xt;
|
|
3227
3224
|
} catch {
|
|
@@ -3231,9 +3228,9 @@ var xt = function() {
|
|
|
3231
3228
|
return xt;
|
|
3232
3229
|
}
|
|
3233
3230
|
}
|
|
3234
|
-
}() : xt, $e =
|
|
3231
|
+
}() : xt, $e = Es(), Qs = Ts(), M = Object.getPrototypeOf || (Qs ? function(t) {
|
|
3235
3232
|
return t.__proto__;
|
|
3236
|
-
} : null), je = {},
|
|
3233
|
+
} : null), je = {}, Gs = typeof Uint8Array > "u" || !M ? I : M(Uint8Array), Pe = {
|
|
3237
3234
|
__proto__: null,
|
|
3238
3235
|
"%AggregateError%": typeof AggregateError > "u" ? I : AggregateError,
|
|
3239
3236
|
"%Array%": Array,
|
|
@@ -3255,10 +3252,10 @@ var xt = function() {
|
|
|
3255
3252
|
"%decodeURIComponent%": decodeURIComponent,
|
|
3256
3253
|
"%encodeURI%": encodeURI,
|
|
3257
3254
|
"%encodeURIComponent%": encodeURIComponent,
|
|
3258
|
-
"%Error%":
|
|
3255
|
+
"%Error%": Ms,
|
|
3259
3256
|
"%eval%": eval,
|
|
3260
3257
|
// eslint-disable-line no-eval
|
|
3261
|
-
"%EvalError%":
|
|
3258
|
+
"%EvalError%": js,
|
|
3262
3259
|
"%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
|
|
3263
3260
|
"%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
|
|
3264
3261
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
|
|
@@ -3280,8 +3277,8 @@ var xt = function() {
|
|
|
3280
3277
|
"%parseInt%": parseInt,
|
|
3281
3278
|
"%Promise%": typeof Promise > "u" ? I : Promise,
|
|
3282
3279
|
"%Proxy%": typeof Proxy > "u" ? I : Proxy,
|
|
3283
|
-
"%RangeError%":
|
|
3284
|
-
"%ReferenceError%":
|
|
3280
|
+
"%RangeError%": Us,
|
|
3281
|
+
"%ReferenceError%": Bs,
|
|
3285
3282
|
"%Reflect%": typeof Reflect > "u" ? I : Reflect,
|
|
3286
3283
|
"%RegExp%": RegExp,
|
|
3287
3284
|
"%Set%": typeof Set > "u" ? I : Set,
|
|
@@ -3291,14 +3288,14 @@ var xt = function() {
|
|
|
3291
3288
|
"%StringIteratorPrototype%": $e && M ? M(""[Symbol.iterator]()) : I,
|
|
3292
3289
|
"%Symbol%": $e ? Symbol : I,
|
|
3293
3290
|
"%SyntaxError%": Ke,
|
|
3294
|
-
"%ThrowTypeError%":
|
|
3295
|
-
"%TypedArray%":
|
|
3291
|
+
"%ThrowTypeError%": qs,
|
|
3292
|
+
"%TypedArray%": Gs,
|
|
3296
3293
|
"%TypeError%": Ge,
|
|
3297
3294
|
"%Uint8Array%": typeof Uint8Array > "u" ? I : Uint8Array,
|
|
3298
3295
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? I : Uint8ClampedArray,
|
|
3299
3296
|
"%Uint16Array%": typeof Uint16Array > "u" ? I : Uint16Array,
|
|
3300
3297
|
"%Uint32Array%": typeof Uint32Array > "u" ? I : Uint32Array,
|
|
3301
|
-
"%URIError%":
|
|
3298
|
+
"%URIError%": xs,
|
|
3302
3299
|
"%WeakMap%": typeof WeakMap > "u" ? I : WeakMap,
|
|
3303
3300
|
"%WeakRef%": typeof WeakRef > "u" ? I : WeakRef,
|
|
3304
3301
|
"%WeakSet%": typeof WeakSet > "u" ? I : WeakSet
|
|
@@ -3307,10 +3304,10 @@ if (M)
|
|
|
3307
3304
|
try {
|
|
3308
3305
|
null.error;
|
|
3309
3306
|
} catch (t) {
|
|
3310
|
-
var
|
|
3311
|
-
Pe["%Error.prototype%"] =
|
|
3307
|
+
var Ks = M(M(t));
|
|
3308
|
+
Pe["%Error.prototype%"] = Ks;
|
|
3312
3309
|
}
|
|
3313
|
-
var
|
|
3310
|
+
var zs = function t(e) {
|
|
3314
3311
|
var r;
|
|
3315
3312
|
if (e === "%AsyncFunction%")
|
|
3316
3313
|
r = Bt("async function () {}");
|
|
@@ -3379,21 +3376,21 @@ var Ks = function t(e) {
|
|
|
3379
3376
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3380
3377
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3381
3378
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3382
|
-
}, ot = Er, At =
|
|
3379
|
+
}, ot = Er, At = $s, Hs = ot.call(Function.call, Array.prototype.concat), Ws = ot.call(Function.apply, Array.prototype.splice), rn = ot.call(Function.call, String.prototype.replace), Et = ot.call(Function.call, String.prototype.slice), Ys = ot.call(Function.call, RegExp.prototype.exec), Js = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Xs = /\\(\\)?/g, Zs = function(e) {
|
|
3383
3380
|
var r = Et(e, 0, 1), n = Et(e, -1);
|
|
3384
3381
|
if (r === "%" && n !== "%")
|
|
3385
3382
|
throw new Ke("invalid intrinsic syntax, expected closing `%`");
|
|
3386
3383
|
if (n === "%" && r !== "%")
|
|
3387
3384
|
throw new Ke("invalid intrinsic syntax, expected opening `%`");
|
|
3388
3385
|
var i = [];
|
|
3389
|
-
return rn(e,
|
|
3390
|
-
i[i.length] = a ? rn(u,
|
|
3386
|
+
return rn(e, Js, function(o, s, a, u) {
|
|
3387
|
+
i[i.length] = a ? rn(u, Xs, "$1") : s || o;
|
|
3391
3388
|
}), i;
|
|
3392
|
-
},
|
|
3389
|
+
}, ea = function(e, r) {
|
|
3393
3390
|
var n = e, i;
|
|
3394
3391
|
if (At(tn, n) && (i = tn[n], n = "%" + i[0] + "%"), At(Pe, n)) {
|
|
3395
3392
|
var o = Pe[n];
|
|
3396
|
-
if (o === je && (o =
|
|
3393
|
+
if (o === je && (o = zs(n)), typeof o > "u" && !r)
|
|
3397
3394
|
throw new Ge("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3398
3395
|
return {
|
|
3399
3396
|
alias: i,
|
|
@@ -3407,10 +3404,10 @@ var Ks = function t(e) {
|
|
|
3407
3404
|
throw new Ge("intrinsic name must be a non-empty string");
|
|
3408
3405
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3409
3406
|
throw new Ge('"allowMissing" argument must be a boolean');
|
|
3410
|
-
if (
|
|
3407
|
+
if (Ys(/^%?[^%]*%?$/, e) === null)
|
|
3411
3408
|
throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3412
|
-
var n =
|
|
3413
|
-
f && (i = f[0],
|
|
3409
|
+
var n = Zs(e), i = n.length > 0 ? n[0] : "", o = ea("%" + i + "%", r), s = o.name, a = o.value, u = !1, f = o.alias;
|
|
3410
|
+
f && (i = f[0], Ws(n, Hs([0, 1], f)));
|
|
3414
3411
|
for (var c = 1, h = !0; c < n.length; c += 1) {
|
|
3415
3412
|
var l = n[c], g = Et(l, 0, 1), v = Et(l, -1);
|
|
3416
3413
|
if ((g === '"' || g === "'" || g === "`" || v === '"' || v === "'" || v === "`") && g !== v)
|
|
@@ -3445,14 +3442,14 @@ function Ir() {
|
|
|
3445
3442
|
}
|
|
3446
3443
|
return qt = e, qt;
|
|
3447
3444
|
}
|
|
3448
|
-
var
|
|
3445
|
+
var ta = st, yt = ta("%Object.getOwnPropertyDescriptor%", !0);
|
|
3449
3446
|
if (yt)
|
|
3450
3447
|
try {
|
|
3451
3448
|
yt([], "length");
|
|
3452
3449
|
} catch {
|
|
3453
3450
|
yt = null;
|
|
3454
3451
|
}
|
|
3455
|
-
var Vt = yt, on = Ir(),
|
|
3452
|
+
var Vt = yt, on = Ir(), ra = zn, Me = Rt, sn = Vt, na = function(e, r, n) {
|
|
3456
3453
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3457
3454
|
throw new Me("`obj` must be an object or a function`");
|
|
3458
3455
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3476,7 +3473,7 @@ var Vt = yt, on = Ir(), ta = zn, Me = Rt, sn = Vt, ra = function(e, r, n) {
|
|
|
3476
3473
|
else if (a || !i && !o && !s)
|
|
3477
3474
|
e[r] = n;
|
|
3478
3475
|
else
|
|
3479
|
-
throw new
|
|
3476
|
+
throw new ra("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3480
3477
|
}, ur = Ir(), Yn = function() {
|
|
3481
3478
|
return !!ur;
|
|
3482
3479
|
};
|
|
@@ -3489,17 +3486,17 @@ Yn.hasArrayLengthDefineBug = function() {
|
|
|
3489
3486
|
return !0;
|
|
3490
3487
|
}
|
|
3491
3488
|
};
|
|
3492
|
-
var
|
|
3489
|
+
var ia = Yn, oa = st, an = na, sa = ia(), un = Vt, cn = Rt, aa = oa("%Math.floor%"), ua = function(e, r) {
|
|
3493
3490
|
if (typeof e != "function")
|
|
3494
3491
|
throw new cn("`fn` is not a function");
|
|
3495
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3492
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || aa(r) !== r)
|
|
3496
3493
|
throw new cn("`length` must be a positive 32-bit integer");
|
|
3497
3494
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3498
3495
|
if ("length" in e && un) {
|
|
3499
3496
|
var s = un(e, "length");
|
|
3500
3497
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3501
3498
|
}
|
|
3502
|
-
return (i || o || !n) && (
|
|
3499
|
+
return (i || o || !n) && (sa ? an(
|
|
3503
3500
|
/** @type {Parameters<define>[0]} */
|
|
3504
3501
|
e,
|
|
3505
3502
|
"length",
|
|
@@ -3514,7 +3511,7 @@ var na = Yn, ia = st, an = ra, oa = na(), un = Vt, cn = Rt, sa = ia("%Math.floor
|
|
|
3514
3511
|
)), e;
|
|
3515
3512
|
};
|
|
3516
3513
|
(function(t) {
|
|
3517
|
-
var e = Er, r = st, n =
|
|
3514
|
+
var e = Er, r = st, n = ua, i = Rt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Ir(), f = r("%Math.max%");
|
|
3518
3515
|
t.exports = function(l) {
|
|
3519
3516
|
if (typeof l != "function")
|
|
3520
3517
|
throw new i("a function is required");
|
|
@@ -3530,37 +3527,37 @@ var na = Yn, ia = st, an = ra, oa = na(), un = Vt, cn = Rt, sa = ia("%Math.floor
|
|
|
3530
3527
|
};
|
|
3531
3528
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3532
3529
|
})(Wn);
|
|
3533
|
-
var Tr = Wn.exports, Jn = st, Xn = Tr,
|
|
3530
|
+
var Tr = Wn.exports, Jn = st, Xn = Tr, ca = Xn(Jn("String.prototype.indexOf")), Or = function(e, r) {
|
|
3534
3531
|
var n = Jn(e, !!r);
|
|
3535
|
-
return typeof n == "function" &&
|
|
3536
|
-
},
|
|
3537
|
-
return
|
|
3532
|
+
return typeof n == "function" && ca(e, ".prototype.") > -1 ? Xn(n) : n;
|
|
3533
|
+
}, la = Dt(), da = Or, cr = da("Object.prototype.toString"), $t = function(e) {
|
|
3534
|
+
return la && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : cr(e) === "[object Arguments]";
|
|
3538
3535
|
}, Zn = function(e) {
|
|
3539
3536
|
return $t(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && cr(e) !== "[object Array]" && cr(e.callee) === "[object Function]";
|
|
3540
|
-
},
|
|
3537
|
+
}, fa = function() {
|
|
3541
3538
|
return $t(arguments);
|
|
3542
3539
|
}();
|
|
3543
3540
|
$t.isLegacyArguments = Zn;
|
|
3544
|
-
var
|
|
3541
|
+
var ha = fa ? $t : Zn, pa = Object.prototype.toString, ya = Function.prototype.toString, ga = /^\s*(?:function)?\*/, ei = Dt(), Qt = Object.getPrototypeOf, ma = function() {
|
|
3545
3542
|
if (!ei)
|
|
3546
3543
|
return !1;
|
|
3547
3544
|
try {
|
|
3548
3545
|
return Function("return function*() {}")();
|
|
3549
3546
|
} catch {
|
|
3550
3547
|
}
|
|
3551
|
-
}, Gt,
|
|
3548
|
+
}, Gt, va = function(e) {
|
|
3552
3549
|
if (typeof e != "function")
|
|
3553
3550
|
return !1;
|
|
3554
|
-
if (
|
|
3551
|
+
if (ga.test(ya.call(e)))
|
|
3555
3552
|
return !0;
|
|
3556
3553
|
if (!ei) {
|
|
3557
|
-
var r =
|
|
3554
|
+
var r = pa.call(e);
|
|
3558
3555
|
return r === "[object GeneratorFunction]";
|
|
3559
3556
|
}
|
|
3560
3557
|
if (!Qt)
|
|
3561
3558
|
return !1;
|
|
3562
3559
|
if (typeof Gt > "u") {
|
|
3563
|
-
var n =
|
|
3560
|
+
var n = ma();
|
|
3564
3561
|
Gt = n ? Qt(n) : !1;
|
|
3565
3562
|
}
|
|
3566
3563
|
return Qt(e) === Gt;
|
|
@@ -3579,10 +3576,10 @@ if (typeof xe == "function" && typeof Object.defineProperty == "function")
|
|
|
3579
3576
|
}
|
|
3580
3577
|
else
|
|
3581
3578
|
xe = null;
|
|
3582
|
-
var
|
|
3579
|
+
var ba = /^\s*class\b/, dr = function(e) {
|
|
3583
3580
|
try {
|
|
3584
3581
|
var r = ti.call(e);
|
|
3585
|
-
return
|
|
3582
|
+
return ba.test(r);
|
|
3586
3583
|
} catch {
|
|
3587
3584
|
return !1;
|
|
3588
3585
|
}
|
|
@@ -3592,22 +3589,22 @@ var va = /^\s*class\b/, dr = function(e) {
|
|
|
3592
3589
|
} catch {
|
|
3593
3590
|
return !1;
|
|
3594
3591
|
}
|
|
3595
|
-
}, mt = Object.prototype.toString,
|
|
3592
|
+
}, mt = Object.prototype.toString, Sa = "[object Object]", wa = "[object Function]", Aa = "[object GeneratorFunction]", Ea = "[object HTMLAllCollection]", Ia = "[object HTML document.all class]", Ta = "[object HTMLCollection]", Oa = typeof Symbol == "function" && !!Symbol.toStringTag, _a = !(0 in [,]), fr = function() {
|
|
3596
3593
|
return !1;
|
|
3597
3594
|
};
|
|
3598
3595
|
if (typeof document == "object") {
|
|
3599
|
-
var
|
|
3600
|
-
mt.call(
|
|
3601
|
-
if ((
|
|
3596
|
+
var La = document.all;
|
|
3597
|
+
mt.call(La) === mt.call(document.all) && (fr = function(e) {
|
|
3598
|
+
if ((_a || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3602
3599
|
try {
|
|
3603
3600
|
var r = mt.call(e);
|
|
3604
|
-
return (r ===
|
|
3601
|
+
return (r === Ea || r === Ia || r === Ta || r === Sa) && e("") == null;
|
|
3605
3602
|
} catch {
|
|
3606
3603
|
}
|
|
3607
3604
|
return !1;
|
|
3608
3605
|
});
|
|
3609
3606
|
}
|
|
3610
|
-
var
|
|
3607
|
+
var Ca = xe ? function(e) {
|
|
3611
3608
|
if (fr(e))
|
|
3612
3609
|
return !0;
|
|
3613
3610
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3624,27 +3621,27 @@ var La = xe ? function(e) {
|
|
|
3624
3621
|
return !0;
|
|
3625
3622
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3626
3623
|
return !1;
|
|
3627
|
-
if (
|
|
3624
|
+
if (Oa)
|
|
3628
3625
|
return Kt(e);
|
|
3629
3626
|
if (dr(e))
|
|
3630
3627
|
return !1;
|
|
3631
3628
|
var r = mt.call(e);
|
|
3632
|
-
return r !==
|
|
3633
|
-
},
|
|
3629
|
+
return r !== wa && r !== Aa && !/^\[object HTML/.test(r) ? !1 : Kt(e);
|
|
3630
|
+
}, ka = Ca, Pa = Object.prototype.toString, ri = Object.prototype.hasOwnProperty, Na = function(e, r, n) {
|
|
3634
3631
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3635
3632
|
ri.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3636
|
-
},
|
|
3633
|
+
}, Fa = function(e, r, n) {
|
|
3637
3634
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3638
3635
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3639
|
-
},
|
|
3636
|
+
}, Da = function(e, r, n) {
|
|
3640
3637
|
for (var i in e)
|
|
3641
3638
|
ri.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3642
|
-
},
|
|
3643
|
-
if (!
|
|
3639
|
+
}, Ra = function(e, r, n) {
|
|
3640
|
+
if (!ka(r))
|
|
3644
3641
|
throw new TypeError("iterator must be a function");
|
|
3645
3642
|
var i;
|
|
3646
|
-
arguments.length >= 3 && (i = n),
|
|
3647
|
-
}, ni =
|
|
3643
|
+
arguments.length >= 3 && (i = n), Pa.call(e) === "[object Array]" ? Na(e, r, i) : typeof e == "string" ? Fa(e, r, i) : Da(e, r, i);
|
|
3644
|
+
}, ni = Ra, Va = [
|
|
3648
3645
|
"Float32Array",
|
|
3649
3646
|
"Float64Array",
|
|
3650
3647
|
"Int8Array",
|
|
@@ -3656,11 +3653,11 @@ var La = xe ? function(e) {
|
|
|
3656
3653
|
"Uint32Array",
|
|
3657
3654
|
"BigInt64Array",
|
|
3658
3655
|
"BigUint64Array"
|
|
3659
|
-
], zt =
|
|
3656
|
+
], zt = Va, $a = typeof globalThis > "u" ? br : globalThis, ii = function() {
|
|
3660
3657
|
for (var e = [], r = 0; r < zt.length; r++)
|
|
3661
|
-
typeof
|
|
3658
|
+
typeof $a[zt[r]] == "function" && (e[e.length] = zt[r]);
|
|
3662
3659
|
return e;
|
|
3663
|
-
}, It = ni,
|
|
3660
|
+
}, It = ni, Ma = ii, ln = Tr, _r = Or, vt = Vt, ja = _r("Object.prototype.toString"), oi = Dt(), dn = typeof globalThis > "u" ? br : globalThis, hr = Ma(), Lr = _r("String.prototype.slice"), Ht = Object.getPrototypeOf, Ua = _r("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3664
3661
|
for (var n = 0; n < e.length; n += 1)
|
|
3665
3662
|
if (e[n] === r)
|
|
3666
3663
|
return n;
|
|
@@ -3680,7 +3677,7 @@ oi && vt && Ht ? It(hr, function(t) {
|
|
|
3680
3677
|
var e = new dn[t](), r = e.slice || e.set;
|
|
3681
3678
|
r && (Tt["$" + t] = ln(r));
|
|
3682
3679
|
});
|
|
3683
|
-
var
|
|
3680
|
+
var Ba = function(e) {
|
|
3684
3681
|
var r = !1;
|
|
3685
3682
|
return It(Tt, function(n, i) {
|
|
3686
3683
|
if (!r)
|
|
@@ -3689,7 +3686,7 @@ var Ua = function(e) {
|
|
|
3689
3686
|
} catch {
|
|
3690
3687
|
}
|
|
3691
3688
|
}), r;
|
|
3692
|
-
},
|
|
3689
|
+
}, xa = function(e) {
|
|
3693
3690
|
var r = !1;
|
|
3694
3691
|
return It(Tt, function(n, i) {
|
|
3695
3692
|
if (!r)
|
|
@@ -3698,15 +3695,15 @@ var Ua = function(e) {
|
|
|
3698
3695
|
} catch {
|
|
3699
3696
|
}
|
|
3700
3697
|
}), r;
|
|
3701
|
-
},
|
|
3698
|
+
}, qa = function(e) {
|
|
3702
3699
|
if (!e || typeof e != "object")
|
|
3703
3700
|
return !1;
|
|
3704
3701
|
if (!oi) {
|
|
3705
|
-
var r = Lr(
|
|
3706
|
-
return
|
|
3702
|
+
var r = Lr(ja(e), 8, -1);
|
|
3703
|
+
return Ua(hr, r) > -1 ? r : r !== "Object" ? !1 : xa(e);
|
|
3707
3704
|
}
|
|
3708
|
-
return vt ?
|
|
3709
|
-
}, Ot = ni,
|
|
3705
|
+
return vt ? Ba(e) : null;
|
|
3706
|
+
}, Ot = ni, Qa = ii, fn = Tr, Cr = Or, bt = Vt, Ga = Cr("Object.prototype.toString"), si = Dt(), hn = typeof globalThis > "u" ? br : globalThis, pr = Qa(), kr = Cr("String.prototype.slice"), Wt = Object.getPrototypeOf, Ka = Cr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3710
3707
|
for (var n = 0; n < e.length; n += 1)
|
|
3711
3708
|
if (e[n] === r)
|
|
3712
3709
|
return n;
|
|
@@ -3726,7 +3723,7 @@ si && bt && Wt ? Ot(pr, function(t) {
|
|
|
3726
3723
|
var e = new hn[t](), r = e.slice || e.set;
|
|
3727
3724
|
r && (_t["$" + t] = fn(r));
|
|
3728
3725
|
});
|
|
3729
|
-
var
|
|
3726
|
+
var za = function(e) {
|
|
3730
3727
|
var r = !1;
|
|
3731
3728
|
return Ot(
|
|
3732
3729
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -3742,7 +3739,7 @@ var Ka = function(e) {
|
|
|
3742
3739
|
}
|
|
3743
3740
|
}
|
|
3744
3741
|
), r;
|
|
3745
|
-
},
|
|
3742
|
+
}, Ha = function(e) {
|
|
3746
3743
|
var r = !1;
|
|
3747
3744
|
return Ot(
|
|
3748
3745
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -3758,19 +3755,19 @@ var Ka = function(e) {
|
|
|
3758
3755
|
}
|
|
3759
3756
|
}
|
|
3760
3757
|
), r;
|
|
3761
|
-
},
|
|
3758
|
+
}, Wa = function(e) {
|
|
3762
3759
|
if (!e || typeof e != "object")
|
|
3763
3760
|
return !1;
|
|
3764
3761
|
if (!si) {
|
|
3765
|
-
var r = kr(
|
|
3766
|
-
return
|
|
3762
|
+
var r = kr(Ga(e), 8, -1);
|
|
3763
|
+
return Ka(pr, r) > -1 ? r : r !== "Object" ? !1 : Ha(e);
|
|
3767
3764
|
}
|
|
3768
|
-
return bt ?
|
|
3769
|
-
},
|
|
3770
|
-
return !!
|
|
3765
|
+
return bt ? za(e) : null;
|
|
3766
|
+
}, Ya = Wa, Ja = function(e) {
|
|
3767
|
+
return !!Ya(e);
|
|
3771
3768
|
};
|
|
3772
3769
|
(function(t) {
|
|
3773
|
-
var e =
|
|
3770
|
+
var e = ha, r = va, n = qa, i = Ja;
|
|
3774
3771
|
function o(y) {
|
|
3775
3772
|
return y.call.bind(y);
|
|
3776
3773
|
}
|
|
@@ -3953,7 +3950,7 @@ var Ka = function(e) {
|
|
|
3953
3950
|
});
|
|
3954
3951
|
});
|
|
3955
3952
|
})(Gn);
|
|
3956
|
-
var
|
|
3953
|
+
var Xa = function(e) {
|
|
3957
3954
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3958
3955
|
}, yr = { exports: {} };
|
|
3959
3956
|
typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
@@ -3973,7 +3970,7 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
|
3973
3970
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
3974
3971
|
}
|
|
3975
3972
|
};
|
|
3976
|
-
var
|
|
3973
|
+
var Za = yr.exports;
|
|
3977
3974
|
(function(t) {
|
|
3978
3975
|
var e = Object.getOwnPropertyDescriptors || function(p) {
|
|
3979
3976
|
for (var m = Object.keys(p), S = {}, _ = 0; _ < m.length; _++)
|
|
@@ -4250,7 +4247,7 @@ var Xa = yr.exports;
|
|
|
4250
4247
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
4251
4248
|
typeof d > "u";
|
|
4252
4249
|
}
|
|
4253
|
-
t.isPrimitive = Mt, t.isBuffer =
|
|
4250
|
+
t.isPrimitive = Mt, t.isBuffer = Xa;
|
|
4254
4251
|
function Se(d) {
|
|
4255
4252
|
return Object.prototype.toString.call(d);
|
|
4256
4253
|
}
|
|
@@ -4281,7 +4278,7 @@ var Xa = yr.exports;
|
|
|
4281
4278
|
}
|
|
4282
4279
|
t.log = function() {
|
|
4283
4280
|
console.log("%s - %s", jt(), t.format.apply(t, arguments));
|
|
4284
|
-
}, t.inherits =
|
|
4281
|
+
}, t.inherits = Za, t._extend = function(d, p) {
|
|
4285
4282
|
if (!p || !ie(p)) return d;
|
|
4286
4283
|
for (var m = Object.keys(p), S = m.length; S--; )
|
|
4287
4284
|
d[m[S]] = p[m[S]];
|
|
@@ -4365,7 +4362,7 @@ var Xa = yr.exports;
|
|
|
4365
4362
|
}
|
|
4366
4363
|
t.callbackify = at;
|
|
4367
4364
|
})(Ft);
|
|
4368
|
-
const { inherits:
|
|
4365
|
+
const { inherits: eu, format: Yt } = Ft;
|
|
4369
4366
|
function Oe(t, e, r = Error) {
|
|
4370
4367
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
4371
4368
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
@@ -4376,7 +4373,7 @@ function Oe(t, e, r = Error) {
|
|
|
4376
4373
|
}
|
|
4377
4374
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
4378
4375
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4379
|
-
},
|
|
4376
|
+
}, eu(n, r), n;
|
|
4380
4377
|
}
|
|
4381
4378
|
var ai = {
|
|
4382
4379
|
createError: Oe,
|
|
@@ -4404,7 +4401,7 @@ var ai = {
|
|
|
4404
4401
|
"AVV_ERR_READY_TIMEOUT",
|
|
4405
4402
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4406
4403
|
)
|
|
4407
|
-
},
|
|
4404
|
+
}, tu = function t(e, r, n) {
|
|
4408
4405
|
r === void 0 && (r = ""), n || (n = {});
|
|
4409
4406
|
var i = function(u) {
|
|
4410
4407
|
var f = {
|
|
@@ -4426,8 +4423,8 @@ var ai = {
|
|
|
4426
4423
|
return r + i(c ? "└" : "├") + i("─") + i(h ? "┬" : "─") + " " + t(u, l, n).slice(r.length + 2);
|
|
4427
4424
|
}).join("");
|
|
4428
4425
|
};
|
|
4429
|
-
const
|
|
4430
|
-
let
|
|
4426
|
+
const ru = tu, pn = Symbol("avvio.TimeTree.untrackNode"), Jt = Symbol("avvio.TimeTree.trackNode"), yn = Symbol("avvio.TimeTree.getParent"), gn = Symbol("avvio.TimeTree.getNode"), mn = Symbol("avvio.TimeTree.addNode");
|
|
4427
|
+
let nu = class {
|
|
4431
4428
|
constructor() {
|
|
4432
4429
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4433
4430
|
}
|
|
@@ -4481,11 +4478,11 @@ let ru = class {
|
|
|
4481
4478
|
}
|
|
4482
4479
|
prittyPrint() {
|
|
4483
4480
|
const e = (n) => (n.label = `${n.label} ${n.diff} ms`, n.nodes.length > 0 && (n.nodes = n.nodes.map((i) => e(i))), n), r = e(this.toJSON());
|
|
4484
|
-
return
|
|
4481
|
+
return ru(r);
|
|
4485
4482
|
}
|
|
4486
4483
|
};
|
|
4487
|
-
var
|
|
4488
|
-
function
|
|
4484
|
+
var iu = nu, Pr = { exports: {} }, gr = { exports: {} }, Xt, vn;
|
|
4485
|
+
function ou() {
|
|
4489
4486
|
if (vn) return Xt;
|
|
4490
4487
|
vn = 1;
|
|
4491
4488
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
@@ -4566,8 +4563,8 @@ function iu() {
|
|
|
4566
4563
|
}
|
|
4567
4564
|
return Xt;
|
|
4568
4565
|
}
|
|
4569
|
-
function
|
|
4570
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4566
|
+
function su(t) {
|
|
4567
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = ou(), r.destroy = f, Object.keys(t).forEach((c) => {
|
|
4571
4568
|
r[c] = t[c];
|
|
4572
4569
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4573
4570
|
function e(c) {
|
|
@@ -4647,7 +4644,7 @@ function ou(t) {
|
|
|
4647
4644
|
}
|
|
4648
4645
|
return r.enable(r.load()), r;
|
|
4649
4646
|
}
|
|
4650
|
-
var
|
|
4647
|
+
var au = su;
|
|
4651
4648
|
(function(t, e) {
|
|
4652
4649
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4653
4650
|
let u = !1;
|
|
@@ -4771,7 +4768,7 @@ var su = ou;
|
|
|
4771
4768
|
} catch {
|
|
4772
4769
|
}
|
|
4773
4770
|
}
|
|
4774
|
-
t.exports =
|
|
4771
|
+
t.exports = au(e);
|
|
4775
4772
|
const { formatters: a } = t.exports;
|
|
4776
4773
|
a.j = function(u) {
|
|
4777
4774
|
try {
|
|
@@ -4782,21 +4779,21 @@ var su = ou;
|
|
|
4782
4779
|
};
|
|
4783
4780
|
})(gr, gr.exports);
|
|
4784
4781
|
var ui = gr.exports;
|
|
4785
|
-
const
|
|
4786
|
-
function
|
|
4782
|
+
const uu = Rn, cu = Qn.EventEmitter, lu = Ft.inherits, j = ui("avvio"), { AVV_ERR_READY_TIMEOUT: du } = ai, Zt = Symbol.for("plugin-meta");
|
|
4783
|
+
function fu(t, e) {
|
|
4787
4784
|
return t[Zt] && t[Zt].name ? t[Zt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4788
4785
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4789
4786
|
}
|
|
4790
|
-
function
|
|
4787
|
+
function hu() {
|
|
4791
4788
|
const t = {};
|
|
4792
4789
|
return t.promise = new Promise((e, r) => {
|
|
4793
4790
|
t.resolve = e, t.reject = r;
|
|
4794
4791
|
}), t;
|
|
4795
4792
|
}
|
|
4796
4793
|
function We(t, e, r, n, i) {
|
|
4797
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name =
|
|
4794
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = fu(e, r), this.isAfter = n, this.q = uu(t, pu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4798
4795
|
}
|
|
4799
|
-
|
|
4796
|
+
lu(We, cu);
|
|
4800
4797
|
We.prototype.exec = function(t, e) {
|
|
4801
4798
|
const r = this.func;
|
|
4802
4799
|
let n = !1;
|
|
@@ -4824,7 +4821,7 @@ We.prototype.exec = function(t, e) {
|
|
|
4824
4821
|
};
|
|
4825
4822
|
this.timeout > 0 && (j("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4826
4823
|
j("timed out", i), o = null;
|
|
4827
|
-
const u = new
|
|
4824
|
+
const u = new du(i);
|
|
4828
4825
|
u.fn = r, s(u);
|
|
4829
4826
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4830
4827
|
const a = r(this.server, this.opts, s);
|
|
@@ -4842,7 +4839,7 @@ We.prototype.loadedSoFar = function() {
|
|
|
4842
4839
|
}), this.q.resume();
|
|
4843
4840
|
};
|
|
4844
4841
|
let e;
|
|
4845
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4842
|
+
return this._promise ? e = Promise.resolve() : (this._promise = hu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4846
4843
|
};
|
|
4847
4844
|
We.prototype.enqueue = function(t, e) {
|
|
4848
4845
|
j("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
@@ -4867,12 +4864,12 @@ We.prototype.finish = function(t, e) {
|
|
|
4867
4864
|
r();
|
|
4868
4865
|
else
|
|
4869
4866
|
j("delayed", this.name), this.q.drain = () => {
|
|
4870
|
-
j("drain", this.name), this.q.drain =
|
|
4867
|
+
j("drain", this.name), this.q.drain = yu, queueMicrotask(n);
|
|
4871
4868
|
};
|
|
4872
4869
|
};
|
|
4873
4870
|
queueMicrotask(n), this.q.resume();
|
|
4874
4871
|
};
|
|
4875
|
-
function
|
|
4872
|
+
function pu(t, e) {
|
|
4876
4873
|
const r = this;
|
|
4877
4874
|
A.nextTick(Nr.bind(r), t, e);
|
|
4878
4875
|
}
|
|
@@ -4890,19 +4887,19 @@ function Nr(t, e) {
|
|
|
4890
4887
|
});
|
|
4891
4888
|
});
|
|
4892
4889
|
}
|
|
4893
|
-
function
|
|
4890
|
+
function yu() {
|
|
4894
4891
|
}
|
|
4895
4892
|
Pr.exports = We;
|
|
4896
4893
|
Pr.exports.loadPlugin = Nr;
|
|
4897
|
-
var
|
|
4898
|
-
const bn = Rn,
|
|
4894
|
+
var gu = Pr.exports;
|
|
4895
|
+
const bn = Rn, mu = Qn.EventEmitter, vu = Ft.inherits, {
|
|
4899
4896
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
|
|
4900
4897
|
AVV_ERR_CALLBACK_NOT_FN: et,
|
|
4901
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4902
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4903
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4904
|
-
} = ai,
|
|
4905
|
-
function
|
|
4898
|
+
AVV_ERR_PLUGIN_NOT_VALID: bu,
|
|
4899
|
+
AVV_ERR_ROOT_PLG_BOOTED: Su,
|
|
4900
|
+
AVV_ERR_READY_TIMEOUT: wu
|
|
4901
|
+
} = ai, Au = iu, mr = gu, ze = ui("avvio"), Lt = Symbol("kAvvio"), tr = Symbol("kThenifyDoNotWrap");
|
|
4902
|
+
function Eu(t, e, r) {
|
|
4906
4903
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
4907
4904
|
if (t[i])
|
|
4908
4905
|
throw new er(i);
|
|
@@ -4921,7 +4918,7 @@ function Au(t, e, r) {
|
|
|
4921
4918
|
}, t[a] = function(f) {
|
|
4922
4919
|
if (typeof f != "function")
|
|
4923
4920
|
throw new et(a, typeof f);
|
|
4924
|
-
return r.onClose(
|
|
4921
|
+
return r.onClose(Lu(f, this)), this;
|
|
4925
4922
|
}, t[u] = function(f) {
|
|
4926
4923
|
if (f && typeof f != "function")
|
|
4927
4924
|
throw new et(u, typeof f);
|
|
@@ -4931,13 +4928,13 @@ function Au(t, e, r) {
|
|
|
4931
4928
|
function x(t, e, r) {
|
|
4932
4929
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
|
|
4933
4930
|
const n = new x(t, e, r);
|
|
4934
|
-
return t &&
|
|
4931
|
+
return t && Eu(t, e, n), n;
|
|
4935
4932
|
}
|
|
4936
|
-
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
|
|
4933
|
+
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 Au(), this._readyQ = bn(this, li, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4937
4934
|
this.emit("start"), this._readyQ.drain = Sn;
|
|
4938
|
-
}, this._closeQ = bn(this,
|
|
4935
|
+
}, this._closeQ = bn(this, _u, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4939
4936
|
this.emit("close"), this._closeQ.drain = Sn;
|
|
4940
|
-
}, this._doStart = null, this._root = new mr(this,
|
|
4937
|
+
}, this._doStart = null, this._root = new mr(this, Iu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
4941
4938
|
const s = this.pluginTree.start(null, i, o);
|
|
4942
4939
|
this._root.once("loaded", (a, u, f) => {
|
|
4943
4940
|
this.pluginTree.stop(s, f);
|
|
@@ -4957,19 +4954,19 @@ function x(t, e, r) {
|
|
|
4957
4954
|
this._readyQ.resume();
|
|
4958
4955
|
});
|
|
4959
4956
|
}
|
|
4960
|
-
function
|
|
4957
|
+
function Iu(t, e, r) {
|
|
4961
4958
|
this._doStart = r, e.autostart && this.start();
|
|
4962
4959
|
}
|
|
4963
|
-
|
|
4960
|
+
vu(x, mu);
|
|
4964
4961
|
x.prototype.start = function() {
|
|
4965
4962
|
return this.started = !0, A.nextTick(this._doStart), this;
|
|
4966
4963
|
};
|
|
4967
4964
|
x.prototype.override = function(t, e, r) {
|
|
4968
4965
|
return t;
|
|
4969
4966
|
};
|
|
4970
|
-
function
|
|
4967
|
+
function Tu(t) {
|
|
4971
4968
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4972
|
-
throw new
|
|
4969
|
+
throw new bu(typeof t);
|
|
4973
4970
|
return t;
|
|
4974
4971
|
}
|
|
4975
4972
|
x.prototype[Lt] = !0;
|
|
@@ -4982,8 +4979,8 @@ x.prototype._loadRegistered = function() {
|
|
|
4982
4979
|
};
|
|
4983
4980
|
Object.defineProperty(x.prototype, "then", { get: ci });
|
|
4984
4981
|
x.prototype._addPlugin = function(t, e, r) {
|
|
4985
|
-
if (t =
|
|
4986
|
-
throw new
|
|
4982
|
+
if (t = Tu(t), e = e || {}, this.booted)
|
|
4983
|
+
throw new Su();
|
|
4987
4984
|
const n = this._current[0], i = new mr(this, t, e, r);
|
|
4988
4985
|
if (i.once("start", (o, s, a) => {
|
|
4989
4986
|
const u = this.pluginTree.start(n.name, s, a);
|
|
@@ -5078,14 +5075,14 @@ function li(t, e) {
|
|
|
5078
5075
|
};
|
|
5079
5076
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
5080
5077
|
} else
|
|
5081
|
-
|
|
5078
|
+
Ou.call(this, t, n, r, e);
|
|
5082
5079
|
}
|
|
5083
|
-
function
|
|
5080
|
+
function Ou(t, e, r, n) {
|
|
5084
5081
|
const i = t.name;
|
|
5085
5082
|
ze("setting up ready timeout", i, this._timeout);
|
|
5086
5083
|
let o = setTimeout(() => {
|
|
5087
5084
|
ze("timed out", i), o = null;
|
|
5088
|
-
const a = new
|
|
5085
|
+
const a = new wu(i);
|
|
5089
5086
|
a.fn = t, this._error = a, n(a);
|
|
5090
5087
|
}, this._timeout);
|
|
5091
5088
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5093,7 +5090,7 @@ function Tu(t, e, r, n) {
|
|
|
5093
5090
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
5094
5091
|
}
|
|
5095
5092
|
}
|
|
5096
|
-
function
|
|
5093
|
+
function _u(t, e) {
|
|
5097
5094
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
5098
5095
|
if (t.length === 0 || t.length === 1) {
|
|
5099
5096
|
let i;
|
|
@@ -5103,7 +5100,7 @@ function Ou(t, e) {
|
|
|
5103
5100
|
)) : A.nextTick(e);
|
|
5104
5101
|
} else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
5105
5102
|
}
|
|
5106
|
-
function
|
|
5103
|
+
function Lu(t, e) {
|
|
5107
5104
|
return r.bind(e);
|
|
5108
5105
|
function r(n, i) {
|
|
5109
5106
|
let o;
|
|
@@ -5133,8 +5130,8 @@ Sr.exports.express = function(t) {
|
|
|
5133
5130
|
}
|
|
5134
5131
|
});
|
|
5135
5132
|
};
|
|
5136
|
-
var
|
|
5137
|
-
const
|
|
5133
|
+
var Cu = Sr.exports;
|
|
5134
|
+
const ku = /* @__PURE__ */ is(Cu);
|
|
5138
5135
|
(function() {
|
|
5139
5136
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5140
5137
|
return;
|
|
@@ -5152,9 +5149,9 @@ const Cu = /* @__PURE__ */ ns(Lu);
|
|
|
5152
5149
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5153
5150
|
}
|
|
5154
5151
|
})();
|
|
5155
|
-
function
|
|
5156
|
-
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s =
|
|
5157
|
-
return s.use(
|
|
5152
|
+
function ec(t, e = !0, r = !0, n) {
|
|
5153
|
+
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = ku(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5154
|
+
return s.use(Do), s.use(Lo, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(No, { videoPlayerController: n?.videoPlayerController }), s.use(Fo, { onContentActivate: n?.onContentActivate }), s.use(zi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Xi), s.use(Po), s.use(zo), s.use(vo), s.use(ns), s.after((a, u, f) => {
|
|
5158
5155
|
if (a)
|
|
5159
5156
|
throw a;
|
|
5160
5157
|
u.ready(), f();
|
|
@@ -5167,5 +5164,5 @@ function Zu(t, e = !0, r = !0, n) {
|
|
|
5167
5164
|
}), s;
|
|
5168
5165
|
}
|
|
5169
5166
|
export {
|
|
5170
|
-
|
|
5167
|
+
ec as StreamLayer
|
|
5171
5168
|
};
|