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