@obb871001/api-integration-sdk 1.0.133 → 1.0.135

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,5 +1,5 @@
1
1
  import Le, { createContext as mi, useContext as ri, useCallback as V, useMemo as ia, useEffect as De, useRef as Ga } from "react";
2
- import { useQuery as le, QueryClient as at, QueryClientProvider as it, useQueries as oi, useMutation as na } from "@tanstack/react-query";
2
+ import { useQuery as ie, QueryClient as at, QueryClientProvider as it, useQueries as oi, useMutation as na } from "@tanstack/react-query";
3
3
  import tt from "axios";
4
4
  import { find as ma, isEmpty as O, isObject as Ve, flatMap as Ae, isArray as ne, map as Ie, entries as lt, values as nt, keys as Ma, get as we, replace as Ra, includes as mt } from "lodash";
5
5
  import rt from "react-dom";
@@ -11,21 +11,21 @@ var Pa;
11
11
  function st() {
12
12
  if (Pa) return he;
13
13
  Pa = 1;
14
- var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
14
+ var e = Le, i = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
15
15
  function f(_, p, g) {
16
- var r, t = {}, d = null, l = null;
17
- g !== void 0 && (d = "" + g), p.key !== void 0 && (d = "" + p.key), p.ref !== void 0 && (l = p.ref);
18
- for (r in p) n.call(p, r) && !u.hasOwnProperty(r) && (t[r] = p[r]);
16
+ var r, t = {}, d = null, n = null;
17
+ g !== void 0 && (d = "" + g), p.key !== void 0 && (d = "" + p.key), p.ref !== void 0 && (n = p.ref);
18
+ for (r in p) m.call(p, r) && !u.hasOwnProperty(r) && (t[r] = p[r]);
19
19
  if (_ && _.defaultProps) for (r in p = _.defaultProps, p) t[r] === void 0 && (t[r] = p[r]);
20
- return { $$typeof: i, type: _, key: d, ref: l, props: t, _owner: s.current };
20
+ return { $$typeof: i, type: _, key: d, ref: n, props: t, _owner: s.current };
21
21
  }
22
- return he.Fragment = m, he.jsx = f, he.jsxs = f, he;
22
+ return he.Fragment = l, he.jsx = f, he.jsxs = f, he;
23
23
  }
24
24
  var ke = {};
25
25
  var xa;
26
26
  function ut() {
27
27
  return xa || (xa = 1, process.env.NODE_ENV !== "production" && (function() {
28
- var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), r = Symbol.for("react.suspense_list"), t = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), o = Symbol.iterator, y = "@@iterator";
28
+ var e = Le, i = Symbol.for("react.element"), l = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), r = Symbol.for("react.suspense_list"), t = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), n = Symbol.for("react.offscreen"), o = Symbol.iterator, y = "@@iterator";
29
29
  function b(a) {
30
30
  if (a === null || typeof a != "object")
31
31
  return null;
@@ -53,7 +53,7 @@ function ut() {
53
53
  var E = !1, v = !1, D = !1, L = !1, I = !1, Q;
54
54
  Q = Symbol.for("react.module.reference");
55
55
  function Te(a) {
56
- return !!(typeof a == "string" || typeof a == "function" || a === n || a === u || I || a === s || a === g || a === r || L || a === l || E || v || D || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === t || a.$$typeof === f || a.$$typeof === _ || a.$$typeof === p || // This needs to include all possible module reference object
56
+ return !!(typeof a == "string" || typeof a == "function" || a === m || a === u || I || a === s || a === g || a === r || L || a === n || E || v || D || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === t || a.$$typeof === f || a.$$typeof === _ || a.$$typeof === p || // 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.
@@ -77,9 +77,9 @@ function ut() {
77
77
  if (typeof a == "string")
78
78
  return a;
79
79
  switch (a) {
80
- case n:
81
- return "Fragment";
82
80
  case m:
81
+ return "Fragment";
82
+ case l:
83
83
  return "Portal";
84
84
  case u:
85
85
  return "Profiler";
@@ -114,18 +114,18 @@ function ut() {
114
114
  }
115
115
  return null;
116
116
  }
117
- var A = Object.assign, me = 0, q, Me, Re, x, F, Y, Ce;
118
- function re() {
117
+ var A = Object.assign, re = 0, q, Me, Re, x, F, Y, Ce;
118
+ function oe() {
119
119
  }
120
- re.__reactDisabledLog = !0;
121
- function te() {
120
+ oe.__reactDisabledLog = !0;
121
+ function le() {
122
122
  {
123
- if (me === 0) {
123
+ if (re === 0) {
124
124
  q = console.log, Me = console.info, Re = console.warn, x = console.error, F = console.group, Y = console.groupCollapsed, Ce = console.groupEnd;
125
125
  var a = {
126
126
  configurable: !0,
127
127
  enumerable: !0,
128
- value: re,
128
+ value: oe,
129
129
  writable: !0
130
130
  };
131
131
  Object.defineProperties(console, {
@@ -138,12 +138,12 @@ function ut() {
138
138
  groupEnd: a
139
139
  });
140
140
  }
141
- me++;
141
+ re++;
142
142
  }
143
143
  }
144
144
  function Pe() {
145
145
  {
146
- if (me--, me === 0) {
146
+ if (re--, re === 0) {
147
147
  var a = {
148
148
  configurable: !0,
149
149
  enumerable: !0,
@@ -173,7 +173,7 @@ function ut() {
173
173
  })
174
174
  });
175
175
  }
176
- me < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
176
+ re < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
177
177
  }
178
178
  }
179
179
  var ce = c.ReactCurrentDispatcher, X;
@@ -190,13 +190,13 @@ function ut() {
190
190
  ` + X + a;
191
191
  }
192
192
  }
193
- var oe = !1, xe;
193
+ var se = !1, xe;
194
194
  {
195
195
  var Gi = typeof WeakMap == "function" ? WeakMap : Map;
196
196
  xe = new Gi();
197
197
  }
198
198
  function _a(a, U) {
199
- if (!a || oe)
199
+ if (!a || se)
200
200
  return "";
201
201
  {
202
202
  var C = xe.get(a);
@@ -204,11 +204,11 @@ function ut() {
204
204
  return C;
205
205
  }
206
206
  var h;
207
- oe = !0;
207
+ se = !0;
208
208
  var G = Error.prepareStackTrace;
209
209
  Error.prepareStackTrace = void 0;
210
210
  var M;
211
- M = ce.current, ce.current = null, te();
211
+ M = ce.current, ce.current = null, le();
212
212
  try {
213
213
  if (U) {
214
214
  var N = function() {
@@ -261,10 +261,10 @@ function ut() {
261
261
  }
262
262
  }
263
263
  } finally {
264
- oe = !1, ce.current = M, Pe(), Error.prepareStackTrace = G;
264
+ se = !1, ce.current = M, Pe(), Error.prepareStackTrace = G;
265
265
  }
266
- var Ue = a ? a.displayName || a.name : "", se = Ue ? _e(Ue) : "";
267
- return typeof a == "function" && xe.set(a, se), se;
266
+ var Ue = a ? a.displayName || a.name : "", ue = Ue ? _e(Ue) : "";
267
+ return typeof a == "function" && xe.set(a, ue), ue;
268
268
  }
269
269
  function Mi(a, U, C) {
270
270
  return _a(a, !1);
@@ -586,20 +586,20 @@ Check the top-level render call using <` + C + ">.");
586
586
  Da(Z, a);
587
587
  }
588
588
  if (ve.call(U, "key")) {
589
- var se = w(a), J = Object.keys(U).filter(function(et) {
589
+ var ue = w(a), J = Object.keys(U).filter(function(et) {
590
590
  return et !== "key";
591
591
  }), qe = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
592
- if (!Ea[se + qe]) {
592
+ if (!Ea[ue + qe]) {
593
593
  var $i = J.length > 0 ? "{" + J.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} />`, qe, se, $i, se), Ea[se + qe] = !0;
599
+ <%s key={someKey} {...props} />`, qe, ue, $i, ue), Ea[ue + qe] = !0;
600
600
  }
601
601
  }
602
- return a === n ? ji(P) : Ki(P), P;
602
+ return a === m ? ji(P) : Ki(P), P;
603
603
  }
604
604
  }
605
605
  function Qi(a, U, C) {
@@ -609,7 +609,7 @@ React keys must be passed directly to JSX without using spread:
609
609
  return La(a, U, C, !1);
610
610
  }
611
611
  var Yi = qi, Xi = Qi;
612
- ke.Fragment = n, ke.jsx = Yi, ke.jsxs = Xi;
612
+ ke.Fragment = m, ke.jsx = Yi, ke.jsxs = Xi;
613
613
  })()), ke;
614
614
  }
615
615
  var Oa;
@@ -617,7 +617,7 @@ function pt() {
617
617
  return Oa || (Oa = 1, process.env.NODE_ENV === "production" ? Fe.exports = st() : Fe.exports = ut()), Fe.exports;
618
618
  }
619
619
  var ze = pt();
620
- const si = mi(null), ie = () => {
620
+ const si = mi(null), te = () => {
621
621
  const e = ri(si);
622
622
  if (!e)
623
623
  throw new Error("useApiContext must be used within ApiProvider");
@@ -626,14 +626,14 @@ const si = mi(null), ie = () => {
626
626
  function gt({
627
627
  baseURL: e,
628
628
  getToken: i,
629
- timeoutMs: m = 15e3,
630
- lng: n = "tw",
629
+ timeoutMs: l = 15e3,
630
+ lng: m = "tw",
631
631
  store: s,
632
632
  onError: u
633
633
  } = {}) {
634
634
  const f = tt.create({
635
635
  baseURL: e,
636
- timeout: m,
636
+ timeout: l,
637
637
  headers: { "Content-Type": "application/json" }
638
638
  });
639
639
  return f.interceptors.request.use(async (_) => {
@@ -642,7 +642,7 @@ function gt({
642
642
  g && (_.headers.Authorization = `Bearer ${g}`);
643
643
  }
644
644
  const p = s?.getState()?.isWalletCurrency || s?.getState()?.currency?.currentCurrency || "TWD";
645
- return _.headers.Currency = p, _.headers["currency-code"] = p, _.headers.lang = n, _;
645
+ return _.headers.Currency = p, _.headers["currency-code"] = p, _.headers.lang = m, _;
646
646
  }), f.interceptors.response.use(
647
647
  (_) => _.data,
648
648
  (_) => u ? u(_, { instance: f }) : Promise.reject(_)
@@ -656,10 +656,10 @@ const ui = mi(null), sl = () => {
656
656
  );
657
657
  return e;
658
658
  }, ul = () => {
659
- const e = (n, s) => !n && !s, i = (n) => n.startsWith("pc.");
659
+ const e = (m, s) => !m && !s, i = (m) => m.startsWith("pc.");
660
660
  return {
661
661
  executeLogout: ({
662
- isCallBackInvalid: n = !1,
662
+ isCallBackInvalid: m = !1,
663
663
  hostname: s = "",
664
664
  shouldRedirect: u,
665
665
  onShowError: f,
@@ -669,24 +669,24 @@ const ui = mi(null), sl = () => {
669
669
  onGoogleLogout: r
670
670
  }) => {
671
671
  const t = i(s);
672
- e(n, t) && f?.(), _?.(), p?.(), u && g?.("/"), r?.();
672
+ e(m, t) && f?.(), _?.(), p?.(), u && g?.("/"), r?.();
673
673
  },
674
674
  shouldShowErrorNotice: e,
675
675
  isMachineDomain: i
676
676
  };
677
- }, pi = (e = [], i) => ma(e, { gameTypeName: i })?.gameTypeUid, gi = (e = [], i) => ma(e, { platform: i })?.platformUid, di = (e = [], i) => ma(e, { SubPlatformEnum: i }), ci = (e = [], i, m) => O(e) ? [] : e.filter((n) => m ? String(n?.SubPlatformEnumUid) === String(m?.SubPlatformEnumUid) : String(n.platformUid) === String(i)), dt = (e = []) => O(e) ? {} : e.reduce((i, m) => {
678
- const n = m?.game_subtype || "UNKNOWN";
679
- return i[n] || (i[n] = []), i[n].push(m), i;
677
+ }, pi = (e = [], i) => ma(e, { gameTypeName: i })?.gameTypeUid, gi = (e = [], i) => ma(e, { platform: i })?.platformUid, di = (e = [], i) => ma(e, { SubPlatformEnum: i }), ci = (e = [], i, l) => O(e) ? [] : e.filter((m) => l ? String(m?.SubPlatformEnumUid) === String(l?.SubPlatformEnumUid) : String(m.platformUid) === String(i)), dt = (e = []) => O(e) ? {} : e.reduce((i, l) => {
678
+ const m = l?.game_subtype || "UNKNOWN";
679
+ return i[m] || (i[m] = []), i[m].push(l), i;
680
680
  }, {}), ct = ({
681
681
  gameTypeName: e,
682
682
  platforms: i,
683
- gameList: m,
684
- allGameTypes: n,
683
+ gameList: l,
684
+ allGameTypes: m,
685
685
  allPlatforms: s
686
686
  }) => {
687
- const u = pi(n, e);
687
+ const u = pi(m, e);
688
688
  return u ? i.reduce((f, _) => {
689
- const p = gi(s, _), g = di(s, _), r = m[u] || [], t = ci(
689
+ const p = gi(s, _), g = di(s, _), r = l[u] || [], t = ci(
690
690
  r,
691
691
  p,
692
692
  g
@@ -696,70 +696,70 @@ const ui = mi(null), sl = () => {
696
696
  }, _t = ({
697
697
  platformName: e,
698
698
  gamesOfType: i = [],
699
- allPlatforms: m = []
699
+ allPlatforms: l = []
700
700
  }) => {
701
- const n = gi(m, e), s = di(m, e), u = ci(
701
+ const m = gi(l, e), s = di(l, e), u = ci(
702
702
  i,
703
- n,
703
+ m,
704
704
  s
705
705
  );
706
706
  return dt(u);
707
- }, ft = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Ha = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "platform"), Ut = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "gameTypeName"), yt = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "game_subtype"), bt = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Tt = (e = [], i = []) => !ne(e) || O(e) ? {} : !ne(i) || O(i) ? {} : e.reduce((m, n) => {
707
+ }, ft = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Ha = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "platform"), Ut = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "gameTypeName"), yt = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "game_subtype"), bt = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Tt = (e = [], i = []) => !ne(e) || O(e) ? {} : !ne(i) || O(i) ? {} : e.reduce((l, m) => {
708
708
  const s = i.map((u) => u.game_subtype);
709
709
  return s.forEach((u) => {
710
- m[u] = m[u] || [];
711
- }), s.includes(n.game_subtype) && m[n.game_subtype].push(n), m;
710
+ l[u] = l[u] || [];
711
+ }), s.includes(m.game_subtype) && l[m.game_subtype].push(m), l;
712
712
  }, {}), Ct = ({
713
713
  gameTypes: e = [],
714
714
  platforms: i = [],
715
- gameList: m = {},
716
- allGameTypes: n = [],
715
+ gameList: l = {},
716
+ allGameTypes: m = [],
717
717
  allPlatforms: s = []
718
- }) => !ne(e) || !ne(i) ? {} : O(m) ? {} : e.reduce((u, f) => {
718
+ }) => !ne(e) || !ne(i) ? {} : O(l) ? {} : e.reduce((u, f) => {
719
719
  const _ = ct({
720
720
  gameTypeName: f,
721
721
  platforms: i,
722
- gameList: m,
723
- allGameTypes: n,
722
+ gameList: l,
723
+ allGameTypes: m,
724
724
  allPlatforms: s
725
725
  });
726
726
  return O(_) || (u[f] = _), u;
727
727
  }, {}), pl = ({
728
728
  types: e = [],
729
729
  platforms: i = [],
730
- allGameType: m = [],
731
- allGamePlatform: n = [],
730
+ allGameType: l = [],
731
+ allGamePlatform: m = [],
732
732
  allGameList: s = {}
733
733
  } = {}) => !Array.isArray(e) || !Array.isArray(i) ? {} : e.reduce((u, f) => {
734
- const _ = pi(m, f);
734
+ const _ = pi(l, f);
735
735
  if (!_) return u;
736
736
  const p = s[_] || [], g = i.reduce((r, t) => {
737
737
  const d = _t({
738
738
  platformName: t,
739
739
  gamesOfType: p,
740
- allPlatforms: n
740
+ allPlatforms: m
741
741
  });
742
742
  return O(d) ? r : { ...r, [t]: d };
743
743
  }, {});
744
744
  return O(g) || (u[f] = g), u;
745
- }, {}), vt = (e = {}) => !Ve(e) || O(e) ? {} : Object.values(e).reduce((m, n) => (Object.entries(n).forEach(([s, u]) => {
746
- m[s] ? m[s] = [...m[s], ...u] : m[s] = u;
747
- }), m), {}), ht = (e = {}) => {
745
+ }, {}), vt = (e = {}) => !Ve(e) || O(e) ? {} : Object.values(e).reduce((l, m) => (Object.entries(m).forEach(([s, u]) => {
746
+ l[s] ? l[s] = [...l[s], ...u] : l[s] = u;
747
+ }), l), {}), ht = (e = {}) => {
748
748
  if (!Ve(e) || O(e)) return {};
749
749
  const i = {};
750
- for (const [m, n] of Object.entries(e)) {
751
- i[m] = {};
752
- for (const s of n) {
750
+ for (const [l, m] of Object.entries(e)) {
751
+ i[l] = {};
752
+ for (const s of m) {
753
753
  const u = s.game_subtype;
754
- i[m][u] || (i[m][u] = []), i[m][u].push(s);
754
+ i[l][u] || (i[l][u] = []), i[l][u].push(s);
755
755
  }
756
756
  }
757
757
  return i;
758
758
  }, kt = ({
759
759
  allGameList: e = {},
760
760
  allGamePlatform: i = [],
761
- allGameType: m = [],
762
- allGame_subtype: n = [],
761
+ allGameType: l = [],
762
+ allGame_subtype: m = [],
763
763
  allNewGameList: s = [],
764
764
  allTopGameList: u = [],
765
765
  randomlySelectedGames: f = [],
@@ -768,13 +768,13 @@ const ui = mi(null), sl = () => {
768
768
  highlightGames: g = [],
769
769
  originPlatform: r = []
770
770
  }) => {
771
- const t = ft(e), d = Ha(i), l = Ut(m), o = yt(n), y = Ha(r), b = bt(_), c = Ct({
772
- gameTypes: l,
771
+ const t = ft(e), d = Ha(i), n = Ut(l), o = yt(m), y = Ha(r), b = bt(_), c = Ct({
772
+ gameTypes: n,
773
773
  platforms: d,
774
774
  gameList: e,
775
- allGameTypes: m,
775
+ allGameTypes: l,
776
776
  allPlatforms: i
777
- }), T = Tt(t, n), S = vt(c), E = ht(S), v = lt(c).reduce(
777
+ }), T = Tt(t, m), S = vt(c), E = ht(S), v = lt(c).reduce(
778
778
  (L, [I, Q]) => {
779
779
  const Te = Ae(nt(Q));
780
780
  return L[I] = Te, L;
@@ -792,10 +792,10 @@ const ui = mi(null), sl = () => {
792
792
  byGameType: D
793
793
  },
794
794
  type: {
795
- main: l,
795
+ main: n,
796
796
  sub: o,
797
- originMain: m,
798
- originSub: n
797
+ originMain: l,
798
+ originSub: m
799
799
  },
800
800
  gameList: {
801
801
  all: t,
@@ -817,11 +817,11 @@ const ui = mi(null), sl = () => {
817
817
  favorite: b
818
818
  }
819
819
  };
820
- }, gl = (e = []) => !ne(e) || O(e) ? [] : Ae(e, (i) => O(i.SubPlatformEnum) ? i : i.SubPlatformEnum.map((m) => ({
820
+ }, gl = (e = []) => !ne(e) || O(e) ? [] : Ae(e, (i) => O(i.SubPlatformEnum) ? i : i.SubPlatformEnum.map((l) => ({
821
821
  ...i,
822
- ...m,
823
- platform: m.SubPlatformEnum,
824
- platformEnum: m.SubPlatformEnum
822
+ ...l,
823
+ platform: l.SubPlatformEnum,
824
+ platformEnum: l.SubPlatformEnum
825
825
  }))), ra = (e) => {
826
826
  switch (e) {
827
827
  case "tw":
@@ -841,24 +841,24 @@ const ui = mi(null), sl = () => {
841
841
  default:
842
842
  return e;
843
843
  }
844
- }, de = () => {
845
- const { client: e } = ie(), i = V(
844
+ }, me = () => {
845
+ const { client: e } = te(), i = V(
846
846
  async (r) => {
847
- const { mac_address: t = "", app_version: d = "", anydesk_id: l = "" } = r, { data: o } = await e.post("/cash-register/login", {
847
+ const { mac_address: t = "", app_version: d = "", anydesk_id: n = "" } = r, { data: o } = await e.post("/cash-register/login", {
848
848
  mac_address: t,
849
849
  app_version: d,
850
- anydesk_id: l
850
+ anydesk_id: n
851
851
  });
852
852
  return o;
853
853
  },
854
854
  [e]
855
- ), m = V(async () => e.get("/member/getMemberInfo"), [e]), n = V(async () => await e.get("/member/getGameList"), [e]), s = V(async () => await e.get("/member/getNowCurrencyExchange"), [e]), u = V(async () => await e.get("member/getFavoriteGame"), [e]), f = V(
855
+ ), l = V(async () => e.get("/member/getMemberInfo"), [e]), m = V(async () => await e.get("/member/getGameList"), [e]), s = V(async () => await e.get("/member/getNowCurrencyExchange"), [e]), u = V(async () => await e.get("member/getFavoriteGame"), [e]), f = V(
856
856
  async (r) => {
857
- const { account: t, password: d, trans_code: l } = r;
857
+ const { account: t, password: d, trans_code: n } = r;
858
858
  return await e.post("/login", {
859
859
  memId: t,
860
860
  passwd: d,
861
- trans_code: l
861
+ trans_code: n
862
862
  });
863
863
  },
864
864
  [e]
@@ -873,8 +873,8 @@ const ui = mi(null), sl = () => {
873
873
  ), g = V(async () => await e.get("/profit/ranking"), [e]);
874
874
  return {
875
875
  machineLoginApi: i,
876
- userInfoApi: m,
877
- userGameListApi: n,
876
+ userInfoApi: l,
877
+ userGameListApi: m,
878
878
  userFavoriteGameApi: u,
879
879
  userCurrencyExchangeApi: s,
880
880
  userLoginApi: f,
@@ -903,12 +903,12 @@ const ui = mi(null), sl = () => {
903
903
  },
904
904
  user: { favorite: [] }
905
905
  }, Nt = ({ enabled: e = !0 } = {}) => {
906
- const { getToken: i } = ie(), { userFavoriteGameApi: m, userGameListApi: n } = de(), { data: s, isLoading: u, error: f, refetch: _ } = le({
906
+ const { getToken: i } = te(), { userFavoriteGameApi: l, userGameListApi: m } = me(), { data: s, isLoading: u, error: f, refetch: _ } = ie({
907
907
  queryKey: ["gamesInfo"],
908
908
  queryFn: async () => {
909
909
  let p = {}, g = {};
910
910
  try {
911
- await i?.() && (g = await n(), p = await m());
911
+ await i?.() && (g = await m(), p = await l());
912
912
  } catch (r) {
913
913
  console.warn("Failed to fetch favorite games:", r);
914
914
  }
@@ -27470,19 +27470,19 @@ const ui = mi(null), sl = () => {
27470
27470
  }, Et = ({
27471
27471
  children: e,
27472
27472
  autoFetch: i = !1,
27473
- mockData: m = !1
27473
+ mockData: l = !1
27474
27474
  }) => {
27475
27475
  De(() => {
27476
- m && Dt(!0);
27477
- }, [m]);
27478
- const n = Nt({ enabled: i });
27479
- return /* @__PURE__ */ ze.jsx(ui.Provider, { value: n, children: e });
27476
+ l && Dt(!0);
27477
+ }, [l]);
27478
+ const m = Nt({ enabled: i });
27479
+ return /* @__PURE__ */ ze.jsx(ui.Provider, { value: m, children: e });
27480
27480
  };
27481
27481
  function dl({
27482
27482
  children: e,
27483
27483
  autoFetchGamesInfo: i = !1,
27484
- useMockData: m = !1,
27485
- queryClient: n,
27484
+ useMockData: l = !1,
27485
+ queryClient: m,
27486
27486
  ...s
27487
27487
  }) {
27488
27488
  const u = ia(() => gt(s), [s]), f = ia(
@@ -27495,16 +27495,16 @@ function dl({
27495
27495
  }
27496
27496
  }),
27497
27497
  []
27498
- ), _ = n || f;
27499
- return /* @__PURE__ */ ze.jsx(it, { client: _, children: /* @__PURE__ */ ze.jsx(si.Provider, { value: { client: u, ...s }, children: /* @__PURE__ */ ze.jsx(Et, { autoFetch: i, mockData: m, children: e }) }) });
27498
+ ), _ = m || f;
27499
+ return /* @__PURE__ */ ze.jsx(it, { client: _, children: /* @__PURE__ */ ze.jsx(si.Provider, { value: { client: u, ...s }, children: /* @__PURE__ */ ze.jsx(Et, { autoFetch: i, mockData: l, children: e }) }) });
27500
27500
  }
27501
27501
  const cl = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
27502
- const { userCurrencyExchangeApi: m } = de(), { getToken: n } = ie(), { enabled: s, ...u } = i, _ = !!n?.() && (s ? s.every((p) => p) : !0);
27502
+ const { userCurrencyExchangeApi: l } = me(), { getToken: m } = te(), { enabled: s, ...u } = i, _ = !!m?.() && (s ? s.every((p) => p) : !0);
27503
27503
  return oi({
27504
27504
  queries: [
27505
27505
  {
27506
27506
  queryKey: ["userCurrencyExchange", ...e],
27507
- queryFn: () => m(),
27507
+ queryFn: () => l(),
27508
27508
  enabled: _,
27509
27509
  // ← 使用合併後的條件
27510
27510
  ...u
@@ -27515,38 +27515,38 @@ const cl = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
27515
27515
  }, _l = ({
27516
27516
  refetchInterval: e = 5e4,
27517
27517
  trigger: i = [],
27518
- enabled: m = !0
27518
+ enabled: l = !0
27519
27519
  } = {}) => {
27520
- const { getToken: n } = ie(), s = n?.(), { userInfoApi: u } = de();
27520
+ const { getToken: m } = te(), s = m?.(), { userInfoApi: u } = me();
27521
27521
  return oi({
27522
27522
  queries: [
27523
27523
  {
27524
27524
  queryKey: ["getMemberInfo", ...i],
27525
27525
  queryFn: async () => await u(),
27526
27526
  refetchInterval: e,
27527
- enabled: !!s && m
27527
+ enabled: !!s && l
27528
27528
  }
27529
27529
  ]
27530
27530
  });
27531
27531
  }, fl = ({ enabled: e = !0 } = {}) => {
27532
27532
  const {
27533
27533
  userInfoApi: i,
27534
- userFavoriteGameApi: m,
27535
- userGameListApi: n,
27534
+ userFavoriteGameApi: l,
27535
+ userGameListApi: m,
27536
27536
  userCurrencyExchangeApi: s
27537
- } = de(), u = le({
27537
+ } = me(), u = ie({
27538
27538
  queryKey: ["getMemInfo"],
27539
27539
  queryFn: async () => i(),
27540
27540
  enabled: e
27541
- }), f = le({
27541
+ }), f = ie({
27542
27542
  queryKey: ["getFavoriteGame"],
27543
- queryFn: async () => m(),
27543
+ queryFn: async () => l(),
27544
27544
  enabled: e && u.isSuccess
27545
- }), _ = le({
27545
+ }), _ = ie({
27546
27546
  queryKey: ["getUserGameList"],
27547
- queryFn: async () => n(),
27547
+ queryFn: async () => m(),
27548
27548
  enabled: e && u.isSuccess && f.isSuccess
27549
- }), p = le({
27549
+ }), p = ie({
27550
27550
  queryKey: ["getUserCurrencyExchange"],
27551
27551
  queryFn: async () => s(),
27552
27552
  enabled: e && u.isSuccess && f.isSuccess && _.isSuccess
@@ -27562,19 +27562,19 @@ var Ye = {}, z = {}, Xe = {}, wa;
27562
27562
  function j() {
27563
27563
  return wa || (wa = 1, (function(e) {
27564
27564
  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;
27565
- var i = 1, m = 1e3 * i;
27565
+ var i = 1, l = 1e3 * i;
27566
27566
  e.DEFAULT_OPTIONS = {}, e.EMPTY_EVENT_HANDLERS = {}, e.DEFAULT_EVENT_SOURCE_OPTIONS = {
27567
27567
  withCredentials: !1,
27568
27568
  events: e.EMPTY_EVENT_HANDLERS
27569
- }, e.SOCKET_IO_PING_INTERVAL = 25 * m, 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 = {
27569
+ }, e.SOCKET_IO_PING_INTERVAL = 25 * l, 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 = {
27570
27570
  message: "ping",
27571
27571
  timeout: 6e4,
27572
27572
  interval: 25e3
27573
27573
  };
27574
- var n;
27574
+ var m;
27575
27575
  (function(u) {
27576
27576
  u[u.UNINSTANTIATED = -1] = "UNINSTANTIATED", u[u.CONNECTING = 0] = "CONNECTING", u[u.OPEN = 1] = "OPEN", u[u.CLOSING = 2] = "CLOSING", u[u.CLOSED = 3] = "CLOSED";
27577
- })(n || (e.ReadyState = n = {}));
27577
+ })(m || (e.ReadyState = m = {}));
27578
27578
  var s = function() {
27579
27579
  try {
27580
27580
  return "EventSource" in globalThis;
@@ -27589,17 +27589,17 @@ var Se = {}, $e = {}, Fa;
27589
27589
  function oa() {
27590
27590
  return Fa || (Fa = 1, (function(e) {
27591
27591
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
27592
- var i = function(m) {
27593
- if (m && e.sharedWebSockets.hasOwnProperty(m))
27594
- delete e.sharedWebSockets[m];
27592
+ var i = function(l) {
27593
+ if (l && e.sharedWebSockets.hasOwnProperty(l))
27594
+ delete e.sharedWebSockets[l];
27595
27595
  else
27596
- for (var n in e.sharedWebSockets)
27597
- e.sharedWebSockets.hasOwnProperty(n) && delete e.sharedWebSockets[n];
27596
+ for (var m in e.sharedWebSockets)
27597
+ e.sharedWebSockets.hasOwnProperty(m) && delete e.sharedWebSockets[m];
27598
27598
  };
27599
27599
  e.resetWebSockets = i;
27600
27600
  })($e)), $e;
27601
27601
  }
27602
- var ue = {}, $ = {}, Wa;
27602
+ var pe = {}, $ = {}, Wa;
27603
27603
  function sa() {
27604
27604
  if (Wa) return $;
27605
27605
  Wa = 1, Object.defineProperty($, "__esModule", { value: !0 }), $.setUpSocketIOPing = $.appendQueryParams = $.parseSocketIOUrl = void 0;
@@ -27614,7 +27614,7 @@ function sa() {
27614
27614
  return s;
27615
27615
  };
27616
27616
  $.parseSocketIOUrl = i;
27617
- var m = function(s, u) {
27617
+ var l = function(s, u) {
27618
27618
  u === void 0 && (u = {});
27619
27619
  var f = /\?([\w]+=[\w]+)/, _ = f.test(s), p = "".concat(Object.entries(u).reduce(function(g, r) {
27620
27620
  var t = r[0], d = r[1];
@@ -27622,39 +27622,39 @@ function sa() {
27622
27622
  }, "").slice(0, -1));
27623
27623
  return "".concat(s).concat(_ ? "&" : "?").concat(p);
27624
27624
  };
27625
- $.appendQueryParams = m;
27626
- var n = function(s, u) {
27625
+ $.appendQueryParams = l;
27626
+ var m = function(s, u) {
27627
27627
  u === void 0 && (u = e.SOCKET_IO_PING_INTERVAL);
27628
27628
  var f = function() {
27629
27629
  return s(e.SOCKET_IO_PING_CODE);
27630
27630
  };
27631
27631
  return window.setInterval(f, u);
27632
27632
  };
27633
- return $.setUpSocketIOPing = n, $;
27633
+ return $.setUpSocketIOPing = m, $;
27634
27634
  }
27635
27635
  var We = {}, Ja;
27636
27636
  function _i() {
27637
27637
  if (Ja) return We;
27638
- Ja = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.heartbeat = m;
27638
+ Ja = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.heartbeat = l;
27639
27639
  var e = j();
27640
- function i(n) {
27641
- return Array.isArray(n) ? n.reduce(function(s, u) {
27640
+ function i(m) {
27641
+ return Array.isArray(m) ? m.reduce(function(s, u) {
27642
27642
  return s.current > u.current ? s : u;
27643
- }).current : n.current;
27643
+ }).current : m.current;
27644
27644
  }
27645
- function m(n, s, u) {
27646
- var f = u || {}, _ = f.interval, p = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, g = f.timeout, r = g === void 0 ? e.DEFAULT_HEARTBEAT.timeout : g, t = f.message, d = t === void 0 ? e.DEFAULT_HEARTBEAT.message : t, l = Math.max(100, p / 10), o = Date.now(), y = setInterval(function() {
27645
+ function l(m, s, u) {
27646
+ var f = u || {}, _ = f.interval, p = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, g = f.timeout, r = g === void 0 ? e.DEFAULT_HEARTBEAT.timeout : g, t = f.message, d = t === void 0 ? e.DEFAULT_HEARTBEAT.message : t, n = Math.max(100, p / 10), o = Date.now(), y = setInterval(function() {
27647
27647
  var b = Date.now(), c = i(s);
27648
27648
  if (c + r <= b)
27649
- console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - o, "ms ago")), n.close();
27649
+ console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - o, "ms ago")), m.close();
27650
27650
  else if (c + p <= b && o + p <= b)
27651
27651
  try {
27652
- typeof d == "function" ? n.send(d()) : n.send(d), o = b;
27652
+ typeof d == "function" ? m.send(d()) : m.send(d), o = b;
27653
27653
  } catch (T) {
27654
- console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), n.close();
27654
+ console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), m.close();
27655
27655
  }
27656
- }, l);
27657
- return n.addEventListener("close", function() {
27656
+ }, n);
27657
+ return m.addEventListener("close", function() {
27658
27658
  clearInterval(y);
27659
27659
  }), function() {
27660
27660
  };
@@ -27665,10 +27665,10 @@ var Ne = {}, ea = {}, za;
27665
27665
  function ua() {
27666
27666
  return za || (za = 1, (function(e) {
27667
27667
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
27668
- var i = {}, m = [], n = function(p) {
27669
- return (0, e.hasSubscribers)(p) ? Array.from(i[p]) : m;
27668
+ var i = {}, l = [], m = function(p) {
27669
+ return (0, e.hasSubscribers)(p) ? Array.from(i[p]) : l;
27670
27670
  };
27671
- e.getSubscribers = n;
27671
+ e.getSubscribers = m;
27672
27672
  var s = function(p) {
27673
27673
  var g;
27674
27674
  return ((g = i[p]) === null || g === void 0 ? void 0 : g.size) > 0;
@@ -27695,177 +27695,177 @@ function ua() {
27695
27695
  var Za;
27696
27696
  function pa() {
27697
27697
  if (Za) return Ne;
27698
- Za = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.assertIsWebSocket = m, Ne.resetGlobalState = n;
27698
+ Za = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.assertIsWebSocket = l, Ne.resetGlobalState = m;
27699
27699
  var e = oa(), i = ua();
27700
- function m(s, u) {
27700
+ function l(s, u) {
27701
27701
  if (!u && !(s instanceof WebSocket))
27702
27702
  throw new Error("");
27703
27703
  }
27704
- function n(s) {
27704
+ function m(s) {
27705
27705
  (0, i.resetSubscribers)(s), (0, e.resetWebSockets)(s);
27706
27706
  }
27707
27707
  return Ne;
27708
27708
  }
27709
27709
  var Va;
27710
27710
  function Lt() {
27711
- if (Va) return ue;
27711
+ if (Va) return pe;
27712
27712
  Va = 1;
27713
- var e = ue && ue.__assign || function() {
27713
+ var e = pe && pe.__assign || function() {
27714
27714
  return e = Object.assign || function(r) {
27715
- for (var t, d = 1, l = arguments.length; d < l; d++) {
27715
+ for (var t, d = 1, n = arguments.length; d < n; d++) {
27716
27716
  t = arguments[d];
27717
27717
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (r[o] = t[o]);
27718
27718
  }
27719
27719
  return r;
27720
27720
  }, e.apply(this, arguments);
27721
27721
  };
27722
- Object.defineProperty(ue, "__esModule", { value: !0 }), ue.attachListeners = void 0;
27723
- var i = sa(), m = _i(), n = j(), s = pa(), u = function(r, t, d, l) {
27722
+ Object.defineProperty(pe, "__esModule", { value: !0 }), pe.attachListeners = void 0;
27723
+ var i = sa(), l = _i(), m = j(), s = pa(), u = function(r, t, d, n) {
27724
27724
  r.onmessage = function(o) {
27725
27725
  var y;
27726
- t.current.onMessage && t.current.onMessage(o), typeof l?.current == "number" && (l.current = Date.now()), !(typeof t.current.filter == "function" && t.current.filter(o) !== !0) && (t.current.heartbeat && typeof t.current.heartbeat != "boolean" && ((y = t.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === o.data || d(o));
27726
+ t.current.onMessage && t.current.onMessage(o), typeof n?.current == "number" && (n.current = Date.now()), !(typeof t.current.filter == "function" && t.current.filter(o) !== !0) && (t.current.heartbeat && typeof t.current.heartbeat != "boolean" && ((y = t.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === o.data || d(o));
27727
27727
  };
27728
- }, f = function(r, t, d, l, o) {
27728
+ }, f = function(r, t, d, n, o) {
27729
27729
  r.onopen = function(y) {
27730
- if (t.current.onOpen && t.current.onOpen(y), l.current = 0, d(n.ReadyState.OPEN), t.current.heartbeat && r instanceof WebSocket) {
27730
+ if (t.current.onOpen && t.current.onOpen(y), n.current = 0, d(m.ReadyState.OPEN), t.current.heartbeat && r instanceof WebSocket) {
27731
27731
  var b = typeof t.current.heartbeat == "boolean" ? void 0 : t.current.heartbeat;
27732
- o.current = Date.now(), (0, m.heartbeat)(r, o, b);
27732
+ o.current = Date.now(), (0, l.heartbeat)(r, o, b);
27733
27733
  }
27734
27734
  };
27735
- }, _ = function(r, t, d, l, o) {
27736
- if (n.isEventSourceSupported && r instanceof EventSource)
27735
+ }, _ = function(r, t, d, n, o) {
27736
+ if (m.isEventSourceSupported && r instanceof EventSource)
27737
27737
  return function() {
27738
27738
  };
27739
27739
  (0, s.assertIsWebSocket)(r, t.current.skipAssert);
27740
27740
  var y;
27741
27741
  return r.onclose = function(b) {
27742
27742
  var c;
27743
- if (t.current.onClose && t.current.onClose(b), d(n.ReadyState.CLOSED), t.current.shouldReconnect && t.current.shouldReconnect(b)) {
27744
- var T = (c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT;
27743
+ if (t.current.onClose && t.current.onClose(b), d(m.ReadyState.CLOSED), t.current.shouldReconnect && t.current.shouldReconnect(b)) {
27744
+ var T = (c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : m.DEFAULT_RECONNECT_LIMIT;
27745
27745
  if (o.current < T) {
27746
27746
  var S = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(o.current) : t.current.reconnectInterval;
27747
27747
  y = window.setTimeout(function() {
27748
- o.current++, l();
27749
- }, S ?? n.DEFAULT_RECONNECT_INTERVAL_MS);
27748
+ o.current++, n();
27749
+ }, S ?? m.DEFAULT_RECONNECT_INTERVAL_MS);
27750
27750
  } else
27751
27751
  t.current.onReconnectStop && t.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
27752
27752
  }
27753
27753
  }, function() {
27754
27754
  return y && window.clearTimeout(y);
27755
27755
  };
27756
- }, p = function(r, t, d, l, o) {
27756
+ }, p = function(r, t, d, n, o) {
27757
27757
  var y;
27758
27758
  return r.onerror = function(b) {
27759
27759
  var c;
27760
- if (t.current.onError && t.current.onError(b), n.isEventSourceSupported && r instanceof EventSource && (t.current.onClose && t.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), d(n.ReadyState.CLOSED), r.close()), t.current.retryOnError)
27761
- if (o.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT)) {
27760
+ if (t.current.onError && t.current.onError(b), m.isEventSourceSupported && r instanceof EventSource && (t.current.onClose && t.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), d(m.ReadyState.CLOSED), r.close()), t.current.retryOnError)
27761
+ if (o.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : m.DEFAULT_RECONNECT_LIMIT)) {
27762
27762
  var T = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(o.current) : t.current.reconnectInterval;
27763
27763
  y = window.setTimeout(function() {
27764
- o.current++, l();
27765
- }, T ?? n.DEFAULT_RECONNECT_INTERVAL_MS);
27764
+ o.current++, n();
27765
+ }, T ?? m.DEFAULT_RECONNECT_INTERVAL_MS);
27766
27766
  } else
27767
27767
  t.current.onReconnectStop && t.current.onReconnectStop(t.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(t.current.reconnectAttempts, " exceeded"));
27768
27768
  }, function() {
27769
27769
  return y && window.clearTimeout(y);
27770
27770
  };
27771
- }, g = function(r, t, d, l, o, y, b) {
27771
+ }, g = function(r, t, d, n, o, y, b) {
27772
27772
  var c = t.setLastMessage, T = t.setReadyState, S, E, v;
27773
- return d.current.fromSocketIO && (S = (0, i.setUpSocketIOPing)(b)), u(r, d, c, y), f(r, d, T, o, y), E = _(r, d, T, l, o), v = p(r, d, T, l, o), function() {
27774
- T(n.ReadyState.CLOSING), E(), v(), r.close(), S && clearInterval(S);
27773
+ return d.current.fromSocketIO && (S = (0, i.setUpSocketIOPing)(b)), u(r, d, c, y), f(r, d, T, o, y), E = _(r, d, T, n, o), v = p(r, d, T, n, o), function() {
27774
+ T(m.ReadyState.CLOSING), E(), v(), r.close(), S && clearInterval(S);
27775
27775
  };
27776
27776
  };
27777
- return ue.attachListeners = g, ue;
27777
+ return pe.attachListeners = g, pe;
27778
27778
  }
27779
- var pe = {}, Aa;
27779
+ var ge = {}, Aa;
27780
27780
  function Gt() {
27781
- if (Aa) return pe;
27781
+ if (Aa) return ge;
27782
27782
  Aa = 1;
27783
- var e = pe && pe.__assign || function() {
27783
+ var e = ge && ge.__assign || function() {
27784
27784
  return e = Object.assign || function(t) {
27785
- for (var d, l = 1, o = arguments.length; l < o; l++) {
27786
- d = arguments[l];
27785
+ for (var d, n = 1, o = arguments.length; n < o; n++) {
27786
+ d = arguments[n];
27787
27787
  for (var y in d) Object.prototype.hasOwnProperty.call(d, y) && (t[y] = d[y]);
27788
27788
  }
27789
27789
  return t;
27790
27790
  }, e.apply(this, arguments);
27791
27791
  };
27792
- Object.defineProperty(pe, "__esModule", { value: !0 }), pe.attachSharedListeners = void 0;
27793
- var i = oa(), m = j(), n = ua(), s = sa(), u = _i(), f = function(t, d, l) {
27792
+ Object.defineProperty(ge, "__esModule", { value: !0 }), ge.attachSharedListeners = void 0;
27793
+ var i = oa(), l = j(), m = ua(), s = sa(), u = _i(), f = function(t, d, n) {
27794
27794
  t.onmessage = function(o) {
27795
- (0, n.getSubscribers)(d).forEach(function(y) {
27795
+ (0, m.getSubscribers)(d).forEach(function(y) {
27796
27796
  var b;
27797
- y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(o), 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(o) !== !0) && (l && typeof l != "boolean" && l?.returnMessage === o.data || y.setLastMessage(o));
27797
+ y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(o), 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(o) !== !0) && (n && typeof n != "boolean" && n?.returnMessage === o.data || y.setLastMessage(o));
27798
27798
  });
27799
27799
  };
27800
- }, _ = function(t, d, l) {
27800
+ }, _ = function(t, d, n) {
27801
27801
  t.onopen = function(o) {
27802
- var y = (0, n.getSubscribers)(d);
27802
+ var y = (0, m.getSubscribers)(d);
27803
27803
  y.forEach(function(b) {
27804
- b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(o), b.setReadyState(m.ReadyState.OPEN), l && t instanceof WebSocket && (b.lastMessageTime.current = Date.now());
27805
- }), l && t instanceof WebSocket && (0, u.heartbeat)(t, y.map(function(b) {
27804
+ b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(o), b.setReadyState(l.ReadyState.OPEN), n && t instanceof WebSocket && (b.lastMessageTime.current = Date.now());
27805
+ }), n && t instanceof WebSocket && (0, u.heartbeat)(t, y.map(function(b) {
27806
27806
  return b.lastMessageTime;
27807
- }), typeof l == "boolean" ? void 0 : l);
27807
+ }), typeof n == "boolean" ? void 0 : n);
27808
27808
  };
27809
27809
  }, p = function(t, d) {
27810
- t instanceof WebSocket && (t.onclose = function(l) {
27811
- (0, n.getSubscribers)(d).forEach(function(o) {
27812
- o.optionsRef.current.onClose && o.optionsRef.current.onClose(l), o.setReadyState(m.ReadyState.CLOSED);
27813
- }), delete i.sharedWebSockets[d], (0, n.getSubscribers)(d).forEach(function(o) {
27810
+ t instanceof WebSocket && (t.onclose = function(n) {
27811
+ (0, m.getSubscribers)(d).forEach(function(o) {
27812
+ o.optionsRef.current.onClose && o.optionsRef.current.onClose(n), o.setReadyState(l.ReadyState.CLOSED);
27813
+ }), delete i.sharedWebSockets[d], (0, m.getSubscribers)(d).forEach(function(o) {
27814
27814
  var y;
27815
- if (o.optionsRef.current.shouldReconnect && o.optionsRef.current.shouldReconnect(l)) {
27816
- var b = (y = o.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : m.DEFAULT_RECONNECT_LIMIT;
27815
+ if (o.optionsRef.current.shouldReconnect && o.optionsRef.current.shouldReconnect(n)) {
27816
+ var b = (y = o.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : l.DEFAULT_RECONNECT_LIMIT;
27817
27817
  if (o.reconnectCount.current < b) {
27818
27818
  var c = typeof o.optionsRef.current.reconnectInterval == "function" ? o.optionsRef.current.reconnectInterval(o.reconnectCount.current) : o.optionsRef.current.reconnectInterval;
27819
27819
  setTimeout(function() {
27820
27820
  o.reconnectCount.current++, o.reconnect.current();
27821
- }, c ?? m.DEFAULT_RECONNECT_INTERVAL_MS);
27821
+ }, c ?? l.DEFAULT_RECONNECT_INTERVAL_MS);
27822
27822
  } else
27823
27823
  o.optionsRef.current.onReconnectStop && o.optionsRef.current.onReconnectStop(o.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
27824
27824
  }
27825
27825
  });
27826
27826
  });
27827
27827
  }, g = function(t, d) {
27828
- t.onerror = function(l) {
27829
- (0, n.getSubscribers)(d).forEach(function(o) {
27830
- o.optionsRef.current.onError && o.optionsRef.current.onError(l), m.isEventSourceSupported && t instanceof EventSource && (o.optionsRef.current.onClose && o.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), o.setReadyState(m.ReadyState.CLOSED));
27831
- }), m.isEventSourceSupported && t instanceof EventSource && t.close();
27828
+ t.onerror = function(n) {
27829
+ (0, m.getSubscribers)(d).forEach(function(o) {
27830
+ o.optionsRef.current.onError && o.optionsRef.current.onError(n), l.isEventSourceSupported && t instanceof EventSource && (o.optionsRef.current.onClose && o.optionsRef.current.onClose(e(e({}, n), { code: 1006, reason: "An error occurred with the EventSource: ".concat(n), wasClean: !1 })), o.setReadyState(l.ReadyState.CLOSED));
27831
+ }), l.isEventSourceSupported && t instanceof EventSource && t.close();
27832
27832
  };
27833
- }, r = function(t, d, l, o) {
27833
+ }, r = function(t, d, n, o) {
27834
27834
  var y;
27835
- return l.current.fromSocketIO && (y = (0, s.setUpSocketIOPing)(o)), f(t, d, l.current.heartbeat), p(t, d), _(t, d, l.current.heartbeat), g(t, d), function() {
27835
+ return n.current.fromSocketIO && (y = (0, s.setUpSocketIOPing)(o)), f(t, d, n.current.heartbeat), p(t, d), _(t, d, n.current.heartbeat), g(t, d), function() {
27836
27836
  y && clearInterval(y);
27837
27837
  };
27838
27838
  };
27839
- return pe.attachSharedListeners = r, pe;
27839
+ return ge.attachSharedListeners = r, ge;
27840
27840
  }
27841
27841
  var Ia;
27842
27842
  function Mt() {
27843
27843
  if (Ia) return Se;
27844
27844
  Ia = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.createOrJoinSocket = void 0;
27845
- var e = oa(), i = j(), m = Lt(), n = Gt(), s = ua(), u = function(_, p, g, r, t) {
27845
+ var e = oa(), i = j(), l = Lt(), m = Gt(), s = ua(), u = function(_, p, g, r, t) {
27846
27846
  return function() {
27847
27847
  if ((0, s.removeSubscriber)(_, p), !(0, s.hasSubscribers)(_)) {
27848
27848
  try {
27849
27849
  var d = e.sharedWebSockets[_];
27850
- d instanceof WebSocket && (d.onclose = function(l) {
27851
- g.current.onClose && g.current.onClose(l), r(i.ReadyState.CLOSED);
27850
+ d instanceof WebSocket && (d.onclose = function(n) {
27851
+ g.current.onClose && g.current.onClose(n), r(i.ReadyState.CLOSED);
27852
27852
  }), d.close();
27853
27853
  } catch {
27854
27854
  }
27855
27855
  t && t(), delete e.sharedWebSockets[_];
27856
27856
  }
27857
27857
  };
27858
- }, f = function(_, p, g, r, t, d, l, o, y) {
27858
+ }, f = function(_, p, g, r, t, d, n, o, y) {
27859
27859
  if (!i.isEventSourceSupported && r.current.eventSourceOptions)
27860
27860
  throw i.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
27861
27861
  if (r.current.share) {
27862
27862
  var b = null;
27863
- e.sharedWebSockets[p] === void 0 ? (e.sharedWebSockets[p] = r.current.eventSourceOptions ? new EventSource(p, r.current.eventSourceOptions) : new WebSocket(p, r.current.protocols), _.current = e.sharedWebSockets[p], g(i.ReadyState.CONNECTING), b = (0, n.attachSharedListeners)(e.sharedWebSockets[p], p, r, y)) : (_.current = e.sharedWebSockets[p], g(e.sharedWebSockets[p].readyState));
27863
+ e.sharedWebSockets[p] === void 0 ? (e.sharedWebSockets[p] = r.current.eventSourceOptions ? new EventSource(p, r.current.eventSourceOptions) : new WebSocket(p, r.current.protocols), _.current = e.sharedWebSockets[p], g(i.ReadyState.CONNECTING), b = (0, m.attachSharedListeners)(e.sharedWebSockets[p], p, r, y)) : (_.current = e.sharedWebSockets[p], g(e.sharedWebSockets[p].readyState));
27864
27864
  var c = {
27865
27865
  setLastMessage: t,
27866
27866
  setReadyState: g,
27867
27867
  optionsRef: r,
27868
- reconnectCount: l,
27868
+ reconnectCount: n,
27869
27869
  lastMessageTime: o,
27870
27870
  reconnect: d
27871
27871
  };
@@ -27873,10 +27873,10 @@ function Mt() {
27873
27873
  } else {
27874
27874
  if (_.current = r.current.eventSourceOptions ? new EventSource(p, r.current.eventSourceOptions) : new WebSocket(p, r.current.protocols), g(i.ReadyState.CONNECTING), !_.current)
27875
27875
  throw new Error("WebSocket failed to be created");
27876
- return (0, m.attachListeners)(_.current, {
27876
+ return (0, l.attachListeners)(_.current, {
27877
27877
  setLastMessage: t,
27878
27878
  setReadyState: g
27879
- }, r, d.current, l, o, y);
27879
+ }, r, d.current, n, o, y);
27880
27880
  }
27881
27881
  };
27882
27882
  return Se.createOrJoinSocket = f, Se;
@@ -27885,12 +27885,12 @@ var ee = {}, Ba;
27885
27885
  function Rt() {
27886
27886
  return Ba || (Ba = 1, (function(e) {
27887
27887
  var i = ee && ee.__awaiter || function(p, g, r, t) {
27888
- function d(l) {
27889
- return l instanceof r ? l : new r(function(o) {
27890
- o(l);
27888
+ function d(n) {
27889
+ return n instanceof r ? n : new r(function(o) {
27890
+ o(n);
27891
27891
  });
27892
27892
  }
27893
- return new (r || (r = Promise))(function(l, o) {
27893
+ return new (r || (r = Promise))(function(n, o) {
27894
27894
  function y(T) {
27895
27895
  try {
27896
27896
  c(t.next(T));
@@ -27906,15 +27906,15 @@ function Rt() {
27906
27906
  }
27907
27907
  }
27908
27908
  function c(T) {
27909
- T.done ? l(T.value) : d(T.value).then(y, b);
27909
+ T.done ? n(T.value) : d(T.value).then(y, b);
27910
27910
  }
27911
27911
  c((t = t.apply(p, g || [])).next());
27912
27912
  });
27913
- }, m = ee && ee.__generator || function(p, g) {
27913
+ }, l = ee && ee.__generator || function(p, g) {
27914
27914
  var r = { label: 0, sent: function() {
27915
- if (l[0] & 1) throw l[1];
27916
- return l[1];
27917
- }, trys: [], ops: [] }, t, d, l, o = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27915
+ if (n[0] & 1) throw n[1];
27916
+ return n[1];
27917
+ }, trys: [], ops: [] }, t, d, n, o = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27918
27918
  return o.next = y(0), o.throw = y(1), o.return = y(2), typeof Symbol == "function" && (o[Symbol.iterator] = function() {
27919
27919
  return this;
27920
27920
  }), o;
@@ -27926,11 +27926,11 @@ function Rt() {
27926
27926
  function b(c) {
27927
27927
  if (t) throw new TypeError("Generator is already executing.");
27928
27928
  for (; o && (o = 0, c[0] && (r = 0)), r; ) try {
27929
- if (t = 1, d && (l = c[0] & 2 ? d.return : c[0] ? d.throw || ((l = d.return) && l.call(d), 0) : d.next) && !(l = l.call(d, c[1])).done) return l;
27930
- switch (d = 0, l && (c = [c[0] & 2, l.value]), c[0]) {
27929
+ if (t = 1, d && (n = c[0] & 2 ? d.return : c[0] ? d.throw || ((n = d.return) && n.call(d), 0) : d.next) && !(n = n.call(d, c[1])).done) return n;
27930
+ switch (d = 0, n && (c = [c[0] & 2, n.value]), c[0]) {
27931
27931
  case 0:
27932
27932
  case 1:
27933
- l = c;
27933
+ n = c;
27934
27934
  break;
27935
27935
  case 4:
27936
27936
  return r.label++, { value: c[1], done: !1 };
@@ -27941,38 +27941,38 @@ function Rt() {
27941
27941
  c = r.ops.pop(), r.trys.pop();
27942
27942
  continue;
27943
27943
  default:
27944
- if (l = r.trys, !(l = l.length > 0 && l[l.length - 1]) && (c[0] === 6 || c[0] === 2)) {
27944
+ if (n = r.trys, !(n = n.length > 0 && n[n.length - 1]) && (c[0] === 6 || c[0] === 2)) {
27945
27945
  r = 0;
27946
27946
  continue;
27947
27947
  }
27948
- if (c[0] === 3 && (!l || c[1] > l[0] && c[1] < l[3])) {
27948
+ if (c[0] === 3 && (!n || c[1] > n[0] && c[1] < n[3])) {
27949
27949
  r.label = c[1];
27950
27950
  break;
27951
27951
  }
27952
- if (c[0] === 6 && r.label < l[1]) {
27953
- r.label = l[1], l = c;
27952
+ if (c[0] === 6 && r.label < n[1]) {
27953
+ r.label = n[1], n = c;
27954
27954
  break;
27955
27955
  }
27956
- if (l && r.label < l[2]) {
27957
- r.label = l[2], r.ops.push(c);
27956
+ if (n && r.label < n[2]) {
27957
+ r.label = n[2], r.ops.push(c);
27958
27958
  break;
27959
27959
  }
27960
- l[2] && r.ops.pop(), r.trys.pop();
27960
+ n[2] && r.ops.pop(), r.trys.pop();
27961
27961
  continue;
27962
27962
  }
27963
27963
  c = g.call(p, r);
27964
27964
  } catch (T) {
27965
27965
  c = [6, T], d = 0;
27966
27966
  } finally {
27967
- t = l = 0;
27967
+ t = n = 0;
27968
27968
  }
27969
27969
  if (c[0] & 5) throw c[1];
27970
27970
  return { value: c[0] ? c[1] : void 0, done: !0 };
27971
27971
  }
27972
- }, n = ee && ee.__spreadArray || function(p, g, r) {
27973
- if (r || arguments.length === 2) for (var t = 0, d = g.length, l; t < d; t++)
27974
- (l || !(t in g)) && (l || (l = Array.prototype.slice.call(g, 0, t)), l[t] = g[t]);
27975
- return p.concat(l || Array.prototype.slice.call(g));
27972
+ }, m = ee && ee.__spreadArray || function(p, g, r) {
27973
+ if (r || arguments.length === 2) for (var t = 0, d = g.length, n; t < d; t++)
27974
+ (n || !(t in g)) && (n || (n = Array.prototype.slice.call(g, 0, t)), n[t] = g[t]);
27975
+ return p.concat(n || Array.prototype.slice.call(g));
27976
27976
  };
27977
27977
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
27978
27978
  var s = sa(), u = j(), f = function(p) {
@@ -27982,9 +27982,9 @@ function Rt() {
27982
27982
  }, _ = function(p, g) {
27983
27983
  for (var r = [], t = 2; t < arguments.length; t++)
27984
27984
  r[t - 2] = arguments[t];
27985
- return i(void 0, n([p, g], r, !0), void 0, function(d, l, o) {
27985
+ return i(void 0, m([p, g], r, !0), void 0, function(d, n, o) {
27986
27986
  var y, b, c, T, S, E, v, D;
27987
- return o === void 0 && (o = 0), m(this, function(L) {
27987
+ return o === void 0 && (o = 0), l(this, function(L) {
27988
27988
  switch (L.label) {
27989
27989
  case 0:
27990
27990
  if (typeof d != "function") return [3, 10];
@@ -27994,11 +27994,11 @@ function Rt() {
27994
27994
  case 2:
27995
27995
  return y = L.sent(), [3, 9];
27996
27996
  case 3:
27997
- return L.sent(), l.current.retryOnError ? (b = (E = l.current.reconnectAttempts) !== null && E !== void 0 ? E : u.DEFAULT_RECONNECT_LIMIT, o < b ? (c = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(o) : l.current.reconnectInterval, [4, f(c ?? u.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27997
+ return L.sent(), n.current.retryOnError ? (b = (E = n.current.reconnectAttempts) !== null && E !== void 0 ? E : u.DEFAULT_RECONNECT_LIMIT, o < b ? (c = typeof n.current.reconnectInterval == "function" ? n.current.reconnectInterval(o) : n.current.reconnectInterval, [4, f(c ?? u.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27998
27998
  case 4:
27999
- return L.sent(), [2, (0, e.getUrl)(d, l, o + 1)];
27999
+ return L.sent(), [2, (0, e.getUrl)(d, n, o + 1)];
28000
28000
  case 5:
28001
- return (D = (v = l.current).onReconnectStop) === null || D === void 0 || D.call(v, o), [2, null];
28001
+ return (D = (v = n.current).onReconnectStop) === null || D === void 0 || D.call(v, o), [2, null];
28002
28002
  case 6:
28003
28003
  return [3, 8];
28004
28004
  case 7:
@@ -28010,7 +28010,7 @@ function Rt() {
28010
28010
  case 10:
28011
28011
  y = d, L.label = 11;
28012
28012
  case 11:
28013
- return T = l.current.fromSocketIO ? (0, s.parseSocketIOUrl)(y) : y, S = l.current.queryParams ? (0, s.appendQueryParams)(T, l.current.queryParams) : T, [2, S];
28013
+ return T = n.current.fromSocketIO ? (0, s.parseSocketIOUrl)(y) : y, S = n.current.queryParams ? (0, s.appendQueryParams)(T, n.current.queryParams) : T, [2, S];
28014
28014
  }
28015
28015
  });
28016
28016
  });
@@ -28022,11 +28022,11 @@ var aa = {}, Ka;
28022
28022
  function Pt() {
28023
28023
  return Ka || (Ka = 1, (function(e) {
28024
28024
  Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
28025
- var i = function(m, n) {
28026
- return new Proxy(m, {
28025
+ var i = function(l, m) {
28026
+ return new Proxy(l, {
28027
28027
  get: function(s, u) {
28028
28028
  var f = s[u];
28029
- return u === "reconnect" ? n : typeof f == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
28029
+ return u === "reconnect" ? m : typeof f == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
28030
28030
  }) : f;
28031
28031
  },
28032
28032
  set: function(s, u, f) {
@@ -28043,13 +28043,13 @@ function ga() {
28043
28043
  ja = 1;
28044
28044
  var e = z && z.__assign || function() {
28045
28045
  return e = Object.assign || function(d) {
28046
- for (var l, o = 1, y = arguments.length; o < y; o++) {
28047
- l = arguments[o];
28048
- for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (d[b] = l[b]);
28046
+ for (var n, o = 1, y = arguments.length; o < y; o++) {
28047
+ n = arguments[o];
28048
+ for (var b in n) Object.prototype.hasOwnProperty.call(n, b) && (d[b] = n[b]);
28049
28049
  }
28050
28050
  return d;
28051
28051
  }, e.apply(this, arguments);
28052
- }, i = z && z.__awaiter || function(d, l, o, y) {
28052
+ }, i = z && z.__awaiter || function(d, n, o, y) {
28053
28053
  function b(c) {
28054
28054
  return c instanceof o ? c : new o(function(T) {
28055
28055
  T(c);
@@ -28073,9 +28073,9 @@ function ga() {
28073
28073
  function v(D) {
28074
28074
  D.done ? c(D.value) : b(D.value).then(S, E);
28075
28075
  }
28076
- v((y = y.apply(d, l || [])).next());
28076
+ v((y = y.apply(d, n || [])).next());
28077
28077
  });
28078
- }, m = z && z.__generator || function(d, l) {
28078
+ }, l = z && z.__generator || function(d, n) {
28079
28079
  var o = { label: 0, sent: function() {
28080
28080
  if (c[0] & 1) throw c[1];
28081
28081
  return c[1];
@@ -28125,7 +28125,7 @@ function ga() {
28125
28125
  c[2] && o.ops.pop(), o.trys.pop();
28126
28126
  continue;
28127
28127
  }
28128
- v = l.call(d, o);
28128
+ v = n.call(d, o);
28129
28129
  } catch (D) {
28130
28130
  v = [6, D], b = 0;
28131
28131
  } finally {
@@ -28134,24 +28134,24 @@ function ga() {
28134
28134
  if (v[0] & 5) throw v[1];
28135
28135
  return { value: v[0] ? v[1] : void 0, done: !0 };
28136
28136
  }
28137
- }, n = z && z.__importDefault || function(d) {
28137
+ }, m = z && z.__importDefault || function(d) {
28138
28138
  return d && d.__esModule ? d : { default: d };
28139
28139
  };
28140
28140
  Object.defineProperty(z, "__esModule", { value: !0 }), z.useWebSocket = void 0;
28141
- var s = Le, u = rt, f = j(), _ = Mt(), p = Rt(), g = n(Pt()), r = pa(), t = function(d, l, o) {
28142
- l === void 0 && (l = f.DEFAULT_OPTIONS), o === void 0 && (o = !0);
28141
+ var s = Le, u = rt, f = j(), _ = Mt(), p = Rt(), g = m(Pt()), r = pa(), t = function(d, n, o) {
28142
+ n === void 0 && (n = f.DEFAULT_OPTIONS), o === void 0 && (o = !0);
28143
28143
  var y = (0, s.useState)(null), b = y[0], c = y[1], T = (0, s.useState)({}), S = T[0], E = T[1], v = (0, s.useMemo)(function() {
28144
- if (!l.disableJson && b)
28144
+ if (!n.disableJson && b)
28145
28145
  try {
28146
28146
  return JSON.parse(b.data);
28147
28147
  } catch {
28148
28148
  return f.UNPARSABLE_JSON_OBJECT;
28149
28149
  }
28150
28150
  return null;
28151
- }, [b, l.disableJson]), D = (0, s.useRef)(null), L = (0, s.useRef)(null), I = (0, s.useRef)(function() {
28152
- }), Q = (0, s.useRef)(0), Te = (0, s.useRef)(Date.now()), Ge = (0, s.useRef)([]), B = (0, s.useRef)(null), w = (0, s.useRef)(l);
28153
- w.current = l;
28154
- var A = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && o === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, me = l.queryParams ? JSON.stringify(l.queryParams) : null, q = (0, s.useCallback)(function(x, F) {
28151
+ }, [b, n.disableJson]), D = (0, s.useRef)(null), L = (0, s.useRef)(null), I = (0, s.useRef)(function() {
28152
+ }), Q = (0, s.useRef)(0), Te = (0, s.useRef)(Date.now()), Ge = (0, s.useRef)([]), B = (0, s.useRef)(null), w = (0, s.useRef)(n);
28153
+ w.current = n;
28154
+ var A = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && o === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, re = n.queryParams ? JSON.stringify(n.queryParams) : null, q = (0, s.useCallback)(function(x, F) {
28155
28155
  var Y;
28156
28156
  if (F === void 0 && (F = !0), f.isEventSourceSupported && L.current instanceof EventSource) {
28157
28157
  console.warn("Unable to send a message from an eventSource");
@@ -28167,31 +28167,31 @@ function ga() {
28167
28167
  if (d !== null && o === !0) {
28168
28168
  var x, F = !1, Y = !0, Ce = function() {
28169
28169
  return i(void 0, void 0, void 0, function() {
28170
- var re, te, Pe;
28171
- return m(this, function(ce) {
28170
+ var oe, le, Pe;
28171
+ return l(this, function(ce) {
28172
28172
  switch (ce.label) {
28173
28173
  case 0:
28174
- return re = D, [4, (0, p.getUrl)(d, w)];
28174
+ return oe = D, [4, (0, p.getUrl)(d, w)];
28175
28175
  case 1:
28176
- return re.current = ce.sent(), D.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), D.current = "ABORTED", (0, u.flushSync)(function() {
28176
+ return oe.current = ce.sent(), D.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), D.current = "ABORTED", (0, u.flushSync)(function() {
28177
28177
  return E(function(X) {
28178
28178
  return e(e({}, X), { ABORTED: f.ReadyState.CLOSED });
28179
28179
  });
28180
28180
  }), [
28181
28181
  2
28182
28182
  /*return*/
28183
- ]) : (te = function(X) {
28183
+ ]) : (le = function(X) {
28184
28184
  F || (0, u.flushSync)(function() {
28185
28185
  return c(X);
28186
28186
  });
28187
28187
  }, Pe = function(X) {
28188
28188
  F || (0, u.flushSync)(function() {
28189
28189
  return E(function(_e) {
28190
- var oe;
28191
- return e(e({}, _e), D.current && (oe = {}, oe[D.current] = X, oe));
28190
+ var se;
28191
+ return e(e({}, _e), D.current && (se = {}, se[D.current] = X, se));
28192
28192
  });
28193
28193
  });
28194
- }, Y && (x = (0, _.createOrJoinSocket)(L, D.current, Pe, w, te, I, Q, Te, q)), [
28194
+ }, Y && (x = (0, _.createOrJoinSocket)(L, D.current, Pe, w, le, I, Q, Te, q)), [
28195
28195
  2
28196
28196
  /*return*/
28197
28197
  ]);
@@ -28204,11 +28204,11 @@ function ga() {
28204
28204
  }, Ce(), function() {
28205
28205
  F = !0, Y = !1, B.current && (B.current = null), x?.(), c(null);
28206
28206
  };
28207
- } else (d === null || o === !1) && (Q.current = 0, E(function(re) {
28208
- var te;
28209
- return e(e({}, re), D.current && (te = {}, te[D.current] = f.ReadyState.CLOSED, te));
28207
+ } else (d === null || o === !1) && (Q.current = 0, E(function(oe) {
28208
+ var le;
28209
+ return e(e({}, oe), D.current && (le = {}, le[D.current] = f.ReadyState.CLOSED, le));
28210
28210
  }));
28211
- }, [d, o, me, q]), (0, s.useEffect)(function() {
28211
+ }, [d, o, re, q]), (0, s.useEffect)(function() {
28212
28212
  A === f.ReadyState.OPEN && Ge.current.splice(0).forEach(function(x) {
28213
28213
  q(x);
28214
28214
  });
@@ -28223,11 +28223,11 @@ function ga() {
28223
28223
  };
28224
28224
  return z.useWebSocket = t, z;
28225
28225
  }
28226
- var ge = {}, Qa;
28226
+ var de = {}, Qa;
28227
28227
  function xt() {
28228
- if (Qa) return ge;
28228
+ if (Qa) return de;
28229
28229
  Qa = 1;
28230
- var e = ge && ge.__assign || function() {
28230
+ var e = de && de.__assign || function() {
28231
28231
  return e = Object.assign || function(_) {
28232
28232
  for (var p, g = 1, r = arguments.length; g < r; g++) {
28233
28233
  p = arguments[g];
@@ -28236,8 +28236,8 @@ function xt() {
28236
28236
  return _;
28237
28237
  }, e.apply(this, arguments);
28238
28238
  };
28239
- Object.defineProperty(ge, "__esModule", { value: !0 }), ge.useSocketIO = void 0;
28240
- var i = Le, m = ga(), n = j(), s = {
28239
+ Object.defineProperty(de, "__esModule", { value: !0 }), de.useSocketIO = void 0;
28240
+ var i = Le, l = ga(), m = j(), s = {
28241
28241
  type: "empty",
28242
28242
  payload: null
28243
28243
  }, u = function(_) {
@@ -28252,22 +28252,22 @@ function xt() {
28252
28252
  payload: g[1]
28253
28253
  };
28254
28254
  }, f = function(_, p, g) {
28255
- p === void 0 && (p = n.DEFAULT_OPTIONS), g === void 0 && (g = !0);
28255
+ p === void 0 && (p = m.DEFAULT_OPTIONS), g === void 0 && (g = !0);
28256
28256
  var r = (0, i.useMemo)(function() {
28257
28257
  return e(e({}, p), { fromSocketIO: !0 });
28258
- }, []), t = (0, m.useWebSocket)(_, r, g), d = t.sendMessage, l = t.sendJsonMessage, o = t.lastMessage, y = t.readyState, b = t.getWebSocket, c = (0, i.useMemo)(function() {
28258
+ }, []), t = (0, l.useWebSocket)(_, r, g), d = t.sendMessage, n = t.sendJsonMessage, o = t.lastMessage, y = t.readyState, b = t.getWebSocket, c = (0, i.useMemo)(function() {
28259
28259
  return u(o);
28260
28260
  }, [o]);
28261
28261
  return {
28262
28262
  sendMessage: d,
28263
- sendJsonMessage: l,
28263
+ sendJsonMessage: n,
28264
28264
  lastMessage: c,
28265
28265
  lastJsonMessage: c,
28266
28266
  readyState: y,
28267
28267
  getWebSocket: b
28268
28268
  };
28269
28269
  };
28270
- return ge.useSocketIO = f, ge;
28270
+ return de.useSocketIO = f, de;
28271
28271
  }
28272
28272
  var ae = {}, qa;
28273
28273
  function Ot() {
@@ -28290,17 +28290,17 @@ function Ot() {
28290
28290
  return p;
28291
28291
  };
28292
28292
  Object.defineProperty(ae, "__esModule", { value: !0 }), ae.useEventSource = void 0;
28293
- var m = Le, n = ga(), s = j(), u = function(f, _, p) {
28293
+ var l = Le, m = ga(), s = j(), u = function(f, _, p) {
28294
28294
  _ === void 0 && (_ = s.DEFAULT_EVENT_SOURCE_OPTIONS);
28295
28295
  var g = _.withCredentials, r = _.events, t = i(_, ["withCredentials", "events"]);
28296
28296
  p === void 0 && (p = !0);
28297
28297
  var d = e(e({}, t), { eventSourceOptions: {
28298
28298
  withCredentials: g
28299
- } }), l = (0, m.useRef)(s.EMPTY_EVENT_HANDLERS);
28300
- r && (l.current = r);
28301
- var o = (0, n.useWebSocket)(f, d, p), y = o.lastMessage, b = o.readyState, c = o.getWebSocket;
28302
- return (0, m.useEffect)(function() {
28303
- y?.type && Object.entries(l.current).forEach(function(T) {
28299
+ } }), n = (0, l.useRef)(s.EMPTY_EVENT_HANDLERS);
28300
+ r && (n.current = r);
28301
+ var o = (0, m.useWebSocket)(f, d, p), y = o.lastMessage, b = o.readyState, c = o.getWebSocket;
28302
+ return (0, l.useEffect)(function() {
28303
+ y?.type && Object.entries(n.current).forEach(function(T) {
28304
28304
  var S = T[0], E = T[1];
28305
28305
  S === y.type && E(y);
28306
28306
  });
@@ -28320,13 +28320,13 @@ function Ht() {
28320
28320
  Object.defineProperty(e, "default", { enumerable: !0, get: function() {
28321
28321
  return i.useWebSocket;
28322
28322
  } });
28323
- var m = xt();
28323
+ var l = xt();
28324
28324
  Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
28325
- return m.useSocketIO;
28325
+ return l.useSocketIO;
28326
28326
  } });
28327
- var n = j();
28327
+ var m = j();
28328
28328
  Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
28329
- return n.ReadyState;
28329
+ return m.ReadyState;
28330
28330
  } });
28331
28331
  var s = Ot();
28332
28332
  Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
@@ -28353,9 +28353,9 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28353
28353
  }, Wt = 3e4, Ul = ({
28354
28354
  socketUrl: e,
28355
28355
  socketHandlers: i = {},
28356
- options: m = {}
28356
+ options: l = {}
28357
28357
  }) => {
28358
- const n = Ga(!1), s = Ga(i), {
28358
+ const m = Ga(!1), s = Ga(i), {
28359
28359
  sendMessage: u,
28360
28360
  // 發送普通訊息
28361
28361
  sendJsonMessage: f,
@@ -28369,10 +28369,10 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28369
28369
  } = Ft(e, {
28370
28370
  queryParams: { key: "wsky" },
28371
28371
  onOpen: () => console.log("連線成功"),
28372
- shouldReconnect: () => n.current === !1,
28372
+ shouldReconnect: () => m.current === !1,
28373
28373
  reconnectAttempts: 9999,
28374
28374
  reconnectInterval: 1e3,
28375
- ...m
28375
+ ...l
28376
28376
  }), g = ia(() => {
28377
28377
  try {
28378
28378
  return JSON.parse(_?.data);
@@ -28394,7 +28394,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28394
28394
  onDeposit: r,
28395
28395
  onTransCode: t,
28396
28396
  onError: d,
28397
- onUpdateMember: l,
28397
+ onUpdateMember: n,
28398
28398
  onMaintainNotice: o,
28399
28399
  onMaintainNoticeMember: y,
28400
28400
  onReload: b,
@@ -28416,7 +28416,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28416
28416
  d?.(E);
28417
28417
  break;
28418
28418
  case K.UPDATE_MEMBER:
28419
- l?.(E);
28419
+ n?.(E);
28420
28420
  break;
28421
28421
  case K.MAINTAIN_NOTICE:
28422
28422
  o?.(E);
@@ -28438,43 +28438,52 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28438
28438
  console.warn("Unknown socket type:", S);
28439
28439
  break;
28440
28440
  }
28441
- }, [g]), De(() => () => n.current = !0, []), {
28441
+ }, [g]), De(() => () => m.current = !0, []), {
28442
28442
  sendMessage: u,
28443
28443
  sendJsonMessage: f,
28444
28444
  readyState: p
28445
28445
  // WebSocket 連線狀態
28446
28446
  };
28447
28447
  }, fi = () => {
28448
- const { client: e } = ie(), i = V(async () => {
28449
- const { data: n } = await e.get("/carousels");
28450
- return n;
28451
- }, [e]), m = V(async () => await e.get("/marquees"), [e]);
28452
- return { commonCarouselApi: i, commonMarqueeApi: m };
28448
+ const { client: e } = te(), i = V(async () => {
28449
+ const { data: m } = await e.get("/carousels");
28450
+ return m;
28451
+ }, [e]), l = V(async () => await e.get("/marquees"), [e]);
28452
+ return { commonCarouselApi: i, commonMarqueeApi: l };
28453
28453
  }, yl = () => {
28454
- const { lng: e } = ie(), { commonCarouselApi: i } = fi(), m = ra(e);
28455
- return le({
28454
+ const { lng: e } = te(), { commonCarouselApi: i } = fi(), l = ra(e);
28455
+ return ie({
28456
28456
  queryKey: ["getCarouselList"],
28457
28457
  queryFn: async () => await i(),
28458
- select: (n) => n.map((u) => {
28458
+ select: (m) => m.map((u) => {
28459
28459
  const { carousels_lang: f } = u;
28460
28460
  return {
28461
28461
  ...u,
28462
- carousel_current_language: f?.find((_) => _.lang === m) || {}
28462
+ carousel_current_language: f?.find((_) => _.lang === l) || {}
28463
28463
  };
28464
28464
  })
28465
28465
  });
28466
28466
  }, bl = () => {
28467
- const { lng: e } = ie(), { commonMarqueeApi: i } = fi(), m = ra(e);
28468
- return le({
28467
+ const { lng: e } = te(), { commonMarqueeApi: i } = fi(), l = ra(e);
28468
+ return ie({
28469
28469
  queryKey: ["getMarqueeList"],
28470
28470
  queryFn: async () => i(),
28471
- select: (n) => {
28472
- const s = n.Marquees;
28473
- return Ie(s, (f) => f[m] || f["en-US"]);
28471
+ select: (m) => {
28472
+ const s = m.Marquees;
28473
+ return Ie(s, (f) => f[l] || f["en-US"]);
28474
28474
  }
28475
28475
  });
28476
+ }, Tl = ({ options: e } = {}) => {
28477
+ const { rankingGameApi: i } = me();
28478
+ return ie({
28479
+ queryKey: ["rankingGame"],
28480
+ queryFn: async () => i(),
28481
+ enabled: window.profit_ranking_status === 1,
28482
+ select: (l) => l.data || [],
28483
+ ...e
28484
+ });
28476
28485
  }, Jt = () => {
28477
- const { client: e, lng: i } = ie(), m = ra(i || "tw");
28486
+ const { client: e, lng: i } = te(), l = ra(i || "tw");
28478
28487
  return { playGameApi: V(
28479
28488
  async (s) => {
28480
28489
  const {
@@ -28492,32 +28501,32 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28492
28501
  return await e.post("/game/go", {
28493
28502
  gameUid: u,
28494
28503
  gameCode: f,
28495
- lang: m,
28504
+ lang: l,
28496
28505
  is_mobile: _,
28497
28506
  currency_code: p,
28498
28507
  gameCurrencyNow: g,
28499
28508
  walletCurrencyNow: g
28500
28509
  });
28501
28510
  },
28502
- [e, m]
28511
+ [e, l]
28503
28512
  ) };
28504
28513
  }, Ui = "3.7.8", zt = Ui, be = typeof Buffer == "function", Xa = typeof TextDecoder == "function" ? new TextDecoder() : void 0, $a = typeof TextEncoder == "function" ? new TextEncoder() : void 0, Zt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", Ee = Array.prototype.slice.call(Zt), Je = ((e) => {
28505
28514
  let i = {};
28506
- return e.forEach((m, n) => i[m] = n), i;
28515
+ return e.forEach((l, m) => i[l] = m), i;
28507
28516
  })(Ee), Vt = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, H = String.fromCharCode.bind(String), ei = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), yi = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (i) => i == "+" ? "-" : "_"), bi = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), Ti = (e) => {
28508
- let i, m, n, s, u = "";
28517
+ let i, l, m, s, u = "";
28509
28518
  const f = e.length % 3;
28510
28519
  for (let _ = 0; _ < e.length; ) {
28511
- if ((m = e.charCodeAt(_++)) > 255 || (n = e.charCodeAt(_++)) > 255 || (s = e.charCodeAt(_++)) > 255)
28520
+ if ((l = e.charCodeAt(_++)) > 255 || (m = e.charCodeAt(_++)) > 255 || (s = e.charCodeAt(_++)) > 255)
28512
28521
  throw new TypeError("invalid character found");
28513
- i = m << 16 | n << 8 | s, u += Ee[i >> 18 & 63] + Ee[i >> 12 & 63] + Ee[i >> 6 & 63] + Ee[i & 63];
28522
+ i = l << 16 | m << 8 | s, u += Ee[i >> 18 & 63] + Ee[i >> 12 & 63] + Ee[i >> 6 & 63] + Ee[i & 63];
28514
28523
  }
28515
28524
  return f ? u.slice(0, f - 3) + "===".substring(f) : u;
28516
28525
  }, da = typeof btoa == "function" ? (e) => btoa(e) : be ? (e) => Buffer.from(e, "binary").toString("base64") : Ti, ta = be ? (e) => Buffer.from(e).toString("base64") : (e) => {
28517
- let m = [];
28518
- for (let n = 0, s = e.length; n < s; n += 4096)
28519
- m.push(H.apply(null, e.subarray(n, n + 4096)));
28520
- return da(m.join(""));
28526
+ let l = [];
28527
+ for (let m = 0, s = e.length; m < s; m += 4096)
28528
+ l.push(H.apply(null, e.subarray(m, m + 4096)));
28529
+ return da(l.join(""));
28521
28530
  }, Ze = (e, i = !1) => i ? yi(ta(e)) : ta(e), At = (e) => {
28522
28531
  if (e.length < 2) {
28523
28532
  var i = e.charCodeAt(0);
@@ -28529,8 +28538,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28529
28538
  }, It = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Ci = (e) => e.replace(It, At), ai = be ? (e) => Buffer.from(e, "utf8").toString("base64") : $a ? (e) => ta($a.encode(e)) : (e) => da(Ci(e)), ye = (e, i = !1) => i ? yi(ai(e)) : ai(e), ii = (e) => ye(e, !0), Bt = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, Kt = (e) => {
28530
28539
  switch (e.length) {
28531
28540
  case 4:
28532
- var i = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), m = i - 65536;
28533
- return H((m >>> 10) + 55296) + H((m & 1023) + 56320);
28541
+ var i = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), l = i - 65536;
28542
+ return H((l >>> 10) + 55296) + H((l & 1023) + 56320);
28534
28543
  case 3:
28535
28544
  return H((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
28536
28545
  default:
@@ -28540,9 +28549,9 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28540
28549
  if (e = e.replace(/\s+/g, ""), !Vt.test(e))
28541
28550
  throw new TypeError("malformed base64.");
28542
28551
  e += "==".slice(2 - (e.length & 3));
28543
- let i, m, n, s = [];
28552
+ let i, l, m, s = [];
28544
28553
  for (let u = 0; u < e.length; )
28545
- i = Je[e.charAt(u++)] << 18 | Je[e.charAt(u++)] << 12 | (m = Je[e.charAt(u++)]) << 6 | (n = Je[e.charAt(u++)]), m === 64 ? s.push(H(i >> 16 & 255)) : n === 64 ? s.push(H(i >> 16 & 255, i >> 8 & 255)) : s.push(H(i >> 16 & 255, i >> 8 & 255, i & 255));
28554
+ i = Je[e.charAt(u++)] << 18 | Je[e.charAt(u++)] << 12 | (l = Je[e.charAt(u++)]) << 6 | (m = Je[e.charAt(u++)]), l === 64 ? s.push(H(i >> 16 & 255)) : m === 64 ? s.push(H(i >> 16 & 255, i >> 8 & 255)) : s.push(H(i >> 16 & 255, i >> 8 & 255, i & 255));
28546
28555
  return s.join("");
28547
28556
  }, ca = typeof atob == "function" ? (e) => atob(bi(e)) : be ? (e) => Buffer.from(e, "base64").toString("binary") : hi, ki = be ? (e) => ei(Buffer.from(e, "base64")) : (e) => ei(ca(e).split("").map((i) => i.charCodeAt(0))), Si = (e) => ki(Ni(e)), jt = be ? (e) => Buffer.from(e, "base64").toString("utf8") : Xa ? (e) => Xa.decode(ki(e)) : (e) => vi(ca(e)), Ni = (e) => bi(e.replace(/[-_]/g, (i) => i == "-" ? "+" : "/")), la = (e) => jt(Ni(e)), Qt = (e) => {
28548
28557
  if (typeof e != "string")
@@ -28555,7 +28564,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28555
28564
  writable: !0,
28556
28565
  configurable: !0
28557
28566
  }), Ei = function() {
28558
- const e = (i, m) => Object.defineProperty(String.prototype, i, Di(m));
28567
+ const e = (i, l) => Object.defineProperty(String.prototype, i, Di(l));
28559
28568
  e("fromBase64", function() {
28560
28569
  return la(this);
28561
28570
  }), e("toBase64", function(i) {
@@ -28568,7 +28577,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28568
28577
  return Si(this);
28569
28578
  });
28570
28579
  }, Li = function() {
28571
- const e = (i, m) => Object.defineProperty(Uint8Array.prototype, i, Di(m));
28580
+ const e = (i, l) => Object.defineProperty(Uint8Array.prototype, i, Di(l));
28572
28581
  e("toBase64", function(i) {
28573
28582
  return Ze(this, i);
28574
28583
  }), e("toBase64URI", function() {
@@ -28599,13 +28608,13 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28599
28608
  extendString: Ei,
28600
28609
  extendUint8Array: Li,
28601
28610
  extendBuiltins: qt
28602
- }, Tl = (e, i) => {
28603
- const { playGameApi: m } = Jt();
28604
- return le({
28611
+ }, Cl = (e, i) => {
28612
+ const { playGameApi: l } = Jt();
28613
+ return ie({
28605
28614
  queryKey: ["playGame"],
28606
28615
  queryFn: async () => {
28607
- const { gameUid: n, gameCode: s, isMobile: u, gameCurrency: f, currentCurrency: _ } = e || {}, p = await m({
28608
- gameUid: n,
28616
+ const { gameUid: m, gameCode: s, isMobile: u, gameCurrency: f, currentCurrency: _ } = e || {}, p = await l({
28617
+ gameUid: m,
28609
28618
  gameCode: s,
28610
28619
  isMobile: u,
28611
28620
  gameCurrency: f,
@@ -28615,7 +28624,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28615
28624
  lang: r,
28616
28625
  not_support_iframe: t,
28617
28626
  portrait: d,
28618
- url: l,
28627
+ url: n,
28619
28628
  is_html_code: o,
28620
28629
  message: y
28621
28630
  } = p;
@@ -28625,8 +28634,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28625
28634
  supportIframe: !t,
28626
28635
  supportPortrait: d,
28627
28636
  isHtmlCode: o,
28628
- gameUrl: l,
28629
- decodeGameUrl: Yt.decode(l),
28637
+ gameUrl: n,
28638
+ decodeGameUrl: Yt.decode(n),
28630
28639
  message: y
28631
28640
  };
28632
28641
  },
@@ -28634,37 +28643,37 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28634
28643
  ...i
28635
28644
  });
28636
28645
  }, Xt = ({ options: e } = {}) => {
28637
- const { userLoginApi: i } = de();
28646
+ const { userLoginApi: i } = me();
28638
28647
  return na({
28639
28648
  mutationKey: ["userLogin"],
28640
- mutationFn: async (m) => i(m),
28649
+ mutationFn: async (l) => i(l),
28641
28650
  ...e
28642
28651
  });
28643
28652
  }, $t = ({ options: e } = {}) => {
28644
- const { userLogoutApi: i } = de();
28653
+ const { userLogoutApi: i } = me();
28645
28654
  return na({
28646
28655
  mutationKey: ["userLogout"],
28647
28656
  mutationFn: async () => i(),
28648
28657
  ...e
28649
28658
  });
28650
28659
  }, el = ({ options: e } = {}) => {
28651
- const { addOrRemoveFavoriteGameApi: i } = de();
28660
+ const { addOrRemoveFavoriteGameApi: i } = me();
28652
28661
  return na({
28653
28662
  mutationKey: ["toggleFavoriteGame"],
28654
- mutationFn: async (m) => i(m),
28663
+ mutationFn: async (l) => i(l),
28655
28664
  ...e
28656
28665
  });
28657
- }, Cl = ({
28666
+ }, vl = ({
28658
28667
  options: e = {
28659
28668
  login: {},
28660
28669
  logout: {},
28661
28670
  toggleFavoriteGame: {}
28662
28671
  }
28663
28672
  } = {}) => {
28664
- const i = Xt({ options: e.login }), m = $t({ options: e.logout }), n = el({
28673
+ const i = Xt({ options: e.login }), l = $t({ options: e.logout }), m = el({
28665
28674
  options: e.toggleFavoriteGame
28666
28675
  });
28667
- return { login: i, logout: m, toggleFavoriteGame: n };
28676
+ return { login: i, logout: l, toggleFavoriteGame: m };
28668
28677
  }, ti = (e) => {
28669
28678
  switch (e) {
28670
28679
  case "tw":
@@ -28684,9 +28693,9 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28684
28693
  default:
28685
28694
  return "En";
28686
28695
  }
28687
- }, al = "https://d1h3qe8voog6w4.cloudfront.net", li = "https://d3jx2uvukujuvn.cloudfront.net", ni = "game-icon-ds88", vl = ({ gameData: e = {} } = {}) => {
28688
- const { lng: i } = ie(), m = ti(i), {
28689
- gameCode: n,
28696
+ }, al = "https://d1h3qe8voog6w4.cloudfront.net", li = "https://d3jx2uvukujuvn.cloudfront.net", ni = "game-icon-ds88", hl = ({ gameData: e = {} } = {}) => {
28697
+ const { lng: i } = te(), l = ti(i), {
28698
+ gameCode: m,
28690
28699
  // 遊戲代碼
28691
28700
  gameUid: s,
28692
28701
  // 遊戲唯一標識符
@@ -28707,7 +28716,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28707
28716
  // 遊戲類型
28708
28717
  game_tags: d,
28709
28718
  // 遊戲標籤
28710
- isUnderMaintenance: l,
28719
+ isUnderMaintenance: n,
28711
28720
  // 是否維護中
28712
28721
  support_vertical: o,
28713
28722
  // 是否支援直向
@@ -28723,9 +28732,9 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28723
28732
  // 越南名稱
28724
28733
  gameNameTw: E
28725
28734
  // 繁體中文名稱
28726
- } = e, v = e?.[`gameName${ti(m)}`], D = `${li}/${ni}/en/${g}/${Ra(n, / /g, "_")}.webp`, L = `${li}/${ni}/en/${g}/${Ra(n, / /g, "_")}.gif`;
28735
+ } = e, v = e?.[`gameName${ti(l)}`], D = `${li}/${ni}/en/${g}/${Ra(m, / /g, "_")}.webp`, L = `${li}/${ni}/en/${g}/${Ra(m, / /g, "_")}.gif`;
28727
28736
  return {
28728
- gameCode: n,
28737
+ gameCode: m,
28729
28738
  gameUid: s,
28730
28739
  gameTypeUid: u,
28731
28740
  providerUid: f,
@@ -28735,7 +28744,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28735
28744
  gameSubType: r,
28736
28745
  gameType: t,
28737
28746
  gameTags: d,
28738
- isUnderMaintenance: l,
28747
+ isUnderMaintenance: n,
28739
28748
  supportVertical: o,
28740
28749
  supportHorizontal: y,
28741
28750
  userClickCount: b,
@@ -28758,11 +28767,11 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28758
28767
  "HACK",
28759
28768
  "NAGA",
28760
28769
  "RSG"
28761
- ], e) && i ? `${e}_dark` : e, hl = ({ platformData: e, darkMode: i } = {}) => {
28770
+ ], e) && i ? `${e}_dark` : e, kl = ({ platformData: e, darkMode: i } = {}) => {
28762
28771
  const {
28763
- SubPlatformEnum: m,
28772
+ SubPlatformEnum: l,
28764
28773
  // 子平台枚舉
28765
- platformEnum: n,
28774
+ platformEnum: m,
28766
28775
  // 平台枚舉
28767
28776
  isUnderMaintenance: s,
28768
28777
  // 是否維護中
@@ -28780,10 +28789,10 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28780
28789
  // 臨時維護開始時間
28781
28790
  temp_maintenance_end_time: t
28782
28791
  // 臨時維護結束時間
28783
- } = e || {}, d = `${al}/${il}/${tl(n, i)}.png`;
28792
+ } = e || {}, d = `${al}/${il}/${tl(m, i)}.png`;
28784
28793
  return {
28785
- subPlatformEnum: m,
28786
- platformEnum: n,
28794
+ subPlatformEnum: l,
28795
+ platformEnum: m,
28787
28796
  isUnderMaintenance: s,
28788
28797
  maintenanceStartTime: u,
28789
28798
  maintenanceEndTime: f,
@@ -28821,20 +28830,21 @@ export {
28821
28830
  Dt as initMockWindowData,
28822
28831
  kt as processGameInfo,
28823
28832
  gl as processPlatformData,
28824
- ie as useApiContext,
28833
+ te as useApiContext,
28825
28834
  cl as useBalanceGetter,
28826
28835
  Ul as useClientWebSocket,
28827
- vl as useGameConfig,
28836
+ hl as useGameConfig,
28828
28837
  sl as useGameInfoContext,
28829
28838
  Nt as useGamesInfo,
28830
28839
  yl as useGetCarouseList,
28831
28840
  bl as useGetMarquee,
28832
28841
  _l as useGetMemberInfo,
28842
+ Tl as useGetRankingGame,
28833
28843
  fl as useInitializeWithToken,
28834
28844
  Xt as useLogin,
28835
28845
  $t as useLogout,
28836
- hl as usePlatformConfig,
28837
- Tl as usePlayGame,
28846
+ kl as usePlatformConfig,
28847
+ Cl as usePlayGame,
28838
28848
  el as useToggleFavoriteGame,
28839
- Cl as useUser
28849
+ vl as useUser
28840
28850
  };