50p82u21t54k 0.0.21 → 0.0.23

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.
Files changed (46) hide show
  1. package/dist/50p82u21t54k.es.js +450 -173
  2. package/dist/50p82u21t54k.umd.js +1 -1
  3. package/dist/cmsList/index.d.ts +3 -0
  4. package/dist/cmsList/index.d.ts.map +1 -0
  5. package/dist/cmsList/method.d.ts +45 -0
  6. package/dist/cmsList/method.d.ts.map +1 -0
  7. package/dist/cmsList/type.d.ts +19 -0
  8. package/dist/cmsList/type.d.ts.map +1 -0
  9. package/dist/csLink/index.d.ts +3 -0
  10. package/dist/csLink/index.d.ts.map +1 -0
  11. package/dist/csLink/method.d.ts +8 -0
  12. package/dist/csLink/method.d.ts.map +1 -0
  13. package/dist/csLink/type.d.ts +9 -0
  14. package/dist/csLink/type.d.ts.map +1 -0
  15. package/dist/eGame/index.d.ts +3 -0
  16. package/dist/eGame/index.d.ts.map +1 -0
  17. package/dist/eGame/method.d.ts +22 -0
  18. package/dist/eGame/method.d.ts.map +1 -0
  19. package/dist/eGame/type.d.ts +24 -0
  20. package/dist/eGame/type.d.ts.map +1 -0
  21. package/dist/fishGames/type.d.ts +2 -2
  22. package/dist/fishGames/type.d.ts.map +1 -1
  23. package/dist/getLocale/index.d.ts +3 -0
  24. package/dist/getLocale/index.d.ts.map +1 -0
  25. package/dist/getLocale/method.d.ts +16 -0
  26. package/dist/getLocale/method.d.ts.map +1 -0
  27. package/dist/getLocale/type.d.ts +10 -0
  28. package/dist/getLocale/type.d.ts.map +1 -0
  29. package/dist/home/method.d.ts.map +1 -1
  30. package/dist/home/type.d.ts +4 -0
  31. package/dist/home/type.d.ts.map +1 -1
  32. package/dist/hotGames/type.d.ts +2 -2
  33. package/dist/hotGames/type.d.ts.map +1 -1
  34. package/dist/index.d.ts +11 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/plugin.d.ts +6 -1
  37. package/dist/plugin.d.ts.map +1 -1
  38. package/dist/trialGames/type.d.ts +2 -2
  39. package/dist/trialGames/type.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/getLocale (incomplete)/index.d.ts +0 -1
  42. package/dist/getLocale (incomplete)/index.d.ts.map +0 -1
  43. package/dist/getLocale (incomplete)/method.d.ts +0 -1
  44. package/dist/getLocale (incomplete)/method.d.ts.map +0 -1
  45. package/dist/getLocale (incomplete)/type.d.ts +0 -1
  46. package/dist/getLocale (incomplete)/type.d.ts.map +0 -1
@@ -1,50 +1,93 @@
1
- import y from "axios";
2
- import { ref as G } from "vue";
3
- import l from "crypto-js";
4
- const O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1
+ import j from "axios";
2
+ import { ref as D } from "vue";
3
+ import p from "crypto-js";
4
+ const M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  get getHotGames() {
7
- return F;
7
+ return V;
8
8
  },
9
9
  get processHotGamesData() {
10
- return i;
10
+ return h;
11
11
  }
12
- }, Symbol.toStringTag, { value: "Module" })), b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12
+ }, Symbol.toStringTag, { value: "Module" })), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
13
  __proto__: null,
14
14
  get getFishGames() {
15
- return C;
15
+ return $;
16
16
  },
17
17
  get processFishGame() {
18
- return d;
18
+ return S;
19
19
  },
20
20
  get processFishGamesData() {
21
- return _;
21
+ return b;
22
22
  }
23
- }, Symbol.toStringTag, { value: "Module" })), v = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23
+ }, Symbol.toStringTag, { value: "Module" })), k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
24
  __proto__: null,
25
25
  get getTrialGames() {
26
- return x;
26
+ return K;
27
27
  },
28
28
  get processTrialGamesData() {
29
- return S;
29
+ return P;
30
+ }
31
+ }, Symbol.toStringTag, { value: "Module" })), B = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32
+ __proto__: null,
33
+ get CmsId() {
34
+ return G;
35
+ },
36
+ get getCmsList() {
37
+ return Q;
38
+ },
39
+ get processCmsListData() {
40
+ return L;
41
+ }
42
+ }, Symbol.toStringTag, { value: "Module" })), R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
43
+ __proto__: null,
44
+ get getPromotion() {
45
+ return W;
46
+ },
47
+ get processPromotionData() {
48
+ return O;
30
49
  }
31
- }, Symbol.toStringTag, { value: "Module" })), N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
50
+ }, Symbol.toStringTag, { value: "Module" })), J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32
51
  __proto__: null,
33
52
  get getHome() {
34
- return D;
53
+ return X;
35
54
  },
36
55
  get processHomeData() {
37
- return P;
56
+ return N;
38
57
  },
39
58
  get processPlatformGame() {
40
- return o;
59
+ return u;
41
60
  }
42
- }, Symbol.toStringTag, { value: "Module" })), E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
61
+ }, Symbol.toStringTag, { value: "Module" })), x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
43
62
  __proto__: null,
44
63
  get getCurrentLang() {
45
- return R;
64
+ return Y;
65
+ }
66
+ }, Symbol.toStringTag, { value: "Module" })), z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
67
+ __proto__: null,
68
+ get getGetLocale() {
69
+ return Z;
70
+ },
71
+ get processGetLocaleData() {
72
+ return A;
73
+ }
74
+ }, Symbol.toStringTag, { value: "Module" })), U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
75
+ __proto__: null,
76
+ get getCsLink() {
77
+ return C;
78
+ },
79
+ get processCsLinkData() {
80
+ return E;
81
+ }
82
+ }, Symbol.toStringTag, { value: "Module" })), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
83
+ __proto__: null,
84
+ get getEGame() {
85
+ return w;
86
+ },
87
+ get processEGameData() {
88
+ return T;
46
89
  }
47
- }, Symbol.toStringTag, { value: "Module" })), n = y.create({
90
+ }, Symbol.toStringTag, { value: "Module" })), n = j.create({
48
91
  baseURL: "/apis",
49
92
  timeout: 5e3,
50
93
  // Request timeout
@@ -97,54 +140,59 @@ n.interceptors.request.use(
97
140
  n.interceptors.response.use(
98
141
  (e) => e,
99
142
  (e) => {
100
- const a = {
143
+ const t = {
101
144
  status: null,
102
145
  message: "An error occurred"
103
146
  };
104
- return e.response ? (a.status = e.response.status, a.message = e.response.data.message || e.response.statusText, console.error("Error response:", JSON.stringify(a)), e.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : e.response.status === 404 ? console.error("Resource not found.") : e.response.status >= 500 && console.error("Server error. Please try again later.")) : e.request ? console.error("No response received:", e.request) : console.error("Error setting up request:", e.message), Promise.reject(a);
147
+ return e.response ? (t.status = e.response.status, t.message = e.response.data.message || e.response.statusText, console.error("Error response:", JSON.stringify(t)), e.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : e.response.status === 404 ? console.error("Resource not found.") : e.response.status >= 500 && console.error("Server error. Please try again later.")) : e.request ? console.error("No response received:", e.request) : console.error("Error setting up request:", e.message), Promise.reject(t);
105
148
  }
106
149
  );
107
- const h = G("");
150
+ const v = D("");
108
151
  function r() {
109
- return h.value === "" ? 0 : 1;
152
+ return v.value === "" ? 0 : 1;
110
153
  }
111
- const T = {
112
- home: N,
113
- hotGames: O,
114
- fishGames: b,
115
- trialGames: v,
116
- currentLang: E
117
- }, L = {
154
+ const q = {
155
+ home: J,
156
+ hotGames: M,
157
+ fishGames: F,
158
+ trialGames: k,
159
+ currentLang: x,
160
+ promotion: R,
161
+ getLocale: z,
162
+ csLink: U,
163
+ eGame: H,
164
+ cmsList: B
165
+ }, ae = {
118
166
  install(e) {
119
- e.config.globalProperties.$library = T;
167
+ e.config.globalProperties.$library = q;
120
168
  }
121
- }, p = (e) => {
169
+ }, o = (e) => {
122
170
  try {
123
- const a = JSON.parse(
124
- l.AES.decrypt(e, h.value, {
171
+ const t = JSON.parse(
172
+ p.AES.decrypt(e, v.value, {
125
173
  format: {
126
174
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
127
- stringify: (t) => {
175
+ stringify: (a) => {
128
176
  const s = {
129
- ct: t.ciphertext.toString(l.enc.Base64)
177
+ ct: a.ciphertext.toString(p.enc.Base64)
130
178
  };
131
- return t.iv && (s.iv = t.iv.toString()), t.salt && (s.s = t.salt.toString()), JSON.stringify(s);
179
+ return a.iv && (s.iv = a.iv.toString()), a.salt && (s.s = a.salt.toString()), JSON.stringify(s);
132
180
  },
133
- parse: (t) => {
134
- const s = JSON.parse(t), u = l.lib.CipherParams.create({
135
- ciphertext: l.enc.Base64.parse(s.ct)
181
+ parse: (a) => {
182
+ const s = JSON.parse(a), l = p.lib.CipherParams.create({
183
+ ciphertext: p.enc.Base64.parse(s.ct)
136
184
  });
137
- return s.iv && (u.iv = l.enc.Hex.parse(s.iv)), s.s && (u.salt = l.enc.Hex.parse(s.s)), u;
185
+ return s.iv && (l.iv = p.enc.Hex.parse(s.iv)), s.s && (l.salt = p.enc.Hex.parse(s.s)), l;
138
186
  }
139
187
  }
140
- }).toString(l.enc.Utf8)
188
+ }).toString(p.enc.Utf8)
141
189
  );
142
- return a !== "" ? JSON.parse(a) : a;
143
- } catch (a) {
144
- return console.error(a), "";
190
+ return t !== "" ? JSON.parse(t) : t;
191
+ } catch (t) {
192
+ return console.error(t), "";
145
193
  }
146
194
  };
147
- async function F() {
195
+ async function V() {
148
196
  const e = {
149
197
  status: 200,
150
198
  message: "",
@@ -162,42 +210,42 @@ async function F() {
162
210
  }
163
211
  };
164
212
  try {
165
- const a = await n.get("/hotGames", {
213
+ const t = await n.get("/hotGames", {
166
214
  params: {
167
215
  render: r()
168
216
  }
169
217
  });
170
- let t;
171
- return r() ? t = JSON.parse(p(a.data)) : t = a.data, a.status != 200 ? (e.status = a.status, e.message = "", e) : (e.data = i(t), e);
172
- } catch (a) {
173
- const t = a;
174
- return e.status = t.status || 500, e.message = t.message, e;
218
+ let a;
219
+ return r() ? a = JSON.parse(o(t.data)) : a = t.data, t.status != 200 ? (e.status = t.status, e.message = "", e) : (e.data = h(a), e);
220
+ } catch (t) {
221
+ const a = t;
222
+ return e.status = a.status || 500, e.message = a.message, e;
175
223
  }
176
224
  }
177
- const i = (e) => ({
225
+ const h = (e) => ({
178
226
  currentPage: e.current_page ?? 0,
179
- data: e.data.map((a) => ({
180
- id: a.id ?? 0,
181
- name: a.name ?? "",
182
- pfid: a.pfid ?? 0,
183
- ppname: a.ppname ?? "",
184
- code: a.code ?? "",
185
- img: a.img ?? "",
186
- progressive: a.progressive ?? "",
187
- ppid: a.ppid ?? 0,
188
- notry: a.notry === 1,
189
- productCode: a.product_code ?? "",
190
- imgSrc: a.imgSrc ?? "",
191
- imgPf: a.imgPf ?? "",
192
- favouriteFlag: a.favourite_flag === 1,
193
- platformStatusFlag: a.platform_status_flag ?? "",
194
- platformFlagName: a.platform_flag_name ?? "",
227
+ data: e.data.map((t) => ({
228
+ id: t.id ?? 0,
229
+ name: t.name ?? "",
230
+ pfid: t.pfid ?? 0,
231
+ ppname: t.ppname ?? "",
232
+ code: t.code ?? "",
233
+ img: t.img ?? "",
234
+ progressive: t.progressive ?? "",
235
+ ppid: t.ppid ?? 0,
236
+ notry: t.notry === 1,
237
+ productCode: t.product_code ?? "",
238
+ imgSrc: t.imgSrc ?? "",
239
+ imgPf: t.imgPf ?? "",
240
+ favouriteFlag: t.favourite_flag === 1,
241
+ platformStatusFlag: t.platform_status_flag ?? "",
242
+ platformFlagName: t.platform_flag_name ?? "",
195
243
  platformStatusParams: {
196
- eb: a.platform_status_params.eb ?? !1,
197
- fit: a.platform_status_params.fit ?? !1,
198
- fs: a.platform_status_params.fs ?? !1
244
+ eb: t.platform_status_params.eb ?? !1,
245
+ fit: t.platform_status_params.fit ?? !1,
246
+ fs: t.platform_status_params.fs ?? !1
199
247
  },
200
- gameId: a.game_id ?? 0
248
+ gameId: t.game_id ?? 0
201
249
  })),
202
250
  from: e.from ?? 0,
203
251
  lastPage: e.last_page ?? 0,
@@ -208,7 +256,7 @@ const i = (e) => ({
208
256
  to: e.to ?? 0,
209
257
  total: e.total ?? 0
210
258
  });
211
- async function C() {
259
+ async function $() {
212
260
  const e = {
213
261
  status: 200,
214
262
  message: "",
@@ -218,22 +266,22 @@ async function C() {
218
266
  }
219
267
  };
220
268
  try {
221
- const a = await n.get("/fishGames", {
269
+ const t = await n.get("/fishGames", {
222
270
  params: {
223
271
  render: r()
224
272
  }
225
273
  });
226
- let t;
227
- return r() ? t = JSON.parse(p(a.data)) : t = a.data, a.status != 200 ? (e.status = a.status, e.message = "", e) : (e.data = _(t), e);
228
- } catch (a) {
229
- const t = a;
230
- return e.status = t.status || 500, e.message = t.message, e;
274
+ let a;
275
+ return r() ? a = JSON.parse(o(t.data)) : a = t.data, t.status != 200 ? (e.status = t.status, e.message = "", e) : (e.data = b(a), e);
276
+ } catch (t) {
277
+ const a = t;
278
+ return e.status = a.status || 500, e.message = a.message, e;
231
279
  }
232
280
  }
233
- const _ = (e) => ({
234
- hotfish: e.hotfish.map((a) => d(a)),
235
- data: e.data.map((a) => d(a))
236
- }), d = (e) => ({
281
+ const b = (e) => ({
282
+ hotfish: e.hotfish.map((t) => S(t)),
283
+ data: e.data.map((t) => S(t))
284
+ }), S = (e) => ({
237
285
  id: e.id ?? 0,
238
286
  name: e.name ?? "",
239
287
  ppid: e.pp_id ?? "",
@@ -255,48 +303,146 @@ const _ = (e) => ({
255
303
  fs: e.platform_status_params.fs ?? !1
256
304
  }
257
305
  });
258
- async function x() {
306
+ async function K() {
259
307
  const e = {
260
308
  status: 200,
261
309
  message: "",
262
310
  data: []
263
311
  };
264
312
  try {
265
- const a = await n.get("/trialGames", {
313
+ const t = await n.get("/trialGames", {
266
314
  params: {
267
315
  render: r()
268
316
  }
269
317
  });
270
- let t;
271
- return r() ? t = JSON.parse(p(a.data)) : t = a.data, a.status != 200 ? (e.status = a.status, e.message = "", e) : (e.data = S(t), e);
272
- } catch (a) {
273
- const t = a;
274
- return e.status = t.status || 500, e.message = t.message, e;
318
+ let a;
319
+ return r() ? a = JSON.parse(o(t.data)) : a = t.data, t.status != 200 ? (e.status = t.status, e.message = "", e) : (e.data = P(a), e);
320
+ } catch (t) {
321
+ const a = t;
322
+ return e.status = a.status || 500, e.message = a.message, e;
275
323
  }
276
324
  }
277
- const S = (e) => e.map((a) => ({
278
- ppid: a.ppid ?? 0,
279
- ppname: a.ppname ?? "",
280
- games: a.games.map((t) => ({
281
- id: t.id ?? 0,
282
- name: t.name ?? "",
283
- img: t.img ?? "",
284
- progressive: t.progressive ?? "",
285
- notry: t.notry === 1,
286
- imgSrc: t.imgSrc ?? "",
287
- imgPf: t.imgPf ?? "",
288
- favouriteFlag: t.favourite_flag === 1,
289
- platformStatusFflag: t.platform_status_Fflag ?? "",
290
- platformFlagName: t.platform_flag_name ?? "",
325
+ const P = (e) => e.map((t) => ({
326
+ ppid: t.ppid ?? 0,
327
+ ppname: t.ppname ?? "",
328
+ games: t.games.map((a) => ({
329
+ id: a.id ?? 0,
330
+ name: a.name ?? "",
331
+ img: a.img ?? "",
332
+ progressive: a.progressive ?? "",
333
+ notry: a.notry === 1,
334
+ imgSrc: a.imgSrc ?? "",
335
+ imgPf: a.imgPf ?? "",
336
+ favouriteFlag: a.favourite_flag === 1,
337
+ platformStatusFflag: a.platform_status_Fflag ?? "",
338
+ platformFlagName: a.platform_flag_name ?? "",
291
339
  platformStatusParams: {
292
- eb: t.platform_status_params.eb ?? !1,
293
- fit: t.platform_status_params.fit ?? !1,
294
- fs: t.platform_status_params.fs ?? !1
340
+ eb: a.platform_status_params.eb ?? !1,
341
+ fit: a.platform_status_params.fit ?? !1,
342
+ fs: a.platform_status_params.fs ?? !1
295
343
  },
296
- ppname: a.ppname ?? ""
344
+ ppname: t.ppname ?? ""
297
345
  }))
298
346
  }));
299
- async function D() {
347
+ var G = /* @__PURE__ */ ((e) => (e[e.AllCategories = 0] = "AllCategories", e[e.Lotto = 2] = "Lotto", e[e.LiveCasino = 3] = "LiveCasino", e[e.SlotGames = 4] = "SlotGames", e[e.SportsBetting = 5] = "SportsBetting", e[e.LatestAd = 7] = "LatestAd", e[e.Promotions = 8] = "Promotions", e[e.MobileBetting = 9] = "MobileBetting", e[e.ESports = 12] = "ESports", e[e.CardGames = 13] = "CardGames", e[e.FishingGames = 14] = "FishingGames", e[e.BottomRightAd = 16] = "BottomRightAd", e[e.LotteryActivity = 18] = "LotteryActivity", e[e.HomepagePopup = 101] = "HomepagePopup", e[e.LeftAd = 102] = "LeftAd", e[e.RightAd = 103] = "RightAd", e[e.MobileAd = 104] = "MobileAd", e[e.MobilePopup = 105] = "MobilePopup", e[e.BottomLeftAd = 106] = "BottomLeftAd", e[e.InfoGallery = 109] = "InfoGallery", e[e.AgentBackendAd = 114] = "AgentBackendAd", e[e.CheckInBanner = 123] = "CheckInBanner", e[e.PlatformActivities = 128] = "PlatformActivities", e[e.LotterySlogan = 130] = "LotterySlogan", e[e.MobileLotterySlogan = 131] = "MobileLotterySlogan", e[e.PointsMallSlogan = 135] = "PointsMallSlogan", e))(G || {});
348
+ async function Q(e) {
349
+ const t = {
350
+ status: 200,
351
+ message: "",
352
+ data: {
353
+ cmsList: []
354
+ }
355
+ };
356
+ try {
357
+ const a = await n.get(`/cmsList?id=${e}`, {
358
+ params: {
359
+ render: r()
360
+ }
361
+ });
362
+ let s;
363
+ return r() ? s = JSON.parse(o(a.data)) : s = a.data, a.status != 200 ? (t.status = a.status, t.message = "", t) : (t.data = L(s), t);
364
+ } catch (a) {
365
+ const s = a;
366
+ return t.status = s.status || 500, t.message = s.message, t;
367
+ }
368
+ }
369
+ const L = (e) => ({
370
+ cmsList: e.cmslist.map((t) => ({
371
+ name: t.name ?? "",
372
+ content: t.content ?? "",
373
+ link: t.link ?? "",
374
+ linkTarget: t.link_target ?? "",
375
+ updatedOn: t.updated_on ?? "",
376
+ idCmsCategory: t.id_cms_category ?? 0,
377
+ contentOrg: t.content_org ?? "",
378
+ linkOrg: t.link_org ?? ""
379
+ }))
380
+ });
381
+ async function W() {
382
+ const e = {
383
+ status: 200,
384
+ message: "",
385
+ data: {
386
+ objList: [],
387
+ promoCat: [],
388
+ resize: 0
389
+ }
390
+ };
391
+ try {
392
+ const t = await n.get("/promotion", {
393
+ params: {
394
+ render: r()
395
+ }
396
+ });
397
+ let a;
398
+ return r() ? a = JSON.parse(o(t.data)) : a = t.data, t.status != 200 ? (e.status = t.status, e.message = "", e) : (e.data = O(a), e);
399
+ } catch (t) {
400
+ const a = t;
401
+ return e.status = a.status || 500, e.message = a.message, e;
402
+ }
403
+ }
404
+ const O = (e) => ({
405
+ objList: e.objList.map((t) => ({
406
+ promoIndex: t.promoindex ?? 0,
407
+ type: t.type ?? 0,
408
+ thumb: t.thumb ?? 0,
409
+ title: t.title ?? "",
410
+ displayTime: t.display_time ?? "",
411
+ handle: t.handle ?? "",
412
+ content: t.content ?? "",
413
+ langList: t.lang_list ?? "",
414
+ agentList: t.agent_list ?? "",
415
+ dateCreated: t.datecreated ?? "",
416
+ updateBy: t.updateby ?? "",
417
+ lastUpdated: t.lastupdated ?? "",
418
+ sequence: t.sequence ?? 0,
419
+ status: t.status === 1,
420
+ timer: t.timer ?? "",
421
+ stime: t.stime ?? "",
422
+ etime: t.etime ?? "",
423
+ smaid: t.smaid ?? "",
424
+ companyIndex: t.companyindex ?? "",
425
+ fileName: t.filename ?? "",
426
+ version: t.version ?? "",
427
+ categoryName: t.category_name ?? "",
428
+ barImg: t.bar_img ?? "",
429
+ buttonImg: t.button_img ?? "",
430
+ promoImg: t.promo_image ?? "",
431
+ catId: t.catid ?? "",
432
+ imageType: t.image_type ?? "",
433
+ image: t.image ?? "",
434
+ isLink: t.isLink,
435
+ latestUpdate: t.latestupdate ?? ""
436
+ })),
437
+ promoCat: e.promoCat.map((t) => ({
438
+ catId: t.catid ?? 0,
439
+ name: t.name ?? "",
440
+ barImg: t.bar_img ?? "",
441
+ buttonImg: t.button_img ?? ""
442
+ })),
443
+ resize: e.resize
444
+ });
445
+ async function X() {
300
446
  const e = {
301
447
  status: 200,
302
448
  message: "",
@@ -343,10 +489,33 @@ async function D() {
343
489
  status: 200,
344
490
  message: "",
345
491
  data: []
492
+ },
493
+ promotion: {
494
+ status: 200,
495
+ message: "",
496
+ data: {
497
+ objList: [],
498
+ promoCat: [],
499
+ resize: 0
500
+ }
501
+ },
502
+ cmsList: {
503
+ status: 200,
504
+ message: "",
505
+ data: {
506
+ cmsList: []
507
+ }
346
508
  }
347
509
  };
348
510
  try {
349
- const [a, t, s, u] = await Promise.all([
511
+ const [
512
+ t,
513
+ a,
514
+ s,
515
+ l,
516
+ c,
517
+ g
518
+ ] = await Promise.all([
350
519
  n.get("/home", {
351
520
  params: {
352
521
  render: r()
@@ -366,64 +535,74 @@ async function D() {
366
535
  params: {
367
536
  render: r()
368
537
  }
538
+ }),
539
+ n.get("/promotion", {
540
+ params: {
541
+ render: r()
542
+ }
543
+ }),
544
+ n.get(`/cmsList?id=${G.LatestAd}`, {
545
+ params: {
546
+ render: r()
547
+ }
369
548
  })
370
549
  ]);
371
- let m, c, g, f;
372
- return r() ? (m = JSON.parse(p(a.data)), c = JSON.parse(p(t.data)), g = JSON.parse(p(s.data)), f = JSON.parse(
373
- p(u.data)
374
- )) : (m = a.data, c = t.data, g = s.data, f = u.data), a.status != 200 ? (e.status = a.status, e.message = "") : e.data = P(m), t.status != 200 ? (e.hotGames.status = t.status, e.hotGames.message = "") : e.hotGames.data = i(c), s.status != 200 ? (e.fishGames.status = s.status, e.fishGames.message = "") : e.fishGames.data = _(g), u.status != 200 ? (e.trialGames.status = u.status, e.trialGames.message = "") : e.trialGames.data = S(f), e;
375
- } catch (a) {
376
- const t = a;
377
- return e.status = t.status || 500, e.message = t.message, e;
550
+ let m, i, f, d, _, y;
551
+ return r() ? (m = JSON.parse(o(t.data)), i = JSON.parse(o(a.data)), f = JSON.parse(o(s.data)), d = JSON.parse(
552
+ o(l.data)
553
+ ), _ = JSON.parse(o(c.data)), y = JSON.parse(o(g.data))) : (m = t.data, i = a.data, f = s.data, d = l.data, _ = c.data, y = g.data), t.status != 200 ? (e.status = t.status, e.message = "") : e.data = N(m), a.status != 200 ? (e.hotGames.status = a.status, e.hotGames.message = "") : e.hotGames.data = h(i), s.status != 200 ? (e.fishGames.status = s.status, e.fishGames.message = "") : e.fishGames.data = b(f), l.status != 200 ? (e.trialGames.status = l.status, e.trialGames.message = "") : e.trialGames.data = P(d), c.status != 200 ? (e.promotion.status = c.status, e.promotion.message = "") : e.promotion.data = O(_), g.status != 200 ? (e.cmsList.status = g.status, e.cmsList.message = "") : e.cmsList.data = L(y), e;
554
+ } catch (t) {
555
+ const a = t;
556
+ return e.status = a.status || 500, e.message = a.message, e;
378
557
  }
379
558
  }
380
- const P = (e) => ({
559
+ const N = (e) => ({
381
560
  game: {
382
- SPORT: e.game.SPORT.map((a) => o(a)),
383
- SPECIAL: e.game.SPECIAL.map((a) => o(a)),
384
- PVP: e.game.PVP.map((a) => o(a)),
385
- LIVE: e.game.LIVE.map((a) => o(a)),
386
- EVENT: e.game.EVENT.map((a) => o(a)),
387
- ESPORT: e.game.ESPORT.map((a) => o(a)),
388
- EGAME: e.game.EGAME.map((a) => o(a)),
389
- BINGO: e.game.BINGO.map((a) => o(a))
561
+ SPORT: e.game.SPORT.map((t) => u(t)),
562
+ SPECIAL: e.game.SPECIAL.map((t) => u(t)),
563
+ PVP: e.game.PVP.map((t) => u(t)),
564
+ LIVE: e.game.LIVE.map((t) => u(t)),
565
+ EVENT: e.game.EVENT.map((t) => u(t)),
566
+ ESPORT: e.game.ESPORT.map((t) => u(t)),
567
+ EGAME: e.game.EGAME.map((t) => u(t)),
568
+ BINGO: e.game.BINGO.map((t) => u(t))
390
569
  },
391
- mobileBanner: e.mobileBanner.map((a) => ({
392
- name: a.name ?? "",
393
- content: a.content ?? "",
394
- link: a.link ?? "",
395
- linkTarget: a.link_target ?? "",
396
- updatedOn: a.updated_on ?? "",
397
- idCmsCategory: a.id_cms_category ?? 0,
398
- contentOrg: a.content_org ?? ""
570
+ mobileBanner: e.mobileBanner.map((t) => ({
571
+ name: t.name ?? "",
572
+ content: t.content ?? "",
573
+ link: t.link ?? "",
574
+ linkTarget: t.link_target ?? "",
575
+ updatedOn: t.updated_on ?? "",
576
+ idCmsCategory: t.id_cms_category ?? 0,
577
+ contentOrg: t.content_org ?? ""
399
578
  })),
400
- announcement: e.announcement.map((a) => ({
401
- announcementIndex: a.announcement_index ?? 0,
402
- announcementEnglish: a.announcement_english ?? "",
403
- announcementSimplified: a.announcement_simplified ?? "",
404
- announcementTraditional: a.announcement_traditional ?? "",
405
- announcementMalay: a.announcement_malay ?? "",
406
- announcementStatus: a.announcement_status === "1",
407
- announcementShow: a.announcement_show === "1",
408
- announcementAlert: a.announcement_alert === "1",
409
- announcementUser: a.announcement_user === "1",
410
- announcementSequence: a.announcement_sequence ?? 0,
411
- announcementCompany: a.announcement_company === "1",
412
- companyIndex: a.companyindex ?? 0,
413
- announcementLastUpdated: a.announcement_lastupdated ?? "",
414
- announcementDateCreated: a.announcement_datecreated ?? "",
415
- announcementSmaid: a.announcement_smaid ?? "",
416
- annTimer: a.ann_timer ?? "",
417
- annStart: a.ann_start ?? "",
418
- annEnd: a.ann_end ?? "",
419
- grp: a.grp ?? "",
420
- time: a.time ?? ""
579
+ announcement: e.announcement.map((t) => ({
580
+ announcementIndex: t.announcement_index ?? 0,
581
+ announcementEnglish: t.announcement_english ?? "",
582
+ announcementSimplified: t.announcement_simplified ?? "",
583
+ announcementTraditional: t.announcement_traditional ?? "",
584
+ announcementMalay: t.announcement_malay ?? "",
585
+ announcementStatus: t.announcement_status === "1",
586
+ announcementShow: t.announcement_show === "1",
587
+ announcementAlert: t.announcement_alert === "1",
588
+ announcementUser: t.announcement_user === "1",
589
+ announcementSequence: t.announcement_sequence ?? 0,
590
+ announcementCompany: t.announcement_company === "1",
591
+ companyIndex: t.companyindex ?? 0,
592
+ announcementLastUpdated: t.announcement_lastupdated ?? "",
593
+ announcementDateCreated: t.announcement_datecreated ?? "",
594
+ announcementSmaid: t.announcement_smaid ?? "",
595
+ annTimer: t.ann_timer ?? "",
596
+ annStart: t.ann_start ?? "",
597
+ annEnd: t.ann_end ?? "",
598
+ grp: t.grp ?? "",
599
+ time: t.time ?? ""
421
600
  })),
422
- alertAnnouncement: e.alert_announcement.map((a) => ({
423
- announcementDateCreated: a.announcement_datecreated ?? "",
424
- announcementSimplified: a.announcement_simplified ?? ""
601
+ alertAnnouncement: e.alert_announcement.map((t) => ({
602
+ announcementDateCreated: t.announcement_datecreated ?? "",
603
+ announcementSimplified: t.announcement_simplified ?? ""
425
604
  }))
426
- }), o = (e) => ({
605
+ }), u = (e) => ({
427
606
  id: e.id ?? 0,
428
607
  idPlatformMaster: e.id_PlatformMaster ?? 0,
429
608
  idProductMaster: e.id_ProductMaster ?? 0,
@@ -466,30 +645,128 @@ const P = (e) => ({
466
645
  imgSport: e.imgSport ?? "",
467
646
  imgTemplate: e.imgTemplate ?? ""
468
647
  });
469
- async function R() {
648
+ async function Y() {
470
649
  const e = {
471
650
  status: 200,
472
651
  message: "",
473
652
  data: ""
474
653
  };
475
654
  try {
476
- const a = await n.get("/currentLang", {
655
+ const t = await n.get("/currentLang", {
656
+ params: {
657
+ render: r()
658
+ }
659
+ });
660
+ let a;
661
+ return r() ? a = JSON.parse(o(t.data)) : a = t.data, t.status != 200 ? (e.status = t.status, e.message = "", e) : (e.data = a, e);
662
+ } catch (t) {
663
+ const a = t;
664
+ return e.status = a.status || 500, e.message = a.message, e;
665
+ }
666
+ }
667
+ async function Z() {
668
+ const e = {
669
+ status: 200,
670
+ message: "",
671
+ data: []
672
+ };
673
+ try {
674
+ const t = await n.get("/getLocale", {
477
675
  params: {
478
676
  render: r()
479
677
  }
480
678
  });
481
- let t;
482
- return r() ? t = JSON.parse(p(a.data)) : t = a.data, a.status != 200 ? (e.status = a.status, e.message = "", e) : (e.data = t, e);
679
+ let a;
680
+ return r() ? a = JSON.parse(o(t.data)) : a = t.data, t.status != 200 ? (e.status = t.status, e.message = "", e) : (e.data = A(a), e);
681
+ } catch (t) {
682
+ const a = t;
683
+ return e.status = a.status || 500, e.message = a.message, e;
684
+ }
685
+ }
686
+ const A = (e) => [
687
+ {
688
+ code: "en",
689
+ label: e.en.label ?? ""
690
+ },
691
+ {
692
+ code: "zh",
693
+ label: e.zh.label ?? ""
694
+ },
695
+ {
696
+ code: "ms",
697
+ label: e.ms.label ?? ""
698
+ }
699
+ ];
700
+ async function C() {
701
+ const e = {
702
+ status: 200,
703
+ message: "",
704
+ data: {
705
+ liveChat: ""
706
+ }
707
+ };
708
+ try {
709
+ const t = await n.get("/cslink", {
710
+ params: {
711
+ render: r()
712
+ }
713
+ });
714
+ let a;
715
+ return r() ? a = JSON.parse(o(t.data)) : a = t.data, t.status != 200 ? (e.status = t.status, e.message = "", e) : (e.data = E(a), e);
716
+ } catch (t) {
717
+ const a = t;
718
+ return e.status = a.status || 500, e.message = a.message, e;
719
+ }
720
+ }
721
+ const E = (e) => ({
722
+ liveChat: e.livechat ?? ""
723
+ });
724
+ async function w(e) {
725
+ const t = {
726
+ status: 200,
727
+ message: "",
728
+ data: []
729
+ };
730
+ try {
731
+ const a = await n.get(`/egame/json/${e}`, {
732
+ params: {
733
+ render: r()
734
+ }
735
+ });
736
+ let s;
737
+ return r() ? s = JSON.parse(o(a.data)) : s = a.data, a.status != 200 ? (t.status = a.status, t.message = "", t) : (t.data = T(s), t);
483
738
  } catch (a) {
484
- const t = a;
485
- return e.status = t.status || 500, e.message = t.message, e;
739
+ const s = a;
740
+ return t.status = s.status || 500, t.message = s.message, t;
486
741
  }
487
742
  }
743
+ const T = (e) => e.map((t) => ({
744
+ gameId: t.game_id ?? "",
745
+ imgSrc: t.imgSrc ?? "",
746
+ imgPf: t.imgPf ?? "",
747
+ name: t.name ?? "",
748
+ favouriteFlag: t.favourite_flag === 1,
749
+ platformStatusFflag: t.platform_status_Fflag ?? "",
750
+ platformFlagName: t.platform_flag_name ?? "",
751
+ platformStatusParams: {
752
+ eb: t.platform_status_params.eb ?? !1,
753
+ fit: t.platform_status_params.fit ?? !1,
754
+ fs: t.platform_status_params.fs ?? !1
755
+ },
756
+ progressive: t.progressive ?? "",
757
+ gameCategory: t.game_category ?? "",
758
+ ppid: t.pp_id ?? ""
759
+ }));
488
760
  export {
489
- L as Repository,
490
- E as currentLang,
491
- b as fishGames,
492
- N as home,
493
- O as hotGames,
494
- v as trialGames
761
+ ae as Repository,
762
+ B as cmsList,
763
+ U as csLink,
764
+ x as currentLang,
765
+ H as eGame,
766
+ F as fishGames,
767
+ z as getLocale,
768
+ J as home,
769
+ M as hotGames,
770
+ R as promotion,
771
+ k as trialGames
495
772
  };