@hortiview/modulebase 1.0.1 → 1.0.3
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/dist/{IsRestoringProvider-D5gAh2bq.js → IsRestoringProvider-BfrdLTDw.js} +172 -83
- package/dist/{ModuleCore-CVkmRANQ.js → ModuleCore-D9qFDsO7.js} +2841 -2915
- package/dist/{QueryClientProvider-CTj9TWgb.js → QueryClientProvider-Bak-4BVu.js} +13 -13
- package/dist/components/ModuleBase.js +1 -1
- package/dist/components/ModuleCore.js +1 -1
- package/dist/hooks/useCustom.js +1 -1
- package/dist/hooks/useCustomMutation.js +2 -2
- package/dist/hooks/useEntity.js +1 -1
- package/dist/hooks/useOffline.js +1 -1
- package/dist/hooks/useOption.js +1 -1
- package/dist/hooks/useServiceBus.js +1 -1
- package/dist/main.js +175 -178
- package/dist/{mutation-BIuQs3WB.js → mutation-DztCHC7y.js} +1 -1
- package/dist/provider/SignalR/SignalRProvider.js +469 -463
- package/dist/{useMutation-SlEg4Gf2.js → useMutation-a0q2LJY6.js} +2 -2
- package/dist/{useQuery-jyZ1SNKl.js → useQuery-Cepqe-Ee.js} +6 -6
- package/dist/utils/helper.js +1 -1
- package/package.json +11 -11
|
@@ -15,7 +15,7 @@ class fe extends Error {
|
|
|
15
15
|
super(`${e}: Status code '${t}'`), this.statusCode = t, this.__proto__ = n;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
class
|
|
18
|
+
class ut extends Error {
|
|
19
19
|
/** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.
|
|
20
20
|
*
|
|
21
21
|
* @param {string} errorMessage A descriptive error message.
|
|
@@ -190,8 +190,8 @@ function Be(r) {
|
|
|
190
190
|
r.constructor && r.constructor.name === "ArrayBuffer");
|
|
191
191
|
}
|
|
192
192
|
async function Gn(r, e, t, n, i, o) {
|
|
193
|
-
const s = {}, [
|
|
194
|
-
s[
|
|
193
|
+
const s = {}, [l, h] = qe();
|
|
194
|
+
s[l] = h, r.log(y.Trace, `(${e} transport) sending data. ${Ze(i, o.logMessageContent)}.`);
|
|
195
195
|
const c = Be(i) ? "arraybuffer" : "text", a = await t.post(n, {
|
|
196
196
|
content: i,
|
|
197
197
|
headers: { ...s, ...o.headers },
|
|
@@ -202,7 +202,7 @@ async function Gn(r, e, t, n, i, o) {
|
|
|
202
202
|
r.log(y.Trace, `(${e} transport) request complete. Response status: ${a.statusCode}.`);
|
|
203
203
|
}
|
|
204
204
|
function Er(r) {
|
|
205
|
-
return r === void 0 ? new
|
|
205
|
+
return r === void 0 ? new lt(y.Information) : r === null ? Fe.instance : r.log !== void 0 ? r : new lt(r);
|
|
206
206
|
}
|
|
207
207
|
class Tr {
|
|
208
208
|
constructor(e, t) {
|
|
@@ -214,7 +214,7 @@ class Tr {
|
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
class
|
|
217
|
+
class lt {
|
|
218
218
|
constructor(e) {
|
|
219
219
|
this._minLevel = e, this.out = console;
|
|
220
220
|
}
|
|
@@ -314,7 +314,7 @@ class Nr extends et {
|
|
|
314
314
|
if (e.timeout) {
|
|
315
315
|
const h = e.timeout;
|
|
316
316
|
i = setTimeout(() => {
|
|
317
|
-
t.abort(), this._logger.log(y.Warning, "Timeout from HTTP request."), n = new
|
|
317
|
+
t.abort(), this._logger.log(y.Warning, "Timeout from HTTP request."), n = new ut();
|
|
318
318
|
}, h);
|
|
319
319
|
}
|
|
320
320
|
e.content === "" && (e.content = void 0), e.content && (e.headers = e.headers || {}, Be(e.content) ? e.headers["Content-Type"] = "application/octet-stream" : e.headers["Content-Type"] = "text/plain;charset=UTF-8");
|
|
@@ -342,8 +342,8 @@ class Nr extends et {
|
|
|
342
342
|
const h = await Wt(o, "text");
|
|
343
343
|
throw new fe(h || o.statusText, o.status);
|
|
344
344
|
}
|
|
345
|
-
const
|
|
346
|
-
return new Nt(o.status, o.statusText,
|
|
345
|
+
const l = await Wt(o, e.responseType);
|
|
346
|
+
return new Nt(o.status, o.statusText, l);
|
|
347
347
|
}
|
|
348
348
|
getCookieString(e) {
|
|
349
349
|
let t = "";
|
|
@@ -388,7 +388,7 @@ class Dr extends et {
|
|
|
388
388
|
}, i.onerror = () => {
|
|
389
389
|
this._logger.log(y.Warning, `Error from HTTP request. ${i.status}: ${i.statusText}.`), n(new fe(i.statusText, i.status));
|
|
390
390
|
}, i.ontimeout = () => {
|
|
391
|
-
this._logger.log(y.Warning, "Timeout from HTTP request."), n(new
|
|
391
|
+
this._logger.log(y.Warning, "Timeout from HTTP request."), n(new ut());
|
|
392
392
|
}, i.send(e.content);
|
|
393
393
|
}) : Promise.reject(new Error("No url defined.")) : Promise.reject(new Error("No method defined."));
|
|
394
394
|
}
|
|
@@ -432,17 +432,17 @@ class Br {
|
|
|
432
432
|
parseHandshakeResponse(e) {
|
|
433
433
|
let t, n;
|
|
434
434
|
if (Be(e)) {
|
|
435
|
-
const
|
|
435
|
+
const l = new Uint8Array(e), h = l.indexOf(X.RecordSeparatorCode);
|
|
436
436
|
if (h === -1)
|
|
437
437
|
throw new Error("Message is incomplete.");
|
|
438
438
|
const c = h + 1;
|
|
439
|
-
t = String.fromCharCode.apply(null, Array.prototype.slice.call(
|
|
439
|
+
t = String.fromCharCode.apply(null, Array.prototype.slice.call(l.slice(0, c))), n = l.byteLength > c ? l.slice(c).buffer : null;
|
|
440
440
|
} else {
|
|
441
|
-
const
|
|
441
|
+
const l = e, h = l.indexOf(X.RecordSeparator);
|
|
442
442
|
if (h === -1)
|
|
443
443
|
throw new Error("Message is incomplete.");
|
|
444
444
|
const c = h + 1;
|
|
445
|
-
t =
|
|
445
|
+
t = l.substring(0, c), n = l.length > c ? l.substring(c) : null;
|
|
446
446
|
}
|
|
447
447
|
const i = X.parse(t), o = JSON.parse(i[0]);
|
|
448
448
|
if (o.type)
|
|
@@ -486,8 +486,8 @@ class Mr {
|
|
|
486
486
|
let i = () => {
|
|
487
487
|
}, o = () => {
|
|
488
488
|
};
|
|
489
|
-
Be(t) ? this._bufferedByteCount += t.byteLength : this._bufferedByteCount += t.length, this._bufferedByteCount >= this._bufferSize && (n = new Promise((s,
|
|
490
|
-
i = s, o =
|
|
489
|
+
Be(t) ? this._bufferedByteCount += t.byteLength : this._bufferedByteCount += t.length, this._bufferedByteCount >= this._bufferSize && (n = new Promise((s, l) => {
|
|
490
|
+
i = s, o = l;
|
|
491
491
|
})), this._messages.push(new jr(t, this._totalMessageCount, i, o));
|
|
492
492
|
}
|
|
493
493
|
try {
|
|
@@ -582,13 +582,13 @@ class ht {
|
|
|
582
582
|
// create method that can be used by HubConnectionBuilder. An "internal" constructor would just
|
|
583
583
|
// be stripped away and the '.d.ts' file would have no constructor, which is interpreted as a
|
|
584
584
|
// public parameter-less constructor.
|
|
585
|
-
static create(e, t, n, i, o, s,
|
|
586
|
-
return new ht(e, t, n, i, o, s,
|
|
585
|
+
static create(e, t, n, i, o, s, l) {
|
|
586
|
+
return new ht(e, t, n, i, o, s, l);
|
|
587
587
|
}
|
|
588
|
-
constructor(e, t, n, i, o, s,
|
|
588
|
+
constructor(e, t, n, i, o, s, l) {
|
|
589
589
|
this._nextKeepAlive = 0, this._freezeEventListener = () => {
|
|
590
590
|
this._logger.log(y.Warning, "The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep");
|
|
591
|
-
}, B.isRequired(e, "connection"), B.isRequired(t, "logger"), B.isRequired(n, "protocol"), this.serverTimeoutInMilliseconds = o ?? Fr, this.keepAliveIntervalInMilliseconds = s ?? qr, this._statefulReconnectBufferSize =
|
|
591
|
+
}, B.isRequired(e, "connection"), B.isRequired(t, "logger"), B.isRequired(n, "protocol"), this.serverTimeoutInMilliseconds = o ?? Fr, this.keepAliveIntervalInMilliseconds = s ?? qr, this._statefulReconnectBufferSize = l ?? xr, this._logger = t, this._protocol = n, this.connection = e, this._reconnectPolicy = i, this._handshakeProtocol = new Br(), this.connection.onreceive = (h) => this._processIncomingData(h), this.connection.onclose = (h) => this._connectionClosed(h), this._callbacks = {}, this._methods = {}, this._closedCallbacks = [], this._reconnectingCallbacks = [], this._reconnectedCallbacks = [], this._invocationId = 0, this._receivedHandshakeResponse = !1, this._connectionState = R.Disconnected, this._connectionStarted = !1, this._cachedPingMessage = this._protocol.writeMessage({ type: S.Ping });
|
|
592
592
|
}
|
|
593
593
|
/** Indicates the state of the {@link HubConnection} to the server. */
|
|
594
594
|
get state() {
|
|
@@ -692,18 +692,18 @@ class ht {
|
|
|
692
692
|
stream(e, ...t) {
|
|
693
693
|
const [n, i] = this._replaceStreamingParams(t), o = this._createStreamInvocation(e, t, i);
|
|
694
694
|
let s;
|
|
695
|
-
const
|
|
696
|
-
return
|
|
695
|
+
const l = new Zn();
|
|
696
|
+
return l.cancelCallback = () => {
|
|
697
697
|
const h = this._createCancelInvocation(o.invocationId);
|
|
698
698
|
return delete this._callbacks[o.invocationId], s.then(() => this._sendWithProtocol(h));
|
|
699
699
|
}, this._callbacks[o.invocationId] = (h, c) => {
|
|
700
700
|
if (c) {
|
|
701
|
-
|
|
701
|
+
l.error(c);
|
|
702
702
|
return;
|
|
703
|
-
} else h && (h.type === S.Completion ? h.error ?
|
|
703
|
+
} else h && (h.type === S.Completion ? h.error ? l.error(new Error(h.error)) : l.complete() : l.next(h.item));
|
|
704
704
|
}, s = this._sendWithProtocol(o).catch((h) => {
|
|
705
|
-
|
|
706
|
-
}), this._launchStreams(n, s),
|
|
705
|
+
l.error(h), delete this._callbacks[o.invocationId];
|
|
706
|
+
}), this._launchStreams(n, s), l;
|
|
707
707
|
}
|
|
708
708
|
_sendMessage(e) {
|
|
709
709
|
return this._resetKeepAliveInterval(), this.connection.send(e);
|
|
@@ -741,12 +741,12 @@ class ht {
|
|
|
741
741
|
*/
|
|
742
742
|
invoke(e, ...t) {
|
|
743
743
|
const [n, i] = this._replaceStreamingParams(t), o = this._createInvocation(e, t, !1, i);
|
|
744
|
-
return new Promise((
|
|
745
|
-
this._callbacks[o.invocationId] = (a,
|
|
746
|
-
if (
|
|
747
|
-
h(
|
|
744
|
+
return new Promise((l, h) => {
|
|
745
|
+
this._callbacks[o.invocationId] = (a, u) => {
|
|
746
|
+
if (u) {
|
|
747
|
+
h(u);
|
|
748
748
|
return;
|
|
749
|
-
} else a && (a.type === S.Completion ? a.error ? h(new Error(a.error)) :
|
|
749
|
+
} else a && (a.type === S.Completion ? a.error ? h(new Error(a.error)) : l(a.result) : h(new Error(`Unexpected message type: ${a.type}`)));
|
|
750
750
|
};
|
|
751
751
|
const c = this._sendWithProtocol(o).catch((a) => {
|
|
752
752
|
h(a), delete this._callbacks[o.invocationId];
|
|
@@ -881,15 +881,15 @@ class ht {
|
|
|
881
881
|
return;
|
|
882
882
|
}
|
|
883
883
|
const i = n.slice(), o = !!e.invocationId;
|
|
884
|
-
let s,
|
|
884
|
+
let s, l, h;
|
|
885
885
|
for (const c of i)
|
|
886
886
|
try {
|
|
887
887
|
const a = s;
|
|
888
|
-
s = await c.apply(this, e.arguments), o && s && a && (this._logger.log(y.Error, `Multiple results provided for '${t}'. Sending error to server.`), h = this._createCompletionMessage(e.invocationId, "Client provided multiple results.", null)),
|
|
888
|
+
s = await c.apply(this, e.arguments), o && s && a && (this._logger.log(y.Error, `Multiple results provided for '${t}'. Sending error to server.`), h = this._createCompletionMessage(e.invocationId, "Client provided multiple results.", null)), l = void 0;
|
|
889
889
|
} catch (a) {
|
|
890
|
-
|
|
890
|
+
l = a, this._logger.log(y.Error, `A callback for the method '${t}' threw error '${a}'.`);
|
|
891
891
|
}
|
|
892
|
-
h ? await this._sendWithProtocol(h) : o ? (
|
|
892
|
+
h ? await this._sendWithProtocol(h) : o ? (l ? h = this._createCompletionMessage(e.invocationId, `${l}`, null) : s !== void 0 ? h = this._createCompletionMessage(e.invocationId, null, s) : (this._logger.log(y.Warning, `No result given for '${t}' method and invocation ID '${e.invocationId}'.`), h = this._createCompletionMessage(e.invocationId, "Client didn't provide a result.", null)), await this._sendWithProtocol(h)) : s && this._logger.log(y.Error, `Result given for '${t}' method but server is not expecting a result.`);
|
|
893
893
|
}
|
|
894
894
|
_connectionClosed(e) {
|
|
895
895
|
this._logger.log(y.Debug, `HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`), this._stopDuringStartError = this._stopDuringStartError || e || new Q("The underlying connection was closed before the hub handshake could complete."), this._handshakeResolver && this._handshakeResolver(), this._cancelCallbacksWithError(e || new Error("Invocation canceled due to the underlying connection being closed.")), this._cleanupTimeout(), this._cleanupPingTimer(), this._connectionState === R.Disconnecting ? this._completeClose(e) : this._connectionState === R.Connected && this._reconnectPolicy ? this._reconnect(e) : this._connectionState === R.Connected && this._completeClose(e);
|
|
@@ -1148,9 +1148,9 @@ class Vt {
|
|
|
1148
1148
|
withCredentials: this._options.withCredentials
|
|
1149
1149
|
};
|
|
1150
1150
|
t === j.Binary && (s.responseType = "arraybuffer");
|
|
1151
|
-
const
|
|
1152
|
-
this._logger.log(y.Trace, `(LongPolling transport) polling: ${
|
|
1153
|
-
const h = await this._httpClient.get(
|
|
1151
|
+
const l = `${e}&_=${Date.now()}`;
|
|
1152
|
+
this._logger.log(y.Trace, `(LongPolling transport) polling: ${l}.`);
|
|
1153
|
+
const h = await this._httpClient.get(l, s);
|
|
1154
1154
|
h.statusCode !== 200 ? (this._logger.log(y.Error, `(LongPolling transport) Unexpected response code: ${h.statusCode}.`), this._closeError = new fe(h.statusText || "", h.statusCode), this._running = !1) : this._running = !0, this._receiving = this._poll(this._url, s);
|
|
1155
1155
|
}
|
|
1156
1156
|
async _poll(e, t) {
|
|
@@ -1162,7 +1162,7 @@ class Vt {
|
|
|
1162
1162
|
const i = await this._httpClient.get(n, t);
|
|
1163
1163
|
i.statusCode === 204 ? (this._logger.log(y.Information, "(LongPolling transport) Poll terminated by server."), this._running = !1) : i.statusCode !== 200 ? (this._logger.log(y.Error, `(LongPolling transport) Unexpected response code: ${i.statusCode}.`), this._closeError = new fe(i.statusText || "", i.statusCode), this._running = !1) : i.content ? (this._logger.log(y.Trace, `(LongPolling transport) data received. ${Ze(i.content, this._options.logMessageContent)}.`), this.onreceive && this.onreceive(i.content)) : this._logger.log(y.Trace, "(LongPolling transport) Poll timed out, reissuing.");
|
|
1164
1164
|
} catch (n) {
|
|
1165
|
-
this._running ? n instanceof
|
|
1165
|
+
this._running ? n instanceof ut ? this._logger.log(y.Trace, "(LongPolling transport) Poll timed out, reissuing.") : (this._closeError = n, this._running = !1) : this._logger.log(y.Trace, `(LongPolling transport) Poll errored after shutdown: ${n.message}`);
|
|
1166
1166
|
}
|
|
1167
1167
|
} finally {
|
|
1168
1168
|
this._logger.log(y.Trace, "(LongPolling transport) Polling complete."), this.pollAborted || this._raiseOnClose();
|
|
@@ -1215,27 +1215,27 @@ class Wr {
|
|
|
1215
1215
|
if (A.isBrowser || A.isWebWorker)
|
|
1216
1216
|
s = new this._options.EventSource(e, { withCredentials: this._options.withCredentials });
|
|
1217
1217
|
else {
|
|
1218
|
-
const
|
|
1219
|
-
h.Cookie =
|
|
1218
|
+
const l = this._httpClient.getCookieString(e), h = {};
|
|
1219
|
+
h.Cookie = l;
|
|
1220
1220
|
const [c, a] = qe();
|
|
1221
1221
|
h[c] = a, s = new this._options.EventSource(e, { withCredentials: this._options.withCredentials, headers: { ...h, ...this._options.headers } });
|
|
1222
1222
|
}
|
|
1223
1223
|
try {
|
|
1224
|
-
s.onmessage = (
|
|
1224
|
+
s.onmessage = (l) => {
|
|
1225
1225
|
if (this.onreceive)
|
|
1226
1226
|
try {
|
|
1227
|
-
this._logger.log(y.Trace, `(SSE transport) data received. ${Ze(
|
|
1227
|
+
this._logger.log(y.Trace, `(SSE transport) data received. ${Ze(l.data, this._options.logMessageContent)}.`), this.onreceive(l.data);
|
|
1228
1228
|
} catch (h) {
|
|
1229
1229
|
this._close(h);
|
|
1230
1230
|
return;
|
|
1231
1231
|
}
|
|
1232
|
-
}, s.onerror = (
|
|
1232
|
+
}, s.onerror = (l) => {
|
|
1233
1233
|
o ? this._close() : i(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."));
|
|
1234
1234
|
}, s.onopen = () => {
|
|
1235
1235
|
this._logger.log(y.Information, `SSE connected to ${this._url}`), this._eventSource = s, o = !0, n();
|
|
1236
1236
|
};
|
|
1237
|
-
} catch (
|
|
1238
|
-
i(
|
|
1237
|
+
} catch (l) {
|
|
1238
|
+
i(l);
|
|
1239
1239
|
return;
|
|
1240
1240
|
}
|
|
1241
1241
|
});
|
|
@@ -1260,11 +1260,11 @@ class $r {
|
|
|
1260
1260
|
return this._accessTokenFactory && (n = await this._accessTokenFactory()), new Promise((i, o) => {
|
|
1261
1261
|
e = e.replace(/^http/, "ws");
|
|
1262
1262
|
let s;
|
|
1263
|
-
const
|
|
1263
|
+
const l = this._httpClient.getCookieString(e);
|
|
1264
1264
|
let h = !1;
|
|
1265
1265
|
if (A.isNode || A.isReactNative) {
|
|
1266
|
-
const c = {}, [a,
|
|
1267
|
-
c[a] =
|
|
1266
|
+
const c = {}, [a, u] = qe();
|
|
1267
|
+
c[a] = u, n && (c[De.Authorization] = `Bearer ${n}`), l && (c[De.Cookie] = l), s = new this._webSocketConstructor(e, void 0, {
|
|
1268
1268
|
headers: { ...c, ...this._headers }
|
|
1269
1269
|
});
|
|
1270
1270
|
} else
|
|
@@ -1411,11 +1411,11 @@ class Vr {
|
|
|
1411
1411
|
});
|
|
1412
1412
|
if (s.statusCode !== 200)
|
|
1413
1413
|
return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));
|
|
1414
|
-
const
|
|
1415
|
-
return (!
|
|
1414
|
+
const l = JSON.parse(s.content);
|
|
1415
|
+
return (!l.negotiateVersion || l.negotiateVersion < 1) && (l.connectionToken = l.connectionId), l.useStatefulReconnect && this._options._useStatefulReconnect !== !0 ? Promise.reject(new Ht("Client didn't negotiate Stateful Reconnect but the server did.")) : l;
|
|
1416
1416
|
} catch (s) {
|
|
1417
|
-
let
|
|
1418
|
-
return s instanceof fe && s.statusCode === 404 && (
|
|
1417
|
+
let l = "Failed to complete negotiation with the server: " + s;
|
|
1418
|
+
return s instanceof fe && s.statusCode === 404 && (l = l + " Either this is not a SignalR endpoint or there is a proxy blocking the connection."), this._logger.log(y.Error, l), Promise.reject(new Ht(l));
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
1421
|
_createConnectUrl(e, t) {
|
|
@@ -1427,9 +1427,9 @@ class Vr {
|
|
|
1427
1427
|
this._logger.log(y.Debug, "Connection was provided an instance of ITransport, using that directly."), this.transport = t, await this._startTransport(o, i), this.connectionId = n.connectionId;
|
|
1428
1428
|
return;
|
|
1429
1429
|
}
|
|
1430
|
-
const s = [],
|
|
1430
|
+
const s = [], l = n.availableTransports || [];
|
|
1431
1431
|
let h = n;
|
|
1432
|
-
for (const c of
|
|
1432
|
+
for (const c of l) {
|
|
1433
1433
|
const a = this._resolveTransportOrError(c, t, i, h?.useStatefulReconnect === !0);
|
|
1434
1434
|
if (a instanceof Error)
|
|
1435
1435
|
s.push(`${c.transport} failed:`), s.push(a);
|
|
@@ -1437,16 +1437,16 @@ class Vr {
|
|
|
1437
1437
|
if (this.transport = a, !h) {
|
|
1438
1438
|
try {
|
|
1439
1439
|
h = await this._getNegotiationResponse(e);
|
|
1440
|
-
} catch (
|
|
1441
|
-
return Promise.reject(
|
|
1440
|
+
} catch (u) {
|
|
1441
|
+
return Promise.reject(u);
|
|
1442
1442
|
}
|
|
1443
1443
|
o = this._createConnectUrl(e, h.connectionToken);
|
|
1444
1444
|
}
|
|
1445
1445
|
try {
|
|
1446
1446
|
await this._startTransport(o, i), this.connectionId = h.connectionId;
|
|
1447
1447
|
return;
|
|
1448
|
-
} catch (
|
|
1449
|
-
if (this._logger.log(y.Error, `Failed to start the transport '${c.transport}': ${
|
|
1448
|
+
} catch (u) {
|
|
1449
|
+
if (this._logger.log(y.Error, `Failed to start the transport '${c.transport}': ${u}`), h = void 0, s.push(new Cr(`${c.transport} failed: ${u}`, D[c.transport])), this._connectionState !== "Connecting") {
|
|
1450
1450
|
const d = "Failed to select transport before stop() was called.";
|
|
1451
1451
|
return this._logger.log(y.Debug, d), Promise.reject(new Q(d));
|
|
1452
1452
|
}
|
|
@@ -1492,14 +1492,14 @@ class Vr {
|
|
|
1492
1492
|
if (o == null)
|
|
1493
1493
|
return this._logger.log(y.Debug, `Skipping transport '${e.transport}' because it is not supported by this client.`), new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);
|
|
1494
1494
|
if (Kr(t, o))
|
|
1495
|
-
if (e.transferFormats.map((
|
|
1495
|
+
if (e.transferFormats.map((l) => j[l]).indexOf(n) >= 0) {
|
|
1496
1496
|
if (o === D.WebSockets && !this._options.WebSocket || o === D.ServerSentEvents && !this._options.EventSource)
|
|
1497
1497
|
return this._logger.log(y.Debug, `Skipping transport '${D[o]}' because it is not supported in your environment.'`), new br(`'${D[o]}' is not supported in your environment.`, o);
|
|
1498
1498
|
this._logger.log(y.Debug, `Selecting transport '${D[o]}'.`);
|
|
1499
1499
|
try {
|
|
1500
1500
|
return this.features.reconnect = o === D.WebSockets ? i : void 0, this._constructTransport(o);
|
|
1501
|
-
} catch (
|
|
1502
|
-
return
|
|
1501
|
+
} catch (l) {
|
|
1502
|
+
return l;
|
|
1503
1503
|
}
|
|
1504
1504
|
} else
|
|
1505
1505
|
return this._logger.log(y.Debug, `Skipping transport '${D[o]}' because it does not support the requested transfer format '${j[n]}'.`), new Error(`'${D[o]}' does not support ${j[n]}.`);
|
|
@@ -1702,9 +1702,9 @@ class Yr {
|
|
|
1702
1702
|
this.logger = e;
|
|
1703
1703
|
else if (typeof e == "string") {
|
|
1704
1704
|
const t = Jr(e);
|
|
1705
|
-
this.logger = new
|
|
1705
|
+
this.logger = new lt(t);
|
|
1706
1706
|
} else
|
|
1707
|
-
this.logger = new
|
|
1707
|
+
this.logger = new lt(e);
|
|
1708
1708
|
return this;
|
|
1709
1709
|
}
|
|
1710
1710
|
withUrl(e, t) {
|
|
@@ -1785,7 +1785,7 @@ const Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1785
1785
|
},
|
|
1786
1786
|
NullLogger: Fe,
|
|
1787
1787
|
Subject: Zn,
|
|
1788
|
-
TimeoutError:
|
|
1788
|
+
TimeoutError: ut,
|
|
1789
1789
|
get TransferFormat() {
|
|
1790
1790
|
return j;
|
|
1791
1791
|
},
|
|
@@ -1803,25 +1803,25 @@ function se() {
|
|
|
1803
1803
|
function i(c, a) {
|
|
1804
1804
|
if (c in t) {
|
|
1805
1805
|
if (typeof a == "function") {
|
|
1806
|
-
const
|
|
1807
|
-
t[c].splice(
|
|
1806
|
+
const u = t[c].indexOf(a);
|
|
1807
|
+
t[c].splice(u, 1);
|
|
1808
1808
|
}
|
|
1809
1809
|
(typeof a != "function" || t[c].length === 0) && delete t[c];
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
1812
1812
|
function o(c, a) {
|
|
1813
|
-
c in t && t[c].forEach((
|
|
1813
|
+
c in t && t[c].forEach((u) => u(a));
|
|
1814
1814
|
}
|
|
1815
1815
|
function s() {
|
|
1816
1816
|
const c = new BroadcastChannel("hermes");
|
|
1817
|
-
return c.onmessage = (
|
|
1818
|
-
(v === "all" || v === "other") && c.postMessage({ topic:
|
|
1817
|
+
return c.onmessage = (u) => o(u.data.topic, u.data.data), { on: n, off: i, send: (u, d, v = "other") => {
|
|
1818
|
+
(v === "all" || v === "other") && c.postMessage({ topic: u, data: d }), (v === "all" || v === "current") && o(u, d);
|
|
1819
1819
|
} };
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1822
|
-
const c = window.localStorage, a = "__hermes:",
|
|
1821
|
+
function l() {
|
|
1822
|
+
const c = window.localStorage, a = "__hermes:", u = {}, d = (v, _, g = "other") => {
|
|
1823
1823
|
const f = a + v;
|
|
1824
|
-
c.getItem(f) === null || c.getItem(f) === "" ? ((g === "all" || g === "other") && (c.setItem(f, JSON.stringify(_)), c.removeItem(f)), (g === "all" || g === "current") && o(v, _)) : (f in
|
|
1824
|
+
c.getItem(f) === null || c.getItem(f) === "" ? ((g === "all" || g === "other") && (c.setItem(f, JSON.stringify(_)), c.removeItem(f)), (g === "all" || g === "current") && o(v, _)) : (f in u || (u[f] = []), u[f].push(_));
|
|
1825
1825
|
};
|
|
1826
1826
|
return window.addEventListener("storage", (v) => {
|
|
1827
1827
|
if (v.key && v.key.indexOf(a) === 0 && (v.oldValue === null || v.oldValue === "")) {
|
|
@@ -1831,20 +1831,20 @@ function se() {
|
|
|
1831
1831
|
}), window.addEventListener("storage", (v) => {
|
|
1832
1832
|
if (v.key && v.key.indexOf(a) === 0 && (v.newValue === null || v.newValue === "")) {
|
|
1833
1833
|
const _ = v.key.replace(a, "");
|
|
1834
|
-
_ in
|
|
1834
|
+
_ in u && (d(_, u[_].shift()), u[_].length === 0 && delete u[_]);
|
|
1835
1835
|
}
|
|
1836
1836
|
}), { on: n, off: i, send: d };
|
|
1837
1837
|
}
|
|
1838
1838
|
function h() {
|
|
1839
|
-
return { on: n, off: i, send: (a,
|
|
1840
|
-
d !== "other" && (d === "all" || d === "current") && o(a,
|
|
1839
|
+
return { on: n, off: i, send: (a, u, d = "other") => {
|
|
1840
|
+
d !== "other" && (d === "all" || d === "current") && o(a, u);
|
|
1841
1841
|
} };
|
|
1842
1842
|
}
|
|
1843
1843
|
if (typeof window < "u") {
|
|
1844
1844
|
if ("BroadcastChannel" in window)
|
|
1845
1845
|
return s();
|
|
1846
1846
|
if ("localStorage" in window)
|
|
1847
|
-
return
|
|
1847
|
+
return l();
|
|
1848
1848
|
}
|
|
1849
1849
|
return h();
|
|
1850
1850
|
}
|
|
@@ -1855,26 +1855,26 @@ var K = {}, Xt;
|
|
|
1855
1855
|
function J() {
|
|
1856
1856
|
if (Xt) return K;
|
|
1857
1857
|
Xt = 1;
|
|
1858
|
-
var r = K && K.__importDefault || function(
|
|
1859
|
-
return
|
|
1858
|
+
var r = K && K.__importDefault || function(l) {
|
|
1859
|
+
return l && l.__esModule ? l : { default: l };
|
|
1860
1860
|
};
|
|
1861
1861
|
Object.defineProperty(K, "__esModule", { value: !0 }), K.__DEV__ = K.useEvent = K.sendWithHermes = K.removeDuplicates = void 0;
|
|
1862
1862
|
const e = r(se()), t = ie, n = process.env.NODE_ENV !== "production";
|
|
1863
1863
|
K.__DEV__ = n;
|
|
1864
|
-
function i(
|
|
1865
|
-
const c = new Set(
|
|
1864
|
+
function i(l) {
|
|
1865
|
+
const c = new Set(l).values();
|
|
1866
1866
|
return Array.from(c);
|
|
1867
1867
|
}
|
|
1868
1868
|
K.removeDuplicates = i;
|
|
1869
|
-
function o(
|
|
1870
|
-
e.default.send(
|
|
1869
|
+
function o(l, h, c) {
|
|
1870
|
+
e.default.send(l, h, c ? "all" : "current");
|
|
1871
1871
|
}
|
|
1872
1872
|
K.sendWithHermes = o;
|
|
1873
|
-
function s(
|
|
1874
|
-
const h = (0, t.useRef)(
|
|
1875
|
-
h.current !==
|
|
1873
|
+
function s(l) {
|
|
1874
|
+
const h = (0, t.useRef)(l);
|
|
1875
|
+
h.current !== l && (h.current = l);
|
|
1876
1876
|
const c = (0, t.useCallback)((...a) => h.current(...a), []);
|
|
1877
|
-
return
|
|
1877
|
+
return l && c;
|
|
1878
1878
|
}
|
|
1879
1879
|
return K.useEvent = s, K;
|
|
1880
1880
|
}
|
|
@@ -1888,16 +1888,16 @@ function Zr() {
|
|
|
1888
1888
|
Object.defineProperty(ge, "__esModule", { value: !0 }), ge.createUseSignalREffect = void 0;
|
|
1889
1889
|
const e = r(se()), t = ie, n = J();
|
|
1890
1890
|
function i(o) {
|
|
1891
|
-
return (
|
|
1891
|
+
return (l, h) => {
|
|
1892
1892
|
const c = (0, n.useEvent)(h);
|
|
1893
1893
|
(0, t.useEffect)(() => {
|
|
1894
1894
|
var a;
|
|
1895
|
-
function
|
|
1895
|
+
function u(d) {
|
|
1896
1896
|
c(...d);
|
|
1897
1897
|
}
|
|
1898
|
-
return (a = o.on) === null || a === void 0 || a.call(o,
|
|
1898
|
+
return (a = o.on) === null || a === void 0 || a.call(o, l), e.default.on(l, u), () => {
|
|
1899
1899
|
var d;
|
|
1900
|
-
(d = o.off) === null || d === void 0 || d.call(o,
|
|
1900
|
+
(d = o.off) === null || d === void 0 || d.call(o, l), e.default.off(l, u);
|
|
1901
1901
|
};
|
|
1902
1902
|
}, []);
|
|
1903
1903
|
};
|
|
@@ -1919,9 +1919,9 @@ function Bt() {
|
|
|
1919
1919
|
})(function() {
|
|
1920
1920
|
function t() {
|
|
1921
1921
|
for (var o = 0, s = {}; o < arguments.length; o++) {
|
|
1922
|
-
var
|
|
1923
|
-
for (var h in
|
|
1924
|
-
s[h] =
|
|
1922
|
+
var l = arguments[o];
|
|
1923
|
+
for (var h in l)
|
|
1924
|
+
s[h] = l[h];
|
|
1925
1925
|
}
|
|
1926
1926
|
return s;
|
|
1927
1927
|
}
|
|
@@ -1931,11 +1931,11 @@ function Bt() {
|
|
|
1931
1931
|
function i(o) {
|
|
1932
1932
|
function s() {
|
|
1933
1933
|
}
|
|
1934
|
-
function
|
|
1934
|
+
function l(c, a, u) {
|
|
1935
1935
|
if (!(typeof document > "u")) {
|
|
1936
|
-
|
|
1936
|
+
u = t({
|
|
1937
1937
|
path: "/"
|
|
1938
|
-
}, s.defaults,
|
|
1938
|
+
}, s.defaults, u), typeof u.expires == "number" && (u.expires = new Date(/* @__PURE__ */ new Date() * 1 + u.expires * 864e5)), u.expires = u.expires ? u.expires.toUTCString() : "";
|
|
1939
1939
|
try {
|
|
1940
1940
|
var d = JSON.stringify(a);
|
|
1941
1941
|
/^[\{\[]/.test(d) && (a = d);
|
|
@@ -1943,14 +1943,14 @@ function Bt() {
|
|
|
1943
1943
|
}
|
|
1944
1944
|
a = o.write ? o.write(a, c) : encodeURIComponent(String(a)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), c = encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
|
|
1945
1945
|
var v = "";
|
|
1946
|
-
for (var _ in
|
|
1947
|
-
|
|
1946
|
+
for (var _ in u)
|
|
1947
|
+
u[_] && (v += "; " + _, u[_] !== !0 && (v += "=" + u[_].split(";")[0]));
|
|
1948
1948
|
return document.cookie = c + "=" + a + v;
|
|
1949
1949
|
}
|
|
1950
1950
|
}
|
|
1951
1951
|
function h(c, a) {
|
|
1952
1952
|
if (!(typeof document > "u")) {
|
|
1953
|
-
for (var
|
|
1953
|
+
for (var u = {}, d = document.cookie ? document.cookie.split("; ") : [], v = 0; v < d.length; v++) {
|
|
1954
1954
|
var _ = d[v].split("="), g = _.slice(1).join("=");
|
|
1955
1955
|
!a && g.charAt(0) === '"' && (g = g.slice(1, -1));
|
|
1956
1956
|
try {
|
|
@@ -1960,15 +1960,15 @@ function Bt() {
|
|
|
1960
1960
|
g = JSON.parse(g);
|
|
1961
1961
|
} catch {
|
|
1962
1962
|
}
|
|
1963
|
-
if (
|
|
1963
|
+
if (u[f] = g, c === f)
|
|
1964
1964
|
break;
|
|
1965
1965
|
} catch {
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
return c ?
|
|
1968
|
+
return c ? u[c] : u;
|
|
1969
1969
|
}
|
|
1970
1970
|
}
|
|
1971
|
-
return s.set =
|
|
1971
|
+
return s.set = l, s.get = function(c) {
|
|
1972
1972
|
return h(
|
|
1973
1973
|
c,
|
|
1974
1974
|
!1
|
|
@@ -1981,7 +1981,7 @@ function Bt() {
|
|
|
1981
1981
|
/* read as json */
|
|
1982
1982
|
);
|
|
1983
1983
|
}, s.remove = function(c, a) {
|
|
1984
|
-
|
|
1984
|
+
l(c, "", t(a, {
|
|
1985
1985
|
expires: -1
|
|
1986
1986
|
}));
|
|
1987
1987
|
}, s.defaults = {}, s.withConverter = i, s;
|
|
@@ -2014,7 +2014,7 @@ function eo() {
|
|
|
2014
2014
|
return a && a.__esModule ? a : { default: a };
|
|
2015
2015
|
};
|
|
2016
2016
|
Object.defineProperty(ve, "__esModule", { value: !0 }), ve.providerFactory = void 0;
|
|
2017
|
-
const e = r(se()), t = ie, n = r(Bt()), i = nr(), o = J(), s = "IS_SIGNAL_R_CONNECTED",
|
|
2017
|
+
const e = r(se()), t = ie, n = r(Bt()), i = nr(), o = J(), s = "IS_SIGNAL_R_CONNECTED", l = "KEY_LAST_CONNECTION_TIME";
|
|
2018
2018
|
function h(a) {
|
|
2019
2019
|
return ({ url: d, connectEnabled: v = !0, automaticReconnect: _ = !0, children: g, dependencies: f = [], accessTokenFactory: p, onError: m, onOpen: b, onReconnect: w, onClosed: C, onBeforeClose: E, logger: P, ...F }) => {
|
|
2020
2020
|
const I = (0, o.useEvent)(m), k = (0, o.useEvent)(p), O = (0, t.useRef)(() => {
|
|
@@ -2031,7 +2031,7 @@ function eo() {
|
|
|
2031
2031
|
T.onreconnecting((V) => I?.(V)), T.onreconnected(() => w?.(T)), a.connection = T, a.reOn(), T.onclose((V) => {
|
|
2032
2032
|
C?.(V);
|
|
2033
2033
|
});
|
|
2034
|
-
let N = Number(n.default.get(
|
|
2034
|
+
let N = Number(n.default.get(l)) || null, $ = null;
|
|
2035
2035
|
e.default.on(s, (V) => {
|
|
2036
2036
|
if (!V) {
|
|
2037
2037
|
N = null, $ = null, gt();
|
|
@@ -2077,13 +2077,13 @@ function eo() {
|
|
|
2077
2077
|
ve.providerFactory = h;
|
|
2078
2078
|
function c(a) {
|
|
2079
2079
|
if (!a) {
|
|
2080
|
-
e.default.send(s, ""), n.default.set(
|
|
2080
|
+
e.default.send(s, ""), n.default.set(l, "");
|
|
2081
2081
|
return;
|
|
2082
2082
|
}
|
|
2083
2083
|
e.default.send(s, a);
|
|
2084
|
-
const
|
|
2085
|
-
|
|
2086
|
-
expires:
|
|
2084
|
+
const u = /* @__PURE__ */ new Date();
|
|
2085
|
+
u.setSeconds(u.getSeconds() + 10), n.default.set(l, Date.now().toString(), {
|
|
2086
|
+
expires: u,
|
|
2087
2087
|
path: "/"
|
|
2088
2088
|
});
|
|
2089
2089
|
}
|
|
@@ -2114,15 +2114,15 @@ function ro(r, e, t) {
|
|
|
2114
2114
|
r = r || {};
|
|
2115
2115
|
var o = r.node || Zt, s = r.clockseq !== void 0 ? r.clockseq : wt;
|
|
2116
2116
|
if (o == null || s == null) {
|
|
2117
|
-
var
|
|
2118
|
-
o == null && (o = Zt = [
|
|
2117
|
+
var l = r.random || (r.rng || rr)();
|
|
2118
|
+
o == null && (o = Zt = [l[0] | 1, l[1], l[2], l[3], l[4], l[5]]), s == null && (s = wt = (l[6] << 8 | l[7]) & 16383);
|
|
2119
2119
|
}
|
|
2120
2120
|
var h = r.msecs !== void 0 ? r.msecs : Date.now(), c = r.nsecs !== void 0 ? r.nsecs : St + 1, a = h - Ct + (c - St) / 1e4;
|
|
2121
2121
|
if (a < 0 && r.clockseq === void 0 && (s = s + 1 & 16383), (a < 0 || h > Ct) && r.nsecs === void 0 && (c = 0), c >= 1e4)
|
|
2122
2122
|
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
2123
2123
|
Ct = h, St = c, wt = s, h += 122192928e5;
|
|
2124
|
-
var
|
|
2125
|
-
i[n++] =
|
|
2124
|
+
var u = ((h & 268435455) * 1e4 + c) % 4294967296;
|
|
2125
|
+
i[n++] = u >>> 24 & 255, i[n++] = u >>> 16 & 255, i[n++] = u >>> 8 & 255, i[n++] = u & 255;
|
|
2126
2126
|
var d = h / 4294967296 * 1e4 & 268435455;
|
|
2127
2127
|
i[n++] = d >>> 8 & 255, i[n++] = d & 255, i[n++] = d >>> 24 & 15 | 16, i[n++] = d >>> 16 & 255, i[n++] = s >>> 8 | 128, i[n++] = s & 255;
|
|
2128
2128
|
for (var v = 0; v < 6; ++v)
|
|
@@ -2143,14 +2143,14 @@ function oo(r) {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
var io = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", so = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
2145
2145
|
function ir(r, e, t) {
|
|
2146
|
-
function n(i, o, s,
|
|
2146
|
+
function n(i, o, s, l) {
|
|
2147
2147
|
if (typeof i == "string" && (i = oo(i)), typeof o == "string" && (o = or(o)), o.length !== 16)
|
|
2148
2148
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
2149
2149
|
var h = new Uint8Array(16 + i.length);
|
|
2150
2150
|
if (h.set(o), h.set(i, o.length), h = t(h), h[6] = h[6] & 15 | e, h[8] = h[8] & 63 | 128, s) {
|
|
2151
|
-
|
|
2151
|
+
l = l || 0;
|
|
2152
2152
|
for (var c = 0; c < 16; ++c)
|
|
2153
|
-
s[
|
|
2153
|
+
s[l + c] = h[c];
|
|
2154
2154
|
return s;
|
|
2155
2155
|
}
|
|
2156
2156
|
return dt(h);
|
|
@@ -2168,7 +2168,7 @@ function co(r) {
|
|
|
2168
2168
|
for (var t = 0; t < e.length; ++t)
|
|
2169
2169
|
r[t] = e.charCodeAt(t);
|
|
2170
2170
|
}
|
|
2171
|
-
return ao(uo(
|
|
2171
|
+
return ao(lo(uo(r), r.length * 8));
|
|
2172
2172
|
}
|
|
2173
2173
|
function ao(r) {
|
|
2174
2174
|
for (var e = [], t = r.length * 32, n = "0123456789abcdef", i = 0; i < t; i += 8) {
|
|
@@ -2180,15 +2180,15 @@ function ao(r) {
|
|
|
2180
2180
|
function sr(r) {
|
|
2181
2181
|
return (r + 64 >>> 9 << 4) + 14 + 1;
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function lo(r, e) {
|
|
2184
2184
|
r[e >> 5] |= 128 << e % 32, r[sr(e) - 1] = e;
|
|
2185
2185
|
for (var t = 1732584193, n = -271733879, i = -1732584194, o = 271733878, s = 0; s < r.length; s += 16) {
|
|
2186
|
-
var
|
|
2187
|
-
t = q(t, n, i, o, r[s], 7, -680876936), o = q(o, t, n, i, r[s + 1], 12, -389564586), i = q(i, o, t, n, r[s + 2], 17, 606105819), n = q(n, i, o, t, r[s + 3], 22, -1044525330), t = q(t, n, i, o, r[s + 4], 7, -176418897), o = q(o, t, n, i, r[s + 5], 12, 1200080426), i = q(i, o, t, n, r[s + 6], 17, -1473231341), n = q(n, i, o, t, r[s + 7], 22, -45705983), t = q(t, n, i, o, r[s + 8], 7, 1770035416), o = q(o, t, n, i, r[s + 9], 12, -1958414417), i = q(i, o, t, n, r[s + 10], 17, -42063), n = q(n, i, o, t, r[s + 11], 22, -1990404162), t = q(t, n, i, o, r[s + 12], 7, 1804603682), o = q(o, t, n, i, r[s + 13], 12, -40341101), i = q(i, o, t, n, r[s + 14], 17, -1502002290), n = q(n, i, o, t, r[s + 15], 22, 1236535329), t = x(t, n, i, o, r[s + 1], 5, -165796510), o = x(o, t, n, i, r[s + 6], 9, -1069501632), i = x(i, o, t, n, r[s + 11], 14, 643717713), n = x(n, i, o, t, r[s], 20, -373897302), t = x(t, n, i, o, r[s + 5], 5, -701558691), o = x(o, t, n, i, r[s + 10], 9, 38016083), i = x(i, o, t, n, r[s + 15], 14, -660478335), n = x(n, i, o, t, r[s + 4], 20, -405537848), t = x(t, n, i, o, r[s + 9], 5, 568446438), o = x(o, t, n, i, r[s + 14], 9, -1019803690), i = x(i, o, t, n, r[s + 3], 14, -187363961), n = x(n, i, o, t, r[s + 8], 20, 1163531501), t = x(t, n, i, o, r[s + 13], 5, -1444681467), o = x(o, t, n, i, r[s + 2], 9, -51403784), i = x(i, o, t, n, r[s + 7], 14, 1735328473), n = x(n, i, o, t, r[s + 12], 20, -1926607734), t = L(t, n, i, o, r[s + 5], 4, -378558), o = L(o, t, n, i, r[s + 8], 11, -2022574463), i = L(i, o, t, n, r[s + 11], 16, 1839030562), n = L(n, i, o, t, r[s + 14], 23, -35309556), t = L(t, n, i, o, r[s + 1], 4, -1530992060), o = L(o, t, n, i, r[s + 4], 11, 1272893353), i = L(i, o, t, n, r[s + 7], 16, -155497632), n = L(n, i, o, t, r[s + 10], 23, -1094730640), t = L(t, n, i, o, r[s + 13], 4, 681279174), o = L(o, t, n, i, r[s], 11, -358537222), i = L(i, o, t, n, r[s + 3], 16, -722521979), n = L(n, i, o, t, r[s + 6], 23, 76029189), t = L(t, n, i, o, r[s + 9], 4, -640364487), o = L(o, t, n, i, r[s + 12], 11, -421815835), i = L(i, o, t, n, r[s + 15], 16, 530742520), n = L(n, i, o, t, r[s + 2], 23, -995338651), t = U(t, n, i, o, r[s], 6, -198630844), o = U(o, t, n, i, r[s + 7], 10, 1126891415), i = U(i, o, t, n, r[s + 14], 15, -1416354905), n = U(n, i, o, t, r[s + 5], 21, -57434055), t = U(t, n, i, o, r[s + 12], 6, 1700485571), o = U(o, t, n, i, r[s + 3], 10, -1894986606), i = U(i, o, t, n, r[s + 10], 15, -1051523), n = U(n, i, o, t, r[s + 1], 21, -2054922799), t = U(t, n, i, o, r[s + 8], 6, 1873313359), o = U(o, t, n, i, r[s + 15], 10, -30611744), i = U(i, o, t, n, r[s + 6], 15, -1560198380), n = U(n, i, o, t, r[s + 13], 21, 1309151649), t = U(t, n, i, o, r[s + 4], 6, -145523070), o = U(o, t, n, i, r[s + 11], 10, -1120210379), i = U(i, o, t, n, r[s + 2], 15, 718787259), n = U(n, i, o, t, r[s + 9], 21, -343485551), t = he(t,
|
|
2186
|
+
var l = t, h = n, c = i, a = o;
|
|
2187
|
+
t = q(t, n, i, o, r[s], 7, -680876936), o = q(o, t, n, i, r[s + 1], 12, -389564586), i = q(i, o, t, n, r[s + 2], 17, 606105819), n = q(n, i, o, t, r[s + 3], 22, -1044525330), t = q(t, n, i, o, r[s + 4], 7, -176418897), o = q(o, t, n, i, r[s + 5], 12, 1200080426), i = q(i, o, t, n, r[s + 6], 17, -1473231341), n = q(n, i, o, t, r[s + 7], 22, -45705983), t = q(t, n, i, o, r[s + 8], 7, 1770035416), o = q(o, t, n, i, r[s + 9], 12, -1958414417), i = q(i, o, t, n, r[s + 10], 17, -42063), n = q(n, i, o, t, r[s + 11], 22, -1990404162), t = q(t, n, i, o, r[s + 12], 7, 1804603682), o = q(o, t, n, i, r[s + 13], 12, -40341101), i = q(i, o, t, n, r[s + 14], 17, -1502002290), n = q(n, i, o, t, r[s + 15], 22, 1236535329), t = x(t, n, i, o, r[s + 1], 5, -165796510), o = x(o, t, n, i, r[s + 6], 9, -1069501632), i = x(i, o, t, n, r[s + 11], 14, 643717713), n = x(n, i, o, t, r[s], 20, -373897302), t = x(t, n, i, o, r[s + 5], 5, -701558691), o = x(o, t, n, i, r[s + 10], 9, 38016083), i = x(i, o, t, n, r[s + 15], 14, -660478335), n = x(n, i, o, t, r[s + 4], 20, -405537848), t = x(t, n, i, o, r[s + 9], 5, 568446438), o = x(o, t, n, i, r[s + 14], 9, -1019803690), i = x(i, o, t, n, r[s + 3], 14, -187363961), n = x(n, i, o, t, r[s + 8], 20, 1163531501), t = x(t, n, i, o, r[s + 13], 5, -1444681467), o = x(o, t, n, i, r[s + 2], 9, -51403784), i = x(i, o, t, n, r[s + 7], 14, 1735328473), n = x(n, i, o, t, r[s + 12], 20, -1926607734), t = L(t, n, i, o, r[s + 5], 4, -378558), o = L(o, t, n, i, r[s + 8], 11, -2022574463), i = L(i, o, t, n, r[s + 11], 16, 1839030562), n = L(n, i, o, t, r[s + 14], 23, -35309556), t = L(t, n, i, o, r[s + 1], 4, -1530992060), o = L(o, t, n, i, r[s + 4], 11, 1272893353), i = L(i, o, t, n, r[s + 7], 16, -155497632), n = L(n, i, o, t, r[s + 10], 23, -1094730640), t = L(t, n, i, o, r[s + 13], 4, 681279174), o = L(o, t, n, i, r[s], 11, -358537222), i = L(i, o, t, n, r[s + 3], 16, -722521979), n = L(n, i, o, t, r[s + 6], 23, 76029189), t = L(t, n, i, o, r[s + 9], 4, -640364487), o = L(o, t, n, i, r[s + 12], 11, -421815835), i = L(i, o, t, n, r[s + 15], 16, 530742520), n = L(n, i, o, t, r[s + 2], 23, -995338651), t = U(t, n, i, o, r[s], 6, -198630844), o = U(o, t, n, i, r[s + 7], 10, 1126891415), i = U(i, o, t, n, r[s + 14], 15, -1416354905), n = U(n, i, o, t, r[s + 5], 21, -57434055), t = U(t, n, i, o, r[s + 12], 6, 1700485571), o = U(o, t, n, i, r[s + 3], 10, -1894986606), i = U(i, o, t, n, r[s + 10], 15, -1051523), n = U(n, i, o, t, r[s + 1], 21, -2054922799), t = U(t, n, i, o, r[s + 8], 6, 1873313359), o = U(o, t, n, i, r[s + 15], 10, -30611744), i = U(i, o, t, n, r[s + 6], 15, -1560198380), n = U(n, i, o, t, r[s + 13], 21, 1309151649), t = U(t, n, i, o, r[s + 4], 6, -145523070), o = U(o, t, n, i, r[s + 11], 10, -1120210379), i = U(i, o, t, n, r[s + 2], 15, 718787259), n = U(n, i, o, t, r[s + 9], 21, -343485551), t = he(t, l), n = he(n, h), i = he(i, c), o = he(o, a);
|
|
2188
2188
|
}
|
|
2189
2189
|
return [t, n, i, o];
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function uo(r) {
|
|
2192
2192
|
if (r.length === 0)
|
|
2193
2193
|
return [];
|
|
2194
2194
|
for (var e = r.length * 8, t = new Uint32Array(sr(e)), n = 0; n < e; n += 8)
|
|
@@ -2253,15 +2253,15 @@ function go(r) {
|
|
|
2253
2253
|
r.push(n.charCodeAt(i));
|
|
2254
2254
|
} else Array.isArray(r) || (r = Array.prototype.slice.call(r));
|
|
2255
2255
|
r.push(128);
|
|
2256
|
-
for (var o = r.length / 4 + 2, s = Math.ceil(o / 16),
|
|
2256
|
+
for (var o = r.length / 4 + 2, s = Math.ceil(o / 16), l = new Array(s), h = 0; h < s; ++h) {
|
|
2257
2257
|
for (var c = new Uint32Array(16), a = 0; a < 16; ++a)
|
|
2258
2258
|
c[a] = r[h * 64 + a * 4] << 24 | r[h * 64 + a * 4 + 1] << 16 | r[h * 64 + a * 4 + 2] << 8 | r[h * 64 + a * 4 + 3];
|
|
2259
|
-
|
|
2259
|
+
l[h] = c;
|
|
2260
2260
|
}
|
|
2261
|
-
|
|
2262
|
-
for (var
|
|
2261
|
+
l[s - 1][14] = (r.length - 1) * 8 / Math.pow(2, 32), l[s - 1][14] = Math.floor(l[s - 1][14]), l[s - 1][15] = (r.length - 1) * 8 & 4294967295;
|
|
2262
|
+
for (var u = 0; u < s; ++u) {
|
|
2263
2263
|
for (var d = new Uint32Array(80), v = 0; v < 16; ++v)
|
|
2264
|
-
d[v] = u
|
|
2264
|
+
d[v] = l[u][v];
|
|
2265
2265
|
for (var _ = 16; _ < 80; ++_)
|
|
2266
2266
|
d[_] = kt(d[_ - 3] ^ d[_ - 8] ^ d[_ - 14] ^ d[_ - 16], 1);
|
|
2267
2267
|
for (var g = t[0], f = t[1], p = t[2], m = t[3], b = t[4], w = 0; w < 80; ++w) {
|
|
@@ -2297,11 +2297,11 @@ function Co() {
|
|
|
2297
2297
|
en = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.providerNativeFactory = void 0;
|
|
2298
2298
|
const r = ie, e = J(), t = nr();
|
|
2299
2299
|
function n(i) {
|
|
2300
|
-
return ({ url: s, connectEnabled:
|
|
2301
|
-
const m = (0, e.useEvent)(d), b = (0, e.useEvent)(
|
|
2300
|
+
return ({ url: s, connectEnabled: l = !0, automaticReconnect: h = !0, children: c, dependencies: a = [], accessTokenFactory: u, onError: d, onOpen: v, onClosed: _, onReconnect: g, onBeforeClose: f, ...p }) => {
|
|
2301
|
+
const m = (0, e.useEvent)(d), b = (0, e.useEvent)(u), w = (0, r.useRef)(() => {
|
|
2302
2302
|
});
|
|
2303
2303
|
function C() {
|
|
2304
|
-
if (!
|
|
2304
|
+
if (!l)
|
|
2305
2305
|
return;
|
|
2306
2306
|
const P = (0, t.createConnection)(s, {
|
|
2307
2307
|
accessTokenFactory: () => b?.() || "",
|
|
@@ -2330,7 +2330,7 @@ function Co() {
|
|
|
2330
2330
|
const E = (0, r.useRef)(!1);
|
|
2331
2331
|
return (0, r.useEffect)(() => (E.current && C(), E.current = !0, () => {
|
|
2332
2332
|
w.current();
|
|
2333
|
-
}), [
|
|
2333
|
+
}), [l, s, ...a]), c;
|
|
2334
2334
|
};
|
|
2335
2335
|
}
|
|
2336
2336
|
return He.providerNativeFactory = n, He;
|
|
@@ -2343,9 +2343,9 @@ function So() {
|
|
|
2343
2343
|
return a && a.__esModule ? a : { default: a };
|
|
2344
2344
|
};
|
|
2345
2345
|
Object.defineProperty(_e, "__esModule", { value: !0 }), _e.createSignalRContext = void 0;
|
|
2346
|
-
const e = tr, t = r(se()), n = J(), i = Zr(), o = eo(), s = wo,
|
|
2346
|
+
const e = tr, t = r(se()), n = J(), i = Zr(), o = eo(), s = wo, l = Co(), h = "SIGNAL_R_INVOKE";
|
|
2347
2347
|
function c(a) {
|
|
2348
|
-
const
|
|
2348
|
+
const u = [], d = {
|
|
2349
2349
|
connection: null,
|
|
2350
2350
|
useSignalREffect: null,
|
|
2351
2351
|
shareConnectionBetweenTab: a?.shareConnectionBetweenTab || !1,
|
|
@@ -2363,17 +2363,17 @@ function So() {
|
|
|
2363
2363
|
Provider: null,
|
|
2364
2364
|
on: (_) => {
|
|
2365
2365
|
var g;
|
|
2366
|
-
|
|
2366
|
+
u.includes(_) || (g = d.connection) === null || g === void 0 || g.on(_, (...f) => {
|
|
2367
2367
|
(0, n.sendWithHermes)(_, f, d.shareConnectionBetweenTab);
|
|
2368
|
-
}),
|
|
2368
|
+
}), u.push(_);
|
|
2369
2369
|
},
|
|
2370
2370
|
off: (_) => {
|
|
2371
2371
|
var g;
|
|
2372
|
-
|
|
2372
|
+
u.includes(_) && u.splice(u.indexOf(_), 1), u.includes(_) || (g = d.connection) === null || g === void 0 || g.off(_);
|
|
2373
2373
|
},
|
|
2374
2374
|
//@ts-ignore
|
|
2375
2375
|
reOn: () => {
|
|
2376
|
-
(0, n.removeDuplicates)(
|
|
2376
|
+
(0, n.removeDuplicates)(u).forEach((g) => {
|
|
2377
2377
|
var f;
|
|
2378
2378
|
(f = d.connection) === null || f === void 0 || f.on(g, (...p) => {
|
|
2379
2379
|
(0, n.sendWithHermes)(g, p, d.shareConnectionBetweenTab);
|
|
@@ -2381,7 +2381,7 @@ function So() {
|
|
|
2381
2381
|
});
|
|
2382
2382
|
}
|
|
2383
2383
|
};
|
|
2384
|
-
d.Provider = d.shareConnectionBetweenTab ? (0, o.providerFactory)(d) : (0,
|
|
2384
|
+
d.Provider = d.shareConnectionBetweenTab ? (0, o.providerFactory)(d) : (0, l.providerNativeFactory)(d);
|
|
2385
2385
|
async function v(_) {
|
|
2386
2386
|
var g;
|
|
2387
2387
|
const f = await ((g = d.connection) === null || g === void 0 ? void 0 : g.invoke(_.methodName, ..._.args));
|
|
@@ -2399,10 +2399,10 @@ function ko() {
|
|
|
2399
2399
|
return nn || (nn = 1, (function(r) {
|
|
2400
2400
|
var e = pe && pe.__createBinding || (Object.create ? (function(n, i, o, s) {
|
|
2401
2401
|
s === void 0 && (s = o);
|
|
2402
|
-
var
|
|
2403
|
-
(!
|
|
2402
|
+
var l = Object.getOwnPropertyDescriptor(i, o);
|
|
2403
|
+
(!l || ("get" in l ? !i.__esModule : l.writable || l.configurable)) && (l = { enumerable: !0, get: function() {
|
|
2404
2404
|
return i[o];
|
|
2405
|
-
} }), Object.defineProperty(n, s,
|
|
2405
|
+
} }), Object.defineProperty(n, s, l);
|
|
2406
2406
|
}) : (function(n, i, o, s) {
|
|
2407
2407
|
s === void 0 && (s = o), n[s] = i[o];
|
|
2408
2408
|
})), t = pe && pe.__exportStar || function(n, i) {
|
|
@@ -2421,16 +2421,16 @@ function Eo() {
|
|
|
2421
2421
|
Object.defineProperty(we, "__esModule", { value: !0 }), we.createUseSocketEffect = void 0;
|
|
2422
2422
|
const e = r(se()), t = ie, n = J();
|
|
2423
2423
|
function i(o) {
|
|
2424
|
-
return (
|
|
2424
|
+
return (l, h) => {
|
|
2425
2425
|
const c = (0, n.useEvent)(h);
|
|
2426
2426
|
(0, t.useEffect)(() => {
|
|
2427
2427
|
var a;
|
|
2428
|
-
function
|
|
2428
|
+
function u(d) {
|
|
2429
2429
|
c(...Array.isArray(d) ? d : [d]);
|
|
2430
2430
|
}
|
|
2431
|
-
return (a = o.on) === null || a === void 0 || a.call(o,
|
|
2431
|
+
return (a = o.on) === null || a === void 0 || a.call(o, l), e.default.on(l, u), () => {
|
|
2432
2432
|
var d;
|
|
2433
|
-
(d = o.off) === null || d === void 0 || d.call(o,
|
|
2433
|
+
(d = o.off) === null || d === void 0 || d.call(o, l), e.default.off(l, u);
|
|
2434
2434
|
};
|
|
2435
2435
|
}, []);
|
|
2436
2436
|
};
|
|
@@ -2454,26 +2454,26 @@ var sn;
|
|
|
2454
2454
|
function To() {
|
|
2455
2455
|
if (sn) return je;
|
|
2456
2456
|
sn = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.encodePacket = void 0, je.encodePacketToBinary = h;
|
|
2457
|
-
const r = Mt(), e = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", t = typeof ArrayBuffer == "function", n = (c) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(c) : c && c.buffer instanceof ArrayBuffer, i = ({ type: c, data: a },
|
|
2457
|
+
const r = Mt(), e = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", t = typeof ArrayBuffer == "function", n = (c) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(c) : c && c.buffer instanceof ArrayBuffer, i = ({ type: c, data: a }, u, d) => e && a instanceof Blob ? u ? d(a) : o(a, d) : t && (a instanceof ArrayBuffer || n(a)) ? u ? d(a) : o(new Blob([a]), d) : d(r.PACKET_TYPES[c] + (a || ""));
|
|
2458
2458
|
je.encodePacket = i;
|
|
2459
2459
|
const o = (c, a) => {
|
|
2460
|
-
const
|
|
2461
|
-
return
|
|
2462
|
-
const d =
|
|
2460
|
+
const u = new FileReader();
|
|
2461
|
+
return u.onload = function() {
|
|
2462
|
+
const d = u.result.split(",")[1];
|
|
2463
2463
|
a("b" + (d || ""));
|
|
2464
|
-
},
|
|
2464
|
+
}, u.readAsDataURL(c);
|
|
2465
2465
|
};
|
|
2466
2466
|
function s(c) {
|
|
2467
2467
|
return c instanceof Uint8Array ? c : c instanceof ArrayBuffer ? new Uint8Array(c) : new Uint8Array(c.buffer, c.byteOffset, c.byteLength);
|
|
2468
2468
|
}
|
|
2469
|
-
let
|
|
2469
|
+
let l;
|
|
2470
2470
|
function h(c, a) {
|
|
2471
2471
|
if (e && c.data instanceof Blob)
|
|
2472
2472
|
return c.data.arrayBuffer().then(s).then(a);
|
|
2473
2473
|
if (t && (c.data instanceof ArrayBuffer || n(c.data)))
|
|
2474
2474
|
return a(s(c.data));
|
|
2475
|
-
i(c, !1, (
|
|
2476
|
-
|
|
2475
|
+
i(c, !1, (u) => {
|
|
2476
|
+
l || (l = new TextEncoder()), a(l.encode(u));
|
|
2477
2477
|
});
|
|
2478
2478
|
}
|
|
2479
2479
|
return je;
|
|
@@ -2486,18 +2486,18 @@ function Po() {
|
|
|
2486
2486
|
for (let i = 0; i < r.length; i++)
|
|
2487
2487
|
e[r.charCodeAt(i)] = i;
|
|
2488
2488
|
const t = (i) => {
|
|
2489
|
-
let o = new Uint8Array(i), s,
|
|
2490
|
-
for (s = 0; s <
|
|
2489
|
+
let o = new Uint8Array(i), s, l = o.length, h = "";
|
|
2490
|
+
for (s = 0; s < l; s += 3)
|
|
2491
2491
|
h += r[o[s] >> 2], h += r[(o[s] & 3) << 4 | o[s + 1] >> 4], h += r[(o[s + 1] & 15) << 2 | o[s + 2] >> 6], h += r[o[s + 2] & 63];
|
|
2492
|
-
return
|
|
2492
|
+
return l % 3 === 2 ? h = h.substring(0, h.length - 1) + "=" : l % 3 === 1 && (h = h.substring(0, h.length - 2) + "=="), h;
|
|
2493
2493
|
};
|
|
2494
2494
|
Ee.encode = t;
|
|
2495
2495
|
const n = (i) => {
|
|
2496
|
-
let o = i.length * 0.75, s = i.length,
|
|
2496
|
+
let o = i.length * 0.75, s = i.length, l, h = 0, c, a, u, d;
|
|
2497
2497
|
i[i.length - 1] === "=" && (o--, i[i.length - 2] === "=" && o--);
|
|
2498
2498
|
const v = new ArrayBuffer(o), _ = new Uint8Array(v);
|
|
2499
|
-
for (
|
|
2500
|
-
c = e[i.charCodeAt(
|
|
2499
|
+
for (l = 0; l < s; l += 4)
|
|
2500
|
+
c = e[i.charCodeAt(l)], a = e[i.charCodeAt(l + 1)], u = e[i.charCodeAt(l + 2)], d = e[i.charCodeAt(l + 3)], _[h++] = c << 2 | a >> 4, _[h++] = (a & 15) << 4 | u >> 2, _[h++] = (u & 3) << 6 | d & 63;
|
|
2501
2501
|
return v;
|
|
2502
2502
|
};
|
|
2503
2503
|
return Ee.decode = n, Ee;
|
|
@@ -2506,16 +2506,16 @@ var an;
|
|
|
2506
2506
|
function Ro() {
|
|
2507
2507
|
if (an) return $e;
|
|
2508
2508
|
an = 1, Object.defineProperty($e, "__esModule", { value: !0 }), $e.decodePacket = void 0;
|
|
2509
|
-
const r = Mt(), e = Po(), t = typeof ArrayBuffer == "function", n = (s,
|
|
2509
|
+
const r = Mt(), e = Po(), t = typeof ArrayBuffer == "function", n = (s, l) => {
|
|
2510
2510
|
if (typeof s != "string")
|
|
2511
2511
|
return {
|
|
2512
2512
|
type: "message",
|
|
2513
|
-
data: o(s,
|
|
2513
|
+
data: o(s, l)
|
|
2514
2514
|
};
|
|
2515
2515
|
const h = s.charAt(0);
|
|
2516
2516
|
return h === "b" ? {
|
|
2517
2517
|
type: "message",
|
|
2518
|
-
data: i(s.substring(1),
|
|
2518
|
+
data: i(s.substring(1), l)
|
|
2519
2519
|
} : r.PACKET_TYPES_REVERSE[h] ? s.length > 1 ? {
|
|
2520
2520
|
type: r.PACKET_TYPES_REVERSE[h],
|
|
2521
2521
|
data: s.substring(1)
|
|
@@ -2524,19 +2524,19 @@ function Ro() {
|
|
|
2524
2524
|
} : r.ERROR_PACKET;
|
|
2525
2525
|
};
|
|
2526
2526
|
$e.decodePacket = n;
|
|
2527
|
-
const i = (s,
|
|
2527
|
+
const i = (s, l) => {
|
|
2528
2528
|
if (t) {
|
|
2529
2529
|
const h = (0, e.decode)(s);
|
|
2530
|
-
return o(h,
|
|
2530
|
+
return o(h, l);
|
|
2531
2531
|
} else
|
|
2532
2532
|
return { base64: !0, data: s };
|
|
2533
|
-
}, o = (s,
|
|
2533
|
+
}, o = (s, l) => l === "blob" ? s instanceof Blob ? s : new Blob([s]) : s instanceof ArrayBuffer ? s : s.buffer;
|
|
2534
2534
|
return $e;
|
|
2535
2535
|
}
|
|
2536
|
-
var
|
|
2536
|
+
var ln;
|
|
2537
2537
|
function tt() {
|
|
2538
|
-
return
|
|
2539
|
-
Object.defineProperty(r, "__esModule", { value: !0 }), r.decodePayload = r.decodePacket = r.encodePayload = r.encodePacket = r.protocol = void 0, r.createPacketEncoderStream =
|
|
2538
|
+
return ln || (ln = 1, (function(r) {
|
|
2539
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.decodePayload = r.decodePacket = r.encodePayload = r.encodePacket = r.protocol = void 0, r.createPacketEncoderStream = l, r.createPacketDecoderStream = u;
|
|
2540
2540
|
const e = To();
|
|
2541
2541
|
Object.defineProperty(r, "encodePacket", { enumerable: !0, get: function() {
|
|
2542
2542
|
return e.encodePacket;
|
|
@@ -2565,7 +2565,7 @@ function tt() {
|
|
|
2565
2565
|
return g;
|
|
2566
2566
|
};
|
|
2567
2567
|
r.decodePayload = s;
|
|
2568
|
-
function
|
|
2568
|
+
function l() {
|
|
2569
2569
|
return new TransformStream({
|
|
2570
2570
|
transform(d, v) {
|
|
2571
2571
|
(0, e.encodePacketToBinary)(d, (_) => {
|
|
@@ -2600,7 +2600,7 @@ function tt() {
|
|
|
2600
2600
|
_[f] = d[0][g++], g === d[0].length && (d.shift(), g = 0);
|
|
2601
2601
|
return d.length && g < d[0].length && (d[0] = d[0].slice(g)), _;
|
|
2602
2602
|
}
|
|
2603
|
-
function
|
|
2603
|
+
function u(d, v) {
|
|
2604
2604
|
h || (h = new TextDecoder());
|
|
2605
2605
|
const _ = [];
|
|
2606
2606
|
let g = 0, f = -1, p = !1;
|
|
@@ -2696,10 +2696,10 @@ const Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2696
2696
|
__proto__: null,
|
|
2697
2697
|
Emitter: H
|
|
2698
2698
|
}, Symbol.toStringTag, { value: "Module" })), xe = /* @__PURE__ */ At(Oo);
|
|
2699
|
-
var Te = {}, oe = {},
|
|
2699
|
+
var Te = {}, oe = {}, un;
|
|
2700
2700
|
function Le() {
|
|
2701
|
-
if (
|
|
2702
|
-
|
|
2701
|
+
if (un) return oe;
|
|
2702
|
+
un = 1, Object.defineProperty(oe, "__esModule", { value: !0 }), oe.defaultBinaryType = oe.globalThisShim = oe.nextTick = void 0, oe.createCookieJar = r, oe.nextTick = typeof Promise == "function" && typeof Promise.resolve == "function" ? (t) => Promise.resolve().then(t) : (t, n) => n(t, 0), oe.globalThisShim = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), oe.defaultBinaryType = "arraybuffer";
|
|
2703
2703
|
function r() {
|
|
2704
2704
|
}
|
|
2705
2705
|
return oe;
|
|
@@ -2710,7 +2710,7 @@ function Ue() {
|
|
|
2710
2710
|
hn = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.pick = e, Te.installTimerFunctions = i, Te.byteLength = s, Te.randomString = h;
|
|
2711
2711
|
const r = Le();
|
|
2712
2712
|
function e(c, ...a) {
|
|
2713
|
-
return a.reduce((
|
|
2713
|
+
return a.reduce((u, d) => (c.hasOwnProperty(d) && (u[d] = c[d]), u), {});
|
|
2714
2714
|
}
|
|
2715
2715
|
const t = r.globalThisShim.setTimeout, n = r.globalThisShim.clearTimeout;
|
|
2716
2716
|
function i(c, a) {
|
|
@@ -2718,13 +2718,13 @@ function Ue() {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
const o = 1.33;
|
|
2720
2720
|
function s(c) {
|
|
2721
|
-
return typeof c == "string" ?
|
|
2721
|
+
return typeof c == "string" ? l(c) : Math.ceil((c.byteLength || c.size) * o);
|
|
2722
2722
|
}
|
|
2723
|
-
function
|
|
2724
|
-
let a = 0,
|
|
2723
|
+
function l(c) {
|
|
2724
|
+
let a = 0, u = 0;
|
|
2725
2725
|
for (let d = 0, v = c.length; d < v; d++)
|
|
2726
|
-
a = c.charCodeAt(d), a < 128 ?
|
|
2727
|
-
return
|
|
2726
|
+
a = c.charCodeAt(d), a < 128 ? u += 1 : a < 2048 ? u += 2 : a < 55296 || a >= 57344 ? u += 3 : (d++, u += 4);
|
|
2727
|
+
return u;
|
|
2728
2728
|
}
|
|
2729
2729
|
function h() {
|
|
2730
2730
|
return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
|
|
@@ -2744,8 +2744,8 @@ function cr() {
|
|
|
2744
2744
|
function e(t) {
|
|
2745
2745
|
let n = {}, i = t.split("&");
|
|
2746
2746
|
for (let o = 0, s = i.length; o < s; o++) {
|
|
2747
|
-
let
|
|
2748
|
-
n[decodeURIComponent(
|
|
2747
|
+
let l = i[o].split("=");
|
|
2748
|
+
n[decodeURIComponent(l[0])] = decodeURIComponent(l[1]);
|
|
2749
2749
|
}
|
|
2750
2750
|
return n;
|
|
2751
2751
|
}
|
|
@@ -2756,24 +2756,24 @@ function Ao() {
|
|
|
2756
2756
|
if (dn) return Pt;
|
|
2757
2757
|
dn = 1;
|
|
2758
2758
|
var r = 1e3, e = r * 60, t = e * 60, n = t * 24, i = n * 7, o = n * 365.25;
|
|
2759
|
-
Pt = function(a,
|
|
2760
|
-
|
|
2759
|
+
Pt = function(a, u) {
|
|
2760
|
+
u = u || {};
|
|
2761
2761
|
var d = typeof a;
|
|
2762
2762
|
if (d === "string" && a.length > 0)
|
|
2763
2763
|
return s(a);
|
|
2764
2764
|
if (d === "number" && isFinite(a))
|
|
2765
|
-
return
|
|
2765
|
+
return u.long ? h(a) : l(a);
|
|
2766
2766
|
throw new Error(
|
|
2767
2767
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(a)
|
|
2768
2768
|
);
|
|
2769
2769
|
};
|
|
2770
2770
|
function s(a) {
|
|
2771
2771
|
if (a = String(a), !(a.length > 100)) {
|
|
2772
|
-
var
|
|
2772
|
+
var u = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
2773
2773
|
a
|
|
2774
2774
|
);
|
|
2775
|
-
if (
|
|
2776
|
-
var d = parseFloat(
|
|
2775
|
+
if (u) {
|
|
2776
|
+
var d = parseFloat(u[1]), v = (u[2] || "ms").toLowerCase();
|
|
2777
2777
|
switch (v) {
|
|
2778
2778
|
case "years":
|
|
2779
2779
|
case "year":
|
|
@@ -2819,16 +2819,16 @@ function Ao() {
|
|
|
2819
2819
|
}
|
|
2820
2820
|
}
|
|
2821
2821
|
}
|
|
2822
|
-
function
|
|
2823
|
-
var
|
|
2824
|
-
return
|
|
2822
|
+
function l(a) {
|
|
2823
|
+
var u = Math.abs(a);
|
|
2824
|
+
return u >= n ? Math.round(a / n) + "d" : u >= t ? Math.round(a / t) + "h" : u >= e ? Math.round(a / e) + "m" : u >= r ? Math.round(a / r) + "s" : a + "ms";
|
|
2825
2825
|
}
|
|
2826
2826
|
function h(a) {
|
|
2827
|
-
var
|
|
2828
|
-
return
|
|
2827
|
+
var u = Math.abs(a);
|
|
2828
|
+
return u >= n ? c(a, u, n, "day") : u >= t ? c(a, u, t, "hour") : u >= e ? c(a, u, e, "minute") : u >= r ? c(a, u, r, "second") : a + " ms";
|
|
2829
2829
|
}
|
|
2830
|
-
function c(a,
|
|
2831
|
-
var _ =
|
|
2830
|
+
function c(a, u, d, v) {
|
|
2831
|
+
var _ = u >= d * 1.5;
|
|
2832
2832
|
return Math.round(a / d) + " " + v + (_ ? "s" : "");
|
|
2833
2833
|
}
|
|
2834
2834
|
return Pt;
|
|
@@ -2838,17 +2838,17 @@ function No() {
|
|
|
2838
2838
|
if (pn) return Rt;
|
|
2839
2839
|
pn = 1;
|
|
2840
2840
|
function r(e) {
|
|
2841
|
-
n.debug = n, n.default = n, n.coerce = c, n.disable =
|
|
2842
|
-
n[
|
|
2841
|
+
n.debug = n, n.default = n, n.coerce = c, n.disable = l, n.enable = o, n.enabled = h, n.humanize = Ao(), n.destroy = a, Object.keys(e).forEach((u) => {
|
|
2842
|
+
n[u] = e[u];
|
|
2843
2843
|
}), n.names = [], n.skips = [], n.formatters = {};
|
|
2844
|
-
function t(
|
|
2844
|
+
function t(u) {
|
|
2845
2845
|
let d = 0;
|
|
2846
|
-
for (let v = 0; v <
|
|
2847
|
-
d = (d << 5) - d +
|
|
2846
|
+
for (let v = 0; v < u.length; v++)
|
|
2847
|
+
d = (d << 5) - d + u.charCodeAt(v), d |= 0;
|
|
2848
2848
|
return n.colors[Math.abs(d) % n.colors.length];
|
|
2849
2849
|
}
|
|
2850
2850
|
n.selectColor = t;
|
|
2851
|
-
function n(
|
|
2851
|
+
function n(u) {
|
|
2852
2852
|
let d, v = null, _, g;
|
|
2853
2853
|
function f(...p) {
|
|
2854
2854
|
if (!f.enabled)
|
|
@@ -2868,29 +2868,29 @@ function No() {
|
|
|
2868
2868
|
return P;
|
|
2869
2869
|
}), n.formatArgs.call(m, p), (m.log || n.log).apply(m, p);
|
|
2870
2870
|
}
|
|
2871
|
-
return f.namespace =
|
|
2871
|
+
return f.namespace = u, f.useColors = n.useColors(), f.color = n.selectColor(u), f.extend = i, f.destroy = n.destroy, Object.defineProperty(f, "enabled", {
|
|
2872
2872
|
enumerable: !0,
|
|
2873
2873
|
configurable: !1,
|
|
2874
|
-
get: () => v !== null ? v : (_ !== n.namespaces && (_ = n.namespaces, g = n.enabled(
|
|
2874
|
+
get: () => v !== null ? v : (_ !== n.namespaces && (_ = n.namespaces, g = n.enabled(u)), g),
|
|
2875
2875
|
set: (p) => {
|
|
2876
2876
|
v = p;
|
|
2877
2877
|
}
|
|
2878
2878
|
}), typeof n.init == "function" && n.init(f), f;
|
|
2879
2879
|
}
|
|
2880
|
-
function i(
|
|
2881
|
-
const v = n(this.namespace + (typeof d > "u" ? ":" : d) +
|
|
2880
|
+
function i(u, d) {
|
|
2881
|
+
const v = n(this.namespace + (typeof d > "u" ? ":" : d) + u);
|
|
2882
2882
|
return v.log = this.log, v;
|
|
2883
2883
|
}
|
|
2884
|
-
function o(
|
|
2885
|
-
n.save(
|
|
2886
|
-
const d = (typeof
|
|
2884
|
+
function o(u) {
|
|
2885
|
+
n.save(u), n.namespaces = u, n.names = [], n.skips = [];
|
|
2886
|
+
const d = (typeof u == "string" ? u : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
2887
2887
|
for (const v of d)
|
|
2888
2888
|
v[0] === "-" ? n.skips.push(v.slice(1)) : n.names.push(v);
|
|
2889
2889
|
}
|
|
2890
|
-
function s(
|
|
2890
|
+
function s(u, d) {
|
|
2891
2891
|
let v = 0, _ = 0, g = -1, f = 0;
|
|
2892
|
-
for (; v <
|
|
2893
|
-
if (_ < d.length && (d[_] ===
|
|
2892
|
+
for (; v < u.length; )
|
|
2893
|
+
if (_ < d.length && (d[_] === u[v] || d[_] === "*"))
|
|
2894
2894
|
d[_] === "*" ? (g = _, f = v, _++) : (v++, _++);
|
|
2895
2895
|
else if (g !== -1)
|
|
2896
2896
|
_ = g + 1, f++, v = f;
|
|
@@ -2900,24 +2900,24 @@ function No() {
|
|
|
2900
2900
|
_++;
|
|
2901
2901
|
return _ === d.length;
|
|
2902
2902
|
}
|
|
2903
|
-
function
|
|
2904
|
-
const
|
|
2903
|
+
function l() {
|
|
2904
|
+
const u = [
|
|
2905
2905
|
...n.names,
|
|
2906
2906
|
...n.skips.map((d) => "-" + d)
|
|
2907
2907
|
].join(",");
|
|
2908
|
-
return n.enable(""),
|
|
2908
|
+
return n.enable(""), u;
|
|
2909
2909
|
}
|
|
2910
|
-
function h(
|
|
2910
|
+
function h(u) {
|
|
2911
2911
|
for (const d of n.skips)
|
|
2912
|
-
if (s(
|
|
2912
|
+
if (s(u, d))
|
|
2913
2913
|
return !1;
|
|
2914
2914
|
for (const d of n.names)
|
|
2915
|
-
if (s(
|
|
2915
|
+
if (s(u, d))
|
|
2916
2916
|
return !0;
|
|
2917
2917
|
return !1;
|
|
2918
2918
|
}
|
|
2919
|
-
function c(
|
|
2920
|
-
return
|
|
2919
|
+
function c(u) {
|
|
2920
|
+
return u instanceof Error ? u.stack || u.message : u;
|
|
2921
2921
|
}
|
|
2922
2922
|
function a() {
|
|
2923
2923
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
@@ -3029,10 +3029,10 @@ function te() {
|
|
|
3029
3029
|
return;
|
|
3030
3030
|
const c = "color: " + this.color;
|
|
3031
3031
|
h.splice(1, 0, c, "color: inherit");
|
|
3032
|
-
let a = 0,
|
|
3032
|
+
let a = 0, u = 0;
|
|
3033
3033
|
h[0].replace(/%[a-zA-Z%]/g, (d) => {
|
|
3034
|
-
d !== "%%" && (a++, d === "%c" && (
|
|
3035
|
-
}), h.splice(
|
|
3034
|
+
d !== "%%" && (a++, d === "%c" && (u = a));
|
|
3035
|
+
}), h.splice(u, 0, c);
|
|
3036
3036
|
}
|
|
3037
3037
|
e.log = console.debug || console.log || (() => {
|
|
3038
3038
|
});
|
|
@@ -3057,8 +3057,8 @@ function te() {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
}
|
|
3059
3059
|
r.exports = No()(e);
|
|
3060
|
-
const { formatters:
|
|
3061
|
-
|
|
3060
|
+
const { formatters: l } = r.exports;
|
|
3061
|
+
l.j = function(h) {
|
|
3062
3062
|
try {
|
|
3063
3063
|
return JSON.stringify(h);
|
|
3064
3064
|
} catch (c) {
|
|
@@ -3076,12 +3076,12 @@ function _t() {
|
|
|
3076
3076
|
};
|
|
3077
3077
|
Object.defineProperty(ce, "__esModule", { value: !0 }), ce.Transport = ce.TransportError = void 0;
|
|
3078
3078
|
const e = tt(), t = xe, n = Ue(), i = cr(), s = (0, r(te()).default)("engine.io-client:transport");
|
|
3079
|
-
class
|
|
3080
|
-
constructor(a,
|
|
3081
|
-
super(a), this.description =
|
|
3079
|
+
class l extends Error {
|
|
3080
|
+
constructor(a, u, d) {
|
|
3081
|
+
super(a), this.description = u, this.context = d, this.type = "TransportError";
|
|
3082
3082
|
}
|
|
3083
3083
|
}
|
|
3084
|
-
ce.TransportError =
|
|
3084
|
+
ce.TransportError = l;
|
|
3085
3085
|
class h extends t.Emitter {
|
|
3086
3086
|
/**
|
|
3087
3087
|
* Transport abstract constructor.
|
|
@@ -3101,8 +3101,8 @@ function _t() {
|
|
|
3101
3101
|
* @return {Transport} for chaining
|
|
3102
3102
|
* @protected
|
|
3103
3103
|
*/
|
|
3104
|
-
onError(a,
|
|
3105
|
-
return super.emitReserved("error", new
|
|
3104
|
+
onError(a, u, d) {
|
|
3105
|
+
return super.emitReserved("error", new l(a, u, d)), this;
|
|
3106
3106
|
}
|
|
3107
3107
|
/**
|
|
3108
3108
|
* Opens the transport.
|
|
@@ -3139,8 +3139,8 @@ function _t() {
|
|
|
3139
3139
|
* @protected
|
|
3140
3140
|
*/
|
|
3141
3141
|
onData(a) {
|
|
3142
|
-
const
|
|
3143
|
-
this.onPacket(
|
|
3142
|
+
const u = (0, e.decodePacket)(a, this.socket.binaryType);
|
|
3143
|
+
this.onPacket(u);
|
|
3144
3144
|
}
|
|
3145
3145
|
/**
|
|
3146
3146
|
* Called with a decoded packet.
|
|
@@ -3165,8 +3165,8 @@ function _t() {
|
|
|
3165
3165
|
*/
|
|
3166
3166
|
pause(a) {
|
|
3167
3167
|
}
|
|
3168
|
-
createUri(a,
|
|
3169
|
-
return a + "://" + this._hostname() + this._port() + this.opts.path + this._query(
|
|
3168
|
+
createUri(a, u = {}) {
|
|
3169
|
+
return a + "://" + this._hostname() + this._port() + this.opts.path + this._query(u);
|
|
3170
3170
|
}
|
|
3171
3171
|
_hostname() {
|
|
3172
3172
|
const a = this.opts.hostname;
|
|
@@ -3176,8 +3176,8 @@ function _t() {
|
|
|
3176
3176
|
return this.opts.port && (this.opts.secure && Number(this.opts.port) !== 443 || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
|
|
3177
3177
|
}
|
|
3178
3178
|
_query(a) {
|
|
3179
|
-
const
|
|
3180
|
-
return
|
|
3179
|
+
const u = (0, i.encode)(a);
|
|
3180
|
+
return u.length ? "?" + u : "";
|
|
3181
3181
|
}
|
|
3182
3182
|
}
|
|
3183
3183
|
return ce.Transport = h, ce;
|
|
@@ -3186,8 +3186,8 @@ var vn;
|
|
|
3186
3186
|
function ar() {
|
|
3187
3187
|
if (vn) return ke;
|
|
3188
3188
|
vn = 1;
|
|
3189
|
-
var r = ke && ke.__importDefault || function(
|
|
3190
|
-
return
|
|
3189
|
+
var r = ke && ke.__importDefault || function(l) {
|
|
3190
|
+
return l && l.__esModule ? l : { default: l };
|
|
3191
3191
|
};
|
|
3192
3192
|
Object.defineProperty(ke, "__esModule", { value: !0 }), ke.Polling = void 0;
|
|
3193
3193
|
const e = _t(), t = Ue(), n = tt(), o = (0, r(te()).default)("engine.io-client:polling");
|
|
@@ -3305,7 +3305,7 @@ function It() {
|
|
|
3305
3305
|
return g && g.__esModule ? g : { default: g };
|
|
3306
3306
|
};
|
|
3307
3307
|
Object.defineProperty(ee, "__esModule", { value: !0 }), ee.XHR = ee.Request = ee.BaseXHR = void 0;
|
|
3308
|
-
const e = ar(), t = xe, n = Ue(), i = Le(), o = Do(),
|
|
3308
|
+
const e = ar(), t = xe, n = Ue(), i = Le(), o = Do(), l = (0, r(te()).default)("engine.io-client:polling");
|
|
3309
3309
|
function h() {
|
|
3310
3310
|
}
|
|
3311
3311
|
class c extends e.Polling {
|
|
@@ -3344,7 +3344,7 @@ function It() {
|
|
|
3344
3344
|
* @private
|
|
3345
3345
|
*/
|
|
3346
3346
|
doPoll() {
|
|
3347
|
-
|
|
3347
|
+
l("xhr poll");
|
|
3348
3348
|
const f = this.request();
|
|
3349
3349
|
f.on("data", this.onData.bind(this)), f.on("error", (p, m) => {
|
|
3350
3350
|
this.onError("xhr poll error", p, m);
|
|
@@ -3373,7 +3373,7 @@ function It() {
|
|
|
3373
3373
|
p.xdomain = !!this._opts.xd;
|
|
3374
3374
|
const m = this._xhr = this.createRequest(p);
|
|
3375
3375
|
try {
|
|
3376
|
-
|
|
3376
|
+
l("xhr open %s: %s", this._method, this._uri), m.open(this._method, this._uri, !0);
|
|
3377
3377
|
try {
|
|
3378
3378
|
if (this._opts.extraHeaders) {
|
|
3379
3379
|
m.setDisableHeaderCheck && m.setDisableHeaderCheck(!0);
|
|
@@ -3399,7 +3399,7 @@ function It() {
|
|
|
3399
3399
|
)), m.readyState === 4 && (m.status === 200 || m.status === 1223 ? this._onLoad() : this.setTimeoutFn(() => {
|
|
3400
3400
|
this._onError(typeof m.status == "number" ? m.status : 0);
|
|
3401
3401
|
}, 0));
|
|
3402
|
-
},
|
|
3402
|
+
}, l("xhr data %s", this._data), m.send(this._data);
|
|
3403
3403
|
} catch (b) {
|
|
3404
3404
|
this.setTimeoutFn(() => {
|
|
3405
3405
|
this._onError(b);
|
|
@@ -3451,13 +3451,13 @@ function It() {
|
|
|
3451
3451
|
}
|
|
3452
3452
|
if (ee.Request = a, a.requestsCount = 0, a.requests = {}, typeof document < "u") {
|
|
3453
3453
|
if (typeof attachEvent == "function")
|
|
3454
|
-
attachEvent("onunload",
|
|
3454
|
+
attachEvent("onunload", u);
|
|
3455
3455
|
else if (typeof addEventListener == "function") {
|
|
3456
3456
|
const g = "onpagehide" in i.globalThisShim ? "pagehide" : "unload";
|
|
3457
|
-
addEventListener(g,
|
|
3457
|
+
addEventListener(g, u, !1);
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
|
-
function
|
|
3460
|
+
function u() {
|
|
3461
3461
|
for (let g in a.requests)
|
|
3462
3462
|
a.requests.hasOwnProperty(g) && a.requests[g].abort();
|
|
3463
3463
|
}
|
|
@@ -3493,21 +3493,21 @@ function It() {
|
|
|
3493
3493
|
}
|
|
3494
3494
|
return ee;
|
|
3495
3495
|
}
|
|
3496
|
-
var
|
|
3496
|
+
var le = {}, bn;
|
|
3497
3497
|
function Ot() {
|
|
3498
|
-
if (bn) return
|
|
3498
|
+
if (bn) return le;
|
|
3499
3499
|
bn = 1;
|
|
3500
|
-
var r =
|
|
3501
|
-
return
|
|
3500
|
+
var r = le && le.__importDefault || function(u) {
|
|
3501
|
+
return u && u.__esModule ? u : { default: u };
|
|
3502
3502
|
};
|
|
3503
|
-
Object.defineProperty(
|
|
3504
|
-
const e = _t(), t = Ue(), n = tt(), i = Le(), s = (0, r(te()).default)("engine.io-client:websocket"),
|
|
3503
|
+
Object.defineProperty(le, "__esModule", { value: !0 }), le.WS = le.BaseWS = void 0;
|
|
3504
|
+
const e = _t(), t = Ue(), n = tt(), i = Le(), s = (0, r(te()).default)("engine.io-client:websocket"), l = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
|
3505
3505
|
class h extends e.Transport {
|
|
3506
3506
|
get name() {
|
|
3507
3507
|
return "websocket";
|
|
3508
3508
|
}
|
|
3509
3509
|
doOpen() {
|
|
3510
|
-
const d = this.uri(), v = this.opts.protocols, _ =
|
|
3510
|
+
const d = this.uri(), v = this.opts.protocols, _ = l ? {} : (0, t.pick)(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
|
|
3511
3511
|
this.opts.extraHeaders && (_.headers = this.opts.extraHeaders);
|
|
3512
3512
|
try {
|
|
3513
3513
|
this.ws = this.createSocket(d, v, _);
|
|
@@ -3559,24 +3559,24 @@ function Ot() {
|
|
|
3559
3559
|
return this.opts.timestampRequests && (v[this.opts.timestampParam] = (0, t.randomString)()), this.supportsBinary || (v.b64 = 1), this.createUri(d, v);
|
|
3560
3560
|
}
|
|
3561
3561
|
}
|
|
3562
|
-
|
|
3562
|
+
le.BaseWS = h;
|
|
3563
3563
|
const c = i.globalThisShim.WebSocket || i.globalThisShim.MozWebSocket;
|
|
3564
3564
|
class a extends h {
|
|
3565
3565
|
createSocket(d, v, _) {
|
|
3566
|
-
return
|
|
3566
|
+
return l ? new c(d, v, _) : v ? new c(d, v) : new c(d);
|
|
3567
3567
|
}
|
|
3568
3568
|
doWrite(d, v) {
|
|
3569
3569
|
this.ws.send(v);
|
|
3570
3570
|
}
|
|
3571
3571
|
}
|
|
3572
|
-
return
|
|
3572
|
+
return le.WS = a, le;
|
|
3573
3573
|
}
|
|
3574
3574
|
var Pe = {}, wn;
|
|
3575
|
-
function
|
|
3575
|
+
function lr() {
|
|
3576
3576
|
if (wn) return Pe;
|
|
3577
3577
|
wn = 1;
|
|
3578
|
-
var r = Pe && Pe.__importDefault || function(
|
|
3579
|
-
return
|
|
3578
|
+
var r = Pe && Pe.__importDefault || function(l) {
|
|
3579
|
+
return l && l.__esModule ? l : { default: l };
|
|
3580
3580
|
};
|
|
3581
3581
|
Object.defineProperty(Pe, "__esModule", { value: !0 }), Pe.WT = void 0;
|
|
3582
3582
|
const e = _t(), t = Le(), n = tt(), o = (0, r(te()).default)("engine.io-client:webtransport");
|
|
@@ -3596,8 +3596,8 @@ function ur() {
|
|
|
3596
3596
|
o("transport closed due to %s", h), this.onError("webtransport error", h);
|
|
3597
3597
|
}), this._transport.ready.then(() => {
|
|
3598
3598
|
this._transport.createBidirectionalStream().then((h) => {
|
|
3599
|
-
const c = (0, n.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER, this.socket.binaryType), a = h.readable.pipeThrough(c).getReader(),
|
|
3600
|
-
|
|
3599
|
+
const c = (0, n.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER, this.socket.binaryType), a = h.readable.pipeThrough(c).getReader(), u = (0, n.createPacketEncoderStream)();
|
|
3600
|
+
u.readable.pipeTo(h.writable), this._writer = u.writable.getWriter();
|
|
3601
3601
|
const d = () => {
|
|
3602
3602
|
a.read().then(({ done: _, value: g }) => {
|
|
3603
3603
|
if (_) {
|
|
@@ -3618,9 +3618,9 @@ function ur() {
|
|
|
3618
3618
|
write(h) {
|
|
3619
3619
|
this.writable = !1;
|
|
3620
3620
|
for (let c = 0; c < h.length; c++) {
|
|
3621
|
-
const a = h[c],
|
|
3621
|
+
const a = h[c], u = c === h.length - 1;
|
|
3622
3622
|
this._writer.write(a).then(() => {
|
|
3623
|
-
|
|
3623
|
+
u && (0, t.nextTick)(() => {
|
|
3624
3624
|
this.writable = !0, this.emitReserved("drain");
|
|
3625
3625
|
}, this.setTimeoutFn);
|
|
3626
3626
|
});
|
|
@@ -3634,10 +3634,10 @@ function ur() {
|
|
|
3634
3634
|
return Pe.WT = s, Pe;
|
|
3635
3635
|
}
|
|
3636
3636
|
var Cn;
|
|
3637
|
-
function
|
|
3637
|
+
function ur() {
|
|
3638
3638
|
if (Cn) return We;
|
|
3639
3639
|
Cn = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.transports = void 0;
|
|
3640
|
-
const r = It(), e = Ot(), t =
|
|
3640
|
+
const r = It(), e = Ot(), t = lr();
|
|
3641
3641
|
return We.transports = {
|
|
3642
3642
|
websocket: e.WS,
|
|
3643
3643
|
webtransport: t.WT,
|
|
@@ -3667,22 +3667,22 @@ function hr() {
|
|
|
3667
3667
|
function t(o) {
|
|
3668
3668
|
if (o.length > 8e3)
|
|
3669
3669
|
throw "URI too long";
|
|
3670
|
-
const s = o,
|
|
3671
|
-
|
|
3672
|
-
let c = r.exec(o || ""), a = {},
|
|
3673
|
-
for (;
|
|
3674
|
-
a[e[
|
|
3675
|
-
return
|
|
3670
|
+
const s = o, l = o.indexOf("["), h = o.indexOf("]");
|
|
3671
|
+
l != -1 && h != -1 && (o = o.substring(0, l) + o.substring(l, h).replace(/:/g, ";") + o.substring(h, o.length));
|
|
3672
|
+
let c = r.exec(o || ""), a = {}, u = 14;
|
|
3673
|
+
for (; u--; )
|
|
3674
|
+
a[e[u]] = c[u] || "";
|
|
3675
|
+
return l != -1 && h != -1 && (a.source = s, a.host = a.host.substring(1, a.host.length - 1).replace(/;/g, ":"), a.authority = a.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), a.ipv6uri = !0), a.pathNames = n(a, a.path), a.queryKey = i(a, a.query), a;
|
|
3676
3676
|
}
|
|
3677
3677
|
function n(o, s) {
|
|
3678
|
-
const
|
|
3678
|
+
const l = /\/{2,9}/g, h = s.replace(l, "/").split("/");
|
|
3679
3679
|
return (s.slice(0, 1) == "/" || s.length === 0) && h.splice(0, 1), s.slice(-1) == "/" && h.splice(h.length - 1, 1), h;
|
|
3680
3680
|
}
|
|
3681
3681
|
function i(o, s) {
|
|
3682
|
-
const
|
|
3682
|
+
const l = {};
|
|
3683
3683
|
return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(h, c, a) {
|
|
3684
|
-
c && (
|
|
3685
|
-
}),
|
|
3684
|
+
c && (l[c] = a);
|
|
3685
|
+
}), l;
|
|
3686
3686
|
}
|
|
3687
3687
|
return st;
|
|
3688
3688
|
}
|
|
@@ -3694,9 +3694,9 @@ function En() {
|
|
|
3694
3694
|
return g && g.__esModule ? g : { default: g };
|
|
3695
3695
|
};
|
|
3696
3696
|
Object.defineProperty(Z, "__esModule", { value: !0 }), Z.Socket = Z.SocketWithUpgrade = Z.SocketWithoutUpgrade = void 0;
|
|
3697
|
-
const e =
|
|
3697
|
+
const e = ur(), t = Ue(), n = cr(), i = hr(), o = xe, s = tt(), l = Le(), c = (0, r(te()).default)("engine.io-client:socket"), a = typeof addEventListener == "function" && typeof removeEventListener == "function", u = [];
|
|
3698
3698
|
a && addEventListener("offline", () => {
|
|
3699
|
-
c("closing %d connection(s) because the network was lost",
|
|
3699
|
+
c("closing %d connection(s) because the network was lost", u.length), u.forEach((g) => g());
|
|
3700
3700
|
}, !1);
|
|
3701
3701
|
class d extends o.Emitter {
|
|
3702
3702
|
/**
|
|
@@ -3706,7 +3706,7 @@ function En() {
|
|
|
3706
3706
|
* @param {Object} opts - options
|
|
3707
3707
|
*/
|
|
3708
3708
|
constructor(f, p) {
|
|
3709
|
-
if (super(), this.binaryType =
|
|
3709
|
+
if (super(), this.binaryType = l.defaultBinaryType, this.writeBuffer = [], this._prevBufferLen = 0, this._pingInterval = -1, this._pingTimeout = -1, this._maxPayload = -1, this._pingTimeoutTime = 1 / 0, f && typeof f == "object" && (p = f, f = null), f) {
|
|
3710
3710
|
const m = (0, i.parse)(f);
|
|
3711
3711
|
p.hostname = m.host, p.secure = m.protocol === "https" || m.protocol === "wss", p.port = m.port, m.query && (p.query = m.query);
|
|
3712
3712
|
} else p.host && (p.hostname = (0, i.parse)(p.host).host);
|
|
@@ -3733,7 +3733,7 @@ function En() {
|
|
|
3733
3733
|
this._onClose("transport close", {
|
|
3734
3734
|
description: "network connection lost"
|
|
3735
3735
|
});
|
|
3736
|
-
},
|
|
3736
|
+
}, u.push(this._offlineEventListener))), this.opts.withCredentials && (this._cookieJar = (0, l.createCookieJar)()), this._open();
|
|
3737
3737
|
}
|
|
3738
3738
|
/**
|
|
3739
3739
|
* Creates transport of the given type.
|
|
@@ -3885,7 +3885,7 @@ function En() {
|
|
|
3885
3885
|
if (!this._pingTimeoutTime)
|
|
3886
3886
|
return !0;
|
|
3887
3887
|
const f = Date.now() > this._pingTimeoutTime;
|
|
3888
|
-
return f && (c("throttled timer detected, scheduling connection close"), this._pingTimeoutTime = 0, (0,
|
|
3888
|
+
return f && (c("throttled timer detected, scheduling connection close"), this._pingTimeoutTime = 0, (0, l.nextTick)(() => {
|
|
3889
3889
|
this._onClose("ping timeout");
|
|
3890
3890
|
}, this.setTimeoutFn)), f;
|
|
3891
3891
|
}
|
|
@@ -3964,8 +3964,8 @@ function En() {
|
|
|
3964
3964
|
_onClose(f, p) {
|
|
3965
3965
|
if (this.readyState === "opening" || this.readyState === "open" || this.readyState === "closing") {
|
|
3966
3966
|
if (c('socket close with reason: "%s"', f), this.clearTimeoutFn(this._pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), a && (this._beforeunloadEventListener && removeEventListener("beforeunload", this._beforeunloadEventListener, !1), this._offlineEventListener)) {
|
|
3967
|
-
const m =
|
|
3968
|
-
m !== -1 && (c("removing listener for the 'offline' event"),
|
|
3967
|
+
const m = u.indexOf(this._offlineEventListener);
|
|
3968
|
+
m !== -1 && (c("removing listener for the 'offline' event"), u.splice(m, 1));
|
|
3969
3969
|
}
|
|
3970
3970
|
this.readyState = "closed", this.id = null, this.emitReserved("close", f, p), this.writeBuffer = [], this._prevBufferLen = 0;
|
|
3971
3971
|
}
|
|
@@ -4089,9 +4089,9 @@ function Bo() {
|
|
|
4089
4089
|
body: o ? n : null,
|
|
4090
4090
|
headers: s,
|
|
4091
4091
|
credentials: this.opts.withCredentials ? "include" : "omit"
|
|
4092
|
-
}).then((
|
|
4092
|
+
}).then((l) => {
|
|
4093
4093
|
var h;
|
|
4094
|
-
return (h = this.socket._cookieJar) === null || h === void 0 || h.parseCookies(
|
|
4094
|
+
return (h = this.socket._cookieJar) === null || h === void 0 || h.parseCookies(l.headers.getSetCookie()), l;
|
|
4095
4095
|
});
|
|
4096
4096
|
}
|
|
4097
4097
|
}
|
|
@@ -4117,7 +4117,7 @@ function jt() {
|
|
|
4117
4117
|
} }), Object.defineProperty(r, "TransportError", { enumerable: !0, get: function() {
|
|
4118
4118
|
return n.TransportError;
|
|
4119
4119
|
} });
|
|
4120
|
-
var i =
|
|
4120
|
+
var i = ur();
|
|
4121
4121
|
Object.defineProperty(r, "transports", { enumerable: !0, get: function() {
|
|
4122
4122
|
return i.transports;
|
|
4123
4123
|
} });
|
|
@@ -4129,9 +4129,9 @@ function jt() {
|
|
|
4129
4129
|
Object.defineProperty(r, "parse", { enumerable: !0, get: function() {
|
|
4130
4130
|
return s.parse;
|
|
4131
4131
|
} });
|
|
4132
|
-
var
|
|
4132
|
+
var l = Le();
|
|
4133
4133
|
Object.defineProperty(r, "nextTick", { enumerable: !0, get: function() {
|
|
4134
|
-
return
|
|
4134
|
+
return l.nextTick;
|
|
4135
4135
|
} });
|
|
4136
4136
|
var h = Bo();
|
|
4137
4137
|
Object.defineProperty(r, "Fetch", { enumerable: !0, get: function() {
|
|
@@ -4145,15 +4145,15 @@ function jt() {
|
|
|
4145
4145
|
Object.defineProperty(r, "XHR", { enumerable: !0, get: function() {
|
|
4146
4146
|
return a.XHR;
|
|
4147
4147
|
} });
|
|
4148
|
-
var
|
|
4148
|
+
var u = Ot();
|
|
4149
4149
|
Object.defineProperty(r, "NodeWebSocket", { enumerable: !0, get: function() {
|
|
4150
|
-
return
|
|
4150
|
+
return u.WS;
|
|
4151
4151
|
} });
|
|
4152
4152
|
var d = Ot();
|
|
4153
4153
|
Object.defineProperty(r, "WebSocket", { enumerable: !0, get: function() {
|
|
4154
4154
|
return d.WS;
|
|
4155
4155
|
} });
|
|
4156
|
-
var v =
|
|
4156
|
+
var v = lr();
|
|
4157
4157
|
Object.defineProperty(r, "WebTransport", { enumerable: !0, get: function() {
|
|
4158
4158
|
return v.WT;
|
|
4159
4159
|
} });
|
|
@@ -4168,11 +4168,11 @@ function Mo() {
|
|
|
4168
4168
|
};
|
|
4169
4169
|
Object.defineProperty(Me, "__esModule", { value: !0 }), Me.url = i;
|
|
4170
4170
|
const e = jt(), n = (0, r(te()).default)("socket.io-client:url");
|
|
4171
|
-
function i(o, s = "",
|
|
4171
|
+
function i(o, s = "", l) {
|
|
4172
4172
|
let h = o;
|
|
4173
|
-
|
|
4173
|
+
l = l || typeof location < "u" && location, o == null && (o = l.protocol + "//" + l.host), typeof o == "string" && (o.charAt(0) === "/" && (o.charAt(1) === "/" ? o = l.protocol + o : o = l.host + o), /^(https?|wss?):\/\//.test(o) || (n("protocol-less url %s", o), typeof l < "u" ? o = l.protocol + "//" + o : o = "https://" + o), n("parse %s", o), h = (0, e.parse)(o)), h.port || (/^(http|ws)$/.test(h.protocol) ? h.port = "80" : /^(http|ws)s$/.test(h.protocol) && (h.port = "443")), h.path = h.path || "/";
|
|
4174
4174
|
const a = h.host.indexOf(":") !== -1 ? "[" + h.host + "]" : h.host;
|
|
4175
|
-
return h.id = h.protocol + "://" + a + ":" + h.port + s, h.href = h.protocol + "://" + a + (
|
|
4175
|
+
return h.id = h.protocol + "://" + a + ":" + h.port + s, h.href = h.protocol + "://" + a + (l && l.port === h.port ? "" : ":" + h.port), h;
|
|
4176
4176
|
}
|
|
4177
4177
|
return Me;
|
|
4178
4178
|
}
|
|
@@ -4180,25 +4180,25 @@ var z = {}, Re = {}, G = {}, Xe = {}, Je = {}, In;
|
|
|
4180
4180
|
function fr() {
|
|
4181
4181
|
if (In) return Je;
|
|
4182
4182
|
In = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.isBinary = o, Je.hasBinary = s;
|
|
4183
|
-
const r = typeof ArrayBuffer == "function", e = (
|
|
4184
|
-
function o(
|
|
4185
|
-
return r && (
|
|
4183
|
+
const r = typeof ArrayBuffer == "function", e = (l) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(l) : l.buffer instanceof ArrayBuffer, t = Object.prototype.toString, n = typeof Blob == "function" || typeof Blob < "u" && t.call(Blob) === "[object BlobConstructor]", i = typeof File == "function" || typeof File < "u" && t.call(File) === "[object FileConstructor]";
|
|
4184
|
+
function o(l) {
|
|
4185
|
+
return r && (l instanceof ArrayBuffer || e(l)) || n && l instanceof Blob || i && l instanceof File;
|
|
4186
4186
|
}
|
|
4187
|
-
function s(
|
|
4188
|
-
if (!
|
|
4187
|
+
function s(l, h) {
|
|
4188
|
+
if (!l || typeof l != "object")
|
|
4189
4189
|
return !1;
|
|
4190
|
-
if (Array.isArray(
|
|
4191
|
-
for (let c = 0, a =
|
|
4192
|
-
if (s(
|
|
4190
|
+
if (Array.isArray(l)) {
|
|
4191
|
+
for (let c = 0, a = l.length; c < a; c++)
|
|
4192
|
+
if (s(l[c]))
|
|
4193
4193
|
return !0;
|
|
4194
4194
|
return !1;
|
|
4195
4195
|
}
|
|
4196
|
-
if (o(
|
|
4196
|
+
if (o(l))
|
|
4197
4197
|
return !0;
|
|
4198
|
-
if (
|
|
4199
|
-
return s(
|
|
4200
|
-
for (const c in
|
|
4201
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
4198
|
+
if (l.toJSON && typeof l.toJSON == "function" && arguments.length === 1)
|
|
4199
|
+
return s(l.toJSON(), !0);
|
|
4200
|
+
for (const c in l)
|
|
4201
|
+
if (Object.prototype.hasOwnProperty.call(l, c) && s(l[c]))
|
|
4202
4202
|
return !0;
|
|
4203
4203
|
return !1;
|
|
4204
4204
|
}
|
|
@@ -4210,25 +4210,25 @@ function jo() {
|
|
|
4210
4210
|
On = 1, Object.defineProperty(Xe, "__esModule", { value: !0 }), Xe.deconstructPacket = e, Xe.reconstructPacket = n;
|
|
4211
4211
|
const r = fr();
|
|
4212
4212
|
function e(o) {
|
|
4213
|
-
const s = [],
|
|
4214
|
-
return h.data = t(
|
|
4213
|
+
const s = [], l = o.data, h = o;
|
|
4214
|
+
return h.data = t(l, s), h.attachments = s.length, { packet: h, buffers: s };
|
|
4215
4215
|
}
|
|
4216
4216
|
function t(o, s) {
|
|
4217
4217
|
if (!o)
|
|
4218
4218
|
return o;
|
|
4219
4219
|
if ((0, r.isBinary)(o)) {
|
|
4220
|
-
const
|
|
4221
|
-
return s.push(o),
|
|
4220
|
+
const l = { _placeholder: !0, num: s.length };
|
|
4221
|
+
return s.push(o), l;
|
|
4222
4222
|
} else if (Array.isArray(o)) {
|
|
4223
|
-
const
|
|
4223
|
+
const l = new Array(o.length);
|
|
4224
4224
|
for (let h = 0; h < o.length; h++)
|
|
4225
|
-
|
|
4226
|
-
return
|
|
4225
|
+
l[h] = t(o[h], s);
|
|
4226
|
+
return l;
|
|
4227
4227
|
} else if (typeof o == "object" && !(o instanceof Date)) {
|
|
4228
|
-
const
|
|
4228
|
+
const l = {};
|
|
4229
4229
|
for (const h in o)
|
|
4230
|
-
Object.prototype.hasOwnProperty.call(o, h) && (
|
|
4231
|
-
return
|
|
4230
|
+
Object.prototype.hasOwnProperty.call(o, h) && (l[h] = t(o[h], s));
|
|
4231
|
+
return l;
|
|
4232
4232
|
}
|
|
4233
4233
|
return o;
|
|
4234
4234
|
}
|
|
@@ -4243,11 +4243,11 @@ function jo() {
|
|
|
4243
4243
|
return s[o.num];
|
|
4244
4244
|
throw new Error("illegal attachments");
|
|
4245
4245
|
} else if (Array.isArray(o))
|
|
4246
|
-
for (let
|
|
4247
|
-
o[
|
|
4246
|
+
for (let l = 0; l < o.length; l++)
|
|
4247
|
+
o[l] = i(o[l], s);
|
|
4248
4248
|
else if (typeof o == "object")
|
|
4249
|
-
for (const
|
|
4250
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
4249
|
+
for (const l in o)
|
|
4250
|
+
Object.prototype.hasOwnProperty.call(o, l) && (o[l] = i(o[l], s));
|
|
4251
4251
|
return o;
|
|
4252
4252
|
}
|
|
4253
4253
|
return Xe;
|
|
@@ -4275,7 +4275,7 @@ function Ft() {
|
|
|
4275
4275
|
(function(f) {
|
|
4276
4276
|
f[f.CONNECT = 0] = "CONNECT", f[f.DISCONNECT = 1] = "DISCONNECT", f[f.EVENT = 2] = "EVENT", f[f.ACK = 3] = "ACK", f[f.CONNECT_ERROR = 4] = "CONNECT_ERROR", f[f.BINARY_EVENT = 5] = "BINARY_EVENT", f[f.BINARY_ACK = 6] = "BINARY_ACK";
|
|
4277
4277
|
})(s || (G.PacketType = s = {}));
|
|
4278
|
-
class
|
|
4278
|
+
class l {
|
|
4279
4279
|
/**
|
|
4280
4280
|
* Encoder constructor
|
|
4281
4281
|
*
|
|
@@ -4315,15 +4315,16 @@ function Ft() {
|
|
|
4315
4315
|
return w.unshift(b), w;
|
|
4316
4316
|
}
|
|
4317
4317
|
}
|
|
4318
|
-
G.Encoder =
|
|
4318
|
+
G.Encoder = l;
|
|
4319
4319
|
class h extends r.Emitter {
|
|
4320
4320
|
/**
|
|
4321
4321
|
* Decoder constructor
|
|
4322
|
-
*
|
|
4323
|
-
* @param {function} reviver - custom reviver to pass down to JSON.stringify
|
|
4324
4322
|
*/
|
|
4325
4323
|
constructor(p) {
|
|
4326
|
-
super(), this.
|
|
4324
|
+
super(), this.opts = Object.assign({
|
|
4325
|
+
reviver: void 0,
|
|
4326
|
+
maxAttachments: 10
|
|
4327
|
+
}, typeof p == "function" ? { reviver: p } : p);
|
|
4327
4328
|
}
|
|
4328
4329
|
/**
|
|
4329
4330
|
* Decodes an encoded packet string into packet JSON.
|
|
@@ -4366,7 +4367,12 @@ function Ft() {
|
|
|
4366
4367
|
const E = p.substring(C, m);
|
|
4367
4368
|
if (E != Number(E) || p.charAt(m) !== "-")
|
|
4368
4369
|
throw new Error("Illegal attachments");
|
|
4369
|
-
|
|
4370
|
+
const P = Number(E);
|
|
4371
|
+
if (!u(P) || P < 0)
|
|
4372
|
+
throw new Error("Illegal attachments");
|
|
4373
|
+
if (P > this.opts.maxAttachments)
|
|
4374
|
+
throw new Error("too many attachments");
|
|
4375
|
+
b.attachments = P;
|
|
4370
4376
|
}
|
|
4371
4377
|
if (p.charAt(m + 1) === "/") {
|
|
4372
4378
|
const C = m + 1;
|
|
@@ -4400,7 +4406,7 @@ function Ft() {
|
|
|
4400
4406
|
}
|
|
4401
4407
|
tryParse(p) {
|
|
4402
4408
|
try {
|
|
4403
|
-
return JSON.parse(p, this.reviver);
|
|
4409
|
+
return JSON.parse(p, this.opts.reviver);
|
|
4404
4410
|
} catch {
|
|
4405
4411
|
return !1;
|
|
4406
4412
|
}
|
|
@@ -4458,11 +4464,11 @@ function Ft() {
|
|
|
4458
4464
|
function a(f) {
|
|
4459
4465
|
return typeof f == "string";
|
|
4460
4466
|
}
|
|
4461
|
-
const
|
|
4467
|
+
const u = Number.isInteger || function(f) {
|
|
4462
4468
|
return typeof f == "number" && isFinite(f) && Math.floor(f) === f;
|
|
4463
4469
|
};
|
|
4464
4470
|
function d(f) {
|
|
4465
|
-
return f === void 0 ||
|
|
4471
|
+
return f === void 0 || u(f);
|
|
4466
4472
|
}
|
|
4467
4473
|
function v(f) {
|
|
4468
4474
|
return Object.prototype.toString.call(f) === "[object Object]";
|
|
@@ -4516,12 +4522,12 @@ function pr() {
|
|
|
4516
4522
|
newListener: 1,
|
|
4517
4523
|
removeListener: 1
|
|
4518
4524
|
});
|
|
4519
|
-
class
|
|
4525
|
+
class l extends n.Emitter {
|
|
4520
4526
|
/**
|
|
4521
4527
|
* `Socket` constructor.
|
|
4522
4528
|
*/
|
|
4523
|
-
constructor(c, a,
|
|
4524
|
-
super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = c, this.nsp = a,
|
|
4529
|
+
constructor(c, a, u) {
|
|
4530
|
+
super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = c, this.nsp = a, u && u.auth && (this.auth = u.auth), this._opts = Object.assign({}, u), this.io._autoConnect && this.open();
|
|
4525
4531
|
}
|
|
4526
4532
|
/**
|
|
4527
4533
|
* Whether the socket is currently disconnected
|
|
@@ -4631,7 +4637,7 @@ function pr() {
|
|
|
4631
4637
|
* @return self
|
|
4632
4638
|
*/
|
|
4633
4639
|
emit(c, ...a) {
|
|
4634
|
-
var
|
|
4640
|
+
var u, d, v;
|
|
4635
4641
|
if (s.hasOwnProperty(c))
|
|
4636
4642
|
throw new Error('"' + c.toString() + '" is a reserved event name');
|
|
4637
4643
|
if (a.unshift(c), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
|
|
@@ -4646,15 +4652,15 @@ function pr() {
|
|
|
4646
4652
|
const b = a.pop();
|
|
4647
4653
|
this._registerAckCallback(m, b), _.id = m;
|
|
4648
4654
|
}
|
|
4649
|
-
const g = (d = (
|
|
4655
|
+
const g = (d = (u = this.io.engine) === null || u === void 0 ? void 0 : u.transport) === null || d === void 0 ? void 0 : d.writable, f = this.connected && !(!((v = this.io.engine) === null || v === void 0) && v._hasPingExpired());
|
|
4650
4656
|
return this.flags.volatile && !g ? o("discard packet as the transport is not currently writable") : f ? (this.notifyOutgoingListeners(_), this.packet(_)) : this.sendBuffer.push(_), this.flags = {}, this;
|
|
4651
4657
|
}
|
|
4652
4658
|
/**
|
|
4653
4659
|
* @private
|
|
4654
4660
|
*/
|
|
4655
4661
|
_registerAckCallback(c, a) {
|
|
4656
|
-
var
|
|
4657
|
-
const d = (
|
|
4662
|
+
var u;
|
|
4663
|
+
const d = (u = this.flags.timeout) !== null && u !== void 0 ? u : this._opts.ackTimeout;
|
|
4658
4664
|
if (d === void 0) {
|
|
4659
4665
|
this.acks[c] = a;
|
|
4660
4666
|
return;
|
|
@@ -4686,8 +4692,8 @@ function pr() {
|
|
|
4686
4692
|
* @return a Promise that will be fulfilled when the server acknowledges the event
|
|
4687
4693
|
*/
|
|
4688
4694
|
emitWithAck(c, ...a) {
|
|
4689
|
-
return new Promise((
|
|
4690
|
-
const v = (_, g) => _ ? d(_) :
|
|
4695
|
+
return new Promise((u, d) => {
|
|
4696
|
+
const v = (_, g) => _ ? d(_) : u(g);
|
|
4691
4697
|
v.withError = !0, a.push(v), this.emit(c, ...a);
|
|
4692
4698
|
});
|
|
4693
4699
|
}
|
|
@@ -4699,14 +4705,14 @@ function pr() {
|
|
|
4699
4705
|
_addToQueue(c) {
|
|
4700
4706
|
let a;
|
|
4701
4707
|
typeof c[c.length - 1] == "function" && (a = c.pop());
|
|
4702
|
-
const
|
|
4708
|
+
const u = {
|
|
4703
4709
|
id: this._queueSeq++,
|
|
4704
4710
|
tryCount: 0,
|
|
4705
4711
|
pending: !1,
|
|
4706
4712
|
args: c,
|
|
4707
4713
|
flags: Object.assign({ fromQueue: !0 }, this.flags)
|
|
4708
4714
|
};
|
|
4709
|
-
c.push((d, ...v) =>
|
|
4715
|
+
c.push((d, ...v) => u !== this._queue[0] ? o("packet [%d] already acknowledged", u.id) : (d !== null ? u.tryCount > this._opts.retries && (o("packet [%d] is discarded after %d tries", u.id, u.tryCount), this._queue.shift(), a && a(d)) : (o("packet [%d] was successfully sent", u.id), this._queue.shift(), a && a(null, ...v)), u.pending = !1, this._drainQueue())), this._queue.push(u), this._drainQueue();
|
|
4710
4716
|
}
|
|
4711
4717
|
/**
|
|
4712
4718
|
* Send the first packet of the queue, and wait for an acknowledgement from the server.
|
|
@@ -4782,9 +4788,9 @@ function pr() {
|
|
|
4782
4788
|
*/
|
|
4783
4789
|
_clearAcks() {
|
|
4784
4790
|
Object.keys(this.acks).forEach((c) => {
|
|
4785
|
-
if (!this.sendBuffer.some((
|
|
4786
|
-
const
|
|
4787
|
-
delete this.acks[c],
|
|
4791
|
+
if (!this.sendBuffer.some((u) => String(u.id) === c)) {
|
|
4792
|
+
const u = this.acks[c];
|
|
4793
|
+
delete this.acks[c], u.withError && u.call(this, new Error("socket has been disconnected"));
|
|
4788
4794
|
}
|
|
4789
4795
|
});
|
|
4790
4796
|
}
|
|
@@ -4813,8 +4819,8 @@ function pr() {
|
|
|
4813
4819
|
break;
|
|
4814
4820
|
case e.PacketType.CONNECT_ERROR:
|
|
4815
4821
|
this.destroy();
|
|
4816
|
-
const
|
|
4817
|
-
|
|
4822
|
+
const u = new Error(c.data.message);
|
|
4823
|
+
u.data = c.data.data, this.emitReserved("connect_error", u);
|
|
4818
4824
|
break;
|
|
4819
4825
|
}
|
|
4820
4826
|
}
|
|
@@ -4831,8 +4837,8 @@ function pr() {
|
|
|
4831
4837
|
emitEvent(c) {
|
|
4832
4838
|
if (this._anyListeners && this._anyListeners.length) {
|
|
4833
4839
|
const a = this._anyListeners.slice();
|
|
4834
|
-
for (const
|
|
4835
|
-
|
|
4840
|
+
for (const u of a)
|
|
4841
|
+
u.apply(this, c);
|
|
4836
4842
|
}
|
|
4837
4843
|
super.emit.apply(this, c), this._pid && c.length && typeof c[c.length - 1] == "string" && (this._lastOffset = c[c.length - 1]);
|
|
4838
4844
|
}
|
|
@@ -4843,9 +4849,9 @@ function pr() {
|
|
|
4843
4849
|
*/
|
|
4844
4850
|
ack(c) {
|
|
4845
4851
|
const a = this;
|
|
4846
|
-
let
|
|
4852
|
+
let u = !1;
|
|
4847
4853
|
return function(...d) {
|
|
4848
|
-
|
|
4854
|
+
u || (u = !0, o("sending ack %j", d), a.packet({
|
|
4849
4855
|
type: e.PacketType.ACK,
|
|
4850
4856
|
id: c,
|
|
4851
4857
|
data: d
|
|
@@ -5020,9 +5026,9 @@ function pr() {
|
|
|
5020
5026
|
return this;
|
|
5021
5027
|
if (c) {
|
|
5022
5028
|
const a = this._anyListeners;
|
|
5023
|
-
for (let
|
|
5024
|
-
if (c === a[
|
|
5025
|
-
return a.splice(
|
|
5029
|
+
for (let u = 0; u < a.length; u++)
|
|
5030
|
+
if (c === a[u])
|
|
5031
|
+
return a.splice(u, 1), this;
|
|
5026
5032
|
} else
|
|
5027
5033
|
this._anyListeners = [];
|
|
5028
5034
|
return this;
|
|
@@ -5089,9 +5095,9 @@ function pr() {
|
|
|
5089
5095
|
return this;
|
|
5090
5096
|
if (c) {
|
|
5091
5097
|
const a = this._anyOutgoingListeners;
|
|
5092
|
-
for (let
|
|
5093
|
-
if (c === a[
|
|
5094
|
-
return a.splice(
|
|
5098
|
+
for (let u = 0; u < a.length; u++)
|
|
5099
|
+
if (c === a[u])
|
|
5100
|
+
return a.splice(u, 1), this;
|
|
5095
5101
|
} else
|
|
5096
5102
|
this._anyOutgoingListeners = [];
|
|
5097
5103
|
return this;
|
|
@@ -5113,12 +5119,12 @@ function pr() {
|
|
|
5113
5119
|
notifyOutgoingListeners(c) {
|
|
5114
5120
|
if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) {
|
|
5115
5121
|
const a = this._anyOutgoingListeners.slice();
|
|
5116
|
-
for (const
|
|
5117
|
-
|
|
5122
|
+
for (const u of a)
|
|
5123
|
+
u.apply(this, c.data);
|
|
5118
5124
|
}
|
|
5119
5125
|
}
|
|
5120
5126
|
}
|
|
5121
|
-
return Re.Socket =
|
|
5127
|
+
return Re.Socket = l, Re;
|
|
5122
5128
|
}
|
|
5123
5129
|
var at = {}, Bn;
|
|
5124
5130
|
function Fo() {
|
|
@@ -5169,7 +5175,7 @@ function qo() {
|
|
|
5169
5175
|
return v && v.__esModule ? v : { default: v };
|
|
5170
5176
|
};
|
|
5171
5177
|
Object.defineProperty(z, "__esModule", { value: !0 }), z.Manager = void 0;
|
|
5172
|
-
const i = jt(), o = pr(), s = t(Ft()),
|
|
5178
|
+
const i = jt(), o = pr(), s = t(Ft()), l = dr(), h = Fo(), c = xe, u = (0, n(te()).default)("socket.io-client:manager");
|
|
5173
5179
|
class d extends c.Emitter {
|
|
5174
5180
|
constructor(_, g) {
|
|
5175
5181
|
var f;
|
|
@@ -5219,21 +5225,21 @@ function qo() {
|
|
|
5219
5225
|
* @public
|
|
5220
5226
|
*/
|
|
5221
5227
|
open(_) {
|
|
5222
|
-
if (
|
|
5228
|
+
if (u("readyState %s", this._readyState), ~this._readyState.indexOf("open"))
|
|
5223
5229
|
return this;
|
|
5224
|
-
|
|
5230
|
+
u("opening %s", this.uri), this.engine = new i.Socket(this.uri, this.opts);
|
|
5225
5231
|
const g = this.engine, f = this;
|
|
5226
5232
|
this._readyState = "opening", this.skipReconnect = !1;
|
|
5227
|
-
const p = (0,
|
|
5233
|
+
const p = (0, l.on)(g, "open", function() {
|
|
5228
5234
|
f.onopen(), _ && _();
|
|
5229
5235
|
}), m = (w) => {
|
|
5230
|
-
|
|
5231
|
-
}, b = (0,
|
|
5236
|
+
u("error"), this.cleanup(), this._readyState = "closed", this.emitReserved("error", w), _ ? _(w) : this.maybeReconnectOnOpen();
|
|
5237
|
+
}, b = (0, l.on)(g, "error", m);
|
|
5232
5238
|
if (this._timeout !== !1) {
|
|
5233
5239
|
const w = this._timeout;
|
|
5234
|
-
|
|
5240
|
+
u("connect attempt will timeout after %d", w);
|
|
5235
5241
|
const C = this.setTimeoutFn(() => {
|
|
5236
|
-
|
|
5242
|
+
u("connect attempt timed out after %d", w), p(), m(new Error("timeout")), g.close();
|
|
5237
5243
|
}, w);
|
|
5238
5244
|
this.opts.autoUnref && C.unref(), this.subs.push(() => {
|
|
5239
5245
|
this.clearTimeoutFn(C);
|
|
@@ -5256,15 +5262,15 @@ function qo() {
|
|
|
5256
5262
|
* @private
|
|
5257
5263
|
*/
|
|
5258
5264
|
onopen() {
|
|
5259
|
-
|
|
5265
|
+
u("open"), this.cleanup(), this._readyState = "open", this.emitReserved("open");
|
|
5260
5266
|
const _ = this.engine;
|
|
5261
5267
|
this.subs.push(
|
|
5262
|
-
(0,
|
|
5263
|
-
(0,
|
|
5264
|
-
(0,
|
|
5265
|
-
(0,
|
|
5268
|
+
(0, l.on)(_, "ping", this.onping.bind(this)),
|
|
5269
|
+
(0, l.on)(_, "data", this.ondata.bind(this)),
|
|
5270
|
+
(0, l.on)(_, "error", this.onerror.bind(this)),
|
|
5271
|
+
(0, l.on)(_, "close", this.onclose.bind(this)),
|
|
5266
5272
|
// @ts-ignore
|
|
5267
|
-
(0,
|
|
5273
|
+
(0, l.on)(this.decoder, "decoded", this.ondecoded.bind(this))
|
|
5268
5274
|
);
|
|
5269
5275
|
}
|
|
5270
5276
|
/**
|
|
@@ -5303,7 +5309,7 @@ function qo() {
|
|
|
5303
5309
|
* @private
|
|
5304
5310
|
*/
|
|
5305
5311
|
onerror(_) {
|
|
5306
|
-
|
|
5312
|
+
u("error", _), this.emitReserved("error", _);
|
|
5307
5313
|
}
|
|
5308
5314
|
/**
|
|
5309
5315
|
* Creates a new socket for the given `nsp`.
|
|
@@ -5325,7 +5331,7 @@ function qo() {
|
|
|
5325
5331
|
const g = Object.keys(this.nsps);
|
|
5326
5332
|
for (const f of g)
|
|
5327
5333
|
if (this.nsps[f].active) {
|
|
5328
|
-
|
|
5334
|
+
u("socket %s is still active, skipping close", f);
|
|
5329
5335
|
return;
|
|
5330
5336
|
}
|
|
5331
5337
|
this._close();
|
|
@@ -5337,7 +5343,7 @@ function qo() {
|
|
|
5337
5343
|
* @private
|
|
5338
5344
|
*/
|
|
5339
5345
|
_packet(_) {
|
|
5340
|
-
|
|
5346
|
+
u("writing packet %j", _);
|
|
5341
5347
|
const g = this.encoder.encode(_);
|
|
5342
5348
|
for (let f = 0; f < g.length; f++)
|
|
5343
5349
|
this.engine.write(g[f], _.options);
|
|
@@ -5348,7 +5354,7 @@ function qo() {
|
|
|
5348
5354
|
* @private
|
|
5349
5355
|
*/
|
|
5350
5356
|
cleanup() {
|
|
5351
|
-
|
|
5357
|
+
u("cleanup"), this.subs.forEach((_) => _()), this.subs.length = 0, this.decoder.destroy();
|
|
5352
5358
|
}
|
|
5353
5359
|
/**
|
|
5354
5360
|
* Close the current socket.
|
|
@@ -5356,7 +5362,7 @@ function qo() {
|
|
|
5356
5362
|
* @private
|
|
5357
5363
|
*/
|
|
5358
5364
|
_close() {
|
|
5359
|
-
|
|
5365
|
+
u("disconnect"), this.skipReconnect = !0, this._reconnecting = !1, this.onclose("forced close");
|
|
5360
5366
|
}
|
|
5361
5367
|
/**
|
|
5362
5368
|
* Alias for close()
|
|
@@ -5377,7 +5383,7 @@ function qo() {
|
|
|
5377
5383
|
*/
|
|
5378
5384
|
onclose(_, g) {
|
|
5379
5385
|
var f;
|
|
5380
|
-
|
|
5386
|
+
u("closed due to %s", _), this.cleanup(), (f = this.engine) === null || f === void 0 || f.close(), this.backoff.reset(), this._readyState = "closed", this.emitReserved("close", _, g), this._reconnection && !this.skipReconnect && this.reconnect();
|
|
5381
5387
|
}
|
|
5382
5388
|
/**
|
|
5383
5389
|
* Attempt a reconnection.
|
|
@@ -5389,13 +5395,13 @@ function qo() {
|
|
|
5389
5395
|
return this;
|
|
5390
5396
|
const _ = this;
|
|
5391
5397
|
if (this.backoff.attempts >= this._reconnectionAttempts)
|
|
5392
|
-
|
|
5398
|
+
u("reconnect failed"), this.backoff.reset(), this.emitReserved("reconnect_failed"), this._reconnecting = !1;
|
|
5393
5399
|
else {
|
|
5394
5400
|
const g = this.backoff.duration();
|
|
5395
|
-
|
|
5401
|
+
u("will wait %dms before reconnect attempt", g), this._reconnecting = !0;
|
|
5396
5402
|
const f = this.setTimeoutFn(() => {
|
|
5397
|
-
_.skipReconnect || (
|
|
5398
|
-
p ? (
|
|
5403
|
+
_.skipReconnect || (u("attempting reconnect"), this.emitReserved("reconnect_attempt", _.backoff.attempts), !_.skipReconnect && _.open((p) => {
|
|
5404
|
+
p ? (u("reconnect attempt error"), _._reconnecting = !1, _.reconnect(), this.emitReserved("reconnect_error", p)) : (u("reconnect success"), _.onreconnect());
|
|
5399
5405
|
}));
|
|
5400
5406
|
}, g);
|
|
5401
5407
|
this.opts.autoUnref && f.unref(), this.subs.push(() => {
|
|
@@ -5430,12 +5436,12 @@ function xo() {
|
|
|
5430
5436
|
Object.defineProperty(e, "Socket", { enumerable: !0, get: function() {
|
|
5431
5437
|
return o.Socket;
|
|
5432
5438
|
} });
|
|
5433
|
-
const
|
|
5439
|
+
const l = (0, t(te()).default)("socket.io-client"), h = {};
|
|
5434
5440
|
function c(d, v) {
|
|
5435
5441
|
typeof d == "object" && (v = d, d = void 0), v = v || {};
|
|
5436
5442
|
const _ = (0, n.url)(d, v.path || "/socket.io"), g = _.source, f = _.id, p = _.path, m = h[f] && p in h[f].nsps, b = v.forceNew || v["force new connection"] || v.multiplex === !1 || m;
|
|
5437
5443
|
let w;
|
|
5438
|
-
return b ? (
|
|
5444
|
+
return b ? (l("ignoring socket cache for %s", g), w = new i.Manager(g, v)) : (h[f] || (l("new io instance for %s", g), h[f] = new i.Manager(g, v)), w = h[f]), _.query && !v.query && (v.query = _.queryKey), w.socket(_.path, v);
|
|
5439
5445
|
}
|
|
5440
5446
|
Object.assign(c, {
|
|
5441
5447
|
Manager: i.Manager,
|
|
@@ -5447,19 +5453,19 @@ function xo() {
|
|
|
5447
5453
|
Object.defineProperty(e, "protocol", { enumerable: !0, get: function() {
|
|
5448
5454
|
return a.protocol;
|
|
5449
5455
|
} });
|
|
5450
|
-
var
|
|
5456
|
+
var u = jt();
|
|
5451
5457
|
Object.defineProperty(e, "Fetch", { enumerable: !0, get: function() {
|
|
5452
|
-
return
|
|
5458
|
+
return u.Fetch;
|
|
5453
5459
|
} }), Object.defineProperty(e, "NodeXHR", { enumerable: !0, get: function() {
|
|
5454
|
-
return
|
|
5460
|
+
return u.NodeXHR;
|
|
5455
5461
|
} }), Object.defineProperty(e, "XHR", { enumerable: !0, get: function() {
|
|
5456
|
-
return
|
|
5462
|
+
return u.XHR;
|
|
5457
5463
|
} }), Object.defineProperty(e, "NodeWebSocket", { enumerable: !0, get: function() {
|
|
5458
|
-
return
|
|
5464
|
+
return u.NodeWebSocket;
|
|
5459
5465
|
} }), Object.defineProperty(e, "WebSocket", { enumerable: !0, get: function() {
|
|
5460
|
-
return
|
|
5466
|
+
return u.WebSocket;
|
|
5461
5467
|
} }), Object.defineProperty(e, "WebTransport", { enumerable: !0, get: function() {
|
|
5462
|
-
return
|
|
5468
|
+
return u.WebTransport;
|
|
5463
5469
|
} }), r.exports = c;
|
|
5464
5470
|
})(Qe, Qe.exports)), Qe.exports;
|
|
5465
5471
|
}
|
|
@@ -5485,7 +5491,7 @@ function Lo() {
|
|
|
5485
5491
|
return a && a.__esModule ? a : { default: a };
|
|
5486
5492
|
};
|
|
5487
5493
|
Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.providerFactory = void 0;
|
|
5488
|
-
const e = r(se()), t = ie, n = r(Bt()), i = _r(), o = J(), s = "IS_SOCKET_CONNECTED",
|
|
5494
|
+
const e = r(se()), t = ie, n = r(Bt()), i = _r(), o = J(), s = "IS_SOCKET_CONNECTED", l = "KEY_LAST_CONNECTION_TIME";
|
|
5489
5495
|
function h(a) {
|
|
5490
5496
|
return ({ url: d, connectEnabled: v = !0, automaticReconnect: _ = !0, children: g, dependencies: f = [], accessTokenFactory: p, onError: m, ...b }) => {
|
|
5491
5497
|
const w = (0, o.useEvent)(m), C = (0, o.useEvent)(p), E = (0, t.useRef)(() => {
|
|
@@ -5507,7 +5513,7 @@ function Lo() {
|
|
|
5507
5513
|
...b
|
|
5508
5514
|
});
|
|
5509
5515
|
a.connection = k, a.reOn();
|
|
5510
|
-
let O = Number(n.default.get(
|
|
5516
|
+
let O = Number(n.default.get(l)) || null, ne = null;
|
|
5511
5517
|
e.default.on(s, ($) => {
|
|
5512
5518
|
if (!$) {
|
|
5513
5519
|
O = null, ne = null, re();
|
|
@@ -5556,13 +5562,13 @@ function Lo() {
|
|
|
5556
5562
|
Ce.providerFactory = h;
|
|
5557
5563
|
function c(a) {
|
|
5558
5564
|
if (!a) {
|
|
5559
|
-
e.default.send(s, ""), n.default.set(
|
|
5565
|
+
e.default.send(s, ""), n.default.set(l, "");
|
|
5560
5566
|
return;
|
|
5561
5567
|
}
|
|
5562
5568
|
e.default.send(s, a);
|
|
5563
|
-
const
|
|
5564
|
-
|
|
5565
|
-
expires:
|
|
5569
|
+
const u = /* @__PURE__ */ new Date();
|
|
5570
|
+
u.setSeconds(u.getSeconds() + 10), n.default.set(l, Date.now().toString(), {
|
|
5571
|
+
expires: u,
|
|
5566
5572
|
path: "/"
|
|
5567
5573
|
});
|
|
5568
5574
|
}
|
|
@@ -5574,11 +5580,11 @@ function Uo() {
|
|
|
5574
5580
|
Ln = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.providerNativeFactory = void 0;
|
|
5575
5581
|
const r = ie, e = J(), t = _r();
|
|
5576
5582
|
function n(i) {
|
|
5577
|
-
return ({ url: s, connectEnabled:
|
|
5578
|
-
const _ = (0, e.useEvent)(d), g = (0, e.useEvent)(
|
|
5583
|
+
return ({ url: s, connectEnabled: l = !0, automaticReconnect: h = !0, children: c, dependencies: a = [], accessTokenFactory: u, onError: d, ...v }) => {
|
|
5584
|
+
const _ = (0, e.useEvent)(d), g = (0, e.useEvent)(u), f = (0, r.useRef)(() => {
|
|
5579
5585
|
});
|
|
5580
5586
|
async function p() {
|
|
5581
|
-
if (!
|
|
5587
|
+
if (!l)
|
|
5582
5588
|
return;
|
|
5583
5589
|
const b = (0, t.createConnection)(s, {
|
|
5584
5590
|
extraHeaders: {
|
|
@@ -5608,7 +5614,7 @@ function Uo() {
|
|
|
5608
5614
|
const m = (0, r.useRef)(!1);
|
|
5609
5615
|
return (0, r.useEffect)(() => (m.current && p(), m.current = !0, () => {
|
|
5610
5616
|
f.current();
|
|
5611
|
-
}), [
|
|
5617
|
+
}), [l, s, ...a]), c;
|
|
5612
5618
|
};
|
|
5613
5619
|
}
|
|
5614
5620
|
return Ye.providerNativeFactory = n, Ye;
|
|
@@ -5622,29 +5628,29 @@ function Ho() {
|
|
|
5622
5628
|
};
|
|
5623
5629
|
Object.defineProperty(be, "__esModule", { value: !0 }), be.createSocketIoContext = void 0;
|
|
5624
5630
|
const e = r(se()), t = J(), n = Eo(), i = Lo(), o = Uo(), s = "SOCEKT_IO_SEND";
|
|
5625
|
-
function
|
|
5631
|
+
function l(h) {
|
|
5626
5632
|
const c = [], a = {
|
|
5627
5633
|
connection: null,
|
|
5628
5634
|
useSocketEffect: null,
|
|
5629
5635
|
shareConnectionBetweenTab: h?.shareConnectionBetweenTab || !1,
|
|
5630
|
-
invoke: (
|
|
5636
|
+
invoke: (u, ...d) => {
|
|
5631
5637
|
var v;
|
|
5632
5638
|
if (!a.shareConnectionBetweenTab) {
|
|
5633
|
-
(v = a.connection) === null || v === void 0 || v.emit(
|
|
5639
|
+
(v = a.connection) === null || v === void 0 || v.emit(u, ...d);
|
|
5634
5640
|
return;
|
|
5635
5641
|
}
|
|
5636
|
-
(0, t.sendWithHermes)(s, { methodName:
|
|
5642
|
+
(0, t.sendWithHermes)(s, { methodName: u, args: d }, a.shareConnectionBetweenTab);
|
|
5637
5643
|
},
|
|
5638
5644
|
Provider: null,
|
|
5639
|
-
on: (
|
|
5645
|
+
on: (u) => {
|
|
5640
5646
|
var d;
|
|
5641
|
-
c.includes(
|
|
5642
|
-
(0, t.sendWithHermes)(
|
|
5643
|
-
}), c.push(
|
|
5647
|
+
c.includes(u) || (d = a.connection) === null || d === void 0 || d.on(u, (v) => {
|
|
5648
|
+
(0, t.sendWithHermes)(u, v, a.shareConnectionBetweenTab);
|
|
5649
|
+
}), c.push(u);
|
|
5644
5650
|
},
|
|
5645
|
-
off: (
|
|
5651
|
+
off: (u) => {
|
|
5646
5652
|
var d;
|
|
5647
|
-
c.includes(
|
|
5653
|
+
c.includes(u) && c.splice(c.indexOf(u), 1), c.includes(u) || (d = a.connection) === null || d === void 0 || d.off(u);
|
|
5648
5654
|
},
|
|
5649
5655
|
//@ts-ignore
|
|
5650
5656
|
reOn: () => {
|
|
@@ -5656,22 +5662,22 @@ function Ho() {
|
|
|
5656
5662
|
});
|
|
5657
5663
|
}
|
|
5658
5664
|
};
|
|
5659
|
-
return a.Provider = a.shareConnectionBetweenTab ? (0, i.providerFactory)(a) : (0, o.providerNativeFactory)(a), a.useSocketEffect = (0, n.createUseSocketEffect)(a), e.default.on(s, (
|
|
5665
|
+
return a.Provider = a.shareConnectionBetweenTab ? (0, i.providerFactory)(a) : (0, o.providerNativeFactory)(a), a.useSocketEffect = (0, n.createUseSocketEffect)(a), e.default.on(s, (u) => {
|
|
5660
5666
|
var d;
|
|
5661
|
-
!((d = a.connection) === null || d === void 0) && d.connected && a.connection.emit(
|
|
5667
|
+
!((d = a.connection) === null || d === void 0) && d.connected && a.connection.emit(u.methodName, ...u.args);
|
|
5662
5668
|
}), a;
|
|
5663
5669
|
}
|
|
5664
|
-
return be.createSocketIoContext =
|
|
5670
|
+
return be.createSocketIoContext = l, be;
|
|
5665
5671
|
}
|
|
5666
5672
|
var Hn;
|
|
5667
5673
|
function Wo() {
|
|
5668
5674
|
return Hn || (Hn = 1, (function(r) {
|
|
5669
5675
|
var e = ye && ye.__createBinding || (Object.create ? (function(n, i, o, s) {
|
|
5670
5676
|
s === void 0 && (s = o);
|
|
5671
|
-
var
|
|
5672
|
-
(!
|
|
5677
|
+
var l = Object.getOwnPropertyDescriptor(i, o);
|
|
5678
|
+
(!l || ("get" in l ? !i.__esModule : l.writable || l.configurable)) && (l = { enumerable: !0, get: function() {
|
|
5673
5679
|
return i[o];
|
|
5674
|
-
} }), Object.defineProperty(n, s,
|
|
5680
|
+
} }), Object.defineProperty(n, s, l);
|
|
5675
5681
|
}) : (function(n, i, o, s) {
|
|
5676
5682
|
s === void 0 && (s = o), n[s] = i[o];
|
|
5677
5683
|
})), t = ye && ye.__exportStar || function(n, i) {
|
|
@@ -5680,36 +5686,36 @@ function Wo() {
|
|
|
5680
5686
|
Object.defineProperty(r, "__esModule", { value: !0 }), t(Ho(), r);
|
|
5681
5687
|
})(ye)), ye;
|
|
5682
5688
|
}
|
|
5683
|
-
var Ie = {}, Oe = {}, Ae = {},
|
|
5689
|
+
var Ie = {}, Oe = {}, Ae = {}, ue = {}, Wn;
|
|
5684
5690
|
function qt() {
|
|
5685
|
-
if (Wn) return
|
|
5686
|
-
Wn = 1, Object.defineProperty(
|
|
5691
|
+
if (Wn) return ue;
|
|
5692
|
+
Wn = 1, Object.defineProperty(ue, "__esModule", { value: !0 }), ue.getMessageEvent = ue.createConnection = ue.isConnectionConnecting = void 0;
|
|
5687
5693
|
const r = J();
|
|
5688
5694
|
function e(i) {
|
|
5689
5695
|
return i && (i.readyState === WebSocket.CONNECTING || i.readyState === WebSocket.OPEN);
|
|
5690
5696
|
}
|
|
5691
|
-
|
|
5692
|
-
function t(i, { url: o, onOpen: s, onClose:
|
|
5693
|
-
let
|
|
5694
|
-
return a ?
|
|
5697
|
+
ue.isConnectionConnecting = e;
|
|
5698
|
+
function t(i, { url: o, onOpen: s, onClose: l, onErrorRef: h, logger: c, headers: a }) {
|
|
5699
|
+
let u;
|
|
5700
|
+
return a ? u = new WebSocket(o, null, {
|
|
5695
5701
|
headers: a
|
|
5696
|
-
}) :
|
|
5697
|
-
s?.(
|
|
5698
|
-
},
|
|
5702
|
+
}) : u = new WebSocket(o), u.onopen = () => {
|
|
5703
|
+
s?.(u), c?.log("webSocket connected");
|
|
5704
|
+
}, u.onmessage = (d) => {
|
|
5699
5705
|
const v = d.data ? JSON.parse(d.data.toString()) : {};
|
|
5700
5706
|
(0, r.sendWithHermes)(n(i), v, i.shareConnectionBetweenTab);
|
|
5701
|
-
},
|
|
5702
|
-
|
|
5703
|
-
},
|
|
5707
|
+
}, u.onclose = (d) => {
|
|
5708
|
+
l?.(d), c?.log("webSocket closed", d);
|
|
5709
|
+
}, u.onerror = (d) => {
|
|
5704
5710
|
var v;
|
|
5705
5711
|
return (v = h.current) === null || v === void 0 ? void 0 : v.call(h, d);
|
|
5706
|
-
}, i.connection =
|
|
5712
|
+
}, i.connection = u, u;
|
|
5707
5713
|
}
|
|
5708
|
-
|
|
5714
|
+
ue.createConnection = t;
|
|
5709
5715
|
function n(i) {
|
|
5710
5716
|
return i.key + "WEB_SOCKET_EVENT";
|
|
5711
5717
|
}
|
|
5712
|
-
return
|
|
5718
|
+
return ue.getMessageEvent = n, ue;
|
|
5713
5719
|
}
|
|
5714
5720
|
var $n;
|
|
5715
5721
|
function $o() {
|
|
@@ -5724,8 +5730,8 @@ function $o() {
|
|
|
5724
5730
|
return (h) => {
|
|
5725
5731
|
const c = (0, n.useEvent)(h);
|
|
5726
5732
|
(0, t.useEffect)(() => {
|
|
5727
|
-
function a(
|
|
5728
|
-
c(
|
|
5733
|
+
function a(u) {
|
|
5734
|
+
c(u);
|
|
5729
5735
|
}
|
|
5730
5736
|
return e.default.on((0, i.getMessageEvent)(s), a), () => {
|
|
5731
5737
|
e.default.off((0, i.getMessageEvent)(s), a);
|
|
@@ -5743,7 +5749,7 @@ function Vo() {
|
|
|
5743
5749
|
return a && a.__esModule ? a : { default: a };
|
|
5744
5750
|
};
|
|
5745
5751
|
Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.providerFactory = void 0;
|
|
5746
|
-
const e = r(se()), t = ie, n = r(Bt()), i = qt(), o = J(), s = "IS_SIGNAL_R_CONNECTED",
|
|
5752
|
+
const e = r(se()), t = ie, n = r(Bt()), i = qt(), o = J(), s = "IS_SIGNAL_R_CONNECTED", l = "KEY_LAST_CONNECTION_TIME";
|
|
5747
5753
|
function h(a) {
|
|
5748
5754
|
return ({ url: d, connectEnabled: v = !0, children: _, dependencies: g = [], onError: f, onOpen: p, onClose: m, logger: b = o.__DEV__ ? console : null }) => {
|
|
5749
5755
|
const w = (0, o.useEvent)(f), C = (0, t.useRef)(() => {
|
|
@@ -5752,7 +5758,7 @@ function Vo() {
|
|
|
5752
5758
|
var F;
|
|
5753
5759
|
if (!v)
|
|
5754
5760
|
return;
|
|
5755
|
-
let I = Number(n.default.get(
|
|
5761
|
+
let I = Number(n.default.get(l)) || null, k = null;
|
|
5756
5762
|
e.default.on(s, (T) => {
|
|
5757
5763
|
var N;
|
|
5758
5764
|
if (!T) {
|
|
@@ -5810,13 +5816,13 @@ function Vo() {
|
|
|
5810
5816
|
Ne.providerFactory = h;
|
|
5811
5817
|
function c(a) {
|
|
5812
5818
|
if (!a) {
|
|
5813
|
-
e.default.send(s, ""), n.default.set(
|
|
5819
|
+
e.default.send(s, ""), n.default.set(l, "");
|
|
5814
5820
|
return;
|
|
5815
5821
|
}
|
|
5816
5822
|
e.default.send(s, a);
|
|
5817
|
-
const
|
|
5818
|
-
|
|
5819
|
-
expires:
|
|
5823
|
+
const u = /* @__PURE__ */ new Date();
|
|
5824
|
+
u.setSeconds(u.getSeconds() + 10), n.default.set(l, Date.now().toString(), {
|
|
5825
|
+
expires: u,
|
|
5820
5826
|
path: "/"
|
|
5821
5827
|
});
|
|
5822
5828
|
}
|
|
@@ -5828,18 +5834,18 @@ function Ko() {
|
|
|
5828
5834
|
Kn = 1, Object.defineProperty(Ge, "__esModule", { value: !0 }), Ge.providerNativeFactory = void 0;
|
|
5829
5835
|
const r = ie, e = J(), t = qt();
|
|
5830
5836
|
function n(i) {
|
|
5831
|
-
return ({ url: s, connectEnabled:
|
|
5837
|
+
return ({ url: s, connectEnabled: l = !0, children: h, dependencies: c = [], onError: a, onOpen: u, onClose: d, logger: v = console, headers: _ }) => {
|
|
5832
5838
|
const g = (0, e.useEvent)(a), f = (0, r.useRef)(() => {
|
|
5833
5839
|
});
|
|
5834
5840
|
function p() {
|
|
5835
|
-
if (!
|
|
5841
|
+
if (!l)
|
|
5836
5842
|
return;
|
|
5837
5843
|
async function b() {
|
|
5838
5844
|
if (!(0, t.isConnectionConnecting)(i.connection))
|
|
5839
5845
|
try {
|
|
5840
5846
|
(0, t.createConnection)(i, {
|
|
5841
5847
|
onClose: d,
|
|
5842
|
-
onOpen:
|
|
5848
|
+
onOpen: u,
|
|
5843
5849
|
logger: v,
|
|
5844
5850
|
url: s,
|
|
5845
5851
|
onErrorRef: g,
|
|
@@ -5862,7 +5868,7 @@ function Ko() {
|
|
|
5862
5868
|
const m = (0, r.useRef)(!1);
|
|
5863
5869
|
return (0, r.useEffect)(() => (m.current && p(), m.current = !0, () => {
|
|
5864
5870
|
f.current();
|
|
5865
|
-
}), [
|
|
5871
|
+
}), [l, s, ...c]), h;
|
|
5866
5872
|
};
|
|
5867
5873
|
}
|
|
5868
5874
|
return Ge.providerNativeFactory = n, Ge;
|
|
@@ -5871,36 +5877,36 @@ var zn;
|
|
|
5871
5877
|
function zo() {
|
|
5872
5878
|
if (zn) return Oe;
|
|
5873
5879
|
zn = 1;
|
|
5874
|
-
var r = Oe && Oe.__importDefault || function(
|
|
5875
|
-
return
|
|
5880
|
+
var r = Oe && Oe.__importDefault || function(l) {
|
|
5881
|
+
return l && l.__esModule ? l : { default: l };
|
|
5876
5882
|
};
|
|
5877
5883
|
Object.defineProperty(Oe, "__esModule", { value: !0 }), Oe.createWebSocketContext = void 0;
|
|
5878
5884
|
const e = r(se()), t = J(), n = $o(), i = Vo(), o = Ko();
|
|
5879
|
-
function s(
|
|
5880
|
-
const h =
|
|
5881
|
-
key:
|
|
5885
|
+
function s(l) {
|
|
5886
|
+
const h = l.key + "SOCKET_INVOKE", c = {
|
|
5887
|
+
key: l.key,
|
|
5882
5888
|
connection: null,
|
|
5883
5889
|
useWebSocketEffect: null,
|
|
5884
|
-
shareConnectionBetweenTab:
|
|
5885
|
-
invoke: (
|
|
5890
|
+
shareConnectionBetweenTab: l?.shareConnectionBetweenTab || !1,
|
|
5891
|
+
invoke: (u) => {
|
|
5886
5892
|
var d;
|
|
5887
5893
|
if (!c.shareConnectionBetweenTab) {
|
|
5888
|
-
(d = c.connection) === null || d === void 0 || d.send(JSON.stringify(
|
|
5894
|
+
(d = c.connection) === null || d === void 0 || d.send(JSON.stringify(u));
|
|
5889
5895
|
return;
|
|
5890
5896
|
}
|
|
5891
|
-
(0, t.sendWithHermes)(h,
|
|
5897
|
+
(0, t.sendWithHermes)(h, u, c.shareConnectionBetweenTab);
|
|
5892
5898
|
},
|
|
5893
5899
|
Provider: null
|
|
5894
5900
|
// just for ts ignore
|
|
5895
5901
|
};
|
|
5896
5902
|
c.Provider = c.shareConnectionBetweenTab ? (0, i.providerFactory)(c) : (0, o.providerNativeFactory)(c);
|
|
5897
|
-
async function a(
|
|
5903
|
+
async function a(u) {
|
|
5898
5904
|
var d;
|
|
5899
|
-
(d = c.connection) === null || d === void 0 || d.send(JSON.stringify(
|
|
5905
|
+
(d = c.connection) === null || d === void 0 || d.send(JSON.stringify(u.data));
|
|
5900
5906
|
}
|
|
5901
|
-
return c.useWebSocketEffect = (0, n.createUseSignalREffect)(c), e.default.on(h, (
|
|
5907
|
+
return c.useWebSocketEffect = (0, n.createUseSignalREffect)(c), e.default.on(h, (u) => {
|
|
5902
5908
|
var d;
|
|
5903
|
-
((d = c.connection) === null || d === void 0 ? void 0 : d.readyState) === WebSocket.OPEN && a(
|
|
5909
|
+
((d = c.connection) === null || d === void 0 ? void 0 : d.readyState) === WebSocket.OPEN && a(u);
|
|
5904
5910
|
}), c;
|
|
5905
5911
|
}
|
|
5906
5912
|
return Oe.createWebSocketContext = s, Oe;
|
|
@@ -5910,10 +5916,10 @@ function Xo() {
|
|
|
5910
5916
|
return Xn || (Xn = 1, (function(r) {
|
|
5911
5917
|
var e = Ie && Ie.__createBinding || (Object.create ? (function(n, i, o, s) {
|
|
5912
5918
|
s === void 0 && (s = o);
|
|
5913
|
-
var
|
|
5914
|
-
(!
|
|
5919
|
+
var l = Object.getOwnPropertyDescriptor(i, o);
|
|
5920
|
+
(!l || ("get" in l ? !i.__esModule : l.writable || l.configurable)) && (l = { enumerable: !0, get: function() {
|
|
5915
5921
|
return i[o];
|
|
5916
|
-
} }), Object.defineProperty(n, s,
|
|
5922
|
+
} }), Object.defineProperty(n, s, l);
|
|
5917
5923
|
}) : (function(n, i, o, s) {
|
|
5918
5924
|
s === void 0 && (s = o), n[s] = i[o];
|
|
5919
5925
|
})), t = Ie && Ie.__exportStar || function(n, i) {
|
|
@@ -5927,10 +5933,10 @@ function Jo() {
|
|
|
5927
5933
|
return Jn || (Jn = 1, (function(r) {
|
|
5928
5934
|
var e = de && de.__createBinding || (Object.create ? (function(n, i, o, s) {
|
|
5929
5935
|
s === void 0 && (s = o);
|
|
5930
|
-
var
|
|
5931
|
-
(!
|
|
5936
|
+
var l = Object.getOwnPropertyDescriptor(i, o);
|
|
5937
|
+
(!l || ("get" in l ? !i.__esModule : l.writable || l.configurable)) && (l = { enumerable: !0, get: function() {
|
|
5932
5938
|
return i[o];
|
|
5933
|
-
} }), Object.defineProperty(n, s,
|
|
5939
|
+
} }), Object.defineProperty(n, s, l);
|
|
5934
5940
|
}) : (function(n, i, o, s) {
|
|
5935
5941
|
s === void 0 && (s = o), n[s] = i[o];
|
|
5936
5942
|
})), t = de && de.__exportStar || function(n, i) {
|
|
@@ -5944,7 +5950,7 @@ const Go = Yo.createSignalRContext(), oi = ({
|
|
|
5944
5950
|
children: r,
|
|
5945
5951
|
enabled: e
|
|
5946
5952
|
}) => {
|
|
5947
|
-
const t = vt((
|
|
5953
|
+
const t = vt((l) => l.modulePermissionToken), n = vt((l) => l.moduleId), i = vt((l) => l.organizationId), o = yr((l) => l.environment), s = mr(
|
|
5948
5954
|
() => ({
|
|
5949
5955
|
accessTokenFactory: () => t ?? "",
|
|
5950
5956
|
headers: {
|
|
@@ -5952,7 +5958,7 @@ const Go = Yo.createSignalRContext(), oi = ({
|
|
|
5952
5958
|
},
|
|
5953
5959
|
automaticReconnect: [1e4, 2e4, 3e4, 6e4],
|
|
5954
5960
|
// 10s, 20s, 30s, 60s four retries
|
|
5955
|
-
onError: async (
|
|
5961
|
+
onError: async (l) => console.error("SignalR connection error", l)
|
|
5956
5962
|
}),
|
|
5957
5963
|
[t]
|
|
5958
5964
|
);
|