@obb871001/api-integration-sdk 1.0.123 → 1.0.124
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 +2 -2
- package/dist/index.js +210 -210
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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"),
|
|
14
|
+
var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.fragment"), l = 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 o, t = {}, d = null,
|
|
17
|
-
g !== void 0 && (d = "" + g), p.key !== void 0 && (d = "" + p.key), p.ref !== void 0 && (
|
|
18
|
-
for (o in p)
|
|
16
|
+
var o, 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 (o in p) l.call(p, o) && !u.hasOwnProperty(o) && (t[o] = p[o]);
|
|
19
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:
|
|
20
|
+
return { $$typeof: i, type: _, key: d, ref: n, 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"),
|
|
28
|
+
var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.portal"), l = 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"), n = 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 ===
|
|
56
|
+
return !!(typeof a == "string" || typeof a == "function" || a === l || a === u || I || a === r || a === g || a === o || 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,7 +77,7 @@ function ut() {
|
|
|
77
77
|
if (typeof a == "string")
|
|
78
78
|
return a;
|
|
79
79
|
switch (a) {
|
|
80
|
-
case
|
|
80
|
+
case l:
|
|
81
81
|
return "Fragment";
|
|
82
82
|
case m:
|
|
83
83
|
return "Portal";
|
|
@@ -599,7 +599,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
599
599
|
<%s key={someKey} {...props} />`, Ye, ue, $i, ue), Ea[ue + Ye] = !0;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return a ===
|
|
602
|
+
return a === l ? 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 =
|
|
612
|
+
ke.Fragment = l, ke.jsx = Yi, ke.jsxs = Xi;
|
|
613
613
|
})()), ke;
|
|
614
614
|
}
|
|
615
615
|
var Oa;
|
|
@@ -627,7 +627,7 @@ function gt({
|
|
|
627
627
|
baseURL: e,
|
|
628
628
|
getToken: i,
|
|
629
629
|
timeoutMs: m = 15e3,
|
|
630
|
-
lng:
|
|
630
|
+
lng: l = "tw",
|
|
631
631
|
store: r,
|
|
632
632
|
onError: u
|
|
633
633
|
} = {}) {
|
|
@@ -642,7 +642,7 @@ function gt({
|
|
|
642
642
|
g && (_.headers.Authorization = `Bearer ${g}`);
|
|
643
643
|
}
|
|
644
644
|
const p = r?.getState()?.isWalletCurrency || r?.getState()?.currency?.currentCurrency || "TWD";
|
|
645
|
-
return _.headers.Currency = p, _.headers["currency-code"] = p, _.headers.lang =
|
|
645
|
+
return _.headers.Currency = p, _.headers["currency-code"] = p, _.headers.lang = l, _;
|
|
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), ul = () => {
|
|
|
656
656
|
);
|
|
657
657
|
return e;
|
|
658
658
|
}, pl = () => {
|
|
659
|
-
const e = (
|
|
659
|
+
const e = (l, r) => !l && !r, i = (l) => l.startsWith("pc.");
|
|
660
660
|
return {
|
|
661
661
|
executeLogout: ({
|
|
662
|
-
isCallBackInvalid:
|
|
662
|
+
isCallBackInvalid: l = !1,
|
|
663
663
|
hostname: r = "",
|
|
664
664
|
shouldRedirect: u,
|
|
665
665
|
onShowError: f,
|
|
@@ -669,22 +669,22 @@ const ui = mi(null), ul = () => {
|
|
|
669
669
|
onGoogleLogout: o
|
|
670
670
|
}) => {
|
|
671
671
|
const t = i(r);
|
|
672
|
-
e(
|
|
672
|
+
e(l, t) && f?.(), _?.(), p?.(), u && g?.("/"), o?.();
|
|
673
673
|
},
|
|
674
674
|
shouldShowErrorNotice: e,
|
|
675
675
|
isMachineDomain: i
|
|
676
676
|
};
|
|
677
|
-
}, pi = (e = [], i) => Ve(e, { gameTypeName: i })?.gameTypeUid, gi = (e = [], i) => Ve(e, { platform: i })?.platformUid, di = (e = [], i) => Ve(e, { SubPlatformEnum: i }), ci = (e = [], i, m) => O(e) ? [] : e.filter((
|
|
678
|
-
const
|
|
679
|
-
return i[
|
|
677
|
+
}, pi = (e = [], i) => Ve(e, { gameTypeName: i })?.gameTypeUid, gi = (e = [], i) => Ve(e, { platform: i })?.platformUid, di = (e = [], i) => Ve(e, { SubPlatformEnum: i }), ci = (e = [], i, m) => O(e) ? [] : e.filter((l) => m ? String(l?.SubPlatformEnumUid) === String(m?.SubPlatformEnumUid) : String(l.platformUid) === String(i)), dt = (e = []) => O(e) ? {} : e.reduce((i, m) => {
|
|
678
|
+
const l = m?.game_subtype || "UNKNOWN";
|
|
679
|
+
return i[l] || (i[l] = []), i[l].push(m), i;
|
|
680
680
|
}, {}), ct = ({
|
|
681
681
|
gameTypeName: e,
|
|
682
682
|
platforms: i,
|
|
683
683
|
gameList: m,
|
|
684
|
-
allGameTypes:
|
|
684
|
+
allGameTypes: l,
|
|
685
685
|
allPlatforms: r
|
|
686
686
|
}) => {
|
|
687
|
-
const u = pi(
|
|
687
|
+
const u = pi(l, e);
|
|
688
688
|
return u ? i.reduce((f, _) => {
|
|
689
689
|
const p = gi(r, _), g = di(r, _), o = m[u] || [], t = ci(
|
|
690
690
|
o,
|
|
@@ -698,29 +698,29 @@ const ui = mi(null), ul = () => {
|
|
|
698
698
|
gamesOfType: i = [],
|
|
699
699
|
allPlatforms: m = []
|
|
700
700
|
}) => {
|
|
701
|
-
const
|
|
701
|
+
const l = gi(m, e), r = di(m, e), u = ci(
|
|
702
702
|
i,
|
|
703
|
-
|
|
703
|
+
l,
|
|
704
704
|
r
|
|
705
705
|
);
|
|
706
706
|
return dt(u);
|
|
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,
|
|
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, l) => {
|
|
708
708
|
const r = i.map((u) => u.game_subtype);
|
|
709
709
|
return r.forEach((u) => {
|
|
710
710
|
m[u] = m[u] || [];
|
|
711
|
-
}), r.includes(
|
|
711
|
+
}), r.includes(l.game_subtype) && m[l.game_subtype].push(l), m;
|
|
712
712
|
}, {}), Ct = ({
|
|
713
713
|
gameTypes: e = [],
|
|
714
714
|
platforms: i = [],
|
|
715
715
|
gameList: m = {},
|
|
716
|
-
allGameTypes:
|
|
716
|
+
allGameTypes: l = [],
|
|
717
717
|
allPlatforms: r = []
|
|
718
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
|
-
allGameTypes:
|
|
723
|
+
allGameTypes: l,
|
|
724
724
|
allPlatforms: r
|
|
725
725
|
});
|
|
726
726
|
return O(_) || (u[f] = _), u;
|
|
@@ -728,7 +728,7 @@ const ui = mi(null), ul = () => {
|
|
|
728
728
|
types: e = [],
|
|
729
729
|
platforms: i = [],
|
|
730
730
|
allGameType: m = [],
|
|
731
|
-
allGamePlatform:
|
|
731
|
+
allGamePlatform: l = [],
|
|
732
732
|
allGameList: r = {}
|
|
733
733
|
} = {}) => !Array.isArray(e) || !Array.isArray(i) ? {} : e.reduce((u, f) => {
|
|
734
734
|
const _ = pi(m, f);
|
|
@@ -737,19 +737,19 @@ const ui = mi(null), ul = () => {
|
|
|
737
737
|
const d = _t({
|
|
738
738
|
platformName: t,
|
|
739
739
|
gamesOfType: p,
|
|
740
|
-
allPlatforms:
|
|
740
|
+
allPlatforms: l
|
|
741
741
|
});
|
|
742
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,
|
|
745
|
+
}, {}), vt = (e = {}) => !Ae(e) || O(e) ? {} : Object.values(e).reduce((m, l) => (Object.entries(l).forEach(([r, u]) => {
|
|
746
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
|
-
for (const [m,
|
|
750
|
+
for (const [m, l] of Object.entries(e)) {
|
|
751
751
|
i[m] = {};
|
|
752
|
-
for (const r of
|
|
752
|
+
for (const r of l) {
|
|
753
753
|
const u = r.game_subtype;
|
|
754
754
|
i[m][u] || (i[m][u] = []), i[m][u].push(r);
|
|
755
755
|
}
|
|
@@ -759,7 +759,7 @@ const ui = mi(null), ul = () => {
|
|
|
759
759
|
allGameList: e = {},
|
|
760
760
|
allGamePlatform: i = [],
|
|
761
761
|
allGameType: m = [],
|
|
762
|
-
allGame_subtype:
|
|
762
|
+
allGame_subtype: l = [],
|
|
763
763
|
allNewGameList: r = [],
|
|
764
764
|
allTopGameList: u = [],
|
|
765
765
|
randomlySelectedGames: f = [],
|
|
@@ -768,13 +768,13 @@ const ui = mi(null), ul = () => {
|
|
|
768
768
|
highlightGames: g = [],
|
|
769
769
|
originPlatform: o = []
|
|
770
770
|
}) => {
|
|
771
|
-
const t = ft(e), d = Ha(i),
|
|
772
|
-
gameTypes:
|
|
771
|
+
const t = ft(e), d = Ha(i), n = Ut(m), s = yt(l), y = Ha(o), b = bt(_), c = Ct({
|
|
772
|
+
gameTypes: n,
|
|
773
773
|
platforms: d,
|
|
774
774
|
gameList: e,
|
|
775
775
|
allGameTypes: m,
|
|
776
776
|
allPlatforms: i
|
|
777
|
-
}), T = Tt(t,
|
|
777
|
+
}), T = Tt(t, l), S = vt(c), E = ht(S), v = lt(c).reduce(
|
|
778
778
|
(L, [I, Q]) => {
|
|
779
779
|
const Te = Ie(nt(Q));
|
|
780
780
|
return L[I] = Te, L;
|
|
@@ -792,10 +792,10 @@ const ui = mi(null), ul = () => {
|
|
|
792
792
|
byGameType: D
|
|
793
793
|
},
|
|
794
794
|
type: {
|
|
795
|
-
main:
|
|
795
|
+
main: n,
|
|
796
796
|
sub: s,
|
|
797
797
|
originMain: m,
|
|
798
|
-
originSub:
|
|
798
|
+
originSub: l
|
|
799
799
|
},
|
|
800
800
|
gameList: {
|
|
801
801
|
all: t,
|
|
@@ -844,21 +844,21 @@ const ui = mi(null), ul = () => {
|
|
|
844
844
|
}, me = () => {
|
|
845
845
|
const { client: e } = te(), i = V(
|
|
846
846
|
async (o) => {
|
|
847
|
-
const { mac_address: t = "", app_version: d = "", anydesk_id:
|
|
847
|
+
const { mac_address: t = "", app_version: d = "", anydesk_id: n = "" } = o, { data: s } = await e.post("/cash-register/login", {
|
|
848
848
|
mac_address: t,
|
|
849
849
|
app_version: d,
|
|
850
|
-
anydesk_id:
|
|
850
|
+
anydesk_id: n
|
|
851
851
|
});
|
|
852
852
|
return s;
|
|
853
853
|
},
|
|
854
854
|
[e]
|
|
855
|
-
), m = V(async () => e.get("/member/getMemberInfo"), [e]),
|
|
855
|
+
), m = V(async () => e.get("/member/getMemberInfo"), [e]), l = 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
856
|
async (o) => {
|
|
857
|
-
const { account: t, password: d, trans_code:
|
|
857
|
+
const { account: t, password: d, trans_code: n } = o;
|
|
858
858
|
return await e.post("/login", {
|
|
859
859
|
memId: t,
|
|
860
860
|
passwd: d,
|
|
861
|
-
trans_code:
|
|
861
|
+
trans_code: n
|
|
862
862
|
});
|
|
863
863
|
},
|
|
864
864
|
[e]
|
|
@@ -874,7 +874,7 @@ const ui = mi(null), ul = () => {
|
|
|
874
874
|
return {
|
|
875
875
|
machineLoginApi: i,
|
|
876
876
|
userInfoApi: m,
|
|
877
|
-
userGameListApi:
|
|
877
|
+
userGameListApi: l,
|
|
878
878
|
userFavoriteGameApi: u,
|
|
879
879
|
userCurrencyExchangeApi: r,
|
|
880
880
|
userLoginApi: f,
|
|
@@ -903,12 +903,12 @@ const ui = mi(null), ul = () => {
|
|
|
903
903
|
},
|
|
904
904
|
user: { favorite: [] }
|
|
905
905
|
}, Nt = ({ enabled: e = !0 } = {}) => {
|
|
906
|
-
const { getToken: i } = te(), { userFavoriteGameApi: m, userGameListApi:
|
|
906
|
+
const { getToken: i } = te(), { userFavoriteGameApi: m, userGameListApi: l } = 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
|
-
await i?.() && (g = await
|
|
911
|
+
await i?.() && (g = await l(), p = await m());
|
|
912
912
|
} catch (o) {
|
|
913
913
|
console.warn("Failed to fetch favorite games:", o);
|
|
914
914
|
}
|
|
@@ -27475,14 +27475,14 @@ const ui = mi(null), ul = () => {
|
|
|
27475
27475
|
De(() => {
|
|
27476
27476
|
m && Dt(!0);
|
|
27477
27477
|
}, [m]);
|
|
27478
|
-
const
|
|
27479
|
-
return /* @__PURE__ */ ze.jsx(ui.Provider, { value:
|
|
27478
|
+
const l = Nt({ enabled: i });
|
|
27479
|
+
return /* @__PURE__ */ ze.jsx(ui.Provider, { value: l, children: e });
|
|
27480
27480
|
};
|
|
27481
27481
|
function cl({
|
|
27482
27482
|
children: e,
|
|
27483
27483
|
autoFetchGamesInfo: i = !1,
|
|
27484
27484
|
useMockData: m = !1,
|
|
27485
|
-
queryClient:
|
|
27485
|
+
queryClient: l,
|
|
27486
27486
|
...r
|
|
27487
27487
|
}) {
|
|
27488
27488
|
const u = ta(() => gt(r), [r]), f = ta(
|
|
@@ -27495,11 +27495,11 @@ function cl({
|
|
|
27495
27495
|
}
|
|
27496
27496
|
}),
|
|
27497
27497
|
[]
|
|
27498
|
-
), _ =
|
|
27498
|
+
), _ = l || f;
|
|
27499
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:
|
|
27502
|
+
const { userCurrencyExchangeApi: m } = me(), { getToken: l } = te(), { enabled: r, ...u } = i, _ = !!l?.() && (r ? r.every((p) => p) : !0);
|
|
27503
27503
|
return oi({
|
|
27504
27504
|
queries: [
|
|
27505
27505
|
{
|
|
@@ -27517,7 +27517,7 @@ const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27517
27517
|
trigger: i = [],
|
|
27518
27518
|
enabled: m = !0
|
|
27519
27519
|
} = {}) => {
|
|
27520
|
-
const { getToken:
|
|
27520
|
+
const { getToken: l } = te(), r = l?.(), { userInfoApi: u } = me();
|
|
27521
27521
|
return oi({
|
|
27522
27522
|
queries: [
|
|
27523
27523
|
{
|
|
@@ -27532,7 +27532,7 @@ const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27532
27532
|
const {
|
|
27533
27533
|
userInfoApi: i,
|
|
27534
27534
|
userFavoriteGameApi: m,
|
|
27535
|
-
userGameListApi:
|
|
27535
|
+
userGameListApi: l,
|
|
27536
27536
|
userCurrencyExchangeApi: r
|
|
27537
27537
|
} = me(), u = ie({
|
|
27538
27538
|
queryKey: ["getMemInfo"],
|
|
@@ -27544,7 +27544,7 @@ const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27544
27544
|
enabled: e && u.isSuccess
|
|
27545
27545
|
}), _ = ie({
|
|
27546
27546
|
queryKey: ["getUserGameList"],
|
|
27547
|
-
queryFn: async () =>
|
|
27547
|
+
queryFn: async () => l(),
|
|
27548
27548
|
enabled: e && u.isSuccess && f.isSuccess
|
|
27549
27549
|
}), p = ie({
|
|
27550
27550
|
queryKey: ["getUserCurrencyExchange"],
|
|
@@ -27571,10 +27571,10 @@ function j() {
|
|
|
27571
27571
|
timeout: 6e4,
|
|
27572
27572
|
interval: 25e3
|
|
27573
27573
|
};
|
|
27574
|
-
var
|
|
27574
|
+
var l;
|
|
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
|
+
})(l || (e.ReadyState = l = {}));
|
|
27578
27578
|
var r = function() {
|
|
27579
27579
|
try {
|
|
27580
27580
|
return "EventSource" in globalThis;
|
|
@@ -27593,8 +27593,8 @@ function oa() {
|
|
|
27593
27593
|
if (m && e.sharedWebSockets.hasOwnProperty(m))
|
|
27594
27594
|
delete e.sharedWebSockets[m];
|
|
27595
27595
|
else
|
|
27596
|
-
for (var
|
|
27597
|
-
e.sharedWebSockets.hasOwnProperty(
|
|
27596
|
+
for (var l in e.sharedWebSockets)
|
|
27597
|
+
e.sharedWebSockets.hasOwnProperty(l) && delete e.sharedWebSockets[l];
|
|
27598
27598
|
};
|
|
27599
27599
|
e.resetWebSockets = i;
|
|
27600
27600
|
})(ea)), ea;
|
|
@@ -27623,38 +27623,38 @@ function sa() {
|
|
|
27623
27623
|
return "".concat(r).concat(_ ? "&" : "?").concat(p);
|
|
27624
27624
|
};
|
|
27625
27625
|
$.appendQueryParams = m;
|
|
27626
|
-
var
|
|
27626
|
+
var l = function(r, u) {
|
|
27627
27627
|
u === void 0 && (u = e.SOCKET_IO_PING_INTERVAL);
|
|
27628
27628
|
var f = function() {
|
|
27629
27629
|
return r(e.SOCKET_IO_PING_CODE);
|
|
27630
27630
|
};
|
|
27631
27631
|
return window.setInterval(f, u);
|
|
27632
27632
|
};
|
|
27633
|
-
return $.setUpSocketIOPing =
|
|
27633
|
+
return $.setUpSocketIOPing = l, $;
|
|
27634
27634
|
}
|
|
27635
27635
|
var We = {}, Ja;
|
|
27636
27636
|
function _i() {
|
|
27637
27637
|
if (Ja) return We;
|
|
27638
27638
|
Ja = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.heartbeat = m;
|
|
27639
27639
|
var e = j();
|
|
27640
|
-
function i(
|
|
27641
|
-
return Array.isArray(
|
|
27640
|
+
function i(l) {
|
|
27641
|
+
return Array.isArray(l) ? l.reduce(function(r, u) {
|
|
27642
27642
|
return r.current > u.current ? r : u;
|
|
27643
|
-
}).current :
|
|
27643
|
+
}).current : l.current;
|
|
27644
27644
|
}
|
|
27645
|
-
function m(
|
|
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,
|
|
27645
|
+
function m(l, 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, n = Math.max(100, p / 10), s = Date.now(), y = setInterval(function() {
|
|
27647
27647
|
var b = Date.now(), c = i(r);
|
|
27648
27648
|
if (c + o <= b)
|
|
27649
|
-
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - s, "ms ago")),
|
|
27649
|
+
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - s, "ms ago")), l.close();
|
|
27650
27650
|
else if (c + p <= b && s + p <= b)
|
|
27651
27651
|
try {
|
|
27652
|
-
typeof d == "function" ?
|
|
27652
|
+
typeof d == "function" ? l.send(d()) : l.send(d), s = b;
|
|
27653
27653
|
} catch (T) {
|
|
27654
|
-
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T),
|
|
27654
|
+
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), l.close();
|
|
27655
27655
|
}
|
|
27656
|
-
},
|
|
27657
|
-
return
|
|
27656
|
+
}, n);
|
|
27657
|
+
return l.addEventListener("close", function() {
|
|
27658
27658
|
clearInterval(y);
|
|
27659
27659
|
}), function() {
|
|
27660
27660
|
};
|
|
@@ -27665,10 +27665,10 @@ var Ne = {}, aa = {}, 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 = [],
|
|
27668
|
+
var i = {}, m = [], l = function(p) {
|
|
27669
27669
|
return (0, e.hasSubscribers)(p) ? Array.from(i[p]) : m;
|
|
27670
27670
|
};
|
|
27671
|
-
e.getSubscribers =
|
|
27671
|
+
e.getSubscribers = l;
|
|
27672
27672
|
var r = function(p) {
|
|
27673
27673
|
var g;
|
|
27674
27674
|
return ((g = i[p]) === null || g === void 0 ? void 0 : g.size) > 0;
|
|
@@ -27695,13 +27695,13 @@ 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 =
|
|
27698
|
+
Za = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.assertIsWebSocket = m, Ne.resetGlobalState = l;
|
|
27699
27699
|
var e = oa(), i = ua();
|
|
27700
27700
|
function m(r, u) {
|
|
27701
27701
|
if (!u && !(r instanceof WebSocket))
|
|
27702
27702
|
throw new Error("");
|
|
27703
27703
|
}
|
|
27704
|
-
function
|
|
27704
|
+
function l(r) {
|
|
27705
27705
|
(0, i.resetSubscribers)(r), (0, e.resetWebSockets)(r);
|
|
27706
27706
|
}
|
|
27707
27707
|
return Ne;
|
|
@@ -27712,7 +27712,7 @@ function Lt() {
|
|
|
27712
27712
|
Va = 1;
|
|
27713
27713
|
var e = pe && pe.__assign || function() {
|
|
27714
27714
|
return e = Object.assign || function(o) {
|
|
27715
|
-
for (var t, d = 1,
|
|
27715
|
+
for (var t, d = 1, n = arguments.length; d < n; d++) {
|
|
27716
27716
|
t = arguments[d];
|
|
27717
27717
|
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (o[s] = t[s]);
|
|
27718
27718
|
}
|
|
@@ -27720,58 +27720,58 @@ function Lt() {
|
|
|
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(),
|
|
27723
|
+
var i = sa(), m = _i(), l = j(), r = pa(), u = function(o, t, d, n) {
|
|
27724
27724
|
o.onmessage = function(s) {
|
|
27725
27725
|
var y;
|
|
27726
|
-
t.current.onMessage && t.current.onMessage(s), typeof
|
|
27726
|
+
t.current.onMessage && t.current.onMessage(s), typeof n?.current == "number" && (n.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(o, t, d,
|
|
27728
|
+
}, f = function(o, t, d, n, s) {
|
|
27729
27729
|
o.onopen = function(y) {
|
|
27730
|
-
if (t.current.onOpen && t.current.onOpen(y),
|
|
27730
|
+
if (t.current.onOpen && t.current.onOpen(y), n.current = 0, d(l.ReadyState.OPEN), t.current.heartbeat && o instanceof WebSocket) {
|
|
27731
27731
|
var b = typeof t.current.heartbeat == "boolean" ? void 0 : t.current.heartbeat;
|
|
27732
27732
|
s.current = Date.now(), (0, m.heartbeat)(o, s, b);
|
|
27733
27733
|
}
|
|
27734
27734
|
};
|
|
27735
|
-
}, _ = function(o, t, d,
|
|
27736
|
-
if (
|
|
27735
|
+
}, _ = function(o, t, d, n, s) {
|
|
27736
|
+
if (l.isEventSourceSupported && o instanceof EventSource)
|
|
27737
27737
|
return function() {
|
|
27738
27738
|
};
|
|
27739
27739
|
(0, r.assertIsWebSocket)(o, t.current.skipAssert);
|
|
27740
27740
|
var y;
|
|
27741
27741
|
return o.onclose = function(b) {
|
|
27742
27742
|
var c;
|
|
27743
|
-
if (t.current.onClose && t.current.onClose(b), d(
|
|
27744
|
-
var T = (c = t.current.reconnectAttempts) !== null && c !== void 0 ? c :
|
|
27743
|
+
if (t.current.onClose && t.current.onClose(b), d(l.ReadyState.CLOSED), t.current.shouldReconnect && t.current.shouldReconnect(b)) {
|
|
27744
|
+
var T = (c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : l.DEFAULT_RECONNECT_LIMIT;
|
|
27745
27745
|
if (s.current < T) {
|
|
27746
27746
|
var S = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(s.current) : t.current.reconnectInterval;
|
|
27747
27747
|
y = window.setTimeout(function() {
|
|
27748
|
-
s.current++,
|
|
27749
|
-
}, S ??
|
|
27748
|
+
s.current++, n();
|
|
27749
|
+
}, S ?? l.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(o, t, d,
|
|
27756
|
+
}, p = function(o, t, d, n, s) {
|
|
27757
27757
|
var y;
|
|
27758
27758
|
return o.onerror = function(b) {
|
|
27759
27759
|
var c;
|
|
27760
|
-
if (t.current.onError && t.current.onError(b),
|
|
27761
|
-
if (s.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c :
|
|
27760
|
+
if (t.current.onError && t.current.onError(b), l.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(l.ReadyState.CLOSED), o.close()), t.current.retryOnError)
|
|
27761
|
+
if (s.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : l.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() {
|
|
27764
|
-
s.current++,
|
|
27765
|
-
}, T ??
|
|
27764
|
+
s.current++, n();
|
|
27765
|
+
}, T ?? l.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(o, t, d,
|
|
27771
|
+
}, g = function(o, t, d, n, 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(o, d, c, y), f(o, d, T, s, y), E = _(o, d, T,
|
|
27774
|
-
T(
|
|
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, n, s), v = p(o, d, T, n, s), function() {
|
|
27774
|
+
T(l.ReadyState.CLOSING), E(), v(), o.close(), S && clearInterval(S);
|
|
27775
27775
|
};
|
|
27776
27776
|
};
|
|
27777
27777
|
return pe.attachListeners = g, pe;
|
|
@@ -27782,37 +27782,37 @@ function Gt() {
|
|
|
27782
27782
|
Aa = 1;
|
|
27783
27783
|
var e = ge && ge.__assign || function() {
|
|
27784
27784
|
return e = Object.assign || function(t) {
|
|
27785
|
-
for (var d,
|
|
27786
|
-
d = arguments[
|
|
27785
|
+
for (var d, n = 1, s = arguments.length; n < s; 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
27792
|
Object.defineProperty(ge, "__esModule", { value: !0 }), ge.attachSharedListeners = void 0;
|
|
27793
|
-
var i = oa(), m = j(),
|
|
27793
|
+
var i = oa(), m = j(), l = ua(), r = sa(), u = _i(), f = function(t, d, n) {
|
|
27794
27794
|
t.onmessage = function(s) {
|
|
27795
|
-
(0,
|
|
27795
|
+
(0, l.getSubscribers)(d).forEach(function(y) {
|
|
27796
27796
|
var b;
|
|
27797
|
-
y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(s), 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(s) !== !0) && (
|
|
27797
|
+
y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(s), 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(s) !== !0) && (n && typeof n != "boolean" && n?.returnMessage === s.data || y.setLastMessage(s));
|
|
27798
27798
|
});
|
|
27799
27799
|
};
|
|
27800
|
-
}, _ = function(t, d,
|
|
27800
|
+
}, _ = function(t, d, n) {
|
|
27801
27801
|
t.onopen = function(s) {
|
|
27802
|
-
var y = (0,
|
|
27802
|
+
var y = (0, l.getSubscribers)(d);
|
|
27803
27803
|
y.forEach(function(b) {
|
|
27804
|
-
b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(s), b.setReadyState(m.ReadyState.OPEN),
|
|
27805
|
-
}),
|
|
27804
|
+
b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(s), b.setReadyState(m.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
|
|
27807
|
+
}), typeof n == "boolean" ? void 0 : n);
|
|
27808
27808
|
};
|
|
27809
27809
|
}, p = function(t, d) {
|
|
27810
|
-
t instanceof WebSocket && (t.onclose = function(
|
|
27811
|
-
(0,
|
|
27812
|
-
s.optionsRef.current.onClose && s.optionsRef.current.onClose(
|
|
27813
|
-
}), delete i.sharedWebSockets[d], (0,
|
|
27810
|
+
t instanceof WebSocket && (t.onclose = function(n) {
|
|
27811
|
+
(0, l.getSubscribers)(d).forEach(function(s) {
|
|
27812
|
+
s.optionsRef.current.onClose && s.optionsRef.current.onClose(n), s.setReadyState(m.ReadyState.CLOSED);
|
|
27813
|
+
}), delete i.sharedWebSockets[d], (0, l.getSubscribers)(d).forEach(function(s) {
|
|
27814
27814
|
var y;
|
|
27815
|
-
if (s.optionsRef.current.shouldReconnect && s.optionsRef.current.shouldReconnect(
|
|
27815
|
+
if (s.optionsRef.current.shouldReconnect && s.optionsRef.current.shouldReconnect(n)) {
|
|
27816
27816
|
var b = (y = s.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : m.DEFAULT_RECONNECT_LIMIT;
|
|
27817
27817
|
if (s.reconnectCount.current < b) {
|
|
27818
27818
|
var c = typeof s.optionsRef.current.reconnectInterval == "function" ? s.optionsRef.current.reconnectInterval(s.reconnectCount.current) : s.optionsRef.current.reconnectInterval;
|
|
@@ -27825,14 +27825,14 @@ function Gt() {
|
|
|
27825
27825
|
});
|
|
27826
27826
|
});
|
|
27827
27827
|
}, g = function(t, d) {
|
|
27828
|
-
t.onerror = function(
|
|
27829
|
-
(0,
|
|
27830
|
-
s.optionsRef.current.onError && s.optionsRef.current.onError(
|
|
27828
|
+
t.onerror = function(n) {
|
|
27829
|
+
(0, l.getSubscribers)(d).forEach(function(s) {
|
|
27830
|
+
s.optionsRef.current.onError && s.optionsRef.current.onError(n), m.isEventSourceSupported && t instanceof EventSource && (s.optionsRef.current.onClose && s.optionsRef.current.onClose(e(e({}, n), { code: 1006, reason: "An error occurred with the EventSource: ".concat(n), wasClean: !1 })), s.setReadyState(m.ReadyState.CLOSED));
|
|
27831
27831
|
}), m.isEventSourceSupported && t instanceof EventSource && t.close();
|
|
27832
27832
|
};
|
|
27833
|
-
}, o = function(t, d,
|
|
27833
|
+
}, o = function(t, d, n, s) {
|
|
27834
27834
|
var y;
|
|
27835
|
-
return
|
|
27835
|
+
return n.current.fromSocketIO && (y = (0, r.setUpSocketIOPing)(s)), 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
|
};
|
|
@@ -27842,30 +27842,30 @@ 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(),
|
|
27845
|
+
var e = oa(), i = j(), m = Lt(), l = Gt(), r = ua(), u = function(_, p, g, o, t) {
|
|
27846
27846
|
return function() {
|
|
27847
27847
|
if ((0, r.removeSubscriber)(_, p), !(0, r.hasSubscribers)(_)) {
|
|
27848
27848
|
try {
|
|
27849
27849
|
var d = e.sharedWebSockets[_];
|
|
27850
|
-
d instanceof WebSocket && (d.onclose = function(
|
|
27851
|
-
g.current.onClose && g.current.onClose(
|
|
27850
|
+
d instanceof WebSocket && (d.onclose = function(n) {
|
|
27851
|
+
g.current.onClose && g.current.onClose(n), 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, o, t, d,
|
|
27858
|
+
}, f = function(_, p, g, o, t, d, n, s, y) {
|
|
27859
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
27861
|
if (o.current.share) {
|
|
27862
27862
|
var b = null;
|
|
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,
|
|
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, l.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
27867
|
optionsRef: o,
|
|
27868
|
-
reconnectCount:
|
|
27868
|
+
reconnectCount: n,
|
|
27869
27869
|
lastMessageTime: s,
|
|
27870
27870
|
reconnect: d
|
|
27871
27871
|
};
|
|
@@ -27876,7 +27876,7 @@ function Mt() {
|
|
|
27876
27876
|
return (0, m.attachListeners)(_.current, {
|
|
27877
27877
|
setLastMessage: t,
|
|
27878
27878
|
setReadyState: g
|
|
27879
|
-
}, o, d.current,
|
|
27879
|
+
}, o, d.current, n, s, 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, o, t) {
|
|
27888
|
-
function d(
|
|
27889
|
-
return
|
|
27890
|
-
s(
|
|
27888
|
+
function d(n) {
|
|
27889
|
+
return n instanceof o ? n : new o(function(s) {
|
|
27890
|
+
s(n);
|
|
27891
27891
|
});
|
|
27892
27892
|
}
|
|
27893
|
-
return new (o || (o = Promise))(function(
|
|
27893
|
+
return new (o || (o = Promise))(function(n, s) {
|
|
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 ?
|
|
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
27913
|
}, m = ee && ee.__generator || function(p, g) {
|
|
27914
27914
|
var o = { label: 0, sent: function() {
|
|
27915
|
-
if (
|
|
27916
|
-
return
|
|
27917
|
-
}, trys: [], ops: [] }, t, d,
|
|
27915
|
+
if (n[0] & 1) throw n[1];
|
|
27916
|
+
return n[1];
|
|
27917
|
+
}, trys: [], ops: [] }, t, d, n, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
27918
27918
|
return s.next = y(0), s.throw = y(1), s.return = y(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
27919
27919
|
return this;
|
|
27920
27920
|
}), s;
|
|
@@ -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 (; s && (s = 0, c[0] && (o = 0)), o; ) try {
|
|
27929
|
-
if (t = 1, d && (
|
|
27930
|
-
switch (d = 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
|
-
|
|
27933
|
+
n = c;
|
|
27934
27934
|
break;
|
|
27935
27935
|
case 4:
|
|
27936
27936
|
return o.label++, { value: c[1], done: !1 };
|
|
@@ -27941,38 +27941,38 @@ function Rt() {
|
|
|
27941
27941
|
c = o.ops.pop(), o.trys.pop();
|
|
27942
27942
|
continue;
|
|
27943
27943
|
default:
|
|
27944
|
-
if (
|
|
27944
|
+
if (n = o.trys, !(n = n.length > 0 && n[n.length - 1]) && (c[0] === 6 || c[0] === 2)) {
|
|
27945
27945
|
o = 0;
|
|
27946
27946
|
continue;
|
|
27947
27947
|
}
|
|
27948
|
-
if (c[0] === 3 && (!
|
|
27948
|
+
if (c[0] === 3 && (!n || c[1] > n[0] && c[1] < n[3])) {
|
|
27949
27949
|
o.label = c[1];
|
|
27950
27950
|
break;
|
|
27951
27951
|
}
|
|
27952
|
-
if (c[0] === 6 && o.label <
|
|
27953
|
-
o.label =
|
|
27952
|
+
if (c[0] === 6 && o.label < n[1]) {
|
|
27953
|
+
o.label = n[1], n = c;
|
|
27954
27954
|
break;
|
|
27955
27955
|
}
|
|
27956
|
-
if (
|
|
27957
|
-
o.label =
|
|
27956
|
+
if (n && o.label < n[2]) {
|
|
27957
|
+
o.label = n[2], o.ops.push(c);
|
|
27958
27958
|
break;
|
|
27959
27959
|
}
|
|
27960
|
-
|
|
27960
|
+
n[2] && o.ops.pop(), o.trys.pop();
|
|
27961
27961
|
continue;
|
|
27962
27962
|
}
|
|
27963
27963
|
c = g.call(p, o);
|
|
27964
27964
|
} catch (T) {
|
|
27965
27965
|
c = [6, T], d = 0;
|
|
27966
27966
|
} finally {
|
|
27967
|
-
t =
|
|
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
|
-
},
|
|
27973
|
-
if (o || arguments.length === 2) for (var t = 0, d = g.length,
|
|
27974
|
-
(
|
|
27975
|
-
return p.concat(
|
|
27972
|
+
}, l = ee && ee.__spreadArray || function(p, g, o) {
|
|
27973
|
+
if (o || 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 r = sa(), u = j(), f = function(p) {
|
|
@@ -27982,7 +27982,7 @@ function Rt() {
|
|
|
27982
27982
|
}, _ = function(p, g) {
|
|
27983
27983
|
for (var o = [], t = 2; t < arguments.length; t++)
|
|
27984
27984
|
o[t - 2] = arguments[t];
|
|
27985
|
-
return i(void 0,
|
|
27985
|
+
return i(void 0, l([p, g], o, !0), void 0, function(d, n, 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) {
|
|
@@ -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(),
|
|
27997
|
+
return L.sent(), n.current.retryOnError ? (b = (E = n.current.reconnectAttempts) !== null && E !== void 0 ? E : u.DEFAULT_RECONNECT_LIMIT, s < b ? (c = typeof n.current.reconnectInterval == "function" ? n.current.reconnectInterval(s) : 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,
|
|
27999
|
+
return L.sent(), [2, (0, e.getUrl)(d, n, s + 1)];
|
|
28000
28000
|
case 5:
|
|
28001
|
-
return (D = (v =
|
|
28001
|
+
return (D = (v = n.current).onReconnectStop) === null || D === void 0 || D.call(v, s), [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 =
|
|
28013
|
+
return T = n.current.fromSocketIO ? (0, r.parseSocketIOUrl)(y) : y, S = n.current.queryParams ? (0, r.appendQueryParams)(T, n.current.queryParams) : T, [2, S];
|
|
28014
28014
|
}
|
|
28015
28015
|
});
|
|
28016
28016
|
});
|
|
@@ -28022,11 +28022,11 @@ var ia = {}, 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,
|
|
28025
|
+
var i = function(m, l) {
|
|
28026
28026
|
return new Proxy(m, {
|
|
28027
28027
|
get: function(r, u) {
|
|
28028
28028
|
var f = r[u];
|
|
28029
|
-
return u === "reconnect" ?
|
|
28029
|
+
return u === "reconnect" ? l : 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(r, 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
|
|
28047
|
-
|
|
28048
|
-
for (var b in
|
|
28046
|
+
for (var n, s = 1, y = arguments.length; s < y; s++) {
|
|
28047
|
+
n = arguments[s];
|
|
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,
|
|
28052
|
+
}, i = z && z.__awaiter || function(d, n, s, y) {
|
|
28053
28053
|
function b(c) {
|
|
28054
28054
|
return c instanceof s ? c : new s(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,
|
|
28076
|
+
v((y = y.apply(d, n || [])).next());
|
|
28077
28077
|
});
|
|
28078
|
-
}, m = z && z.__generator || function(d,
|
|
28078
|
+
}, m = z && z.__generator || function(d, n) {
|
|
28079
28079
|
var s = { 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] && s.ops.pop(), s.trys.pop();
|
|
28126
28126
|
continue;
|
|
28127
28127
|
}
|
|
28128
|
-
v =
|
|
28128
|
+
v = n.call(d, s);
|
|
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
|
-
},
|
|
28137
|
+
}, l = 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 r = Le, u = rt, f = j(), _ = Mt(), p = Rt(), g =
|
|
28142
|
-
|
|
28141
|
+
var r = Le, u = rt, f = j(), _ = Mt(), p = Rt(), g = l(Pt()), o = pa(), t = function(d, n, s) {
|
|
28142
|
+
n === void 0 && (n = f.DEFAULT_OPTIONS), s === void 0 && (s = !0);
|
|
28143
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
|
-
if (!
|
|
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,
|
|
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)(
|
|
28153
|
-
w.current =
|
|
28154
|
-
var A = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && s === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, re =
|
|
28151
|
+
}, [b, n.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)(n);
|
|
28153
|
+
w.current = n;
|
|
28154
|
+
var A = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && s === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, re = n.queryParams ? JSON.stringify(n.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");
|
|
@@ -28237,7 +28237,7 @@ 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(),
|
|
28240
|
+
var i = Le, m = ga(), l = j(), r = {
|
|
28241
28241
|
type: "empty",
|
|
28242
28242
|
payload: null
|
|
28243
28243
|
}, u = function(_) {
|
|
@@ -28252,15 +28252,15 @@ function xt() {
|
|
|
28252
28252
|
payload: g[1]
|
|
28253
28253
|
};
|
|
28254
28254
|
}, f = function(_, p, g) {
|
|
28255
|
-
p === void 0 && (p =
|
|
28255
|
+
p === void 0 && (p = l.DEFAULT_OPTIONS), g === void 0 && (g = !0);
|
|
28256
28256
|
var o = (0, i.useMemo)(function() {
|
|
28257
28257
|
return e(e({}, p), { fromSocketIO: !0 });
|
|
28258
|
-
}, []), t = (0, m.useWebSocket)(_, o, g), d = t.sendMessage,
|
|
28258
|
+
}, []), t = (0, m.useWebSocket)(_, o, g), d = t.sendMessage, n = 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 {
|
|
28262
28262
|
sendMessage: d,
|
|
28263
|
-
sendJsonMessage:
|
|
28263
|
+
sendJsonMessage: n,
|
|
28264
28264
|
lastMessage: c,
|
|
28265
28265
|
lastJsonMessage: c,
|
|
28266
28266
|
readyState: y,
|
|
@@ -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,
|
|
28293
|
+
var m = Le, l = ga(), r = j(), u = function(f, _, p) {
|
|
28294
28294
|
_ === void 0 && (_ = r.DEFAULT_EVENT_SOURCE_OPTIONS);
|
|
28295
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
|
-
} }),
|
|
28300
|
-
o && (
|
|
28301
|
-
var s = (0,
|
|
28299
|
+
} }), n = (0, m.useRef)(r.EMPTY_EVENT_HANDLERS);
|
|
28300
|
+
o && (n.current = o);
|
|
28301
|
+
var s = (0, l.useWebSocket)(f, d, p), y = s.lastMessage, b = s.readyState, c = s.getWebSocket;
|
|
28302
28302
|
return (0, m.useEffect)(function() {
|
|
28303
|
-
y?.type && Object.entries(
|
|
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
|
});
|
|
@@ -28324,9 +28324,9 @@ function Ht() {
|
|
|
28324
28324
|
Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
|
|
28325
28325
|
return m.useSocketIO;
|
|
28326
28326
|
} });
|
|
28327
|
-
var
|
|
28327
|
+
var l = j();
|
|
28328
28328
|
Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
|
|
28329
|
-
return
|
|
28329
|
+
return l.ReadyState;
|
|
28330
28330
|
} });
|
|
28331
28331
|
var r = Ot();
|
|
28332
28332
|
Object.defineProperty(e, "useEventSource", { 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
|
|
28358
|
+
const l = Ga(!1), r = Ga(i), {
|
|
28359
28359
|
sendMessage: u,
|
|
28360
28360
|
// 發送普通訊息
|
|
28361
28361
|
sendJsonMessage: f,
|
|
@@ -28369,7 +28369,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28369
28369
|
} = Ft(e, {
|
|
28370
28370
|
queryParams: { key: "wsky" },
|
|
28371
28371
|
onOpen: () => console.log("連線成功"),
|
|
28372
|
-
shouldReconnect: () =>
|
|
28372
|
+
shouldReconnect: () => l.current === !1,
|
|
28373
28373
|
reconnectAttempts: 9999,
|
|
28374
28374
|
reconnectInterval: 1e3,
|
|
28375
28375
|
...m
|
|
@@ -28394,7 +28394,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28394
28394
|
onDeposit: o,
|
|
28395
28395
|
onTransCode: t,
|
|
28396
28396
|
onError: d,
|
|
28397
|
-
onUpdateMember:
|
|
28397
|
+
onUpdateMember: n,
|
|
28398
28398
|
onMaintainNotice: s,
|
|
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
|
-
|
|
28419
|
+
n?.(E);
|
|
28420
28420
|
break;
|
|
28421
28421
|
case K.MAINTAIN_NOTICE:
|
|
28422
28422
|
s?.(E);
|
|
@@ -28438,7 +28438,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28438
28438
|
console.warn("Unknown socket type:", S);
|
|
28439
28439
|
break;
|
|
28440
28440
|
}
|
|
28441
|
-
}, [g]), De(() => () =>
|
|
28441
|
+
}, [g]), De(() => () => l.current = !0, []), {
|
|
28442
28442
|
sendMessage: u,
|
|
28443
28443
|
sendJsonMessage: f,
|
|
28444
28444
|
readyState: p
|
|
@@ -28446,8 +28446,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28446
28446
|
};
|
|
28447
28447
|
}, fi = () => {
|
|
28448
28448
|
const { client: e } = te(), i = V(async () => {
|
|
28449
|
-
const { data:
|
|
28450
|
-
return
|
|
28449
|
+
const { data: l } = await e.get("/carousels");
|
|
28450
|
+
return l;
|
|
28451
28451
|
}, [e]), m = V(async () => await e.get("/marquees"), [e]);
|
|
28452
28452
|
return { commonCarouselApi: i, commonMarqueeApi: m };
|
|
28453
28453
|
}, bl = () => {
|
|
@@ -28455,9 +28455,9 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28455
28455
|
return ie({
|
|
28456
28456
|
queryKey: ["getCarouselList"],
|
|
28457
28457
|
queryFn: async () => await i(),
|
|
28458
|
-
select: (
|
|
28459
|
-
const { data: r } =
|
|
28460
|
-
return r.map((f) => {
|
|
28458
|
+
select: (l) => {
|
|
28459
|
+
const { data: r } = l;
|
|
28460
|
+
return console.log(l), r.map((f) => {
|
|
28461
28461
|
const { carousels_lang: _ } = f;
|
|
28462
28462
|
return {
|
|
28463
28463
|
...f,
|
|
@@ -28474,8 +28474,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28474
28474
|
return ie({
|
|
28475
28475
|
queryKey: ["getMarqueeList"],
|
|
28476
28476
|
queryFn: async () => i(),
|
|
28477
|
-
select: (
|
|
28478
|
-
const r =
|
|
28477
|
+
select: (l) => {
|
|
28478
|
+
const r = l.Marquees;
|
|
28479
28479
|
return Be(r, (f) => f[m] || f["en-US"]);
|
|
28480
28480
|
}
|
|
28481
28481
|
});
|
|
@@ -28509,20 +28509,20 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28509
28509
|
) };
|
|
28510
28510
|
}, 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) => {
|
|
28511
28511
|
let i = {};
|
|
28512
|
-
return e.forEach((m,
|
|
28512
|
+
return e.forEach((m, l) => i[m] = l), 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,
|
|
28514
|
+
let i, m, l, r, u = "";
|
|
28515
28515
|
const f = e.length % 3;
|
|
28516
28516
|
for (let _ = 0; _ < e.length; ) {
|
|
28517
|
-
if ((m = e.charCodeAt(_++)) > 255 || (
|
|
28517
|
+
if ((m = e.charCodeAt(_++)) > 255 || (l = e.charCodeAt(_++)) > 255 || (r = e.charCodeAt(_++)) > 255)
|
|
28518
28518
|
throw new TypeError("invalid character found");
|
|
28519
|
-
i = m << 16 |
|
|
28519
|
+
i = m << 16 | l << 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
|
|
28525
|
-
m.push(H.apply(null, e.subarray(
|
|
28524
|
+
for (let l = 0, r = e.length; l < r; l += 4096)
|
|
28525
|
+
m.push(H.apply(null, e.subarray(l, l + 4096)));
|
|
28526
28526
|
return da(m.join(""));
|
|
28527
28527
|
}, Ze = (e, i = !1) => i ? yi(la(e)) : la(e), At = (e) => {
|
|
28528
28528
|
if (e.length < 2) {
|
|
@@ -28546,9 +28546,9 @@ 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,
|
|
28549
|
+
let i, m, l, 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 | (
|
|
28551
|
+
i = Je[e.charAt(u++)] << 18 | Je[e.charAt(u++)] << 12 | (m = Je[e.charAt(u++)]) << 6 | (l = Je[e.charAt(u++)]), m === 64 ? r.push(H(i >> 16 & 255)) : l === 64 ? r.push(H(i >> 16 & 255, i >> 8 & 255)) : r.push(H(i >> 16 & 255, i >> 8 & 255, i & 255));
|
|
28552
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")
|
|
@@ -28610,8 +28610,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28610
28610
|
return ie({
|
|
28611
28611
|
queryKey: ["playGame"],
|
|
28612
28612
|
queryFn: async () => {
|
|
28613
|
-
const { gameUid:
|
|
28614
|
-
gameUid:
|
|
28613
|
+
const { gameUid: l, gameCode: r, isMobile: u, gameCurrency: f, currentCurrency: _ } = e || {}, p = await m({
|
|
28614
|
+
gameUid: l,
|
|
28615
28615
|
gameCode: r,
|
|
28616
28616
|
isMobile: u,
|
|
28617
28617
|
gameCurrency: f,
|
|
@@ -28621,7 +28621,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28621
28621
|
lang: o,
|
|
28622
28622
|
not_support_iframe: t,
|
|
28623
28623
|
portrait: d,
|
|
28624
|
-
url:
|
|
28624
|
+
url: n,
|
|
28625
28625
|
is_html_code: s,
|
|
28626
28626
|
message: y
|
|
28627
28627
|
} = p;
|
|
@@ -28631,8 +28631,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28631
28631
|
supportIframe: !t,
|
|
28632
28632
|
supportPortrait: d,
|
|
28633
28633
|
isHtmlCode: s,
|
|
28634
|
-
gameUrl:
|
|
28635
|
-
decodeGameUrl: Yt.decode(
|
|
28634
|
+
gameUrl: n,
|
|
28635
|
+
decodeGameUrl: Yt.decode(n),
|
|
28636
28636
|
message: y
|
|
28637
28637
|
};
|
|
28638
28638
|
},
|
|
@@ -28676,12 +28676,12 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28676
28676
|
rankingGame: {}
|
|
28677
28677
|
}
|
|
28678
28678
|
} = {}) => {
|
|
28679
|
-
const i = Xt({ options: e.login }), m = $t({ options: e.logout }),
|
|
28679
|
+
const i = Xt({ options: e.login }), m = $t({ options: e.logout }), l = el({
|
|
28680
28680
|
options: e.toggleFavoriteGame
|
|
28681
28681
|
}), r = al({
|
|
28682
28682
|
options: e.rankingGame
|
|
28683
28683
|
});
|
|
28684
|
-
return { login: i, logout: m, toggleFavoriteGame:
|
|
28684
|
+
return { login: i, logout: m, toggleFavoriteGame: l, rankingGame: r };
|
|
28685
28685
|
}, ti = (e) => {
|
|
28686
28686
|
switch (e) {
|
|
28687
28687
|
case "tw":
|
|
@@ -28703,7 +28703,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28703
28703
|
}
|
|
28704
28704
|
}, il = "https://d1h3qe8voog6w4.cloudfront.net", li = "https://d3jx2uvukujuvn.cloudfront.net", ni = "game-icon-ds88", hl = ({ gameData: e = {} } = {}) => {
|
|
28705
28705
|
const { lng: i } = te(), m = ti(i), {
|
|
28706
|
-
gameCode:
|
|
28706
|
+
gameCode: l,
|
|
28707
28707
|
// 遊戲代碼
|
|
28708
28708
|
gameUid: r,
|
|
28709
28709
|
// 遊戲唯一標識符
|
|
@@ -28724,7 +28724,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28724
28724
|
// 遊戲類型
|
|
28725
28725
|
game_tags: d,
|
|
28726
28726
|
// 遊戲標籤
|
|
28727
|
-
isUnderMaintenance:
|
|
28727
|
+
isUnderMaintenance: n,
|
|
28728
28728
|
// 是否維護中
|
|
28729
28729
|
support_vertical: s,
|
|
28730
28730
|
// 是否支援直向
|
|
@@ -28740,9 +28740,9 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28740
28740
|
// 越南名稱
|
|
28741
28741
|
gameNameTw: E
|
|
28742
28742
|
// 繁體中文名稱
|
|
28743
|
-
} = e, v = e?.[`gameName${ti(m)}`], D = `${li}/${ni}/en/${g}/${Ra(
|
|
28743
|
+
} = e, v = e?.[`gameName${ti(m)}`], D = `${li}/${ni}/en/${g}/${Ra(l, / /g, "_")}.webp`, L = `${li}/${ni}/en/${g}/${Ra(l, / /g, "_")}.gif`;
|
|
28744
28744
|
return {
|
|
28745
|
-
gameCode:
|
|
28745
|
+
gameCode: l,
|
|
28746
28746
|
gameUid: r,
|
|
28747
28747
|
gameTypeUid: u,
|
|
28748
28748
|
providerUid: f,
|
|
@@ -28752,7 +28752,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28752
28752
|
gameSubType: o,
|
|
28753
28753
|
gameType: t,
|
|
28754
28754
|
gameTags: d,
|
|
28755
|
-
isUnderMaintenance:
|
|
28755
|
+
isUnderMaintenance: n,
|
|
28756
28756
|
supportVertical: s,
|
|
28757
28757
|
supportHorizontal: y,
|
|
28758
28758
|
userClickCount: b,
|
|
@@ -28779,7 +28779,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28779
28779
|
const {
|
|
28780
28780
|
SubPlatformEnum: m,
|
|
28781
28781
|
// 子平台枚舉
|
|
28782
|
-
platformEnum:
|
|
28782
|
+
platformEnum: l,
|
|
28783
28783
|
// 平台枚舉
|
|
28784
28784
|
isUnderMaintenance: r,
|
|
28785
28785
|
// 是否維護中
|
|
@@ -28797,10 +28797,10 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28797
28797
|
// 臨時維護開始時間
|
|
28798
28798
|
temp_maintenance_end_time: t
|
|
28799
28799
|
// 臨時維護結束時間
|
|
28800
|
-
} = e || {}, d = `${il}/${tl}/${ll(
|
|
28800
|
+
} = e || {}, d = `${il}/${tl}/${ll(l, i)}.png`;
|
|
28801
28801
|
return {
|
|
28802
28802
|
subPlatformEnum: m,
|
|
28803
|
-
platformEnum:
|
|
28803
|
+
platformEnum: l,
|
|
28804
28804
|
isUnderMaintenance: r,
|
|
28805
28805
|
maintenanceStartTime: u,
|
|
28806
28806
|
maintenanceEndTime: f,
|