@obb871001/api-integration-sdk 1.0.82 → 1.0.84

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