@streamlayer/sdk-web 0.33.4 → 0.33.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +5 -5
- package/lib/es/index.js +860 -808
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { pino as
|
|
2
|
-
import { QuestionType as D, QuestionStatus as ce, SilenceSetting as
|
|
3
|
-
import { PickHistoryStatus as
|
|
1
|
+
import { pino as ci } from "pino";
|
|
2
|
+
import { QuestionType as D, QuestionStatus as ce, SilenceSetting as li } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
|
+
import { PickHistoryStatus as st } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as N } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
|
-
import { InvitationCategory as
|
|
6
|
-
import { computed as
|
|
7
|
-
import { nanoid as
|
|
8
|
-
import { ConnectError as
|
|
9
|
-
import { createGrpcWebTransport as
|
|
10
|
-
import { nanoquery as
|
|
11
|
-
import { Events as
|
|
12
|
-
import { Client as
|
|
13
|
-
import { Users as
|
|
14
|
-
import { Feed as
|
|
15
|
-
import { Leaderboard as
|
|
5
|
+
import { InvitationCategory as Pr, InvitationFrom as Fr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
+
import { computed as di, map as fi, atom as It, batched as Nr, onMount as pr } from "nanostores";
|
|
7
|
+
import { nanoid as Zt } from "nanoid";
|
|
8
|
+
import { ConnectError as Xe, Code as ee, createContextKey as Dr, createPromiseClient as Rr, createContextValues as hi } from "@connectrpc/connect";
|
|
9
|
+
import { createGrpcWebTransport as $r } from "@connectrpc/connect-web";
|
|
10
|
+
import { nanoquery as Vr } from "@nanostores/query";
|
|
11
|
+
import { Events as pi } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
|
+
import { Client as et } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
|
+
import { Users as yr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
|
+
import { Feed as be } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
+
import { Leaderboard as vn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
|
-
import { LinksClient as
|
|
18
|
-
import { Kind as H, TopicType as K, Category as Q, PollOpenedFrom as De, ScreenOrientation as
|
|
19
|
-
import { AnalyticsService as
|
|
20
|
-
import { InteractionActionType as
|
|
21
|
-
import { NotificationKind as ae, NotificationType as
|
|
22
|
-
function
|
|
17
|
+
import { LinksClient as yi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
+
import { Kind as H, TopicType as K, Category as Q, PollOpenedFrom as De, ScreenOrientation as jr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
|
+
import { AnalyticsService as bn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
|
+
import { InteractionActionType as Mr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
|
+
import { NotificationKind as ae, NotificationType as Ur } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
+
function gi(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
26
|
-
function
|
|
25
|
+
var Sn = { exports: {} }, V = Sn.exports = {}, te, re;
|
|
26
|
+
function er() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function tr() {
|
|
30
30
|
throw new Error("clearTimeout has not been defined");
|
|
31
31
|
}
|
|
32
32
|
(function() {
|
|
33
33
|
try {
|
|
34
|
-
typeof setTimeout == "function" ? te = setTimeout : te =
|
|
34
|
+
typeof setTimeout == "function" ? te = setTimeout : te = er;
|
|
35
35
|
} catch {
|
|
36
|
-
te =
|
|
36
|
+
te = er;
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
typeof clearTimeout == "function" ? re = clearTimeout : re =
|
|
39
|
+
typeof clearTimeout == "function" ? re = clearTimeout : re = tr;
|
|
40
40
|
} catch {
|
|
41
|
-
re =
|
|
41
|
+
re = tr;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
|
-
function
|
|
44
|
+
function wn(t) {
|
|
45
45
|
if (te === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
|
-
if ((te ===
|
|
47
|
+
if ((te === er || !te) && setTimeout)
|
|
48
48
|
return te = setTimeout, setTimeout(t, 0);
|
|
49
49
|
try {
|
|
50
50
|
return te(t, 0);
|
|
@@ -56,10 +56,10 @@ function an(t) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function mi(t) {
|
|
60
60
|
if (re === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
|
-
if ((re ===
|
|
62
|
+
if ((re === tr || !re) && clearTimeout)
|
|
63
63
|
return re = clearTimeout, clearTimeout(t);
|
|
64
64
|
try {
|
|
65
65
|
return re(t);
|
|
@@ -71,69 +71,69 @@ function ii(t) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var he = [], xe = !1, Ie,
|
|
75
|
-
function
|
|
76
|
-
!xe || !Ie || (xe = !1, Ie.length ? he = Ie.concat(he) :
|
|
74
|
+
var he = [], xe = !1, Ie, ct = -1;
|
|
75
|
+
function vi() {
|
|
76
|
+
!xe || !Ie || (xe = !1, Ie.length ? he = Ie.concat(he) : ct = -1, he.length && An());
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function An() {
|
|
79
79
|
if (!xe) {
|
|
80
|
-
var t =
|
|
80
|
+
var t = wn(vi);
|
|
81
81
|
xe = !0;
|
|
82
82
|
for (var e = he.length; e; ) {
|
|
83
|
-
for (Ie = he, he = []; ++
|
|
84
|
-
Ie && Ie[
|
|
85
|
-
|
|
83
|
+
for (Ie = he, he = []; ++ct < e; )
|
|
84
|
+
Ie && Ie[ct].run();
|
|
85
|
+
ct = -1, e = he.length;
|
|
86
86
|
}
|
|
87
|
-
Ie = null, xe = !1,
|
|
87
|
+
Ie = null, xe = !1, mi(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
V.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++)
|
|
94
94
|
e[r - 1] = arguments[r];
|
|
95
|
-
he.push(new
|
|
95
|
+
he.push(new En(t, e)), he.length === 1 && !xe && wn(An);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function En(t, e) {
|
|
98
98
|
this.fun = t, this.array = e;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
En.prototype.run = function() {
|
|
101
101
|
this.fun.apply(null, this.array);
|
|
102
102
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
V.title = "browser";
|
|
104
|
+
V.browser = !0;
|
|
105
|
+
V.env = {};
|
|
106
|
+
V.argv = [];
|
|
107
|
+
V.version = "";
|
|
108
|
+
V.versions = {};
|
|
109
109
|
function ge() {
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
V.on = ge;
|
|
112
|
+
V.addListener = ge;
|
|
113
|
+
V.once = ge;
|
|
114
|
+
V.off = ge;
|
|
115
|
+
V.removeListener = ge;
|
|
116
|
+
V.removeAllListeners = ge;
|
|
117
|
+
V.emit = ge;
|
|
118
|
+
V.prependListener = ge;
|
|
119
|
+
V.prependOnceListener = ge;
|
|
120
|
+
V.listeners = function(t) {
|
|
121
121
|
return [];
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
V.binding = function(t) {
|
|
124
124
|
throw new Error("process.binding is not supported");
|
|
125
125
|
};
|
|
126
|
-
|
|
126
|
+
V.cwd = function() {
|
|
127
127
|
return "/";
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
V.chdir = function(t) {
|
|
130
130
|
throw new Error("process.chdir is not supported");
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
V.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
const w = /* @__PURE__ */
|
|
135
|
+
var bi = Sn.exports;
|
|
136
|
+
const w = /* @__PURE__ */ gi(bi), Si = ci({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -141,23 +141,23 @@ const w = /* @__PURE__ */ ni(si), ai = Jn({
|
|
|
141
141
|
console.log(t);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}), Se = (t, e) =>
|
|
145
|
-
class
|
|
144
|
+
}), Se = (t, e) => Si.child({ name: t }, e);
|
|
145
|
+
class wi extends Event {
|
|
146
146
|
slEventBus;
|
|
147
147
|
constructor(e, r) {
|
|
148
148
|
super(e), this.slEventBus = r;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
class
|
|
151
|
+
const Ai = Se("event-bus");
|
|
152
|
+
class Ei {
|
|
153
153
|
name;
|
|
154
154
|
listeners;
|
|
155
155
|
constructor(e = "sl-event-bus") {
|
|
156
156
|
this.name = e, this.listeners = /* @__PURE__ */ new Set();
|
|
157
157
|
}
|
|
158
158
|
emit = (e, r) => {
|
|
159
|
-
const n = new
|
|
160
|
-
|
|
159
|
+
const n = new wi(this.name, { ...r, type: e });
|
|
160
|
+
Ai.debug(n, "Emitting event"), window.dispatchEvent(n);
|
|
161
161
|
};
|
|
162
162
|
listen(e) {
|
|
163
163
|
return window.addEventListener(this.name, e), this.listeners.add(e), () => {
|
|
@@ -173,10 +173,10 @@ class li {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class Ii {
|
|
177
177
|
}
|
|
178
178
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
179
|
-
class
|
|
179
|
+
class Tt {
|
|
180
180
|
/**
|
|
181
181
|
* store instance (nanostores)
|
|
182
182
|
*/
|
|
@@ -192,33 +192,33 @@ class Et {
|
|
|
192
192
|
return this.store;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const Ti = (t) => {
|
|
196
196
|
const e = Object.keys(t);
|
|
197
|
-
return
|
|
197
|
+
return di(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
198
198
|
};
|
|
199
|
-
class Te extends
|
|
199
|
+
class Te extends Tt {
|
|
200
200
|
getValues = () => this.getStore().get();
|
|
201
201
|
getValue = (e) => this.getStore().get()[e];
|
|
202
202
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
203
203
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
204
204
|
unsubscribe = () => this.getStore().off();
|
|
205
205
|
}
|
|
206
|
-
const ie = (t) =>
|
|
206
|
+
const ie = (t) => fi(t);
|
|
207
207
|
var le;
|
|
208
208
|
(function(t) {
|
|
209
209
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
210
210
|
})(le || (le = {}));
|
|
211
|
-
const
|
|
211
|
+
const Oi = {
|
|
212
212
|
[N.BETTING]: "betting",
|
|
213
213
|
[N.GAMES]: "games",
|
|
214
214
|
[N.PUBLIC_CHAT]: "publicChat",
|
|
215
215
|
[N.TWITTER]: "twitter"
|
|
216
216
|
};
|
|
217
|
-
var
|
|
217
|
+
var We;
|
|
218
218
|
(function(t) {
|
|
219
219
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
220
|
-
})(
|
|
221
|
-
class
|
|
220
|
+
})(We || (We = {}));
|
|
221
|
+
class In {
|
|
222
222
|
status;
|
|
223
223
|
source;
|
|
224
224
|
config;
|
|
@@ -226,7 +226,7 @@ class ln {
|
|
|
226
226
|
listeners = /* @__PURE__ */ new Set();
|
|
227
227
|
settingsKey;
|
|
228
228
|
constructor({ settings: e, ...r }, n) {
|
|
229
|
-
this.settingsKey =
|
|
229
|
+
this.settingsKey = Oi[r.type], this.status = It(We.Suspended), this.config = new Te(ie(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Te(ie(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Te(ie({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
230
230
|
}
|
|
231
231
|
get featureConfig() {
|
|
232
232
|
return this.config.getStore();
|
|
@@ -238,10 +238,10 @@ class ln {
|
|
|
238
238
|
this.listeners.add(e);
|
|
239
239
|
}
|
|
240
240
|
enable = () => {
|
|
241
|
-
this.status.set(
|
|
241
|
+
this.status.set(We.Ready);
|
|
242
242
|
};
|
|
243
243
|
disable = () => {
|
|
244
|
-
this.status.set(
|
|
244
|
+
this.status.set(We.Suspended);
|
|
245
245
|
};
|
|
246
246
|
setFeatureConfig = ({ settings: e, ...r }) => {
|
|
247
247
|
let n;
|
|
@@ -268,7 +268,7 @@ class ln {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
class W extends
|
|
271
|
+
class W extends Tt {
|
|
272
272
|
getValue = () => this.getStore().get();
|
|
273
273
|
getValues() {
|
|
274
274
|
throw new Error("not implemented");
|
|
@@ -283,11 +283,11 @@ class W extends Et {
|
|
|
283
283
|
return this.getStore().get();
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const B = (t) =>
|
|
287
|
-
class ye extends
|
|
286
|
+
const B = (t) => It(t);
|
|
287
|
+
class ye extends Tt {
|
|
288
288
|
atomStore;
|
|
289
289
|
constructor(e, r, n) {
|
|
290
|
-
super(e, `api:${r}`), this.atomStore =
|
|
290
|
+
super(e, `api:${r}`), this.atomStore = It(), n && e.subscribe((i) => {
|
|
291
291
|
const o = this.atomStore.get(), s = n(i, o);
|
|
292
292
|
o !== s && this.atomStore.set(s);
|
|
293
293
|
});
|
|
@@ -315,8 +315,8 @@ class ye extends Et {
|
|
|
315
315
|
key = () => this.getStore().key;
|
|
316
316
|
off = () => this.getStore().off();
|
|
317
317
|
}
|
|
318
|
-
const pe = new
|
|
319
|
-
async function*
|
|
318
|
+
const pe = new Ei();
|
|
319
|
+
async function* Ci(t, e) {
|
|
320
320
|
for await (const r of e) {
|
|
321
321
|
t.response.message = r, t.received_at = Date.now();
|
|
322
322
|
const n = {
|
|
@@ -326,7 +326,7 @@ async function* pi(t, e) {
|
|
|
326
326
|
window.postMessage(n), yield r;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const Li = () => (t) => async (e) => {
|
|
330
330
|
const r = {
|
|
331
331
|
name: e.url,
|
|
332
332
|
stream: e.stream,
|
|
@@ -350,7 +350,7 @@ const yi = () => (t) => async (e) => {
|
|
|
350
350
|
};
|
|
351
351
|
return window.postMessage(i), {
|
|
352
352
|
...n,
|
|
353
|
-
message:
|
|
353
|
+
message: Ci(r, n.message)
|
|
354
354
|
};
|
|
355
355
|
} else {
|
|
356
356
|
r.request.message = e.message, r.response.message = n.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -378,7 +378,7 @@ var Y;
|
|
|
378
378
|
(function(t) {
|
|
379
379
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
380
380
|
})(Y || (Y = {}));
|
|
381
|
-
class
|
|
381
|
+
class _i {
|
|
382
382
|
params;
|
|
383
383
|
streamCancel;
|
|
384
384
|
method;
|
|
@@ -432,7 +432,7 @@ class gi {
|
|
|
432
432
|
for await (const o of i)
|
|
433
433
|
this.attempt = 0, this.onData(o);
|
|
434
434
|
} catch (n) {
|
|
435
|
-
n instanceof
|
|
435
|
+
n instanceof Xe && n.code != ee.Canceled && this.onStreamError(n);
|
|
436
436
|
}
|
|
437
437
|
})(), this.updateState(Y.Connected);
|
|
438
438
|
};
|
|
@@ -472,7 +472,7 @@ class gi {
|
|
|
472
472
|
*/
|
|
473
473
|
onStreamError = (e) => {
|
|
474
474
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
475
|
-
if (e instanceof
|
|
475
|
+
if (e instanceof Xe && e.code !== ee.Canceled) {
|
|
476
476
|
this.updateState(Y.Failed), this.state.setValue("error", e), this.reconnect();
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
@@ -480,7 +480,7 @@ class gi {
|
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const ki = /* @__PURE__ */ new Set([
|
|
484
484
|
ee.Unknown,
|
|
485
485
|
ee.Internal,
|
|
486
486
|
ee.DeadlineExceeded,
|
|
@@ -488,33 +488,33 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
488
488
|
ee.FailedPrecondition,
|
|
489
489
|
ee.Unavailable,
|
|
490
490
|
ee.DataLoss
|
|
491
|
-
]),
|
|
492
|
-
const r = e.contextValues.get(
|
|
491
|
+
]), xr = Se("grpc:retry"), Pi = (t) => async (e) => {
|
|
492
|
+
const r = e.contextValues.get(rr.retryAttempts), n = 300, i = e.contextValues.get(rr.retryDelay);
|
|
493
493
|
if (e.stream || r === 0)
|
|
494
494
|
return t(e);
|
|
495
|
-
|
|
495
|
+
xr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
|
|
496
496
|
for (let o = 0; ; o++)
|
|
497
497
|
try {
|
|
498
498
|
return await t(e);
|
|
499
499
|
} catch (s) {
|
|
500
|
-
|
|
501
|
-
const a =
|
|
502
|
-
if (o >= r || !(a instanceof
|
|
500
|
+
xr.trace({ attempt: o, error: s }, "retry attempt");
|
|
501
|
+
const a = Xe.from(s);
|
|
502
|
+
if (o >= r || !(a instanceof Xe) || !ki.has(a.code))
|
|
503
503
|
throw s;
|
|
504
504
|
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
505
505
|
await new Promise((c) => setTimeout(c, d));
|
|
506
506
|
}
|
|
507
|
-
},
|
|
508
|
-
retryAttempts:
|
|
509
|
-
retryDelay:
|
|
510
|
-
},
|
|
507
|
+
}, rr = {
|
|
508
|
+
retryAttempts: Dr(10, { description: "Number of attempts to retry" }),
|
|
509
|
+
retryDelay: Dr(3e4, { description: "Max delay between retries in milliseconds" })
|
|
510
|
+
}, Fi = () => {
|
|
511
511
|
const t = localStorage.getItem("sl-device-id");
|
|
512
512
|
if (t)
|
|
513
513
|
return t;
|
|
514
|
-
const e =
|
|
514
|
+
const e = Zt();
|
|
515
515
|
return localStorage.setItem("sl-device-id", e), e;
|
|
516
|
-
},
|
|
517
|
-
class
|
|
516
|
+
}, Ni = () => navigator.userAgentData?.platform || navigator.platform;
|
|
517
|
+
class Br {
|
|
518
518
|
toJsonOptions = {
|
|
519
519
|
emitDefaultValues: !1,
|
|
520
520
|
enumAsInteger: !0,
|
|
@@ -534,19 +534,19 @@ class Pr {
|
|
|
534
534
|
opts;
|
|
535
535
|
constructor(e, r) {
|
|
536
536
|
this.host = e, this.opts = r, this.$headers = new Te(ie({
|
|
537
|
-
"sl-device-id":
|
|
538
|
-
"sl-device-os":
|
|
537
|
+
"sl-device-id": Fi(),
|
|
538
|
+
"sl-device-os": Ni()
|
|
539
539
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
540
|
-
const [n, i, o] =
|
|
540
|
+
const [n, i, o] = Vr({
|
|
541
541
|
dedupeTime: r?.dedupeTime,
|
|
542
542
|
refetchInterval: r?.refetchInterval
|
|
543
543
|
});
|
|
544
|
-
this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport =
|
|
544
|
+
this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport = $r({
|
|
545
545
|
baseUrl: e,
|
|
546
546
|
defaultTimeoutMs: 1e4,
|
|
547
547
|
interceptors: this.interceptors,
|
|
548
548
|
useBinaryFormat: !0
|
|
549
|
-
}), this.streamTransport =
|
|
549
|
+
}), this.streamTransport = $r({
|
|
550
550
|
baseUrl: e,
|
|
551
551
|
interceptors: this.interceptors,
|
|
552
552
|
useBinaryFormat: !0
|
|
@@ -559,7 +559,7 @@ class Pr {
|
|
|
559
559
|
const i = this.subscriptions.get(r);
|
|
560
560
|
if (i)
|
|
561
561
|
return i;
|
|
562
|
-
const o = new
|
|
562
|
+
const o = new _i(this.$headers, e, r, n);
|
|
563
563
|
return this.subscriptions.set(r, o), o;
|
|
564
564
|
};
|
|
565
565
|
removeSubscription = (e) => {
|
|
@@ -570,7 +570,7 @@ class Pr {
|
|
|
570
570
|
for (const [i, o] of this.subscriptions)
|
|
571
571
|
o.disconnect(), this.subscriptions.delete(i);
|
|
572
572
|
this.clients.clear(), this.streamClients.clear(), this.subscriptions.clear();
|
|
573
|
-
const [e, r, n] =
|
|
573
|
+
const [e, r, n] = Vr({
|
|
574
574
|
dedupeTime: 1e3 * 60 * 5,
|
|
575
575
|
refetchInterval: 1e3 * 60 * 5
|
|
576
576
|
});
|
|
@@ -586,14 +586,14 @@ class Pr {
|
|
|
586
586
|
const r = e.typeName;
|
|
587
587
|
if (this.clients.has(r))
|
|
588
588
|
return this.clients.get(r);
|
|
589
|
-
const n =
|
|
589
|
+
const n = Rr(e, this.transport);
|
|
590
590
|
return this.clients.set(r, n), n;
|
|
591
591
|
};
|
|
592
592
|
getStreamClient = (e) => {
|
|
593
593
|
const r = `stream-${e.typeName}`;
|
|
594
594
|
if (this.clients.has(r))
|
|
595
595
|
return this.clients.get(r);
|
|
596
|
-
const n =
|
|
596
|
+
const n = Rr(e, this.streamTransport);
|
|
597
597
|
return this.clients.set(r, n), n;
|
|
598
598
|
};
|
|
599
599
|
// create unary client, used for query request
|
|
@@ -604,9 +604,9 @@ class Pr {
|
|
|
604
604
|
...Array.isArray(r) ? r : [r]
|
|
605
605
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
606
606
|
return { client: i, createRequestOptions: (d) => {
|
|
607
|
-
const c =
|
|
607
|
+
const c = hi();
|
|
608
608
|
for (const f in d) {
|
|
609
|
-
const p =
|
|
609
|
+
const p = rr[f];
|
|
610
610
|
c.set(p, d[f]);
|
|
611
611
|
}
|
|
612
612
|
return c;
|
|
@@ -632,11 +632,11 @@ class Pr {
|
|
|
632
632
|
n.header.set(o, i[o]);
|
|
633
633
|
return r(n);
|
|
634
634
|
};
|
|
635
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
635
|
+
this.interceptors.push(e), this.interceptors.push(Li()), this.opts?.retryable && this.interceptors.push(Pi);
|
|
636
636
|
};
|
|
637
637
|
}
|
|
638
|
-
const
|
|
639
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
638
|
+
const Di = (t, e) => {
|
|
639
|
+
const { client: r, queryKey: n } = e.createPromiseClient(pi, {
|
|
640
640
|
method: "retrieveEventId",
|
|
641
641
|
params: [t]
|
|
642
642
|
});
|
|
@@ -653,29 +653,29 @@ const wi = (t, e) => {
|
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
});
|
|
656
|
-
},
|
|
657
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
656
|
+
}, Ri = (t, e) => {
|
|
657
|
+
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "getStream", params: [t] });
|
|
658
658
|
return e.nanoquery.createFetcherStore(n, {
|
|
659
659
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
660
660
|
id: s
|
|
661
661
|
// we are sure that id is a string
|
|
662
662
|
})).data?.attributes : void 0
|
|
663
663
|
});
|
|
664
|
-
},
|
|
665
|
-
const { queryKey: r, client: n } = e.createPromiseClient(
|
|
664
|
+
}, $i = (t, e) => {
|
|
665
|
+
const { queryKey: r, client: n } = e.createPromiseClient(yr, { method: "me", params: [t] });
|
|
666
666
|
return e.nanoquery.createFetcherStore(r, {
|
|
667
667
|
fetcher: () => n.me({})
|
|
668
668
|
});
|
|
669
|
-
},
|
|
670
|
-
const { client: e, createRequestOptions: r } = t.createPromiseClient(
|
|
669
|
+
}, Vi = (t) => {
|
|
670
|
+
const { client: e, createRequestOptions: r } = t.createPromiseClient(yr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
671
671
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
672
|
-
},
|
|
673
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
672
|
+
}, ji = (t, e) => {
|
|
673
|
+
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "get", params: [t] });
|
|
674
674
|
return e.nanoquery.createFetcherStore(n, {
|
|
675
675
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
676
676
|
});
|
|
677
|
-
},
|
|
678
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
677
|
+
}, Mi = (t, e) => {
|
|
678
|
+
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "getOrganization", params: [t] });
|
|
679
679
|
return e.nanoquery.createFetcherStore(n, {
|
|
680
680
|
fetcher: async () => {
|
|
681
681
|
const i = await r.getOrganization({});
|
|
@@ -685,26 +685,26 @@ const wi = (t, e) => {
|
|
|
685
685
|
} : void 0;
|
|
686
686
|
}
|
|
687
687
|
});
|
|
688
|
-
},
|
|
689
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
688
|
+
}, Ui = (t, e) => {
|
|
689
|
+
const { client: r, queryKey: n } = e.createPromiseClient(et, {
|
|
690
690
|
method: "getOrganizationAdvertising",
|
|
691
691
|
params: [t]
|
|
692
692
|
});
|
|
693
693
|
return e.nanoquery.createFetcherStore(n, {
|
|
694
694
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
695
695
|
});
|
|
696
|
-
},
|
|
697
|
-
t.transport = new
|
|
696
|
+
}, xi = (t, e, r) => {
|
|
697
|
+
t.transport = new Br(e.host, {
|
|
698
698
|
dedupeTime: 1e3 * 60 * 5,
|
|
699
699
|
refetchInterval: 1e3 * 60 * 5,
|
|
700
700
|
retryable: !0
|
|
701
|
-
}), t.analyticsTransport = new
|
|
701
|
+
}), t.analyticsTransport = new Br(e.analyticsHost), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), t.transport.$headers.subscribe((n) => {
|
|
702
702
|
t.analyticsTransport.$headers.getStore().set(n);
|
|
703
703
|
}), t.sdk.onMount({ name: "transport" }, () => () => {
|
|
704
704
|
t.transport.disconnect(), t.analyticsTransport.disconnect();
|
|
705
705
|
}), r();
|
|
706
706
|
};
|
|
707
|
-
class
|
|
707
|
+
class Ot {
|
|
708
708
|
delimiter = ":";
|
|
709
709
|
prefix;
|
|
710
710
|
storage;
|
|
@@ -732,7 +732,7 @@ var ue;
|
|
|
732
732
|
(function(t) {
|
|
733
733
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
734
734
|
})(ue || (ue = {}));
|
|
735
|
-
class je extends
|
|
735
|
+
class je extends Ot {
|
|
736
736
|
constructor() {
|
|
737
737
|
super("user");
|
|
738
738
|
}
|
|
@@ -759,19 +759,19 @@ var de;
|
|
|
759
759
|
(function(t) {
|
|
760
760
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
761
761
|
})(de || (de = {}));
|
|
762
|
-
const
|
|
763
|
-
const e = new je(), r = new W(B(e.getExternalToken()), "userKey"), n = new W(B(e.getToken()), "userToken"), i = new ye(
|
|
762
|
+
const Bi = (t) => {
|
|
763
|
+
const e = new je(), r = new W(B(e.getExternalToken()), "userKey"), n = new W(B(e.getToken()), "userToken"), i = new ye($i(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
|
|
764
764
|
if (!a)
|
|
765
765
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
|
|
766
|
-
}), o = new ye(
|
|
766
|
+
}), o = new ye(ji(n.getStore(), t), "userSettings");
|
|
767
767
|
return {
|
|
768
768
|
userKey: r,
|
|
769
769
|
userToken: n,
|
|
770
770
|
user: i,
|
|
771
771
|
userSettings: o
|
|
772
772
|
};
|
|
773
|
-
},
|
|
774
|
-
const e = new W(B(void 0), "providerStreamId"), r = new ye(
|
|
773
|
+
}, qi = (t) => {
|
|
774
|
+
const e = new W(B(void 0), "providerStreamId"), r = new ye(Di(e.getStore(), t), "slStreamId", (i) => i?.data), n = new ye(Ri(r.getAtomStore(), t), "streamSettings");
|
|
775
775
|
return r.getAtomStore().listen((i) => {
|
|
776
776
|
(i === "" || i === void 0) && n.getStore().mutate(void 0);
|
|
777
777
|
}), {
|
|
@@ -779,8 +779,8 @@ const _i = (t) => {
|
|
|
779
779
|
slStreamId: r,
|
|
780
780
|
streamSettings: n
|
|
781
781
|
};
|
|
782
|
-
},
|
|
783
|
-
const e = new W(B(void 0), "enabled"), r = new W(B(de.DISABLED), "status"), n = new ye(
|
|
782
|
+
}, Qi = (t) => {
|
|
783
|
+
const e = new W(B(void 0), "enabled"), r = new W(B(de.DISABLED), "status"), n = new ye(Mi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ye(Ui(n.getAtomStore(), t), "organizationAdvertising"), o = Bi(t), s = qi(t);
|
|
784
784
|
return {
|
|
785
785
|
enabled: e,
|
|
786
786
|
status: r,
|
|
@@ -795,10 +795,10 @@ const _i = (t) => {
|
|
|
795
795
|
organizationAdvertising: i
|
|
796
796
|
};
|
|
797
797
|
};
|
|
798
|
-
class
|
|
798
|
+
class Gi extends Tt {
|
|
799
799
|
stores;
|
|
800
800
|
constructor(e) {
|
|
801
|
-
const r =
|
|
801
|
+
const r = Qi(e), n = Ti(r);
|
|
802
802
|
super(n, "core"), this.stores = r;
|
|
803
803
|
}
|
|
804
804
|
getValue() {
|
|
@@ -819,26 +819,26 @@ class Fi extends Et {
|
|
|
819
819
|
};
|
|
820
820
|
unsubscribe = () => this.getStore().off();
|
|
821
821
|
}
|
|
822
|
-
const
|
|
823
|
-
t.store = new
|
|
822
|
+
const Ki = (t, e, r) => {
|
|
823
|
+
t.store = new Gi(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
824
824
|
t.store.unsubscribe();
|
|
825
825
|
}, r();
|
|
826
|
-
},
|
|
827
|
-
const { client: e } = t.createPromiseClient(
|
|
826
|
+
}, zi = (t) => {
|
|
827
|
+
const { client: e } = t.createPromiseClient(vn, { method: "list" });
|
|
828
828
|
return (r) => e.list(r);
|
|
829
|
-
},
|
|
830
|
-
const { client: e } = t.createPromiseClient(
|
|
829
|
+
}, Tn = (t) => {
|
|
830
|
+
const { client: e } = t.createPromiseClient(vn, { method: "summary" });
|
|
831
831
|
return (r) => e.summary(r);
|
|
832
|
-
},
|
|
833
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
832
|
+
}, Hi = (t, e) => {
|
|
833
|
+
const { client: r, queryKey: n } = e.createPromiseClient(yr, {
|
|
834
834
|
method: "getFriends",
|
|
835
835
|
params: [t]
|
|
836
836
|
});
|
|
837
837
|
return e.nanoquery.createFetcherStore(n, {
|
|
838
838
|
fetcher: async (i, o, s) => s ? (await r.getFriends({})).data : []
|
|
839
839
|
});
|
|
840
|
-
},
|
|
841
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
840
|
+
}, Wi = (t, e) => {
|
|
841
|
+
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "get", params: [t] });
|
|
842
842
|
return e.nanoquery.createFetcherStore(n, {
|
|
843
843
|
fetcher: async (i, o, s) => (await r.get({
|
|
844
844
|
eventId: s
|
|
@@ -846,8 +846,8 @@ const Ni = (t, e, r) => {
|
|
|
846
846
|
refetchInterval: 0,
|
|
847
847
|
dedupeTime: 1e3 * 60 * 60
|
|
848
848
|
});
|
|
849
|
-
},
|
|
850
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
849
|
+
}, Ji = (t, e) => {
|
|
850
|
+
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "syncQuestion", params: [t] });
|
|
851
851
|
return e.nanoquery.createFetcherStore(n, {
|
|
852
852
|
fetcher: async (i, o, s) => s ? (await r.syncQuestion({
|
|
853
853
|
filter: {
|
|
@@ -858,24 +858,24 @@ const Ni = (t, e, r) => {
|
|
|
858
858
|
// 10 minutes
|
|
859
859
|
refetchInterval: 0
|
|
860
860
|
});
|
|
861
|
-
},
|
|
862
|
-
const { client: r } = e.createStreamClient(
|
|
861
|
+
}, Yi = (t, e) => {
|
|
862
|
+
const { client: r } = e.createStreamClient(be), n = It({ eventId: t.get() || "", feedId: "" });
|
|
863
863
|
return t.subscribe((o = "") => {
|
|
864
864
|
n.set({ eventId: o, feedId: "" });
|
|
865
865
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
866
|
-
},
|
|
867
|
-
const { client: r } = e.createStreamClient(
|
|
866
|
+
}, Xi = (t, e) => {
|
|
867
|
+
const { client: r } = e.createStreamClient(be);
|
|
868
868
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
869
|
-
},
|
|
870
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
869
|
+
}, nr = (t, e) => {
|
|
870
|
+
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "questionByUser", params: [t] });
|
|
871
871
|
return e.nanoquery.createFetcherStore(n, {
|
|
872
872
|
fetcher: async (i, o, s) => (await r.questionByUser({
|
|
873
873
|
questionId: s
|
|
874
874
|
})).data?.attributes?.question,
|
|
875
875
|
dedupeTime: 1e3 * 60 * 5
|
|
876
876
|
});
|
|
877
|
-
},
|
|
878
|
-
const { client: n, queryKey: i } = r.createPromiseClient(
|
|
877
|
+
}, Zi = (t, e, r) => {
|
|
878
|
+
const { client: n, queryKey: i } = r.createPromiseClient(be, {
|
|
879
879
|
method: "list",
|
|
880
880
|
params: [t, e]
|
|
881
881
|
});
|
|
@@ -890,14 +890,14 @@ const Ni = (t, e, r) => {
|
|
|
890
890
|
dedupeTime: 0,
|
|
891
891
|
refetchInterval: 0
|
|
892
892
|
});
|
|
893
|
-
},
|
|
894
|
-
const n =
|
|
893
|
+
}, eo = (t, e, r) => {
|
|
894
|
+
const n = Nr([e, r], () => {
|
|
895
895
|
const a = e.get();
|
|
896
896
|
if (!a)
|
|
897
897
|
return;
|
|
898
898
|
const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
|
|
899
899
|
return u ? (u.openedFrom = d, u) : a.question;
|
|
900
|
-
}), i =
|
|
900
|
+
}), i = Nr(n, (a) => a && a.type === "question" ? a.id : void 0), o = nr(i, t);
|
|
901
901
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
902
902
|
const u = o.get().data, d = (c, f) => {
|
|
903
903
|
if (!c || !f)
|
|
@@ -926,7 +926,7 @@ var Oe;
|
|
|
926
926
|
(function(t) {
|
|
927
927
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
928
928
|
})(Oe || (Oe = {}));
|
|
929
|
-
class
|
|
929
|
+
class to {
|
|
930
930
|
/** sl event id */
|
|
931
931
|
slStreamId;
|
|
932
932
|
/** organization id */
|
|
@@ -958,11 +958,11 @@ class Bi {
|
|
|
958
958
|
transport;
|
|
959
959
|
cancels = /* @__PURE__ */ new Set();
|
|
960
960
|
constructor(e) {
|
|
961
|
-
this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new W(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new W(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new W(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ye(
|
|
962
|
-
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription =
|
|
961
|
+
this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new W(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new W(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new W(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ye(Wi(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ye(Zi(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = Ji(this.slStreamId, e.transport), this.openedQuestion = eo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
|
|
962
|
+
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = Xi(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
963
963
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
964
964
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
965
|
-
})), this.feedSubscription =
|
|
965
|
+
})), this.feedSubscription = Yi(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
966
966
|
const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
|
|
967
967
|
i && (n && i.status === ce.RESOLVED && i.id !== n || this.activeQuestionId.mutate(r.data?.attributes));
|
|
968
968
|
})), this.cancels.add(this.feedSubscription.addListener("moderation update", (r) => {
|
|
@@ -1007,7 +1007,7 @@ class Bi {
|
|
|
1007
1007
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1008
1008
|
};
|
|
1009
1009
|
}
|
|
1010
|
-
class
|
|
1010
|
+
class ro {
|
|
1011
1011
|
notificationsList;
|
|
1012
1012
|
store;
|
|
1013
1013
|
timeouts;
|
|
@@ -1092,7 +1092,7 @@ var gt;
|
|
|
1092
1092
|
(function(t) {
|
|
1093
1093
|
t.OPENED = "opened";
|
|
1094
1094
|
})(gt || (gt = {}));
|
|
1095
|
-
class
|
|
1095
|
+
class no extends Ot {
|
|
1096
1096
|
constructor() {
|
|
1097
1097
|
super("notification");
|
|
1098
1098
|
}
|
|
@@ -1104,15 +1104,15 @@ class Qi extends It {
|
|
|
1104
1104
|
this.clear();
|
|
1105
1105
|
};
|
|
1106
1106
|
}
|
|
1107
|
-
var
|
|
1107
|
+
var ve;
|
|
1108
1108
|
(function(t) {
|
|
1109
1109
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1110
|
-
})(
|
|
1111
|
-
class
|
|
1110
|
+
})(ve || (ve = {}));
|
|
1111
|
+
class io {
|
|
1112
1112
|
queue;
|
|
1113
1113
|
storage;
|
|
1114
1114
|
constructor(e = {}) {
|
|
1115
|
-
this.storage = new
|
|
1115
|
+
this.storage = new no(), this.queue = new ro({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1116
1116
|
}
|
|
1117
1117
|
add = (e) => {
|
|
1118
1118
|
if (!this.storage.isOpened(e.id)) {
|
|
@@ -1139,7 +1139,7 @@ class Gi {
|
|
|
1139
1139
|
if (!e?.size)
|
|
1140
1140
|
return null;
|
|
1141
1141
|
for (const n of e.values())
|
|
1142
|
-
if (n.type ===
|
|
1142
|
+
if (n.type === ve.ONBOARDING)
|
|
1143
1143
|
return n;
|
|
1144
1144
|
return e.values().next().value;
|
|
1145
1145
|
};
|
|
@@ -1148,31 +1148,31 @@ class Gi {
|
|
|
1148
1148
|
this.storage.setOpened(e);
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1152
|
-
t.notifications = new
|
|
1151
|
+
const oo = (t, e, r) => {
|
|
1152
|
+
t.notifications = new io(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1153
1153
|
t.notifications.queue.drain();
|
|
1154
1154
|
}), r();
|
|
1155
1155
|
};
|
|
1156
|
-
var
|
|
1156
|
+
var Ze;
|
|
1157
1157
|
(function(t) {
|
|
1158
1158
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1159
|
-
})(
|
|
1160
|
-
const
|
|
1161
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1159
|
+
})(Ze || (Ze = {}));
|
|
1160
|
+
const so = async (t, e) => {
|
|
1161
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1162
1162
|
try {
|
|
1163
1163
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1164
1164
|
} catch (o) {
|
|
1165
|
-
throw
|
|
1165
|
+
throw Xe.from(o)?.code === ee.AlreadyExists ? new Error(Ze.ALREADY_VOTED) : new Error(Ze.UNKNOWN);
|
|
1166
1166
|
}
|
|
1167
|
-
},
|
|
1168
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1167
|
+
}, ao = (t, e) => {
|
|
1168
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1169
1169
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1170
1170
|
};
|
|
1171
1171
|
var Me;
|
|
1172
1172
|
(function(t) {
|
|
1173
1173
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1174
1174
|
})(Me || (Me = {}));
|
|
1175
|
-
class
|
|
1175
|
+
class On extends Ot {
|
|
1176
1176
|
constructor() {
|
|
1177
1177
|
super("gamification");
|
|
1178
1178
|
}
|
|
@@ -1189,49 +1189,49 @@ class fn extends It {
|
|
|
1189
1189
|
return window.sessionStorage.getItem(i);
|
|
1190
1190
|
};
|
|
1191
1191
|
}
|
|
1192
|
-
const
|
|
1192
|
+
const uo = {
|
|
1193
1193
|
pageSize: 10
|
|
1194
|
-
},
|
|
1194
|
+
}, co = (t, e, r, n, i) => {
|
|
1195
1195
|
let o = 0;
|
|
1196
|
-
const s = B({ pageSize: i?.pageSize ||
|
|
1196
|
+
const s = B({ pageSize: i?.pageSize || uo.pageSize, page: 0 }), a = ie({
|
|
1197
1197
|
data: [],
|
|
1198
1198
|
key: Date.now(),
|
|
1199
1199
|
hasMore: !0,
|
|
1200
1200
|
loading: void 0,
|
|
1201
1201
|
error: void 0
|
|
1202
|
-
}), u =
|
|
1203
|
-
const p = e.get(), m = n.getStore().get().data?.map((
|
|
1202
|
+
}), u = zi(t), d = async () => {
|
|
1203
|
+
const p = e.get(), m = n.getStore().get().data?.map((v) => v.slId) || [];
|
|
1204
1204
|
if (p && m?.length) {
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1207
|
-
const
|
|
1205
|
+
const v = r.get();
|
|
1206
|
+
v && m.push(v), a.setKey("loading", !0), a.setKey("data", []);
|
|
1207
|
+
const b = await u({
|
|
1208
1208
|
eventId: p,
|
|
1209
1209
|
usersIds: m
|
|
1210
1210
|
});
|
|
1211
1211
|
a.set({
|
|
1212
|
-
data:
|
|
1212
|
+
data: b.data.map((_, $) => ({
|
|
1213
1213
|
..._.attributes,
|
|
1214
|
-
friendsRank:
|
|
1214
|
+
friendsRank: $ + 1
|
|
1215
1215
|
})),
|
|
1216
1216
|
hasMore: !1,
|
|
1217
1217
|
key: Date.now(),
|
|
1218
1218
|
loading: !1
|
|
1219
|
-
}),
|
|
1219
|
+
}), b.meta && (o = Math.round(b.meta.count / b.meta.pageSize));
|
|
1220
1220
|
}
|
|
1221
1221
|
}, c = () => {
|
|
1222
1222
|
d();
|
|
1223
1223
|
}, f = (p) => {
|
|
1224
|
-
const m = s.get(),
|
|
1225
|
-
|
|
1224
|
+
const m = s.get(), v = p || m.page + 1;
|
|
1225
|
+
v <= o && s.set({ ...m, page: v });
|
|
1226
1226
|
};
|
|
1227
|
-
return
|
|
1227
|
+
return pr(a, () => {
|
|
1228
1228
|
const p = e.listen(d), m = n.listen(d);
|
|
1229
1229
|
return () => {
|
|
1230
1230
|
p(), m();
|
|
1231
1231
|
};
|
|
1232
1232
|
}), { $store: a, fetchMore: f, invalidate: c };
|
|
1233
1233
|
};
|
|
1234
|
-
class
|
|
1234
|
+
class lo extends Ot {
|
|
1235
1235
|
get = this.read;
|
|
1236
1236
|
set = this.write;
|
|
1237
1237
|
del = this.remove;
|
|
@@ -1239,32 +1239,32 @@ class Yi extends It {
|
|
|
1239
1239
|
super("deep-link-context", window.sessionStorage);
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
|
-
const
|
|
1242
|
+
const qr = "sldl", Ct = "sldl_uid", Cn = "sldl_eid", Ln = "sldl_e_eid", fo = /* @__PURE__ */ new Set([Ct, Cn, Ln]), Qr = (t) => {
|
|
1243
1243
|
const e = {}, r = {};
|
|
1244
1244
|
for (const [n, i] of t)
|
|
1245
|
-
|
|
1245
|
+
fo.has(n) ? e[n] = i : r[n] = i;
|
|
1246
1246
|
return { result: e, remain: r };
|
|
1247
|
-
},
|
|
1248
|
-
if (t && t.includes(
|
|
1247
|
+
}, ho = ({ hash: t, search: e }) => {
|
|
1248
|
+
if (t && t.includes(qr)) {
|
|
1249
1249
|
const r = new URLSearchParams(t.substr(1));
|
|
1250
|
-
return { hash:
|
|
1250
|
+
return { hash: Qr(r) };
|
|
1251
1251
|
}
|
|
1252
|
-
if (e && e.includes(
|
|
1252
|
+
if (e && e.includes(qr)) {
|
|
1253
1253
|
const r = new URLSearchParams(e);
|
|
1254
|
-
return { search:
|
|
1254
|
+
return { search: Qr(r) };
|
|
1255
1255
|
}
|
|
1256
1256
|
return null;
|
|
1257
|
-
},
|
|
1257
|
+
}, Gr = Se("deep_link"), ne = {
|
|
1258
1258
|
debug: (...t) => {
|
|
1259
|
-
|
|
1259
|
+
Gr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1260
1260
|
},
|
|
1261
1261
|
trace: (...t) => {
|
|
1262
|
-
|
|
1262
|
+
Gr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1263
1263
|
}
|
|
1264
|
-
},
|
|
1264
|
+
}, po = (t, e) => {
|
|
1265
1265
|
const { hash: r, search: n } = window.location;
|
|
1266
1266
|
if (ne.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1267
|
-
const i =
|
|
1267
|
+
const i = ho({ hash: r, search: n });
|
|
1268
1268
|
if (ne.debug(i, "parse deep link result"), i) {
|
|
1269
1269
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1270
1270
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1283,8 +1283,8 @@ const Fr = "sldl", Tt = "sldl_uid", hn = "sldl_eid", pn = "sldl_e_eid", Xi = /*
|
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
t.setValue("parsed", !0);
|
|
1286
|
-
},
|
|
1287
|
-
const n = new
|
|
1286
|
+
}, yo = (t, e, r) => {
|
|
1287
|
+
const n = new lo(), i = n.get("sl-deep-link-store");
|
|
1288
1288
|
let o = {};
|
|
1289
1289
|
if (i)
|
|
1290
1290
|
try {
|
|
@@ -1305,7 +1305,7 @@ const Fr = "sldl", Tt = "sldl_uid", hn = "sldl_eid", pn = "sldl_e_eid", Xi = /*
|
|
|
1305
1305
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
1306
1306
|
}, t.sdk.getInviter = () => {
|
|
1307
1307
|
const { data: a, used: u } = t.deepLink.getDeepLinkData();
|
|
1308
|
-
return u ? a?.[
|
|
1308
|
+
return u ? a?.[Ct] : void 0;
|
|
1309
1309
|
}, t.sdk.inviteDisplayed = () => {
|
|
1310
1310
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
|
|
1311
1311
|
}, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
|
|
@@ -1322,15 +1322,15 @@ const Fr = "sldl", Tt = "sldl_uid", hn = "sldl_eid", pn = "sldl_e_eid", Xi = /*
|
|
|
1322
1322
|
console.error(d);
|
|
1323
1323
|
}
|
|
1324
1324
|
};
|
|
1325
|
-
|
|
1326
|
-
},
|
|
1327
|
-
class
|
|
1325
|
+
po(t.deepLink.$store, s), r();
|
|
1326
|
+
}, go = Se("bypass");
|
|
1327
|
+
class mo extends Ii {
|
|
1328
1328
|
$coreStore;
|
|
1329
1329
|
deepLink;
|
|
1330
1330
|
transport;
|
|
1331
1331
|
bypassLogin;
|
|
1332
1332
|
constructor(e, r, n) {
|
|
1333
|
-
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin =
|
|
1333
|
+
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Vi(this.transport), this.connect();
|
|
1334
1334
|
}
|
|
1335
1335
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1336
1336
|
/**
|
|
@@ -1341,8 +1341,8 @@ class no extends di {
|
|
|
1341
1341
|
*/
|
|
1342
1342
|
login = async (e, r) => {
|
|
1343
1343
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1344
|
-
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[
|
|
1345
|
-
|
|
1344
|
+
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Ct];
|
|
1345
|
+
go.debug({ inviterKey: o }, "login with inviterKey");
|
|
1346
1346
|
const s = await this.bypassLogin({
|
|
1347
1347
|
schema: e,
|
|
1348
1348
|
userKey: r,
|
|
@@ -1411,37 +1411,37 @@ class no extends di {
|
|
|
1411
1411
|
});
|
|
1412
1412
|
};
|
|
1413
1413
|
}
|
|
1414
|
-
const
|
|
1415
|
-
t.auth = new
|
|
1414
|
+
const He = new je(), vo = (t, e, r) => {
|
|
1415
|
+
t.auth = new mo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1416
1416
|
n === de.READY && t.auth.reLogin();
|
|
1417
1417
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1418
|
-
if (!(
|
|
1418
|
+
if (!(He.getSchema() === n && He.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
1419
1419
|
try {
|
|
1420
|
-
await t.auth.login(n, i),
|
|
1420
|
+
await t.auth.login(n, i), He.setSchema(n), He.setExternalToken(i);
|
|
1421
1421
|
} catch {
|
|
1422
1422
|
t.sdk.logout();
|
|
1423
1423
|
}
|
|
1424
1424
|
}, t.sdk.logout = () => {
|
|
1425
|
-
t.auth.logout(),
|
|
1425
|
+
t.auth.logout(), He.clear();
|
|
1426
1426
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1427
|
-
},
|
|
1427
|
+
}, Kr = Se("video_player"), at = {
|
|
1428
1428
|
debug: (...t) => {
|
|
1429
|
-
|
|
1429
|
+
Kr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1430
1430
|
},
|
|
1431
1431
|
trace: (...t) => {
|
|
1432
|
-
|
|
1432
|
+
Kr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1433
1433
|
}
|
|
1434
|
-
},
|
|
1434
|
+
}, bo = (t, e, r) => {
|
|
1435
1435
|
t.videoPlayer = {
|
|
1436
1436
|
controllers: /* @__PURE__ */ new Set()
|
|
1437
1437
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
1438
|
-
|
|
1438
|
+
at.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
|
|
1439
1439
|
}, e.videoPlayerController && t.sdk.addVideoPlayerController(e.videoPlayerController), t.sdk.removeVideoPlayerController = (n) => {
|
|
1440
|
-
|
|
1440
|
+
at.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
|
|
1441
1441
|
}, t.sdk.controlVideoPlayer = (n) => {
|
|
1442
|
-
|
|
1442
|
+
at.trace("controlling video player");
|
|
1443
1443
|
for (const i of t.videoPlayer.controllers) {
|
|
1444
|
-
|
|
1444
|
+
at.trace("calling video player controller");
|
|
1445
1445
|
try {
|
|
1446
1446
|
i(n);
|
|
1447
1447
|
} catch (o) {
|
|
@@ -1449,7 +1449,7 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
1451
|
}, r();
|
|
1452
|
-
},
|
|
1452
|
+
}, So = (t, e, r) => {
|
|
1453
1453
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1454
1454
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1455
1455
|
if (i.has(s)) {
|
|
@@ -1476,8 +1476,8 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1476
1476
|
}, t.sdk.createEventSession = (s) => {
|
|
1477
1477
|
t.stores.providerStreamId.setValue(s);
|
|
1478
1478
|
}, r();
|
|
1479
|
-
},
|
|
1480
|
-
const { client: r, queryKey: n } = t.createPromiseClient(
|
|
1479
|
+
}, wo = (t, e) => {
|
|
1480
|
+
const { client: r, queryKey: n } = t.createPromiseClient(et, {
|
|
1481
1481
|
method: "generateDeepLink",
|
|
1482
1482
|
params: e
|
|
1483
1483
|
});
|
|
@@ -1489,29 +1489,29 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1489
1489
|
// 24 hours
|
|
1490
1490
|
refetchInterval: 0
|
|
1491
1491
|
});
|
|
1492
|
-
},
|
|
1493
|
-
const { client: n } = t.createPromiseClient(
|
|
1492
|
+
}, Ao = (t, { web: e, mobile: r }) => {
|
|
1493
|
+
const { client: n } = t.createPromiseClient(yi, { method: "generate" });
|
|
1494
1494
|
return n.generate({ web: e, mobile: r });
|
|
1495
|
-
},
|
|
1495
|
+
}, zr = (t, e) => {
|
|
1496
1496
|
const r = new URLSearchParams(t);
|
|
1497
1497
|
for (const [n, i] of Object.entries(e))
|
|
1498
1498
|
r.append(n, i);
|
|
1499
1499
|
return r.toString();
|
|
1500
|
-
},
|
|
1500
|
+
}, Eo = (t, e, r, n) => {
|
|
1501
1501
|
const i = ie({});
|
|
1502
|
-
return
|
|
1503
|
-
const c = u ? "https://masters.com" : a?.url, f = n.get() || "", p = e.get() || "", m = r.get() || "",
|
|
1504
|
-
[
|
|
1505
|
-
[
|
|
1506
|
-
[
|
|
1502
|
+
return pr(i, () => wo(t, [e, r]).subscribe(async ({ data: a, error: u, loading: d }) => {
|
|
1503
|
+
const c = u ? "https://masters.com" : a?.url, f = n.get() || "", p = e.get() || "", m = r.get() || "", v = {
|
|
1504
|
+
[Ct]: f,
|
|
1505
|
+
[Cn]: p,
|
|
1506
|
+
[Ln]: m
|
|
1507
1507
|
};
|
|
1508
1508
|
if (!d && c) {
|
|
1509
1509
|
i.setKey("loading", !0);
|
|
1510
|
-
let I = window.location.search,
|
|
1511
|
-
I &&
|
|
1512
|
-
const _ = window.location.origin + window.location.pathname + I +
|
|
1510
|
+
let I = window.location.search, b = window.location.hash;
|
|
1511
|
+
I && b || b ? I = `?${zr(I, v)}` : b = `#${zr("", v)}`;
|
|
1512
|
+
const _ = window.location.origin + window.location.pathname + I + b, $ = await Ao(t, { web: _, mobile: c });
|
|
1513
1513
|
i.set({
|
|
1514
|
-
data:
|
|
1514
|
+
data: $.data?.link,
|
|
1515
1515
|
loading: !1
|
|
1516
1516
|
});
|
|
1517
1517
|
} else
|
|
@@ -1522,10 +1522,10 @@ var U;
|
|
|
1522
1522
|
(function(t) {
|
|
1523
1523
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1524
1524
|
})(U || (U = {}));
|
|
1525
|
-
const
|
|
1525
|
+
const Io = (t, e, r, n) => {
|
|
1526
1526
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1527
1527
|
i && r.add({
|
|
1528
|
-
type:
|
|
1528
|
+
type: ve.ONBOARDING,
|
|
1529
1529
|
id: o,
|
|
1530
1530
|
action: t.openFeature,
|
|
1531
1531
|
persistent: !0,
|
|
@@ -1543,7 +1543,7 @@ const lo = (t, e, r, n) => {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
});
|
|
1546
|
-
},
|
|
1546
|
+
}, ut = (t, e, r, n, i, o) => {
|
|
1547
1547
|
try {
|
|
1548
1548
|
const s = e.userId.get();
|
|
1549
1549
|
if (!s)
|
|
@@ -1566,27 +1566,27 @@ const lo = (t, e, r, n) => {
|
|
|
1566
1566
|
} catch (s) {
|
|
1567
1567
|
console.error(s);
|
|
1568
1568
|
}
|
|
1569
|
-
},
|
|
1569
|
+
}, To = (t, e, r, n) => {
|
|
1570
1570
|
let i = !1;
|
|
1571
|
-
const o = new
|
|
1571
|
+
const o = new On(), s = B(U.Unset);
|
|
1572
1572
|
s.subscribe((d) => {
|
|
1573
|
-
d !== U.Unset && ((d === U.Optional || d === U.Required) && i === !1 && (
|
|
1573
|
+
d !== U.Unset && ((d === U.Optional || d === U.Required) && i === !1 && (Io(t, e, n, o), i = !0), d === U.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1574
1574
|
userId: e.userId.get() || "",
|
|
1575
1575
|
organizationId: e.organizationId.get() || "",
|
|
1576
1576
|
eventId: e.slStreamId.get() || ""
|
|
1577
1577
|
}));
|
|
1578
1578
|
});
|
|
1579
1579
|
const a = [];
|
|
1580
|
-
return
|
|
1581
|
-
d &&
|
|
1580
|
+
return ut(s, e, t, n, o, a), s.get() !== U.Completed && (a.push(e.userId.listen((d) => {
|
|
1581
|
+
d && ut(s, e, t, n, o, a);
|
|
1582
1582
|
})), a.push(e.moderation.listen((d) => {
|
|
1583
|
-
d.data &&
|
|
1583
|
+
d.data && ut(s, e, t, n, o, a);
|
|
1584
1584
|
})), a.push(t.featureSettings.listen((d) => {
|
|
1585
|
-
d &&
|
|
1585
|
+
d && ut(s, e, t, n, o, a);
|
|
1586
1586
|
}))), { $store: s, submitInplay: async () => {
|
|
1587
1587
|
const d = e.slStreamId.get();
|
|
1588
1588
|
if (d) {
|
|
1589
|
-
await
|
|
1589
|
+
await ao(r, d), s.set(U.Completed), o.saveOnboardingStatus({
|
|
1590
1590
|
organizationId: e.organizationId.get() || "",
|
|
1591
1591
|
userId: e.userId.get() || "",
|
|
1592
1592
|
eventId: d
|
|
@@ -1598,9 +1598,9 @@ const lo = (t, e, r, n) => {
|
|
|
1598
1598
|
n.close(c);
|
|
1599
1599
|
}
|
|
1600
1600
|
} };
|
|
1601
|
-
},
|
|
1602
|
-
const i = ie(void 0), o =
|
|
1603
|
-
const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((
|
|
1601
|
+
}, Oo = (t, e, r, n) => {
|
|
1602
|
+
const i = ie(void 0), o = Tn(n), s = async () => {
|
|
1603
|
+
const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((v) => v.slId);
|
|
1604
1604
|
if (!c)
|
|
1605
1605
|
return;
|
|
1606
1606
|
const f = {
|
|
@@ -1612,21 +1612,21 @@ const lo = (t, e, r, n) => {
|
|
|
1612
1612
|
}, a = () => {
|
|
1613
1613
|
s();
|
|
1614
1614
|
};
|
|
1615
|
-
return
|
|
1615
|
+
return pr(i, () => {
|
|
1616
1616
|
const u = t.listen(s), d = r.listen(s), c = e.listen(s);
|
|
1617
1617
|
return () => {
|
|
1618
1618
|
u(), d(), c();
|
|
1619
1619
|
};
|
|
1620
1620
|
}), { $store: i, invalidate: a };
|
|
1621
|
-
},
|
|
1622
|
-
const o =
|
|
1621
|
+
}, Co = async (t, e, r, n, i) => {
|
|
1622
|
+
const o = Tn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], d = {
|
|
1623
1623
|
eventId: s,
|
|
1624
1624
|
userId: n,
|
|
1625
1625
|
usersIds: [...u, a]
|
|
1626
1626
|
};
|
|
1627
1627
|
return (await o(d)).data?.attributes?.summary;
|
|
1628
|
-
},
|
|
1629
|
-
class
|
|
1628
|
+
}, Lo = /* @__PURE__ */ new Set([D.POLL, D.PREDICTION, D.TRIVIA]);
|
|
1629
|
+
class _o extends In {
|
|
1630
1630
|
/** user statistics (leaderboard panel) */
|
|
1631
1631
|
userSummary;
|
|
1632
1632
|
/** feed list (pick history) */
|
|
@@ -1660,14 +1660,8 @@ class go extends ln {
|
|
|
1660
1660
|
submitAnswerTimeout;
|
|
1661
1661
|
cancels = /* @__PURE__ */ new Set();
|
|
1662
1662
|
constructor(e, r, n) {
|
|
1663
|
-
super(e, r), this.background = new
|
|
1663
|
+
super(e, r), this.background = new to(n), this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new On(), this.feedList = this.background.feedList, this.friends = new ye(Hi(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = B(void 0), this.leaderboardId = new W(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = To(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(N.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Eo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Oo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = co(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
|
|
1664
1664
|
o?.summary && i?.summary && !i.fromLeaderboard && this.leaderboardList.invalidate();
|
|
1665
|
-
})), this.cancels.add(this.leaderboardList.$store.subscribe((i) => {
|
|
1666
|
-
const o = { ...this.userSummary.$store.get() || {} }, s = o?.summary?.userId;
|
|
1667
|
-
if (i.data.length && s) {
|
|
1668
|
-
const a = i.data.find((u) => u.userId === s)?.rank;
|
|
1669
|
-
a !== void 0 && o?.summary && (o.fromLeaderboard = !0, o.summary.friendsRank = a, this.userSummary.$store.set(o));
|
|
1670
|
-
}
|
|
1671
1665
|
})), this.cancels.add(this.background.activeQuestionId.listen(this.showInApp)), 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)), n.sdk.onMount({ name: "gamification", clear: !0 }, () => () => {
|
|
1672
1666
|
for (const i of this.cancels)
|
|
1673
1667
|
i(), this.cancels.delete(i);
|
|
@@ -1693,41 +1687,41 @@ class go extends ln {
|
|
|
1693
1687
|
prefix: `notification-id:${s}`
|
|
1694
1688
|
}), d = [...this.feedList.getValues().data || []], c = d.findIndex((q) => q.id === s), f = d[c];
|
|
1695
1689
|
let p = f?.attributes?.attributes?.value?.answerId;
|
|
1696
|
-
const m =
|
|
1690
|
+
const m = nr(s, this.transport), v = m.subscribe(() => {
|
|
1697
1691
|
});
|
|
1698
1692
|
await m.get().promise;
|
|
1699
1693
|
const I = m.get().data;
|
|
1700
|
-
|
|
1694
|
+
v(), window.requestAnimationFrame(() => {
|
|
1701
1695
|
m.invalidate();
|
|
1702
1696
|
}), p || (p = I?.answers.find(({ youVoted: q }) => q)?.id);
|
|
1703
|
-
const
|
|
1697
|
+
const b = a.find(({ correct: q }) => q), _ = p ? a.find(({ id: q }) => q === p) : void 0, $ = !!_?.correct;
|
|
1704
1698
|
if (f && d[c]?.attributes?.attributes.case === "question") {
|
|
1705
1699
|
try {
|
|
1706
|
-
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status =
|
|
1700
|
+
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = $ ? st.WON : st.LOST);
|
|
1707
1701
|
} catch {
|
|
1708
1702
|
}
|
|
1709
1703
|
this.feedList.getStore().mutate(d);
|
|
1710
1704
|
}
|
|
1711
|
-
if (!_ || !
|
|
1705
|
+
if (!_ || !b)
|
|
1712
1706
|
return;
|
|
1713
1707
|
this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
|
|
1714
|
-
type:
|
|
1708
|
+
type: ve.QUESTION_RESOLVED,
|
|
1715
1709
|
action: () => this.openQuestion(r.id, n),
|
|
1716
1710
|
close: () => this.closeQuestion(s),
|
|
1717
|
-
autoHideDuration:
|
|
1711
|
+
autoHideDuration: $ ? 15e3 : 12e3,
|
|
1718
1712
|
id: u,
|
|
1719
1713
|
emitEvent: !1,
|
|
1720
1714
|
data: {
|
|
1721
1715
|
questionId: s,
|
|
1722
1716
|
questionType: D.PREDICTION,
|
|
1723
1717
|
question: {
|
|
1724
|
-
title:
|
|
1718
|
+
title: $ ? `Congratulations! You answered correctly! You won ${b.points} pts!` : `Better luck next time! Correct: ${b?.text}!`,
|
|
1725
1719
|
votedAnswer: {
|
|
1726
1720
|
title: _?.text,
|
|
1727
1721
|
points: _?.points
|
|
1728
1722
|
},
|
|
1729
|
-
correctAnswerTitle:
|
|
1730
|
-
correct:
|
|
1723
|
+
correctAnswerTitle: b?.text,
|
|
1724
|
+
correct: !!$,
|
|
1731
1725
|
predictionResult: i === ce.RESOLVED,
|
|
1732
1726
|
questionTitle: r?.subject
|
|
1733
1727
|
}
|
|
@@ -1797,7 +1791,7 @@ class go extends ln {
|
|
|
1797
1791
|
this.background.feedSubscription.removeListener("feed-subscription-prediction-close"), this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
1798
1792
|
};
|
|
1799
1793
|
submitAnswer = async (e, r) => {
|
|
1800
|
-
const n =
|
|
1794
|
+
const n = nr(e, this.transport), i = n.subscribe(() => {
|
|
1801
1795
|
}), o = { ...n.get().data || {} }, s = () => {
|
|
1802
1796
|
const a = this.feedList.getValues().data;
|
|
1803
1797
|
if (!a)
|
|
@@ -1813,9 +1807,9 @@ class go extends ln {
|
|
|
1813
1807
|
});
|
|
1814
1808
|
const f = n.get().data;
|
|
1815
1809
|
if (i(), f) {
|
|
1816
|
-
const p = f.answers.find((
|
|
1817
|
-
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text =
|
|
1818
|
-
|
|
1810
|
+
const p = f.answers.find((b) => b.correct === !0), m = f.answers.findIndex((b) => b.id === r), v = f.answers[m], I = f.answers.every(({ percentageDecimal: b }, _) => b === o?.answers[_].percentageDecimal);
|
|
1811
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = v?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? st.WON : st.LOST), this.feedList.getStore().mutate([...a]), f.answers[m].correct = p?.id === r, f.answers[m].youVoted = !0, I && f.answers.forEach((b) => {
|
|
1812
|
+
b.percentageDecimal = 0;
|
|
1819
1813
|
}), p?.id === r && (f.answers[m].pointsEarned = f.status === ce.RESOLVED ? 0 : p.points), n.mutate({ ...f });
|
|
1820
1814
|
}
|
|
1821
1815
|
this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
|
|
@@ -1824,9 +1818,9 @@ class go extends ln {
|
|
|
1824
1818
|
}
|
|
1825
1819
|
};
|
|
1826
1820
|
try {
|
|
1827
|
-
await
|
|
1821
|
+
await so(this.transport, { questionId: e, answerId: r }), s();
|
|
1828
1822
|
} catch (a) {
|
|
1829
|
-
if (a.message ===
|
|
1823
|
+
if (a.message === Ze.ALREADY_VOTED) {
|
|
1830
1824
|
this.userSummary.invalidate();
|
|
1831
1825
|
const u = n.subscribe(() => {
|
|
1832
1826
|
});
|
|
@@ -1868,7 +1862,7 @@ class go extends ln {
|
|
|
1868
1862
|
}
|
|
1869
1863
|
const n = { ...r };
|
|
1870
1864
|
try {
|
|
1871
|
-
const i = await
|
|
1865
|
+
const i = await Co(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
1872
1866
|
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);
|
|
1873
1867
|
} catch (i) {
|
|
1874
1868
|
console.error(i);
|
|
@@ -1886,10 +1880,10 @@ class go extends ln {
|
|
|
1886
1880
|
*/
|
|
1887
1881
|
showInApp = (e) => {
|
|
1888
1882
|
const r = this.onboardingStatus.$store.get();
|
|
1889
|
-
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 !==
|
|
1890
|
-
if (
|
|
1883
|
+
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 !== li.ON && e.data.question.status === ce.ACTIVE && !e.data.question.marketClosed) {
|
|
1884
|
+
if (Lo.has(e.data.question.type))
|
|
1891
1885
|
this.isInteractiveAllowed && this.notifications.add({
|
|
1892
|
-
type:
|
|
1886
|
+
type: ve.QUESTION,
|
|
1893
1887
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
1894
1888
|
close: () => this.closeQuestion(e.data?.question?.id),
|
|
1895
1889
|
autoHideDuration: 1e3 * 60,
|
|
@@ -1923,7 +1917,7 @@ class go extends ln {
|
|
|
1923
1917
|
}
|
|
1924
1918
|
};
|
|
1925
1919
|
this.notifications.add({
|
|
1926
|
-
type:
|
|
1920
|
+
type: ve.QUESTION,
|
|
1927
1921
|
action: () => this.openQuestion(e?.data?.question?.id, e?.data?.feedItem),
|
|
1928
1922
|
close: () => this.closeQuestion(e?.data?.question?.id),
|
|
1929
1923
|
autoHideDuration: 1e3 * 120,
|
|
@@ -1946,7 +1940,7 @@ class go extends ln {
|
|
|
1946
1940
|
tweetId: e.data.question.id
|
|
1947
1941
|
};
|
|
1948
1942
|
this.notifications.add({
|
|
1949
|
-
type:
|
|
1943
|
+
type: ve.QUESTION,
|
|
1950
1944
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
1951
1945
|
close: () => this.closeQuestion(e.data?.question?.id),
|
|
1952
1946
|
autoHideDuration: 1e3 * 120,
|
|
@@ -1962,15 +1956,15 @@ class go extends ln {
|
|
|
1962
1956
|
}
|
|
1963
1957
|
};
|
|
1964
1958
|
}
|
|
1965
|
-
const
|
|
1959
|
+
const ko = {
|
|
1966
1960
|
[N.GAMES]: !0
|
|
1967
1961
|
};
|
|
1968
|
-
class
|
|
1962
|
+
class Po extends In {
|
|
1969
1963
|
constructor(e, r) {
|
|
1970
1964
|
super(e, r);
|
|
1971
1965
|
}
|
|
1972
1966
|
}
|
|
1973
|
-
const
|
|
1967
|
+
const Fo = (t, e, r) => t.type === N.GAMES ? new _o(t, e, r) : new Po(t, e), No = (t, e, r) => {
|
|
1974
1968
|
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new W(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new W(B(N.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) => {
|
|
1975
1969
|
t.activeFeature.setValue(n);
|
|
1976
1970
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
@@ -1981,8 +1975,8 @@ const vo = (t, e, r) => t.type === N.GAMES ? new go(t, e, r) : new bo(t, e), So
|
|
|
1981
1975
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
1982
1976
|
}
|
|
1983
1977
|
}, t.initFeature = (n, i = le.ORGANIZATION) => {
|
|
1984
|
-
if (n.type in
|
|
1985
|
-
const o =
|
|
1978
|
+
if (n.type in ko && !t.features.has(n.type)) {
|
|
1979
|
+
const o = Fo(n, i, t);
|
|
1986
1980
|
t.features.set(n.type, o);
|
|
1987
1981
|
let s = t.sdk.featuresList.getValue();
|
|
1988
1982
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2035,7 +2029,7 @@ const vo = (t, e, r) => t.type === N.GAMES ? new go(t, e, r) : new bo(t, e), So
|
|
|
2035
2029
|
t.store.subscribe(i);
|
|
2036
2030
|
}, r();
|
|
2037
2031
|
};
|
|
2038
|
-
class
|
|
2032
|
+
class Do {
|
|
2039
2033
|
analytics;
|
|
2040
2034
|
constructor(e) {
|
|
2041
2035
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2056,8 +2050,8 @@ class wo {
|
|
|
2056
2050
|
...this.analytics.commonStore.getValues(),
|
|
2057
2051
|
kind: H.INVITATION_ACCEPTED
|
|
2058
2052
|
},
|
|
2059
|
-
category:
|
|
2060
|
-
from:
|
|
2053
|
+
category: Pr.GAMES,
|
|
2054
|
+
from: Fr.UNSET
|
|
2061
2055
|
});
|
|
2062
2056
|
};
|
|
2063
2057
|
sent = ({ from: e }) => {
|
|
@@ -2066,12 +2060,12 @@ class wo {
|
|
|
2066
2060
|
...this.analytics.commonStore.getValues(),
|
|
2067
2061
|
kind: H.INVITATION_SENT
|
|
2068
2062
|
},
|
|
2069
|
-
category:
|
|
2070
|
-
from: e ||
|
|
2063
|
+
category: Pr.GAMES,
|
|
2064
|
+
from: e || Fr.UNSET
|
|
2071
2065
|
});
|
|
2072
2066
|
};
|
|
2073
2067
|
}
|
|
2074
|
-
class
|
|
2068
|
+
class Ro {
|
|
2075
2069
|
analytics;
|
|
2076
2070
|
constructor(e) {
|
|
2077
2071
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2095,7 +2089,7 @@ class Ao {
|
|
|
2095
2089
|
...this.analytics.commonStore.getValues(),
|
|
2096
2090
|
kind: H.INTERACTIONS
|
|
2097
2091
|
},
|
|
2098
|
-
actionType:
|
|
2092
|
+
actionType: Mr.TAP
|
|
2099
2093
|
});
|
|
2100
2094
|
};
|
|
2101
2095
|
scroll = () => {
|
|
@@ -2104,11 +2098,11 @@ class Ao {
|
|
|
2104
2098
|
...this.analytics.commonStore.getValues(),
|
|
2105
2099
|
kind: H.INTERACTIONS
|
|
2106
2100
|
},
|
|
2107
|
-
actionType:
|
|
2101
|
+
actionType: Mr.SCROLL
|
|
2108
2102
|
});
|
|
2109
2103
|
};
|
|
2110
2104
|
}
|
|
2111
|
-
const
|
|
2105
|
+
const Je = {
|
|
2112
2106
|
[D.UNSET]: K.UNSET,
|
|
2113
2107
|
[D.FACTOID]: K.POLLS_INSIGHT,
|
|
2114
2108
|
[D.POLL]: K.POLLS_POLL,
|
|
@@ -2118,7 +2112,7 @@ const Ye = {
|
|
|
2118
2112
|
[D.TWEET]: K.POLLS_TWITTER
|
|
2119
2113
|
};
|
|
2120
2114
|
D.UNSET + "", ae.UNSET, D.FACTOID + "", ae.POLLS, D.POLL + "", ae.POLLS, D.PREDICTION + "", ae.POLLS, D.PROMOTION + "", ae.POLLS, D.TRIVIA + "", ae.POLLS, D.TWEET + "", ae.POLLS;
|
|
2121
|
-
const
|
|
2115
|
+
const $o = {
|
|
2122
2116
|
[N.UNSET]: Q.UNSET,
|
|
2123
2117
|
[N.INPLAY]: Q.INPLAY,
|
|
2124
2118
|
[N.MESSAGING]: Q.MESSAGING,
|
|
@@ -2138,7 +2132,7 @@ const Eo = {
|
|
|
2138
2132
|
[N.HIGHLIGHTS]: Q.HIGHLIGHTS,
|
|
2139
2133
|
[N.PUBLIC_CHAT]: Q.PUBLIC_CHAT
|
|
2140
2134
|
};
|
|
2141
|
-
class
|
|
2135
|
+
class Vo {
|
|
2142
2136
|
analytics;
|
|
2143
2137
|
constructor(e) {
|
|
2144
2138
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2162,10 +2156,10 @@ class Io {
|
|
|
2162
2156
|
...this.analytics.commonStore.getValues(),
|
|
2163
2157
|
kind: H.NOTIFICATION_RECEIVED,
|
|
2164
2158
|
topicId: e,
|
|
2165
|
-
topicType: r ?
|
|
2159
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2166
2160
|
},
|
|
2167
2161
|
notificationKind: ae.POLLS,
|
|
2168
|
-
notificationType:
|
|
2162
|
+
notificationType: Ur.IN_APP
|
|
2169
2163
|
});
|
|
2170
2164
|
};
|
|
2171
2165
|
opened = ({ questionId: e, questionType: r }) => {
|
|
@@ -2174,14 +2168,14 @@ class Io {
|
|
|
2174
2168
|
...this.analytics.commonStore.getValues(),
|
|
2175
2169
|
kind: H.NOTIFICATION_OPENED,
|
|
2176
2170
|
topicId: e,
|
|
2177
|
-
topicType: r ?
|
|
2171
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2178
2172
|
},
|
|
2179
2173
|
notificationKind: ae.POLLS,
|
|
2180
|
-
notificationType:
|
|
2174
|
+
notificationType: Ur.IN_APP
|
|
2181
2175
|
});
|
|
2182
2176
|
};
|
|
2183
2177
|
}
|
|
2184
|
-
class
|
|
2178
|
+
class jo {
|
|
2185
2179
|
analytics;
|
|
2186
2180
|
constructor(e) {
|
|
2187
2181
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2215,7 +2209,7 @@ class To {
|
|
|
2215
2209
|
...this.analytics.commonStore.getValues(),
|
|
2216
2210
|
kind: H.POLLS_RECEIVED,
|
|
2217
2211
|
topicId: e,
|
|
2218
|
-
topicType: r ?
|
|
2212
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2219
2213
|
},
|
|
2220
2214
|
pollOpenedFrom: De.UNSET
|
|
2221
2215
|
});
|
|
@@ -2227,7 +2221,7 @@ class To {
|
|
|
2227
2221
|
...this.analytics.commonStore.getValues(),
|
|
2228
2222
|
kind: H.POLLS_OPENED,
|
|
2229
2223
|
topicId: e,
|
|
2230
|
-
topicType: r ?
|
|
2224
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2231
2225
|
},
|
|
2232
2226
|
pollOpenedFrom: n === "list" ? De.PICK_HISTORY : De.IN_APP
|
|
2233
2227
|
});
|
|
@@ -2239,7 +2233,7 @@ class To {
|
|
|
2239
2233
|
...this.analytics.commonStore.getValues(),
|
|
2240
2234
|
kind: H.POLLS_VOTE,
|
|
2241
2235
|
topicId: e,
|
|
2242
|
-
topicType: r ?
|
|
2236
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2243
2237
|
},
|
|
2244
2238
|
pollOpenedFrom: De.UNSET
|
|
2245
2239
|
});
|
|
@@ -2265,9 +2259,9 @@ class To {
|
|
|
2265
2259
|
});
|
|
2266
2260
|
};
|
|
2267
2261
|
}
|
|
2268
|
-
const
|
|
2262
|
+
const Mo = ({ transport: t, $commonStore: e }) => {
|
|
2269
2263
|
let r;
|
|
2270
|
-
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(
|
|
2264
|
+
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(bn, {
|
|
2271
2265
|
method: "send",
|
|
2272
2266
|
params: [n]
|
|
2273
2267
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
@@ -2303,7 +2297,7 @@ const Oo = ({ transport: t, $commonStore: e }) => {
|
|
|
2303
2297
|
fe.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2304
2298
|
} };
|
|
2305
2299
|
}, fe = Se("analytics");
|
|
2306
|
-
class
|
|
2300
|
+
class Uo {
|
|
2307
2301
|
commonStore;
|
|
2308
2302
|
notifications;
|
|
2309
2303
|
polls;
|
|
@@ -2315,14 +2309,14 @@ class Co {
|
|
|
2315
2309
|
listenersCancels;
|
|
2316
2310
|
connected = !1;
|
|
2317
2311
|
constructor(e) {
|
|
2318
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat =
|
|
2319
|
-
const { client: r } = e.analyticsTransport.createPromiseClient(
|
|
2312
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = Mo({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Vo(this), this.polls = new jo(this), this.invitation = new Do(this), this.interactions = new Ro(this);
|
|
2313
|
+
const { client: r } = e.analyticsTransport.createPromiseClient(bn, {
|
|
2320
2314
|
method: "send"
|
|
2321
2315
|
});
|
|
2322
2316
|
this.analyticsClient = r;
|
|
2323
2317
|
}
|
|
2324
2318
|
connect = () => {
|
|
2325
|
-
this.writeCommon("sessionId",
|
|
2319
|
+
this.writeCommon("sessionId", Zt()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, fe.debug("analytics connected");
|
|
2326
2320
|
};
|
|
2327
2321
|
disconnect = () => {
|
|
2328
2322
|
this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, fe.debug("analytics disconnected");
|
|
@@ -2345,10 +2339,10 @@ class Co {
|
|
|
2345
2339
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2346
2340
|
this.writeCommon("eventId", r);
|
|
2347
2341
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2348
|
-
r && this.writeCommon("category",
|
|
2342
|
+
r && this.writeCommon("category", $o[r]), r !== N.UNSET ? this.writeCommon("overlaySessionId", Zt()) : this.writeCommon("overlaySessionId", "");
|
|
2349
2343
|
})), this.onConnect(() => {
|
|
2350
2344
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2351
|
-
this.writeCommon("screenOrientation", i.matches ?
|
|
2345
|
+
this.writeCommon("screenOrientation", i.matches ? jr.PORTRAIT : jr.LANDSCAPE);
|
|
2352
2346
|
};
|
|
2353
2347
|
return r.addEventListener("change", n), () => {
|
|
2354
2348
|
r.removeEventListener("change", n);
|
|
@@ -2358,17 +2352,17 @@ class Co {
|
|
|
2358
2352
|
}));
|
|
2359
2353
|
};
|
|
2360
2354
|
}
|
|
2361
|
-
const
|
|
2362
|
-
t.analytics = new
|
|
2355
|
+
const xo = (t, e, r) => {
|
|
2356
|
+
t.analytics = new Uo(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
2363
2357
|
t.analytics.disconnect();
|
|
2364
2358
|
})), r();
|
|
2365
2359
|
};
|
|
2366
|
-
var
|
|
2367
|
-
function
|
|
2360
|
+
var gr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2361
|
+
function Bo(t) {
|
|
2368
2362
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2369
2363
|
}
|
|
2370
|
-
var
|
|
2371
|
-
function
|
|
2364
|
+
var mr = { exports: {} }, vr = { exports: {} };
|
|
2365
|
+
function qo(t) {
|
|
2372
2366
|
var e = new t(), r = e;
|
|
2373
2367
|
function n() {
|
|
2374
2368
|
var o = e;
|
|
@@ -2382,11 +2376,11 @@ function ko(t) {
|
|
|
2382
2376
|
release: i
|
|
2383
2377
|
};
|
|
2384
2378
|
}
|
|
2385
|
-
var
|
|
2386
|
-
function
|
|
2379
|
+
var Qo = qo, Go = Qo;
|
|
2380
|
+
function _n(t, e, r) {
|
|
2387
2381
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2388
2382
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2389
|
-
var n =
|
|
2383
|
+
var n = Go(Ko), i = null, o = null, s = 0, a = null, u = {
|
|
2390
2384
|
push: I,
|
|
2391
2385
|
drain: z,
|
|
2392
2386
|
saturated: z,
|
|
@@ -2395,12 +2389,12 @@ function gn(t, e, r) {
|
|
|
2395
2389
|
concurrency: r,
|
|
2396
2390
|
running: d,
|
|
2397
2391
|
resume: m,
|
|
2398
|
-
idle:
|
|
2392
|
+
idle: v,
|
|
2399
2393
|
length: f,
|
|
2400
2394
|
getQueue: p,
|
|
2401
|
-
unshift:
|
|
2395
|
+
unshift: b,
|
|
2402
2396
|
empty: z,
|
|
2403
|
-
kill:
|
|
2397
|
+
kill: $,
|
|
2404
2398
|
killAndDrain: q,
|
|
2405
2399
|
error: J
|
|
2406
2400
|
};
|
|
@@ -2428,14 +2422,14 @@ function gn(t, e, r) {
|
|
|
2428
2422
|
s++, _();
|
|
2429
2423
|
}
|
|
2430
2424
|
}
|
|
2431
|
-
function
|
|
2425
|
+
function v() {
|
|
2432
2426
|
return s === 0 && u.length() === 0;
|
|
2433
2427
|
}
|
|
2434
2428
|
function I(k, R) {
|
|
2435
2429
|
var T = n.get();
|
|
2436
2430
|
T.context = t, T.release = _, T.value = k, T.callback = R || z, T.errorHandler = a, s === u.concurrency || u.paused ? o ? (o.next = T, o = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2437
2431
|
}
|
|
2438
|
-
function
|
|
2432
|
+
function b(k, R) {
|
|
2439
2433
|
var T = n.get();
|
|
2440
2434
|
T.context = t, T.release = _, T.value = k, T.callback = R || z, T.errorHandler = a, s === u.concurrency || u.paused ? i ? (T.next = i, i = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2441
2435
|
}
|
|
@@ -2444,7 +2438,7 @@ function gn(t, e, r) {
|
|
|
2444
2438
|
var R = i;
|
|
2445
2439
|
R ? u.paused ? s-- : (o === i && (o = null), i = R.next, R.next = null, e.call(t, R.value, R.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
2446
2440
|
}
|
|
2447
|
-
function
|
|
2441
|
+
function $() {
|
|
2448
2442
|
i = null, o = null, u.drain = z;
|
|
2449
2443
|
}
|
|
2450
2444
|
function q() {
|
|
@@ -2456,7 +2450,7 @@ function gn(t, e, r) {
|
|
|
2456
2450
|
}
|
|
2457
2451
|
function z() {
|
|
2458
2452
|
}
|
|
2459
|
-
function
|
|
2453
|
+
function Ko() {
|
|
2460
2454
|
this.value = null, this.callback = z, this.next = null, this.release = z, this.context = null, this.errorHandler = null;
|
|
2461
2455
|
var t = this;
|
|
2462
2456
|
this.worked = function(r, n) {
|
|
@@ -2464,20 +2458,20 @@ function No() {
|
|
|
2464
2458
|
t.value = null, t.callback = z, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
2465
2459
|
};
|
|
2466
2460
|
}
|
|
2467
|
-
function
|
|
2461
|
+
function zo(t, e, r) {
|
|
2468
2462
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2469
2463
|
function n(c, f) {
|
|
2470
2464
|
e.call(this, c).then(function(p) {
|
|
2471
2465
|
f(null, p);
|
|
2472
2466
|
}, f);
|
|
2473
2467
|
}
|
|
2474
|
-
var i =
|
|
2468
|
+
var i = _n(t, n, r), o = i.push, s = i.unshift;
|
|
2475
2469
|
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
2476
2470
|
function a(c) {
|
|
2477
2471
|
var f = new Promise(function(p, m) {
|
|
2478
|
-
o(c, function(
|
|
2479
|
-
if (
|
|
2480
|
-
m(
|
|
2472
|
+
o(c, function(v, I) {
|
|
2473
|
+
if (v) {
|
|
2474
|
+
m(v);
|
|
2481
2475
|
return;
|
|
2482
2476
|
}
|
|
2483
2477
|
p(I);
|
|
@@ -2487,9 +2481,9 @@ function Do(t, e, r) {
|
|
|
2487
2481
|
}
|
|
2488
2482
|
function u(c) {
|
|
2489
2483
|
var f = new Promise(function(p, m) {
|
|
2490
|
-
s(c, function(
|
|
2491
|
-
if (
|
|
2492
|
-
m(
|
|
2484
|
+
s(c, function(v, I) {
|
|
2485
|
+
if (v) {
|
|
2486
|
+
m(v);
|
|
2493
2487
|
return;
|
|
2494
2488
|
}
|
|
2495
2489
|
p(I);
|
|
@@ -2510,60 +2504,60 @@ function Do(t, e, r) {
|
|
|
2510
2504
|
return f;
|
|
2511
2505
|
}
|
|
2512
2506
|
}
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
var
|
|
2507
|
+
vr.exports = _n;
|
|
2508
|
+
vr.exports.promise = zo;
|
|
2509
|
+
var kn = vr.exports, br = { exports: {} }, Be = typeof Reflect == "object" ? Reflect : null, Hr = Be && typeof Be.apply == "function" ? Be.apply : function(e, r, n) {
|
|
2516
2510
|
return Function.prototype.apply.call(e, r, n);
|
|
2517
|
-
},
|
|
2518
|
-
Be && typeof Be.ownKeys == "function" ?
|
|
2511
|
+
}, lt;
|
|
2512
|
+
Be && typeof Be.ownKeys == "function" ? lt = Be.ownKeys : Object.getOwnPropertySymbols ? lt = function(e) {
|
|
2519
2513
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2520
|
-
} :
|
|
2514
|
+
} : lt = function(e) {
|
|
2521
2515
|
return Object.getOwnPropertyNames(e);
|
|
2522
2516
|
};
|
|
2523
|
-
function
|
|
2517
|
+
function Ho(t) {
|
|
2524
2518
|
console && console.warn && console.warn(t);
|
|
2525
2519
|
}
|
|
2526
|
-
var
|
|
2520
|
+
var Pn = Number.isNaN || function(e) {
|
|
2527
2521
|
return e !== e;
|
|
2528
2522
|
};
|
|
2529
2523
|
function P() {
|
|
2530
2524
|
P.init.call(this);
|
|
2531
2525
|
}
|
|
2532
|
-
|
|
2533
|
-
|
|
2526
|
+
br.exports = P;
|
|
2527
|
+
br.exports.once = Xo;
|
|
2534
2528
|
P.EventEmitter = P;
|
|
2535
2529
|
P.prototype._events = void 0;
|
|
2536
2530
|
P.prototype._eventsCount = 0;
|
|
2537
2531
|
P.prototype._maxListeners = void 0;
|
|
2538
|
-
var
|
|
2539
|
-
function
|
|
2532
|
+
var Wr = 10;
|
|
2533
|
+
function Lt(t) {
|
|
2540
2534
|
if (typeof t != "function")
|
|
2541
2535
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
2542
2536
|
}
|
|
2543
2537
|
Object.defineProperty(P, "defaultMaxListeners", {
|
|
2544
2538
|
enumerable: !0,
|
|
2545
2539
|
get: function() {
|
|
2546
|
-
return
|
|
2540
|
+
return Wr;
|
|
2547
2541
|
},
|
|
2548
2542
|
set: function(t) {
|
|
2549
|
-
if (typeof t != "number" || t < 0 ||
|
|
2543
|
+
if (typeof t != "number" || t < 0 || Pn(t))
|
|
2550
2544
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2551
|
-
|
|
2545
|
+
Wr = t;
|
|
2552
2546
|
}
|
|
2553
2547
|
});
|
|
2554
2548
|
P.init = function() {
|
|
2555
2549
|
(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;
|
|
2556
2550
|
};
|
|
2557
2551
|
P.prototype.setMaxListeners = function(e) {
|
|
2558
|
-
if (typeof e != "number" || e < 0 ||
|
|
2552
|
+
if (typeof e != "number" || e < 0 || Pn(e))
|
|
2559
2553
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2560
2554
|
return this._maxListeners = e, this;
|
|
2561
2555
|
};
|
|
2562
|
-
function
|
|
2556
|
+
function Fn(t) {
|
|
2563
2557
|
return t._maxListeners === void 0 ? P.defaultMaxListeners : t._maxListeners;
|
|
2564
2558
|
}
|
|
2565
2559
|
P.prototype.getMaxListeners = function() {
|
|
2566
|
-
return
|
|
2560
|
+
return Fn(this);
|
|
2567
2561
|
};
|
|
2568
2562
|
P.prototype.emit = function(e) {
|
|
2569
2563
|
for (var r = [], n = 1; n < arguments.length; n++)
|
|
@@ -2584,51 +2578,51 @@ P.prototype.emit = function(e) {
|
|
|
2584
2578
|
if (u === void 0)
|
|
2585
2579
|
return !1;
|
|
2586
2580
|
if (typeof u == "function")
|
|
2587
|
-
|
|
2581
|
+
Hr(u, this, r);
|
|
2588
2582
|
else
|
|
2589
|
-
for (var d = u.length, c =
|
|
2590
|
-
|
|
2583
|
+
for (var d = u.length, c = Vn(u, d), n = 0; n < d; ++n)
|
|
2584
|
+
Hr(c[n], this, r);
|
|
2591
2585
|
return !0;
|
|
2592
2586
|
};
|
|
2593
|
-
function
|
|
2587
|
+
function Nn(t, e, r, n) {
|
|
2594
2588
|
var i, o, s;
|
|
2595
|
-
if (
|
|
2589
|
+
if (Lt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
2596
2590
|
"newListener",
|
|
2597
2591
|
e,
|
|
2598
2592
|
r.listener ? r.listener : r
|
|
2599
2593
|
), o = t._events), s = o[e]), s === void 0)
|
|
2600
2594
|
s = o[e] = r, ++t._eventsCount;
|
|
2601
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
2595
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = Fn(t), i > 0 && s.length > i && !s.warned) {
|
|
2602
2596
|
s.warned = !0;
|
|
2603
2597
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2604
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
2598
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, Ho(a);
|
|
2605
2599
|
}
|
|
2606
2600
|
return t;
|
|
2607
2601
|
}
|
|
2608
2602
|
P.prototype.addListener = function(e, r) {
|
|
2609
|
-
return
|
|
2603
|
+
return Nn(this, e, r, !1);
|
|
2610
2604
|
};
|
|
2611
2605
|
P.prototype.on = P.prototype.addListener;
|
|
2612
2606
|
P.prototype.prependListener = function(e, r) {
|
|
2613
|
-
return
|
|
2607
|
+
return Nn(this, e, r, !0);
|
|
2614
2608
|
};
|
|
2615
|
-
function
|
|
2609
|
+
function Wo() {
|
|
2616
2610
|
if (!this.fired)
|
|
2617
2611
|
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);
|
|
2618
2612
|
}
|
|
2619
|
-
function
|
|
2620
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
2613
|
+
function Dn(t, e, r) {
|
|
2614
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Wo.bind(n);
|
|
2621
2615
|
return i.listener = r, n.wrapFn = i, i;
|
|
2622
2616
|
}
|
|
2623
2617
|
P.prototype.once = function(e, r) {
|
|
2624
|
-
return
|
|
2618
|
+
return Lt(r), this.on(e, Dn(this, e, r)), this;
|
|
2625
2619
|
};
|
|
2626
2620
|
P.prototype.prependOnceListener = function(e, r) {
|
|
2627
|
-
return
|
|
2621
|
+
return Lt(r), this.prependListener(e, Dn(this, e, r)), this;
|
|
2628
2622
|
};
|
|
2629
2623
|
P.prototype.removeListener = function(e, r) {
|
|
2630
2624
|
var n, i, o, s, a;
|
|
2631
|
-
if (
|
|
2625
|
+
if (Lt(r), i = this._events, i === void 0)
|
|
2632
2626
|
return this;
|
|
2633
2627
|
if (n = i[e], n === void 0)
|
|
2634
2628
|
return this;
|
|
@@ -2642,7 +2636,7 @@ P.prototype.removeListener = function(e, r) {
|
|
|
2642
2636
|
}
|
|
2643
2637
|
if (o < 0)
|
|
2644
2638
|
return this;
|
|
2645
|
-
o === 0 ? n.shift() :
|
|
2639
|
+
o === 0 ? n.shift() : Jo(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
2646
2640
|
}
|
|
2647
2641
|
return this;
|
|
2648
2642
|
};
|
|
@@ -2666,24 +2660,24 @@ P.prototype.removeAllListeners = function(e) {
|
|
|
2666
2660
|
this.removeListener(e, r[i]);
|
|
2667
2661
|
return this;
|
|
2668
2662
|
};
|
|
2669
|
-
function
|
|
2663
|
+
function Rn(t, e, r) {
|
|
2670
2664
|
var n = t._events;
|
|
2671
2665
|
if (n === void 0)
|
|
2672
2666
|
return [];
|
|
2673
2667
|
var i = n[e];
|
|
2674
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
2668
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Yo(i) : Vn(i, i.length);
|
|
2675
2669
|
}
|
|
2676
2670
|
P.prototype.listeners = function(e) {
|
|
2677
|
-
return
|
|
2671
|
+
return Rn(this, e, !0);
|
|
2678
2672
|
};
|
|
2679
2673
|
P.prototype.rawListeners = function(e) {
|
|
2680
|
-
return
|
|
2674
|
+
return Rn(this, e, !1);
|
|
2681
2675
|
};
|
|
2682
2676
|
P.listenerCount = function(t, e) {
|
|
2683
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
2677
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : $n.call(t, e);
|
|
2684
2678
|
};
|
|
2685
|
-
P.prototype.listenerCount =
|
|
2686
|
-
function
|
|
2679
|
+
P.prototype.listenerCount = $n;
|
|
2680
|
+
function $n(t) {
|
|
2687
2681
|
var e = this._events;
|
|
2688
2682
|
if (e !== void 0) {
|
|
2689
2683
|
var r = e[t];
|
|
@@ -2695,24 +2689,24 @@ function En(t) {
|
|
|
2695
2689
|
return 0;
|
|
2696
2690
|
}
|
|
2697
2691
|
P.prototype.eventNames = function() {
|
|
2698
|
-
return this._eventsCount > 0 ?
|
|
2692
|
+
return this._eventsCount > 0 ? lt(this._events) : [];
|
|
2699
2693
|
};
|
|
2700
|
-
function
|
|
2694
|
+
function Vn(t, e) {
|
|
2701
2695
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
2702
2696
|
r[n] = t[n];
|
|
2703
2697
|
return r;
|
|
2704
2698
|
}
|
|
2705
|
-
function
|
|
2699
|
+
function Jo(t, e) {
|
|
2706
2700
|
for (; e + 1 < t.length; e++)
|
|
2707
2701
|
t[e] = t[e + 1];
|
|
2708
2702
|
t.pop();
|
|
2709
2703
|
}
|
|
2710
|
-
function
|
|
2704
|
+
function Yo(t) {
|
|
2711
2705
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2712
2706
|
e[r] = t[r].listener || t[r];
|
|
2713
2707
|
return e;
|
|
2714
2708
|
}
|
|
2715
|
-
function
|
|
2709
|
+
function Xo(t, e) {
|
|
2716
2710
|
return new Promise(function(r, n) {
|
|
2717
2711
|
function i(s) {
|
|
2718
2712
|
t.removeListener(e, o), n(s);
|
|
@@ -2720,13 +2714,13 @@ function Mo(t, e) {
|
|
|
2720
2714
|
function o() {
|
|
2721
2715
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
2722
2716
|
}
|
|
2723
|
-
|
|
2717
|
+
jn(t, e, o, { once: !0 }), e !== "error" && Zo(t, i, { once: !0 });
|
|
2724
2718
|
});
|
|
2725
2719
|
}
|
|
2726
|
-
function
|
|
2727
|
-
typeof t.on == "function" &&
|
|
2720
|
+
function Zo(t, e, r) {
|
|
2721
|
+
typeof t.on == "function" && jn(t, "error", e, r);
|
|
2728
2722
|
}
|
|
2729
|
-
function
|
|
2723
|
+
function jn(t, e, r, n) {
|
|
2730
2724
|
if (typeof t.on == "function")
|
|
2731
2725
|
n.once ? t.once(e, r) : t.on(e, r);
|
|
2732
2726
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2736,7 +2730,7 @@ function Tn(t, e, r, n) {
|
|
|
2736
2730
|
else
|
|
2737
2731
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2738
2732
|
}
|
|
2739
|
-
var
|
|
2733
|
+
var Mn = br.exports, _t = {}, Un = {}, xn = function() {
|
|
2740
2734
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2741
2735
|
return !1;
|
|
2742
2736
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2759,55 +2753,56 @@ var On = lr.exports, Ct = {}, Cn = {}, Ln = function() {
|
|
|
2759
2753
|
return !1;
|
|
2760
2754
|
}
|
|
2761
2755
|
return !0;
|
|
2762
|
-
},
|
|
2763
|
-
return
|
|
2764
|
-
},
|
|
2765
|
-
return typeof
|
|
2766
|
-
},
|
|
2756
|
+
}, es = xn, kt = function() {
|
|
2757
|
+
return es() && !!Symbol.toStringTag;
|
|
2758
|
+
}, ts = Error, rs = EvalError, ns = RangeError, is = ReferenceError, Bn = SyntaxError, Pt = TypeError, os = URIError, Jr = typeof Symbol < "u" && Symbol, ss = xn, as = function() {
|
|
2759
|
+
return typeof Jr != "function" || typeof Symbol != "function" || typeof Jr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ss();
|
|
2760
|
+
}, $t = {
|
|
2761
|
+
__proto__: null,
|
|
2767
2762
|
foo: {}
|
|
2768
|
-
},
|
|
2769
|
-
return { __proto__:
|
|
2770
|
-
},
|
|
2763
|
+
}, us = Object, cs = function() {
|
|
2764
|
+
return { __proto__: $t }.foo === $t.foo && !($t instanceof us);
|
|
2765
|
+
}, ls = "Function.prototype.bind called on incompatible ", ds = Object.prototype.toString, fs = Math.max, hs = "[object Function]", Yr = function(e, r) {
|
|
2771
2766
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
2772
2767
|
n[i] = e[i];
|
|
2773
2768
|
for (var o = 0; o < r.length; o += 1)
|
|
2774
2769
|
n[o + e.length] = r[o];
|
|
2775
2770
|
return n;
|
|
2776
|
-
},
|
|
2771
|
+
}, ps = function(e, r) {
|
|
2777
2772
|
for (var n = [], i = r || 0, o = 0; i < e.length; i += 1, o += 1)
|
|
2778
2773
|
n[o] = e[i];
|
|
2779
2774
|
return n;
|
|
2780
|
-
},
|
|
2775
|
+
}, ys = function(t, e) {
|
|
2781
2776
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
2782
2777
|
r += t[n], n + 1 < t.length && (r += e);
|
|
2783
2778
|
return r;
|
|
2784
|
-
},
|
|
2779
|
+
}, gs = function(e) {
|
|
2785
2780
|
var r = this;
|
|
2786
|
-
if (typeof r != "function" ||
|
|
2787
|
-
throw new TypeError(
|
|
2788
|
-
for (var n =
|
|
2781
|
+
if (typeof r != "function" || ds.apply(r) !== hs)
|
|
2782
|
+
throw new TypeError(ls + r);
|
|
2783
|
+
for (var n = ps(arguments, 1), i, o = function() {
|
|
2789
2784
|
if (this instanceof i) {
|
|
2790
2785
|
var c = r.apply(
|
|
2791
2786
|
this,
|
|
2792
|
-
|
|
2787
|
+
Yr(n, arguments)
|
|
2793
2788
|
);
|
|
2794
2789
|
return Object(c) === c ? c : this;
|
|
2795
2790
|
}
|
|
2796
2791
|
return r.apply(
|
|
2797
2792
|
e,
|
|
2798
|
-
|
|
2793
|
+
Yr(n, arguments)
|
|
2799
2794
|
);
|
|
2800
|
-
}, s =
|
|
2795
|
+
}, s = fs(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
2801
2796
|
a[u] = "$" + u;
|
|
2802
|
-
if (i = Function("binder", "return function (" +
|
|
2797
|
+
if (i = Function("binder", "return function (" + ys(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
2803
2798
|
var d = function() {
|
|
2804
2799
|
};
|
|
2805
2800
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
2806
2801
|
}
|
|
2807
2802
|
return i;
|
|
2808
|
-
},
|
|
2803
|
+
}, ms = gs, Sr = Function.prototype.bind || ms, vs = Function.prototype.call, bs = Object.prototype.hasOwnProperty, Ss = Sr, ws = Ss.call(vs, bs), E, As = ts, Es = rs, Is = ns, Ts = is, Qe = Bn, qe = Pt, Os = os, qn = Function, Vt = function(t) {
|
|
2809
2804
|
try {
|
|
2810
|
-
return
|
|
2805
|
+
return qn('"use strict"; return (' + t + ").constructor;")();
|
|
2811
2806
|
} catch {
|
|
2812
2807
|
}
|
|
2813
2808
|
}, Ce = Object.getOwnPropertyDescriptor;
|
|
@@ -2817,30 +2812,31 @@ if (Ce)
|
|
|
2817
2812
|
} catch {
|
|
2818
2813
|
Ce = null;
|
|
2819
2814
|
}
|
|
2820
|
-
var
|
|
2815
|
+
var jt = function() {
|
|
2821
2816
|
throw new qe();
|
|
2822
|
-
},
|
|
2817
|
+
}, Cs = Ce ? function() {
|
|
2823
2818
|
try {
|
|
2824
|
-
return arguments.callee,
|
|
2819
|
+
return arguments.callee, jt;
|
|
2825
2820
|
} catch {
|
|
2826
2821
|
try {
|
|
2827
2822
|
return Ce(arguments, "callee").get;
|
|
2828
2823
|
} catch {
|
|
2829
|
-
return
|
|
2824
|
+
return jt;
|
|
2830
2825
|
}
|
|
2831
2826
|
}
|
|
2832
|
-
}() :
|
|
2827
|
+
}() : jt, Re = as(), Ls = cs(), j = Object.getPrototypeOf || (Ls ? function(t) {
|
|
2833
2828
|
return t.__proto__;
|
|
2834
|
-
} : null),
|
|
2829
|
+
} : null), Ve = {}, _s = typeof Uint8Array > "u" || !j ? E : j(Uint8Array), Le = {
|
|
2830
|
+
__proto__: null,
|
|
2835
2831
|
"%AggregateError%": typeof AggregateError > "u" ? E : AggregateError,
|
|
2836
2832
|
"%Array%": Array,
|
|
2837
2833
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? E : ArrayBuffer,
|
|
2838
2834
|
"%ArrayIteratorPrototype%": Re && j ? j([][Symbol.iterator]()) : E,
|
|
2839
2835
|
"%AsyncFromSyncIteratorPrototype%": E,
|
|
2840
|
-
"%AsyncFunction%":
|
|
2841
|
-
"%AsyncGenerator%":
|
|
2842
|
-
"%AsyncGeneratorFunction%":
|
|
2843
|
-
"%AsyncIteratorPrototype%":
|
|
2836
|
+
"%AsyncFunction%": Ve,
|
|
2837
|
+
"%AsyncGenerator%": Ve,
|
|
2838
|
+
"%AsyncGeneratorFunction%": Ve,
|
|
2839
|
+
"%AsyncIteratorPrototype%": Ve,
|
|
2844
2840
|
"%Atomics%": typeof Atomics > "u" ? E : Atomics,
|
|
2845
2841
|
"%BigInt%": typeof BigInt > "u" ? E : BigInt,
|
|
2846
2842
|
"%BigInt64Array%": typeof BigInt64Array > "u" ? E : BigInt64Array,
|
|
@@ -2852,15 +2848,15 @@ var Ft = function() {
|
|
|
2852
2848
|
"%decodeURIComponent%": decodeURIComponent,
|
|
2853
2849
|
"%encodeURI%": encodeURI,
|
|
2854
2850
|
"%encodeURIComponent%": encodeURIComponent,
|
|
2855
|
-
"%Error%":
|
|
2851
|
+
"%Error%": As,
|
|
2856
2852
|
"%eval%": eval,
|
|
2857
2853
|
// eslint-disable-line no-eval
|
|
2858
|
-
"%EvalError%":
|
|
2854
|
+
"%EvalError%": Es,
|
|
2859
2855
|
"%Float32Array%": typeof Float32Array > "u" ? E : Float32Array,
|
|
2860
2856
|
"%Float64Array%": typeof Float64Array > "u" ? E : Float64Array,
|
|
2861
2857
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? E : FinalizationRegistry,
|
|
2862
|
-
"%Function%":
|
|
2863
|
-
"%GeneratorFunction%":
|
|
2858
|
+
"%Function%": qn,
|
|
2859
|
+
"%GeneratorFunction%": Ve,
|
|
2864
2860
|
"%Int8Array%": typeof Int8Array > "u" ? E : Int8Array,
|
|
2865
2861
|
"%Int16Array%": typeof Int16Array > "u" ? E : Int16Array,
|
|
2866
2862
|
"%Int32Array%": typeof Int32Array > "u" ? E : Int32Array,
|
|
@@ -2877,8 +2873,8 @@ var Ft = function() {
|
|
|
2877
2873
|
"%parseInt%": parseInt,
|
|
2878
2874
|
"%Promise%": typeof Promise > "u" ? E : Promise,
|
|
2879
2875
|
"%Proxy%": typeof Proxy > "u" ? E : Proxy,
|
|
2880
|
-
"%RangeError%":
|
|
2881
|
-
"%ReferenceError%":
|
|
2876
|
+
"%RangeError%": Is,
|
|
2877
|
+
"%ReferenceError%": Ts,
|
|
2882
2878
|
"%Reflect%": typeof Reflect > "u" ? E : Reflect,
|
|
2883
2879
|
"%RegExp%": RegExp,
|
|
2884
2880
|
"%Set%": typeof Set > "u" ? E : Set,
|
|
@@ -2888,14 +2884,14 @@ var Ft = function() {
|
|
|
2888
2884
|
"%StringIteratorPrototype%": Re && j ? j(""[Symbol.iterator]()) : E,
|
|
2889
2885
|
"%Symbol%": Re ? Symbol : E,
|
|
2890
2886
|
"%SyntaxError%": Qe,
|
|
2891
|
-
"%ThrowTypeError%":
|
|
2892
|
-
"%TypedArray%":
|
|
2887
|
+
"%ThrowTypeError%": Cs,
|
|
2888
|
+
"%TypedArray%": _s,
|
|
2893
2889
|
"%TypeError%": qe,
|
|
2894
2890
|
"%Uint8Array%": typeof Uint8Array > "u" ? E : Uint8Array,
|
|
2895
2891
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? E : Uint8ClampedArray,
|
|
2896
2892
|
"%Uint16Array%": typeof Uint16Array > "u" ? E : Uint16Array,
|
|
2897
2893
|
"%Uint32Array%": typeof Uint32Array > "u" ? E : Uint32Array,
|
|
2898
|
-
"%URIError%":
|
|
2894
|
+
"%URIError%": Os,
|
|
2899
2895
|
"%WeakMap%": typeof WeakMap > "u" ? E : WeakMap,
|
|
2900
2896
|
"%WeakRef%": typeof WeakRef > "u" ? E : WeakRef,
|
|
2901
2897
|
"%WeakSet%": typeof WeakSet > "u" ? E : WeakSet
|
|
@@ -2904,17 +2900,17 @@ if (j)
|
|
|
2904
2900
|
try {
|
|
2905
2901
|
null.error;
|
|
2906
2902
|
} catch (t) {
|
|
2907
|
-
var
|
|
2908
|
-
Le["%Error.prototype%"] =
|
|
2903
|
+
var ks = j(j(t));
|
|
2904
|
+
Le["%Error.prototype%"] = ks;
|
|
2909
2905
|
}
|
|
2910
|
-
var
|
|
2906
|
+
var Ps = function t(e) {
|
|
2911
2907
|
var r;
|
|
2912
2908
|
if (e === "%AsyncFunction%")
|
|
2913
|
-
r =
|
|
2909
|
+
r = Vt("async function () {}");
|
|
2914
2910
|
else if (e === "%GeneratorFunction%")
|
|
2915
|
-
r =
|
|
2911
|
+
r = Vt("function* () {}");
|
|
2916
2912
|
else if (e === "%AsyncGeneratorFunction%")
|
|
2917
|
-
r =
|
|
2913
|
+
r = Vt("async function* () {}");
|
|
2918
2914
|
else if (e === "%AsyncGenerator%") {
|
|
2919
2915
|
var n = t("%AsyncGeneratorFunction%");
|
|
2920
2916
|
n && (r = n.prototype);
|
|
@@ -2923,7 +2919,8 @@ var us = function t(e) {
|
|
|
2923
2919
|
i && j && (r = j(i.prototype));
|
|
2924
2920
|
}
|
|
2925
2921
|
return Le[e] = r, r;
|
|
2926
|
-
},
|
|
2922
|
+
}, Xr = {
|
|
2923
|
+
__proto__: null,
|
|
2927
2924
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
2928
2925
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
2929
2926
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -2975,21 +2972,21 @@ var us = function t(e) {
|
|
|
2975
2972
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2976
2973
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2977
2974
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2978
|
-
},
|
|
2979
|
-
var r =
|
|
2975
|
+
}, tt = Sr, mt = ws, Fs = tt.call(Function.call, Array.prototype.concat), Ns = tt.call(Function.apply, Array.prototype.splice), Zr = tt.call(Function.call, String.prototype.replace), vt = tt.call(Function.call, String.prototype.slice), Ds = tt.call(Function.call, RegExp.prototype.exec), Rs = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, $s = /\\(\\)?/g, Vs = function(e) {
|
|
2976
|
+
var r = vt(e, 0, 1), n = vt(e, -1);
|
|
2980
2977
|
if (r === "%" && n !== "%")
|
|
2981
2978
|
throw new Qe("invalid intrinsic syntax, expected closing `%`");
|
|
2982
2979
|
if (n === "%" && r !== "%")
|
|
2983
2980
|
throw new Qe("invalid intrinsic syntax, expected opening `%`");
|
|
2984
2981
|
var i = [];
|
|
2985
|
-
return
|
|
2986
|
-
i[i.length] = a ?
|
|
2982
|
+
return Zr(e, Rs, function(o, s, a, u) {
|
|
2983
|
+
i[i.length] = a ? Zr(u, $s, "$1") : s || o;
|
|
2987
2984
|
}), i;
|
|
2988
|
-
},
|
|
2985
|
+
}, js = function(e, r) {
|
|
2989
2986
|
var n = e, i;
|
|
2990
|
-
if (mt(
|
|
2987
|
+
if (mt(Xr, n) && (i = Xr[n], n = "%" + i[0] + "%"), mt(Le, n)) {
|
|
2991
2988
|
var o = Le[n];
|
|
2992
|
-
if (o ===
|
|
2989
|
+
if (o === Ve && (o = Ps(n)), typeof o > "u" && !r)
|
|
2993
2990
|
throw new qe("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
2994
2991
|
return {
|
|
2995
2992
|
alias: i,
|
|
@@ -2998,18 +2995,18 @@ var us = function t(e) {
|
|
|
2998
2995
|
};
|
|
2999
2996
|
}
|
|
3000
2997
|
throw new Qe("intrinsic " + e + " does not exist!");
|
|
3001
|
-
},
|
|
2998
|
+
}, rt = function(e, r) {
|
|
3002
2999
|
if (typeof e != "string" || e.length === 0)
|
|
3003
3000
|
throw new qe("intrinsic name must be a non-empty string");
|
|
3004
3001
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3005
3002
|
throw new qe('"allowMissing" argument must be a boolean');
|
|
3006
|
-
if (
|
|
3003
|
+
if (Ds(/^%?[^%]*%?$/, e) === null)
|
|
3007
3004
|
throw new Qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3008
|
-
var n =
|
|
3009
|
-
d && (i = d[0],
|
|
3005
|
+
var n = Vs(e), i = n.length > 0 ? n[0] : "", o = js("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
|
|
3006
|
+
d && (i = d[0], Ns(n, Fs([0, 1], d)));
|
|
3010
3007
|
for (var c = 1, f = !0; c < n.length; c += 1) {
|
|
3011
|
-
var p = n[c], m =
|
|
3012
|
-
if ((m === '"' || m === "'" || m === "`" ||
|
|
3008
|
+
var p = n[c], m = vt(p, 0, 1), v = vt(p, -1);
|
|
3009
|
+
if ((m === '"' || m === "'" || m === "`" || v === '"' || v === "'" || v === "`") && m !== v)
|
|
3013
3010
|
throw new Qe("property names with quotes must have matching quotes");
|
|
3014
3011
|
if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", mt(Le, s))
|
|
3015
3012
|
a = Le[s];
|
|
@@ -3028,54 +3025,43 @@ var us = function t(e) {
|
|
|
3028
3025
|
}
|
|
3029
3026
|
}
|
|
3030
3027
|
return a;
|
|
3031
|
-
},
|
|
3032
|
-
|
|
3028
|
+
}, Qn = { exports: {} }, Mt, en;
|
|
3029
|
+
function wr() {
|
|
3030
|
+
if (en)
|
|
3031
|
+
return Mt;
|
|
3032
|
+
en = 1;
|
|
3033
|
+
var t = rt, e = t("%Object.defineProperty%", !0) || !1;
|
|
3034
|
+
if (e)
|
|
3033
3035
|
try {
|
|
3034
|
-
|
|
3036
|
+
e({}, "a", { value: 1 });
|
|
3035
3037
|
} catch {
|
|
3036
|
-
|
|
3038
|
+
e = !1;
|
|
3037
3039
|
}
|
|
3038
|
-
return
|
|
3039
|
-
}
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
return null;
|
|
3043
|
-
try {
|
|
3044
|
-
return Jt([], "length", { value: 1 }).length !== 1;
|
|
3045
|
-
} catch {
|
|
3046
|
-
return !0;
|
|
3047
|
-
}
|
|
3048
|
-
};
|
|
3049
|
-
var Pn = Yt, ms = Ke, ft = ms("%Object.getOwnPropertyDescriptor%", !0);
|
|
3050
|
-
if (ft)
|
|
3051
|
-
try {
|
|
3052
|
-
ft([], "length");
|
|
3053
|
-
} catch {
|
|
3054
|
-
ft = null;
|
|
3055
|
-
}
|
|
3056
|
-
var hr = ft, bs = Pn(), pr = Ke, Xe = bs && pr("%Object.defineProperty%", !0);
|
|
3057
|
-
if (Xe)
|
|
3040
|
+
return Mt = e, Mt;
|
|
3041
|
+
}
|
|
3042
|
+
var Ms = rt, dt = Ms("%Object.getOwnPropertyDescriptor%", !0);
|
|
3043
|
+
if (dt)
|
|
3058
3044
|
try {
|
|
3059
|
-
|
|
3045
|
+
dt([], "length");
|
|
3060
3046
|
} catch {
|
|
3061
|
-
|
|
3047
|
+
dt = null;
|
|
3062
3048
|
}
|
|
3063
|
-
var
|
|
3049
|
+
var Ft = dt, tn = wr(), Us = Bn, $e = Pt, rn = Ft, xs = function(e, r, n) {
|
|
3064
3050
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3065
|
-
throw new
|
|
3051
|
+
throw new $e("`obj` must be an object or a function`");
|
|
3066
3052
|
if (typeof r != "string" && typeof r != "symbol")
|
|
3067
|
-
throw new
|
|
3053
|
+
throw new $e("`property` must be a string or a symbol`");
|
|
3068
3054
|
if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
|
|
3069
|
-
throw new
|
|
3055
|
+
throw new $e("`nonEnumerable`, if provided, must be a boolean or null");
|
|
3070
3056
|
if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
|
|
3071
|
-
throw new
|
|
3057
|
+
throw new $e("`nonWritable`, if provided, must be a boolean or null");
|
|
3072
3058
|
if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
|
|
3073
|
-
throw new
|
|
3059
|
+
throw new $e("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3074
3060
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3075
|
-
throw new
|
|
3076
|
-
var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!
|
|
3077
|
-
if (
|
|
3078
|
-
|
|
3061
|
+
throw new $e("`loose`, if provided, must be a boolean");
|
|
3062
|
+
var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!rn && rn(e, r);
|
|
3063
|
+
if (tn)
|
|
3064
|
+
tn(e, r, {
|
|
3079
3065
|
configurable: s === null && u ? u.configurable : !s,
|
|
3080
3066
|
enumerable: i === null && u ? u.enumerable : !i,
|
|
3081
3067
|
value: n,
|
|
@@ -3084,25 +3070,37 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
|
|
|
3084
3070
|
else if (a || !i && !o && !s)
|
|
3085
3071
|
e[r] = n;
|
|
3086
3072
|
else
|
|
3087
|
-
throw new
|
|
3088
|
-
},
|
|
3073
|
+
throw new Us("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3074
|
+
}, ir = wr(), Gn = function() {
|
|
3075
|
+
return !!ir;
|
|
3076
|
+
};
|
|
3077
|
+
Gn.hasArrayLengthDefineBug = function() {
|
|
3078
|
+
if (!ir)
|
|
3079
|
+
return null;
|
|
3080
|
+
try {
|
|
3081
|
+
return ir([], "length", { value: 1 }).length !== 1;
|
|
3082
|
+
} catch {
|
|
3083
|
+
return !0;
|
|
3084
|
+
}
|
|
3085
|
+
};
|
|
3086
|
+
var Bs = Gn, qs = rt, nn = xs, Qs = Bs(), on = Ft, sn = Pt, Gs = qs("%Math.floor%"), Ks = function(e, r) {
|
|
3089
3087
|
if (typeof e != "function")
|
|
3090
|
-
throw new
|
|
3091
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3092
|
-
throw new
|
|
3088
|
+
throw new sn("`fn` is not a function");
|
|
3089
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || Gs(r) !== r)
|
|
3090
|
+
throw new sn("`length` must be a positive 32-bit integer");
|
|
3093
3091
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3094
|
-
if ("length" in e &&
|
|
3095
|
-
var s =
|
|
3092
|
+
if ("length" in e && on) {
|
|
3093
|
+
var s = on(e, "length");
|
|
3096
3094
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3097
3095
|
}
|
|
3098
|
-
return (i || o || !n) && (
|
|
3096
|
+
return (i || o || !n) && (Qs ? nn(
|
|
3099
3097
|
/** @type {Parameters<define>[0]} */
|
|
3100
3098
|
e,
|
|
3101
3099
|
"length",
|
|
3102
3100
|
r,
|
|
3103
3101
|
!0,
|
|
3104
3102
|
!0
|
|
3105
|
-
) :
|
|
3103
|
+
) : nn(
|
|
3106
3104
|
/** @type {Parameters<define>[0]} */
|
|
3107
3105
|
e,
|
|
3108
3106
|
"length",
|
|
@@ -3110,13 +3108,7 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
|
|
|
3110
3108
|
)), e;
|
|
3111
3109
|
};
|
|
3112
3110
|
(function(t) {
|
|
3113
|
-
var e =
|
|
3114
|
-
if (u)
|
|
3115
|
-
try {
|
|
3116
|
-
u({}, "a", { value: 1 });
|
|
3117
|
-
} catch {
|
|
3118
|
-
u = null;
|
|
3119
|
-
}
|
|
3111
|
+
var e = Sr, r = rt, n = Ks, i = Pt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = wr(), d = r("%Math.max%");
|
|
3120
3112
|
t.exports = function(p) {
|
|
3121
3113
|
if (typeof p != "function")
|
|
3122
3114
|
throw new i("a function is required");
|
|
@@ -3131,188 +3123,248 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
|
|
|
3131
3123
|
return a(e, o, arguments);
|
|
3132
3124
|
};
|
|
3133
3125
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3134
|
-
})(
|
|
3135
|
-
var
|
|
3136
|
-
var n =
|
|
3137
|
-
return typeof n == "function" &&
|
|
3138
|
-
},
|
|
3139
|
-
return
|
|
3140
|
-
},
|
|
3141
|
-
return
|
|
3142
|
-
},
|
|
3143
|
-
return
|
|
3126
|
+
})(Qn);
|
|
3127
|
+
var Ar = Qn.exports, Kn = rt, zn = Ar, zs = zn(Kn("String.prototype.indexOf")), Er = function(e, r) {
|
|
3128
|
+
var n = Kn(e, !!r);
|
|
3129
|
+
return typeof n == "function" && zs(e, ".prototype.") > -1 ? zn(n) : n;
|
|
3130
|
+
}, Hs = kt(), Ws = Er, or = Ws("Object.prototype.toString"), Nt = function(e) {
|
|
3131
|
+
return Hs && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : or(e) === "[object Arguments]";
|
|
3132
|
+
}, Hn = function(e) {
|
|
3133
|
+
return Nt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && or(e) !== "[object Array]" && or(e.callee) === "[object Function]";
|
|
3134
|
+
}, Js = function() {
|
|
3135
|
+
return Nt(arguments);
|
|
3144
3136
|
}();
|
|
3145
|
-
|
|
3146
|
-
var
|
|
3147
|
-
if (!
|
|
3137
|
+
Nt.isLegacyArguments = Hn;
|
|
3138
|
+
var Ys = Js ? Nt : Hn, Xs = Object.prototype.toString, Zs = Function.prototype.toString, ea = /^\s*(?:function)?\*/, Wn = kt(), Ut = Object.getPrototypeOf, ta = function() {
|
|
3139
|
+
if (!Wn)
|
|
3148
3140
|
return !1;
|
|
3149
3141
|
try {
|
|
3150
3142
|
return Function("return function*() {}")();
|
|
3151
3143
|
} catch {
|
|
3152
3144
|
}
|
|
3153
|
-
},
|
|
3145
|
+
}, xt, ra = function(e) {
|
|
3154
3146
|
if (typeof e != "function")
|
|
3155
3147
|
return !1;
|
|
3156
|
-
if (
|
|
3148
|
+
if (ea.test(Zs.call(e)))
|
|
3157
3149
|
return !0;
|
|
3158
|
-
if (!
|
|
3159
|
-
var r =
|
|
3150
|
+
if (!Wn) {
|
|
3151
|
+
var r = Xs.call(e);
|
|
3160
3152
|
return r === "[object GeneratorFunction]";
|
|
3161
3153
|
}
|
|
3162
|
-
if (!
|
|
3154
|
+
if (!Ut)
|
|
3163
3155
|
return !1;
|
|
3164
|
-
if (typeof
|
|
3165
|
-
var n =
|
|
3166
|
-
|
|
3156
|
+
if (typeof xt > "u") {
|
|
3157
|
+
var n = ta();
|
|
3158
|
+
xt = n ? Ut(n) : !1;
|
|
3167
3159
|
}
|
|
3168
|
-
return
|
|
3169
|
-
},
|
|
3160
|
+
return Ut(e) === xt;
|
|
3161
|
+
}, Jn = Function.prototype.toString, Ue = typeof Reflect == "object" && Reflect !== null && Reflect.apply, sr, ft;
|
|
3170
3162
|
if (typeof Ue == "function" && typeof Object.defineProperty == "function")
|
|
3171
3163
|
try {
|
|
3172
|
-
|
|
3164
|
+
sr = Object.defineProperty({}, "length", {
|
|
3173
3165
|
get: function() {
|
|
3174
|
-
throw
|
|
3166
|
+
throw ft;
|
|
3175
3167
|
}
|
|
3176
|
-
}),
|
|
3168
|
+
}), ft = {}, Ue(function() {
|
|
3177
3169
|
throw 42;
|
|
3178
|
-
}, null,
|
|
3170
|
+
}, null, sr);
|
|
3179
3171
|
} catch (t) {
|
|
3180
|
-
t !==
|
|
3172
|
+
t !== ft && (Ue = null);
|
|
3181
3173
|
}
|
|
3182
3174
|
else
|
|
3183
3175
|
Ue = null;
|
|
3184
|
-
var
|
|
3176
|
+
var na = /^\s*class\b/, ar = function(e) {
|
|
3185
3177
|
try {
|
|
3186
|
-
var r =
|
|
3187
|
-
return
|
|
3178
|
+
var r = Jn.call(e);
|
|
3179
|
+
return na.test(r);
|
|
3188
3180
|
} catch {
|
|
3189
3181
|
return !1;
|
|
3190
3182
|
}
|
|
3191
|
-
},
|
|
3183
|
+
}, Bt = function(e) {
|
|
3192
3184
|
try {
|
|
3193
|
-
return
|
|
3185
|
+
return ar(e) ? !1 : (Jn.call(e), !0);
|
|
3194
3186
|
} catch {
|
|
3195
3187
|
return !1;
|
|
3196
3188
|
}
|
|
3197
|
-
},
|
|
3189
|
+
}, ht = Object.prototype.toString, ia = "[object Object]", oa = "[object Function]", sa = "[object GeneratorFunction]", aa = "[object HTMLAllCollection]", ua = "[object HTML document.all class]", ca = "[object HTMLCollection]", la = typeof Symbol == "function" && !!Symbol.toStringTag, da = !(0 in [,]), ur = function() {
|
|
3198
3190
|
return !1;
|
|
3199
3191
|
};
|
|
3200
3192
|
if (typeof document == "object") {
|
|
3201
|
-
var
|
|
3202
|
-
|
|
3203
|
-
if ((
|
|
3193
|
+
var fa = document.all;
|
|
3194
|
+
ht.call(fa) === ht.call(document.all) && (ur = function(e) {
|
|
3195
|
+
if ((da || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3204
3196
|
try {
|
|
3205
|
-
var r =
|
|
3206
|
-
return (r ===
|
|
3197
|
+
var r = ht.call(e);
|
|
3198
|
+
return (r === aa || r === ua || r === ca || r === ia) && e("") == null;
|
|
3207
3199
|
} catch {
|
|
3208
3200
|
}
|
|
3209
3201
|
return !1;
|
|
3210
3202
|
});
|
|
3211
3203
|
}
|
|
3212
|
-
var
|
|
3213
|
-
if (
|
|
3204
|
+
var ha = Ue ? function(e) {
|
|
3205
|
+
if (ur(e))
|
|
3214
3206
|
return !0;
|
|
3215
3207
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3216
3208
|
return !1;
|
|
3217
3209
|
try {
|
|
3218
|
-
Ue(e, null,
|
|
3210
|
+
Ue(e, null, sr);
|
|
3219
3211
|
} catch (r) {
|
|
3220
|
-
if (r !==
|
|
3212
|
+
if (r !== ft)
|
|
3221
3213
|
return !1;
|
|
3222
3214
|
}
|
|
3223
|
-
return !
|
|
3215
|
+
return !ar(e) && Bt(e);
|
|
3224
3216
|
} : function(e) {
|
|
3225
|
-
if (
|
|
3217
|
+
if (ur(e))
|
|
3226
3218
|
return !0;
|
|
3227
3219
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3228
3220
|
return !1;
|
|
3229
|
-
if (
|
|
3230
|
-
return
|
|
3231
|
-
if (
|
|
3221
|
+
if (la)
|
|
3222
|
+
return Bt(e);
|
|
3223
|
+
if (ar(e))
|
|
3232
3224
|
return !1;
|
|
3233
|
-
var r =
|
|
3234
|
-
return r !==
|
|
3235
|
-
},
|
|
3225
|
+
var r = ht.call(e);
|
|
3226
|
+
return r !== oa && r !== sa && !/^\[object HTML/.test(r) ? !1 : Bt(e);
|
|
3227
|
+
}, pa = ha, ya = Object.prototype.toString, Yn = Object.prototype.hasOwnProperty, ga = function(e, r, n) {
|
|
3236
3228
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3237
|
-
|
|
3238
|
-
},
|
|
3229
|
+
Yn.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3230
|
+
}, ma = function(e, r, n) {
|
|
3239
3231
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3240
3232
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3241
|
-
},
|
|
3233
|
+
}, va = function(e, r, n) {
|
|
3242
3234
|
for (var i in e)
|
|
3243
|
-
|
|
3244
|
-
},
|
|
3245
|
-
if (!
|
|
3235
|
+
Yn.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3236
|
+
}, ba = function(e, r, n) {
|
|
3237
|
+
if (!pa(r))
|
|
3246
3238
|
throw new TypeError("iterator must be a function");
|
|
3247
3239
|
var i;
|
|
3248
|
-
arguments.length >= 3 && (i = n),
|
|
3249
|
-
},
|
|
3250
|
-
"BigInt64Array",
|
|
3251
|
-
"BigUint64Array",
|
|
3240
|
+
arguments.length >= 3 && (i = n), ya.call(e) === "[object Array]" ? ga(e, r, i) : typeof e == "string" ? ma(e, r, i) : va(e, r, i);
|
|
3241
|
+
}, Xn = ba, Sa = [
|
|
3252
3242
|
"Float32Array",
|
|
3253
3243
|
"Float64Array",
|
|
3244
|
+
"Int8Array",
|
|
3254
3245
|
"Int16Array",
|
|
3255
3246
|
"Int32Array",
|
|
3256
|
-
"
|
|
3247
|
+
"Uint8Array",
|
|
3248
|
+
"Uint8ClampedArray",
|
|
3257
3249
|
"Uint16Array",
|
|
3258
3250
|
"Uint32Array",
|
|
3259
|
-
"
|
|
3260
|
-
"
|
|
3261
|
-
],
|
|
3262
|
-
for (var e = [], r = 0; r <
|
|
3263
|
-
typeof
|
|
3251
|
+
"BigInt64Array",
|
|
3252
|
+
"BigUint64Array"
|
|
3253
|
+
], qt = Sa, wa = typeof globalThis > "u" ? gr : globalThis, Zn = function() {
|
|
3254
|
+
for (var e = [], r = 0; r < qt.length; r++)
|
|
3255
|
+
typeof wa[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3264
3256
|
return e;
|
|
3265
|
-
},
|
|
3257
|
+
}, bt = Xn, Aa = Zn, an = Ar, Ir = Er, pt = Ft, Ea = Ir("Object.prototype.toString"), ei = kt(), un = typeof globalThis > "u" ? gr : globalThis, cr = Aa(), Tr = Ir("String.prototype.slice"), Qt = Object.getPrototypeOf, Ia = Ir("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3266
3258
|
for (var n = 0; n < e.length; n += 1)
|
|
3267
3259
|
if (e[n] === r)
|
|
3268
3260
|
return n;
|
|
3269
3261
|
return -1;
|
|
3270
3262
|
}, St = { __proto__: null };
|
|
3271
|
-
|
|
3272
|
-
var e = new
|
|
3263
|
+
ei && pt && Qt ? bt(cr, function(t) {
|
|
3264
|
+
var e = new un[t]();
|
|
3273
3265
|
if (Symbol.toStringTag in e) {
|
|
3274
|
-
var r =
|
|
3266
|
+
var r = Qt(e), n = pt(r, Symbol.toStringTag);
|
|
3275
3267
|
if (!n) {
|
|
3276
|
-
var i =
|
|
3277
|
-
n =
|
|
3268
|
+
var i = Qt(r);
|
|
3269
|
+
n = pt(i, Symbol.toStringTag);
|
|
3278
3270
|
}
|
|
3279
|
-
St["$" + t] =
|
|
3271
|
+
St["$" + t] = an(n.get);
|
|
3280
3272
|
}
|
|
3281
|
-
}) :
|
|
3282
|
-
var e = new
|
|
3283
|
-
r && (St["$" + t] =
|
|
3273
|
+
}) : bt(cr, function(t) {
|
|
3274
|
+
var e = new un[t](), r = e.slice || e.set;
|
|
3275
|
+
r && (St["$" + t] = an(r));
|
|
3284
3276
|
});
|
|
3285
|
-
var
|
|
3277
|
+
var Ta = function(e) {
|
|
3286
3278
|
var r = !1;
|
|
3287
|
-
return
|
|
3279
|
+
return bt(St, function(n, i) {
|
|
3288
3280
|
if (!r)
|
|
3289
3281
|
try {
|
|
3290
|
-
"$" + n(e) === i && (r =
|
|
3282
|
+
"$" + n(e) === i && (r = Tr(i, 1));
|
|
3291
3283
|
} catch {
|
|
3292
3284
|
}
|
|
3293
3285
|
}), r;
|
|
3294
|
-
},
|
|
3286
|
+
}, Oa = function(e) {
|
|
3295
3287
|
var r = !1;
|
|
3296
|
-
return
|
|
3288
|
+
return bt(St, function(n, i) {
|
|
3297
3289
|
if (!r)
|
|
3298
3290
|
try {
|
|
3299
|
-
n(e), r =
|
|
3291
|
+
n(e), r = Tr(i, 1);
|
|
3300
3292
|
} catch {
|
|
3301
3293
|
}
|
|
3302
3294
|
}), r;
|
|
3303
|
-
},
|
|
3295
|
+
}, Ca = function(e) {
|
|
3304
3296
|
if (!e || typeof e != "object")
|
|
3305
3297
|
return !1;
|
|
3306
|
-
if (!
|
|
3307
|
-
var r =
|
|
3308
|
-
return
|
|
3298
|
+
if (!ei) {
|
|
3299
|
+
var r = Tr(Ea(e), 8, -1);
|
|
3300
|
+
return Ia(cr, r) > -1 ? r : r !== "Object" ? !1 : Oa(e);
|
|
3309
3301
|
}
|
|
3310
|
-
return
|
|
3311
|
-
},
|
|
3312
|
-
|
|
3302
|
+
return pt ? Ta(e) : null;
|
|
3303
|
+
}, wt = Xn, La = Zn, cn = Ar, Or = Er, yt = Ft, _a = Or("Object.prototype.toString"), ti = kt(), ln = typeof globalThis > "u" ? gr : globalThis, lr = La(), Cr = Or("String.prototype.slice"), Gt = Object.getPrototypeOf, ka = Or("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3304
|
+
for (var n = 0; n < e.length; n += 1)
|
|
3305
|
+
if (e[n] === r)
|
|
3306
|
+
return n;
|
|
3307
|
+
return -1;
|
|
3308
|
+
}, At = { __proto__: null };
|
|
3309
|
+
ti && yt && Gt ? wt(lr, function(t) {
|
|
3310
|
+
var e = new ln[t]();
|
|
3311
|
+
if (Symbol.toStringTag in e) {
|
|
3312
|
+
var r = Gt(e), n = yt(r, Symbol.toStringTag);
|
|
3313
|
+
if (!n) {
|
|
3314
|
+
var i = Gt(r);
|
|
3315
|
+
n = yt(i, Symbol.toStringTag);
|
|
3316
|
+
}
|
|
3317
|
+
At["$" + t] = cn(n.get);
|
|
3318
|
+
}
|
|
3319
|
+
}) : wt(lr, function(t) {
|
|
3320
|
+
var e = new ln[t](), r = e.slice || e.set;
|
|
3321
|
+
r && (At["$" + t] = cn(r));
|
|
3322
|
+
});
|
|
3323
|
+
var Pa = function(e) {
|
|
3324
|
+
var r = !1;
|
|
3325
|
+
return wt(
|
|
3326
|
+
// eslint-disable-next-line no-extra-parens
|
|
3327
|
+
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
3328
|
+
/** @type {any} */
|
|
3329
|
+
At,
|
|
3330
|
+
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
3331
|
+
function(n, i) {
|
|
3332
|
+
if (!r)
|
|
3333
|
+
try {
|
|
3334
|
+
"$" + n(e) === i && (r = Cr(i, 1));
|
|
3335
|
+
} catch {
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
), r;
|
|
3339
|
+
}, Fa = function(e) {
|
|
3340
|
+
var r = !1;
|
|
3341
|
+
return wt(
|
|
3342
|
+
// eslint-disable-next-line no-extra-parens
|
|
3343
|
+
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
3344
|
+
/** @type {any} */
|
|
3345
|
+
At,
|
|
3346
|
+
/** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
3347
|
+
function(n, i) {
|
|
3348
|
+
if (!r)
|
|
3349
|
+
try {
|
|
3350
|
+
n(e), r = Cr(i, 1);
|
|
3351
|
+
} catch {
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
), r;
|
|
3355
|
+
}, Na = function(e) {
|
|
3356
|
+
if (!e || typeof e != "object")
|
|
3357
|
+
return !1;
|
|
3358
|
+
if (!ti) {
|
|
3359
|
+
var r = Cr(_a(e), 8, -1);
|
|
3360
|
+
return ka(lr, r) > -1 ? r : r !== "Object" ? !1 : Fa(e);
|
|
3361
|
+
}
|
|
3362
|
+
return yt ? Pa(e) : null;
|
|
3363
|
+
}, Da = Na, Ra = function(e) {
|
|
3364
|
+
return !!Da(e);
|
|
3313
3365
|
};
|
|
3314
3366
|
(function(t) {
|
|
3315
|
-
var e =
|
|
3367
|
+
var e = Ys, r = ra, n = Ca, i = Ra;
|
|
3316
3368
|
function o(y) {
|
|
3317
3369
|
return y.call.bind(y);
|
|
3318
3370
|
}
|
|
@@ -3321,11 +3373,11 @@ var na = function(e) {
|
|
|
3321
3373
|
var p = o(BigInt.prototype.valueOf);
|
|
3322
3374
|
if (a)
|
|
3323
3375
|
var m = o(Symbol.prototype.valueOf);
|
|
3324
|
-
function
|
|
3376
|
+
function v(y, ui) {
|
|
3325
3377
|
if (typeof y != "object")
|
|
3326
3378
|
return !1;
|
|
3327
3379
|
try {
|
|
3328
|
-
return
|
|
3380
|
+
return ui(y), !0;
|
|
3329
3381
|
} catch {
|
|
3330
3382
|
return !1;
|
|
3331
3383
|
}
|
|
@@ -3335,18 +3387,18 @@ var na = function(e) {
|
|
|
3335
3387
|
return typeof Promise < "u" && y instanceof Promise || y !== null && typeof y == "object" && typeof y.then == "function" && typeof y.catch == "function";
|
|
3336
3388
|
}
|
|
3337
3389
|
t.isPromise = I;
|
|
3338
|
-
function
|
|
3390
|
+
function b(y) {
|
|
3339
3391
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
|
|
3340
3392
|
}
|
|
3341
|
-
t.isArrayBufferView =
|
|
3393
|
+
t.isArrayBufferView = b;
|
|
3342
3394
|
function _(y) {
|
|
3343
3395
|
return n(y) === "Uint8Array";
|
|
3344
3396
|
}
|
|
3345
3397
|
t.isUint8Array = _;
|
|
3346
|
-
function
|
|
3398
|
+
function $(y) {
|
|
3347
3399
|
return n(y) === "Uint8ClampedArray";
|
|
3348
3400
|
}
|
|
3349
|
-
t.isUint8ClampedArray =
|
|
3401
|
+
t.isUint8ClampedArray = $;
|
|
3350
3402
|
function q(y) {
|
|
3351
3403
|
return n(y) === "Uint16Array";
|
|
3352
3404
|
}
|
|
@@ -3387,26 +3439,26 @@ var na = function(e) {
|
|
|
3387
3439
|
return u(y) === "[object Map]";
|
|
3388
3440
|
}
|
|
3389
3441
|
oe.working = typeof Map < "u" && oe(/* @__PURE__ */ new Map());
|
|
3390
|
-
function
|
|
3442
|
+
function Dt(y) {
|
|
3391
3443
|
return typeof Map > "u" ? !1 : oe.working ? oe(y) : y instanceof Map;
|
|
3392
3444
|
}
|
|
3393
|
-
t.isMap =
|
|
3445
|
+
t.isMap = Dt;
|
|
3394
3446
|
function me(y) {
|
|
3395
3447
|
return u(y) === "[object Set]";
|
|
3396
3448
|
}
|
|
3397
3449
|
me.working = typeof Set < "u" && me(/* @__PURE__ */ new Set());
|
|
3398
|
-
function
|
|
3450
|
+
function ze(y) {
|
|
3399
3451
|
return typeof Set > "u" ? !1 : me.working ? me(y) : y instanceof Set;
|
|
3400
3452
|
}
|
|
3401
|
-
t.isSet =
|
|
3453
|
+
t.isSet = ze;
|
|
3402
3454
|
function ke(y) {
|
|
3403
3455
|
return u(y) === "[object WeakMap]";
|
|
3404
3456
|
}
|
|
3405
3457
|
ke.working = typeof WeakMap < "u" && ke(/* @__PURE__ */ new WeakMap());
|
|
3406
|
-
function
|
|
3458
|
+
function Rt(y) {
|
|
3407
3459
|
return typeof WeakMap > "u" ? !1 : ke.working ? ke(y) : y instanceof WeakMap;
|
|
3408
3460
|
}
|
|
3409
|
-
t.isWeakMap =
|
|
3461
|
+
t.isWeakMap = Rt;
|
|
3410
3462
|
function Pe(y) {
|
|
3411
3463
|
return u(y) === "[object WeakSet]";
|
|
3412
3464
|
}
|
|
@@ -3419,10 +3471,10 @@ var na = function(e) {
|
|
|
3419
3471
|
return u(y) === "[object ArrayBuffer]";
|
|
3420
3472
|
}
|
|
3421
3473
|
Fe.working = typeof ArrayBuffer < "u" && Fe(new ArrayBuffer());
|
|
3422
|
-
function
|
|
3474
|
+
function nt(y) {
|
|
3423
3475
|
return typeof ArrayBuffer > "u" ? !1 : Fe.working ? Fe(y) : y instanceof ArrayBuffer;
|
|
3424
3476
|
}
|
|
3425
|
-
t.isArrayBuffer =
|
|
3477
|
+
t.isArrayBuffer = nt;
|
|
3426
3478
|
function l(y) {
|
|
3427
3479
|
return u(y) === "[object DataView]";
|
|
3428
3480
|
}
|
|
@@ -3460,33 +3512,33 @@ var na = function(e) {
|
|
|
3460
3512
|
}
|
|
3461
3513
|
t.isWebAssemblyCompiledModule = G;
|
|
3462
3514
|
function Ae(y) {
|
|
3463
|
-
return
|
|
3515
|
+
return v(y, d);
|
|
3464
3516
|
}
|
|
3465
3517
|
t.isNumberObject = Ae;
|
|
3466
|
-
function
|
|
3467
|
-
return
|
|
3518
|
+
function it(y) {
|
|
3519
|
+
return v(y, c);
|
|
3468
3520
|
}
|
|
3469
|
-
t.isStringObject =
|
|
3521
|
+
t.isStringObject = it;
|
|
3470
3522
|
function Ne(y) {
|
|
3471
|
-
return
|
|
3523
|
+
return v(y, f);
|
|
3472
3524
|
}
|
|
3473
3525
|
t.isBooleanObject = Ne;
|
|
3474
|
-
function
|
|
3475
|
-
return s &&
|
|
3526
|
+
function ot(y) {
|
|
3527
|
+
return s && v(y, p);
|
|
3476
3528
|
}
|
|
3477
|
-
t.isBigIntObject =
|
|
3478
|
-
function
|
|
3479
|
-
return a &&
|
|
3529
|
+
t.isBigIntObject = ot;
|
|
3530
|
+
function kr(y) {
|
|
3531
|
+
return a && v(y, m);
|
|
3480
3532
|
}
|
|
3481
|
-
t.isSymbolObject =
|
|
3482
|
-
function
|
|
3483
|
-
return Ae(y) ||
|
|
3533
|
+
t.isSymbolObject = kr;
|
|
3534
|
+
function si(y) {
|
|
3535
|
+
return Ae(y) || it(y) || Ne(y) || ot(y) || kr(y);
|
|
3484
3536
|
}
|
|
3485
|
-
t.isBoxedPrimitive =
|
|
3486
|
-
function
|
|
3487
|
-
return typeof Uint8Array < "u" && (
|
|
3537
|
+
t.isBoxedPrimitive = si;
|
|
3538
|
+
function ai(y) {
|
|
3539
|
+
return typeof Uint8Array < "u" && (nt(y) || C(y));
|
|
3488
3540
|
}
|
|
3489
|
-
t.isAnyArrayBuffer =
|
|
3541
|
+
t.isAnyArrayBuffer = ai, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
3490
3542
|
Object.defineProperty(t, y, {
|
|
3491
3543
|
enumerable: !1,
|
|
3492
3544
|
value: function() {
|
|
@@ -3494,11 +3546,11 @@ var na = function(e) {
|
|
|
3494
3546
|
}
|
|
3495
3547
|
});
|
|
3496
3548
|
});
|
|
3497
|
-
})(
|
|
3498
|
-
var
|
|
3549
|
+
})(Un);
|
|
3550
|
+
var $a = function(e) {
|
|
3499
3551
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3500
|
-
},
|
|
3501
|
-
typeof Object.create == "function" ?
|
|
3552
|
+
}, dr = { exports: {} };
|
|
3553
|
+
typeof Object.create == "function" ? dr.exports = function(e, r) {
|
|
3502
3554
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
3503
3555
|
constructor: {
|
|
3504
3556
|
value: e,
|
|
@@ -3507,7 +3559,7 @@ typeof Object.create == "function" ? nr.exports = function(e, r) {
|
|
|
3507
3559
|
configurable: !0
|
|
3508
3560
|
}
|
|
3509
3561
|
}));
|
|
3510
|
-
} :
|
|
3562
|
+
} : dr.exports = function(e, r) {
|
|
3511
3563
|
if (r) {
|
|
3512
3564
|
e.super_ = r;
|
|
3513
3565
|
var n = function() {
|
|
@@ -3515,7 +3567,7 @@ typeof Object.create == "function" ? nr.exports = function(e, r) {
|
|
|
3515
3567
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
3516
3568
|
}
|
|
3517
3569
|
};
|
|
3518
|
-
var
|
|
3570
|
+
var Va = dr.exports;
|
|
3519
3571
|
(function(t) {
|
|
3520
3572
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
3521
3573
|
for (var g = Object.keys(h), S = {}, C = 0; C < g.length; C++)
|
|
@@ -3548,7 +3600,7 @@ var ua = nr.exports;
|
|
|
3548
3600
|
return O;
|
|
3549
3601
|
}
|
|
3550
3602
|
}), A = S[g]; g < C; A = S[++g])
|
|
3551
|
-
|
|
3603
|
+
$(A) || !Z(A) ? L += " " + A : L += " " + s(A);
|
|
3552
3604
|
return L;
|
|
3553
3605
|
}, t.deprecate = function(l, h) {
|
|
3554
3606
|
if (typeof w < "u" && w.noDeprecation === !0)
|
|
@@ -3657,9 +3709,9 @@ var ua = nr.exports;
|
|
|
3657
3709
|
return p(h);
|
|
3658
3710
|
}
|
|
3659
3711
|
var F = "", G = !1, Ae = ["{", "}"];
|
|
3660
|
-
if (
|
|
3661
|
-
var
|
|
3662
|
-
F = " [Function" +
|
|
3712
|
+
if (b(h) && (G = !0, Ae = ["[", "]"]), oe(h)) {
|
|
3713
|
+
var it = h.name ? ": " + h.name : "";
|
|
3714
|
+
F = " [Function" + it + "]";
|
|
3663
3715
|
}
|
|
3664
3716
|
if (X(h) && (F = " " + RegExp.prototype.toString.call(h)), _e(h) && (F = " " + Date.prototype.toUTCString.call(h)), we(h) && (F = " " + p(h)), L.length === 0 && (!G || h.length == 0))
|
|
3665
3717
|
return Ae[0] + F + Ae[1];
|
|
@@ -3667,8 +3719,8 @@ var ua = nr.exports;
|
|
|
3667
3719
|
return X(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
|
|
3668
3720
|
l.seen.push(h);
|
|
3669
3721
|
var Ne;
|
|
3670
|
-
return G ? Ne = m(l, h, g, A, L) : Ne = L.map(function(
|
|
3671
|
-
return
|
|
3722
|
+
return G ? Ne = m(l, h, g, A, L) : Ne = L.map(function(ot) {
|
|
3723
|
+
return v(l, h, g, A, ot, G);
|
|
3672
3724
|
}), l.seen.pop(), I(Ne, F, Ae);
|
|
3673
3725
|
}
|
|
3674
3726
|
function f(l, h) {
|
|
@@ -3682,7 +3734,7 @@ var ua = nr.exports;
|
|
|
3682
3734
|
return l.stylize("" + h, "number");
|
|
3683
3735
|
if (_(h))
|
|
3684
3736
|
return l.stylize("" + h, "boolean");
|
|
3685
|
-
if (
|
|
3737
|
+
if ($(h))
|
|
3686
3738
|
return l.stylize("null", "null");
|
|
3687
3739
|
}
|
|
3688
3740
|
function p(l) {
|
|
@@ -3690,7 +3742,7 @@ var ua = nr.exports;
|
|
|
3690
3742
|
}
|
|
3691
3743
|
function m(l, h, g, S, C) {
|
|
3692
3744
|
for (var L = [], A = 0, O = h.length; A < O; ++A)
|
|
3693
|
-
Pe(h, String(A)) ? L.push(
|
|
3745
|
+
Pe(h, String(A)) ? L.push(v(
|
|
3694
3746
|
l,
|
|
3695
3747
|
h,
|
|
3696
3748
|
g,
|
|
@@ -3699,7 +3751,7 @@ var ua = nr.exports;
|
|
|
3699
3751
|
!0
|
|
3700
3752
|
)) : L.push("");
|
|
3701
3753
|
return C.forEach(function(F) {
|
|
3702
|
-
F.match(/^\d+$/) || L.push(
|
|
3754
|
+
F.match(/^\d+$/) || L.push(v(
|
|
3703
3755
|
l,
|
|
3704
3756
|
h,
|
|
3705
3757
|
g,
|
|
@@ -3709,9 +3761,9 @@ var ua = nr.exports;
|
|
|
3709
3761
|
));
|
|
3710
3762
|
}), L;
|
|
3711
3763
|
}
|
|
3712
|
-
function
|
|
3764
|
+
function v(l, h, g, S, C, L) {
|
|
3713
3765
|
var A, O, F;
|
|
3714
|
-
if (F = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, F.get ? F.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : F.set && (O = l.stylize("[Setter]", "special")), Pe(S, C) || (A = "[" + C + "]"), O || (l.seen.indexOf(F.value) < 0 ? (
|
|
3766
|
+
if (F = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, F.get ? F.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : F.set && (O = l.stylize("[Setter]", "special")), Pe(S, C) || (A = "[" + C + "]"), O || (l.seen.indexOf(F.value) < 0 ? ($(g) ? O = c(l, F.value, null) : O = c(l, F.value, g - 1), O.indexOf(`
|
|
3715
3767
|
`) > -1 && (L ? O = O.split(`
|
|
3716
3768
|
`).map(function(G) {
|
|
3717
3769
|
return " " + G;
|
|
@@ -3737,19 +3789,19 @@ var ua = nr.exports;
|
|
|
3737
3789
|
`) + " " + l.join(`,
|
|
3738
3790
|
`) + " " + g[1] : g[0] + h + " " + l.join(", ") + " " + g[1];
|
|
3739
3791
|
}
|
|
3740
|
-
t.types =
|
|
3741
|
-
function
|
|
3792
|
+
t.types = Un;
|
|
3793
|
+
function b(l) {
|
|
3742
3794
|
return Array.isArray(l);
|
|
3743
3795
|
}
|
|
3744
|
-
t.isArray =
|
|
3796
|
+
t.isArray = b;
|
|
3745
3797
|
function _(l) {
|
|
3746
3798
|
return typeof l == "boolean";
|
|
3747
3799
|
}
|
|
3748
3800
|
t.isBoolean = _;
|
|
3749
|
-
function
|
|
3801
|
+
function $(l) {
|
|
3750
3802
|
return l === null;
|
|
3751
3803
|
}
|
|
3752
|
-
t.isNull =
|
|
3804
|
+
t.isNull = $;
|
|
3753
3805
|
function q(l) {
|
|
3754
3806
|
return l == null;
|
|
3755
3807
|
}
|
|
@@ -3790,15 +3842,15 @@ var ua = nr.exports;
|
|
|
3790
3842
|
return typeof l == "function";
|
|
3791
3843
|
}
|
|
3792
3844
|
t.isFunction = oe;
|
|
3793
|
-
function
|
|
3845
|
+
function Dt(l) {
|
|
3794
3846
|
return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
|
|
3795
3847
|
typeof l > "u";
|
|
3796
3848
|
}
|
|
3797
|
-
t.isPrimitive =
|
|
3849
|
+
t.isPrimitive = Dt, t.isBuffer = $a;
|
|
3798
3850
|
function me(l) {
|
|
3799
3851
|
return Object.prototype.toString.call(l);
|
|
3800
3852
|
}
|
|
3801
|
-
function
|
|
3853
|
+
function ze(l) {
|
|
3802
3854
|
return l < 10 ? "0" + l.toString(10) : l.toString(10);
|
|
3803
3855
|
}
|
|
3804
3856
|
var ke = [
|
|
@@ -3815,17 +3867,17 @@ var ua = nr.exports;
|
|
|
3815
3867
|
"Nov",
|
|
3816
3868
|
"Dec"
|
|
3817
3869
|
];
|
|
3818
|
-
function
|
|
3870
|
+
function Rt() {
|
|
3819
3871
|
var l = /* @__PURE__ */ new Date(), h = [
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3872
|
+
ze(l.getHours()),
|
|
3873
|
+
ze(l.getMinutes()),
|
|
3874
|
+
ze(l.getSeconds())
|
|
3823
3875
|
].join(":");
|
|
3824
3876
|
return [l.getDate(), ke[l.getMonth()], h].join(" ");
|
|
3825
3877
|
}
|
|
3826
3878
|
t.log = function() {
|
|
3827
|
-
console.log("%s - %s",
|
|
3828
|
-
}, t.inherits =
|
|
3879
|
+
console.log("%s - %s", Rt(), t.format.apply(t, arguments));
|
|
3880
|
+
}, t.inherits = Va, t._extend = function(l, h) {
|
|
3829
3881
|
if (!h || !Z(h))
|
|
3830
3882
|
return l;
|
|
3831
3883
|
for (var g = Object.keys(h), S = g.length; S--; )
|
|
@@ -3882,7 +3934,7 @@ var ua = nr.exports;
|
|
|
3882
3934
|
}
|
|
3883
3935
|
return h(l);
|
|
3884
3936
|
}
|
|
3885
|
-
function
|
|
3937
|
+
function nt(l) {
|
|
3886
3938
|
if (typeof l != "function")
|
|
3887
3939
|
throw new TypeError('The "original" argument must be of type Function');
|
|
3888
3940
|
function h() {
|
|
@@ -3908,9 +3960,9 @@ var ua = nr.exports;
|
|
|
3908
3960
|
e(l)
|
|
3909
3961
|
), h;
|
|
3910
3962
|
}
|
|
3911
|
-
t.callbackify =
|
|
3912
|
-
})(
|
|
3913
|
-
const { inherits:
|
|
3963
|
+
t.callbackify = nt;
|
|
3964
|
+
})(_t);
|
|
3965
|
+
const { inherits: ja, format: Kt } = _t;
|
|
3914
3966
|
function Ee(t, e, r = Error) {
|
|
3915
3967
|
if (!t)
|
|
3916
3968
|
throw new Error("Avvio error code must not be empty");
|
|
@@ -3919,13 +3971,13 @@ function Ee(t, e, r = Error) {
|
|
|
3919
3971
|
function n(i, o, s) {
|
|
3920
3972
|
if (!new.target)
|
|
3921
3973
|
return new n(i, o, s);
|
|
3922
|
-
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message =
|
|
3974
|
+
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = Kt(e, i, o, s) : i && o ? this.message = Kt(e, i, o) : i ? this.message = Kt(e, i) : this.message = e;
|
|
3923
3975
|
}
|
|
3924
3976
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
3925
3977
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
3926
|
-
},
|
|
3978
|
+
}, ja(n, r), n;
|
|
3927
3979
|
}
|
|
3928
|
-
var
|
|
3980
|
+
var ri = {
|
|
3929
3981
|
createError: Ee,
|
|
3930
3982
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Ee(
|
|
3931
3983
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -3951,7 +4003,7 @@ var qn = {
|
|
|
3951
4003
|
"AVV_ERR_READY_TIMEOUT",
|
|
3952
4004
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
3953
4005
|
)
|
|
3954
|
-
},
|
|
4006
|
+
}, Ma = function t(e, r, n) {
|
|
3955
4007
|
r === void 0 && (r = ""), n || (n = {});
|
|
3956
4008
|
var i = function(u) {
|
|
3957
4009
|
var d = {
|
|
@@ -3973,15 +4025,15 @@ var qn = {
|
|
|
3973
4025
|
return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
3974
4026
|
}).join("");
|
|
3975
4027
|
};
|
|
3976
|
-
const
|
|
3977
|
-
let
|
|
4028
|
+
const Ua = Ma, dn = Symbol("avvio.TimeTree.untrackNode"), zt = Symbol("avvio.TimeTree.trackNode"), fn = Symbol("avvio.TimeTree.getParent"), hn = Symbol("avvio.TimeTree.getNode"), pn = Symbol("avvio.TimeTree.addNode");
|
|
4029
|
+
let xa = class {
|
|
3978
4030
|
constructor() {
|
|
3979
4031
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
3980
4032
|
}
|
|
3981
|
-
[
|
|
4033
|
+
[zt](e) {
|
|
3982
4034
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
3983
4035
|
}
|
|
3984
|
-
[
|
|
4036
|
+
[dn](e) {
|
|
3985
4037
|
this.tableId.delete(e.id);
|
|
3986
4038
|
const r = this.tableLabel.get(e.label);
|
|
3987
4039
|
if (r.id) {
|
|
@@ -3990,54 +4042,54 @@ let fa = class {
|
|
|
3990
4042
|
}
|
|
3991
4043
|
r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
|
|
3992
4044
|
}
|
|
3993
|
-
[
|
|
4045
|
+
[fn](e) {
|
|
3994
4046
|
if (e === null)
|
|
3995
4047
|
return this.root;
|
|
3996
4048
|
const r = this.tableLabel.get(e);
|
|
3997
4049
|
return r.id ? r : r[r.length - 1];
|
|
3998
4050
|
}
|
|
3999
|
-
[
|
|
4051
|
+
[hn](e) {
|
|
4000
4052
|
return this.tableId.get(e);
|
|
4001
4053
|
}
|
|
4002
|
-
[
|
|
4054
|
+
[pn](e, r, n) {
|
|
4003
4055
|
if (e === null)
|
|
4004
4056
|
return this.root = {
|
|
4005
4057
|
id: "root",
|
|
4006
4058
|
label: r,
|
|
4007
4059
|
start: n,
|
|
4008
4060
|
nodes: []
|
|
4009
|
-
}, this[
|
|
4010
|
-
const o = this[
|
|
4061
|
+
}, this[zt](this.root), this.root.id;
|
|
4062
|
+
const o = this[fn](e), s = `${r}-${Math.random()}`, a = {
|
|
4011
4063
|
id: s,
|
|
4012
4064
|
parent: e,
|
|
4013
4065
|
start: n,
|
|
4014
4066
|
label: r,
|
|
4015
4067
|
nodes: []
|
|
4016
4068
|
};
|
|
4017
|
-
return o.nodes.push(a), this[
|
|
4069
|
+
return o.nodes.push(a), this[zt](a), s;
|
|
4018
4070
|
}
|
|
4019
4071
|
start(e, r, n = Date.now()) {
|
|
4020
|
-
return this[
|
|
4072
|
+
return this[pn](e, r, n);
|
|
4021
4073
|
}
|
|
4022
4074
|
stop(e, r = Date.now()) {
|
|
4023
|
-
const n = this[
|
|
4024
|
-
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[
|
|
4075
|
+
const n = this[hn](e);
|
|
4076
|
+
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[dn](n));
|
|
4025
4077
|
}
|
|
4026
4078
|
toJSON() {
|
|
4027
4079
|
return Object.assign({}, this.root);
|
|
4028
4080
|
}
|
|
4029
4081
|
prittyPrint() {
|
|
4030
4082
|
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());
|
|
4031
|
-
return
|
|
4083
|
+
return Ua(r);
|
|
4032
4084
|
}
|
|
4033
4085
|
};
|
|
4034
|
-
var
|
|
4035
|
-
function
|
|
4036
|
-
if (
|
|
4037
|
-
return
|
|
4038
|
-
|
|
4086
|
+
var Ba = xa, Lr = { exports: {} }, fr = { exports: {} }, Ht, yn;
|
|
4087
|
+
function qa() {
|
|
4088
|
+
if (yn)
|
|
4089
|
+
return Ht;
|
|
4090
|
+
yn = 1;
|
|
4039
4091
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4040
|
-
|
|
4092
|
+
Ht = function(c, f) {
|
|
4041
4093
|
f = f || {};
|
|
4042
4094
|
var p = typeof c;
|
|
4043
4095
|
if (p === "string" && c.length > 0)
|
|
@@ -4109,13 +4161,13 @@ function pa() {
|
|
|
4109
4161
|
return f >= n ? d(c, f, n, "day") : f >= r ? d(c, f, r, "hour") : f >= e ? d(c, f, e, "minute") : f >= t ? d(c, f, t, "second") : c + " ms";
|
|
4110
4162
|
}
|
|
4111
4163
|
function d(c, f, p, m) {
|
|
4112
|
-
var
|
|
4113
|
-
return Math.round(c / p) + " " + m + (
|
|
4164
|
+
var v = f >= p * 1.5;
|
|
4165
|
+
return Math.round(c / p) + " " + m + (v ? "s" : "");
|
|
4114
4166
|
}
|
|
4115
|
-
return
|
|
4167
|
+
return Ht;
|
|
4116
4168
|
}
|
|
4117
|
-
function
|
|
4118
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4169
|
+
function Qa(t) {
|
|
4170
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = qa(), r.destroy = d, Object.keys(t).forEach((c) => {
|
|
4119
4171
|
r[c] = t[c];
|
|
4120
4172
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4121
4173
|
function e(c) {
|
|
@@ -4126,31 +4178,31 @@ function ya(t) {
|
|
|
4126
4178
|
}
|
|
4127
4179
|
r.selectColor = e;
|
|
4128
4180
|
function r(c) {
|
|
4129
|
-
let f, p = null, m,
|
|
4130
|
-
function I(...
|
|
4181
|
+
let f, p = null, m, v;
|
|
4182
|
+
function I(...b) {
|
|
4131
4183
|
if (!I.enabled)
|
|
4132
4184
|
return;
|
|
4133
|
-
const _ = I,
|
|
4134
|
-
_.diff = q, _.prev = f, _.curr =
|
|
4185
|
+
const _ = I, $ = Number(/* @__PURE__ */ new Date()), q = $ - (f || $);
|
|
4186
|
+
_.diff = q, _.prev = f, _.curr = $, f = $, b[0] = r.coerce(b[0]), typeof b[0] != "string" && b.unshift("%O");
|
|
4135
4187
|
let J = 0;
|
|
4136
|
-
|
|
4188
|
+
b[0] = b[0].replace(/%([a-zA-Z%])/g, (R, T) => {
|
|
4137
4189
|
if (R === "%%")
|
|
4138
4190
|
return "%";
|
|
4139
4191
|
J++;
|
|
4140
4192
|
const X = r.formatters[T];
|
|
4141
4193
|
if (typeof X == "function") {
|
|
4142
|
-
const Z =
|
|
4143
|
-
R = X.call(_, Z),
|
|
4194
|
+
const Z = b[J];
|
|
4195
|
+
R = X.call(_, Z), b.splice(J, 1), J--;
|
|
4144
4196
|
}
|
|
4145
4197
|
return R;
|
|
4146
|
-
}), r.formatArgs.call(_,
|
|
4198
|
+
}), r.formatArgs.call(_, b), (_.log || r.log).apply(_, b);
|
|
4147
4199
|
}
|
|
4148
4200
|
return I.namespace = c, I.useColors = r.useColors(), I.color = r.selectColor(c), I.extend = n, I.destroy = r.destroy, Object.defineProperty(I, "enabled", {
|
|
4149
4201
|
enumerable: !0,
|
|
4150
4202
|
configurable: !1,
|
|
4151
|
-
get: () => p !== null ? p : (m !== r.namespaces && (m = r.namespaces,
|
|
4152
|
-
set: (
|
|
4153
|
-
p =
|
|
4203
|
+
get: () => p !== null ? p : (m !== r.namespaces && (m = r.namespaces, v = r.enabled(c)), v),
|
|
4204
|
+
set: (b) => {
|
|
4205
|
+
p = b;
|
|
4154
4206
|
}
|
|
4155
4207
|
}), typeof r.init == "function" && r.init(I), I;
|
|
4156
4208
|
}
|
|
@@ -4195,7 +4247,7 @@ function ya(t) {
|
|
|
4195
4247
|
}
|
|
4196
4248
|
return r.enable(r.load()), r;
|
|
4197
4249
|
}
|
|
4198
|
-
var
|
|
4250
|
+
var Ga = Qa;
|
|
4199
4251
|
(function(t, e) {
|
|
4200
4252
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4201
4253
|
let u = !1;
|
|
@@ -4319,7 +4371,7 @@ var ga = ya;
|
|
|
4319
4371
|
} catch {
|
|
4320
4372
|
}
|
|
4321
4373
|
}
|
|
4322
|
-
t.exports =
|
|
4374
|
+
t.exports = Ga(e);
|
|
4323
4375
|
const { formatters: a } = t.exports;
|
|
4324
4376
|
a.j = function(u) {
|
|
4325
4377
|
try {
|
|
@@ -4328,24 +4380,24 @@ var ga = ya;
|
|
|
4328
4380
|
return "[UnexpectedJSONParseError]: " + d.message;
|
|
4329
4381
|
}
|
|
4330
4382
|
};
|
|
4331
|
-
})(
|
|
4332
|
-
var
|
|
4333
|
-
const
|
|
4334
|
-
function
|
|
4335
|
-
return t[
|
|
4383
|
+
})(fr, fr.exports);
|
|
4384
|
+
var ni = fr.exports;
|
|
4385
|
+
const Ka = kn, za = Mn.EventEmitter, Ha = _t.inherits, M = ni("avvio"), { AVV_ERR_READY_TIMEOUT: Wa } = ri, Wt = Symbol.for("plugin-meta");
|
|
4386
|
+
function Ja(t, e) {
|
|
4387
|
+
return t[Wt] && t[Wt].name ? t[Wt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4336
4388
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4337
4389
|
}
|
|
4338
|
-
function
|
|
4390
|
+
function Ya() {
|
|
4339
4391
|
const t = {};
|
|
4340
4392
|
return t.promise = new Promise((e, r) => {
|
|
4341
4393
|
t.resolve = e, t.reject = r;
|
|
4342
4394
|
}), t;
|
|
4343
4395
|
}
|
|
4344
|
-
function
|
|
4345
|
-
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 =
|
|
4396
|
+
function Ke(t, e, r, n, i) {
|
|
4397
|
+
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 = Ja(e, r), this.isAfter = n, this.q = Ka(t, Xa, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4346
4398
|
}
|
|
4347
|
-
|
|
4348
|
-
|
|
4399
|
+
Ha(Ke, za);
|
|
4400
|
+
Ke.prototype.exec = function(t, e) {
|
|
4349
4401
|
const r = this.func;
|
|
4350
4402
|
let n = !1;
|
|
4351
4403
|
const i = this.name;
|
|
@@ -4372,7 +4424,7 @@ ze.prototype.exec = function(t, e) {
|
|
|
4372
4424
|
};
|
|
4373
4425
|
this.timeout > 0 && (M("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4374
4426
|
M("timed out", i), o = null;
|
|
4375
|
-
const u = new
|
|
4427
|
+
const u = new Wa(i);
|
|
4376
4428
|
u.fn = r, s(u);
|
|
4377
4429
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4378
4430
|
const a = r(this.server, this.opts, s);
|
|
@@ -4381,7 +4433,7 @@ ze.prototype.exec = function(t, e) {
|
|
|
4381
4433
|
(u) => w.nextTick(s, u)
|
|
4382
4434
|
));
|
|
4383
4435
|
};
|
|
4384
|
-
|
|
4436
|
+
Ke.prototype.loadedSoFar = function() {
|
|
4385
4437
|
if (this.loaded)
|
|
4386
4438
|
return Promise.resolve();
|
|
4387
4439
|
const t = () => {
|
|
@@ -4390,12 +4442,12 @@ ze.prototype.loadedSoFar = function() {
|
|
|
4390
4442
|
}), this.q.resume();
|
|
4391
4443
|
};
|
|
4392
4444
|
let e;
|
|
4393
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4445
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Ya(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4394
4446
|
};
|
|
4395
|
-
|
|
4447
|
+
Ke.prototype.enqueue = function(t, e) {
|
|
4396
4448
|
M("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4397
4449
|
};
|
|
4398
|
-
|
|
4450
|
+
Ke.prototype.finish = function(t, e) {
|
|
4399
4451
|
M("finish", this.name, t);
|
|
4400
4452
|
const r = () => {
|
|
4401
4453
|
this.loaded || (M("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -4415,19 +4467,19 @@ ze.prototype.finish = function(t, e) {
|
|
|
4415
4467
|
r();
|
|
4416
4468
|
else
|
|
4417
4469
|
M("delayed", this.name), this.q.drain = () => {
|
|
4418
|
-
M("drain", this.name), this.q.drain =
|
|
4470
|
+
M("drain", this.name), this.q.drain = Za, queueMicrotask(n);
|
|
4419
4471
|
};
|
|
4420
4472
|
};
|
|
4421
4473
|
queueMicrotask(n), this.q.resume();
|
|
4422
4474
|
};
|
|
4423
|
-
function
|
|
4475
|
+
function Xa(t, e) {
|
|
4424
4476
|
const r = this;
|
|
4425
|
-
w.nextTick(
|
|
4477
|
+
w.nextTick(_r.bind(r), t, e);
|
|
4426
4478
|
}
|
|
4427
|
-
function
|
|
4479
|
+
function _r(t, e) {
|
|
4428
4480
|
if (typeof t.func.then == "function") {
|
|
4429
4481
|
t.func.then((n) => {
|
|
4430
|
-
typeof n.default == "function" && (n = n.default), t.func = n,
|
|
4482
|
+
typeof n.default == "function" && (n = n.default), t.func = n, _r.call(this, t, e);
|
|
4431
4483
|
}, e);
|
|
4432
4484
|
return;
|
|
4433
4485
|
}
|
|
@@ -4438,59 +4490,59 @@ function br(t, e) {
|
|
|
4438
4490
|
});
|
|
4439
4491
|
});
|
|
4440
4492
|
}
|
|
4441
|
-
function
|
|
4493
|
+
function Za() {
|
|
4442
4494
|
}
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
var
|
|
4446
|
-
const
|
|
4447
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
4448
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
4449
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4450
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4451
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4452
|
-
} =
|
|
4453
|
-
function
|
|
4495
|
+
Lr.exports = Ke;
|
|
4496
|
+
Lr.exports.loadPlugin = _r;
|
|
4497
|
+
var eu = Lr.exports;
|
|
4498
|
+
const gn = kn, tu = Mn.EventEmitter, ru = _t.inherits, {
|
|
4499
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: Jt,
|
|
4500
|
+
AVV_ERR_CALLBACK_NOT_FN: Ye,
|
|
4501
|
+
AVV_ERR_PLUGIN_NOT_VALID: nu,
|
|
4502
|
+
AVV_ERR_ROOT_PLG_BOOTED: iu,
|
|
4503
|
+
AVV_ERR_READY_TIMEOUT: ou
|
|
4504
|
+
} = ri, su = Ba, hr = eu, Ge = ni("avvio"), Et = Symbol("kAvvio"), Yt = Symbol("kThenifyDoNotWrap");
|
|
4505
|
+
function au(t, e, r) {
|
|
4454
4506
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
4455
4507
|
if (t[i])
|
|
4456
|
-
throw new
|
|
4508
|
+
throw new Jt(i);
|
|
4457
4509
|
if (t[o])
|
|
4458
|
-
throw new
|
|
4510
|
+
throw new Jt(o);
|
|
4459
4511
|
if (t[s])
|
|
4460
|
-
throw new
|
|
4512
|
+
throw new Jt(s);
|
|
4461
4513
|
t[i] = function(d, c) {
|
|
4462
4514
|
return r.use(d, c), this;
|
|
4463
|
-
}, Object.defineProperty(t, "then", { get:
|
|
4464
|
-
return typeof d != "function" ? r._loadRegistered() : (r.after(
|
|
4515
|
+
}, Object.defineProperty(t, "then", { get: ii.bind(r) }), t[Et] = !0, t[o] = function(d) {
|
|
4516
|
+
return typeof d != "function" ? r._loadRegistered() : (r.after(Xt(d, this)), this);
|
|
4465
4517
|
}, t[s] = function(d) {
|
|
4466
4518
|
if (d && typeof d != "function")
|
|
4467
|
-
throw new
|
|
4468
|
-
return r.ready(d ?
|
|
4519
|
+
throw new Ye(s, typeof d);
|
|
4520
|
+
return r.ready(d ? Xt(d, this) : void 0);
|
|
4469
4521
|
}, t[a] = function(d) {
|
|
4470
4522
|
if (typeof d != "function")
|
|
4471
|
-
throw new
|
|
4472
|
-
return r.onClose(
|
|
4523
|
+
throw new Ye(a, typeof d);
|
|
4524
|
+
return r.onClose(fu(d, this)), this;
|
|
4473
4525
|
}, t[u] = function(d) {
|
|
4474
4526
|
if (d && typeof d != "function")
|
|
4475
|
-
throw new
|
|
4476
|
-
return d ? (r.close(
|
|
4527
|
+
throw new Ye(u, typeof d);
|
|
4528
|
+
return d ? (r.close(Xt(d, this)), this) : r.close();
|
|
4477
4529
|
};
|
|
4478
4530
|
}
|
|
4479
4531
|
function x(t, e, r) {
|
|
4480
4532
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
|
|
4481
4533
|
const n = new x(t, e, r);
|
|
4482
|
-
return t &&
|
|
4534
|
+
return t && au(t, e, n), n;
|
|
4483
4535
|
}
|
|
4484
|
-
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
|
|
4485
|
-
this.emit("start"), this._readyQ.drain =
|
|
4486
|
-
}, this._closeQ =
|
|
4487
|
-
this.emit("close"), this._closeQ.drain =
|
|
4488
|
-
}, this._doStart = null, this._root = new
|
|
4536
|
+
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 su(), this._readyQ = gn(this, oi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4537
|
+
this.emit("start"), this._readyQ.drain = mn;
|
|
4538
|
+
}, this._closeQ = gn(this, du, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4539
|
+
this.emit("close"), this._closeQ.drain = mn;
|
|
4540
|
+
}, this._doStart = null, this._root = new hr(this, uu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
4489
4541
|
const s = this.pluginTree.start(null, i, o);
|
|
4490
4542
|
this._root.once("loaded", (a, u, d) => {
|
|
4491
4543
|
this.pluginTree.stop(s, d);
|
|
4492
4544
|
});
|
|
4493
|
-
}),
|
|
4545
|
+
}), hr.loadPlugin.call(this, this._root, (n) => {
|
|
4494
4546
|
Ge("root plugin ready");
|
|
4495
4547
|
try {
|
|
4496
4548
|
this.emit("preReady"), this._root = null;
|
|
@@ -4505,22 +4557,22 @@ function x(t, e, r) {
|
|
|
4505
4557
|
this._readyQ.resume();
|
|
4506
4558
|
});
|
|
4507
4559
|
}
|
|
4508
|
-
function
|
|
4560
|
+
function uu(t, e, r) {
|
|
4509
4561
|
this._doStart = r, e.autostart && this.start();
|
|
4510
4562
|
}
|
|
4511
|
-
|
|
4563
|
+
ru(x, tu);
|
|
4512
4564
|
x.prototype.start = function() {
|
|
4513
4565
|
return this.started = !0, w.nextTick(this._doStart), this;
|
|
4514
4566
|
};
|
|
4515
4567
|
x.prototype.override = function(t, e, r) {
|
|
4516
4568
|
return t;
|
|
4517
4569
|
};
|
|
4518
|
-
function
|
|
4570
|
+
function cu(t) {
|
|
4519
4571
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4520
|
-
throw new
|
|
4572
|
+
throw new nu(typeof t);
|
|
4521
4573
|
return t;
|
|
4522
4574
|
}
|
|
4523
|
-
x.prototype[
|
|
4575
|
+
x.prototype[Et] = !0;
|
|
4524
4576
|
x.prototype.use = function(t, e) {
|
|
4525
4577
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
4526
4578
|
};
|
|
@@ -4528,11 +4580,11 @@ x.prototype._loadRegistered = function() {
|
|
|
4528
4580
|
const t = this._current[0];
|
|
4529
4581
|
return !this.started && !this.booted && w.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4530
4582
|
};
|
|
4531
|
-
Object.defineProperty(x.prototype, "then", { get:
|
|
4583
|
+
Object.defineProperty(x.prototype, "then", { get: ii });
|
|
4532
4584
|
x.prototype._addPlugin = function(t, e, r) {
|
|
4533
|
-
if (t =
|
|
4534
|
-
throw new
|
|
4535
|
-
const n = this._current[0], i = new
|
|
4585
|
+
if (t = cu(t), e = e || {}, this.booted)
|
|
4586
|
+
throw new iu();
|
|
4587
|
+
const n = this._current[0], i = new hr(this, t, e, r);
|
|
4536
4588
|
if (i.once("start", (o, s, a) => {
|
|
4537
4589
|
const u = this.pluginTree.start(n.name, s, a);
|
|
4538
4590
|
i.once("loaded", (d, c, f) => {
|
|
@@ -4549,7 +4601,7 @@ x.prototype.after = function(t) {
|
|
|
4549
4601
|
return this._loadRegistered();
|
|
4550
4602
|
this._addPlugin(e.bind(this), {}, !0);
|
|
4551
4603
|
function e(r, n, i) {
|
|
4552
|
-
|
|
4604
|
+
oi.call(this, t, i);
|
|
4553
4605
|
}
|
|
4554
4606
|
return this;
|
|
4555
4607
|
};
|
|
@@ -4566,7 +4618,7 @@ x.prototype.close = function(t) {
|
|
|
4566
4618
|
let e;
|
|
4567
4619
|
if (t) {
|
|
4568
4620
|
if (typeof t != "function")
|
|
4569
|
-
throw new
|
|
4621
|
+
throw new Ye("close", typeof t);
|
|
4570
4622
|
} else
|
|
4571
4623
|
e = new Promise(function(r, n) {
|
|
4572
4624
|
t = function(i) {
|
|
@@ -4582,7 +4634,7 @@ x.prototype.close = function(t) {
|
|
|
4582
4634
|
x.prototype.ready = function(t) {
|
|
4583
4635
|
if (t) {
|
|
4584
4636
|
if (typeof t != "function")
|
|
4585
|
-
throw new
|
|
4637
|
+
throw new Ye("ready", typeof t);
|
|
4586
4638
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
4587
4639
|
return;
|
|
4588
4640
|
}
|
|
@@ -4600,40 +4652,40 @@ x.prototype.prettyPrint = function() {
|
|
|
4600
4652
|
x.prototype.toJSON = function() {
|
|
4601
4653
|
return this.pluginTree.toJSON();
|
|
4602
4654
|
};
|
|
4603
|
-
function
|
|
4655
|
+
function mn() {
|
|
4604
4656
|
}
|
|
4605
|
-
function
|
|
4657
|
+
function ii() {
|
|
4606
4658
|
if (this.booted) {
|
|
4607
4659
|
Ge("thenify returning null because we are already booted");
|
|
4608
4660
|
return;
|
|
4609
4661
|
}
|
|
4610
|
-
if (this[
|
|
4611
|
-
this[
|
|
4662
|
+
if (this[Yt]) {
|
|
4663
|
+
this[Yt] = !1;
|
|
4612
4664
|
return;
|
|
4613
4665
|
}
|
|
4614
|
-
return Ge("thenify"), (t, e) => this._loadRegistered().then(() => (this[
|
|
4666
|
+
return Ge("thenify"), (t, e) => this._loadRegistered().then(() => (this[Yt] = !0, t(this._server)), e);
|
|
4615
4667
|
}
|
|
4616
|
-
function
|
|
4668
|
+
function oi(t, e) {
|
|
4617
4669
|
const r = this._server, n = this._error;
|
|
4618
4670
|
let i;
|
|
4619
4671
|
if (this._error = null, t.length === 0)
|
|
4620
|
-
this._error = n, i = t(), i && !i[
|
|
4672
|
+
this._error = n, i = t(), i && !i[Et] && typeof i.then == "function" ? i.then(() => w.nextTick(e), (o) => w.nextTick(e, o)) : w.nextTick(e);
|
|
4621
4673
|
else if (t.length === 1)
|
|
4622
|
-
i = t(n), i && !i[
|
|
4674
|
+
i = t(n), i && !i[Et] && typeof i.then == "function" ? i.then(() => w.nextTick(e), (o) => w.nextTick(e, o)) : w.nextTick(e);
|
|
4623
4675
|
else if (this._timeout === 0) {
|
|
4624
4676
|
const o = (s) => {
|
|
4625
4677
|
this._error = s, e(this._error);
|
|
4626
4678
|
};
|
|
4627
4679
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
4628
4680
|
} else
|
|
4629
|
-
|
|
4681
|
+
lu.call(this, t, n, r, e);
|
|
4630
4682
|
}
|
|
4631
|
-
function
|
|
4683
|
+
function lu(t, e, r, n) {
|
|
4632
4684
|
const i = t.name;
|
|
4633
4685
|
Ge("setting up ready timeout", i, this._timeout);
|
|
4634
4686
|
let o = setTimeout(() => {
|
|
4635
4687
|
Ge("timed out", i), o = null;
|
|
4636
|
-
const a = new
|
|
4688
|
+
const a = new ou(i);
|
|
4637
4689
|
a.fn = t, this._error = a, n(a);
|
|
4638
4690
|
}, this._timeout);
|
|
4639
4691
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -4641,7 +4693,7 @@ function Ra(t, e, r, n) {
|
|
|
4641
4693
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
4642
4694
|
}
|
|
4643
4695
|
}
|
|
4644
|
-
function
|
|
4696
|
+
function du(t, e) {
|
|
4645
4697
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
4646
4698
|
if (t.length === 0 || t.length === 1) {
|
|
4647
4699
|
let i;
|
|
@@ -4652,7 +4704,7 @@ function Va(t, e) {
|
|
|
4652
4704
|
} else
|
|
4653
4705
|
t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
4654
4706
|
}
|
|
4655
|
-
function
|
|
4707
|
+
function fu(t, e) {
|
|
4656
4708
|
return r.bind(e);
|
|
4657
4709
|
function r(n, i) {
|
|
4658
4710
|
let o;
|
|
@@ -4663,7 +4715,7 @@ function $a(t, e) {
|
|
|
4663
4715
|
}, i) : w.nextTick(i)) : t(this, i);
|
|
4664
4716
|
}
|
|
4665
4717
|
}
|
|
4666
|
-
function
|
|
4718
|
+
function Xt(t, e) {
|
|
4667
4719
|
return r.bind(e);
|
|
4668
4720
|
function r(n, i) {
|
|
4669
4721
|
let o;
|
|
@@ -4674,16 +4726,16 @@ function Qt(t, e) {
|
|
|
4674
4726
|
}, i) : w.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : w.nextTick(i);
|
|
4675
4727
|
}
|
|
4676
4728
|
}
|
|
4677
|
-
|
|
4678
|
-
|
|
4729
|
+
mr.exports = x;
|
|
4730
|
+
mr.exports.express = function(t) {
|
|
4679
4731
|
return x(t, {
|
|
4680
4732
|
expose: {
|
|
4681
4733
|
use: "load"
|
|
4682
4734
|
}
|
|
4683
4735
|
});
|
|
4684
4736
|
};
|
|
4685
|
-
var
|
|
4686
|
-
const
|
|
4737
|
+
var hu = mr.exports;
|
|
4738
|
+
const pu = /* @__PURE__ */ Bo(hu);
|
|
4687
4739
|
(function() {
|
|
4688
4740
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
4689
4741
|
return;
|
|
@@ -4701,9 +4753,9 @@ const Ma = /* @__PURE__ */ _o(ja);
|
|
|
4701
4753
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
4702
4754
|
}
|
|
4703
4755
|
})();
|
|
4704
|
-
function
|
|
4705
|
-
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 =
|
|
4706
|
-
return s.use(
|
|
4756
|
+
function ju(t, e = !0, r = !0, n) {
|
|
4757
|
+
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 = pu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4758
|
+
return s.use(So), s.use(yo, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(bo, { videoPlayerController: n?.videoPlayerController }), s.use(xi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Ki), s.use(vo), s.use(No), s.use(oo), s.use(xo), s.after((a, u, d) => {
|
|
4707
4759
|
if (a)
|
|
4708
4760
|
throw a;
|
|
4709
4761
|
u.ready(), d();
|
|
@@ -4716,5 +4768,5 @@ function cu(t, e = !0, r = !0, n) {
|
|
|
4716
4768
|
}), s;
|
|
4717
4769
|
}
|
|
4718
4770
|
export {
|
|
4719
|
-
|
|
4771
|
+
ju as StreamLayer
|
|
4720
4772
|
};
|