@streamlayer/sdk-web 1.1.3 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +7 -7
- package/lib/es/index.js +784 -738
- package/lib/index.d.ts +2 -1
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { pino as pi } from "pino";
|
|
2
|
-
import { QuestionType as F, QuestionStatus as
|
|
2
|
+
import { QuestionType as F, QuestionStatus as H, SilenceSetting as yi, 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 gi, map as mi, atom as Ct, batched as
|
|
6
|
+
import { computed as gi, map as mi, 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
|
|
8
|
+
import { ConnectError as tt, Code as oe, createContextKey as $r, createPromiseClient as Mr, createContextValues as vi } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as jr } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Ur } from "@nanostores/query";
|
|
11
11
|
import { Events as bi } 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
|
-
import { Feed as
|
|
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
17
|
import { LinksClient as Si } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
@@ -22,7 +22,7 @@ import { NotificationKind as he, NotificationType as qr } from "@streamlayer/sl-
|
|
|
22
22
|
function wi(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var En = { exports: {} },
|
|
25
|
+
var En = { exports: {} }, $ = En.exports = {}, se, ae;
|
|
26
26
|
function ir() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
@@ -31,43 +31,43 @@ function or() {
|
|
|
31
31
|
}
|
|
32
32
|
(function() {
|
|
33
33
|
try {
|
|
34
|
-
typeof setTimeout == "function" ?
|
|
34
|
+
typeof setTimeout == "function" ? se = setTimeout : se = ir;
|
|
35
35
|
} catch {
|
|
36
|
-
|
|
36
|
+
se = ir;
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
typeof clearTimeout == "function" ?
|
|
39
|
+
typeof clearTimeout == "function" ? ae = clearTimeout : ae = or;
|
|
40
40
|
} catch {
|
|
41
|
-
|
|
41
|
+
ae = or;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
44
|
function In(t) {
|
|
45
|
-
if (
|
|
45
|
+
if (se === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
|
-
if ((
|
|
48
|
-
return
|
|
47
|
+
if ((se === ir || !se) && setTimeout)
|
|
48
|
+
return se = setTimeout, setTimeout(t, 0);
|
|
49
49
|
try {
|
|
50
|
-
return
|
|
50
|
+
return se(t, 0);
|
|
51
51
|
} catch {
|
|
52
52
|
try {
|
|
53
|
-
return
|
|
53
|
+
return se.call(null, t, 0);
|
|
54
54
|
} catch {
|
|
55
|
-
return
|
|
55
|
+
return se.call(this, t, 0);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
function Ai(t) {
|
|
60
|
-
if (
|
|
60
|
+
if (ae === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
|
-
if ((
|
|
63
|
-
return
|
|
62
|
+
if ((ae === or || !ae) && clearTimeout)
|
|
63
|
+
return ae = clearTimeout, clearTimeout(t);
|
|
64
64
|
try {
|
|
65
|
-
return
|
|
65
|
+
return ae(t);
|
|
66
66
|
} catch {
|
|
67
67
|
try {
|
|
68
|
-
return
|
|
68
|
+
return ae.call(null, t);
|
|
69
69
|
} catch {
|
|
70
|
-
return
|
|
70
|
+
return ae.call(this, t);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -87,7 +87,7 @@ function Tn() {
|
|
|
87
87
|
_e = null, qe = !1, Ai(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
$.nextTick = function(t) {
|
|
91
91
|
var e = new Array(arguments.length - 1);
|
|
92
92
|
if (arguments.length > 1)
|
|
93
93
|
for (var r = 1; r < arguments.length; r++)
|
|
@@ -100,40 +100,40 @@ function On(t, e) {
|
|
|
100
100
|
On.prototype.run = function() {
|
|
101
101
|
this.fun.apply(null, this.array);
|
|
102
102
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
$.title = "browser";
|
|
104
|
+
$.browser = !0;
|
|
105
|
+
$.env = {};
|
|
106
|
+
$.argv = [];
|
|
107
|
+
$.version = "";
|
|
108
|
+
$.versions = {};
|
|
109
109
|
function be() {
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
$.on = be;
|
|
112
|
+
$.addListener = be;
|
|
113
|
+
$.once = be;
|
|
114
|
+
$.off = be;
|
|
115
|
+
$.removeListener = be;
|
|
116
|
+
$.removeAllListeners = be;
|
|
117
|
+
$.emit = be;
|
|
118
|
+
$.prependListener = be;
|
|
119
|
+
$.prependOnceListener = be;
|
|
120
|
+
$.listeners = function(t) {
|
|
121
121
|
return [];
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
$.binding = function(t) {
|
|
124
124
|
throw new Error("process.binding is not supported");
|
|
125
125
|
};
|
|
126
|
-
|
|
126
|
+
$.cwd = function() {
|
|
127
127
|
return "/";
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
$.chdir = function(t) {
|
|
130
130
|
throw new Error("process.chdir is not supported");
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
$.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
135
|
var Ii = En.exports;
|
|
136
|
-
const
|
|
136
|
+
const A = /* @__PURE__ */ wi(Ii), Ti = pi({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -284,7 +284,7 @@ class Y extends kt {
|
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
const B = (t) => Ct(t);
|
|
287
|
-
class
|
|
287
|
+
class ce extends kt {
|
|
288
288
|
atomStore;
|
|
289
289
|
constructor(e, r, n) {
|
|
290
290
|
super(e, `api:${r}`), this.atomStore = Ct(), n && e.subscribe((i) => {
|
|
@@ -479,7 +479,7 @@ class Di {
|
|
|
479
479
|
for await (const o of i)
|
|
480
480
|
this.attempt = 0, this.onData(o);
|
|
481
481
|
} catch (n) {
|
|
482
|
-
n instanceof tt && n.code !=
|
|
482
|
+
n instanceof tt && n.code != oe.Canceled && this.onStreamError(n);
|
|
483
483
|
}
|
|
484
484
|
})(), this.updateState(Z.Connected);
|
|
485
485
|
};
|
|
@@ -519,7 +519,7 @@ class Di {
|
|
|
519
519
|
*/
|
|
520
520
|
onStreamError = (e) => {
|
|
521
521
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
522
|
-
if (e instanceof tt && e.code !==
|
|
522
|
+
if (e instanceof tt && e.code !== oe.Canceled) {
|
|
523
523
|
this.updateState(Z.Failed), this.state.setValue("error", e), this.reconnect();
|
|
524
524
|
return;
|
|
525
525
|
}
|
|
@@ -528,14 +528,14 @@ class Di {
|
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
530
|
const Ri = /* @__PURE__ */ new Set([
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
]), Qr = le("grpc:retry"),
|
|
531
|
+
oe.Unknown,
|
|
532
|
+
oe.Internal,
|
|
533
|
+
oe.DeadlineExceeded,
|
|
534
|
+
oe.ResourceExhausted,
|
|
535
|
+
oe.FailedPrecondition,
|
|
536
|
+
oe.Unavailable,
|
|
537
|
+
oe.DataLoss
|
|
538
|
+
]), Qr = le("grpc:retry"), Vi = (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);
|
|
@@ -552,9 +552,9 @@ const Ri = /* @__PURE__ */ new Set([
|
|
|
552
552
|
await new Promise((c) => setTimeout(c, f));
|
|
553
553
|
}
|
|
554
554
|
}, sr = {
|
|
555
|
-
retryAttempts:
|
|
556
|
-
retryDelay:
|
|
557
|
-
},
|
|
555
|
+
retryAttempts: $r(10, { description: "Number of attempts to retry" }),
|
|
556
|
+
retryDelay: $r(3e4, { description: "Max delay between retries in milliseconds" })
|
|
557
|
+
}, $i = () => {
|
|
558
558
|
const t = localStorage.getItem("sl-device-id");
|
|
559
559
|
if (t)
|
|
560
560
|
return t;
|
|
@@ -581,7 +581,7 @@ 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":
|
|
584
|
+
"sl-device-id": $i(),
|
|
585
585
|
"sl-device-os": Mi()
|
|
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({
|
|
@@ -652,9 +652,9 @@ class Gr {
|
|
|
652
652
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
653
653
|
return { client: i, createRequestOptions: (f) => {
|
|
654
654
|
const c = vi();
|
|
655
|
-
for (const
|
|
656
|
-
const
|
|
657
|
-
c.set(
|
|
655
|
+
for (const h in f) {
|
|
656
|
+
const l = sr[h];
|
|
657
|
+
c.set(l, f[h]);
|
|
658
658
|
}
|
|
659
659
|
return c;
|
|
660
660
|
}, queryKey: s, queryKeyStr: a.join("") };
|
|
@@ -679,7 +679,7 @@ 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(Fi()), this.opts?.retryable && this.interceptors.push(
|
|
682
|
+
this.interceptors.push(e), this.interceptors.push(Fi()), this.opts?.retryable && this.interceptors.push(Vi);
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
685
|
const ji = (t, e) => {
|
|
@@ -786,10 +786,10 @@ var ge;
|
|
|
786
786
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
787
787
|
})(ge || (ge = {}));
|
|
788
788
|
const zi = (t) => {
|
|
789
|
-
const e = new Ue(), r = new Y(B(e.getExternalToken()), "userKey"), n = new Y(B(e.getToken()), "userToken"), i = new
|
|
789
|
+
const e = new Ue(), r = new Y(B(e.getExternalToken()), "userKey"), n = new Y(B(e.getToken()), "userToken"), i = new ce(Bi(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
|
|
792
|
+
}), o = new ce(qi(n.getStore(), t), "userSettings");
|
|
793
793
|
return {
|
|
794
794
|
userKey: r,
|
|
795
795
|
userToken: n,
|
|
@@ -797,7 +797,7 @@ const zi = (t) => {
|
|
|
797
797
|
userSettings: o
|
|
798
798
|
};
|
|
799
799
|
}, Hi = (t) => {
|
|
800
|
-
const e = new Y(B(void 0), "providerStreamId"), r = new
|
|
800
|
+
const e = new Y(B(void 0), "providerStreamId"), r = new ce(ji(e.getStore(), t), "slStreamId", (i) => i?.data), n = new ce(Ui(r.getAtomStore(), t), "streamSettings");
|
|
801
801
|
return r.getAtomStore().listen((i) => {
|
|
802
802
|
(i === "" || i === void 0) && n.getStore().mutate(void 0);
|
|
803
803
|
}), {
|
|
@@ -806,7 +806,7 @@ const zi = (t) => {
|
|
|
806
806
|
streamSettings: n
|
|
807
807
|
};
|
|
808
808
|
}, Wi = (t) => {
|
|
809
|
-
const e = new Y(B(void 0), "enabled"), r = new Y(B(ge.DISABLED), "status"), n = new
|
|
809
|
+
const e = new Y(B(void 0), "enabled"), r = new Y(B(ge.DISABLED), "status"), n = new ce(Qi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(Gi(n.getAtomStore(), t), "organizationAdvertising"), o = zi(t), s = Hi(t);
|
|
810
810
|
return {
|
|
811
811
|
enabled: e,
|
|
812
812
|
status: r,
|
|
@@ -872,7 +872,7 @@ const Ji = (t, e, r) => {
|
|
|
872
872
|
}
|
|
873
873
|
});
|
|
874
874
|
}, eo = (t, e) => {
|
|
875
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
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({
|
|
878
878
|
eventId: s
|
|
@@ -881,7 +881,7 @@ const Ji = (t, e, r) => {
|
|
|
881
881
|
dedupeTime: 1e3 * 60 * 60
|
|
882
882
|
});
|
|
883
883
|
}, to = (t, e) => {
|
|
884
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
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({
|
|
887
887
|
filter: {
|
|
@@ -892,31 +892,36 @@ const Ji = (t, e, r) => {
|
|
|
892
892
|
// 10 minutes
|
|
893
893
|
refetchInterval: 0
|
|
894
894
|
});
|
|
895
|
-
}, ro = (t, e) => {
|
|
896
|
-
const { client: r } = e.
|
|
895
|
+
}, ro = async (t, e) => {
|
|
896
|
+
const { client: r } = e.createPromiseClient(re, { method: "item", params: [t] });
|
|
897
|
+
return (await r.item({
|
|
898
|
+
id: t
|
|
899
|
+
})).data;
|
|
900
|
+
}, no = (t, e) => {
|
|
901
|
+
const { client: r } = e.createStreamClient(re), n = Ct({ eventId: t.get() || "", feedId: "" });
|
|
897
902
|
return t.subscribe((o = "") => {
|
|
898
903
|
n.set({ eventId: o, feedId: "" });
|
|
899
904
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
900
|
-
},
|
|
901
|
-
const { client: r } = e.createStreamClient(
|
|
905
|
+
}, io = (t, e) => {
|
|
906
|
+
const { client: r } = e.createStreamClient(re);
|
|
902
907
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
903
908
|
}, ar = (t, e) => {
|
|
904
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
909
|
+
const { client: r, queryKey: n } = e.createPromiseClient(re, { method: "questionByUser", params: [t] });
|
|
905
910
|
return e.nanoquery.createFetcherStore(n, {
|
|
906
911
|
fetcher: async (i, o, s) => (await r.questionByUser({
|
|
907
912
|
questionId: s
|
|
908
913
|
})).data?.attributes?.question,
|
|
909
914
|
dedupeTime: 1e3 * 60 * 5
|
|
910
915
|
});
|
|
911
|
-
},
|
|
916
|
+
}, oo = async (t, e) => {
|
|
912
917
|
if (!t)
|
|
913
918
|
return;
|
|
914
|
-
const { client: r } = e.createPromiseClient(
|
|
919
|
+
const { client: r } = e.createPromiseClient(re, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
|
|
915
920
|
id: t
|
|
916
921
|
});
|
|
917
922
|
return n.data?.attributes?.options?.options.case === "promotion" ? n.data?.attributes?.options?.options.value : void 0;
|
|
918
|
-
},
|
|
919
|
-
const { client: n, queryKey: i } = r.createPromiseClient(
|
|
923
|
+
}, so = (t, e, r) => {
|
|
924
|
+
const { client: n, queryKey: i } = r.createPromiseClient(re, {
|
|
920
925
|
method: "list",
|
|
921
926
|
params: [t, e]
|
|
922
927
|
});
|
|
@@ -925,14 +930,14 @@ const Ji = (t, e, r) => {
|
|
|
925
930
|
eventId: a,
|
|
926
931
|
filter: {
|
|
927
932
|
types: u === Ce.ALLOWED ? [] : [F.FACTOID, F.PROMOTION, F.TWEET],
|
|
928
|
-
statuses: [
|
|
933
|
+
statuses: [H.ACTIVE, H.RESOLVED]
|
|
929
934
|
}
|
|
930
935
|
})).data : [],
|
|
931
936
|
dedupeTime: 0,
|
|
932
937
|
refetchInterval: 0
|
|
933
938
|
});
|
|
934
|
-
},
|
|
935
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
939
|
+
}, ao = (t, e) => {
|
|
940
|
+
const { client: r, queryKey: n } = e.createPromiseClient(re, {
|
|
936
941
|
method: "list",
|
|
937
942
|
params: [t]
|
|
938
943
|
});
|
|
@@ -941,7 +946,7 @@ const Ji = (t, e, r) => {
|
|
|
941
946
|
eventId: s,
|
|
942
947
|
filter: {
|
|
943
948
|
types: [F.PROMOTION],
|
|
944
|
-
statuses: [
|
|
949
|
+
statuses: [H.ACTIVE]
|
|
945
950
|
}
|
|
946
951
|
})).data.map(({ attributes: u }) => {
|
|
947
952
|
if (!(!u || u.attributes.case !== "promotion"))
|
|
@@ -953,28 +958,28 @@ const Ji = (t, e, r) => {
|
|
|
953
958
|
dedupeTime: 0,
|
|
954
959
|
refetchInterval: 0
|
|
955
960
|
});
|
|
956
|
-
},
|
|
957
|
-
const n =
|
|
961
|
+
}, uo = (t, e, r) => {
|
|
962
|
+
const n = Vr([e, r], () => {
|
|
958
963
|
const a = e.get();
|
|
959
964
|
if (!a)
|
|
960
965
|
return;
|
|
961
966
|
const u = r.get().data?.find((c) => c.id === a?.questionId), f = a?.question?.openedFrom;
|
|
962
967
|
return u ? (u.openedFrom = f, u) : a.question;
|
|
963
|
-
}), i =
|
|
968
|
+
}), i = Vr(n, (a) => a && a.type === "question" ? a.id : void 0), o = ar(i, t);
|
|
964
969
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
965
|
-
const u = o.get().data, f = (c,
|
|
966
|
-
if (!c || !
|
|
967
|
-
return c ||
|
|
968
|
-
const
|
|
969
|
-
for (let
|
|
970
|
-
|
|
971
|
-
...c[
|
|
972
|
-
...
|
|
973
|
-
correct: c[
|
|
974
|
-
youVoted: c[
|
|
975
|
-
pointsEarned: c[
|
|
970
|
+
const u = o.get().data, f = (c, h) => {
|
|
971
|
+
if (!c || !h)
|
|
972
|
+
return c || h || [];
|
|
973
|
+
const l = [];
|
|
974
|
+
for (let g = 0; g < c.length; g++)
|
|
975
|
+
l.push({
|
|
976
|
+
...c[g],
|
|
977
|
+
...h[g],
|
|
978
|
+
correct: c[g].correct,
|
|
979
|
+
youVoted: c[g].youVoted,
|
|
980
|
+
pointsEarned: c[g].pointsEarned
|
|
976
981
|
});
|
|
977
|
-
return
|
|
982
|
+
return l;
|
|
978
983
|
};
|
|
979
984
|
o.mutate({
|
|
980
985
|
...a,
|
|
@@ -989,7 +994,7 @@ var St;
|
|
|
989
994
|
(function(t) {
|
|
990
995
|
t.SHOWED = "showed";
|
|
991
996
|
})(St || (St = {}));
|
|
992
|
-
class
|
|
997
|
+
class co extends He {
|
|
993
998
|
constructor() {
|
|
994
999
|
super("advertisement");
|
|
995
1000
|
}
|
|
@@ -998,7 +1003,7 @@ class uo extends He {
|
|
|
998
1003
|
};
|
|
999
1004
|
isShowed = (e) => this.read(St.SHOWED, e);
|
|
1000
1005
|
}
|
|
1001
|
-
class
|
|
1006
|
+
class lo {
|
|
1002
1007
|
advertisementList;
|
|
1003
1008
|
store;
|
|
1004
1009
|
timeouts;
|
|
@@ -1080,77 +1085,111 @@ class co {
|
|
|
1080
1085
|
this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.advertisementList.off(), this.advertisementList.set(/* @__PURE__ */ new Map());
|
|
1081
1086
|
};
|
|
1082
1087
|
}
|
|
1083
|
-
const
|
|
1084
|
-
const n = le("advertisement_queue"),
|
|
1088
|
+
const fo = (t, e, r) => {
|
|
1089
|
+
const n = r.transport, i = le("advertisement_queue"), o = new lo({ concurrency: 1, animationDelay: 1e3 }), s = new co(), a = new ce(ao(t, n), "gamification:promotionList"), u = (l, g) => {
|
|
1085
1090
|
J.emit("advertisement", {
|
|
1086
1091
|
action: "received",
|
|
1087
1092
|
payload: {
|
|
1088
1093
|
advertisementId: l,
|
|
1089
|
-
advertisementType:
|
|
1094
|
+
advertisementType: g?.type
|
|
1090
1095
|
}
|
|
1091
|
-
}),
|
|
1096
|
+
}), o.addToQueue({
|
|
1092
1097
|
id: l,
|
|
1093
1098
|
autoHideDuration: 1 / 0,
|
|
1094
1099
|
data: te({ loading: !1, error: void 0, data: void 0 }),
|
|
1095
|
-
close: () =>
|
|
1100
|
+
close: () => c(l),
|
|
1096
1101
|
promise: async function() {
|
|
1097
1102
|
this.data.setKey("loading", !0);
|
|
1098
1103
|
try {
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1101
|
-
} catch (
|
|
1102
|
-
this.data.setKey("error",
|
|
1104
|
+
const v = g || await oo(l, n);
|
|
1105
|
+
v ? this.data.setKey("data", v) : this.data.setKey("error", new Error("No promotion found"));
|
|
1106
|
+
} catch (v) {
|
|
1107
|
+
this.data.setKey("error", v);
|
|
1103
1108
|
} finally {
|
|
1104
1109
|
this.data.setKey("loading", !1);
|
|
1105
1110
|
}
|
|
1106
1111
|
}
|
|
1107
1112
|
});
|
|
1108
|
-
}, u = (l) => {
|
|
1109
|
-
n.debug({ notificationId: l }, "markAsViewed: %o"), o.setShowed(l);
|
|
1110
1113
|
}, f = (l) => {
|
|
1111
|
-
i.
|
|
1114
|
+
i.debug({ notificationId: l }, "markAsViewed: %o"), s.setShowed(l);
|
|
1112
1115
|
}, c = (l) => {
|
|
1113
|
-
|
|
1114
|
-
|
|
1116
|
+
o.closeAdvertisement(l), f(l), r.sdk.onAdvertisementActivate({
|
|
1117
|
+
stage: "deactivate",
|
|
1118
|
+
id: l
|
|
1119
|
+
});
|
|
1120
|
+
}, h = (l) => {
|
|
1121
|
+
const g = o.advertisementList.get();
|
|
1122
|
+
if (!g?.size)
|
|
1115
1123
|
return null;
|
|
1116
|
-
const
|
|
1117
|
-
return !l &&
|
|
1124
|
+
const v = g.values().next().value, w = v.data.get();
|
|
1125
|
+
return !l && s.isShowed(v.id) ? (o.removeFromList(v.id), h(l)) : (!w.data && !w.error && !w.loading && v.promise(), J.emit("advertisement", {
|
|
1118
1126
|
action: "opened",
|
|
1119
1127
|
payload: {
|
|
1120
|
-
advertisementId:
|
|
1121
|
-
advertisementType:
|
|
1128
|
+
advertisementId: v.id,
|
|
1129
|
+
advertisementType: w.data?.type
|
|
1122
1130
|
}
|
|
1123
|
-
}),
|
|
1131
|
+
}), v);
|
|
1124
1132
|
};
|
|
1125
|
-
return
|
|
1126
|
-
|
|
1133
|
+
return a.subscribe((l) => {
|
|
1134
|
+
if (l.data) {
|
|
1135
|
+
const g = l.data[l.data.length - 1];
|
|
1136
|
+
g && r.sdk.onAdvertisementActivate({
|
|
1137
|
+
stage: "activate",
|
|
1138
|
+
id: g.id,
|
|
1139
|
+
isShowed: !!s.isShowed(g.id)
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
}), e.addListener("promotion cb", (l) => {
|
|
1143
|
+
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;
|
|
1144
|
+
if (g === void 0 || v === void 0) {
|
|
1145
|
+
i.debug("not promotion");
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1148
|
+
if (g.status === H.RESOLVED) {
|
|
1149
|
+
r.sdk.onAdvertisementActivate({
|
|
1150
|
+
stage: "deactivate",
|
|
1151
|
+
id: g.id
|
|
1152
|
+
}), i.debug({ feedItem: g }, "resolved: %o");
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
if (g.status === H.ACTIVE) {
|
|
1156
|
+
i.debug({ feedItem: g }, "active: %o"), r.sdk.onAdvertisementActivate({
|
|
1157
|
+
stage: "activate",
|
|
1158
|
+
id: g.id,
|
|
1159
|
+
isShowed: !!s.isShowed(g.id)
|
|
1160
|
+
});
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
i.debug({ feedItem: g }, "skip: %o");
|
|
1164
|
+
}), nt(o.advertisementList, () => {
|
|
1165
|
+
a.subscribe((l) => {
|
|
1127
1166
|
if (l.data) {
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1167
|
+
const g = l.data[l.data.length - 1];
|
|
1168
|
+
g && u(g.id);
|
|
1130
1169
|
}
|
|
1131
1170
|
}), e.addListener("promotion", (l) => {
|
|
1132
|
-
const
|
|
1133
|
-
if (
|
|
1134
|
-
|
|
1171
|
+
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;
|
|
1172
|
+
if (g === void 0 || v === void 0) {
|
|
1173
|
+
i.debug("not promotion");
|
|
1135
1174
|
return;
|
|
1136
1175
|
}
|
|
1137
|
-
if (
|
|
1138
|
-
|
|
1176
|
+
if (g.status === H.RESOLVED) {
|
|
1177
|
+
c(g.id), i.debug({ feedItem: g }, "resolved: %o");
|
|
1139
1178
|
return;
|
|
1140
1179
|
}
|
|
1141
|
-
if (
|
|
1142
|
-
|
|
1180
|
+
if (g.status === H.ACTIVE) {
|
|
1181
|
+
i.debug({ feedItem: g }, "active: %o"), u(g.id, v);
|
|
1143
1182
|
return;
|
|
1144
1183
|
}
|
|
1145
|
-
|
|
1184
|
+
i.debug({ feedItem: g }, "skip: %o");
|
|
1146
1185
|
});
|
|
1147
|
-
}), { hide:
|
|
1186
|
+
}), { hide: c, show: u, $list: o.advertisementList, getActiveAdvertisement: h };
|
|
1148
1187
|
};
|
|
1149
1188
|
var Ce;
|
|
1150
1189
|
(function(t) {
|
|
1151
1190
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
1152
1191
|
})(Ce || (Ce = {}));
|
|
1153
|
-
class
|
|
1192
|
+
class ho {
|
|
1154
1193
|
/** sl event id */
|
|
1155
1194
|
slStreamId;
|
|
1156
1195
|
/** organization id */
|
|
@@ -1183,13 +1222,13 @@ class fo {
|
|
|
1183
1222
|
transport;
|
|
1184
1223
|
cancels = /* @__PURE__ */ new Set();
|
|
1185
1224
|
constructor(e) {
|
|
1186
|
-
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
|
|
1187
|
-
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription =
|
|
1225
|
+
this.transport = e.transport, this.log = le("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new Y(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new Y(B(Ce.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new Y(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(eo(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ce(so(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = to(this.slStreamId, e.transport), this.openedQuestion = uo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
|
|
1226
|
+
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = io(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
1188
1227
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
1189
1228
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1190
|
-
})), this.feedSubscription =
|
|
1229
|
+
})), this.feedSubscription = no(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
1191
1230
|
const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
|
|
1192
|
-
!i || i.type === F.PROMOTION || n && i.status ===
|
|
1231
|
+
!i || i.type === F.PROMOTION || n && i.status === H.RESOLVED && i.id !== n || this.activeQuestionId.mutate(r.data?.attributes);
|
|
1193
1232
|
})), this.cancels.add(this.feedSubscription.addListener("moderation update", (r) => {
|
|
1194
1233
|
window.requestAnimationFrame(() => {
|
|
1195
1234
|
r.data?.attributes?.question === void 0 && r.data?.attributes?.moderation && this.moderation.invalidate();
|
|
@@ -1202,7 +1241,7 @@ class fo {
|
|
|
1202
1241
|
this.activeQuestionId.off();
|
|
1203
1242
|
for (const r of this.cancels)
|
|
1204
1243
|
r(), this.cancels.delete(r);
|
|
1205
|
-
}), this.advertisement =
|
|
1244
|
+
}), this.advertisement = fo(this.slStreamId, this.feedSubscription, e);
|
|
1206
1245
|
}
|
|
1207
1246
|
/**
|
|
1208
1247
|
* Get id for notifications and link with current session
|
|
@@ -1232,7 +1271,7 @@ class fo {
|
|
|
1232
1271
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1233
1272
|
};
|
|
1234
1273
|
}
|
|
1235
|
-
class
|
|
1274
|
+
class po {
|
|
1236
1275
|
notificationsList;
|
|
1237
1276
|
store;
|
|
1238
1277
|
timeouts;
|
|
@@ -1317,7 +1356,7 @@ var wt;
|
|
|
1317
1356
|
(function(t) {
|
|
1318
1357
|
t.OPENED = "opened";
|
|
1319
1358
|
})(wt || (wt = {}));
|
|
1320
|
-
class
|
|
1359
|
+
class yo extends He {
|
|
1321
1360
|
constructor() {
|
|
1322
1361
|
super("notification");
|
|
1323
1362
|
}
|
|
@@ -1333,11 +1372,11 @@ var Ae;
|
|
|
1333
1372
|
(function(t) {
|
|
1334
1373
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1335
1374
|
})(Ae || (Ae = {}));
|
|
1336
|
-
class
|
|
1375
|
+
class go {
|
|
1337
1376
|
queue;
|
|
1338
1377
|
storage;
|
|
1339
1378
|
constructor(e = {}) {
|
|
1340
|
-
this.storage = new
|
|
1379
|
+
this.storage = new yo(), this.queue = new po({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1341
1380
|
}
|
|
1342
1381
|
isViewed = (e) => this.storage.isOpened(e);
|
|
1343
1382
|
add = (e) => {
|
|
@@ -1374,8 +1413,8 @@ class yo {
|
|
|
1374
1413
|
this.storage.setOpened(e);
|
|
1375
1414
|
};
|
|
1376
1415
|
}
|
|
1377
|
-
const
|
|
1378
|
-
t.notifications = new
|
|
1416
|
+
const mo = (t, e, r) => {
|
|
1417
|
+
t.notifications = new go(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1379
1418
|
t.notifications.queue.drain();
|
|
1380
1419
|
}), r();
|
|
1381
1420
|
};
|
|
@@ -1383,22 +1422,22 @@ var rt;
|
|
|
1383
1422
|
(function(t) {
|
|
1384
1423
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1385
1424
|
})(rt || (rt = {}));
|
|
1386
|
-
const
|
|
1387
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1425
|
+
const vo = async (t, e) => {
|
|
1426
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1388
1427
|
try {
|
|
1389
1428
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1390
1429
|
} catch (o) {
|
|
1391
|
-
throw tt.from(o)?.code ===
|
|
1430
|
+
throw tt.from(o)?.code === oe.AlreadyExists ? new Error(rt.ALREADY_VOTED) : new Error(rt.UNKNOWN);
|
|
1392
1431
|
}
|
|
1393
|
-
},
|
|
1394
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1432
|
+
}, bo = (t, e) => {
|
|
1433
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1395
1434
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1396
1435
|
};
|
|
1397
1436
|
var Be;
|
|
1398
1437
|
(function(t) {
|
|
1399
1438
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1400
1439
|
})(Be || (Be = {}));
|
|
1401
|
-
class
|
|
1440
|
+
class So extends He {
|
|
1402
1441
|
constructor() {
|
|
1403
1442
|
super("gamification-session", window.sessionStorage);
|
|
1404
1443
|
}
|
|
@@ -1410,7 +1449,7 @@ class bo extends He {
|
|
|
1410
1449
|
class Pn extends He {
|
|
1411
1450
|
sessionStorage;
|
|
1412
1451
|
constructor() {
|
|
1413
|
-
super("gamification"), this.sessionStorage = new
|
|
1452
|
+
super("gamification"), this.sessionStorage = new So();
|
|
1414
1453
|
}
|
|
1415
1454
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1416
1455
|
this.write(Be.ONBOARDING, n, e, r, i);
|
|
@@ -1421,24 +1460,24 @@ class Pn extends He {
|
|
|
1421
1460
|
};
|
|
1422
1461
|
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Be.ONBOARDING_IO, n, e, r]);
|
|
1423
1462
|
}
|
|
1424
|
-
const
|
|
1463
|
+
const wo = {
|
|
1425
1464
|
pageSize: 10
|
|
1426
|
-
},
|
|
1465
|
+
}, Ao = (t, e, r, n, i) => {
|
|
1427
1466
|
let o = 0;
|
|
1428
|
-
const s = B({ pageSize:
|
|
1467
|
+
const s = B({ pageSize: wo.pageSize, page: 0 }), a = te({
|
|
1429
1468
|
data: [],
|
|
1430
1469
|
key: Date.now(),
|
|
1431
1470
|
hasMore: !0,
|
|
1432
1471
|
loading: void 0,
|
|
1433
1472
|
error: void 0
|
|
1434
1473
|
}), u = Xi(t), f = async () => {
|
|
1435
|
-
const
|
|
1436
|
-
if (
|
|
1474
|
+
const l = e.get(), g = n.getStore().get().data?.map((v) => v.slId) || [];
|
|
1475
|
+
if (l && g?.length) {
|
|
1437
1476
|
const v = r.get();
|
|
1438
|
-
v &&
|
|
1477
|
+
v && g.push(v), a.setKey("loading", !0), a.setKey("data", []);
|
|
1439
1478
|
const b = await u({
|
|
1440
|
-
eventId:
|
|
1441
|
-
usersIds:
|
|
1479
|
+
eventId: l,
|
|
1480
|
+
usersIds: g
|
|
1442
1481
|
});
|
|
1443
1482
|
a.set({
|
|
1444
1483
|
data: b.data.map((L, R) => ({
|
|
@@ -1452,18 +1491,18 @@ const So = {
|
|
|
1452
1491
|
}
|
|
1453
1492
|
}, c = () => {
|
|
1454
1493
|
f();
|
|
1455
|
-
},
|
|
1456
|
-
const
|
|
1457
|
-
v <= o && s.set({ ...
|
|
1494
|
+
}, h = (l) => {
|
|
1495
|
+
const g = s.get(), v = l || g.page + 1;
|
|
1496
|
+
v <= o && s.set({ ...g, page: v });
|
|
1458
1497
|
};
|
|
1459
1498
|
return nt(a, () => {
|
|
1460
|
-
const
|
|
1499
|
+
const l = e.listen(f), g = n.listen(f);
|
|
1461
1500
|
return () => {
|
|
1462
|
-
|
|
1501
|
+
l(), g();
|
|
1463
1502
|
};
|
|
1464
|
-
}), { $store: a, fetchMore:
|
|
1503
|
+
}), { $store: a, fetchMore: h, invalidate: c };
|
|
1465
1504
|
};
|
|
1466
|
-
class
|
|
1505
|
+
class Eo extends He {
|
|
1467
1506
|
get = this.read;
|
|
1468
1507
|
set = this.write;
|
|
1469
1508
|
del = this.remove;
|
|
@@ -1471,12 +1510,12 @@ class Ao extends He {
|
|
|
1471
1510
|
super("deep-link-context", window.sessionStorage);
|
|
1472
1511
|
}
|
|
1473
1512
|
}
|
|
1474
|
-
const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid",
|
|
1513
|
+
const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Io = /* @__PURE__ */ new Set([Pt, Nn, Fn]), zr = (t) => {
|
|
1475
1514
|
const e = {}, r = {};
|
|
1476
1515
|
for (const [n, i] of t)
|
|
1477
|
-
|
|
1516
|
+
Io.has(n) ? e[n] = i : r[n] = i;
|
|
1478
1517
|
return { result: e, remain: r };
|
|
1479
|
-
},
|
|
1518
|
+
}, To = ({ hash: t, search: e }) => {
|
|
1480
1519
|
if (t && t.includes(Kr)) {
|
|
1481
1520
|
const r = new URLSearchParams(t.substr(1));
|
|
1482
1521
|
return { hash: zr(r) };
|
|
@@ -1486,43 +1525,43 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Eo = /*
|
|
|
1486
1525
|
return { search: zr(r) };
|
|
1487
1526
|
}
|
|
1488
1527
|
return null;
|
|
1489
|
-
}, Hr = le("deep_link"),
|
|
1528
|
+
}, Hr = le("deep_link"), ue = {
|
|
1490
1529
|
debug: (...t) => {
|
|
1491
1530
|
Hr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1492
1531
|
},
|
|
1493
1532
|
trace: (...t) => {
|
|
1494
1533
|
Hr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1495
1534
|
}
|
|
1496
|
-
},
|
|
1535
|
+
}, Oo = (t, e) => {
|
|
1497
1536
|
const { hash: r, search: n } = window.location;
|
|
1498
|
-
if (
|
|
1499
|
-
const i =
|
|
1500
|
-
if (
|
|
1537
|
+
if (ue.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1538
|
+
const i = To({ hash: r, search: n });
|
|
1539
|
+
if (ue.debug(i, "parse deep link result"), i) {
|
|
1501
1540
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1502
1541
|
if (Object.keys(a).length !== 0) {
|
|
1503
1542
|
t.setValue("data", a);
|
|
1504
1543
|
const f = Object.keys(u).length !== 0;
|
|
1505
1544
|
if (o) {
|
|
1506
1545
|
let c = "";
|
|
1507
|
-
f && (c = `#${new URLSearchParams(u).toString()}`,
|
|
1546
|
+
f && (c = `#${new URLSearchParams(u).toString()}`, ue.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
|
|
1508
1547
|
}
|
|
1509
1548
|
if (s) {
|
|
1510
1549
|
let c = "";
|
|
1511
|
-
f && (c = `?${new URLSearchParams(u).toString()}`,
|
|
1550
|
+
f && (c = `?${new URLSearchParams(u).toString()}`, ue.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
|
|
1512
1551
|
}
|
|
1513
1552
|
e(a);
|
|
1514
1553
|
}
|
|
1515
1554
|
}
|
|
1516
1555
|
}
|
|
1517
1556
|
t.setValue("parsed", !0);
|
|
1518
|
-
},
|
|
1519
|
-
const n = new
|
|
1557
|
+
}, _o = (t, e, r) => {
|
|
1558
|
+
const n = new Eo(), i = n.get("sl-deep-link-store");
|
|
1520
1559
|
let o = {};
|
|
1521
1560
|
if (i)
|
|
1522
1561
|
try {
|
|
1523
1562
|
o = JSON.parse(i);
|
|
1524
1563
|
} catch (a) {
|
|
1525
|
-
|
|
1564
|
+
ue.debug(a);
|
|
1526
1565
|
}
|
|
1527
1566
|
t.deepLink = {
|
|
1528
1567
|
$store: new Le(te(o), "deep-link-context"),
|
|
@@ -1532,7 +1571,7 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Eo = /*
|
|
|
1532
1571
|
},
|
|
1533
1572
|
// we are logged in with inviter id
|
|
1534
1573
|
deepLinkUsed: (a) => {
|
|
1535
|
-
|
|
1574
|
+
ue.debug(`logged in with inviterId: ${a}`), t.deepLink.$store.setValue("used", !0);
|
|
1536
1575
|
},
|
|
1537
1576
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
1538
1577
|
}, t.sdk.getInviter = () => {
|
|
@@ -1541,22 +1580,22 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Eo = /*
|
|
|
1541
1580
|
}, t.sdk.inviteDisplayed = () => {
|
|
1542
1581
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
|
|
1543
1582
|
}, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
|
|
1544
|
-
localStorage.getItem("SL_DEBUG") &&
|
|
1583
|
+
localStorage.getItem("SL_DEBUG") && ue.trace("adding deep link handler"), t.deepLink.onDeepLinkHandlers.add(a);
|
|
1545
1584
|
}, e.onDeepLinkHandled && t.sdk.addDeepLinkHandler(e.onDeepLinkHandled), t.sdk.removeDeepLinkHandler = (a) => {
|
|
1546
|
-
|
|
1585
|
+
ue.trace("removing deep link handler"), t.deepLink.onDeepLinkHandlers.delete(a);
|
|
1547
1586
|
};
|
|
1548
1587
|
const s = (a) => {
|
|
1549
|
-
t.deepLink.$store.setValue("handled", !0),
|
|
1588
|
+
t.deepLink.$store.setValue("handled", !0), ue.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
|
|
1550
1589
|
for (const u of t.deepLink.onDeepLinkHandlers)
|
|
1551
1590
|
try {
|
|
1552
|
-
|
|
1591
|
+
ue.trace("called handler"), u(a);
|
|
1553
1592
|
} catch (f) {
|
|
1554
1593
|
console.error(f);
|
|
1555
1594
|
}
|
|
1556
1595
|
};
|
|
1557
|
-
|
|
1558
|
-
},
|
|
1559
|
-
class
|
|
1596
|
+
Oo(t.deepLink.$store, s), r();
|
|
1597
|
+
}, Lo = le("bypass");
|
|
1598
|
+
class Co extends Ci {
|
|
1560
1599
|
$coreStore;
|
|
1561
1600
|
deepLink;
|
|
1562
1601
|
transport;
|
|
@@ -1574,7 +1613,7 @@ class Lo extends Ci {
|
|
|
1574
1613
|
login = async (e, r) => {
|
|
1575
1614
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1576
1615
|
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Pt];
|
|
1577
|
-
|
|
1616
|
+
Lo.debug({ inviterKey: o }, "login with inviterKey");
|
|
1578
1617
|
const s = await this.bypassLogin({
|
|
1579
1618
|
schema: e,
|
|
1580
1619
|
userKey: r,
|
|
@@ -1643,8 +1682,8 @@ class Lo extends Ci {
|
|
|
1643
1682
|
});
|
|
1644
1683
|
};
|
|
1645
1684
|
}
|
|
1646
|
-
const Je = new Ue(),
|
|
1647
|
-
t.auth = new
|
|
1685
|
+
const Je = new Ue(), ko = (t, e, r) => {
|
|
1686
|
+
t.auth = new Co(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1648
1687
|
n === ge.READY && t.auth.reLogin();
|
|
1649
1688
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1650
1689
|
if (!(Je.getSchema() === n && Je.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
@@ -1663,7 +1702,7 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1663
1702
|
trace: (...t) => {
|
|
1664
1703
|
Wr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1665
1704
|
}
|
|
1666
|
-
},
|
|
1705
|
+
}, Po = (t, e, r) => {
|
|
1667
1706
|
t.videoPlayer = {
|
|
1668
1707
|
controllers: /* @__PURE__ */ new Set()
|
|
1669
1708
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
@@ -1681,7 +1720,13 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1681
1720
|
}
|
|
1682
1721
|
}
|
|
1683
1722
|
}, r();
|
|
1684
|
-
},
|
|
1723
|
+
}, No = (t, e, r) => {
|
|
1724
|
+
t.ui = {
|
|
1725
|
+
state: /* @__PURE__ */ new Set()
|
|
1726
|
+
}, e.onContentActivate && (t.ui.onContentActivate = e.onContentActivate), t.sdk.onAdvertisementActivate = (n) => {
|
|
1727
|
+
t.ui.onContentActivate && t.ui.onContentActivate({ ...n, type: "advertisement" });
|
|
1728
|
+
}, r();
|
|
1729
|
+
}, Fo = (t, e, r) => {
|
|
1685
1730
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1686
1731
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1687
1732
|
if (i.has(s)) {
|
|
@@ -1708,7 +1753,7 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1708
1753
|
}, t.sdk.createEventSession = (s) => {
|
|
1709
1754
|
t.stores.providerStreamId.setValue(s);
|
|
1710
1755
|
}, r();
|
|
1711
|
-
},
|
|
1756
|
+
}, Do = (t, e) => {
|
|
1712
1757
|
const { client: r, queryKey: n } = t.createPromiseClient(it, {
|
|
1713
1758
|
method: "generateDeepLink",
|
|
1714
1759
|
params: e
|
|
@@ -1729,7 +1774,7 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1729
1774
|
// 24 hours
|
|
1730
1775
|
refetchInterval: 0
|
|
1731
1776
|
});
|
|
1732
|
-
},
|
|
1777
|
+
}, Ro = (t, { web: e, mobile: r }) => {
|
|
1733
1778
|
const { client: n } = t.createPromiseClient(Si, { method: "generate" });
|
|
1734
1779
|
return n.generate({ web: e, mobile: r });
|
|
1735
1780
|
}, Yr = (t, e) => {
|
|
@@ -1737,21 +1782,21 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1737
1782
|
for (const [n, i] of Object.entries(e))
|
|
1738
1783
|
r.append(n, i);
|
|
1739
1784
|
return r.toString();
|
|
1740
|
-
},
|
|
1785
|
+
}, Vo = (t, e, r, n) => {
|
|
1741
1786
|
const i = te({});
|
|
1742
|
-
return nt(i, () =>
|
|
1743
|
-
const c = u ? "https://masters.com" : a?.url,
|
|
1744
|
-
[Pt]:
|
|
1745
|
-
[Nn]:
|
|
1746
|
-
[Fn]:
|
|
1787
|
+
return nt(i, () => Do(t, [e, r]).subscribe(async ({ data: a, error: u, loading: f }) => {
|
|
1788
|
+
const c = u ? "https://masters.com" : a?.url, h = n.get() || "", l = e.get() || "", g = r.get() || "", v = {
|
|
1789
|
+
[Pt]: h,
|
|
1790
|
+
[Nn]: l,
|
|
1791
|
+
[Fn]: g
|
|
1747
1792
|
};
|
|
1748
1793
|
if (!f && c) {
|
|
1749
1794
|
i.setKey("loading", !0);
|
|
1750
|
-
let
|
|
1751
|
-
|
|
1752
|
-
const L = window.location.origin + window.location.pathname +
|
|
1795
|
+
let w = window.location.search, b = window.location.hash;
|
|
1796
|
+
w && b || b ? w = `?${Yr(w, v)}` : b = `#${Yr("", v)}`;
|
|
1797
|
+
const L = window.location.origin + window.location.pathname + w + b;
|
|
1753
1798
|
try {
|
|
1754
|
-
const R = await
|
|
1799
|
+
const R = await Ro(t, { web: L, mobile: c });
|
|
1755
1800
|
i.set({
|
|
1756
1801
|
data: R.data?.link,
|
|
1757
1802
|
loading: !1
|
|
@@ -1771,7 +1816,7 @@ var U;
|
|
|
1771
1816
|
(function(t) {
|
|
1772
1817
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1773
1818
|
})(U || (U = {}));
|
|
1774
|
-
const
|
|
1819
|
+
const $o = (t, e, r, n) => {
|
|
1775
1820
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1776
1821
|
i && r.add({
|
|
1777
1822
|
type: Ae.ONBOARDING,
|
|
@@ -1803,23 +1848,23 @@ const Ro = (t, e, r, n) => {
|
|
|
1803
1848
|
eventId: e.slStreamId.get() || ""
|
|
1804
1849
|
}) === U.Completed) {
|
|
1805
1850
|
t.set(U.Completed);
|
|
1806
|
-
for (const
|
|
1807
|
-
|
|
1851
|
+
for (const l of o)
|
|
1852
|
+
l();
|
|
1808
1853
|
return;
|
|
1809
1854
|
}
|
|
1810
1855
|
const u = e.moderation.getStore().value?.data, f = r.featureSettings.get().inplayGame;
|
|
1811
1856
|
if (u === void 0 || f === void 0)
|
|
1812
1857
|
return;
|
|
1813
|
-
const c = u?.options?.onboardingEnabled,
|
|
1814
|
-
c ?
|
|
1858
|
+
const c = u?.options?.onboardingEnabled, h = f?.titleCard?.optIn;
|
|
1859
|
+
c ? h ? t.set(U.Required) : t.set(U.Optional) : (h ? t.set(U.Unavailable) : t.set(U.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
|
|
1815
1860
|
} catch (s) {
|
|
1816
1861
|
console.error(s);
|
|
1817
1862
|
}
|
|
1818
|
-
},
|
|
1863
|
+
}, Mo = (t, e, r, n) => {
|
|
1819
1864
|
let i = !1;
|
|
1820
1865
|
const o = new Pn(), s = B(U.Unset);
|
|
1821
1866
|
s.subscribe((f) => {
|
|
1822
|
-
f !== U.Unset && ((f === U.Optional || f === U.Required) && i === !1 && (
|
|
1867
|
+
f !== U.Unset && ((f === U.Optional || f === U.Required) && i === !1 && ($o(t, e, n, o), i = !0), f === U.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1823
1868
|
userId: e.userId.get() || "",
|
|
1824
1869
|
organizationId: e.organizationId.get() || "",
|
|
1825
1870
|
eventId: e.slStreamId.get() || ""
|
|
@@ -1835,7 +1880,7 @@ const Ro = (t, e, r, n) => {
|
|
|
1835
1880
|
}))), { $store: s, submitInplay: async () => {
|
|
1836
1881
|
const f = e.slStreamId.get();
|
|
1837
1882
|
if (f) {
|
|
1838
|
-
await
|
|
1883
|
+
await bo(r, f), s.set(U.Completed), o.saveOnboardingStatus({
|
|
1839
1884
|
organizationId: e.organizationId.get() || "",
|
|
1840
1885
|
userId: e.userId.get() || "",
|
|
1841
1886
|
eventId: f
|
|
@@ -1847,17 +1892,17 @@ const Ro = (t, e, r, n) => {
|
|
|
1847
1892
|
n.close(c);
|
|
1848
1893
|
}
|
|
1849
1894
|
} };
|
|
1850
|
-
},
|
|
1895
|
+
}, jo = (t, e, r, n) => {
|
|
1851
1896
|
const i = te(void 0), o = kn(n), s = async () => {
|
|
1852
|
-
const u = t.get(), f = e.get(), c = r.getStore().get().data?.map((
|
|
1897
|
+
const u = t.get(), f = e.get(), c = r.getStore().get().data?.map((g) => g.slId);
|
|
1853
1898
|
if (!c)
|
|
1854
1899
|
return;
|
|
1855
|
-
const
|
|
1900
|
+
const h = {
|
|
1856
1901
|
eventId: u,
|
|
1857
1902
|
userId: f,
|
|
1858
1903
|
usersIds: [...c, f]
|
|
1859
|
-
},
|
|
1860
|
-
i.set(
|
|
1904
|
+
}, l = await o(h);
|
|
1905
|
+
i.set(l.data?.attributes);
|
|
1861
1906
|
}, a = () => {
|
|
1862
1907
|
s();
|
|
1863
1908
|
};
|
|
@@ -1867,15 +1912,15 @@ const Ro = (t, e, r, n) => {
|
|
|
1867
1912
|
u(), f(), c();
|
|
1868
1913
|
};
|
|
1869
1914
|
}), { $store: i, invalidate: a };
|
|
1870
|
-
},
|
|
1871
|
-
const o = kn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((
|
|
1915
|
+
}, Uo = async (t, e, r, n, i) => {
|
|
1916
|
+
const o = kn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((l) => l.slId) || [], f = {
|
|
1872
1917
|
eventId: s,
|
|
1873
1918
|
userId: n,
|
|
1874
1919
|
usersIds: [...u, a]
|
|
1875
1920
|
};
|
|
1876
1921
|
return (await o(f)).data?.attributes?.summary;
|
|
1877
|
-
},
|
|
1878
|
-
class
|
|
1922
|
+
}, Bo = /* @__PURE__ */ new Set([F.POLL, F.PREDICTION, F.TRIVIA]);
|
|
1923
|
+
class xo extends _n {
|
|
1879
1924
|
/** user statistics (leaderboard panel) */
|
|
1880
1925
|
userSummary;
|
|
1881
1926
|
/** feed list (pick history) */
|
|
@@ -1910,7 +1955,7 @@ class Uo extends _n {
|
|
|
1910
1955
|
submitAnswerTimeout;
|
|
1911
1956
|
cancels = /* @__PURE__ */ new Set();
|
|
1912
1957
|
constructor(e, r, n) {
|
|
1913
|
-
super(e, r), this.background = new
|
|
1958
|
+
super(e, r), this.background = new ho(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(Zi(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 = Mo(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 = Vo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = jo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Ao(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
|
|
1914
1959
|
o?.summary && i?.summary && this.leaderboardList.invalidate();
|
|
1915
1960
|
})), 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, () => {
|
|
1916
1961
|
this.background.activeQuestionId.listen(this.showInApp);
|
|
@@ -1934,22 +1979,22 @@ class Uo extends _n {
|
|
|
1934
1979
|
if (!r || !n?.attributes)
|
|
1935
1980
|
return;
|
|
1936
1981
|
const { status: i, type: o, id: s, answers: a } = r;
|
|
1937
|
-
if (i ===
|
|
1982
|
+
if (i === H.RESOLVED && o === F.PREDICTION) {
|
|
1938
1983
|
const u = this.background.getCurrentSessionId({
|
|
1939
1984
|
prefix: `notification-id:${s}`
|
|
1940
|
-
}), f = [...this.feedList.getValues().data || []], c = f.findIndex((Q) => Q.id === s),
|
|
1941
|
-
let
|
|
1942
|
-
const
|
|
1985
|
+
}), f = [...this.feedList.getValues().data || []], c = f.findIndex((Q) => Q.id === s), h = f[c];
|
|
1986
|
+
let l = h?.attributes?.attributes?.value?.answerId;
|
|
1987
|
+
const g = ar(s, this.transport), v = g.subscribe(() => {
|
|
1943
1988
|
});
|
|
1944
|
-
await
|
|
1945
|
-
const
|
|
1989
|
+
await g.get().promise;
|
|
1990
|
+
const w = g.get().data;
|
|
1946
1991
|
v(), window.requestAnimationFrame(() => {
|
|
1947
|
-
|
|
1948
|
-
}),
|
|
1949
|
-
const b = a.find(({ correct: Q }) => Q), L =
|
|
1950
|
-
if (
|
|
1992
|
+
g.invalidate();
|
|
1993
|
+
}), l || (l = w?.answers.find(({ youVoted: Q }) => Q)?.id);
|
|
1994
|
+
const b = a.find(({ correct: Q }) => Q), L = l ? a.find(({ id: Q }) => Q === l) : void 0, R = !!L?.correct;
|
|
1995
|
+
if (h && f[c]?.attributes?.attributes.case === "question") {
|
|
1951
1996
|
try {
|
|
1952
|
-
f[c].attributes.attributes.value.answerId =
|
|
1997
|
+
f[c].attributes.attributes.value.answerId = l, f[c].attributes.attributes.value.openForVoting = !1, l && (f[c].attributes.attributes.value.status = R ? lt.WON : lt.LOST);
|
|
1953
1998
|
} catch {
|
|
1954
1999
|
}
|
|
1955
2000
|
this.feedList.getStore().mutate(f);
|
|
@@ -1974,7 +2019,7 @@ class Uo extends _n {
|
|
|
1974
2019
|
},
|
|
1975
2020
|
correctAnswerTitle: b?.text,
|
|
1976
2021
|
correct: !!R,
|
|
1977
|
-
predictionResult: i ===
|
|
2022
|
+
predictionResult: i === H.RESOLVED,
|
|
1978
2023
|
questionTitle: r?.subject
|
|
1979
2024
|
}
|
|
1980
2025
|
}
|
|
@@ -1982,7 +2027,7 @@ class Uo extends _n {
|
|
|
1982
2027
|
}
|
|
1983
2028
|
})), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (e) => {
|
|
1984
2029
|
const r = [...this.feedList.getStore().value?.data || []], n = e.data?.attributes?.feedItem, i = r.findIndex((o) => o.id === n?.id);
|
|
1985
|
-
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !==
|
|
2030
|
+
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== H.ACTIVE && n.attributes.status !== H.RESOLVED)) {
|
|
1986
2031
|
if (i !== -1)
|
|
1987
2032
|
if (n.attributes.attributes.case === "question" && r[i].attributes?.attributes.case === "question") {
|
|
1988
2033
|
const o = r[i];
|
|
@@ -2048,7 +2093,7 @@ class Uo extends _n {
|
|
|
2048
2093
|
const a = this.feedList.getValues().data;
|
|
2049
2094
|
if (!a)
|
|
2050
2095
|
return;
|
|
2051
|
-
const u = a.findIndex((
|
|
2096
|
+
const u = a.findIndex((h) => h.id === e), f = a[u], c = f?.attributes?.attributes.case === "question" && f.attributes.attributes.value;
|
|
2052
2097
|
if (c) {
|
|
2053
2098
|
J.emit("poll", {
|
|
2054
2099
|
action: "voted",
|
|
@@ -2057,12 +2102,12 @@ class Uo extends _n {
|
|
|
2057
2102
|
questionType: c.questionType
|
|
2058
2103
|
}
|
|
2059
2104
|
});
|
|
2060
|
-
const
|
|
2061
|
-
if (i(),
|
|
2062
|
-
const
|
|
2063
|
-
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = v?.text || "",
|
|
2105
|
+
const h = n.get().data;
|
|
2106
|
+
if (i(), h) {
|
|
2107
|
+
const l = h.answers.find((b) => b.correct === !0), g = h.answers.findIndex((b) => b.id === r), v = h.answers[g], w = h.answers.every(({ percentageDecimal: b }, L) => b === o?.answers[L].percentageDecimal);
|
|
2108
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = v?.text || "", l && (a[u].attributes.attributes.value.status = l.id === r ? lt.WON : lt.LOST), this.feedList.getStore().mutate([...a]), h.answers[g].correct = l?.id === r, h.answers[g].youVoted = !0, w && h.answers.forEach((b) => {
|
|
2064
2109
|
b.percentageDecimal = 0;
|
|
2065
|
-
}),
|
|
2110
|
+
}), l?.id === r && (h.answers[g].pointsEarned = h.status === H.RESOLVED ? 0 : l.points), n.mutate({ ...h });
|
|
2066
2111
|
}
|
|
2067
2112
|
this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
|
|
2068
2113
|
this.userSummary.invalidate();
|
|
@@ -2070,7 +2115,7 @@ class Uo extends _n {
|
|
|
2070
2115
|
}
|
|
2071
2116
|
};
|
|
2072
2117
|
try {
|
|
2073
|
-
await
|
|
2118
|
+
await vo(this.transport, { questionId: e, answerId: r }), s();
|
|
2074
2119
|
} catch (a) {
|
|
2075
2120
|
if (a.message === rt.ALREADY_VOTED) {
|
|
2076
2121
|
this.userSummary.invalidate();
|
|
@@ -2101,6 +2146,7 @@ class Uo extends _n {
|
|
|
2101
2146
|
}
|
|
2102
2147
|
}), this.background.openQuestion(e, r);
|
|
2103
2148
|
};
|
|
2149
|
+
getFeedItem = (e) => ro(e, this.transport);
|
|
2104
2150
|
isOpenedQuestion = (e) => this.notifications.isViewed(e);
|
|
2105
2151
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
2106
2152
|
openUser = async (e) => {
|
|
@@ -2115,7 +2161,7 @@ class Uo extends _n {
|
|
|
2115
2161
|
}
|
|
2116
2162
|
const n = { ...r };
|
|
2117
2163
|
try {
|
|
2118
|
-
const i = await
|
|
2164
|
+
const i = await Uo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
2119
2165
|
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);
|
|
2120
2166
|
} catch (i) {
|
|
2121
2167
|
console.error(i);
|
|
@@ -2133,8 +2179,8 @@ class Uo extends _n {
|
|
|
2133
2179
|
*/
|
|
2134
2180
|
showInApp = (e) => {
|
|
2135
2181
|
const r = this.onboardingStatus.$store.get();
|
|
2136
|
-
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 !== yi.ON && e.data.question.status ===
|
|
2137
|
-
if (
|
|
2182
|
+
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== yi.ON && e.data.question.status === H.ACTIVE && !e.data.question.marketClosed) {
|
|
2183
|
+
if (Bo.has(e.data.question.type))
|
|
2138
2184
|
this.isInteractiveAllowed && this.notifications.add({
|
|
2139
2185
|
type: Ae.QUESTION,
|
|
2140
2186
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
@@ -2209,15 +2255,15 @@ class Uo extends _n {
|
|
|
2209
2255
|
}
|
|
2210
2256
|
};
|
|
2211
2257
|
}
|
|
2212
|
-
const
|
|
2258
|
+
const qo = {
|
|
2213
2259
|
[D.GAMES]: !0
|
|
2214
2260
|
};
|
|
2215
|
-
class
|
|
2261
|
+
class Qo extends _n {
|
|
2216
2262
|
constructor(e, r) {
|
|
2217
2263
|
super(e, r);
|
|
2218
2264
|
}
|
|
2219
2265
|
}
|
|
2220
|
-
const
|
|
2266
|
+
const Go = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Qo(t, e), Ko = (t, e, r) => {
|
|
2221
2267
|
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) => {
|
|
2222
2268
|
t.activeFeature.setValue(n);
|
|
2223
2269
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
@@ -2228,8 +2274,8 @@ const qo = (t, e, r) => t.type === D.GAMES ? new Uo(t, e, r) : new xo(t, e), Qo
|
|
|
2228
2274
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
2229
2275
|
}
|
|
2230
2276
|
}, t.initFeature = (n, i = ye.ORGANIZATION) => {
|
|
2231
|
-
if (n.type in
|
|
2232
|
-
const o =
|
|
2277
|
+
if (n.type in qo && !t.features.has(n.type)) {
|
|
2278
|
+
const o = Go(n, i, t);
|
|
2233
2279
|
t.features.set(n.type, o);
|
|
2234
2280
|
let s = t.sdk.featuresList.getValue();
|
|
2235
2281
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2282,7 +2328,7 @@ const qo = (t, e, r) => t.type === D.GAMES ? new Uo(t, e, r) : new xo(t, e), Qo
|
|
|
2282
2328
|
t.store.subscribe(i);
|
|
2283
2329
|
}, r();
|
|
2284
2330
|
};
|
|
2285
|
-
class
|
|
2331
|
+
class zo {
|
|
2286
2332
|
analytics;
|
|
2287
2333
|
constructor(e) {
|
|
2288
2334
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2318,7 +2364,7 @@ class Go {
|
|
|
2318
2364
|
});
|
|
2319
2365
|
};
|
|
2320
2366
|
}
|
|
2321
|
-
class
|
|
2367
|
+
class Ho {
|
|
2322
2368
|
analytics;
|
|
2323
2369
|
constructor(e) {
|
|
2324
2370
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2355,7 +2401,7 @@ class Ko {
|
|
|
2355
2401
|
});
|
|
2356
2402
|
};
|
|
2357
2403
|
}
|
|
2358
|
-
const
|
|
2404
|
+
const Wo = {
|
|
2359
2405
|
[Te.UNSET]: we.UNSET,
|
|
2360
2406
|
[Te.INGAME_IAB21]: we.PROMOTION_INGAME_IAB21,
|
|
2361
2407
|
[Te.INGAME_IAB11_LBAR]: we.PROMOTION_INGAME_IAB11_LBAR,
|
|
@@ -2364,13 +2410,13 @@ const zo = {
|
|
|
2364
2410
|
[Te.INGAME_IAB61]: we.PROMOTION_INGAME_IAB61,
|
|
2365
2411
|
[Te.EXTERNAL_AD]: we.PROMOTION_GAM
|
|
2366
2412
|
};
|
|
2367
|
-
class
|
|
2413
|
+
class Yo {
|
|
2368
2414
|
analytics;
|
|
2369
2415
|
constructor(e) {
|
|
2370
2416
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
2371
2417
|
const r = (n) => {
|
|
2372
2418
|
if (n.slEventBus?.type === "advertisement") {
|
|
2373
|
-
const i = n.slEventBus.payload.advertisementType ?
|
|
2419
|
+
const i = n.slEventBus.payload.advertisementType ? Wo[n.slEventBus.payload.advertisementType] : we.UNSET;
|
|
2374
2420
|
switch (n.slEventBus.action) {
|
|
2375
2421
|
case "videoPlay":
|
|
2376
2422
|
this.videoPlay(n.slEventBus.payload, { topicSubType: i });
|
|
@@ -2461,7 +2507,7 @@ const Ze = {
|
|
|
2461
2507
|
[F.TWEET]: z.POLLS_TWITTER
|
|
2462
2508
|
};
|
|
2463
2509
|
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;
|
|
2464
|
-
const
|
|
2510
|
+
const Jo = {
|
|
2465
2511
|
[D.UNSET]: G.UNSET,
|
|
2466
2512
|
[D.INPLAY]: G.INPLAY,
|
|
2467
2513
|
[D.MESSAGING]: G.MESSAGING,
|
|
@@ -2481,7 +2527,7 @@ const Wo = {
|
|
|
2481
2527
|
[D.HIGHLIGHTS]: G.HIGHLIGHTS,
|
|
2482
2528
|
[D.PUBLIC_CHAT]: G.PUBLIC_CHAT
|
|
2483
2529
|
};
|
|
2484
|
-
class
|
|
2530
|
+
class Xo {
|
|
2485
2531
|
analytics;
|
|
2486
2532
|
constructor(e) {
|
|
2487
2533
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2524,7 +2570,7 @@ class Yo {
|
|
|
2524
2570
|
});
|
|
2525
2571
|
};
|
|
2526
2572
|
}
|
|
2527
|
-
class
|
|
2573
|
+
class Zo {
|
|
2528
2574
|
analytics;
|
|
2529
2575
|
constructor(e) {
|
|
2530
2576
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2608,28 +2654,28 @@ class Jo {
|
|
|
2608
2654
|
});
|
|
2609
2655
|
};
|
|
2610
2656
|
}
|
|
2611
|
-
const
|
|
2657
|
+
const es = ({ transport: t, $commonStore: e }) => {
|
|
2612
2658
|
let r;
|
|
2613
2659
|
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(An, {
|
|
2614
2660
|
method: "send",
|
|
2615
2661
|
params: [n]
|
|
2616
2662
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
2617
2663
|
fetcher: async () => {
|
|
2618
|
-
const
|
|
2664
|
+
const l = e.getStore().get();
|
|
2619
2665
|
try {
|
|
2620
2666
|
await o.unary({
|
|
2621
2667
|
message: {
|
|
2622
2668
|
case: "heartbeat",
|
|
2623
2669
|
value: {
|
|
2624
2670
|
common: {
|
|
2625
|
-
...
|
|
2671
|
+
...l,
|
|
2626
2672
|
kind: q.SESSION_HEARTBEAT
|
|
2627
2673
|
}
|
|
2628
2674
|
}
|
|
2629
2675
|
}
|
|
2630
2676
|
});
|
|
2631
|
-
} catch (
|
|
2632
|
-
me.error(
|
|
2677
|
+
} catch (g) {
|
|
2678
|
+
me.error(g, "send heartbeat failed");
|
|
2633
2679
|
}
|
|
2634
2680
|
return Date.now();
|
|
2635
2681
|
},
|
|
@@ -2646,7 +2692,7 @@ const Xo = ({ transport: t, $commonStore: e }) => {
|
|
|
2646
2692
|
me.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2647
2693
|
} };
|
|
2648
2694
|
}, me = le("analytics");
|
|
2649
|
-
class
|
|
2695
|
+
class ts {
|
|
2650
2696
|
commonStore;
|
|
2651
2697
|
notifications;
|
|
2652
2698
|
polls;
|
|
@@ -2659,7 +2705,7 @@ class Zo {
|
|
|
2659
2705
|
listenersCancels;
|
|
2660
2706
|
connected = !1;
|
|
2661
2707
|
constructor(e) {
|
|
2662
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(te({}), "common-analytics"), this.connectToSDK(e), this.heartbeat =
|
|
2708
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(te({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = es({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Xo(this), this.polls = new Zo(this), this.invitation = new zo(this), this.interactions = new Ho(this), this.advertisement = new Yo(this);
|
|
2663
2709
|
const { client: r } = e.analyticsTransport.createPromiseClient(An, {
|
|
2664
2710
|
method: "send"
|
|
2665
2711
|
});
|
|
@@ -2689,7 +2735,7 @@ class Zo {
|
|
|
2689
2735
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2690
2736
|
this.writeCommon("eventId", r);
|
|
2691
2737
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2692
|
-
r && this.writeCommon("category",
|
|
2738
|
+
r && this.writeCommon("category", Jo[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", nr()) : this.writeCommon("overlaySessionId", "");
|
|
2693
2739
|
})), this.onConnect(() => {
|
|
2694
2740
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2695
2741
|
this.writeCommon("screenOrientation", i.matches ? Br.PORTRAIT : Br.LANDSCAPE);
|
|
@@ -2702,17 +2748,17 @@ class Zo {
|
|
|
2702
2748
|
}));
|
|
2703
2749
|
};
|
|
2704
2750
|
}
|
|
2705
|
-
const
|
|
2706
|
-
t.analytics = new
|
|
2751
|
+
const rs = (t, e, r) => {
|
|
2752
|
+
t.analytics = new ts(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
2707
2753
|
t.analytics.disconnect();
|
|
2708
2754
|
})), r();
|
|
2709
2755
|
};
|
|
2710
2756
|
var br = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2711
|
-
function
|
|
2757
|
+
function ns(t) {
|
|
2712
2758
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2713
2759
|
}
|
|
2714
2760
|
var Sr = { exports: {} }, wr = { exports: {} };
|
|
2715
|
-
function
|
|
2761
|
+
function is(t) {
|
|
2716
2762
|
var e = new t(), r = e;
|
|
2717
2763
|
function n() {
|
|
2718
2764
|
var o = e;
|
|
@@ -2726,14 +2772,14 @@ function rs(t) {
|
|
|
2726
2772
|
release: i
|
|
2727
2773
|
};
|
|
2728
2774
|
}
|
|
2729
|
-
var
|
|
2775
|
+
var os = is, ss = os;
|
|
2730
2776
|
function Dn(t, e, r) {
|
|
2731
2777
|
if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
|
|
2732
2778
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2733
|
-
var n =
|
|
2734
|
-
push:
|
|
2735
|
-
drain:
|
|
2736
|
-
saturated:
|
|
2779
|
+
var n = ss(as), i = null, o = null, s = 0, a = null, u = {
|
|
2780
|
+
push: w,
|
|
2781
|
+
drain: W,
|
|
2782
|
+
saturated: W,
|
|
2737
2783
|
pause: c,
|
|
2738
2784
|
paused: !1,
|
|
2739
2785
|
get concurrency() {
|
|
@@ -2747,12 +2793,12 @@ function Dn(t, e, r) {
|
|
|
2747
2793
|
s++, L();
|
|
2748
2794
|
},
|
|
2749
2795
|
running: f,
|
|
2750
|
-
resume:
|
|
2796
|
+
resume: g,
|
|
2751
2797
|
idle: v,
|
|
2752
|
-
length:
|
|
2753
|
-
getQueue:
|
|
2798
|
+
length: h,
|
|
2799
|
+
getQueue: l,
|
|
2754
2800
|
unshift: b,
|
|
2755
|
-
empty:
|
|
2801
|
+
empty: W,
|
|
2756
2802
|
kill: R,
|
|
2757
2803
|
killAndDrain: Q,
|
|
2758
2804
|
error: X
|
|
@@ -2764,17 +2810,17 @@ function Dn(t, e, r) {
|
|
|
2764
2810
|
function c() {
|
|
2765
2811
|
u.paused = !0;
|
|
2766
2812
|
}
|
|
2767
|
-
function l() {
|
|
2768
|
-
for (var k = i, $ = 0; k; )
|
|
2769
|
-
k = k.next, $++;
|
|
2770
|
-
return $;
|
|
2771
|
-
}
|
|
2772
2813
|
function h() {
|
|
2773
|
-
for (var k = i,
|
|
2774
|
-
|
|
2775
|
-
return
|
|
2814
|
+
for (var k = i, V = 0; k; )
|
|
2815
|
+
k = k.next, V++;
|
|
2816
|
+
return V;
|
|
2776
2817
|
}
|
|
2777
|
-
function
|
|
2818
|
+
function l() {
|
|
2819
|
+
for (var k = i, V = []; k; )
|
|
2820
|
+
V.push(k.value), k = k.next;
|
|
2821
|
+
return V;
|
|
2822
|
+
}
|
|
2823
|
+
function g() {
|
|
2778
2824
|
if (u.paused) {
|
|
2779
2825
|
if (u.paused = !1, i === null) {
|
|
2780
2826
|
s++, L();
|
|
@@ -2787,87 +2833,87 @@ function Dn(t, e, r) {
|
|
|
2787
2833
|
function v() {
|
|
2788
2834
|
return s === 0 && u.length() === 0;
|
|
2789
2835
|
}
|
|
2790
|
-
function
|
|
2836
|
+
function w(k, V) {
|
|
2791
2837
|
var T = n.get();
|
|
2792
|
-
T.context = t, T.release = L, T.value = k, T.callback =
|
|
2838
|
+
T.context = t, T.release = L, T.value = k, T.callback = V || W, T.errorHandler = a, s >= r || u.paused ? o ? (o.next = T, o = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2793
2839
|
}
|
|
2794
|
-
function b(k,
|
|
2840
|
+
function b(k, V) {
|
|
2795
2841
|
var T = n.get();
|
|
2796
|
-
T.context = t, T.release = L, T.value = k, T.callback =
|
|
2842
|
+
T.context = t, T.release = L, T.value = k, T.callback = V || W, T.errorHandler = a, s >= r || u.paused ? i ? (T.next = i, i = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2797
2843
|
}
|
|
2798
2844
|
function L(k) {
|
|
2799
2845
|
k && n.release(k);
|
|
2800
|
-
var
|
|
2801
|
-
|
|
2846
|
+
var V = i;
|
|
2847
|
+
V && s <= r ? u.paused ? s-- : (o === i && (o = null), i = V.next, V.next = null, e.call(t, V.value, V.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
2802
2848
|
}
|
|
2803
2849
|
function R() {
|
|
2804
|
-
i = null, o = null, u.drain =
|
|
2850
|
+
i = null, o = null, u.drain = W;
|
|
2805
2851
|
}
|
|
2806
2852
|
function Q() {
|
|
2807
|
-
i = null, o = null, u.drain(), u.drain =
|
|
2853
|
+
i = null, o = null, u.drain(), u.drain = W;
|
|
2808
2854
|
}
|
|
2809
2855
|
function X(k) {
|
|
2810
2856
|
a = k;
|
|
2811
2857
|
}
|
|
2812
2858
|
}
|
|
2813
|
-
function
|
|
2859
|
+
function W() {
|
|
2814
2860
|
}
|
|
2815
|
-
function
|
|
2816
|
-
this.value = null, this.callback =
|
|
2861
|
+
function as() {
|
|
2862
|
+
this.value = null, this.callback = W, this.next = null, this.release = W, this.context = null, this.errorHandler = null;
|
|
2817
2863
|
var t = this;
|
|
2818
2864
|
this.worked = function(r, n) {
|
|
2819
2865
|
var i = t.callback, o = t.errorHandler, s = t.value;
|
|
2820
|
-
t.value = null, t.callback =
|
|
2866
|
+
t.value = null, t.callback = W, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
2821
2867
|
};
|
|
2822
2868
|
}
|
|
2823
|
-
function
|
|
2869
|
+
function us(t, e, r) {
|
|
2824
2870
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2825
|
-
function n(c,
|
|
2826
|
-
e.call(this, c).then(function(
|
|
2827
|
-
|
|
2828
|
-
},
|
|
2871
|
+
function n(c, h) {
|
|
2872
|
+
e.call(this, c).then(function(l) {
|
|
2873
|
+
h(null, l);
|
|
2874
|
+
}, h);
|
|
2829
2875
|
}
|
|
2830
2876
|
var i = Dn(t, n, r), o = i.push, s = i.unshift;
|
|
2831
2877
|
return i.push = a, i.unshift = u, i.drained = f, i;
|
|
2832
2878
|
function a(c) {
|
|
2833
|
-
var
|
|
2834
|
-
o(c, function(v,
|
|
2879
|
+
var h = new Promise(function(l, g) {
|
|
2880
|
+
o(c, function(v, w) {
|
|
2835
2881
|
if (v) {
|
|
2836
|
-
|
|
2882
|
+
g(v);
|
|
2837
2883
|
return;
|
|
2838
2884
|
}
|
|
2839
|
-
|
|
2885
|
+
l(w);
|
|
2840
2886
|
});
|
|
2841
2887
|
});
|
|
2842
|
-
return
|
|
2888
|
+
return h.catch(W), h;
|
|
2843
2889
|
}
|
|
2844
2890
|
function u(c) {
|
|
2845
|
-
var
|
|
2846
|
-
s(c, function(v,
|
|
2891
|
+
var h = new Promise(function(l, g) {
|
|
2892
|
+
s(c, function(v, w) {
|
|
2847
2893
|
if (v) {
|
|
2848
|
-
|
|
2894
|
+
g(v);
|
|
2849
2895
|
return;
|
|
2850
2896
|
}
|
|
2851
|
-
|
|
2897
|
+
l(w);
|
|
2852
2898
|
});
|
|
2853
2899
|
});
|
|
2854
|
-
return
|
|
2900
|
+
return h.catch(W), h;
|
|
2855
2901
|
}
|
|
2856
2902
|
function f() {
|
|
2857
2903
|
if (i.idle())
|
|
2858
|
-
return new Promise(function(
|
|
2859
|
-
|
|
2904
|
+
return new Promise(function(l) {
|
|
2905
|
+
l();
|
|
2860
2906
|
});
|
|
2861
|
-
var c = i.drain,
|
|
2907
|
+
var c = i.drain, h = new Promise(function(l) {
|
|
2862
2908
|
i.drain = function() {
|
|
2863
|
-
c(),
|
|
2909
|
+
c(), l();
|
|
2864
2910
|
};
|
|
2865
2911
|
});
|
|
2866
|
-
return
|
|
2912
|
+
return h;
|
|
2867
2913
|
}
|
|
2868
2914
|
}
|
|
2869
2915
|
wr.exports = Dn;
|
|
2870
|
-
wr.exports.promise =
|
|
2916
|
+
wr.exports.promise = us;
|
|
2871
2917
|
var Rn = wr.exports, Ar = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, Jr = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
|
|
2872
2918
|
return Function.prototype.apply.call(e, r, n);
|
|
2873
2919
|
}, pt;
|
|
@@ -2876,17 +2922,17 @@ Qe && typeof Qe.ownKeys == "function" ? pt = Qe.ownKeys : Object.getOwnPropertyS
|
|
|
2876
2922
|
} : pt = function(e) {
|
|
2877
2923
|
return Object.getOwnPropertyNames(e);
|
|
2878
2924
|
};
|
|
2879
|
-
function
|
|
2925
|
+
function cs(t) {
|
|
2880
2926
|
console && console.warn && console.warn(t);
|
|
2881
2927
|
}
|
|
2882
|
-
var
|
|
2928
|
+
var Vn = Number.isNaN || function(e) {
|
|
2883
2929
|
return e !== e;
|
|
2884
2930
|
};
|
|
2885
2931
|
function P() {
|
|
2886
2932
|
P.init.call(this);
|
|
2887
2933
|
}
|
|
2888
2934
|
Ar.exports = P;
|
|
2889
|
-
Ar.exports.once =
|
|
2935
|
+
Ar.exports.once = hs;
|
|
2890
2936
|
P.EventEmitter = P;
|
|
2891
2937
|
P.prototype._events = void 0;
|
|
2892
2938
|
P.prototype._eventsCount = 0;
|
|
@@ -2902,7 +2948,7 @@ Object.defineProperty(P, "defaultMaxListeners", {
|
|
|
2902
2948
|
return Xr;
|
|
2903
2949
|
},
|
|
2904
2950
|
set: function(t) {
|
|
2905
|
-
if (typeof t != "number" || t < 0 ||
|
|
2951
|
+
if (typeof t != "number" || t < 0 || Vn(t))
|
|
2906
2952
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2907
2953
|
Xr = t;
|
|
2908
2954
|
}
|
|
@@ -2911,15 +2957,15 @@ P.init = function() {
|
|
|
2911
2957
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2912
2958
|
};
|
|
2913
2959
|
P.prototype.setMaxListeners = function(e) {
|
|
2914
|
-
if (typeof e != "number" || e < 0 ||
|
|
2960
|
+
if (typeof e != "number" || e < 0 || Vn(e))
|
|
2915
2961
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2916
2962
|
return this._maxListeners = e, this;
|
|
2917
2963
|
};
|
|
2918
|
-
function
|
|
2964
|
+
function $n(t) {
|
|
2919
2965
|
return t._maxListeners === void 0 ? P.defaultMaxListeners : t._maxListeners;
|
|
2920
2966
|
}
|
|
2921
2967
|
P.prototype.getMaxListeners = function() {
|
|
2922
|
-
return
|
|
2968
|
+
return $n(this);
|
|
2923
2969
|
};
|
|
2924
2970
|
P.prototype.emit = function(e) {
|
|
2925
2971
|
for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
|
|
@@ -2953,10 +2999,10 @@ function Mn(t, e, r, n) {
|
|
|
2953
2999
|
r.listener ? r.listener : r
|
|
2954
3000
|
), o = t._events), s = o[e]), s === void 0)
|
|
2955
3001
|
s = o[e] = r, ++t._eventsCount;
|
|
2956
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
3002
|
+
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) {
|
|
2957
3003
|
s.warned = !0;
|
|
2958
3004
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2959
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
3005
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, cs(a);
|
|
2960
3006
|
}
|
|
2961
3007
|
return t;
|
|
2962
3008
|
}
|
|
@@ -2967,12 +3013,12 @@ P.prototype.on = P.prototype.addListener;
|
|
|
2967
3013
|
P.prototype.prependListener = function(e, r) {
|
|
2968
3014
|
return Mn(this, e, r, !0);
|
|
2969
3015
|
};
|
|
2970
|
-
function
|
|
3016
|
+
function ls() {
|
|
2971
3017
|
if (!this.fired)
|
|
2972
3018
|
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);
|
|
2973
3019
|
}
|
|
2974
3020
|
function jn(t, e, r) {
|
|
2975
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
3021
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = ls.bind(n);
|
|
2976
3022
|
return i.listener = r, n.wrapFn = i, i;
|
|
2977
3023
|
}
|
|
2978
3024
|
P.prototype.once = function(e, r) {
|
|
@@ -2997,7 +3043,7 @@ P.prototype.removeListener = function(e, r) {
|
|
|
2997
3043
|
}
|
|
2998
3044
|
if (o < 0)
|
|
2999
3045
|
return this;
|
|
3000
|
-
o === 0 ? n.shift() :
|
|
3046
|
+
o === 0 ? n.shift() : ds(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
3001
3047
|
}
|
|
3002
3048
|
return this;
|
|
3003
3049
|
};
|
|
@@ -3026,7 +3072,7 @@ function Un(t, e, r) {
|
|
|
3026
3072
|
if (n === void 0)
|
|
3027
3073
|
return [];
|
|
3028
3074
|
var i = n[e];
|
|
3029
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
3075
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? fs(i) : xn(i, i.length);
|
|
3030
3076
|
}
|
|
3031
3077
|
P.prototype.listeners = function(e) {
|
|
3032
3078
|
return Un(this, e, !0);
|
|
@@ -3057,17 +3103,17 @@ function xn(t, e) {
|
|
|
3057
3103
|
r[n] = t[n];
|
|
3058
3104
|
return r;
|
|
3059
3105
|
}
|
|
3060
|
-
function
|
|
3106
|
+
function ds(t, e) {
|
|
3061
3107
|
for (; e + 1 < t.length; e++)
|
|
3062
3108
|
t[e] = t[e + 1];
|
|
3063
3109
|
t.pop();
|
|
3064
3110
|
}
|
|
3065
|
-
function
|
|
3111
|
+
function fs(t) {
|
|
3066
3112
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3067
3113
|
e[r] = t[r].listener || t[r];
|
|
3068
3114
|
return e;
|
|
3069
3115
|
}
|
|
3070
|
-
function
|
|
3116
|
+
function hs(t, e) {
|
|
3071
3117
|
return new Promise(function(r, n) {
|
|
3072
3118
|
function i(s) {
|
|
3073
3119
|
t.removeListener(e, o), n(s);
|
|
@@ -3075,10 +3121,10 @@ function ds(t, e) {
|
|
|
3075
3121
|
function o() {
|
|
3076
3122
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
3077
3123
|
}
|
|
3078
|
-
qn(t, e, o, { once: !0 }), e !== "error" &&
|
|
3124
|
+
qn(t, e, o, { once: !0 }), e !== "error" && ps(t, i, { once: !0 });
|
|
3079
3125
|
});
|
|
3080
3126
|
}
|
|
3081
|
-
function
|
|
3127
|
+
function ps(t, e, r) {
|
|
3082
3128
|
typeof t.on == "function" && qn(t, "error", e, r);
|
|
3083
3129
|
}
|
|
3084
3130
|
function qn(t, e, r, n) {
|
|
@@ -3114,34 +3160,34 @@ var Qn = Ar.exports, Ft = {}, Gn = {}, Kn = function() {
|
|
|
3114
3160
|
return !1;
|
|
3115
3161
|
}
|
|
3116
3162
|
return !0;
|
|
3117
|
-
},
|
|
3118
|
-
return
|
|
3119
|
-
},
|
|
3120
|
-
return typeof Zr != "function" || typeof Symbol != "function" || typeof Zr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3163
|
+
}, ys = Kn, Dt = function() {
|
|
3164
|
+
return ys() && !!Symbol.toStringTag;
|
|
3165
|
+
}, gs = Error, ms = EvalError, vs = RangeError, bs = ReferenceError, zn = SyntaxError, Rt = TypeError, Ss = URIError, Zr = typeof Symbol < "u" && Symbol, ws = Kn, As = function() {
|
|
3166
|
+
return typeof Zr != "function" || typeof Symbol != "function" || typeof Zr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ws();
|
|
3121
3167
|
}, Ut = {
|
|
3122
3168
|
__proto__: null,
|
|
3123
3169
|
foo: {}
|
|
3124
|
-
},
|
|
3125
|
-
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof
|
|
3126
|
-
},
|
|
3170
|
+
}, Es = Object, Is = function() {
|
|
3171
|
+
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof Es);
|
|
3172
|
+
}, Ts = "Function.prototype.bind called on incompatible ", Os = Object.prototype.toString, _s = Math.max, Ls = "[object Function]", en = function(e, r) {
|
|
3127
3173
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3128
3174
|
n[i] = e[i];
|
|
3129
3175
|
for (var o = 0; o < r.length; o += 1)
|
|
3130
3176
|
n[o + e.length] = r[o];
|
|
3131
3177
|
return n;
|
|
3132
|
-
},
|
|
3178
|
+
}, Cs = function(e, r) {
|
|
3133
3179
|
for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
|
|
3134
3180
|
n[o] = e[i];
|
|
3135
3181
|
return n;
|
|
3136
|
-
},
|
|
3182
|
+
}, ks = function(t, e) {
|
|
3137
3183
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
3138
3184
|
r += t[n], n + 1 < t.length && (r += e);
|
|
3139
3185
|
return r;
|
|
3140
|
-
},
|
|
3186
|
+
}, Ps = function(e) {
|
|
3141
3187
|
var r = this;
|
|
3142
|
-
if (typeof r != "function" ||
|
|
3143
|
-
throw new TypeError(
|
|
3144
|
-
for (var n =
|
|
3188
|
+
if (typeof r != "function" || Os.apply(r) !== Ls)
|
|
3189
|
+
throw new TypeError(Ts + r);
|
|
3190
|
+
for (var n = Cs(arguments, 1), i, o = function() {
|
|
3145
3191
|
if (this instanceof i) {
|
|
3146
3192
|
var c = r.apply(
|
|
3147
3193
|
this,
|
|
@@ -3153,15 +3199,15 @@ var Qn = Ar.exports, Ft = {}, Gn = {}, Kn = function() {
|
|
|
3153
3199
|
e,
|
|
3154
3200
|
en(n, arguments)
|
|
3155
3201
|
);
|
|
3156
|
-
}, s =
|
|
3202
|
+
}, s = _s(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3157
3203
|
a[u] = "$" + u;
|
|
3158
|
-
if (i = Function("binder", "return function (" +
|
|
3204
|
+
if (i = Function("binder", "return function (" + ks(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
3159
3205
|
var f = function() {
|
|
3160
3206
|
};
|
|
3161
3207
|
f.prototype = r.prototype, i.prototype = new f(), f.prototype = null;
|
|
3162
3208
|
}
|
|
3163
3209
|
return i;
|
|
3164
|
-
},
|
|
3210
|
+
}, Ns = Ps, Er = Function.prototype.bind || Ns, Fs = Function.prototype.call, Ds = Object.prototype.hasOwnProperty, Rs = Er, Vs = Rs.call(Fs, Ds), I, $s = gs, Ms = ms, js = vs, Us = bs, Ke = zn, Ge = Rt, Bs = Ss, Hn = Function, Bt = function(t) {
|
|
3165
3211
|
try {
|
|
3166
3212
|
return Hn('"use strict"; return (' + t + ").constructor;")();
|
|
3167
3213
|
} catch {
|
|
@@ -3175,7 +3221,7 @@ if (ke)
|
|
|
3175
3221
|
}
|
|
3176
3222
|
var xt = function() {
|
|
3177
3223
|
throw new Ge();
|
|
3178
|
-
},
|
|
3224
|
+
}, xs = ke ? function() {
|
|
3179
3225
|
try {
|
|
3180
3226
|
return arguments.callee, xt;
|
|
3181
3227
|
} catch {
|
|
@@ -3185,86 +3231,86 @@ var xt = function() {
|
|
|
3185
3231
|
return xt;
|
|
3186
3232
|
}
|
|
3187
3233
|
}
|
|
3188
|
-
}() : xt,
|
|
3234
|
+
}() : xt, $e = As(), qs = Is(), M = Object.getPrototypeOf || (qs ? function(t) {
|
|
3189
3235
|
return t.__proto__;
|
|
3190
|
-
} : null), je = {},
|
|
3236
|
+
} : null), je = {}, Qs = typeof Uint8Array > "u" || !M ? I : M(Uint8Array), Pe = {
|
|
3191
3237
|
__proto__: null,
|
|
3192
|
-
"%AggregateError%": typeof AggregateError > "u" ?
|
|
3238
|
+
"%AggregateError%": typeof AggregateError > "u" ? I : AggregateError,
|
|
3193
3239
|
"%Array%": Array,
|
|
3194
|
-
"%ArrayBuffer%": typeof ArrayBuffer > "u" ?
|
|
3195
|
-
"%ArrayIteratorPrototype%":
|
|
3196
|
-
"%AsyncFromSyncIteratorPrototype%":
|
|
3240
|
+
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? I : ArrayBuffer,
|
|
3241
|
+
"%ArrayIteratorPrototype%": $e && M ? M([][Symbol.iterator]()) : I,
|
|
3242
|
+
"%AsyncFromSyncIteratorPrototype%": I,
|
|
3197
3243
|
"%AsyncFunction%": je,
|
|
3198
3244
|
"%AsyncGenerator%": je,
|
|
3199
3245
|
"%AsyncGeneratorFunction%": je,
|
|
3200
3246
|
"%AsyncIteratorPrototype%": je,
|
|
3201
|
-
"%Atomics%": typeof Atomics > "u" ?
|
|
3202
|
-
"%BigInt%": typeof BigInt > "u" ?
|
|
3203
|
-
"%BigInt64Array%": typeof BigInt64Array > "u" ?
|
|
3204
|
-
"%BigUint64Array%": typeof BigUint64Array > "u" ?
|
|
3247
|
+
"%Atomics%": typeof Atomics > "u" ? I : Atomics,
|
|
3248
|
+
"%BigInt%": typeof BigInt > "u" ? I : BigInt,
|
|
3249
|
+
"%BigInt64Array%": typeof BigInt64Array > "u" ? I : BigInt64Array,
|
|
3250
|
+
"%BigUint64Array%": typeof BigUint64Array > "u" ? I : BigUint64Array,
|
|
3205
3251
|
"%Boolean%": Boolean,
|
|
3206
|
-
"%DataView%": typeof DataView > "u" ?
|
|
3252
|
+
"%DataView%": typeof DataView > "u" ? I : DataView,
|
|
3207
3253
|
"%Date%": Date,
|
|
3208
3254
|
"%decodeURI%": decodeURI,
|
|
3209
3255
|
"%decodeURIComponent%": decodeURIComponent,
|
|
3210
3256
|
"%encodeURI%": encodeURI,
|
|
3211
3257
|
"%encodeURIComponent%": encodeURIComponent,
|
|
3212
|
-
"%Error%":
|
|
3258
|
+
"%Error%": $s,
|
|
3213
3259
|
"%eval%": eval,
|
|
3214
3260
|
// eslint-disable-line no-eval
|
|
3215
|
-
"%EvalError%":
|
|
3216
|
-
"%Float32Array%": typeof Float32Array > "u" ?
|
|
3217
|
-
"%Float64Array%": typeof Float64Array > "u" ?
|
|
3218
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ?
|
|
3261
|
+
"%EvalError%": Ms,
|
|
3262
|
+
"%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
|
|
3263
|
+
"%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
|
|
3264
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
|
|
3219
3265
|
"%Function%": Hn,
|
|
3220
3266
|
"%GeneratorFunction%": je,
|
|
3221
|
-
"%Int8Array%": typeof Int8Array > "u" ?
|
|
3222
|
-
"%Int16Array%": typeof Int16Array > "u" ?
|
|
3223
|
-
"%Int32Array%": typeof Int32Array > "u" ?
|
|
3267
|
+
"%Int8Array%": typeof Int8Array > "u" ? I : Int8Array,
|
|
3268
|
+
"%Int16Array%": typeof Int16Array > "u" ? I : Int16Array,
|
|
3269
|
+
"%Int32Array%": typeof Int32Array > "u" ? I : Int32Array,
|
|
3224
3270
|
"%isFinite%": isFinite,
|
|
3225
3271
|
"%isNaN%": isNaN,
|
|
3226
|
-
"%IteratorPrototype%":
|
|
3227
|
-
"%JSON%": typeof JSON == "object" ? JSON :
|
|
3228
|
-
"%Map%": typeof Map > "u" ?
|
|
3229
|
-
"%MapIteratorPrototype%": typeof Map > "u" ||
|
|
3272
|
+
"%IteratorPrototype%": $e && M ? M(M([][Symbol.iterator]())) : I,
|
|
3273
|
+
"%JSON%": typeof JSON == "object" ? JSON : I,
|
|
3274
|
+
"%Map%": typeof Map > "u" ? I : Map,
|
|
3275
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !$e || !M ? I : M((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
3230
3276
|
"%Math%": Math,
|
|
3231
3277
|
"%Number%": Number,
|
|
3232
3278
|
"%Object%": Object,
|
|
3233
3279
|
"%parseFloat%": parseFloat,
|
|
3234
3280
|
"%parseInt%": parseInt,
|
|
3235
|
-
"%Promise%": typeof Promise > "u" ?
|
|
3236
|
-
"%Proxy%": typeof Proxy > "u" ?
|
|
3237
|
-
"%RangeError%":
|
|
3238
|
-
"%ReferenceError%":
|
|
3239
|
-
"%Reflect%": typeof Reflect > "u" ?
|
|
3281
|
+
"%Promise%": typeof Promise > "u" ? I : Promise,
|
|
3282
|
+
"%Proxy%": typeof Proxy > "u" ? I : Proxy,
|
|
3283
|
+
"%RangeError%": js,
|
|
3284
|
+
"%ReferenceError%": Us,
|
|
3285
|
+
"%Reflect%": typeof Reflect > "u" ? I : Reflect,
|
|
3240
3286
|
"%RegExp%": RegExp,
|
|
3241
|
-
"%Set%": typeof Set > "u" ?
|
|
3242
|
-
"%SetIteratorPrototype%": typeof Set > "u" ||
|
|
3243
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ?
|
|
3287
|
+
"%Set%": typeof Set > "u" ? I : Set,
|
|
3288
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !$e || !M ? I : M((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
3289
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? I : SharedArrayBuffer,
|
|
3244
3290
|
"%String%": String,
|
|
3245
|
-
"%StringIteratorPrototype%":
|
|
3246
|
-
"%Symbol%":
|
|
3291
|
+
"%StringIteratorPrototype%": $e && M ? M(""[Symbol.iterator]()) : I,
|
|
3292
|
+
"%Symbol%": $e ? Symbol : I,
|
|
3247
3293
|
"%SyntaxError%": Ke,
|
|
3248
|
-
"%ThrowTypeError%":
|
|
3249
|
-
"%TypedArray%":
|
|
3294
|
+
"%ThrowTypeError%": xs,
|
|
3295
|
+
"%TypedArray%": Qs,
|
|
3250
3296
|
"%TypeError%": Ge,
|
|
3251
|
-
"%Uint8Array%": typeof Uint8Array > "u" ?
|
|
3252
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ?
|
|
3253
|
-
"%Uint16Array%": typeof Uint16Array > "u" ?
|
|
3254
|
-
"%Uint32Array%": typeof Uint32Array > "u" ?
|
|
3255
|
-
"%URIError%":
|
|
3256
|
-
"%WeakMap%": typeof WeakMap > "u" ?
|
|
3257
|
-
"%WeakRef%": typeof WeakRef > "u" ?
|
|
3258
|
-
"%WeakSet%": typeof WeakSet > "u" ?
|
|
3297
|
+
"%Uint8Array%": typeof Uint8Array > "u" ? I : Uint8Array,
|
|
3298
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? I : Uint8ClampedArray,
|
|
3299
|
+
"%Uint16Array%": typeof Uint16Array > "u" ? I : Uint16Array,
|
|
3300
|
+
"%Uint32Array%": typeof Uint32Array > "u" ? I : Uint32Array,
|
|
3301
|
+
"%URIError%": Bs,
|
|
3302
|
+
"%WeakMap%": typeof WeakMap > "u" ? I : WeakMap,
|
|
3303
|
+
"%WeakRef%": typeof WeakRef > "u" ? I : WeakRef,
|
|
3304
|
+
"%WeakSet%": typeof WeakSet > "u" ? I : WeakSet
|
|
3259
3305
|
};
|
|
3260
3306
|
if (M)
|
|
3261
3307
|
try {
|
|
3262
3308
|
null.error;
|
|
3263
3309
|
} catch (t) {
|
|
3264
|
-
var
|
|
3265
|
-
Pe["%Error.prototype%"] =
|
|
3310
|
+
var Gs = M(M(t));
|
|
3311
|
+
Pe["%Error.prototype%"] = Gs;
|
|
3266
3312
|
}
|
|
3267
|
-
var
|
|
3313
|
+
var Ks = function t(e) {
|
|
3268
3314
|
var r;
|
|
3269
3315
|
if (e === "%AsyncFunction%")
|
|
3270
3316
|
r = Bt("async function () {}");
|
|
@@ -3333,21 +3379,21 @@ var Qs = function t(e) {
|
|
|
3333
3379
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3334
3380
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3335
3381
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3336
|
-
}, ot = Er, At =
|
|
3382
|
+
}, ot = Er, At = Vs, zs = ot.call(Function.call, Array.prototype.concat), Hs = ot.call(Function.apply, Array.prototype.splice), rn = ot.call(Function.call, String.prototype.replace), Et = ot.call(Function.call, String.prototype.slice), Ws = ot.call(Function.call, RegExp.prototype.exec), Ys = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Js = /\\(\\)?/g, Xs = function(e) {
|
|
3337
3383
|
var r = Et(e, 0, 1), n = Et(e, -1);
|
|
3338
3384
|
if (r === "%" && n !== "%")
|
|
3339
3385
|
throw new Ke("invalid intrinsic syntax, expected closing `%`");
|
|
3340
3386
|
if (n === "%" && r !== "%")
|
|
3341
3387
|
throw new Ke("invalid intrinsic syntax, expected opening `%`");
|
|
3342
3388
|
var i = [];
|
|
3343
|
-
return rn(e,
|
|
3344
|
-
i[i.length] = a ? rn(u,
|
|
3389
|
+
return rn(e, Ys, function(o, s, a, u) {
|
|
3390
|
+
i[i.length] = a ? rn(u, Js, "$1") : s || o;
|
|
3345
3391
|
}), i;
|
|
3346
|
-
},
|
|
3392
|
+
}, Zs = function(e, r) {
|
|
3347
3393
|
var n = e, i;
|
|
3348
3394
|
if (At(tn, n) && (i = tn[n], n = "%" + i[0] + "%"), At(Pe, n)) {
|
|
3349
3395
|
var o = Pe[n];
|
|
3350
|
-
if (o === je && (o =
|
|
3396
|
+
if (o === je && (o = Ks(n)), typeof o > "u" && !r)
|
|
3351
3397
|
throw new Ge("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3352
3398
|
return {
|
|
3353
3399
|
alias: i,
|
|
@@ -3361,28 +3407,28 @@ var Qs = function t(e) {
|
|
|
3361
3407
|
throw new Ge("intrinsic name must be a non-empty string");
|
|
3362
3408
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3363
3409
|
throw new Ge('"allowMissing" argument must be a boolean');
|
|
3364
|
-
if (
|
|
3410
|
+
if (Ws(/^%?[^%]*%?$/, e) === null)
|
|
3365
3411
|
throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3366
|
-
var n =
|
|
3367
|
-
f && (i = f[0],
|
|
3368
|
-
for (var c = 1,
|
|
3369
|
-
var
|
|
3370
|
-
if ((
|
|
3412
|
+
var n = Xs(e), i = n.length > 0 ? n[0] : "", o = Zs("%" + i + "%", r), s = o.name, a = o.value, u = !1, f = o.alias;
|
|
3413
|
+
f && (i = f[0], Hs(n, zs([0, 1], f)));
|
|
3414
|
+
for (var c = 1, h = !0; c < n.length; c += 1) {
|
|
3415
|
+
var l = n[c], g = Et(l, 0, 1), v = Et(l, -1);
|
|
3416
|
+
if ((g === '"' || g === "'" || g === "`" || v === '"' || v === "'" || v === "`") && g !== v)
|
|
3371
3417
|
throw new Ke("property names with quotes must have matching quotes");
|
|
3372
|
-
if ((
|
|
3418
|
+
if ((l === "constructor" || !h) && (u = !0), i += "." + l, s = "%" + i + "%", At(Pe, s))
|
|
3373
3419
|
a = Pe[s];
|
|
3374
3420
|
else if (a != null) {
|
|
3375
|
-
if (!(
|
|
3421
|
+
if (!(l in a)) {
|
|
3376
3422
|
if (!r)
|
|
3377
3423
|
throw new Ge("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3378
3424
|
return;
|
|
3379
3425
|
}
|
|
3380
3426
|
if (ke && c + 1 >= n.length) {
|
|
3381
|
-
var
|
|
3382
|
-
|
|
3427
|
+
var w = ke(a, l);
|
|
3428
|
+
h = !!w, h && "get" in w && !("originalValue" in w.get) ? a = w.get : a = a[l];
|
|
3383
3429
|
} else
|
|
3384
|
-
|
|
3385
|
-
|
|
3430
|
+
h = At(a, l), a = a[l];
|
|
3431
|
+
h && !u && (Pe[s] = a);
|
|
3386
3432
|
}
|
|
3387
3433
|
}
|
|
3388
3434
|
return a;
|
|
@@ -3399,14 +3445,14 @@ function Ir() {
|
|
|
3399
3445
|
}
|
|
3400
3446
|
return qt = e, qt;
|
|
3401
3447
|
}
|
|
3402
|
-
var
|
|
3448
|
+
var ea = st, yt = ea("%Object.getOwnPropertyDescriptor%", !0);
|
|
3403
3449
|
if (yt)
|
|
3404
3450
|
try {
|
|
3405
3451
|
yt([], "length");
|
|
3406
3452
|
} catch {
|
|
3407
3453
|
yt = null;
|
|
3408
3454
|
}
|
|
3409
|
-
var
|
|
3455
|
+
var Vt = yt, on = Ir(), ta = zn, Me = Rt, sn = Vt, ra = function(e, r, n) {
|
|
3410
3456
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3411
3457
|
throw new Me("`obj` must be an object or a function`");
|
|
3412
3458
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3430,7 +3476,7 @@ var $t = yt, on = Ir(), Zs = zn, Me = Rt, sn = $t, ea = function(e, r, n) {
|
|
|
3430
3476
|
else if (a || !i && !o && !s)
|
|
3431
3477
|
e[r] = n;
|
|
3432
3478
|
else
|
|
3433
|
-
throw new
|
|
3479
|
+
throw new ta("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3434
3480
|
}, ur = Ir(), Yn = function() {
|
|
3435
3481
|
return !!ur;
|
|
3436
3482
|
};
|
|
@@ -3443,17 +3489,17 @@ Yn.hasArrayLengthDefineBug = function() {
|
|
|
3443
3489
|
return !0;
|
|
3444
3490
|
}
|
|
3445
3491
|
};
|
|
3446
|
-
var
|
|
3492
|
+
var na = Yn, ia = st, an = ra, oa = na(), un = Vt, cn = Rt, sa = ia("%Math.floor%"), aa = function(e, r) {
|
|
3447
3493
|
if (typeof e != "function")
|
|
3448
3494
|
throw new cn("`fn` is not a function");
|
|
3449
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3495
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || sa(r) !== r)
|
|
3450
3496
|
throw new cn("`length` must be a positive 32-bit integer");
|
|
3451
3497
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3452
3498
|
if ("length" in e && un) {
|
|
3453
3499
|
var s = un(e, "length");
|
|
3454
3500
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3455
3501
|
}
|
|
3456
|
-
return (i || o || !n) && (
|
|
3502
|
+
return (i || o || !n) && (oa ? an(
|
|
3457
3503
|
/** @type {Parameters<define>[0]} */
|
|
3458
3504
|
e,
|
|
3459
3505
|
"length",
|
|
@@ -3468,14 +3514,14 @@ var ta = Yn, ra = st, an = ea, na = ta(), un = $t, cn = Rt, ia = ra("%Math.floor
|
|
|
3468
3514
|
)), e;
|
|
3469
3515
|
};
|
|
3470
3516
|
(function(t) {
|
|
3471
|
-
var e = Er, r = st, n =
|
|
3472
|
-
t.exports = function(
|
|
3473
|
-
if (typeof
|
|
3517
|
+
var e = Er, r = st, n = aa, i = Rt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Ir(), f = r("%Math.max%");
|
|
3518
|
+
t.exports = function(l) {
|
|
3519
|
+
if (typeof l != "function")
|
|
3474
3520
|
throw new i("a function is required");
|
|
3475
|
-
var
|
|
3521
|
+
var g = a(e, s, arguments);
|
|
3476
3522
|
return n(
|
|
3477
|
-
|
|
3478
|
-
1 + f(0,
|
|
3523
|
+
g,
|
|
3524
|
+
1 + f(0, l.length - (arguments.length - 1)),
|
|
3479
3525
|
!0
|
|
3480
3526
|
);
|
|
3481
3527
|
};
|
|
@@ -3484,37 +3530,37 @@ var ta = Yn, ra = st, an = ea, na = ta(), un = $t, cn = Rt, ia = ra("%Math.floor
|
|
|
3484
3530
|
};
|
|
3485
3531
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3486
3532
|
})(Wn);
|
|
3487
|
-
var Tr = Wn.exports, Jn = st, Xn = Tr,
|
|
3533
|
+
var Tr = Wn.exports, Jn = st, Xn = Tr, ua = Xn(Jn("String.prototype.indexOf")), Or = function(e, r) {
|
|
3488
3534
|
var n = Jn(e, !!r);
|
|
3489
|
-
return typeof n == "function" &&
|
|
3490
|
-
},
|
|
3491
|
-
return
|
|
3535
|
+
return typeof n == "function" && ua(e, ".prototype.") > -1 ? Xn(n) : n;
|
|
3536
|
+
}, ca = Dt(), la = Or, cr = la("Object.prototype.toString"), $t = function(e) {
|
|
3537
|
+
return ca && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : cr(e) === "[object Arguments]";
|
|
3492
3538
|
}, Zn = function(e) {
|
|
3493
|
-
return
|
|
3494
|
-
},
|
|
3495
|
-
return
|
|
3539
|
+
return $t(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && cr(e) !== "[object Array]" && cr(e.callee) === "[object Function]";
|
|
3540
|
+
}, da = function() {
|
|
3541
|
+
return $t(arguments);
|
|
3496
3542
|
}();
|
|
3497
|
-
|
|
3498
|
-
var
|
|
3543
|
+
$t.isLegacyArguments = Zn;
|
|
3544
|
+
var fa = da ? $t : Zn, ha = Object.prototype.toString, pa = Function.prototype.toString, ya = /^\s*(?:function)?\*/, ei = Dt(), Qt = Object.getPrototypeOf, ga = function() {
|
|
3499
3545
|
if (!ei)
|
|
3500
3546
|
return !1;
|
|
3501
3547
|
try {
|
|
3502
3548
|
return Function("return function*() {}")();
|
|
3503
3549
|
} catch {
|
|
3504
3550
|
}
|
|
3505
|
-
}, Gt,
|
|
3551
|
+
}, Gt, ma = function(e) {
|
|
3506
3552
|
if (typeof e != "function")
|
|
3507
3553
|
return !1;
|
|
3508
|
-
if (
|
|
3554
|
+
if (ya.test(pa.call(e)))
|
|
3509
3555
|
return !0;
|
|
3510
3556
|
if (!ei) {
|
|
3511
|
-
var r =
|
|
3557
|
+
var r = ha.call(e);
|
|
3512
3558
|
return r === "[object GeneratorFunction]";
|
|
3513
3559
|
}
|
|
3514
3560
|
if (!Qt)
|
|
3515
3561
|
return !1;
|
|
3516
3562
|
if (typeof Gt > "u") {
|
|
3517
|
-
var n =
|
|
3563
|
+
var n = ga();
|
|
3518
3564
|
Gt = n ? Qt(n) : !1;
|
|
3519
3565
|
}
|
|
3520
3566
|
return Qt(e) === Gt;
|
|
@@ -3533,10 +3579,10 @@ if (typeof xe == "function" && typeof Object.defineProperty == "function")
|
|
|
3533
3579
|
}
|
|
3534
3580
|
else
|
|
3535
3581
|
xe = null;
|
|
3536
|
-
var
|
|
3582
|
+
var va = /^\s*class\b/, dr = function(e) {
|
|
3537
3583
|
try {
|
|
3538
3584
|
var r = ti.call(e);
|
|
3539
|
-
return
|
|
3585
|
+
return va.test(r);
|
|
3540
3586
|
} catch {
|
|
3541
3587
|
return !1;
|
|
3542
3588
|
}
|
|
@@ -3546,22 +3592,22 @@ var ga = /^\s*class\b/, dr = function(e) {
|
|
|
3546
3592
|
} catch {
|
|
3547
3593
|
return !1;
|
|
3548
3594
|
}
|
|
3549
|
-
}, mt = Object.prototype.toString,
|
|
3595
|
+
}, mt = Object.prototype.toString, ba = "[object Object]", Sa = "[object Function]", wa = "[object GeneratorFunction]", Aa = "[object HTMLAllCollection]", Ea = "[object HTML document.all class]", Ia = "[object HTMLCollection]", Ta = typeof Symbol == "function" && !!Symbol.toStringTag, Oa = !(0 in [,]), fr = function() {
|
|
3550
3596
|
return !1;
|
|
3551
3597
|
};
|
|
3552
3598
|
if (typeof document == "object") {
|
|
3553
|
-
var
|
|
3554
|
-
mt.call(
|
|
3555
|
-
if ((
|
|
3599
|
+
var _a = document.all;
|
|
3600
|
+
mt.call(_a) === mt.call(document.all) && (fr = function(e) {
|
|
3601
|
+
if ((Oa || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3556
3602
|
try {
|
|
3557
3603
|
var r = mt.call(e);
|
|
3558
|
-
return (r ===
|
|
3604
|
+
return (r === Aa || r === Ea || r === Ia || r === ba) && e("") == null;
|
|
3559
3605
|
} catch {
|
|
3560
3606
|
}
|
|
3561
3607
|
return !1;
|
|
3562
3608
|
});
|
|
3563
3609
|
}
|
|
3564
|
-
var
|
|
3610
|
+
var La = xe ? function(e) {
|
|
3565
3611
|
if (fr(e))
|
|
3566
3612
|
return !0;
|
|
3567
3613
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3578,27 +3624,27 @@ var Oa = xe ? function(e) {
|
|
|
3578
3624
|
return !0;
|
|
3579
3625
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3580
3626
|
return !1;
|
|
3581
|
-
if (
|
|
3627
|
+
if (Ta)
|
|
3582
3628
|
return Kt(e);
|
|
3583
3629
|
if (dr(e))
|
|
3584
3630
|
return !1;
|
|
3585
3631
|
var r = mt.call(e);
|
|
3586
|
-
return r !==
|
|
3587
|
-
},
|
|
3632
|
+
return r !== Sa && r !== wa && !/^\[object HTML/.test(r) ? !1 : Kt(e);
|
|
3633
|
+
}, Ca = La, ka = Object.prototype.toString, ri = Object.prototype.hasOwnProperty, Pa = function(e, r, n) {
|
|
3588
3634
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3589
3635
|
ri.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3590
|
-
},
|
|
3636
|
+
}, Na = function(e, r, n) {
|
|
3591
3637
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3592
3638
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3593
|
-
},
|
|
3639
|
+
}, Fa = function(e, r, n) {
|
|
3594
3640
|
for (var i in e)
|
|
3595
3641
|
ri.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3596
|
-
},
|
|
3597
|
-
if (!
|
|
3642
|
+
}, Da = function(e, r, n) {
|
|
3643
|
+
if (!Ca(r))
|
|
3598
3644
|
throw new TypeError("iterator must be a function");
|
|
3599
3645
|
var i;
|
|
3600
|
-
arguments.length >= 3 && (i = n),
|
|
3601
|
-
}, ni =
|
|
3646
|
+
arguments.length >= 3 && (i = n), ka.call(e) === "[object Array]" ? Pa(e, r, i) : typeof e == "string" ? Na(e, r, i) : Fa(e, r, i);
|
|
3647
|
+
}, ni = Da, Ra = [
|
|
3602
3648
|
"Float32Array",
|
|
3603
3649
|
"Float64Array",
|
|
3604
3650
|
"Int8Array",
|
|
@@ -3610,11 +3656,11 @@ var Oa = xe ? function(e) {
|
|
|
3610
3656
|
"Uint32Array",
|
|
3611
3657
|
"BigInt64Array",
|
|
3612
3658
|
"BigUint64Array"
|
|
3613
|
-
], zt =
|
|
3659
|
+
], zt = Ra, Va = typeof globalThis > "u" ? br : globalThis, ii = function() {
|
|
3614
3660
|
for (var e = [], r = 0; r < zt.length; r++)
|
|
3615
|
-
typeof
|
|
3661
|
+
typeof Va[zt[r]] == "function" && (e[e.length] = zt[r]);
|
|
3616
3662
|
return e;
|
|
3617
|
-
}, It = ni,
|
|
3663
|
+
}, It = ni, $a = ii, ln = Tr, _r = Or, vt = Vt, Ma = _r("Object.prototype.toString"), oi = Dt(), dn = typeof globalThis > "u" ? br : globalThis, hr = $a(), Lr = _r("String.prototype.slice"), Ht = Object.getPrototypeOf, ja = _r("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3618
3664
|
for (var n = 0; n < e.length; n += 1)
|
|
3619
3665
|
if (e[n] === r)
|
|
3620
3666
|
return n;
|
|
@@ -3634,7 +3680,7 @@ oi && vt && Ht ? It(hr, function(t) {
|
|
|
3634
3680
|
var e = new dn[t](), r = e.slice || e.set;
|
|
3635
3681
|
r && (Tt["$" + t] = ln(r));
|
|
3636
3682
|
});
|
|
3637
|
-
var
|
|
3683
|
+
var Ua = function(e) {
|
|
3638
3684
|
var r = !1;
|
|
3639
3685
|
return It(Tt, function(n, i) {
|
|
3640
3686
|
if (!r)
|
|
@@ -3643,7 +3689,7 @@ var Ma = function(e) {
|
|
|
3643
3689
|
} catch {
|
|
3644
3690
|
}
|
|
3645
3691
|
}), r;
|
|
3646
|
-
},
|
|
3692
|
+
}, Ba = function(e) {
|
|
3647
3693
|
var r = !1;
|
|
3648
3694
|
return It(Tt, function(n, i) {
|
|
3649
3695
|
if (!r)
|
|
@@ -3652,15 +3698,15 @@ var Ma = function(e) {
|
|
|
3652
3698
|
} catch {
|
|
3653
3699
|
}
|
|
3654
3700
|
}), r;
|
|
3655
|
-
},
|
|
3701
|
+
}, xa = function(e) {
|
|
3656
3702
|
if (!e || typeof e != "object")
|
|
3657
3703
|
return !1;
|
|
3658
3704
|
if (!oi) {
|
|
3659
|
-
var r = Lr(
|
|
3660
|
-
return
|
|
3705
|
+
var r = Lr(Ma(e), 8, -1);
|
|
3706
|
+
return ja(hr, r) > -1 ? r : r !== "Object" ? !1 : Ba(e);
|
|
3661
3707
|
}
|
|
3662
|
-
return vt ?
|
|
3663
|
-
}, Ot = ni,
|
|
3708
|
+
return vt ? Ua(e) : null;
|
|
3709
|
+
}, Ot = ni, qa = ii, fn = Tr, Cr = Or, bt = Vt, Qa = Cr("Object.prototype.toString"), si = Dt(), hn = typeof globalThis > "u" ? br : globalThis, pr = qa(), kr = Cr("String.prototype.slice"), Wt = Object.getPrototypeOf, Ga = Cr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3664
3710
|
for (var n = 0; n < e.length; n += 1)
|
|
3665
3711
|
if (e[n] === r)
|
|
3666
3712
|
return n;
|
|
@@ -3680,7 +3726,7 @@ si && bt && Wt ? Ot(pr, function(t) {
|
|
|
3680
3726
|
var e = new hn[t](), r = e.slice || e.set;
|
|
3681
3727
|
r && (_t["$" + t] = fn(r));
|
|
3682
3728
|
});
|
|
3683
|
-
var
|
|
3729
|
+
var Ka = function(e) {
|
|
3684
3730
|
var r = !1;
|
|
3685
3731
|
return Ot(
|
|
3686
3732
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -3696,7 +3742,7 @@ var Qa = function(e) {
|
|
|
3696
3742
|
}
|
|
3697
3743
|
}
|
|
3698
3744
|
), r;
|
|
3699
|
-
},
|
|
3745
|
+
}, za = function(e) {
|
|
3700
3746
|
var r = !1;
|
|
3701
3747
|
return Ot(
|
|
3702
3748
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -3712,27 +3758,27 @@ var Qa = function(e) {
|
|
|
3712
3758
|
}
|
|
3713
3759
|
}
|
|
3714
3760
|
), r;
|
|
3715
|
-
},
|
|
3761
|
+
}, Ha = function(e) {
|
|
3716
3762
|
if (!e || typeof e != "object")
|
|
3717
3763
|
return !1;
|
|
3718
3764
|
if (!si) {
|
|
3719
|
-
var r = kr(
|
|
3720
|
-
return
|
|
3765
|
+
var r = kr(Qa(e), 8, -1);
|
|
3766
|
+
return Ga(pr, r) > -1 ? r : r !== "Object" ? !1 : za(e);
|
|
3721
3767
|
}
|
|
3722
|
-
return bt ?
|
|
3723
|
-
},
|
|
3724
|
-
return !!
|
|
3768
|
+
return bt ? Ka(e) : null;
|
|
3769
|
+
}, Wa = Ha, Ya = function(e) {
|
|
3770
|
+
return !!Wa(e);
|
|
3725
3771
|
};
|
|
3726
3772
|
(function(t) {
|
|
3727
|
-
var e =
|
|
3773
|
+
var e = fa, r = ma, n = xa, i = Ya;
|
|
3728
3774
|
function o(y) {
|
|
3729
3775
|
return y.call.bind(y);
|
|
3730
3776
|
}
|
|
3731
|
-
var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), f = o(Number.prototype.valueOf), c = o(String.prototype.valueOf),
|
|
3777
|
+
var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), f = o(Number.prototype.valueOf), c = o(String.prototype.valueOf), h = o(Boolean.prototype.valueOf);
|
|
3732
3778
|
if (s)
|
|
3733
|
-
var
|
|
3779
|
+
var l = o(BigInt.prototype.valueOf);
|
|
3734
3780
|
if (a)
|
|
3735
|
-
var
|
|
3781
|
+
var g = o(Symbol.prototype.valueOf);
|
|
3736
3782
|
function v(y, hi) {
|
|
3737
3783
|
if (typeof y != "object")
|
|
3738
3784
|
return !1;
|
|
@@ -3743,10 +3789,10 @@ var Qa = function(e) {
|
|
|
3743
3789
|
}
|
|
3744
3790
|
}
|
|
3745
3791
|
t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = i;
|
|
3746
|
-
function
|
|
3792
|
+
function w(y) {
|
|
3747
3793
|
return typeof Promise < "u" && y instanceof Promise || y !== null && typeof y == "object" && typeof y.then == "function" && typeof y.catch == "function";
|
|
3748
3794
|
}
|
|
3749
|
-
t.isPromise =
|
|
3795
|
+
t.isPromise = w;
|
|
3750
3796
|
function b(y) {
|
|
3751
3797
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || p(y);
|
|
3752
3798
|
}
|
|
@@ -3771,22 +3817,22 @@ var Qa = function(e) {
|
|
|
3771
3817
|
return n(y) === "Int8Array";
|
|
3772
3818
|
}
|
|
3773
3819
|
t.isInt8Array = k;
|
|
3774
|
-
function
|
|
3820
|
+
function V(y) {
|
|
3775
3821
|
return n(y) === "Int16Array";
|
|
3776
3822
|
}
|
|
3777
|
-
t.isInt16Array =
|
|
3823
|
+
t.isInt16Array = V;
|
|
3778
3824
|
function T(y) {
|
|
3779
3825
|
return n(y) === "Int32Array";
|
|
3780
3826
|
}
|
|
3781
3827
|
t.isInt32Array = T;
|
|
3782
|
-
function
|
|
3828
|
+
function ne(y) {
|
|
3783
3829
|
return n(y) === "Float32Array";
|
|
3784
3830
|
}
|
|
3785
|
-
t.isFloat32Array =
|
|
3786
|
-
function
|
|
3831
|
+
t.isFloat32Array = ne;
|
|
3832
|
+
function ie(y) {
|
|
3787
3833
|
return n(y) === "Float64Array";
|
|
3788
3834
|
}
|
|
3789
|
-
t.isFloat64Array =
|
|
3835
|
+
t.isFloat64Array = ie;
|
|
3790
3836
|
function Ne(y) {
|
|
3791
3837
|
return n(y) === "BigInt64Array";
|
|
3792
3838
|
}
|
|
@@ -3843,22 +3889,22 @@ var Qa = function(e) {
|
|
|
3843
3889
|
return typeof DataView > "u" ? !1 : d.working ? d(y) : y instanceof DataView;
|
|
3844
3890
|
}
|
|
3845
3891
|
t.isDataView = p;
|
|
3846
|
-
var
|
|
3892
|
+
var m = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
3847
3893
|
function S(y) {
|
|
3848
3894
|
return u(y) === "[object SharedArrayBuffer]";
|
|
3849
3895
|
}
|
|
3850
3896
|
function _(y) {
|
|
3851
|
-
return typeof
|
|
3897
|
+
return typeof m > "u" ? !1 : (typeof S.working > "u" && (S.working = S(new m())), S.working ? S(y) : y instanceof m);
|
|
3852
3898
|
}
|
|
3853
3899
|
t.isSharedArrayBuffer = _;
|
|
3854
3900
|
function C(y) {
|
|
3855
3901
|
return u(y) === "[object AsyncFunction]";
|
|
3856
3902
|
}
|
|
3857
3903
|
t.isAsyncFunction = C;
|
|
3858
|
-
function
|
|
3904
|
+
function E(y) {
|
|
3859
3905
|
return u(y) === "[object Map Iterator]";
|
|
3860
3906
|
}
|
|
3861
|
-
t.isMapIterator =
|
|
3907
|
+
t.isMapIterator = E;
|
|
3862
3908
|
function O(y) {
|
|
3863
3909
|
return u(y) === "[object Set Iterator]";
|
|
3864
3910
|
}
|
|
@@ -3879,20 +3925,20 @@ var Qa = function(e) {
|
|
|
3879
3925
|
return v(y, c);
|
|
3880
3926
|
}
|
|
3881
3927
|
t.isStringObject = ut;
|
|
3882
|
-
function
|
|
3883
|
-
return v(y,
|
|
3928
|
+
function Ve(y) {
|
|
3929
|
+
return v(y, h);
|
|
3884
3930
|
}
|
|
3885
|
-
t.isBooleanObject =
|
|
3931
|
+
t.isBooleanObject = Ve;
|
|
3886
3932
|
function ct(y) {
|
|
3887
|
-
return s && v(y,
|
|
3933
|
+
return s && v(y, l);
|
|
3888
3934
|
}
|
|
3889
3935
|
t.isBigIntObject = ct;
|
|
3890
3936
|
function Fr(y) {
|
|
3891
|
-
return a && v(y,
|
|
3937
|
+
return a && v(y, g);
|
|
3892
3938
|
}
|
|
3893
3939
|
t.isSymbolObject = Fr;
|
|
3894
3940
|
function di(y) {
|
|
3895
|
-
return Ie(y) || ut(y) ||
|
|
3941
|
+
return Ie(y) || ut(y) || Ve(y) || ct(y) || Fr(y);
|
|
3896
3942
|
}
|
|
3897
3943
|
t.isBoxedPrimitive = di;
|
|
3898
3944
|
function fi(y) {
|
|
@@ -3907,7 +3953,7 @@ var Qa = function(e) {
|
|
|
3907
3953
|
});
|
|
3908
3954
|
});
|
|
3909
3955
|
})(Gn);
|
|
3910
|
-
var
|
|
3956
|
+
var Ja = function(e) {
|
|
3911
3957
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3912
3958
|
}, yr = { exports: {} };
|
|
3913
3959
|
typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
@@ -3927,69 +3973,69 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
|
3927
3973
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
3928
3974
|
}
|
|
3929
3975
|
};
|
|
3930
|
-
var
|
|
3976
|
+
var Xa = yr.exports;
|
|
3931
3977
|
(function(t) {
|
|
3932
3978
|
var e = Object.getOwnPropertyDescriptors || function(p) {
|
|
3933
|
-
for (var
|
|
3934
|
-
S[
|
|
3979
|
+
for (var m = Object.keys(p), S = {}, _ = 0; _ < m.length; _++)
|
|
3980
|
+
S[m[_]] = Object.getOwnPropertyDescriptor(p, m[_]);
|
|
3935
3981
|
return S;
|
|
3936
3982
|
}, r = /%[sdj%]/g;
|
|
3937
3983
|
t.format = function(d) {
|
|
3938
3984
|
if (!k(d)) {
|
|
3939
|
-
for (var p = [],
|
|
3940
|
-
p.push(s(arguments[
|
|
3985
|
+
for (var p = [], m = 0; m < arguments.length; m++)
|
|
3986
|
+
p.push(s(arguments[m]));
|
|
3941
3987
|
return p.join(" ");
|
|
3942
3988
|
}
|
|
3943
|
-
for (var
|
|
3989
|
+
for (var m = 1, S = arguments, _ = S.length, C = String(d).replace(r, function(O) {
|
|
3944
3990
|
if (O === "%%") return "%";
|
|
3945
|
-
if (
|
|
3991
|
+
if (m >= _) return O;
|
|
3946
3992
|
switch (O) {
|
|
3947
3993
|
case "%s":
|
|
3948
|
-
return String(S[
|
|
3994
|
+
return String(S[m++]);
|
|
3949
3995
|
case "%d":
|
|
3950
|
-
return Number(S[
|
|
3996
|
+
return Number(S[m++]);
|
|
3951
3997
|
case "%j":
|
|
3952
3998
|
try {
|
|
3953
|
-
return JSON.stringify(S[
|
|
3999
|
+
return JSON.stringify(S[m++]);
|
|
3954
4000
|
} catch {
|
|
3955
4001
|
return "[Circular]";
|
|
3956
4002
|
}
|
|
3957
4003
|
default:
|
|
3958
4004
|
return O;
|
|
3959
4005
|
}
|
|
3960
|
-
}),
|
|
3961
|
-
R(
|
|
4006
|
+
}), E = S[m]; m < _; E = S[++m])
|
|
4007
|
+
R(E) || !ie(E) ? C += " " + E : C += " " + s(E);
|
|
3962
4008
|
return C;
|
|
3963
4009
|
}, t.deprecate = function(d, p) {
|
|
3964
|
-
if (typeof
|
|
4010
|
+
if (typeof A < "u" && A.noDeprecation === !0)
|
|
3965
4011
|
return d;
|
|
3966
|
-
if (typeof
|
|
4012
|
+
if (typeof A > "u")
|
|
3967
4013
|
return function() {
|
|
3968
4014
|
return t.deprecate(d, p).apply(this, arguments);
|
|
3969
4015
|
};
|
|
3970
|
-
var
|
|
4016
|
+
var m = !1;
|
|
3971
4017
|
function S() {
|
|
3972
|
-
if (!
|
|
3973
|
-
if (
|
|
4018
|
+
if (!m) {
|
|
4019
|
+
if (A.throwDeprecation)
|
|
3974
4020
|
throw new Error(p);
|
|
3975
|
-
|
|
4021
|
+
A.traceDeprecation ? console.trace(p) : console.error(p), m = !0;
|
|
3976
4022
|
}
|
|
3977
4023
|
return d.apply(this, arguments);
|
|
3978
4024
|
}
|
|
3979
4025
|
return S;
|
|
3980
4026
|
};
|
|
3981
4027
|
var n = {}, i = /^$/;
|
|
3982
|
-
if (
|
|
3983
|
-
var o =
|
|
4028
|
+
if (A.env.NODE_DEBUG) {
|
|
4029
|
+
var o = A.env.NODE_DEBUG;
|
|
3984
4030
|
o = o.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + o + "$", "i");
|
|
3985
4031
|
}
|
|
3986
4032
|
t.debuglog = function(d) {
|
|
3987
4033
|
if (d = d.toUpperCase(), !n[d])
|
|
3988
4034
|
if (i.test(d)) {
|
|
3989
|
-
var p =
|
|
4035
|
+
var p = A.pid;
|
|
3990
4036
|
n[d] = function() {
|
|
3991
|
-
var
|
|
3992
|
-
console.error("%s %d: %s", d, p,
|
|
4037
|
+
var m = t.format.apply(t, arguments);
|
|
4038
|
+
console.error("%s %d: %s", d, p, m);
|
|
3993
4039
|
};
|
|
3994
4040
|
} else
|
|
3995
4041
|
n[d] = function() {
|
|
@@ -3997,11 +4043,11 @@ var Ya = yr.exports;
|
|
|
3997
4043
|
return n[d];
|
|
3998
4044
|
};
|
|
3999
4045
|
function s(d, p) {
|
|
4000
|
-
var
|
|
4046
|
+
var m = {
|
|
4001
4047
|
seen: [],
|
|
4002
4048
|
stylize: u
|
|
4003
4049
|
};
|
|
4004
|
-
return arguments.length >= 3 && (
|
|
4050
|
+
return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), L(p) ? m.showHidden = p : p && t._extend(m, p), T(m.showHidden) && (m.showHidden = !1), T(m.depth) && (m.depth = 2), T(m.colors) && (m.colors = !1), T(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m, d, m.depth);
|
|
4005
4051
|
}
|
|
4006
4052
|
t.inspect = s, s.colors = {
|
|
4007
4053
|
bold: [1, 22],
|
|
@@ -4029,64 +4075,64 @@ var Ya = yr.exports;
|
|
|
4029
4075
|
regexp: "red"
|
|
4030
4076
|
};
|
|
4031
4077
|
function a(d, p) {
|
|
4032
|
-
var
|
|
4033
|
-
return
|
|
4078
|
+
var m = s.styles[p];
|
|
4079
|
+
return m ? "\x1B[" + s.colors[m][0] + "m" + d + "\x1B[" + s.colors[m][1] + "m" : d;
|
|
4034
4080
|
}
|
|
4035
4081
|
function u(d, p) {
|
|
4036
4082
|
return d;
|
|
4037
4083
|
}
|
|
4038
4084
|
function f(d) {
|
|
4039
4085
|
var p = {};
|
|
4040
|
-
return d.forEach(function(
|
|
4041
|
-
p[
|
|
4086
|
+
return d.forEach(function(m, S) {
|
|
4087
|
+
p[m] = !0;
|
|
4042
4088
|
}), p;
|
|
4043
4089
|
}
|
|
4044
|
-
function c(d, p,
|
|
4090
|
+
function c(d, p, m) {
|
|
4045
4091
|
if (d.customInspect && p && de(p.inspect) && // Filter out the util module, it's inspect function is special
|
|
4046
4092
|
p.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
4047
4093
|
!(p.constructor && p.constructor.prototype === p)) {
|
|
4048
|
-
var S = p.inspect(
|
|
4049
|
-
return k(S) || (S = c(d, S,
|
|
4094
|
+
var S = p.inspect(m, d);
|
|
4095
|
+
return k(S) || (S = c(d, S, m)), S;
|
|
4050
4096
|
}
|
|
4051
|
-
var _ =
|
|
4097
|
+
var _ = h(d, p);
|
|
4052
4098
|
if (_)
|
|
4053
4099
|
return _;
|
|
4054
|
-
var C = Object.keys(p),
|
|
4100
|
+
var C = Object.keys(p), E = f(C);
|
|
4055
4101
|
if (d.showHidden && (C = Object.getOwnPropertyNames(p)), Ee(p) && (C.indexOf("message") >= 0 || C.indexOf("description") >= 0))
|
|
4056
|
-
return
|
|
4102
|
+
return l(p);
|
|
4057
4103
|
if (C.length === 0) {
|
|
4058
4104
|
if (de(p)) {
|
|
4059
4105
|
var O = p.name ? ": " + p.name : "";
|
|
4060
4106
|
return d.stylize("[Function" + O + "]", "special");
|
|
4061
4107
|
}
|
|
4062
|
-
if (
|
|
4108
|
+
if (ne(p))
|
|
4063
4109
|
return d.stylize(RegExp.prototype.toString.call(p), "regexp");
|
|
4064
4110
|
if (Ne(p))
|
|
4065
4111
|
return d.stylize(Date.prototype.toString.call(p), "date");
|
|
4066
4112
|
if (Ee(p))
|
|
4067
|
-
return
|
|
4113
|
+
return l(p);
|
|
4068
4114
|
}
|
|
4069
4115
|
var N = "", K = !1, Ie = ["{", "}"];
|
|
4070
4116
|
if (b(p) && (K = !0, Ie = ["[", "]"]), de(p)) {
|
|
4071
4117
|
var ut = p.name ? ": " + p.name : "";
|
|
4072
4118
|
N = " [Function" + ut + "]";
|
|
4073
4119
|
}
|
|
4074
|
-
if (
|
|
4120
|
+
if (ne(p) && (N = " " + RegExp.prototype.toString.call(p)), Ne(p) && (N = " " + Date.prototype.toUTCString.call(p)), Ee(p) && (N = " " + l(p)), C.length === 0 && (!K || p.length == 0))
|
|
4075
4121
|
return Ie[0] + N + Ie[1];
|
|
4076
|
-
if (
|
|
4077
|
-
return
|
|
4122
|
+
if (m < 0)
|
|
4123
|
+
return ne(p) ? d.stylize(RegExp.prototype.toString.call(p), "regexp") : d.stylize("[Object]", "special");
|
|
4078
4124
|
d.seen.push(p);
|
|
4079
|
-
var
|
|
4080
|
-
return K ?
|
|
4081
|
-
return v(d, p,
|
|
4082
|
-
}), d.seen.pop(),
|
|
4125
|
+
var Ve;
|
|
4126
|
+
return K ? Ve = g(d, p, m, E, C) : Ve = C.map(function(ct) {
|
|
4127
|
+
return v(d, p, m, E, ct, K);
|
|
4128
|
+
}), d.seen.pop(), w(Ve, N, Ie);
|
|
4083
4129
|
}
|
|
4084
|
-
function
|
|
4130
|
+
function h(d, p) {
|
|
4085
4131
|
if (T(p))
|
|
4086
4132
|
return d.stylize("undefined", "undefined");
|
|
4087
4133
|
if (k(p)) {
|
|
4088
|
-
var
|
|
4089
|
-
return d.stylize(
|
|
4134
|
+
var m = "'" + JSON.stringify(p).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4135
|
+
return d.stylize(m, "string");
|
|
4090
4136
|
}
|
|
4091
4137
|
if (X(p))
|
|
4092
4138
|
return d.stylize("" + p, "number");
|
|
@@ -4095,33 +4141,33 @@ var Ya = yr.exports;
|
|
|
4095
4141
|
if (R(p))
|
|
4096
4142
|
return d.stylize("null", "null");
|
|
4097
4143
|
}
|
|
4098
|
-
function
|
|
4144
|
+
function l(d) {
|
|
4099
4145
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
4100
4146
|
}
|
|
4101
|
-
function
|
|
4102
|
-
for (var C = [],
|
|
4103
|
-
De(p, String(
|
|
4147
|
+
function g(d, p, m, S, _) {
|
|
4148
|
+
for (var C = [], E = 0, O = p.length; E < O; ++E)
|
|
4149
|
+
De(p, String(E)) ? C.push(v(
|
|
4104
4150
|
d,
|
|
4105
4151
|
p,
|
|
4106
|
-
|
|
4152
|
+
m,
|
|
4107
4153
|
S,
|
|
4108
|
-
String(
|
|
4154
|
+
String(E),
|
|
4109
4155
|
!0
|
|
4110
4156
|
)) : C.push("");
|
|
4111
4157
|
return _.forEach(function(N) {
|
|
4112
4158
|
N.match(/^\d+$/) || C.push(v(
|
|
4113
4159
|
d,
|
|
4114
4160
|
p,
|
|
4115
|
-
|
|
4161
|
+
m,
|
|
4116
4162
|
S,
|
|
4117
4163
|
N,
|
|
4118
4164
|
!0
|
|
4119
4165
|
));
|
|
4120
4166
|
}), C;
|
|
4121
4167
|
}
|
|
4122
|
-
function v(d, p,
|
|
4123
|
-
var
|
|
4124
|
-
if (N = Object.getOwnPropertyDescriptor(p, _) || { value: p[_] }, N.get ? N.set ? O = d.stylize("[Getter/Setter]", "special") : O = d.stylize("[Getter]", "special") : N.set && (O = d.stylize("[Setter]", "special")), De(S, _) || (
|
|
4168
|
+
function v(d, p, m, S, _, C) {
|
|
4169
|
+
var E, O, N;
|
|
4170
|
+
if (N = Object.getOwnPropertyDescriptor(p, _) || { value: p[_] }, N.get ? N.set ? O = d.stylize("[Getter/Setter]", "special") : O = d.stylize("[Getter]", "special") : N.set && (O = d.stylize("[Setter]", "special")), De(S, _) || (E = "[" + _ + "]"), O || (d.seen.indexOf(N.value) < 0 ? (R(m) ? O = c(d, N.value, null) : O = c(d, N.value, m - 1), O.indexOf(`
|
|
4125
4171
|
`) > -1 && (C ? O = O.split(`
|
|
4126
4172
|
`).map(function(K) {
|
|
4127
4173
|
return " " + K;
|
|
@@ -4131,21 +4177,21 @@ var Ya = yr.exports;
|
|
|
4131
4177
|
`).map(function(K) {
|
|
4132
4178
|
return " " + K;
|
|
4133
4179
|
}).join(`
|
|
4134
|
-
`))) : O = d.stylize("[Circular]", "special")), T(
|
|
4180
|
+
`))) : O = d.stylize("[Circular]", "special")), T(E)) {
|
|
4135
4181
|
if (C && _.match(/^\d+$/))
|
|
4136
4182
|
return O;
|
|
4137
|
-
|
|
4183
|
+
E = JSON.stringify("" + _), E.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (E = E.slice(1, -1), E = d.stylize(E, "name")) : (E = E.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), E = d.stylize(E, "string"));
|
|
4138
4184
|
}
|
|
4139
|
-
return
|
|
4185
|
+
return E + ": " + O;
|
|
4140
4186
|
}
|
|
4141
|
-
function
|
|
4187
|
+
function w(d, p, m) {
|
|
4142
4188
|
var S = d.reduce(function(_, C) {
|
|
4143
4189
|
return C.indexOf(`
|
|
4144
4190
|
`) >= 0, _ + C.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
4145
4191
|
}, 0);
|
|
4146
|
-
return S > 60 ?
|
|
4192
|
+
return S > 60 ? m[0] + (p === "" ? "" : p + `
|
|
4147
4193
|
`) + " " + d.join(`,
|
|
4148
|
-
`) + " " +
|
|
4194
|
+
`) + " " + m[1] : m[0] + p + " " + d.join(", ") + " " + m[1];
|
|
4149
4195
|
}
|
|
4150
4196
|
t.types = Gn;
|
|
4151
4197
|
function b(d) {
|
|
@@ -4172,28 +4218,28 @@ var Ya = yr.exports;
|
|
|
4172
4218
|
return typeof d == "string";
|
|
4173
4219
|
}
|
|
4174
4220
|
t.isString = k;
|
|
4175
|
-
function
|
|
4221
|
+
function V(d) {
|
|
4176
4222
|
return typeof d == "symbol";
|
|
4177
4223
|
}
|
|
4178
|
-
t.isSymbol =
|
|
4224
|
+
t.isSymbol = V;
|
|
4179
4225
|
function T(d) {
|
|
4180
4226
|
return d === void 0;
|
|
4181
4227
|
}
|
|
4182
4228
|
t.isUndefined = T;
|
|
4183
|
-
function re(d) {
|
|
4184
|
-
return ne(d) && Se(d) === "[object RegExp]";
|
|
4185
|
-
}
|
|
4186
|
-
t.isRegExp = re, t.types.isRegExp = re;
|
|
4187
4229
|
function ne(d) {
|
|
4230
|
+
return ie(d) && Se(d) === "[object RegExp]";
|
|
4231
|
+
}
|
|
4232
|
+
t.isRegExp = ne, t.types.isRegExp = ne;
|
|
4233
|
+
function ie(d) {
|
|
4188
4234
|
return typeof d == "object" && d !== null;
|
|
4189
4235
|
}
|
|
4190
|
-
t.isObject =
|
|
4236
|
+
t.isObject = ie;
|
|
4191
4237
|
function Ne(d) {
|
|
4192
|
-
return
|
|
4238
|
+
return ie(d) && Se(d) === "[object Date]";
|
|
4193
4239
|
}
|
|
4194
4240
|
t.isDate = Ne, t.types.isDate = Ne;
|
|
4195
4241
|
function Ee(d) {
|
|
4196
|
-
return
|
|
4242
|
+
return ie(d) && (Se(d) === "[object Error]" || d instanceof Error);
|
|
4197
4243
|
}
|
|
4198
4244
|
t.isError = Ee, t.types.isNativeError = Ee;
|
|
4199
4245
|
function de(d) {
|
|
@@ -4204,7 +4250,7 @@ var Ya = yr.exports;
|
|
|
4204
4250
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
4205
4251
|
typeof d > "u";
|
|
4206
4252
|
}
|
|
4207
|
-
t.isPrimitive = Mt, t.isBuffer =
|
|
4253
|
+
t.isPrimitive = Mt, t.isBuffer = Ja;
|
|
4208
4254
|
function Se(d) {
|
|
4209
4255
|
return Object.prototype.toString.call(d);
|
|
4210
4256
|
}
|
|
@@ -4235,10 +4281,10 @@ var Ya = yr.exports;
|
|
|
4235
4281
|
}
|
|
4236
4282
|
t.log = function() {
|
|
4237
4283
|
console.log("%s - %s", jt(), t.format.apply(t, arguments));
|
|
4238
|
-
}, t.inherits =
|
|
4239
|
-
if (!p || !
|
|
4240
|
-
for (var
|
|
4241
|
-
d[
|
|
4284
|
+
}, t.inherits = Xa, t._extend = function(d, p) {
|
|
4285
|
+
if (!p || !ie(p)) return d;
|
|
4286
|
+
for (var m = Object.keys(p), S = m.length; S--; )
|
|
4287
|
+
d[m[S]] = p[m[S]];
|
|
4242
4288
|
return d;
|
|
4243
4289
|
};
|
|
4244
4290
|
function De(d, p) {
|
|
@@ -4249,45 +4295,45 @@ var Ya = yr.exports;
|
|
|
4249
4295
|
if (typeof p != "function")
|
|
4250
4296
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4251
4297
|
if (fe && p[fe]) {
|
|
4252
|
-
var
|
|
4253
|
-
if (typeof
|
|
4298
|
+
var m = p[fe];
|
|
4299
|
+
if (typeof m != "function")
|
|
4254
4300
|
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
4255
|
-
return Object.defineProperty(
|
|
4256
|
-
value:
|
|
4301
|
+
return Object.defineProperty(m, fe, {
|
|
4302
|
+
value: m,
|
|
4257
4303
|
enumerable: !1,
|
|
4258
4304
|
writable: !1,
|
|
4259
4305
|
configurable: !0
|
|
4260
|
-
}),
|
|
4306
|
+
}), m;
|
|
4261
4307
|
}
|
|
4262
|
-
function
|
|
4308
|
+
function m() {
|
|
4263
4309
|
for (var S, _, C = new Promise(function(N, K) {
|
|
4264
4310
|
S = N, _ = K;
|
|
4265
|
-
}),
|
|
4266
|
-
|
|
4267
|
-
|
|
4311
|
+
}), E = [], O = 0; O < arguments.length; O++)
|
|
4312
|
+
E.push(arguments[O]);
|
|
4313
|
+
E.push(function(N, K) {
|
|
4268
4314
|
N ? _(N) : S(K);
|
|
4269
4315
|
});
|
|
4270
4316
|
try {
|
|
4271
|
-
p.apply(this,
|
|
4317
|
+
p.apply(this, E);
|
|
4272
4318
|
} catch (N) {
|
|
4273
4319
|
_(N);
|
|
4274
4320
|
}
|
|
4275
4321
|
return C;
|
|
4276
4322
|
}
|
|
4277
|
-
return Object.setPrototypeOf(
|
|
4278
|
-
value:
|
|
4323
|
+
return Object.setPrototypeOf(m, Object.getPrototypeOf(p)), fe && Object.defineProperty(m, fe, {
|
|
4324
|
+
value: m,
|
|
4279
4325
|
enumerable: !1,
|
|
4280
4326
|
writable: !1,
|
|
4281
4327
|
configurable: !0
|
|
4282
4328
|
}), Object.defineProperties(
|
|
4283
|
-
|
|
4329
|
+
m,
|
|
4284
4330
|
e(p)
|
|
4285
4331
|
);
|
|
4286
4332
|
}, t.promisify.custom = fe;
|
|
4287
4333
|
function Re(d, p) {
|
|
4288
4334
|
if (!d) {
|
|
4289
|
-
var
|
|
4290
|
-
|
|
4335
|
+
var m = new Error("Promise was rejected with a falsy value");
|
|
4336
|
+
m.reason = d, d = m;
|
|
4291
4337
|
}
|
|
4292
4338
|
return p(d);
|
|
4293
4339
|
}
|
|
@@ -4295,20 +4341,20 @@ var Ya = yr.exports;
|
|
|
4295
4341
|
if (typeof d != "function")
|
|
4296
4342
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4297
4343
|
function p() {
|
|
4298
|
-
for (var
|
|
4299
|
-
|
|
4300
|
-
var _ =
|
|
4344
|
+
for (var m = [], S = 0; S < arguments.length; S++)
|
|
4345
|
+
m.push(arguments[S]);
|
|
4346
|
+
var _ = m.pop();
|
|
4301
4347
|
if (typeof _ != "function")
|
|
4302
4348
|
throw new TypeError("The last argument must be of type Function");
|
|
4303
|
-
var C = this,
|
|
4349
|
+
var C = this, E = function() {
|
|
4304
4350
|
return _.apply(C, arguments);
|
|
4305
4351
|
};
|
|
4306
|
-
d.apply(this,
|
|
4352
|
+
d.apply(this, m).then(
|
|
4307
4353
|
function(O) {
|
|
4308
|
-
|
|
4354
|
+
A.nextTick(E.bind(null, null, O));
|
|
4309
4355
|
},
|
|
4310
4356
|
function(O) {
|
|
4311
|
-
|
|
4357
|
+
A.nextTick(Re.bind(null, O, E));
|
|
4312
4358
|
}
|
|
4313
4359
|
);
|
|
4314
4360
|
}
|
|
@@ -4319,7 +4365,7 @@ var Ya = yr.exports;
|
|
|
4319
4365
|
}
|
|
4320
4366
|
t.callbackify = at;
|
|
4321
4367
|
})(Ft);
|
|
4322
|
-
const { inherits:
|
|
4368
|
+
const { inherits: Za, format: Yt } = Ft;
|
|
4323
4369
|
function Oe(t, e, r = Error) {
|
|
4324
4370
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
4325
4371
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
@@ -4330,7 +4376,7 @@ function Oe(t, e, r = Error) {
|
|
|
4330
4376
|
}
|
|
4331
4377
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
4332
4378
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4333
|
-
},
|
|
4379
|
+
}, Za(n, r), n;
|
|
4334
4380
|
}
|
|
4335
4381
|
var ai = {
|
|
4336
4382
|
createError: Oe,
|
|
@@ -4358,7 +4404,7 @@ var ai = {
|
|
|
4358
4404
|
"AVV_ERR_READY_TIMEOUT",
|
|
4359
4405
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4360
4406
|
)
|
|
4361
|
-
},
|
|
4407
|
+
}, eu = function t(e, r, n) {
|
|
4362
4408
|
r === void 0 && (r = ""), n || (n = {});
|
|
4363
4409
|
var i = function(u) {
|
|
4364
4410
|
var f = {
|
|
@@ -4376,12 +4422,12 @@ var ai = {
|
|
|
4376
4422
|
` + r + (o.length ? i("│") : " ") + " ";
|
|
4377
4423
|
return r + s.join(a) + `
|
|
4378
4424
|
` + o.map(function(u, f) {
|
|
4379
|
-
var c = f === o.length - 1,
|
|
4380
|
-
return r + i(c ? "└" : "├") + i("─") + i(
|
|
4425
|
+
var c = f === o.length - 1, h = u.nodes && u.nodes.length, l = r + (c ? " " : i("│")) + " ";
|
|
4426
|
+
return r + i(c ? "└" : "├") + i("─") + i(h ? "┬" : "─") + " " + t(u, l, n).slice(r.length + 2);
|
|
4381
4427
|
}).join("");
|
|
4382
4428
|
};
|
|
4383
|
-
const
|
|
4384
|
-
let
|
|
4429
|
+
const tu = eu, 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");
|
|
4430
|
+
let ru = class {
|
|
4385
4431
|
constructor() {
|
|
4386
4432
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4387
4433
|
}
|
|
@@ -4435,71 +4481,71 @@ let eu = class {
|
|
|
4435
4481
|
}
|
|
4436
4482
|
prittyPrint() {
|
|
4437
4483
|
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());
|
|
4438
|
-
return
|
|
4484
|
+
return tu(r);
|
|
4439
4485
|
}
|
|
4440
4486
|
};
|
|
4441
|
-
var
|
|
4442
|
-
function
|
|
4487
|
+
var nu = ru, Pr = { exports: {} }, gr = { exports: {} }, Xt, vn;
|
|
4488
|
+
function iu() {
|
|
4443
4489
|
if (vn) return Xt;
|
|
4444
4490
|
vn = 1;
|
|
4445
4491
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4446
|
-
Xt = function(c,
|
|
4447
|
-
|
|
4448
|
-
var
|
|
4449
|
-
if (
|
|
4492
|
+
Xt = function(c, h) {
|
|
4493
|
+
h = h || {};
|
|
4494
|
+
var l = typeof c;
|
|
4495
|
+
if (l === "string" && c.length > 0)
|
|
4450
4496
|
return s(c);
|
|
4451
|
-
if (
|
|
4452
|
-
return
|
|
4497
|
+
if (l === "number" && isFinite(c))
|
|
4498
|
+
return h.long ? u(c) : a(c);
|
|
4453
4499
|
throw new Error(
|
|
4454
4500
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(c)
|
|
4455
4501
|
);
|
|
4456
4502
|
};
|
|
4457
4503
|
function s(c) {
|
|
4458
4504
|
if (c = String(c), !(c.length > 100)) {
|
|
4459
|
-
var
|
|
4505
|
+
var h = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
4460
4506
|
c
|
|
4461
4507
|
);
|
|
4462
|
-
if (
|
|
4463
|
-
var
|
|
4464
|
-
switch (
|
|
4508
|
+
if (h) {
|
|
4509
|
+
var l = parseFloat(h[1]), g = (h[2] || "ms").toLowerCase();
|
|
4510
|
+
switch (g) {
|
|
4465
4511
|
case "years":
|
|
4466
4512
|
case "year":
|
|
4467
4513
|
case "yrs":
|
|
4468
4514
|
case "yr":
|
|
4469
4515
|
case "y":
|
|
4470
|
-
return
|
|
4516
|
+
return l * o;
|
|
4471
4517
|
case "weeks":
|
|
4472
4518
|
case "week":
|
|
4473
4519
|
case "w":
|
|
4474
|
-
return
|
|
4520
|
+
return l * i;
|
|
4475
4521
|
case "days":
|
|
4476
4522
|
case "day":
|
|
4477
4523
|
case "d":
|
|
4478
|
-
return
|
|
4524
|
+
return l * n;
|
|
4479
4525
|
case "hours":
|
|
4480
4526
|
case "hour":
|
|
4481
4527
|
case "hrs":
|
|
4482
4528
|
case "hr":
|
|
4483
4529
|
case "h":
|
|
4484
|
-
return
|
|
4530
|
+
return l * r;
|
|
4485
4531
|
case "minutes":
|
|
4486
4532
|
case "minute":
|
|
4487
4533
|
case "mins":
|
|
4488
4534
|
case "min":
|
|
4489
4535
|
case "m":
|
|
4490
|
-
return
|
|
4536
|
+
return l * e;
|
|
4491
4537
|
case "seconds":
|
|
4492
4538
|
case "second":
|
|
4493
4539
|
case "secs":
|
|
4494
4540
|
case "sec":
|
|
4495
4541
|
case "s":
|
|
4496
|
-
return
|
|
4542
|
+
return l * t;
|
|
4497
4543
|
case "milliseconds":
|
|
4498
4544
|
case "millisecond":
|
|
4499
4545
|
case "msecs":
|
|
4500
4546
|
case "msec":
|
|
4501
4547
|
case "ms":
|
|
4502
|
-
return
|
|
4548
|
+
return l;
|
|
4503
4549
|
default:
|
|
4504
4550
|
return;
|
|
4505
4551
|
}
|
|
@@ -4507,86 +4553,86 @@ function ru() {
|
|
|
4507
4553
|
}
|
|
4508
4554
|
}
|
|
4509
4555
|
function a(c) {
|
|
4510
|
-
var
|
|
4511
|
-
return
|
|
4556
|
+
var h = Math.abs(c);
|
|
4557
|
+
return h >= n ? Math.round(c / n) + "d" : h >= r ? Math.round(c / r) + "h" : h >= e ? Math.round(c / e) + "m" : h >= t ? Math.round(c / t) + "s" : c + "ms";
|
|
4512
4558
|
}
|
|
4513
4559
|
function u(c) {
|
|
4514
|
-
var
|
|
4515
|
-
return
|
|
4560
|
+
var h = Math.abs(c);
|
|
4561
|
+
return h >= n ? f(c, h, n, "day") : h >= r ? f(c, h, r, "hour") : h >= e ? f(c, h, e, "minute") : h >= t ? f(c, h, t, "second") : c + " ms";
|
|
4516
4562
|
}
|
|
4517
|
-
function f(c,
|
|
4518
|
-
var v =
|
|
4519
|
-
return Math.round(c /
|
|
4563
|
+
function f(c, h, l, g) {
|
|
4564
|
+
var v = h >= l * 1.5;
|
|
4565
|
+
return Math.round(c / l) + " " + g + (v ? "s" : "");
|
|
4520
4566
|
}
|
|
4521
4567
|
return Xt;
|
|
4522
4568
|
}
|
|
4523
|
-
function
|
|
4524
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4569
|
+
function ou(t) {
|
|
4570
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = iu(), r.destroy = f, Object.keys(t).forEach((c) => {
|
|
4525
4571
|
r[c] = t[c];
|
|
4526
4572
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4527
4573
|
function e(c) {
|
|
4528
|
-
let
|
|
4529
|
-
for (let
|
|
4530
|
-
|
|
4531
|
-
return r.colors[Math.abs(
|
|
4574
|
+
let h = 0;
|
|
4575
|
+
for (let l = 0; l < c.length; l++)
|
|
4576
|
+
h = (h << 5) - h + c.charCodeAt(l), h |= 0;
|
|
4577
|
+
return r.colors[Math.abs(h) % r.colors.length];
|
|
4532
4578
|
}
|
|
4533
4579
|
r.selectColor = e;
|
|
4534
4580
|
function r(c) {
|
|
4535
|
-
let
|
|
4536
|
-
function
|
|
4537
|
-
if (!
|
|
4581
|
+
let h, l = null, g, v;
|
|
4582
|
+
function w(...b) {
|
|
4583
|
+
if (!w.enabled)
|
|
4538
4584
|
return;
|
|
4539
|
-
const L =
|
|
4540
|
-
L.diff = Q, L.prev =
|
|
4585
|
+
const L = w, R = Number(/* @__PURE__ */ new Date()), Q = R - (h || R);
|
|
4586
|
+
L.diff = Q, L.prev = h, L.curr = R, h = R, b[0] = r.coerce(b[0]), typeof b[0] != "string" && b.unshift("%O");
|
|
4541
4587
|
let X = 0;
|
|
4542
|
-
b[0] = b[0].replace(/%([a-zA-Z%])/g, (
|
|
4543
|
-
if (
|
|
4588
|
+
b[0] = b[0].replace(/%([a-zA-Z%])/g, (V, T) => {
|
|
4589
|
+
if (V === "%%")
|
|
4544
4590
|
return "%";
|
|
4545
4591
|
X++;
|
|
4546
|
-
const
|
|
4547
|
-
if (typeof
|
|
4548
|
-
const
|
|
4549
|
-
|
|
4592
|
+
const ne = r.formatters[T];
|
|
4593
|
+
if (typeof ne == "function") {
|
|
4594
|
+
const ie = b[X];
|
|
4595
|
+
V = ne.call(L, ie), b.splice(X, 1), X--;
|
|
4550
4596
|
}
|
|
4551
|
-
return
|
|
4597
|
+
return V;
|
|
4552
4598
|
}), r.formatArgs.call(L, b), (L.log || r.log).apply(L, b);
|
|
4553
4599
|
}
|
|
4554
|
-
return
|
|
4600
|
+
return w.namespace = c, w.useColors = r.useColors(), w.color = r.selectColor(c), w.extend = n, w.destroy = r.destroy, Object.defineProperty(w, "enabled", {
|
|
4555
4601
|
enumerable: !0,
|
|
4556
4602
|
configurable: !1,
|
|
4557
|
-
get: () =>
|
|
4603
|
+
get: () => l !== null ? l : (g !== r.namespaces && (g = r.namespaces, v = r.enabled(c)), v),
|
|
4558
4604
|
set: (b) => {
|
|
4559
|
-
|
|
4605
|
+
l = b;
|
|
4560
4606
|
}
|
|
4561
|
-
}), typeof r.init == "function" && r.init(
|
|
4607
|
+
}), typeof r.init == "function" && r.init(w), w;
|
|
4562
4608
|
}
|
|
4563
|
-
function n(c,
|
|
4564
|
-
const
|
|
4565
|
-
return
|
|
4609
|
+
function n(c, h) {
|
|
4610
|
+
const l = r(this.namespace + (typeof h > "u" ? ":" : h) + c);
|
|
4611
|
+
return l.log = this.log, l;
|
|
4566
4612
|
}
|
|
4567
4613
|
function i(c) {
|
|
4568
4614
|
r.save(c), r.namespaces = c, r.names = [], r.skips = [];
|
|
4569
|
-
let
|
|
4570
|
-
const
|
|
4571
|
-
for (
|
|
4572
|
-
h
|
|
4615
|
+
let h;
|
|
4616
|
+
const l = (typeof c == "string" ? c : "").split(/[\s,]+/), g = l.length;
|
|
4617
|
+
for (h = 0; h < g; h++)
|
|
4618
|
+
l[h] && (c = l[h].replace(/\*/g, ".*?"), c[0] === "-" ? r.skips.push(new RegExp("^" + c.slice(1) + "$")) : r.names.push(new RegExp("^" + c + "$")));
|
|
4573
4619
|
}
|
|
4574
4620
|
function o() {
|
|
4575
4621
|
const c = [
|
|
4576
4622
|
...r.names.map(a),
|
|
4577
|
-
...r.skips.map(a).map((
|
|
4623
|
+
...r.skips.map(a).map((h) => "-" + h)
|
|
4578
4624
|
].join(",");
|
|
4579
4625
|
return r.enable(""), c;
|
|
4580
4626
|
}
|
|
4581
4627
|
function s(c) {
|
|
4582
4628
|
if (c[c.length - 1] === "*")
|
|
4583
4629
|
return !0;
|
|
4584
|
-
let
|
|
4585
|
-
for (
|
|
4586
|
-
if (r.skips[
|
|
4630
|
+
let h, l;
|
|
4631
|
+
for (h = 0, l = r.skips.length; h < l; h++)
|
|
4632
|
+
if (r.skips[h].test(c))
|
|
4587
4633
|
return !1;
|
|
4588
|
-
for (
|
|
4589
|
-
if (r.names[
|
|
4634
|
+
for (h = 0, l = r.names.length; h < l; h++)
|
|
4635
|
+
if (r.names[h].test(c))
|
|
4590
4636
|
return !0;
|
|
4591
4637
|
return !1;
|
|
4592
4638
|
}
|
|
@@ -4601,7 +4647,7 @@ function nu(t) {
|
|
|
4601
4647
|
}
|
|
4602
4648
|
return r.enable(r.load()), r;
|
|
4603
4649
|
}
|
|
4604
|
-
var
|
|
4650
|
+
var su = ou;
|
|
4605
4651
|
(function(t, e) {
|
|
4606
4652
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4607
4653
|
let u = !1;
|
|
@@ -4698,10 +4744,10 @@ var iu = nu;
|
|
|
4698
4744
|
return;
|
|
4699
4745
|
const f = "color: " + this.color;
|
|
4700
4746
|
u.splice(1, 0, f, "color: inherit");
|
|
4701
|
-
let c = 0,
|
|
4702
|
-
u[0].replace(/%[a-zA-Z%]/g, (
|
|
4703
|
-
|
|
4704
|
-
}), u.splice(
|
|
4747
|
+
let c = 0, h = 0;
|
|
4748
|
+
u[0].replace(/%[a-zA-Z%]/g, (l) => {
|
|
4749
|
+
l !== "%%" && (c++, l === "%c" && (h = c));
|
|
4750
|
+
}), u.splice(h, 0, f);
|
|
4705
4751
|
}
|
|
4706
4752
|
e.log = console.debug || console.log || (() => {
|
|
4707
4753
|
});
|
|
@@ -4717,7 +4763,7 @@ var iu = nu;
|
|
|
4717
4763
|
u = e.storage.getItem("debug");
|
|
4718
4764
|
} catch {
|
|
4719
4765
|
}
|
|
4720
|
-
return !u && typeof
|
|
4766
|
+
return !u && typeof A < "u" && "env" in A && (u = A.env.DEBUG), u;
|
|
4721
4767
|
}
|
|
4722
4768
|
function s() {
|
|
4723
4769
|
try {
|
|
@@ -4725,7 +4771,7 @@ var iu = nu;
|
|
|
4725
4771
|
} catch {
|
|
4726
4772
|
}
|
|
4727
4773
|
}
|
|
4728
|
-
t.exports =
|
|
4774
|
+
t.exports = su(e);
|
|
4729
4775
|
const { formatters: a } = t.exports;
|
|
4730
4776
|
a.j = function(u) {
|
|
4731
4777
|
try {
|
|
@@ -4736,27 +4782,27 @@ var iu = nu;
|
|
|
4736
4782
|
};
|
|
4737
4783
|
})(gr, gr.exports);
|
|
4738
4784
|
var ui = gr.exports;
|
|
4739
|
-
const
|
|
4740
|
-
function
|
|
4785
|
+
const au = Rn, uu = Qn.EventEmitter, cu = Ft.inherits, j = ui("avvio"), { AVV_ERR_READY_TIMEOUT: lu } = ai, Zt = Symbol.for("plugin-meta");
|
|
4786
|
+
function du(t, e) {
|
|
4741
4787
|
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(`
|
|
4742
4788
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4743
4789
|
}
|
|
4744
|
-
function
|
|
4790
|
+
function fu() {
|
|
4745
4791
|
const t = {};
|
|
4746
4792
|
return t.promise = new Promise((e, r) => {
|
|
4747
4793
|
t.resolve = e, t.reject = r;
|
|
4748
4794
|
}), t;
|
|
4749
4795
|
}
|
|
4750
4796
|
function We(t, e, r, n, i) {
|
|
4751
|
-
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 =
|
|
4797
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = du(e, r), this.isAfter = n, this.q = au(t, hu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4752
4798
|
}
|
|
4753
|
-
|
|
4799
|
+
cu(We, uu);
|
|
4754
4800
|
We.prototype.exec = function(t, e) {
|
|
4755
4801
|
const r = this.func;
|
|
4756
4802
|
let n = !1;
|
|
4757
4803
|
const i = this.name;
|
|
4758
4804
|
if (this.parent._error && !this.isAfter) {
|
|
4759
|
-
j("skipping loading of plugin as parent errored and it is not an after", i),
|
|
4805
|
+
j("skipping loading of plugin as parent errored and it is not an after", i), A.nextTick(e);
|
|
4760
4806
|
return;
|
|
4761
4807
|
}
|
|
4762
4808
|
if (this.isAfter)
|
|
@@ -4778,13 +4824,13 @@ We.prototype.exec = function(t, e) {
|
|
|
4778
4824
|
};
|
|
4779
4825
|
this.timeout > 0 && (j("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4780
4826
|
j("timed out", i), o = null;
|
|
4781
|
-
const u = new
|
|
4827
|
+
const u = new lu(i);
|
|
4782
4828
|
u.fn = r, s(u);
|
|
4783
4829
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4784
4830
|
const a = r(this.server, this.opts, s);
|
|
4785
4831
|
a && typeof a.then == "function" && (j("exec: resolving promise", i), a.then(
|
|
4786
|
-
() =>
|
|
4787
|
-
(u) =>
|
|
4832
|
+
() => A.nextTick(s),
|
|
4833
|
+
(u) => A.nextTick(s, u)
|
|
4788
4834
|
));
|
|
4789
4835
|
};
|
|
4790
4836
|
We.prototype.loadedSoFar = function() {
|
|
@@ -4792,11 +4838,11 @@ We.prototype.loadedSoFar = function() {
|
|
|
4792
4838
|
return Promise.resolve();
|
|
4793
4839
|
const t = () => {
|
|
4794
4840
|
this.server.after((r, n) => {
|
|
4795
|
-
this._error = r, this.q.pause(), r ? (j("rejecting promise", this.name, r), this._promise.reject(r)) : (j("resolving promise", this.name), this._promise.resolve()), this._promise = null,
|
|
4841
|
+
this._error = r, this.q.pause(), r ? (j("rejecting promise", this.name, r), this._promise.reject(r)) : (j("resolving promise", this.name), this._promise.resolve()), this._promise = null, A.nextTick(n, r);
|
|
4796
4842
|
}), this.q.resume();
|
|
4797
4843
|
};
|
|
4798
4844
|
let e;
|
|
4799
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4845
|
+
return this._promise ? e = Promise.resolve() : (this._promise = fu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4800
4846
|
};
|
|
4801
4847
|
We.prototype.enqueue = function(t, e) {
|
|
4802
4848
|
j("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
@@ -4821,14 +4867,14 @@ We.prototype.finish = function(t, e) {
|
|
|
4821
4867
|
r();
|
|
4822
4868
|
else
|
|
4823
4869
|
j("delayed", this.name), this.q.drain = () => {
|
|
4824
|
-
j("drain", this.name), this.q.drain =
|
|
4870
|
+
j("drain", this.name), this.q.drain = pu, queueMicrotask(n);
|
|
4825
4871
|
};
|
|
4826
4872
|
};
|
|
4827
4873
|
queueMicrotask(n), this.q.resume();
|
|
4828
4874
|
};
|
|
4829
|
-
function
|
|
4875
|
+
function hu(t, e) {
|
|
4830
4876
|
const r = this;
|
|
4831
|
-
|
|
4877
|
+
A.nextTick(Nr.bind(r), t, e);
|
|
4832
4878
|
}
|
|
4833
4879
|
function Nr(t, e) {
|
|
4834
4880
|
if (typeof t.func.then == "function") {
|
|
@@ -4844,19 +4890,19 @@ function Nr(t, e) {
|
|
|
4844
4890
|
});
|
|
4845
4891
|
});
|
|
4846
4892
|
}
|
|
4847
|
-
function
|
|
4893
|
+
function pu() {
|
|
4848
4894
|
}
|
|
4849
4895
|
Pr.exports = We;
|
|
4850
4896
|
Pr.exports.loadPlugin = Nr;
|
|
4851
|
-
var
|
|
4852
|
-
const bn = Rn,
|
|
4897
|
+
var yu = Pr.exports;
|
|
4898
|
+
const bn = Rn, gu = Qn.EventEmitter, mu = Ft.inherits, {
|
|
4853
4899
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
|
|
4854
4900
|
AVV_ERR_CALLBACK_NOT_FN: et,
|
|
4855
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4856
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4857
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4858
|
-
} = ai,
|
|
4859
|
-
function
|
|
4901
|
+
AVV_ERR_PLUGIN_NOT_VALID: vu,
|
|
4902
|
+
AVV_ERR_ROOT_PLG_BOOTED: bu,
|
|
4903
|
+
AVV_ERR_READY_TIMEOUT: Su
|
|
4904
|
+
} = ai, wu = nu, mr = yu, ze = ui("avvio"), Lt = Symbol("kAvvio"), tr = Symbol("kThenifyDoNotWrap");
|
|
4905
|
+
function Au(t, e, r) {
|
|
4860
4906
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
4861
4907
|
if (t[i])
|
|
4862
4908
|
throw new er(i);
|
|
@@ -4875,7 +4921,7 @@ function Su(t, e, r) {
|
|
|
4875
4921
|
}, t[a] = function(f) {
|
|
4876
4922
|
if (typeof f != "function")
|
|
4877
4923
|
throw new et(a, typeof f);
|
|
4878
|
-
return r.onClose(
|
|
4924
|
+
return r.onClose(_u(f, this)), this;
|
|
4879
4925
|
}, t[u] = function(f) {
|
|
4880
4926
|
if (f && typeof f != "function")
|
|
4881
4927
|
throw new et(u, typeof f);
|
|
@@ -4885,13 +4931,13 @@ function Su(t, e, r) {
|
|
|
4885
4931
|
function x(t, e, r) {
|
|
4886
4932
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
|
|
4887
4933
|
const n = new x(t, e, r);
|
|
4888
|
-
return t &&
|
|
4934
|
+
return t && Au(t, e, n), n;
|
|
4889
4935
|
}
|
|
4890
|
-
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
|
|
4936
|
+
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new wu(), this._readyQ = bn(this, li, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4891
4937
|
this.emit("start"), this._readyQ.drain = Sn;
|
|
4892
|
-
}, this._closeQ = bn(this,
|
|
4938
|
+
}, this._closeQ = bn(this, Ou, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4893
4939
|
this.emit("close"), this._closeQ.drain = Sn;
|
|
4894
|
-
}, this._doStart = null, this._root = new mr(this,
|
|
4940
|
+
}, this._doStart = null, this._root = new mr(this, Eu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
4895
4941
|
const s = this.pluginTree.start(null, i, o);
|
|
4896
4942
|
this._root.once("loaded", (a, u, f) => {
|
|
4897
4943
|
this.pluginTree.stop(s, f);
|
|
@@ -4911,19 +4957,19 @@ function x(t, e, r) {
|
|
|
4911
4957
|
this._readyQ.resume();
|
|
4912
4958
|
});
|
|
4913
4959
|
}
|
|
4914
|
-
function
|
|
4960
|
+
function Eu(t, e, r) {
|
|
4915
4961
|
this._doStart = r, e.autostart && this.start();
|
|
4916
4962
|
}
|
|
4917
|
-
|
|
4963
|
+
mu(x, gu);
|
|
4918
4964
|
x.prototype.start = function() {
|
|
4919
|
-
return this.started = !0,
|
|
4965
|
+
return this.started = !0, A.nextTick(this._doStart), this;
|
|
4920
4966
|
};
|
|
4921
4967
|
x.prototype.override = function(t, e, r) {
|
|
4922
4968
|
return t;
|
|
4923
4969
|
};
|
|
4924
|
-
function
|
|
4970
|
+
function Iu(t) {
|
|
4925
4971
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4926
|
-
throw new
|
|
4972
|
+
throw new vu(typeof t);
|
|
4927
4973
|
return t;
|
|
4928
4974
|
}
|
|
4929
4975
|
x.prototype[Lt] = !0;
|
|
@@ -4932,17 +4978,17 @@ x.prototype.use = function(t, e) {
|
|
|
4932
4978
|
};
|
|
4933
4979
|
x.prototype._loadRegistered = function() {
|
|
4934
4980
|
const t = this._current[0];
|
|
4935
|
-
return !this.started && !this.booted &&
|
|
4981
|
+
return !this.started && !this.booted && A.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4936
4982
|
};
|
|
4937
4983
|
Object.defineProperty(x.prototype, "then", { get: ci });
|
|
4938
4984
|
x.prototype._addPlugin = function(t, e, r) {
|
|
4939
|
-
if (t =
|
|
4940
|
-
throw new
|
|
4985
|
+
if (t = Iu(t), e = e || {}, this.booted)
|
|
4986
|
+
throw new bu();
|
|
4941
4987
|
const n = this._current[0], i = new mr(this, t, e, r);
|
|
4942
4988
|
if (i.once("start", (o, s, a) => {
|
|
4943
4989
|
const u = this.pluginTree.start(n.name, s, a);
|
|
4944
|
-
i.once("loaded", (f, c,
|
|
4945
|
-
this.pluginTree.stop(u,
|
|
4990
|
+
i.once("loaded", (f, c, h) => {
|
|
4991
|
+
this.pluginTree.stop(u, h);
|
|
4946
4992
|
});
|
|
4947
4993
|
}), n.loaded)
|
|
4948
4994
|
throw new Error(i.name, n.name);
|
|
@@ -4982,7 +5028,7 @@ x.prototype.close = function(t) {
|
|
|
4982
5028
|
};
|
|
4983
5029
|
});
|
|
4984
5030
|
return this.ready(() => {
|
|
4985
|
-
this._error = null, this._closeQ.push(t),
|
|
5031
|
+
this._error = null, this._closeQ.push(t), A.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
4986
5032
|
}), e;
|
|
4987
5033
|
};
|
|
4988
5034
|
x.prototype.ready = function(t) {
|
|
@@ -4996,7 +5042,7 @@ x.prototype.ready = function(t) {
|
|
|
4996
5042
|
this._readyQ.push(i), this.start();
|
|
4997
5043
|
const n = this._current[0].server;
|
|
4998
5044
|
function i(o, s, a) {
|
|
4999
|
-
o ? r(o) : e(n),
|
|
5045
|
+
o ? r(o) : e(n), A.nextTick(a);
|
|
5000
5046
|
}
|
|
5001
5047
|
});
|
|
5002
5048
|
};
|
|
@@ -5023,23 +5069,23 @@ function li(t, e) {
|
|
|
5023
5069
|
const r = this._server, n = this._error;
|
|
5024
5070
|
let i;
|
|
5025
5071
|
if (this._error = null, t.length === 0)
|
|
5026
|
-
this._error = n, i = t(), i && !i[Lt] && typeof i.then == "function" ? i.then(() =>
|
|
5072
|
+
this._error = n, i = t(), i && !i[Lt] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
|
|
5027
5073
|
else if (t.length === 1)
|
|
5028
|
-
i = t(n), i && !i[Lt] && typeof i.then == "function" ? i.then(() =>
|
|
5074
|
+
i = t(n), i && !i[Lt] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
|
|
5029
5075
|
else if (this._timeout === 0) {
|
|
5030
5076
|
const o = (s) => {
|
|
5031
5077
|
this._error = s, e(this._error);
|
|
5032
5078
|
};
|
|
5033
5079
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
5034
5080
|
} else
|
|
5035
|
-
|
|
5081
|
+
Tu.call(this, t, n, r, e);
|
|
5036
5082
|
}
|
|
5037
|
-
function
|
|
5083
|
+
function Tu(t, e, r, n) {
|
|
5038
5084
|
const i = t.name;
|
|
5039
5085
|
ze("setting up ready timeout", i, this._timeout);
|
|
5040
5086
|
let o = setTimeout(() => {
|
|
5041
5087
|
ze("timed out", i), o = null;
|
|
5042
|
-
const a = new
|
|
5088
|
+
const a = new Su(i);
|
|
5043
5089
|
a.fn = t, this._error = a, n(a);
|
|
5044
5090
|
}, this._timeout);
|
|
5045
5091
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5047,25 +5093,25 @@ function Eu(t, e, r, n) {
|
|
|
5047
5093
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
5048
5094
|
}
|
|
5049
5095
|
}
|
|
5050
|
-
function
|
|
5096
|
+
function Ou(t, e) {
|
|
5051
5097
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
5052
5098
|
if (t.length === 0 || t.length === 1) {
|
|
5053
5099
|
let i;
|
|
5054
5100
|
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (ze("resolving close/onClose promise"), i.then(
|
|
5055
|
-
() =>
|
|
5056
|
-
(o) =>
|
|
5057
|
-
)) :
|
|
5101
|
+
() => A.nextTick(e),
|
|
5102
|
+
(o) => A.nextTick(e, o)
|
|
5103
|
+
)) : A.nextTick(e);
|
|
5058
5104
|
} else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
5059
5105
|
}
|
|
5060
|
-
function
|
|
5106
|
+
function _u(t, e) {
|
|
5061
5107
|
return r.bind(e);
|
|
5062
5108
|
function r(n, i) {
|
|
5063
5109
|
let o;
|
|
5064
5110
|
t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
|
|
5065
|
-
|
|
5066
|
-
}, i) :
|
|
5067
|
-
|
|
5068
|
-
}, i) :
|
|
5111
|
+
A.nextTick(i);
|
|
5112
|
+
}, i) : A.nextTick(i)) : t.length === 1 ? (o = t(this), o && o.then ? o.then(function() {
|
|
5113
|
+
A.nextTick(i);
|
|
5114
|
+
}, i) : A.nextTick(i)) : t(this, i);
|
|
5069
5115
|
}
|
|
5070
5116
|
}
|
|
5071
5117
|
function rr(t, e) {
|
|
@@ -5073,10 +5119,10 @@ function rr(t, e) {
|
|
|
5073
5119
|
function r(n, i) {
|
|
5074
5120
|
let o;
|
|
5075
5121
|
t ? t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
|
|
5076
|
-
|
|
5077
|
-
}, i) :
|
|
5078
|
-
|
|
5079
|
-
}, i) :
|
|
5122
|
+
A.nextTick(i, n);
|
|
5123
|
+
}, i) : A.nextTick(i, n)) : t.length === 1 ? (o = t(n), o && o.then ? o.then(function() {
|
|
5124
|
+
A.nextTick(i);
|
|
5125
|
+
}, i) : A.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : A.nextTick(i);
|
|
5080
5126
|
}
|
|
5081
5127
|
}
|
|
5082
5128
|
Sr.exports = x;
|
|
@@ -5087,8 +5133,8 @@ Sr.exports.express = function(t) {
|
|
|
5087
5133
|
}
|
|
5088
5134
|
});
|
|
5089
5135
|
};
|
|
5090
|
-
var
|
|
5091
|
-
const
|
|
5136
|
+
var Lu = Sr.exports;
|
|
5137
|
+
const Cu = /* @__PURE__ */ ns(Lu);
|
|
5092
5138
|
(function() {
|
|
5093
5139
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5094
5140
|
return;
|
|
@@ -5106,9 +5152,9 @@ const _u = /* @__PURE__ */ ts(Ou);
|
|
|
5106
5152
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5107
5153
|
}
|
|
5108
5154
|
})();
|
|
5109
|
-
function
|
|
5110
|
-
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 =
|
|
5111
|
-
return s.use(
|
|
5155
|
+
function Zu(t, e = !0, r = !0, n) {
|
|
5156
|
+
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = Cu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5157
|
+
return s.use(Fo), s.use(_o, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Po, { videoPlayerController: n?.videoPlayerController }), s.use(No, { onContentActivate: n?.onContentActivate }), s.use(Ki, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Ji), s.use(ko), s.use(Ko), s.use(mo), s.use(rs), s.after((a, u, f) => {
|
|
5112
5158
|
if (a)
|
|
5113
5159
|
throw a;
|
|
5114
5160
|
u.ready(), f();
|
|
@@ -5121,5 +5167,5 @@ function Ju(t, e = !0, r = !0, n) {
|
|
|
5121
5167
|
}), s;
|
|
5122
5168
|
}
|
|
5123
5169
|
export {
|
|
5124
|
-
|
|
5170
|
+
Zu as StreamLayer
|
|
5125
5171
|
};
|