@obb871001/api-integration-sdk 1.0.122 → 1.0.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.js +233 -233
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Le, { createContext as mi, useContext as ri, useCallback as V, useMemo as ta, useEffect as De, useRef as Ga } from "react";
|
|
2
2
|
import { useQuery as ie, QueryClient as at, QueryClientProvider as it, useQueries as oi, useMutation as ma } from "@tanstack/react-query";
|
|
3
3
|
import tt from "axios";
|
|
4
|
-
import { find as Ve, isEmpty as O, isObject as Ae, flatMap as Ie, isArray as
|
|
4
|
+
import { find as Ve, isEmpty as O, isObject as Ae, flatMap as Ie, isArray as ne, map as Be, 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";
|
|
6
6
|
function ot(e) {
|
|
7
7
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -11,13 +11,13 @@ 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,
|
|
14
|
+
var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, r = 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
|
|
16
|
+
var o, t = {}, d = null, l = null;
|
|
17
17
|
g !== void 0 && (d = "" + g), p.key !== void 0 && (d = "" + p.key), p.ref !== void 0 && (l = p.ref);
|
|
18
|
-
for (
|
|
19
|
-
if (_ && _.defaultProps) for (
|
|
20
|
-
return { $$typeof: i, type: _, key: d, ref: l, props: t, _owner:
|
|
18
|
+
for (o in p) n.call(p, o) && !u.hasOwnProperty(o) && (t[o] = p[o]);
|
|
19
|
+
if (_ && _.defaultProps) for (o in p = _.defaultProps, p) t[o] === void 0 && (t[o] = p[o]);
|
|
20
|
+
return { $$typeof: i, type: _, key: d, ref: l, props: t, _owner: r.current };
|
|
21
21
|
}
|
|
22
22
|
return he.Fragment = m, he.jsx = f, he.jsxs = f, he;
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ 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"),
|
|
28
|
+
var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = 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"), o = Symbol.for("react.suspense_list"), t = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), s = 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 ===
|
|
56
|
+
return !!(typeof a == "string" || typeof a == "function" || a === n || a === u || I || a === r || a === g || a === o || 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
|
|
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.
|
|
@@ -83,11 +83,11 @@ function ut() {
|
|
|
83
83
|
return "Portal";
|
|
84
84
|
case u:
|
|
85
85
|
return "Profiler";
|
|
86
|
-
case
|
|
86
|
+
case r:
|
|
87
87
|
return "StrictMode";
|
|
88
88
|
case g:
|
|
89
89
|
return "Suspense";
|
|
90
|
-
case
|
|
90
|
+
case o:
|
|
91
91
|
return "SuspenseList";
|
|
92
92
|
}
|
|
93
93
|
if (typeof a == "object")
|
|
@@ -118,7 +118,7 @@ function ut() {
|
|
|
118
118
|
function oe() {
|
|
119
119
|
}
|
|
120
120
|
oe.__reactDisabledLog = !0;
|
|
121
|
-
function
|
|
121
|
+
function le() {
|
|
122
122
|
{
|
|
123
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;
|
|
@@ -208,7 +208,7 @@ function ut() {
|
|
|
208
208
|
var G = Error.prepareStackTrace;
|
|
209
209
|
Error.prepareStackTrace = void 0;
|
|
210
210
|
var M;
|
|
211
|
-
M = ce.current, ce.current = null,
|
|
211
|
+
M = ce.current, ce.current = null, le();
|
|
212
212
|
try {
|
|
213
213
|
if (U) {
|
|
214
214
|
var N = function() {
|
|
@@ -283,7 +283,7 @@ function ut() {
|
|
|
283
283
|
switch (a) {
|
|
284
284
|
case g:
|
|
285
285
|
return _e("Suspense");
|
|
286
|
-
case
|
|
286
|
+
case o:
|
|
287
287
|
return _e("SuspenseList");
|
|
288
288
|
}
|
|
289
289
|
if (typeof a == "object")
|
|
@@ -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),
|
|
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");
|
|
@@ -628,7 +628,7 @@ function gt({
|
|
|
628
628
|
getToken: i,
|
|
629
629
|
timeoutMs: m = 15e3,
|
|
630
630
|
lng: n = "tw",
|
|
631
|
-
store:
|
|
631
|
+
store: r,
|
|
632
632
|
onError: u
|
|
633
633
|
} = {}) {
|
|
634
634
|
const f = tt.create({
|
|
@@ -641,7 +641,7 @@ function gt({
|
|
|
641
641
|
const g = await i();
|
|
642
642
|
g && (_.headers.Authorization = `Bearer ${g}`);
|
|
643
643
|
}
|
|
644
|
-
const p =
|
|
644
|
+
const p = r?.getState()?.isWalletCurrency || r?.getState()?.currency?.currentCurrency || "TWD";
|
|
645
645
|
return _.headers.Currency = p, _.headers["currency-code"] = p, _.headers.lang = n, _;
|
|
646
646
|
}), f.interceptors.response.use(
|
|
647
647
|
(_) => _.data,
|
|
@@ -656,20 +656,20 @@ const ui = mi(null), ul = () => {
|
|
|
656
656
|
);
|
|
657
657
|
return e;
|
|
658
658
|
}, pl = () => {
|
|
659
|
-
const e = (n,
|
|
659
|
+
const e = (n, r) => !n && !r, i = (n) => n.startsWith("pc.");
|
|
660
660
|
return {
|
|
661
661
|
executeLogout: ({
|
|
662
662
|
isCallBackInvalid: n = !1,
|
|
663
|
-
hostname:
|
|
663
|
+
hostname: r = "",
|
|
664
664
|
shouldRedirect: u,
|
|
665
665
|
onShowError: f,
|
|
666
666
|
onCleanup: _,
|
|
667
667
|
onRemoveToken: p,
|
|
668
668
|
onRedirect: g,
|
|
669
|
-
onGoogleLogout:
|
|
669
|
+
onGoogleLogout: o
|
|
670
670
|
}) => {
|
|
671
|
-
const t = i(
|
|
672
|
-
e(n, t) && f?.(), _?.(), p?.(), u && g?.("/"),
|
|
671
|
+
const t = i(r);
|
|
672
|
+
e(n, t) && f?.(), _?.(), p?.(), u && g?.("/"), o?.();
|
|
673
673
|
},
|
|
674
674
|
shouldShowErrorNotice: e,
|
|
675
675
|
isMachineDomain: i
|
|
@@ -682,12 +682,12 @@ const ui = mi(null), ul = () => {
|
|
|
682
682
|
platforms: i,
|
|
683
683
|
gameList: m,
|
|
684
684
|
allGameTypes: n,
|
|
685
|
-
allPlatforms:
|
|
685
|
+
allPlatforms: r
|
|
686
686
|
}) => {
|
|
687
687
|
const u = pi(n, e);
|
|
688
688
|
return u ? i.reduce((f, _) => {
|
|
689
|
-
const p = gi(
|
|
690
|
-
|
|
689
|
+
const p = gi(r, _), g = di(r, _), o = m[u] || [], t = ci(
|
|
690
|
+
o,
|
|
691
691
|
p,
|
|
692
692
|
g
|
|
693
693
|
);
|
|
@@ -698,30 +698,30 @@ const ui = mi(null), ul = () => {
|
|
|
698
698
|
gamesOfType: i = [],
|
|
699
699
|
allPlatforms: m = []
|
|
700
700
|
}) => {
|
|
701
|
-
const n = gi(m, e),
|
|
701
|
+
const n = gi(m, e), r = di(m, e), u = ci(
|
|
702
702
|
i,
|
|
703
703
|
n,
|
|
704
|
-
|
|
704
|
+
r
|
|
705
705
|
);
|
|
706
706
|
return dt(u);
|
|
707
|
-
}, ft = (e = {}) => !Ae(e) || O(e) ? [] : Ie(e), Ha = (e = []) => !
|
|
708
|
-
const
|
|
709
|
-
return
|
|
707
|
+
}, ft = (e = {}) => !Ae(e) || O(e) ? [] : Ie(e), Ha = (e = []) => !ne(e) || O(e) ? [] : Be(e, "platform"), Ut = (e = []) => !ne(e) || O(e) ? [] : Be(e, "gameTypeName"), yt = (e = []) => !ne(e) || O(e) ? [] : Be(e, "game_subtype"), bt = (e = {}) => !Ae(e) || O(e) ? [] : Ie(e), Tt = (e = [], i = []) => !ne(e) || O(e) ? {} : !ne(i) || O(i) ? {} : e.reduce((m, n) => {
|
|
708
|
+
const r = i.map((u) => u.game_subtype);
|
|
709
|
+
return r.forEach((u) => {
|
|
710
710
|
m[u] = m[u] || [];
|
|
711
|
-
}),
|
|
711
|
+
}), r.includes(n.game_subtype) && m[n.game_subtype].push(n), m;
|
|
712
712
|
}, {}), Ct = ({
|
|
713
713
|
gameTypes: e = [],
|
|
714
714
|
platforms: i = [],
|
|
715
715
|
gameList: m = {},
|
|
716
716
|
allGameTypes: n = [],
|
|
717
|
-
allPlatforms:
|
|
718
|
-
}) => !
|
|
717
|
+
allPlatforms: r = []
|
|
718
|
+
}) => !ne(e) || !ne(i) ? {} : O(m) ? {} : e.reduce((u, f) => {
|
|
719
719
|
const _ = ct({
|
|
720
720
|
gameTypeName: f,
|
|
721
721
|
platforms: i,
|
|
722
722
|
gameList: m,
|
|
723
723
|
allGameTypes: n,
|
|
724
|
-
allPlatforms:
|
|
724
|
+
allPlatforms: r
|
|
725
725
|
});
|
|
726
726
|
return O(_) || (u[f] = _), u;
|
|
727
727
|
}, {}), gl = ({
|
|
@@ -729,29 +729,29 @@ const ui = mi(null), ul = () => {
|
|
|
729
729
|
platforms: i = [],
|
|
730
730
|
allGameType: m = [],
|
|
731
731
|
allGamePlatform: n = [],
|
|
732
|
-
allGameList:
|
|
732
|
+
allGameList: r = {}
|
|
733
733
|
} = {}) => !Array.isArray(e) || !Array.isArray(i) ? {} : e.reduce((u, f) => {
|
|
734
734
|
const _ = pi(m, f);
|
|
735
735
|
if (!_) return u;
|
|
736
|
-
const p =
|
|
736
|
+
const p = r[_] || [], g = i.reduce((o, t) => {
|
|
737
737
|
const d = _t({
|
|
738
738
|
platformName: t,
|
|
739
739
|
gamesOfType: p,
|
|
740
740
|
allPlatforms: n
|
|
741
741
|
});
|
|
742
|
-
return O(d) ?
|
|
742
|
+
return O(d) ? o : { ...o, [t]: d };
|
|
743
743
|
}, {});
|
|
744
744
|
return O(g) || (u[f] = g), u;
|
|
745
|
-
}, {}), vt = (e = {}) => !Ae(e) || O(e) ? {} : Object.values(e).reduce((m, n) => (Object.entries(n).forEach(([
|
|
746
|
-
m[
|
|
745
|
+
}, {}), vt = (e = {}) => !Ae(e) || O(e) ? {} : Object.values(e).reduce((m, n) => (Object.entries(n).forEach(([r, u]) => {
|
|
746
|
+
m[r] ? m[r] = [...m[r], ...u] : m[r] = u;
|
|
747
747
|
}), m), {}), ht = (e = {}) => {
|
|
748
748
|
if (!Ae(e) || O(e)) return {};
|
|
749
749
|
const i = {};
|
|
750
750
|
for (const [m, n] of Object.entries(e)) {
|
|
751
751
|
i[m] = {};
|
|
752
|
-
for (const
|
|
753
|
-
const u =
|
|
754
|
-
i[m][u] || (i[m][u] = []), i[m][u].push(
|
|
752
|
+
for (const r of n) {
|
|
753
|
+
const u = r.game_subtype;
|
|
754
|
+
i[m][u] || (i[m][u] = []), i[m][u].push(r);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
return i;
|
|
@@ -760,15 +760,15 @@ const ui = mi(null), ul = () => {
|
|
|
760
760
|
allGamePlatform: i = [],
|
|
761
761
|
allGameType: m = [],
|
|
762
762
|
allGame_subtype: n = [],
|
|
763
|
-
allNewGameList:
|
|
763
|
+
allNewGameList: r = [],
|
|
764
764
|
allTopGameList: u = [],
|
|
765
765
|
randomlySelectedGames: f = [],
|
|
766
766
|
userFavoriteGame: _ = {},
|
|
767
767
|
exclusiveBrandGames: p = [],
|
|
768
768
|
highlightGames: g = [],
|
|
769
|
-
originPlatform:
|
|
769
|
+
originPlatform: o = []
|
|
770
770
|
}) => {
|
|
771
|
-
const t = ft(e), d = Ha(i), l = Ut(m), s = yt(n), y = Ha(
|
|
771
|
+
const t = ft(e), d = Ha(i), l = Ut(m), s = yt(n), y = Ha(o), b = bt(_), c = Ct({
|
|
772
772
|
gameTypes: l,
|
|
773
773
|
platforms: d,
|
|
774
774
|
gameList: e,
|
|
@@ -799,7 +799,7 @@ const ui = mi(null), ul = () => {
|
|
|
799
799
|
},
|
|
800
800
|
gameList: {
|
|
801
801
|
all: t,
|
|
802
|
-
new:
|
|
802
|
+
new: r,
|
|
803
803
|
top: u,
|
|
804
804
|
favorite: b,
|
|
805
805
|
highlight: g,
|
|
@@ -817,7 +817,7 @@ const ui = mi(null), ul = () => {
|
|
|
817
817
|
favorite: b
|
|
818
818
|
}
|
|
819
819
|
};
|
|
820
|
-
}, dl = (e = []) => !
|
|
820
|
+
}, dl = (e = []) => !ne(e) || O(e) ? [] : Ie(e, (i) => O(i.SubPlatformEnum) ? i : i.SubPlatformEnum.map((m) => ({
|
|
821
821
|
...i,
|
|
822
822
|
...m,
|
|
823
823
|
platform: m.SubPlatformEnum,
|
|
@@ -842,9 +842,9 @@ const ui = mi(null), ul = () => {
|
|
|
842
842
|
return e;
|
|
843
843
|
}
|
|
844
844
|
}, me = () => {
|
|
845
|
-
const { client: e } =
|
|
846
|
-
async (
|
|
847
|
-
const { mac_address: t = "", app_version: d = "", anydesk_id: l = "" } =
|
|
845
|
+
const { client: e } = te(), i = V(
|
|
846
|
+
async (o) => {
|
|
847
|
+
const { mac_address: t = "", app_version: d = "", anydesk_id: l = "" } = o, { data: s } = await e.post("/cash-register/login", {
|
|
848
848
|
mac_address: t,
|
|
849
849
|
app_version: d,
|
|
850
850
|
anydesk_id: l
|
|
@@ -852,9 +852,9 @@ const ui = mi(null), ul = () => {
|
|
|
852
852
|
return s;
|
|
853
853
|
},
|
|
854
854
|
[e]
|
|
855
|
-
), m = V(async () => e.get("/member/getMemberInfo"), [e]), n = V(async () => await e.get("/member/getGameList"), [e]),
|
|
856
|
-
async (
|
|
857
|
-
const { account: t, password: d, trans_code: l } =
|
|
855
|
+
), m = V(async () => e.get("/member/getMemberInfo"), [e]), n = V(async () => await e.get("/member/getGameList"), [e]), r = V(async () => await e.get("/member/getNowCurrencyExchange"), [e]), u = V(async () => await e.get("member/getFavoriteGame"), [e]), f = V(
|
|
856
|
+
async (o) => {
|
|
857
|
+
const { account: t, password: d, trans_code: l } = o;
|
|
858
858
|
return await e.post("/login", {
|
|
859
859
|
memId: t,
|
|
860
860
|
passwd: d,
|
|
@@ -863,8 +863,8 @@ const ui = mi(null), ul = () => {
|
|
|
863
863
|
},
|
|
864
864
|
[e]
|
|
865
865
|
), _ = V(async () => await e.post("/logout"), [e]), p = V(
|
|
866
|
-
async (
|
|
867
|
-
const { gameUid: t = "", status: d = 0 } =
|
|
866
|
+
async (o) => {
|
|
867
|
+
const { gameUid: t = "", status: d = 0 } = o;
|
|
868
868
|
return await e.put(`/member/toggleFavoriteGame/${t}`, {
|
|
869
869
|
status: d
|
|
870
870
|
});
|
|
@@ -876,7 +876,7 @@ const ui = mi(null), ul = () => {
|
|
|
876
876
|
userInfoApi: m,
|
|
877
877
|
userGameListApi: n,
|
|
878
878
|
userFavoriteGameApi: u,
|
|
879
|
-
userCurrencyExchangeApi:
|
|
879
|
+
userCurrencyExchangeApi: r,
|
|
880
880
|
userLoginApi: f,
|
|
881
881
|
userLogoutApi: _,
|
|
882
882
|
addOrRemoveFavoriteGameApi: p,
|
|
@@ -903,14 +903,14 @@ const ui = mi(null), ul = () => {
|
|
|
903
903
|
},
|
|
904
904
|
user: { favorite: [] }
|
|
905
905
|
}, Nt = ({ enabled: e = !0 } = {}) => {
|
|
906
|
-
const { getToken: i } =
|
|
906
|
+
const { getToken: i } = te(), { userFavoriteGameApi: m, userGameListApi: n } = me(), { data: r, isLoading: u, error: f, refetch: _ } = ie({
|
|
907
907
|
queryKey: ["gamesInfo"],
|
|
908
908
|
queryFn: async () => {
|
|
909
909
|
let p = {}, g = {};
|
|
910
910
|
try {
|
|
911
911
|
await i?.() && (g = await n(), p = await m());
|
|
912
|
-
} catch (
|
|
913
|
-
console.warn("Failed to fetch favorite games:",
|
|
912
|
+
} catch (o) {
|
|
913
|
+
console.warn("Failed to fetch favorite games:", o);
|
|
914
914
|
}
|
|
915
915
|
return kt({
|
|
916
916
|
allGameList: g.gameTypeGroup || window.gameTypeGroup || {},
|
|
@@ -935,7 +935,7 @@ const ui = mi(null), ul = () => {
|
|
|
935
935
|
refetchOnWindowFocus: !1
|
|
936
936
|
});
|
|
937
937
|
return {
|
|
938
|
-
gamesInfo:
|
|
938
|
+
gamesInfo: r || St,
|
|
939
939
|
isLoading: u,
|
|
940
940
|
error: f,
|
|
941
941
|
refetch: _
|
|
@@ -27483,9 +27483,9 @@ function cl({
|
|
|
27483
27483
|
autoFetchGamesInfo: i = !1,
|
|
27484
27484
|
useMockData: m = !1,
|
|
27485
27485
|
queryClient: n,
|
|
27486
|
-
...
|
|
27486
|
+
...r
|
|
27487
27487
|
}) {
|
|
27488
|
-
const u = ta(() => gt(
|
|
27488
|
+
const u = ta(() => gt(r), [r]), f = ta(
|
|
27489
27489
|
() => new at({
|
|
27490
27490
|
defaultOptions: {
|
|
27491
27491
|
queries: {
|
|
@@ -27496,10 +27496,10 @@ function cl({
|
|
|
27496
27496
|
}),
|
|
27497
27497
|
[]
|
|
27498
27498
|
), _ = n || f;
|
|
27499
|
-
return /* @__PURE__ */ ze.jsx(it, { client: _, children: /* @__PURE__ */ ze.jsx(si.Provider, { value: { client: u, ...
|
|
27499
|
+
return /* @__PURE__ */ ze.jsx(it, { client: _, children: /* @__PURE__ */ ze.jsx(si.Provider, { value: { client: u, ...r }, children: /* @__PURE__ */ ze.jsx(Et, { autoFetch: i, mockData: m, children: e }) }) });
|
|
27500
27500
|
}
|
|
27501
27501
|
const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
27502
|
-
const { userCurrencyExchangeApi: m } = me(), { getToken: n } =
|
|
27502
|
+
const { userCurrencyExchangeApi: m } = me(), { getToken: n } = te(), { enabled: r, ...u } = i, _ = !!n?.() && (r ? r.every((p) => p) : !0);
|
|
27503
27503
|
return oi({
|
|
27504
27504
|
queries: [
|
|
27505
27505
|
{
|
|
@@ -27517,14 +27517,14 @@ const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27517
27517
|
trigger: i = [],
|
|
27518
27518
|
enabled: m = !0
|
|
27519
27519
|
} = {}) => {
|
|
27520
|
-
const { getToken: n } =
|
|
27520
|
+
const { getToken: n } = te(), r = n?.(), { 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: !!
|
|
27527
|
+
enabled: !!r && m
|
|
27528
27528
|
}
|
|
27529
27529
|
]
|
|
27530
27530
|
});
|
|
@@ -27533,7 +27533,7 @@ const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27533
27533
|
userInfoApi: i,
|
|
27534
27534
|
userFavoriteGameApi: m,
|
|
27535
27535
|
userGameListApi: n,
|
|
27536
|
-
userCurrencyExchangeApi:
|
|
27536
|
+
userCurrencyExchangeApi: r
|
|
27537
27537
|
} = me(), u = ie({
|
|
27538
27538
|
queryKey: ["getMemInfo"],
|
|
27539
27539
|
queryFn: async () => i(),
|
|
@@ -27548,7 +27548,7 @@ const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27548
27548
|
enabled: e && u.isSuccess && f.isSuccess
|
|
27549
27549
|
}), p = ie({
|
|
27550
27550
|
queryKey: ["getUserCurrencyExchange"],
|
|
27551
|
-
queryFn: async () =>
|
|
27551
|
+
queryFn: async () => r(),
|
|
27552
27552
|
enabled: e && u.isSuccess && f.isSuccess && _.isSuccess
|
|
27553
27553
|
});
|
|
27554
27554
|
return [
|
|
@@ -27575,14 +27575,14 @@ function j() {
|
|
|
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
27577
|
})(n || (e.ReadyState = n = {}));
|
|
27578
|
-
var
|
|
27578
|
+
var r = function() {
|
|
27579
27579
|
try {
|
|
27580
27580
|
return "EventSource" in globalThis;
|
|
27581
27581
|
} catch {
|
|
27582
27582
|
return !1;
|
|
27583
27583
|
}
|
|
27584
27584
|
};
|
|
27585
|
-
e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative &&
|
|
27585
|
+
e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && r();
|
|
27586
27586
|
})($e)), $e;
|
|
27587
27587
|
}
|
|
27588
27588
|
var Se = {}, ea = {}, Fa;
|
|
@@ -27603,30 +27603,30 @@ 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;
|
|
27606
|
-
var e = j(), i = function(
|
|
27607
|
-
if (
|
|
27608
|
-
var u = /^https|wss/.test(
|
|
27606
|
+
var e = j(), i = function(r) {
|
|
27607
|
+
if (r) {
|
|
27608
|
+
var u = /^https|wss/.test(r), f = r.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = f.replace(/\/$/, ""), p = u ? "wss" : "ws";
|
|
27609
27609
|
return "".concat(p, "://").concat(_).concat(e.SOCKET_IO_PATH);
|
|
27610
|
-
} else if (
|
|
27610
|
+
} else if (r === "") {
|
|
27611
27611
|
var u = /^https/.test(window.location.protocol), p = u ? "wss" : "ws", g = window.location.port ? ":".concat(window.location.port) : "";
|
|
27612
27612
|
return "".concat(p, "://").concat(window.location.hostname).concat(g).concat(e.SOCKET_IO_PATH);
|
|
27613
27613
|
}
|
|
27614
|
-
return
|
|
27614
|
+
return r;
|
|
27615
27615
|
};
|
|
27616
27616
|
$.parseSocketIOUrl = i;
|
|
27617
|
-
var m = function(
|
|
27617
|
+
var m = function(r, u) {
|
|
27618
27618
|
u === void 0 && (u = {});
|
|
27619
|
-
var f = /\?([\w]+=[\w]+)/, _ = f.test(
|
|
27620
|
-
var t =
|
|
27619
|
+
var f = /\?([\w]+=[\w]+)/, _ = f.test(r), p = "".concat(Object.entries(u).reduce(function(g, o) {
|
|
27620
|
+
var t = o[0], d = o[1];
|
|
27621
27621
|
return g + "".concat(t, "=").concat(d, "&");
|
|
27622
27622
|
}, "").slice(0, -1));
|
|
27623
|
-
return "".concat(
|
|
27623
|
+
return "".concat(r).concat(_ ? "&" : "?").concat(p);
|
|
27624
27624
|
};
|
|
27625
27625
|
$.appendQueryParams = m;
|
|
27626
|
-
var n = function(
|
|
27626
|
+
var n = function(r, u) {
|
|
27627
27627
|
u === void 0 && (u = e.SOCKET_IO_PING_INTERVAL);
|
|
27628
27628
|
var f = function() {
|
|
27629
|
-
return
|
|
27629
|
+
return r(e.SOCKET_IO_PING_CODE);
|
|
27630
27630
|
};
|
|
27631
27631
|
return window.setInterval(f, u);
|
|
27632
27632
|
};
|
|
@@ -27638,14 +27638,14 @@ function _i() {
|
|
|
27638
27638
|
Ja = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.heartbeat = m;
|
|
27639
27639
|
var e = j();
|
|
27640
27640
|
function i(n) {
|
|
27641
|
-
return Array.isArray(n) ? n.reduce(function(
|
|
27642
|
-
return
|
|
27641
|
+
return Array.isArray(n) ? n.reduce(function(r, u) {
|
|
27642
|
+
return r.current > u.current ? r : u;
|
|
27643
27643
|
}).current : n.current;
|
|
27644
27644
|
}
|
|
27645
|
-
function m(n,
|
|
27646
|
-
var f = u || {}, _ = f.interval, p = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, g = f.timeout,
|
|
27647
|
-
var b = Date.now(), c = i(
|
|
27648
|
-
if (c +
|
|
27645
|
+
function m(n, r, u) {
|
|
27646
|
+
var f = u || {}, _ = f.interval, p = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, g = f.timeout, o = 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), s = Date.now(), y = setInterval(function() {
|
|
27647
|
+
var b = Date.now(), c = i(r);
|
|
27648
|
+
if (c + o <= b)
|
|
27649
27649
|
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - s, "ms ago")), n.close();
|
|
27650
27650
|
else if (c + p <= b && s + p <= b)
|
|
27651
27651
|
try {
|
|
@@ -27669,11 +27669,11 @@ function ua() {
|
|
|
27669
27669
|
return (0, e.hasSubscribers)(p) ? Array.from(i[p]) : m;
|
|
27670
27670
|
};
|
|
27671
27671
|
e.getSubscribers = n;
|
|
27672
|
-
var
|
|
27672
|
+
var r = function(p) {
|
|
27673
27673
|
var g;
|
|
27674
27674
|
return ((g = i[p]) === null || g === void 0 ? void 0 : g.size) > 0;
|
|
27675
27675
|
};
|
|
27676
|
-
e.hasSubscribers =
|
|
27676
|
+
e.hasSubscribers = r;
|
|
27677
27677
|
var u = function(p, g) {
|
|
27678
27678
|
i[p] = i[p] || /* @__PURE__ */ new Set(), i[p].add(g);
|
|
27679
27679
|
};
|
|
@@ -27697,12 +27697,12 @@ function pa() {
|
|
|
27697
27697
|
if (Za) return Ne;
|
|
27698
27698
|
Za = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.assertIsWebSocket = m, Ne.resetGlobalState = n;
|
|
27699
27699
|
var e = oa(), i = ua();
|
|
27700
|
-
function m(
|
|
27701
|
-
if (!u && !(
|
|
27700
|
+
function m(r, u) {
|
|
27701
|
+
if (!u && !(r instanceof WebSocket))
|
|
27702
27702
|
throw new Error("");
|
|
27703
27703
|
}
|
|
27704
|
-
function n(
|
|
27705
|
-
(0, i.resetSubscribers)(
|
|
27704
|
+
function n(r) {
|
|
27705
|
+
(0, i.resetSubscribers)(r), (0, e.resetWebSockets)(r);
|
|
27706
27706
|
}
|
|
27707
27707
|
return Ne;
|
|
27708
27708
|
}
|
|
@@ -27711,34 +27711,34 @@ function Lt() {
|
|
|
27711
27711
|
if (Va) return pe;
|
|
27712
27712
|
Va = 1;
|
|
27713
27713
|
var e = pe && pe.__assign || function() {
|
|
27714
|
-
return e = Object.assign || function(
|
|
27714
|
+
return e = Object.assign || function(o) {
|
|
27715
27715
|
for (var t, d = 1, l = arguments.length; d < l; d++) {
|
|
27716
27716
|
t = arguments[d];
|
|
27717
|
-
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (
|
|
27717
|
+
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (o[s] = t[s]);
|
|
27718
27718
|
}
|
|
27719
|
-
return
|
|
27719
|
+
return o;
|
|
27720
27720
|
}, e.apply(this, arguments);
|
|
27721
27721
|
};
|
|
27722
27722
|
Object.defineProperty(pe, "__esModule", { value: !0 }), pe.attachListeners = void 0;
|
|
27723
|
-
var i = sa(), m = _i(), n = j(),
|
|
27724
|
-
|
|
27723
|
+
var i = sa(), m = _i(), n = j(), r = pa(), u = function(o, t, d, l) {
|
|
27724
|
+
o.onmessage = function(s) {
|
|
27725
27725
|
var y;
|
|
27726
27726
|
t.current.onMessage && t.current.onMessage(s), typeof l?.current == "number" && (l.current = Date.now()), !(typeof t.current.filter == "function" && t.current.filter(s) !== !0) && (t.current.heartbeat && typeof t.current.heartbeat != "boolean" && ((y = t.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === s.data || d(s));
|
|
27727
27727
|
};
|
|
27728
|
-
}, f = function(
|
|
27729
|
-
|
|
27730
|
-
if (t.current.onOpen && t.current.onOpen(y), l.current = 0, d(n.ReadyState.OPEN), t.current.heartbeat &&
|
|
27728
|
+
}, f = function(o, t, d, l, s) {
|
|
27729
|
+
o.onopen = function(y) {
|
|
27730
|
+
if (t.current.onOpen && t.current.onOpen(y), l.current = 0, d(n.ReadyState.OPEN), t.current.heartbeat && o instanceof WebSocket) {
|
|
27731
27731
|
var b = typeof t.current.heartbeat == "boolean" ? void 0 : t.current.heartbeat;
|
|
27732
|
-
s.current = Date.now(), (0, m.heartbeat)(
|
|
27732
|
+
s.current = Date.now(), (0, m.heartbeat)(o, s, b);
|
|
27733
27733
|
}
|
|
27734
27734
|
};
|
|
27735
|
-
}, _ = function(
|
|
27736
|
-
if (n.isEventSourceSupported &&
|
|
27735
|
+
}, _ = function(o, t, d, l, s) {
|
|
27736
|
+
if (n.isEventSourceSupported && o instanceof EventSource)
|
|
27737
27737
|
return function() {
|
|
27738
27738
|
};
|
|
27739
|
-
(0,
|
|
27739
|
+
(0, r.assertIsWebSocket)(o, t.current.skipAssert);
|
|
27740
27740
|
var y;
|
|
27741
|
-
return
|
|
27741
|
+
return o.onclose = function(b) {
|
|
27742
27742
|
var c;
|
|
27743
27743
|
if (t.current.onClose && t.current.onClose(b), d(n.ReadyState.CLOSED), t.current.shouldReconnect && t.current.shouldReconnect(b)) {
|
|
27744
27744
|
var T = (c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT;
|
|
@@ -27753,11 +27753,11 @@ function Lt() {
|
|
|
27753
27753
|
}, function() {
|
|
27754
27754
|
return y && window.clearTimeout(y);
|
|
27755
27755
|
};
|
|
27756
|
-
}, p = function(
|
|
27756
|
+
}, p = function(o, t, d, l, s) {
|
|
27757
27757
|
var y;
|
|
27758
|
-
return
|
|
27758
|
+
return o.onerror = function(b) {
|
|
27759
27759
|
var c;
|
|
27760
|
-
if (t.current.onError && t.current.onError(b), n.isEventSourceSupported &&
|
|
27760
|
+
if (t.current.onError && t.current.onError(b), n.isEventSourceSupported && o 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), o.close()), t.current.retryOnError)
|
|
27761
27761
|
if (s.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT)) {
|
|
27762
27762
|
var T = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(s.current) : t.current.reconnectInterval;
|
|
27763
27763
|
y = window.setTimeout(function() {
|
|
@@ -27768,10 +27768,10 @@ function Lt() {
|
|
|
27768
27768
|
}, function() {
|
|
27769
27769
|
return y && window.clearTimeout(y);
|
|
27770
27770
|
};
|
|
27771
|
-
}, g = function(
|
|
27771
|
+
}, g = function(o, t, d, l, s, 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(
|
|
27774
|
-
T(n.ReadyState.CLOSING), E(), v(),
|
|
27773
|
+
return d.current.fromSocketIO && (S = (0, i.setUpSocketIOPing)(b)), u(o, d, c, y), f(o, d, T, s, y), E = _(o, d, T, l, s), v = p(o, d, T, l, s), function() {
|
|
27774
|
+
T(n.ReadyState.CLOSING), E(), v(), o.close(), S && clearInterval(S);
|
|
27775
27775
|
};
|
|
27776
27776
|
};
|
|
27777
27777
|
return pe.attachListeners = g, pe;
|
|
@@ -27790,7 +27790,7 @@ function Gt() {
|
|
|
27790
27790
|
}, e.apply(this, arguments);
|
|
27791
27791
|
};
|
|
27792
27792
|
Object.defineProperty(ge, "__esModule", { value: !0 }), ge.attachSharedListeners = void 0;
|
|
27793
|
-
var i = oa(), m = j(), n = ua(),
|
|
27793
|
+
var i = oa(), m = j(), n = ua(), r = sa(), u = _i(), f = function(t, d, l) {
|
|
27794
27794
|
t.onmessage = function(s) {
|
|
27795
27795
|
(0, n.getSubscribers)(d).forEach(function(y) {
|
|
27796
27796
|
var b;
|
|
@@ -27830,53 +27830,53 @@ function Gt() {
|
|
|
27830
27830
|
s.optionsRef.current.onError && s.optionsRef.current.onError(l), m.isEventSourceSupported && t instanceof EventSource && (s.optionsRef.current.onClose && s.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), s.setReadyState(m.ReadyState.CLOSED));
|
|
27831
27831
|
}), m.isEventSourceSupported && t instanceof EventSource && t.close();
|
|
27832
27832
|
};
|
|
27833
|
-
},
|
|
27833
|
+
}, o = function(t, d, l, s) {
|
|
27834
27834
|
var y;
|
|
27835
|
-
return l.current.fromSocketIO && (y = (0,
|
|
27835
|
+
return l.current.fromSocketIO && (y = (0, r.setUpSocketIOPing)(s)), f(t, d, l.current.heartbeat), p(t, d), _(t, d, l.current.heartbeat), g(t, d), function() {
|
|
27836
27836
|
y && clearInterval(y);
|
|
27837
27837
|
};
|
|
27838
27838
|
};
|
|
27839
|
-
return ge.attachSharedListeners =
|
|
27839
|
+
return ge.attachSharedListeners = o, 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(),
|
|
27845
|
+
var e = oa(), i = j(), m = Lt(), n = Gt(), r = ua(), u = function(_, p, g, o, t) {
|
|
27846
27846
|
return function() {
|
|
27847
|
-
if ((0,
|
|
27847
|
+
if ((0, r.removeSubscriber)(_, p), !(0, r.hasSubscribers)(_)) {
|
|
27848
27848
|
try {
|
|
27849
27849
|
var d = e.sharedWebSockets[_];
|
|
27850
27850
|
d instanceof WebSocket && (d.onclose = function(l) {
|
|
27851
|
-
g.current.onClose && g.current.onClose(l),
|
|
27851
|
+
g.current.onClose && g.current.onClose(l), o(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,
|
|
27859
|
-
if (!i.isEventSourceSupported &&
|
|
27858
|
+
}, f = function(_, p, g, o, t, d, l, s, y) {
|
|
27859
|
+
if (!i.isEventSourceSupported && o.current.eventSourceOptions)
|
|
27860
27860
|
throw i.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
|
|
27861
|
-
if (
|
|
27861
|
+
if (o.current.share) {
|
|
27862
27862
|
var b = null;
|
|
27863
|
-
e.sharedWebSockets[p] === void 0 ? (e.sharedWebSockets[p] =
|
|
27863
|
+
e.sharedWebSockets[p] === void 0 ? (e.sharedWebSockets[p] = o.current.eventSourceOptions ? new EventSource(p, o.current.eventSourceOptions) : new WebSocket(p, o.current.protocols), _.current = e.sharedWebSockets[p], g(i.ReadyState.CONNECTING), b = (0, n.attachSharedListeners)(e.sharedWebSockets[p], p, o, y)) : (_.current = e.sharedWebSockets[p], g(e.sharedWebSockets[p].readyState));
|
|
27864
27864
|
var c = {
|
|
27865
27865
|
setLastMessage: t,
|
|
27866
27866
|
setReadyState: g,
|
|
27867
|
-
optionsRef:
|
|
27867
|
+
optionsRef: o,
|
|
27868
27868
|
reconnectCount: l,
|
|
27869
27869
|
lastMessageTime: s,
|
|
27870
27870
|
reconnect: d
|
|
27871
27871
|
};
|
|
27872
|
-
return (0,
|
|
27872
|
+
return (0, r.addSubscriber)(p, c), u(p, c, o, g, b);
|
|
27873
27873
|
} else {
|
|
27874
|
-
if (_.current =
|
|
27874
|
+
if (_.current = o.current.eventSourceOptions ? new EventSource(p, o.current.eventSourceOptions) : new WebSocket(p, o.current.protocols), g(i.ReadyState.CONNECTING), !_.current)
|
|
27875
27875
|
throw new Error("WebSocket failed to be created");
|
|
27876
27876
|
return (0, m.attachListeners)(_.current, {
|
|
27877
27877
|
setLastMessage: t,
|
|
27878
27878
|
setReadyState: g
|
|
27879
|
-
},
|
|
27879
|
+
}, o, d.current, l, s, y);
|
|
27880
27880
|
}
|
|
27881
27881
|
};
|
|
27882
27882
|
return Se.createOrJoinSocket = f, Se;
|
|
@@ -27884,13 +27884,13 @@ function Mt() {
|
|
|
27884
27884
|
var ee = {}, Ba;
|
|
27885
27885
|
function Rt() {
|
|
27886
27886
|
return Ba || (Ba = 1, (function(e) {
|
|
27887
|
-
var i = ee && ee.__awaiter || function(p, g,
|
|
27887
|
+
var i = ee && ee.__awaiter || function(p, g, o, t) {
|
|
27888
27888
|
function d(l) {
|
|
27889
|
-
return l instanceof
|
|
27889
|
+
return l instanceof o ? l : new o(function(s) {
|
|
27890
27890
|
s(l);
|
|
27891
27891
|
});
|
|
27892
27892
|
}
|
|
27893
|
-
return new (
|
|
27893
|
+
return new (o || (o = Promise))(function(l, s) {
|
|
27894
27894
|
function y(T) {
|
|
27895
27895
|
try {
|
|
27896
27896
|
c(t.next(T));
|
|
@@ -27911,7 +27911,7 @@ function Rt() {
|
|
|
27911
27911
|
c((t = t.apply(p, g || [])).next());
|
|
27912
27912
|
});
|
|
27913
27913
|
}, m = ee && ee.__generator || function(p, g) {
|
|
27914
|
-
var
|
|
27914
|
+
var o = { label: 0, sent: function() {
|
|
27915
27915
|
if (l[0] & 1) throw l[1];
|
|
27916
27916
|
return l[1];
|
|
27917
27917
|
}, trys: [], ops: [] }, t, d, l, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
@@ -27925,7 +27925,7 @@ function Rt() {
|
|
|
27925
27925
|
}
|
|
27926
27926
|
function b(c) {
|
|
27927
27927
|
if (t) throw new TypeError("Generator is already executing.");
|
|
27928
|
-
for (; s && (s = 0, c[0] && (
|
|
27928
|
+
for (; s && (s = 0, c[0] && (o = 0)), o; ) try {
|
|
27929
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
27930
|
switch (d = 0, l && (c = [c[0] & 2, l.value]), c[0]) {
|
|
27931
27931
|
case 0:
|
|
@@ -27933,34 +27933,34 @@ function Rt() {
|
|
|
27933
27933
|
l = c;
|
|
27934
27934
|
break;
|
|
27935
27935
|
case 4:
|
|
27936
|
-
return
|
|
27936
|
+
return o.label++, { value: c[1], done: !1 };
|
|
27937
27937
|
case 5:
|
|
27938
|
-
|
|
27938
|
+
o.label++, d = c[1], c = [0];
|
|
27939
27939
|
continue;
|
|
27940
27940
|
case 7:
|
|
27941
|
-
c =
|
|
27941
|
+
c = o.ops.pop(), o.trys.pop();
|
|
27942
27942
|
continue;
|
|
27943
27943
|
default:
|
|
27944
|
-
if (l =
|
|
27945
|
-
|
|
27944
|
+
if (l = o.trys, !(l = l.length > 0 && l[l.length - 1]) && (c[0] === 6 || c[0] === 2)) {
|
|
27945
|
+
o = 0;
|
|
27946
27946
|
continue;
|
|
27947
27947
|
}
|
|
27948
27948
|
if (c[0] === 3 && (!l || c[1] > l[0] && c[1] < l[3])) {
|
|
27949
|
-
|
|
27949
|
+
o.label = c[1];
|
|
27950
27950
|
break;
|
|
27951
27951
|
}
|
|
27952
|
-
if (c[0] === 6 &&
|
|
27953
|
-
|
|
27952
|
+
if (c[0] === 6 && o.label < l[1]) {
|
|
27953
|
+
o.label = l[1], l = c;
|
|
27954
27954
|
break;
|
|
27955
27955
|
}
|
|
27956
|
-
if (l &&
|
|
27957
|
-
|
|
27956
|
+
if (l && o.label < l[2]) {
|
|
27957
|
+
o.label = l[2], o.ops.push(c);
|
|
27958
27958
|
break;
|
|
27959
27959
|
}
|
|
27960
|
-
l[2] &&
|
|
27960
|
+
l[2] && o.ops.pop(), o.trys.pop();
|
|
27961
27961
|
continue;
|
|
27962
27962
|
}
|
|
27963
|
-
c = g.call(p,
|
|
27963
|
+
c = g.call(p, o);
|
|
27964
27964
|
} catch (T) {
|
|
27965
27965
|
c = [6, T], d = 0;
|
|
27966
27966
|
} finally {
|
|
@@ -27969,20 +27969,20 @@ function Rt() {
|
|
|
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,
|
|
27973
|
-
if (
|
|
27972
|
+
}, n = ee && ee.__spreadArray || function(p, g, o) {
|
|
27973
|
+
if (o || arguments.length === 2) for (var t = 0, d = g.length, l; t < d; t++)
|
|
27974
27974
|
(l || !(t in g)) && (l || (l = Array.prototype.slice.call(g, 0, t)), l[t] = g[t]);
|
|
27975
27975
|
return p.concat(l || Array.prototype.slice.call(g));
|
|
27976
27976
|
};
|
|
27977
27977
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
|
|
27978
|
-
var
|
|
27978
|
+
var r = sa(), u = j(), f = function(p) {
|
|
27979
27979
|
return new Promise(function(g) {
|
|
27980
27980
|
return window.setTimeout(g, p);
|
|
27981
27981
|
});
|
|
27982
27982
|
}, _ = function(p, g) {
|
|
27983
|
-
for (var
|
|
27984
|
-
|
|
27985
|
-
return i(void 0, n([p, g],
|
|
27983
|
+
for (var o = [], t = 2; t < arguments.length; t++)
|
|
27984
|
+
o[t - 2] = arguments[t];
|
|
27985
|
+
return i(void 0, n([p, g], o, !0), void 0, function(d, l, s) {
|
|
27986
27986
|
var y, b, c, T, S, E, v, D;
|
|
27987
27987
|
return s === void 0 && (s = 0), m(this, function(L) {
|
|
27988
27988
|
switch (L.label) {
|
|
@@ -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,
|
|
28013
|
+
return T = l.current.fromSocketIO ? (0, r.parseSocketIOUrl)(y) : y, S = l.current.queryParams ? (0, r.appendQueryParams)(T, l.current.queryParams) : T, [2, S];
|
|
28014
28014
|
}
|
|
28015
28015
|
});
|
|
28016
28016
|
});
|
|
@@ -28024,13 +28024,13 @@ function Pt() {
|
|
|
28024
28024
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
|
|
28025
28025
|
var i = function(m, n) {
|
|
28026
28026
|
return new Proxy(m, {
|
|
28027
|
-
get: function(
|
|
28028
|
-
var f =
|
|
28027
|
+
get: function(r, u) {
|
|
28028
|
+
var f = r[u];
|
|
28029
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() {
|
|
28030
28030
|
}) : f;
|
|
28031
28031
|
},
|
|
28032
|
-
set: function(
|
|
28033
|
-
return /^on/.test(u) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (
|
|
28032
|
+
set: function(r, u, f) {
|
|
28033
|
+
return /^on/.test(u) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (r[u] = f, !0);
|
|
28034
28034
|
}
|
|
28035
28035
|
});
|
|
28036
28036
|
};
|
|
@@ -28138,9 +28138,9 @@ function ga() {
|
|
|
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
|
|
28141
|
+
var r = Le, u = rt, f = j(), _ = Mt(), p = Rt(), g = n(Pt()), o = pa(), t = function(d, l, s) {
|
|
28142
28142
|
l === void 0 && (l = f.DEFAULT_OPTIONS), s === void 0 && (s = !0);
|
|
28143
|
-
var y = (0,
|
|
28143
|
+
var y = (0, r.useState)(null), b = y[0], c = y[1], T = (0, r.useState)({}), S = T[0], E = T[1], v = (0, r.useMemo)(function() {
|
|
28144
28144
|
if (!l.disableJson && b)
|
|
28145
28145
|
try {
|
|
28146
28146
|
return JSON.parse(b.data);
|
|
@@ -28148,26 +28148,26 @@ function ga() {
|
|
|
28148
28148
|
return f.UNPARSABLE_JSON_OBJECT;
|
|
28149
28149
|
}
|
|
28150
28150
|
return null;
|
|
28151
|
-
}, [b, l.disableJson]), D = (0,
|
|
28152
|
-
}), Q = (0,
|
|
28151
|
+
}, [b, l.disableJson]), D = (0, r.useRef)(null), L = (0, r.useRef)(null), I = (0, r.useRef)(function() {
|
|
28152
|
+
}), Q = (0, r.useRef)(0), Te = (0, r.useRef)(Date.now()), Ge = (0, r.useRef)([]), B = (0, r.useRef)(null), w = (0, r.useRef)(l);
|
|
28153
28153
|
w.current = l;
|
|
28154
|
-
var A = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && s === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, re = l.queryParams ? JSON.stringify(l.queryParams) : null, q = (0,
|
|
28154
|
+
var A = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && s === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, re = l.queryParams ? JSON.stringify(l.queryParams) : null, q = (0, r.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");
|
|
28158
28158
|
return;
|
|
28159
28159
|
}
|
|
28160
|
-
((Y = L.current) === null || Y === void 0 ? void 0 : Y.readyState) === f.ReadyState.OPEN ? ((0,
|
|
28161
|
-
}, []), Me = (0,
|
|
28160
|
+
((Y = L.current) === null || Y === void 0 ? void 0 : Y.readyState) === f.ReadyState.OPEN ? ((0, o.assertIsWebSocket)(L.current, w.current.skipAssert), L.current.send(x)) : F && Ge.current.push(x);
|
|
28161
|
+
}, []), Me = (0, r.useCallback)(function(x, F) {
|
|
28162
28162
|
F === void 0 && (F = !0), q(JSON.stringify(x), F);
|
|
28163
|
-
}, [q]), Re = (0,
|
|
28164
|
-
return w.current.share !== !0 || f.isEventSourceSupported && L.current instanceof EventSource ? L.current : (B.current === null && L.current && ((0,
|
|
28163
|
+
}, [q]), Re = (0, r.useCallback)(function() {
|
|
28164
|
+
return w.current.share !== !0 || f.isEventSourceSupported && L.current instanceof EventSource ? L.current : (B.current === null && L.current && ((0, o.assertIsWebSocket)(L.current, w.current.skipAssert), B.current = (0, g.default)(L.current, I)), B.current);
|
|
28165
28165
|
}, []);
|
|
28166
|
-
return (0,
|
|
28166
|
+
return (0, r.useEffect)(function() {
|
|
28167
28167
|
if (d !== null && s === !0) {
|
|
28168
28168
|
var x, F = !1, Y = !0, Ce = function() {
|
|
28169
28169
|
return i(void 0, void 0, void 0, function() {
|
|
28170
|
-
var oe,
|
|
28170
|
+
var oe, le, Pe;
|
|
28171
28171
|
return m(this, function(ce) {
|
|
28172
28172
|
switch (ce.label) {
|
|
28173
28173
|
case 0:
|
|
@@ -28180,7 +28180,7 @@ function ga() {
|
|
|
28180
28180
|
}), [
|
|
28181
28181
|
2
|
|
28182
28182
|
/*return*/
|
|
28183
|
-
]) : (
|
|
28183
|
+
]) : (le = function(X) {
|
|
28184
28184
|
F || (0, u.flushSync)(function() {
|
|
28185
28185
|
return c(X);
|
|
28186
28186
|
});
|
|
@@ -28191,7 +28191,7 @@ function ga() {
|
|
|
28191
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,
|
|
28194
|
+
}, Y && (x = (0, _.createOrJoinSocket)(L, D.current, Pe, w, le, I, Q, Te, q)), [
|
|
28195
28195
|
2
|
|
28196
28196
|
/*return*/
|
|
28197
28197
|
]);
|
|
@@ -28205,10 +28205,10 @@ function ga() {
|
|
|
28205
28205
|
F = !0, Y = !1, B.current && (B.current = null), x?.(), c(null);
|
|
28206
28206
|
};
|
|
28207
28207
|
} else (d === null || s === !1) && (Q.current = 0, E(function(oe) {
|
|
28208
|
-
var
|
|
28209
|
-
return e(e({}, oe), D.current && (
|
|
28208
|
+
var le;
|
|
28209
|
+
return e(e({}, oe), D.current && (le = {}, le[D.current] = f.ReadyState.CLOSED, le));
|
|
28210
28210
|
}));
|
|
28211
|
-
}, [d, s, re, q]), (0,
|
|
28211
|
+
}, [d, s, re, q]), (0, r.useEffect)(function() {
|
|
28212
28212
|
A === f.ReadyState.OPEN && Ge.current.splice(0).forEach(function(x) {
|
|
28213
28213
|
q(x);
|
|
28214
28214
|
});
|
|
@@ -28229,7 +28229,7 @@ function xt() {
|
|
|
28229
28229
|
Qa = 1;
|
|
28230
28230
|
var e = de && de.__assign || function() {
|
|
28231
28231
|
return e = Object.assign || function(_) {
|
|
28232
|
-
for (var p, g = 1,
|
|
28232
|
+
for (var p, g = 1, o = arguments.length; g < o; g++) {
|
|
28233
28233
|
p = arguments[g];
|
|
28234
28234
|
for (var t in p) Object.prototype.hasOwnProperty.call(p, t) && (_[t] = p[t]);
|
|
28235
28235
|
}
|
|
@@ -28237,25 +28237,25 @@ function xt() {
|
|
|
28237
28237
|
}, e.apply(this, arguments);
|
|
28238
28238
|
};
|
|
28239
28239
|
Object.defineProperty(de, "__esModule", { value: !0 }), de.useSocketIO = void 0;
|
|
28240
|
-
var i = Le, m = ga(), n = j(),
|
|
28240
|
+
var i = Le, m = ga(), n = j(), r = {
|
|
28241
28241
|
type: "empty",
|
|
28242
28242
|
payload: null
|
|
28243
28243
|
}, u = function(_) {
|
|
28244
28244
|
if (!_ || !_.data)
|
|
28245
|
-
return
|
|
28245
|
+
return r;
|
|
28246
28246
|
var p = _.data.match(/\[.*]/);
|
|
28247
28247
|
if (!p)
|
|
28248
|
-
return
|
|
28248
|
+
return r;
|
|
28249
28249
|
var g = JSON.parse(p);
|
|
28250
|
-
return !Array.isArray(g) || !g[1] ?
|
|
28250
|
+
return !Array.isArray(g) || !g[1] ? r : {
|
|
28251
28251
|
type: g[0],
|
|
28252
28252
|
payload: g[1]
|
|
28253
28253
|
};
|
|
28254
28254
|
}, f = function(_, p, g) {
|
|
28255
28255
|
p === void 0 && (p = n.DEFAULT_OPTIONS), g === void 0 && (g = !0);
|
|
28256
|
-
var
|
|
28256
|
+
var o = (0, i.useMemo)(function() {
|
|
28257
28257
|
return e(e({}, p), { fromSocketIO: !0 });
|
|
28258
|
-
}, []), t = (0, m.useWebSocket)(_,
|
|
28258
|
+
}, []), t = (0, m.useWebSocket)(_, o, g), d = t.sendMessage, l = t.sendJsonMessage, s = t.lastMessage, y = t.readyState, b = t.getWebSocket, c = (0, i.useMemo)(function() {
|
|
28259
28259
|
return u(s);
|
|
28260
28260
|
}, [s]);
|
|
28261
28261
|
return {
|
|
@@ -28277,7 +28277,7 @@ function Ot() {
|
|
|
28277
28277
|
return e = Object.assign || function(f) {
|
|
28278
28278
|
for (var _, p = 1, g = arguments.length; p < g; p++) {
|
|
28279
28279
|
_ = arguments[p];
|
|
28280
|
-
for (var
|
|
28280
|
+
for (var o in _) Object.prototype.hasOwnProperty.call(_, o) && (f[o] = _[o]);
|
|
28281
28281
|
}
|
|
28282
28282
|
return f;
|
|
28283
28283
|
}, e.apply(this, arguments);
|
|
@@ -28285,19 +28285,19 @@ function Ot() {
|
|
|
28285
28285
|
var p = {};
|
|
28286
28286
|
for (var g in f) Object.prototype.hasOwnProperty.call(f, g) && _.indexOf(g) < 0 && (p[g] = f[g]);
|
|
28287
28287
|
if (f != null && typeof Object.getOwnPropertySymbols == "function")
|
|
28288
|
-
for (var
|
|
28289
|
-
_.indexOf(g[
|
|
28288
|
+
for (var o = 0, g = Object.getOwnPropertySymbols(f); o < g.length; o++)
|
|
28289
|
+
_.indexOf(g[o]) < 0 && Object.prototype.propertyIsEnumerable.call(f, g[o]) && (p[g[o]] = f[g[o]]);
|
|
28290
28290
|
return p;
|
|
28291
28291
|
};
|
|
28292
28292
|
Object.defineProperty(ae, "__esModule", { value: !0 }), ae.useEventSource = void 0;
|
|
28293
|
-
var m = Le, n = ga(),
|
|
28294
|
-
_ === void 0 && (_ =
|
|
28295
|
-
var g = _.withCredentials,
|
|
28293
|
+
var m = Le, n = ga(), r = j(), u = function(f, _, p) {
|
|
28294
|
+
_ === void 0 && (_ = r.DEFAULT_EVENT_SOURCE_OPTIONS);
|
|
28295
|
+
var g = _.withCredentials, o = _.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)(
|
|
28300
|
-
|
|
28299
|
+
} }), l = (0, m.useRef)(r.EMPTY_EVENT_HANDLERS);
|
|
28300
|
+
o && (l.current = o);
|
|
28301
28301
|
var s = (0, n.useWebSocket)(f, d, p), y = s.lastMessage, b = s.readyState, c = s.getWebSocket;
|
|
28302
28302
|
return (0, m.useEffect)(function() {
|
|
28303
28303
|
y?.type && Object.entries(l.current).forEach(function(T) {
|
|
@@ -28328,9 +28328,9 @@ function Ht() {
|
|
|
28328
28328
|
Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
|
|
28329
28329
|
return n.ReadyState;
|
|
28330
28330
|
} });
|
|
28331
|
-
var
|
|
28331
|
+
var r = Ot();
|
|
28332
28332
|
Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
|
|
28333
|
-
return
|
|
28333
|
+
return r.useEventSource;
|
|
28334
28334
|
} });
|
|
28335
28335
|
var u = pa();
|
|
28336
28336
|
Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
|
|
@@ -28355,7 +28355,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28355
28355
|
socketHandlers: i = {},
|
|
28356
28356
|
options: m = {}
|
|
28357
28357
|
}) => {
|
|
28358
|
-
const n = Ga(!1),
|
|
28358
|
+
const n = Ga(!1), r = Ga(i), {
|
|
28359
28359
|
sendMessage: u,
|
|
28360
28360
|
// 發送普通訊息
|
|
28361
28361
|
sendJsonMessage: f,
|
|
@@ -28381,17 +28381,17 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28381
28381
|
}
|
|
28382
28382
|
}, [_?.data]);
|
|
28383
28383
|
return De(() => {
|
|
28384
|
-
const
|
|
28384
|
+
const o = setInterval(
|
|
28385
28385
|
() => u("ping"),
|
|
28386
28386
|
Wt
|
|
28387
28387
|
);
|
|
28388
|
-
return () => clearInterval(
|
|
28388
|
+
return () => clearInterval(o);
|
|
28389
28389
|
}, [u]), De(() => {
|
|
28390
|
-
|
|
28390
|
+
r.current = i;
|
|
28391
28391
|
}, [i]), De(() => {
|
|
28392
28392
|
if (!g) return;
|
|
28393
28393
|
const {
|
|
28394
|
-
onDeposit:
|
|
28394
|
+
onDeposit: o,
|
|
28395
28395
|
onTransCode: t,
|
|
28396
28396
|
onError: d,
|
|
28397
28397
|
onUpdateMember: l,
|
|
@@ -28400,14 +28400,14 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28400
28400
|
onReload: b,
|
|
28401
28401
|
onTransferInGame: c,
|
|
28402
28402
|
onCashRegisterLimit: T
|
|
28403
|
-
} =
|
|
28403
|
+
} = r.current, S = we(g, "type", ""), E = {
|
|
28404
28404
|
memberInfoUid: we(g, "member_info_uid", null),
|
|
28405
28405
|
data: we(g, "data", null),
|
|
28406
28406
|
memo: we(g, "memo", null)
|
|
28407
28407
|
};
|
|
28408
28408
|
switch (S) {
|
|
28409
28409
|
case K.DEPOSIT:
|
|
28410
|
-
|
|
28410
|
+
o?.(E);
|
|
28411
28411
|
break;
|
|
28412
28412
|
case K.TRANS_CODE:
|
|
28413
28413
|
t?.(E);
|
|
@@ -28445,44 +28445,44 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28445
28445
|
// WebSocket 連線狀態
|
|
28446
28446
|
};
|
|
28447
28447
|
}, fi = () => {
|
|
28448
|
-
const { client: e } =
|
|
28448
|
+
const { client: e } = te(), i = V(async () => {
|
|
28449
28449
|
const { data: n } = await e.get("/carousels");
|
|
28450
28450
|
return n;
|
|
28451
28451
|
}, [e]), m = V(async () => await e.get("/marquees"), [e]);
|
|
28452
28452
|
return { commonCarouselApi: i, commonMarqueeApi: m };
|
|
28453
28453
|
}, bl = () => {
|
|
28454
|
-
const {
|
|
28454
|
+
const { lng: e } = te(), { commonCarouselApi: i } = fi(), m = ra(e);
|
|
28455
28455
|
return ie({
|
|
28456
28456
|
queryKey: ["getCarouselList"],
|
|
28457
|
-
queryFn: async () => await
|
|
28458
|
-
select: (
|
|
28459
|
-
const { data:
|
|
28460
|
-
return
|
|
28461
|
-
const { carousels_lang:
|
|
28457
|
+
queryFn: async () => await i(),
|
|
28458
|
+
select: (n) => {
|
|
28459
|
+
const { data: r } = n;
|
|
28460
|
+
return r.map((f) => {
|
|
28461
|
+
const { carousels_lang: _ } = f;
|
|
28462
28462
|
return {
|
|
28463
|
-
...
|
|
28463
|
+
...f,
|
|
28464
28464
|
carousel_current_language: Ve(
|
|
28465
|
-
|
|
28466
|
-
(
|
|
28465
|
+
_,
|
|
28466
|
+
(p) => p.lang === m || p.lang === "en_US"
|
|
28467
28467
|
) || {}
|
|
28468
28468
|
};
|
|
28469
28469
|
});
|
|
28470
28470
|
}
|
|
28471
28471
|
});
|
|
28472
28472
|
}, Tl = () => {
|
|
28473
|
-
const { lng: e } =
|
|
28473
|
+
const { lng: e } = te(), { commonMarqueeApi: i } = fi(), m = ra(e);
|
|
28474
28474
|
return ie({
|
|
28475
28475
|
queryKey: ["getMarqueeList"],
|
|
28476
28476
|
queryFn: async () => i(),
|
|
28477
28477
|
select: (n) => {
|
|
28478
|
-
const
|
|
28479
|
-
return Be(
|
|
28478
|
+
const r = n.Marquees;
|
|
28479
|
+
return Be(r, (f) => f[m] || f["en-US"]);
|
|
28480
28480
|
}
|
|
28481
28481
|
});
|
|
28482
28482
|
}, Jt = () => {
|
|
28483
|
-
const { client: e, lng: i } =
|
|
28483
|
+
const { client: e, lng: i } = te(), m = ra(i || "tw");
|
|
28484
28484
|
return { playGameApi: V(
|
|
28485
|
-
async (
|
|
28485
|
+
async (r) => {
|
|
28486
28486
|
const {
|
|
28487
28487
|
gameUid: u = "",
|
|
28488
28488
|
// 遊戲唯一標識
|
|
@@ -28494,7 +28494,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28494
28494
|
// 遊戲幣別
|
|
28495
28495
|
currentCurrency: g = ""
|
|
28496
28496
|
// 目前使用的幣別
|
|
28497
|
-
} =
|
|
28497
|
+
} = r;
|
|
28498
28498
|
return await e.post("/game/go", {
|
|
28499
28499
|
gameUid: u,
|
|
28500
28500
|
gameCode: f,
|
|
@@ -28511,17 +28511,17 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28511
28511
|
let i = {};
|
|
28512
28512
|
return e.forEach((m, n) => i[m] = n), i;
|
|
28513
28513
|
})(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) => {
|
|
28514
|
-
let i, m, n,
|
|
28514
|
+
let i, m, n, r, u = "";
|
|
28515
28515
|
const f = e.length % 3;
|
|
28516
28516
|
for (let _ = 0; _ < e.length; ) {
|
|
28517
|
-
if ((m = e.charCodeAt(_++)) > 255 || (n = e.charCodeAt(_++)) > 255 || (
|
|
28517
|
+
if ((m = e.charCodeAt(_++)) > 255 || (n = e.charCodeAt(_++)) > 255 || (r = e.charCodeAt(_++)) > 255)
|
|
28518
28518
|
throw new TypeError("invalid character found");
|
|
28519
|
-
i = m << 16 | n << 8 |
|
|
28519
|
+
i = m << 16 | n << 8 | r, u += Ee[i >> 18 & 63] + Ee[i >> 12 & 63] + Ee[i >> 6 & 63] + Ee[i & 63];
|
|
28520
28520
|
}
|
|
28521
28521
|
return f ? u.slice(0, f - 3) + "===".substring(f) : u;
|
|
28522
28522
|
}, da = typeof btoa == "function" ? (e) => btoa(e) : be ? (e) => Buffer.from(e, "binary").toString("base64") : Ti, la = be ? (e) => Buffer.from(e).toString("base64") : (e) => {
|
|
28523
28523
|
let m = [];
|
|
28524
|
-
for (let n = 0,
|
|
28524
|
+
for (let n = 0, r = e.length; n < r; n += 4096)
|
|
28525
28525
|
m.push(H.apply(null, e.subarray(n, n + 4096)));
|
|
28526
28526
|
return da(m.join(""));
|
|
28527
28527
|
}, Ze = (e, i = !1) => i ? yi(la(e)) : la(e), At = (e) => {
|
|
@@ -28546,10 +28546,10 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28546
28546
|
if (e = e.replace(/\s+/g, ""), !Vt.test(e))
|
|
28547
28547
|
throw new TypeError("malformed base64.");
|
|
28548
28548
|
e += "==".slice(2 - (e.length & 3));
|
|
28549
|
-
let i, m, n,
|
|
28549
|
+
let i, m, n, r = [];
|
|
28550
28550
|
for (let u = 0; u < e.length; )
|
|
28551
|
-
i = Je[e.charAt(u++)] << 18 | Je[e.charAt(u++)] << 12 | (m = Je[e.charAt(u++)]) << 6 | (n = Je[e.charAt(u++)]), m === 64 ?
|
|
28552
|
-
return
|
|
28551
|
+
i = Je[e.charAt(u++)] << 18 | Je[e.charAt(u++)] << 12 | (m = Je[e.charAt(u++)]) << 6 | (n = Je[e.charAt(u++)]), m === 64 ? r.push(H(i >> 16 & 255)) : n === 64 ? r.push(H(i >> 16 & 255, i >> 8 & 255)) : r.push(H(i >> 16 & 255, i >> 8 & 255, i & 255));
|
|
28552
|
+
return r.join("");
|
|
28553
28553
|
}, 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 == "-" ? "+" : "/")), na = (e) => jt(Ni(e)), Qt = (e) => {
|
|
28554
28554
|
if (typeof e != "string")
|
|
28555
28555
|
return !1;
|
|
@@ -28610,15 +28610,15 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28610
28610
|
return ie({
|
|
28611
28611
|
queryKey: ["playGame"],
|
|
28612
28612
|
queryFn: async () => {
|
|
28613
|
-
const { gameUid: n, gameCode:
|
|
28613
|
+
const { gameUid: n, gameCode: r, isMobile: u, gameCurrency: f, currentCurrency: _ } = e || {}, p = await m({
|
|
28614
28614
|
gameUid: n,
|
|
28615
|
-
gameCode:
|
|
28615
|
+
gameCode: r,
|
|
28616
28616
|
isMobile: u,
|
|
28617
28617
|
gameCurrency: f,
|
|
28618
28618
|
currentCurrency: _
|
|
28619
28619
|
}), {
|
|
28620
28620
|
game_currency: g,
|
|
28621
|
-
lang:
|
|
28621
|
+
lang: o,
|
|
28622
28622
|
not_support_iframe: t,
|
|
28623
28623
|
portrait: d,
|
|
28624
28624
|
url: l,
|
|
@@ -28627,7 +28627,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28627
28627
|
} = p;
|
|
28628
28628
|
return {
|
|
28629
28629
|
gameCurrency: g,
|
|
28630
|
-
lang:
|
|
28630
|
+
lang: o,
|
|
28631
28631
|
supportIframe: !t,
|
|
28632
28632
|
supportPortrait: d,
|
|
28633
28633
|
isHtmlCode: s,
|
|
@@ -28678,10 +28678,10 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28678
28678
|
} = {}) => {
|
|
28679
28679
|
const i = Xt({ options: e.login }), m = $t({ options: e.logout }), n = el({
|
|
28680
28680
|
options: e.toggleFavoriteGame
|
|
28681
|
-
}),
|
|
28681
|
+
}), r = al({
|
|
28682
28682
|
options: e.rankingGame
|
|
28683
28683
|
});
|
|
28684
|
-
return { login: i, logout: m, toggleFavoriteGame: n, rankingGame:
|
|
28684
|
+
return { login: i, logout: m, toggleFavoriteGame: n, rankingGame: r };
|
|
28685
28685
|
}, ti = (e) => {
|
|
28686
28686
|
switch (e) {
|
|
28687
28687
|
case "tw":
|
|
@@ -28702,10 +28702,10 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28702
28702
|
return "En";
|
|
28703
28703
|
}
|
|
28704
28704
|
}, il = "https://d1h3qe8voog6w4.cloudfront.net", li = "https://d3jx2uvukujuvn.cloudfront.net", ni = "game-icon-ds88", hl = ({ gameData: e = {} } = {}) => {
|
|
28705
|
-
const { lng: i } =
|
|
28705
|
+
const { lng: i } = te(), m = ti(i), {
|
|
28706
28706
|
gameCode: n,
|
|
28707
28707
|
// 遊戲代碼
|
|
28708
|
-
gameUid:
|
|
28708
|
+
gameUid: r,
|
|
28709
28709
|
// 遊戲唯一標識符
|
|
28710
28710
|
gameTypeUid: u,
|
|
28711
28711
|
// 遊戲類型唯一標識符
|
|
@@ -28718,7 +28718,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28718
28718
|
// 進入大廳模式
|
|
28719
28719
|
game_platform: g,
|
|
28720
28720
|
// 遊戲平台
|
|
28721
|
-
game_subtype:
|
|
28721
|
+
game_subtype: o,
|
|
28722
28722
|
// 遊戲子類型
|
|
28723
28723
|
game_type: t,
|
|
28724
28724
|
// 遊戲類型
|
|
@@ -28743,13 +28743,13 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28743
28743
|
} = e, v = e?.[`gameName${ti(m)}`], D = `${li}/${ni}/en/${g}/${Ra(n, / /g, "_")}.webp`, L = `${li}/${ni}/en/${g}/${Ra(n, / /g, "_")}.gif`;
|
|
28744
28744
|
return {
|
|
28745
28745
|
gameCode: n,
|
|
28746
|
-
gameUid:
|
|
28746
|
+
gameUid: r,
|
|
28747
28747
|
gameTypeUid: u,
|
|
28748
28748
|
providerUid: f,
|
|
28749
28749
|
supportCurrency: _,
|
|
28750
28750
|
enterLobbyMode: p,
|
|
28751
28751
|
gamePlatform: g,
|
|
28752
|
-
gameSubType:
|
|
28752
|
+
gameSubType: o,
|
|
28753
28753
|
gameType: t,
|
|
28754
28754
|
gameTags: d,
|
|
28755
28755
|
isUnderMaintenance: l,
|
|
@@ -28781,7 +28781,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28781
28781
|
// 子平台枚舉
|
|
28782
28782
|
platformEnum: n,
|
|
28783
28783
|
// 平台枚舉
|
|
28784
|
-
isUnderMaintenance:
|
|
28784
|
+
isUnderMaintenance: r,
|
|
28785
28785
|
// 是否維護中
|
|
28786
28786
|
maintenanceStartTime: u,
|
|
28787
28787
|
// 維護開始時間
|
|
@@ -28793,7 +28793,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28793
28793
|
// 平台唯一標識符
|
|
28794
28794
|
platformMode: g,
|
|
28795
28795
|
// 平台模式
|
|
28796
|
-
temp_maintenance_start_time:
|
|
28796
|
+
temp_maintenance_start_time: o,
|
|
28797
28797
|
// 臨時維護開始時間
|
|
28798
28798
|
temp_maintenance_end_time: t
|
|
28799
28799
|
// 臨時維護結束時間
|
|
@@ -28801,13 +28801,13 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28801
28801
|
return {
|
|
28802
28802
|
subPlatformEnum: m,
|
|
28803
28803
|
platformEnum: n,
|
|
28804
|
-
isUnderMaintenance:
|
|
28804
|
+
isUnderMaintenance: r,
|
|
28805
28805
|
maintenanceStartTime: u,
|
|
28806
28806
|
maintenanceEndTime: f,
|
|
28807
28807
|
platform: _,
|
|
28808
28808
|
platformUid: p,
|
|
28809
28809
|
platformMode: g,
|
|
28810
|
-
tempMaintenanceStartTime:
|
|
28810
|
+
tempMaintenanceStartTime: o,
|
|
28811
28811
|
tempMaintenanceEndTime: t,
|
|
28812
28812
|
platformImageUrl: d
|
|
28813
28813
|
};
|
|
@@ -28838,7 +28838,7 @@ export {
|
|
|
28838
28838
|
Dt as initMockWindowData,
|
|
28839
28839
|
kt as processGameInfo,
|
|
28840
28840
|
dl as processPlatformData,
|
|
28841
|
-
|
|
28841
|
+
te as useApiContext,
|
|
28842
28842
|
_l as useBalanceGetter,
|
|
28843
28843
|
yl as useClientWebSocket,
|
|
28844
28844
|
hl as useGameConfig,
|