@obb871001/api-integration-sdk 1.0.72 → 1.0.74
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/index.cjs +7 -7
- package/dist/index.js +705 -673
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useQuery as oe, QueryClient as
|
|
3
|
-
import
|
|
4
|
-
import { find as je, isEmpty as O, isObject as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
1
|
+
import he, { createContext as Fa, useContext as Wa, useCallback as X, useMemo as Qe, useEffect as ve, useRef as ya } from "react";
|
|
2
|
+
import { useQuery as oe, QueryClient as Ci, QueryClientProvider as vi, useQueries as Ja, useMutation as za } from "@tanstack/react-query";
|
|
3
|
+
import hi from "axios";
|
|
4
|
+
import { find as je, isEmpty as O, isObject as Oe, flatMap as Ye, isArray as ee, map as qe, get as Me } from "lodash";
|
|
5
|
+
import ki from "react-dom";
|
|
6
|
+
function Si(e) {
|
|
7
7
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
8
8
|
}
|
|
9
|
-
var
|
|
9
|
+
var Re = { exports: {} }, ye = {};
|
|
10
10
|
var ba;
|
|
11
|
-
function
|
|
12
|
-
if (ba) return
|
|
11
|
+
function Ni() {
|
|
12
|
+
if (ba) return ye;
|
|
13
13
|
ba = 1;
|
|
14
|
-
var e =
|
|
15
|
-
function U(_,
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
for (
|
|
19
|
-
if (_ && _.defaultProps) for (
|
|
20
|
-
return { $$typeof:
|
|
14
|
+
var e = he, n = Symbol.for("react.element"), c = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
15
|
+
function U(_, r, d) {
|
|
16
|
+
var m, i = {}, p = null, l = null;
|
|
17
|
+
d !== void 0 && (p = "" + d), r.key !== void 0 && (p = "" + r.key), r.ref !== void 0 && (l = r.ref);
|
|
18
|
+
for (m in r) o.call(r, m) && !g.hasOwnProperty(m) && (i[m] = r[m]);
|
|
19
|
+
if (_ && _.defaultProps) for (m in r = _.defaultProps, r) i[m] === void 0 && (i[m] = r[m]);
|
|
20
|
+
return { $$typeof: n, type: _, key: p, ref: l, props: i, _owner: s.current };
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return ye.Fragment = c, ye.jsx = U, ye.jsxs = U, ye;
|
|
23
23
|
}
|
|
24
|
-
var
|
|
24
|
+
var be = {};
|
|
25
25
|
var Ta;
|
|
26
|
-
function
|
|
26
|
+
function Di() {
|
|
27
27
|
return Ta || (Ta = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
28
|
-
var e =
|
|
28
|
+
var e = he, n = Symbol.for("react.element"), c = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), _ = Symbol.for("react.context"), r = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), t = Symbol.iterator, y = "@@iterator";
|
|
29
29
|
function b(a) {
|
|
30
30
|
if (a === null || typeof a != "object")
|
|
31
31
|
return null;
|
|
@@ -50,16 +50,16 @@ function Ni() {
|
|
|
50
50
|
G.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, G);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
var D = !1, h = !1, L = !1, M = !1,
|
|
54
|
-
|
|
53
|
+
var D = !1, h = !1, L = !1, M = !1, ce = !1, _e;
|
|
54
|
+
_e = Symbol.for("react.module.reference");
|
|
55
55
|
function we(a) {
|
|
56
|
-
return !!(typeof a == "string" || typeof a == "function" || a ===
|
|
56
|
+
return !!(typeof a == "string" || typeof a == "function" || a === o || a === g || ce || a === s || a === d || a === m || M || a === l || D || h || L || typeof a == "object" && a !== null && (a.$$typeof === p || a.$$typeof === i || a.$$typeof === U || a.$$typeof === _ || a.$$typeof === r || // This needs to include all possible module reference object
|
|
57
57
|
// types supported by any Flight configuration anywhere since
|
|
58
58
|
// we don't know which Flight build this will end up being used
|
|
59
59
|
// with.
|
|
60
|
-
a.$$typeof ===
|
|
60
|
+
a.$$typeof === _e || a.getModuleId !== void 0));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function ke(a, f, C) {
|
|
63
63
|
var v = a.displayName;
|
|
64
64
|
if (v)
|
|
65
65
|
return v;
|
|
@@ -77,17 +77,17 @@ function Ni() {
|
|
|
77
77
|
if (typeof a == "string")
|
|
78
78
|
return a;
|
|
79
79
|
switch (a) {
|
|
80
|
-
case
|
|
80
|
+
case o:
|
|
81
81
|
return "Fragment";
|
|
82
|
-
case
|
|
82
|
+
case c:
|
|
83
83
|
return "Portal";
|
|
84
|
-
case
|
|
84
|
+
case g:
|
|
85
85
|
return "Profiler";
|
|
86
86
|
case s:
|
|
87
87
|
return "StrictMode";
|
|
88
|
-
case
|
|
88
|
+
case d:
|
|
89
89
|
return "Suspense";
|
|
90
|
-
case
|
|
90
|
+
case m:
|
|
91
91
|
return "SuspenseList";
|
|
92
92
|
}
|
|
93
93
|
if (typeof a == "object")
|
|
@@ -98,12 +98,12 @@ function Ni() {
|
|
|
98
98
|
case U:
|
|
99
99
|
var C = a;
|
|
100
100
|
return V(C._context) + ".Provider";
|
|
101
|
-
case
|
|
102
|
-
return
|
|
101
|
+
case r:
|
|
102
|
+
return ke(a, a.render, "ForwardRef");
|
|
103
103
|
case i:
|
|
104
104
|
var v = a.displayName || null;
|
|
105
105
|
return v !== null ? v : H(a.type) || "Memo";
|
|
106
|
-
case
|
|
106
|
+
case p: {
|
|
107
107
|
var E = a, G = E._payload, S = E._init;
|
|
108
108
|
try {
|
|
109
109
|
return H(S(G));
|
|
@@ -114,18 +114,18 @@ function Ni() {
|
|
|
114
114
|
}
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
-
var Z = Object.assign,
|
|
118
|
-
function
|
|
117
|
+
var Z = Object.assign, ae = 0, B, Se, Ne, x, w, K, fe;
|
|
118
|
+
function ie() {
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
function
|
|
120
|
+
ie.__reactDisabledLog = !0;
|
|
121
|
+
function $() {
|
|
122
122
|
{
|
|
123
|
-
if (
|
|
124
|
-
B = console.log,
|
|
123
|
+
if (ae === 0) {
|
|
124
|
+
B = console.log, Se = console.info, Ne = console.warn, x = console.error, w = console.group, K = console.groupCollapsed, fe = console.groupEnd;
|
|
125
125
|
var a = {
|
|
126
126
|
configurable: !0,
|
|
127
127
|
enumerable: !0,
|
|
128
|
-
value:
|
|
128
|
+
value: ie,
|
|
129
129
|
writable: !0
|
|
130
130
|
};
|
|
131
131
|
Object.defineProperties(console, {
|
|
@@ -138,12 +138,12 @@ function Ni() {
|
|
|
138
138
|
groupEnd: a
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
ae++;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function De() {
|
|
145
145
|
{
|
|
146
|
-
if (
|
|
146
|
+
if (ae--, ae === 0) {
|
|
147
147
|
var a = {
|
|
148
148
|
configurable: !0,
|
|
149
149
|
enumerable: !0,
|
|
@@ -154,10 +154,10 @@ function Ni() {
|
|
|
154
154
|
value: B
|
|
155
155
|
}),
|
|
156
156
|
info: Z({}, a, {
|
|
157
|
-
value:
|
|
157
|
+
value: Se
|
|
158
158
|
}),
|
|
159
159
|
warn: Z({}, a, {
|
|
160
|
-
value:
|
|
160
|
+
value: Ne
|
|
161
161
|
}),
|
|
162
162
|
error: Z({}, a, {
|
|
163
163
|
value: x
|
|
@@ -169,11 +169,11 @@ function Ni() {
|
|
|
169
169
|
value: K
|
|
170
170
|
}),
|
|
171
171
|
groupEnd: Z({}, a, {
|
|
172
|
-
value:
|
|
172
|
+
value: fe
|
|
173
173
|
})
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
ae < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
var se = u.ReactCurrentDispatcher, Q;
|
|
@@ -190,25 +190,25 @@ function Ni() {
|
|
|
190
190
|
` + Q + a;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
var
|
|
193
|
+
var le = !1, Ee;
|
|
194
194
|
{
|
|
195
|
-
var
|
|
196
|
-
|
|
195
|
+
var Ya = typeof WeakMap == "function" ? WeakMap : Map;
|
|
196
|
+
Ee = new Ya();
|
|
197
197
|
}
|
|
198
198
|
function la(a, f) {
|
|
199
|
-
if (!a ||
|
|
199
|
+
if (!a || le)
|
|
200
200
|
return "";
|
|
201
201
|
{
|
|
202
|
-
var C =
|
|
202
|
+
var C = Ee.get(a);
|
|
203
203
|
if (C !== void 0)
|
|
204
204
|
return C;
|
|
205
205
|
}
|
|
206
206
|
var v;
|
|
207
|
-
|
|
207
|
+
le = !0;
|
|
208
208
|
var E = Error.prepareStackTrace;
|
|
209
209
|
Error.prepareStackTrace = void 0;
|
|
210
210
|
var G;
|
|
211
|
-
G = se.current, se.current = null,
|
|
211
|
+
G = se.current, se.current = null, $();
|
|
212
212
|
try {
|
|
213
213
|
if (f) {
|
|
214
214
|
var S = function() {
|
|
@@ -254,65 +254,65 @@ function Ni() {
|
|
|
254
254
|
if (R--, P--, P < 0 || k[R] !== F[P]) {
|
|
255
255
|
var z = `
|
|
256
256
|
` + k[R].replace(" at new ", " at ");
|
|
257
|
-
return a.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", a.displayName)), typeof a == "function" &&
|
|
257
|
+
return a.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", a.displayName)), typeof a == "function" && Ee.set(a, z), z;
|
|
258
258
|
}
|
|
259
259
|
while (R >= 1 && P >= 0);
|
|
260
260
|
break;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
} finally {
|
|
264
|
-
|
|
264
|
+
le = !1, se.current = G, De(), Error.prepareStackTrace = E;
|
|
265
265
|
}
|
|
266
|
-
var ge = a ? a.displayName || a.name : "",
|
|
267
|
-
return typeof a == "function" &&
|
|
266
|
+
var ge = a ? a.displayName || a.name : "", te = ge ? ue(ge) : "";
|
|
267
|
+
return typeof a == "function" && Ee.set(a, te), te;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function qa(a, f, C) {
|
|
270
270
|
return la(a, !1);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Xa(a) {
|
|
273
273
|
var f = a.prototype;
|
|
274
274
|
return !!(f && f.isReactComponent);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Le(a, f, C) {
|
|
277
277
|
if (a == null)
|
|
278
278
|
return "";
|
|
279
279
|
if (typeof a == "function")
|
|
280
|
-
return la(a,
|
|
280
|
+
return la(a, Xa(a));
|
|
281
281
|
if (typeof a == "string")
|
|
282
282
|
return ue(a);
|
|
283
283
|
switch (a) {
|
|
284
|
-
case
|
|
284
|
+
case d:
|
|
285
285
|
return ue("Suspense");
|
|
286
|
-
case
|
|
286
|
+
case m:
|
|
287
287
|
return ue("SuspenseList");
|
|
288
288
|
}
|
|
289
289
|
if (typeof a == "object")
|
|
290
290
|
switch (a.$$typeof) {
|
|
291
|
-
case
|
|
292
|
-
return
|
|
291
|
+
case r:
|
|
292
|
+
return qa(a.render);
|
|
293
293
|
case i:
|
|
294
|
-
return
|
|
295
|
-
case
|
|
294
|
+
return Le(a.type, f, C);
|
|
295
|
+
case p: {
|
|
296
296
|
var v = a, E = v._payload, G = v._init;
|
|
297
297
|
try {
|
|
298
|
-
return
|
|
298
|
+
return Le(G(E), f, C);
|
|
299
299
|
} catch {
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
return "";
|
|
304
304
|
}
|
|
305
|
-
var
|
|
306
|
-
function
|
|
305
|
+
var Ue = Object.prototype.hasOwnProperty, ta = {}, na = u.ReactDebugCurrentFrame;
|
|
306
|
+
function Ge(a) {
|
|
307
307
|
if (a) {
|
|
308
|
-
var f = a._owner, C =
|
|
308
|
+
var f = a._owner, C = Le(a.type, a._source, f ? f.type : null);
|
|
309
309
|
na.setExtraStackFrame(C);
|
|
310
310
|
} else
|
|
311
311
|
na.setExtraStackFrame(null);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function $a(a, f, C, v, E) {
|
|
314
314
|
{
|
|
315
|
-
var G = Function.call.bind(
|
|
315
|
+
var G = Function.call.bind(Ue);
|
|
316
316
|
for (var S in a)
|
|
317
317
|
if (G(a, S)) {
|
|
318
318
|
var k = void 0;
|
|
@@ -325,21 +325,21 @@ function Ni() {
|
|
|
325
325
|
} catch (R) {
|
|
326
326
|
k = R;
|
|
327
327
|
}
|
|
328
|
-
k && !(k instanceof Error) && (
|
|
328
|
+
k && !(k instanceof Error) && (Ge(E), T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", C, S, typeof k), Ge(null)), k instanceof Error && !(k.message in ta) && (ta[k.message] = !0, Ge(E), T("Failed %s type: %s", C, k.message), Ge(null));
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
var
|
|
332
|
+
var ei = Array.isArray;
|
|
333
333
|
function Fe(a) {
|
|
334
|
-
return
|
|
334
|
+
return ei(a);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function ai(a) {
|
|
337
337
|
{
|
|
338
338
|
var f = typeof Symbol == "function" && Symbol.toStringTag, C = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
339
339
|
return C;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function ii(a) {
|
|
343
343
|
try {
|
|
344
344
|
return ma(a), !1;
|
|
345
345
|
} catch {
|
|
@@ -350,35 +350,35 @@ function Ni() {
|
|
|
350
350
|
return "" + a;
|
|
351
351
|
}
|
|
352
352
|
function ra(a) {
|
|
353
|
-
if (
|
|
354
|
-
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
353
|
+
if (ii(a))
|
|
354
|
+
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ai(a)), ma(a);
|
|
355
355
|
}
|
|
356
|
-
var oa = u.ReactCurrentOwner,
|
|
356
|
+
var oa = u.ReactCurrentOwner, li = {
|
|
357
357
|
key: !0,
|
|
358
358
|
ref: !0,
|
|
359
359
|
__self: !0,
|
|
360
360
|
__source: !0
|
|
361
361
|
}, sa, ua;
|
|
362
|
-
function
|
|
363
|
-
if (
|
|
362
|
+
function ti(a) {
|
|
363
|
+
if (Ue.call(a, "ref")) {
|
|
364
364
|
var f = Object.getOwnPropertyDescriptor(a, "ref").get;
|
|
365
365
|
if (f && f.isReactWarning)
|
|
366
366
|
return !1;
|
|
367
367
|
}
|
|
368
368
|
return a.ref !== void 0;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
if (
|
|
370
|
+
function ni(a) {
|
|
371
|
+
if (Ue.call(a, "key")) {
|
|
372
372
|
var f = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
373
373
|
if (f && f.isReactWarning)
|
|
374
374
|
return !1;
|
|
375
375
|
}
|
|
376
376
|
return a.key !== void 0;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function mi(a, f) {
|
|
379
379
|
typeof a.ref == "string" && oa.current;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function ri(a, f) {
|
|
382
382
|
{
|
|
383
383
|
var C = function() {
|
|
384
384
|
sa || (sa = !0, T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
@@ -389,7 +389,7 @@ function Ni() {
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function oi(a, f) {
|
|
393
393
|
{
|
|
394
394
|
var C = function() {
|
|
395
395
|
ua || (ua = !0, T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
@@ -400,10 +400,10 @@ function Ni() {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
var
|
|
403
|
+
var si = function(a, f, C, v, E, G, S) {
|
|
404
404
|
var k = {
|
|
405
405
|
// This tag allows us to uniquely identify this as a React Element
|
|
406
|
-
$$typeof:
|
|
406
|
+
$$typeof: n,
|
|
407
407
|
// Built-in properties that belong on the element
|
|
408
408
|
type: a,
|
|
409
409
|
key: f,
|
|
@@ -429,12 +429,12 @@ function Ni() {
|
|
|
429
429
|
value: E
|
|
430
430
|
}), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
|
|
431
431
|
};
|
|
432
|
-
function
|
|
432
|
+
function ui(a, f, C, v, E) {
|
|
433
433
|
{
|
|
434
434
|
var G, S = {}, k = null, F = null;
|
|
435
|
-
C !== void 0 && (ra(C), k = "" + C),
|
|
435
|
+
C !== void 0 && (ra(C), k = "" + C), ni(f) && (ra(f.key), k = "" + f.key), ti(f) && (F = f.ref, mi(f, E));
|
|
436
436
|
for (G in f)
|
|
437
|
-
|
|
437
|
+
Ue.call(f, G) && !li.hasOwnProperty(G) && (S[G] = f[G]);
|
|
438
438
|
if (a && a.defaultProps) {
|
|
439
439
|
var R = a.defaultProps;
|
|
440
440
|
for (G in R)
|
|
@@ -442,15 +442,15 @@ function Ni() {
|
|
|
442
442
|
}
|
|
443
443
|
if (k || F) {
|
|
444
444
|
var P = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
445
|
-
k &&
|
|
445
|
+
k && ri(S, P), F && oi(S, P);
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return si(a, k, F, E, v, oa.current, S);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
var We = u.ReactCurrentOwner, pa = u.ReactDebugCurrentFrame;
|
|
451
451
|
function pe(a) {
|
|
452
452
|
if (a) {
|
|
453
|
-
var f = a._owner, C =
|
|
453
|
+
var f = a._owner, C = Le(a.type, a._source, f ? f.type : null);
|
|
454
454
|
pa.setExtraStackFrame(C);
|
|
455
455
|
} else
|
|
456
456
|
pa.setExtraStackFrame(null);
|
|
@@ -458,7 +458,7 @@ function Ni() {
|
|
|
458
458
|
var Je;
|
|
459
459
|
Je = !1;
|
|
460
460
|
function ze(a) {
|
|
461
|
-
return typeof a == "object" && a !== null && a.$$typeof ===
|
|
461
|
+
return typeof a == "object" && a !== null && a.$$typeof === n;
|
|
462
462
|
}
|
|
463
463
|
function ga() {
|
|
464
464
|
{
|
|
@@ -472,11 +472,11 @@ Check the render method of \`` + a + "`.";
|
|
|
472
472
|
return "";
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function pi(a) {
|
|
476
476
|
return "";
|
|
477
477
|
}
|
|
478
478
|
var da = {};
|
|
479
|
-
function
|
|
479
|
+
function gi(a) {
|
|
480
480
|
{
|
|
481
481
|
var f = ga();
|
|
482
482
|
if (!f) {
|
|
@@ -493,7 +493,7 @@ Check the top-level render call using <` + C + ">.");
|
|
|
493
493
|
if (!a._store || a._store.validated || a.key != null)
|
|
494
494
|
return;
|
|
495
495
|
a._store.validated = !0;
|
|
496
|
-
var C =
|
|
496
|
+
var C = gi(f);
|
|
497
497
|
if (da[C])
|
|
498
498
|
return;
|
|
499
499
|
da[C] = !0;
|
|
@@ -520,7 +520,7 @@ Check the top-level render call using <` + C + ">.");
|
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function di(a) {
|
|
524
524
|
{
|
|
525
525
|
var f = a.type;
|
|
526
526
|
if (f == null || typeof f == "string")
|
|
@@ -528,7 +528,7 @@ Check the top-level render call using <` + C + ">.");
|
|
|
528
528
|
var C;
|
|
529
529
|
if (typeof f == "function")
|
|
530
530
|
C = f.propTypes;
|
|
531
|
-
else if (typeof f == "object" && (f.$$typeof ===
|
|
531
|
+
else if (typeof f == "object" && (f.$$typeof === r || // Note: Memo only checks outer props here.
|
|
532
532
|
// Inner props are checked in the reconciler.
|
|
533
533
|
f.$$typeof === i))
|
|
534
534
|
C = f.propTypes;
|
|
@@ -536,7 +536,7 @@ Check the top-level render call using <` + C + ">.");
|
|
|
536
536
|
return;
|
|
537
537
|
if (C) {
|
|
538
538
|
var v = H(f);
|
|
539
|
-
|
|
539
|
+
$a(C, a.props, "prop", v, a);
|
|
540
540
|
} else if (f.PropTypes !== void 0 && !Je) {
|
|
541
541
|
Je = !0;
|
|
542
542
|
var E = H(f);
|
|
@@ -545,7 +545,7 @@ Check the top-level render call using <` + C + ">.");
|
|
|
545
545
|
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function ci(a) {
|
|
549
549
|
{
|
|
550
550
|
for (var f = Object.keys(a.props), C = 0; C < f.length; C++) {
|
|
551
551
|
var v = f[C];
|
|
@@ -564,12 +564,12 @@ Check the top-level render call using <` + C + ">.");
|
|
|
564
564
|
if (!S) {
|
|
565
565
|
var k = "";
|
|
566
566
|
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
567
|
-
var F =
|
|
567
|
+
var F = pi();
|
|
568
568
|
F ? k += F : k += ga();
|
|
569
569
|
var R;
|
|
570
|
-
a === null ? R = "null" : Fe(a) ? R = "array" : a !== void 0 && a.$$typeof ===
|
|
570
|
+
a === null ? R = "null" : Fe(a) ? R = "array" : a !== void 0 && a.$$typeof === n ? (R = "<" + (H(a.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : R = typeof a, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, k);
|
|
571
571
|
}
|
|
572
|
-
var P =
|
|
572
|
+
var P = ui(a, f, C, E, G);
|
|
573
573
|
if (P == null)
|
|
574
574
|
return P;
|
|
575
575
|
if (S) {
|
|
@@ -585,199 +585,199 @@ Check the top-level render call using <` + C + ">.");
|
|
|
585
585
|
else
|
|
586
586
|
_a(z, a);
|
|
587
587
|
}
|
|
588
|
-
if (
|
|
589
|
-
var
|
|
590
|
-
return
|
|
588
|
+
if (Ue.call(f, "key")) {
|
|
589
|
+
var te = H(a), W = Object.keys(f).filter(function(Ti) {
|
|
590
|
+
return Ti !== "key";
|
|
591
591
|
}), Ze = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
592
|
-
if (!fa[
|
|
593
|
-
var
|
|
592
|
+
if (!fa[te + Ze]) {
|
|
593
|
+
var bi = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
|
|
594
594
|
T(`A props object containing a "key" prop is being spread into JSX:
|
|
595
595
|
let props = %s;
|
|
596
596
|
<%s {...props} />
|
|
597
597
|
React keys must be passed directly to JSX without using spread:
|
|
598
598
|
let props = %s;
|
|
599
|
-
<%s key={someKey} {...props} />`, Ze,
|
|
599
|
+
<%s key={someKey} {...props} />`, Ze, te, bi, te), fa[te + Ze] = !0;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return a ===
|
|
602
|
+
return a === o ? ci(P) : di(P), P;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function _i(a, f, C) {
|
|
606
606
|
return Ua(a, f, C, !0);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function fi(a, f, C) {
|
|
609
609
|
return Ua(a, f, C, !1);
|
|
610
610
|
}
|
|
611
|
-
var
|
|
612
|
-
|
|
613
|
-
})()),
|
|
611
|
+
var Ui = fi, yi = _i;
|
|
612
|
+
be.Fragment = o, be.jsx = Ui, be.jsxs = yi;
|
|
613
|
+
})()), be;
|
|
614
614
|
}
|
|
615
615
|
var Ca;
|
|
616
|
-
function
|
|
617
|
-
return Ca || (Ca = 1, process.env.NODE_ENV === "production" ?
|
|
616
|
+
function Ei() {
|
|
617
|
+
return Ca || (Ca = 1, process.env.NODE_ENV === "production" ? Re.exports = Ni() : Re.exports = Di()), Re.exports;
|
|
618
618
|
}
|
|
619
|
-
var
|
|
620
|
-
const
|
|
621
|
-
const e = Wa(
|
|
619
|
+
var xe = Ei();
|
|
620
|
+
const Za = Fa(null), He = () => {
|
|
621
|
+
const e = Wa(Za);
|
|
622
622
|
if (!e)
|
|
623
623
|
throw new Error("useApiContext must be used within ApiProvider");
|
|
624
624
|
return e;
|
|
625
625
|
};
|
|
626
|
-
function
|
|
626
|
+
function Li({
|
|
627
627
|
baseURL: e,
|
|
628
|
-
getToken:
|
|
629
|
-
timeoutMs:
|
|
630
|
-
lng:
|
|
628
|
+
getToken: n,
|
|
629
|
+
timeoutMs: c = 15e3,
|
|
630
|
+
lng: o = "tw",
|
|
631
631
|
store: s,
|
|
632
|
-
onError:
|
|
632
|
+
onError: g
|
|
633
633
|
} = {}) {
|
|
634
|
-
const U =
|
|
634
|
+
const U = hi.create({
|
|
635
635
|
baseURL: e,
|
|
636
|
-
timeout:
|
|
636
|
+
timeout: c,
|
|
637
637
|
headers: { "Content-Type": "application/json" }
|
|
638
638
|
});
|
|
639
639
|
return U.interceptors.request.use(async (_) => {
|
|
640
|
-
if (_.headers = _.headers || {},
|
|
641
|
-
const
|
|
642
|
-
|
|
640
|
+
if (_.headers = _.headers || {}, n) {
|
|
641
|
+
const d = await n();
|
|
642
|
+
d && (_.headers.Authorization = `Bearer ${d}`);
|
|
643
643
|
}
|
|
644
|
-
const
|
|
645
|
-
return _.headers.Currency =
|
|
644
|
+
const r = s?.getState()?.isWalletCurrency;
|
|
645
|
+
return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang = o, _;
|
|
646
646
|
}), U.interceptors.response.use(
|
|
647
647
|
(_) => _.data,
|
|
648
|
-
(_) =>
|
|
648
|
+
(_) => g ? g(_, { instance: U }) : Promise.reject(_)
|
|
649
649
|
), U;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
652
|
-
const e = Wa(
|
|
651
|
+
const Va = Fa(null), ul = () => {
|
|
652
|
+
const e = Wa(Va);
|
|
653
653
|
if (!e)
|
|
654
654
|
throw new Error(
|
|
655
655
|
"useGameInfoContext must be used within a GameInfoCtx.Provider"
|
|
656
656
|
);
|
|
657
657
|
return e;
|
|
658
|
-
},
|
|
659
|
-
const e = (
|
|
658
|
+
}, pl = () => {
|
|
659
|
+
const e = (o, s) => !o && !s, n = (o) => o.startsWith("pc.");
|
|
660
660
|
return {
|
|
661
661
|
executeLogout: ({
|
|
662
|
-
isCallBackInvalid:
|
|
662
|
+
isCallBackInvalid: o = !1,
|
|
663
663
|
hostname: s = "",
|
|
664
|
-
shouldRedirect:
|
|
664
|
+
shouldRedirect: g,
|
|
665
665
|
onShowError: U,
|
|
666
666
|
onCleanup: _,
|
|
667
|
-
onRemoveToken:
|
|
668
|
-
onRedirect:
|
|
669
|
-
onGoogleLogout:
|
|
667
|
+
onRemoveToken: r,
|
|
668
|
+
onRedirect: d,
|
|
669
|
+
onGoogleLogout: m
|
|
670
670
|
}) => {
|
|
671
|
-
const i =
|
|
672
|
-
e(
|
|
671
|
+
const i = n(s);
|
|
672
|
+
e(o, i) && U?.(), _?.(), r?.(), g && d?.("/"), m?.();
|
|
673
673
|
},
|
|
674
674
|
shouldShowErrorNotice: e,
|
|
675
|
-
isMachineDomain:
|
|
675
|
+
isMachineDomain: n
|
|
676
676
|
};
|
|
677
|
-
},
|
|
678
|
-
const
|
|
679
|
-
return
|
|
680
|
-
}, {}),
|
|
677
|
+
}, Ia = (e = [], n) => je(e, { gameTypeName: n })?.gameTypeUid, Aa = (e = [], n) => je(e, { platform: n })?.platformUid, Ba = (e = [], n) => je(e, { SubPlatformEnum: n }), Ka = (e = [], n, c) => O(e) ? [] : e.filter((o) => c ? String(o?.SubPlatformEnumUid) === String(c?.SubPlatformEnumUid) : String(o.platformUid) === String(n)), Gi = (e = []) => O(e) ? {} : e.reduce((n, c) => {
|
|
678
|
+
const o = c?.game_subtype || "UNKNOWN";
|
|
679
|
+
return n[o] || (n[o] = []), n[o].push(c), n;
|
|
680
|
+
}, {}), Mi = ({
|
|
681
681
|
gameTypeName: e,
|
|
682
|
-
platforms:
|
|
683
|
-
gameList:
|
|
684
|
-
allGameTypes:
|
|
682
|
+
platforms: n,
|
|
683
|
+
gameList: c,
|
|
684
|
+
allGameTypes: o,
|
|
685
685
|
allPlatforms: s
|
|
686
686
|
}) => {
|
|
687
|
-
const
|
|
688
|
-
return
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
687
|
+
const g = Ia(o, e);
|
|
688
|
+
return g ? n.reduce((U, _) => {
|
|
689
|
+
const r = Aa(s, _), d = Ba(s, _), m = c[g] || [], i = Ka(
|
|
690
|
+
m,
|
|
691
|
+
r,
|
|
692
|
+
d
|
|
693
693
|
);
|
|
694
694
|
return O(i) || (U[_] = i), U;
|
|
695
695
|
}, {}) : {};
|
|
696
|
-
},
|
|
696
|
+
}, Ri = ({
|
|
697
697
|
platformName: e,
|
|
698
|
-
gamesOfType:
|
|
699
|
-
allPlatforms:
|
|
698
|
+
gamesOfType: n = [],
|
|
699
|
+
allPlatforms: c = []
|
|
700
700
|
}) => {
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
-
|
|
701
|
+
const o = Aa(c, e), s = Ba(c, e), g = Ka(
|
|
702
|
+
n,
|
|
703
|
+
o,
|
|
704
704
|
s
|
|
705
705
|
);
|
|
706
|
-
return
|
|
707
|
-
},
|
|
708
|
-
const s =
|
|
709
|
-
return s.forEach((
|
|
710
|
-
|
|
711
|
-
}), s.includes(
|
|
712
|
-
}, {}),
|
|
706
|
+
return Gi(g);
|
|
707
|
+
}, Pi = (e = {}) => !Oe(e) || O(e) ? [] : Ye(e), va = (e = []) => !ee(e) || O(e) ? [] : qe(e, "platform"), xi = (e = []) => !ee(e) || O(e) ? [] : qe(e, "gameTypeName"), Oi = (e = []) => !ee(e) || O(e) ? [] : qe(e, "game_subtype"), Hi = (e = {}) => !Oe(e) || O(e) ? [] : Ye(e), wi = (e = [], n = []) => !ee(e) || O(e) ? {} : !ee(n) || O(n) ? {} : e.reduce((c, o) => {
|
|
708
|
+
const s = n.map((g) => g.game_subtype);
|
|
709
|
+
return s.forEach((g) => {
|
|
710
|
+
c[g] = c[g] || [];
|
|
711
|
+
}), s.includes(o.game_subtype) && c[o.game_subtype].push(o), c;
|
|
712
|
+
}, {}), Fi = ({
|
|
713
713
|
gameTypes: e = [],
|
|
714
|
-
platforms:
|
|
715
|
-
gameList:
|
|
716
|
-
allGameTypes:
|
|
714
|
+
platforms: n = [],
|
|
715
|
+
gameList: c = {},
|
|
716
|
+
allGameTypes: o = [],
|
|
717
717
|
allPlatforms: s = []
|
|
718
|
-
}) =>
|
|
719
|
-
const _ =
|
|
718
|
+
}) => !ee(e) || !ee(n) ? {} : O(c) ? {} : e.reduce((g, U) => {
|
|
719
|
+
const _ = Mi({
|
|
720
720
|
gameTypeName: U,
|
|
721
|
-
platforms:
|
|
722
|
-
gameList:
|
|
723
|
-
allGameTypes:
|
|
721
|
+
platforms: n,
|
|
722
|
+
gameList: c,
|
|
723
|
+
allGameTypes: o,
|
|
724
724
|
allPlatforms: s
|
|
725
725
|
});
|
|
726
|
-
return O(_) || (
|
|
727
|
-
}, {}),
|
|
726
|
+
return O(_) || (g[U] = _), g;
|
|
727
|
+
}, {}), gl = ({
|
|
728
728
|
types: e = [],
|
|
729
|
-
platforms:
|
|
730
|
-
allGameType:
|
|
731
|
-
allGamePlatform:
|
|
729
|
+
platforms: n = [],
|
|
730
|
+
allGameType: c = [],
|
|
731
|
+
allGamePlatform: o = [],
|
|
732
732
|
allGameList: s = {}
|
|
733
|
-
} = {}) => !Array.isArray(e) || !Array.isArray(
|
|
734
|
-
const _ =
|
|
735
|
-
if (!_) return
|
|
736
|
-
const
|
|
737
|
-
const
|
|
733
|
+
} = {}) => !Array.isArray(e) || !Array.isArray(n) ? {} : e.reduce((g, U) => {
|
|
734
|
+
const _ = Ia(c, U);
|
|
735
|
+
if (!_) return g;
|
|
736
|
+
const r = s[_] || [], d = n.reduce((m, i) => {
|
|
737
|
+
const p = Ri({
|
|
738
738
|
platformName: i,
|
|
739
|
-
gamesOfType:
|
|
740
|
-
allPlatforms:
|
|
739
|
+
gamesOfType: r,
|
|
740
|
+
allPlatforms: o
|
|
741
741
|
});
|
|
742
|
-
return O(
|
|
742
|
+
return O(p) ? m : { ...m, [i]: p };
|
|
743
743
|
}, {});
|
|
744
|
-
return O(
|
|
745
|
-
}, {}),
|
|
746
|
-
|
|
747
|
-
}),
|
|
748
|
-
if (!
|
|
749
|
-
const
|
|
750
|
-
for (const [
|
|
751
|
-
|
|
752
|
-
for (const s of
|
|
753
|
-
const
|
|
754
|
-
|
|
744
|
+
return O(d) || (g[U] = d), g;
|
|
745
|
+
}, {}), Wi = (e = {}) => !Oe(e) || O(e) ? {} : Object.values(e).reduce((c, o) => (Object.entries(o).forEach(([s, g]) => {
|
|
746
|
+
c[s] ? c[s] = [...c[s], ...g] : c[s] = g;
|
|
747
|
+
}), c), {}), Ji = (e = {}) => {
|
|
748
|
+
if (!Oe(e) || O(e)) return {};
|
|
749
|
+
const n = {};
|
|
750
|
+
for (const [c, o] of Object.entries(e)) {
|
|
751
|
+
n[c] = {};
|
|
752
|
+
for (const s of o) {
|
|
753
|
+
const g = s.game_subtype;
|
|
754
|
+
n[c][g] || (n[c][g] = []), n[c][g].push(s);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
return
|
|
758
|
-
},
|
|
757
|
+
return n;
|
|
758
|
+
}, zi = ({
|
|
759
759
|
allGameList: e = {},
|
|
760
|
-
allGamePlatform:
|
|
761
|
-
allGameType:
|
|
762
|
-
allGame_subtype:
|
|
760
|
+
allGamePlatform: n = [],
|
|
761
|
+
allGameType: c = [],
|
|
762
|
+
allGame_subtype: o = [],
|
|
763
763
|
allNewGameList: s = [],
|
|
764
|
-
allTopGameList:
|
|
764
|
+
allTopGameList: g = [],
|
|
765
765
|
randomlySelectedGames: U = [],
|
|
766
766
|
userFavoriteGame: _ = {},
|
|
767
|
-
exclusiveBrandGames:
|
|
768
|
-
highlightGames:
|
|
769
|
-
originPlatform:
|
|
767
|
+
exclusiveBrandGames: r = [],
|
|
768
|
+
highlightGames: d = [],
|
|
769
|
+
originPlatform: m = []
|
|
770
770
|
}) => {
|
|
771
|
-
const i =
|
|
771
|
+
const i = Pi(e), p = va(n), l = xi(c), t = Oi(o), y = va(m), b = Hi(_), u = Fi({
|
|
772
772
|
gameTypes: l,
|
|
773
|
-
platforms:
|
|
773
|
+
platforms: p,
|
|
774
774
|
gameList: e,
|
|
775
|
-
allGameTypes:
|
|
776
|
-
allPlatforms:
|
|
777
|
-
}), T =
|
|
775
|
+
allGameTypes: c,
|
|
776
|
+
allPlatforms: n
|
|
777
|
+
}), T = wi(i, o), N = Wi(u), D = Ji(N);
|
|
778
778
|
return {
|
|
779
779
|
platform: {
|
|
780
|
-
all:
|
|
780
|
+
all: p,
|
|
781
781
|
origin: y
|
|
782
782
|
},
|
|
783
783
|
type: {
|
|
@@ -787,10 +787,10 @@ const Za = Fa(null), rl = () => {
|
|
|
787
787
|
gameList: {
|
|
788
788
|
all: i,
|
|
789
789
|
new: s,
|
|
790
|
-
top:
|
|
790
|
+
top: g,
|
|
791
791
|
favorite: b,
|
|
792
|
-
highlight:
|
|
793
|
-
exclusiveBrand:
|
|
792
|
+
highlight: d,
|
|
793
|
+
exclusiveBrand: r,
|
|
794
794
|
randomlySelected: U
|
|
795
795
|
},
|
|
796
796
|
categorized: {
|
|
@@ -802,31 +802,43 @@ const Za = Fa(null), rl = () => {
|
|
|
802
802
|
favorite: b
|
|
803
803
|
}
|
|
804
804
|
};
|
|
805
|
-
},
|
|
806
|
-
...
|
|
807
|
-
...
|
|
808
|
-
platform:
|
|
809
|
-
platformEnum:
|
|
810
|
-
}))),
|
|
811
|
-
const { client: e } =
|
|
812
|
-
async (
|
|
813
|
-
const { mac_address:
|
|
814
|
-
mac_address:
|
|
815
|
-
app_version:
|
|
816
|
-
anydesk_id:
|
|
805
|
+
}, dl = (e = []) => !ee(e) || O(e) ? [] : Ye(e, (n) => O(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((c) => ({
|
|
806
|
+
...n,
|
|
807
|
+
...c,
|
|
808
|
+
platform: c.SubPlatformEnum,
|
|
809
|
+
platformEnum: c.SubPlatformEnum
|
|
810
|
+
}))), de = () => {
|
|
811
|
+
const { client: e } = He(), n = X(
|
|
812
|
+
async (r) => {
|
|
813
|
+
const { mac_address: d = "", app_version: m = "", anydesk_id: i = "" } = r, { data: p } = await e.post("/cash-register/login", {
|
|
814
|
+
mac_address: d,
|
|
815
|
+
app_version: m,
|
|
816
|
+
anydesk_id: i
|
|
817
|
+
});
|
|
818
|
+
return p;
|
|
819
|
+
},
|
|
820
|
+
[e]
|
|
821
|
+
), c = X(async () => e.get("/member/getMemberInfo"), [e]), o = X(async () => await e.get("member/getGameList"), [e]), s = X(async () => await e.get("/member/getNowCurrencyExchange"), [e]), g = X(async () => await e.get("member/getFavoriteGame"), [e]), U = X(
|
|
822
|
+
async (r) => {
|
|
823
|
+
const { account: d, password: m, trans_code: i } = r;
|
|
824
|
+
return await e.post("/login", {
|
|
825
|
+
mdmId: d,
|
|
826
|
+
passwd: m,
|
|
827
|
+
trans_code: i
|
|
817
828
|
});
|
|
818
|
-
return n;
|
|
819
829
|
},
|
|
820
830
|
[e]
|
|
821
|
-
),
|
|
831
|
+
), _ = X(async () => await e.post("/logout"), [e]);
|
|
822
832
|
return {
|
|
823
|
-
machineLoginApi:
|
|
824
|
-
userInfoApi:
|
|
825
|
-
userGameListApi:
|
|
826
|
-
userFavoriteGameApi:
|
|
827
|
-
userCurrencyExchangeApi: s
|
|
833
|
+
machineLoginApi: n,
|
|
834
|
+
userInfoApi: c,
|
|
835
|
+
userGameListApi: o,
|
|
836
|
+
userFavoriteGameApi: g,
|
|
837
|
+
userCurrencyExchangeApi: s,
|
|
838
|
+
userLoginApi: U,
|
|
839
|
+
userLogoutApi: _
|
|
828
840
|
};
|
|
829
|
-
},
|
|
841
|
+
}, Zi = {
|
|
830
842
|
platform: { all: [], origin: [] },
|
|
831
843
|
type: { main: [], sub: [] },
|
|
832
844
|
gameList: {
|
|
@@ -844,12 +856,12 @@ const Za = Fa(null), rl = () => {
|
|
|
844
856
|
byPlatformAndCategory: {}
|
|
845
857
|
},
|
|
846
858
|
user: { favorite: [] }
|
|
847
|
-
},
|
|
848
|
-
const { userFavoriteGameApi:
|
|
859
|
+
}, Vi = ({ enabled: e = !0 } = {}) => {
|
|
860
|
+
const { userFavoriteGameApi: n } = de(), { data: c, isLoading: o, error: s, refetch: g } = oe({
|
|
849
861
|
queryKey: ["gamesInfo"],
|
|
850
862
|
queryFn: async () => {
|
|
851
|
-
const U = await
|
|
852
|
-
return
|
|
863
|
+
const U = await n();
|
|
864
|
+
return zi({
|
|
853
865
|
allGameList: window.gameTypeGroup || {},
|
|
854
866
|
allGamePlatform: window.platforms || [],
|
|
855
867
|
allGameType: window.gameType || [],
|
|
@@ -872,12 +884,12 @@ const Za = Fa(null), rl = () => {
|
|
|
872
884
|
refetchOnWindowFocus: !1
|
|
873
885
|
});
|
|
874
886
|
return {
|
|
875
|
-
gamesInfo:
|
|
876
|
-
isLoading:
|
|
887
|
+
gamesInfo: c || Zi,
|
|
888
|
+
isLoading: o,
|
|
877
889
|
error: s,
|
|
878
|
-
refetch:
|
|
890
|
+
refetch: g
|
|
879
891
|
};
|
|
880
|
-
},
|
|
892
|
+
}, Ii = (e = !1) => {
|
|
881
893
|
!e && window.gameTypeGroup || (e || !window.gameTypeGroup) && (window.gameTypeGroup = window.gameTypeGroup || {
|
|
882
894
|
1: [
|
|
883
895
|
{
|
|
@@ -27400,25 +27412,25 @@ const Za = Fa(null), rl = () => {
|
|
|
27400
27412
|
is_invalid_bet: 0
|
|
27401
27413
|
}
|
|
27402
27414
|
});
|
|
27403
|
-
},
|
|
27415
|
+
}, Ai = ({
|
|
27404
27416
|
children: e,
|
|
27405
|
-
autoFetch:
|
|
27406
|
-
mockData:
|
|
27417
|
+
autoFetch: n = !1,
|
|
27418
|
+
mockData: c = !1
|
|
27407
27419
|
}) => {
|
|
27408
|
-
|
|
27409
|
-
|
|
27410
|
-
}, [
|
|
27411
|
-
const
|
|
27412
|
-
return /* @__PURE__ */
|
|
27420
|
+
ve(() => {
|
|
27421
|
+
c && Ii(!0);
|
|
27422
|
+
}, [c]);
|
|
27423
|
+
const o = Vi({ enabled: n });
|
|
27424
|
+
return /* @__PURE__ */ xe.jsx(Va.Provider, { value: o, children: e });
|
|
27413
27425
|
};
|
|
27414
|
-
function
|
|
27426
|
+
function cl({
|
|
27415
27427
|
children: e,
|
|
27416
|
-
autoFetchGamesInfo:
|
|
27417
|
-
useMockData:
|
|
27418
|
-
...
|
|
27428
|
+
autoFetchGamesInfo: n = !1,
|
|
27429
|
+
useMockData: c = !1,
|
|
27430
|
+
...o
|
|
27419
27431
|
}) {
|
|
27420
|
-
const s = Qe(() =>
|
|
27421
|
-
() => new
|
|
27432
|
+
const s = Qe(() => Li(o), [o]), U = Qe(
|
|
27433
|
+
() => new Ci({
|
|
27422
27434
|
defaultOptions: {
|
|
27423
27435
|
queries: {
|
|
27424
27436
|
refetchOnWindowFocus: !1,
|
|
@@ -27428,85 +27440,85 @@ function pl({
|
|
|
27428
27440
|
}),
|
|
27429
27441
|
[]
|
|
27430
27442
|
);
|
|
27431
|
-
return /* @__PURE__ */
|
|
27443
|
+
return /* @__PURE__ */ xe.jsx(vi, { client: U, children: /* @__PURE__ */ xe.jsx(Za.Provider, { value: { client: s, ...o }, children: /* @__PURE__ */ xe.jsx(Ai, { autoFetch: n, mockData: c, children: e }) }) });
|
|
27432
27444
|
}
|
|
27433
|
-
const
|
|
27434
|
-
const { userCurrencyExchangeApi:
|
|
27445
|
+
const _l = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
|
|
27446
|
+
const { userCurrencyExchangeApi: c } = de(), { getToken: o } = He(), { enabled: s, ...g } = n, U = !!o && (s ? s.every((_) => _) : !0);
|
|
27435
27447
|
return Ja({
|
|
27436
27448
|
queries: [
|
|
27437
27449
|
{
|
|
27438
27450
|
queryKey: ["userCurrencyExchange", ...e],
|
|
27439
|
-
queryFn: () =>
|
|
27451
|
+
queryFn: () => c(),
|
|
27440
27452
|
enabled: U,
|
|
27441
27453
|
// ← 使用合併後的條件
|
|
27442
|
-
...
|
|
27454
|
+
...g
|
|
27443
27455
|
// ← 不包含 enabled
|
|
27444
27456
|
}
|
|
27445
27457
|
]
|
|
27446
27458
|
});
|
|
27447
|
-
},
|
|
27459
|
+
}, fl = ({
|
|
27448
27460
|
refetchInterval: e = 5e4,
|
|
27449
|
-
trigger:
|
|
27450
|
-
enabled:
|
|
27461
|
+
trigger: n = [],
|
|
27462
|
+
enabled: c = !0
|
|
27451
27463
|
} = {}) => {
|
|
27452
|
-
const { getToken:
|
|
27464
|
+
const { getToken: o } = He(), { userInfoApi: s } = de(), g = Ja({
|
|
27453
27465
|
queries: [
|
|
27454
27466
|
{
|
|
27455
|
-
queryKey: ["getMemberInfo", ...
|
|
27467
|
+
queryKey: ["getMemberInfo", ...n],
|
|
27456
27468
|
queryFn: async () => await s(),
|
|
27457
27469
|
refetchInterval: e,
|
|
27458
|
-
enabled: !!
|
|
27470
|
+
enabled: !!o && c
|
|
27459
27471
|
}
|
|
27460
27472
|
]
|
|
27461
|
-
}), { data: U, isFetching: _, error:
|
|
27462
|
-
return { data: U, isFetching: _, error:
|
|
27463
|
-
},
|
|
27473
|
+
}), { data: U, isFetching: _, error: r } = g[0] || {};
|
|
27474
|
+
return { data: U, isFetching: _, error: r };
|
|
27475
|
+
}, Ul = ({ enabled: e = !0 } = {}) => {
|
|
27464
27476
|
const {
|
|
27465
|
-
userInfoApi:
|
|
27466
|
-
userFavoriteGameApi:
|
|
27467
|
-
userGameListApi:
|
|
27477
|
+
userInfoApi: n,
|
|
27478
|
+
userFavoriteGameApi: c,
|
|
27479
|
+
userGameListApi: o,
|
|
27468
27480
|
userCurrencyExchangeApi: s
|
|
27469
|
-
} =
|
|
27481
|
+
} = de(), g = oe({
|
|
27470
27482
|
queryKey: ["getMemInfo"],
|
|
27471
|
-
queryFn: async () =>
|
|
27483
|
+
queryFn: async () => n(),
|
|
27472
27484
|
enabled: e
|
|
27473
27485
|
}), U = oe({
|
|
27474
27486
|
queryKey: ["getFavoriteGame"],
|
|
27475
|
-
queryFn: async () =>
|
|
27476
|
-
enabled: e &&
|
|
27487
|
+
queryFn: async () => c(),
|
|
27488
|
+
enabled: e && g.isSuccess
|
|
27477
27489
|
}), _ = oe({
|
|
27478
27490
|
queryKey: ["getUserGameList"],
|
|
27479
|
-
queryFn: async () =>
|
|
27480
|
-
enabled: e &&
|
|
27481
|
-
}),
|
|
27491
|
+
queryFn: async () => o(),
|
|
27492
|
+
enabled: e && g.isSuccess && U.isSuccess
|
|
27493
|
+
}), r = oe({
|
|
27482
27494
|
queryKey: ["getUserCurrencyExchange"],
|
|
27483
27495
|
queryFn: async () => s(),
|
|
27484
|
-
enabled: e &&
|
|
27496
|
+
enabled: e && g.isSuccess && U.isSuccess && _.isSuccess
|
|
27485
27497
|
});
|
|
27486
27498
|
return [
|
|
27487
|
-
|
|
27499
|
+
g,
|
|
27488
27500
|
U,
|
|
27489
27501
|
_,
|
|
27490
|
-
|
|
27502
|
+
r
|
|
27491
27503
|
];
|
|
27492
27504
|
};
|
|
27493
27505
|
var Ve = {}, J = {}, Ie = {}, ha;
|
|
27494
27506
|
function A() {
|
|
27495
27507
|
return ha || (ha = 1, (function(e) {
|
|
27496
27508
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isEventSourceSupported = e.isReactNative = e.ReadyState = e.DEFAULT_HEARTBEAT = e.UNPARSABLE_JSON_OBJECT = e.DEFAULT_RECONNECT_INTERVAL_MS = e.DEFAULT_RECONNECT_LIMIT = e.SOCKET_IO_PING_CODE = e.SOCKET_IO_PATH = e.SOCKET_IO_PING_INTERVAL = e.DEFAULT_EVENT_SOURCE_OPTIONS = e.EMPTY_EVENT_HANDLERS = e.DEFAULT_OPTIONS = void 0;
|
|
27497
|
-
var
|
|
27509
|
+
var n = 1, c = 1e3 * n;
|
|
27498
27510
|
e.DEFAULT_OPTIONS = {}, e.EMPTY_EVENT_HANDLERS = {}, e.DEFAULT_EVENT_SOURCE_OPTIONS = {
|
|
27499
27511
|
withCredentials: !1,
|
|
27500
27512
|
events: e.EMPTY_EVENT_HANDLERS
|
|
27501
|
-
}, e.SOCKET_IO_PING_INTERVAL = 25 *
|
|
27513
|
+
}, e.SOCKET_IO_PING_INTERVAL = 25 * c, e.SOCKET_IO_PATH = "/socket.io/?EIO=3&transport=websocket", e.SOCKET_IO_PING_CODE = "2", e.DEFAULT_RECONNECT_LIMIT = 20, e.DEFAULT_RECONNECT_INTERVAL_MS = 5e3, e.UNPARSABLE_JSON_OBJECT = {}, e.DEFAULT_HEARTBEAT = {
|
|
27502
27514
|
message: "ping",
|
|
27503
27515
|
timeout: 6e4,
|
|
27504
27516
|
interval: 25e3
|
|
27505
27517
|
};
|
|
27506
|
-
var
|
|
27507
|
-
(function(
|
|
27508
|
-
|
|
27509
|
-
})(
|
|
27518
|
+
var o;
|
|
27519
|
+
(function(g) {
|
|
27520
|
+
g[g.UNINSTANTIATED = -1] = "UNINSTANTIATED", g[g.CONNECTING = 0] = "CONNECTING", g[g.OPEN = 1] = "OPEN", g[g.CLOSING = 2] = "CLOSING", g[g.CLOSED = 3] = "CLOSED";
|
|
27521
|
+
})(o || (e.ReadyState = o = {}));
|
|
27510
27522
|
var s = function() {
|
|
27511
27523
|
try {
|
|
27512
27524
|
return "EventSource" in globalThis;
|
|
@@ -27517,312 +27529,312 @@ function A() {
|
|
|
27517
27529
|
e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && s();
|
|
27518
27530
|
})(Ie)), Ie;
|
|
27519
27531
|
}
|
|
27520
|
-
var
|
|
27532
|
+
var Te = {}, Ae = {}, ka;
|
|
27521
27533
|
function Xe() {
|
|
27522
27534
|
return ka || (ka = 1, (function(e) {
|
|
27523
27535
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
|
|
27524
|
-
var
|
|
27525
|
-
if (
|
|
27526
|
-
delete e.sharedWebSockets[
|
|
27536
|
+
var n = function(c) {
|
|
27537
|
+
if (c && e.sharedWebSockets.hasOwnProperty(c))
|
|
27538
|
+
delete e.sharedWebSockets[c];
|
|
27527
27539
|
else
|
|
27528
|
-
for (var
|
|
27529
|
-
e.sharedWebSockets.hasOwnProperty(
|
|
27540
|
+
for (var o in e.sharedWebSockets)
|
|
27541
|
+
e.sharedWebSockets.hasOwnProperty(o) && delete e.sharedWebSockets[o];
|
|
27530
27542
|
};
|
|
27531
|
-
e.resetWebSockets =
|
|
27543
|
+
e.resetWebSockets = n;
|
|
27532
27544
|
})(Ae)), Ae;
|
|
27533
27545
|
}
|
|
27534
|
-
var
|
|
27546
|
+
var ne = {}, j = {}, Sa;
|
|
27535
27547
|
function $e() {
|
|
27536
27548
|
if (Sa) return j;
|
|
27537
27549
|
Sa = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.setUpSocketIOPing = j.appendQueryParams = j.parseSocketIOUrl = void 0;
|
|
27538
|
-
var e = A(),
|
|
27550
|
+
var e = A(), n = function(s) {
|
|
27539
27551
|
if (s) {
|
|
27540
|
-
var
|
|
27541
|
-
return "".concat(
|
|
27552
|
+
var g = /^https|wss/.test(s), U = s.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), r = g ? "wss" : "ws";
|
|
27553
|
+
return "".concat(r, "://").concat(_).concat(e.SOCKET_IO_PATH);
|
|
27542
27554
|
} else if (s === "") {
|
|
27543
|
-
var
|
|
27544
|
-
return "".concat(
|
|
27555
|
+
var g = /^https/.test(window.location.protocol), r = g ? "wss" : "ws", d = window.location.port ? ":".concat(window.location.port) : "";
|
|
27556
|
+
return "".concat(r, "://").concat(window.location.hostname).concat(d).concat(e.SOCKET_IO_PATH);
|
|
27545
27557
|
}
|
|
27546
27558
|
return s;
|
|
27547
27559
|
};
|
|
27548
|
-
j.parseSocketIOUrl =
|
|
27549
|
-
var
|
|
27550
|
-
|
|
27551
|
-
var U = /\?([\w]+=[\w]+)/, _ = U.test(s),
|
|
27552
|
-
var i =
|
|
27553
|
-
return
|
|
27560
|
+
j.parseSocketIOUrl = n;
|
|
27561
|
+
var c = function(s, g) {
|
|
27562
|
+
g === void 0 && (g = {});
|
|
27563
|
+
var U = /\?([\w]+=[\w]+)/, _ = U.test(s), r = "".concat(Object.entries(g).reduce(function(d, m) {
|
|
27564
|
+
var i = m[0], p = m[1];
|
|
27565
|
+
return d + "".concat(i, "=").concat(p, "&");
|
|
27554
27566
|
}, "").slice(0, -1));
|
|
27555
|
-
return "".concat(s).concat(_ ? "&" : "?").concat(
|
|
27567
|
+
return "".concat(s).concat(_ ? "&" : "?").concat(r);
|
|
27556
27568
|
};
|
|
27557
|
-
j.appendQueryParams =
|
|
27558
|
-
var
|
|
27559
|
-
|
|
27569
|
+
j.appendQueryParams = c;
|
|
27570
|
+
var o = function(s, g) {
|
|
27571
|
+
g === void 0 && (g = e.SOCKET_IO_PING_INTERVAL);
|
|
27560
27572
|
var U = function() {
|
|
27561
27573
|
return s(e.SOCKET_IO_PING_CODE);
|
|
27562
27574
|
};
|
|
27563
|
-
return window.setInterval(U,
|
|
27575
|
+
return window.setInterval(U, g);
|
|
27564
27576
|
};
|
|
27565
|
-
return j.setUpSocketIOPing =
|
|
27577
|
+
return j.setUpSocketIOPing = o, j;
|
|
27566
27578
|
}
|
|
27567
|
-
var
|
|
27568
|
-
function
|
|
27569
|
-
if (Na) return
|
|
27570
|
-
Na = 1, Object.defineProperty(
|
|
27579
|
+
var Pe = {}, Na;
|
|
27580
|
+
function Qa() {
|
|
27581
|
+
if (Na) return Pe;
|
|
27582
|
+
Na = 1, Object.defineProperty(Pe, "__esModule", { value: !0 }), Pe.heartbeat = c;
|
|
27571
27583
|
var e = A();
|
|
27572
|
-
function
|
|
27573
|
-
return Array.isArray(
|
|
27574
|
-
return s.current >
|
|
27575
|
-
}).current :
|
|
27584
|
+
function n(o) {
|
|
27585
|
+
return Array.isArray(o) ? o.reduce(function(s, g) {
|
|
27586
|
+
return s.current > g.current ? s : g;
|
|
27587
|
+
}).current : o.current;
|
|
27576
27588
|
}
|
|
27577
|
-
function
|
|
27578
|
-
var U =
|
|
27579
|
-
var b = Date.now(), u =
|
|
27580
|
-
if (u +
|
|
27581
|
-
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - u, "ms ago, last ping sent ").concat(b - t, "ms ago")),
|
|
27582
|
-
else if (u +
|
|
27589
|
+
function c(o, s, g) {
|
|
27590
|
+
var U = g || {}, _ = U.interval, r = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, d = U.timeout, m = d === void 0 ? e.DEFAULT_HEARTBEAT.timeout : d, i = U.message, p = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, r / 10), t = Date.now(), y = setInterval(function() {
|
|
27591
|
+
var b = Date.now(), u = n(s);
|
|
27592
|
+
if (u + m <= b)
|
|
27593
|
+
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - u, "ms ago, last ping sent ").concat(b - t, "ms ago")), o.close();
|
|
27594
|
+
else if (u + r <= b && t + r <= b)
|
|
27583
27595
|
try {
|
|
27584
|
-
typeof
|
|
27596
|
+
typeof p == "function" ? o.send(p()) : o.send(p), t = b;
|
|
27585
27597
|
} catch (T) {
|
|
27586
|
-
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T),
|
|
27598
|
+
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), o.close();
|
|
27587
27599
|
}
|
|
27588
27600
|
}, l);
|
|
27589
|
-
return
|
|
27601
|
+
return o.addEventListener("close", function() {
|
|
27590
27602
|
clearInterval(y);
|
|
27591
27603
|
}), function() {
|
|
27592
27604
|
};
|
|
27593
27605
|
}
|
|
27594
|
-
return
|
|
27606
|
+
return Pe;
|
|
27595
27607
|
}
|
|
27596
|
-
var
|
|
27608
|
+
var Ce = {}, Be = {}, Da;
|
|
27597
27609
|
function ea() {
|
|
27598
27610
|
return Da || (Da = 1, (function(e) {
|
|
27599
27611
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
|
|
27600
|
-
var
|
|
27601
|
-
return (0, e.hasSubscribers)(
|
|
27612
|
+
var n = {}, c = [], o = function(r) {
|
|
27613
|
+
return (0, e.hasSubscribers)(r) ? Array.from(n[r]) : c;
|
|
27602
27614
|
};
|
|
27603
|
-
e.getSubscribers =
|
|
27604
|
-
var s = function(
|
|
27605
|
-
var
|
|
27606
|
-
return ((
|
|
27615
|
+
e.getSubscribers = o;
|
|
27616
|
+
var s = function(r) {
|
|
27617
|
+
var d;
|
|
27618
|
+
return ((d = n[r]) === null || d === void 0 ? void 0 : d.size) > 0;
|
|
27607
27619
|
};
|
|
27608
27620
|
e.hasSubscribers = s;
|
|
27609
|
-
var
|
|
27610
|
-
|
|
27621
|
+
var g = function(r, d) {
|
|
27622
|
+
n[r] = n[r] || /* @__PURE__ */ new Set(), n[r].add(d);
|
|
27611
27623
|
};
|
|
27612
|
-
e.addSubscriber =
|
|
27613
|
-
var U = function(
|
|
27614
|
-
|
|
27624
|
+
e.addSubscriber = g;
|
|
27625
|
+
var U = function(r, d) {
|
|
27626
|
+
n[r].delete(d);
|
|
27615
27627
|
};
|
|
27616
27628
|
e.removeSubscriber = U;
|
|
27617
|
-
var _ = function(
|
|
27618
|
-
if (
|
|
27619
|
-
delete
|
|
27629
|
+
var _ = function(r) {
|
|
27630
|
+
if (r && n.hasOwnProperty(r))
|
|
27631
|
+
delete n[r];
|
|
27620
27632
|
else
|
|
27621
|
-
for (var
|
|
27622
|
-
|
|
27633
|
+
for (var d in n)
|
|
27634
|
+
n.hasOwnProperty(d) && delete n[d];
|
|
27623
27635
|
};
|
|
27624
27636
|
e.resetSubscribers = _;
|
|
27625
27637
|
})(Be)), Be;
|
|
27626
27638
|
}
|
|
27627
27639
|
var Ea;
|
|
27628
27640
|
function aa() {
|
|
27629
|
-
if (Ea) return
|
|
27630
|
-
Ea = 1, Object.defineProperty(
|
|
27631
|
-
var e = Xe(),
|
|
27632
|
-
function
|
|
27633
|
-
if (!
|
|
27641
|
+
if (Ea) return Ce;
|
|
27642
|
+
Ea = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.assertIsWebSocket = c, Ce.resetGlobalState = o;
|
|
27643
|
+
var e = Xe(), n = ea();
|
|
27644
|
+
function c(s, g) {
|
|
27645
|
+
if (!g && !(s instanceof WebSocket))
|
|
27634
27646
|
throw new Error("");
|
|
27635
27647
|
}
|
|
27636
|
-
function
|
|
27637
|
-
(0,
|
|
27648
|
+
function o(s) {
|
|
27649
|
+
(0, n.resetSubscribers)(s), (0, e.resetWebSockets)(s);
|
|
27638
27650
|
}
|
|
27639
|
-
return
|
|
27651
|
+
return Ce;
|
|
27640
27652
|
}
|
|
27641
27653
|
var La;
|
|
27642
|
-
function
|
|
27643
|
-
if (La) return
|
|
27654
|
+
function Bi() {
|
|
27655
|
+
if (La) return ne;
|
|
27644
27656
|
La = 1;
|
|
27645
|
-
var e =
|
|
27646
|
-
return e = Object.assign || function(
|
|
27647
|
-
for (var i,
|
|
27648
|
-
i = arguments[
|
|
27649
|
-
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (
|
|
27657
|
+
var e = ne && ne.__assign || function() {
|
|
27658
|
+
return e = Object.assign || function(m) {
|
|
27659
|
+
for (var i, p = 1, l = arguments.length; p < l; p++) {
|
|
27660
|
+
i = arguments[p];
|
|
27661
|
+
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (m[t] = i[t]);
|
|
27650
27662
|
}
|
|
27651
|
-
return
|
|
27663
|
+
return m;
|
|
27652
27664
|
}, e.apply(this, arguments);
|
|
27653
27665
|
};
|
|
27654
|
-
Object.defineProperty(
|
|
27655
|
-
var
|
|
27656
|
-
|
|
27666
|
+
Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachListeners = void 0;
|
|
27667
|
+
var n = $e(), c = Qa(), o = A(), s = aa(), g = function(m, i, p, l) {
|
|
27668
|
+
m.onmessage = function(t) {
|
|
27657
27669
|
var y;
|
|
27658
|
-
i.current.onMessage && i.current.onMessage(t), typeof l?.current == "number" && (l.current = Date.now()), !(typeof i.current.filter == "function" && i.current.filter(t) !== !0) && (i.current.heartbeat && typeof i.current.heartbeat != "boolean" && ((y = i.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === t.data ||
|
|
27670
|
+
i.current.onMessage && i.current.onMessage(t), typeof l?.current == "number" && (l.current = Date.now()), !(typeof i.current.filter == "function" && i.current.filter(t) !== !0) && (i.current.heartbeat && typeof i.current.heartbeat != "boolean" && ((y = i.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === t.data || p(t));
|
|
27659
27671
|
};
|
|
27660
|
-
}, U = function(
|
|
27661
|
-
|
|
27662
|
-
if (i.current.onOpen && i.current.onOpen(y), l.current = 0,
|
|
27672
|
+
}, U = function(m, i, p, l, t) {
|
|
27673
|
+
m.onopen = function(y) {
|
|
27674
|
+
if (i.current.onOpen && i.current.onOpen(y), l.current = 0, p(o.ReadyState.OPEN), i.current.heartbeat && m instanceof WebSocket) {
|
|
27663
27675
|
var b = typeof i.current.heartbeat == "boolean" ? void 0 : i.current.heartbeat;
|
|
27664
|
-
t.current = Date.now(), (0,
|
|
27676
|
+
t.current = Date.now(), (0, c.heartbeat)(m, t, b);
|
|
27665
27677
|
}
|
|
27666
27678
|
};
|
|
27667
|
-
}, _ = function(
|
|
27668
|
-
if (
|
|
27679
|
+
}, _ = function(m, i, p, l, t) {
|
|
27680
|
+
if (o.isEventSourceSupported && m instanceof EventSource)
|
|
27669
27681
|
return function() {
|
|
27670
27682
|
};
|
|
27671
|
-
(0, s.assertIsWebSocket)(
|
|
27683
|
+
(0, s.assertIsWebSocket)(m, i.current.skipAssert);
|
|
27672
27684
|
var y;
|
|
27673
|
-
return
|
|
27685
|
+
return m.onclose = function(b) {
|
|
27674
27686
|
var u;
|
|
27675
|
-
if (i.current.onClose && i.current.onClose(b),
|
|
27676
|
-
var T = (u = i.current.reconnectAttempts) !== null && u !== void 0 ? u :
|
|
27687
|
+
if (i.current.onClose && i.current.onClose(b), p(o.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
|
|
27688
|
+
var T = (u = i.current.reconnectAttempts) !== null && u !== void 0 ? u : o.DEFAULT_RECONNECT_LIMIT;
|
|
27677
27689
|
if (t.current < T) {
|
|
27678
27690
|
var N = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
|
|
27679
27691
|
y = window.setTimeout(function() {
|
|
27680
27692
|
t.current++, l();
|
|
27681
|
-
}, N ??
|
|
27693
|
+
}, N ?? o.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27682
27694
|
} else
|
|
27683
27695
|
i.current.onReconnectStop && i.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
|
|
27684
27696
|
}
|
|
27685
27697
|
}, function() {
|
|
27686
27698
|
return y && window.clearTimeout(y);
|
|
27687
27699
|
};
|
|
27688
|
-
},
|
|
27700
|
+
}, r = function(m, i, p, l, t) {
|
|
27689
27701
|
var y;
|
|
27690
|
-
return
|
|
27702
|
+
return m.onerror = function(b) {
|
|
27691
27703
|
var u;
|
|
27692
|
-
if (i.current.onError && i.current.onError(b),
|
|
27693
|
-
if (t.current < ((u = i.current.reconnectAttempts) !== null && u !== void 0 ? u :
|
|
27704
|
+
if (i.current.onError && i.current.onError(b), o.isEventSourceSupported && m instanceof EventSource && (i.current.onClose && i.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), p(o.ReadyState.CLOSED), m.close()), i.current.retryOnError)
|
|
27705
|
+
if (t.current < ((u = i.current.reconnectAttempts) !== null && u !== void 0 ? u : o.DEFAULT_RECONNECT_LIMIT)) {
|
|
27694
27706
|
var T = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
|
|
27695
27707
|
y = window.setTimeout(function() {
|
|
27696
27708
|
t.current++, l();
|
|
27697
|
-
}, T ??
|
|
27709
|
+
}, T ?? o.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27698
27710
|
} else
|
|
27699
27711
|
i.current.onReconnectStop && i.current.onReconnectStop(i.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(i.current.reconnectAttempts, " exceeded"));
|
|
27700
27712
|
}, function() {
|
|
27701
27713
|
return y && window.clearTimeout(y);
|
|
27702
27714
|
};
|
|
27703
|
-
},
|
|
27715
|
+
}, d = function(m, i, p, l, t, y, b) {
|
|
27704
27716
|
var u = i.setLastMessage, T = i.setReadyState, N, D, h;
|
|
27705
|
-
return
|
|
27706
|
-
T(
|
|
27717
|
+
return p.current.fromSocketIO && (N = (0, n.setUpSocketIOPing)(b)), g(m, p, u, y), U(m, p, T, t, y), D = _(m, p, T, l, t), h = r(m, p, T, l, t), function() {
|
|
27718
|
+
T(o.ReadyState.CLOSING), D(), h(), m.close(), N && clearInterval(N);
|
|
27707
27719
|
};
|
|
27708
27720
|
};
|
|
27709
|
-
return
|
|
27721
|
+
return ne.attachListeners = d, ne;
|
|
27710
27722
|
}
|
|
27711
|
-
var
|
|
27712
|
-
function
|
|
27713
|
-
if (Ga) return
|
|
27723
|
+
var me = {}, Ga;
|
|
27724
|
+
function Ki() {
|
|
27725
|
+
if (Ga) return me;
|
|
27714
27726
|
Ga = 1;
|
|
27715
|
-
var e =
|
|
27727
|
+
var e = me && me.__assign || function() {
|
|
27716
27728
|
return e = Object.assign || function(i) {
|
|
27717
|
-
for (var
|
|
27718
|
-
|
|
27719
|
-
for (var y in
|
|
27729
|
+
for (var p, l = 1, t = arguments.length; l < t; l++) {
|
|
27730
|
+
p = arguments[l];
|
|
27731
|
+
for (var y in p) Object.prototype.hasOwnProperty.call(p, y) && (i[y] = p[y]);
|
|
27720
27732
|
}
|
|
27721
27733
|
return i;
|
|
27722
27734
|
}, e.apply(this, arguments);
|
|
27723
27735
|
};
|
|
27724
|
-
Object.defineProperty(
|
|
27725
|
-
var
|
|
27736
|
+
Object.defineProperty(me, "__esModule", { value: !0 }), me.attachSharedListeners = void 0;
|
|
27737
|
+
var n = Xe(), c = A(), o = ea(), s = $e(), g = Qa(), U = function(i, p, l) {
|
|
27726
27738
|
i.onmessage = function(t) {
|
|
27727
|
-
(0,
|
|
27739
|
+
(0, o.getSubscribers)(p).forEach(function(y) {
|
|
27728
27740
|
var b;
|
|
27729
27741
|
y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(t), typeof ((b = y?.lastMessageTime) === null || b === void 0 ? void 0 : b.current) == "number" && (y.lastMessageTime.current = Date.now()), !(typeof y.optionsRef.current.filter == "function" && y.optionsRef.current.filter(t) !== !0) && (l && typeof l != "boolean" && l?.returnMessage === t.data || y.setLastMessage(t));
|
|
27730
27742
|
});
|
|
27731
27743
|
};
|
|
27732
|
-
}, _ = function(i,
|
|
27744
|
+
}, _ = function(i, p, l) {
|
|
27733
27745
|
i.onopen = function(t) {
|
|
27734
|
-
var y = (0,
|
|
27746
|
+
var y = (0, o.getSubscribers)(p);
|
|
27735
27747
|
y.forEach(function(b) {
|
|
27736
|
-
b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(t), b.setReadyState(
|
|
27737
|
-
}), l && i instanceof WebSocket && (0,
|
|
27748
|
+
b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(t), b.setReadyState(c.ReadyState.OPEN), l && i instanceof WebSocket && (b.lastMessageTime.current = Date.now());
|
|
27749
|
+
}), l && i instanceof WebSocket && (0, g.heartbeat)(i, y.map(function(b) {
|
|
27738
27750
|
return b.lastMessageTime;
|
|
27739
27751
|
}), typeof l == "boolean" ? void 0 : l);
|
|
27740
27752
|
};
|
|
27741
|
-
},
|
|
27753
|
+
}, r = function(i, p) {
|
|
27742
27754
|
i instanceof WebSocket && (i.onclose = function(l) {
|
|
27743
|
-
(0,
|
|
27744
|
-
t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(
|
|
27745
|
-
}), delete
|
|
27755
|
+
(0, o.getSubscribers)(p).forEach(function(t) {
|
|
27756
|
+
t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(c.ReadyState.CLOSED);
|
|
27757
|
+
}), delete n.sharedWebSockets[p], (0, o.getSubscribers)(p).forEach(function(t) {
|
|
27746
27758
|
var y;
|
|
27747
27759
|
if (t.optionsRef.current.shouldReconnect && t.optionsRef.current.shouldReconnect(l)) {
|
|
27748
|
-
var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y :
|
|
27760
|
+
var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : c.DEFAULT_RECONNECT_LIMIT;
|
|
27749
27761
|
if (t.reconnectCount.current < b) {
|
|
27750
27762
|
var u = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
|
|
27751
27763
|
setTimeout(function() {
|
|
27752
27764
|
t.reconnectCount.current++, t.reconnect.current();
|
|
27753
|
-
}, u ??
|
|
27765
|
+
}, u ?? c.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27754
27766
|
} else
|
|
27755
27767
|
t.optionsRef.current.onReconnectStop && t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
|
|
27756
27768
|
}
|
|
27757
27769
|
});
|
|
27758
27770
|
});
|
|
27759
|
-
},
|
|
27771
|
+
}, d = function(i, p) {
|
|
27760
27772
|
i.onerror = function(l) {
|
|
27761
|
-
(0,
|
|
27762
|
-
t.optionsRef.current.onError && t.optionsRef.current.onError(l),
|
|
27763
|
-
}),
|
|
27773
|
+
(0, o.getSubscribers)(p).forEach(function(t) {
|
|
27774
|
+
t.optionsRef.current.onError && t.optionsRef.current.onError(l), c.isEventSourceSupported && i instanceof EventSource && (t.optionsRef.current.onClose && t.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), t.setReadyState(c.ReadyState.CLOSED));
|
|
27775
|
+
}), c.isEventSourceSupported && i instanceof EventSource && i.close();
|
|
27764
27776
|
};
|
|
27765
|
-
},
|
|
27777
|
+
}, m = function(i, p, l, t) {
|
|
27766
27778
|
var y;
|
|
27767
|
-
return l.current.fromSocketIO && (y = (0, s.setUpSocketIOPing)(t)), U(i,
|
|
27779
|
+
return l.current.fromSocketIO && (y = (0, s.setUpSocketIOPing)(t)), U(i, p, l.current.heartbeat), r(i, p), _(i, p, l.current.heartbeat), d(i, p), function() {
|
|
27768
27780
|
y && clearInterval(y);
|
|
27769
27781
|
};
|
|
27770
27782
|
};
|
|
27771
|
-
return
|
|
27783
|
+
return me.attachSharedListeners = m, me;
|
|
27772
27784
|
}
|
|
27773
27785
|
var Ma;
|
|
27774
|
-
function
|
|
27775
|
-
if (Ma) return
|
|
27776
|
-
Ma = 1, Object.defineProperty(
|
|
27777
|
-
var e = Xe(),
|
|
27786
|
+
function Qi() {
|
|
27787
|
+
if (Ma) return Te;
|
|
27788
|
+
Ma = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.createOrJoinSocket = void 0;
|
|
27789
|
+
var e = Xe(), n = A(), c = Bi(), o = Ki(), s = ea(), g = function(_, r, d, m, i) {
|
|
27778
27790
|
return function() {
|
|
27779
|
-
if ((0, s.removeSubscriber)(_,
|
|
27791
|
+
if ((0, s.removeSubscriber)(_, r), !(0, s.hasSubscribers)(_)) {
|
|
27780
27792
|
try {
|
|
27781
|
-
var
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
}),
|
|
27793
|
+
var p = e.sharedWebSockets[_];
|
|
27794
|
+
p instanceof WebSocket && (p.onclose = function(l) {
|
|
27795
|
+
d.current.onClose && d.current.onClose(l), m(n.ReadyState.CLOSED);
|
|
27796
|
+
}), p.close();
|
|
27785
27797
|
} catch {
|
|
27786
27798
|
}
|
|
27787
27799
|
i && i(), delete e.sharedWebSockets[_];
|
|
27788
27800
|
}
|
|
27789
27801
|
};
|
|
27790
|
-
}, U = function(_,
|
|
27791
|
-
if (!
|
|
27792
|
-
throw
|
|
27793
|
-
if (
|
|
27802
|
+
}, U = function(_, r, d, m, i, p, l, t, y) {
|
|
27803
|
+
if (!n.isEventSourceSupported && m.current.eventSourceOptions)
|
|
27804
|
+
throw n.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
|
|
27805
|
+
if (m.current.share) {
|
|
27794
27806
|
var b = null;
|
|
27795
|
-
e.sharedWebSockets[
|
|
27807
|
+
e.sharedWebSockets[r] === void 0 ? (e.sharedWebSockets[r] = m.current.eventSourceOptions ? new EventSource(r, m.current.eventSourceOptions) : new WebSocket(r, m.current.protocols), _.current = e.sharedWebSockets[r], d(n.ReadyState.CONNECTING), b = (0, o.attachSharedListeners)(e.sharedWebSockets[r], r, m, y)) : (_.current = e.sharedWebSockets[r], d(e.sharedWebSockets[r].readyState));
|
|
27796
27808
|
var u = {
|
|
27797
27809
|
setLastMessage: i,
|
|
27798
|
-
setReadyState:
|
|
27799
|
-
optionsRef:
|
|
27810
|
+
setReadyState: d,
|
|
27811
|
+
optionsRef: m,
|
|
27800
27812
|
reconnectCount: l,
|
|
27801
27813
|
lastMessageTime: t,
|
|
27802
|
-
reconnect:
|
|
27814
|
+
reconnect: p
|
|
27803
27815
|
};
|
|
27804
|
-
return (0, s.addSubscriber)(
|
|
27816
|
+
return (0, s.addSubscriber)(r, u), g(r, u, m, d, b);
|
|
27805
27817
|
} else {
|
|
27806
|
-
if (_.current =
|
|
27818
|
+
if (_.current = m.current.eventSourceOptions ? new EventSource(r, m.current.eventSourceOptions) : new WebSocket(r, m.current.protocols), d(n.ReadyState.CONNECTING), !_.current)
|
|
27807
27819
|
throw new Error("WebSocket failed to be created");
|
|
27808
|
-
return (0,
|
|
27820
|
+
return (0, c.attachListeners)(_.current, {
|
|
27809
27821
|
setLastMessage: i,
|
|
27810
|
-
setReadyState:
|
|
27811
|
-
},
|
|
27822
|
+
setReadyState: d
|
|
27823
|
+
}, m, p.current, l, t, y);
|
|
27812
27824
|
}
|
|
27813
27825
|
};
|
|
27814
|
-
return
|
|
27826
|
+
return Te.createOrJoinSocket = U, Te;
|
|
27815
27827
|
}
|
|
27816
27828
|
var Y = {}, Ra;
|
|
27817
|
-
function
|
|
27829
|
+
function ji() {
|
|
27818
27830
|
return Ra || (Ra = 1, (function(e) {
|
|
27819
|
-
var
|
|
27820
|
-
function
|
|
27821
|
-
return l instanceof
|
|
27831
|
+
var n = Y && Y.__awaiter || function(r, d, m, i) {
|
|
27832
|
+
function p(l) {
|
|
27833
|
+
return l instanceof m ? l : new m(function(t) {
|
|
27822
27834
|
t(l);
|
|
27823
27835
|
});
|
|
27824
27836
|
}
|
|
27825
|
-
return new (
|
|
27837
|
+
return new (m || (m = Promise))(function(l, t) {
|
|
27826
27838
|
function y(T) {
|
|
27827
27839
|
try {
|
|
27828
27840
|
u(i.next(T));
|
|
@@ -27838,15 +27850,15 @@ function Qi() {
|
|
|
27838
27850
|
}
|
|
27839
27851
|
}
|
|
27840
27852
|
function u(T) {
|
|
27841
|
-
T.done ? l(T.value) :
|
|
27853
|
+
T.done ? l(T.value) : p(T.value).then(y, b);
|
|
27842
27854
|
}
|
|
27843
|
-
u((i = i.apply(
|
|
27855
|
+
u((i = i.apply(r, d || [])).next());
|
|
27844
27856
|
});
|
|
27845
|
-
},
|
|
27846
|
-
var
|
|
27857
|
+
}, c = Y && Y.__generator || function(r, d) {
|
|
27858
|
+
var m = { label: 0, sent: function() {
|
|
27847
27859
|
if (l[0] & 1) throw l[1];
|
|
27848
27860
|
return l[1];
|
|
27849
|
-
}, trys: [], ops: [] }, i,
|
|
27861
|
+
}, trys: [], ops: [] }, i, p, l, t = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
27850
27862
|
return t.next = y(0), t.throw = y(1), t.return = y(2), typeof Symbol == "function" && (t[Symbol.iterator] = function() {
|
|
27851
27863
|
return this;
|
|
27852
27864
|
}), t;
|
|
@@ -27857,78 +27869,78 @@ function Qi() {
|
|
|
27857
27869
|
}
|
|
27858
27870
|
function b(u) {
|
|
27859
27871
|
if (i) throw new TypeError("Generator is already executing.");
|
|
27860
|
-
for (; t && (t = 0, u[0] && (
|
|
27861
|
-
if (i = 1,
|
|
27862
|
-
switch (
|
|
27872
|
+
for (; t && (t = 0, u[0] && (m = 0)), m; ) try {
|
|
27873
|
+
if (i = 1, p && (l = u[0] & 2 ? p.return : u[0] ? p.throw || ((l = p.return) && l.call(p), 0) : p.next) && !(l = l.call(p, u[1])).done) return l;
|
|
27874
|
+
switch (p = 0, l && (u = [u[0] & 2, l.value]), u[0]) {
|
|
27863
27875
|
case 0:
|
|
27864
27876
|
case 1:
|
|
27865
27877
|
l = u;
|
|
27866
27878
|
break;
|
|
27867
27879
|
case 4:
|
|
27868
|
-
return
|
|
27880
|
+
return m.label++, { value: u[1], done: !1 };
|
|
27869
27881
|
case 5:
|
|
27870
|
-
|
|
27882
|
+
m.label++, p = u[1], u = [0];
|
|
27871
27883
|
continue;
|
|
27872
27884
|
case 7:
|
|
27873
|
-
u =
|
|
27885
|
+
u = m.ops.pop(), m.trys.pop();
|
|
27874
27886
|
continue;
|
|
27875
27887
|
default:
|
|
27876
|
-
if (l =
|
|
27877
|
-
|
|
27888
|
+
if (l = m.trys, !(l = l.length > 0 && l[l.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
27889
|
+
m = 0;
|
|
27878
27890
|
continue;
|
|
27879
27891
|
}
|
|
27880
27892
|
if (u[0] === 3 && (!l || u[1] > l[0] && u[1] < l[3])) {
|
|
27881
|
-
|
|
27893
|
+
m.label = u[1];
|
|
27882
27894
|
break;
|
|
27883
27895
|
}
|
|
27884
|
-
if (u[0] === 6 &&
|
|
27885
|
-
|
|
27896
|
+
if (u[0] === 6 && m.label < l[1]) {
|
|
27897
|
+
m.label = l[1], l = u;
|
|
27886
27898
|
break;
|
|
27887
27899
|
}
|
|
27888
|
-
if (l &&
|
|
27889
|
-
|
|
27900
|
+
if (l && m.label < l[2]) {
|
|
27901
|
+
m.label = l[2], m.ops.push(u);
|
|
27890
27902
|
break;
|
|
27891
27903
|
}
|
|
27892
|
-
l[2] &&
|
|
27904
|
+
l[2] && m.ops.pop(), m.trys.pop();
|
|
27893
27905
|
continue;
|
|
27894
27906
|
}
|
|
27895
|
-
u =
|
|
27907
|
+
u = d.call(r, m);
|
|
27896
27908
|
} catch (T) {
|
|
27897
|
-
u = [6, T],
|
|
27909
|
+
u = [6, T], p = 0;
|
|
27898
27910
|
} finally {
|
|
27899
27911
|
i = l = 0;
|
|
27900
27912
|
}
|
|
27901
27913
|
if (u[0] & 5) throw u[1];
|
|
27902
27914
|
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
27903
27915
|
}
|
|
27904
|
-
},
|
|
27905
|
-
if (
|
|
27906
|
-
(l || !(i in
|
|
27907
|
-
return
|
|
27916
|
+
}, o = Y && Y.__spreadArray || function(r, d, m) {
|
|
27917
|
+
if (m || arguments.length === 2) for (var i = 0, p = d.length, l; i < p; i++)
|
|
27918
|
+
(l || !(i in d)) && (l || (l = Array.prototype.slice.call(d, 0, i)), l[i] = d[i]);
|
|
27919
|
+
return r.concat(l || Array.prototype.slice.call(d));
|
|
27908
27920
|
};
|
|
27909
27921
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
|
|
27910
|
-
var s = $e(),
|
|
27911
|
-
return new Promise(function(
|
|
27912
|
-
return window.setTimeout(
|
|
27922
|
+
var s = $e(), g = A(), U = function(r) {
|
|
27923
|
+
return new Promise(function(d) {
|
|
27924
|
+
return window.setTimeout(d, r);
|
|
27913
27925
|
});
|
|
27914
|
-
}, _ = function(
|
|
27915
|
-
for (var
|
|
27916
|
-
|
|
27917
|
-
return
|
|
27926
|
+
}, _ = function(r, d) {
|
|
27927
|
+
for (var m = [], i = 2; i < arguments.length; i++)
|
|
27928
|
+
m[i - 2] = arguments[i];
|
|
27929
|
+
return n(void 0, o([r, d], m, !0), void 0, function(p, l, t) {
|
|
27918
27930
|
var y, b, u, T, N, D, h, L;
|
|
27919
|
-
return t === void 0 && (t = 0),
|
|
27931
|
+
return t === void 0 && (t = 0), c(this, function(M) {
|
|
27920
27932
|
switch (M.label) {
|
|
27921
27933
|
case 0:
|
|
27922
|
-
if (typeof
|
|
27934
|
+
if (typeof p != "function") return [3, 10];
|
|
27923
27935
|
M.label = 1;
|
|
27924
27936
|
case 1:
|
|
27925
|
-
return M.trys.push([1, 3, , 9]), [4,
|
|
27937
|
+
return M.trys.push([1, 3, , 9]), [4, p()];
|
|
27926
27938
|
case 2:
|
|
27927
27939
|
return y = M.sent(), [3, 9];
|
|
27928
27940
|
case 3:
|
|
27929
|
-
return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D :
|
|
27941
|
+
return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D : g.DEFAULT_RECONNECT_LIMIT, t < b ? (u = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(t) : l.current.reconnectInterval, [4, U(u ?? g.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
|
|
27930
27942
|
case 4:
|
|
27931
|
-
return M.sent(), [2, (0, e.getUrl)(
|
|
27943
|
+
return M.sent(), [2, (0, e.getUrl)(p, l, t + 1)];
|
|
27932
27944
|
case 5:
|
|
27933
27945
|
return (L = (h = l.current).onReconnectStop) === null || L === void 0 || L.call(h, t), [2, null];
|
|
27934
27946
|
case 6:
|
|
@@ -27940,7 +27952,7 @@ function Qi() {
|
|
|
27940
27952
|
case 9:
|
|
27941
27953
|
return [3, 11];
|
|
27942
27954
|
case 10:
|
|
27943
|
-
y =
|
|
27955
|
+
y = p, M.label = 11;
|
|
27944
27956
|
case 11:
|
|
27945
27957
|
return T = l.current.fromSocketIO ? (0, s.parseSocketIOUrl)(y) : y, N = l.current.queryParams ? (0, s.appendQueryParams)(T, l.current.queryParams) : T, [2, N];
|
|
27946
27958
|
}
|
|
@@ -27951,22 +27963,22 @@ function Qi() {
|
|
|
27951
27963
|
})(Y)), Y;
|
|
27952
27964
|
}
|
|
27953
27965
|
var Ke = {}, Pa;
|
|
27954
|
-
function
|
|
27966
|
+
function Yi() {
|
|
27955
27967
|
return Pa || (Pa = 1, (function(e) {
|
|
27956
27968
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
|
|
27957
|
-
var
|
|
27958
|
-
return new Proxy(
|
|
27959
|
-
get: function(s,
|
|
27960
|
-
var U = s[
|
|
27961
|
-
return
|
|
27969
|
+
var n = function(c, o) {
|
|
27970
|
+
return new Proxy(c, {
|
|
27971
|
+
get: function(s, g) {
|
|
27972
|
+
var U = s[g];
|
|
27973
|
+
return g === "reconnect" ? o : typeof U == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
|
|
27962
27974
|
}) : U;
|
|
27963
27975
|
},
|
|
27964
|
-
set: function(s,
|
|
27965
|
-
return /^on/.test(
|
|
27976
|
+
set: function(s, g, U) {
|
|
27977
|
+
return /^on/.test(g) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (s[g] = U, !0);
|
|
27966
27978
|
}
|
|
27967
27979
|
});
|
|
27968
27980
|
};
|
|
27969
|
-
e.websocketWrapper =
|
|
27981
|
+
e.websocketWrapper = n, e.default = e.websocketWrapper;
|
|
27970
27982
|
})(Ke)), Ke;
|
|
27971
27983
|
}
|
|
27972
27984
|
var xa;
|
|
@@ -27974,14 +27986,14 @@ function ia() {
|
|
|
27974
27986
|
if (xa) return J;
|
|
27975
27987
|
xa = 1;
|
|
27976
27988
|
var e = J && J.__assign || function() {
|
|
27977
|
-
return e = Object.assign || function(
|
|
27989
|
+
return e = Object.assign || function(p) {
|
|
27978
27990
|
for (var l, t = 1, y = arguments.length; t < y; t++) {
|
|
27979
27991
|
l = arguments[t];
|
|
27980
|
-
for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (
|
|
27992
|
+
for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (p[b] = l[b]);
|
|
27981
27993
|
}
|
|
27982
|
-
return
|
|
27994
|
+
return p;
|
|
27983
27995
|
}, e.apply(this, arguments);
|
|
27984
|
-
},
|
|
27996
|
+
}, n = J && J.__awaiter || function(p, l, t, y) {
|
|
27985
27997
|
function b(u) {
|
|
27986
27998
|
return u instanceof t ? u : new t(function(T) {
|
|
27987
27999
|
T(u);
|
|
@@ -28005,9 +28017,9 @@ function ia() {
|
|
|
28005
28017
|
function h(L) {
|
|
28006
28018
|
L.done ? u(L.value) : b(L.value).then(N, D);
|
|
28007
28019
|
}
|
|
28008
|
-
h((y = y.apply(
|
|
28020
|
+
h((y = y.apply(p, l || [])).next());
|
|
28009
28021
|
});
|
|
28010
|
-
},
|
|
28022
|
+
}, c = J && J.__generator || function(p, l) {
|
|
28011
28023
|
var t = { label: 0, sent: function() {
|
|
28012
28024
|
if (u[0] & 1) throw u[1];
|
|
28013
28025
|
return u[1];
|
|
@@ -28057,7 +28069,7 @@ function ia() {
|
|
|
28057
28069
|
u[2] && t.ops.pop(), t.trys.pop();
|
|
28058
28070
|
continue;
|
|
28059
28071
|
}
|
|
28060
|
-
h = l.call(
|
|
28072
|
+
h = l.call(p, t);
|
|
28061
28073
|
} catch (L) {
|
|
28062
28074
|
h = [6, L], b = 0;
|
|
28063
28075
|
} finally {
|
|
@@ -28066,11 +28078,11 @@ function ia() {
|
|
|
28066
28078
|
if (h[0] & 5) throw h[1];
|
|
28067
28079
|
return { value: h[0] ? h[1] : void 0, done: !0 };
|
|
28068
28080
|
}
|
|
28069
|
-
},
|
|
28070
|
-
return
|
|
28081
|
+
}, o = J && J.__importDefault || function(p) {
|
|
28082
|
+
return p && p.__esModule ? p : { default: p };
|
|
28071
28083
|
};
|
|
28072
28084
|
Object.defineProperty(J, "__esModule", { value: !0 }), J.useWebSocket = void 0;
|
|
28073
|
-
var s =
|
|
28085
|
+
var s = he, g = ki, U = A(), _ = Qi(), r = ji(), d = o(Yi()), m = aa(), i = function(p, l, t) {
|
|
28074
28086
|
l === void 0 && (l = U.DEFAULT_OPTIONS), t === void 0 && (t = !0);
|
|
28075
28087
|
var y = (0, s.useState)(null), b = y[0], u = y[1], T = (0, s.useState)({}), N = T[0], D = T[1], h = (0, s.useMemo)(function() {
|
|
28076
28088
|
if (!l.disableJson && b)
|
|
@@ -28080,50 +28092,50 @@ function ia() {
|
|
|
28080
28092
|
return U.UNPARSABLE_JSON_OBJECT;
|
|
28081
28093
|
}
|
|
28082
28094
|
return null;
|
|
28083
|
-
}, [b, l.disableJson]), L = (0, s.useRef)(null), M = (0, s.useRef)(null),
|
|
28084
|
-
}),
|
|
28095
|
+
}, [b, l.disableJson]), L = (0, s.useRef)(null), M = (0, s.useRef)(null), ce = (0, s.useRef)(function() {
|
|
28096
|
+
}), _e = (0, s.useRef)(0), we = (0, s.useRef)(Date.now()), ke = (0, s.useRef)([]), V = (0, s.useRef)(null), H = (0, s.useRef)(l);
|
|
28085
28097
|
H.current = l;
|
|
28086
|
-
var Z = L.current && N[L.current] !== void 0 ? N[L.current] :
|
|
28098
|
+
var Z = L.current && N[L.current] !== void 0 ? N[L.current] : p !== null && t === !0 ? U.ReadyState.CONNECTING : U.ReadyState.UNINSTANTIATED, ae = l.queryParams ? JSON.stringify(l.queryParams) : null, B = (0, s.useCallback)(function(x, w) {
|
|
28087
28099
|
var K;
|
|
28088
28100
|
if (w === void 0 && (w = !0), U.isEventSourceSupported && M.current instanceof EventSource) {
|
|
28089
28101
|
console.warn("Unable to send a message from an eventSource");
|
|
28090
28102
|
return;
|
|
28091
28103
|
}
|
|
28092
|
-
((K = M.current) === null || K === void 0 ? void 0 : K.readyState) === U.ReadyState.OPEN ? ((0,
|
|
28093
|
-
}, []),
|
|
28104
|
+
((K = M.current) === null || K === void 0 ? void 0 : K.readyState) === U.ReadyState.OPEN ? ((0, m.assertIsWebSocket)(M.current, H.current.skipAssert), M.current.send(x)) : w && ke.current.push(x);
|
|
28105
|
+
}, []), Se = (0, s.useCallback)(function(x, w) {
|
|
28094
28106
|
w === void 0 && (w = !0), B(JSON.stringify(x), w);
|
|
28095
|
-
}, [B]),
|
|
28096
|
-
return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0,
|
|
28107
|
+
}, [B]), Ne = (0, s.useCallback)(function() {
|
|
28108
|
+
return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, m.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0, d.default)(M.current, ce)), V.current);
|
|
28097
28109
|
}, []);
|
|
28098
28110
|
return (0, s.useEffect)(function() {
|
|
28099
|
-
if (
|
|
28100
|
-
var x, w = !1, K = !0,
|
|
28101
|
-
return
|
|
28102
|
-
var
|
|
28103
|
-
return
|
|
28111
|
+
if (p !== null && t === !0) {
|
|
28112
|
+
var x, w = !1, K = !0, fe = function() {
|
|
28113
|
+
return n(void 0, void 0, void 0, function() {
|
|
28114
|
+
var ie, $, De;
|
|
28115
|
+
return c(this, function(se) {
|
|
28104
28116
|
switch (se.label) {
|
|
28105
28117
|
case 0:
|
|
28106
|
-
return
|
|
28118
|
+
return ie = L, [4, (0, r.getUrl)(p, H)];
|
|
28107
28119
|
case 1:
|
|
28108
|
-
return
|
|
28120
|
+
return ie.current = se.sent(), L.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), L.current = "ABORTED", (0, g.flushSync)(function() {
|
|
28109
28121
|
return D(function(Q) {
|
|
28110
28122
|
return e(e({}, Q), { ABORTED: U.ReadyState.CLOSED });
|
|
28111
28123
|
});
|
|
28112
28124
|
}), [
|
|
28113
28125
|
2
|
|
28114
28126
|
/*return*/
|
|
28115
|
-
]) : (
|
|
28116
|
-
w || (0,
|
|
28127
|
+
]) : ($ = function(Q) {
|
|
28128
|
+
w || (0, g.flushSync)(function() {
|
|
28117
28129
|
return u(Q);
|
|
28118
28130
|
});
|
|
28119
|
-
},
|
|
28120
|
-
w || (0,
|
|
28131
|
+
}, De = function(Q) {
|
|
28132
|
+
w || (0, g.flushSync)(function() {
|
|
28121
28133
|
return D(function(ue) {
|
|
28122
|
-
var
|
|
28123
|
-
return e(e({}, ue), L.current && (
|
|
28134
|
+
var le;
|
|
28135
|
+
return e(e({}, ue), L.current && (le = {}, le[L.current] = Q, le));
|
|
28124
28136
|
});
|
|
28125
28137
|
});
|
|
28126
|
-
}, K && (x = (0, _.createOrJoinSocket)(M, L.current,
|
|
28138
|
+
}, K && (x = (0, _.createOrJoinSocket)(M, L.current, De, H, $, ce, _e, we, B)), [
|
|
28127
28139
|
2
|
|
28128
28140
|
/*return*/
|
|
28129
28141
|
]);
|
|
@@ -28131,67 +28143,67 @@ function ia() {
|
|
|
28131
28143
|
});
|
|
28132
28144
|
});
|
|
28133
28145
|
};
|
|
28134
|
-
return
|
|
28135
|
-
w || (V.current && (V.current = null), x?.(),
|
|
28136
|
-
},
|
|
28146
|
+
return ce.current = function() {
|
|
28147
|
+
w || (V.current && (V.current = null), x?.(), fe());
|
|
28148
|
+
}, fe(), function() {
|
|
28137
28149
|
w = !0, K = !1, V.current && (V.current = null), x?.(), u(null);
|
|
28138
28150
|
};
|
|
28139
|
-
} else (
|
|
28140
|
-
var
|
|
28141
|
-
return e(e({},
|
|
28151
|
+
} else (p === null || t === !1) && (_e.current = 0, D(function(ie) {
|
|
28152
|
+
var $;
|
|
28153
|
+
return e(e({}, ie), L.current && ($ = {}, $[L.current] = U.ReadyState.CLOSED, $));
|
|
28142
28154
|
}));
|
|
28143
|
-
}, [
|
|
28144
|
-
Z === U.ReadyState.OPEN &&
|
|
28155
|
+
}, [p, t, ae, B]), (0, s.useEffect)(function() {
|
|
28156
|
+
Z === U.ReadyState.OPEN && ke.current.splice(0).forEach(function(x) {
|
|
28145
28157
|
B(x);
|
|
28146
28158
|
});
|
|
28147
28159
|
}, [Z]), {
|
|
28148
28160
|
sendMessage: B,
|
|
28149
|
-
sendJsonMessage:
|
|
28161
|
+
sendJsonMessage: Se,
|
|
28150
28162
|
lastMessage: b,
|
|
28151
28163
|
lastJsonMessage: h,
|
|
28152
28164
|
readyState: Z,
|
|
28153
|
-
getWebSocket:
|
|
28165
|
+
getWebSocket: Ne
|
|
28154
28166
|
};
|
|
28155
28167
|
};
|
|
28156
28168
|
return J.useWebSocket = i, J;
|
|
28157
28169
|
}
|
|
28158
|
-
var
|
|
28159
|
-
function
|
|
28160
|
-
if (Oa) return
|
|
28170
|
+
var re = {}, Oa;
|
|
28171
|
+
function qi() {
|
|
28172
|
+
if (Oa) return re;
|
|
28161
28173
|
Oa = 1;
|
|
28162
|
-
var e =
|
|
28174
|
+
var e = re && re.__assign || function() {
|
|
28163
28175
|
return e = Object.assign || function(_) {
|
|
28164
|
-
for (var
|
|
28165
|
-
|
|
28166
|
-
for (var i in
|
|
28176
|
+
for (var r, d = 1, m = arguments.length; d < m; d++) {
|
|
28177
|
+
r = arguments[d];
|
|
28178
|
+
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (_[i] = r[i]);
|
|
28167
28179
|
}
|
|
28168
28180
|
return _;
|
|
28169
28181
|
}, e.apply(this, arguments);
|
|
28170
28182
|
};
|
|
28171
|
-
Object.defineProperty(
|
|
28172
|
-
var
|
|
28183
|
+
Object.defineProperty(re, "__esModule", { value: !0 }), re.useSocketIO = void 0;
|
|
28184
|
+
var n = he, c = ia(), o = A(), s = {
|
|
28173
28185
|
type: "empty",
|
|
28174
28186
|
payload: null
|
|
28175
|
-
},
|
|
28187
|
+
}, g = function(_) {
|
|
28176
28188
|
if (!_ || !_.data)
|
|
28177
28189
|
return s;
|
|
28178
|
-
var
|
|
28179
|
-
if (!
|
|
28190
|
+
var r = _.data.match(/\[.*]/);
|
|
28191
|
+
if (!r)
|
|
28180
28192
|
return s;
|
|
28181
|
-
var
|
|
28182
|
-
return !Array.isArray(
|
|
28183
|
-
type:
|
|
28184
|
-
payload:
|
|
28193
|
+
var d = JSON.parse(r);
|
|
28194
|
+
return !Array.isArray(d) || !d[1] ? s : {
|
|
28195
|
+
type: d[0],
|
|
28196
|
+
payload: d[1]
|
|
28185
28197
|
};
|
|
28186
|
-
}, U = function(_,
|
|
28187
|
-
|
|
28188
|
-
var
|
|
28189
|
-
return e(e({},
|
|
28190
|
-
}, []), i = (0,
|
|
28191
|
-
return
|
|
28198
|
+
}, U = function(_, r, d) {
|
|
28199
|
+
r === void 0 && (r = o.DEFAULT_OPTIONS), d === void 0 && (d = !0);
|
|
28200
|
+
var m = (0, n.useMemo)(function() {
|
|
28201
|
+
return e(e({}, r), { fromSocketIO: !0 });
|
|
28202
|
+
}, []), i = (0, c.useWebSocket)(_, m, d), p = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, u = (0, n.useMemo)(function() {
|
|
28203
|
+
return g(t);
|
|
28192
28204
|
}, [t]);
|
|
28193
28205
|
return {
|
|
28194
|
-
sendMessage:
|
|
28206
|
+
sendMessage: p,
|
|
28195
28207
|
sendJsonMessage: l,
|
|
28196
28208
|
lastMessage: u,
|
|
28197
28209
|
lastJsonMessage: u,
|
|
@@ -28199,39 +28211,39 @@ function Yi() {
|
|
|
28199
28211
|
getWebSocket: b
|
|
28200
28212
|
};
|
|
28201
28213
|
};
|
|
28202
|
-
return
|
|
28214
|
+
return re.useSocketIO = U, re;
|
|
28203
28215
|
}
|
|
28204
28216
|
var q = {}, Ha;
|
|
28205
|
-
function
|
|
28217
|
+
function Xi() {
|
|
28206
28218
|
if (Ha) return q;
|
|
28207
28219
|
Ha = 1;
|
|
28208
28220
|
var e = q && q.__assign || function() {
|
|
28209
28221
|
return e = Object.assign || function(U) {
|
|
28210
|
-
for (var _,
|
|
28211
|
-
_ = arguments[
|
|
28212
|
-
for (var
|
|
28222
|
+
for (var _, r = 1, d = arguments.length; r < d; r++) {
|
|
28223
|
+
_ = arguments[r];
|
|
28224
|
+
for (var m in _) Object.prototype.hasOwnProperty.call(_, m) && (U[m] = _[m]);
|
|
28213
28225
|
}
|
|
28214
28226
|
return U;
|
|
28215
28227
|
}, e.apply(this, arguments);
|
|
28216
|
-
},
|
|
28217
|
-
var
|
|
28218
|
-
for (var
|
|
28228
|
+
}, n = q && q.__rest || function(U, _) {
|
|
28229
|
+
var r = {};
|
|
28230
|
+
for (var d in U) Object.prototype.hasOwnProperty.call(U, d) && _.indexOf(d) < 0 && (r[d] = U[d]);
|
|
28219
28231
|
if (U != null && typeof Object.getOwnPropertySymbols == "function")
|
|
28220
|
-
for (var
|
|
28221
|
-
_.indexOf(
|
|
28222
|
-
return
|
|
28232
|
+
for (var m = 0, d = Object.getOwnPropertySymbols(U); m < d.length; m++)
|
|
28233
|
+
_.indexOf(d[m]) < 0 && Object.prototype.propertyIsEnumerable.call(U, d[m]) && (r[d[m]] = U[d[m]]);
|
|
28234
|
+
return r;
|
|
28223
28235
|
};
|
|
28224
28236
|
Object.defineProperty(q, "__esModule", { value: !0 }), q.useEventSource = void 0;
|
|
28225
|
-
var
|
|
28237
|
+
var c = he, o = ia(), s = A(), g = function(U, _, r) {
|
|
28226
28238
|
_ === void 0 && (_ = s.DEFAULT_EVENT_SOURCE_OPTIONS);
|
|
28227
|
-
var
|
|
28228
|
-
|
|
28229
|
-
var
|
|
28230
|
-
withCredentials:
|
|
28231
|
-
} }), l = (0,
|
|
28232
|
-
|
|
28233
|
-
var t = (0,
|
|
28234
|
-
return (0,
|
|
28239
|
+
var d = _.withCredentials, m = _.events, i = n(_, ["withCredentials", "events"]);
|
|
28240
|
+
r === void 0 && (r = !0);
|
|
28241
|
+
var p = e(e({}, i), { eventSourceOptions: {
|
|
28242
|
+
withCredentials: d
|
|
28243
|
+
} }), l = (0, c.useRef)(s.EMPTY_EVENT_HANDLERS);
|
|
28244
|
+
m && (l.current = m);
|
|
28245
|
+
var t = (0, o.useWebSocket)(U, p, r), y = t.lastMessage, b = t.readyState, u = t.getWebSocket;
|
|
28246
|
+
return (0, c.useEffect)(function() {
|
|
28235
28247
|
y?.type && Object.entries(l.current).forEach(function(T) {
|
|
28236
28248
|
var N = T[0], D = T[1];
|
|
28237
28249
|
N === y.type && D(y);
|
|
@@ -28242,36 +28254,36 @@ function qi() {
|
|
|
28242
28254
|
getEventSource: u
|
|
28243
28255
|
};
|
|
28244
28256
|
};
|
|
28245
|
-
return q.useEventSource =
|
|
28257
|
+
return q.useEventSource = g, q;
|
|
28246
28258
|
}
|
|
28247
28259
|
var wa;
|
|
28248
|
-
function
|
|
28260
|
+
function $i() {
|
|
28249
28261
|
return wa || (wa = 1, (function(e) {
|
|
28250
28262
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
|
|
28251
|
-
var
|
|
28263
|
+
var n = ia();
|
|
28252
28264
|
Object.defineProperty(e, "default", { enumerable: !0, get: function() {
|
|
28253
|
-
return
|
|
28265
|
+
return n.useWebSocket;
|
|
28254
28266
|
} });
|
|
28255
|
-
var
|
|
28267
|
+
var c = qi();
|
|
28256
28268
|
Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
|
|
28257
|
-
return
|
|
28269
|
+
return c.useSocketIO;
|
|
28258
28270
|
} });
|
|
28259
|
-
var
|
|
28271
|
+
var o = A();
|
|
28260
28272
|
Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
|
|
28261
|
-
return
|
|
28273
|
+
return o.ReadyState;
|
|
28262
28274
|
} });
|
|
28263
|
-
var s =
|
|
28275
|
+
var s = Xi();
|
|
28264
28276
|
Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
|
|
28265
28277
|
return s.useEventSource;
|
|
28266
28278
|
} });
|
|
28267
|
-
var
|
|
28279
|
+
var g = aa();
|
|
28268
28280
|
Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
|
|
28269
|
-
return
|
|
28281
|
+
return g.resetGlobalState;
|
|
28270
28282
|
} });
|
|
28271
28283
|
})(Ve)), Ve;
|
|
28272
28284
|
}
|
|
28273
|
-
var
|
|
28274
|
-
const
|
|
28285
|
+
var el = $i();
|
|
28286
|
+
const al = /* @__PURE__ */ Si(el), I = {
|
|
28275
28287
|
DEPOSIT: "deposit",
|
|
28276
28288
|
TRANS_CODE: "transCode",
|
|
28277
28289
|
ERROR: "error",
|
|
@@ -28282,70 +28294,70 @@ const el = /* @__PURE__ */ ki($i), I = {
|
|
|
28282
28294
|
TRANSFER_IN_GAME: "transfer_in_game",
|
|
28283
28295
|
CHECK_REQUEST: "CHECK_RREQUEST",
|
|
28284
28296
|
CASH_REGISTER_LIMIT: "cash_register_limit"
|
|
28285
|
-
},
|
|
28297
|
+
}, il = 3e4, yl = ({
|
|
28286
28298
|
socketUrl: e,
|
|
28287
|
-
socketHandlers:
|
|
28288
|
-
options:
|
|
28299
|
+
socketHandlers: n = {},
|
|
28300
|
+
options: c = {}
|
|
28289
28301
|
}) => {
|
|
28290
|
-
const
|
|
28291
|
-
sendMessage:
|
|
28302
|
+
const o = ya(!1), s = ya(n), {
|
|
28303
|
+
sendMessage: g,
|
|
28292
28304
|
// 發送普通訊息
|
|
28293
28305
|
sendJsonMessage: U,
|
|
28294
28306
|
// 發送 JSON 訊息
|
|
28295
28307
|
lastMessage: _,
|
|
28296
28308
|
// 最後接收到的訊息
|
|
28297
28309
|
// lastJsonMessage, // 最後接收到的 JSON 訊息
|
|
28298
|
-
readyState:
|
|
28310
|
+
readyState: r
|
|
28299
28311
|
// WebSocket 連線狀態
|
|
28300
28312
|
// getWebSocket, // 獲取 WebSocket 實例
|
|
28301
|
-
} =
|
|
28313
|
+
} = al(e, {
|
|
28302
28314
|
queryParams: { key: "wsky" },
|
|
28303
28315
|
onOpen: () => console.log("連線成功"),
|
|
28304
|
-
shouldReconnect: () =>
|
|
28316
|
+
shouldReconnect: () => o.current === !1,
|
|
28305
28317
|
reconnectAttempts: 9999,
|
|
28306
28318
|
reconnectInterval: 1e3,
|
|
28307
|
-
...
|
|
28308
|
-
}),
|
|
28319
|
+
...c
|
|
28320
|
+
}), d = Qe(() => {
|
|
28309
28321
|
try {
|
|
28310
28322
|
return JSON.parse(_?.data);
|
|
28311
28323
|
} catch {
|
|
28312
28324
|
return null;
|
|
28313
28325
|
}
|
|
28314
28326
|
}, [_?.data]);
|
|
28315
|
-
return
|
|
28316
|
-
const
|
|
28317
|
-
() =>
|
|
28318
|
-
|
|
28327
|
+
return ve(() => {
|
|
28328
|
+
const m = setInterval(
|
|
28329
|
+
() => g("ping"),
|
|
28330
|
+
il
|
|
28319
28331
|
);
|
|
28320
|
-
return () => clearInterval(
|
|
28321
|
-
}, [
|
|
28322
|
-
s.current =
|
|
28323
|
-
}, [
|
|
28324
|
-
if (!
|
|
28332
|
+
return () => clearInterval(m);
|
|
28333
|
+
}, [g]), ve(() => {
|
|
28334
|
+
s.current = n;
|
|
28335
|
+
}, [n]), ve(() => {
|
|
28336
|
+
if (!d) return;
|
|
28325
28337
|
const {
|
|
28326
|
-
onDeposit:
|
|
28338
|
+
onDeposit: m,
|
|
28327
28339
|
onTransCode: i,
|
|
28328
|
-
onError:
|
|
28340
|
+
onError: p,
|
|
28329
28341
|
onUpdateMember: l,
|
|
28330
28342
|
onMaintainNotice: t,
|
|
28331
28343
|
onMaintainNoticeMember: y,
|
|
28332
28344
|
onReload: b,
|
|
28333
28345
|
onTransferInGame: u,
|
|
28334
28346
|
onCashRegisterLimit: T
|
|
28335
|
-
} = s.current, N =
|
|
28336
|
-
memberInfoUid:
|
|
28337
|
-
data:
|
|
28338
|
-
memo:
|
|
28347
|
+
} = s.current, N = Me(d, "type", ""), D = {
|
|
28348
|
+
memberInfoUid: Me(d, "member_info_uid", null),
|
|
28349
|
+
data: Me(d, "data", null),
|
|
28350
|
+
memo: Me(d, "memo", null)
|
|
28339
28351
|
};
|
|
28340
28352
|
switch (N) {
|
|
28341
28353
|
case I.DEPOSIT:
|
|
28342
|
-
|
|
28354
|
+
m?.(D);
|
|
28343
28355
|
break;
|
|
28344
28356
|
case I.TRANS_CODE:
|
|
28345
28357
|
i?.(D);
|
|
28346
28358
|
break;
|
|
28347
28359
|
case I.ERROR:
|
|
28348
|
-
|
|
28360
|
+
p?.(D);
|
|
28349
28361
|
break;
|
|
28350
28362
|
case I.UPDATE_MEMBER:
|
|
28351
28363
|
l?.(D);
|
|
@@ -28370,64 +28382,84 @@ const el = /* @__PURE__ */ ki($i), I = {
|
|
|
28370
28382
|
console.warn("Unknown socket type:", N);
|
|
28371
28383
|
break;
|
|
28372
28384
|
}
|
|
28373
|
-
}, [
|
|
28374
|
-
sendMessage:
|
|
28385
|
+
}, [d]), ve(() => () => o.current = !0, []), {
|
|
28386
|
+
sendMessage: g,
|
|
28375
28387
|
sendJsonMessage: U,
|
|
28376
|
-
readyState:
|
|
28388
|
+
readyState: r
|
|
28377
28389
|
// WebSocket 連線狀態
|
|
28378
28390
|
};
|
|
28379
|
-
},
|
|
28380
|
-
const { client: e } =
|
|
28381
|
-
const { data:
|
|
28382
|
-
return
|
|
28383
|
-
}, [e]),
|
|
28384
|
-
return { commonCarouselApi:
|
|
28385
|
-
},
|
|
28386
|
-
const { commonCarouselApi: e } =
|
|
28391
|
+
}, ja = () => {
|
|
28392
|
+
const { client: e } = He(), n = X(async () => {
|
|
28393
|
+
const { data: o } = await e.get("/carousels");
|
|
28394
|
+
return o;
|
|
28395
|
+
}, [e]), c = X(async () => await e.get("/marquees"), [e]);
|
|
28396
|
+
return { commonCarouselApi: n, commonMarqueeApi: c };
|
|
28397
|
+
}, bl = () => {
|
|
28398
|
+
const { commonCarouselApi: e } = ja();
|
|
28387
28399
|
return oe({
|
|
28388
28400
|
queryKey: ["getCarouselList"],
|
|
28389
28401
|
queryFn: async () => await e()
|
|
28390
28402
|
});
|
|
28391
|
-
},
|
|
28392
|
-
const { commonMarqueeApi: e } =
|
|
28403
|
+
}, Tl = () => {
|
|
28404
|
+
const { commonMarqueeApi: e } = ja();
|
|
28393
28405
|
return oe({
|
|
28394
28406
|
queryKey: ["getMarqueeList"],
|
|
28395
28407
|
queryFn: async () => e(),
|
|
28396
|
-
select: (
|
|
28408
|
+
select: (n) => n.Marquees
|
|
28409
|
+
});
|
|
28410
|
+
}, ll = () => {
|
|
28411
|
+
const { userLoginApi: e } = de();
|
|
28412
|
+
return za({
|
|
28413
|
+
mutationKey: ["userLogin"],
|
|
28414
|
+
mutationFn: async (n) => e(n)
|
|
28415
|
+
// ...options
|
|
28416
|
+
});
|
|
28417
|
+
}, tl = ({ options: e } = {}) => {
|
|
28418
|
+
const { userLogoutApi: n } = de();
|
|
28419
|
+
return za({
|
|
28420
|
+
mutationKey: ["userLogout"],
|
|
28421
|
+
mutationFn: async () => n(),
|
|
28422
|
+
...e
|
|
28397
28423
|
});
|
|
28424
|
+
}, Cl = () => {
|
|
28425
|
+
const e = ll(), n = tl();
|
|
28426
|
+
return { login: e, logout: n };
|
|
28398
28427
|
};
|
|
28399
28428
|
export {
|
|
28400
|
-
|
|
28401
|
-
|
|
28402
|
-
|
|
28403
|
-
|
|
28404
|
-
|
|
28405
|
-
|
|
28406
|
-
|
|
28407
|
-
|
|
28408
|
-
|
|
28409
|
-
|
|
28410
|
-
|
|
28429
|
+
Za as ApiCtx,
|
|
28430
|
+
cl as ApiProvider,
|
|
28431
|
+
Va as GamesInfoCtx,
|
|
28432
|
+
Fi as buildMultiTypes,
|
|
28433
|
+
gl as buildMultiTypesWithSubTypes,
|
|
28434
|
+
Ri as buildSinglePlatformWithSubTypes,
|
|
28435
|
+
Mi as buildSingleType,
|
|
28436
|
+
wi as categorizeGames,
|
|
28437
|
+
pl as createLogoutHandler,
|
|
28438
|
+
Oi as extractGameSubTypeNames,
|
|
28439
|
+
xi as extractGameTypeNames,
|
|
28411
28440
|
va as extractPlatformNames,
|
|
28412
|
-
|
|
28413
|
-
|
|
28414
|
-
|
|
28415
|
-
|
|
28416
|
-
|
|
28417
|
-
|
|
28418
|
-
|
|
28419
|
-
|
|
28420
|
-
|
|
28421
|
-
|
|
28422
|
-
|
|
28423
|
-
|
|
28424
|
-
|
|
28425
|
-
|
|
28426
|
-
|
|
28427
|
-
|
|
28428
|
-
|
|
28429
|
-
|
|
28430
|
-
|
|
28431
|
-
|
|
28432
|
-
|
|
28441
|
+
Ka as filterGamesByPlatform,
|
|
28442
|
+
Ia as findGameTypeUid,
|
|
28443
|
+
Aa as findPlatformUid,
|
|
28444
|
+
Ba as findSubPlatform,
|
|
28445
|
+
Pi as flattenAllGames,
|
|
28446
|
+
Hi as flattenFavoriteGames,
|
|
28447
|
+
Wi as groupGamesByPlatform,
|
|
28448
|
+
Ji as groupGamesByPlatformAndSubType,
|
|
28449
|
+
Gi as groupGamesBySubType,
|
|
28450
|
+
Ii as initMockWindowData,
|
|
28451
|
+
zi as processGameInfo,
|
|
28452
|
+
dl as processPlatformData,
|
|
28453
|
+
He as useApiContext,
|
|
28454
|
+
_l as useBalanceGetter,
|
|
28455
|
+
yl as useClientWebSocket,
|
|
28456
|
+
ul as useGameInfoContext,
|
|
28457
|
+
Vi as useGamesInfo,
|
|
28458
|
+
bl as useGetCarouseList,
|
|
28459
|
+
Tl as useGetMarquee,
|
|
28460
|
+
fl as useGetMemberInfo,
|
|
28461
|
+
Ul as useInitializeWithToken,
|
|
28462
|
+
ll as useLogin,
|
|
28463
|
+
tl as useLogout,
|
|
28464
|
+
Cl as useUser
|
|
28433
28465
|
};
|