@streamlayer/sdk-web 1.2.3 → 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 +324 -330
- 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
921
|
}), i = n.data?.attributes?.options?.options.case === "promotion" ? n.data?.attributes?.options?.options.value : void 0;
|
|
922
922
|
return i ? { promotions: i, notification: n.data?.attributes?.notification } : void 0;
|
|
923
|
-
},
|
|
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,8 +1085,8 @@ 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: {
|
|
@@ -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 {
|
|
@@ -1133,11 +1138,7 @@ const fo = (t, e, r) => {
|
|
|
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");
|
|
@@ -1192,7 +1186,7 @@ var Ce;
|
|
|
1192
1186
|
(function(t) {
|
|
1193
1187
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
1194
1188
|
})(Ce || (Ce = {}));
|
|
1195
|
-
class
|
|
1189
|
+
class po {
|
|
1196
1190
|
/** sl event id */
|
|
1197
1191
|
slStreamId;
|
|
1198
1192
|
/** organization id */
|
|
@@ -1225,11 +1219,11 @@ class ho {
|
|
|
1225
1219
|
transport;
|
|
1226
1220
|
cancels = /* @__PURE__ */ new Set();
|
|
1227
1221
|
constructor(e) {
|
|
1228
|
-
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(
|
|
1229
|
-
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) => {
|
|
1230
1224
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
1231
1225
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1232
|
-
})), this.feedSubscription =
|
|
1226
|
+
})), this.feedSubscription = io(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
1233
1227
|
const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
|
|
1234
1228
|
!i || i.type === F.PROMOTION || n && i.status === H.RESOLVED && i.id !== n || this.activeQuestionId.mutate(r.data?.attributes);
|
|
1235
1229
|
})), this.cancels.add(this.feedSubscription.addListener("moderation update", (r) => {
|
|
@@ -1244,7 +1238,7 @@ class ho {
|
|
|
1244
1238
|
this.activeQuestionId.off();
|
|
1245
1239
|
for (const r of this.cancels)
|
|
1246
1240
|
r(), this.cancels.delete(r);
|
|
1247
|
-
}), this.advertisement =
|
|
1241
|
+
}), this.advertisement = ho(this.slStreamId, this.feedSubscription, e);
|
|
1248
1242
|
}
|
|
1249
1243
|
/**
|
|
1250
1244
|
* Get id for notifications and link with current session
|
|
@@ -1274,7 +1268,7 @@ class ho {
|
|
|
1274
1268
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1275
1269
|
};
|
|
1276
1270
|
}
|
|
1277
|
-
class
|
|
1271
|
+
class yo {
|
|
1278
1272
|
notificationsList;
|
|
1279
1273
|
store;
|
|
1280
1274
|
timeouts;
|
|
@@ -1359,7 +1353,7 @@ var wt;
|
|
|
1359
1353
|
(function(t) {
|
|
1360
1354
|
t.OPENED = "opened";
|
|
1361
1355
|
})(wt || (wt = {}));
|
|
1362
|
-
class
|
|
1356
|
+
class go extends He {
|
|
1363
1357
|
constructor() {
|
|
1364
1358
|
super("notification");
|
|
1365
1359
|
}
|
|
@@ -1375,11 +1369,11 @@ var Ae;
|
|
|
1375
1369
|
(function(t) {
|
|
1376
1370
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1377
1371
|
})(Ae || (Ae = {}));
|
|
1378
|
-
class
|
|
1372
|
+
class mo {
|
|
1379
1373
|
queue;
|
|
1380
1374
|
storage;
|
|
1381
1375
|
constructor(e = {}) {
|
|
1382
|
-
this.storage = new
|
|
1376
|
+
this.storage = new go(), this.queue = new yo({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1383
1377
|
}
|
|
1384
1378
|
isViewed = (e) => this.storage.isOpened(e);
|
|
1385
1379
|
add = (e) => {
|
|
@@ -1416,8 +1410,8 @@ class go {
|
|
|
1416
1410
|
this.storage.setOpened(e);
|
|
1417
1411
|
};
|
|
1418
1412
|
}
|
|
1419
|
-
const
|
|
1420
|
-
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" }, () => () => {
|
|
1421
1415
|
t.notifications.queue.drain();
|
|
1422
1416
|
}), r();
|
|
1423
1417
|
};
|
|
@@ -1425,14 +1419,14 @@ var rt;
|
|
|
1425
1419
|
(function(t) {
|
|
1426
1420
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1427
1421
|
})(rt || (rt = {}));
|
|
1428
|
-
const
|
|
1422
|
+
const bo = async (t, e) => {
|
|
1429
1423
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1430
1424
|
try {
|
|
1431
1425
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1432
1426
|
} catch (o) {
|
|
1433
1427
|
throw tt.from(o)?.code === oe.AlreadyExists ? new Error(rt.ALREADY_VOTED) : new Error(rt.UNKNOWN);
|
|
1434
1428
|
}
|
|
1435
|
-
},
|
|
1429
|
+
}, So = (t, e) => {
|
|
1436
1430
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1437
1431
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1438
1432
|
};
|
|
@@ -1440,7 +1434,7 @@ var Be;
|
|
|
1440
1434
|
(function(t) {
|
|
1441
1435
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1442
1436
|
})(Be || (Be = {}));
|
|
1443
|
-
class
|
|
1437
|
+
class wo extends He {
|
|
1444
1438
|
constructor() {
|
|
1445
1439
|
super("gamification-session", window.sessionStorage);
|
|
1446
1440
|
}
|
|
@@ -1452,7 +1446,7 @@ class So extends He {
|
|
|
1452
1446
|
class Pn extends He {
|
|
1453
1447
|
sessionStorage;
|
|
1454
1448
|
constructor() {
|
|
1455
|
-
super("gamification"), this.sessionStorage = new
|
|
1449
|
+
super("gamification"), this.sessionStorage = new wo();
|
|
1456
1450
|
}
|
|
1457
1451
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1458
1452
|
this.write(Be.ONBOARDING, n, e, r, i);
|
|
@@ -1463,17 +1457,17 @@ class Pn extends He {
|
|
|
1463
1457
|
};
|
|
1464
1458
|
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Be.ONBOARDING_IO, n, e, r]);
|
|
1465
1459
|
}
|
|
1466
|
-
const
|
|
1460
|
+
const Ao = {
|
|
1467
1461
|
pageSize: 10
|
|
1468
|
-
},
|
|
1462
|
+
}, Eo = (t, e, r, n, i) => {
|
|
1469
1463
|
let o = 0;
|
|
1470
|
-
const s = B({ pageSize:
|
|
1464
|
+
const s = B({ pageSize: Ao.pageSize, page: 0 }), a = te({
|
|
1471
1465
|
data: [],
|
|
1472
1466
|
key: Date.now(),
|
|
1473
1467
|
hasMore: !0,
|
|
1474
1468
|
loading: void 0,
|
|
1475
1469
|
error: void 0
|
|
1476
|
-
}), u =
|
|
1470
|
+
}), u = Zi(t), f = async () => {
|
|
1477
1471
|
const l = e.get(), g = n.getStore().get().data?.map((v) => v.slId) || [];
|
|
1478
1472
|
if (l && g?.length) {
|
|
1479
1473
|
const v = r.get();
|
|
@@ -1505,7 +1499,7 @@ const wo = {
|
|
|
1505
1499
|
};
|
|
1506
1500
|
}), { $store: a, fetchMore: h, invalidate: c };
|
|
1507
1501
|
};
|
|
1508
|
-
class
|
|
1502
|
+
class Io extends He {
|
|
1509
1503
|
get = this.read;
|
|
1510
1504
|
set = this.write;
|
|
1511
1505
|
del = this.remove;
|
|
@@ -1513,12 +1507,12 @@ class Eo extends He {
|
|
|
1513
1507
|
super("deep-link-context", window.sessionStorage);
|
|
1514
1508
|
}
|
|
1515
1509
|
}
|
|
1516
|
-
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) => {
|
|
1517
1511
|
const e = {}, r = {};
|
|
1518
1512
|
for (const [n, i] of t)
|
|
1519
|
-
|
|
1513
|
+
To.has(n) ? e[n] = i : r[n] = i;
|
|
1520
1514
|
return { result: e, remain: r };
|
|
1521
|
-
},
|
|
1515
|
+
}, Oo = ({ hash: t, search: e }) => {
|
|
1522
1516
|
if (t && t.includes(Kr)) {
|
|
1523
1517
|
const r = new URLSearchParams(t.substr(1));
|
|
1524
1518
|
return { hash: zr(r) };
|
|
@@ -1535,10 +1529,10 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Io = /*
|
|
|
1535
1529
|
trace: (...t) => {
|
|
1536
1530
|
Hr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1537
1531
|
}
|
|
1538
|
-
},
|
|
1532
|
+
}, _o = (t, e) => {
|
|
1539
1533
|
const { hash: r, search: n } = window.location;
|
|
1540
1534
|
if (ue.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1541
|
-
const i =
|
|
1535
|
+
const i = Oo({ hash: r, search: n });
|
|
1542
1536
|
if (ue.debug(i, "parse deep link result"), i) {
|
|
1543
1537
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1544
1538
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1557,8 +1551,8 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Io = /*
|
|
|
1557
1551
|
}
|
|
1558
1552
|
}
|
|
1559
1553
|
t.setValue("parsed", !0);
|
|
1560
|
-
},
|
|
1561
|
-
const n = new
|
|
1554
|
+
}, Lo = (t, e, r) => {
|
|
1555
|
+
const n = new Io(), i = n.get("sl-deep-link-store");
|
|
1562
1556
|
let o = {};
|
|
1563
1557
|
if (i)
|
|
1564
1558
|
try {
|
|
@@ -1596,15 +1590,15 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Io = /*
|
|
|
1596
1590
|
console.error(f);
|
|
1597
1591
|
}
|
|
1598
1592
|
};
|
|
1599
|
-
|
|
1600
|
-
},
|
|
1601
|
-
class
|
|
1593
|
+
_o(t.deepLink.$store, s), r();
|
|
1594
|
+
}, Co = le("bypass");
|
|
1595
|
+
class ko extends ki {
|
|
1602
1596
|
$coreStore;
|
|
1603
1597
|
deepLink;
|
|
1604
1598
|
transport;
|
|
1605
1599
|
bypassLogin;
|
|
1606
1600
|
constructor(e, r, n) {
|
|
1607
|
-
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();
|
|
1608
1602
|
}
|
|
1609
1603
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1610
1604
|
/**
|
|
@@ -1616,7 +1610,7 @@ class Co extends Ci {
|
|
|
1616
1610
|
login = async (e, r) => {
|
|
1617
1611
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1618
1612
|
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Pt];
|
|
1619
|
-
|
|
1613
|
+
Co.debug({ inviterKey: o }, "login with inviterKey");
|
|
1620
1614
|
const s = await this.bypassLogin({
|
|
1621
1615
|
schema: e,
|
|
1622
1616
|
userKey: r,
|
|
@@ -1685,8 +1679,8 @@ class Co extends Ci {
|
|
|
1685
1679
|
});
|
|
1686
1680
|
};
|
|
1687
1681
|
}
|
|
1688
|
-
const Je = new Ue(),
|
|
1689
|
-
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) => {
|
|
1690
1684
|
n === ge.READY && t.auth.reLogin();
|
|
1691
1685
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1692
1686
|
if (!(Je.getSchema() === n && Je.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
@@ -1705,7 +1699,7 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1705
1699
|
trace: (...t) => {
|
|
1706
1700
|
Wr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1707
1701
|
}
|
|
1708
|
-
},
|
|
1702
|
+
}, No = (t, e, r) => {
|
|
1709
1703
|
t.videoPlayer = {
|
|
1710
1704
|
controllers: /* @__PURE__ */ new Set()
|
|
1711
1705
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
@@ -1723,13 +1717,13 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1723
1717
|
}
|
|
1724
1718
|
}
|
|
1725
1719
|
}, r();
|
|
1726
|
-
},
|
|
1720
|
+
}, Fo = (t, e, r) => {
|
|
1727
1721
|
t.ui = {
|
|
1728
1722
|
state: /* @__PURE__ */ new Set()
|
|
1729
1723
|
}, e.onContentActivate && (t.ui.onContentActivate = e.onContentActivate), t.sdk.onAdvertisementActivate = (n) => {
|
|
1730
1724
|
t.ui.onContentActivate && t.ui.onContentActivate({ ...n, type: "advertisement" });
|
|
1731
1725
|
}, r();
|
|
1732
|
-
},
|
|
1726
|
+
}, Do = (t, e, r) => {
|
|
1733
1727
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1734
1728
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1735
1729
|
if (i.has(s)) {
|
|
@@ -1756,7 +1750,7 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1756
1750
|
}, t.sdk.createEventSession = (s) => {
|
|
1757
1751
|
t.stores.providerStreamId.setValue(s);
|
|
1758
1752
|
}, r();
|
|
1759
|
-
},
|
|
1753
|
+
}, Ro = (t, e) => {
|
|
1760
1754
|
const { client: r, queryKey: n } = t.createPromiseClient(it, {
|
|
1761
1755
|
method: "generateDeepLink",
|
|
1762
1756
|
params: e
|
|
@@ -1777,17 +1771,17 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1777
1771
|
// 24 hours
|
|
1778
1772
|
refetchInterval: 0
|
|
1779
1773
|
});
|
|
1780
|
-
},
|
|
1781
|
-
const { client: n } = t.createPromiseClient(
|
|
1774
|
+
}, Vo = (t, { web: e, mobile: r }) => {
|
|
1775
|
+
const { client: n } = t.createPromiseClient(wi, { method: "generate" });
|
|
1782
1776
|
return n.generate({ web: e, mobile: r });
|
|
1783
1777
|
}, Yr = (t, e) => {
|
|
1784
1778
|
const r = new URLSearchParams(t);
|
|
1785
1779
|
for (const [n, i] of Object.entries(e))
|
|
1786
1780
|
r.append(n, i);
|
|
1787
1781
|
return r.toString();
|
|
1788
|
-
},
|
|
1782
|
+
}, $o = (t, e, r, n) => {
|
|
1789
1783
|
const i = te({});
|
|
1790
|
-
return nt(i, () =>
|
|
1784
|
+
return nt(i, () => Ro(t, [e, r]).subscribe(async ({ data: a, error: u, loading: f }) => {
|
|
1791
1785
|
const c = u ? "https://masters.com" : a?.url, h = n.get() || "", l = e.get() || "", g = r.get() || "", v = {
|
|
1792
1786
|
[Pt]: h,
|
|
1793
1787
|
[Nn]: l,
|
|
@@ -1799,7 +1793,7 @@ const Je = new Ue(), ko = (t, e, r) => {
|
|
|
1799
1793
|
w && b || b ? w = `?${Yr(w, v)}` : b = `#${Yr("", v)}`;
|
|
1800
1794
|
const L = window.location.origin + window.location.pathname + w + b;
|
|
1801
1795
|
try {
|
|
1802
|
-
const R = await
|
|
1796
|
+
const R = await Vo(t, { web: L, mobile: c });
|
|
1803
1797
|
i.set({
|
|
1804
1798
|
data: R.data?.link,
|
|
1805
1799
|
loading: !1
|
|
@@ -1819,7 +1813,7 @@ var U;
|
|
|
1819
1813
|
(function(t) {
|
|
1820
1814
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1821
1815
|
})(U || (U = {}));
|
|
1822
|
-
const
|
|
1816
|
+
const Mo = (t, e, r, n) => {
|
|
1823
1817
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1824
1818
|
i && r.add({
|
|
1825
1819
|
type: Ae.ONBOARDING,
|
|
@@ -1863,11 +1857,11 @@ const $o = (t, e, r, n) => {
|
|
|
1863
1857
|
} catch (s) {
|
|
1864
1858
|
console.error(s);
|
|
1865
1859
|
}
|
|
1866
|
-
},
|
|
1860
|
+
}, jo = (t, e, r, n) => {
|
|
1867
1861
|
let i = !1;
|
|
1868
1862
|
const o = new Pn(), s = B(U.Unset);
|
|
1869
1863
|
s.subscribe((f) => {
|
|
1870
|
-
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({
|
|
1871
1865
|
userId: e.userId.get() || "",
|
|
1872
1866
|
organizationId: e.organizationId.get() || "",
|
|
1873
1867
|
eventId: e.slStreamId.get() || ""
|
|
@@ -1883,7 +1877,7 @@ const $o = (t, e, r, n) => {
|
|
|
1883
1877
|
}))), { $store: s, submitInplay: async () => {
|
|
1884
1878
|
const f = e.slStreamId.get();
|
|
1885
1879
|
if (f) {
|
|
1886
|
-
await
|
|
1880
|
+
await So(r, f), s.set(U.Completed), o.saveOnboardingStatus({
|
|
1887
1881
|
organizationId: e.organizationId.get() || "",
|
|
1888
1882
|
userId: e.userId.get() || "",
|
|
1889
1883
|
eventId: f
|
|
@@ -1895,7 +1889,7 @@ const $o = (t, e, r, n) => {
|
|
|
1895
1889
|
n.close(c);
|
|
1896
1890
|
}
|
|
1897
1891
|
} };
|
|
1898
|
-
},
|
|
1892
|
+
}, Uo = (t, e, r, n) => {
|
|
1899
1893
|
const i = te(void 0), o = kn(n), s = async () => {
|
|
1900
1894
|
const u = t.get(), f = e.get(), c = r.getStore().get().data?.map((g) => g.slId);
|
|
1901
1895
|
if (!c)
|
|
@@ -1915,15 +1909,15 @@ const $o = (t, e, r, n) => {
|
|
|
1915
1909
|
u(), f(), c();
|
|
1916
1910
|
};
|
|
1917
1911
|
}), { $store: i, invalidate: a };
|
|
1918
|
-
},
|
|
1912
|
+
}, Bo = async (t, e, r, n, i) => {
|
|
1919
1913
|
const o = kn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((l) => l.slId) || [], f = {
|
|
1920
1914
|
eventId: s,
|
|
1921
1915
|
userId: n,
|
|
1922
1916
|
usersIds: [...u, a]
|
|
1923
1917
|
};
|
|
1924
1918
|
return (await o(f)).data?.attributes?.summary;
|
|
1925
|
-
},
|
|
1926
|
-
class
|
|
1919
|
+
}, xo = /* @__PURE__ */ new Set([F.POLL, F.PREDICTION, F.TRIVIA]);
|
|
1920
|
+
class qo extends _n {
|
|
1927
1921
|
/** user statistics (leaderboard panel) */
|
|
1928
1922
|
userSummary;
|
|
1929
1923
|
/** feed list (pick history) */
|
|
@@ -1958,7 +1952,7 @@ class xo extends _n {
|
|
|
1958
1952
|
submitAnswerTimeout;
|
|
1959
1953
|
cancels = /* @__PURE__ */ new Set();
|
|
1960
1954
|
constructor(e, r, n) {
|
|
1961
|
-
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) => {
|
|
1962
1956
|
o?.summary && i?.summary && this.leaderboardList.invalidate();
|
|
1963
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, () => {
|
|
1964
1958
|
this.background.activeQuestionId.listen(this.showInApp);
|
|
@@ -2118,7 +2112,7 @@ class xo extends _n {
|
|
|
2118
2112
|
}
|
|
2119
2113
|
};
|
|
2120
2114
|
try {
|
|
2121
|
-
await
|
|
2115
|
+
await bo(this.transport, { questionId: e, answerId: r }), s();
|
|
2122
2116
|
} catch (a) {
|
|
2123
2117
|
if (a.message === rt.ALREADY_VOTED) {
|
|
2124
2118
|
this.userSummary.invalidate();
|
|
@@ -2149,7 +2143,7 @@ class xo extends _n {
|
|
|
2149
2143
|
}
|
|
2150
2144
|
}), this.background.openQuestion(e, r);
|
|
2151
2145
|
};
|
|
2152
|
-
getFeedItem = (e) =>
|
|
2146
|
+
getFeedItem = (e) => no(e, this.transport);
|
|
2153
2147
|
isOpenedQuestion = (e) => this.notifications.isViewed(e);
|
|
2154
2148
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
2155
2149
|
openUser = async (e) => {
|
|
@@ -2164,7 +2158,7 @@ class xo extends _n {
|
|
|
2164
2158
|
}
|
|
2165
2159
|
const n = { ...r };
|
|
2166
2160
|
try {
|
|
2167
|
-
const i = await
|
|
2161
|
+
const i = await Bo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
2168
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);
|
|
2169
2163
|
} catch (i) {
|
|
2170
2164
|
console.error(i);
|
|
@@ -2182,8 +2176,8 @@ class xo extends _n {
|
|
|
2182
2176
|
*/
|
|
2183
2177
|
showInApp = (e) => {
|
|
2184
2178
|
const r = this.onboardingStatus.$store.get();
|
|
2185
|
-
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 !==
|
|
2186
|
-
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))
|
|
2187
2181
|
this.isInteractiveAllowed && this.notifications.add({
|
|
2188
2182
|
type: Ae.QUESTION,
|
|
2189
2183
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
@@ -2258,15 +2252,15 @@ class xo extends _n {
|
|
|
2258
2252
|
}
|
|
2259
2253
|
};
|
|
2260
2254
|
}
|
|
2261
|
-
const
|
|
2255
|
+
const Qo = {
|
|
2262
2256
|
[D.GAMES]: !0
|
|
2263
2257
|
};
|
|
2264
|
-
class
|
|
2258
|
+
class Go extends _n {
|
|
2265
2259
|
constructor(e, r) {
|
|
2266
2260
|
super(e, r);
|
|
2267
2261
|
}
|
|
2268
2262
|
}
|
|
2269
|
-
const
|
|
2263
|
+
const Ko = (t, e, r) => t.type === D.GAMES ? new qo(t, e, r) : new Go(t, e), zo = (t, e, r) => {
|
|
2270
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) => {
|
|
2271
2265
|
t.activeFeature.setValue(n);
|
|
2272
2266
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
@@ -2277,8 +2271,8 @@ const Go = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Qo(t, e), Ko
|
|
|
2277
2271
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
2278
2272
|
}
|
|
2279
2273
|
}, t.initFeature = (n, i = ye.ORGANIZATION) => {
|
|
2280
|
-
if (n.type in
|
|
2281
|
-
const o =
|
|
2274
|
+
if (n.type in Qo && !t.features.has(n.type)) {
|
|
2275
|
+
const o = Ko(n, i, t);
|
|
2282
2276
|
t.features.set(n.type, o);
|
|
2283
2277
|
let s = t.sdk.featuresList.getValue();
|
|
2284
2278
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2331,7 +2325,7 @@ const Go = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Qo(t, e), Ko
|
|
|
2331
2325
|
t.store.subscribe(i);
|
|
2332
2326
|
}, r();
|
|
2333
2327
|
};
|
|
2334
|
-
class
|
|
2328
|
+
class Ho {
|
|
2335
2329
|
analytics;
|
|
2336
2330
|
constructor(e) {
|
|
2337
2331
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2367,7 +2361,7 @@ class zo {
|
|
|
2367
2361
|
});
|
|
2368
2362
|
};
|
|
2369
2363
|
}
|
|
2370
|
-
class
|
|
2364
|
+
class Wo {
|
|
2371
2365
|
analytics;
|
|
2372
2366
|
constructor(e) {
|
|
2373
2367
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2404,7 +2398,7 @@ class Ho {
|
|
|
2404
2398
|
});
|
|
2405
2399
|
};
|
|
2406
2400
|
}
|
|
2407
|
-
const
|
|
2401
|
+
const Yo = {
|
|
2408
2402
|
[Te.UNSET]: we.UNSET,
|
|
2409
2403
|
[Te.INGAME_IAB21]: we.PROMOTION_INGAME_IAB21,
|
|
2410
2404
|
[Te.INGAME_IAB11_LBAR]: we.PROMOTION_INGAME_IAB11_LBAR,
|
|
@@ -2413,13 +2407,13 @@ const Wo = {
|
|
|
2413
2407
|
[Te.INGAME_IAB61]: we.PROMOTION_INGAME_IAB61,
|
|
2414
2408
|
[Te.EXTERNAL_AD]: we.PROMOTION_GAM
|
|
2415
2409
|
};
|
|
2416
|
-
class
|
|
2410
|
+
class Jo {
|
|
2417
2411
|
analytics;
|
|
2418
2412
|
constructor(e) {
|
|
2419
2413
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
2420
2414
|
const r = (n) => {
|
|
2421
2415
|
if (n.slEventBus?.type === "advertisement") {
|
|
2422
|
-
const i = n.slEventBus.payload.advertisementType ?
|
|
2416
|
+
const i = n.slEventBus.payload.advertisementType ? Yo[n.slEventBus.payload.advertisementType] : we.UNSET;
|
|
2423
2417
|
switch (n.slEventBus.action) {
|
|
2424
2418
|
case "videoPlay":
|
|
2425
2419
|
this.videoPlay(n.slEventBus.payload, { topicSubType: i });
|
|
@@ -2510,7 +2504,7 @@ const Ze = {
|
|
|
2510
2504
|
[F.TWEET]: z.POLLS_TWITTER
|
|
2511
2505
|
};
|
|
2512
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;
|
|
2513
|
-
const
|
|
2507
|
+
const Xo = {
|
|
2514
2508
|
[D.UNSET]: G.UNSET,
|
|
2515
2509
|
[D.INPLAY]: G.INPLAY,
|
|
2516
2510
|
[D.MESSAGING]: G.MESSAGING,
|
|
@@ -2530,7 +2524,7 @@ const Jo = {
|
|
|
2530
2524
|
[D.HIGHLIGHTS]: G.HIGHLIGHTS,
|
|
2531
2525
|
[D.PUBLIC_CHAT]: G.PUBLIC_CHAT
|
|
2532
2526
|
};
|
|
2533
|
-
class
|
|
2527
|
+
class Zo {
|
|
2534
2528
|
analytics;
|
|
2535
2529
|
constructor(e) {
|
|
2536
2530
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2573,7 +2567,7 @@ class Xo {
|
|
|
2573
2567
|
});
|
|
2574
2568
|
};
|
|
2575
2569
|
}
|
|
2576
|
-
class
|
|
2570
|
+
class es {
|
|
2577
2571
|
analytics;
|
|
2578
2572
|
constructor(e) {
|
|
2579
2573
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2657,7 +2651,7 @@ class Zo {
|
|
|
2657
2651
|
});
|
|
2658
2652
|
};
|
|
2659
2653
|
}
|
|
2660
|
-
const
|
|
2654
|
+
const ts = ({ transport: t, $commonStore: e }) => {
|
|
2661
2655
|
let r;
|
|
2662
2656
|
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(An, {
|
|
2663
2657
|
method: "send",
|
|
@@ -2695,7 +2689,7 @@ const es = ({ transport: t, $commonStore: e }) => {
|
|
|
2695
2689
|
me.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2696
2690
|
} };
|
|
2697
2691
|
}, me = le("analytics");
|
|
2698
|
-
class
|
|
2692
|
+
class rs {
|
|
2699
2693
|
commonStore;
|
|
2700
2694
|
notifications;
|
|
2701
2695
|
polls;
|
|
@@ -2708,7 +2702,7 @@ class ts {
|
|
|
2708
2702
|
listenersCancels;
|
|
2709
2703
|
connected = !1;
|
|
2710
2704
|
constructor(e) {
|
|
2711
|
-
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);
|
|
2712
2706
|
const { client: r } = e.analyticsTransport.createPromiseClient(An, {
|
|
2713
2707
|
method: "send"
|
|
2714
2708
|
});
|
|
@@ -2738,7 +2732,7 @@ class ts {
|
|
|
2738
2732
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2739
2733
|
this.writeCommon("eventId", r);
|
|
2740
2734
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2741
|
-
r && this.writeCommon("category",
|
|
2735
|
+
r && this.writeCommon("category", Xo[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", nr()) : this.writeCommon("overlaySessionId", "");
|
|
2742
2736
|
})), this.onConnect(() => {
|
|
2743
2737
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2744
2738
|
this.writeCommon("screenOrientation", i.matches ? Br.PORTRAIT : Br.LANDSCAPE);
|
|
@@ -2751,17 +2745,17 @@ class ts {
|
|
|
2751
2745
|
}));
|
|
2752
2746
|
};
|
|
2753
2747
|
}
|
|
2754
|
-
const
|
|
2755
|
-
t.analytics = new
|
|
2748
|
+
const ns = (t, e, r) => {
|
|
2749
|
+
t.analytics = new rs(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
2756
2750
|
t.analytics.disconnect();
|
|
2757
2751
|
})), r();
|
|
2758
2752
|
};
|
|
2759
2753
|
var br = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2760
|
-
function
|
|
2754
|
+
function is(t) {
|
|
2761
2755
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2762
2756
|
}
|
|
2763
2757
|
var Sr = { exports: {} }, wr = { exports: {} };
|
|
2764
|
-
function
|
|
2758
|
+
function os(t) {
|
|
2765
2759
|
var e = new t(), r = e;
|
|
2766
2760
|
function n() {
|
|
2767
2761
|
var o = e;
|
|
@@ -2775,11 +2769,11 @@ function is(t) {
|
|
|
2775
2769
|
release: i
|
|
2776
2770
|
};
|
|
2777
2771
|
}
|
|
2778
|
-
var
|
|
2772
|
+
var ss = os, as = ss;
|
|
2779
2773
|
function Dn(t, e, r) {
|
|
2780
2774
|
if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
|
|
2781
2775
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2782
|
-
var n =
|
|
2776
|
+
var n = as(us), i = null, o = null, s = 0, a = null, u = {
|
|
2783
2777
|
push: w,
|
|
2784
2778
|
drain: W,
|
|
2785
2779
|
saturated: W,
|
|
@@ -2861,7 +2855,7 @@ function Dn(t, e, r) {
|
|
|
2861
2855
|
}
|
|
2862
2856
|
function W() {
|
|
2863
2857
|
}
|
|
2864
|
-
function
|
|
2858
|
+
function us() {
|
|
2865
2859
|
this.value = null, this.callback = W, this.next = null, this.release = W, this.context = null, this.errorHandler = null;
|
|
2866
2860
|
var t = this;
|
|
2867
2861
|
this.worked = function(r, n) {
|
|
@@ -2869,7 +2863,7 @@ function as() {
|
|
|
2869
2863
|
t.value = null, t.callback = W, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
2870
2864
|
};
|
|
2871
2865
|
}
|
|
2872
|
-
function
|
|
2866
|
+
function cs(t, e, r) {
|
|
2873
2867
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2874
2868
|
function n(c, h) {
|
|
2875
2869
|
e.call(this, c).then(function(l) {
|
|
@@ -2916,7 +2910,7 @@ function us(t, e, r) {
|
|
|
2916
2910
|
}
|
|
2917
2911
|
}
|
|
2918
2912
|
wr.exports = Dn;
|
|
2919
|
-
wr.exports.promise =
|
|
2913
|
+
wr.exports.promise = cs;
|
|
2920
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) {
|
|
2921
2915
|
return Function.prototype.apply.call(e, r, n);
|
|
2922
2916
|
}, pt;
|
|
@@ -2925,7 +2919,7 @@ Qe && typeof Qe.ownKeys == "function" ? pt = Qe.ownKeys : Object.getOwnPropertyS
|
|
|
2925
2919
|
} : pt = function(e) {
|
|
2926
2920
|
return Object.getOwnPropertyNames(e);
|
|
2927
2921
|
};
|
|
2928
|
-
function
|
|
2922
|
+
function ls(t) {
|
|
2929
2923
|
console && console.warn && console.warn(t);
|
|
2930
2924
|
}
|
|
2931
2925
|
var Vn = Number.isNaN || function(e) {
|
|
@@ -2935,7 +2929,7 @@ function P() {
|
|
|
2935
2929
|
P.init.call(this);
|
|
2936
2930
|
}
|
|
2937
2931
|
Ar.exports = P;
|
|
2938
|
-
Ar.exports.once =
|
|
2932
|
+
Ar.exports.once = ps;
|
|
2939
2933
|
P.EventEmitter = P;
|
|
2940
2934
|
P.prototype._events = void 0;
|
|
2941
2935
|
P.prototype._eventsCount = 0;
|
|
@@ -3005,7 +2999,7 @@ function Mn(t, e, r, n) {
|
|
|
3005
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) {
|
|
3006
3000
|
s.warned = !0;
|
|
3007
3001
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3008
|
-
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);
|
|
3009
3003
|
}
|
|
3010
3004
|
return t;
|
|
3011
3005
|
}
|
|
@@ -3016,12 +3010,12 @@ P.prototype.on = P.prototype.addListener;
|
|
|
3016
3010
|
P.prototype.prependListener = function(e, r) {
|
|
3017
3011
|
return Mn(this, e, r, !0);
|
|
3018
3012
|
};
|
|
3019
|
-
function
|
|
3013
|
+
function ds() {
|
|
3020
3014
|
if (!this.fired)
|
|
3021
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);
|
|
3022
3016
|
}
|
|
3023
3017
|
function jn(t, e, r) {
|
|
3024
|
-
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);
|
|
3025
3019
|
return i.listener = r, n.wrapFn = i, i;
|
|
3026
3020
|
}
|
|
3027
3021
|
P.prototype.once = function(e, r) {
|
|
@@ -3046,7 +3040,7 @@ P.prototype.removeListener = function(e, r) {
|
|
|
3046
3040
|
}
|
|
3047
3041
|
if (o < 0)
|
|
3048
3042
|
return this;
|
|
3049
|
-
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);
|
|
3050
3044
|
}
|
|
3051
3045
|
return this;
|
|
3052
3046
|
};
|
|
@@ -3075,7 +3069,7 @@ function Un(t, e, r) {
|
|
|
3075
3069
|
if (n === void 0)
|
|
3076
3070
|
return [];
|
|
3077
3071
|
var i = n[e];
|
|
3078
|
-
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);
|
|
3079
3073
|
}
|
|
3080
3074
|
P.prototype.listeners = function(e) {
|
|
3081
3075
|
return Un(this, e, !0);
|
|
@@ -3106,17 +3100,17 @@ function xn(t, e) {
|
|
|
3106
3100
|
r[n] = t[n];
|
|
3107
3101
|
return r;
|
|
3108
3102
|
}
|
|
3109
|
-
function
|
|
3103
|
+
function fs(t, e) {
|
|
3110
3104
|
for (; e + 1 < t.length; e++)
|
|
3111
3105
|
t[e] = t[e + 1];
|
|
3112
3106
|
t.pop();
|
|
3113
3107
|
}
|
|
3114
|
-
function
|
|
3108
|
+
function hs(t) {
|
|
3115
3109
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3116
3110
|
e[r] = t[r].listener || t[r];
|
|
3117
3111
|
return e;
|
|
3118
3112
|
}
|
|
3119
|
-
function
|
|
3113
|
+
function ps(t, e) {
|
|
3120
3114
|
return new Promise(function(r, n) {
|
|
3121
3115
|
function i(s) {
|
|
3122
3116
|
t.removeListener(e, o), n(s);
|
|
@@ -3124,10 +3118,10 @@ function hs(t, e) {
|
|
|
3124
3118
|
function o() {
|
|
3125
3119
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
3126
3120
|
}
|
|
3127
|
-
qn(t, e, o, { once: !0 }), e !== "error" &&
|
|
3121
|
+
qn(t, e, o, { once: !0 }), e !== "error" && ys(t, i, { once: !0 });
|
|
3128
3122
|
});
|
|
3129
3123
|
}
|
|
3130
|
-
function
|
|
3124
|
+
function ys(t, e, r) {
|
|
3131
3125
|
typeof t.on == "function" && qn(t, "error", e, r);
|
|
3132
3126
|
}
|
|
3133
3127
|
function qn(t, e, r, n) {
|
|
@@ -3163,34 +3157,34 @@ var Qn = Ar.exports, Ft = {}, Gn = {}, Kn = function() {
|
|
|
3163
3157
|
return !1;
|
|
3164
3158
|
}
|
|
3165
3159
|
return !0;
|
|
3166
|
-
},
|
|
3167
|
-
return
|
|
3168
|
-
},
|
|
3169
|
-
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();
|
|
3170
3164
|
}, Ut = {
|
|
3171
3165
|
__proto__: null,
|
|
3172
3166
|
foo: {}
|
|
3173
|
-
},
|
|
3174
|
-
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof
|
|
3175
|
-
},
|
|
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) {
|
|
3176
3170
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3177
3171
|
n[i] = e[i];
|
|
3178
3172
|
for (var o = 0; o < r.length; o += 1)
|
|
3179
3173
|
n[o + e.length] = r[o];
|
|
3180
3174
|
return n;
|
|
3181
|
-
},
|
|
3175
|
+
}, ks = function(e, r) {
|
|
3182
3176
|
for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
|
|
3183
3177
|
n[o] = e[i];
|
|
3184
3178
|
return n;
|
|
3185
|
-
},
|
|
3179
|
+
}, Ps = function(t, e) {
|
|
3186
3180
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
3187
3181
|
r += t[n], n + 1 < t.length && (r += e);
|
|
3188
3182
|
return r;
|
|
3189
|
-
},
|
|
3183
|
+
}, Ns = function(e) {
|
|
3190
3184
|
var r = this;
|
|
3191
|
-
if (typeof r != "function" ||
|
|
3192
|
-
throw new TypeError(
|
|
3193
|
-
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() {
|
|
3194
3188
|
if (this instanceof i) {
|
|
3195
3189
|
var c = r.apply(
|
|
3196
3190
|
this,
|
|
@@ -3202,15 +3196,15 @@ var Qn = Ar.exports, Ft = {}, Gn = {}, Kn = function() {
|
|
|
3202
3196
|
e,
|
|
3203
3197
|
en(n, arguments)
|
|
3204
3198
|
);
|
|
3205
|
-
}, s =
|
|
3199
|
+
}, s = Ls(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3206
3200
|
a[u] = "$" + u;
|
|
3207
|
-
if (i = Function("binder", "return function (" +
|
|
3201
|
+
if (i = Function("binder", "return function (" + Ps(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
3208
3202
|
var f = function() {
|
|
3209
3203
|
};
|
|
3210
3204
|
f.prototype = r.prototype, i.prototype = new f(), f.prototype = null;
|
|
3211
3205
|
}
|
|
3212
3206
|
return i;
|
|
3213
|
-
},
|
|
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) {
|
|
3214
3208
|
try {
|
|
3215
3209
|
return Hn('"use strict"; return (' + t + ").constructor;")();
|
|
3216
3210
|
} catch {
|
|
@@ -3224,7 +3218,7 @@ if (ke)
|
|
|
3224
3218
|
}
|
|
3225
3219
|
var xt = function() {
|
|
3226
3220
|
throw new Ge();
|
|
3227
|
-
},
|
|
3221
|
+
}, qs = ke ? function() {
|
|
3228
3222
|
try {
|
|
3229
3223
|
return arguments.callee, xt;
|
|
3230
3224
|
} catch {
|
|
@@ -3234,9 +3228,9 @@ var xt = function() {
|
|
|
3234
3228
|
return xt;
|
|
3235
3229
|
}
|
|
3236
3230
|
}
|
|
3237
|
-
}() : xt, $e =
|
|
3231
|
+
}() : xt, $e = Es(), Qs = Ts(), M = Object.getPrototypeOf || (Qs ? function(t) {
|
|
3238
3232
|
return t.__proto__;
|
|
3239
|
-
} : null), je = {},
|
|
3233
|
+
} : null), je = {}, Gs = typeof Uint8Array > "u" || !M ? I : M(Uint8Array), Pe = {
|
|
3240
3234
|
__proto__: null,
|
|
3241
3235
|
"%AggregateError%": typeof AggregateError > "u" ? I : AggregateError,
|
|
3242
3236
|
"%Array%": Array,
|
|
@@ -3258,10 +3252,10 @@ var xt = function() {
|
|
|
3258
3252
|
"%decodeURIComponent%": decodeURIComponent,
|
|
3259
3253
|
"%encodeURI%": encodeURI,
|
|
3260
3254
|
"%encodeURIComponent%": encodeURIComponent,
|
|
3261
|
-
"%Error%":
|
|
3255
|
+
"%Error%": Ms,
|
|
3262
3256
|
"%eval%": eval,
|
|
3263
3257
|
// eslint-disable-line no-eval
|
|
3264
|
-
"%EvalError%":
|
|
3258
|
+
"%EvalError%": js,
|
|
3265
3259
|
"%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
|
|
3266
3260
|
"%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
|
|
3267
3261
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
|
|
@@ -3283,8 +3277,8 @@ var xt = function() {
|
|
|
3283
3277
|
"%parseInt%": parseInt,
|
|
3284
3278
|
"%Promise%": typeof Promise > "u" ? I : Promise,
|
|
3285
3279
|
"%Proxy%": typeof Proxy > "u" ? I : Proxy,
|
|
3286
|
-
"%RangeError%":
|
|
3287
|
-
"%ReferenceError%":
|
|
3280
|
+
"%RangeError%": Us,
|
|
3281
|
+
"%ReferenceError%": Bs,
|
|
3288
3282
|
"%Reflect%": typeof Reflect > "u" ? I : Reflect,
|
|
3289
3283
|
"%RegExp%": RegExp,
|
|
3290
3284
|
"%Set%": typeof Set > "u" ? I : Set,
|
|
@@ -3294,14 +3288,14 @@ var xt = function() {
|
|
|
3294
3288
|
"%StringIteratorPrototype%": $e && M ? M(""[Symbol.iterator]()) : I,
|
|
3295
3289
|
"%Symbol%": $e ? Symbol : I,
|
|
3296
3290
|
"%SyntaxError%": Ke,
|
|
3297
|
-
"%ThrowTypeError%":
|
|
3298
|
-
"%TypedArray%":
|
|
3291
|
+
"%ThrowTypeError%": qs,
|
|
3292
|
+
"%TypedArray%": Gs,
|
|
3299
3293
|
"%TypeError%": Ge,
|
|
3300
3294
|
"%Uint8Array%": typeof Uint8Array > "u" ? I : Uint8Array,
|
|
3301
3295
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? I : Uint8ClampedArray,
|
|
3302
3296
|
"%Uint16Array%": typeof Uint16Array > "u" ? I : Uint16Array,
|
|
3303
3297
|
"%Uint32Array%": typeof Uint32Array > "u" ? I : Uint32Array,
|
|
3304
|
-
"%URIError%":
|
|
3298
|
+
"%URIError%": xs,
|
|
3305
3299
|
"%WeakMap%": typeof WeakMap > "u" ? I : WeakMap,
|
|
3306
3300
|
"%WeakRef%": typeof WeakRef > "u" ? I : WeakRef,
|
|
3307
3301
|
"%WeakSet%": typeof WeakSet > "u" ? I : WeakSet
|
|
@@ -3310,10 +3304,10 @@ if (M)
|
|
|
3310
3304
|
try {
|
|
3311
3305
|
null.error;
|
|
3312
3306
|
} catch (t) {
|
|
3313
|
-
var
|
|
3314
|
-
Pe["%Error.prototype%"] =
|
|
3307
|
+
var Ks = M(M(t));
|
|
3308
|
+
Pe["%Error.prototype%"] = Ks;
|
|
3315
3309
|
}
|
|
3316
|
-
var
|
|
3310
|
+
var zs = function t(e) {
|
|
3317
3311
|
var r;
|
|
3318
3312
|
if (e === "%AsyncFunction%")
|
|
3319
3313
|
r = Bt("async function () {}");
|
|
@@ -3382,21 +3376,21 @@ var Ks = function t(e) {
|
|
|
3382
3376
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3383
3377
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3384
3378
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3385
|
-
}, 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) {
|
|
3386
3380
|
var r = Et(e, 0, 1), n = Et(e, -1);
|
|
3387
3381
|
if (r === "%" && n !== "%")
|
|
3388
3382
|
throw new Ke("invalid intrinsic syntax, expected closing `%`");
|
|
3389
3383
|
if (n === "%" && r !== "%")
|
|
3390
3384
|
throw new Ke("invalid intrinsic syntax, expected opening `%`");
|
|
3391
3385
|
var i = [];
|
|
3392
|
-
return rn(e,
|
|
3393
|
-
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;
|
|
3394
3388
|
}), i;
|
|
3395
|
-
},
|
|
3389
|
+
}, ea = function(e, r) {
|
|
3396
3390
|
var n = e, i;
|
|
3397
3391
|
if (At(tn, n) && (i = tn[n], n = "%" + i[0] + "%"), At(Pe, n)) {
|
|
3398
3392
|
var o = Pe[n];
|
|
3399
|
-
if (o === je && (o =
|
|
3393
|
+
if (o === je && (o = zs(n)), typeof o > "u" && !r)
|
|
3400
3394
|
throw new Ge("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3401
3395
|
return {
|
|
3402
3396
|
alias: i,
|
|
@@ -3410,10 +3404,10 @@ var Ks = function t(e) {
|
|
|
3410
3404
|
throw new Ge("intrinsic name must be a non-empty string");
|
|
3411
3405
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3412
3406
|
throw new Ge('"allowMissing" argument must be a boolean');
|
|
3413
|
-
if (
|
|
3407
|
+
if (Ys(/^%?[^%]*%?$/, e) === null)
|
|
3414
3408
|
throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3415
|
-
var n =
|
|
3416
|
-
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)));
|
|
3417
3411
|
for (var c = 1, h = !0; c < n.length; c += 1) {
|
|
3418
3412
|
var l = n[c], g = Et(l, 0, 1), v = Et(l, -1);
|
|
3419
3413
|
if ((g === '"' || g === "'" || g === "`" || v === '"' || v === "'" || v === "`") && g !== v)
|
|
@@ -3448,14 +3442,14 @@ function Ir() {
|
|
|
3448
3442
|
}
|
|
3449
3443
|
return qt = e, qt;
|
|
3450
3444
|
}
|
|
3451
|
-
var
|
|
3445
|
+
var ta = st, yt = ta("%Object.getOwnPropertyDescriptor%", !0);
|
|
3452
3446
|
if (yt)
|
|
3453
3447
|
try {
|
|
3454
3448
|
yt([], "length");
|
|
3455
3449
|
} catch {
|
|
3456
3450
|
yt = null;
|
|
3457
3451
|
}
|
|
3458
|
-
var Vt = yt, on = Ir(),
|
|
3452
|
+
var Vt = yt, on = Ir(), ra = zn, Me = Rt, sn = Vt, na = function(e, r, n) {
|
|
3459
3453
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3460
3454
|
throw new Me("`obj` must be an object or a function`");
|
|
3461
3455
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3479,7 +3473,7 @@ var Vt = yt, on = Ir(), ta = zn, Me = Rt, sn = Vt, ra = function(e, r, n) {
|
|
|
3479
3473
|
else if (a || !i && !o && !s)
|
|
3480
3474
|
e[r] = n;
|
|
3481
3475
|
else
|
|
3482
|
-
throw new
|
|
3476
|
+
throw new ra("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3483
3477
|
}, ur = Ir(), Yn = function() {
|
|
3484
3478
|
return !!ur;
|
|
3485
3479
|
};
|
|
@@ -3492,17 +3486,17 @@ Yn.hasArrayLengthDefineBug = function() {
|
|
|
3492
3486
|
return !0;
|
|
3493
3487
|
}
|
|
3494
3488
|
};
|
|
3495
|
-
var
|
|
3489
|
+
var ia = Yn, oa = st, an = na, sa = ia(), un = Vt, cn = Rt, aa = oa("%Math.floor%"), ua = function(e, r) {
|
|
3496
3490
|
if (typeof e != "function")
|
|
3497
3491
|
throw new cn("`fn` is not a function");
|
|
3498
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3492
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || aa(r) !== r)
|
|
3499
3493
|
throw new cn("`length` must be a positive 32-bit integer");
|
|
3500
3494
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3501
3495
|
if ("length" in e && un) {
|
|
3502
3496
|
var s = un(e, "length");
|
|
3503
3497
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3504
3498
|
}
|
|
3505
|
-
return (i || o || !n) && (
|
|
3499
|
+
return (i || o || !n) && (sa ? an(
|
|
3506
3500
|
/** @type {Parameters<define>[0]} */
|
|
3507
3501
|
e,
|
|
3508
3502
|
"length",
|
|
@@ -3517,7 +3511,7 @@ var na = Yn, ia = st, an = ra, oa = na(), un = Vt, cn = Rt, sa = ia("%Math.floor
|
|
|
3517
3511
|
)), e;
|
|
3518
3512
|
};
|
|
3519
3513
|
(function(t) {
|
|
3520
|
-
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%");
|
|
3521
3515
|
t.exports = function(l) {
|
|
3522
3516
|
if (typeof l != "function")
|
|
3523
3517
|
throw new i("a function is required");
|
|
@@ -3533,37 +3527,37 @@ var na = Yn, ia = st, an = ra, oa = na(), un = Vt, cn = Rt, sa = ia("%Math.floor
|
|
|
3533
3527
|
};
|
|
3534
3528
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3535
3529
|
})(Wn);
|
|
3536
|
-
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) {
|
|
3537
3531
|
var n = Jn(e, !!r);
|
|
3538
|
-
return typeof n == "function" &&
|
|
3539
|
-
},
|
|
3540
|
-
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]";
|
|
3541
3535
|
}, Zn = function(e) {
|
|
3542
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]";
|
|
3543
|
-
},
|
|
3537
|
+
}, fa = function() {
|
|
3544
3538
|
return $t(arguments);
|
|
3545
3539
|
}();
|
|
3546
3540
|
$t.isLegacyArguments = Zn;
|
|
3547
|
-
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() {
|
|
3548
3542
|
if (!ei)
|
|
3549
3543
|
return !1;
|
|
3550
3544
|
try {
|
|
3551
3545
|
return Function("return function*() {}")();
|
|
3552
3546
|
} catch {
|
|
3553
3547
|
}
|
|
3554
|
-
}, Gt,
|
|
3548
|
+
}, Gt, va = function(e) {
|
|
3555
3549
|
if (typeof e != "function")
|
|
3556
3550
|
return !1;
|
|
3557
|
-
if (
|
|
3551
|
+
if (ga.test(ya.call(e)))
|
|
3558
3552
|
return !0;
|
|
3559
3553
|
if (!ei) {
|
|
3560
|
-
var r =
|
|
3554
|
+
var r = pa.call(e);
|
|
3561
3555
|
return r === "[object GeneratorFunction]";
|
|
3562
3556
|
}
|
|
3563
3557
|
if (!Qt)
|
|
3564
3558
|
return !1;
|
|
3565
3559
|
if (typeof Gt > "u") {
|
|
3566
|
-
var n =
|
|
3560
|
+
var n = ma();
|
|
3567
3561
|
Gt = n ? Qt(n) : !1;
|
|
3568
3562
|
}
|
|
3569
3563
|
return Qt(e) === Gt;
|
|
@@ -3582,10 +3576,10 @@ if (typeof xe == "function" && typeof Object.defineProperty == "function")
|
|
|
3582
3576
|
}
|
|
3583
3577
|
else
|
|
3584
3578
|
xe = null;
|
|
3585
|
-
var
|
|
3579
|
+
var ba = /^\s*class\b/, dr = function(e) {
|
|
3586
3580
|
try {
|
|
3587
3581
|
var r = ti.call(e);
|
|
3588
|
-
return
|
|
3582
|
+
return ba.test(r);
|
|
3589
3583
|
} catch {
|
|
3590
3584
|
return !1;
|
|
3591
3585
|
}
|
|
@@ -3595,22 +3589,22 @@ var va = /^\s*class\b/, dr = function(e) {
|
|
|
3595
3589
|
} catch {
|
|
3596
3590
|
return !1;
|
|
3597
3591
|
}
|
|
3598
|
-
}, 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() {
|
|
3599
3593
|
return !1;
|
|
3600
3594
|
};
|
|
3601
3595
|
if (typeof document == "object") {
|
|
3602
|
-
var
|
|
3603
|
-
mt.call(
|
|
3604
|
-
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"))
|
|
3605
3599
|
try {
|
|
3606
3600
|
var r = mt.call(e);
|
|
3607
|
-
return (r ===
|
|
3601
|
+
return (r === Ea || r === Ia || r === Ta || r === Sa) && e("") == null;
|
|
3608
3602
|
} catch {
|
|
3609
3603
|
}
|
|
3610
3604
|
return !1;
|
|
3611
3605
|
});
|
|
3612
3606
|
}
|
|
3613
|
-
var
|
|
3607
|
+
var Ca = xe ? function(e) {
|
|
3614
3608
|
if (fr(e))
|
|
3615
3609
|
return !0;
|
|
3616
3610
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3627,27 +3621,27 @@ var La = xe ? function(e) {
|
|
|
3627
3621
|
return !0;
|
|
3628
3622
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3629
3623
|
return !1;
|
|
3630
|
-
if (
|
|
3624
|
+
if (Oa)
|
|
3631
3625
|
return Kt(e);
|
|
3632
3626
|
if (dr(e))
|
|
3633
3627
|
return !1;
|
|
3634
3628
|
var r = mt.call(e);
|
|
3635
|
-
return r !==
|
|
3636
|
-
},
|
|
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) {
|
|
3637
3631
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3638
3632
|
ri.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3639
|
-
},
|
|
3633
|
+
}, Fa = function(e, r, n) {
|
|
3640
3634
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3641
3635
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3642
|
-
},
|
|
3636
|
+
}, Da = function(e, r, n) {
|
|
3643
3637
|
for (var i in e)
|
|
3644
3638
|
ri.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3645
|
-
},
|
|
3646
|
-
if (!
|
|
3639
|
+
}, Ra = function(e, r, n) {
|
|
3640
|
+
if (!ka(r))
|
|
3647
3641
|
throw new TypeError("iterator must be a function");
|
|
3648
3642
|
var i;
|
|
3649
|
-
arguments.length >= 3 && (i = n),
|
|
3650
|
-
}, 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 = [
|
|
3651
3645
|
"Float32Array",
|
|
3652
3646
|
"Float64Array",
|
|
3653
3647
|
"Int8Array",
|
|
@@ -3659,11 +3653,11 @@ var La = xe ? function(e) {
|
|
|
3659
3653
|
"Uint32Array",
|
|
3660
3654
|
"BigInt64Array",
|
|
3661
3655
|
"BigUint64Array"
|
|
3662
|
-
], zt =
|
|
3656
|
+
], zt = Va, $a = typeof globalThis > "u" ? br : globalThis, ii = function() {
|
|
3663
3657
|
for (var e = [], r = 0; r < zt.length; r++)
|
|
3664
|
-
typeof
|
|
3658
|
+
typeof $a[zt[r]] == "function" && (e[e.length] = zt[r]);
|
|
3665
3659
|
return e;
|
|
3666
|
-
}, 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) {
|
|
3667
3661
|
for (var n = 0; n < e.length; n += 1)
|
|
3668
3662
|
if (e[n] === r)
|
|
3669
3663
|
return n;
|
|
@@ -3683,7 +3677,7 @@ oi && vt && Ht ? It(hr, function(t) {
|
|
|
3683
3677
|
var e = new dn[t](), r = e.slice || e.set;
|
|
3684
3678
|
r && (Tt["$" + t] = ln(r));
|
|
3685
3679
|
});
|
|
3686
|
-
var
|
|
3680
|
+
var Ba = function(e) {
|
|
3687
3681
|
var r = !1;
|
|
3688
3682
|
return It(Tt, function(n, i) {
|
|
3689
3683
|
if (!r)
|
|
@@ -3692,7 +3686,7 @@ var Ua = function(e) {
|
|
|
3692
3686
|
} catch {
|
|
3693
3687
|
}
|
|
3694
3688
|
}), r;
|
|
3695
|
-
},
|
|
3689
|
+
}, xa = function(e) {
|
|
3696
3690
|
var r = !1;
|
|
3697
3691
|
return It(Tt, function(n, i) {
|
|
3698
3692
|
if (!r)
|
|
@@ -3701,15 +3695,15 @@ var Ua = function(e) {
|
|
|
3701
3695
|
} catch {
|
|
3702
3696
|
}
|
|
3703
3697
|
}), r;
|
|
3704
|
-
},
|
|
3698
|
+
}, qa = function(e) {
|
|
3705
3699
|
if (!e || typeof e != "object")
|
|
3706
3700
|
return !1;
|
|
3707
3701
|
if (!oi) {
|
|
3708
|
-
var r = Lr(
|
|
3709
|
-
return
|
|
3702
|
+
var r = Lr(ja(e), 8, -1);
|
|
3703
|
+
return Ua(hr, r) > -1 ? r : r !== "Object" ? !1 : xa(e);
|
|
3710
3704
|
}
|
|
3711
|
-
return vt ?
|
|
3712
|
-
}, 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) {
|
|
3713
3707
|
for (var n = 0; n < e.length; n += 1)
|
|
3714
3708
|
if (e[n] === r)
|
|
3715
3709
|
return n;
|
|
@@ -3729,7 +3723,7 @@ si && bt && Wt ? Ot(pr, function(t) {
|
|
|
3729
3723
|
var e = new hn[t](), r = e.slice || e.set;
|
|
3730
3724
|
r && (_t["$" + t] = fn(r));
|
|
3731
3725
|
});
|
|
3732
|
-
var
|
|
3726
|
+
var za = function(e) {
|
|
3733
3727
|
var r = !1;
|
|
3734
3728
|
return Ot(
|
|
3735
3729
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -3745,7 +3739,7 @@ var Ka = function(e) {
|
|
|
3745
3739
|
}
|
|
3746
3740
|
}
|
|
3747
3741
|
), r;
|
|
3748
|
-
},
|
|
3742
|
+
}, Ha = function(e) {
|
|
3749
3743
|
var r = !1;
|
|
3750
3744
|
return Ot(
|
|
3751
3745
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -3761,19 +3755,19 @@ var Ka = function(e) {
|
|
|
3761
3755
|
}
|
|
3762
3756
|
}
|
|
3763
3757
|
), r;
|
|
3764
|
-
},
|
|
3758
|
+
}, Wa = function(e) {
|
|
3765
3759
|
if (!e || typeof e != "object")
|
|
3766
3760
|
return !1;
|
|
3767
3761
|
if (!si) {
|
|
3768
|
-
var r = kr(
|
|
3769
|
-
return
|
|
3762
|
+
var r = kr(Ga(e), 8, -1);
|
|
3763
|
+
return Ka(pr, r) > -1 ? r : r !== "Object" ? !1 : Ha(e);
|
|
3770
3764
|
}
|
|
3771
|
-
return bt ?
|
|
3772
|
-
},
|
|
3773
|
-
return !!
|
|
3765
|
+
return bt ? za(e) : null;
|
|
3766
|
+
}, Ya = Wa, Ja = function(e) {
|
|
3767
|
+
return !!Ya(e);
|
|
3774
3768
|
};
|
|
3775
3769
|
(function(t) {
|
|
3776
|
-
var e =
|
|
3770
|
+
var e = ha, r = va, n = qa, i = Ja;
|
|
3777
3771
|
function o(y) {
|
|
3778
3772
|
return y.call.bind(y);
|
|
3779
3773
|
}
|
|
@@ -3956,7 +3950,7 @@ var Ka = function(e) {
|
|
|
3956
3950
|
});
|
|
3957
3951
|
});
|
|
3958
3952
|
})(Gn);
|
|
3959
|
-
var
|
|
3953
|
+
var Xa = function(e) {
|
|
3960
3954
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3961
3955
|
}, yr = { exports: {} };
|
|
3962
3956
|
typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
@@ -3976,7 +3970,7 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
|
3976
3970
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
3977
3971
|
}
|
|
3978
3972
|
};
|
|
3979
|
-
var
|
|
3973
|
+
var Za = yr.exports;
|
|
3980
3974
|
(function(t) {
|
|
3981
3975
|
var e = Object.getOwnPropertyDescriptors || function(p) {
|
|
3982
3976
|
for (var m = Object.keys(p), S = {}, _ = 0; _ < m.length; _++)
|
|
@@ -4253,7 +4247,7 @@ var Xa = yr.exports;
|
|
|
4253
4247
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
4254
4248
|
typeof d > "u";
|
|
4255
4249
|
}
|
|
4256
|
-
t.isPrimitive = Mt, t.isBuffer =
|
|
4250
|
+
t.isPrimitive = Mt, t.isBuffer = Xa;
|
|
4257
4251
|
function Se(d) {
|
|
4258
4252
|
return Object.prototype.toString.call(d);
|
|
4259
4253
|
}
|
|
@@ -4284,7 +4278,7 @@ var Xa = yr.exports;
|
|
|
4284
4278
|
}
|
|
4285
4279
|
t.log = function() {
|
|
4286
4280
|
console.log("%s - %s", jt(), t.format.apply(t, arguments));
|
|
4287
|
-
}, t.inherits =
|
|
4281
|
+
}, t.inherits = Za, t._extend = function(d, p) {
|
|
4288
4282
|
if (!p || !ie(p)) return d;
|
|
4289
4283
|
for (var m = Object.keys(p), S = m.length; S--; )
|
|
4290
4284
|
d[m[S]] = p[m[S]];
|
|
@@ -4368,7 +4362,7 @@ var Xa = yr.exports;
|
|
|
4368
4362
|
}
|
|
4369
4363
|
t.callbackify = at;
|
|
4370
4364
|
})(Ft);
|
|
4371
|
-
const { inherits:
|
|
4365
|
+
const { inherits: eu, format: Yt } = Ft;
|
|
4372
4366
|
function Oe(t, e, r = Error) {
|
|
4373
4367
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
4374
4368
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
@@ -4379,7 +4373,7 @@ function Oe(t, e, r = Error) {
|
|
|
4379
4373
|
}
|
|
4380
4374
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
4381
4375
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4382
|
-
},
|
|
4376
|
+
}, eu(n, r), n;
|
|
4383
4377
|
}
|
|
4384
4378
|
var ai = {
|
|
4385
4379
|
createError: Oe,
|
|
@@ -4407,7 +4401,7 @@ var ai = {
|
|
|
4407
4401
|
"AVV_ERR_READY_TIMEOUT",
|
|
4408
4402
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4409
4403
|
)
|
|
4410
|
-
},
|
|
4404
|
+
}, tu = function t(e, r, n) {
|
|
4411
4405
|
r === void 0 && (r = ""), n || (n = {});
|
|
4412
4406
|
var i = function(u) {
|
|
4413
4407
|
var f = {
|
|
@@ -4429,8 +4423,8 @@ var ai = {
|
|
|
4429
4423
|
return r + i(c ? "└" : "├") + i("─") + i(h ? "┬" : "─") + " " + t(u, l, n).slice(r.length + 2);
|
|
4430
4424
|
}).join("");
|
|
4431
4425
|
};
|
|
4432
|
-
const
|
|
4433
|
-
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 {
|
|
4434
4428
|
constructor() {
|
|
4435
4429
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4436
4430
|
}
|
|
@@ -4484,11 +4478,11 @@ let ru = class {
|
|
|
4484
4478
|
}
|
|
4485
4479
|
prittyPrint() {
|
|
4486
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());
|
|
4487
|
-
return
|
|
4481
|
+
return ru(r);
|
|
4488
4482
|
}
|
|
4489
4483
|
};
|
|
4490
|
-
var
|
|
4491
|
-
function
|
|
4484
|
+
var iu = nu, Pr = { exports: {} }, gr = { exports: {} }, Xt, vn;
|
|
4485
|
+
function ou() {
|
|
4492
4486
|
if (vn) return Xt;
|
|
4493
4487
|
vn = 1;
|
|
4494
4488
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
@@ -4569,8 +4563,8 @@ function iu() {
|
|
|
4569
4563
|
}
|
|
4570
4564
|
return Xt;
|
|
4571
4565
|
}
|
|
4572
|
-
function
|
|
4573
|
-
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) => {
|
|
4574
4568
|
r[c] = t[c];
|
|
4575
4569
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4576
4570
|
function e(c) {
|
|
@@ -4650,7 +4644,7 @@ function ou(t) {
|
|
|
4650
4644
|
}
|
|
4651
4645
|
return r.enable(r.load()), r;
|
|
4652
4646
|
}
|
|
4653
|
-
var
|
|
4647
|
+
var au = su;
|
|
4654
4648
|
(function(t, e) {
|
|
4655
4649
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4656
4650
|
let u = !1;
|
|
@@ -4774,7 +4768,7 @@ var su = ou;
|
|
|
4774
4768
|
} catch {
|
|
4775
4769
|
}
|
|
4776
4770
|
}
|
|
4777
|
-
t.exports =
|
|
4771
|
+
t.exports = au(e);
|
|
4778
4772
|
const { formatters: a } = t.exports;
|
|
4779
4773
|
a.j = function(u) {
|
|
4780
4774
|
try {
|
|
@@ -4785,21 +4779,21 @@ var su = ou;
|
|
|
4785
4779
|
};
|
|
4786
4780
|
})(gr, gr.exports);
|
|
4787
4781
|
var ui = gr.exports;
|
|
4788
|
-
const
|
|
4789
|
-
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) {
|
|
4790
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(`
|
|
4791
4785
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4792
4786
|
}
|
|
4793
|
-
function
|
|
4787
|
+
function hu() {
|
|
4794
4788
|
const t = {};
|
|
4795
4789
|
return t.promise = new Promise((e, r) => {
|
|
4796
4790
|
t.resolve = e, t.reject = r;
|
|
4797
4791
|
}), t;
|
|
4798
4792
|
}
|
|
4799
4793
|
function We(t, e, r, n, i) {
|
|
4800
|
-
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;
|
|
4801
4795
|
}
|
|
4802
|
-
|
|
4796
|
+
lu(We, cu);
|
|
4803
4797
|
We.prototype.exec = function(t, e) {
|
|
4804
4798
|
const r = this.func;
|
|
4805
4799
|
let n = !1;
|
|
@@ -4827,7 +4821,7 @@ We.prototype.exec = function(t, e) {
|
|
|
4827
4821
|
};
|
|
4828
4822
|
this.timeout > 0 && (j("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4829
4823
|
j("timed out", i), o = null;
|
|
4830
|
-
const u = new
|
|
4824
|
+
const u = new du(i);
|
|
4831
4825
|
u.fn = r, s(u);
|
|
4832
4826
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4833
4827
|
const a = r(this.server, this.opts, s);
|
|
@@ -4845,7 +4839,7 @@ We.prototype.loadedSoFar = function() {
|
|
|
4845
4839
|
}), this.q.resume();
|
|
4846
4840
|
};
|
|
4847
4841
|
let e;
|
|
4848
|
-
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;
|
|
4849
4843
|
};
|
|
4850
4844
|
We.prototype.enqueue = function(t, e) {
|
|
4851
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);
|
|
@@ -4870,12 +4864,12 @@ We.prototype.finish = function(t, e) {
|
|
|
4870
4864
|
r();
|
|
4871
4865
|
else
|
|
4872
4866
|
j("delayed", this.name), this.q.drain = () => {
|
|
4873
|
-
j("drain", this.name), this.q.drain =
|
|
4867
|
+
j("drain", this.name), this.q.drain = yu, queueMicrotask(n);
|
|
4874
4868
|
};
|
|
4875
4869
|
};
|
|
4876
4870
|
queueMicrotask(n), this.q.resume();
|
|
4877
4871
|
};
|
|
4878
|
-
function
|
|
4872
|
+
function pu(t, e) {
|
|
4879
4873
|
const r = this;
|
|
4880
4874
|
A.nextTick(Nr.bind(r), t, e);
|
|
4881
4875
|
}
|
|
@@ -4893,19 +4887,19 @@ function Nr(t, e) {
|
|
|
4893
4887
|
});
|
|
4894
4888
|
});
|
|
4895
4889
|
}
|
|
4896
|
-
function
|
|
4890
|
+
function yu() {
|
|
4897
4891
|
}
|
|
4898
4892
|
Pr.exports = We;
|
|
4899
4893
|
Pr.exports.loadPlugin = Nr;
|
|
4900
|
-
var
|
|
4901
|
-
const bn = Rn,
|
|
4894
|
+
var gu = Pr.exports;
|
|
4895
|
+
const bn = Rn, mu = Qn.EventEmitter, vu = Ft.inherits, {
|
|
4902
4896
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
|
|
4903
4897
|
AVV_ERR_CALLBACK_NOT_FN: et,
|
|
4904
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4905
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4906
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4907
|
-
} = ai,
|
|
4908
|
-
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) {
|
|
4909
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";
|
|
4910
4904
|
if (t[i])
|
|
4911
4905
|
throw new er(i);
|
|
@@ -4924,7 +4918,7 @@ function Au(t, e, r) {
|
|
|
4924
4918
|
}, t[a] = function(f) {
|
|
4925
4919
|
if (typeof f != "function")
|
|
4926
4920
|
throw new et(a, typeof f);
|
|
4927
|
-
return r.onClose(
|
|
4921
|
+
return r.onClose(Lu(f, this)), this;
|
|
4928
4922
|
}, t[u] = function(f) {
|
|
4929
4923
|
if (f && typeof f != "function")
|
|
4930
4924
|
throw new et(u, typeof f);
|
|
@@ -4934,13 +4928,13 @@ function Au(t, e, r) {
|
|
|
4934
4928
|
function x(t, e, r) {
|
|
4935
4929
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
|
|
4936
4930
|
const n = new x(t, e, r);
|
|
4937
|
-
return t &&
|
|
4931
|
+
return t && Eu(t, e, n), n;
|
|
4938
4932
|
}
|
|
4939
|
-
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 = () => {
|
|
4940
4934
|
this.emit("start"), this._readyQ.drain = Sn;
|
|
4941
|
-
}, this._closeQ = bn(this,
|
|
4935
|
+
}, this._closeQ = bn(this, _u, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4942
4936
|
this.emit("close"), this._closeQ.drain = Sn;
|
|
4943
|
-
}, 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) => {
|
|
4944
4938
|
const s = this.pluginTree.start(null, i, o);
|
|
4945
4939
|
this._root.once("loaded", (a, u, f) => {
|
|
4946
4940
|
this.pluginTree.stop(s, f);
|
|
@@ -4960,19 +4954,19 @@ function x(t, e, r) {
|
|
|
4960
4954
|
this._readyQ.resume();
|
|
4961
4955
|
});
|
|
4962
4956
|
}
|
|
4963
|
-
function
|
|
4957
|
+
function Iu(t, e, r) {
|
|
4964
4958
|
this._doStart = r, e.autostart && this.start();
|
|
4965
4959
|
}
|
|
4966
|
-
|
|
4960
|
+
vu(x, mu);
|
|
4967
4961
|
x.prototype.start = function() {
|
|
4968
4962
|
return this.started = !0, A.nextTick(this._doStart), this;
|
|
4969
4963
|
};
|
|
4970
4964
|
x.prototype.override = function(t, e, r) {
|
|
4971
4965
|
return t;
|
|
4972
4966
|
};
|
|
4973
|
-
function
|
|
4967
|
+
function Tu(t) {
|
|
4974
4968
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4975
|
-
throw new
|
|
4969
|
+
throw new bu(typeof t);
|
|
4976
4970
|
return t;
|
|
4977
4971
|
}
|
|
4978
4972
|
x.prototype[Lt] = !0;
|
|
@@ -4985,8 +4979,8 @@ x.prototype._loadRegistered = function() {
|
|
|
4985
4979
|
};
|
|
4986
4980
|
Object.defineProperty(x.prototype, "then", { get: ci });
|
|
4987
4981
|
x.prototype._addPlugin = function(t, e, r) {
|
|
4988
|
-
if (t =
|
|
4989
|
-
throw new
|
|
4982
|
+
if (t = Tu(t), e = e || {}, this.booted)
|
|
4983
|
+
throw new Su();
|
|
4990
4984
|
const n = this._current[0], i = new mr(this, t, e, r);
|
|
4991
4985
|
if (i.once("start", (o, s, a) => {
|
|
4992
4986
|
const u = this.pluginTree.start(n.name, s, a);
|
|
@@ -5081,14 +5075,14 @@ function li(t, e) {
|
|
|
5081
5075
|
};
|
|
5082
5076
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
5083
5077
|
} else
|
|
5084
|
-
|
|
5078
|
+
Ou.call(this, t, n, r, e);
|
|
5085
5079
|
}
|
|
5086
|
-
function
|
|
5080
|
+
function Ou(t, e, r, n) {
|
|
5087
5081
|
const i = t.name;
|
|
5088
5082
|
ze("setting up ready timeout", i, this._timeout);
|
|
5089
5083
|
let o = setTimeout(() => {
|
|
5090
5084
|
ze("timed out", i), o = null;
|
|
5091
|
-
const a = new
|
|
5085
|
+
const a = new wu(i);
|
|
5092
5086
|
a.fn = t, this._error = a, n(a);
|
|
5093
5087
|
}, this._timeout);
|
|
5094
5088
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5096,7 +5090,7 @@ function Tu(t, e, r, n) {
|
|
|
5096
5090
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
5097
5091
|
}
|
|
5098
5092
|
}
|
|
5099
|
-
function
|
|
5093
|
+
function _u(t, e) {
|
|
5100
5094
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
5101
5095
|
if (t.length === 0 || t.length === 1) {
|
|
5102
5096
|
let i;
|
|
@@ -5106,7 +5100,7 @@ function Ou(t, e) {
|
|
|
5106
5100
|
)) : A.nextTick(e);
|
|
5107
5101
|
} else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
5108
5102
|
}
|
|
5109
|
-
function
|
|
5103
|
+
function Lu(t, e) {
|
|
5110
5104
|
return r.bind(e);
|
|
5111
5105
|
function r(n, i) {
|
|
5112
5106
|
let o;
|
|
@@ -5136,8 +5130,8 @@ Sr.exports.express = function(t) {
|
|
|
5136
5130
|
}
|
|
5137
5131
|
});
|
|
5138
5132
|
};
|
|
5139
|
-
var
|
|
5140
|
-
const
|
|
5133
|
+
var Cu = Sr.exports;
|
|
5134
|
+
const ku = /* @__PURE__ */ is(Cu);
|
|
5141
5135
|
(function() {
|
|
5142
5136
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5143
5137
|
return;
|
|
@@ -5155,9 +5149,9 @@ const Cu = /* @__PURE__ */ ns(Lu);
|
|
|
5155
5149
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5156
5150
|
}
|
|
5157
5151
|
})();
|
|
5158
|
-
function
|
|
5159
|
-
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 =
|
|
5160
|
-
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) => {
|
|
5161
5155
|
if (a)
|
|
5162
5156
|
throw a;
|
|
5163
5157
|
u.ready(), f();
|
|
@@ -5170,5 +5164,5 @@ function Zu(t, e = !0, r = !0, n) {
|
|
|
5170
5164
|
}), s;
|
|
5171
5165
|
}
|
|
5172
5166
|
export {
|
|
5173
|
-
|
|
5167
|
+
ec as StreamLayer
|
|
5174
5168
|
};
|