50p82u21t54k 0.0.20 → 0.0.21

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 (42) hide show
  1. package/dist/50p82u21t54k.es.js +359 -359
  2. package/dist/50p82u21t54k.umd.js +1 -1
  3. package/dist/currentLang/index.d.ts +3 -0
  4. package/dist/currentLang/index.d.ts.map +1 -0
  5. package/dist/currentLang/method.d.ts +4 -0
  6. package/dist/currentLang/method.d.ts.map +1 -0
  7. package/dist/currentLang/type.d.ts +6 -0
  8. package/dist/currentLang/type.d.ts.map +1 -0
  9. package/dist/fishGames/method.d.ts +3 -1
  10. package/dist/fishGames/method.d.ts.map +1 -1
  11. package/dist/fishGames/type.d.ts +5 -4
  12. package/dist/fishGames/type.d.ts.map +1 -1
  13. package/dist/getLocale (incomplete)/index.d.ts +1 -0
  14. package/dist/getLocale (incomplete)/index.d.ts.map +1 -0
  15. package/dist/getLocale (incomplete)/method.d.ts +1 -0
  16. package/dist/getLocale (incomplete)/method.d.ts.map +1 -0
  17. package/dist/getLocale (incomplete)/type.d.ts +1 -0
  18. package/dist/getLocale (incomplete)/type.d.ts.map +1 -0
  19. package/dist/getSetting/type.d.ts.map +1 -1
  20. package/dist/home/method.d.ts +4 -2
  21. package/dist/home/method.d.ts.map +1 -1
  22. package/dist/home/type.d.ts +10 -9
  23. package/dist/home/type.d.ts.map +1 -1
  24. package/dist/hotGames/method.d.ts +2 -1
  25. package/dist/hotGames/method.d.ts.map +1 -1
  26. package/dist/hotGames/type.d.ts +30 -29
  27. package/dist/hotGames/type.d.ts.map +1 -1
  28. package/dist/index.d.ts +3 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/plugin.d.ts +2 -1
  31. package/dist/plugin.d.ts.map +1 -1
  32. package/dist/promotion/index.d.ts +3 -0
  33. package/dist/promotion/index.d.ts.map +1 -0
  34. package/dist/promotion/method.d.ts +46 -0
  35. package/dist/promotion/method.d.ts.map +1 -0
  36. package/dist/promotion/type.d.ts +49 -0
  37. package/dist/promotion/type.d.ts.map +1 -0
  38. package/dist/trialGames/method.d.ts +2 -1
  39. package/dist/trialGames/method.d.ts.map +1 -1
  40. package/dist/trialGames/type.d.ts +6 -5
  41. package/dist/trialGames/type.d.ts.map +1 -1
  42. package/package.json +1 -1
@@ -1,27 +1,50 @@
1
- import h from "axios";
1
+ import y from "axios";
2
2
  import { ref as G } from "vue";
3
- import m from "crypto-js";
4
- const y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
- __proto__: null,
6
- get getHome() {
7
- return F;
8
- }
9
- }, Symbol.toStringTag, { value: "Module" })), v = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3
+ import l from "crypto-js";
4
+ const O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
5
  __proto__: null,
11
6
  get getHotGames() {
12
- return E;
7
+ return F;
8
+ },
9
+ get processHotGamesData() {
10
+ return i;
13
11
  }
14
12
  }, Symbol.toStringTag, { value: "Module" })), b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15
13
  __proto__: null,
16
14
  get getFishGames() {
17
- return T;
15
+ return C;
16
+ },
17
+ get processFishGame() {
18
+ return d;
19
+ },
20
+ get processFishGamesData() {
21
+ return _;
18
22
  }
19
- }, Symbol.toStringTag, { value: "Module" })), O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23
+ }, Symbol.toStringTag, { value: "Module" })), v = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20
24
  __proto__: null,
21
25
  get getTrialGames() {
22
26
  return x;
27
+ },
28
+ get processTrialGamesData() {
29
+ return S;
23
30
  }
24
- }, Symbol.toStringTag, { value: "Module" })), f = h.create({
31
+ }, Symbol.toStringTag, { value: "Module" })), N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32
+ __proto__: null,
33
+ get getHome() {
34
+ return D;
35
+ },
36
+ get processHomeData() {
37
+ return P;
38
+ },
39
+ get processPlatformGame() {
40
+ return o;
41
+ }
42
+ }, Symbol.toStringTag, { value: "Module" })), E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
43
+ __proto__: null,
44
+ get getCurrentLang() {
45
+ return R;
46
+ }
47
+ }, Symbol.toStringTag, { value: "Module" })), n = y.create({
25
48
  baseURL: "/apis",
26
49
  timeout: 5e3,
27
50
  // Request timeout
@@ -67,290 +90,62 @@ const y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
67
90
  // },
68
91
  // },
69
92
  });
70
- f.interceptors.request.use(
71
- (a) => a,
72
- (a) => (console.error("Error request:", a.response), Promise.reject(a))
93
+ n.interceptors.request.use(
94
+ (e) => e,
95
+ (e) => (console.error("Error request:", e.response), Promise.reject(e))
73
96
  );
74
- f.interceptors.response.use(
75
- (a) => a,
76
- (a) => {
77
- const r = {
97
+ n.interceptors.response.use(
98
+ (e) => e,
99
+ (e) => {
100
+ const a = {
78
101
  status: null,
79
102
  message: "An error occurred"
80
103
  };
81
- return a.response ? (r.status = a.response.status, r.message = a.response.data.message || a.response.statusText, console.error("Error response:", JSON.stringify(r)), a.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : a.response.status === 404 ? console.error("Resource not found.") : a.response.status >= 500 && console.error("Server error. Please try again later.")) : a.request ? console.error("No response received:", a.request) : console.error("Error setting up request:", a.message), Promise.reject(r);
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);
82
105
  }
83
106
  );
84
- const P = G("");
85
- function u() {
86
- return P.value === "" ? 0 : 1;
107
+ const h = G("");
108
+ function r() {
109
+ return h.value === "" ? 0 : 1;
87
110
  }
88
- const N = {
89
- home: y,
90
- hotGames: v,
111
+ const T = {
112
+ home: N,
113
+ hotGames: O,
91
114
  fishGames: b,
92
- trialGames: O
93
- }, j = {
94
- install(a) {
95
- a.config.globalProperties.$library = N;
115
+ trialGames: v,
116
+ currentLang: E
117
+ }, L = {
118
+ install(e) {
119
+ e.config.globalProperties.$library = T;
96
120
  }
97
- }, g = (a) => {
121
+ }, p = (e) => {
98
122
  try {
99
- const r = JSON.parse(
100
- m.AES.decrypt(a, P.value, {
123
+ const a = JSON.parse(
124
+ l.AES.decrypt(e, h.value, {
101
125
  format: {
102
126
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
127
  stringify: (t) => {
104
128
  const s = {
105
- ct: t.ciphertext.toString(m.enc.Base64)
129
+ ct: t.ciphertext.toString(l.enc.Base64)
106
130
  };
107
131
  return t.iv && (s.iv = t.iv.toString()), t.salt && (s.s = t.salt.toString()), JSON.stringify(s);
108
132
  },
109
133
  parse: (t) => {
110
- const s = JSON.parse(t), n = m.lib.CipherParams.create({
111
- ciphertext: m.enc.Base64.parse(s.ct)
134
+ const s = JSON.parse(t), u = l.lib.CipherParams.create({
135
+ ciphertext: l.enc.Base64.parse(s.ct)
112
136
  });
113
- return s.iv && (n.iv = m.enc.Hex.parse(s.iv)), s.s && (n.salt = m.enc.Hex.parse(s.s)), n;
137
+ return s.iv && (u.iv = l.enc.Hex.parse(s.iv)), s.s && (u.salt = l.enc.Hex.parse(s.s)), u;
114
138
  }
115
139
  }
116
- }).toString(m.enc.Utf8)
140
+ }).toString(l.enc.Utf8)
117
141
  );
118
- return r !== "" ? JSON.parse(r) : r;
119
- } catch (r) {
120
- return console.error(r), "";
142
+ return a !== "" ? JSON.parse(a) : a;
143
+ } catch (a) {
144
+ return console.error(a), "";
121
145
  }
122
146
  };
123
147
  async function F() {
124
- const a = {
125
- status: 200,
126
- message: "",
127
- data: {
128
- game: {
129
- SPORT: [],
130
- SPECIAL: [],
131
- PVP: [],
132
- LIVE: [],
133
- EVENT: [],
134
- ESPORT: [],
135
- EGAME: [],
136
- BINGO: []
137
- },
138
- mobileBanner: [],
139
- announcement: [],
140
- alertAnnouncement: [],
141
- hotGames: {
142
- status: 200,
143
- message: "",
144
- data: {
145
- currentPage: 0,
146
- data: [],
147
- from: 0,
148
- lastPage: 0,
149
- nextPageUrl: "",
150
- path: "",
151
- perPage: 0,
152
- prevPageUrl: "",
153
- to: 0,
154
- total: 0
155
- }
156
- },
157
- fishGames: {
158
- status: 200,
159
- message: "",
160
- data: {
161
- hotfish: [],
162
- data: []
163
- }
164
- },
165
- trialGames: {
166
- status: 200,
167
- message: "",
168
- data: []
169
- }
170
- }
171
- };
172
- try {
173
- const [r, t, s, n] = await Promise.all([
174
- f.get("/home", {
175
- params: {
176
- render: u()
177
- }
178
- }),
179
- f.get("/hotGames", {
180
- params: {
181
- render: u()
182
- }
183
- }),
184
- f.get("/fishGames", {
185
- params: {
186
- render: u()
187
- }
188
- }),
189
- f.get("/trialGames", {
190
- params: {
191
- render: u()
192
- }
193
- })
194
- ]);
195
- let o, l, c, _;
196
- return u() ? (o = JSON.parse(g(r.data)), l = JSON.parse(g(t.data)), c = JSON.parse(g(s.data)), _ = JSON.parse(
197
- g(n.data)
198
- )) : (o = r.data, l = t.data, c = s.data, _ = n.data), r.status != 200 ? (a.status = r.status, a.message = "") : (a.data.game = {
199
- SPORT: o.game.SPORT.map((e) => d(e)) ?? [],
200
- SPECIAL: o.game.SPECIAL.map((e) => d(e)) ?? [],
201
- PVP: o.game.PVP.map((e) => d(e)) ?? [],
202
- LIVE: o.game.LIVE.map((e) => d(e)) ?? [],
203
- EVENT: o.game.EVENT.map((e) => d(e)) ?? [],
204
- ESPORT: o.game.ESPORT.map((e) => d(e)) ?? [],
205
- EGAME: o.game.EGAME.map((e) => d(e)) ?? [],
206
- BINGO: o.game.BINGO.map((e) => d(e)) ?? []
207
- }, a.data.mobileBanner = o.mobileBanner.map((e) => ({
208
- name: e.name ?? "",
209
- content: e.content ?? "",
210
- link: e.link ?? "",
211
- linkTarget: e.link_target ?? "",
212
- updatedOn: e.updated_on ?? "",
213
- idCmsCategory: e.id_cms_category ?? 0,
214
- contentOrg: e.content_org ?? ""
215
- })) ?? [], a.data.announcement = o.announcement.map((e) => ({
216
- announcementIndex: e.announcement_index ?? 0,
217
- announcementEnglish: e.announcement_english ?? "",
218
- announcementSimplified: e.announcement_simplified ?? "",
219
- announcementTraditional: e.announcement_traditional ?? "",
220
- announcementMalay: e.announcement_malay ?? "",
221
- announcementStatus: e.announcement_status === "1",
222
- announcementShow: e.announcement_show === "1",
223
- announcementAlert: e.announcement_alert === "1",
224
- announcementUser: e.announcement_user === "1",
225
- announcementSequence: e.announcement_sequence ?? 0,
226
- announcementCompany: e.announcement_company === "1",
227
- companyIndex: e.companyindex ?? 0,
228
- announcementLastUpdated: e.announcement_lastupdated ?? "",
229
- announcementDateCreated: e.announcement_datecreated ?? "",
230
- announcementSmaid: e.announcement_smaid ?? "",
231
- annTimer: e.ann_timer ?? "",
232
- annStart: e.ann_start ?? "",
233
- annEnd: e.ann_end ?? "",
234
- grp: e.grp ?? "",
235
- time: e.time ?? ""
236
- })) ?? [], a.data.alertAnnouncement = o.alert_announcement.map((e) => ({
237
- announcementDateCreated: e.announcement_datecreated ?? "",
238
- announcementSimplified: e.announcement_simplified ?? ""
239
- })) ?? []), t.status != 200 ? (a.data.hotGames.status = t.status, a.data.hotGames.message = "") : (a.data.hotGames.data.currentPage = l.current_page ?? 0, a.data.hotGames.data.data = l.data.map((e) => ({
240
- id: e.id ?? 0,
241
- name: e.name ?? "",
242
- pfid: e.pfid ?? 0,
243
- ppname: e.ppname ?? "",
244
- code: e.code ?? "",
245
- img: e.img ?? "",
246
- progressive: e.progressive ?? "",
247
- ppid: e.ppid ?? 0,
248
- notry: e.notry === 1,
249
- productCode: e.product_code ?? "",
250
- imgSrc: e.imgSrc ?? "",
251
- imgPf: e.imgPf ?? "",
252
- favouriteFlag: e.favourite_flag === 1,
253
- platformStatusFlag: e.platform_status_flag ?? "",
254
- platformFlagName: e.platform_flag_name ?? "",
255
- platformStatusParams: {
256
- eb: e.platform_status_params.eb ?? !1,
257
- fit: e.platform_status_params.fit ?? !1,
258
- fs: e.platform_status_params.fs ?? !1
259
- },
260
- gameId: e.game_id ?? 0
261
- })), a.data.hotGames.data.from = l.from ?? 0, a.data.hotGames.data.lastPage = l.last_page ?? 0, a.data.hotGames.data.nextPageUrl = l.next_page_url ?? "", a.data.hotGames.data.path = l.path ?? "", a.data.hotGames.data.perPage = l.per_page ?? 0, a.data.hotGames.data.prevPageUrl = l.prev_page_url ?? "", a.data.hotGames.data.to = l.to ?? 0, a.data.hotGames.data.total = l.total ?? 0), s.status != 200 ? (a.data.fishGames.status = s.status, a.data.fishGames.message = "") : (a.data.fishGames.data.hotfish = c.data.map((e) => i(e)) ?? [], a.data.fishGames.data.data = c.data.map((e) => i(e)) ?? []), n.status != 200 ? (a.data.trialGames.status = n.status, a.data.trialGames.message = "") : a.data.trialGames.data = _.map((e) => ({
262
- ppid: e.ppid ?? 0,
263
- ppname: e.ppname ?? "",
264
- games: e.games.map((p) => ({
265
- id: p.id ?? 0,
266
- name: p.name ?? "",
267
- img: p.img ?? "",
268
- progressive: p.progressive ?? "",
269
- notry: p.notry === 1,
270
- imgSrc: p.imgSrc ?? "",
271
- imgPf: p.imgPf ?? "",
272
- favouriteFlag: p.favourite_flag === 1,
273
- platformStatusFflag: p.platform_status_Fflag ?? "",
274
- platformFlagName: p.platform_flag_name ?? "",
275
- platformStatusParams: {
276
- eb: p.platform_status_params.eb ?? !1,
277
- fit: p.platform_status_params.fit ?? !1,
278
- fs: p.platform_status_params.fs ?? !1
279
- },
280
- ppname: e.ppname ?? ""
281
- })) ?? []
282
- })) ?? [], a;
283
- } catch (r) {
284
- const t = r;
285
- return a.status = t.status || 500, a.message = t.message, a;
286
- }
287
- }
288
- const i = (a) => ({
289
- id: a.id ?? 0,
290
- name: a.name ?? "",
291
- ppid: a.pp_id ?? "",
292
- img: a.img ?? "",
293
- desc: a.desc ?? "",
294
- ppname: a.pp_name ?? "",
295
- platformCode: a.platform_code ?? "",
296
- code: a.code ?? "",
297
- flag: a.flag ?? 0,
298
- gameId: a.game_id ?? 0,
299
- imgSrc: a.imgSrc ?? "",
300
- imgPf: a.imgPf ?? "",
301
- favouriteFlag: a.favourite_flag === 1,
302
- platformStatusFflag: a.platform_status_Fflag ?? "",
303
- platformFlagName: a.platform_flag_name ?? "",
304
- platformStatusParams: {
305
- eb: a.platform_status_params.eb ?? !1,
306
- fit: a.platform_status_params.fit ?? !1,
307
- fs: a.platform_status_params.fs ?? !1
308
- }
309
- }), d = (a) => ({
310
- id: a.id ?? 0,
311
- idPlatformMaster: a.id_PlatformMaster ?? 0,
312
- idProductMaster: a.id_ProductMaster ?? 0,
313
- name: a.name ?? "",
314
- shortName: a.shortName ?? "",
315
- img: a.img ?? "",
316
- mobileUrl: a.mobileUrl ?? "",
317
- url: a.url ?? "",
318
- desc: a.desc ?? "",
319
- seq: a.seq ?? 0,
320
- flag: a.flag ?? 0,
321
- status: a.status ?? "",
322
- createdBy: a.created_by ?? 0,
323
- createdOn: a.created_on ?? "",
324
- categoryID: a.categoryid ?? 0,
325
- com: a.com ?? "",
326
- cur: a.cur ?? "",
327
- pt: a.pt ?? "",
328
- ppName: a.pp_name ?? "",
329
- ppImage: a.pp_image ?? "",
330
- platformCode: a.platform_code ?? "",
331
- platformName: a.platform_name ?? "",
332
- classIcon: a.class_icon ?? "",
333
- productCode: a.product_code ?? "",
334
- productName: a.product_name ?? "",
335
- gameID: a.game_id ?? 0,
336
- fAuth: a.fAuth ?? !1,
337
- platformStatusParams: {
338
- eb: a.platform_status_params.eb ?? !1,
339
- fit: a.platform_status_params.fit ?? !1,
340
- fs: a.platform_status_params.fs ?? !1
341
- },
342
- loginFlag: a.login_flag === "1",
343
- link: a.link ?? "",
344
- favouriteFlag: a.favourite_flag === 1,
345
- platformStatusFlag: a.platform_status_flag ?? "",
346
- platformFlagName: a.platform_flag_name ?? "",
347
- homeLogo: a.home_logo ?? "",
348
- imgPf: a.imgPf ?? "",
349
- imgSport: a.imgSport ?? "",
350
- imgTemplate: a.imgTemplate ?? ""
351
- });
352
- async function E() {
353
- const a = {
148
+ const e = {
354
149
  status: 200,
355
150
  message: "",
356
151
  data: {
@@ -367,42 +162,54 @@ async function E() {
367
162
  }
368
163
  };
369
164
  try {
370
- const r = await f.get("/hotGames", {
165
+ const a = await n.get("/hotGames", {
371
166
  params: {
372
- render: u()
167
+ render: r()
373
168
  }
374
169
  });
375
170
  let t;
376
- return u() ? t = JSON.parse(g(r.data)) : t = r.data, r.status != 200 ? (a.status = r.status, a.message = "", a) : (a.data.currentPage = t.current_page ?? 0, a.data.data = t.data.map((s) => ({
377
- id: s.id ?? 0,
378
- name: s.name ?? "",
379
- pfid: s.pfid ?? 0,
380
- ppname: s.ppname ?? "",
381
- code: s.code ?? "",
382
- img: s.img ?? "",
383
- progressive: s.progressive ?? "",
384
- ppid: s.ppid ?? 0,
385
- notry: s.notry === 1,
386
- productCode: s.product_code ?? "",
387
- imgSrc: s.imgSrc ?? "",
388
- imgPf: s.imgPf ?? "",
389
- favouriteFlag: s.favourite_flag === 1,
390
- platformStatusFlag: s.platform_status_flag ?? "",
391
- platformFlagName: s.platform_flag_name ?? "",
392
- platformStatusParams: {
393
- eb: s.platform_status_params.eb ?? !1,
394
- fit: s.platform_status_params.fit ?? !1,
395
- fs: s.platform_status_params.fs ?? !1
396
- },
397
- gameId: s.game_id ?? 0
398
- })), a.data.from = t.from ?? 0, a.data.lastPage = t.last_page ?? 0, a.data.nextPageUrl = t.next_page_url ?? "", a.data.path = t.path ?? "", a.data.perPage = t.per_page ?? 0, a.data.prevPageUrl = t.prev_page_url ?? "", a.data.to = t.to ?? 0, a.data.total = t.total ?? 0, a);
399
- } catch (r) {
400
- const t = r;
401
- return a.status = t.status || 500, a.message = t.message, a;
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;
402
175
  }
403
176
  }
404
- async function T() {
405
- const a = {
177
+ const i = (e) => ({
178
+ 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 ?? "",
195
+ 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
199
+ },
200
+ gameId: a.game_id ?? 0
201
+ })),
202
+ from: e.from ?? 0,
203
+ lastPage: e.last_page ?? 0,
204
+ nextPageUrl: e.next_page_url ?? "",
205
+ path: e.path ?? "",
206
+ perPage: e.per_page ?? 0,
207
+ prevPageUrl: e.prev_page_url ?? "",
208
+ to: e.to ?? 0,
209
+ total: e.total ?? 0
210
+ });
211
+ async function C() {
212
+ const e = {
406
213
  status: 200,
407
214
  message: "",
408
215
  data: {
@@ -411,85 +218,278 @@ async function T() {
411
218
  }
412
219
  };
413
220
  try {
414
- const r = await f.get("/fishGames", {
221
+ const a = await n.get("/fishGames", {
415
222
  params: {
416
- render: u(),
417
- setting: []
223
+ render: r()
418
224
  }
419
225
  });
420
226
  let t;
421
- return u() ? t = JSON.parse(g(r.data)) : t = r.data, r.status != 200 ? (a.status = r.status, a.message = "", a) : (a.data.hotfish = t.data.map((s) => S(s)), a.data.data = t.data.map((s) => S(s)), a);
422
- } catch (r) {
423
- const t = r;
424
- return a.status = t.status || 500, a.message = t.message, a;
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;
425
231
  }
426
232
  }
427
- const S = (a) => ({
428
- id: a.id ?? 0,
429
- name: a.name ?? "",
430
- ppid: a.pp_id ?? "",
431
- img: a.img ?? "",
432
- desc: a.desc ?? "",
433
- ppname: a.pp_name ?? "",
434
- platformCode: a.platform_code ?? "",
435
- code: a.code ?? "",
436
- flag: a.flag ?? 0,
437
- gameId: a.game_id ?? 0,
438
- imgSrc: a.imgSrc ?? "",
439
- imgPf: a.imgPf ?? "",
440
- favouriteFlag: a.favourite_flag === 1,
441
- platformStatusFflag: a.platform_status_Fflag ?? "",
442
- platformFlagName: a.platform_flag_name ?? "",
233
+ const _ = (e) => ({
234
+ hotfish: e.hotfish.map((a) => d(a)),
235
+ data: e.data.map((a) => d(a))
236
+ }), d = (e) => ({
237
+ id: e.id ?? 0,
238
+ name: e.name ?? "",
239
+ ppid: e.pp_id ?? "",
240
+ img: e.img ?? "",
241
+ desc: e.desc ?? "",
242
+ ppname: e.pp_name ?? "",
243
+ platformCode: e.platform_code ?? "",
244
+ code: e.code ?? "",
245
+ flag: e.flag ?? 0,
246
+ gameId: e.game_id ?? 0,
247
+ imgSrc: e.imgSrc ?? "",
248
+ imgPf: e.imgPf ?? "",
249
+ favouriteFlag: e.favourite_flag === 1,
250
+ platformStatusFflag: e.platform_status_Fflag ?? "",
251
+ platformFlagName: e.platform_flag_name ?? "",
443
252
  platformStatusParams: {
444
- eb: a.platform_status_params.eb ?? !1,
445
- fit: a.platform_status_params.fit ?? !1,
446
- fs: a.platform_status_params.fs ?? !1
253
+ eb: e.platform_status_params.eb ?? !1,
254
+ fit: e.platform_status_params.fit ?? !1,
255
+ fs: e.platform_status_params.fs ?? !1
447
256
  }
448
257
  });
449
258
  async function x() {
450
- const a = {
259
+ const e = {
451
260
  status: 200,
452
261
  message: "",
453
262
  data: []
454
263
  };
455
264
  try {
456
- const r = await f.get("/trialGames", {
265
+ const a = await n.get("/trialGames", {
266
+ params: {
267
+ render: r()
268
+ }
269
+ });
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;
275
+ }
276
+ }
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 ?? "",
291
+ 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
295
+ },
296
+ ppname: a.ppname ?? ""
297
+ }))
298
+ }));
299
+ async function D() {
300
+ const e = {
301
+ status: 200,
302
+ message: "",
303
+ data: {
304
+ game: {
305
+ SPORT: [],
306
+ SPECIAL: [],
307
+ PVP: [],
308
+ LIVE: [],
309
+ EVENT: [],
310
+ ESPORT: [],
311
+ EGAME: [],
312
+ BINGO: []
313
+ },
314
+ mobileBanner: [],
315
+ announcement: [],
316
+ alertAnnouncement: []
317
+ },
318
+ hotGames: {
319
+ status: 200,
320
+ message: "",
321
+ data: {
322
+ currentPage: 0,
323
+ data: [],
324
+ from: 0,
325
+ lastPage: 0,
326
+ nextPageUrl: "",
327
+ path: "",
328
+ perPage: 0,
329
+ prevPageUrl: "",
330
+ to: 0,
331
+ total: 0
332
+ }
333
+ },
334
+ fishGames: {
335
+ status: 200,
336
+ message: "",
337
+ data: {
338
+ hotfish: [],
339
+ data: []
340
+ }
341
+ },
342
+ trialGames: {
343
+ status: 200,
344
+ message: "",
345
+ data: []
346
+ }
347
+ };
348
+ try {
349
+ const [a, t, s, u] = await Promise.all([
350
+ n.get("/home", {
351
+ params: {
352
+ render: r()
353
+ }
354
+ }),
355
+ n.get("/hotGames", {
356
+ params: {
357
+ render: r()
358
+ }
359
+ }),
360
+ n.get("/fishGames", {
361
+ params: {
362
+ render: r()
363
+ }
364
+ }),
365
+ n.get("/trialGames", {
366
+ params: {
367
+ render: r()
368
+ }
369
+ })
370
+ ]);
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;
378
+ }
379
+ }
380
+ const P = (e) => ({
381
+ 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))
390
+ },
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 ?? ""
399
+ })),
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 ?? ""
421
+ })),
422
+ alertAnnouncement: e.alert_announcement.map((a) => ({
423
+ announcementDateCreated: a.announcement_datecreated ?? "",
424
+ announcementSimplified: a.announcement_simplified ?? ""
425
+ }))
426
+ }), o = (e) => ({
427
+ id: e.id ?? 0,
428
+ idPlatformMaster: e.id_PlatformMaster ?? 0,
429
+ idProductMaster: e.id_ProductMaster ?? 0,
430
+ name: e.name ?? "",
431
+ shortName: e.shortName ?? "",
432
+ img: e.img ?? "",
433
+ mobileUrl: e.mobileUrl ?? "",
434
+ url: e.url ?? "",
435
+ desc: e.desc ?? "",
436
+ seq: e.seq ?? 0,
437
+ flag: e.flag ?? 0,
438
+ status: e.status ?? "",
439
+ createdBy: e.created_by ?? 0,
440
+ createdOn: e.created_on ?? "",
441
+ categoryID: e.categoryid ?? 0,
442
+ com: e.com ?? "",
443
+ cur: e.cur ?? "",
444
+ pt: e.pt ?? "",
445
+ ppName: e.pp_name ?? "",
446
+ ppImage: e.pp_image ?? "",
447
+ platformCode: e.platform_code ?? "",
448
+ platformName: e.platform_name ?? "",
449
+ classIcon: e.class_icon ?? "",
450
+ productCode: e.product_code ?? "",
451
+ productName: e.product_name ?? "",
452
+ gameID: e.game_id ?? 0,
453
+ fAuth: e.fAuth ?? !1,
454
+ platformStatusParams: {
455
+ eb: e.platform_status_params.eb ?? !1,
456
+ fit: e.platform_status_params.fit ?? !1,
457
+ fs: e.platform_status_params.fs ?? !1
458
+ },
459
+ loginFlag: e.login_flag === "1",
460
+ link: e.link ?? "",
461
+ favouriteFlag: e.favourite_flag === 1,
462
+ platformStatusFlag: e.platform_status_flag ?? "",
463
+ platformFlagName: e.platform_flag_name ?? "",
464
+ homeLogo: e.home_logo ?? "",
465
+ imgPf: e.imgPf ?? "",
466
+ imgSport: e.imgSport ?? "",
467
+ imgTemplate: e.imgTemplate ?? ""
468
+ });
469
+ async function R() {
470
+ const e = {
471
+ status: 200,
472
+ message: "",
473
+ data: ""
474
+ };
475
+ try {
476
+ const a = await n.get("/currentLang", {
457
477
  params: {
458
- render: u()
478
+ render: r()
459
479
  }
460
480
  });
461
481
  let t;
462
- return u() ? t = JSON.parse(g(r.data)) : t = r.data, r.status != 200 ? (a.status = r.status, a.message = "", a) : (a.data = t.map((s) => ({
463
- ppid: s.ppid ?? 0,
464
- ppname: s.ppname ?? "",
465
- games: s.games.map((n) => ({
466
- id: n.id ?? 0,
467
- name: n.name ?? "",
468
- img: n.img ?? "",
469
- progressive: n.progressive ?? "",
470
- notry: n.notry === 1,
471
- imgSrc: n.imgSrc ?? "",
472
- imgPf: n.imgPf ?? "",
473
- favouriteFlag: n.favourite_flag === 1,
474
- platformStatusFflag: n.platform_status_Fflag ?? "",
475
- platformFlagName: n.platform_flag_name ?? "",
476
- platformStatusParams: {
477
- eb: n.platform_status_params.eb ?? !1,
478
- fit: n.platform_status_params.fit ?? !1,
479
- fs: n.platform_status_params.fs ?? !1
480
- },
481
- ppname: s.ppname ?? ""
482
- })) ?? []
483
- })) ?? [], a);
484
- } catch (r) {
485
- const t = r;
486
- return a.status = t.status || 500, a.message = t.message, a;
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);
483
+ } catch (a) {
484
+ const t = a;
485
+ return e.status = t.status || 500, e.message = t.message, e;
487
486
  }
488
487
  }
489
488
  export {
490
- j as Repository,
489
+ L as Repository,
490
+ E as currentLang,
491
491
  b as fishGames,
492
- y as home,
493
- v as hotGames,
494
- O as trialGames
492
+ N as home,
493
+ O as hotGames,
494
+ v as trialGames
495
495
  };