50p82u21t54k 0.0.25 → 0.0.27

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 +2636 -546
  2. package/dist/50p82u21t54k.umd.js +26 -1
  3. package/dist/cmsList/method.d.ts +36 -1
  4. package/dist/cmsList/method.d.ts.map +1 -1
  5. package/dist/cmsList/type.d.ts +0 -28
  6. package/dist/cmsList/type.d.ts.map +1 -1
  7. package/dist/csLink/method.d.ts +7 -0
  8. package/dist/csLink/method.d.ts.map +1 -1
  9. package/dist/currentLang/method.d.ts +5 -0
  10. package/dist/currentLang/method.d.ts.map +1 -1
  11. package/dist/eGame/method.d.ts +5 -0
  12. package/dist/eGame/method.d.ts.map +1 -1
  13. package/dist/fishGames/method.d.ts +8 -0
  14. package/dist/fishGames/method.d.ts.map +1 -1
  15. package/dist/getLocale/method.d.ts +5 -0
  16. package/dist/getLocale/method.d.ts.map +1 -1
  17. package/dist/getSetting/method.d.ts +11 -0
  18. package/dist/getSetting/method.d.ts.map +1 -1
  19. package/dist/getSetting/type.d.ts +1 -1
  20. package/dist/getSetting/type.d.ts.map +1 -1
  21. package/dist/home/method.d.ts +62 -92
  22. package/dist/home/method.d.ts.map +1 -1
  23. package/dist/home/type.d.ts.map +1 -1
  24. package/dist/hotGames/method.d.ts +16 -0
  25. package/dist/hotGames/method.d.ts.map +1 -1
  26. package/dist/index.d.ts +5 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/login/index.d.ts +3 -0
  29. package/dist/login/index.d.ts.map +1 -0
  30. package/dist/login/method.d.ts +23 -0
  31. package/dist/login/method.d.ts.map +1 -0
  32. package/dist/login/type.d.ts +16 -0
  33. package/dist/login/type.d.ts.map +1 -0
  34. package/dist/plugin.d.ts +3 -1
  35. package/dist/plugin.d.ts.map +1 -1
  36. package/dist/promotion/method.d.ts +9 -0
  37. package/dist/promotion/method.d.ts.map +1 -1
  38. package/dist/trialGames/method.d.ts +5 -0
  39. package/dist/trialGames/method.d.ts.map +1 -1
  40. package/package.json +2 -1
  41. package/dist/login (incomplete)/index.d.ts +0 -1
  42. package/dist/login (incomplete)/index.d.ts.map +0 -1
  43. package/dist/login (incomplete)/method.d.ts +0 -1
  44. package/dist/login (incomplete)/method.d.ts.map +0 -1
  45. package/dist/login (incomplete)/type.d.ts +0 -1
  46. package/dist/login (incomplete)/type.d.ts.map +0 -1
@@ -1,64 +1,113 @@
1
- import O from "axios";
2
- import { ref as v } from "vue";
3
- import c from "crypto-js";
4
- const E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1
+ import Yt from "axios";
2
+ import { ref as Xt } from "vue";
3
+ import C from "crypto-js";
4
+ const Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
- get CmsId() {
7
- return i;
6
+ get DefaultHotGamesResponse() {
7
+ return pt;
8
8
  },
9
- get getCmsList() {
10
- return d;
11
- }
12
- }, Symbol.toStringTag, { value: "Module" })), A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
- __proto__: null,
14
9
  get getHotGames() {
15
- return _;
10
+ return Nt;
16
11
  }
17
- }, Symbol.toStringTag, { value: "Module" })), G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12
+ }, Symbol.toStringTag, { value: "Module" })), Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
18
13
  __proto__: null,
14
+ get DefaultFishGamesResponse() {
15
+ return gt;
16
+ },
19
17
  get getFishGames() {
20
- return S;
18
+ return Vt;
21
19
  }
22
- }, Symbol.toStringTag, { value: "Module" })), N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20
+ }, Symbol.toStringTag, { value: "Module" })), te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23
21
  __proto__: null,
22
+ get DefaultTrialGamesResponse() {
23
+ return dt;
24
+ },
24
25
  get getTrialGames() {
25
- return y;
26
+ return Lt;
26
27
  }
27
- }, Symbol.toStringTag, { value: "Module" })), T = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28
+ }, Symbol.toStringTag, { value: "Module" })), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28
29
  __proto__: null,
30
+ get DefaultPromotionResponse() {
31
+ return vt;
32
+ },
29
33
  get getPromotion() {
30
- return P;
34
+ return It;
31
35
  }
32
- }, Symbol.toStringTag, { value: "Module" })), j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
36
+ }, Symbol.toStringTag, { value: "Module" })), re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33
37
  __proto__: null,
38
+ get CmsId() {
39
+ return yt;
40
+ },
41
+ get DefaultCmsListResponse() {
42
+ return mt;
43
+ },
44
+ get getCmsList() {
45
+ return Mt;
46
+ }
47
+ }, Symbol.toStringTag, { value: "Module" })), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
48
+ __proto__: null,
49
+ get DefaultHomeResponse() {
50
+ return Ft;
51
+ },
34
52
  get GameType() {
35
- return b;
53
+ return kt;
36
54
  },
37
55
  get getHome() {
38
- return x;
56
+ return le;
39
57
  }
40
- }, Symbol.toStringTag, { value: "Module" })), M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
58
+ }, Symbol.toStringTag, { value: "Module" })), se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41
59
  __proto__: null,
60
+ get DefaultCurrentLangResponse() {
61
+ return Ht;
62
+ },
42
63
  get getCurrentLang() {
43
- return D;
64
+ return ce;
44
65
  }
45
- }, Symbol.toStringTag, { value: "Module" })), B = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
66
+ }, Symbol.toStringTag, { value: "Module" })), ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
46
67
  __proto__: null,
68
+ get DefaultGetLocaleResponse() {
69
+ return jt;
70
+ },
47
71
  get getGetLocale() {
48
- return z;
72
+ return pe;
49
73
  }
50
- }, Symbol.toStringTag, { value: "Module" })), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ }, Symbol.toStringTag, { value: "Module" })), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
51
75
  __proto__: null,
76
+ get DefaultCsLinkResponse() {
77
+ return qt;
78
+ },
52
79
  get getCsLink() {
53
- return J;
80
+ return ge;
54
81
  }
55
- }, Symbol.toStringTag, { value: "Module" })), k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
+ }, Symbol.toStringTag, { value: "Module" })), oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
56
83
  __proto__: null,
84
+ get DefaultEGameResponse() {
85
+ return Ct;
86
+ },
57
87
  get getEGame() {
58
- return U;
88
+ return de;
89
+ }
90
+ }, Symbol.toStringTag, { value: "Module" })), ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
91
+ __proto__: null,
92
+ get DefaultGetSettingResponse() {
93
+ return Gt;
94
+ },
95
+ get getGetSetting() {
96
+ return Ut;
59
97
  }
60
- }, Symbol.toStringTag, { value: "Module" })), u = O.create({
61
- baseURL: "/apis",
98
+ }, Symbol.toStringTag, { value: "Module" })), fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
99
+ __proto__: null,
100
+ get DefaultGetLoginKeyResponse() {
101
+ return je;
102
+ },
103
+ get DefaultLoginResponse() {
104
+ return Zt;
105
+ },
106
+ get submitLogin() {
107
+ return qe;
108
+ }
109
+ }, Symbol.toStringTag, { value: "Module" })), R = Yt.create({
110
+ baseURL: "",
62
111
  timeout: 5e3,
63
112
  // Request timeout
64
113
  headers: {
@@ -103,617 +152,2658 @@ const E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
103
152
  // },
104
153
  // },
105
154
  });
106
- u.interceptors.request.use(
107
- (e) => e,
108
- (e) => (console.error("Error request:", e.response), Promise.reject(e))
155
+ R.interceptors.request.use(
156
+ (r) => r,
157
+ (r) => (console.error("Error request:", r.response), Promise.reject(r))
109
158
  );
110
- u.interceptors.response.use(
111
- (e) => e,
112
- (e) => {
113
- const s = {
159
+ R.interceptors.response.use(
160
+ (r) => r,
161
+ (r) => {
162
+ const t = {
114
163
  status: null,
115
164
  message: "An error occurred"
116
165
  };
117
- return e.response ? (s.status = e.response.status, s.message = e.response.data.message || e.response.statusText, console.error("Error response:", JSON.stringify(s)), 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(s);
166
+ return r.response ? (t.status = r.response.status, t.message = r.response.data.message || r.response.statusText, console.error("Error response:", JSON.stringify(t)), r.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : r.response.status === 404 ? console.error("Resource not found.") : r.response.status >= 500 && console.error("Server error. Please try again later.")) : r.request ? console.error("No response received:", r.request) : console.error("Error setting up request:", r.message), Promise.reject(t);
118
167
  }
119
168
  );
120
- const m = v("");
121
- function o() {
122
- return m.value === "" ? 0 : 1;
123
- }
124
- const R = {
125
- home: j,
126
- hotGames: A,
127
- fishGames: G,
128
- trialGames: N,
129
- currentLang: M,
130
- promotion: T,
131
- getLocale: B,
132
- csLink: F,
133
- eGame: k,
134
- cmsList: E
135
- }, $ = {
136
- install(e) {
137
- e.config.globalProperties.$library = R;
138
- }
139
- }, p = (e) => {
169
+ const Pt = Xt("");
170
+ function m() {
171
+ return Pt.value === "" ? 0 : 1;
172
+ }
173
+ const he = {
174
+ home: ne,
175
+ hotGames: Qt,
176
+ fishGames: Wt,
177
+ trialGames: te,
178
+ currentLang: se,
179
+ promotion: ee,
180
+ getLocale: ie,
181
+ csLink: ae,
182
+ eGame: oe,
183
+ cmsList: re,
184
+ getSetting: ue,
185
+ login: fe
186
+ }, Ke = {
187
+ install(r) {
188
+ r.config.globalProperties.$library = he;
189
+ }
190
+ }, A = (r) => {
140
191
  try {
141
- const s = JSON.parse(
142
- c.AES.decrypt(e, m.value, {
192
+ const t = JSON.parse(
193
+ C.AES.decrypt(r, Pt.value, {
143
194
  format: {
144
195
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
145
- stringify: (a) => {
146
- const t = {
147
- ct: a.ciphertext.toString(c.enc.Base64)
196
+ stringify: (e) => {
197
+ const n = {
198
+ ct: e.ciphertext.toString(C.enc.Base64)
148
199
  };
149
- return a.iv && (t.iv = a.iv.toString()), a.salt && (t.s = a.salt.toString()), JSON.stringify(t);
200
+ return e.iv && (n.iv = e.iv.toString()), e.salt && (n.s = e.salt.toString()), JSON.stringify(n);
150
201
  },
151
- parse: (a) => {
152
- const t = JSON.parse(a), n = c.lib.CipherParams.create({
153
- ciphertext: c.enc.Base64.parse(t.ct)
202
+ parse: (e) => {
203
+ const n = JSON.parse(e), s = C.lib.CipherParams.create({
204
+ ciphertext: C.enc.Base64.parse(n.ct)
154
205
  });
155
- return t.iv && (n.iv = c.enc.Hex.parse(t.iv)), t.s && (n.salt = c.enc.Hex.parse(t.s)), n;
206
+ return n.iv && (s.iv = C.enc.Hex.parse(n.iv)), n.s && (s.salt = C.enc.Hex.parse(n.s)), s;
156
207
  }
157
208
  }
158
- }).toString(c.enc.Utf8)
209
+ }).toString(C.enc.Utf8)
159
210
  );
160
- return s !== "" ? JSON.parse(s) : s;
161
- } catch (s) {
162
- return console.error(s), "";
211
+ return t !== "" ? JSON.parse(t) : t;
212
+ } catch (t) {
213
+ return console.error(t), "";
214
+ }
215
+ }, pt = {
216
+ status: 200,
217
+ message: "",
218
+ data: {
219
+ currentPage: 0,
220
+ data: [],
221
+ from: 0,
222
+ lastPage: 0,
223
+ nextPageUrl: "",
224
+ path: "",
225
+ perPage: 0,
226
+ prevPageUrl: "",
227
+ to: 0,
228
+ total: 0
163
229
  }
164
230
  };
165
- async function d(e) {
166
- const s = {
167
- status: 200,
168
- message: "",
169
- data: {
170
- cmsList: []
171
- }
172
- };
231
+ async function Nt() {
232
+ const r = pt;
173
233
  try {
174
- const a = await u.get(`/cmsList?id=${e}`, {
234
+ const t = await R.get("/apis/hotGames", {
175
235
  params: {
176
- render: o()
236
+ render: m()
177
237
  }
178
238
  });
179
- let t;
180
- return o() ? t = JSON.parse(p(a.data)) : t = a.data, a.status != 200 ? (s.status = a.status, s.message = "", s) : (s.data = {
181
- cmsList: t.cmslist.map((n) => ({
239
+ let e;
240
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
241
+ currentPage: e.current_page ?? 0,
242
+ data: e.data.map((n) => ({
243
+ id: n.id ?? 0,
182
244
  name: n.name ?? "",
183
- content: n.content ?? "",
184
- link: n.link ?? "",
185
- linkTarget: n.link_target ?? "",
186
- updatedOn: n.updated_on ?? "",
187
- idCmsCategory: n.id_cms_category ?? 0,
188
- contentOrg: n.content_org ?? "",
189
- linkOrg: n.link_org ?? ""
190
- }))
191
- }, s);
192
- } catch (a) {
193
- const t = a;
194
- return s.status = t.status || 500, s.message = t.message, s;
195
- }
196
- }
197
- var i = /* @__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))(i || {});
198
- async function _() {
199
- const e = {
200
- status: 200,
201
- message: "",
202
- data: {
203
- currentPage: 0,
204
- data: [],
205
- from: 0,
206
- lastPage: 0,
207
- nextPageUrl: "",
208
- path: "",
209
- perPage: 0,
210
- prevPageUrl: "",
211
- to: 0,
212
- total: 0
213
- }
214
- };
215
- try {
216
- const s = await u.get("/hotGames", {
217
- params: {
218
- render: o()
219
- }
220
- });
221
- let a;
222
- return o() ? a = JSON.parse(p(s.data)) : a = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
223
- currentPage: a.current_page ?? 0,
224
- data: a.data.map((t) => ({
225
- id: t.id ?? 0,
226
- name: t.name ?? "",
227
- pfid: t.pfid ?? 0,
228
- ppname: t.ppname ?? "",
229
- code: t.code ?? "",
230
- img: t.img ?? "",
231
- progressive: t.progressive ?? "",
232
- ppid: t.ppid ?? 0,
233
- notry: t.notry === 1,
234
- productCode: t.product_code ?? "",
235
- imgSrc: t.imgSrc ?? "",
236
- imgPf: t.imgPf ?? "",
237
- favouriteFlag: t.favourite_flag === 1,
238
- platformStatusFlag: t.platform_status_flag ?? "",
239
- platformFlagName: t.platform_flag_name ?? "",
245
+ pfid: n.pfid ?? 0,
246
+ ppname: n.ppname ?? "",
247
+ code: n.code ?? "",
248
+ img: n.img ?? "",
249
+ progressive: n.progressive ?? "",
250
+ ppid: n.ppid ?? 0,
251
+ notry: n.notry === 1,
252
+ productCode: n.product_code ?? "",
253
+ imgSrc: n.imgSrc ?? "",
254
+ imgPf: n.imgPf ?? "",
255
+ favouriteFlag: n.favourite_flag === 1,
256
+ platformStatusFlag: n.platform_status_flag ?? "",
257
+ platformFlagName: n.platform_flag_name ?? "",
240
258
  platformStatusParams: {
241
- eb: t.platform_status_params.eb ?? !1,
242
- fit: t.platform_status_params.fit ?? !1,
243
- fs: t.platform_status_params.fs ?? !1
259
+ eb: n.platform_status_params.eb ?? !1,
260
+ fit: n.platform_status_params.fit ?? !1,
261
+ fs: n.platform_status_params.fs ?? !1
244
262
  },
245
- gameId: t.game_id ?? 0
263
+ gameId: n.game_id ?? 0
246
264
  })),
247
- from: a.from ?? 0,
248
- lastPage: a.last_page ?? 0,
249
- nextPageUrl: a.next_page_url ?? "",
250
- path: a.path ?? "",
251
- perPage: a.per_page ?? 0,
252
- prevPageUrl: a.prev_page_url ?? "",
253
- to: a.to ?? 0,
254
- total: a.total ?? 0
255
- }, e);
256
- } catch (s) {
257
- const a = s;
258
- return e.status = a.status || 500, e.message = a.message, e;
259
- }
260
- }
261
- async function S() {
262
- const e = {
263
- status: 200,
264
- message: "",
265
- data: {
266
- hotfish: [],
267
- data: []
268
- }
269
- };
265
+ from: e.from ?? 0,
266
+ lastPage: e.last_page ?? 0,
267
+ nextPageUrl: e.next_page_url ?? "",
268
+ path: e.path ?? "",
269
+ perPage: e.per_page ?? 0,
270
+ prevPageUrl: e.prev_page_url ?? "",
271
+ to: e.to ?? 0,
272
+ total: e.total ?? 0
273
+ }, r);
274
+ } catch (t) {
275
+ const e = t;
276
+ return r.status = e.status || 500, r.message = e.message, r;
277
+ }
278
+ }
279
+ const gt = {
280
+ status: 200,
281
+ message: "",
282
+ data: {
283
+ hotfish: [],
284
+ data: []
285
+ }
286
+ };
287
+ async function Vt() {
288
+ const r = gt;
270
289
  try {
271
- const s = await u.get("/fishGames", {
290
+ const t = await R.get("/apis/fishGames", {
272
291
  params: {
273
- render: o()
292
+ render: m()
274
293
  }
275
294
  });
276
- let a;
277
- return o() ? a = JSON.parse(p(s.data)) : a = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
278
- hotfish: a.hotfish.map((t) => f(t)),
279
- data: a.data.map((t) => f(t))
280
- }, e);
281
- } catch (s) {
282
- const a = s;
283
- return e.status = a.status || 500, e.message = a.message, e;
284
- }
285
- }
286
- const f = (e) => ({
287
- id: e.id ?? 0,
288
- name: e.name ?? "",
289
- ppid: e.pp_id ?? "",
290
- img: e.img ?? "",
291
- desc: e.desc ?? "",
292
- ppname: e.pp_name ?? "",
293
- platformCode: e.platform_code ?? "",
294
- code: e.code ?? "",
295
- flag: e.flag ?? 0,
296
- gameId: e.game_id ?? 0,
297
- imgSrc: e.imgSrc ?? "",
298
- imgPf: e.imgPf ?? "",
299
- favouriteFlag: e.favourite_flag === 1,
300
- platformStatusFflag: e.platform_status_Fflag ?? "",
301
- platformFlagName: e.platform_flag_name ?? "",
295
+ let e;
296
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
297
+ hotfish: e.hotfish.map((n) => bt(n)),
298
+ data: e.data.map((n) => bt(n))
299
+ }, r);
300
+ } catch (t) {
301
+ const e = t;
302
+ return r.status = e.status || 500, r.message = e.message, r;
303
+ }
304
+ }
305
+ const bt = (r) => ({
306
+ id: r.id ?? 0,
307
+ name: r.name ?? "",
308
+ ppid: r.pp_id ?? "",
309
+ img: r.img ?? "",
310
+ desc: r.desc ?? "",
311
+ ppname: r.pp_name ?? "",
312
+ platformCode: r.platform_code ?? "",
313
+ code: r.code ?? "",
314
+ flag: r.flag ?? 0,
315
+ gameId: r.game_id ?? 0,
316
+ imgSrc: r.imgSrc ?? "",
317
+ imgPf: r.imgPf ?? "",
318
+ favouriteFlag: r.favourite_flag === 1,
319
+ platformStatusFflag: r.platform_status_Fflag ?? "",
320
+ platformFlagName: r.platform_flag_name ?? "",
302
321
  platformStatusParams: {
303
- eb: e.platform_status_params.eb ?? !1,
304
- fit: e.platform_status_params.fit ?? !1,
305
- fs: e.platform_status_params.fs ?? !1
322
+ eb: r.platform_status_params.eb ?? !1,
323
+ fit: r.platform_status_params.fit ?? !1,
324
+ fs: r.platform_status_params.fs ?? !1
306
325
  }
307
- });
308
- async function y() {
309
- const e = {
310
- status: 200,
311
- message: "",
312
- data: []
313
- };
326
+ }), dt = {
327
+ status: 200,
328
+ message: "",
329
+ data: []
330
+ };
331
+ async function Lt() {
332
+ const r = dt;
314
333
  try {
315
- const s = await u.get("/trialGames", {
334
+ const t = await R.get("/apis/trialGames", {
316
335
  params: {
317
- render: o()
336
+ render: m()
318
337
  }
319
338
  });
320
- let a;
321
- return o() ? a = JSON.parse(p(s.data)) : a = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = a.map((t) => ({
322
- ppid: t.ppid ?? 0,
323
- ppname: t.ppname ?? "",
324
- games: t.games.map((n) => ({
325
- id: n.id ?? 0,
326
- name: n.name ?? "",
327
- img: n.img ?? "",
328
- progressive: n.progressive ?? "",
329
- notry: n.notry === 1,
330
- imgSrc: n.imgSrc ?? "",
331
- imgPf: n.imgPf ?? "",
332
- favouriteFlag: n.favourite_flag === 1,
333
- platformStatusFflag: n.platform_status_Fflag ?? "",
334
- platformFlagName: n.platform_flag_name ?? "",
339
+ let e;
340
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = e.map((n) => ({
341
+ ppid: n.ppid ?? 0,
342
+ ppname: n.ppname ?? "",
343
+ games: n.games.map((s) => ({
344
+ id: s.id ?? 0,
345
+ name: s.name ?? "",
346
+ img: s.img ?? "",
347
+ progressive: s.progressive ?? "",
348
+ notry: s.notry === 1,
349
+ imgSrc: s.imgSrc ?? "",
350
+ imgPf: s.imgPf ?? "",
351
+ favouriteFlag: s.favourite_flag === 1,
352
+ platformStatusFflag: s.platform_status_Fflag ?? "",
353
+ platformFlagName: s.platform_flag_name ?? "",
335
354
  platformStatusParams: {
336
- eb: n.platform_status_params.eb ?? !1,
337
- fit: n.platform_status_params.fit ?? !1,
338
- fs: n.platform_status_params.fs ?? !1
355
+ eb: s.platform_status_params.eb ?? !1,
356
+ fit: s.platform_status_params.fit ?? !1,
357
+ fs: s.platform_status_params.fs ?? !1
339
358
  },
340
- ppname: t.ppname ?? ""
359
+ ppname: n.ppname ?? ""
341
360
  }))
342
- })), e);
343
- } catch (s) {
344
- const a = s;
345
- return e.status = a.status || 500, e.message = a.message, e;
361
+ })), r);
362
+ } catch (t) {
363
+ const e = t;
364
+ return r.status = e.status || 500, r.message = e.message, r;
346
365
  }
347
366
  }
348
- async function P() {
349
- const e = {
350
- status: 200,
351
- message: "",
352
- data: {
353
- objList: [],
354
- promoCat: [],
355
- resize: 0
356
- }
357
- };
367
+ const vt = {
368
+ status: 200,
369
+ message: "",
370
+ data: {
371
+ objList: [],
372
+ promoCat: [],
373
+ resize: 0
374
+ }
375
+ };
376
+ async function It() {
377
+ const r = vt;
358
378
  try {
359
- const s = await u.get("/promotion", {
379
+ const t = await R.get("/apis/promotion", {
360
380
  params: {
361
- render: o()
381
+ render: m()
362
382
  }
363
383
  });
364
- let a;
365
- return o() ? a = JSON.parse(p(s.data)) : a = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
366
- objList: a.objList.map((t) => ({
367
- promoIndex: t.promoindex ?? 0,
368
- type: t.type ?? 0,
369
- thumb: t.thumb ?? 0,
370
- title: t.title ?? "",
371
- displayTime: t.display_time ?? "",
372
- handle: t.handle ?? "",
373
- content: t.content ?? "",
374
- langList: t.lang_list ?? "",
375
- agentList: t.agent_list ?? "",
376
- dateCreated: t.datecreated ?? "",
377
- updateBy: t.updateby ?? "",
378
- lastUpdated: t.lastupdated ?? "",
379
- sequence: t.sequence ?? 0,
380
- status: t.status === 1,
381
- timer: t.timer ?? "",
382
- stime: t.stime ?? "",
383
- etime: t.etime ?? "",
384
- smaid: t.smaid ?? "",
385
- companyIndex: t.companyindex ?? "",
386
- fileName: t.filename ?? "",
387
- version: t.version ?? "",
388
- categoryName: t.category_name ?? "",
389
- barImg: t.bar_img ?? "",
390
- buttonImg: t.button_img ?? "",
391
- promoImg: t.promo_image ?? "",
392
- catId: t.catid ?? "",
393
- imageType: t.image_type ?? "",
394
- image: t.image ?? "",
395
- isLink: t.isLink,
396
- latestUpdate: t.latestupdate ?? ""
384
+ let e;
385
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
386
+ objList: e.objList.map((n) => ({
387
+ promoIndex: n.promoindex ?? 0,
388
+ type: n.type ?? 0,
389
+ thumb: n.thumb ?? 0,
390
+ title: n.title ?? "",
391
+ displayTime: n.display_time ?? "",
392
+ handle: n.handle ?? "",
393
+ content: n.content ?? "",
394
+ langList: n.lang_list ?? "",
395
+ agentList: n.agent_list ?? "",
396
+ dateCreated: n.datecreated ?? "",
397
+ updateBy: n.updateby ?? "",
398
+ lastUpdated: n.lastupdated ?? "",
399
+ sequence: n.sequence ?? 0,
400
+ status: n.status === 1,
401
+ timer: n.timer ?? "",
402
+ stime: n.stime ?? "",
403
+ etime: n.etime ?? "",
404
+ smaid: n.smaid ?? "",
405
+ companyIndex: n.companyindex ?? "",
406
+ fileName: n.filename ?? "",
407
+ version: n.version ?? "",
408
+ categoryName: n.category_name ?? "",
409
+ barImg: n.bar_img ?? "",
410
+ buttonImg: n.button_img ?? "",
411
+ promoImg: n.promo_image ?? "",
412
+ catId: n.catid ?? "",
413
+ imageType: n.image_type ?? "",
414
+ image: n.image ?? "",
415
+ isLink: n.isLink,
416
+ latestUpdate: n.latestupdate ?? ""
397
417
  })),
398
- promoCat: a.promoCat.map((t) => ({
399
- catId: t.catid ?? 0,
400
- name: t.name ?? "",
401
- barImg: t.bar_img ?? "",
402
- buttonImg: t.button_img ?? ""
418
+ promoCat: e.promoCat.map((n) => ({
419
+ catId: n.catid ?? 0,
420
+ name: n.name ?? "",
421
+ barImg: n.bar_img ?? "",
422
+ buttonImg: n.button_img ?? ""
403
423
  })),
404
- resize: a.resize
405
- }, e);
406
- } catch (s) {
407
- const a = s;
408
- return e.status = a.status || 500, e.message = a.message, e;
409
- }
410
- }
411
- async function x() {
412
- const e = {
413
- status: 200,
414
- message: "",
415
- data: {
416
- game: {
417
- SPORT: [],
418
- SPECIAL: [],
419
- PVP: [],
420
- LIVE: [],
421
- EVENT: [],
422
- ESPORT: [],
423
- EGAME: [],
424
- BINGO: []
425
- },
426
- mobileBanner: [],
427
- announcement: [],
428
- alertAnnouncement: [],
429
- hotGames: {
430
- status: 200,
431
- message: "",
432
- data: {
433
- currentPage: 0,
434
- data: [],
435
- from: 0,
436
- lastPage: 0,
437
- nextPageUrl: "",
438
- path: "",
439
- perPage: 0,
440
- prevPageUrl: "",
441
- to: 0,
442
- total: 0
443
- }
444
- },
445
- fishGames: {
446
- status: 200,
447
- message: "",
448
- data: {
449
- hotfish: [],
450
- data: []
451
- }
452
- },
453
- trialGames: {
454
- status: 200,
455
- message: "",
456
- data: []
457
- },
458
- promotion: {
459
- status: 200,
460
- message: "",
461
- data: {
462
- objList: [],
463
- promoCat: [],
464
- resize: 0
465
- }
466
- },
467
- cmsList: {
468
- status: 200,
469
- message: "",
470
- data: {
471
- cmsList: []
472
- }
424
+ resize: e.resize
425
+ }, r);
426
+ } catch (t) {
427
+ const e = t;
428
+ return r.status = e.status || 500, r.message = e.message, r;
429
+ }
430
+ }
431
+ var yt = /* @__PURE__ */ ((r) => (r[r.AllCategories = 0] = "AllCategories", r[r.Lotto = 2] = "Lotto", r[r.LiveCasino = 3] = "LiveCasino", r[r.SlotGames = 4] = "SlotGames", r[r.SportsBetting = 5] = "SportsBetting", r[r.LatestAd = 7] = "LatestAd", r[r.Promotions = 8] = "Promotions", r[r.MobileBetting = 9] = "MobileBetting", r[r.ESports = 12] = "ESports", r[r.CardGames = 13] = "CardGames", r[r.FishingGames = 14] = "FishingGames", r[r.BottomRightAd = 16] = "BottomRightAd", r[r.LotteryActivity = 18] = "LotteryActivity", r[r.HomepagePopup = 101] = "HomepagePopup", r[r.LeftAd = 102] = "LeftAd", r[r.RightAd = 103] = "RightAd", r[r.MobileAd = 104] = "MobileAd", r[r.MobilePopup = 105] = "MobilePopup", r[r.BottomLeftAd = 106] = "BottomLeftAd", r[r.InfoGallery = 109] = "InfoGallery", r[r.AgentBackendAd = 114] = "AgentBackendAd", r[r.CheckInBanner = 123] = "CheckInBanner", r[r.PlatformActivities = 128] = "PlatformActivities", r[r.LotterySlogan = 130] = "LotterySlogan", r[r.MobileLotterySlogan = 131] = "MobileLotterySlogan", r[r.PointsMallSlogan = 135] = "PointsMallSlogan", r))(yt || {});
432
+ const mt = {
433
+ status: 200,
434
+ message: "",
435
+ data: {
436
+ cmsList: []
437
+ }
438
+ };
439
+ async function Mt(r) {
440
+ const t = mt;
441
+ try {
442
+ const e = await R.get(`/apis/cmsList?id=${r}`, {
443
+ params: {
444
+ render: m()
473
445
  }
474
- }
475
- };
446
+ });
447
+ let n;
448
+ return m() ? n = JSON.parse(A(e.data)) : n = e.data, e.status != 200 ? (t.status = e.status, t.message = "", t) : (t.data = {
449
+ cmsList: n.cmslist.map((s) => ({
450
+ name: s.name ?? "",
451
+ content: s.content ?? "",
452
+ link: s.link ?? "",
453
+ linkTarget: s.link_target ?? "",
454
+ updatedOn: s.updated_on ?? "",
455
+ idCmsCategory: s.id_cms_category ?? 0,
456
+ contentOrg: s.content_org ?? "",
457
+ linkOrg: s.link_org ?? ""
458
+ }))
459
+ }, t);
460
+ } catch (e) {
461
+ const n = e;
462
+ return t.status = n.status || 500, t.message = n.message, t;
463
+ }
464
+ }
465
+ const Ft = {
466
+ status: 200,
467
+ message: "",
468
+ data: {
469
+ game: {
470
+ SPORT: [],
471
+ SPECIAL: [],
472
+ PVP: [],
473
+ LIVE: [],
474
+ EVENT: [],
475
+ ESPORT: [],
476
+ EGAME: [],
477
+ BINGO: []
478
+ },
479
+ mobileBanner: [],
480
+ announcement: [],
481
+ alertAnnouncement: [],
482
+ hotGames: pt,
483
+ fishGames: gt,
484
+ trialGames: dt,
485
+ promotion: vt,
486
+ cmsList: mt
487
+ }
488
+ };
489
+ async function le() {
490
+ const r = Ft;
476
491
  try {
477
492
  const [
478
- s,
479
- a,
480
493
  t,
494
+ e,
481
495
  n,
482
- h,
483
- L
496
+ s,
497
+ i,
498
+ o
484
499
  ] = await Promise.all([
485
- u.get("/home", {
500
+ R.get("/apis/home", {
486
501
  params: {
487
- render: o()
502
+ render: m()
488
503
  }
489
504
  }),
490
- _(),
491
- S(),
492
- y(),
493
- P(),
494
- d(i.LatestAd)
505
+ Nt(),
506
+ Vt(),
507
+ Lt(),
508
+ It(),
509
+ Mt(yt.LatestAd)
495
510
  ]);
496
- let l;
497
- return o() ? l = JSON.parse(p(s.data)) : l = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
511
+ let a;
512
+ return m() ? a = JSON.parse(A(t.data)) : a = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
498
513
  game: {
499
- SPORT: l.game.SPORT.map((r) => g(r)),
500
- SPECIAL: l.game.SPECIAL.map((r) => g(r)),
501
- PVP: l.game.PVP.map((r) => g(r)),
502
- LIVE: l.game.LIVE.map((r) => g(r)),
503
- EVENT: l.game.EVENT.map((r) => g(r)),
504
- ESPORT: l.game.ESPORT.map((r) => g(r)),
505
- EGAME: l.game.EGAME.map((r) => g(r)),
506
- BINGO: l.game.BINGO.map((r) => g(r))
514
+ SPORT: a.game.SPORT.map((u) => F(u)),
515
+ SPECIAL: a.game.SPECIAL.map((u) => F(u)),
516
+ PVP: a.game.PVP.map((u) => F(u)),
517
+ LIVE: a.game.LIVE.map((u) => F(u)),
518
+ EVENT: a.game.EVENT.map((u) => F(u)),
519
+ ESPORT: a.game.ESPORT.map((u) => F(u)),
520
+ EGAME: a.game.EGAME.map((u) => F(u)),
521
+ BINGO: a.game.BINGO.map((u) => F(u))
507
522
  },
508
- mobileBanner: l.mobileBanner.map((r) => ({
509
- name: r.name ?? "",
510
- content: r.content ?? "",
511
- link: r.link ?? "",
512
- linkTarget: r.link_target ?? "",
513
- updatedOn: r.updated_on ?? "",
514
- idCmsCategory: r.id_cms_category ?? 0,
515
- contentOrg: r.content_org ?? ""
523
+ mobileBanner: a.mobileBanner.map((u) => ({
524
+ name: u.name ?? "",
525
+ content: u.content ?? "",
526
+ link: u.link ?? "",
527
+ linkTarget: u.link_target ?? "",
528
+ updatedOn: u.updated_on ?? "",
529
+ idCmsCategory: u.id_cms_category ?? 0,
530
+ contentOrg: u.content_org ?? ""
516
531
  })),
517
- announcement: l.announcement.map((r) => ({
518
- announcementIndex: r.announcement_index ?? 0,
519
- announcementEnglish: r.announcement_english ?? "",
520
- announcementSimplified: r.announcement_simplified ?? "",
521
- announcementTraditional: r.announcement_traditional ?? "",
522
- announcementMalay: r.announcement_malay ?? "",
523
- announcementStatus: r.announcement_status === "1",
524
- announcementShow: r.announcement_show === "1",
525
- announcementAlert: r.announcement_alert === "1",
526
- announcementUser: r.announcement_user === "1",
527
- announcementSequence: r.announcement_sequence ?? 0,
528
- announcementCompany: r.announcement_company === "1",
529
- companyIndex: r.companyindex ?? 0,
530
- announcementLastUpdated: r.announcement_lastupdated ?? "",
531
- announcementDateCreated: r.announcement_datecreated ?? "",
532
- announcementSmaid: r.announcement_smaid ?? "",
533
- annTimer: r.ann_timer ?? "",
534
- annStart: r.ann_start ?? "",
535
- annEnd: r.ann_end ?? "",
536
- grp: r.grp ?? "",
537
- time: r.time ?? ""
532
+ announcement: a.announcement.map((u) => ({
533
+ announcementIndex: u.announcement_index ?? 0,
534
+ announcementEnglish: u.announcement_english ?? "",
535
+ announcementSimplified: u.announcement_simplified ?? "",
536
+ announcementTraditional: u.announcement_traditional ?? "",
537
+ announcementMalay: u.announcement_malay ?? "",
538
+ announcementStatus: u.announcement_status === "1",
539
+ announcementShow: u.announcement_show === "1",
540
+ announcementAlert: u.announcement_alert === "1",
541
+ announcementUser: u.announcement_user === "1",
542
+ announcementSequence: u.announcement_sequence ?? 0,
543
+ announcementCompany: u.announcement_company === "1",
544
+ companyIndex: u.companyindex ?? 0,
545
+ announcementLastUpdated: u.announcement_lastupdated ?? "",
546
+ announcementDateCreated: u.announcement_datecreated ?? "",
547
+ announcementSmaid: u.announcement_smaid ?? "",
548
+ annTimer: u.ann_timer ?? "",
549
+ annStart: u.ann_start ?? "",
550
+ annEnd: u.ann_end ?? "",
551
+ grp: u.grp ?? "",
552
+ time: u.time ?? ""
538
553
  })),
539
- alertAnnouncement: l.alert_announcement.map((r) => ({
540
- announcementDateCreated: r.announcement_datecreated ?? "",
541
- announcementSimplified: r.announcement_simplified ?? ""
554
+ alertAnnouncement: a.alert_announcement.map((u) => ({
555
+ announcementDateCreated: u.announcement_datecreated ?? "",
556
+ announcementSimplified: u.announcement_simplified ?? ""
542
557
  })),
543
- hotGames: a,
544
- fishGames: t,
545
- trialGames: n,
546
- promotion: h,
547
- cmsList: L
548
- }, e);
549
- } catch (s) {
550
- const a = s;
551
- return e.status = a.status || 500, e.message = a.message, e;
552
- }
553
- }
554
- const g = (e) => ({
555
- id: e.id ?? 0,
556
- idPlatformMaster: e.id_PlatformMaster ?? 0,
557
- idProductMaster: e.id_ProductMaster ?? 0,
558
- name: e.name ?? "",
559
- shortName: e.shortName ?? "",
560
- img: e.img ?? "",
561
- mobileUrl: e.mobileUrl ?? "",
562
- url: e.url ?? "",
563
- desc: e.desc ?? "",
564
- seq: e.seq ?? 0,
565
- flag: e.flag ?? 0,
566
- status: e.status ?? "",
567
- createdBy: e.created_by ?? 0,
568
- createdOn: e.created_on ?? "",
569
- categoryID: e.categoryid ?? 0,
570
- com: e.com ?? "",
571
- cur: e.cur ?? "",
572
- pt: e.pt ?? "",
573
- ppName: e.pp_name ?? "",
574
- ppImage: e.pp_image ?? "",
575
- platformCode: e.platform_code ?? "",
576
- platformName: e.platform_name ?? "",
577
- classIcon: e.class_icon ?? "",
578
- productCode: e.product_code ?? "",
579
- productName: e.product_name ?? "",
580
- gameID: e.game_id ?? 0,
581
- fAuth: e.fAuth ?? !1,
558
+ hotGames: e,
559
+ fishGames: n,
560
+ trialGames: s,
561
+ promotion: i,
562
+ cmsList: o
563
+ }, r);
564
+ } catch (t) {
565
+ const e = t;
566
+ return r.status = e.status || 500, r.message = e.message, r;
567
+ }
568
+ }
569
+ const F = (r) => ({
570
+ id: r.id ?? 0,
571
+ idPlatformMaster: r.id_PlatformMaster ?? 0,
572
+ idProductMaster: r.id_ProductMaster ?? 0,
573
+ name: r.name ?? "",
574
+ shortName: r.shortName ?? "",
575
+ img: r.img ?? "",
576
+ mobileUrl: r.mobileUrl ?? "",
577
+ url: r.url ?? "",
578
+ desc: r.desc ?? "",
579
+ seq: r.seq ?? 0,
580
+ flag: r.flag ?? 0,
581
+ status: r.status ?? "",
582
+ createdBy: r.created_by ?? 0,
583
+ createdOn: r.created_on ?? "",
584
+ categoryID: r.categoryid ?? 0,
585
+ com: r.com ?? "",
586
+ cur: r.cur ?? "",
587
+ pt: r.pt ?? "",
588
+ ppName: r.pp_name ?? "",
589
+ ppImage: r.pp_image ?? "",
590
+ platformCode: r.platform_code ?? "",
591
+ platformName: r.platform_name ?? "",
592
+ classIcon: r.class_icon ?? "",
593
+ productCode: r.product_code ?? "",
594
+ productName: r.product_name ?? "",
595
+ gameID: r.game_id ?? 0,
596
+ fAuth: r.fAuth ?? !1,
582
597
  platformStatusParams: {
583
- eb: e.platform_status_params.eb ?? !1,
584
- fit: e.platform_status_params.fit ?? !1,
585
- fs: e.platform_status_params.fs ?? !1
598
+ eb: r.platform_status_params.eb ?? !1,
599
+ fit: r.platform_status_params.fit ?? !1,
600
+ fs: r.platform_status_params.fs ?? !1
586
601
  },
587
- loginFlag: e.login_flag === "1",
588
- link: e.link ?? "",
589
- favouriteFlag: e.favourite_flag === 1,
590
- platformStatusFlag: e.platform_status_flag ?? "",
591
- platformFlagName: e.platform_flag_name ?? "",
592
- homeLogo: e.home_logo ?? "",
593
- imgPf: e.imgPf ?? "",
594
- imgSport: e.imgSport ?? "",
595
- imgTemplate: e.imgTemplate ?? ""
602
+ loginFlag: r.login_flag === "1",
603
+ link: r.link ?? "",
604
+ favouriteFlag: r.favourite_flag === 1,
605
+ platformStatusFlag: r.platform_status_flag ?? "",
606
+ platformFlagName: r.platform_flag_name ?? "",
607
+ homeLogo: r.home_logo ?? "",
608
+ imgPf: r.imgPf ?? "",
609
+ imgSport: r.imgSport ?? "",
610
+ imgTemplate: r.imgTemplate ?? ""
596
611
  });
597
- var b = /* @__PURE__ */ ((e) => (e.SPORT = "SPORT", e.SPECIAL = "SPECIAL", e.PVP = "PVP", e.LIVE = "LIVE", e.EVENT = "EVENT", e.ESPORT = "ESPORT", e.EGAME = "EGAME", e.BINGO = "BINGO", e))(b || {});
598
- async function D() {
599
- const e = {
600
- status: 200,
601
- message: "",
602
- data: ""
603
- };
612
+ var kt = /* @__PURE__ */ ((r) => (r.SPORT = "SPORT", r.SPECIAL = "SPECIAL", r.PVP = "PVP", r.LIVE = "LIVE", r.EVENT = "EVENT", r.ESPORT = "ESPORT", r.EGAME = "EGAME", r.BINGO = "BINGO", r))(kt || {});
613
+ const Ht = {
614
+ status: 200,
615
+ message: "",
616
+ data: ""
617
+ };
618
+ async function ce() {
619
+ const r = Ht;
604
620
  try {
605
- const s = await u.get("/currentLang", {
621
+ const t = await R.get("/apis/currentLang", {
606
622
  params: {
607
- render: o()
623
+ render: m()
608
624
  }
609
625
  });
610
- let a;
611
- return o() ? a = JSON.parse(p(s.data)) : a = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = a, e);
612
- } catch (s) {
613
- const a = s;
614
- return e.status = a.status || 500, e.message = a.message, e;
626
+ let e;
627
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = e, r);
628
+ } catch (t) {
629
+ const e = t;
630
+ return r.status = e.status || 500, r.message = e.message, r;
615
631
  }
616
632
  }
617
- async function z() {
618
- const e = {
619
- status: 200,
620
- message: "",
621
- data: []
622
- };
633
+ const jt = {
634
+ status: 200,
635
+ message: "",
636
+ data: []
637
+ };
638
+ async function pe() {
639
+ const r = jt;
623
640
  try {
624
- const s = await u.get("/getLocale", {
641
+ const t = await R.get("/apis/getLocale", {
625
642
  params: {
626
- render: o()
643
+ render: m()
627
644
  }
628
645
  });
629
- let a;
630
- return o() ? a = JSON.parse(p(s.data)) : a = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = [
646
+ let e;
647
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = [
631
648
  {
632
649
  code: "en",
633
- label: a.en.label ?? ""
650
+ label: e.en.label ?? ""
634
651
  },
635
652
  {
636
653
  code: "zh",
637
- label: a.zh.label ?? ""
654
+ label: e.zh.label ?? ""
638
655
  },
639
656
  {
640
657
  code: "ms",
641
- label: a.ms.label ?? ""
658
+ label: e.ms.label ?? ""
642
659
  }
643
- ], e);
644
- } catch (s) {
645
- const a = s;
646
- return e.status = a.status || 500, e.message = a.message, e;
660
+ ], r);
661
+ } catch (t) {
662
+ const e = t;
663
+ return r.status = e.status || 500, r.message = e.message, r;
647
664
  }
648
665
  }
649
- async function J() {
650
- const e = {
651
- status: 200,
652
- message: "",
653
- data: {
654
- liveChat: ""
655
- }
656
- };
666
+ const qt = {
667
+ status: 200,
668
+ message: "",
669
+ data: {
670
+ liveChat: ""
671
+ }
672
+ };
673
+ async function ge() {
674
+ const r = qt;
657
675
  try {
658
- const s = await u.get("/cslink", {
676
+ const t = await R.get("/apis/cslink", {
659
677
  params: {
660
- render: o()
678
+ render: m()
661
679
  }
662
680
  });
663
- let a;
664
- return o() ? a = JSON.parse(p(s.data)) : a = s.data, s.status != 200 ? (e.status = s.status, e.message = "", e) : (e.data = {
665
- liveChat: a.livechat ?? ""
666
- }, e);
667
- } catch (s) {
668
- const a = s;
669
- return e.status = a.status || 500, e.message = a.message, e;
670
- }
671
- }
672
- async function U(e) {
673
- const s = {
674
- status: 200,
675
- message: "",
676
- data: []
677
- };
681
+ let e;
682
+ return m() ? e = JSON.parse(A(t.data)) : e = t.data, t.status != 200 ? (r.status = t.status, r.message = "", r) : (r.data = {
683
+ liveChat: e.livechat ?? ""
684
+ }, r);
685
+ } catch (t) {
686
+ const e = t;
687
+ return r.status = e.status || 500, r.message = e.message, r;
688
+ }
689
+ }
690
+ const Ct = {
691
+ status: 200,
692
+ message: "",
693
+ data: []
694
+ };
695
+ async function de(r) {
696
+ const t = Ct;
678
697
  try {
679
- const a = await u.get(`/egame/json/${e}`, {
698
+ const e = await R.get(`/apis/egame/json/${r}`, {
680
699
  params: {
681
- render: o()
700
+ render: m()
682
701
  }
683
702
  });
684
- let t;
685
- return o() ? t = JSON.parse(p(a.data)) : t = a.data, a.status != 200 ? (s.status = a.status, s.message = "", s) : (s.data = t.map((n) => ({
686
- gameId: n.game_id ?? "",
687
- imgSrc: n.imgSrc ?? "",
688
- imgPf: n.imgPf ?? "",
689
- name: n.name ?? "",
690
- favouriteFlag: n.favourite_flag === 1,
691
- platformStatusFflag: n.platform_status_Fflag ?? "",
692
- platformFlagName: n.platform_flag_name ?? "",
703
+ let n;
704
+ return m() ? n = JSON.parse(A(e.data)) : n = e.data, e.status != 200 ? (t.status = e.status, t.message = "", t) : (t.data = n.map((s) => ({
705
+ gameId: s.game_id ?? "",
706
+ imgSrc: s.imgSrc ?? "",
707
+ imgPf: s.imgPf ?? "",
708
+ name: s.name ?? "",
709
+ favouriteFlag: s.favourite_flag === 1,
710
+ platformStatusFflag: s.platform_status_Fflag ?? "",
711
+ platformFlagName: s.platform_flag_name ?? "",
693
712
  platformStatusParams: {
694
- eb: n.platform_status_params.eb ?? !1,
695
- fit: n.platform_status_params.fit ?? !1,
696
- fs: n.platform_status_params.fs ?? !1
713
+ eb: s.platform_status_params.eb ?? !1,
714
+ fit: s.platform_status_params.fit ?? !1,
715
+ fs: s.platform_status_params.fs ?? !1
697
716
  },
698
- progressive: n.progressive ?? "",
699
- gameCategory: n.game_category ?? "",
700
- ppid: n.pp_id ?? ""
701
- })), s);
702
- } catch (a) {
703
- const t = a;
704
- return s.status = t.status || 500, s.message = t.message, s;
717
+ progressive: s.progressive ?? "",
718
+ gameCategory: s.game_category ?? "",
719
+ ppid: s.pp_id ?? ""
720
+ })), t);
721
+ } catch (e) {
722
+ const n = e;
723
+ return t.status = n.status || 500, t.message = n.message, t;
724
+ }
725
+ }
726
+ const Gt = {
727
+ status: 200,
728
+ message: "",
729
+ data: {
730
+ csrf: "",
731
+ getCaptcha: "",
732
+ verificationBeforeLogin: !1,
733
+ publicKey: "",
734
+ concantenatedKey: ""
735
+ }
736
+ };
737
+ async function Ut(r) {
738
+ const t = Gt;
739
+ try {
740
+ const e = await R.get("/apis/getSetting", {
741
+ params: {
742
+ render: m(),
743
+ setting: r
744
+ }
745
+ });
746
+ let n;
747
+ return m() ? n = JSON.parse(A(e.data)) : n = e.data, e.status != 200 ? (t.status = e.status, t.message = "", t) : (t.data = {
748
+ csrf: n.csrf,
749
+ getCaptcha: n.data.CAPTCHA ?? "",
750
+ verificationBeforeLogin: n.data["slide-verification"] === "1",
751
+ publicKey: n.data.encryptkey.pub.replace(
752
+ /-----BEGIN PUBLIC KEY-----|-----END PUBLIC KEY-----|\r|\n|=#/g,
753
+ ""
754
+ ),
755
+ concantenatedKey: Object.keys(n.data.encryptkey.pubarr).join("+")
756
+ }, t);
757
+ } catch (e) {
758
+ const n = e;
759
+ return t.status = n.status || 500, t.message = n.message, t;
760
+ }
761
+ }
762
+ var ve = "0123456789abcdefghijklmnopqrstuvwxyz";
763
+ function M(r) {
764
+ return ve.charAt(r);
765
+ }
766
+ function ye(r, t) {
767
+ return r & t;
768
+ }
769
+ function Q(r, t) {
770
+ return r | t;
771
+ }
772
+ function Tt(r, t) {
773
+ return r ^ t;
774
+ }
775
+ function Et(r, t) {
776
+ return r & ~t;
777
+ }
778
+ function me(r) {
779
+ if (r == 0)
780
+ return -1;
781
+ var t = 0;
782
+ return r & 65535 || (r >>= 16, t += 16), r & 255 || (r >>= 8, t += 8), r & 15 || (r >>= 4, t += 4), r & 3 || (r >>= 2, t += 2), r & 1 || ++t, t;
783
+ }
784
+ function Se(r) {
785
+ for (var t = 0; r != 0; )
786
+ r &= r - 1, ++t;
787
+ return t;
788
+ }
789
+ var z = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Kt = "=";
790
+ function it(r) {
791
+ var t, e, n = "";
792
+ for (t = 0; t + 3 <= r.length; t += 3)
793
+ e = parseInt(r.substring(t, t + 3), 16), n += z.charAt(e >> 6) + z.charAt(e & 63);
794
+ for (t + 1 == r.length ? (e = parseInt(r.substring(t, t + 1), 16), n += z.charAt(e << 2)) : t + 2 == r.length && (e = parseInt(r.substring(t, t + 2), 16), n += z.charAt(e >> 2) + z.charAt((e & 3) << 4)); (n.length & 3) > 0; )
795
+ n += Kt;
796
+ return n;
797
+ }
798
+ function Dt(r) {
799
+ var t = "", e, n = 0, s = 0;
800
+ for (e = 0; e < r.length && r.charAt(e) != Kt; ++e) {
801
+ var i = z.indexOf(r.charAt(e));
802
+ i < 0 || (n == 0 ? (t += M(i >> 2), s = i & 3, n = 1) : n == 1 ? (t += M(s << 2 | i >> 4), s = i & 15, n = 2) : n == 2 ? (t += M(s), t += M(i >> 2), s = i & 3, n = 3) : (t += M(s << 2 | i >> 4), t += M(i & 15), n = 0));
803
+ }
804
+ return n == 1 && (t += M(s << 2)), t;
805
+ }
806
+ var U, be = {
807
+ decode: function(r) {
808
+ var t;
809
+ if (U === void 0) {
810
+ var e = "0123456789ABCDEF", n = ` \f
811
+ \r  \u2028\u2029`;
812
+ for (U = {}, t = 0; t < 16; ++t)
813
+ U[e.charAt(t)] = t;
814
+ for (e = e.toLowerCase(), t = 10; t < 16; ++t)
815
+ U[e.charAt(t)] = t;
816
+ for (t = 0; t < n.length; ++t)
817
+ U[n.charAt(t)] = -1;
818
+ }
819
+ var s = [], i = 0, o = 0;
820
+ for (t = 0; t < r.length; ++t) {
821
+ var a = r.charAt(t);
822
+ if (a == "=")
823
+ break;
824
+ if (a = U[a], a != -1) {
825
+ if (a === void 0)
826
+ throw new Error("Illegal character at offset " + t);
827
+ i |= a, ++o >= 2 ? (s[s.length] = i, i = 0, o = 0) : i <<= 4;
828
+ }
829
+ }
830
+ if (o)
831
+ throw new Error("Hex encoding incomplete: 4 bits missing");
832
+ return s;
833
+ }
834
+ }, G, lt = {
835
+ decode: function(r) {
836
+ var t;
837
+ if (G === void 0) {
838
+ var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = `= \f
839
+ \r  \u2028\u2029`;
840
+ for (G = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
841
+ G[e.charAt(t)] = t;
842
+ for (G["-"] = 62, G._ = 63, t = 0; t < n.length; ++t)
843
+ G[n.charAt(t)] = -1;
844
+ }
845
+ var s = [], i = 0, o = 0;
846
+ for (t = 0; t < r.length; ++t) {
847
+ var a = r.charAt(t);
848
+ if (a == "=")
849
+ break;
850
+ if (a = G[a], a != -1) {
851
+ if (a === void 0)
852
+ throw new Error("Illegal character at offset " + t);
853
+ i |= a, ++o >= 4 ? (s[s.length] = i >> 16, s[s.length] = i >> 8 & 255, s[s.length] = i & 255, i = 0, o = 0) : i <<= 6;
854
+ }
855
+ }
856
+ switch (o) {
857
+ case 1:
858
+ throw new Error("Base64 encoding incomplete: at least 2 bits missing");
859
+ case 2:
860
+ s[s.length] = i >> 10;
861
+ break;
862
+ case 3:
863
+ s[s.length] = i >> 16, s[s.length] = i >> 8 & 255;
864
+ break;
865
+ }
866
+ return s;
867
+ },
868
+ re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
869
+ unarmor: function(r) {
870
+ var t = lt.re.exec(r);
871
+ if (t)
872
+ if (t[1])
873
+ r = t[1];
874
+ else if (t[2])
875
+ r = t[2];
876
+ else
877
+ throw new Error("RegExp out of sync");
878
+ return lt.decode(r);
879
+ }
880
+ }, K = 1e13, Y = (
881
+ /** @class */
882
+ function() {
883
+ function r(t) {
884
+ this.buf = [+t || 0];
885
+ }
886
+ return r.prototype.mulAdd = function(t, e) {
887
+ var n = this.buf, s = n.length, i, o;
888
+ for (i = 0; i < s; ++i)
889
+ o = n[i] * t + e, o < K ? e = 0 : (e = 0 | o / K, o -= e * K), n[i] = o;
890
+ e > 0 && (n[i] = e);
891
+ }, r.prototype.sub = function(t) {
892
+ var e = this.buf, n = e.length, s, i;
893
+ for (s = 0; s < n; ++s)
894
+ i = e[s] - t, i < 0 ? (i += K, t = 1) : t = 0, e[s] = i;
895
+ for (; e[e.length - 1] === 0; )
896
+ e.pop();
897
+ }, r.prototype.toString = function(t) {
898
+ if ((t || 10) != 10)
899
+ throw new Error("only base 10 is supported");
900
+ for (var e = this.buf, n = e[e.length - 1].toString(), s = e.length - 2; s >= 0; --s)
901
+ n += (K + e[s]).toString().substring(1);
902
+ return n;
903
+ }, r.prototype.valueOf = function() {
904
+ for (var t = this.buf, e = 0, n = t.length - 1; n >= 0; --n)
905
+ e = e * K + t[n];
906
+ return e;
907
+ }, r.prototype.simplify = function() {
908
+ var t = this.buf;
909
+ return t.length == 1 ? t[0] : this;
910
+ }, r;
911
+ }()
912
+ ), zt = "…", Te = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, Ee = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
913
+ function J(r, t) {
914
+ return r.length > t && (r = r.substring(0, t) + zt), r;
915
+ }
916
+ var ut = (
917
+ /** @class */
918
+ function() {
919
+ function r(t, e) {
920
+ this.hexDigits = "0123456789ABCDEF", t instanceof r ? (this.enc = t.enc, this.pos = t.pos) : (this.enc = t, this.pos = e);
921
+ }
922
+ return r.prototype.get = function(t) {
923
+ if (t === void 0 && (t = this.pos++), t >= this.enc.length)
924
+ throw new Error("Requesting byte offset ".concat(t, " on a stream of length ").concat(this.enc.length));
925
+ return typeof this.enc == "string" ? this.enc.charCodeAt(t) : this.enc[t];
926
+ }, r.prototype.hexByte = function(t) {
927
+ return this.hexDigits.charAt(t >> 4 & 15) + this.hexDigits.charAt(t & 15);
928
+ }, r.prototype.hexDump = function(t, e, n) {
929
+ for (var s = "", i = t; i < e; ++i)
930
+ if (s += this.hexByte(this.get(i)), n !== !0)
931
+ switch (i & 15) {
932
+ case 7:
933
+ s += " ";
934
+ break;
935
+ case 15:
936
+ s += `
937
+ `;
938
+ break;
939
+ default:
940
+ s += " ";
941
+ }
942
+ return s;
943
+ }, r.prototype.isASCII = function(t, e) {
944
+ for (var n = t; n < e; ++n) {
945
+ var s = this.get(n);
946
+ if (s < 32 || s > 176)
947
+ return !1;
948
+ }
949
+ return !0;
950
+ }, r.prototype.parseStringISO = function(t, e) {
951
+ for (var n = "", s = t; s < e; ++s)
952
+ n += String.fromCharCode(this.get(s));
953
+ return n;
954
+ }, r.prototype.parseStringUTF = function(t, e) {
955
+ for (var n = "", s = t; s < e; ) {
956
+ var i = this.get(s++);
957
+ i < 128 ? n += String.fromCharCode(i) : i > 191 && i < 224 ? n += String.fromCharCode((i & 31) << 6 | this.get(s++) & 63) : n += String.fromCharCode((i & 15) << 12 | (this.get(s++) & 63) << 6 | this.get(s++) & 63);
958
+ }
959
+ return n;
960
+ }, r.prototype.parseStringBMP = function(t, e) {
961
+ for (var n = "", s, i, o = t; o < e; )
962
+ s = this.get(o++), i = this.get(o++), n += String.fromCharCode(s << 8 | i);
963
+ return n;
964
+ }, r.prototype.parseTime = function(t, e, n) {
965
+ var s = this.parseStringISO(t, e), i = (n ? Te : Ee).exec(s);
966
+ return i ? (n && (i[1] = +i[1], i[1] += +i[1] < 70 ? 2e3 : 1900), s = i[1] + "-" + i[2] + "-" + i[3] + " " + i[4], i[5] && (s += ":" + i[5], i[6] && (s += ":" + i[6], i[7] && (s += "." + i[7]))), i[8] && (s += " UTC", i[8] != "Z" && (s += i[8], i[9] && (s += ":" + i[9]))), s) : "Unrecognized time: " + s;
967
+ }, r.prototype.parseInteger = function(t, e) {
968
+ for (var n = this.get(t), s = n > 127, i = s ? 255 : 0, o, a = ""; n == i && ++t < e; )
969
+ n = this.get(t);
970
+ if (o = e - t, o === 0)
971
+ return s ? -1 : 0;
972
+ if (o > 4) {
973
+ for (a = n, o <<= 3; !((+a ^ i) & 128); )
974
+ a = +a << 1, --o;
975
+ a = "(" + o + ` bit)
976
+ `;
977
+ }
978
+ s && (n = n - 256);
979
+ for (var u = new Y(n), h = t + 1; h < e; ++h)
980
+ u.mulAdd(256, this.get(h));
981
+ return a + u.toString();
982
+ }, r.prototype.parseBitString = function(t, e, n) {
983
+ for (var s = this.get(t), i = (e - t - 1 << 3) - s, o = "(" + i + ` bit)
984
+ `, a = "", u = t + 1; u < e; ++u) {
985
+ for (var h = this.get(u), l = u == e - 1 ? s : 0, c = 7; c >= l; --c)
986
+ a += h >> c & 1 ? "1" : "0";
987
+ if (a.length > n)
988
+ return o + J(a, n);
989
+ }
990
+ return o + a;
991
+ }, r.prototype.parseOctetString = function(t, e, n) {
992
+ if (this.isASCII(t, e))
993
+ return J(this.parseStringISO(t, e), n);
994
+ var s = e - t, i = "(" + s + ` byte)
995
+ `;
996
+ n /= 2, s > n && (e = t + n);
997
+ for (var o = t; o < e; ++o)
998
+ i += this.hexByte(this.get(o));
999
+ return s > n && (i += zt), i;
1000
+ }, r.prototype.parseOID = function(t, e, n) {
1001
+ for (var s = "", i = new Y(), o = 0, a = t; a < e; ++a) {
1002
+ var u = this.get(a);
1003
+ if (i.mulAdd(128, u & 127), o += 7, !(u & 128)) {
1004
+ if (s === "")
1005
+ if (i = i.simplify(), i instanceof Y)
1006
+ i.sub(80), s = "2." + i.toString();
1007
+ else {
1008
+ var h = i < 80 ? i < 40 ? 0 : 1 : 2;
1009
+ s = h + "." + (i - h * 40);
1010
+ }
1011
+ else
1012
+ s += "." + i.toString();
1013
+ if (s.length > n)
1014
+ return J(s, n);
1015
+ i = new Y(), o = 0;
1016
+ }
1017
+ }
1018
+ return o > 0 && (s += ".incomplete"), s;
1019
+ }, r;
1020
+ }()
1021
+ ), De = (
1022
+ /** @class */
1023
+ function() {
1024
+ function r(t, e, n, s, i) {
1025
+ if (!(s instanceof wt))
1026
+ throw new Error("Invalid tag value.");
1027
+ this.stream = t, this.header = e, this.length = n, this.tag = s, this.sub = i;
1028
+ }
1029
+ return r.prototype.typeName = function() {
1030
+ switch (this.tag.tagClass) {
1031
+ case 0:
1032
+ switch (this.tag.tagNumber) {
1033
+ case 0:
1034
+ return "EOC";
1035
+ case 1:
1036
+ return "BOOLEAN";
1037
+ case 2:
1038
+ return "INTEGER";
1039
+ case 3:
1040
+ return "BIT_STRING";
1041
+ case 4:
1042
+ return "OCTET_STRING";
1043
+ case 5:
1044
+ return "NULL";
1045
+ case 6:
1046
+ return "OBJECT_IDENTIFIER";
1047
+ case 7:
1048
+ return "ObjectDescriptor";
1049
+ case 8:
1050
+ return "EXTERNAL";
1051
+ case 9:
1052
+ return "REAL";
1053
+ case 10:
1054
+ return "ENUMERATED";
1055
+ case 11:
1056
+ return "EMBEDDED_PDV";
1057
+ case 12:
1058
+ return "UTF8String";
1059
+ case 16:
1060
+ return "SEQUENCE";
1061
+ case 17:
1062
+ return "SET";
1063
+ case 18:
1064
+ return "NumericString";
1065
+ case 19:
1066
+ return "PrintableString";
1067
+ case 20:
1068
+ return "TeletexString";
1069
+ case 21:
1070
+ return "VideotexString";
1071
+ case 22:
1072
+ return "IA5String";
1073
+ case 23:
1074
+ return "UTCTime";
1075
+ case 24:
1076
+ return "GeneralizedTime";
1077
+ case 25:
1078
+ return "GraphicString";
1079
+ case 26:
1080
+ return "VisibleString";
1081
+ case 27:
1082
+ return "GeneralString";
1083
+ case 28:
1084
+ return "UniversalString";
1085
+ case 30:
1086
+ return "BMPString";
1087
+ }
1088
+ return "Universal_" + this.tag.tagNumber.toString();
1089
+ case 1:
1090
+ return "Application_" + this.tag.tagNumber.toString();
1091
+ case 2:
1092
+ return "[" + this.tag.tagNumber.toString() + "]";
1093
+ case 3:
1094
+ return "Private_" + this.tag.tagNumber.toString();
1095
+ }
1096
+ }, r.prototype.content = function(t) {
1097
+ if (this.tag === void 0)
1098
+ return null;
1099
+ t === void 0 && (t = 1 / 0);
1100
+ var e = this.posContent(), n = Math.abs(this.length);
1101
+ if (!this.tag.isUniversal())
1102
+ return this.sub !== null ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e, e + n, t);
1103
+ switch (this.tag.tagNumber) {
1104
+ case 1:
1105
+ return this.stream.get(e) === 0 ? "false" : "true";
1106
+ case 2:
1107
+ return this.stream.parseInteger(e, e + n);
1108
+ case 3:
1109
+ return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(e, e + n, t);
1110
+ case 4:
1111
+ return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(e, e + n, t);
1112
+ case 6:
1113
+ return this.stream.parseOID(e, e + n, t);
1114
+ case 16:
1115
+ case 17:
1116
+ return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
1117
+ case 12:
1118
+ return J(this.stream.parseStringUTF(e, e + n), t);
1119
+ case 18:
1120
+ case 19:
1121
+ case 20:
1122
+ case 21:
1123
+ case 22:
1124
+ case 26:
1125
+ return J(this.stream.parseStringISO(e, e + n), t);
1126
+ case 30:
1127
+ return J(this.stream.parseStringBMP(e, e + n), t);
1128
+ case 23:
1129
+ case 24:
1130
+ return this.stream.parseTime(e, e + n, this.tag.tagNumber == 23);
1131
+ }
1132
+ return null;
1133
+ }, r.prototype.toString = function() {
1134
+ return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (this.sub === null ? "null" : this.sub.length) + "]";
1135
+ }, r.prototype.toPrettyString = function(t) {
1136
+ t === void 0 && (t = "");
1137
+ var e = t + this.typeName() + " @" + this.stream.pos;
1138
+ if (this.length >= 0 && (e += "+"), e += this.length, this.tag.tagConstructed ? e += " (constructed)" : this.tag.isUniversal() && (this.tag.tagNumber == 3 || this.tag.tagNumber == 4) && this.sub !== null && (e += " (encapsulates)"), e += `
1139
+ `, this.sub !== null) {
1140
+ t += " ";
1141
+ for (var n = 0, s = this.sub.length; n < s; ++n)
1142
+ e += this.sub[n].toPrettyString(t);
1143
+ }
1144
+ return e;
1145
+ }, r.prototype.posStart = function() {
1146
+ return this.stream.pos;
1147
+ }, r.prototype.posContent = function() {
1148
+ return this.stream.pos + this.header;
1149
+ }, r.prototype.posEnd = function() {
1150
+ return this.stream.pos + this.header + Math.abs(this.length);
1151
+ }, r.prototype.toHexString = function() {
1152
+ return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
1153
+ }, r.decodeLength = function(t) {
1154
+ var e = t.get(), n = e & 127;
1155
+ if (n == e)
1156
+ return n;
1157
+ if (n > 6)
1158
+ throw new Error("Length over 48 bits not supported at position " + (t.pos - 1));
1159
+ if (n === 0)
1160
+ return null;
1161
+ e = 0;
1162
+ for (var s = 0; s < n; ++s)
1163
+ e = e * 256 + t.get();
1164
+ return e;
1165
+ }, r.prototype.getHexStringValue = function() {
1166
+ var t = this.toHexString(), e = this.header * 2, n = this.length * 2;
1167
+ return t.substr(e, n);
1168
+ }, r.decode = function(t) {
1169
+ var e;
1170
+ t instanceof ut ? e = t : e = new ut(t, 0);
1171
+ var n = new ut(e), s = new wt(e), i = r.decodeLength(e), o = e.pos, a = o - n.pos, u = null, h = function() {
1172
+ var c = [];
1173
+ if (i !== null) {
1174
+ for (var v = o + i; e.pos < v; )
1175
+ c[c.length] = r.decode(e);
1176
+ if (e.pos != v)
1177
+ throw new Error("Content size is not correct for container starting at offset " + o);
1178
+ } else
1179
+ try {
1180
+ for (; ; ) {
1181
+ var y = r.decode(e);
1182
+ if (y.tag.isEOC())
1183
+ break;
1184
+ c[c.length] = y;
1185
+ }
1186
+ i = o - e.pos;
1187
+ } catch (S) {
1188
+ throw new Error("Exception while decoding undefined length content: " + S);
1189
+ }
1190
+ return c;
1191
+ };
1192
+ if (s.tagConstructed)
1193
+ u = h();
1194
+ else if (s.isUniversal() && (s.tagNumber == 3 || s.tagNumber == 4))
1195
+ try {
1196
+ if (s.tagNumber == 3 && e.get() != 0)
1197
+ throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
1198
+ u = h();
1199
+ for (var l = 0; l < u.length; ++l)
1200
+ if (u[l].tag.isEOC())
1201
+ throw new Error("EOC is not supposed to be actual content.");
1202
+ } catch {
1203
+ u = null;
1204
+ }
1205
+ if (u === null) {
1206
+ if (i === null)
1207
+ throw new Error("We can't skip over an invalid tag with undefined length at offset " + o);
1208
+ e.pos = o + Math.abs(i);
1209
+ }
1210
+ return new r(n, a, i, s, u);
1211
+ }, r;
1212
+ }()
1213
+ ), wt = (
1214
+ /** @class */
1215
+ function() {
1216
+ function r(t) {
1217
+ var e = t.get();
1218
+ if (this.tagClass = e >> 6, this.tagConstructed = (e & 32) !== 0, this.tagNumber = e & 31, this.tagNumber == 31) {
1219
+ var n = new Y();
1220
+ do
1221
+ e = t.get(), n.mulAdd(128, e & 127);
1222
+ while (e & 128);
1223
+ this.tagNumber = n.simplify();
1224
+ }
1225
+ }
1226
+ return r.prototype.isUniversal = function() {
1227
+ return this.tagClass === 0;
1228
+ }, r.prototype.isEOC = function() {
1229
+ return this.tagClass === 0 && this.tagNumber === 0;
1230
+ }, r;
1231
+ }()
1232
+ ), j, we = 244837814094590, _t = (we & 16777215) == 15715070, _ = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], _e = (1 << 26) / _[_.length - 1], g = (
1233
+ /** @class */
1234
+ function() {
1235
+ function r(t, e, n) {
1236
+ t != null && (typeof t == "number" ? this.fromNumber(t, e, n) : e == null && typeof t != "string" ? this.fromString(t, 256) : this.fromString(t, e));
1237
+ }
1238
+ return r.prototype.toString = function(t) {
1239
+ if (this.s < 0)
1240
+ return "-" + this.negate().toString(t);
1241
+ var e;
1242
+ if (t == 16)
1243
+ e = 4;
1244
+ else if (t == 8)
1245
+ e = 3;
1246
+ else if (t == 2)
1247
+ e = 1;
1248
+ else if (t == 32)
1249
+ e = 5;
1250
+ else if (t == 4)
1251
+ e = 2;
1252
+ else
1253
+ return this.toRadix(t);
1254
+ var n = (1 << e) - 1, s, i = !1, o = "", a = this.t, u = this.DB - a * this.DB % e;
1255
+ if (a-- > 0)
1256
+ for (u < this.DB && (s = this[a] >> u) > 0 && (i = !0, o = M(s)); a >= 0; )
1257
+ u < e ? (s = (this[a] & (1 << u) - 1) << e - u, s |= this[--a] >> (u += this.DB - e)) : (s = this[a] >> (u -= e) & n, u <= 0 && (u += this.DB, --a)), s > 0 && (i = !0), i && (o += M(s));
1258
+ return i ? o : "0";
1259
+ }, r.prototype.negate = function() {
1260
+ var t = d();
1261
+ return r.ZERO.subTo(this, t), t;
1262
+ }, r.prototype.abs = function() {
1263
+ return this.s < 0 ? this.negate() : this;
1264
+ }, r.prototype.compareTo = function(t) {
1265
+ var e = this.s - t.s;
1266
+ if (e != 0)
1267
+ return e;
1268
+ var n = this.t;
1269
+ if (e = n - t.t, e != 0)
1270
+ return this.s < 0 ? -e : e;
1271
+ for (; --n >= 0; )
1272
+ if ((e = this[n] - t[n]) != 0)
1273
+ return e;
1274
+ return 0;
1275
+ }, r.prototype.bitLength = function() {
1276
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + W(this[this.t - 1] ^ this.s & this.DM);
1277
+ }, r.prototype.mod = function(t) {
1278
+ var e = d();
1279
+ return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(r.ZERO) > 0 && t.subTo(e, e), e;
1280
+ }, r.prototype.modPowInt = function(t, e) {
1281
+ var n;
1282
+ return t < 256 || e.isEven() ? n = new Rt(e) : n = new xt(e), this.exp(t, n);
1283
+ }, r.prototype.clone = function() {
1284
+ var t = d();
1285
+ return this.copyTo(t), t;
1286
+ }, r.prototype.intValue = function() {
1287
+ if (this.s < 0) {
1288
+ if (this.t == 1)
1289
+ return this[0] - this.DV;
1290
+ if (this.t == 0)
1291
+ return -1;
1292
+ } else {
1293
+ if (this.t == 1)
1294
+ return this[0];
1295
+ if (this.t == 0)
1296
+ return 0;
1297
+ }
1298
+ return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
1299
+ }, r.prototype.byteValue = function() {
1300
+ return this.t == 0 ? this.s : this[0] << 24 >> 24;
1301
+ }, r.prototype.shortValue = function() {
1302
+ return this.t == 0 ? this.s : this[0] << 16 >> 16;
1303
+ }, r.prototype.signum = function() {
1304
+ return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
1305
+ }, r.prototype.toByteArray = function() {
1306
+ var t = this.t, e = [];
1307
+ e[0] = this.s;
1308
+ var n = this.DB - t * this.DB % 8, s, i = 0;
1309
+ if (t-- > 0)
1310
+ for (n < this.DB && (s = this[t] >> n) != (this.s & this.DM) >> n && (e[i++] = s | this.s << this.DB - n); t >= 0; )
1311
+ n < 8 ? (s = (this[t] & (1 << n) - 1) << 8 - n, s |= this[--t] >> (n += this.DB - 8)) : (s = this[t] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --t)), s & 128 && (s |= -256), i == 0 && (this.s & 128) != (s & 128) && ++i, (i > 0 || s != this.s) && (e[i++] = s);
1312
+ return e;
1313
+ }, r.prototype.equals = function(t) {
1314
+ return this.compareTo(t) == 0;
1315
+ }, r.prototype.min = function(t) {
1316
+ return this.compareTo(t) < 0 ? this : t;
1317
+ }, r.prototype.max = function(t) {
1318
+ return this.compareTo(t) > 0 ? this : t;
1319
+ }, r.prototype.and = function(t) {
1320
+ var e = d();
1321
+ return this.bitwiseTo(t, ye, e), e;
1322
+ }, r.prototype.or = function(t) {
1323
+ var e = d();
1324
+ return this.bitwiseTo(t, Q, e), e;
1325
+ }, r.prototype.xor = function(t) {
1326
+ var e = d();
1327
+ return this.bitwiseTo(t, Tt, e), e;
1328
+ }, r.prototype.andNot = function(t) {
1329
+ var e = d();
1330
+ return this.bitwiseTo(t, Et, e), e;
1331
+ }, r.prototype.not = function() {
1332
+ for (var t = d(), e = 0; e < this.t; ++e)
1333
+ t[e] = this.DM & ~this[e];
1334
+ return t.t = this.t, t.s = ~this.s, t;
1335
+ }, r.prototype.shiftLeft = function(t) {
1336
+ var e = d();
1337
+ return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
1338
+ }, r.prototype.shiftRight = function(t) {
1339
+ var e = d();
1340
+ return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
1341
+ }, r.prototype.getLowestSetBit = function() {
1342
+ for (var t = 0; t < this.t; ++t)
1343
+ if (this[t] != 0)
1344
+ return t * this.DB + me(this[t]);
1345
+ return this.s < 0 ? this.t * this.DB : -1;
1346
+ }, r.prototype.bitCount = function() {
1347
+ for (var t = 0, e = this.s & this.DM, n = 0; n < this.t; ++n)
1348
+ t += Se(this[n] ^ e);
1349
+ return t;
1350
+ }, r.prototype.testBit = function(t) {
1351
+ var e = Math.floor(t / this.DB);
1352
+ return e >= this.t ? this.s != 0 : (this[e] & 1 << t % this.DB) != 0;
1353
+ }, r.prototype.setBit = function(t) {
1354
+ return this.changeBit(t, Q);
1355
+ }, r.prototype.clearBit = function(t) {
1356
+ return this.changeBit(t, Et);
1357
+ }, r.prototype.flipBit = function(t) {
1358
+ return this.changeBit(t, Tt);
1359
+ }, r.prototype.add = function(t) {
1360
+ var e = d();
1361
+ return this.addTo(t, e), e;
1362
+ }, r.prototype.subtract = function(t) {
1363
+ var e = d();
1364
+ return this.subTo(t, e), e;
1365
+ }, r.prototype.multiply = function(t) {
1366
+ var e = d();
1367
+ return this.multiplyTo(t, e), e;
1368
+ }, r.prototype.divide = function(t) {
1369
+ var e = d();
1370
+ return this.divRemTo(t, e, null), e;
1371
+ }, r.prototype.remainder = function(t) {
1372
+ var e = d();
1373
+ return this.divRemTo(t, null, e), e;
1374
+ }, r.prototype.divideAndRemainder = function(t) {
1375
+ var e = d(), n = d();
1376
+ return this.divRemTo(t, e, n), [e, n];
1377
+ }, r.prototype.modPow = function(t, e) {
1378
+ var n = t.bitLength(), s, i = k(1), o;
1379
+ if (n <= 0)
1380
+ return i;
1381
+ n < 18 ? s = 1 : n < 48 ? s = 3 : n < 144 ? s = 4 : n < 768 ? s = 5 : s = 6, n < 8 ? o = new Rt(e) : e.isEven() ? o = new xe(e) : o = new xt(e);
1382
+ var a = [], u = 3, h = s - 1, l = (1 << s) - 1;
1383
+ if (a[1] = o.convert(this), s > 1) {
1384
+ var c = d();
1385
+ for (o.sqrTo(a[1], c); u <= l; )
1386
+ a[u] = d(), o.mulTo(c, a[u - 2], a[u]), u += 2;
1387
+ }
1388
+ var v = t.t - 1, y, S = !0, b = d(), D;
1389
+ for (n = W(t[v]) - 1; v >= 0; ) {
1390
+ for (n >= h ? y = t[v] >> n - h & l : (y = (t[v] & (1 << n + 1) - 1) << h - n, v > 0 && (y |= t[v - 1] >> this.DB + n - h)), u = s; !(y & 1); )
1391
+ y >>= 1, --u;
1392
+ if ((n -= u) < 0 && (n += this.DB, --v), S)
1393
+ a[y].copyTo(i), S = !1;
1394
+ else {
1395
+ for (; u > 1; )
1396
+ o.sqrTo(i, b), o.sqrTo(b, i), u -= 2;
1397
+ u > 0 ? o.sqrTo(i, b) : (D = i, i = b, b = D), o.mulTo(b, a[y], i);
1398
+ }
1399
+ for (; v >= 0 && !(t[v] & 1 << n); )
1400
+ o.sqrTo(i, b), D = i, i = b, b = D, --n < 0 && (n = this.DB - 1, --v);
1401
+ }
1402
+ return o.revert(i);
1403
+ }, r.prototype.modInverse = function(t) {
1404
+ var e = t.isEven();
1405
+ if (this.isEven() && e || t.signum() == 0)
1406
+ return r.ZERO;
1407
+ for (var n = t.clone(), s = this.clone(), i = k(1), o = k(0), a = k(0), u = k(1); n.signum() != 0; ) {
1408
+ for (; n.isEven(); )
1409
+ n.rShiftTo(1, n), e ? ((!i.isEven() || !o.isEven()) && (i.addTo(this, i), o.subTo(t, o)), i.rShiftTo(1, i)) : o.isEven() || o.subTo(t, o), o.rShiftTo(1, o);
1410
+ for (; s.isEven(); )
1411
+ s.rShiftTo(1, s), e ? ((!a.isEven() || !u.isEven()) && (a.addTo(this, a), u.subTo(t, u)), a.rShiftTo(1, a)) : u.isEven() || u.subTo(t, u), u.rShiftTo(1, u);
1412
+ n.compareTo(s) >= 0 ? (n.subTo(s, n), e && i.subTo(a, i), o.subTo(u, o)) : (s.subTo(n, s), e && a.subTo(i, a), u.subTo(o, u));
1413
+ }
1414
+ if (s.compareTo(r.ONE) != 0)
1415
+ return r.ZERO;
1416
+ if (u.compareTo(t) >= 0)
1417
+ return u.subtract(t);
1418
+ if (u.signum() < 0)
1419
+ u.addTo(t, u);
1420
+ else
1421
+ return u;
1422
+ return u.signum() < 0 ? u.add(t) : u;
1423
+ }, r.prototype.pow = function(t) {
1424
+ return this.exp(t, new Re());
1425
+ }, r.prototype.gcd = function(t) {
1426
+ var e = this.s < 0 ? this.negate() : this.clone(), n = t.s < 0 ? t.negate() : t.clone();
1427
+ if (e.compareTo(n) < 0) {
1428
+ var s = e;
1429
+ e = n, n = s;
1430
+ }
1431
+ var i = e.getLowestSetBit(), o = n.getLowestSetBit();
1432
+ if (o < 0)
1433
+ return e;
1434
+ for (i < o && (o = i), o > 0 && (e.rShiftTo(o, e), n.rShiftTo(o, n)); e.signum() > 0; )
1435
+ (i = e.getLowestSetBit()) > 0 && e.rShiftTo(i, e), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), e.compareTo(n) >= 0 ? (e.subTo(n, e), e.rShiftTo(1, e)) : (n.subTo(e, n), n.rShiftTo(1, n));
1436
+ return o > 0 && n.lShiftTo(o, n), n;
1437
+ }, r.prototype.isProbablePrime = function(t) {
1438
+ var e, n = this.abs();
1439
+ if (n.t == 1 && n[0] <= _[_.length - 1]) {
1440
+ for (e = 0; e < _.length; ++e)
1441
+ if (n[0] == _[e])
1442
+ return !0;
1443
+ return !1;
1444
+ }
1445
+ if (n.isEven())
1446
+ return !1;
1447
+ for (e = 1; e < _.length; ) {
1448
+ for (var s = _[e], i = e + 1; i < _.length && s < _e; )
1449
+ s *= _[i++];
1450
+ for (s = n.modInt(s); e < i; )
1451
+ if (s % _[e++] == 0)
1452
+ return !1;
1453
+ }
1454
+ return n.millerRabin(t);
1455
+ }, r.prototype.copyTo = function(t) {
1456
+ for (var e = this.t - 1; e >= 0; --e)
1457
+ t[e] = this[e];
1458
+ t.t = this.t, t.s = this.s;
1459
+ }, r.prototype.fromInt = function(t) {
1460
+ this.t = 1, this.s = t < 0 ? -1 : 0, t > 0 ? this[0] = t : t < -1 ? this[0] = t + this.DV : this.t = 0;
1461
+ }, r.prototype.fromString = function(t, e) {
1462
+ var n;
1463
+ if (e == 16)
1464
+ n = 4;
1465
+ else if (e == 8)
1466
+ n = 3;
1467
+ else if (e == 256)
1468
+ n = 8;
1469
+ else if (e == 2)
1470
+ n = 1;
1471
+ else if (e == 32)
1472
+ n = 5;
1473
+ else if (e == 4)
1474
+ n = 2;
1475
+ else {
1476
+ this.fromRadix(t, e);
1477
+ return;
1478
+ }
1479
+ this.t = 0, this.s = 0;
1480
+ for (var s = t.length, i = !1, o = 0; --s >= 0; ) {
1481
+ var a = n == 8 ? +t[s] & 255 : At(t, s);
1482
+ if (a < 0) {
1483
+ t.charAt(s) == "-" && (i = !0);
1484
+ continue;
1485
+ }
1486
+ i = !1, o == 0 ? this[this.t++] = a : o + n > this.DB ? (this[this.t - 1] |= (a & (1 << this.DB - o) - 1) << o, this[this.t++] = a >> this.DB - o) : this[this.t - 1] |= a << o, o += n, o >= this.DB && (o -= this.DB);
1487
+ }
1488
+ n == 8 && +t[0] & 128 && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), i && r.ZERO.subTo(this, this);
1489
+ }, r.prototype.clamp = function() {
1490
+ for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t; )
1491
+ --this.t;
1492
+ }, r.prototype.dlShiftTo = function(t, e) {
1493
+ var n;
1494
+ for (n = this.t - 1; n >= 0; --n)
1495
+ e[n + t] = this[n];
1496
+ for (n = t - 1; n >= 0; --n)
1497
+ e[n] = 0;
1498
+ e.t = this.t + t, e.s = this.s;
1499
+ }, r.prototype.drShiftTo = function(t, e) {
1500
+ for (var n = t; n < this.t; ++n)
1501
+ e[n - t] = this[n];
1502
+ e.t = Math.max(this.t - t, 0), e.s = this.s;
1503
+ }, r.prototype.lShiftTo = function(t, e) {
1504
+ for (var n = t % this.DB, s = this.DB - n, i = (1 << s) - 1, o = Math.floor(t / this.DB), a = this.s << n & this.DM, u = this.t - 1; u >= 0; --u)
1505
+ e[u + o + 1] = this[u] >> s | a, a = (this[u] & i) << n;
1506
+ for (var u = o - 1; u >= 0; --u)
1507
+ e[u] = 0;
1508
+ e[o] = a, e.t = this.t + o + 1, e.s = this.s, e.clamp();
1509
+ }, r.prototype.rShiftTo = function(t, e) {
1510
+ e.s = this.s;
1511
+ var n = Math.floor(t / this.DB);
1512
+ if (n >= this.t) {
1513
+ e.t = 0;
1514
+ return;
1515
+ }
1516
+ var s = t % this.DB, i = this.DB - s, o = (1 << s) - 1;
1517
+ e[0] = this[n] >> s;
1518
+ for (var a = n + 1; a < this.t; ++a)
1519
+ e[a - n - 1] |= (this[a] & o) << i, e[a - n] = this[a] >> s;
1520
+ s > 0 && (e[this.t - n - 1] |= (this.s & o) << i), e.t = this.t - n, e.clamp();
1521
+ }, r.prototype.subTo = function(t, e) {
1522
+ for (var n = 0, s = 0, i = Math.min(t.t, this.t); n < i; )
1523
+ s += this[n] - t[n], e[n++] = s & this.DM, s >>= this.DB;
1524
+ if (t.t < this.t) {
1525
+ for (s -= t.s; n < this.t; )
1526
+ s += this[n], e[n++] = s & this.DM, s >>= this.DB;
1527
+ s += this.s;
1528
+ } else {
1529
+ for (s += this.s; n < t.t; )
1530
+ s -= t[n], e[n++] = s & this.DM, s >>= this.DB;
1531
+ s -= t.s;
1532
+ }
1533
+ e.s = s < 0 ? -1 : 0, s < -1 ? e[n++] = this.DV + s : s > 0 && (e[n++] = s), e.t = n, e.clamp();
1534
+ }, r.prototype.multiplyTo = function(t, e) {
1535
+ var n = this.abs(), s = t.abs(), i = n.t;
1536
+ for (e.t = i + s.t; --i >= 0; )
1537
+ e[i] = 0;
1538
+ for (i = 0; i < s.t; ++i)
1539
+ e[i + n.t] = n.am(0, s[i], e, i, 0, n.t);
1540
+ e.s = 0, e.clamp(), this.s != t.s && r.ZERO.subTo(e, e);
1541
+ }, r.prototype.squareTo = function(t) {
1542
+ for (var e = this.abs(), n = t.t = 2 * e.t; --n >= 0; )
1543
+ t[n] = 0;
1544
+ for (n = 0; n < e.t - 1; ++n) {
1545
+ var s = e.am(n, e[n], t, 2 * n, 0, 1);
1546
+ (t[n + e.t] += e.am(n + 1, 2 * e[n], t, 2 * n + 1, s, e.t - n - 1)) >= e.DV && (t[n + e.t] -= e.DV, t[n + e.t + 1] = 1);
1547
+ }
1548
+ t.t > 0 && (t[t.t - 1] += e.am(n, e[n], t, 2 * n, 0, 1)), t.s = 0, t.clamp();
1549
+ }, r.prototype.divRemTo = function(t, e, n) {
1550
+ var s = t.abs();
1551
+ if (!(s.t <= 0)) {
1552
+ var i = this.abs();
1553
+ if (i.t < s.t) {
1554
+ e != null && e.fromInt(0), n != null && this.copyTo(n);
1555
+ return;
1556
+ }
1557
+ n == null && (n = d());
1558
+ var o = d(), a = this.s, u = t.s, h = this.DB - W(s[s.t - 1]);
1559
+ h > 0 ? (s.lShiftTo(h, o), i.lShiftTo(h, n)) : (s.copyTo(o), i.copyTo(n));
1560
+ var l = o.t, c = o[l - 1];
1561
+ if (c != 0) {
1562
+ var v = c * (1 << this.F1) + (l > 1 ? o[l - 2] >> this.F2 : 0), y = this.FV / v, S = (1 << this.F1) / v, b = 1 << this.F2, D = n.t, x = D - l, O = e ?? d();
1563
+ for (o.dlShiftTo(x, O), n.compareTo(O) >= 0 && (n[n.t++] = 1, n.subTo(O, n)), r.ONE.dlShiftTo(l, O), O.subTo(o, o); o.t < l; )
1564
+ o[o.t++] = 0;
1565
+ for (; --x >= 0; ) {
1566
+ var w = n[--D] == c ? this.DM : Math.floor(n[D] * y + (n[D - 1] + b) * S);
1567
+ if ((n[D] += o.am(0, w, n, x, 0, l)) < w)
1568
+ for (o.dlShiftTo(x, O), n.subTo(O, n); n[D] < --w; )
1569
+ n.subTo(O, n);
1570
+ }
1571
+ e != null && (n.drShiftTo(l, e), a != u && r.ZERO.subTo(e, e)), n.t = l, n.clamp(), h > 0 && n.rShiftTo(h, n), a < 0 && r.ZERO.subTo(n, n);
1572
+ }
1573
+ }
1574
+ }, r.prototype.invDigit = function() {
1575
+ if (this.t < 1)
1576
+ return 0;
1577
+ var t = this[0];
1578
+ if (!(t & 1))
1579
+ return 0;
1580
+ var e = t & 3;
1581
+ return e = e * (2 - (t & 15) * e) & 15, e = e * (2 - (t & 255) * e) & 255, e = e * (2 - ((t & 65535) * e & 65535)) & 65535, e = e * (2 - t * e % this.DV) % this.DV, e > 0 ? this.DV - e : -e;
1582
+ }, r.prototype.isEven = function() {
1583
+ return (this.t > 0 ? this[0] & 1 : this.s) == 0;
1584
+ }, r.prototype.exp = function(t, e) {
1585
+ if (t > 4294967295 || t < 1)
1586
+ return r.ONE;
1587
+ var n = d(), s = d(), i = e.convert(this), o = W(t) - 1;
1588
+ for (i.copyTo(n); --o >= 0; )
1589
+ if (e.sqrTo(n, s), (t & 1 << o) > 0)
1590
+ e.mulTo(s, i, n);
1591
+ else {
1592
+ var a = n;
1593
+ n = s, s = a;
1594
+ }
1595
+ return e.revert(n);
1596
+ }, r.prototype.chunkSize = function(t) {
1597
+ return Math.floor(Math.LN2 * this.DB / Math.log(t));
1598
+ }, r.prototype.toRadix = function(t) {
1599
+ if (t == null && (t = 10), this.signum() == 0 || t < 2 || t > 36)
1600
+ return "0";
1601
+ var e = this.chunkSize(t), n = Math.pow(t, e), s = k(n), i = d(), o = d(), a = "";
1602
+ for (this.divRemTo(s, i, o); i.signum() > 0; )
1603
+ a = (n + o.intValue()).toString(t).substr(1) + a, i.divRemTo(s, i, o);
1604
+ return o.intValue().toString(t) + a;
1605
+ }, r.prototype.fromRadix = function(t, e) {
1606
+ this.fromInt(0), e == null && (e = 10);
1607
+ for (var n = this.chunkSize(e), s = Math.pow(e, n), i = !1, o = 0, a = 0, u = 0; u < t.length; ++u) {
1608
+ var h = At(t, u);
1609
+ if (h < 0) {
1610
+ t.charAt(u) == "-" && this.signum() == 0 && (i = !0);
1611
+ continue;
1612
+ }
1613
+ a = e * a + h, ++o >= n && (this.dMultiply(s), this.dAddOffset(a, 0), o = 0, a = 0);
1614
+ }
1615
+ o > 0 && (this.dMultiply(Math.pow(e, o)), this.dAddOffset(a, 0)), i && r.ZERO.subTo(this, this);
1616
+ }, r.prototype.fromNumber = function(t, e, n) {
1617
+ if (typeof e == "number")
1618
+ if (t < 2)
1619
+ this.fromInt(1);
1620
+ else
1621
+ for (this.fromNumber(t, n), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), Q, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
1622
+ this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(r.ONE.shiftLeft(t - 1), this);
1623
+ else {
1624
+ var s = [], i = t & 7;
1625
+ s.length = (t >> 3) + 1, e.nextBytes(s), i > 0 ? s[0] &= (1 << i) - 1 : s[0] = 0, this.fromString(s, 256);
1626
+ }
1627
+ }, r.prototype.bitwiseTo = function(t, e, n) {
1628
+ var s, i, o = Math.min(t.t, this.t);
1629
+ for (s = 0; s < o; ++s)
1630
+ n[s] = e(this[s], t[s]);
1631
+ if (t.t < this.t) {
1632
+ for (i = t.s & this.DM, s = o; s < this.t; ++s)
1633
+ n[s] = e(this[s], i);
1634
+ n.t = this.t;
1635
+ } else {
1636
+ for (i = this.s & this.DM, s = o; s < t.t; ++s)
1637
+ n[s] = e(i, t[s]);
1638
+ n.t = t.t;
1639
+ }
1640
+ n.s = e(this.s, t.s), n.clamp();
1641
+ }, r.prototype.changeBit = function(t, e) {
1642
+ var n = r.ONE.shiftLeft(t);
1643
+ return this.bitwiseTo(n, e, n), n;
1644
+ }, r.prototype.addTo = function(t, e) {
1645
+ for (var n = 0, s = 0, i = Math.min(t.t, this.t); n < i; )
1646
+ s += this[n] + t[n], e[n++] = s & this.DM, s >>= this.DB;
1647
+ if (t.t < this.t) {
1648
+ for (s += t.s; n < this.t; )
1649
+ s += this[n], e[n++] = s & this.DM, s >>= this.DB;
1650
+ s += this.s;
1651
+ } else {
1652
+ for (s += this.s; n < t.t; )
1653
+ s += t[n], e[n++] = s & this.DM, s >>= this.DB;
1654
+ s += t.s;
1655
+ }
1656
+ e.s = s < 0 ? -1 : 0, s > 0 ? e[n++] = s : s < -1 && (e[n++] = this.DV + s), e.t = n, e.clamp();
1657
+ }, r.prototype.dMultiply = function(t) {
1658
+ this[this.t] = this.am(0, t - 1, this, 0, 0, this.t), ++this.t, this.clamp();
1659
+ }, r.prototype.dAddOffset = function(t, e) {
1660
+ if (t != 0) {
1661
+ for (; this.t <= e; )
1662
+ this[this.t++] = 0;
1663
+ for (this[e] += t; this[e] >= this.DV; )
1664
+ this[e] -= this.DV, ++e >= this.t && (this[this.t++] = 0), ++this[e];
1665
+ }
1666
+ }, r.prototype.multiplyLowerTo = function(t, e, n) {
1667
+ var s = Math.min(this.t + t.t, e);
1668
+ for (n.s = 0, n.t = s; s > 0; )
1669
+ n[--s] = 0;
1670
+ for (var i = n.t - this.t; s < i; ++s)
1671
+ n[s + this.t] = this.am(0, t[s], n, s, 0, this.t);
1672
+ for (var i = Math.min(t.t, e); s < i; ++s)
1673
+ this.am(0, t[s], n, s, 0, e - s);
1674
+ n.clamp();
1675
+ }, r.prototype.multiplyUpperTo = function(t, e, n) {
1676
+ --e;
1677
+ var s = n.t = this.t + t.t - e;
1678
+ for (n.s = 0; --s >= 0; )
1679
+ n[s] = 0;
1680
+ for (s = Math.max(e - this.t, 0); s < t.t; ++s)
1681
+ n[this.t + s - e] = this.am(e - s, t[s], n, 0, 0, this.t + s - e);
1682
+ n.clamp(), n.drShiftTo(1, n);
1683
+ }, r.prototype.modInt = function(t) {
1684
+ if (t <= 0)
1685
+ return 0;
1686
+ var e = this.DV % t, n = this.s < 0 ? t - 1 : 0;
1687
+ if (this.t > 0)
1688
+ if (e == 0)
1689
+ n = this[0] % t;
1690
+ else
1691
+ for (var s = this.t - 1; s >= 0; --s)
1692
+ n = (e * n + this[s]) % t;
1693
+ return n;
1694
+ }, r.prototype.millerRabin = function(t) {
1695
+ var e = this.subtract(r.ONE), n = e.getLowestSetBit();
1696
+ if (n <= 0)
1697
+ return !1;
1698
+ var s = e.shiftRight(n);
1699
+ t = t + 1 >> 1, t > _.length && (t = _.length);
1700
+ for (var i = d(), o = 0; o < t; ++o) {
1701
+ i.fromInt(_[Math.floor(Math.random() * _.length)]);
1702
+ var a = i.modPow(s, this);
1703
+ if (a.compareTo(r.ONE) != 0 && a.compareTo(e) != 0) {
1704
+ for (var u = 1; u++ < n && a.compareTo(e) != 0; )
1705
+ if (a = a.modPowInt(2, this), a.compareTo(r.ONE) == 0)
1706
+ return !1;
1707
+ if (a.compareTo(e) != 0)
1708
+ return !1;
1709
+ }
1710
+ }
1711
+ return !0;
1712
+ }, r.prototype.square = function() {
1713
+ var t = d();
1714
+ return this.squareTo(t), t;
1715
+ }, r.prototype.gcda = function(t, e) {
1716
+ var n = this.s < 0 ? this.negate() : this.clone(), s = t.s < 0 ? t.negate() : t.clone();
1717
+ if (n.compareTo(s) < 0) {
1718
+ var i = n;
1719
+ n = s, s = i;
1720
+ }
1721
+ var o = n.getLowestSetBit(), a = s.getLowestSetBit();
1722
+ if (a < 0) {
1723
+ e(n);
1724
+ return;
1725
+ }
1726
+ o < a && (a = o), a > 0 && (n.rShiftTo(a, n), s.rShiftTo(a, s));
1727
+ var u = function() {
1728
+ (o = n.getLowestSetBit()) > 0 && n.rShiftTo(o, n), (o = s.getLowestSetBit()) > 0 && s.rShiftTo(o, s), n.compareTo(s) >= 0 ? (n.subTo(s, n), n.rShiftTo(1, n)) : (s.subTo(n, s), s.rShiftTo(1, s)), n.signum() > 0 ? setTimeout(u, 0) : (a > 0 && s.lShiftTo(a, s), setTimeout(function() {
1729
+ e(s);
1730
+ }, 0));
1731
+ };
1732
+ setTimeout(u, 10);
1733
+ }, r.prototype.fromNumberAsync = function(t, e, n, s) {
1734
+ if (typeof e == "number")
1735
+ if (t < 2)
1736
+ this.fromInt(1);
1737
+ else {
1738
+ this.fromNumber(t, n), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), Q, this), this.isEven() && this.dAddOffset(1, 0);
1739
+ var i = this, o = function() {
1740
+ i.dAddOffset(2, 0), i.bitLength() > t && i.subTo(r.ONE.shiftLeft(t - 1), i), i.isProbablePrime(e) ? setTimeout(function() {
1741
+ s();
1742
+ }, 0) : setTimeout(o, 0);
1743
+ };
1744
+ setTimeout(o, 0);
1745
+ }
1746
+ else {
1747
+ var a = [], u = t & 7;
1748
+ a.length = (t >> 3) + 1, e.nextBytes(a), u > 0 ? a[0] &= (1 << u) - 1 : a[0] = 0, this.fromString(a, 256);
1749
+ }
1750
+ }, r;
1751
+ }()
1752
+ ), Re = (
1753
+ /** @class */
1754
+ function() {
1755
+ function r() {
1756
+ }
1757
+ return r.prototype.convert = function(t) {
1758
+ return t;
1759
+ }, r.prototype.revert = function(t) {
1760
+ return t;
1761
+ }, r.prototype.mulTo = function(t, e, n) {
1762
+ t.multiplyTo(e, n);
1763
+ }, r.prototype.sqrTo = function(t, e) {
1764
+ t.squareTo(e);
1765
+ }, r;
1766
+ }()
1767
+ ), Rt = (
1768
+ /** @class */
1769
+ function() {
1770
+ function r(t) {
1771
+ this.m = t;
1772
+ }
1773
+ return r.prototype.convert = function(t) {
1774
+ return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t;
1775
+ }, r.prototype.revert = function(t) {
1776
+ return t;
1777
+ }, r.prototype.reduce = function(t) {
1778
+ t.divRemTo(this.m, null, t);
1779
+ }, r.prototype.mulTo = function(t, e, n) {
1780
+ t.multiplyTo(e, n), this.reduce(n);
1781
+ }, r.prototype.sqrTo = function(t, e) {
1782
+ t.squareTo(e), this.reduce(e);
1783
+ }, r;
1784
+ }()
1785
+ ), xt = (
1786
+ /** @class */
1787
+ function() {
1788
+ function r(t) {
1789
+ this.m = t, this.mp = t.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t;
1790
+ }
1791
+ return r.prototype.convert = function(t) {
1792
+ var e = d();
1793
+ return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(g.ZERO) > 0 && this.m.subTo(e, e), e;
1794
+ }, r.prototype.revert = function(t) {
1795
+ var e = d();
1796
+ return t.copyTo(e), this.reduce(e), e;
1797
+ }, r.prototype.reduce = function(t) {
1798
+ for (; t.t <= this.mt2; )
1799
+ t[t.t++] = 0;
1800
+ for (var e = 0; e < this.m.t; ++e) {
1801
+ var n = t[e] & 32767, s = n * this.mpl + ((n * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM;
1802
+ for (n = e + this.m.t, t[n] += this.m.am(0, s, t, e, 0, this.m.t); t[n] >= t.DV; )
1803
+ t[n] -= t.DV, t[++n]++;
1804
+ }
1805
+ t.clamp(), t.drShiftTo(this.m.t, t), t.compareTo(this.m) >= 0 && t.subTo(this.m, t);
1806
+ }, r.prototype.mulTo = function(t, e, n) {
1807
+ t.multiplyTo(e, n), this.reduce(n);
1808
+ }, r.prototype.sqrTo = function(t, e) {
1809
+ t.squareTo(e), this.reduce(e);
1810
+ }, r;
1811
+ }()
1812
+ ), xe = (
1813
+ /** @class */
1814
+ function() {
1815
+ function r(t) {
1816
+ this.m = t, this.r2 = d(), this.q3 = d(), g.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
1817
+ }
1818
+ return r.prototype.convert = function(t) {
1819
+ if (t.s < 0 || t.t > 2 * this.m.t)
1820
+ return t.mod(this.m);
1821
+ if (t.compareTo(this.m) < 0)
1822
+ return t;
1823
+ var e = d();
1824
+ return t.copyTo(e), this.reduce(e), e;
1825
+ }, r.prototype.revert = function(t) {
1826
+ return t;
1827
+ }, r.prototype.reduce = function(t) {
1828
+ for (t.drShiftTo(this.m.t - 1, this.r2), t.t > this.m.t + 1 && (t.t = this.m.t + 1, t.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); t.compareTo(this.r2) < 0; )
1829
+ t.dAddOffset(1, this.m.t + 1);
1830
+ for (t.subTo(this.r2, t); t.compareTo(this.m) >= 0; )
1831
+ t.subTo(this.m, t);
1832
+ }, r.prototype.mulTo = function(t, e, n) {
1833
+ t.multiplyTo(e, n), this.reduce(n);
1834
+ }, r.prototype.sqrTo = function(t, e) {
1835
+ t.squareTo(e), this.reduce(e);
1836
+ }, r;
1837
+ }()
1838
+ );
1839
+ function d() {
1840
+ return new g(null);
1841
+ }
1842
+ function T(r, t) {
1843
+ return new g(r, t);
1844
+ }
1845
+ var Ot = typeof navigator < "u";
1846
+ Ot && _t && navigator.appName == "Microsoft Internet Explorer" ? (g.prototype.am = function(t, e, n, s, i, o) {
1847
+ for (var a = e & 32767, u = e >> 15; --o >= 0; ) {
1848
+ var h = this[t] & 32767, l = this[t++] >> 15, c = u * h + l * a;
1849
+ h = a * h + ((c & 32767) << 15) + n[s] + (i & 1073741823), i = (h >>> 30) + (c >>> 15) + u * l + (i >>> 30), n[s++] = h & 1073741823;
1850
+ }
1851
+ return i;
1852
+ }, j = 30) : Ot && _t && navigator.appName != "Netscape" ? (g.prototype.am = function(t, e, n, s, i, o) {
1853
+ for (; --o >= 0; ) {
1854
+ var a = e * this[t++] + n[s] + i;
1855
+ i = Math.floor(a / 67108864), n[s++] = a & 67108863;
1856
+ }
1857
+ return i;
1858
+ }, j = 26) : (g.prototype.am = function(t, e, n, s, i, o) {
1859
+ for (var a = e & 16383, u = e >> 14; --o >= 0; ) {
1860
+ var h = this[t] & 16383, l = this[t++] >> 14, c = u * h + l * a;
1861
+ h = a * h + ((c & 16383) << 14) + n[s] + i, i = (h >> 28) + (c >> 14) + u * l, n[s++] = h & 268435455;
1862
+ }
1863
+ return i;
1864
+ }, j = 28);
1865
+ g.prototype.DB = j;
1866
+ g.prototype.DM = (1 << j) - 1;
1867
+ g.prototype.DV = 1 << j;
1868
+ var St = 52;
1869
+ g.prototype.FV = Math.pow(2, St);
1870
+ g.prototype.F1 = St - j;
1871
+ g.prototype.F2 = 2 * j - St;
1872
+ var at = [], Z, P;
1873
+ Z = 48;
1874
+ for (P = 0; P <= 9; ++P)
1875
+ at[Z++] = P;
1876
+ Z = 97;
1877
+ for (P = 10; P < 36; ++P)
1878
+ at[Z++] = P;
1879
+ Z = 65;
1880
+ for (P = 10; P < 36; ++P)
1881
+ at[Z++] = P;
1882
+ function At(r, t) {
1883
+ var e = at[r.charCodeAt(t)];
1884
+ return e ?? -1;
1885
+ }
1886
+ function k(r) {
1887
+ var t = d();
1888
+ return t.fromInt(r), t;
1889
+ }
1890
+ function W(r) {
1891
+ var t = 1, e;
1892
+ return (e = r >>> 16) != 0 && (r = e, t += 16), (e = r >> 8) != 0 && (r = e, t += 8), (e = r >> 4) != 0 && (r = e, t += 4), (e = r >> 2) != 0 && (r = e, t += 2), (e = r >> 1) != 0 && (r = e, t += 1), t;
1893
+ }
1894
+ g.ZERO = k(0);
1895
+ g.ONE = k(1);
1896
+ var Oe = (
1897
+ /** @class */
1898
+ function() {
1899
+ function r() {
1900
+ this.i = 0, this.j = 0, this.S = [];
1901
+ }
1902
+ return r.prototype.init = function(t) {
1903
+ var e, n, s;
1904
+ for (e = 0; e < 256; ++e)
1905
+ this.S[e] = e;
1906
+ for (n = 0, e = 0; e < 256; ++e)
1907
+ n = n + this.S[e] + t[e % t.length] & 255, s = this.S[e], this.S[e] = this.S[n], this.S[n] = s;
1908
+ this.i = 0, this.j = 0;
1909
+ }, r.prototype.next = function() {
1910
+ var t;
1911
+ return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, t = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = t, this.S[t + this.S[this.i] & 255];
1912
+ }, r;
1913
+ }()
1914
+ );
1915
+ function Ae() {
1916
+ return new Oe();
1917
+ }
1918
+ var Jt = 256, tt, H = null, V;
1919
+ if (H == null) {
1920
+ H = [], V = 0;
1921
+ var et = void 0;
1922
+ if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
1923
+ var ft = new Uint32Array(256);
1924
+ for (window.crypto.getRandomValues(ft), et = 0; et < ft.length; ++et)
1925
+ H[V++] = ft[et] & 255;
1926
+ }
1927
+ var rt = 0, nt = function(r) {
1928
+ if (rt = rt || 0, rt >= 256 || V >= Jt) {
1929
+ window.removeEventListener ? window.removeEventListener("mousemove", nt, !1) : window.detachEvent && window.detachEvent("onmousemove", nt);
1930
+ return;
1931
+ }
1932
+ try {
1933
+ var t = r.x + r.y;
1934
+ H[V++] = t & 255, rt += 1;
1935
+ } catch {
1936
+ }
1937
+ };
1938
+ typeof window < "u" && (window.addEventListener ? window.addEventListener("mousemove", nt, !1) : window.attachEvent && window.attachEvent("onmousemove", nt));
1939
+ }
1940
+ function Be() {
1941
+ if (tt == null) {
1942
+ for (tt = Ae(); V < Jt; ) {
1943
+ var r = Math.floor(65536 * Math.random());
1944
+ H[V++] = r & 255;
1945
+ }
1946
+ for (tt.init(H), V = 0; V < H.length; ++V)
1947
+ H[V] = 0;
1948
+ V = 0;
1949
+ }
1950
+ return tt.next();
1951
+ }
1952
+ var ct = (
1953
+ /** @class */
1954
+ function() {
1955
+ function r() {
1956
+ }
1957
+ return r.prototype.nextBytes = function(t) {
1958
+ for (var e = 0; e < t.length; ++e)
1959
+ t[e] = Be();
1960
+ }, r;
1961
+ }()
1962
+ );
1963
+ function Pe(r, t) {
1964
+ if (t < r.length + 22)
1965
+ return console.error("Message too long for RSA"), null;
1966
+ for (var e = t - r.length - 6, n = "", s = 0; s < e; s += 2)
1967
+ n += "ff";
1968
+ var i = "0001" + n + "00" + r;
1969
+ return T(i, 16);
1970
+ }
1971
+ function Ne(r, t) {
1972
+ if (t < r.length + 11)
1973
+ return console.error("Message too long for RSA"), null;
1974
+ for (var e = [], n = r.length - 1; n >= 0 && t > 0; ) {
1975
+ var s = r.charCodeAt(n--);
1976
+ s < 128 ? e[--t] = s : s > 127 && s < 2048 ? (e[--t] = s & 63 | 128, e[--t] = s >> 6 | 192) : (e[--t] = s & 63 | 128, e[--t] = s >> 6 & 63 | 128, e[--t] = s >> 12 | 224);
1977
+ }
1978
+ e[--t] = 0;
1979
+ for (var i = new ct(), o = []; t > 2; ) {
1980
+ for (o[0] = 0; o[0] == 0; )
1981
+ i.nextBytes(o);
1982
+ e[--t] = o[0];
1983
+ }
1984
+ return e[--t] = 2, e[--t] = 0, new g(e);
1985
+ }
1986
+ var Ve = (
1987
+ /** @class */
1988
+ function() {
1989
+ function r() {
1990
+ this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
1991
+ }
1992
+ return r.prototype.doPublic = function(t) {
1993
+ return t.modPowInt(this.e, this.n);
1994
+ }, r.prototype.doPrivate = function(t) {
1995
+ if (this.p == null || this.q == null)
1996
+ return t.modPow(this.d, this.n);
1997
+ for (var e = t.mod(this.p).modPow(this.dmp1, this.p), n = t.mod(this.q).modPow(this.dmq1, this.q); e.compareTo(n) < 0; )
1998
+ e = e.add(this.p);
1999
+ return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
2000
+ }, r.prototype.setPublic = function(t, e) {
2001
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = T(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
2002
+ }, r.prototype.encrypt = function(t) {
2003
+ var e = this.n.bitLength() + 7 >> 3, n = Ne(t, e);
2004
+ if (n == null)
2005
+ return null;
2006
+ var s = this.doPublic(n);
2007
+ if (s == null)
2008
+ return null;
2009
+ for (var i = s.toString(16), o = i.length, a = 0; a < e * 2 - o; a++)
2010
+ i = "0" + i;
2011
+ return i;
2012
+ }, r.prototype.setPrivate = function(t, e, n) {
2013
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = T(t, 16), this.e = parseInt(e, 16), this.d = T(n, 16)) : console.error("Invalid RSA private key");
2014
+ }, r.prototype.setPrivateEx = function(t, e, n, s, i, o, a, u) {
2015
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = T(t, 16), this.e = parseInt(e, 16), this.d = T(n, 16), this.p = T(s, 16), this.q = T(i, 16), this.dmp1 = T(o, 16), this.dmq1 = T(a, 16), this.coeff = T(u, 16)) : console.error("Invalid RSA private key");
2016
+ }, r.prototype.generate = function(t, e) {
2017
+ var n = new ct(), s = t >> 1;
2018
+ this.e = parseInt(e, 16);
2019
+ for (var i = new g(e, 16); ; ) {
2020
+ for (; this.p = new g(t - s, 1, n), !(this.p.subtract(g.ONE).gcd(i).compareTo(g.ONE) == 0 && this.p.isProbablePrime(10)); )
2021
+ ;
2022
+ for (; this.q = new g(s, 1, n), !(this.q.subtract(g.ONE).gcd(i).compareTo(g.ONE) == 0 && this.q.isProbablePrime(10)); )
2023
+ ;
2024
+ if (this.p.compareTo(this.q) <= 0) {
2025
+ var o = this.p;
2026
+ this.p = this.q, this.q = o;
2027
+ }
2028
+ var a = this.p.subtract(g.ONE), u = this.q.subtract(g.ONE), h = a.multiply(u);
2029
+ if (h.gcd(i).compareTo(g.ONE) == 0) {
2030
+ this.n = this.p.multiply(this.q), this.d = i.modInverse(h), this.dmp1 = this.d.mod(a), this.dmq1 = this.d.mod(u), this.coeff = this.q.modInverse(this.p);
2031
+ break;
2032
+ }
2033
+ }
2034
+ }, r.prototype.decrypt = function(t) {
2035
+ var e = T(t, 16), n = this.doPrivate(e);
2036
+ return n == null ? null : Le(n, this.n.bitLength() + 7 >> 3);
2037
+ }, r.prototype.generateAsync = function(t, e, n) {
2038
+ var s = new ct(), i = t >> 1;
2039
+ this.e = parseInt(e, 16);
2040
+ var o = new g(e, 16), a = this, u = function() {
2041
+ var h = function() {
2042
+ if (a.p.compareTo(a.q) <= 0) {
2043
+ var v = a.p;
2044
+ a.p = a.q, a.q = v;
2045
+ }
2046
+ var y = a.p.subtract(g.ONE), S = a.q.subtract(g.ONE), b = y.multiply(S);
2047
+ b.gcd(o).compareTo(g.ONE) == 0 ? (a.n = a.p.multiply(a.q), a.d = o.modInverse(b), a.dmp1 = a.d.mod(y), a.dmq1 = a.d.mod(S), a.coeff = a.q.modInverse(a.p), setTimeout(function() {
2048
+ n();
2049
+ }, 0)) : setTimeout(u, 0);
2050
+ }, l = function() {
2051
+ a.q = d(), a.q.fromNumberAsync(i, 1, s, function() {
2052
+ a.q.subtract(g.ONE).gcda(o, function(v) {
2053
+ v.compareTo(g.ONE) == 0 && a.q.isProbablePrime(10) ? setTimeout(h, 0) : setTimeout(l, 0);
2054
+ });
2055
+ });
2056
+ }, c = function() {
2057
+ a.p = d(), a.p.fromNumberAsync(t - i, 1, s, function() {
2058
+ a.p.subtract(g.ONE).gcda(o, function(v) {
2059
+ v.compareTo(g.ONE) == 0 && a.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(c, 0);
2060
+ });
2061
+ });
2062
+ };
2063
+ setTimeout(c, 0);
2064
+ };
2065
+ setTimeout(u, 0);
2066
+ }, r.prototype.sign = function(t, e, n) {
2067
+ var s = Ie(n), i = s + e(t).toString(), o = Pe(i, this.n.bitLength() / 4);
2068
+ if (o == null)
2069
+ return null;
2070
+ var a = this.doPrivate(o);
2071
+ if (a == null)
2072
+ return null;
2073
+ var u = a.toString(16);
2074
+ return u.length & 1 ? "0" + u : u;
2075
+ }, r.prototype.verify = function(t, e, n) {
2076
+ var s = T(e, 16), i = this.doPublic(s);
2077
+ if (i == null)
2078
+ return null;
2079
+ var o = i.toString(16).replace(/^1f+00/, ""), a = Me(o);
2080
+ return a == n(t).toString();
2081
+ }, r;
2082
+ }()
2083
+ );
2084
+ function Le(r, t) {
2085
+ for (var e = r.toByteArray(), n = 0; n < e.length && e[n] == 0; )
2086
+ ++n;
2087
+ if (e.length - n != t - 1 || e[n] != 2)
2088
+ return null;
2089
+ for (++n; e[n] != 0; )
2090
+ if (++n >= e.length)
2091
+ return null;
2092
+ for (var s = ""; ++n < e.length; ) {
2093
+ var i = e[n] & 255;
2094
+ i < 128 ? s += String.fromCharCode(i) : i > 191 && i < 224 ? (s += String.fromCharCode((i & 31) << 6 | e[n + 1] & 63), ++n) : (s += String.fromCharCode((i & 15) << 12 | (e[n + 1] & 63) << 6 | e[n + 2] & 63), n += 2);
2095
+ }
2096
+ return s;
2097
+ }
2098
+ var st = {
2099
+ md2: "3020300c06082a864886f70d020205000410",
2100
+ md5: "3020300c06082a864886f70d020505000410",
2101
+ sha1: "3021300906052b0e03021a05000414",
2102
+ sha224: "302d300d06096086480165030402040500041c",
2103
+ sha256: "3031300d060960864801650304020105000420",
2104
+ sha384: "3041300d060960864801650304020205000430",
2105
+ sha512: "3051300d060960864801650304020305000440",
2106
+ ripemd160: "3021300906052b2403020105000414"
2107
+ };
2108
+ function Ie(r) {
2109
+ return st[r] || "";
2110
+ }
2111
+ function Me(r) {
2112
+ for (var t in st)
2113
+ if (st.hasOwnProperty(t)) {
2114
+ var e = st[t], n = e.length;
2115
+ if (r.substr(0, n) == e)
2116
+ return r.substr(n);
2117
+ }
2118
+ return r;
2119
+ }
2120
+ /*!
2121
+ Copyright (c) 2011, Yahoo! Inc. All rights reserved.
2122
+ Code licensed under the BSD License:
2123
+ http://developer.yahoo.com/yui/license.html
2124
+ version: 2.9.0
2125
+ */
2126
+ var E = {};
2127
+ E.lang = {
2128
+ /**
2129
+ * Utility to set up the prototype, constructor and superclass properties to
2130
+ * support an inheritance strategy that can chain constructors and methods.
2131
+ * Static members will not be inherited.
2132
+ *
2133
+ * @method extend
2134
+ * @static
2135
+ * @param {Function} subc the object to modify
2136
+ * @param {Function} superc the object to inherit
2137
+ * @param {Object} overrides additional properties/methods to add to the
2138
+ * subclass prototype. These will override the
2139
+ * matching items obtained from the superclass
2140
+ * if present.
2141
+ */
2142
+ extend: function(r, t, e) {
2143
+ if (!t || !r)
2144
+ throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
2145
+ var n = function() {
2146
+ };
2147
+ if (n.prototype = t.prototype, r.prototype = new n(), r.prototype.constructor = r, r.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t), e) {
2148
+ var s;
2149
+ for (s in e)
2150
+ r.prototype[s] = e[s];
2151
+ var i = function() {
2152
+ }, o = ["toString", "valueOf"];
2153
+ try {
2154
+ /MSIE/.test(navigator.userAgent) && (i = function(a, u) {
2155
+ for (s = 0; s < o.length; s = s + 1) {
2156
+ var h = o[s], l = u[h];
2157
+ typeof l == "function" && l != Object.prototype[h] && (a[h] = l);
2158
+ }
2159
+ });
2160
+ } catch {
2161
+ }
2162
+ i(r.prototype, e);
2163
+ }
2164
+ }
2165
+ };
2166
+ /**
2167
+ * @fileOverview
2168
+ * @name asn1-1.0.js
2169
+ * @author Kenji Urushima kenji.urushima@gmail.com
2170
+ * @version asn1 1.0.13 (2017-Jun-02)
2171
+ * @since jsrsasign 2.1
2172
+ * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
2173
+ */
2174
+ var f = {};
2175
+ (typeof f.asn1 > "u" || !f.asn1) && (f.asn1 = {});
2176
+ f.asn1.ASN1Util = new function() {
2177
+ this.integerToByteHex = function(r) {
2178
+ var t = r.toString(16);
2179
+ return t.length % 2 == 1 && (t = "0" + t), t;
2180
+ }, this.bigIntToMinTwosComplementsHex = function(r) {
2181
+ var t = r.toString(16);
2182
+ if (t.substr(0, 1) != "-")
2183
+ t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
2184
+ else {
2185
+ var e = t.substr(1), n = e.length;
2186
+ n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
2187
+ for (var s = "", i = 0; i < n; i++)
2188
+ s += "f";
2189
+ var o = new g(s, 16), a = o.xor(r).add(g.ONE);
2190
+ t = a.toString(16).replace(/^-/, "");
2191
+ }
2192
+ return t;
2193
+ }, this.getPEMStringFromHex = function(r, t) {
2194
+ return hextopem(r, t);
2195
+ }, this.newObject = function(r) {
2196
+ var t = f, e = t.asn1, n = e.DERBoolean, s = e.DERInteger, i = e.DERBitString, o = e.DEROctetString, a = e.DERNull, u = e.DERObjectIdentifier, h = e.DEREnumerated, l = e.DERUTF8String, c = e.DERNumericString, v = e.DERPrintableString, y = e.DERTeletexString, S = e.DERIA5String, b = e.DERUTCTime, D = e.DERGeneralizedTime, x = e.DERSequence, O = e.DERSet, w = e.DERTaggedObject, L = e.ASN1Util.newObject, B = Object.keys(r);
2197
+ if (B.length != 1)
2198
+ throw "key of param shall be only one.";
2199
+ var p = B[0];
2200
+ if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + p + ":") == -1)
2201
+ throw "undefined key: " + p;
2202
+ if (p == "bool")
2203
+ return new n(r[p]);
2204
+ if (p == "int")
2205
+ return new s(r[p]);
2206
+ if (p == "bitstr")
2207
+ return new i(r[p]);
2208
+ if (p == "octstr")
2209
+ return new o(r[p]);
2210
+ if (p == "null")
2211
+ return new a(r[p]);
2212
+ if (p == "oid")
2213
+ return new u(r[p]);
2214
+ if (p == "enum")
2215
+ return new h(r[p]);
2216
+ if (p == "utf8str")
2217
+ return new l(r[p]);
2218
+ if (p == "numstr")
2219
+ return new c(r[p]);
2220
+ if (p == "prnstr")
2221
+ return new v(r[p]);
2222
+ if (p == "telstr")
2223
+ return new y(r[p]);
2224
+ if (p == "ia5str")
2225
+ return new S(r[p]);
2226
+ if (p == "utctime")
2227
+ return new b(r[p]);
2228
+ if (p == "gentime")
2229
+ return new D(r[p]);
2230
+ if (p == "seq") {
2231
+ for (var I = r[p], $ = [], q = 0; q < I.length; q++) {
2232
+ var ot = L(I[q]);
2233
+ $.push(ot);
2234
+ }
2235
+ return new x({ array: $ });
2236
+ }
2237
+ if (p == "set") {
2238
+ for (var I = r[p], $ = [], q = 0; q < I.length; q++) {
2239
+ var ot = L(I[q]);
2240
+ $.push(ot);
2241
+ }
2242
+ return new O({ array: $ });
2243
+ }
2244
+ if (p == "tag") {
2245
+ var N = r[p];
2246
+ if (Object.prototype.toString.call(N) === "[object Array]" && N.length == 3) {
2247
+ var $t = L(N[2]);
2248
+ return new w({
2249
+ tag: N[0],
2250
+ explicit: N[1],
2251
+ obj: $t
2252
+ });
2253
+ } else {
2254
+ var X = {};
2255
+ if (N.explicit !== void 0 && (X.explicit = N.explicit), N.tag !== void 0 && (X.tag = N.tag), N.obj === void 0)
2256
+ throw "obj shall be specified for 'tag'.";
2257
+ return X.obj = L(N.obj), new w(X);
2258
+ }
2259
+ }
2260
+ }, this.jsonToASN1HEX = function(r) {
2261
+ var t = this.newObject(r);
2262
+ return t.getEncodedHex();
2263
+ };
2264
+ }();
2265
+ f.asn1.ASN1Util.oidHexToInt = function(r) {
2266
+ for (var s = "", t = parseInt(r.substr(0, 2), 16), e = Math.floor(t / 40), n = t % 40, s = e + "." + n, i = "", o = 2; o < r.length; o += 2) {
2267
+ var a = parseInt(r.substr(o, 2), 16), u = ("00000000" + a.toString(2)).slice(-8);
2268
+ if (i = i + u.substr(1, 7), u.substr(0, 1) == "0") {
2269
+ var h = new g(i, 2);
2270
+ s = s + "." + h.toString(10), i = "";
2271
+ }
2272
+ }
2273
+ return s;
2274
+ };
2275
+ f.asn1.ASN1Util.oidIntToHex = function(r) {
2276
+ var t = function(a) {
2277
+ var u = a.toString(16);
2278
+ return u.length == 1 && (u = "0" + u), u;
2279
+ }, e = function(a) {
2280
+ var u = "", h = new g(a, 10), l = h.toString(2), c = 7 - l.length % 7;
2281
+ c == 7 && (c = 0);
2282
+ for (var v = "", y = 0; y < c; y++)
2283
+ v += "0";
2284
+ l = v + l;
2285
+ for (var y = 0; y < l.length - 1; y += 7) {
2286
+ var S = l.substr(y, 7);
2287
+ y != l.length - 7 && (S = "1" + S), u += t(parseInt(S, 2));
2288
+ }
2289
+ return u;
2290
+ };
2291
+ if (!r.match(/^[0-9.]+$/))
2292
+ throw "malformed oid string: " + r;
2293
+ var n = "", s = r.split("."), i = parseInt(s[0]) * 40 + parseInt(s[1]);
2294
+ n += t(i), s.splice(0, 2);
2295
+ for (var o = 0; o < s.length; o++)
2296
+ n += e(s[o]);
2297
+ return n;
2298
+ };
2299
+ f.asn1.ASN1Object = function() {
2300
+ var r = "";
2301
+ this.getLengthHexFromValue = function() {
2302
+ if (typeof this.hV > "u" || this.hV == null)
2303
+ throw "this.hV is null or undefined.";
2304
+ if (this.hV.length % 2 == 1)
2305
+ throw "value hex must be even length: n=" + r.length + ",v=" + this.hV;
2306
+ var t = this.hV.length / 2, e = t.toString(16);
2307
+ if (e.length % 2 == 1 && (e = "0" + e), t < 128)
2308
+ return e;
2309
+ var n = e.length / 2;
2310
+ if (n > 15)
2311
+ throw "ASN.1 length too long to represent by 8x: n = " + t.toString(16);
2312
+ var s = 128 + n;
2313
+ return s.toString(16) + e;
2314
+ }, this.getEncodedHex = function() {
2315
+ return (this.hTLV == null || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1), this.hTLV;
2316
+ }, this.getValueHex = function() {
2317
+ return this.getEncodedHex(), this.hV;
2318
+ }, this.getFreshValueHex = function() {
2319
+ return "";
2320
+ };
2321
+ };
2322
+ f.asn1.DERAbstractString = function(r) {
2323
+ f.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function() {
2324
+ return this.s;
2325
+ }, this.setString = function(t) {
2326
+ this.hTLV = null, this.isModified = !0, this.s = t, this.hV = stohex(this.s);
2327
+ }, this.setStringHex = function(t) {
2328
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = t;
2329
+ }, this.getFreshValueHex = function() {
2330
+ return this.hV;
2331
+ }, typeof r < "u" && (typeof r == "string" ? this.setString(r) : typeof r.str < "u" ? this.setString(r.str) : typeof r.hex < "u" && this.setStringHex(r.hex));
2332
+ };
2333
+ E.lang.extend(f.asn1.DERAbstractString, f.asn1.ASN1Object);
2334
+ f.asn1.DERAbstractTime = function(r) {
2335
+ f.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(t) {
2336
+ utc = t.getTime() + t.getTimezoneOffset() * 6e4;
2337
+ var e = new Date(utc);
2338
+ return e;
2339
+ }, this.formatDate = function(t, e, n) {
2340
+ var s = this.zeroPadding, i = this.localDateToUTC(t), o = String(i.getFullYear());
2341
+ e == "utc" && (o = o.substr(2, 2));
2342
+ var a = s(String(i.getMonth() + 1), 2), u = s(String(i.getDate()), 2), h = s(String(i.getHours()), 2), l = s(String(i.getMinutes()), 2), c = s(String(i.getSeconds()), 2), v = o + a + u + h + l + c;
2343
+ if (n === !0) {
2344
+ var y = i.getMilliseconds();
2345
+ if (y != 0) {
2346
+ var S = s(String(y), 3);
2347
+ S = S.replace(/[0]+$/, ""), v = v + "." + S;
2348
+ }
2349
+ }
2350
+ return v + "Z";
2351
+ }, this.zeroPadding = function(t, e) {
2352
+ return t.length >= e ? t : new Array(e - t.length + 1).join("0") + t;
2353
+ }, this.getString = function() {
2354
+ return this.s;
2355
+ }, this.setString = function(t) {
2356
+ this.hTLV = null, this.isModified = !0, this.s = t, this.hV = stohex(t);
2357
+ }, this.setByDateValue = function(t, e, n, s, i, o) {
2358
+ var a = new Date(Date.UTC(t, e - 1, n, s, i, o, 0));
2359
+ this.setByDate(a);
2360
+ }, this.getFreshValueHex = function() {
2361
+ return this.hV;
2362
+ };
2363
+ };
2364
+ E.lang.extend(f.asn1.DERAbstractTime, f.asn1.ASN1Object);
2365
+ f.asn1.DERAbstractStructured = function(r) {
2366
+ f.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(t) {
2367
+ this.hTLV = null, this.isModified = !0, this.asn1Array = t;
2368
+ }, this.appendASN1Object = function(t) {
2369
+ this.hTLV = null, this.isModified = !0, this.asn1Array.push(t);
2370
+ }, this.asn1Array = new Array(), typeof r < "u" && typeof r.array < "u" && (this.asn1Array = r.array);
2371
+ };
2372
+ E.lang.extend(f.asn1.DERAbstractStructured, f.asn1.ASN1Object);
2373
+ f.asn1.DERBoolean = function() {
2374
+ f.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
2375
+ };
2376
+ E.lang.extend(f.asn1.DERBoolean, f.asn1.ASN1Object);
2377
+ f.asn1.DERInteger = function(r) {
2378
+ f.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(t) {
2379
+ this.hTLV = null, this.isModified = !0, this.hV = f.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
2380
+ }, this.setByInteger = function(t) {
2381
+ var e = new g(String(t), 10);
2382
+ this.setByBigInteger(e);
2383
+ }, this.setValueHex = function(t) {
2384
+ this.hV = t;
2385
+ }, this.getFreshValueHex = function() {
2386
+ return this.hV;
2387
+ }, typeof r < "u" && (typeof r.bigint < "u" ? this.setByBigInteger(r.bigint) : typeof r.int < "u" ? this.setByInteger(r.int) : typeof r == "number" ? this.setByInteger(r) : typeof r.hex < "u" && this.setValueHex(r.hex));
2388
+ };
2389
+ E.lang.extend(f.asn1.DERInteger, f.asn1.ASN1Object);
2390
+ f.asn1.DERBitString = function(r) {
2391
+ if (r !== void 0 && typeof r.obj < "u") {
2392
+ var t = f.asn1.ASN1Util.newObject(r.obj);
2393
+ r.hex = "00" + t.getEncodedHex();
2394
+ }
2395
+ f.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(e) {
2396
+ this.hTLV = null, this.isModified = !0, this.hV = e;
2397
+ }, this.setUnusedBitsAndHexValue = function(e, n) {
2398
+ if (e < 0 || 7 < e)
2399
+ throw "unused bits shall be from 0 to 7: u = " + e;
2400
+ var s = "0" + e;
2401
+ this.hTLV = null, this.isModified = !0, this.hV = s + n;
2402
+ }, this.setByBinaryString = function(e) {
2403
+ e = e.replace(/0+$/, "");
2404
+ var n = 8 - e.length % 8;
2405
+ n == 8 && (n = 0);
2406
+ for (var s = 0; s <= n; s++)
2407
+ e += "0";
2408
+ for (var i = "", s = 0; s < e.length - 1; s += 8) {
2409
+ var o = e.substr(s, 8), a = parseInt(o, 2).toString(16);
2410
+ a.length == 1 && (a = "0" + a), i += a;
2411
+ }
2412
+ this.hTLV = null, this.isModified = !0, this.hV = "0" + n + i;
2413
+ }, this.setByBooleanArray = function(e) {
2414
+ for (var n = "", s = 0; s < e.length; s++)
2415
+ e[s] == !0 ? n += "1" : n += "0";
2416
+ this.setByBinaryString(n);
2417
+ }, this.newFalseArray = function(e) {
2418
+ for (var n = new Array(e), s = 0; s < e; s++)
2419
+ n[s] = !1;
2420
+ return n;
2421
+ }, this.getFreshValueHex = function() {
2422
+ return this.hV;
2423
+ }, typeof r < "u" && (typeof r == "string" && r.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(r) : typeof r.hex < "u" ? this.setHexValueIncludingUnusedBits(r.hex) : typeof r.bin < "u" ? this.setByBinaryString(r.bin) : typeof r.array < "u" && this.setByBooleanArray(r.array));
2424
+ };
2425
+ E.lang.extend(f.asn1.DERBitString, f.asn1.ASN1Object);
2426
+ f.asn1.DEROctetString = function(r) {
2427
+ if (r !== void 0 && typeof r.obj < "u") {
2428
+ var t = f.asn1.ASN1Util.newObject(r.obj);
2429
+ r.hex = t.getEncodedHex();
2430
+ }
2431
+ f.asn1.DEROctetString.superclass.constructor.call(this, r), this.hT = "04";
2432
+ };
2433
+ E.lang.extend(f.asn1.DEROctetString, f.asn1.DERAbstractString);
2434
+ f.asn1.DERNull = function() {
2435
+ f.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
2436
+ };
2437
+ E.lang.extend(f.asn1.DERNull, f.asn1.ASN1Object);
2438
+ f.asn1.DERObjectIdentifier = function(r) {
2439
+ var t = function(n) {
2440
+ var s = n.toString(16);
2441
+ return s.length == 1 && (s = "0" + s), s;
2442
+ }, e = function(n) {
2443
+ var s = "", i = new g(n, 10), o = i.toString(2), a = 7 - o.length % 7;
2444
+ a == 7 && (a = 0);
2445
+ for (var u = "", h = 0; h < a; h++)
2446
+ u += "0";
2447
+ o = u + o;
2448
+ for (var h = 0; h < o.length - 1; h += 7) {
2449
+ var l = o.substr(h, 7);
2450
+ h != o.length - 7 && (l = "1" + l), s += t(parseInt(l, 2));
2451
+ }
2452
+ return s;
2453
+ };
2454
+ f.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function(n) {
2455
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = n;
2456
+ }, this.setValueOidString = function(n) {
2457
+ if (!n.match(/^[0-9.]+$/))
2458
+ throw "malformed oid string: " + n;
2459
+ var s = "", i = n.split("."), o = parseInt(i[0]) * 40 + parseInt(i[1]);
2460
+ s += t(o), i.splice(0, 2);
2461
+ for (var a = 0; a < i.length; a++)
2462
+ s += e(i[a]);
2463
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = s;
2464
+ }, this.setValueName = function(n) {
2465
+ var s = f.asn1.x509.OID.name2oid(n);
2466
+ if (s !== "")
2467
+ this.setValueOidString(s);
2468
+ else
2469
+ throw "DERObjectIdentifier oidName undefined: " + n;
2470
+ }, this.getFreshValueHex = function() {
2471
+ return this.hV;
2472
+ }, r !== void 0 && (typeof r == "string" ? r.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(r) : this.setValueName(r) : r.oid !== void 0 ? this.setValueOidString(r.oid) : r.hex !== void 0 ? this.setValueHex(r.hex) : r.name !== void 0 && this.setValueName(r.name));
2473
+ };
2474
+ E.lang.extend(f.asn1.DERObjectIdentifier, f.asn1.ASN1Object);
2475
+ f.asn1.DEREnumerated = function(r) {
2476
+ f.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(t) {
2477
+ this.hTLV = null, this.isModified = !0, this.hV = f.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
2478
+ }, this.setByInteger = function(t) {
2479
+ var e = new g(String(t), 10);
2480
+ this.setByBigInteger(e);
2481
+ }, this.setValueHex = function(t) {
2482
+ this.hV = t;
2483
+ }, this.getFreshValueHex = function() {
2484
+ return this.hV;
2485
+ }, typeof r < "u" && (typeof r.int < "u" ? this.setByInteger(r.int) : typeof r == "number" ? this.setByInteger(r) : typeof r.hex < "u" && this.setValueHex(r.hex));
2486
+ };
2487
+ E.lang.extend(f.asn1.DEREnumerated, f.asn1.ASN1Object);
2488
+ f.asn1.DERUTF8String = function(r) {
2489
+ f.asn1.DERUTF8String.superclass.constructor.call(this, r), this.hT = "0c";
2490
+ };
2491
+ E.lang.extend(f.asn1.DERUTF8String, f.asn1.DERAbstractString);
2492
+ f.asn1.DERNumericString = function(r) {
2493
+ f.asn1.DERNumericString.superclass.constructor.call(this, r), this.hT = "12";
2494
+ };
2495
+ E.lang.extend(f.asn1.DERNumericString, f.asn1.DERAbstractString);
2496
+ f.asn1.DERPrintableString = function(r) {
2497
+ f.asn1.DERPrintableString.superclass.constructor.call(this, r), this.hT = "13";
2498
+ };
2499
+ E.lang.extend(f.asn1.DERPrintableString, f.asn1.DERAbstractString);
2500
+ f.asn1.DERTeletexString = function(r) {
2501
+ f.asn1.DERTeletexString.superclass.constructor.call(this, r), this.hT = "14";
2502
+ };
2503
+ E.lang.extend(f.asn1.DERTeletexString, f.asn1.DERAbstractString);
2504
+ f.asn1.DERIA5String = function(r) {
2505
+ f.asn1.DERIA5String.superclass.constructor.call(this, r), this.hT = "16";
2506
+ };
2507
+ E.lang.extend(f.asn1.DERIA5String, f.asn1.DERAbstractString);
2508
+ f.asn1.DERUTCTime = function(r) {
2509
+ f.asn1.DERUTCTime.superclass.constructor.call(this, r), this.hT = "17", this.setByDate = function(t) {
2510
+ this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
2511
+ }, this.getFreshValueHex = function() {
2512
+ return typeof this.date > "u" && typeof this.s > "u" && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
2513
+ }, r !== void 0 && (r.str !== void 0 ? this.setString(r.str) : typeof r == "string" && r.match(/^[0-9]{12}Z$/) ? this.setString(r) : r.hex !== void 0 ? this.setStringHex(r.hex) : r.date !== void 0 && this.setByDate(r.date));
2514
+ };
2515
+ E.lang.extend(f.asn1.DERUTCTime, f.asn1.DERAbstractTime);
2516
+ f.asn1.DERGeneralizedTime = function(r) {
2517
+ f.asn1.DERGeneralizedTime.superclass.constructor.call(this, r), this.hT = "18", this.withMillis = !1, this.setByDate = function(t) {
2518
+ this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
2519
+ }, this.getFreshValueHex = function() {
2520
+ return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
2521
+ }, r !== void 0 && (r.str !== void 0 ? this.setString(r.str) : typeof r == "string" && r.match(/^[0-9]{14}Z$/) ? this.setString(r) : r.hex !== void 0 ? this.setStringHex(r.hex) : r.date !== void 0 && this.setByDate(r.date), r.millis === !0 && (this.withMillis = !0));
2522
+ };
2523
+ E.lang.extend(f.asn1.DERGeneralizedTime, f.asn1.DERAbstractTime);
2524
+ f.asn1.DERSequence = function(r) {
2525
+ f.asn1.DERSequence.superclass.constructor.call(this, r), this.hT = "30", this.getFreshValueHex = function() {
2526
+ for (var t = "", e = 0; e < this.asn1Array.length; e++) {
2527
+ var n = this.asn1Array[e];
2528
+ t += n.getEncodedHex();
2529
+ }
2530
+ return this.hV = t, this.hV;
2531
+ };
2532
+ };
2533
+ E.lang.extend(f.asn1.DERSequence, f.asn1.DERAbstractStructured);
2534
+ f.asn1.DERSet = function(r) {
2535
+ f.asn1.DERSet.superclass.constructor.call(this, r), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
2536
+ for (var t = new Array(), e = 0; e < this.asn1Array.length; e++) {
2537
+ var n = this.asn1Array[e];
2538
+ t.push(n.getEncodedHex());
2539
+ }
2540
+ return this.sortFlag == !0 && t.sort(), this.hV = t.join(""), this.hV;
2541
+ }, typeof r < "u" && typeof r.sortflag < "u" && r.sortflag == !1 && (this.sortFlag = !1);
2542
+ };
2543
+ E.lang.extend(f.asn1.DERSet, f.asn1.DERAbstractStructured);
2544
+ f.asn1.DERTaggedObject = function(r) {
2545
+ f.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(t, e, n) {
2546
+ this.hT = e, this.isExplicit = t, this.asn1Object = n, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = n.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, e), this.isModified = !1);
2547
+ }, this.getFreshValueHex = function() {
2548
+ return this.hV;
2549
+ }, typeof r < "u" && (typeof r.tag < "u" && (this.hT = r.tag), typeof r.explicit < "u" && (this.isExplicit = r.explicit), typeof r.obj < "u" && (this.asn1Object = r.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
2550
+ };
2551
+ E.lang.extend(f.asn1.DERTaggedObject, f.asn1.ASN1Object);
2552
+ var Fe = /* @__PURE__ */ function() {
2553
+ var r = function(t, e) {
2554
+ return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, s) {
2555
+ n.__proto__ = s;
2556
+ } || function(n, s) {
2557
+ for (var i in s)
2558
+ Object.prototype.hasOwnProperty.call(s, i) && (n[i] = s[i]);
2559
+ }, r(t, e);
2560
+ };
2561
+ return function(t, e) {
2562
+ if (typeof e != "function" && e !== null)
2563
+ throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
2564
+ r(t, e);
2565
+ function n() {
2566
+ this.constructor = t;
2567
+ }
2568
+ t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
2569
+ };
2570
+ }(), Bt = (
2571
+ /** @class */
2572
+ function(r) {
2573
+ Fe(t, r);
2574
+ function t(e) {
2575
+ var n = r.call(this) || this;
2576
+ return e && (typeof e == "string" ? n.parseKey(e) : (t.hasPrivateKeyProperty(e) || t.hasPublicKeyProperty(e)) && n.parsePropertiesFrom(e)), n;
2577
+ }
2578
+ return t.prototype.parseKey = function(e) {
2579
+ try {
2580
+ var n = 0, s = 0, i = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, o = i.test(e) ? be.decode(e) : lt.unarmor(e), a = De.decode(o);
2581
+ if (a.sub.length === 3 && (a = a.sub[2].sub[0]), a.sub.length === 9) {
2582
+ n = a.sub[1].getHexStringValue(), this.n = T(n, 16), s = a.sub[2].getHexStringValue(), this.e = parseInt(s, 16);
2583
+ var u = a.sub[3].getHexStringValue();
2584
+ this.d = T(u, 16);
2585
+ var h = a.sub[4].getHexStringValue();
2586
+ this.p = T(h, 16);
2587
+ var l = a.sub[5].getHexStringValue();
2588
+ this.q = T(l, 16);
2589
+ var c = a.sub[6].getHexStringValue();
2590
+ this.dmp1 = T(c, 16);
2591
+ var v = a.sub[7].getHexStringValue();
2592
+ this.dmq1 = T(v, 16);
2593
+ var y = a.sub[8].getHexStringValue();
2594
+ this.coeff = T(y, 16);
2595
+ } else if (a.sub.length === 2)
2596
+ if (a.sub[0].sub) {
2597
+ var S = a.sub[1], b = S.sub[0];
2598
+ n = b.sub[0].getHexStringValue(), this.n = T(n, 16), s = b.sub[1].getHexStringValue(), this.e = parseInt(s, 16);
2599
+ } else
2600
+ n = a.sub[0].getHexStringValue(), this.n = T(n, 16), s = a.sub[1].getHexStringValue(), this.e = parseInt(s, 16);
2601
+ else
2602
+ return !1;
2603
+ return !0;
2604
+ } catch {
2605
+ return !1;
2606
+ }
2607
+ }, t.prototype.getPrivateBaseKey = function() {
2608
+ var e = {
2609
+ array: [
2610
+ new f.asn1.DERInteger({ int: 0 }),
2611
+ new f.asn1.DERInteger({ bigint: this.n }),
2612
+ new f.asn1.DERInteger({ int: this.e }),
2613
+ new f.asn1.DERInteger({ bigint: this.d }),
2614
+ new f.asn1.DERInteger({ bigint: this.p }),
2615
+ new f.asn1.DERInteger({ bigint: this.q }),
2616
+ new f.asn1.DERInteger({ bigint: this.dmp1 }),
2617
+ new f.asn1.DERInteger({ bigint: this.dmq1 }),
2618
+ new f.asn1.DERInteger({ bigint: this.coeff })
2619
+ ]
2620
+ }, n = new f.asn1.DERSequence(e);
2621
+ return n.getEncodedHex();
2622
+ }, t.prototype.getPrivateBaseKeyB64 = function() {
2623
+ return it(this.getPrivateBaseKey());
2624
+ }, t.prototype.getPublicBaseKey = function() {
2625
+ var e = new f.asn1.DERSequence({
2626
+ array: [
2627
+ new f.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),
2628
+ new f.asn1.DERNull()
2629
+ ]
2630
+ }), n = new f.asn1.DERSequence({
2631
+ array: [
2632
+ new f.asn1.DERInteger({ bigint: this.n }),
2633
+ new f.asn1.DERInteger({ int: this.e })
2634
+ ]
2635
+ }), s = new f.asn1.DERBitString({
2636
+ hex: "00" + n.getEncodedHex()
2637
+ }), i = new f.asn1.DERSequence({
2638
+ array: [e, s]
2639
+ });
2640
+ return i.getEncodedHex();
2641
+ }, t.prototype.getPublicBaseKeyB64 = function() {
2642
+ return it(this.getPublicBaseKey());
2643
+ }, t.wordwrap = function(e, n) {
2644
+ if (n = n || 64, !e)
2645
+ return e;
2646
+ var s = "(.{1," + n + `})( +|$
2647
+ ?)|(.{1,` + n + "})";
2648
+ return e.match(RegExp(s, "g")).join(`
2649
+ `);
2650
+ }, t.prototype.getPrivateKey = function() {
2651
+ var e = `-----BEGIN RSA PRIVATE KEY-----
2652
+ `;
2653
+ return e += t.wordwrap(this.getPrivateBaseKeyB64()) + `
2654
+ `, e += "-----END RSA PRIVATE KEY-----", e;
2655
+ }, t.prototype.getPublicKey = function() {
2656
+ var e = `-----BEGIN PUBLIC KEY-----
2657
+ `;
2658
+ return e += t.wordwrap(this.getPublicBaseKeyB64()) + `
2659
+ `, e += "-----END PUBLIC KEY-----", e;
2660
+ }, t.hasPublicKeyProperty = function(e) {
2661
+ return e = e || {}, e.hasOwnProperty("n") && e.hasOwnProperty("e");
2662
+ }, t.hasPrivateKeyProperty = function(e) {
2663
+ return e = e || {}, e.hasOwnProperty("n") && e.hasOwnProperty("e") && e.hasOwnProperty("d") && e.hasOwnProperty("p") && e.hasOwnProperty("q") && e.hasOwnProperty("dmp1") && e.hasOwnProperty("dmq1") && e.hasOwnProperty("coeff");
2664
+ }, t.prototype.parsePropertiesFrom = function(e) {
2665
+ this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
2666
+ }, t;
2667
+ }(Ve)
2668
+ ), ht, ke = typeof process < "u" ? (ht = process.env) === null || ht === void 0 ? void 0 : ht.npm_package_version : void 0, He = (
2669
+ /** @class */
2670
+ function() {
2671
+ function r(t) {
2672
+ t === void 0 && (t = {}), t = t || {}, this.default_key_size = t.default_key_size ? parseInt(t.default_key_size, 10) : 1024, this.default_public_exponent = t.default_public_exponent || "010001", this.log = t.log || !1, this.key = null;
2673
+ }
2674
+ return r.prototype.setKey = function(t) {
2675
+ this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Bt(t);
2676
+ }, r.prototype.setPrivateKey = function(t) {
2677
+ this.setKey(t);
2678
+ }, r.prototype.setPublicKey = function(t) {
2679
+ this.setKey(t);
2680
+ }, r.prototype.decrypt = function(t) {
2681
+ try {
2682
+ return this.getKey().decrypt(Dt(t));
2683
+ } catch {
2684
+ return !1;
2685
+ }
2686
+ }, r.prototype.encrypt = function(t) {
2687
+ try {
2688
+ return it(this.getKey().encrypt(t));
2689
+ } catch {
2690
+ return !1;
2691
+ }
2692
+ }, r.prototype.sign = function(t, e, n) {
2693
+ try {
2694
+ return it(this.getKey().sign(t, e, n));
2695
+ } catch {
2696
+ return !1;
2697
+ }
2698
+ }, r.prototype.verify = function(t, e, n) {
2699
+ try {
2700
+ return this.getKey().verify(t, Dt(e), n);
2701
+ } catch {
2702
+ return !1;
2703
+ }
2704
+ }, r.prototype.getKey = function(t) {
2705
+ if (!this.key) {
2706
+ if (this.key = new Bt(), t && {}.toString.call(t) === "[object Function]") {
2707
+ this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
2708
+ return;
2709
+ }
2710
+ this.key.generate(this.default_key_size, this.default_public_exponent);
2711
+ }
2712
+ return this.key;
2713
+ }, r.prototype.getPrivateKey = function() {
2714
+ return this.getKey().getPrivateKey();
2715
+ }, r.prototype.getPrivateKeyB64 = function() {
2716
+ return this.getKey().getPrivateBaseKeyB64();
2717
+ }, r.prototype.getPublicKey = function() {
2718
+ return this.getKey().getPublicKey();
2719
+ }, r.prototype.getPublicKeyB64 = function() {
2720
+ return this.getKey().getPublicBaseKeyB64();
2721
+ }, r.version = ke, r;
2722
+ }()
2723
+ );
2724
+ const je = {
2725
+ status: 200,
2726
+ message: "",
2727
+ key: ""
2728
+ }, Zt = {
2729
+ status: 200,
2730
+ message: "",
2731
+ data: {
2732
+ msg: "",
2733
+ accessToken: "",
2734
+ fullName: "",
2735
+ unreadMailCount: "",
2736
+ status: "",
2737
+ username: "",
2738
+ walletAmount: "",
2739
+ captcha: ""
2740
+ }
2741
+ };
2742
+ async function qe(r, t, e, n, s) {
2743
+ const i = Zt, o = r, a = t, u = e, h = s;
2744
+ try {
2745
+ const l = await Ut([
2746
+ "slide-verification",
2747
+ "encryptkey",
2748
+ "CAPTCHA"
2749
+ ]), c = l.data.verificationBeforeLogin, v = l.data.publicKey, y = l.data.csrf, S = l.data.getCaptcha;
2750
+ let b = "";
2751
+ if (c) {
2752
+ const p = await R.get("/mbuhx0as4kui?ajax=1", {
2753
+ params: {
2754
+ render: m()
2755
+ }
2756
+ });
2757
+ let I;
2758
+ if (m() ? I = JSON.parse(A(p.data)) : I = p.data, p.status != 200)
2759
+ return i.status = p.status, i.message = "", i;
2760
+ b = I.key;
2761
+ }
2762
+ const D = new He();
2763
+ D.setPublicKey(v);
2764
+ let x = n.host.split(":")[0];
2765
+ const O = D.encrypt(x.trim());
2766
+ O && x.length < 53 ? x = O : x = x.trim();
2767
+ const w = {};
2768
+ w.fr_username = D.encrypt(o.trim()), w.fr_password = D.encrypt(a.trim()), w.fr_gdcode = u, w.isApp = h, w.domain = x, w._token = y, w.json = 1, w.encrypt = 1;
2769
+ const L = await R.post("/kdink8anl8z3", {
2770
+ headers: {
2771
+ "X-CSRF-TOKEN": y
2772
+ },
2773
+ params: {
2774
+ render: m()
2775
+ },
2776
+ data: w,
2777
+ key: b
2778
+ });
2779
+ let B;
2780
+ return m() ? B = JSON.parse(A(L.data)) : B = L.data, L.status != 200 ? (i.status = L.status, i.message = "", i) : (i.data = {
2781
+ msg: B.msg ?? "",
2782
+ accessToken: B.access_token ?? "",
2783
+ fullName: B.fullname ?? "",
2784
+ unreadMailCount: B.news ?? "",
2785
+ status: B.status ?? "",
2786
+ username: B.username ?? "",
2787
+ walletAmount: B.wallet ?? "",
2788
+ captcha: S ?? ""
2789
+ }, i);
2790
+ } catch (l) {
2791
+ const c = l;
2792
+ return i.status = c.status || 500, i.message = c.message, i;
705
2793
  }
706
2794
  }
707
2795
  export {
708
- $ as Repository,
709
- E as cmsList,
710
- F as csLink,
711
- M as currentLang,
712
- k as eGame,
713
- G as fishGames,
714
- B as getLocale,
715
- j as home,
716
- A as hotGames,
717
- T as promotion,
718
- N as trialGames
2796
+ Ke as Repository,
2797
+ re as cmsList,
2798
+ ae as csLink,
2799
+ se as currentLang,
2800
+ oe as eGame,
2801
+ Wt as fishGames,
2802
+ ie as getLocale,
2803
+ ue as getSetting,
2804
+ ne as home,
2805
+ Qt as hotGames,
2806
+ fe as login,
2807
+ ee as promotion,
2808
+ te as trialGames
719
2809
  };