@streamlayer/sdk-web 0.26.3 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +7 -7
- package/lib/es/index.js +396 -396
- package/package.json +10 -10
package/lib/es/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { QuestionType as Qe, QuestionStatus as Wt } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
1
|
+
import { QuestionType as Qe, SilenceSetting as Gr, QuestionStatus as Wt } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
3
|
import { SdkOverlayType as ve } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
|
-
import { computed as
|
|
4
|
+
import { computed as Qr, map as Dn, atom as It } from "nanostores";
|
|
5
5
|
import "@nanostores/logger";
|
|
6
6
|
import "microdiff";
|
|
7
|
-
import { Code as
|
|
8
|
-
import { createGrpcWebTransport as
|
|
9
|
-
import { nanoquery as
|
|
10
|
-
import { Events as
|
|
7
|
+
import { Code as jn, createPromiseClient as Mn, createCallbackClient as Vn } from "@connectrpc/connect";
|
|
8
|
+
import { createGrpcWebTransport as qn } from "@connectrpc/connect-web";
|
|
9
|
+
import { nanoquery as Gn } from "@nanostores/query";
|
|
10
|
+
import { Events as Qn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
11
11
|
import { Client as Ft } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
12
|
-
import { Users as
|
|
13
|
-
import { pino as
|
|
12
|
+
import { Users as zr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
13
|
+
import { pino as zn } from "pino";
|
|
14
14
|
import { Feed as pe } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
-
import { Leaderboard as
|
|
15
|
+
import { Leaderboard as Hr } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
var Kr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
17
|
-
function
|
|
17
|
+
function Hn(t) {
|
|
18
18
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
19
19
|
}
|
|
20
|
-
var _ = {},
|
|
21
|
-
Ct.byteLength =
|
|
22
|
-
Ct.toByteArray =
|
|
23
|
-
Ct.fromByteArray =
|
|
20
|
+
var _ = {}, Wr = {}, Ct = {};
|
|
21
|
+
Ct.byteLength = Jn;
|
|
22
|
+
Ct.toByteArray = Xn;
|
|
23
|
+
Ct.fromByteArray = ti;
|
|
24
24
|
var we = [], oe = [], Kn = typeof Uint8Array < "u" ? Uint8Array : Array, Pt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
25
|
-
for (var je = 0,
|
|
25
|
+
for (var je = 0, Wn = Pt.length; je < Wn; ++je)
|
|
26
26
|
we[je] = Pt[je], oe[Pt.charCodeAt(je)] = je;
|
|
27
27
|
oe["-".charCodeAt(0)] = 62;
|
|
28
28
|
oe["_".charCodeAt(0)] = 63;
|
|
29
|
-
function
|
|
29
|
+
function Jr(t) {
|
|
30
30
|
var e = t.length;
|
|
31
31
|
if (e % 4 > 0)
|
|
32
32
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -35,30 +35,30 @@ function Wr(t) {
|
|
|
35
35
|
var o = r === e ? 0 : 4 - r % 4;
|
|
36
36
|
return [r, o];
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
var e =
|
|
38
|
+
function Jn(t) {
|
|
39
|
+
var e = Jr(t), r = e[0], o = e[1];
|
|
40
40
|
return (r + o) * 3 / 4 - o;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Yn(t, e, r) {
|
|
43
43
|
return (e + r) * 3 / 4 - r;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
var e, r =
|
|
45
|
+
function Xn(t) {
|
|
46
|
+
var e, r = Jr(t), o = r[0], s = r[1], u = new Kn(Yn(t, o, s)), l = 0, f = s > 0 ? o - 4 : o, p;
|
|
47
47
|
for (p = 0; p < f; p += 4)
|
|
48
48
|
e = oe[t.charCodeAt(p)] << 18 | oe[t.charCodeAt(p + 1)] << 12 | oe[t.charCodeAt(p + 2)] << 6 | oe[t.charCodeAt(p + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
|
|
49
49
|
return s === 2 && (e = oe[t.charCodeAt(p)] << 2 | oe[t.charCodeAt(p + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = oe[t.charCodeAt(p)] << 10 | oe[t.charCodeAt(p + 1)] << 4 | oe[t.charCodeAt(p + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Zn(t) {
|
|
52
52
|
return we[t >> 18 & 63] + we[t >> 12 & 63] + we[t >> 6 & 63] + we[t & 63];
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function ei(t, e, r) {
|
|
55
55
|
for (var o, s = [], u = e; u < r; u += 3)
|
|
56
|
-
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(
|
|
56
|
+
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(Zn(o));
|
|
57
57
|
return s.join("");
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function ti(t) {
|
|
60
60
|
for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0, f = r - o; l < f; l += u)
|
|
61
|
-
s.push(
|
|
61
|
+
s.push(ei(t, l, l + u > f ? f : l + u));
|
|
62
62
|
return o === 1 ? (e = t[r - 1], s.push(
|
|
63
63
|
we[e >> 2] + we[e << 4 & 63] + "=="
|
|
64
64
|
)) : o === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
@@ -619,7 +619,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
619
619
|
(!n || n < 0) && (n = 0), (!i || i < 0 || i > c) && (i = c);
|
|
620
620
|
let h = "";
|
|
621
621
|
for (let y = n; y < i; ++y)
|
|
622
|
-
h +=
|
|
622
|
+
h += Un[a[y]];
|
|
623
623
|
return h;
|
|
624
624
|
}
|
|
625
625
|
function Oe(a, n, i) {
|
|
@@ -1050,7 +1050,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
1050
1050
|
function kt(a) {
|
|
1051
1051
|
return a !== a;
|
|
1052
1052
|
}
|
|
1053
|
-
const
|
|
1053
|
+
const Un = function() {
|
|
1054
1054
|
const a = "0123456789abcdef", n = new Array(256);
|
|
1055
1055
|
for (let i = 0; i < 16; ++i) {
|
|
1056
1056
|
const c = i * 16;
|
|
@@ -1060,13 +1060,13 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
1060
1060
|
return n;
|
|
1061
1061
|
}();
|
|
1062
1062
|
function xe(a) {
|
|
1063
|
-
return typeof BigInt > "u" ?
|
|
1063
|
+
return typeof BigInt > "u" ? $n : a;
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function $n() {
|
|
1066
1066
|
throw new Error("BigInt not supported");
|
|
1067
1067
|
}
|
|
1068
|
-
})(
|
|
1069
|
-
var
|
|
1068
|
+
})(Wr);
|
|
1069
|
+
var Yr = { exports: {} }, H = Yr.exports = {}, me, be;
|
|
1070
1070
|
function Jt() {
|
|
1071
1071
|
throw new Error("setTimeout has not been defined");
|
|
1072
1072
|
}
|
|
@@ -1085,7 +1085,7 @@ function Yt() {
|
|
|
1085
1085
|
be = Yt;
|
|
1086
1086
|
}
|
|
1087
1087
|
})();
|
|
1088
|
-
function
|
|
1088
|
+
function Xr(t) {
|
|
1089
1089
|
if (me === setTimeout)
|
|
1090
1090
|
return setTimeout(t, 0);
|
|
1091
1091
|
if ((me === Jt || !me) && setTimeout)
|
|
@@ -1100,7 +1100,7 @@ function Yr(t) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function ri(t) {
|
|
1104
1104
|
if (be === clearTimeout)
|
|
1105
1105
|
return clearTimeout(t);
|
|
1106
1106
|
if ((be === Yt || !be) && clearTimeout)
|
|
@@ -1116,73 +1116,73 @@ function ti(t) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
var Ie = [], ze = !1, Ne, lt = -1;
|
|
1119
|
-
function
|
|
1120
|
-
!ze || !Ne || (ze = !1, Ne.length ? Ie = Ne.concat(Ie) : lt = -1, Ie.length &&
|
|
1119
|
+
function ni() {
|
|
1120
|
+
!ze || !Ne || (ze = !1, Ne.length ? Ie = Ne.concat(Ie) : lt = -1, Ie.length && Zr());
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function Zr() {
|
|
1123
1123
|
if (!ze) {
|
|
1124
|
-
var t =
|
|
1124
|
+
var t = Xr(ni);
|
|
1125
1125
|
ze = !0;
|
|
1126
1126
|
for (var e = Ie.length; e; ) {
|
|
1127
1127
|
for (Ne = Ie, Ie = []; ++lt < e; )
|
|
1128
1128
|
Ne && Ne[lt].run();
|
|
1129
1129
|
lt = -1, e = Ie.length;
|
|
1130
1130
|
}
|
|
1131
|
-
Ne = null, ze = !1,
|
|
1131
|
+
Ne = null, ze = !1, ri(t);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
|
-
|
|
1134
|
+
H.nextTick = function(t) {
|
|
1135
1135
|
var e = new Array(arguments.length - 1);
|
|
1136
1136
|
if (arguments.length > 1)
|
|
1137
1137
|
for (var r = 1; r < arguments.length; r++)
|
|
1138
1138
|
e[r - 1] = arguments[r];
|
|
1139
|
-
Ie.push(new
|
|
1139
|
+
Ie.push(new en(t, e)), Ie.length === 1 && !ze && Xr(Zr);
|
|
1140
1140
|
};
|
|
1141
|
-
function
|
|
1141
|
+
function en(t, e) {
|
|
1142
1142
|
this.fun = t, this.array = e;
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1144
|
+
en.prototype.run = function() {
|
|
1145
1145
|
this.fun.apply(null, this.array);
|
|
1146
1146
|
};
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1147
|
+
H.title = "browser";
|
|
1148
|
+
H.browser = !0;
|
|
1149
|
+
H.env = {};
|
|
1150
|
+
H.argv = [];
|
|
1151
|
+
H.version = "";
|
|
1152
|
+
H.versions = {};
|
|
1153
1153
|
function Fe() {
|
|
1154
1154
|
}
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1155
|
+
H.on = Fe;
|
|
1156
|
+
H.addListener = Fe;
|
|
1157
|
+
H.once = Fe;
|
|
1158
|
+
H.off = Fe;
|
|
1159
|
+
H.removeListener = Fe;
|
|
1160
|
+
H.removeAllListeners = Fe;
|
|
1161
|
+
H.emit = Fe;
|
|
1162
|
+
H.prependListener = Fe;
|
|
1163
|
+
H.prependOnceListener = Fe;
|
|
1164
|
+
H.listeners = function(t) {
|
|
1165
1165
|
return [];
|
|
1166
1166
|
};
|
|
1167
|
-
|
|
1167
|
+
H.binding = function(t) {
|
|
1168
1168
|
throw new Error("process.binding is not supported");
|
|
1169
1169
|
};
|
|
1170
|
-
|
|
1170
|
+
H.cwd = function() {
|
|
1171
1171
|
return "/";
|
|
1172
1172
|
};
|
|
1173
|
-
|
|
1173
|
+
H.chdir = function(t) {
|
|
1174
1174
|
throw new Error("process.chdir is not supported");
|
|
1175
1175
|
};
|
|
1176
|
-
|
|
1176
|
+
H.umask = function() {
|
|
1177
1177
|
return 0;
|
|
1178
1178
|
};
|
|
1179
|
-
var
|
|
1179
|
+
var ii = Yr.exports;
|
|
1180
1180
|
(function(t) {
|
|
1181
1181
|
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
|
|
1182
|
-
const e =
|
|
1182
|
+
const e = Wr, r = ii, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
|
|
1183
1183
|
Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
|
|
1184
1184
|
})(_);
|
|
1185
|
-
class
|
|
1185
|
+
class oi {
|
|
1186
1186
|
}
|
|
1187
1187
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
1188
1188
|
class _t {
|
|
@@ -1201,9 +1201,9 @@ class _t {
|
|
|
1201
1201
|
return this.store;
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
|
-
const
|
|
1204
|
+
const si = (t) => {
|
|
1205
1205
|
const e = Object.keys(t);
|
|
1206
|
-
return
|
|
1206
|
+
return Qr(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((o, s) => [o, r[s]])));
|
|
1207
1207
|
};
|
|
1208
1208
|
class it extends _t {
|
|
1209
1209
|
getValues = () => this.getStore().get();
|
|
@@ -1212,12 +1212,12 @@ class it extends _t {
|
|
|
1212
1212
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
1213
1213
|
unsubscribe = () => this.getStore().off();
|
|
1214
1214
|
}
|
|
1215
|
-
const ot = (t) =>
|
|
1215
|
+
const ot = (t) => Dn(t);
|
|
1216
1216
|
var Ee;
|
|
1217
1217
|
(function(t) {
|
|
1218
1218
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
1219
1219
|
})(Ee || (Ee = {}));
|
|
1220
|
-
const
|
|
1220
|
+
const ai = {
|
|
1221
1221
|
[ve.BETTING]: "betting",
|
|
1222
1222
|
[ve.GAMES]: "games",
|
|
1223
1223
|
[ve.PUBLIC_CHAT]: "publicChat",
|
|
@@ -1235,7 +1235,7 @@ class cr {
|
|
|
1235
1235
|
listeners = /* @__PURE__ */ new Set();
|
|
1236
1236
|
settingsKey;
|
|
1237
1237
|
constructor({ settings: e, ...r }, o) {
|
|
1238
|
-
this.settingsKey =
|
|
1238
|
+
this.settingsKey = ai[r.type], this.status = It(Le.Suspended), this.config = new it(ot(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new it(ot(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new it(ot({}), `feature:settings:${this.settingsKey}`), this.source = o;
|
|
1239
1239
|
}
|
|
1240
1240
|
get featureConfig() {
|
|
1241
1241
|
return this.config.getStore();
|
|
@@ -1292,7 +1292,7 @@ class ae extends _t {
|
|
|
1292
1292
|
return this.getStore().get();
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
const ue = (t) => It(t), fr = (t, e) =>
|
|
1295
|
+
const ue = (t) => It(t), fr = (t, e) => Qr(t, e);
|
|
1296
1296
|
class te extends _t {
|
|
1297
1297
|
atomStore;
|
|
1298
1298
|
constructor(e, r, o) {
|
|
@@ -1325,7 +1325,7 @@ class te extends _t {
|
|
|
1325
1325
|
key = () => this.getStore().key;
|
|
1326
1326
|
off = () => this.getStore().off();
|
|
1327
1327
|
}
|
|
1328
|
-
async function*
|
|
1328
|
+
async function* ui(t, e) {
|
|
1329
1329
|
for await (const r of e) {
|
|
1330
1330
|
t.response.message = r, t.received_at = Date.now();
|
|
1331
1331
|
const o = {
|
|
@@ -1335,7 +1335,7 @@ async function* ai(t, e) {
|
|
|
1335
1335
|
window.postMessage(o), yield r;
|
|
1336
1336
|
}
|
|
1337
1337
|
}
|
|
1338
|
-
const
|
|
1338
|
+
const ci = () => (t) => async (e) => {
|
|
1339
1339
|
const r = {
|
|
1340
1340
|
name: e.url,
|
|
1341
1341
|
request: {},
|
|
@@ -1347,7 +1347,7 @@ const ui = () => (t) => async (e) => {
|
|
|
1347
1347
|
if (r.received_at = Date.now(), r.stream = o.stream, r.response.header = Object.fromEntries(o.header.entries()), r.response.trailer = Object.fromEntries(o.trailer.entries()), o.stream)
|
|
1348
1348
|
return {
|
|
1349
1349
|
...o,
|
|
1350
|
-
message:
|
|
1350
|
+
message: ui(r, o.message)
|
|
1351
1351
|
};
|
|
1352
1352
|
{
|
|
1353
1353
|
r.request.message = e.message, r.response.message = o.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -1375,7 +1375,7 @@ var Ae;
|
|
|
1375
1375
|
(function(t) {
|
|
1376
1376
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnecting = "reconnecting";
|
|
1377
1377
|
})(Ae || (Ae = {}));
|
|
1378
|
-
class
|
|
1378
|
+
class fi {
|
|
1379
1379
|
params;
|
|
1380
1380
|
stream;
|
|
1381
1381
|
method;
|
|
@@ -1432,10 +1432,10 @@ class ci {
|
|
|
1432
1432
|
this.addStateLog(`data routed to ${this.listeners.size} listeners`);
|
|
1433
1433
|
};
|
|
1434
1434
|
onStreamError = (e) => {
|
|
1435
|
-
e !== void 0 && (e.code !==
|
|
1435
|
+
e !== void 0 && (e.code !== jn.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e)) : this.disconnect());
|
|
1436
1436
|
};
|
|
1437
1437
|
}
|
|
1438
|
-
class
|
|
1438
|
+
class li {
|
|
1439
1439
|
toJsonOptions = {
|
|
1440
1440
|
emitDefaultValues: !1,
|
|
1441
1441
|
enumAsInteger: !0,
|
|
@@ -1453,8 +1453,8 @@ class fi {
|
|
|
1453
1453
|
this.host = e, this.$headers = new it(ot({
|
|
1454
1454
|
"sl-device-id": _.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
1455
1455
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
1456
|
-
const [r, o, s] =
|
|
1457
|
-
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport =
|
|
1456
|
+
const [r, o, s] = Gn();
|
|
1457
|
+
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = qn({
|
|
1458
1458
|
baseUrl: e,
|
|
1459
1459
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1460
1460
|
// @ts-ignore
|
|
@@ -1469,7 +1469,7 @@ class fi {
|
|
|
1469
1469
|
const s = this.subscriptions.get(r);
|
|
1470
1470
|
if (s)
|
|
1471
1471
|
return s;
|
|
1472
|
-
const u = new
|
|
1472
|
+
const u = new fi(this.$headers, e, r, o);
|
|
1473
1473
|
return this.subscriptions.set(r, u), u;
|
|
1474
1474
|
};
|
|
1475
1475
|
removeSubscription = (e) => {
|
|
@@ -1490,14 +1490,14 @@ class fi {
|
|
|
1490
1490
|
const r = e.typeName;
|
|
1491
1491
|
if (this.clients.has(r))
|
|
1492
1492
|
return this.clients.get(r);
|
|
1493
|
-
const o =
|
|
1493
|
+
const o = Mn(e, this.transport);
|
|
1494
1494
|
return this.clients.set(r, o), o;
|
|
1495
1495
|
};
|
|
1496
1496
|
getCallbackClient = (e) => {
|
|
1497
1497
|
const r = e.typeName;
|
|
1498
1498
|
if (this.callbackClients.has(r))
|
|
1499
1499
|
return this.callbackClients.get(r);
|
|
1500
|
-
const o =
|
|
1500
|
+
const o = Vn(e, this.transport);
|
|
1501
1501
|
return this.callbackClients.set(r, o), o;
|
|
1502
1502
|
};
|
|
1503
1503
|
// create unary client, used for query request
|
|
@@ -1529,11 +1529,11 @@ class fi {
|
|
|
1529
1529
|
o.header.set(u, s[u]);
|
|
1530
1530
|
return r(o);
|
|
1531
1531
|
};
|
|
1532
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
1532
|
+
this.interceptors.push(e), this.interceptors.push(ci());
|
|
1533
1533
|
};
|
|
1534
1534
|
}
|
|
1535
|
-
const
|
|
1536
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1535
|
+
const hi = (t, e) => {
|
|
1536
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Qn, {
|
|
1537
1537
|
method: "retrieveEventId",
|
|
1538
1538
|
params: [t]
|
|
1539
1539
|
});
|
|
@@ -1550,7 +1550,7 @@ const li = (t, e) => {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
});
|
|
1553
|
-
},
|
|
1553
|
+
}, pi = (t, e) => {
|
|
1554
1554
|
const { client: r, queryKey: o } = e.createPromiseClient(Ft, { method: "getStream", params: [t] });
|
|
1555
1555
|
return e.nanoquery.createFetcherStore(o, {
|
|
1556
1556
|
fetcher: async (s, u, l) => l ? (await r.getStream({
|
|
@@ -1558,23 +1558,23 @@ const li = (t, e) => {
|
|
|
1558
1558
|
// we are sure that id is a string
|
|
1559
1559
|
})).data?.attributes : void 0
|
|
1560
1560
|
});
|
|
1561
|
-
},
|
|
1562
|
-
const { queryKey: r, client: o } = e.createPromiseClient(
|
|
1561
|
+
}, di = (t, e) => {
|
|
1562
|
+
const { queryKey: r, client: o } = e.createPromiseClient(zr, { method: "me", params: [t] });
|
|
1563
1563
|
return e.nanoquery.createFetcherStore(r, {
|
|
1564
1564
|
fetcher: () => o.me({})
|
|
1565
1565
|
});
|
|
1566
|
-
},
|
|
1567
|
-
const { client: e, queryKeyStr: r } = t.createPromiseClient(
|
|
1566
|
+
}, yi = (t) => {
|
|
1567
|
+
const { client: e, queryKeyStr: r } = t.createPromiseClient(zr, { method: "bypassAuth" });
|
|
1568
1568
|
return t.nanoquery.createMutatorStore(async ({ data: { userKey: o, schema: s, init: u }, getCacheUpdater: l }) => {
|
|
1569
1569
|
const [f] = l(r), p = await e.bypassAuth({ userKey: o, schema: s, init: u });
|
|
1570
1570
|
return f(p), p;
|
|
1571
1571
|
});
|
|
1572
|
-
},
|
|
1572
|
+
}, gi = (t, e) => {
|
|
1573
1573
|
const { client: r, queryKey: o } = e.createPromiseClient(Ft, { method: "get", params: [t] });
|
|
1574
1574
|
return e.nanoquery.createFetcherStore(o, {
|
|
1575
1575
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
1576
1576
|
});
|
|
1577
|
-
},
|
|
1577
|
+
}, mi = (t, e) => {
|
|
1578
1578
|
const { client: r, queryKey: o } = e.createPromiseClient(Ft, { method: "getOrganization", params: [t] });
|
|
1579
1579
|
return e.nanoquery.createFetcherStore(o, {
|
|
1580
1580
|
fetcher: async () => {
|
|
@@ -1585,7 +1585,7 @@ const li = (t, e) => {
|
|
|
1585
1585
|
} : void 0;
|
|
1586
1586
|
}
|
|
1587
1587
|
});
|
|
1588
|
-
},
|
|
1588
|
+
}, bi = (t, e) => {
|
|
1589
1589
|
const { client: r, queryKey: o } = e.createPromiseClient(Ft, {
|
|
1590
1590
|
method: "getOrganizationAdvertising",
|
|
1591
1591
|
params: [t]
|
|
@@ -1593,8 +1593,8 @@ const li = (t, e) => {
|
|
|
1593
1593
|
return e.nanoquery.createFetcherStore(o, {
|
|
1594
1594
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
1595
1595
|
});
|
|
1596
|
-
},
|
|
1597
|
-
t.transport = new
|
|
1596
|
+
}, wi = (t, e, r) => {
|
|
1597
|
+
t.transport = new li(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), r();
|
|
1598
1598
|
};
|
|
1599
1599
|
class lr {
|
|
1600
1600
|
delimiter = ":";
|
|
@@ -1623,7 +1623,7 @@ var Re;
|
|
|
1623
1623
|
(function(t) {
|
|
1624
1624
|
t.SCHEMA = "schema", t.TOKEN = "token";
|
|
1625
1625
|
})(Re || (Re = {}));
|
|
1626
|
-
class
|
|
1626
|
+
class tn extends lr {
|
|
1627
1627
|
constructor() {
|
|
1628
1628
|
super("user");
|
|
1629
1629
|
}
|
|
@@ -1648,16 +1648,16 @@ var ke;
|
|
|
1648
1648
|
(function(t) {
|
|
1649
1649
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
1650
1650
|
})(ke || (ke = {}));
|
|
1651
|
-
const
|
|
1652
|
-
const e = new ae(ue(void 0), "enabled"), r = new ae(ue(ke.DISABLED), "status"), o = new ae(ue(void 0), "userKey"), s = new ae(ue(void 0), "userToken"), u = new
|
|
1651
|
+
const vi = (t) => {
|
|
1652
|
+
const e = new ae(ue(void 0), "enabled"), r = new ae(ue(ke.DISABLED), "status"), o = new ae(ue(void 0), "userKey"), s = new ae(ue(void 0), "userToken"), u = new tn();
|
|
1653
1653
|
s.listen((I) => {
|
|
1654
1654
|
I ? u.setToken(I) : u.removeToken();
|
|
1655
1655
|
});
|
|
1656
|
-
const l = new ae(ue(void 0), "providerStreamId"), f = new te(
|
|
1656
|
+
const l = new ae(ue(void 0), "providerStreamId"), f = new te(hi(l.getStore(), t), "slStreamId", (I) => I?.data), p = new te(di(s.getStore(), t), "user", (I) => I?.data?.data?.id), A = new te(gi(s.getStore(), t), "userSettings"), g = new te(pi(f.getAtomStore(), t), "streamSettings");
|
|
1657
1657
|
f.getAtomStore().listen((I) => {
|
|
1658
1658
|
(I === "" || I === void 0) && g.getStore().mutate(void 0);
|
|
1659
1659
|
});
|
|
1660
|
-
const w = new te(
|
|
1660
|
+
const w = new te(mi(e.getStore(), t), "organizationSettings", (I) => I?.data?.id), E = new te(bi(w.getAtomStore(), t), "organizationAdvertising");
|
|
1661
1661
|
return {
|
|
1662
1662
|
enabled: e,
|
|
1663
1663
|
status: r,
|
|
@@ -1672,10 +1672,10 @@ const wi = (t) => {
|
|
|
1672
1672
|
organizationAdvertising: E
|
|
1673
1673
|
};
|
|
1674
1674
|
};
|
|
1675
|
-
class
|
|
1675
|
+
class Si extends _t {
|
|
1676
1676
|
stores;
|
|
1677
1677
|
constructor(e) {
|
|
1678
|
-
const r =
|
|
1678
|
+
const r = vi(e), o = si(r);
|
|
1679
1679
|
super(o, "core"), this.stores = r;
|
|
1680
1680
|
}
|
|
1681
1681
|
getValue() {
|
|
@@ -1696,12 +1696,12 @@ class vi extends _t {
|
|
|
1696
1696
|
};
|
|
1697
1697
|
unsubscribe = () => this.getStore().off();
|
|
1698
1698
|
}
|
|
1699
|
-
class
|
|
1699
|
+
class Ai extends oi {
|
|
1700
1700
|
$coreStore;
|
|
1701
1701
|
transport;
|
|
1702
1702
|
$bypassLogin;
|
|
1703
1703
|
constructor(e, r) {
|
|
1704
|
-
super(), this.$coreStore = e, this.transport = r, this.$bypassLogin =
|
|
1704
|
+
super(), this.$coreStore = e, this.transport = r, this.$bypassLogin = yi(this.transport), this.subscribe();
|
|
1705
1705
|
}
|
|
1706
1706
|
me = async () => (await this.$coreStore.getValues().user.getValue())?.data;
|
|
1707
1707
|
login = async (e, r) => (this.$coreStore.getValues().userKey.setValue(r), await this.$bypassLogin.mutate({ schema: e, userKey: r, init: !1 }), this.me());
|
|
@@ -1718,20 +1718,20 @@ class Si extends ii {
|
|
|
1718
1718
|
});
|
|
1719
1719
|
};
|
|
1720
1720
|
}
|
|
1721
|
-
const
|
|
1722
|
-
t.auth = new
|
|
1723
|
-
const o = new
|
|
1721
|
+
const Ei = async (t, e, r) => {
|
|
1722
|
+
t.auth = new Ai(t.store, t.transport);
|
|
1723
|
+
const o = new tn(), s = o.getSchema(), u = o.getToken();
|
|
1724
1724
|
s && u && (console.log("try to login prev user"), await t.auth.login(s, u)), t.sdk.authorizationBypass = async (l, f) => {
|
|
1725
1725
|
await t.auth.login(l, f), o.setSchema("streamlayer:streamlayer");
|
|
1726
1726
|
}, t.sdk.logout = () => {
|
|
1727
1727
|
t.auth.logout();
|
|
1728
1728
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1729
|
-
},
|
|
1730
|
-
t.store = new
|
|
1729
|
+
}, Ii = (t, e, r) => {
|
|
1730
|
+
t.store = new Si(t.transport), t.stores = t.store.getValues(), t.sdk.sdkStore = t.store.getStore(), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.storeUnsubscribe = () => {
|
|
1731
1731
|
t.store.unsubscribe();
|
|
1732
1732
|
}, r();
|
|
1733
|
-
},
|
|
1734
|
-
|
|
1733
|
+
}, Fi = (t, e, r) => {
|
|
1734
|
+
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1735
1735
|
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(ke.INITIALIZATION);
|
|
1736
1736
|
try {
|
|
1737
1737
|
const o = await t.stores.organizationSettings.getValue();
|
|
@@ -1739,15 +1739,15 @@ const Ai = async (t, e, r) => {
|
|
|
1739
1739
|
} catch (o) {
|
|
1740
1740
|
return t.stores.enabled.setValue(), t.stores.status.setValue(ke.FAILED), { err: `${o}` };
|
|
1741
1741
|
}
|
|
1742
|
-
},
|
|
1742
|
+
}, t.sdk.disableApp = () => {
|
|
1743
1743
|
t.stores.enabled.setValue(), t.stores.status.setValue(ke.DISABLED), t.storeUnsubscribe();
|
|
1744
1744
|
}, t.sdk.createEventSession = (o) => {
|
|
1745
1745
|
t.stores.providerStreamId.setValue(""), t.stores.providerStreamId.setValue(o);
|
|
1746
1746
|
}, r();
|
|
1747
|
-
},
|
|
1747
|
+
}, Ci = zn({
|
|
1748
1748
|
level: "trace"
|
|
1749
|
-
}),
|
|
1750
|
-
const { client: o, queryKey: s } = r.createPromiseClient(
|
|
1749
|
+
}), rn = (t, e) => Ci.child({ name: t }, e), _i = (t, e, r) => {
|
|
1750
|
+
const { client: o, queryKey: s } = r.createPromiseClient(Hr, {
|
|
1751
1751
|
method: "summary",
|
|
1752
1752
|
params: [t, e]
|
|
1753
1753
|
});
|
|
@@ -1757,8 +1757,8 @@ const Ai = async (t, e, r) => {
|
|
|
1757
1757
|
userId: p
|
|
1758
1758
|
})).data?.attributes
|
|
1759
1759
|
});
|
|
1760
|
-
},
|
|
1761
|
-
const { client: o, queryKey: s } = r.createPromiseClient(
|
|
1760
|
+
}, Ti = (t, e, r) => {
|
|
1761
|
+
const { client: o, queryKey: s } = r.createPromiseClient(Hr, {
|
|
1762
1762
|
method: "list",
|
|
1763
1763
|
params: [t, e]
|
|
1764
1764
|
});
|
|
@@ -1769,14 +1769,14 @@ const Ai = async (t, e, r) => {
|
|
|
1769
1769
|
leaderboardId: p
|
|
1770
1770
|
})).data
|
|
1771
1771
|
});
|
|
1772
|
-
},
|
|
1772
|
+
}, Bi = (t, e) => {
|
|
1773
1773
|
const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "get", params: [t] });
|
|
1774
1774
|
return e.nanoquery.createFetcherStore(o, {
|
|
1775
1775
|
fetcher: async (s, u, l) => (await r.get({
|
|
1776
1776
|
eventId: l
|
|
1777
1777
|
})).data?.attributes
|
|
1778
1778
|
});
|
|
1779
|
-
},
|
|
1779
|
+
}, Oi = (t, e) => {
|
|
1780
1780
|
const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "syncQuestion", params: [t] });
|
|
1781
1781
|
return e.nanoquery.createFetcherStore(o, {
|
|
1782
1782
|
fetcher: async (s, u, l) => l ? (await r.syncQuestion({
|
|
@@ -1785,42 +1785,42 @@ const Ai = async (t, e, r) => {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
})).data?.attributes : void 0
|
|
1787
1787
|
});
|
|
1788
|
-
},
|
|
1788
|
+
}, xi = (t, e) => {
|
|
1789
1789
|
const { client: r } = e.createCallbackClient(pe), o = It({ eventId: t.get() || "", feedId: "" });
|
|
1790
1790
|
return t.subscribe((u = "") => {
|
|
1791
1791
|
o.set({ eventId: u, feedId: "" });
|
|
1792
1792
|
}), e.addSubscription(r.subscription, o, { name: "feedSubscription" });
|
|
1793
|
-
},
|
|
1793
|
+
}, ki = (t, e) => {
|
|
1794
1794
|
const { client: r } = e.createCallbackClient(pe);
|
|
1795
1795
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
1796
|
-
},
|
|
1796
|
+
}, Pi = async (t, e) => {
|
|
1797
1797
|
const { client: r } = e.createPromiseClient(pe, { method: "questionByUser", params: [t] });
|
|
1798
1798
|
return (await r.questionByUser({
|
|
1799
1799
|
questionId: t
|
|
1800
1800
|
})).data?.attributes?.question;
|
|
1801
|
-
},
|
|
1801
|
+
}, Ri = (t, e) => {
|
|
1802
1802
|
const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "questionByUser", params: [t] });
|
|
1803
1803
|
return e.nanoquery.createFetcherStore(o, {
|
|
1804
1804
|
fetcher: async (s, u, l) => (await r.questionByUser({
|
|
1805
1805
|
questionId: l
|
|
1806
1806
|
})).data?.attributes?.question
|
|
1807
1807
|
});
|
|
1808
|
-
},
|
|
1808
|
+
}, Ni = (t, e) => {
|
|
1809
1809
|
const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "pickHistory", params: [t] });
|
|
1810
1810
|
return e.nanoquery.createFetcherStore(o, {
|
|
1811
1811
|
fetcher: async (s, u, l) => l ? (await r.pickHistory({
|
|
1812
1812
|
eventId: l
|
|
1813
1813
|
})).data?.map(({ attributes: p }) => p) : void 0
|
|
1814
1814
|
});
|
|
1815
|
-
},
|
|
1815
|
+
}, Li = (t, e) => {
|
|
1816
1816
|
const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "insightHistory", params: [t] });
|
|
1817
1817
|
return e.nanoquery.createFetcherStore(o, {
|
|
1818
1818
|
fetcher: async (s, u, l) => l ? (await r.insightHistory({
|
|
1819
1819
|
eventId: l
|
|
1820
1820
|
})).data?.map(({ attributes: p }) => p) : void 0
|
|
1821
1821
|
});
|
|
1822
|
-
},
|
|
1823
|
-
class
|
|
1822
|
+
}, nn = (t) => (t.gamification || (t.gamification = new Ui(t)), t.gamification);
|
|
1823
|
+
class Ui {
|
|
1824
1824
|
/** sl event id */
|
|
1825
1825
|
slStreamId;
|
|
1826
1826
|
/** organization id */
|
|
@@ -1846,13 +1846,13 @@ class Li {
|
|
|
1846
1846
|
constructor(e) {
|
|
1847
1847
|
if (e.gamification)
|
|
1848
1848
|
throw new Error("GamificationBackground Singleton error");
|
|
1849
|
-
this.log =
|
|
1850
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
1849
|
+
this.log = rn("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ae(ue(void 0), "moderationId").getStore(), this.openedQuestionId = new ae(ue(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new te(Bi(this.slStreamId, e.transport), "gamification:moderation"), this.activeQuestionId = new te(Oi(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = new te(Ri(this.openedQuestionId, e.transport), "gamification:openedQuestion"), this.openedQuestionId.listen((r) => {
|
|
1850
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = ki(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
|
|
1851
1851
|
window.requestAnimationFrame(() => {
|
|
1852
1852
|
this.openedQuestion?.getStore().mutate(o.data?.attributes?.question), this.openedQuestion?.getStore().invalidate();
|
|
1853
1853
|
});
|
|
1854
1854
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.openedQuestion?.getStore().mutate(void 0), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1855
|
-
}), this.feedSubscription =
|
|
1855
|
+
}), this.feedSubscription = xi(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
1856
1856
|
window.requestAnimationFrame(() => {
|
|
1857
1857
|
const o = this.activeQuestionId.getStore();
|
|
1858
1858
|
o && o.mutate(r.data?.attributes);
|
|
@@ -1887,7 +1887,7 @@ class Li {
|
|
|
1887
1887
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1888
1888
|
};
|
|
1889
1889
|
}
|
|
1890
|
-
class
|
|
1890
|
+
class $i {
|
|
1891
1891
|
notificationsList;
|
|
1892
1892
|
notifications;
|
|
1893
1893
|
store;
|
|
@@ -1897,7 +1897,7 @@ class Ui {
|
|
|
1897
1897
|
options;
|
|
1898
1898
|
logger;
|
|
1899
1899
|
constructor(e) {
|
|
1900
|
-
this.options = e, this.logger =
|
|
1900
|
+
this.options = e, this.logger = rn("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new ae(ue(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = fr(this.notifications.getStore(), (r) => r ? [...r.values()] : []);
|
|
1901
1901
|
}
|
|
1902
1902
|
addToQueue = (e) => {
|
|
1903
1903
|
if (this.store.has(e.id)) {
|
|
@@ -1961,7 +1961,7 @@ var mt;
|
|
|
1961
1961
|
(function(t) {
|
|
1962
1962
|
t.OPENED = "opened";
|
|
1963
1963
|
})(mt || (mt = {}));
|
|
1964
|
-
class
|
|
1964
|
+
class Di extends lr {
|
|
1965
1965
|
constructor() {
|
|
1966
1966
|
super("notification");
|
|
1967
1967
|
}
|
|
@@ -1973,15 +1973,15 @@ class $i extends lr {
|
|
|
1973
1973
|
this.clear();
|
|
1974
1974
|
};
|
|
1975
1975
|
}
|
|
1976
|
-
var
|
|
1976
|
+
var He;
|
|
1977
1977
|
(function(t) {
|
|
1978
1978
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION";
|
|
1979
|
-
})(
|
|
1980
|
-
class
|
|
1979
|
+
})(He || (He = {}));
|
|
1980
|
+
class ji {
|
|
1981
1981
|
queue;
|
|
1982
1982
|
storage;
|
|
1983
1983
|
constructor(e = {}) {
|
|
1984
|
-
this.storage = new
|
|
1984
|
+
this.storage = new Di(), this.queue = new $i({ concurrency: 1, animationDelay: 300, ...e });
|
|
1985
1985
|
}
|
|
1986
1986
|
add = (e) => {
|
|
1987
1987
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -1994,15 +1994,15 @@ class Di {
|
|
|
1994
1994
|
this.storage.setOpened(e);
|
|
1995
1995
|
};
|
|
1996
1996
|
}
|
|
1997
|
-
const
|
|
1998
|
-
t.notifications = new
|
|
1999
|
-
},
|
|
1997
|
+
const Mi = (t, e, r) => {
|
|
1998
|
+
t.notifications = new ji(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
1999
|
+
}, Vi = (t, e) => {
|
|
2000
2000
|
const { client: r } = t.createPromiseClient(pe, { method: "submitAnswer" });
|
|
2001
2001
|
return r.submitAnswer({ data: e });
|
|
2002
|
-
},
|
|
2002
|
+
}, qi = (t, e) => {
|
|
2003
2003
|
const { client: r } = t.createPromiseClient(pe, { method: "submitInplay" });
|
|
2004
2004
|
return r.submitInplay({ data: { eventId: +e } });
|
|
2005
|
-
},
|
|
2005
|
+
}, Gi = (t, e) => {
|
|
2006
2006
|
const { client: r } = t.createPromiseClient(pe, { method: "skipQuestion" });
|
|
2007
2007
|
return r.skipQuestion({ data: { id: e } });
|
|
2008
2008
|
};
|
|
@@ -2010,7 +2010,7 @@ var bt;
|
|
|
2010
2010
|
(function(t) {
|
|
2011
2011
|
t.ONBOARDING = "onboarding";
|
|
2012
2012
|
})(bt || (bt = {}));
|
|
2013
|
-
class
|
|
2013
|
+
class Qi extends lr {
|
|
2014
2014
|
constructor() {
|
|
2015
2015
|
super("gamification");
|
|
2016
2016
|
}
|
|
@@ -2024,7 +2024,7 @@ var Z;
|
|
|
2024
2024
|
(function(t) {
|
|
2025
2025
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2026
2026
|
})(Z || (Z = {}));
|
|
2027
|
-
class
|
|
2027
|
+
class zi extends cr {
|
|
2028
2028
|
/** user statistics (leaderboard panel) */
|
|
2029
2029
|
userSummary;
|
|
2030
2030
|
/** questions list (pick history) */
|
|
@@ -2046,7 +2046,7 @@ class Qi extends cr {
|
|
|
2046
2046
|
/** Browser cache */
|
|
2047
2047
|
storage;
|
|
2048
2048
|
constructor(e, r, o) {
|
|
2049
|
-
super(e, r), this.background =
|
|
2049
|
+
super(e, r), this.background = nn(o), this.storage = new Qi(), this.userSummary = new te(_i(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.leaderboardId = new ae(ue(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = new ae(ue(Z.Unset), "onboardingStatus").getStore(), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ve.GAMES), this.openedQuestion = fr(this.background.openedQuestion.getStore(), (s) => {
|
|
2050
2050
|
if (s.data?.type && Ar.has(s.data.type))
|
|
2051
2051
|
return s.data;
|
|
2052
2052
|
}), this.onboardingStatus.subscribe((s) => {
|
|
@@ -2056,18 +2056,18 @@ class Qi extends cr {
|
|
|
2056
2056
|
}), this.onboardingStatus.subscribe((s) => {
|
|
2057
2057
|
s && this.background.activeQuestionId.invalidate();
|
|
2058
2058
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2059
|
-
s && s.data && this.onboardingStatus.get() && Ar.has(s.data.question.type) && s.data.question.status === Wt.ACTIVE && this.notifications.add({
|
|
2060
|
-
type:
|
|
2061
|
-
action: () => this.openQuestion(s.data.question.id),
|
|
2062
|
-
close: () => this.closeQuestion(s.data.question.id),
|
|
2063
|
-
autoHideDuration:
|
|
2059
|
+
s && s.data && this.onboardingStatus.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Gr.ON && Ar.has(s.data.question.type) && s.data.question.status === Wt.ACTIVE && this.notifications.add({
|
|
2060
|
+
type: He.QUESTION,
|
|
2061
|
+
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2062
|
+
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2063
|
+
autoHideDuration: +(s.data.moderation?.question?.appearance?.autoHideInterval || "1000"),
|
|
2064
2064
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2065
2065
|
data: {
|
|
2066
|
-
title: s.data.notification.title,
|
|
2067
|
-
color: s.data.notification.indicatorColor,
|
|
2068
|
-
icon: s.data.notification.image,
|
|
2069
|
-
imageMode: s.data.notification.imageMode,
|
|
2070
|
-
imagePosition: s.data.notification.imagePosition
|
|
2066
|
+
title: s.data.question.notification.title,
|
|
2067
|
+
color: s.data.question.notification.indicatorColor,
|
|
2068
|
+
icon: s.data.question.notification.image,
|
|
2069
|
+
imageMode: s.data.question.notification.imageMode,
|
|
2070
|
+
imagePosition: s.data.question.notification.imagePosition
|
|
2071
2071
|
}
|
|
2072
2072
|
});
|
|
2073
2073
|
}), this.onboardingProcess(), this.background.userId.subscribe((s) => {
|
|
@@ -2101,7 +2101,7 @@ class Qi extends cr {
|
|
|
2101
2101
|
return;
|
|
2102
2102
|
const { titleCard: r, overview: o } = e;
|
|
2103
2103
|
this.notifications.add({
|
|
2104
|
-
type:
|
|
2104
|
+
type: He.ONBOARDING,
|
|
2105
2105
|
id: this.background.getCurrentSessionId({ prefix: "onboarding" }),
|
|
2106
2106
|
action: this.openFeature,
|
|
2107
2107
|
close: this.closeFeature,
|
|
@@ -2118,7 +2118,7 @@ class Qi extends cr {
|
|
|
2118
2118
|
});
|
|
2119
2119
|
};
|
|
2120
2120
|
connect = (e) => {
|
|
2121
|
-
this.userSummary
|
|
2121
|
+
this.userSummary.invalidate(), this.leaderboardList = new te(Ti(this.background.slStreamId, this.leaderboardId, e), "gamification:leaderboardList"), this.questions ? this.questions.invalidate() : this.questions = new te(Ni(this.background.slStreamId, e), "gamification:questions"), this.background.feedSubscription.addListener("feed-subscription-prediction-close", (r) => {
|
|
2122
2122
|
window.requestAnimationFrame(async () => {
|
|
2123
2123
|
const o = r.data?.attributes?.question;
|
|
2124
2124
|
if (!o)
|
|
@@ -2127,9 +2127,9 @@ class Qi extends cr {
|
|
|
2127
2127
|
if (s === Wt.RESOLVED && u === Qe.PREDICTION) {
|
|
2128
2128
|
const f = this.background.getCurrentSessionId({
|
|
2129
2129
|
prefix: `notification-id:${l}`
|
|
2130
|
-
}), A = (await
|
|
2130
|
+
}), A = (await Pi(l, e))?.answers.find(({ correct: g }) => g);
|
|
2131
2131
|
this.notifications.add({
|
|
2132
|
-
type:
|
|
2132
|
+
type: He.ONBOARDING,
|
|
2133
2133
|
action: () => this.openQuestion(l),
|
|
2134
2134
|
close: () => this.closeQuestion(l),
|
|
2135
2135
|
autoHideDuration: 5e3,
|
|
@@ -2152,22 +2152,22 @@ class Qi extends cr {
|
|
|
2152
2152
|
// onboarding
|
|
2153
2153
|
submitInplay = async () => {
|
|
2154
2154
|
const e = this.background.slStreamId.get();
|
|
2155
|
-
e && (await
|
|
2155
|
+
e && (await qi(this.transport, e), this.onboardingStatus.set(Z.Completed), this.storage.saveOnboardingStatus({
|
|
2156
2156
|
organizationId: this.background.organizationId.get() || "",
|
|
2157
2157
|
userId: this.background.userId.get() || "",
|
|
2158
2158
|
eventId: e
|
|
2159
2159
|
}, Z.Completed));
|
|
2160
2160
|
};
|
|
2161
2161
|
submitAnswer = async (e, r) => {
|
|
2162
|
-
await
|
|
2162
|
+
await Vi(this.transport, { questionId: e, answerId: r }), this.questions?.invalidate();
|
|
2163
2163
|
};
|
|
2164
2164
|
skipQuestion = async (e) => {
|
|
2165
|
-
await
|
|
2165
|
+
await Gi(this.transport, e), this.questions?.invalidate();
|
|
2166
2166
|
};
|
|
2167
2167
|
openQuestion = (e) => (this.openFeature(), this.background.openQuestion(e));
|
|
2168
2168
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
2169
2169
|
}
|
|
2170
|
-
class
|
|
2170
|
+
class Hi extends cr {
|
|
2171
2171
|
insights;
|
|
2172
2172
|
closeFeature;
|
|
2173
2173
|
openFeature;
|
|
@@ -2176,21 +2176,21 @@ class zi extends cr {
|
|
|
2176
2176
|
transport;
|
|
2177
2177
|
background;
|
|
2178
2178
|
constructor(e, r, o) {
|
|
2179
|
-
super(e, r), this.background =
|
|
2179
|
+
super(e, r), this.background = nn(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ve.HIGHLIGHTS), this.status.subscribe((s) => {
|
|
2180
2180
|
s === Le.Ready ? this.connect() : this.disconnect();
|
|
2181
2181
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2182
|
-
s && s.data && s.data.question.type === Qe.FACTOID && s.data.question.status === Wt.ACTIVE && this.notifications.add({
|
|
2183
|
-
type:
|
|
2184
|
-
action: () => this.openHighlight(s.data.question.id),
|
|
2185
|
-
close: () => this.closeHighlight(s.data.question.id),
|
|
2186
|
-
autoHideDuration:
|
|
2182
|
+
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Gr.ON && s.data.question.type === Qe.FACTOID && s.data.question.status === Wt.ACTIVE && this.notifications.add({
|
|
2183
|
+
type: He.QUESTION,
|
|
2184
|
+
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2185
|
+
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
2186
|
+
autoHideDuration: +(s.data.moderation?.question?.appearance?.autoHideInterval || "1000"),
|
|
2187
2187
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2188
2188
|
data: {
|
|
2189
|
-
title: s.data.notification.title,
|
|
2190
|
-
color: s.data.notification.indicatorColor,
|
|
2191
|
-
icon: s.data.notification.image,
|
|
2192
|
-
imageMode: s.data.notification.imageMode,
|
|
2193
|
-
imagePosition: s.data.notification.imagePosition
|
|
2189
|
+
title: s.data.question.notification.title,
|
|
2190
|
+
color: s.data.question.notification.indicatorColor,
|
|
2191
|
+
icon: s.data.question.notification.image,
|
|
2192
|
+
imageMode: s.data.question.notification.imageMode,
|
|
2193
|
+
imagePosition: s.data.question.notification.imagePosition
|
|
2194
2194
|
}
|
|
2195
2195
|
});
|
|
2196
2196
|
}), this.openedInsight = fr(this.background.openedQuestion.getStore(), (s) => {
|
|
@@ -2199,7 +2199,7 @@ class zi extends cr {
|
|
|
2199
2199
|
});
|
|
2200
2200
|
}
|
|
2201
2201
|
connect = () => {
|
|
2202
|
-
this.insights ? this.insights.invalidate() : this.insights = new te(
|
|
2202
|
+
this.insights ? this.insights.invalidate() : this.insights = new te(Li(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
|
|
2203
2203
|
window.requestAnimationFrame(() => {
|
|
2204
2204
|
this.insights?.invalidate();
|
|
2205
2205
|
});
|
|
@@ -2217,13 +2217,13 @@ class Ki extends cr {
|
|
|
2217
2217
|
super(e, r);
|
|
2218
2218
|
}
|
|
2219
2219
|
}
|
|
2220
|
-
const
|
|
2220
|
+
const Wi = (t, e, r) => t.type === ve.GAMES ? new zi(t, e, r) : t.type === ve.HIGHLIGHTS ? new Hi(t, e, r) : new Ki(t, e), Ji = (t, e, r) => {
|
|
2221
2221
|
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new ae(ue(void 0), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (o) => t.features.get(o), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (o) => {
|
|
2222
2222
|
t.activeFeature.setValue(o);
|
|
2223
2223
|
}, t.sdk.closeFeature = () => {
|
|
2224
2224
|
t.activeFeature.setValue(void 0);
|
|
2225
2225
|
}, t.initFeature = (o, s = Ee.ORGANIZATION) => {
|
|
2226
|
-
const u =
|
|
2226
|
+
const u = Wi(o, s, t);
|
|
2227
2227
|
t.features.set(o.type, u);
|
|
2228
2228
|
}, t.updateFeature = (o, s) => {
|
|
2229
2229
|
t.features.get(o.type)?.update(o, s);
|
|
@@ -2274,7 +2274,7 @@ const Hi = (t, e, r) => t.type === ve.GAMES ? new Qi(t, e, r) : t.type === ve.HI
|
|
|
2274
2274
|
}, r();
|
|
2275
2275
|
};
|
|
2276
2276
|
var hr = { exports: {} }, pr = { exports: {} };
|
|
2277
|
-
function
|
|
2277
|
+
function Yi(t) {
|
|
2278
2278
|
var e = new t(), r = e;
|
|
2279
2279
|
function o() {
|
|
2280
2280
|
var u = e;
|
|
@@ -2288,11 +2288,11 @@ function Ji(t) {
|
|
|
2288
2288
|
release: s
|
|
2289
2289
|
};
|
|
2290
2290
|
}
|
|
2291
|
-
var
|
|
2292
|
-
function
|
|
2291
|
+
var Xi = Yi, Zi = Xi;
|
|
2292
|
+
function on(t, e, r) {
|
|
2293
2293
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2294
2294
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2295
|
-
var o =
|
|
2295
|
+
var o = Zi(eo), s = null, u = null, l = 0, f = null, p = {
|
|
2296
2296
|
push: L,
|
|
2297
2297
|
drain: se,
|
|
2298
2298
|
saturated: se,
|
|
@@ -2362,7 +2362,7 @@ function nn(t, e, r) {
|
|
|
2362
2362
|
}
|
|
2363
2363
|
function se() {
|
|
2364
2364
|
}
|
|
2365
|
-
function
|
|
2365
|
+
function eo() {
|
|
2366
2366
|
this.value = null, this.callback = se, this.next = null, this.release = se, this.context = null, this.errorHandler = null;
|
|
2367
2367
|
var t = this;
|
|
2368
2368
|
this.worked = function(r, o) {
|
|
@@ -2370,14 +2370,14 @@ function Zi() {
|
|
|
2370
2370
|
t.value = null, t.callback = se, t.errorHandler && u(r, l), s.call(t.context, r, o), t.release(t);
|
|
2371
2371
|
};
|
|
2372
2372
|
}
|
|
2373
|
-
function
|
|
2373
|
+
function to(t, e, r) {
|
|
2374
2374
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2375
2375
|
function o(g, w) {
|
|
2376
2376
|
e.call(this, g).then(function(E) {
|
|
2377
2377
|
w(null, E);
|
|
2378
2378
|
}, w);
|
|
2379
2379
|
}
|
|
2380
|
-
var s =
|
|
2380
|
+
var s = on(t, o, r), u = s.push, l = s.unshift;
|
|
2381
2381
|
return s.push = f, s.unshift = p, s.drained = A, s;
|
|
2382
2382
|
function f(g) {
|
|
2383
2383
|
var w = new Promise(function(E, I) {
|
|
@@ -2416,27 +2416,27 @@ function eo(t, e, r) {
|
|
|
2416
2416
|
return w;
|
|
2417
2417
|
}
|
|
2418
2418
|
}
|
|
2419
|
-
pr.exports =
|
|
2420
|
-
pr.exports.promise =
|
|
2421
|
-
var
|
|
2419
|
+
pr.exports = on;
|
|
2420
|
+
pr.exports.promise = to;
|
|
2421
|
+
var sn = pr.exports, dr = { exports: {} }, Ke = typeof Reflect == "object" ? Reflect : null, Er = Ke && typeof Ke.apply == "function" ? Ke.apply : function(e, r, o) {
|
|
2422
2422
|
return Function.prototype.apply.call(e, r, o);
|
|
2423
2423
|
}, ht;
|
|
2424
|
-
|
|
2424
|
+
Ke && typeof Ke.ownKeys == "function" ? ht = Ke.ownKeys : Object.getOwnPropertySymbols ? ht = function(e) {
|
|
2425
2425
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2426
2426
|
} : ht = function(e) {
|
|
2427
2427
|
return Object.getOwnPropertyNames(e);
|
|
2428
2428
|
};
|
|
2429
|
-
function
|
|
2429
|
+
function ro(t) {
|
|
2430
2430
|
console && console.warn && console.warn(t);
|
|
2431
2431
|
}
|
|
2432
|
-
var
|
|
2432
|
+
var an = Number.isNaN || function(e) {
|
|
2433
2433
|
return e !== e;
|
|
2434
2434
|
};
|
|
2435
2435
|
function $() {
|
|
2436
2436
|
$.init.call(this);
|
|
2437
2437
|
}
|
|
2438
2438
|
dr.exports = $;
|
|
2439
|
-
dr.exports.once =
|
|
2439
|
+
dr.exports.once = so;
|
|
2440
2440
|
$.EventEmitter = $;
|
|
2441
2441
|
$.prototype._events = void 0;
|
|
2442
2442
|
$.prototype._eventsCount = 0;
|
|
@@ -2452,7 +2452,7 @@ Object.defineProperty($, "defaultMaxListeners", {
|
|
|
2452
2452
|
return Ir;
|
|
2453
2453
|
},
|
|
2454
2454
|
set: function(t) {
|
|
2455
|
-
if (typeof t != "number" || t < 0 ||
|
|
2455
|
+
if (typeof t != "number" || t < 0 || an(t))
|
|
2456
2456
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2457
2457
|
Ir = t;
|
|
2458
2458
|
}
|
|
@@ -2461,15 +2461,15 @@ $.init = function() {
|
|
|
2461
2461
|
(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;
|
|
2462
2462
|
};
|
|
2463
2463
|
$.prototype.setMaxListeners = function(e) {
|
|
2464
|
-
if (typeof e != "number" || e < 0 ||
|
|
2464
|
+
if (typeof e != "number" || e < 0 || an(e))
|
|
2465
2465
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2466
2466
|
return this._maxListeners = e, this;
|
|
2467
2467
|
};
|
|
2468
|
-
function
|
|
2468
|
+
function un(t) {
|
|
2469
2469
|
return t._maxListeners === void 0 ? $.defaultMaxListeners : t._maxListeners;
|
|
2470
2470
|
}
|
|
2471
2471
|
$.prototype.getMaxListeners = function() {
|
|
2472
|
-
return
|
|
2472
|
+
return un(this);
|
|
2473
2473
|
};
|
|
2474
2474
|
$.prototype.emit = function(e) {
|
|
2475
2475
|
for (var r = [], o = 1; o < arguments.length; o++)
|
|
@@ -2492,11 +2492,11 @@ $.prototype.emit = function(e) {
|
|
|
2492
2492
|
if (typeof p == "function")
|
|
2493
2493
|
Er(p, this, r);
|
|
2494
2494
|
else
|
|
2495
|
-
for (var A = p.length, g =
|
|
2495
|
+
for (var A = p.length, g = pn(p, A), o = 0; o < A; ++o)
|
|
2496
2496
|
Er(g[o], this, r);
|
|
2497
2497
|
return !0;
|
|
2498
2498
|
};
|
|
2499
|
-
function
|
|
2499
|
+
function cn(t, e, r, o) {
|
|
2500
2500
|
var s, u, l;
|
|
2501
2501
|
if (Tt(r), u = t._events, u === void 0 ? (u = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (u.newListener !== void 0 && (t.emit(
|
|
2502
2502
|
"newListener",
|
|
@@ -2504,33 +2504,33 @@ function un(t, e, r, o) {
|
|
|
2504
2504
|
r.listener ? r.listener : r
|
|
2505
2505
|
), u = t._events), l = u[e]), l === void 0)
|
|
2506
2506
|
l = u[e] = r, ++t._eventsCount;
|
|
2507
|
-
else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s =
|
|
2507
|
+
else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = un(t), s > 0 && l.length > s && !l.warned) {
|
|
2508
2508
|
l.warned = !0;
|
|
2509
2509
|
var f = new Error("Possible EventEmitter memory leak detected. " + l.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2510
|
-
f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = l.length,
|
|
2510
|
+
f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = l.length, ro(f);
|
|
2511
2511
|
}
|
|
2512
2512
|
return t;
|
|
2513
2513
|
}
|
|
2514
2514
|
$.prototype.addListener = function(e, r) {
|
|
2515
|
-
return
|
|
2515
|
+
return cn(this, e, r, !1);
|
|
2516
2516
|
};
|
|
2517
2517
|
$.prototype.on = $.prototype.addListener;
|
|
2518
2518
|
$.prototype.prependListener = function(e, r) {
|
|
2519
|
-
return
|
|
2519
|
+
return cn(this, e, r, !0);
|
|
2520
2520
|
};
|
|
2521
|
-
function
|
|
2521
|
+
function no() {
|
|
2522
2522
|
if (!this.fired)
|
|
2523
2523
|
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);
|
|
2524
2524
|
}
|
|
2525
|
-
function
|
|
2526
|
-
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
2525
|
+
function fn(t, e, r) {
|
|
2526
|
+
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = no.bind(o);
|
|
2527
2527
|
return s.listener = r, o.wrapFn = s, s;
|
|
2528
2528
|
}
|
|
2529
2529
|
$.prototype.once = function(e, r) {
|
|
2530
|
-
return Tt(r), this.on(e,
|
|
2530
|
+
return Tt(r), this.on(e, fn(this, e, r)), this;
|
|
2531
2531
|
};
|
|
2532
2532
|
$.prototype.prependOnceListener = function(e, r) {
|
|
2533
|
-
return Tt(r), this.prependListener(e,
|
|
2533
|
+
return Tt(r), this.prependListener(e, fn(this, e, r)), this;
|
|
2534
2534
|
};
|
|
2535
2535
|
$.prototype.removeListener = function(e, r) {
|
|
2536
2536
|
var o, s, u, l, f;
|
|
@@ -2548,7 +2548,7 @@ $.prototype.removeListener = function(e, r) {
|
|
|
2548
2548
|
}
|
|
2549
2549
|
if (u < 0)
|
|
2550
2550
|
return this;
|
|
2551
|
-
u === 0 ? o.shift() :
|
|
2551
|
+
u === 0 ? o.shift() : io(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, f || r);
|
|
2552
2552
|
}
|
|
2553
2553
|
return this;
|
|
2554
2554
|
};
|
|
@@ -2572,24 +2572,24 @@ $.prototype.removeAllListeners = function(e) {
|
|
|
2572
2572
|
this.removeListener(e, r[s]);
|
|
2573
2573
|
return this;
|
|
2574
2574
|
};
|
|
2575
|
-
function
|
|
2575
|
+
function ln(t, e, r) {
|
|
2576
2576
|
var o = t._events;
|
|
2577
2577
|
if (o === void 0)
|
|
2578
2578
|
return [];
|
|
2579
2579
|
var s = o[e];
|
|
2580
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
2580
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? oo(s) : pn(s, s.length);
|
|
2581
2581
|
}
|
|
2582
2582
|
$.prototype.listeners = function(e) {
|
|
2583
|
-
return
|
|
2583
|
+
return ln(this, e, !0);
|
|
2584
2584
|
};
|
|
2585
2585
|
$.prototype.rawListeners = function(e) {
|
|
2586
|
-
return
|
|
2586
|
+
return ln(this, e, !1);
|
|
2587
2587
|
};
|
|
2588
2588
|
$.listenerCount = function(t, e) {
|
|
2589
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
2589
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : hn.call(t, e);
|
|
2590
2590
|
};
|
|
2591
|
-
$.prototype.listenerCount =
|
|
2592
|
-
function
|
|
2591
|
+
$.prototype.listenerCount = hn;
|
|
2592
|
+
function hn(t) {
|
|
2593
2593
|
var e = this._events;
|
|
2594
2594
|
if (e !== void 0) {
|
|
2595
2595
|
var r = e[t];
|
|
@@ -2603,22 +2603,22 @@ function ln(t) {
|
|
|
2603
2603
|
$.prototype.eventNames = function() {
|
|
2604
2604
|
return this._eventsCount > 0 ? ht(this._events) : [];
|
|
2605
2605
|
};
|
|
2606
|
-
function
|
|
2606
|
+
function pn(t, e) {
|
|
2607
2607
|
for (var r = new Array(e), o = 0; o < e; ++o)
|
|
2608
2608
|
r[o] = t[o];
|
|
2609
2609
|
return r;
|
|
2610
2610
|
}
|
|
2611
|
-
function
|
|
2611
|
+
function io(t, e) {
|
|
2612
2612
|
for (; e + 1 < t.length; e++)
|
|
2613
2613
|
t[e] = t[e + 1];
|
|
2614
2614
|
t.pop();
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2616
|
+
function oo(t) {
|
|
2617
2617
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2618
2618
|
e[r] = t[r].listener || t[r];
|
|
2619
2619
|
return e;
|
|
2620
2620
|
}
|
|
2621
|
-
function
|
|
2621
|
+
function so(t, e) {
|
|
2622
2622
|
return new Promise(function(r, o) {
|
|
2623
2623
|
function s(l) {
|
|
2624
2624
|
t.removeListener(e, u), o(l);
|
|
@@ -2626,13 +2626,13 @@ function oo(t, e) {
|
|
|
2626
2626
|
function u() {
|
|
2627
2627
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
2628
2628
|
}
|
|
2629
|
-
|
|
2629
|
+
dn(t, e, u, { once: !0 }), e !== "error" && ao(t, s, { once: !0 });
|
|
2630
2630
|
});
|
|
2631
2631
|
}
|
|
2632
|
-
function
|
|
2633
|
-
typeof t.on == "function" &&
|
|
2632
|
+
function ao(t, e, r) {
|
|
2633
|
+
typeof t.on == "function" && dn(t, "error", e, r);
|
|
2634
2634
|
}
|
|
2635
|
-
function
|
|
2635
|
+
function dn(t, e, r, o) {
|
|
2636
2636
|
if (typeof t.on == "function")
|
|
2637
2637
|
o.once ? t.once(e, r) : t.on(e, r);
|
|
2638
2638
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2642,7 +2642,7 @@ function pn(t, e, r, o) {
|
|
|
2642
2642
|
else
|
|
2643
2643
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2644
2644
|
}
|
|
2645
|
-
var
|
|
2645
|
+
var yn = dr.exports, Bt = {}, gn = {}, mn = function() {
|
|
2646
2646
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2647
2647
|
return !1;
|
|
2648
2648
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2665,33 +2665,33 @@ var dn = dr.exports, Bt = {}, yn = {}, gn = function() {
|
|
|
2665
2665
|
return !1;
|
|
2666
2666
|
}
|
|
2667
2667
|
return !0;
|
|
2668
|
-
},
|
|
2669
|
-
return
|
|
2670
|
-
}, Fr = typeof Symbol < "u" && Symbol,
|
|
2671
|
-
return typeof Fr != "function" || typeof Symbol != "function" || typeof Fr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
2668
|
+
}, uo = mn, yr = function() {
|
|
2669
|
+
return uo() && !!Symbol.toStringTag;
|
|
2670
|
+
}, Fr = typeof Symbol < "u" && Symbol, co = mn, fo = function() {
|
|
2671
|
+
return typeof Fr != "function" || typeof Symbol != "function" || typeof Fr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : co();
|
|
2672
2672
|
}, Cr = {
|
|
2673
2673
|
foo: {}
|
|
2674
|
-
},
|
|
2675
|
-
return { __proto__: Cr }.foo === Cr.foo && !({ __proto__: null } instanceof
|
|
2676
|
-
},
|
|
2674
|
+
}, lo = Object, ho = function() {
|
|
2675
|
+
return { __proto__: Cr }.foo === Cr.foo && !({ __proto__: null } instanceof lo);
|
|
2676
|
+
}, po = "Function.prototype.bind called on incompatible ", yo = Object.prototype.toString, go = Math.max, mo = "[object Function]", _r = function(e, r) {
|
|
2677
2677
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2678
2678
|
o[s] = e[s];
|
|
2679
2679
|
for (var u = 0; u < r.length; u += 1)
|
|
2680
2680
|
o[u + e.length] = r[u];
|
|
2681
2681
|
return o;
|
|
2682
|
-
},
|
|
2682
|
+
}, bo = function(e, r) {
|
|
2683
2683
|
for (var o = [], s = r || 0, u = 0; s < e.length; s += 1, u += 1)
|
|
2684
2684
|
o[u] = e[s];
|
|
2685
2685
|
return o;
|
|
2686
|
-
},
|
|
2686
|
+
}, wo = function(t, e) {
|
|
2687
2687
|
for (var r = "", o = 0; o < t.length; o += 1)
|
|
2688
2688
|
r += t[o], o + 1 < t.length && (r += e);
|
|
2689
2689
|
return r;
|
|
2690
|
-
},
|
|
2690
|
+
}, vo = function(e) {
|
|
2691
2691
|
var r = this;
|
|
2692
|
-
if (typeof r != "function" ||
|
|
2693
|
-
throw new TypeError(
|
|
2694
|
-
for (var o =
|
|
2692
|
+
if (typeof r != "function" || yo.apply(r) !== mo)
|
|
2693
|
+
throw new TypeError(po + r);
|
|
2694
|
+
for (var o = bo(arguments, 1), s, u = function() {
|
|
2695
2695
|
if (this instanceof s) {
|
|
2696
2696
|
var g = r.apply(
|
|
2697
2697
|
this,
|
|
@@ -2703,19 +2703,19 @@ var dn = dr.exports, Bt = {}, yn = {}, gn = function() {
|
|
|
2703
2703
|
e,
|
|
2704
2704
|
_r(o, arguments)
|
|
2705
2705
|
);
|
|
2706
|
-
}, l =
|
|
2706
|
+
}, l = go(0, r.length - o.length), f = [], p = 0; p < l; p++)
|
|
2707
2707
|
f[p] = "$" + p;
|
|
2708
|
-
if (s = Function("binder", "return function (" +
|
|
2708
|
+
if (s = Function("binder", "return function (" + wo(f, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
|
|
2709
2709
|
var A = function() {
|
|
2710
2710
|
};
|
|
2711
2711
|
A.prototype = r.prototype, s.prototype = new A(), A.prototype = null;
|
|
2712
2712
|
}
|
|
2713
2713
|
return s;
|
|
2714
|
-
},
|
|
2714
|
+
}, So = vo, bn = Function.prototype.bind || So, Tr = {}.hasOwnProperty, Rt = Function.prototype.call, Ao = Rt.bind ? Rt.bind(Tr) : function(t, e) {
|
|
2715
2715
|
return Rt.call(Tr, t, e);
|
|
2716
|
-
}, k, Je = SyntaxError,
|
|
2716
|
+
}, k, Je = SyntaxError, wn = Function, We = TypeError, Nt = function(t) {
|
|
2717
2717
|
try {
|
|
2718
|
-
return
|
|
2718
|
+
return wn('"use strict"; return (' + t + ").constructor;")();
|
|
2719
2719
|
} catch {
|
|
2720
2720
|
}
|
|
2721
2721
|
}, Ue = Object.getOwnPropertyDescriptor;
|
|
@@ -2727,7 +2727,7 @@ if (Ue)
|
|
|
2727
2727
|
}
|
|
2728
2728
|
var Lt = function() {
|
|
2729
2729
|
throw new We();
|
|
2730
|
-
},
|
|
2730
|
+
}, Eo = Ue ? function() {
|
|
2731
2731
|
try {
|
|
2732
2732
|
return arguments.callee, Lt;
|
|
2733
2733
|
} catch {
|
|
@@ -2737,13 +2737,13 @@ var Lt = function() {
|
|
|
2737
2737
|
return Lt;
|
|
2738
2738
|
}
|
|
2739
2739
|
}
|
|
2740
|
-
}() : Lt, Me =
|
|
2740
|
+
}() : Lt, Me = fo(), Io = ho(), K = Object.getPrototypeOf || (Io ? function(t) {
|
|
2741
2741
|
return t.__proto__;
|
|
2742
|
-
} : null), qe = {},
|
|
2742
|
+
} : null), qe = {}, Fo = typeof Uint8Array > "u" || !K ? k : K(Uint8Array), $e = {
|
|
2743
2743
|
"%AggregateError%": typeof AggregateError > "u" ? k : AggregateError,
|
|
2744
2744
|
"%Array%": Array,
|
|
2745
2745
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? k : ArrayBuffer,
|
|
2746
|
-
"%ArrayIteratorPrototype%": Me &&
|
|
2746
|
+
"%ArrayIteratorPrototype%": Me && K ? K([][Symbol.iterator]()) : k,
|
|
2747
2747
|
"%AsyncFromSyncIteratorPrototype%": k,
|
|
2748
2748
|
"%AsyncFunction%": qe,
|
|
2749
2749
|
"%AsyncGenerator%": qe,
|
|
@@ -2767,17 +2767,17 @@ var Lt = function() {
|
|
|
2767
2767
|
"%Float32Array%": typeof Float32Array > "u" ? k : Float32Array,
|
|
2768
2768
|
"%Float64Array%": typeof Float64Array > "u" ? k : Float64Array,
|
|
2769
2769
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? k : FinalizationRegistry,
|
|
2770
|
-
"%Function%":
|
|
2770
|
+
"%Function%": wn,
|
|
2771
2771
|
"%GeneratorFunction%": qe,
|
|
2772
2772
|
"%Int8Array%": typeof Int8Array > "u" ? k : Int8Array,
|
|
2773
2773
|
"%Int16Array%": typeof Int16Array > "u" ? k : Int16Array,
|
|
2774
2774
|
"%Int32Array%": typeof Int32Array > "u" ? k : Int32Array,
|
|
2775
2775
|
"%isFinite%": isFinite,
|
|
2776
2776
|
"%isNaN%": isNaN,
|
|
2777
|
-
"%IteratorPrototype%": Me &&
|
|
2777
|
+
"%IteratorPrototype%": Me && K ? K(K([][Symbol.iterator]())) : k,
|
|
2778
2778
|
"%JSON%": typeof JSON == "object" ? JSON : k,
|
|
2779
2779
|
"%Map%": typeof Map > "u" ? k : Map,
|
|
2780
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !Me || !
|
|
2780
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Me || !K ? k : K((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2781
2781
|
"%Math%": Math,
|
|
2782
2782
|
"%Number%": Number,
|
|
2783
2783
|
"%Object%": Object,
|
|
@@ -2790,14 +2790,14 @@ var Lt = function() {
|
|
|
2790
2790
|
"%Reflect%": typeof Reflect > "u" ? k : Reflect,
|
|
2791
2791
|
"%RegExp%": RegExp,
|
|
2792
2792
|
"%Set%": typeof Set > "u" ? k : Set,
|
|
2793
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !Me || !
|
|
2793
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Me || !K ? k : K((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2794
2794
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? k : SharedArrayBuffer,
|
|
2795
2795
|
"%String%": String,
|
|
2796
|
-
"%StringIteratorPrototype%": Me &&
|
|
2796
|
+
"%StringIteratorPrototype%": Me && K ? K(""[Symbol.iterator]()) : k,
|
|
2797
2797
|
"%Symbol%": Me ? Symbol : k,
|
|
2798
2798
|
"%SyntaxError%": Je,
|
|
2799
|
-
"%ThrowTypeError%":
|
|
2800
|
-
"%TypedArray%":
|
|
2799
|
+
"%ThrowTypeError%": Eo,
|
|
2800
|
+
"%TypedArray%": Fo,
|
|
2801
2801
|
"%TypeError%": We,
|
|
2802
2802
|
"%Uint8Array%": typeof Uint8Array > "u" ? k : Uint8Array,
|
|
2803
2803
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? k : Uint8ClampedArray,
|
|
@@ -2808,14 +2808,14 @@ var Lt = function() {
|
|
|
2808
2808
|
"%WeakRef%": typeof WeakRef > "u" ? k : WeakRef,
|
|
2809
2809
|
"%WeakSet%": typeof WeakSet > "u" ? k : WeakSet
|
|
2810
2810
|
};
|
|
2811
|
-
if (
|
|
2811
|
+
if (K)
|
|
2812
2812
|
try {
|
|
2813
2813
|
null.error;
|
|
2814
2814
|
} catch (t) {
|
|
2815
|
-
var
|
|
2816
|
-
$e["%Error.prototype%"] =
|
|
2815
|
+
var Co = K(K(t));
|
|
2816
|
+
$e["%Error.prototype%"] = Co;
|
|
2817
2817
|
}
|
|
2818
|
-
var
|
|
2818
|
+
var _o = function t(e) {
|
|
2819
2819
|
var r;
|
|
2820
2820
|
if (e === "%AsyncFunction%")
|
|
2821
2821
|
r = Nt("async function () {}");
|
|
@@ -2828,7 +2828,7 @@ var Co = function t(e) {
|
|
|
2828
2828
|
o && (r = o.prototype);
|
|
2829
2829
|
} else if (e === "%AsyncIteratorPrototype%") {
|
|
2830
2830
|
var s = t("%AsyncGenerator%");
|
|
2831
|
-
s &&
|
|
2831
|
+
s && K && (r = K(s.prototype));
|
|
2832
2832
|
}
|
|
2833
2833
|
return $e[e] = r, r;
|
|
2834
2834
|
}, Br = {
|
|
@@ -2883,21 +2883,21 @@ var Co = function t(e) {
|
|
|
2883
2883
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2884
2884
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2885
2885
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2886
|
-
}, ut =
|
|
2886
|
+
}, ut = bn, wt = Ao, To = ut.call(Function.call, Array.prototype.concat), Bo = ut.call(Function.apply, Array.prototype.splice), Or = ut.call(Function.call, String.prototype.replace), vt = ut.call(Function.call, String.prototype.slice), Oo = ut.call(Function.call, RegExp.prototype.exec), xo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ko = /\\(\\)?/g, Po = function(e) {
|
|
2887
2887
|
var r = vt(e, 0, 1), o = vt(e, -1);
|
|
2888
2888
|
if (r === "%" && o !== "%")
|
|
2889
2889
|
throw new Je("invalid intrinsic syntax, expected closing `%`");
|
|
2890
2890
|
if (o === "%" && r !== "%")
|
|
2891
2891
|
throw new Je("invalid intrinsic syntax, expected opening `%`");
|
|
2892
2892
|
var s = [];
|
|
2893
|
-
return Or(e,
|
|
2894
|
-
s[s.length] = f ? Or(p,
|
|
2893
|
+
return Or(e, xo, function(u, l, f, p) {
|
|
2894
|
+
s[s.length] = f ? Or(p, ko, "$1") : l || u;
|
|
2895
2895
|
}), s;
|
|
2896
|
-
},
|
|
2896
|
+
}, Ro = function(e, r) {
|
|
2897
2897
|
var o = e, s;
|
|
2898
2898
|
if (wt(Br, o) && (s = Br[o], o = "%" + s[0] + "%"), wt($e, o)) {
|
|
2899
2899
|
var u = $e[o];
|
|
2900
|
-
if (u === qe && (u =
|
|
2900
|
+
if (u === qe && (u = _o(o)), typeof u > "u" && !r)
|
|
2901
2901
|
throw new We("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
2902
2902
|
return {
|
|
2903
2903
|
alias: s,
|
|
@@ -2911,10 +2911,10 @@ var Co = function t(e) {
|
|
|
2911
2911
|
throw new We("intrinsic name must be a non-empty string");
|
|
2912
2912
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
2913
2913
|
throw new We('"allowMissing" argument must be a boolean');
|
|
2914
|
-
if (
|
|
2914
|
+
if (Oo(/^%?[^%]*%?$/, e) === null)
|
|
2915
2915
|
throw new Je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2916
|
-
var o =
|
|
2917
|
-
A && (s = A[0],
|
|
2916
|
+
var o = Po(e), s = o.length > 0 ? o[0] : "", u = Ro("%" + s + "%", r), l = u.name, f = u.value, p = !1, A = u.alias;
|
|
2917
|
+
A && (s = A[0], Bo(o, To([0, 1], A)));
|
|
2918
2918
|
for (var g = 1, w = !0; g < o.length; g += 1) {
|
|
2919
2919
|
var E = o[g], I = vt(E, 0, 1), R = vt(E, -1);
|
|
2920
2920
|
if ((I === '"' || I === "'" || I === "`" || R === '"' || R === "'" || R === "`") && I !== R)
|
|
@@ -2936,7 +2936,7 @@ var Co = function t(e) {
|
|
|
2936
2936
|
}
|
|
2937
2937
|
}
|
|
2938
2938
|
return f;
|
|
2939
|
-
},
|
|
2939
|
+
}, vn = { exports: {} }, No = Xe, Xt = No("%Object.defineProperty%", !0), Zt = function() {
|
|
2940
2940
|
if (Xt)
|
|
2941
2941
|
try {
|
|
2942
2942
|
return Xt({}, "a", { value: 1 }), !0;
|
|
@@ -2954,21 +2954,21 @@ Zt.hasArrayLengthDefineBug = function() {
|
|
|
2954
2954
|
return !0;
|
|
2955
2955
|
}
|
|
2956
2956
|
};
|
|
2957
|
-
var
|
|
2957
|
+
var Sn = Zt, Lo = Xe, pt = Lo("%Object.getOwnPropertyDescriptor%", !0);
|
|
2958
2958
|
if (pt)
|
|
2959
2959
|
try {
|
|
2960
2960
|
pt([], "length");
|
|
2961
2961
|
} catch {
|
|
2962
2962
|
pt = null;
|
|
2963
2963
|
}
|
|
2964
|
-
var gr = pt,
|
|
2964
|
+
var gr = pt, Uo = Sn(), mr = Xe, st = Uo && mr("%Object.defineProperty%", !0);
|
|
2965
2965
|
if (st)
|
|
2966
2966
|
try {
|
|
2967
2967
|
st({}, "a", { value: 1 });
|
|
2968
2968
|
} catch {
|
|
2969
2969
|
st = !1;
|
|
2970
2970
|
}
|
|
2971
|
-
var
|
|
2971
|
+
var $o = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Do = function(e, r, o) {
|
|
2972
2972
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
2973
2973
|
throw new Ve("`obj` must be an object or a function`");
|
|
2974
2974
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -2992,21 +2992,21 @@ var Uo = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, $o = function(e,
|
|
|
2992
2992
|
else if (f || !s && !u && !l)
|
|
2993
2993
|
e[r] = o;
|
|
2994
2994
|
else
|
|
2995
|
-
throw new
|
|
2996
|
-
},
|
|
2995
|
+
throw new $o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2996
|
+
}, An = Xe, kr = Do, jo = Sn(), Pr = gr, Rr = An("%TypeError%"), Mo = An("%Math.floor%"), Vo = function(e, r) {
|
|
2997
2997
|
if (typeof e != "function")
|
|
2998
2998
|
throw new Rr("`fn` is not a function");
|
|
2999
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
2999
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || Mo(r) !== r)
|
|
3000
3000
|
throw new Rr("`length` must be a positive 32-bit integer");
|
|
3001
3001
|
var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
|
|
3002
3002
|
if ("length" in e && Pr) {
|
|
3003
3003
|
var l = Pr(e, "length");
|
|
3004
3004
|
l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
|
|
3005
3005
|
}
|
|
3006
|
-
return (s || u || !o) && (
|
|
3006
|
+
return (s || u || !o) && (jo ? kr(e, "length", r, !0, !0) : kr(e, "length", r)), e;
|
|
3007
3007
|
};
|
|
3008
3008
|
(function(t) {
|
|
3009
|
-
var e =
|
|
3009
|
+
var e = bn, r = Xe, o = Vo, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(l, u), p = r("%Object.defineProperty%", !0), A = r("%Math.max%");
|
|
3010
3010
|
if (p)
|
|
3011
3011
|
try {
|
|
3012
3012
|
p({}, "a", { value: 1 });
|
|
@@ -3027,42 +3027,42 @@ var Uo = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, $o = function(e,
|
|
|
3027
3027
|
return f(e, u, arguments);
|
|
3028
3028
|
};
|
|
3029
3029
|
p ? p(t.exports, "apply", { value: g }) : t.exports.apply = g;
|
|
3030
|
-
})(
|
|
3031
|
-
var
|
|
3032
|
-
var o =
|
|
3033
|
-
return typeof o == "function" &&
|
|
3034
|
-
},
|
|
3035
|
-
return
|
|
3036
|
-
},
|
|
3030
|
+
})(vn);
|
|
3031
|
+
var En = vn.exports, In = Xe, Fn = En, qo = Fn(In("String.prototype.indexOf")), Cn = function(e, r) {
|
|
3032
|
+
var o = In(e, !!r);
|
|
3033
|
+
return typeof o == "function" && qo(e, ".prototype.") > -1 ? Fn(o) : o;
|
|
3034
|
+
}, Go = yr(), Qo = Cn, er = Qo("Object.prototype.toString"), Ot = function(e) {
|
|
3035
|
+
return Go && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : er(e) === "[object Arguments]";
|
|
3036
|
+
}, _n = function(e) {
|
|
3037
3037
|
return Ot(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && er(e) !== "[object Array]" && er(e.callee) === "[object Function]";
|
|
3038
|
-
},
|
|
3038
|
+
}, zo = function() {
|
|
3039
3039
|
return Ot(arguments);
|
|
3040
3040
|
}();
|
|
3041
|
-
Ot.isLegacyArguments =
|
|
3042
|
-
var
|
|
3043
|
-
if (!
|
|
3041
|
+
Ot.isLegacyArguments = _n;
|
|
3042
|
+
var Ho = zo ? Ot : _n, Ko = Object.prototype.toString, Wo = Function.prototype.toString, Jo = /^\s*(?:function)?\*/, Tn = yr(), Ut = Object.getPrototypeOf, Yo = function() {
|
|
3043
|
+
if (!Tn)
|
|
3044
3044
|
return !1;
|
|
3045
3045
|
try {
|
|
3046
3046
|
return Function("return function*() {}")();
|
|
3047
3047
|
} catch {
|
|
3048
3048
|
}
|
|
3049
|
-
}, $t,
|
|
3049
|
+
}, $t, Xo = function(e) {
|
|
3050
3050
|
if (typeof e != "function")
|
|
3051
3051
|
return !1;
|
|
3052
|
-
if (
|
|
3052
|
+
if (Jo.test(Wo.call(e)))
|
|
3053
3053
|
return !0;
|
|
3054
|
-
if (!
|
|
3054
|
+
if (!Tn) {
|
|
3055
3055
|
var r = Ko.call(e);
|
|
3056
3056
|
return r === "[object GeneratorFunction]";
|
|
3057
3057
|
}
|
|
3058
3058
|
if (!Ut)
|
|
3059
3059
|
return !1;
|
|
3060
3060
|
if (typeof $t > "u") {
|
|
3061
|
-
var o =
|
|
3061
|
+
var o = Yo();
|
|
3062
3062
|
$t = o ? Ut(o) : !1;
|
|
3063
3063
|
}
|
|
3064
3064
|
return Ut(e) === $t;
|
|
3065
|
-
},
|
|
3065
|
+
}, Bn = Function.prototype.toString, Ge = typeof Reflect == "object" && Reflect !== null && Reflect.apply, tr, dt;
|
|
3066
3066
|
if (typeof Ge == "function" && typeof Object.defineProperty == "function")
|
|
3067
3067
|
try {
|
|
3068
3068
|
tr = Object.defineProperty({}, "length", {
|
|
@@ -3077,35 +3077,35 @@ if (typeof Ge == "function" && typeof Object.defineProperty == "function")
|
|
|
3077
3077
|
}
|
|
3078
3078
|
else
|
|
3079
3079
|
Ge = null;
|
|
3080
|
-
var
|
|
3080
|
+
var Zo = /^\s*class\b/, rr = function(e) {
|
|
3081
3081
|
try {
|
|
3082
|
-
var r =
|
|
3083
|
-
return
|
|
3082
|
+
var r = Bn.call(e);
|
|
3083
|
+
return Zo.test(r);
|
|
3084
3084
|
} catch {
|
|
3085
3085
|
return !1;
|
|
3086
3086
|
}
|
|
3087
3087
|
}, Dt = function(e) {
|
|
3088
3088
|
try {
|
|
3089
|
-
return rr(e) ? !1 : (
|
|
3089
|
+
return rr(e) ? !1 : (Bn.call(e), !0);
|
|
3090
3090
|
} catch {
|
|
3091
3091
|
return !1;
|
|
3092
3092
|
}
|
|
3093
|
-
}, yt = Object.prototype.toString,
|
|
3093
|
+
}, yt = Object.prototype.toString, es = "[object Object]", ts = "[object Function]", rs = "[object GeneratorFunction]", ns = "[object HTMLAllCollection]", is = "[object HTML document.all class]", os = "[object HTMLCollection]", ss = typeof Symbol == "function" && !!Symbol.toStringTag, as = !(0 in [,]), nr = function() {
|
|
3094
3094
|
return !1;
|
|
3095
3095
|
};
|
|
3096
3096
|
if (typeof document == "object") {
|
|
3097
|
-
var
|
|
3098
|
-
yt.call(
|
|
3099
|
-
if ((
|
|
3097
|
+
var us = document.all;
|
|
3098
|
+
yt.call(us) === yt.call(document.all) && (nr = function(e) {
|
|
3099
|
+
if ((as || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3100
3100
|
try {
|
|
3101
3101
|
var r = yt.call(e);
|
|
3102
|
-
return (r ===
|
|
3102
|
+
return (r === ns || r === is || r === os || r === es) && e("") == null;
|
|
3103
3103
|
} catch {
|
|
3104
3104
|
}
|
|
3105
3105
|
return !1;
|
|
3106
3106
|
});
|
|
3107
3107
|
}
|
|
3108
|
-
var
|
|
3108
|
+
var cs = Ge ? function(e) {
|
|
3109
3109
|
if (nr(e))
|
|
3110
3110
|
return !0;
|
|
3111
3111
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3122,27 +3122,27 @@ var us = Ge ? function(e) {
|
|
|
3122
3122
|
return !0;
|
|
3123
3123
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3124
3124
|
return !1;
|
|
3125
|
-
if (
|
|
3125
|
+
if (ss)
|
|
3126
3126
|
return Dt(e);
|
|
3127
3127
|
if (rr(e))
|
|
3128
3128
|
return !1;
|
|
3129
3129
|
var r = yt.call(e);
|
|
3130
|
-
return r !==
|
|
3131
|
-
},
|
|
3130
|
+
return r !== ts && r !== rs && !/^\[object HTML/.test(r) ? !1 : Dt(e);
|
|
3131
|
+
}, fs = cs, ls = Object.prototype.toString, On = Object.prototype.hasOwnProperty, hs = function(e, r, o) {
|
|
3132
3132
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3133
|
-
|
|
3134
|
-
},
|
|
3133
|
+
On.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3134
|
+
}, ps = function(e, r, o) {
|
|
3135
3135
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3136
3136
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3137
|
-
}, ps = function(e, r, o) {
|
|
3138
|
-
for (var s in e)
|
|
3139
|
-
Bn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3140
3137
|
}, ds = function(e, r, o) {
|
|
3141
|
-
|
|
3138
|
+
for (var s in e)
|
|
3139
|
+
On.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3140
|
+
}, ys = function(e, r, o) {
|
|
3141
|
+
if (!fs(r))
|
|
3142
3142
|
throw new TypeError("iterator must be a function");
|
|
3143
3143
|
var s;
|
|
3144
|
-
arguments.length >= 3 && (s = o),
|
|
3145
|
-
},
|
|
3144
|
+
arguments.length >= 3 && (s = o), ls.call(e) === "[object Array]" ? hs(e, r, s) : typeof e == "string" ? ps(e, r, s) : ds(e, r, s);
|
|
3145
|
+
}, gs = ys, jt = [
|
|
3146
3146
|
"BigInt64Array",
|
|
3147
3147
|
"BigUint64Array",
|
|
3148
3148
|
"Float32Array",
|
|
@@ -3154,17 +3154,17 @@ var us = Ge ? function(e) {
|
|
|
3154
3154
|
"Uint32Array",
|
|
3155
3155
|
"Uint8Array",
|
|
3156
3156
|
"Uint8ClampedArray"
|
|
3157
|
-
],
|
|
3157
|
+
], ms = typeof globalThis > "u" ? Kr : globalThis, bs = function() {
|
|
3158
3158
|
for (var e = [], r = 0; r < jt.length; r++)
|
|
3159
|
-
typeof
|
|
3159
|
+
typeof ms[jt[r]] == "function" && (e[e.length] = jt[r]);
|
|
3160
3160
|
return e;
|
|
3161
|
-
}, St =
|
|
3161
|
+
}, St = gs, ws = bs, Nr = En, br = Cn, gt = gr, vs = br("Object.prototype.toString"), xn = yr(), Lr = typeof globalThis > "u" ? Kr : globalThis, ir = ws(), wr = br("String.prototype.slice"), Mt = Object.getPrototypeOf, Ss = br("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3162
3162
|
for (var o = 0; o < e.length; o += 1)
|
|
3163
3163
|
if (e[o] === r)
|
|
3164
3164
|
return o;
|
|
3165
3165
|
return -1;
|
|
3166
3166
|
}, At = { __proto__: null };
|
|
3167
|
-
|
|
3167
|
+
xn && gt && Mt ? St(ir, function(t) {
|
|
3168
3168
|
var e = new Lr[t]();
|
|
3169
3169
|
if (Symbol.toStringTag in e) {
|
|
3170
3170
|
var r = Mt(e), o = gt(r, Symbol.toStringTag);
|
|
@@ -3178,7 +3178,7 @@ On && gt && Mt ? St(ir, function(t) {
|
|
|
3178
3178
|
var e = new Lr[t](), r = e.slice || e.set;
|
|
3179
3179
|
r && (At["$" + t] = Nr(r));
|
|
3180
3180
|
});
|
|
3181
|
-
var
|
|
3181
|
+
var As = function(e) {
|
|
3182
3182
|
var r = !1;
|
|
3183
3183
|
return St(At, function(o, s) {
|
|
3184
3184
|
if (!r)
|
|
@@ -3187,7 +3187,7 @@ var Ss = function(e) {
|
|
|
3187
3187
|
} catch {
|
|
3188
3188
|
}
|
|
3189
3189
|
}), r;
|
|
3190
|
-
},
|
|
3190
|
+
}, Es = function(e) {
|
|
3191
3191
|
var r = !1;
|
|
3192
3192
|
return St(At, function(o, s) {
|
|
3193
3193
|
if (!r)
|
|
@@ -3196,19 +3196,19 @@ var Ss = function(e) {
|
|
|
3196
3196
|
} catch {
|
|
3197
3197
|
}
|
|
3198
3198
|
}), r;
|
|
3199
|
-
},
|
|
3199
|
+
}, kn = function(e) {
|
|
3200
3200
|
if (!e || typeof e != "object")
|
|
3201
3201
|
return !1;
|
|
3202
|
-
if (!
|
|
3203
|
-
var r = wr(
|
|
3204
|
-
return
|
|
3202
|
+
if (!xn) {
|
|
3203
|
+
var r = wr(vs(e), 8, -1);
|
|
3204
|
+
return Ss(ir, r) > -1 ? r : r !== "Object" ? !1 : Es(e);
|
|
3205
3205
|
}
|
|
3206
|
-
return gt ?
|
|
3207
|
-
},
|
|
3208
|
-
return !!
|
|
3206
|
+
return gt ? As(e) : null;
|
|
3207
|
+
}, Is = kn, Fs = function(e) {
|
|
3208
|
+
return !!Is(e);
|
|
3209
3209
|
};
|
|
3210
3210
|
(function(t) {
|
|
3211
|
-
var e =
|
|
3211
|
+
var e = Ho, r = Xo, o = kn, s = Fs;
|
|
3212
3212
|
function u(v) {
|
|
3213
3213
|
return v.call.bind(v);
|
|
3214
3214
|
}
|
|
@@ -3390,8 +3390,8 @@ var Ss = function(e) {
|
|
|
3390
3390
|
}
|
|
3391
3391
|
});
|
|
3392
3392
|
});
|
|
3393
|
-
})(
|
|
3394
|
-
var
|
|
3393
|
+
})(gn);
|
|
3394
|
+
var Cs = function(e) {
|
|
3395
3395
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3396
3396
|
}, or = { exports: {} };
|
|
3397
3397
|
typeof Object.create == "function" ? or.exports = function(e, r) {
|
|
@@ -3411,7 +3411,7 @@ typeof Object.create == "function" ? or.exports = function(e, r) {
|
|
|
3411
3411
|
o.prototype = r.prototype, e.prototype = new o(), e.prototype.constructor = e;
|
|
3412
3412
|
}
|
|
3413
3413
|
};
|
|
3414
|
-
var
|
|
3414
|
+
var _s = or.exports;
|
|
3415
3415
|
(function(t) {
|
|
3416
3416
|
var e = Object.getOwnPropertyDescriptors || function(b) {
|
|
3417
3417
|
for (var S = Object.keys(b), F = {}, P = 0; P < S.length; P++)
|
|
@@ -3633,7 +3633,7 @@ var Cs = or.exports;
|
|
|
3633
3633
|
`) + " " + d.join(`,
|
|
3634
3634
|
`) + " " + S[1] : S[0] + b + " " + d.join(", ") + " " + S[1];
|
|
3635
3635
|
}
|
|
3636
|
-
t.types =
|
|
3636
|
+
t.types = gn;
|
|
3637
3637
|
function Q(d) {
|
|
3638
3638
|
return Array.isArray(d);
|
|
3639
3639
|
}
|
|
@@ -3690,7 +3690,7 @@ var Cs = or.exports;
|
|
|
3690
3690
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
3691
3691
|
typeof d > "u";
|
|
3692
3692
|
}
|
|
3693
|
-
t.isPrimitive = et, t.isBuffer =
|
|
3693
|
+
t.isPrimitive = et, t.isBuffer = Cs;
|
|
3694
3694
|
function fe(d) {
|
|
3695
3695
|
return Object.prototype.toString.call(d);
|
|
3696
3696
|
}
|
|
@@ -3721,7 +3721,7 @@ var Cs = or.exports;
|
|
|
3721
3721
|
}
|
|
3722
3722
|
t.log = function() {
|
|
3723
3723
|
console.log("%s - %s", tt(), t.format.apply(t, arguments));
|
|
3724
|
-
}, t.inherits =
|
|
3724
|
+
}, t.inherits = _s, t._extend = function(d, b) {
|
|
3725
3725
|
if (!b || !ne(b))
|
|
3726
3726
|
return d;
|
|
3727
3727
|
for (var S = Object.keys(b), F = S.length; F--; )
|
|
@@ -3806,7 +3806,7 @@ var Cs = or.exports;
|
|
|
3806
3806
|
}
|
|
3807
3807
|
t.callbackify = V;
|
|
3808
3808
|
})(Bt);
|
|
3809
|
-
const { inherits:
|
|
3809
|
+
const { inherits: Ts, format: Vt } = Bt;
|
|
3810
3810
|
function Pe(t, e, r = Error) {
|
|
3811
3811
|
if (!t)
|
|
3812
3812
|
throw new Error("Avvio error code must not be empty");
|
|
@@ -3819,9 +3819,9 @@ function Pe(t, e, r = Error) {
|
|
|
3819
3819
|
}
|
|
3820
3820
|
return o.prototype[Symbol.toStringTag] = "Error", o.prototype.toString = function() {
|
|
3821
3821
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
3822
|
-
},
|
|
3822
|
+
}, Ts(o, r), o;
|
|
3823
3823
|
}
|
|
3824
|
-
var
|
|
3824
|
+
var Pn = {
|
|
3825
3825
|
createError: Pe,
|
|
3826
3826
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Pe(
|
|
3827
3827
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -3847,7 +3847,7 @@ var kn = {
|
|
|
3847
3847
|
"AVV_ERR_READY_TIMEOUT",
|
|
3848
3848
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
3849
3849
|
)
|
|
3850
|
-
},
|
|
3850
|
+
}, Bs = function t(e, r, o) {
|
|
3851
3851
|
r === void 0 && (r = ""), o || (o = {});
|
|
3852
3852
|
var s = function(p) {
|
|
3853
3853
|
var A = {
|
|
@@ -3869,8 +3869,8 @@ var kn = {
|
|
|
3869
3869
|
return r + s(g ? "└" : "├") + s("─") + s(w ? "┬" : "─") + " " + t(p, E, o).slice(r.length + 2);
|
|
3870
3870
|
}).join("");
|
|
3871
3871
|
};
|
|
3872
|
-
const
|
|
3873
|
-
let
|
|
3872
|
+
const Os = Bs, Ur = Symbol("avvio.TimeTree.untrackNode"), qt = Symbol("avvio.TimeTree.trackNode"), $r = Symbol("avvio.TimeTree.getParent"), Dr = Symbol("avvio.TimeTree.getNode"), jr = Symbol("avvio.TimeTree.addNode");
|
|
3873
|
+
let xs = class {
|
|
3874
3874
|
constructor() {
|
|
3875
3875
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
3876
3876
|
}
|
|
@@ -3924,11 +3924,11 @@ let Os = class {
|
|
|
3924
3924
|
}
|
|
3925
3925
|
prittyPrint() {
|
|
3926
3926
|
const e = (o) => (o.label = `${o.label} ${o.diff} ms`, o.nodes.length > 0 && (o.nodes = o.nodes.map((s) => e(s))), o), r = e(this.toJSON());
|
|
3927
|
-
return
|
|
3927
|
+
return Os(r);
|
|
3928
3928
|
}
|
|
3929
3929
|
};
|
|
3930
|
-
var
|
|
3931
|
-
function
|
|
3930
|
+
var ks = xs, vr = { exports: {} }, sr = { exports: {} }, Gt, Mr;
|
|
3931
|
+
function Ps() {
|
|
3932
3932
|
if (Mr)
|
|
3933
3933
|
return Gt;
|
|
3934
3934
|
Mr = 1;
|
|
@@ -4010,8 +4010,8 @@ function ks() {
|
|
|
4010
4010
|
}
|
|
4011
4011
|
return Gt;
|
|
4012
4012
|
}
|
|
4013
|
-
function
|
|
4014
|
-
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize =
|
|
4013
|
+
function Rs(t) {
|
|
4014
|
+
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize = Ps(), r.destroy = A, Object.keys(t).forEach((g) => {
|
|
4015
4015
|
r[g] = t[g];
|
|
4016
4016
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4017
4017
|
function e(g) {
|
|
@@ -4091,7 +4091,7 @@ function Ps(t) {
|
|
|
4091
4091
|
}
|
|
4092
4092
|
return r.enable(r.load()), r;
|
|
4093
4093
|
}
|
|
4094
|
-
var
|
|
4094
|
+
var Ns = Rs;
|
|
4095
4095
|
(function(t, e) {
|
|
4096
4096
|
e.formatArgs = o, e.save = s, e.load = u, e.useColors = r, e.storage = l(), e.destroy = (() => {
|
|
4097
4097
|
let p = !1;
|
|
@@ -4215,7 +4215,7 @@ var Rs = Ps;
|
|
|
4215
4215
|
} catch {
|
|
4216
4216
|
}
|
|
4217
4217
|
}
|
|
4218
|
-
t.exports =
|
|
4218
|
+
t.exports = Ns(e);
|
|
4219
4219
|
const { formatters: f } = t.exports;
|
|
4220
4220
|
f.j = function(p) {
|
|
4221
4221
|
try {
|
|
@@ -4225,22 +4225,22 @@ var Rs = Ps;
|
|
|
4225
4225
|
}
|
|
4226
4226
|
};
|
|
4227
4227
|
})(sr, sr.exports);
|
|
4228
|
-
var
|
|
4229
|
-
const
|
|
4230
|
-
function
|
|
4228
|
+
var Rn = sr.exports;
|
|
4229
|
+
const Ls = sn, Us = yn.EventEmitter, $s = Bt.inherits, W = Rn("avvio"), { AVV_ERR_READY_TIMEOUT: Ds } = Pn, Qt = Symbol.for("plugin-meta");
|
|
4230
|
+
function js(t, e) {
|
|
4231
4231
|
return t[Qt] && t[Qt].name ? t[Qt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4232
4232
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4233
4233
|
}
|
|
4234
|
-
function
|
|
4234
|
+
function Ms() {
|
|
4235
4235
|
const t = {};
|
|
4236
4236
|
return t.promise = new Promise((e, r) => {
|
|
4237
4237
|
t.resolve = e, t.reject = r;
|
|
4238
4238
|
}), t;
|
|
4239
4239
|
}
|
|
4240
4240
|
function Ze(t, e, r, o, s) {
|
|
4241
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name =
|
|
4241
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = js(e, r), this.isAfter = o, this.q = Ls(t, Vs, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4242
4242
|
}
|
|
4243
|
-
|
|
4243
|
+
$s(Ze, Us);
|
|
4244
4244
|
Ze.prototype.exec = function(t, e) {
|
|
4245
4245
|
const r = this.func;
|
|
4246
4246
|
let o = !1;
|
|
@@ -4268,7 +4268,7 @@ Ze.prototype.exec = function(t, e) {
|
|
|
4268
4268
|
};
|
|
4269
4269
|
this.timeout > 0 && (W("setting up timeout", s, this.timeout), u = setTimeout(function() {
|
|
4270
4270
|
W("timed out", s), u = null;
|
|
4271
|
-
const p = new
|
|
4271
|
+
const p = new Ds(s);
|
|
4272
4272
|
p.fn = r, l(p);
|
|
4273
4273
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4274
4274
|
const f = r(this.server, this.opts, l);
|
|
@@ -4286,7 +4286,7 @@ Ze.prototype.loadedSoFar = function() {
|
|
|
4286
4286
|
}), this.q.resume();
|
|
4287
4287
|
};
|
|
4288
4288
|
let e;
|
|
4289
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4289
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Ms(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4290
4290
|
};
|
|
4291
4291
|
Ze.prototype.enqueue = function(t, e) {
|
|
4292
4292
|
W("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
@@ -4311,12 +4311,12 @@ Ze.prototype.finish = function(t, e) {
|
|
|
4311
4311
|
r();
|
|
4312
4312
|
else
|
|
4313
4313
|
W("delayed", this.name), this.q.drain = () => {
|
|
4314
|
-
W("drain", this.name), this.q.drain =
|
|
4314
|
+
W("drain", this.name), this.q.drain = qs, queueMicrotask(o);
|
|
4315
4315
|
};
|
|
4316
4316
|
};
|
|
4317
4317
|
queueMicrotask(o), this.q.resume();
|
|
4318
4318
|
};
|
|
4319
|
-
function
|
|
4319
|
+
function Vs(t, e) {
|
|
4320
4320
|
const r = this;
|
|
4321
4321
|
_.process.nextTick(Sr.bind(r), t, e);
|
|
4322
4322
|
}
|
|
@@ -4334,19 +4334,19 @@ function Sr(t, e) {
|
|
|
4334
4334
|
});
|
|
4335
4335
|
});
|
|
4336
4336
|
}
|
|
4337
|
-
function
|
|
4337
|
+
function qs() {
|
|
4338
4338
|
}
|
|
4339
4339
|
vr.exports = Ze;
|
|
4340
4340
|
vr.exports.loadPlugin = Sr;
|
|
4341
|
-
var
|
|
4342
|
-
const Vr =
|
|
4341
|
+
var Gs = vr.exports;
|
|
4342
|
+
const Vr = sn, Qs = yn.EventEmitter, zs = Bt.inherits, {
|
|
4343
4343
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: zt,
|
|
4344
4344
|
AVV_ERR_CALLBACK_NOT_FN: at,
|
|
4345
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4345
|
+
AVV_ERR_PLUGIN_NOT_VALID: Hs,
|
|
4346
4346
|
AVV_ERR_ROOT_PLG_BOOTED: Ks,
|
|
4347
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4348
|
-
} =
|
|
4349
|
-
function
|
|
4347
|
+
AVV_ERR_READY_TIMEOUT: Ws
|
|
4348
|
+
} = Pn, Js = ks, ar = Gs, Ye = Rn("avvio"), Et = Symbol("kAvvio"), Ht = Symbol("kThenifyDoNotWrap");
|
|
4349
|
+
function Ys(t, e, r) {
|
|
4350
4350
|
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", f = o.onClose || "onClose", p = o.close || "close";
|
|
4351
4351
|
if (t[s])
|
|
4352
4352
|
throw new zt(s);
|
|
@@ -4356,32 +4356,32 @@ function Js(t, e, r) {
|
|
|
4356
4356
|
throw new zt(l);
|
|
4357
4357
|
t[s] = function(A, g) {
|
|
4358
4358
|
return r.use(A, g), this;
|
|
4359
|
-
}, Object.defineProperty(t, "then", { get:
|
|
4360
|
-
return typeof A != "function" ? r._loadRegistered() : (r.after(
|
|
4359
|
+
}, Object.defineProperty(t, "then", { get: Nn.bind(r) }), t[Et] = !0, t[u] = function(A) {
|
|
4360
|
+
return typeof A != "function" ? r._loadRegistered() : (r.after(Kt(A, this)), this);
|
|
4361
4361
|
}, t[l] = function(A) {
|
|
4362
4362
|
if (A && typeof A != "function")
|
|
4363
4363
|
throw new at(l, typeof A);
|
|
4364
|
-
return r.ready(A ?
|
|
4364
|
+
return r.ready(A ? Kt(A, this) : void 0);
|
|
4365
4365
|
}, t[f] = function(A) {
|
|
4366
4366
|
if (typeof A != "function")
|
|
4367
4367
|
throw new at(f, typeof A);
|
|
4368
|
-
return r.onClose(
|
|
4368
|
+
return r.onClose(ra(A, this)), this;
|
|
4369
4369
|
}, t[p] = function(A) {
|
|
4370
4370
|
if (A && typeof A != "function")
|
|
4371
4371
|
throw new at(p, typeof A);
|
|
4372
|
-
return A ? (r.close(
|
|
4372
|
+
return A ? (r.close(Kt(A, this)), this) : r.close();
|
|
4373
4373
|
};
|
|
4374
4374
|
}
|
|
4375
4375
|
function J(t, e, r) {
|
|
4376
4376
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof J)) {
|
|
4377
4377
|
const o = new J(t, e, r);
|
|
4378
|
-
return t &&
|
|
4378
|
+
return t && Ys(t, e, o), o;
|
|
4379
4379
|
}
|
|
4380
|
-
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
|
|
4380
|
+
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 Js(), this._readyQ = Vr(this, Ln, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4381
4381
|
this.emit("start"), this._readyQ.drain = qr;
|
|
4382
|
-
}, this._closeQ = Vr(this,
|
|
4382
|
+
}, this._closeQ = Vr(this, ta, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4383
4383
|
this.emit("close"), this._closeQ.drain = qr;
|
|
4384
|
-
}, this._doStart = null, this._root = new ar(this,
|
|
4384
|
+
}, this._doStart = null, this._root = new ar(this, Xs.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
|
|
4385
4385
|
const l = this.pluginTree.start(null, s, u);
|
|
4386
4386
|
this._root.once("loaded", (f, p, A) => {
|
|
4387
4387
|
this.pluginTree.stop(l, A);
|
|
@@ -4401,19 +4401,19 @@ function J(t, e, r) {
|
|
|
4401
4401
|
this._readyQ.resume();
|
|
4402
4402
|
});
|
|
4403
4403
|
}
|
|
4404
|
-
function
|
|
4404
|
+
function Xs(t, e, r) {
|
|
4405
4405
|
this._doStart = r, e.autostart && this.start();
|
|
4406
4406
|
}
|
|
4407
|
-
|
|
4407
|
+
zs(J, Qs);
|
|
4408
4408
|
J.prototype.start = function() {
|
|
4409
4409
|
return this.started = !0, _.process.nextTick(this._doStart), this;
|
|
4410
4410
|
};
|
|
4411
4411
|
J.prototype.override = function(t, e, r) {
|
|
4412
4412
|
return t;
|
|
4413
4413
|
};
|
|
4414
|
-
function
|
|
4414
|
+
function Zs(t) {
|
|
4415
4415
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4416
|
-
throw new
|
|
4416
|
+
throw new Hs(typeof t);
|
|
4417
4417
|
return t;
|
|
4418
4418
|
}
|
|
4419
4419
|
J.prototype[Et] = !0;
|
|
@@ -4424,9 +4424,9 @@ J.prototype._loadRegistered = function() {
|
|
|
4424
4424
|
const t = this._current[0];
|
|
4425
4425
|
return !this.started && !this.booted && _.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4426
4426
|
};
|
|
4427
|
-
Object.defineProperty(J.prototype, "then", { get:
|
|
4427
|
+
Object.defineProperty(J.prototype, "then", { get: Nn });
|
|
4428
4428
|
J.prototype._addPlugin = function(t, e, r) {
|
|
4429
|
-
if (t =
|
|
4429
|
+
if (t = Zs(t), e = e || {}, this.booted)
|
|
4430
4430
|
throw new Ks();
|
|
4431
4431
|
const o = this._current[0], s = new ar(this, t, e, r);
|
|
4432
4432
|
if (s.once("start", (u, l, f) => {
|
|
@@ -4445,7 +4445,7 @@ J.prototype.after = function(t) {
|
|
|
4445
4445
|
return this._loadRegistered();
|
|
4446
4446
|
this._addPlugin(e.bind(this), {}, !0);
|
|
4447
4447
|
function e(r, o, s) {
|
|
4448
|
-
|
|
4448
|
+
Ln.call(this, t, s);
|
|
4449
4449
|
}
|
|
4450
4450
|
return this;
|
|
4451
4451
|
};
|
|
@@ -4498,18 +4498,18 @@ J.prototype.toJSON = function() {
|
|
|
4498
4498
|
};
|
|
4499
4499
|
function qr() {
|
|
4500
4500
|
}
|
|
4501
|
-
function
|
|
4501
|
+
function Nn() {
|
|
4502
4502
|
if (this.booted) {
|
|
4503
4503
|
Ye("thenify returning null because we are already booted");
|
|
4504
4504
|
return;
|
|
4505
4505
|
}
|
|
4506
|
-
if (this[
|
|
4507
|
-
this[
|
|
4506
|
+
if (this[Ht]) {
|
|
4507
|
+
this[Ht] = !1;
|
|
4508
4508
|
return;
|
|
4509
4509
|
}
|
|
4510
|
-
return Ye("thenify"), (t, e) => this._loadRegistered().then(() => (this[
|
|
4510
|
+
return Ye("thenify"), (t, e) => this._loadRegistered().then(() => (this[Ht] = !0, t(this._server)), e);
|
|
4511
4511
|
}
|
|
4512
|
-
function
|
|
4512
|
+
function Ln(t, e) {
|
|
4513
4513
|
const r = this._server, o = this._error;
|
|
4514
4514
|
let s;
|
|
4515
4515
|
if (this._error = null, t.length === 0)
|
|
@@ -4522,14 +4522,14 @@ function Nn(t, e) {
|
|
|
4522
4522
|
};
|
|
4523
4523
|
t.length === 2 ? t(o, u) : t(o, r, u);
|
|
4524
4524
|
} else
|
|
4525
|
-
|
|
4525
|
+
ea.call(this, t, o, r, e);
|
|
4526
4526
|
}
|
|
4527
|
-
function
|
|
4527
|
+
function ea(t, e, r, o) {
|
|
4528
4528
|
const s = t.name;
|
|
4529
4529
|
Ye("setting up ready timeout", s, this._timeout);
|
|
4530
4530
|
let u = setTimeout(() => {
|
|
4531
4531
|
Ye("timed out", s), u = null;
|
|
4532
|
-
const f = new
|
|
4532
|
+
const f = new Ws(s);
|
|
4533
4533
|
f.fn = t, this._error = f, o(f);
|
|
4534
4534
|
}, this._timeout);
|
|
4535
4535
|
t.length === 2 ? t(e, l.bind(this)) : t(e, r, l.bind(this));
|
|
@@ -4537,7 +4537,7 @@ function Zs(t, e, r, o) {
|
|
|
4537
4537
|
u && (clearTimeout(u), this._error = f, o(this._error));
|
|
4538
4538
|
}
|
|
4539
4539
|
}
|
|
4540
|
-
function
|
|
4540
|
+
function ta(t, e) {
|
|
4541
4541
|
const r = this._server, o = t[this._isOnCloseHandlerKey];
|
|
4542
4542
|
if (t.length === 0 || t.length === 1) {
|
|
4543
4543
|
let s;
|
|
@@ -4548,7 +4548,7 @@ function ea(t, e) {
|
|
|
4548
4548
|
} else
|
|
4549
4549
|
t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
|
|
4550
4550
|
}
|
|
4551
|
-
function
|
|
4551
|
+
function ra(t, e) {
|
|
4552
4552
|
return r.bind(e);
|
|
4553
4553
|
function r(o, s) {
|
|
4554
4554
|
let u;
|
|
@@ -4559,7 +4559,7 @@ function ta(t, e) {
|
|
|
4559
4559
|
}, s) : _.process.nextTick(s)) : t(this, s);
|
|
4560
4560
|
}
|
|
4561
4561
|
}
|
|
4562
|
-
function
|
|
4562
|
+
function Kt(t, e) {
|
|
4563
4563
|
return r.bind(e);
|
|
4564
4564
|
function r(o, s) {
|
|
4565
4565
|
let u;
|
|
@@ -4578,18 +4578,18 @@ hr.exports.express = function(t) {
|
|
|
4578
4578
|
}
|
|
4579
4579
|
});
|
|
4580
4580
|
};
|
|
4581
|
-
var
|
|
4582
|
-
const
|
|
4583
|
-
function
|
|
4584
|
-
const r = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", o =
|
|
4585
|
-
return o.use(
|
|
4581
|
+
var na = hr.exports;
|
|
4582
|
+
const ia = /* @__PURE__ */ Hn(na);
|
|
4583
|
+
function Aa(t, e = !0) {
|
|
4584
|
+
const r = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", o = ia(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4585
|
+
return o.use(Fi), o.use(wi, { sdkKey: t, host: r }), o.use(Ii), o.use(Ei), o.use(Ji), o.use(Mi), o.after(async (s, u, l) => {
|
|
4586
4586
|
if (s)
|
|
4587
4587
|
throw s;
|
|
4588
|
-
|
|
4588
|
+
await u.sdk.initializeApp(), l();
|
|
4589
4589
|
}), o.onClose(() => {
|
|
4590
4590
|
console.log("close");
|
|
4591
4591
|
}), o;
|
|
4592
4592
|
}
|
|
4593
4593
|
export {
|
|
4594
|
-
|
|
4594
|
+
Aa as StreamLayer
|
|
4595
4595
|
};
|