@obb871001/api-integration-sdk 1.0.354 → 1.0.356

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import de, { createContext as Qt, useContext as _i, useState as mi, useMemo as Oa, useCallback as z, useRef as te, useEffect as pe } from "react";
2
- import { useQueries as zn, useQuery as j, useQueryClient as Ya, useMutation as ee, QueryClient as Bl, QueryClientProvider as Hl } from "@tanstack/react-query";
2
+ import { useQueries as zn, useQuery as j, useQueryClient as Wa, useMutation as ee, QueryClient as Bl, QueryClientProvider as Hl } from "@tanstack/react-query";
3
3
  import Wl from "axios";
4
4
  import { get as Y, find as Ie, isEmpty as Ee, entries as In, forEach as zl, map as Be, isArray as la, toLower as Ei, omit as Il, replace as it, includes as Vl, isObject as jt, flatMap as Yt, values as Jl, keys as Ni } from "lodash";
5
5
  import Zl from "react-dom";
@@ -31,10 +31,10 @@ function Kl(e) {
31
31
  });
32
32
  }), t;
33
33
  }
34
- var nt = { exports: {} }, Za = {};
34
+ var nt = { exports: {} }, Ka = {};
35
35
  var Li;
36
36
  function ql() {
37
- if (Li) return Za;
37
+ if (Li) return Ka;
38
38
  Li = 1;
39
39
  var e = de, n = Symbol.for("react.element"), t = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, p = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
40
40
  function U(d, r, a) {
@@ -44,9 +44,9 @@ function ql() {
44
44
  if (d && d.defaultProps) for (i in r = d.defaultProps, r) o[i] === void 0 && (o[i] = r[i]);
45
45
  return { $$typeof: n, type: d, key: m, ref: u, props: o, _owner: p.current };
46
46
  }
47
- return Za.Fragment = t, Za.jsx = U, Za.jsxs = U, Za;
47
+ return Ka.Fragment = t, Ka.jsx = U, Ka.jsxs = U, Ka;
48
48
  }
49
- var Ka = {};
49
+ var qa = {};
50
50
  var Gi;
51
51
  function $l() {
52
52
  return Gi || (Gi = 1, process.env.NODE_ENV !== "production" && (function() {
@@ -400,7 +400,7 @@ function $l() {
400
400
  }
401
401
  return T.key !== void 0;
402
402
  }
403
- function Ia(T, I) {
403
+ function Va(T, I) {
404
404
  typeof T.ref == "string" && Re.current;
405
405
  }
406
406
  function Da(T, I) {
@@ -425,7 +425,7 @@ function $l() {
425
425
  });
426
426
  }
427
427
  }
428
- var Va = function(T, I, J, $, ue, ge, re) {
428
+ var Ja = function(T, I, J, $, ue, ge, re) {
429
429
  var ae = {
430
430
  // This tag allows us to uniquely identify this as a React Element
431
431
  $$typeof: n,
@@ -454,10 +454,10 @@ function $l() {
454
454
  value: ue
455
455
  }), Object.freeze && (Object.freeze(ae.props), Object.freeze(ae)), ae;
456
456
  };
457
- function Ja(T, I, J, $, ue) {
457
+ function Za(T, I, J, $, ue) {
458
458
  {
459
459
  var ge, re = {}, ae = null, Oe = null;
460
- J !== void 0 && (xe(J), ae = "" + J), Ye(I) && (xe(I.key), ae = "" + I.key), Je(I) && (Oe = I.ref, Ia(I, ue));
460
+ J !== void 0 && (xe(J), ae = "" + J), Ye(I) && (xe(I.key), ae = "" + I.key), Je(I) && (Oe = I.ref, Va(I, ue));
461
461
  for (ge in I)
462
462
  fe.call(I, ge) && !je.hasOwnProperty(ge) && (re[ge] = I[ge]);
463
463
  if (T && T.defaultProps) {
@@ -469,7 +469,7 @@ function $l() {
469
469
  var he = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
470
470
  ae && Da(re, he), Oe && Ea(re, he);
471
471
  }
472
- return Va(T, ae, Oe, ue, $, Re.current, re);
472
+ return Ja(T, ae, Oe, ue, $, Re.current, re);
473
473
  }
474
474
  }
475
475
  var da = y.ReactCurrentOwner, ya = y.ReactDebugCurrentFrame;
@@ -594,7 +594,7 @@ Check the top-level render call using <` + J + ">.");
594
594
  var be;
595
595
  T === null ? be = "null" : ve(T) ? be = "array" : T !== void 0 && T.$$typeof === n ? (be = "<" + (A(T.type) || "Unknown") + " />", ae = " Did you accidentally export a JSX literal instead of a component?") : be = typeof T, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", be, ae);
596
596
  }
597
- var he = Ja(T, I, J, ue, ge);
597
+ var he = Za(T, I, J, ue, ge);
598
598
  if (he == null)
599
599
  return he;
600
600
  if (re) {
@@ -634,8 +634,8 @@ React keys must be passed directly to JSX without using spread:
634
634
  return Pe(T, I, J, !1);
635
635
  }
636
636
  var ei = tt, Fl = na;
637
- Ka.Fragment = l, Ka.jsx = ei, Ka.jsxs = Fl;
638
- })()), Ka;
637
+ qa.Fragment = l, qa.jsx = ei, qa.jsxs = Fl;
638
+ })()), qa;
639
639
  }
640
640
  var Mi;
641
641
  function Ql() {
@@ -647,19 +647,19 @@ const Vn = Qt(null), se = () => {
647
647
  if (!e)
648
648
  throw new Error("useApiContext must be used within ApiProvider");
649
649
  return e;
650
- }, qa = {
650
+ }, $a = {
651
651
  READY: "ready",
652
652
  PENDING: "pending"
653
653
  }, Jn = Qt(null), jl = ({ children: e }) => {
654
- const [n, t] = mi(qa.READY), l = Oa(() => {
655
- const p = n === qa.READY, g = n === qa.PENDING;
654
+ const [n, t] = mi($a.READY), l = Oa(() => {
655
+ const p = n === $a.READY, g = n === $a.PENDING;
656
656
  return {
657
657
  status: n,
658
658
  setStatus: t,
659
659
  isReady: p,
660
660
  isPending: g,
661
- setAsReady: () => t(qa.READY),
662
- setAsPending: () => t(qa.PENDING)
661
+ setAsReady: () => t($a.READY),
662
+ setAsPending: () => t($a.PENDING)
663
663
  };
664
664
  }, [n]);
665
665
  return /* @__PURE__ */ Fe.jsx(Jn.Provider, { value: l, children: e });
@@ -2418,8 +2418,8 @@ function tl() {
2418
2418
  if (Me < 16)
2419
2419
  He = aa.high = s[c + Me * 2] | 0, ve = aa.low = s[c + Me * 2 + 1] | 0;
2420
2420
  else {
2421
- var ta = m[Me - 15], xe = ta.high, Re = ta.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 = m[Me - 2], Je = ga.high, Ye = ga.low, Ia = (Je >>> 19 | Ye << 13) ^ (Je << 3 | Ye >>> 29) ^ Je >>> 6, Da = (Ye >>> 19 | Je << 13) ^ (Ye << 3 | Je >>> 29) ^ (Ye >>> 6 | Je << 26), Ea = m[Me - 7], Va = Ea.high, Ja = Ea.low, da = m[Me - 16], ya = da.high, qe = da.low;
2422
- ve = oa + Ja, He = je + Va + (ve >>> 0 < oa >>> 0 ? 1 : 0), ve = ve + Da, He = He + Ia + (ve >>> 0 < Da >>> 0 ? 1 : 0), ve = ve + qe, He = He + ya + (ve >>> 0 < qe >>> 0 ? 1 : 0), aa.high = He, aa.low = ve;
2421
+ var ta = m[Me - 15], xe = ta.high, Re = ta.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 = m[Me - 2], Je = ga.high, Ye = ga.low, Va = (Je >>> 19 | Ye << 13) ^ (Je << 3 | Ye >>> 29) ^ Je >>> 6, Da = (Ye >>> 19 | Je << 13) ^ (Ye << 3 | Je >>> 29) ^ (Ye >>> 6 | Je << 26), Ea = m[Me - 7], Ja = Ea.high, Za = Ea.low, da = m[Me - 16], ya = da.high, qe = da.low;
2422
+ ve = oa + Za, He = je + Ja + (ve >>> 0 < oa >>> 0 ? 1 : 0), ve = ve + Da, He = He + Va + (ve >>> 0 < Da >>> 0 ? 1 : 0), ve = ve + qe, He = He + ya + (ve >>> 0 < qe >>> 0 ? 1 : 0), aa.high = He, aa.low = ve;
2423
2423
  }
2424
2424
  var ca = me & ke ^ ~me & Ve, fa = ce & fe ^ ~ce & Ce, Na = Z & Q ^ Z & ie ^ Q & ie, La = q & K ^ q & le ^ K & le, Ua = (Z >>> 28 | q << 4) ^ (Z << 30 | q >>> 2) ^ (Z << 25 | q >>> 7), Ga = (q >>> 28 | Z << 4) ^ (q << 30 | Z >>> 2) ^ (q << 25 | Z >>> 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, ia = 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 + ia, na = na + De + (Pe >>> 0 < ia >>> 0 ? 1 : 0), Pe = Pe + ve, na = na + He + (Pe >>> 0 < ve >>> 0 ? 1 : 0), tt = Ga + La, ei = Ua + Na + (tt >>> 0 < Ga >>> 0 ? 1 : 0);
2425
2425
  Ge = Ve, ea = Ce, Ve = ke, Ce = fe, ke = me, fe = ce, ce = Ue + Pe | 0, me = ye + na + (ce >>> 0 < Ue >>> 0 ? 1 : 0) | 0, ye = ie, Ue = le, ie = Q, le = K, Q = Z, K = q, q = Pe + tt | 0, Z = na + ei + (q >>> 0 < Pe >>> 0 ? 1 : 0) | 0;
@@ -6624,7 +6624,7 @@ function ra() {
6624
6624
  e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && p();
6625
6625
  })(ni)), ni;
6626
6626
  }
6627
- var $a = {}, li = {}, bn;
6627
+ var Qa = {}, li = {}, bn;
6628
6628
  function vi() {
6629
6629
  return bn || (bn = 1, (function(e) {
6630
6630
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
@@ -6700,7 +6700,7 @@ function il() {
6700
6700
  }
6701
6701
  return ot;
6702
6702
  }
6703
- var Qa = {}, ri = {}, hn;
6703
+ var ja = {}, ri = {}, hn;
6704
6704
  function Ti() {
6705
6705
  return hn || (hn = 1, (function(e) {
6706
6706
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
@@ -6733,8 +6733,8 @@ function Ti() {
6733
6733
  }
6734
6734
  var Tn;
6735
6735
  function ki() {
6736
- if (Tn) return Qa;
6737
- Tn = 1, Object.defineProperty(Qa, "__esModule", { value: !0 }), Qa.assertIsWebSocket = t, Qa.resetGlobalState = l;
6736
+ if (Tn) return ja;
6737
+ Tn = 1, Object.defineProperty(ja, "__esModule", { value: !0 }), ja.assertIsWebSocket = t, ja.resetGlobalState = l;
6738
6738
  var e = vi(), n = Ti();
6739
6739
  function t(p, g) {
6740
6740
  if (!g && !(p instanceof WebSocket))
@@ -6743,7 +6743,7 @@ function ki() {
6743
6743
  function l(p) {
6744
6744
  (0, n.resetSubscribers)(p), (0, e.resetWebSockets)(p);
6745
6745
  }
6746
- return Qa;
6746
+ return ja;
6747
6747
  }
6748
6748
  var kn;
6749
6749
  function vo() {
@@ -6879,8 +6879,8 @@ function ho() {
6879
6879
  }
6880
6880
  var Sn;
6881
6881
  function To() {
6882
- if (Sn) return $a;
6883
- Sn = 1, Object.defineProperty($a, "__esModule", { value: !0 }), $a.createOrJoinSocket = void 0;
6882
+ if (Sn) return Qa;
6883
+ Sn = 1, Object.defineProperty(Qa, "__esModule", { value: !0 }), Qa.createOrJoinSocket = void 0;
6884
6884
  var e = vi(), n = ra(), t = vo(), l = ho(), p = Ti(), g = function(d, r, a, i, o) {
6885
6885
  return function() {
6886
6886
  if ((0, p.removeSubscriber)(d, r), !(0, p.hasSubscribers)(d)) {
@@ -6918,7 +6918,7 @@ function To() {
6918
6918
  }, i, m.current, u, s, c);
6919
6919
  }
6920
6920
  };
6921
- return $a.createOrJoinSocket = U, $a;
6921
+ return Qa.createOrJoinSocket = U, Qa;
6922
6922
  }
6923
6923
  var ma = {}, Dn;
6924
6924
  function ko() {
@@ -7424,7 +7424,7 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
7424
7424
  }
7425
7425
  });
7426
7426
  } };
7427
- }, Wa = () => {
7427
+ }, za = () => {
7428
7428
  const { client: e } = se(), n = z(async () => {
7429
7429
  const { data: d } = await e.get("/carousels");
7430
7430
  return d;
@@ -7563,7 +7563,7 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
7563
7563
  ...e
7564
7564
  });
7565
7565
  }, Gm = ({ options: e } = {}) => {
7566
- const n = Ya(), { abandonPointsApi: t } = oe();
7566
+ const n = Wa(), { abandonPointsApi: t } = oe();
7567
7567
  return ee({
7568
7568
  mutationKey: ["abandonPoint"],
7569
7569
  mutationFn: async (l) => t({
@@ -7638,14 +7638,14 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
7638
7638
  ...e
7639
7639
  });
7640
7640
  }, Am = ({ options: e, paramsData: n } = {}) => {
7641
- const { verifyPhoneBarApi: t } = Wa();
7641
+ const { verifyPhoneBarApi: t } = za();
7642
7642
  return j({
7643
7643
  queryKey: ["verifyPhoneBar", n],
7644
7644
  queryFn: async () => t(n),
7645
7645
  ...e
7646
7646
  });
7647
7647
  }, Om = ({ options: e, paramsData: n } = {}) => {
7648
- const { verifyDonationCodeApi: t } = Wa();
7648
+ const { verifyDonationCodeApi: t } = za();
7649
7649
  return j({
7650
7650
  queryKey: ["verifyDonationCode", n],
7651
7651
  queryFn: async () => t(n),
@@ -7764,7 +7764,7 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
7764
7764
  enableNotification: g = !1,
7765
7765
  disabledLineAutoRegister: U = !1
7766
7766
  }) => {
7767
- const { store: d, lng: r } = se(), a = Ya(), { isReady: i, setAsReady: o, isPending: m, setAsPending: u } = Zn(), s = Qe(r), c = te(!1), f = te(n), y = Y(l, "uid", null);
7767
+ const { store: d, lng: r } = se(), a = Wa(), { isReady: i, setAsReady: o, isPending: m, setAsPending: u } = Zn(), s = Qe(r), c = te(!1), f = te(n), y = Y(l, "uid", null);
7768
7768
  Y(l, "testFunction", 0);
7769
7769
  const _ = new URLSearchParams(window.location.search), b = Y(
7770
7770
  p,
@@ -8048,114 +8048,123 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
8048
8048
  queryKey: ["eventList", e],
8049
8049
  queryFn: () => g({ paramsData: e }),
8050
8050
  select: (r) => {
8051
- const { data: a } = r;
8052
- return Be(a, (o) => {
8053
- const { events_attributes: m } = o, u = Ie(
8054
- m,
8055
- (v) => v.attribute_currency === U
8056
- ) || m[0], s = Y(u, "rewards", {}), c = Y(o, "carousels.[0]", {}), f = Ie(c.carousels_lang, (v) => v.lang === d) || c?.carousels_lang?.[0], y = {
8057
- ...c,
8058
- currentLngCarousel: {
8059
- ...f,
8060
- carouselCurrentLanguagePCImageUrl: `${p}/carousels/${f?.image_pc}`,
8061
- carouselCurrentLanguageMBImageUrl: `${p}/carousels/${f?.image_mobile}`,
8062
- carouselCurrentLanguageS3PCImageUrl: `${Ke}/carousels/${f?.image_pc}`,
8063
- carouselCurrentLanguageS3MBImageUrl: `${Ke}/carousels/${f?.image_mobile}`
8064
- }
8065
- }, _ = {
8066
- eventUid: o.uid,
8067
- enableCurrencyLimit: o.enable_currency_limit,
8068
- //是否啟用幣別限制
8069
- endTime: o.end_time,
8070
- //結束時間
8071
- startTime: o.start_time,
8072
- //開始時間
8073
- eventCode: o.event_code,
8074
- //活動代碼
8075
- eventShowType: o.event_show_type,
8076
- //活動顯示類型
8077
- isActive: o.is_active === 1,
8078
- //是否啟用
8079
- isShowCarousel: o.is_show_carousel === 1,
8080
- //是否顯示輪播
8081
- isShowPopup: o.is_show_pop_up === 1,
8082
- //是否顯示彈跳視窗
8083
- lastSettleDate: o.last_settle_date,
8084
- //上次結算日期
8085
- nextSettleDate: o.next_settle_date,
8086
- //下次結算日期
8087
- participatingPlatforms: o.participating_platforms,
8088
- //參與平台
8089
- resetCycle: o.reset_cycle,
8090
- //重置週期
8091
- settlementHour: o.settlement_hour,
8092
- //結算小時
8093
- settlementInterval: o.settlement_interval,
8094
- //結算間隔
8095
- settlementIntervalCount: o.settlement_interval_count,
8096
- //結算間隔次數
8097
- singleAmountTarget: o.single_amount_target,
8098
- //單次目標金額
8099
- subType: o.subtype,
8100
- //活動子類型
8101
- type: o.type,
8102
- //活動類型
8103
- valueBasis: o.value_basis,
8104
- //數值基準
8105
- vipGroup: o.vip_group,
8106
- // VIP 群組
8107
- tagsGroup: o.tags_group,
8108
- //標籤群組
8109
- eventBg: qn(),
8110
- eventIcon: Kn(o.type),
8111
- nextSettlementDate: o.next_settlement_date,
8112
- //下一次結算日期
8113
- lastSettlementDate: o.last_settlement_date
8114
- //最後一次結算日期
8115
- }, b = {
8116
- isActive: u.attribute_is_active === 1,
8117
- //是否啟用
8118
- currencyCode: u.attribute_currency,
8119
- //幣別代碼
8120
- value: u.attribute_value,
8121
- //數值
8122
- eventUid: u.event_uid
8123
- //活動UID
8124
- }, C = {
8125
- baseValue: s.base_value,
8126
- //基礎數值
8127
- enableRewardsLimit: s.enable_rewards_limit === 1,
8128
- //是否啟用獎勵限制
8129
- enableAmountLimit: s.enable_amounts_limit === 1,
8130
- //是否啟用金額限制
8131
- limitAmount: s.limit_amounts,
8132
- //限制金額
8133
- enableTimesLimit: s.enable_times_limit === 1,
8134
- //是否啟用次數限制
8135
- limitTimes: s.limit_times,
8136
- //限制次數
8137
- enableWageringLimit: s.enable_wagering_limit === 1,
8138
- //是否啟用投注限制
8139
- wageringLimitType: s.wagering_limit_type,
8140
- //投注限制類型
8141
- wageringLimitValue: s.wagering_limit_value,
8142
- //投注限制數值
8143
- expirationDays: s.expiration_days,
8144
- //獎勵過期天數
8145
- rewardName: s.name,
8146
- //獎勵名稱
8147
- rewardUid: s.uid,
8148
- //獎勵UID
8149
- rewardType: s.type
8150
- //獎勵類型
8151
- };
8152
- return {
8153
- eventBase: _,
8154
- eventAttribute: b,
8155
- eventReward: C,
8156
- eventCarousel: { ...y }
8157
- };
8158
- });
8051
+ try {
8052
+ const { data: a } = r;
8053
+ return Be(a, (o) => {
8054
+ const { events_attributes: m } = o, u = Ie(
8055
+ m,
8056
+ (v) => v.attribute_currency === U
8057
+ ) || m[0], s = Y(
8058
+ u,
8059
+ "rewards",
8060
+ {}
8061
+ ), c = Y(o, "carousels.[0]", {}), f = Ie(c.carousels_lang, (v) => v.lang === d) || c?.carousels_lang?.[0], y = {
8062
+ ...c,
8063
+ currentLngCarousel: {
8064
+ ...f,
8065
+ carouselCurrentLanguagePCImageUrl: `${p}/carousels/${f?.image_pc}`,
8066
+ carouselCurrentLanguageMBImageUrl: `${p}/carousels/${f?.image_mobile}`,
8067
+ carouselCurrentLanguageS3PCImageUrl: `${Ke}/carousels/${f?.image_pc}`,
8068
+ carouselCurrentLanguageS3MBImageUrl: `${Ke}/carousels/${f?.image_mobile}`
8069
+ }
8070
+ }, _ = {
8071
+ eventUid: o.uid,
8072
+ enableCurrencyLimit: o.enable_currency_limit,
8073
+ //是否啟用幣別限制
8074
+ endTime: o.end_time,
8075
+ //結束時間
8076
+ startTime: o.start_time,
8077
+ //開始時間
8078
+ eventCode: o.event_code,
8079
+ //活動代碼
8080
+ eventShowType: o.event_show_type,
8081
+ //活動顯示類型
8082
+ isActive: o.is_active === 1,
8083
+ //是否啟用
8084
+ isShowCarousel: o.is_show_carousel === 1,
8085
+ //是否顯示輪播
8086
+ isShowPopup: o.is_show_pop_up === 1,
8087
+ //是否顯示彈跳視窗
8088
+ lastSettleDate: o.last_settle_date,
8089
+ //上次結算日期
8090
+ nextSettleDate: o.next_settle_date,
8091
+ //下次結算日期
8092
+ participatingPlatforms: o.participating_platforms,
8093
+ //參與平台
8094
+ resetCycle: o.reset_cycle,
8095
+ //重置週期
8096
+ settlementHour: o.settlement_hour,
8097
+ //結算小時
8098
+ settlementInterval: o.settlement_interval,
8099
+ //結算間隔
8100
+ settlementIntervalCount: o.settlement_interval_count,
8101
+ //結算間隔次數
8102
+ singleAmountTarget: o.single_amount_target,
8103
+ //單次目標金額
8104
+ subType: o.subtype,
8105
+ //活動子類型
8106
+ type: o.type,
8107
+ //活動類型
8108
+ valueBasis: o.value_basis,
8109
+ //數值基準
8110
+ vipGroup: o.vip_group,
8111
+ // VIP 群組
8112
+ tagsGroup: o.tags_group,
8113
+ //標籤群組
8114
+ eventBg: qn(),
8115
+ eventIcon: Kn(o.type),
8116
+ nextSettlementDate: o.next_settlement_date,
8117
+ //下一次結算日期
8118
+ lastSettlementDate: o.last_settlement_date
8119
+ //最後一次結算日期
8120
+ }, b = {
8121
+ isActive: u?.attribute_is_active === 1,
8122
+ //是否啟用
8123
+ currencyCode: u?.attribute_currency,
8124
+ //幣別代碼
8125
+ value: u?.attribute_value,
8126
+ //數值
8127
+ eventUid: u?.event_uid
8128
+ //活動UID
8129
+ }, C = {
8130
+ baseValue: s.base_value,
8131
+ //基礎數值
8132
+ enableRewardsLimit: s.enable_rewards_limit === 1,
8133
+ //是否啟用獎勵限制
8134
+ enableAmountLimit: s.enable_amounts_limit === 1,
8135
+ //是否啟用金額限制
8136
+ limitAmount: s.limit_amounts,
8137
+ //限制金額
8138
+ enableTimesLimit: s.enable_times_limit === 1,
8139
+ //是否啟用次數限制
8140
+ limitTimes: s.limit_times,
8141
+ //限制次數
8142
+ enableWageringLimit: s.enable_wagering_limit === 1,
8143
+ //是否啟用投注限制
8144
+ wageringLimitType: s.wagering_limit_type,
8145
+ //投注限制類型
8146
+ wageringLimitValue: s.wagering_limit_value,
8147
+ //投注限制數值
8148
+ expirationDays: s.expiration_days,
8149
+ //獎勵過期天數
8150
+ rewardName: s.name,
8151
+ //獎勵名稱
8152
+ rewardUid: s.uid,
8153
+ //獎勵UID
8154
+ rewardType: s.type
8155
+ //獎勵類型
8156
+ };
8157
+ return {
8158
+ eventBase: _,
8159
+ eventAttribute: b,
8160
+ eventReward: C,
8161
+ eventCarousel: { ...y },
8162
+ originalData: o
8163
+ };
8164
+ });
8165
+ } catch (a) {
8166
+ return console.error("Error processing event list data:", a), [];
8167
+ }
8159
8168
  },
8160
8169
  ...n
8161
8170
  });
@@ -8280,10 +8289,13 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
8280
8289
  }
8281
8290
  });
8282
8291
  }, Qm = () => {
8283
- const { enabledEventWalletApi: e } = et();
8292
+ const e = Wa(), { enabledEventWalletApi: n } = et();
8284
8293
  return ee({
8285
8294
  mutationKey: ["enabledEventWallet"],
8286
- mutationFn: async ({ eventUids: n }) => await e({ eventUids: n })
8295
+ mutationFn: async ({ eventUids: t }) => await n({ eventUids: t }),
8296
+ onSuccess: () => {
8297
+ e.invalidateQueries({ queryKey: ["evaluateEventWallet"] });
8298
+ }
8287
8299
  });
8288
8300
  }, jm = ({ gamePlatform: e = "", options: n = {} } = {}) => {
8289
8301
  const { evaluateEventWalletApi: t } = et();
@@ -8302,7 +8314,7 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
8302
8314
  ...n
8303
8315
  });
8304
8316
  }, Ym = () => {
8305
- const e = Ya(), { settleEventWalletApi: n } = et();
8317
+ const e = Wa(), { settleEventWalletApi: n } = et();
8306
8318
  return ee({
8307
8319
  mutationKey: ["settleEventWallet"],
8308
8320
  mutationFn: async ({ groupUid: t }) => await n({ groupUid: t }),
@@ -8311,7 +8323,7 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
8311
8323
  }
8312
8324
  });
8313
8325
  }, Xm = () => {
8314
- const e = Ya(), { abandonEventWalletApi: n } = et();
8326
+ const e = Wa(), { abandonEventWalletApi: n } = et();
8315
8327
  return ee({
8316
8328
  mutationKey: ["abandonEventWallet"],
8317
8329
  mutationFn: async ({ groupUid: t }) => await n({ groupUid: t }),
@@ -8320,7 +8332,7 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
8320
8332
  }
8321
8333
  });
8322
8334
  }, eu = ({ skipPreload: e = !1 } = {}) => {
8323
- const { lng: n, data2URL: t } = se(), { commonCarouselApi: l } = Wa(), p = Qe(n);
8335
+ const { lng: n, data2URL: t } = se(), { commonCarouselApi: l } = za(), p = Qe(n);
8324
8336
  return j({
8325
8337
  queryKey: ["getCarouselList", e],
8326
8338
  queryFn: async () => {
@@ -8348,7 +8360,7 @@ const Lo = /* @__PURE__ */ yi(No), Go = ({
8348
8360
  })
8349
8361
  });
8350
8362
  }, au = () => {
8351
- const { lng: e } = se(), { commonMarqueeApi: n } = Wa(), t = Qe(e);
8363
+ const { lng: e } = se(), { commonMarqueeApi: n } = za(), t = Qe(e);
8352
8364
  return j({
8353
8365
  queryKey: ["getMarqueeList"],
8354
8366
  queryFn: async () => {
@@ -8803,7 +8815,7 @@ function cs({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8803
8815
  pa && Q.current && (M.current || V) && (K.current.forEach((De) => {
8804
8816
  Q.current.removeEventListener(De, ta.current, { capture: !0 });
8805
8817
  }), M.current = !1);
8806
- }, je = z((V) => ie.current ? !1 : (Ce(), xe(), P.current = !1, H.current = !1, B.current = !1, R.current = 0, w.current = 0, x.current && !V && x.current.start(), Ge(), !0), [S, P, ie, L, x]), oa = z((V) => ie.current ? !1 : (Ce(), xe(), O.current = Te(), F.current += Te() - k.current, A.current += Te() - k.current, F.current = 0, P.current = !1, H.current = !1, B.current = !1, R.current = 0, w.current = 0, x.current && !V && x.current.reset(), y || Ge(), !0), [S, P, L, y, ie, x]), ga = z((V) => ie.current ? !1 : (Ce(), xe(), (P.current || H.current) && ve(), P.current = !1, H.current = !1, B.current = !1, R.current = 0, w.current = 0, O.current = Te(), x.current && !V && x.current.activate(), Ge(), !0), [S, P, H, ie, L, x]), Je = z((V = !1) => ie.current || B.current ? !1 : (R.current = ya(), B.current = !0, Re(), Ce(), x.current && !V && x.current.pause(), !0), [S, ie, x]), Ye = z((V = !1) => ie.current || !B.current ? !1 : (B.current = !1, H.current || xe(), P.current || Ge(R.current), w.current && (w.current = Te()), x.current && !V && x.current.resume(), !0), [S, L, ie, R, x]), Ia = z((V, De) => (x.current ? (De && ke.current(V, Se), x.current.message(V)) : De && ke.current(V, Se), !0), [m]), Da = z(() => P.current, [P]), Ea = z(() => H.current, [H]), Va = z(() => x.current ? x.current.isLeader : null, [x]), Ja = z(() => x.current ? x.current.isLastActive : null, [x]), da = z(() => x.current ? x.current.token : null, [x]), ya = z(() => {
8818
+ }, je = z((V) => ie.current ? !1 : (Ce(), xe(), P.current = !1, H.current = !1, B.current = !1, R.current = 0, w.current = 0, x.current && !V && x.current.start(), Ge(), !0), [S, P, ie, L, x]), oa = z((V) => ie.current ? !1 : (Ce(), xe(), O.current = Te(), F.current += Te() - k.current, A.current += Te() - k.current, F.current = 0, P.current = !1, H.current = !1, B.current = !1, R.current = 0, w.current = 0, x.current && !V && x.current.reset(), y || Ge(), !0), [S, P, L, y, ie, x]), ga = z((V) => ie.current ? !1 : (Ce(), xe(), (P.current || H.current) && ve(), P.current = !1, H.current = !1, B.current = !1, R.current = 0, w.current = 0, O.current = Te(), x.current && !V && x.current.activate(), Ge(), !0), [S, P, H, ie, L, x]), Je = z((V = !1) => ie.current || B.current ? !1 : (R.current = ya(), B.current = !0, Re(), Ce(), x.current && !V && x.current.pause(), !0), [S, ie, x]), Ye = z((V = !1) => ie.current || !B.current ? !1 : (B.current = !1, H.current || xe(), P.current || Ge(R.current), w.current && (w.current = Te()), x.current && !V && x.current.resume(), !0), [S, L, ie, R, x]), Va = z((V, De) => (x.current ? (De && ke.current(V, Se), x.current.message(V)) : De && ke.current(V, Se), !0), [m]), Da = z(() => P.current, [P]), Ea = z(() => H.current, [H]), Ja = z(() => x.current ? x.current.isLeader : null, [x]), Za = z(() => x.current ? x.current.isLastActive : null, [x]), da = z(() => x.current ? x.current.token : null, [x]), ya = z(() => {
8807
8819
  if (B.current) return R.current;
8808
8820
  let V = R.current ? R.current : N.current + L.current, De = h.current ? Te() - h.current : 0, ia = Math.floor(V - De);
8809
8821
  return ia < 0 ? 0 : Math.abs(ia);
@@ -8844,7 +8856,7 @@ function cs({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8844
8856
  }, [l, JSON.stringify(p), JSON.stringify(U), W, E, y, f]), pe(() => {
8845
8857
  W.current && (W.current = !1);
8846
8858
  }, [W]);
8847
- let Se = { message: Ia, start: je, reset: oa, activate: ga, pause: Je, resume: Ye, isIdle: Da, isPrompted: Ea, isLeader: Va, isLastActiveTab: Ja, getTabId: da, getRemainingTime: ya, getElapsedTime: qe, getTotalElapsedTime: ca, getLastIdleTime: fa, getLastActiveTime: Na, getIdleTime: La, getTotalIdleTime: Ua, getActiveTime: Ga, getTotalActiveTime: Ma, setOnPresenceChange: (V) => {
8859
+ let Se = { message: Va, start: je, reset: oa, activate: ga, pause: Je, resume: Ye, isIdle: Da, isPrompted: Ea, isLeader: Ja, isLastActiveTab: Za, getTabId: da, getRemainingTime: ya, getElapsedTime: qe, getTotalElapsedTime: ca, getLastIdleTime: fa, getLastActiveTime: Na, getIdleTime: La, getTotalIdleTime: Ua, getActiveTime: Ga, getTotalActiveTime: Ma, setOnPresenceChange: (V) => {
8848
8860
  d = V, le.current = V;
8849
8861
  }, setOnPrompt: (V) => {
8850
8862
  r = V, ye.current = V;
@@ -8868,7 +8880,7 @@ const iu = ({ onIdle: e, onActive: n, onAction: t, timeout: l = 6e5 }) => cs({
8868
8880
  timeout: l,
8869
8881
  throttle: 500
8870
8882
  }), _s = ({ options: e } = {}) => {
8871
- const { commonInboxApi: n } = Wa(), { getToken: t, lng: l } = se(), p = t?.(), g = Qe(l);
8883
+ const { commonInboxApi: n } = za(), { getToken: t, lng: l } = se(), p = t?.(), g = Qe(l);
8872
8884
  return j({
8873
8885
  queryKey: ["inboxList"],
8874
8886
  queryFn: async () => await n(),
@@ -8889,7 +8901,7 @@ const iu = ({ onIdle: e, onActive: n, onAction: t, timeout: l = 6e5 }) => cs({
8889
8901
  ...e
8890
8902
  });
8891
8903
  }, ys = ({ options: e } = {}) => {
8892
- const { commonReadInboxApi: n } = Wa();
8904
+ const { commonReadInboxApi: n } = za();
8893
8905
  return ee({
8894
8906
  mutationKey: ["readInbox"],
8895
8907
  mutationFn: async (t) => await n(t),
@@ -9330,19 +9342,19 @@ const iu = ({ onIdle: e, onActive: n, onAction: t, timeout: l = 6e5 }) => cs({
9330
9342
  eventTransaction: s,
9331
9343
  withdrawTransaction: c
9332
9344
  };
9333
- }, sl = "3.7.8", Ds = sl, za = typeof Buffer == "function", Rn = typeof TextDecoder == "function" ? new TextDecoder() : void 0, Pn = typeof TextEncoder == "function" ? new TextEncoder() : void 0, Es = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", ja = Array.prototype.slice.call(Es), st = ((e) => {
9345
+ }, sl = "3.7.8", Ds = sl, Ia = typeof Buffer == "function", Rn = typeof TextDecoder == "function" ? new TextDecoder() : void 0, Pn = typeof TextEncoder == "function" ? new TextEncoder() : void 0, Es = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", Ya = Array.prototype.slice.call(Es), st = ((e) => {
9334
9346
  let n = {};
9335
9347
  return e.forEach((t, l) => n[t] = l), n;
9336
- })(ja), Ns = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, Le = String.fromCharCode.bind(String), wn = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), ml = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (n) => n == "+" ? "-" : "_"), ul = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), pl = (e) => {
9348
+ })(Ya), Ns = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, Le = String.fromCharCode.bind(String), wn = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), ml = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (n) => n == "+" ? "-" : "_"), ul = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), pl = (e) => {
9337
9349
  let n, t, l, p, g = "";
9338
9350
  const U = e.length % 3;
9339
9351
  for (let d = 0; d < e.length; ) {
9340
9352
  if ((t = e.charCodeAt(d++)) > 255 || (l = e.charCodeAt(d++)) > 255 || (p = e.charCodeAt(d++)) > 255)
9341
9353
  throw new TypeError("invalid character found");
9342
- n = t << 16 | l << 8 | p, g += ja[n >> 18 & 63] + ja[n >> 12 & 63] + ja[n >> 6 & 63] + ja[n & 63];
9354
+ n = t << 16 | l << 8 | p, g += Ya[n >> 18 & 63] + Ya[n >> 12 & 63] + Ya[n >> 6 & 63] + Ya[n & 63];
9343
9355
  }
9344
9356
  return U ? g.slice(0, U - 3) + "===".substring(U) : g;
9345
- }, Si = typeof btoa == "function" ? (e) => btoa(e) : za ? (e) => Buffer.from(e, "binary").toString("base64") : pl, gi = za ? (e) => Buffer.from(e).toString("base64") : (e) => {
9357
+ }, Si = typeof btoa == "function" ? (e) => btoa(e) : Ia ? (e) => Buffer.from(e, "binary").toString("base64") : pl, gi = Ia ? (e) => Buffer.from(e).toString("base64") : (e) => {
9346
9358
  let t = [];
9347
9359
  for (let l = 0, p = e.length; l < p; l += 4096)
9348
9360
  t.push(Le.apply(null, e.subarray(l, l + 4096)));
@@ -9355,7 +9367,7 @@ const iu = ({ onIdle: e, onActive: n, onAction: t, timeout: l = 6e5 }) => cs({
9355
9367
  var n = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
9356
9368
  return Le(240 | n >>> 18 & 7) + Le(128 | n >>> 12 & 63) + Le(128 | n >>> 6 & 63) + Le(128 | n & 63);
9357
9369
  }
9358
- }, Gs = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, gl = (e) => e.replace(Gs, Ls), Fn = za ? (e) => Buffer.from(e, "utf8").toString("base64") : Pn ? (e) => gi(Pn.encode(e)) : (e) => Si(gl(e)), Ha = (e, n = !1) => n ? ml(Fn(e)) : Fn(e), An = (e) => Ha(e, !0), Ms = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, Rs = (e) => {
9370
+ }, Gs = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, gl = (e) => e.replace(Gs, Ls), Fn = Ia ? (e) => Buffer.from(e, "utf8").toString("base64") : Pn ? (e) => gi(Pn.encode(e)) : (e) => Si(gl(e)), Ha = (e, n = !1) => n ? ml(Fn(e)) : Fn(e), An = (e) => Ha(e, !0), Ms = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, Rs = (e) => {
9359
9371
  switch (e.length) {
9360
9372
  case 4:
9361
9373
  var n = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), t = n - 65536;
@@ -9373,7 +9385,7 @@ const iu = ({ onIdle: e, onActive: n, onAction: t, timeout: l = 6e5 }) => cs({
9373
9385
  for (let g = 0; g < e.length; )
9374
9386
  n = st[e.charAt(g++)] << 18 | st[e.charAt(g++)] << 12 | (t = st[e.charAt(g++)]) << 6 | (l = st[e.charAt(g++)]), t === 64 ? p.push(Le(n >> 16 & 255)) : l === 64 ? p.push(Le(n >> 16 & 255, n >> 8 & 255)) : p.push(Le(n >> 16 & 255, n >> 8 & 255, n & 255));
9375
9387
  return p.join("");
9376
- }, Di = typeof atob == "function" ? (e) => atob(ul(e)) : za ? (e) => Buffer.from(e, "base64").toString("binary") : cl, fl = za ? (e) => wn(Buffer.from(e, "base64")) : (e) => wn(Di(e).split("").map((n) => n.charCodeAt(0))), _l = (e) => fl(yl(e)), Ps = za ? (e) => Buffer.from(e, "base64").toString("utf8") : Rn ? (e) => Rn.decode(fl(e)) : (e) => dl(Di(e)), yl = (e) => ul(e.replace(/[-_]/g, (n) => n == "-" ? "+" : "/")), di = (e) => Ps(yl(e)), ws = (e) => {
9388
+ }, Di = typeof atob == "function" ? (e) => atob(ul(e)) : Ia ? (e) => Buffer.from(e, "base64").toString("binary") : cl, fl = Ia ? (e) => wn(Buffer.from(e, "base64")) : (e) => wn(Di(e).split("").map((n) => n.charCodeAt(0))), _l = (e) => fl(yl(e)), Ps = Ia ? (e) => Buffer.from(e, "base64").toString("utf8") : Rn ? (e) => Rn.decode(fl(e)) : (e) => dl(Di(e)), yl = (e) => ul(e.replace(/[-_]/g, (n) => n == "-" ? "+" : "/")), di = (e) => Ps(yl(e)), ws = (e) => {
9377
9389
  if (typeof e != "string")
9378
9390
  return !1;
9379
9391
  const n = e.replace(/\s+/g, "").replace(/={0,2}$/, "");
@@ -37600,7 +37612,7 @@ const fm = {
37600
37612
  ] })
37601
37613
  ] });
37602
37614
  }, Mu = () => {
37603
- const e = Ya(), {
37615
+ const e = Wa(), {
37604
37616
  mutate: n,
37605
37617
  isPending: t,
37606
37618
  isSuccess: l,
@@ -37636,7 +37648,7 @@ export {
37636
37648
  Qn as GamesInfoCtx,
37637
37649
  Eu as LineLogin,
37638
37650
  Gu as LineQrCode,
37639
- qa as STATUS_TYPES,
37651
+ $a as STATUS_TYPES,
37640
37652
  Jn as StatusContext,
37641
37653
  jl as StatusProvider,
37642
37654
  Ys as buildMultiTypes,
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.354",
4
+ "version": "1.0.356",
5
5
  "description": "集成API",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",