@obb871001/api-integration-sdk 1.0.75 → 1.0.76

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