60p82u21t54k 0.0.17 → 0.0.18
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/60p82u21t54k.es.js +93 -67
- package/dist/60p82u21t54k.umd.js +1 -1
- package/dist/api/api.d.ts.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/model/gameList/getGameListResponse.d.ts +5 -0
- package/dist/model/gameList/getGameListResponse.d.ts.map +1 -0
- package/dist/model/gameList/rawType.d.ts +38 -0
- package/dist/model/gameList/rawType.d.ts.map +1 -0
- package/dist/model/gameList/type.d.ts +2 -36
- package/dist/model/gameList/type.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/60p82u21t54k.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const b =
|
|
1
|
+
import k from "axios";
|
|
2
|
+
const b = k.create({
|
|
3
3
|
baseURL: "/graph",
|
|
4
4
|
timeout: 5e3,
|
|
5
5
|
// Request timeout
|
|
@@ -59,7 +59,7 @@ b.interceptors.response.use(
|
|
|
59
59
|
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);
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
const
|
|
62
|
+
const T = (e) => new TextEncoder().encode(e), v = (e) => {
|
|
63
63
|
try {
|
|
64
64
|
return atob(e);
|
|
65
65
|
} catch (t) {
|
|
@@ -67,26 +67,26 @@ const R = (e) => new TextEncoder().encode(e), T = (e) => {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
var y = /* @__PURE__ */ ((e) => (e.announcement = "announcement", e.gameList = "gameList", e.fishGameList = "fishGameList", e.cmsList = "cmsList", e.paymentsProvider = "paymentsProvider", e.getUserProfile = "getUserProfile", e))(y || {});
|
|
70
|
-
const
|
|
70
|
+
const E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
71
71
|
__proto__: null,
|
|
72
72
|
Api: y
|
|
73
73
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
74
|
-
var
|
|
75
|
-
const
|
|
74
|
+
var g = /* @__PURE__ */ ((e) => (e.default = "default", e.pay = "pay", e.auto = "auto", e.fix = "fix", e.manual = "manual", e.unknown = "unknown", e))(g || {});
|
|
75
|
+
const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76
76
|
__proto__: null,
|
|
77
|
-
PaymentType:
|
|
78
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
77
|
+
PaymentType: g
|
|
78
|
+
}, Symbol.toStringTag, { value: "Module" })), j = (e) => e.mdPaymentChannels.map((t) => {
|
|
79
79
|
const s = [];
|
|
80
80
|
switch (t.name) {
|
|
81
|
-
case
|
|
82
|
-
s.push(
|
|
81
|
+
case g.default:
|
|
82
|
+
s.push(O(t.paymentmethod.manual, e));
|
|
83
83
|
break;
|
|
84
|
-
case
|
|
85
|
-
s.push(
|
|
84
|
+
case g.pay:
|
|
85
|
+
s.push(D(t.paymentmethod.onlinebanking, e));
|
|
86
86
|
break;
|
|
87
87
|
default:
|
|
88
88
|
if (t.paymentmethod.auto.bank.length > 0 && s.push(
|
|
89
|
-
|
|
89
|
+
B(t.bankid ?? 0, t.paymentmethod.auto, e)
|
|
90
90
|
), t.paymentmethod.manual.bank.length > 0) {
|
|
91
91
|
let a = !1;
|
|
92
92
|
for (let n = 0; n < t.paymentmethod.manual.bank.length; n++) {
|
|
@@ -96,10 +96,10 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
96
96
|
break;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
a && s.push(
|
|
99
|
+
a && s.push(O(t.paymentmethod.manual, e));
|
|
100
100
|
}
|
|
101
101
|
t.paymentmethod.fixamount.bank.length > 0 && s.push(
|
|
102
|
-
|
|
102
|
+
U(t.bankid ?? 0, t.paymentmethod.fixamount)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
return {
|
|
@@ -107,10 +107,10 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
107
107
|
imageUrl: `/image/game/native/deposit/sidemenu/${t.name}.png?${e.systemtime}`,
|
|
108
108
|
paymentList: s
|
|
109
109
|
};
|
|
110
|
-
}),
|
|
110
|
+
}), L = {
|
|
111
111
|
id: 0,
|
|
112
112
|
name: "",
|
|
113
|
-
type:
|
|
113
|
+
type: g.unknown,
|
|
114
114
|
promo: [],
|
|
115
115
|
bank: [],
|
|
116
116
|
requiredField: {
|
|
@@ -134,7 +134,7 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
134
134
|
disabled: !1
|
|
135
135
|
}));
|
|
136
136
|
return [t, ...s];
|
|
137
|
-
},
|
|
137
|
+
}, _ = (e, t, s, a) => {
|
|
138
138
|
let n, o;
|
|
139
139
|
s > 0 ? n = e > 0 ? Math.max(s, e) : s : n = Math.max(e, 0), a > 0 ? o = t > 0 ? Math.min(a, t) : a : o = Math.max(t, 0);
|
|
140
140
|
const u = Math.round(n);
|
|
@@ -161,13 +161,13 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
161
161
|
d,
|
|
162
162
|
i.toString()
|
|
163
163
|
], minAmount: u, maxAmount: o };
|
|
164
|
-
},
|
|
164
|
+
}, O = (e, t) => t ? {
|
|
165
165
|
id: 0,
|
|
166
166
|
name: "manualMethod",
|
|
167
|
-
type:
|
|
167
|
+
type: g.manual,
|
|
168
168
|
promo: S(e.promo),
|
|
169
169
|
bank: e.bank.map((n) => {
|
|
170
|
-
const o = n.list && n.list.length > 0 ? n.list[0].mintransaction ?? "0.00" : "0.00", u = n.list && n.list.length > 0 ? n.list[0].maxtransaction ?? "0.00" : "0.00", { amountList: i, minAmount: m, maxAmount: r } =
|
|
170
|
+
const o = n.list && n.list.length > 0 ? n.list[0].mintransaction ?? "0.00" : "0.00", u = n.list && n.list.length > 0 ? n.list[0].maxtransaction ?? "0.00" : "0.00", { amountList: i, minAmount: m, maxAmount: r } = _(
|
|
171
171
|
Number(o),
|
|
172
172
|
Number(u),
|
|
173
173
|
t.mdBankLevelDetail.deposit_min,
|
|
@@ -189,17 +189,17 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
189
189
|
...t.mdManualDepositRequireField,
|
|
190
190
|
uploadReceipt: t.mdUploadReceipt
|
|
191
191
|
}
|
|
192
|
-
} :
|
|
192
|
+
} : L, D = (e, t) => t ? {
|
|
193
193
|
id: 0,
|
|
194
194
|
name: "onlineBankingMethod",
|
|
195
|
-
type:
|
|
195
|
+
type: g.pay,
|
|
196
196
|
promo: S(e.promo),
|
|
197
197
|
bank: e.banklist.map((n) => {
|
|
198
198
|
let o = "0.00", u = "0.00";
|
|
199
199
|
const i = n.bankindex ?? 0;
|
|
200
200
|
for (let c = 0; c < t.mdGatewayMinMax.length; c++)
|
|
201
201
|
t.mdGatewayMinMax[c].bankindex == i.toString() && (o = t.mdGatewayMinMax[c].min, u = t.mdGatewayMinMax[c].max);
|
|
202
|
-
const { amountList: m, minAmount: r, maxAmount: d } =
|
|
202
|
+
const { amountList: m, minAmount: r, maxAmount: d } = _(
|
|
203
203
|
Number(o),
|
|
204
204
|
Number(u),
|
|
205
205
|
t.mdBankLevelDetail.onlinepayment_min,
|
|
@@ -210,10 +210,10 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
210
210
|
amountList: m,
|
|
211
211
|
min: r,
|
|
212
212
|
max: d
|
|
213
|
-
},
|
|
214
|
-
const p = c.mintransaction ?? "0.00",
|
|
213
|
+
}, x = n.pg.map((c) => {
|
|
214
|
+
const p = c.mintransaction ?? "0.00", M = c.maxtransaction ?? "0.00", { amountList: P, minAmount: l, maxAmount: N } = _(
|
|
215
215
|
Number(p),
|
|
216
|
-
Number(
|
|
216
|
+
Number(M),
|
|
217
217
|
t.mdBankLevelDetail.onlinepayment_min,
|
|
218
218
|
t.mdBankLevelDetail.onlinepayment_max
|
|
219
219
|
);
|
|
@@ -231,7 +231,7 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
231
231
|
amountList: [],
|
|
232
232
|
min: 0,
|
|
233
233
|
max: 0,
|
|
234
|
-
gateway: [h, ...
|
|
234
|
+
gateway: [h, ...x]
|
|
235
235
|
};
|
|
236
236
|
}),
|
|
237
237
|
requiredField: {
|
|
@@ -242,14 +242,14 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
242
242
|
depositor: !1,
|
|
243
243
|
uploadReceipt: !1
|
|
244
244
|
}
|
|
245
|
-
} :
|
|
246
|
-
if (!s) return
|
|
247
|
-
const a =
|
|
245
|
+
} : L, B = (e, t, s) => {
|
|
246
|
+
if (!s) return L;
|
|
247
|
+
const a = g.auto;
|
|
248
248
|
let n = [];
|
|
249
249
|
const o = s.mdGatewayMinMax;
|
|
250
250
|
if (t.bank.length > 0 && s.mdPGSelection == "1")
|
|
251
251
|
n = t.bank.map((i) => {
|
|
252
|
-
const { amountList: m, minAmount: r, maxAmount: d } =
|
|
252
|
+
const { amountList: m, minAmount: r, maxAmount: d } = _(
|
|
253
253
|
i.minTransaction ?? 0,
|
|
254
254
|
i.maxTransaction ?? 0,
|
|
255
255
|
s.mdBankLevelDetail.onlinepayment_min,
|
|
@@ -265,21 +265,21 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
265
265
|
});
|
|
266
266
|
else {
|
|
267
267
|
let i = "0.00", m = "0.00";
|
|
268
|
-
for (let
|
|
269
|
-
o[
|
|
270
|
-
const { amountList: r, minAmount: d, maxAmount: h } =
|
|
268
|
+
for (let f = 0; f < o.length; f++)
|
|
269
|
+
o[f].bankindex === e.toString() && (i = o[f].min, m = o[f].max);
|
|
270
|
+
const { amountList: r, minAmount: d, maxAmount: h } = _(
|
|
271
271
|
Number(i),
|
|
272
272
|
Number(m),
|
|
273
273
|
s.mdBankLevelDetail.onlinepayment_min,
|
|
274
274
|
s.mdBankLevelDetail.onlinepayment_max
|
|
275
|
-
),
|
|
275
|
+
), x = {
|
|
276
276
|
id: 0,
|
|
277
277
|
name: "autoChannel",
|
|
278
278
|
amountList: r,
|
|
279
279
|
min: d,
|
|
280
280
|
max: h
|
|
281
281
|
};
|
|
282
|
-
n.push(
|
|
282
|
+
n.push(x);
|
|
283
283
|
}
|
|
284
284
|
return {
|
|
285
285
|
id: e,
|
|
@@ -296,8 +296,8 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
296
296
|
uploadReceipt: !1
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
|
-
},
|
|
300
|
-
const s =
|
|
299
|
+
}, U = (e, t) => {
|
|
300
|
+
const s = g.fix;
|
|
301
301
|
return {
|
|
302
302
|
id: e,
|
|
303
303
|
name: "fixAmountMethod",
|
|
@@ -322,24 +322,43 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
322
322
|
uploadReceipt: !1
|
|
323
323
|
}
|
|
324
324
|
};
|
|
325
|
-
},
|
|
325
|
+
}, J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
326
326
|
__proto__: null,
|
|
327
|
-
getPaymentsProviderResponse:
|
|
328
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
327
|
+
getPaymentsProviderResponse: j
|
|
328
|
+
}, Symbol.toStringTag, { value: "Module" })), A = (e) => e.map((t) => ({
|
|
329
329
|
alert: t.announcement_alert == "1",
|
|
330
330
|
update_time: t.announcement_lastupdated,
|
|
331
331
|
content: t.announcement_simplified
|
|
332
|
-
})),
|
|
332
|
+
})), I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
333
333
|
__proto__: null,
|
|
334
|
-
getAnnouncementResponse:
|
|
335
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
334
|
+
getAnnouncementResponse: A
|
|
335
|
+
}, Symbol.toStringTag, { value: "Module" })), q = (e) => ({
|
|
336
336
|
username: e.username,
|
|
337
337
|
birthday: e.mdUserDetail.dob,
|
|
338
338
|
email: e.mdUserDetail.email,
|
|
339
339
|
fullName: e.mdUserDetail.firstname,
|
|
340
340
|
phoneNumber: e.mdUserDetail.mobileno,
|
|
341
341
|
profilePicUrl: e.mdUserDetail.profile_pic
|
|
342
|
-
}),
|
|
342
|
+
}), R = (e) => {
|
|
343
|
+
const t = e.mdDomains;
|
|
344
|
+
return e.mdGameListResult.map((s) => ({
|
|
345
|
+
code: s.code,
|
|
346
|
+
id: s.id,
|
|
347
|
+
name: s.name,
|
|
348
|
+
nextPage: s.nextPage === 1,
|
|
349
|
+
list: s.mdPlatformProducts.map((a) => {
|
|
350
|
+
const n = `${t[a.mdDomains_id]}/${a.img}?${a.filemtime}`;
|
|
351
|
+
return {
|
|
352
|
+
id: Number(a.id),
|
|
353
|
+
name: a.shortName,
|
|
354
|
+
imageUrl: n
|
|
355
|
+
};
|
|
356
|
+
})
|
|
357
|
+
}));
|
|
358
|
+
}, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
359
|
+
__proto__: null,
|
|
360
|
+
getGameListResponse: R
|
|
361
|
+
}, Symbol.toStringTag, { value: "Module" })), $ = async (e) => {
|
|
343
362
|
var t, s;
|
|
344
363
|
try {
|
|
345
364
|
const a = {
|
|
@@ -348,35 +367,38 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
348
367
|
console.log(a);
|
|
349
368
|
const n = await b.post(
|
|
350
369
|
"/jwt",
|
|
351
|
-
|
|
370
|
+
T(JSON.stringify(a))
|
|
352
371
|
), o = {
|
|
353
372
|
status: 200,
|
|
354
373
|
message: "",
|
|
355
374
|
result: {}
|
|
356
375
|
};
|
|
357
376
|
for (const u of n.data.responses) {
|
|
358
|
-
const i =
|
|
377
|
+
const i = v(u.attributes), m = u.name, r = i ? JSON.parse(i) : null;
|
|
359
378
|
if (!r)
|
|
360
379
|
return o.result[m] = null, o;
|
|
361
380
|
switch (m) {
|
|
362
381
|
case y.announcement:
|
|
363
|
-
o.result[m] =
|
|
382
|
+
o.result[m] = A(r);
|
|
383
|
+
break;
|
|
384
|
+
case y.gameList:
|
|
385
|
+
console.log(r), o.result[m] = R(r);
|
|
364
386
|
break;
|
|
365
387
|
case y.cmsList:
|
|
366
388
|
o.result[m] = r;
|
|
367
389
|
break;
|
|
368
390
|
case y.paymentsProvider: {
|
|
369
|
-
o.result[m] =
|
|
391
|
+
o.result[m] = j(r);
|
|
370
392
|
break;
|
|
371
393
|
}
|
|
372
394
|
case y.getUserProfile:
|
|
373
|
-
o.result[m] =
|
|
395
|
+
o.result[m] = q(r);
|
|
374
396
|
break;
|
|
375
397
|
}
|
|
376
398
|
}
|
|
377
399
|
return o;
|
|
378
400
|
} catch (a) {
|
|
379
|
-
return
|
|
401
|
+
return k.isAxiosError(a) ? (console.error(a), {
|
|
380
402
|
status: ((t = a.response) == null ? void 0 : t.status) || 500,
|
|
381
403
|
message: JSON.stringify((s = a.response) == null ? void 0 : s.data),
|
|
382
404
|
result: {}
|
|
@@ -386,9 +408,9 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
386
408
|
result: {}
|
|
387
409
|
});
|
|
388
410
|
}
|
|
389
|
-
},
|
|
411
|
+
}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
390
412
|
__proto__: null,
|
|
391
|
-
post:
|
|
413
|
+
post: $
|
|
392
414
|
}, Symbol.toStringTag, { value: "Module" })), C = async (e, t) => {
|
|
393
415
|
try {
|
|
394
416
|
const s = {
|
|
@@ -408,25 +430,29 @@ const G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
408
430
|
message: s.message
|
|
409
431
|
};
|
|
410
432
|
}
|
|
411
|
-
},
|
|
433
|
+
}, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
412
434
|
__proto__: null,
|
|
413
435
|
login: C
|
|
414
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
436
|
+
}, Symbol.toStringTag, { value: "Module" })), V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
437
|
+
__proto__: null
|
|
438
|
+
}, Symbol.toStringTag, { value: "Module" })), W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
415
439
|
__proto__: null
|
|
416
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
440
|
+
}, Symbol.toStringTag, { value: "Module" })), X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
417
441
|
__proto__: null
|
|
418
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
442
|
+
}, Symbol.toStringTag, { value: "Module" })), Y = {
|
|
419
443
|
install() {
|
|
420
444
|
}
|
|
421
445
|
};
|
|
422
446
|
export {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
H as
|
|
430
|
-
|
|
431
|
-
|
|
447
|
+
Y as Repository,
|
|
448
|
+
W as announcementType,
|
|
449
|
+
K as api,
|
|
450
|
+
E as apiType,
|
|
451
|
+
X as gameListType,
|
|
452
|
+
I as getAnnouncementResponse,
|
|
453
|
+
H as getGameListResponse,
|
|
454
|
+
J as getPaymentsProviderResponse,
|
|
455
|
+
Q as loginApi,
|
|
456
|
+
V as loginType,
|
|
457
|
+
F as paymentsProviderType
|
|
432
458
|
};
|
package/dist/60p82u21t54k.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],_):(r=typeof globalThis<"u"?globalThis:r||self,_(r["60p82u21t54k"]={},r.axios))})(this,function(r,_){"use strict";const S=_.create({baseURL:"/graph",timeout:5e3,headers:{"Content-Type":"application/json"}});S.interceptors.request.use(e=>e,e=>(console.error("Error request:",e.response),Promise.reject(e))),S.interceptors.response.use(e=>e,e=>{const t={status:null,message:"An error occurred"};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)});const N=e=>new TextEncoder().encode(e),v=e=>{try{return atob(e)}catch(t){return console.error("Failed to decode Base64:",t),""}};var y=(e=>(e.announcement="announcement",e.gameList="gameList",e.fishGameList="fishGameList",e.cmsList="cmsList",e.paymentsProvider="paymentsProvider",e.getUserProfile="getUserProfile",e))(y||{});const D=Object.freeze(Object.defineProperty({__proto__:null,Api:y},Symbol.toStringTag,{value:"Module"}));var f=(e=>(e.default="default",e.pay="pay",e.auto="auto",e.fix="fix",e.manual="manual",e.unknown="unknown",e))(f||{});const B=Object.freeze(Object.defineProperty({__proto__:null,PaymentType:f},Symbol.toStringTag,{value:"Module"})),O=e=>e.mdPaymentChannels.map(t=>{const s=[];switch(t.name){case f.default:s.push(j(t.paymentmethod.manual,e));break;case f.pay:s.push(U(t.paymentmethod.onlinebanking,e));break;default:if(t.paymentmethod.auto.bank.length>0&&s.push(q(t.bankid??0,t.paymentmethod.auto,e)),t.paymentmethod.manual.bank.length>0){let a=!1;for(let n=0;n<t.paymentmethod.manual.bank.length;n++){const o=t.paymentmethod.manual.bank[n];if(o.list&&o.list.length>0){a=!0;break}}a&&s.push(j(t.paymentmethod.manual,e))}t.paymentmethod.fixamount.bank.length>0&&s.push($(t.bankid??0,t.paymentmethod.fixamount))}return{name:t.label,imageUrl:`/image/game/native/deposit/sidemenu/${t.name}.png?${e.systemtime}`,paymentList:s}}),P={id:0,name:"",type:f.unknown,promo:[],bank:[],requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}},L=e=>{const t={id:0,name:"excludePromo",value:"0",disabled:!0},s=e.map((a,n)=>({id:n+1,name:a.promodesc,value:a.promoindex.toString(),disabled:!1}));return[t,...s]},b=(e,t,s,a)=>{let n,o;s>0?n=e>0?Math.max(s,e):s:n=Math.max(e,0),a>0?o=t>0?Math.min(a,t):a:o=Math.max(t,0);const c=Math.round(n);let i=1e3;o<i&&(i=Math.round(o));const m=i-c;let l="",p="";if(m>0){let d=Math.round((i-c)*.25).toString().split(""),g=[];for(const u of d)u!==""&&g.push(u);for(let u=0;u<g.length;u++)u===0?l+=(parseInt(g[u])+1).toString():l+="0";d=Math.round((i-c)*.5).toString().split(""),g=[];for(const u of d)u!==""&&g.push(u);for(let u=0;u<g.length;u++)u===0?p+=(parseInt(g[u])+1).toString():p+="0"}else l=i.toString(),p=i.toString();return{amountList:[c.toString(),l,p,i.toString()],minAmount:c,maxAmount:o}},j=(e,t)=>t?{id:0,name:"manualMethod",type:f.manual,promo:L(e.promo),bank:e.bank.map(n=>{const o=n.list&&n.list.length>0?n.list[0].mintransaction??"0.00":"0.00",c=n.list&&n.list.length>0?n.list[0].maxtransaction??"0.00":"0.00",{amountList:i,minAmount:m,maxAmount:l}=b(Number(o),Number(c),t.mdBankLevelDetail.deposit_min,t.mdBankLevelDetail.deposit_max);return t.mdManualDepositRequireField.depositor=!0,{id:n.bankindex??0,bankAccountId:n.list&&n.list.length>0?n.list[0].bankaccountindex??0:0,name:n.list&&n.list.length>0?n.list[0].label??"":"",accountName:n.list&&n.list.length>0?n.list[0].bankaccountname??"":"",accountNo:n.list&&n.list.length>0?n.list[0].bankaccountno??"":"",qrcode:n.list&&n.list.length>0?n.list[0].bankaccountdesc:"",amountList:i,min:m,max:l}}),requiredField:{...t.mdManualDepositRequireField,uploadReceipt:t.mdUploadReceipt}}:P,U=(e,t)=>t?{id:0,name:"onlineBankingMethod",type:f.pay,promo:L(e.promo),bank:e.banklist.map(n=>{let o="0.00",c="0.00";const i=n.bankindex??0;for(let d=0;d<t.mdGatewayMinMax.length;d++)t.mdGatewayMinMax[d].bankindex==i.toString()&&(o=t.mdGatewayMinMax[d].min,c=t.mdGatewayMinMax[d].max);const{amountList:m,minAmount:l,maxAmount:p}=b(Number(o),Number(c),t.mdBankLevelDetail.onlinepayment_min,t.mdBankLevelDetail.onlinepayment_max),x={id:0,name:"autoChannel",amountList:m,min:l,max:p},M=n.pg.map(d=>{const g=d.mintransaction??"0.00",T=d.maxtransaction??"0.00",{amountList:R,minAmount:u,maxAmount:V}=b(Number(g),Number(T),t.mdBankLevelDetail.onlinepayment_min,t.mdBankLevelDetail.onlinepayment_max);return{id:d.pgindex,name:d.bankaccountname,amountList:R,min:u,max:V}});return{id:n.bankindex??0,name:n.banknameenglish??"",amountList:[],min:0,max:0,gateway:[x,...M]}}),requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}:P,q=(e,t,s)=>{if(!s)return P;const a=f.auto;let n=[];const o=s.mdGatewayMinMax;if(t.bank.length>0&&s.mdPGSelection=="1")n=t.bank.map(i=>{const{amountList:m,minAmount:l,maxAmount:p}=b(i.minTransaction??0,i.maxTransaction??0,s.mdBankLevelDetail.onlinepayment_min,s.mdBankLevelDetail.onlinepayment_max);return{id:i.pgindex,name:i.bankaccountname||"",amountList:m,min:l,max:p}});else{let i="0.00",m="0.00";for(let h=0;h<o.length;h++)o[h].bankindex===e.toString()&&(i=o[h].min,m=o[h].max);const{amountList:l,minAmount:p,maxAmount:x}=b(Number(i),Number(m),s.mdBankLevelDetail.onlinepayment_min,s.mdBankLevelDetail.onlinepayment_max),M={id:0,name:"autoChannel",amountList:l,min:p,max:x};n.push(M)}return{id:e,name:"autoMethod",type:a,promo:L(t.promo),bank:n,requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}},$=(e,t)=>{const s=f.fix;return{id:e,name:"fixAmountMethod",type:s,promo:L(t.promo),bank:t.bank.map(n=>{const o=n.amtlist.map(Number).sort((i,m)=>i-m);return{id:n.pgindex,name:n.name,amountList:n.amtlist,min:o.length>0?o[0]:0,max:o.length>0?o[o.length-1]:0}}),requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}},C=Object.freeze(Object.defineProperty({__proto__:null,getPaymentsProviderResponse:O},Symbol.toStringTag,{value:"Module"})),k=e=>e.map(t=>({alert:t.announcement_alert=="1",update_time:t.announcement_lastupdated,content:t.announcement_simplified})),G=Object.freeze(Object.defineProperty({__proto__:null,getAnnouncementResponse:k},Symbol.toStringTag,{value:"Module"})),z=e=>({username:e.username,birthday:e.mdUserDetail.dob,email:e.mdUserDetail.email,fullName:e.mdUserDetail.firstname,phoneNumber:e.mdUserDetail.mobileno,profilePicUrl:e.mdUserDetail.profile_pic}),A=e=>{const t=e.mdDomains;return e.mdGameListResult.map(s=>({code:s.code,id:s.id,name:s.name,nextPage:s.nextPage===1,list:s.mdPlatformProducts.map(a=>{const n=`${t[a.mdDomains_id]}/${a.img}?${a.filemtime}`;return{id:Number(a.id),name:a.shortName,imageUrl:n}})}))},E=Object.freeze(Object.defineProperty({__proto__:null,getGameListResponse:A},Symbol.toStringTag,{value:"Module"})),F=Object.freeze(Object.defineProperty({__proto__:null,post:async e=>{var t,s;try{const a={requests:e};console.log(a);const n=await S.post("/jwt",N(JSON.stringify(a))),o={status:200,message:"",result:{}};for(const c of n.data.responses){const i=v(c.attributes),m=c.name,l=i?JSON.parse(i):null;if(!l)return o.result[m]=null,o;switch(m){case y.announcement:o.result[m]=k(l);break;case y.gameList:console.log(l),o.result[m]=A(l);break;case y.cmsList:o.result[m]=l;break;case y.paymentsProvider:{o.result[m]=O(l);break}case y.getUserProfile:o.result[m]=z(l);break}}return o}catch(a){return _.isAxiosError(a)?(console.error(a),{status:((t=a.response)==null?void 0:t.status)||500,message:JSON.stringify((s=a.response)==null?void 0:s.data),result:{}}):(console.error(a),{status:a.status||500,message:a.message,result:{}})}}},Symbol.toStringTag,{value:"Module"})),J=Object.freeze(Object.defineProperty({__proto__:null,login:async(e,t)=>{try{const s={status:200,message:""};return await S.post("/auth/sesh",JSON.stringify({usr:e,pwd:t})),s}catch(s){return console.error(`login: ${JSON.stringify(s)}`),{status:s.status||500,message:s.message}}}},Symbol.toStringTag,{value:"Module"})),I=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),H=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),K=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Q={install(){}};r.Repository=Q,r.announcementType=H,r.api=F,r.apiType=D,r.gameListType=K,r.getAnnouncementResponse=G,r.getGameListResponse=E,r.getPaymentsProviderResponse=C,r.loginApi=J,r.loginType=I,r.paymentsProviderType=B,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
package/dist/api/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,cAAc,EAAiB,cAAc,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,cAAc,EAAiB,cAAc,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAOnF,eAAO,MAAM,IAAI,GAAU,CAAC,SAAS,MAAM,cAAc,YAC7C,cAAc,CAAC,CAAC,CAAC,EAAE,KAC5B,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAkEnB,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ import * as getAnnouncementResponse from './model/announcement/getAnnouncementRe
|
|
|
6
6
|
import * as announcementType from './model/announcement/type';
|
|
7
7
|
import * as getPaymentsProviderResponse from './model/deposit/getPaymentsProviderResponse';
|
|
8
8
|
import * as paymentsProviderType from './model/deposit/type';
|
|
9
|
-
|
|
9
|
+
import * as getGameListResponse from './model/gameList/getGameListResponse';
|
|
10
|
+
import * as gameListType from './model/gameList/type';
|
|
11
|
+
export { api, loginApi, apiType, loginType, getAnnouncementResponse, announcementType, getPaymentsProviderResponse, paymentsProviderType, getGameListResponse, gameListType, };
|
|
10
12
|
export type RepositoryType = {
|
|
11
13
|
api: typeof api;
|
|
12
14
|
loginApi: typeof loginApi;
|
|
@@ -16,6 +18,8 @@ export type RepositoryType = {
|
|
|
16
18
|
announcementType: typeof announcementType;
|
|
17
19
|
getPaymentsProviderResponse: typeof getPaymentsProviderResponse;
|
|
18
20
|
paymentsProviderType: typeof paymentsProviderType;
|
|
21
|
+
getGameListResponse: typeof getGameListResponse;
|
|
22
|
+
gameListType: typeof gameListType;
|
|
19
23
|
};
|
|
20
24
|
export { default as Repository } from './plugin';
|
|
21
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,WAAW,CAAA;AAChC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,uBAAuB,MAAM,8CAA8C,CAAA;AACvF,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,2BAA2B,MAAM,6CAA6C,CAAA;AAC1F,OAAO,KAAK,oBAAoB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,WAAW,CAAA;AAChC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,uBAAuB,MAAM,8CAA8C,CAAA;AACvF,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,2BAA2B,MAAM,6CAA6C,CAAA;AAC1F,OAAO,KAAK,oBAAoB,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,mBAAmB,MAAM,sCAAsC,CAAA;AAC3E,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAA;AAErD,OAAO,EACL,GAAG,EACH,QAAQ,EACR,OAAO,EACP,SAAS,EACT,uBAAuB,EACvB,gBAAgB,EAChB,2BAA2B,EAC3B,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,GACb,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,OAAO,GAAG,CAAA;IACf,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,OAAO,EAAE,OAAO,OAAO,CAAA;IACvB,SAAS,EAAE,OAAO,SAAS,CAAA;IAC3B,uBAAuB,EAAE,OAAO,uBAAuB,CAAA;IACvD,gBAAgB,EAAE,OAAO,gBAAgB,CAAA;IACzC,2BAA2B,EAAE,OAAO,2BAA2B,CAAA;IAC/D,oBAAoB,EAAE,OAAO,oBAAoB,CAAA;IACjD,mBAAmB,EAAE,OAAO,mBAAmB,CAAA;IAC/C,YAAY,EAAE,OAAO,YAAY,CAAA;CAClC,CAAA;AAED,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGameListResponse.d.ts","sourceRoot":"","sources":["../../../src/model/gameList/getGameListResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAEzC,eAAO,MAAM,mBAAmB,QAAS,mBAAmB,KAAG,gBAkB9D,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type RawGameListResponse = {
|
|
2
|
+
mdGameListResult: RawProduct[];
|
|
3
|
+
mdCategoryMaster: RawCategoryMaster[];
|
|
4
|
+
mdDomains: string[];
|
|
5
|
+
mdGameLists: RawGame[];
|
|
6
|
+
};
|
|
7
|
+
export type RawProduct = {
|
|
8
|
+
id: number;
|
|
9
|
+
code: string;
|
|
10
|
+
name: string;
|
|
11
|
+
nextPage: number;
|
|
12
|
+
mdPlatformProducts: RawPlatform[];
|
|
13
|
+
};
|
|
14
|
+
export type RawCategoryMaster = {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
export type RawGame = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
img: string;
|
|
22
|
+
id_PlatformProduct: string;
|
|
23
|
+
filemtime: string;
|
|
24
|
+
mdDomains_id: number;
|
|
25
|
+
};
|
|
26
|
+
export type RawPlatform = {
|
|
27
|
+
id: string;
|
|
28
|
+
shortName: string;
|
|
29
|
+
code: string;
|
|
30
|
+
flag: number;
|
|
31
|
+
id_GameMaster: string;
|
|
32
|
+
d_filemtime: string;
|
|
33
|
+
filemtime: string;
|
|
34
|
+
d_img: string;
|
|
35
|
+
img: string;
|
|
36
|
+
mdDomains_id: number;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=rawType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rawType.d.ts","sourceRoot":"","sources":["../../../src/model/gameList/rawType.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,EAAE,UAAU,EAAE,CAAA;IAC9B,gBAAgB,EAAE,iBAAiB,EAAE,CAAA;IACrC,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,WAAW,EAAE,OAAO,EAAE,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB,EAAE,WAAW,EAAE,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,kBAAkB,EAAE,MAAM,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA"}
|
|
@@ -1,48 +1,14 @@
|
|
|
1
|
-
export type RawGameListResponse = {
|
|
2
|
-
mdGameListResult: RawProduct[];
|
|
3
|
-
mdCategoryMaster: RawCategoryMaster[];
|
|
4
|
-
mdDomains: string[];
|
|
5
|
-
mdGameLists: RawGame[];
|
|
6
|
-
};
|
|
7
|
-
export type RawProduct = {
|
|
8
|
-
id: number;
|
|
9
|
-
code: string;
|
|
10
|
-
name: string;
|
|
11
|
-
nextPage: number;
|
|
12
|
-
mdPlatformProducts: RawPlatform[];
|
|
13
|
-
};
|
|
14
|
-
export type RawCategoryMaster = {
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
};
|
|
18
|
-
export type RawGame = {
|
|
19
|
-
id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
img: string;
|
|
22
|
-
id_PlatformProduct: string;
|
|
23
|
-
filemtime: string;
|
|
24
|
-
mdDomains_id: number;
|
|
25
|
-
};
|
|
26
|
-
export type RawPlatform = {
|
|
27
|
-
id: string;
|
|
28
|
-
shortName: string;
|
|
29
|
-
code: string;
|
|
30
|
-
flag: number;
|
|
31
|
-
id_GameMaster: string;
|
|
32
|
-
d_filemtime: string;
|
|
33
|
-
d_img: string;
|
|
34
|
-
mdDomains_id: number;
|
|
35
|
-
};
|
|
36
1
|
export type GameListResponse = Product[];
|
|
37
2
|
export type Product = {
|
|
38
3
|
code: string;
|
|
39
4
|
id: number;
|
|
40
5
|
name: string;
|
|
41
6
|
nextPage: boolean;
|
|
7
|
+
list: Platform[];
|
|
42
8
|
};
|
|
43
9
|
export type Platform = {
|
|
44
10
|
id: number;
|
|
45
11
|
name: string;
|
|
46
|
-
|
|
12
|
+
imageUrl: string;
|
|
47
13
|
};
|
|
48
14
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/model/gameList/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/model/gameList/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,OAAO,EAAE,CAAA;AAExC,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA"}
|