50p82u21t54k 0.0.35 → 0.0.37

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