@obb871001/api-integration-sdk 1.0.320 → 1.0.321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import de, { createContext as qi, useContext as ct, useState as ot, useMemo as Oa, useCallback as I, useRef as ee, useEffect as ge } from "react";
2
2
  import { useQueries as Wn, useQuery as Q, useQueryClient as ft, useMutation as re, QueryClient as Ol, QueryClientProvider as Bl } from "@tanstack/react-query";
3
3
  import Hl from "axios";
4
- import { get as le, find as qe, isEmpty as Ee, entries as zn, forEach as Wl, map as Be, isArray as la, toLower as Dt, omit as zl, replace as ai, includes as Il, isObject as $i, flatMap as Qi, values as Vl, keys as Et } from "lodash";
4
+ import { get as le, find as $e, isEmpty as Ee, entries as zn, forEach as Wl, map as Be, isArray as la, toLower as Dt, omit as zl, replace as ai, includes as Il, isObject as $i, flatMap as Qi, values as Vl, keys as Et } from "lodash";
5
5
  import Jl from "react-dom";
6
6
  var et = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7
7
  function _t(e) {
@@ -277,9 +277,9 @@ function ql() {
277
277
  if (be !== 1 || he !== 1)
278
278
  do
279
279
  if (be--, he--, he < 0 || X[be] !== Oe[he]) {
280
- var Ke = `
280
+ var qe = `
281
281
  ` + X[be].replace(" at new ", " at ");
282
- return T.displayName && Ke.includes("<anonymous>") && (Ke = Ke.replace("<anonymous>", T.displayName)), typeof T == "function" && te.set(T, Ke), Ke;
282
+ return T.displayName && qe.includes("<anonymous>") && (qe = qe.replace("<anonymous>", T.displayName)), typeof T == "function" && te.set(T, qe), qe;
283
283
  }
284
284
  while (be >= 1 && he >= 0);
285
285
  break;
@@ -378,7 +378,7 @@ function ql() {
378
378
  if (aa(T))
379
379
  return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(T)), ia(T);
380
380
  }
381
- var Re = y.ReactCurrentOwner, Qe = {
381
+ var Re = y.ReactCurrentOwner, je = {
382
382
  key: !0,
383
383
  ref: !0,
384
384
  __self: !0,
@@ -392,7 +392,7 @@ function ql() {
392
392
  }
393
393
  return T.ref !== void 0;
394
394
  }
395
- function je(T) {
395
+ function Ye(T) {
396
396
  if (Ue.call(T, "key")) {
397
397
  var z = Object.getOwnPropertyDescriptor(T, "key").get;
398
398
  if (z && z.isReactWarning)
@@ -457,9 +457,9 @@ function ql() {
457
457
  function Va(T, z, J, $, ue) {
458
458
  {
459
459
  var pe, ne = {}, X = null, Oe = null;
460
- J !== void 0 && (xe(J), X = "" + J), je(z) && (xe(z.key), X = "" + z.key), Ve(z) && (Oe = z.ref, za(z, ue));
460
+ J !== void 0 && (xe(J), X = "" + J), Ye(z) && (xe(z.key), X = "" + z.key), Ve(z) && (Oe = z.ref, za(z, ue));
461
461
  for (pe in z)
462
- Ue.call(z, pe) && !Qe.hasOwnProperty(pe) && (ne[pe] = z[pe]);
462
+ Ue.call(z, pe) && !je.hasOwnProperty(pe) && (ne[pe] = z[pe]);
463
463
  if (T && T.defaultProps) {
464
464
  var be = T.defaultProps;
465
465
  for (pe in be)
@@ -473,7 +473,7 @@ function ql() {
473
473
  }
474
474
  }
475
475
  var da = y.ReactCurrentOwner, ya = y.ReactDebugCurrentFrame;
476
- function Ze(T) {
476
+ function Ke(T) {
477
477
  if (T) {
478
478
  var z = T._owner, J = ke(T.type, T._source, z ? z.type : null);
479
479
  ya.setExtraStackFrame(J);
@@ -523,7 +523,7 @@ Check the top-level render call using <` + J + ">.");
523
523
  return;
524
524
  Ua[J] = !0;
525
525
  var $ = "";
526
- T && T._owner && T._owner !== da.current && ($ = " It was passed a child from " + B(T._owner.type) + "."), Ze(T), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', J, $), Ze(null);
526
+ T && T._owner && T._owner !== da.current && ($ = " It was passed a child from " + B(T._owner.type) + "."), Ke(T), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', J, $), Ke(null);
527
527
  }
528
528
  }
529
529
  function Se(T, z) {
@@ -575,11 +575,11 @@ Check the top-level render call using <` + J + ">.");
575
575
  for (var z = Object.keys(T.props), J = 0; J < z.length; J++) {
576
576
  var $ = z[J];
577
577
  if ($ !== "children" && $ !== "key") {
578
- Ze(T), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Ze(null);
578
+ Ke(T), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Ke(null);
579
579
  break;
580
580
  }
581
581
  }
582
- T.ref !== null && (Ze(T), _("Invalid attribute `ref` supplied to `React.Fragment`."), Ze(null));
582
+ T.ref !== null && (Ke(T), _("Invalid attribute `ref` supplied to `React.Fragment`."), Ke(null));
583
583
  }
584
584
  }
585
585
  var ta = {};
@@ -598,17 +598,17 @@ Check the top-level render call using <` + J + ">.");
598
598
  if (he == null)
599
599
  return he;
600
600
  if (ne) {
601
- var Ke = z.children;
602
- if (Ke !== void 0)
601
+ var qe = z.children;
602
+ if (qe !== void 0)
603
603
  if ($)
604
- if (ve(Ke)) {
605
- for (var Ra = 0; Ra < Ke.length; Ra++)
606
- Se(Ke[Ra], T);
607
- Object.freeze && Object.freeze(Ke);
604
+ if (ve(qe)) {
605
+ for (var Ra = 0; Ra < qe.length; Ra++)
606
+ Se(qe[Ra], T);
607
+ Object.freeze && Object.freeze(qe);
608
608
  } else
609
609
  _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
610
610
  else
611
- Se(Ke, T);
611
+ Se(qe, T);
612
612
  }
613
613
  if (Ue.call(z, "key")) {
614
614
  var ba = B(T), We = Object.keys(z).filter(function(Al) {
@@ -668,7 +668,7 @@ const In = qi(null), oe = () => {
668
668
  if (!e)
669
669
  throw new Error("useStatus must be used within a StatusProvider");
670
670
  return e;
671
- }, $e = (e) => {
671
+ }, Qe = (e) => {
672
672
  switch (e) {
673
673
  case "tw":
674
674
  return "zh_TW";
@@ -687,7 +687,7 @@ const In = qi(null), oe = () => {
687
687
  default:
688
688
  return e;
689
689
  }
690
- }, Xe = "https://d1h3qe8voog6w4.cloudfront.net", ti = "https://d3jx2uvukujuvn.cloudfront.net", Zn = (e) => `${Xe}/reward_icon/${e}.avif`, Kn = () => `${Xe}/reward_icon/background_deposit.avif`, qn = "ds88platformIcon", ja = {
690
+ }, Ze = "https://d1h3qe8voog6w4.cloudfront.net", ti = "https://d3jx2uvukujuvn.cloudfront.net", Zn = (e) => `${Ze}/reward_icon/${e}.avif`, Kn = () => `${Ze}/reward_icon/background_deposit.avif`, qn = "ds88platformIcon", ja = {
691
691
  zh_TW: "系統提示",
692
692
  zh_CN: "系统提示",
693
693
  en_US: "System Prompt",
@@ -730,7 +730,7 @@ function Mt({
730
730
  "發生錯誤,請稍後再試。"
731
731
  );
732
732
  if (r) {
733
- const s = $e(l);
733
+ const s = Qe(l);
734
734
  p?.dispatch({
735
735
  type: "ui/showToast",
736
736
  payload: {
@@ -778,7 +778,7 @@ const $n = qi(null), Cm = () => {
778
778
  minimumFractionDigits: 2,
779
779
  maximumFractionDigits: 2
780
780
  }).format(n);
781
- }, Qn = (e = [], n) => qe(e, { gameTypeName: n })?.gameTypeUid, jn = (e = [], n) => qe(e, { platform: n })?.platformUid, Yn = (e = [], n) => qe(e, { SubPlatformEnum: n }), Xn = (e = [], n, i) => Ee(e) ? [] : e.filter((l) => i ? String(l?.SubPlatformEnumUid) === String(i?.SubPlatformEnumUid) : String(l.platformUid) === String(n)), jl = (e = []) => Ee(e) ? {} : e.reduce((n, i) => {
781
+ }, Qn = (e = [], n) => $e(e, { gameTypeName: n })?.gameTypeUid, jn = (e = [], n) => $e(e, { platform: n })?.platformUid, Yn = (e = [], n) => $e(e, { SubPlatformEnum: n }), Xn = (e = [], n, i) => Ee(e) ? [] : e.filter((l) => i ? String(l?.SubPlatformEnumUid) === String(i?.SubPlatformEnumUid) : String(l.platformUid) === String(n)), jl = (e = []) => Ee(e) ? {} : e.reduce((n, i) => {
782
782
  const l = i?.game_subtype || "UNKNOWN";
783
783
  return n[l] || (n[l] = []), n[l].push(i), n;
784
784
  }, {}), Yl = ({
@@ -2410,8 +2410,8 @@ function al() {
2410
2410
  if (Me < 16)
2411
2411
  He = aa.high = m[c + Me * 2] | 0, ve = aa.low = m[c + Me * 2 + 1] | 0;
2412
2412
  else {
2413
- var ia = s[Me - 15], xe = ia.high, Re = ia.low, Qe = (xe >>> 1 | Re << 31) ^ (xe >>> 8 | Re << 24) ^ xe >>> 7, oa = (Re >>> 1 | xe << 31) ^ (Re >>> 8 | xe << 24) ^ (Re >>> 7 | xe << 25), ga = s[Me - 2], Ve = ga.high, je = ga.low, za = (Ve >>> 19 | je << 13) ^ (Ve << 3 | je >>> 29) ^ Ve >>> 6, Da = (je >>> 19 | Ve << 13) ^ (je << 3 | Ve >>> 29) ^ (je >>> 6 | Ve << 26), Ea = s[Me - 7], Ia = Ea.high, Va = Ea.low, da = s[Me - 16], ya = da.high, Ze = da.low;
2414
- ve = oa + Va, He = Qe + Ia + (ve >>> 0 < oa >>> 0 ? 1 : 0), ve = ve + Da, He = He + za + (ve >>> 0 < Da >>> 0 ? 1 : 0), ve = ve + Ze, He = He + ya + (ve >>> 0 < Ze >>> 0 ? 1 : 0), aa.high = He, aa.low = ve;
2413
+ var ia = s[Me - 15], xe = ia.high, Re = ia.low, je = (xe >>> 1 | Re << 31) ^ (xe >>> 8 | Re << 24) ^ xe >>> 7, oa = (Re >>> 1 | xe << 31) ^ (Re >>> 8 | xe << 24) ^ (Re >>> 7 | xe << 25), ga = s[Me - 2], Ve = ga.high, Ye = ga.low, za = (Ve >>> 19 | Ye << 13) ^ (Ve << 3 | Ye >>> 29) ^ Ve >>> 6, Da = (Ye >>> 19 | Ve << 13) ^ (Ye << 3 | Ve >>> 29) ^ (Ye >>> 6 | Ve << 26), Ea = s[Me - 7], Ia = Ea.high, Va = Ea.low, da = s[Me - 16], ya = da.high, Ke = da.low;
2414
+ ve = oa + Va, He = je + Ia + (ve >>> 0 < oa >>> 0 ? 1 : 0), ve = ve + Da, He = He + za + (ve >>> 0 < Da >>> 0 ? 1 : 0), ve = ve + Ke, He = He + ya + (ve >>> 0 < Ke >>> 0 ? 1 : 0), aa.high = He, aa.low = ve;
2415
2415
  }
2416
2416
  var ca = me & ke ^ ~me & Ie, fa = ce & Ue ^ ~ce & Ce, Na = K & j ^ K & ae ^ j & ae, La = q & Z ^ q & te ^ Z & te, Ua = (K >>> 28 | q << 4) ^ (K << 30 | q >>> 2) ^ (K << 25 | q >>> 7), Ga = (q >>> 28 | K << 4) ^ (q << 30 | K >>> 2) ^ (q << 25 | K >>> 7), Ma = (me >>> 14 | ce << 18) ^ (me >>> 18 | ce << 14) ^ (me << 23 | ce >>> 9), Se = (ce >>> 14 | me << 18) ^ (ce >>> 18 | me << 14) ^ (ce << 23 | me >>> 9), V = o[Me], De = V.high, ta = V.low, Pe = ea + Se, na = Ge + Ma + (Pe >>> 0 < ea >>> 0 ? 1 : 0), Pe = Pe + fa, na = na + ca + (Pe >>> 0 < fa >>> 0 ? 1 : 0), Pe = Pe + ta, na = na + De + (Pe >>> 0 < ta >>> 0 ? 1 : 0), Pe = Pe + ve, na = na + He + (Pe >>> 0 < ve >>> 0 ? 1 : 0), ei = Ga + La, Yi = Ua + Na + (ei >>> 0 < Ga >>> 0 ? 1 : 0);
2417
2417
  Ge = Ie, ea = Ce, Ie = ke, Ce = Ue, ke = me, Ue = ce, ce = ye + Pe | 0, me = _e + na + (ce >>> 0 < ye >>> 0 ? 1 : 0) | 0, _e = ae, ye = te, ae = j, te = Z, j = K, Z = q, q = Pe + ei | 0, K = na + Yi + (q >>> 0 < Pe >>> 0 ? 1 : 0) | 0;
@@ -6413,7 +6413,7 @@ const Ca = /* @__PURE__ */ _t(Zi), Pa = (e) => {
6413
6413
  r
6414
6414
  ];
6415
6415
  }, bt = () => {
6416
- const { client: e, lng: n } = oe(), i = $e(n || "tw"), l = I(
6416
+ const { client: e, lng: n } = oe(), i = Qe(n || "tw"), l = I(
6417
6417
  async (b) => {
6418
6418
  const {
6419
6419
  gameUid: d = "",
@@ -7367,7 +7367,7 @@ const Eo = /* @__PURE__ */ _t(Do), No = ({
7367
7367
  isInGameBox: l = !1,
7368
7368
  currentGamePlatform: p = ""
7369
7369
  }) => {
7370
- const { store: g, lng: b } = oe(), { isReady: d, setAsReady: r, isPending: a, setAsPending: t } = Jn(), o = $e(b), { mutateAsync: s } = Ho();
7370
+ const { store: g, lng: b } = oe(), { isReady: d, setAsReady: r, isPending: a, setAsPending: t } = Jn(), o = Qe(b), { mutateAsync: s } = Ho();
7371
7371
  return !e || !n || !i ? { handleTransferInGame: () => {
7372
7372
  } } : { handleTransferInGame: async () => {
7373
7373
  console.log("執行遊戲內轉帳"), l && await s({
@@ -7538,7 +7538,7 @@ const Eo = /* @__PURE__ */ _t(Do), No = ({
7538
7538
  queryFn: async () => i(),
7539
7539
  select: (l) => {
7540
7540
  const { data: p } = l;
7541
- return qe(p?.base, {
7541
+ return $e(p?.base, {
7542
7542
  currency: n
7543
7543
  }) || {};
7544
7544
  },
@@ -7729,7 +7729,7 @@ const Eo = /* @__PURE__ */ _t(Do), No = ({
7729
7729
  enableNotification: g = !1,
7730
7730
  disabledLineAutoRegister: b = !1
7731
7731
  }) => {
7732
- const { store: d, lng: r } = oe(), a = ft(), { isReady: t, setAsReady: o, isPending: s, setAsPending: u } = Jn(), m = $e(r), c = ee(!1), f = ee(n), y = le(l, "uid", null);
7732
+ const { store: d, lng: r } = oe(), a = ft(), { isReady: t, setAsReady: o, isPending: s, setAsPending: u } = Jn(), m = Qe(r), c = ee(!1), f = ee(n), y = le(l, "uid", null);
7733
7733
  le(l, "testFunction", 0);
7734
7734
  const _ = new URLSearchParams(window.location.search), U = le(
7735
7735
  p,
@@ -7990,24 +7990,24 @@ const Eo = /* @__PURE__ */ _t(Do), No = ({
7990
7990
  settleEventApi: g
7991
7991
  };
7992
7992
  }, Jo = ({ paramsData: e, options: n } = {}) => {
7993
- const { store: i, lng: l, data2URL: p } = oe(), { eventListApi: g } = Ya(), b = i?.getState()?.isWalletCurrency || i?.getState()?.currency?.currentCurrency || "TWD", d = $e(l);
7993
+ const { store: i, lng: l, data2URL: p } = oe(), { eventListApi: g } = Ya(), b = i?.getState()?.isWalletCurrency || i?.getState()?.currency?.currentCurrency || "TWD", d = Qe(l);
7994
7994
  return Q({
7995
7995
  queryKey: ["eventList", e],
7996
7996
  queryFn: () => g({ paramsData: e }),
7997
7997
  select: (r) => {
7998
7998
  const { data: a } = r;
7999
7999
  return Be(a, (o) => {
8000
- const { events_attributes: s } = o, u = qe(
8000
+ const { events_attributes: s } = o, u = $e(
8001
8001
  s,
8002
8002
  (v) => v.attribute_currency === b
8003
- ) || s[0], m = le(u, "rewards", {}), c = le(o, "carousels.[0]", {}), f = qe(c.carousels_lang, (v) => v.lang === d) || c?.carousels_lang?.[0], y = {
8003
+ ) || s[0], m = le(u, "rewards", {}), c = le(o, "carousels.[0]", {}), f = $e(c.carousels_lang, (v) => v.lang === d) || c?.carousels_lang?.[0], y = {
8004
8004
  ...c,
8005
8005
  currentLngCarousel: {
8006
8006
  ...f,
8007
8007
  carouselCurrentLanguagePCImageUrl: `${p}/carousels/${f?.image_pc}`,
8008
8008
  carouselCurrentLanguageMBImageUrl: `${p}/carousels/${f?.image_mobile}`,
8009
- carouselCurrentLanguageS3PCImageUrl: `${Xe}/carousels/${f?.image_pc}`,
8010
- carouselCurrentLanguageS3MBImageUrl: `${Xe}/carousels/${f?.image_mobile}`
8009
+ carouselCurrentLanguageS3PCImageUrl: `${Ze}/carousels/${f?.image_pc}`,
8010
+ carouselCurrentLanguageS3MBImageUrl: `${Ze}/carousels/${f?.image_mobile}`
8011
8011
  }
8012
8012
  }, _ = {
8013
8013
  eventUid: o.uid,
@@ -8153,7 +8153,7 @@ const Eo = /* @__PURE__ */ _t(Do), No = ({
8153
8153
  checkEventStatusQuery: l
8154
8154
  };
8155
8155
  }, Jm = ({ skipPreload: e = !1 }) => {
8156
- const { lng: n, data2URL: i } = oe(), { commonCarouselApi: l } = Ha(), p = $e(n);
8156
+ const { lng: n, data2URL: i } = oe(), { commonCarouselApi: l } = Ha(), p = Qe(n);
8157
8157
  return Q({
8158
8158
  queryKey: ["getCarouselList", e],
8159
8159
  queryFn: async () => {
@@ -8167,14 +8167,21 @@ const Eo = /* @__PURE__ */ _t(Do), No = ({
8167
8167
  carouselCurrentLanguageData: a,
8168
8168
  carouselCurrentLanguagePCImageUrl: `${i}/carousels/${a?.image_pc}`,
8169
8169
  carouselCurrentLanguageMBImageUrl: `${i}/carousels/${a?.image_mobile}`,
8170
- carouselCurrentLanguageS3PCImageUrl: `${Xe}/carousels/${a?.image_pc}`,
8171
- carouselCurrentLanguageS3MBImageUrl: `${Xe}/carousels/${a?.image_mobile}`,
8172
- carouselCurrentLanguageLink: a?.url_link
8170
+ carouselCurrentLanguageS3PCImageUrl: `${Ze}/carousels/${a?.image_pc}`,
8171
+ carouselCurrentLanguageS3MBImageUrl: `${Ze}/carousels/${a?.image_mobile}`,
8172
+ carouselCurrentLanguageLink: a?.url_link,
8173
+ currentLngCarousel: {
8174
+ ...a,
8175
+ carouselCurrentLanguagePCImageUrl: `${i}/carousels/${a?.image_pc}`,
8176
+ carouselCurrentLanguageMBImageUrl: `${i}/carousels/${a?.image_mobile}`,
8177
+ carouselCurrentLanguageS3PCImageUrl: `${Ze}/carousels/${a?.image_pc}`,
8178
+ carouselCurrentLanguageS3MBImageUrl: `${Ze}/carousels/${a?.image_mobile}`
8179
+ }
8173
8180
  };
8174
8181
  })
8175
8182
  });
8176
8183
  }, Zm = () => {
8177
- const { lng: e } = oe(), { commonMarqueeApi: n } = Ha(), i = $e(e);
8184
+ const { lng: e } = oe(), { commonMarqueeApi: n } = Ha(), i = Qe(e);
8178
8185
  return Q({
8179
8186
  queryKey: ["getMarqueeList"],
8180
8187
  queryFn: async () => {
@@ -8261,9 +8268,9 @@ var qo = Object.create, nl = Object.defineProperty, $o = Object.getOwnPropertyDe
8261
8268
  });
8262
8269
  });
8263
8270
  as(is());
8264
- var pa = (typeof window > "u" ? "undefined" : typeof window) == "object", Ye = { setTimeout: pa ? setTimeout.bind(window) : setTimeout, clearTimeout: pa ? clearTimeout.bind(window) : clearTimeout, setInterval: pa ? setInterval.bind(window) : setInterval, clearInterval: pa ? clearInterval.bind(window) : clearInterval };
8271
+ var pa = (typeof window > "u" ? "undefined" : typeof window) == "object", Xe = { setTimeout: pa ? setTimeout.bind(window) : setTimeout, clearTimeout: pa ? clearTimeout.bind(window) : clearTimeout, setInterval: pa ? setInterval.bind(window) : setInterval, clearInterval: pa ? clearInterval.bind(window) : clearInterval };
8265
8272
  function ts(e) {
8266
- Ye.setTimeout = e.setTimeout, Ye.clearTimeout = e.clearTimeout, Ye.setInterval = e.setInterval, Ye.clearInterval = e.clearInterval;
8273
+ Xe.setTimeout = e.setTimeout, Xe.clearTimeout = e.clearTimeout, Xe.setInterval = e.setInterval, Xe.clearInterval = e.clearInterval;
8267
8274
  }
8268
8275
  var wa = {}, ns = class {
8269
8276
  name;
@@ -8280,7 +8287,7 @@ var wa = {}, ns = class {
8280
8287
  postMessage(e) {
8281
8288
  if (this.closed) throw new Error("InvalidStateError");
8282
8289
  let n = JSON.stringify(e), i = `${this.name}:${String(Date.now())}${String(Math.random())}`;
8283
- window.localStorage.setItem(i, n), Ye.setTimeout(() => {
8290
+ window.localStorage.setItem(i, n), Xe.setTimeout(() => {
8284
8291
  window.localStorage.removeItem(i);
8285
8292
  }, 500), wa[this.name].forEach((l) => {
8286
8293
  l !== this && l.mc.port2.postMessage(JSON.parse(n));
@@ -8315,7 +8322,7 @@ var wa = {}, ns = class {
8315
8322
  }
8316
8323
  }, ls = typeof window > "u" ? void 0 : typeof window.BroadcastChannel == "function" ? window.BroadcastChannel : ns;
8317
8324
  function rs(e = 0) {
8318
- return new Promise((n) => Ye.setTimeout(n, e));
8325
+ return new Promise((n) => Xe.setTimeout(n, e));
8319
8326
  }
8320
8327
  function ll() {
8321
8328
  return Math.random().toString(36).substring(2);
@@ -8357,13 +8364,13 @@ var os = class {
8357
8364
  if (e) return;
8358
8365
  e = !0;
8359
8366
  try {
8360
- Ye.clearInterval(n);
8367
+ Xe.clearInterval(n);
8361
8368
  } catch {
8362
8369
  }
8363
8370
  let g = this.intervals.indexOf(n);
8364
8371
  g >= 0 && this.intervals.splice(g, 1), this.channel.removeEventListener("message", p), i();
8365
8372
  };
8366
- n = Ye.setInterval(() => {
8373
+ n = Xe.setInterval(() => {
8367
8374
  this.apply().then(() => {
8368
8375
  this.isLeader && l();
8369
8376
  });
@@ -8395,7 +8402,7 @@ var os = class {
8395
8402
  if (!this.isDead) {
8396
8403
  this.isDead = !0, this.isLeader = !1, this.sendAction(2);
8397
8404
  try {
8398
- this.listeners.forEach((e) => this.channel.removeEventListener("message", e)), this.intervals.forEach((e) => Ye.clearInterval(e));
8405
+ this.listeners.forEach((e) => this.channel.removeEventListener("message", e)), this.intervals.forEach((e) => Xe.clearInterval(e));
8399
8406
  } catch {
8400
8407
  }
8401
8408
  }
@@ -8538,7 +8545,7 @@ function gs({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8538
8545
  if (i >= e) throw new Error(`❌ The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);
8539
8546
  if (i ? (F.current = e - i, M.current = i) : (F.current = e, M.current = n), !P.current) {
8540
8547
  if (y || S) return;
8541
- R.current && (me.current(null, Se), E.current && E.current.active()), Qe();
8548
+ R.current && (me.current(null, Se), E.current && E.current.active()), je();
8542
8549
  }
8543
8550
  }, [e, n, i, y, S]);
8544
8551
  let K = ee(_);
@@ -8547,7 +8554,7 @@ function gs({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8547
8554
  }, [_]);
8548
8555
  let q = ee(b), j = ee(l), Z = ee([...(/* @__PURE__ */ new Set([...p, ...b])).values()]), ae = ee(S);
8549
8556
  ge(() => {
8550
- ae.current = S, !P.current && (S ? Ve() : y || Qe());
8557
+ ae.current = S, !P.current && (S ? Ve() : y || je());
8551
8558
  }, [S]);
8552
8559
  let te = ee(d);
8553
8560
  ge(() => {
@@ -8583,9 +8590,9 @@ function gs({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8583
8590
  }, v));
8584
8591
  }, [U, v]);
8585
8592
  let Ce = () => {
8586
- D.current !== null && (Ye.clearTimeout(D.current), D.current = null);
8593
+ D.current !== null && (Xe.clearTimeout(D.current), D.current = null);
8587
8594
  }, Ge = (V, De = !0) => {
8588
- Ce(), D.current = Ye.setTimeout(He, V || F.current), De && (h.current = Te());
8595
+ Ce(), D.current = Xe.setTimeout(He, V || F.current), De && (h.current = Te());
8589
8596
  }, ea = (V) => {
8590
8597
  !W.current && !R.current && (_e.current(V, Se), te.current({ type: "active", prompted: !0 }, Se)), G.current = 0, w.current = Te(), W.current = !0, Ge(M.current, !1);
8591
8598
  }, Me = () => {
@@ -8629,12 +8636,12 @@ function gs({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8629
8636
  pa && j.current && (O.current || V) && (Z.current.forEach((De) => {
8630
8637
  j.current.removeEventListener(De, ia.current, { capture: !0 });
8631
8638
  }), O.current = !1);
8632
- }, Qe = I((V) => ae.current ? !1 : (Ce(), xe(), R.current = !1, W.current = !1, N.current = !1, G.current = 0, w.current = 0, E.current && !V && E.current.start(), Ge(), !0), [D, R, ae, F, E]), oa = I((V) => ae.current ? !1 : (Ce(), xe(), H.current = Te(), A.current += Te() - k.current, B.current += Te() - k.current, A.current = 0, R.current = !1, W.current = !1, N.current = !1, G.current = 0, w.current = 0, E.current && !V && E.current.reset(), y || Ge(), !0), [D, R, F, y, ae, E]), ga = I((V) => ae.current ? !1 : (Ce(), xe(), (R.current || W.current) && ve(), R.current = !1, W.current = !1, N.current = !1, G.current = 0, w.current = 0, H.current = Te(), E.current && !V && E.current.activate(), Ge(), !0), [D, R, W, ae, F, E]), Ve = I((V = !1) => ae.current || N.current ? !1 : (G.current = ya(), N.current = !0, Re(), Ce(), E.current && !V && E.current.pause(), !0), [D, ae, E]), je = I((V = !1) => ae.current || !N.current ? !1 : (N.current = !1, W.current || xe(), R.current || Ge(G.current), w.current && (w.current = Te()), E.current && !V && E.current.resume(), !0), [D, F, ae, G, E]), za = I((V, De) => (E.current ? (De && ke.current(V, Se), E.current.message(V)) : De && ke.current(V, Se), !0), [s]), Da = I(() => R.current, [R]), Ea = I(() => W.current, [W]), Ia = I(() => E.current ? E.current.isLeader : null, [E]), Va = I(() => E.current ? E.current.isLastActive : null, [E]), da = I(() => E.current ? E.current.token : null, [E]), ya = I(() => {
8639
+ }, je = I((V) => ae.current ? !1 : (Ce(), xe(), R.current = !1, W.current = !1, N.current = !1, G.current = 0, w.current = 0, E.current && !V && E.current.start(), Ge(), !0), [D, R, ae, F, E]), oa = I((V) => ae.current ? !1 : (Ce(), xe(), H.current = Te(), A.current += Te() - k.current, B.current += Te() - k.current, A.current = 0, R.current = !1, W.current = !1, N.current = !1, G.current = 0, w.current = 0, E.current && !V && E.current.reset(), y || Ge(), !0), [D, R, F, y, ae, E]), ga = I((V) => ae.current ? !1 : (Ce(), xe(), (R.current || W.current) && ve(), R.current = !1, W.current = !1, N.current = !1, G.current = 0, w.current = 0, H.current = Te(), E.current && !V && E.current.activate(), Ge(), !0), [D, R, W, ae, F, E]), Ve = I((V = !1) => ae.current || N.current ? !1 : (G.current = ya(), N.current = !0, Re(), Ce(), E.current && !V && E.current.pause(), !0), [D, ae, E]), Ye = I((V = !1) => ae.current || !N.current ? !1 : (N.current = !1, W.current || xe(), R.current || Ge(G.current), w.current && (w.current = Te()), E.current && !V && E.current.resume(), !0), [D, F, ae, G, E]), za = I((V, De) => (E.current ? (De && ke.current(V, Se), E.current.message(V)) : De && ke.current(V, Se), !0), [s]), Da = I(() => R.current, [R]), Ea = I(() => W.current, [W]), Ia = I(() => E.current ? E.current.isLeader : null, [E]), Va = I(() => E.current ? E.current.isLastActive : null, [E]), da = I(() => E.current ? E.current.token : null, [E]), ya = I(() => {
8633
8640
  if (N.current) return G.current;
8634
8641
  let V = G.current ? G.current : M.current + F.current, De = h.current ? Te() - h.current : 0, ta = Math.floor(V - De);
8635
8642
  return ta < 0 ? 0 : Math.abs(ta);
8636
- }, [F, M, W, G, h]), Ze = I(() => Math.round(Te() - H.current), [H]), ca = I(() => Math.round(Te() - L.current), [L]), fa = I(() => k.current ? new Date(k.current) : null, [k]), Na = I(() => h.current ? new Date(h.current) : null, [h]), La = I(() => R.current ? Math.round(Te() - k.current + A.current) : Math.round(A.current), [k, A]), Ua = I(() => R.current ? Math.round(Te() - k.current + B.current) : Math.round(B.current), [k, B]), Ga = I(() => {
8637
- let V = Math.round(Ze() - La());
8643
+ }, [F, M, W, G, h]), Ke = I(() => Math.round(Te() - H.current), [H]), ca = I(() => Math.round(Te() - L.current), [L]), fa = I(() => k.current ? new Date(k.current) : null, [k]), Na = I(() => h.current ? new Date(h.current) : null, [h]), La = I(() => R.current ? Math.round(Te() - k.current + A.current) : Math.round(A.current), [k, A]), Ua = I(() => R.current ? Math.round(Te() - k.current + B.current) : Math.round(B.current), [k, B]), Ga = I(() => {
8644
+ let V = Math.round(Ke() - La());
8638
8645
  return V >= 0 ? V : 0;
8639
8646
  }, [k, A]), Ma = I(() => {
8640
8647
  let V = Math.round(ca() - Ua());
@@ -8658,19 +8665,19 @@ function gs({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8658
8665
  ve();
8659
8666
  }, onMessage: (V) => {
8660
8667
  ke.current(V, Se);
8661
- }, start: Qe, reset: oa, activate: ga, pause: Ve, resume: je }) : E.current = null;
8662
- }, [U, C, x, _e, ye, me, ke, Qe, oa, Ve, je]), ge(() => {
8663
- P.current || (Ce(), Re(!0)), !(y || S) && (f ? Qe() : xe());
8668
+ }, start: je, reset: oa, activate: ga, pause: Ve, resume: Ye }) : E.current = null;
8669
+ }, [U, C, x, _e, ye, me, ke, je, oa, Ve, Ye]), ge(() => {
8670
+ P.current || (Ce(), Re(!0)), !(y || S) && (f ? je() : xe());
8664
8671
  }, [y, f, S, P]), ge(() => {
8665
8672
  if (!P.current) {
8666
8673
  let V = [...(/* @__PURE__ */ new Set([...p, ...b])).values()];
8667
8674
  if (Re(), Z.current = V, j.current = l, q.current = b, y || S) return;
8668
- f ? Qe() : xe();
8675
+ f ? je() : xe();
8669
8676
  }
8670
8677
  }, [l, JSON.stringify(p), JSON.stringify(b), P, S, y, f]), ge(() => {
8671
8678
  P.current && (P.current = !1);
8672
8679
  }, [P]);
8673
- let Se = { message: za, start: Qe, reset: oa, activate: ga, pause: Ve, resume: je, isIdle: Da, isPrompted: Ea, isLeader: Ia, isLastActiveTab: Va, getTabId: da, getRemainingTime: ya, getElapsedTime: Ze, getTotalElapsedTime: ca, getLastIdleTime: fa, getLastActiveTime: Na, getIdleTime: La, getTotalIdleTime: Ua, getActiveTime: Ga, getTotalActiveTime: Ma, setOnPresenceChange: (V) => {
8680
+ let Se = { message: za, start: je, reset: oa, activate: ga, pause: Ve, resume: Ye, isIdle: Da, isPrompted: Ea, isLeader: Ia, isLastActiveTab: Va, getTabId: da, getRemainingTime: ya, getElapsedTime: Ke, getTotalElapsedTime: ca, getLastIdleTime: fa, getLastActiveTime: Na, getIdleTime: La, getTotalIdleTime: Ua, getActiveTime: Ga, getTotalActiveTime: Ma, setOnPresenceChange: (V) => {
8674
8681
  d = V, te.current = V;
8675
8682
  }, setOnPrompt: (V) => {
8676
8683
  r = V, _e.current = V;
@@ -8694,7 +8701,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
8694
8701
  timeout: l,
8695
8702
  throttle: 500
8696
8703
  }), cs = ({ options: e } = {}) => {
8697
- const { commonInboxApi: n } = Ha(), { getToken: i, lng: l } = oe(), p = i?.(), g = $e(l);
8704
+ const { commonInboxApi: n } = Ha(), { getToken: i, lng: l } = oe(), p = i?.(), g = Qe(l);
8698
8705
  return Q({
8699
8706
  queryKey: ["inboxList"],
8700
8707
  queryFn: async () => await n(),
@@ -8704,7 +8711,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
8704
8711
  const { internal_notifications_language: t } = a;
8705
8712
  return {
8706
8713
  ...a,
8707
- notificationLng: qe(
8714
+ notificationLng: $e(
8708
8715
  t,
8709
8716
  (o) => o.language === g
8710
8717
  ) || t[0]
@@ -8789,7 +8796,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
8789
8796
  ...e.other
8790
8797
  }
8791
8798
  ], Qm = ({ options: e, formData: n } = {}) => {
8792
- const { lng: i } = oe(), { newsListApi: l } = rl(), p = $e(i);
8799
+ const { lng: i } = oe(), { newsListApi: l } = rl(), p = Qe(i);
8793
8800
  return Q({
8794
8801
  queryKey: ["newsList"],
8795
8802
  queryFn: () => {
@@ -8798,7 +8805,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
8798
8805
  },
8799
8806
  select: (g) => {
8800
8807
  const { data: b } = g, d = b.data?.filter((a) => a.is_active === 1), r = Be(d, (a) => {
8801
- const t = qe(a.news_language, {
8808
+ const t = $e(a.news_language, {
8802
8809
  language: p
8803
8810
  }) || a.news_language[0];
8804
8811
  return {
@@ -8815,7 +8822,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
8815
8822
  ...e
8816
8823
  });
8817
8824
  }, jm = ({ options: e, formData: n } = {}) => {
8818
- const { lng: i } = oe(), { newsListApi: l } = rl(), p = $e(i);
8825
+ const { lng: i } = oe(), { newsListApi: l } = rl(), p = Qe(i);
8819
8826
  return Q({
8820
8827
  queryKey: ["newsList"],
8821
8828
  queryFn: () => {
@@ -8823,7 +8830,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
8823
8830
  return l({ uid: g, params: b });
8824
8831
  },
8825
8832
  select: (g) => {
8826
- const b = qe(g.data.news_language, {
8833
+ const b = $e(g.data.news_language, {
8827
8834
  language: p
8828
8835
  }) || g.data.news_language[0];
8829
8836
  return {
@@ -9021,11 +9028,11 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
9021
9028
  providerList: Be(r.providers, (a) => ({
9022
9029
  ...a,
9023
9030
  providerUid: a.uid,
9024
- providerImageUrl: `${Xe}/paymentIcon/${Dt(a.provider_name)}.png`,
9031
+ providerImageUrl: `${Ze}/paymentIcon/${Dt(a.provider_name)}.png`,
9025
9032
  providerMax: a.max,
9026
9033
  providerMin: a.min
9027
9034
  })),
9028
- methodImageUrl: `${Xe}/paymentIcon/${Dt(r.method_name)}pay.png`
9035
+ methodImageUrl: `${Ze}/paymentIcon/${Dt(r.method_name)}pay.png`
9029
9036
  }));
9030
9037
  return {
9031
9038
  bank: g,
@@ -9468,7 +9475,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
9468
9475
  redeemTreasureApi: i
9469
9476
  };
9470
9477
  }, uu = ({ paramsData: e, options: n } = {}) => {
9471
- const { client: i, lng: l } = oe(), p = $e(l || "tw"), { treasureListApi: g } = vl();
9478
+ const { client: i, lng: l } = oe(), p = Qe(l || "tw"), { treasureListApi: g } = vl();
9472
9479
  return Q({
9473
9480
  queryKey: ["treasureList", e],
9474
9481
  queryFn: () => g(e),
@@ -9481,7 +9488,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
9481
9488
  };
9482
9489
  return {
9483
9490
  list: Be(le(d, "data", []), (t) => {
9484
- const o = qe(t.treasure_copywriting, {
9491
+ const o = $e(t.treasure_copywriting, {
9485
9492
  language: p
9486
9493
  });
9487
9494
  return {
@@ -9540,7 +9547,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
9540
9547
  vip_withdrawal_rate: t,
9541
9548
  rebate_range: o,
9542
9549
  vip_game_rebate: s
9543
- } = d, u = qe(r, { currency_code: i }) || {}, m = qe(a, { currency_code: i }) || {}, c = t, f = Be(o, (U) => ({
9550
+ } = d, u = $e(r, { currency_code: i }) || {}, m = $e(a, { currency_code: i }) || {}, c = t, f = Be(o, (U) => ({
9544
9551
  ...U,
9545
9552
  rebateRange: JSON.parse(U.rebate_range)
9546
9553
  })), y = le(s, "[0]", {}), _ = {
@@ -9549,7 +9556,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
9549
9556
  };
9550
9557
  return {
9551
9558
  ...d,
9552
- vipImageUrl: `${Xe}/vip/vip${d.level}_l.avif`,
9559
+ vipImageUrl: `${Ze}/vip/vip${d.level}_l.avif`,
9553
9560
  vipRule: u,
9554
9561
  vipWithdraw: m,
9555
9562
  vipWithdrawFeeRate: c,
@@ -9689,7 +9696,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
9689
9696
  // 臨時維護開始時間
9690
9697
  temp_maintenance_end_time: o
9691
9698
  // 臨時維護結束時間
9692
- } = e || {}, s = `${Xe}/${qn}/${Vs(l, n)}.png`;
9699
+ } = e || {}, s = `${Ze}/${qn}/${Vs(l, n)}.png`;
9693
9700
  return {
9694
9701
  subPlatformEnum: i,
9695
9702
  platformEnum: l,
@@ -9774,7 +9781,7 @@ const qm = ({ onIdle: e, onActive: n, onAction: i, timeout: l = 6e5 }) => gs({
9774
9781
  allGameTypes: i,
9775
9782
  allPlatforms: n
9776
9783
  }), _ = Be(n, (L) => {
9777
- const H = `${Xe}/${qn}/${L.platformEnum}.png`;
9784
+ const H = `${Ze}/${qn}/${L.platformEnum}.png`;
9778
9785
  return {
9779
9786
  ...L,
9780
9787
  platformImageUrl: H
@@ -37361,7 +37368,7 @@ const dm = {
37361
37368
  expired: "Kode QR telah kedaluwarsa"
37362
37369
  }
37363
37370
  }, hu = ({ forcedShow: e = !1, isVisible: n, setIsVisible: i } = {}) => {
37364
- const { lng: l, getToken: p, lineConfig: g } = oe(), [b, d] = ot(300), [r, a] = ot(!1), t = ee(null), o = le(g, "liffId", ""), s = $e(l), u = p?.(), c = new URLSearchParams(window.location.search).get("mac") || mt.get("machine_mac_address") || "", { data: f, isFetching: y } = zo({
37371
+ const { lng: l, getToken: p, lineConfig: g } = oe(), [b, d] = ot(300), [r, a] = ot(!1), t = ee(null), o = le(g, "liffId", ""), s = Qe(l), u = p?.(), c = new URLSearchParams(window.location.search).get("mac") || mt.get("machine_mac_address") || "", { data: f, isFetching: y } = zo({
37365
37372
  formData: {
37366
37373
  mac_address: c
37367
37374
  },
@@ -37470,7 +37477,7 @@ export {
37470
37477
  Xl as buildSinglePlatformWithSubTypes,
37471
37478
  Yl as buildSingleType,
37472
37479
  $s as categorizeGames,
37473
- $e as convertLanguageCode,
37480
+ Qe as convertLanguageCode,
37474
37481
  vm as createLogoutHandler,
37475
37482
  Ks as extractGameSubTypeNames,
37476
37483
  Zs as extractGameTypeNames,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@obb871001/api-integration-sdk",
3
3
  "private": false,
4
- "version": "1.0.320",
4
+ "version": "1.0.321",
5
5
  "description": "集成API",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",