@danidoble/webserial 4.5.0 → 4.6.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/boardroid.js +1 -1
- package/dist/jofemar.js +1 -1
- package/dist/jsd.cjs +1 -1
- package/dist/jsd.js +1014 -229
- package/dist/{kernel-D9C1iBu-.js → kernel-ClC2wiQo.js} +3 -3
- package/dist/kernel.js +1 -1
- package/dist/locker.js +1 -1
- package/dist/pinpad.cjs +14 -14
- package/dist/pinpad.js +882 -832
- package/dist/pinpax.js +1 -1
- package/dist/relay.js +1 -1
- package/dist/types/lib/commands/jsd/applications/licensing.d.ts +7 -0
- package/dist/types/lib/commands/jsd/applications/licensing.d.ts.map +1 -1
- package/dist/types/lib/commands/jsd/applications/mdbCardHolder.d.ts +178 -0
- package/dist/types/lib/commands/jsd/applications/mdbCardHolder.d.ts.map +1 -0
- package/dist/types/lib/commands/jsd/frames/licensing/licensingClient.d.ts +5 -0
- package/dist/types/lib/commands/jsd/frames/licensing/licensingClient.d.ts.map +1 -1
- package/dist/types/lib/commands/jsd/frames/licensing/opCodes.d.ts +3 -0
- package/dist/types/lib/commands/jsd/frames/licensing/opCodes.d.ts.map +1 -1
- package/dist/types/lib/commands/jsd/frames/mdb-card-holder/mdbCardHolderClient.d.ts +114 -0
- package/dist/types/lib/commands/jsd/frames/mdb-card-holder/mdbCardHolderClient.d.ts.map +1 -0
- package/dist/types/lib/commands/jsd/frames/mdb-card-holder/opCodes.d.ts +52 -0
- package/dist/types/lib/commands/jsd/frames/mdb-card-holder/opCodes.d.ts.map +1 -0
- package/dist/types/lib/commands/jsd/types/LicensingClient.d.ts +13 -0
- package/dist/types/lib/commands/jsd/types/LicensingClient.d.ts.map +1 -1
- package/dist/types/lib/commands/jsd/types/mdbCardHolder.types.d.ts +200 -0
- package/dist/types/lib/commands/jsd/types/mdbCardHolder.types.d.ts.map +1 -0
- package/dist/types/lib/commands/jsd/utils/aplications.d.ts +18 -0
- package/dist/types/lib/commands/jsd/utils/aplications.d.ts.map +1 -1
- package/dist/types/lib/serial/jsd.d.ts +2 -0
- package/dist/types/lib/serial/jsd.d.ts.map +1 -1
- package/dist/webserial.js +6 -6
- package/package.json +5 -5
package/dist/pinpad.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { K as
|
|
2
|
-
import { D as
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
return
|
|
1
|
+
import { K as Bn, a as xn, i as J, b as Ae, w as Re } from "./kernel-ClC2wiQo.js";
|
|
2
|
+
import { D as Ce } from "./devices-CzEcntFZ.js";
|
|
3
|
+
var Un = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
4
|
+
function et(i) {
|
|
5
|
+
return Un.charAt(i);
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function Ln(i, t) {
|
|
8
8
|
return i & t;
|
|
9
9
|
}
|
|
10
10
|
function Bt(i, t) {
|
|
11
11
|
return i | t;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Oe(i, t) {
|
|
14
14
|
return i ^ t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function De(i, t) {
|
|
17
17
|
return i & ~t;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Vn(i) {
|
|
20
20
|
if (i == 0)
|
|
21
21
|
return -1;
|
|
22
22
|
var t = 0;
|
|
23
23
|
return (i & 65535) == 0 && (i >>= 16, t += 16), (i & 255) == 0 && (i >>= 8, t += 8), (i & 15) == 0 && (i >>= 4, t += 4), (i & 3) == 0 && (i >>= 2, t += 2), (i & 1) == 0 && ++t, t;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Mn(i) {
|
|
26
26
|
for (var t = 0; i != 0; )
|
|
27
27
|
i &= i - 1, ++t;
|
|
28
28
|
return t;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
31
|
-
function
|
|
30
|
+
var yt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", nn = "=";
|
|
31
|
+
function Rt(i) {
|
|
32
32
|
var t, e, n = "";
|
|
33
33
|
for (t = 0; t + 3 <= i.length; t += 3)
|
|
34
|
-
e = parseInt(i.substring(t, t + 3), 16), n +=
|
|
35
|
-
for (t + 1 == i.length ? (e = parseInt(i.substring(t, t + 1), 16), n +=
|
|
36
|
-
n +=
|
|
34
|
+
e = parseInt(i.substring(t, t + 3), 16), n += yt.charAt(e >> 6) + yt.charAt(e & 63);
|
|
35
|
+
for (t + 1 == i.length ? (e = parseInt(i.substring(t, t + 1), 16), n += yt.charAt(e << 2)) : t + 2 == i.length && (e = parseInt(i.substring(t, t + 2), 16), n += yt.charAt(e >> 2) + yt.charAt((e & 3) << 4)); (n.length & 3) > 0; )
|
|
36
|
+
n += nn;
|
|
37
37
|
return n;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Ie(i) {
|
|
40
40
|
var t = "", e, n = 0, r = 0;
|
|
41
|
-
for (e = 0; e < i.length && i.charAt(e) !=
|
|
42
|
-
var s =
|
|
43
|
-
s < 0 || (n == 0 ? (t +=
|
|
41
|
+
for (e = 0; e < i.length && i.charAt(e) != nn; ++e) {
|
|
42
|
+
var s = yt.indexOf(i.charAt(e));
|
|
43
|
+
s < 0 || (n == 0 ? (t += et(s >> 2), r = s & 3, n = 1) : n == 1 ? (t += et(r << 2 | s >> 4), r = s & 15, n = 2) : n == 2 ? (t += et(r), t += et(s >> 2), r = s & 3, n = 3) : (t += et(r << 2 | s >> 4), t += et(s & 15), n = 0));
|
|
44
44
|
}
|
|
45
|
-
return n == 1 && (t +=
|
|
45
|
+
return n == 1 && (t += et(r << 2)), t;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
47
|
+
var _t, Fn = {
|
|
48
48
|
decode: function(i) {
|
|
49
49
|
var t;
|
|
50
|
-
if (
|
|
50
|
+
if (_t === void 0) {
|
|
51
51
|
var e = "0123456789ABCDEF", n = ` \f
|
|
52
52
|
\r \u2028\u2029`;
|
|
53
|
-
for (
|
|
54
|
-
|
|
53
|
+
for (_t = {}, t = 0; t < 16; ++t)
|
|
54
|
+
_t[e.charAt(t)] = t;
|
|
55
55
|
for (e = e.toLowerCase(), t = 10; t < 16; ++t)
|
|
56
|
-
|
|
56
|
+
_t[e.charAt(t)] = t;
|
|
57
57
|
for (t = 0; t < n.length; ++t)
|
|
58
|
-
|
|
58
|
+
_t[n.charAt(t)] = -1;
|
|
59
59
|
}
|
|
60
60
|
var r = [], s = 0, a = 0;
|
|
61
61
|
for (t = 0; t < i.length; ++t) {
|
|
62
62
|
var o = i.charAt(t);
|
|
63
63
|
if (o == "=")
|
|
64
64
|
break;
|
|
65
|
-
if (o =
|
|
65
|
+
if (o = _t[o], o != -1) {
|
|
66
66
|
if (o === void 0)
|
|
67
67
|
throw new Error("Illegal character at offset " + t);
|
|
68
68
|
s |= o, ++a >= 2 ? (r[r.length] = s, s = 0, a = 0) : s <<= 4;
|
|
@@ -72,23 +72,23 @@ var pt, Ln = {
|
|
|
72
72
|
throw new Error("Hex encoding incomplete: 4 bits missing");
|
|
73
73
|
return r;
|
|
74
74
|
}
|
|
75
|
-
},
|
|
75
|
+
}, ct, ce = {
|
|
76
76
|
decode: function(i) {
|
|
77
77
|
var t;
|
|
78
|
-
if (
|
|
78
|
+
if (ct === void 0) {
|
|
79
79
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = `= \f
|
|
80
80
|
\r \u2028\u2029`;
|
|
81
|
-
for (
|
|
82
|
-
|
|
83
|
-
for (
|
|
84
|
-
|
|
81
|
+
for (ct = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
|
|
82
|
+
ct[e.charAt(t)] = t;
|
|
83
|
+
for (ct["-"] = 62, ct._ = 63, t = 0; t < n.length; ++t)
|
|
84
|
+
ct[n.charAt(t)] = -1;
|
|
85
85
|
}
|
|
86
86
|
var r = [], s = 0, a = 0;
|
|
87
87
|
for (t = 0; t < i.length; ++t) {
|
|
88
88
|
var o = i.charAt(t);
|
|
89
89
|
if (o == "=")
|
|
90
90
|
break;
|
|
91
|
-
if (o =
|
|
91
|
+
if (o = ct[o], o != -1) {
|
|
92
92
|
if (o === void 0)
|
|
93
93
|
throw new Error("Illegal character at offset " + t);
|
|
94
94
|
s |= o, ++a >= 4 ? (r[r.length] = s >> 16, r[r.length] = s >> 8 & 255, r[r.length] = s & 255, s = 0, a = 0) : s <<= 6;
|
|
@@ -118,7 +118,7 @@ var pt, Ln = {
|
|
|
118
118
|
throw new Error("RegExp out of sync");
|
|
119
119
|
return ce.decode(i);
|
|
120
120
|
}
|
|
121
|
-
},
|
|
121
|
+
}, gt = 1e13, At = (
|
|
122
122
|
/** @class */
|
|
123
123
|
(function() {
|
|
124
124
|
function i(t) {
|
|
@@ -127,32 +127,32 @@ var pt, Ln = {
|
|
|
127
127
|
return i.prototype.mulAdd = function(t, e) {
|
|
128
128
|
var n = this.buf, r = n.length, s, a;
|
|
129
129
|
for (s = 0; s < r; ++s)
|
|
130
|
-
a = n[s] * t + e, a <
|
|
130
|
+
a = n[s] * t + e, a < gt ? e = 0 : (e = 0 | a / gt, a -= e * gt), n[s] = a;
|
|
131
131
|
e > 0 && (n[s] = e);
|
|
132
132
|
}, i.prototype.sub = function(t) {
|
|
133
133
|
var e = this.buf, n = e.length, r, s;
|
|
134
134
|
for (r = 0; r < n; ++r)
|
|
135
|
-
s = e[r] - t, s < 0 ? (s +=
|
|
135
|
+
s = e[r] - t, s < 0 ? (s += gt, t = 1) : t = 0, e[r] = s;
|
|
136
136
|
for (; e[e.length - 1] === 0; )
|
|
137
137
|
e.pop();
|
|
138
138
|
}, i.prototype.toString = function(t) {
|
|
139
139
|
if ((t || 10) != 10)
|
|
140
140
|
throw new Error("only base 10 is supported");
|
|
141
141
|
for (var e = this.buf, n = e[e.length - 1].toString(), r = e.length - 2; r >= 0; --r)
|
|
142
|
-
n += (
|
|
142
|
+
n += (gt + e[r]).toString().substring(1);
|
|
143
143
|
return n;
|
|
144
144
|
}, i.prototype.valueOf = function() {
|
|
145
145
|
for (var t = this.buf, e = 0, n = t.length - 1; n >= 0; --n)
|
|
146
|
-
e = e *
|
|
146
|
+
e = e * gt + t[n];
|
|
147
147
|
return e;
|
|
148
148
|
}, i.prototype.simplify = function() {
|
|
149
149
|
var t = this.buf;
|
|
150
150
|
return t.length == 1 ? t[0] : this;
|
|
151
151
|
}, i;
|
|
152
152
|
})()
|
|
153
|
-
),
|
|
154
|
-
function
|
|
155
|
-
return i.length > t && (i = i.substring(0, t) +
|
|
153
|
+
), rn = "…", kn = /^(\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)?)?$/, jn = /^(\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)?)?$/;
|
|
154
|
+
function bt(i, t) {
|
|
155
|
+
return i.length > t && (i = i.substring(0, t) + rn), i;
|
|
156
156
|
}
|
|
157
157
|
var ee = (
|
|
158
158
|
/** @class */
|
|
@@ -203,7 +203,7 @@ var ee = (
|
|
|
203
203
|
r = this.get(a++), s = this.get(a++), n += String.fromCharCode(r << 8 | s);
|
|
204
204
|
return n;
|
|
205
205
|
}, i.prototype.parseTime = function(t, e, n) {
|
|
206
|
-
var r = this.parseStringISO(t, e), s = (n ?
|
|
206
|
+
var r = this.parseStringISO(t, e), s = (n ? kn : jn).exec(r);
|
|
207
207
|
return s ? (n && (s[1] = +s[1], s[1] += +s[1] < 70 ? 2e3 : 1900), r = s[1] + "-" + s[2] + "-" + s[3] + " " + s[4], s[5] && (r += ":" + s[5], s[6] && (r += ":" + s[6], s[7] && (r += "." + s[7]))), s[8] && (r += " UTC", s[8] != "Z" && (r += s[8], s[9] && (r += ":" + s[9]))), r) : "Unrecognized time: " + r;
|
|
208
208
|
}, i.prototype.parseInteger = function(t, e) {
|
|
209
209
|
for (var n = this.get(t), r = n > 127, s = r ? 255 : 0, a, o = ""; n == s && ++t < e; )
|
|
@@ -217,7 +217,7 @@ var ee = (
|
|
|
217
217
|
`;
|
|
218
218
|
}
|
|
219
219
|
r && (n = n - 256);
|
|
220
|
-
for (var c = new
|
|
220
|
+
for (var c = new At(n), u = t + 1; u < e; ++u)
|
|
221
221
|
c.mulAdd(256, this.get(u));
|
|
222
222
|
return o + c.toString();
|
|
223
223
|
}, i.prototype.parseBitString = function(t, e, n) {
|
|
@@ -226,24 +226,24 @@ var ee = (
|
|
|
226
226
|
for (var u = this.get(c), l = c == e - 1 ? r : 0, f = 7; f >= l; --f)
|
|
227
227
|
o += u >> f & 1 ? "1" : "0";
|
|
228
228
|
if (o.length > n)
|
|
229
|
-
return a +
|
|
229
|
+
return a + bt(o, n);
|
|
230
230
|
}
|
|
231
231
|
return a + o;
|
|
232
232
|
}, i.prototype.parseOctetString = function(t, e, n) {
|
|
233
233
|
if (this.isASCII(t, e))
|
|
234
|
-
return
|
|
234
|
+
return bt(this.parseStringISO(t, e), n);
|
|
235
235
|
var r = e - t, s = "(" + r + ` byte)
|
|
236
236
|
`;
|
|
237
237
|
n /= 2, r > n && (e = t + n);
|
|
238
238
|
for (var a = t; a < e; ++a)
|
|
239
239
|
s += this.hexByte(this.get(a));
|
|
240
|
-
return r > n && (s +=
|
|
240
|
+
return r > n && (s += rn), s;
|
|
241
241
|
}, i.prototype.parseOID = function(t, e, n) {
|
|
242
|
-
for (var r = "", s = new
|
|
242
|
+
for (var r = "", s = new At(), a = 0, o = t; o < e; ++o) {
|
|
243
243
|
var c = this.get(o);
|
|
244
244
|
if (s.mulAdd(128, c & 127), a += 7, !(c & 128)) {
|
|
245
245
|
if (r === "")
|
|
246
|
-
if (s = s.simplify(), s instanceof
|
|
246
|
+
if (s = s.simplify(), s instanceof At)
|
|
247
247
|
s.sub(80), r = "2." + s.toString();
|
|
248
248
|
else {
|
|
249
249
|
var u = s < 80 ? s < 40 ? 0 : 1 : 2;
|
|
@@ -252,18 +252,18 @@ var ee = (
|
|
|
252
252
|
else
|
|
253
253
|
r += "." + s.toString();
|
|
254
254
|
if (r.length > n)
|
|
255
|
-
return
|
|
256
|
-
s = new
|
|
255
|
+
return bt(r, n);
|
|
256
|
+
s = new At(), a = 0;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
return a > 0 && (r += ".incomplete"), r;
|
|
260
260
|
}, i;
|
|
261
261
|
})()
|
|
262
|
-
),
|
|
262
|
+
), qn = (
|
|
263
263
|
/** @class */
|
|
264
264
|
(function() {
|
|
265
265
|
function i(t, e, n, r, s) {
|
|
266
|
-
if (!(r instanceof
|
|
266
|
+
if (!(r instanceof Ne))
|
|
267
267
|
throw new Error("Invalid tag value.");
|
|
268
268
|
this.stream = t, this.header = e, this.length = n, this.tag = r, this.sub = s;
|
|
269
269
|
}
|
|
@@ -368,7 +368,7 @@ var ee = (
|
|
|
368
368
|
case 17:
|
|
369
369
|
return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
|
|
370
370
|
case 12:
|
|
371
|
-
return
|
|
371
|
+
return bt(this.stream.parseStringUTF(e, e + n), t);
|
|
372
372
|
case 18:
|
|
373
373
|
// NumericString
|
|
374
374
|
case 19:
|
|
@@ -381,9 +381,9 @@ var ee = (
|
|
|
381
381
|
// IA5String
|
|
382
382
|
// case 0x19: // GraphicString
|
|
383
383
|
case 26:
|
|
384
|
-
return
|
|
384
|
+
return bt(this.stream.parseStringISO(e, e + n), t);
|
|
385
385
|
case 30:
|
|
386
|
-
return
|
|
386
|
+
return bt(this.stream.parseStringBMP(e, e + n), t);
|
|
387
387
|
case 23:
|
|
388
388
|
// UTCTime
|
|
389
389
|
case 24:
|
|
@@ -428,7 +428,7 @@ var ee = (
|
|
|
428
428
|
}, i.decode = function(t) {
|
|
429
429
|
var e;
|
|
430
430
|
t instanceof ee ? e = t : e = new ee(t, 0);
|
|
431
|
-
var n = new ee(e), r = new
|
|
431
|
+
var n = new ee(e), r = new Ne(e), s = i.decodeLength(e), a = e.pos, o = a - n.pos, c = null, u = function() {
|
|
432
432
|
var f = [];
|
|
433
433
|
if (s !== null) {
|
|
434
434
|
for (var d = a + s; e.pos < d; )
|
|
@@ -470,13 +470,13 @@ var ee = (
|
|
|
470
470
|
return new i(n, o, s, r, c);
|
|
471
471
|
}, i;
|
|
472
472
|
})()
|
|
473
|
-
),
|
|
473
|
+
), Ne = (
|
|
474
474
|
/** @class */
|
|
475
475
|
(function() {
|
|
476
476
|
function i(t) {
|
|
477
477
|
var e = t.get();
|
|
478
478
|
if (this.tagClass = e >> 6, this.tagConstructed = (e & 32) !== 0, this.tagNumber = e & 31, this.tagNumber == 31) {
|
|
479
|
-
var n = new
|
|
479
|
+
var n = new At();
|
|
480
480
|
do
|
|
481
481
|
e = t.get(), n.mulAdd(128, e & 127);
|
|
482
482
|
while (e & 128);
|
|
@@ -489,7 +489,7 @@ var ee = (
|
|
|
489
489
|
return this.tagClass === 0 && this.tagNumber === 0;
|
|
490
490
|
}, i;
|
|
491
491
|
})()
|
|
492
|
-
),
|
|
492
|
+
), st, Kn = 244837814094590, Be = (Kn & 16777215) == 15715070, L = [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], Hn = (1 << 26) / L[L.length - 1], w = (
|
|
493
493
|
/** @class */
|
|
494
494
|
(function() {
|
|
495
495
|
function i(t, e, n) {
|
|
@@ -513,11 +513,11 @@ var ee = (
|
|
|
513
513
|
return this.toRadix(t);
|
|
514
514
|
var n = (1 << e) - 1, r, s = !1, a = "", o = this.t, c = this.DB - o * this.DB % e;
|
|
515
515
|
if (o-- > 0)
|
|
516
|
-
for (c < this.DB && (r = this[o] >> c) > 0 && (s = !0, a =
|
|
517
|
-
c < e ? (r = (this[o] & (1 << c) - 1) << e - c, r |= this[--o] >> (c += this.DB - e)) : (r = this[o] >> (c -= e) & n, c <= 0 && (c += this.DB, --o)), r > 0 && (s = !0), s && (a +=
|
|
516
|
+
for (c < this.DB && (r = this[o] >> c) > 0 && (s = !0, a = et(r)); o >= 0; )
|
|
517
|
+
c < e ? (r = (this[o] & (1 << c) - 1) << e - c, r |= this[--o] >> (c += this.DB - e)) : (r = this[o] >> (c -= e) & n, c <= 0 && (c += this.DB, --o)), r > 0 && (s = !0), s && (a += et(r));
|
|
518
518
|
return s ? a : "0";
|
|
519
519
|
}, i.prototype.negate = function() {
|
|
520
|
-
var t =
|
|
520
|
+
var t = T();
|
|
521
521
|
return i.ZERO.subTo(this, t), t;
|
|
522
522
|
}, i.prototype.abs = function() {
|
|
523
523
|
return this.s < 0 ? this.negate() : this;
|
|
@@ -535,13 +535,13 @@ var ee = (
|
|
|
535
535
|
}, i.prototype.bitLength = function() {
|
|
536
536
|
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + xt(this[this.t - 1] ^ this.s & this.DM);
|
|
537
537
|
}, i.prototype.mod = function(t) {
|
|
538
|
-
var e =
|
|
538
|
+
var e = T();
|
|
539
539
|
return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(i.ZERO) > 0 && t.subTo(e, e), e;
|
|
540
540
|
}, i.prototype.modPowInt = function(t, e) {
|
|
541
541
|
var n;
|
|
542
|
-
return t < 256 || e.isEven() ? n = new
|
|
542
|
+
return t < 256 || e.isEven() ? n = new xe(e) : n = new Ue(e), this.exp(t, n);
|
|
543
543
|
}, i.prototype.clone = function() {
|
|
544
|
-
var t =
|
|
544
|
+
var t = T();
|
|
545
545
|
return this.copyTo(t), t;
|
|
546
546
|
}, i.prototype.intValue = function() {
|
|
547
547
|
if (this.s < 0) {
|
|
@@ -577,35 +577,35 @@ var ee = (
|
|
|
577
577
|
}, i.prototype.max = function(t) {
|
|
578
578
|
return this.compareTo(t) > 0 ? this : t;
|
|
579
579
|
}, i.prototype.and = function(t) {
|
|
580
|
-
var e =
|
|
581
|
-
return this.bitwiseTo(t,
|
|
580
|
+
var e = T();
|
|
581
|
+
return this.bitwiseTo(t, Ln, e), e;
|
|
582
582
|
}, i.prototype.or = function(t) {
|
|
583
|
-
var e =
|
|
583
|
+
var e = T();
|
|
584
584
|
return this.bitwiseTo(t, Bt, e), e;
|
|
585
585
|
}, i.prototype.xor = function(t) {
|
|
586
|
-
var e =
|
|
587
|
-
return this.bitwiseTo(t, Ce, e), e;
|
|
588
|
-
}, i.prototype.andNot = function(t) {
|
|
589
|
-
var e = S();
|
|
586
|
+
var e = T();
|
|
590
587
|
return this.bitwiseTo(t, Oe, e), e;
|
|
588
|
+
}, i.prototype.andNot = function(t) {
|
|
589
|
+
var e = T();
|
|
590
|
+
return this.bitwiseTo(t, De, e), e;
|
|
591
591
|
}, i.prototype.not = function() {
|
|
592
|
-
for (var t =
|
|
592
|
+
for (var t = T(), e = 0; e < this.t; ++e)
|
|
593
593
|
t[e] = this.DM & ~this[e];
|
|
594
594
|
return t.t = this.t, t.s = ~this.s, t;
|
|
595
595
|
}, i.prototype.shiftLeft = function(t) {
|
|
596
|
-
var e =
|
|
596
|
+
var e = T();
|
|
597
597
|
return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
|
|
598
598
|
}, i.prototype.shiftRight = function(t) {
|
|
599
|
-
var e =
|
|
599
|
+
var e = T();
|
|
600
600
|
return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
|
|
601
601
|
}, i.prototype.getLowestSetBit = function() {
|
|
602
602
|
for (var t = 0; t < this.t; ++t)
|
|
603
603
|
if (this[t] != 0)
|
|
604
|
-
return t * this.DB +
|
|
604
|
+
return t * this.DB + Vn(this[t]);
|
|
605
605
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
606
606
|
}, i.prototype.bitCount = function() {
|
|
607
607
|
for (var t = 0, e = this.s & this.DM, n = 0; n < this.t; ++n)
|
|
608
|
-
t +=
|
|
608
|
+
t += Mn(this[n] ^ e);
|
|
609
609
|
return t;
|
|
610
610
|
}, i.prototype.testBit = function(t) {
|
|
611
611
|
var e = Math.floor(t / this.DB);
|
|
@@ -613,39 +613,39 @@ var ee = (
|
|
|
613
613
|
}, i.prototype.setBit = function(t) {
|
|
614
614
|
return this.changeBit(t, Bt);
|
|
615
615
|
}, i.prototype.clearBit = function(t) {
|
|
616
|
-
return this.changeBit(t,
|
|
616
|
+
return this.changeBit(t, De);
|
|
617
617
|
}, i.prototype.flipBit = function(t) {
|
|
618
|
-
return this.changeBit(t,
|
|
618
|
+
return this.changeBit(t, Oe);
|
|
619
619
|
}, i.prototype.add = function(t) {
|
|
620
|
-
var e =
|
|
620
|
+
var e = T();
|
|
621
621
|
return this.addTo(t, e), e;
|
|
622
622
|
}, i.prototype.subtract = function(t) {
|
|
623
|
-
var e =
|
|
623
|
+
var e = T();
|
|
624
624
|
return this.subTo(t, e), e;
|
|
625
625
|
}, i.prototype.multiply = function(t) {
|
|
626
|
-
var e =
|
|
626
|
+
var e = T();
|
|
627
627
|
return this.multiplyTo(t, e), e;
|
|
628
628
|
}, i.prototype.divide = function(t) {
|
|
629
|
-
var e =
|
|
629
|
+
var e = T();
|
|
630
630
|
return this.divRemTo(t, e, null), e;
|
|
631
631
|
}, i.prototype.remainder = function(t) {
|
|
632
|
-
var e =
|
|
632
|
+
var e = T();
|
|
633
633
|
return this.divRemTo(t, null, e), e;
|
|
634
634
|
}, i.prototype.divideAndRemainder = function(t) {
|
|
635
|
-
var e =
|
|
635
|
+
var e = T(), n = T();
|
|
636
636
|
return this.divRemTo(t, e, n), [e, n];
|
|
637
637
|
}, i.prototype.modPow = function(t, e) {
|
|
638
|
-
var n = t.bitLength(), r, s =
|
|
638
|
+
var n = t.bitLength(), r, s = it(1), a;
|
|
639
639
|
if (n <= 0)
|
|
640
640
|
return s;
|
|
641
|
-
n < 18 ? r = 1 : n < 48 ? r = 3 : n < 144 ? r = 4 : n < 768 ? r = 5 : r = 6, n < 8 ? a = new
|
|
641
|
+
n < 18 ? r = 1 : n < 48 ? r = 3 : n < 144 ? r = 4 : n < 768 ? r = 5 : r = 6, n < 8 ? a = new xe(e) : e.isEven() ? a = new Xn(e) : a = new Ue(e);
|
|
642
642
|
var o = [], c = 3, u = r - 1, l = (1 << r) - 1;
|
|
643
643
|
if (o[1] = a.convert(this), r > 1) {
|
|
644
|
-
var f =
|
|
644
|
+
var f = T();
|
|
645
645
|
for (a.sqrTo(o[1], f); c <= l; )
|
|
646
|
-
o[c] =
|
|
646
|
+
o[c] = T(), a.mulTo(f, o[c - 2], o[c]), c += 2;
|
|
647
647
|
}
|
|
648
|
-
var d = t.t - 1, g, P = !0, m =
|
|
648
|
+
var d = t.t - 1, g, P = !0, m = T(), _;
|
|
649
649
|
for (n = xt(t[d]) - 1; d >= 0; ) {
|
|
650
650
|
for (n >= u ? g = t[d] >> n - u & l : (g = (t[d] & (1 << n + 1) - 1) << u - n, d > 0 && (g |= t[d - 1] >> this.DB + n - u)), c = r; (g & 1) == 0; )
|
|
651
651
|
g >>= 1, --c;
|
|
@@ -664,7 +664,7 @@ var ee = (
|
|
|
664
664
|
var e = t.isEven();
|
|
665
665
|
if (this.isEven() && e || t.signum() == 0)
|
|
666
666
|
return i.ZERO;
|
|
667
|
-
for (var n = t.clone(), r = this.clone(), s =
|
|
667
|
+
for (var n = t.clone(), r = this.clone(), s = it(1), a = it(0), o = it(0), c = it(1); n.signum() != 0; ) {
|
|
668
668
|
for (; n.isEven(); )
|
|
669
669
|
n.rShiftTo(1, n), 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);
|
|
670
670
|
for (; r.isEven(); )
|
|
@@ -681,7 +681,7 @@ var ee = (
|
|
|
681
681
|
return c;
|
|
682
682
|
return c.signum() < 0 ? c.add(t) : c;
|
|
683
683
|
}, i.prototype.pow = function(t) {
|
|
684
|
-
return this.exp(t, new
|
|
684
|
+
return this.exp(t, new Wn());
|
|
685
685
|
}, i.prototype.gcd = function(t) {
|
|
686
686
|
var e = this.s < 0 ? this.negate() : this.clone(), n = t.s < 0 ? t.negate() : t.clone();
|
|
687
687
|
if (e.compareTo(n) < 0) {
|
|
@@ -696,19 +696,19 @@ var ee = (
|
|
|
696
696
|
return a > 0 && n.lShiftTo(a, n), n;
|
|
697
697
|
}, i.prototype.isProbablePrime = function(t) {
|
|
698
698
|
var e, n = this.abs();
|
|
699
|
-
if (n.t == 1 && n[0] <=
|
|
700
|
-
for (e = 0; e <
|
|
701
|
-
if (n[0] ==
|
|
699
|
+
if (n.t == 1 && n[0] <= L[L.length - 1]) {
|
|
700
|
+
for (e = 0; e < L.length; ++e)
|
|
701
|
+
if (n[0] == L[e])
|
|
702
702
|
return !0;
|
|
703
703
|
return !1;
|
|
704
704
|
}
|
|
705
705
|
if (n.isEven())
|
|
706
706
|
return !1;
|
|
707
|
-
for (e = 1; e <
|
|
708
|
-
for (var r =
|
|
709
|
-
r *=
|
|
707
|
+
for (e = 1; e < L.length; ) {
|
|
708
|
+
for (var r = L[e], s = e + 1; s < L.length && r < Hn; )
|
|
709
|
+
r *= L[s++];
|
|
710
710
|
for (r = n.modInt(r); e < s; )
|
|
711
|
-
if (r %
|
|
711
|
+
if (r % L[e++] == 0)
|
|
712
712
|
return !1;
|
|
713
713
|
}
|
|
714
714
|
return n.millerRabin(t);
|
|
@@ -738,7 +738,7 @@ var ee = (
|
|
|
738
738
|
}
|
|
739
739
|
this.t = 0, this.s = 0;
|
|
740
740
|
for (var r = t.length, s = !1, a = 0; --r >= 0; ) {
|
|
741
|
-
var o = n == 8 ? +t[r] & 255 :
|
|
741
|
+
var o = n == 8 ? +t[r] & 255 : Ve(t, r);
|
|
742
742
|
if (o < 0) {
|
|
743
743
|
t.charAt(r) == "-" && (s = !0);
|
|
744
744
|
continue;
|
|
@@ -814,18 +814,18 @@ var ee = (
|
|
|
814
814
|
e?.fromInt(0), n != null && this.copyTo(n);
|
|
815
815
|
return;
|
|
816
816
|
}
|
|
817
|
-
n == null && (n =
|
|
818
|
-
var a =
|
|
817
|
+
n == null && (n = T());
|
|
818
|
+
var a = T(), o = this.s, c = t.s, u = this.DB - xt(r[r.t - 1]);
|
|
819
819
|
u > 0 ? (r.lShiftTo(u, a), s.lShiftTo(u, n)) : (r.copyTo(a), s.copyTo(n));
|
|
820
820
|
var l = a.t, f = a[l - 1];
|
|
821
821
|
if (f != 0) {
|
|
822
|
-
var d = f * (1 << this.F1) + (l > 1 ? a[l - 2] >> this.F2 : 0), g = this.FV / d, P = (1 << this.F1) / d, m = 1 << this.F2, _ = n.t,
|
|
823
|
-
for (a.dlShiftTo(
|
|
822
|
+
var d = f * (1 << this.F1) + (l > 1 ? a[l - 2] >> this.F2 : 0), g = this.FV / d, P = (1 << this.F1) / d, m = 1 << this.F2, _ = n.t, y = _ - l, v = e ?? T();
|
|
823
|
+
for (a.dlShiftTo(y, v), n.compareTo(v) >= 0 && (n[n.t++] = 1, n.subTo(v, n)), i.ONE.dlShiftTo(l, v), v.subTo(a, a); a.t < l; )
|
|
824
824
|
a[a.t++] = 0;
|
|
825
|
-
for (; --
|
|
826
|
-
var
|
|
827
|
-
if ((n[_] += a.am(0,
|
|
828
|
-
for (a.dlShiftTo(
|
|
825
|
+
for (; --y >= 0; ) {
|
|
826
|
+
var A = n[--_] == f ? this.DM : Math.floor(n[_] * g + (n[_ - 1] + m) * P);
|
|
827
|
+
if ((n[_] += a.am(0, A, n, y, 0, l)) < A)
|
|
828
|
+
for (a.dlShiftTo(y, v), n.subTo(v, n); n[_] < --A; )
|
|
829
829
|
n.subTo(v, n);
|
|
830
830
|
}
|
|
831
831
|
e != null && (n.drShiftTo(l, e), o != c && i.ZERO.subTo(e, e)), n.t = l, n.clamp(), u > 0 && n.rShiftTo(u, n), o < 0 && i.ZERO.subTo(n, n);
|
|
@@ -844,7 +844,7 @@ var ee = (
|
|
|
844
844
|
}, i.prototype.exp = function(t, e) {
|
|
845
845
|
if (t > 4294967295 || t < 1)
|
|
846
846
|
return i.ONE;
|
|
847
|
-
var n =
|
|
847
|
+
var n = T(), r = T(), s = e.convert(this), a = xt(t) - 1;
|
|
848
848
|
for (s.copyTo(n); --a >= 0; )
|
|
849
849
|
if (e.sqrTo(n, r), (t & 1 << a) > 0)
|
|
850
850
|
e.mulTo(r, s, n);
|
|
@@ -858,14 +858,14 @@ var ee = (
|
|
|
858
858
|
}, i.prototype.toRadix = function(t) {
|
|
859
859
|
if (t == null && (t = 10), this.signum() == 0 || t < 2 || t > 36)
|
|
860
860
|
return "0";
|
|
861
|
-
var e = this.chunkSize(t), n = Math.pow(t, e), r =
|
|
861
|
+
var e = this.chunkSize(t), n = Math.pow(t, e), r = it(n), s = T(), a = T(), o = "";
|
|
862
862
|
for (this.divRemTo(r, s, a); s.signum() > 0; )
|
|
863
863
|
o = (n + a.intValue()).toString(t).substring(1) + o, s.divRemTo(r, s, a);
|
|
864
864
|
return a.intValue().toString(t) + o;
|
|
865
865
|
}, i.prototype.fromRadix = function(t, e) {
|
|
866
866
|
this.fromInt(0), e == null && (e = 10);
|
|
867
867
|
for (var n = this.chunkSize(e), r = Math.pow(e, n), s = !1, a = 0, o = 0, c = 0; c < t.length; ++c) {
|
|
868
|
-
var u =
|
|
868
|
+
var u = Ve(t, c);
|
|
869
869
|
if (u < 0) {
|
|
870
870
|
t.charAt(c) == "-" && this.signum() == 0 && (s = !0);
|
|
871
871
|
continue;
|
|
@@ -956,9 +956,9 @@ var ee = (
|
|
|
956
956
|
if (n <= 0)
|
|
957
957
|
return !1;
|
|
958
958
|
var r = e.shiftRight(n);
|
|
959
|
-
t = t + 1 >> 1, t >
|
|
960
|
-
for (var s =
|
|
961
|
-
s.fromInt(
|
|
959
|
+
t = t + 1 >> 1, t > L.length && (t = L.length);
|
|
960
|
+
for (var s = T(), a = 0; a < t; ++a) {
|
|
961
|
+
s.fromInt(L[Math.floor(Math.random() * L.length)]);
|
|
962
962
|
var o = s.modPow(r, this);
|
|
963
963
|
if (o.compareTo(i.ONE) != 0 && o.compareTo(e) != 0) {
|
|
964
964
|
for (var c = 1; c++ < n && o.compareTo(e) != 0; )
|
|
@@ -970,7 +970,7 @@ var ee = (
|
|
|
970
970
|
}
|
|
971
971
|
return !0;
|
|
972
972
|
}, i.prototype.square = function() {
|
|
973
|
-
var t =
|
|
973
|
+
var t = T();
|
|
974
974
|
return this.squareTo(t), t;
|
|
975
975
|
}, i.prototype.gcda = function(t, e) {
|
|
976
976
|
var n = this.s < 0 ? this.negate() : this.clone(), r = t.s < 0 ? t.negate() : t.clone();
|
|
@@ -1009,7 +1009,7 @@ var ee = (
|
|
|
1009
1009
|
}
|
|
1010
1010
|
}, i;
|
|
1011
1011
|
})()
|
|
1012
|
-
),
|
|
1012
|
+
), Wn = (
|
|
1013
1013
|
/** @class */
|
|
1014
1014
|
(function() {
|
|
1015
1015
|
function i() {
|
|
@@ -1024,7 +1024,7 @@ var ee = (
|
|
|
1024
1024
|
t.squareTo(e);
|
|
1025
1025
|
}, i;
|
|
1026
1026
|
})()
|
|
1027
|
-
),
|
|
1027
|
+
), xe = (
|
|
1028
1028
|
/** @class */
|
|
1029
1029
|
(function() {
|
|
1030
1030
|
function i(t) {
|
|
@@ -1042,17 +1042,17 @@ var ee = (
|
|
|
1042
1042
|
t.squareTo(e), this.reduce(e);
|
|
1043
1043
|
}, i;
|
|
1044
1044
|
})()
|
|
1045
|
-
),
|
|
1045
|
+
), Ue = (
|
|
1046
1046
|
/** @class */
|
|
1047
1047
|
(function() {
|
|
1048
1048
|
function i(t) {
|
|
1049
1049
|
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;
|
|
1050
1050
|
}
|
|
1051
1051
|
return i.prototype.convert = function(t) {
|
|
1052
|
-
var e =
|
|
1052
|
+
var e = T();
|
|
1053
1053
|
return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(w.ZERO) > 0 && this.m.subTo(e, e), e;
|
|
1054
1054
|
}, i.prototype.revert = function(t) {
|
|
1055
|
-
var e =
|
|
1055
|
+
var e = T();
|
|
1056
1056
|
return t.copyTo(e), this.reduce(e), e;
|
|
1057
1057
|
}, i.prototype.reduce = function(t) {
|
|
1058
1058
|
for (; t.t <= this.mt2; )
|
|
@@ -1069,18 +1069,18 @@ var ee = (
|
|
|
1069
1069
|
t.squareTo(e), this.reduce(e);
|
|
1070
1070
|
}, i;
|
|
1071
1071
|
})()
|
|
1072
|
-
),
|
|
1072
|
+
), Xn = (
|
|
1073
1073
|
/** @class */
|
|
1074
1074
|
(function() {
|
|
1075
1075
|
function i(t) {
|
|
1076
|
-
this.m = t, this.r2 =
|
|
1076
|
+
this.m = t, this.r2 = T(), this.q3 = T(), w.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
|
|
1077
1077
|
}
|
|
1078
1078
|
return i.prototype.convert = function(t) {
|
|
1079
1079
|
if (t.s < 0 || t.t > 2 * this.m.t)
|
|
1080
1080
|
return t.mod(this.m);
|
|
1081
1081
|
if (t.compareTo(this.m) < 0)
|
|
1082
1082
|
return t;
|
|
1083
|
-
var e =
|
|
1083
|
+
var e = T();
|
|
1084
1084
|
return t.copyTo(e), this.reduce(e), e;
|
|
1085
1085
|
}, i.prototype.revert = function(t) {
|
|
1086
1086
|
return t;
|
|
@@ -1096,64 +1096,64 @@ var ee = (
|
|
|
1096
1096
|
}, i;
|
|
1097
1097
|
})()
|
|
1098
1098
|
);
|
|
1099
|
-
function
|
|
1099
|
+
function T() {
|
|
1100
1100
|
return new w(null);
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1102
|
+
function D(i, t) {
|
|
1103
1103
|
return new w(i, t);
|
|
1104
1104
|
}
|
|
1105
1105
|
var Le = typeof navigator < "u";
|
|
1106
|
-
Le &&
|
|
1106
|
+
Le && Be && navigator.appName == "Microsoft Internet Explorer" ? (w.prototype.am = function(t, e, n, r, s, a) {
|
|
1107
1107
|
for (var o = e & 32767, c = e >> 15; --a >= 0; ) {
|
|
1108
1108
|
var u = this[t] & 32767, l = this[t++] >> 15, f = c * u + l * o;
|
|
1109
1109
|
u = o * u + ((f & 32767) << 15) + n[r] + (s & 1073741823), s = (u >>> 30) + (f >>> 15) + c * l + (s >>> 30), n[r++] = u & 1073741823;
|
|
1110
1110
|
}
|
|
1111
1111
|
return s;
|
|
1112
|
-
},
|
|
1112
|
+
}, st = 30) : Le && Be && navigator.appName != "Netscape" ? (w.prototype.am = function(t, e, n, r, s, a) {
|
|
1113
1113
|
for (; --a >= 0; ) {
|
|
1114
1114
|
var o = e * this[t++] + n[r] + s;
|
|
1115
1115
|
s = Math.floor(o / 67108864), n[r++] = o & 67108863;
|
|
1116
1116
|
}
|
|
1117
1117
|
return s;
|
|
1118
|
-
},
|
|
1118
|
+
}, st = 26) : (w.prototype.am = function(t, e, n, r, s, a) {
|
|
1119
1119
|
for (var o = e & 16383, c = e >> 14; --a >= 0; ) {
|
|
1120
1120
|
var u = this[t] & 16383, l = this[t++] >> 14, f = c * u + l * o;
|
|
1121
1121
|
u = o * u + ((f & 16383) << 14) + n[r] + s, s = (u >> 28) + (f >> 14) + c * l, n[r++] = u & 268435455;
|
|
1122
1122
|
}
|
|
1123
1123
|
return s;
|
|
1124
|
-
},
|
|
1125
|
-
w.prototype.DB =
|
|
1126
|
-
w.prototype.DM = (1 <<
|
|
1127
|
-
w.prototype.DV = 1 <<
|
|
1124
|
+
}, st = 28);
|
|
1125
|
+
w.prototype.DB = st;
|
|
1126
|
+
w.prototype.DM = (1 << st) - 1;
|
|
1127
|
+
w.prototype.DV = 1 << st;
|
|
1128
1128
|
var _e = 52;
|
|
1129
1129
|
w.prototype.FV = Math.pow(2, _e);
|
|
1130
|
-
w.prototype.F1 = _e -
|
|
1131
|
-
w.prototype.F2 = 2 *
|
|
1132
|
-
var Xt = [],
|
|
1133
|
-
|
|
1130
|
+
w.prototype.F1 = _e - st;
|
|
1131
|
+
w.prototype.F2 = 2 * st - _e;
|
|
1132
|
+
var Xt = [], Et, q;
|
|
1133
|
+
Et = 48;
|
|
1134
1134
|
for (q = 0; q <= 9; ++q)
|
|
1135
|
-
Xt[
|
|
1136
|
-
|
|
1135
|
+
Xt[Et++] = q;
|
|
1136
|
+
Et = 97;
|
|
1137
1137
|
for (q = 10; q < 36; ++q)
|
|
1138
|
-
Xt[
|
|
1139
|
-
|
|
1138
|
+
Xt[Et++] = q;
|
|
1139
|
+
Et = 65;
|
|
1140
1140
|
for (q = 10; q < 36; ++q)
|
|
1141
|
-
Xt[
|
|
1142
|
-
function
|
|
1141
|
+
Xt[Et++] = q;
|
|
1142
|
+
function Ve(i, t) {
|
|
1143
1143
|
var e = Xt[i.charCodeAt(t)];
|
|
1144
1144
|
return e ?? -1;
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1147
|
-
var t =
|
|
1146
|
+
function it(i) {
|
|
1147
|
+
var t = T();
|
|
1148
1148
|
return t.fromInt(i), t;
|
|
1149
1149
|
}
|
|
1150
1150
|
function xt(i) {
|
|
1151
1151
|
var t = 1, e;
|
|
1152
1152
|
return (e = i >>> 16) != 0 && (i = e, t += 16), (e = i >> 8) != 0 && (i = e, t += 8), (e = i >> 4) != 0 && (i = e, t += 4), (e = i >> 2) != 0 && (i = e, t += 2), (e = i >> 1) != 0 && (i = e, t += 1), t;
|
|
1153
1153
|
}
|
|
1154
|
-
w.ZERO =
|
|
1155
|
-
w.ONE =
|
|
1156
|
-
var
|
|
1154
|
+
w.ZERO = it(0);
|
|
1155
|
+
w.ONE = it(1);
|
|
1156
|
+
var zn = (
|
|
1157
1157
|
/** @class */
|
|
1158
1158
|
(function() {
|
|
1159
1159
|
function i() {
|
|
@@ -1172,42 +1172,42 @@ var Kn = (
|
|
|
1172
1172
|
}, i;
|
|
1173
1173
|
})()
|
|
1174
1174
|
);
|
|
1175
|
-
function
|
|
1176
|
-
return new
|
|
1175
|
+
function Gn() {
|
|
1176
|
+
return new zn();
|
|
1177
1177
|
}
|
|
1178
|
-
var
|
|
1179
|
-
if (
|
|
1180
|
-
|
|
1181
|
-
var
|
|
1178
|
+
var sn = 256, Ut, rt = null, H;
|
|
1179
|
+
if (rt == null) {
|
|
1180
|
+
rt = [], H = 0;
|
|
1181
|
+
var Lt = void 0;
|
|
1182
1182
|
if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
|
|
1183
1183
|
var ne = new Uint32Array(256);
|
|
1184
|
-
for (self.crypto.getRandomValues(ne),
|
|
1185
|
-
|
|
1184
|
+
for (self.crypto.getRandomValues(ne), Lt = 0; Lt < ne.length; ++Lt)
|
|
1185
|
+
rt[H++] = ne[Lt] & 255;
|
|
1186
1186
|
}
|
|
1187
1187
|
var Vt = 0, Mt = function(i) {
|
|
1188
|
-
if (Vt = Vt || 0, Vt >= 256 || H >=
|
|
1188
|
+
if (Vt = Vt || 0, Vt >= 256 || H >= sn) {
|
|
1189
1189
|
self.removeEventListener ? self.removeEventListener("mousemove", Mt, !1) : self.detachEvent && self.detachEvent("onmousemove", Mt);
|
|
1190
1190
|
return;
|
|
1191
1191
|
}
|
|
1192
1192
|
try {
|
|
1193
1193
|
var t = i.x + i.y;
|
|
1194
|
-
|
|
1194
|
+
rt[H++] = t & 255, Vt += 1;
|
|
1195
1195
|
} catch {
|
|
1196
1196
|
}
|
|
1197
1197
|
};
|
|
1198
1198
|
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Mt, !1) : self.attachEvent && self.attachEvent("onmousemove", Mt));
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1201
|
-
if (
|
|
1202
|
-
for (
|
|
1200
|
+
function $n() {
|
|
1201
|
+
if (Ut == null) {
|
|
1202
|
+
for (Ut = Gn(); H < sn; ) {
|
|
1203
1203
|
var i = Math.floor(65536 * Math.random());
|
|
1204
|
-
|
|
1204
|
+
rt[H++] = i & 255;
|
|
1205
1205
|
}
|
|
1206
|
-
for (
|
|
1207
|
-
|
|
1206
|
+
for (Ut.init(rt), H = 0; H < rt.length; ++H)
|
|
1207
|
+
rt[H] = 0;
|
|
1208
1208
|
H = 0;
|
|
1209
1209
|
}
|
|
1210
|
-
return
|
|
1210
|
+
return Ut.next();
|
|
1211
1211
|
}
|
|
1212
1212
|
var Ht = (
|
|
1213
1213
|
/** @class */
|
|
@@ -1216,79 +1216,79 @@ var Ht = (
|
|
|
1216
1216
|
}
|
|
1217
1217
|
return i.prototype.nextBytes = function(t) {
|
|
1218
1218
|
for (var e = 0; e < t.length; ++e)
|
|
1219
|
-
t[e] =
|
|
1219
|
+
t[e] = $n();
|
|
1220
1220
|
}, i;
|
|
1221
1221
|
})()
|
|
1222
1222
|
);
|
|
1223
1223
|
function ue(i) {
|
|
1224
|
-
return
|
|
1224
|
+
return Qn(si(Jn(i), i.length * 8));
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function Me(i) {
|
|
1227
1227
|
for (var t = "0123456789abcdef", e = "", n = 0; n < i.length; n++) {
|
|
1228
1228
|
var r = i.charCodeAt(n);
|
|
1229
1229
|
e += t.charAt(r >>> 4 & 15) + t.charAt(r & 15);
|
|
1230
1230
|
}
|
|
1231
1231
|
return e;
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1233
|
+
function Jn(i) {
|
|
1234
1234
|
for (var t = Array(i.length >> 2), e = 0; e < t.length; e++)
|
|
1235
1235
|
t[e] = 0;
|
|
1236
1236
|
for (var e = 0; e < i.length * 8; e += 8)
|
|
1237
1237
|
t[e >> 5] |= (i.charCodeAt(e / 8) & 255) << 24 - e % 32;
|
|
1238
1238
|
return t;
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function Qn(i) {
|
|
1241
1241
|
for (var t = "", e = 0; e < i.length * 32; e += 8)
|
|
1242
1242
|
t += String.fromCharCode(i[e >> 5] >>> 24 - e % 32 & 255);
|
|
1243
1243
|
return t;
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function Q(i, t) {
|
|
1246
1246
|
return i >>> t | i << 32 - t;
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1248
|
+
function an(i, t) {
|
|
1249
1249
|
return i >>> t;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function Zn(i, t, e) {
|
|
1252
1252
|
return i & t ^ ~i & e;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function Yn(i, t, e) {
|
|
1255
1255
|
return i & t ^ i & e ^ t & e;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1257
|
+
function ti(i) {
|
|
1258
|
+
return Q(i, 2) ^ Q(i, 13) ^ Q(i, 22);
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return
|
|
1260
|
+
function ei(i) {
|
|
1261
|
+
return Q(i, 6) ^ Q(i, 11) ^ Q(i, 25);
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return
|
|
1263
|
+
function ni(i) {
|
|
1264
|
+
return Q(i, 7) ^ Q(i, 18) ^ an(i, 3);
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1267
|
-
return
|
|
1266
|
+
function ii(i) {
|
|
1267
|
+
return Q(i, 17) ^ Q(i, 19) ^ an(i, 10);
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1270
|
-
function
|
|
1269
|
+
var ri = 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);
|
|
1270
|
+
function si(i, t) {
|
|
1271
1271
|
var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), n = new Array(64), r, s, a, o, c, u, l, f, d, g, P, m;
|
|
1272
1272
|
for (i[t >> 5] |= 128 << 24 - t % 32, i[(t + 64 >> 9 << 4) + 15] = t, d = 0; d < i.length; d += 16) {
|
|
1273
1273
|
for (r = e[0], s = e[1], a = e[2], o = e[3], c = e[4], u = e[5], l = e[6], f = e[7], g = 0; g < 64; g++)
|
|
1274
|
-
g < 16 ? n[g] = i[g + d] : n[g] =
|
|
1275
|
-
e[0] =
|
|
1274
|
+
g < 16 ? n[g] = i[g + d] : n[g] = B(B(B(ii(n[g - 2]), n[g - 7]), ni(n[g - 15])), n[g - 16]), P = B(B(B(B(f, ei(c)), Zn(c, u, l)), ri[g]), n[g]), m = B(ti(r), Yn(r, s, a)), f = l, l = u, u = c, c = B(o, P), o = a, a = s, s = r, r = B(P, m);
|
|
1275
|
+
e[0] = B(r, e[0]), e[1] = B(s, e[1]), e[2] = B(a, e[2]), e[3] = B(o, e[3]), e[4] = B(c, e[4]), e[5] = B(u, e[5]), e[6] = B(l, e[6]), e[7] = B(f, e[7]);
|
|
1276
1276
|
}
|
|
1277
1277
|
return e;
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function B(i, t) {
|
|
1280
1280
|
var e = (i & 65535) + (t & 65535), n = (i >> 16) + (t >> 16) + (e >> 16);
|
|
1281
1281
|
return n << 16 | e & 65535;
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function ai(i, t) {
|
|
1284
1284
|
if (t < i.length + 22)
|
|
1285
1285
|
return console.error("Message too long for RSA"), null;
|
|
1286
1286
|
for (var e = t - i.length - 6, n = "", r = 0; r < e; r += 2)
|
|
1287
1287
|
n += "ff";
|
|
1288
1288
|
var s = "0001" + n + "00" + i;
|
|
1289
|
-
return
|
|
1289
|
+
return D(s, 16);
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function oi(i, t) {
|
|
1292
1292
|
if (t < i.length + 11)
|
|
1293
1293
|
return console.error("Message too long for RSA"), null;
|
|
1294
1294
|
for (var e = [], n = i.length - 1; n >= 0 && t > 0; ) {
|
|
@@ -1303,7 +1303,7 @@ function ii(i, t) {
|
|
|
1303
1303
|
}
|
|
1304
1304
|
return e[--t] = 2, e[--t] = 0, new w(e);
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function Fe(i, t, e) {
|
|
1307
1307
|
for (var n = "", r = 0; n.length < t; )
|
|
1308
1308
|
n += e(String.fromCharCode.apply(String, i.concat([
|
|
1309
1309
|
(r & 4278190080) >> 24,
|
|
@@ -1313,9 +1313,9 @@ function Me(i, t, e) {
|
|
|
1313
1313
|
]))), r += 1;
|
|
1314
1314
|
return n;
|
|
1315
1315
|
}
|
|
1316
|
-
var
|
|
1317
|
-
function
|
|
1318
|
-
var e =
|
|
1316
|
+
var ci = 32;
|
|
1317
|
+
function ui(i, t) {
|
|
1318
|
+
var e = ci, n = ue;
|
|
1319
1319
|
if (i.length + 2 * e + 2 > t)
|
|
1320
1320
|
throw "Message too long for RSA";
|
|
1321
1321
|
var r = "", s;
|
|
@@ -1323,15 +1323,15 @@ function si(i, t) {
|
|
|
1323
1323
|
r += "\0";
|
|
1324
1324
|
var a = n("") + r + "" + i, o = new Array(e);
|
|
1325
1325
|
new Ht().nextBytes(o);
|
|
1326
|
-
var c =
|
|
1326
|
+
var c = Fe(o, a.length, n), u = [];
|
|
1327
1327
|
for (s = 0; s < a.length; s += 1)
|
|
1328
1328
|
u[s] = a.charCodeAt(s) ^ c.charCodeAt(s);
|
|
1329
|
-
var l =
|
|
1329
|
+
var l = Fe(u, o.length, n), f = [0];
|
|
1330
1330
|
for (s = 0; s < o.length; s += 1)
|
|
1331
1331
|
f[s + 1] = o[s] ^ l.charCodeAt(s);
|
|
1332
1332
|
return new w(f.concat(u));
|
|
1333
1333
|
}
|
|
1334
|
-
var
|
|
1334
|
+
var li = (
|
|
1335
1335
|
/** @class */
|
|
1336
1336
|
(function() {
|
|
1337
1337
|
function i() {
|
|
@@ -1346,9 +1346,9 @@ var ai = (
|
|
|
1346
1346
|
e = e.add(this.p);
|
|
1347
1347
|
return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
|
|
1348
1348
|
}, i.prototype.setPublic = function(t, e) {
|
|
1349
|
-
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n =
|
|
1349
|
+
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = D(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
|
|
1350
1350
|
}, i.prototype.encrypt = function(t, e) {
|
|
1351
|
-
typeof e > "u" && (e =
|
|
1351
|
+
typeof e > "u" && (e = oi);
|
|
1352
1352
|
var n = this.n.bitLength() + 7 >> 3, r = e(t, n);
|
|
1353
1353
|
if (r == null)
|
|
1354
1354
|
return null;
|
|
@@ -1359,9 +1359,9 @@ var ai = (
|
|
|
1359
1359
|
a = "0" + a;
|
|
1360
1360
|
return a;
|
|
1361
1361
|
}, i.prototype.setPrivate = function(t, e, n) {
|
|
1362
|
-
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n =
|
|
1362
|
+
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = D(t, 16), this.e = parseInt(e, 16), this.d = D(n, 16)) : console.error("Invalid RSA private key");
|
|
1363
1363
|
}, i.prototype.setPrivateEx = function(t, e, n, r, s, a, o, c) {
|
|
1364
|
-
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n =
|
|
1364
|
+
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = D(t, 16), this.e = parseInt(e, 16), this.d = D(n, 16), this.p = D(r, 16), this.q = D(s, 16), this.dmp1 = D(a, 16), this.dmq1 = D(o, 16), this.coeff = D(c, 16)) : console.error("Invalid RSA private key");
|
|
1365
1365
|
}, i.prototype.generate = function(t, e) {
|
|
1366
1366
|
var n = new Ht(), r = t >> 1;
|
|
1367
1367
|
this.e = parseInt(e, 16);
|
|
@@ -1381,8 +1381,8 @@ var ai = (
|
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
1383
|
}, i.prototype.decrypt = function(t) {
|
|
1384
|
-
var e =
|
|
1385
|
-
return n == null ? null :
|
|
1384
|
+
var e = D(t, 16), n = this.doPrivate(e);
|
|
1385
|
+
return n == null ? null : hi(n, this.n.bitLength() + 7 >> 3);
|
|
1386
1386
|
}, i.prototype.generateAsync = function(t, e, n) {
|
|
1387
1387
|
var r = new Ht(), s = t >> 1;
|
|
1388
1388
|
this.e = parseInt(e, 16);
|
|
@@ -1397,13 +1397,13 @@ var ai = (
|
|
|
1397
1397
|
n();
|
|
1398
1398
|
}, 0)) : setTimeout(c, 0);
|
|
1399
1399
|
}, l = function() {
|
|
1400
|
-
o.q =
|
|
1400
|
+
o.q = T(), o.q.fromNumberAsync(s, 1, r, function() {
|
|
1401
1401
|
o.q.subtract(w.ONE).gcda(a, function(d) {
|
|
1402
1402
|
d.compareTo(w.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(u, 0) : setTimeout(l, 0);
|
|
1403
1403
|
});
|
|
1404
1404
|
});
|
|
1405
1405
|
}, f = function() {
|
|
1406
|
-
o.p =
|
|
1406
|
+
o.p = T(), o.p.fromNumberAsync(t - s, 1, r, function() {
|
|
1407
1407
|
o.p.subtract(w.ONE).gcda(a, function(d) {
|
|
1408
1408
|
d.compareTo(w.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(f, 0);
|
|
1409
1409
|
});
|
|
@@ -1413,7 +1413,7 @@ var ai = (
|
|
|
1413
1413
|
};
|
|
1414
1414
|
setTimeout(c, 0);
|
|
1415
1415
|
}, i.prototype.sign = function(t, e, n) {
|
|
1416
|
-
var r =
|
|
1416
|
+
var r = fi(n), s = r + e(t).toString(), a = this.n.bitLength() / 4, o = ai(s, a);
|
|
1417
1417
|
if (o == null)
|
|
1418
1418
|
return null;
|
|
1419
1419
|
var c = this.doPrivate(o);
|
|
@@ -1423,15 +1423,15 @@ var ai = (
|
|
|
1423
1423
|
u = "0" + u;
|
|
1424
1424
|
return u;
|
|
1425
1425
|
}, i.prototype.verify = function(t, e, n) {
|
|
1426
|
-
var r =
|
|
1426
|
+
var r = D(e, 16), s = this.doPublic(r);
|
|
1427
1427
|
if (s == null)
|
|
1428
1428
|
return null;
|
|
1429
|
-
var a = s.toString(16).replace(/^1f+00/, ""), o =
|
|
1429
|
+
var a = s.toString(16).replace(/^1f+00/, ""), o = pi(a);
|
|
1430
1430
|
return o == n(t).toString();
|
|
1431
1431
|
}, i;
|
|
1432
1432
|
})()
|
|
1433
1433
|
);
|
|
1434
|
-
function
|
|
1434
|
+
function hi(i, t) {
|
|
1435
1435
|
for (var e = i.toByteArray(), n = 0; n < e.length && e[n] == 0; )
|
|
1436
1436
|
++n;
|
|
1437
1437
|
if (e.length - n != t - 1 || e[n] != 2)
|
|
@@ -1455,10 +1455,10 @@ var kt = {
|
|
|
1455
1455
|
sha512: "3051300d060960864801650304020305000440",
|
|
1456
1456
|
ripemd160: "3021300906052b2403020105000414"
|
|
1457
1457
|
};
|
|
1458
|
-
function
|
|
1458
|
+
function fi(i) {
|
|
1459
1459
|
return kt[i] || "";
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function pi(i) {
|
|
1462
1462
|
for (var t in kt)
|
|
1463
1463
|
if (kt.hasOwnProperty(t)) {
|
|
1464
1464
|
var e = kt[t], n = e.length;
|
|
@@ -1467,7 +1467,7 @@ function ui(i) {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
return i;
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function N(i, t, e) {
|
|
1471
1471
|
if (!t || !i)
|
|
1472
1472
|
throw new Error("extend failed, please check that all dependencies are included.");
|
|
1473
1473
|
var n = function() {
|
|
@@ -1496,10 +1496,10 @@ p.asn1.ASN1Util = new function() {
|
|
|
1496
1496
|
}, this.getPEMStringFromHex = function(i, t) {
|
|
1497
1497
|
return hextopem(i, t);
|
|
1498
1498
|
}, this.newObject = function(i) {
|
|
1499
|
-
var t = p, e = t.asn1, n = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, u = e.DEREnumerated, l = e.DERUTF8String, f = e.DERNumericString, d = e.DERPrintableString, g = e.DERTeletexString, P = e.DERIA5String, m = e.DERUTCTime, _ = e.DERGeneralizedTime,
|
|
1500
|
-
if (
|
|
1499
|
+
var t = p, e = t.asn1, n = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, u = e.DEREnumerated, l = e.DERUTF8String, f = e.DERNumericString, d = e.DERPrintableString, g = e.DERTeletexString, P = e.DERIA5String, m = e.DERUTCTime, _ = e.DERGeneralizedTime, y = e.DERSequence, v = e.DERSet, A = e.DERTaggedObject, R = e.ASN1Util.newObject, U = Object.keys(i);
|
|
1500
|
+
if (U.length != 1)
|
|
1501
1501
|
throw "key of param shall be only one.";
|
|
1502
|
-
var E =
|
|
1502
|
+
var E = U[0];
|
|
1503
1503
|
if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + E + ":") == -1)
|
|
1504
1504
|
throw "undefined key: " + E;
|
|
1505
1505
|
if (E == "bool")
|
|
@@ -1531,33 +1531,33 @@ p.asn1.ASN1Util = new function() {
|
|
|
1531
1531
|
if (E == "gentime")
|
|
1532
1532
|
return new _(i[E]);
|
|
1533
1533
|
if (E == "seq") {
|
|
1534
|
-
for (var K = i[E],
|
|
1535
|
-
var
|
|
1536
|
-
|
|
1534
|
+
for (var K = i[E], Z = [], X = 0; X < K.length; X++) {
|
|
1535
|
+
var k = R(K[X]);
|
|
1536
|
+
Z.push(k);
|
|
1537
1537
|
}
|
|
1538
|
-
return new
|
|
1538
|
+
return new y({ array: Z });
|
|
1539
1539
|
}
|
|
1540
1540
|
if (E == "set") {
|
|
1541
|
-
for (var K = i[E],
|
|
1542
|
-
var
|
|
1543
|
-
|
|
1541
|
+
for (var K = i[E], Z = [], X = 0; X < K.length; X++) {
|
|
1542
|
+
var k = R(K[X]);
|
|
1543
|
+
Z.push(k);
|
|
1544
1544
|
}
|
|
1545
|
-
return new v({ array:
|
|
1545
|
+
return new v({ array: Z });
|
|
1546
1546
|
}
|
|
1547
1547
|
if (E == "tag") {
|
|
1548
1548
|
var I = i[E];
|
|
1549
1549
|
if (Object.prototype.toString.call(I) === "[object Array]" && I.length == 3) {
|
|
1550
|
-
var
|
|
1551
|
-
return new
|
|
1550
|
+
var pt = R(I[2]);
|
|
1551
|
+
return new A({
|
|
1552
1552
|
tag: I[0],
|
|
1553
1553
|
explicit: I[1],
|
|
1554
|
-
obj:
|
|
1554
|
+
obj: pt
|
|
1555
1555
|
});
|
|
1556
1556
|
} else {
|
|
1557
|
-
var
|
|
1558
|
-
if (I.explicit !== void 0 && (
|
|
1557
|
+
var at = {};
|
|
1558
|
+
if (I.explicit !== void 0 && (at.explicit = I.explicit), I.tag !== void 0 && (at.tag = I.tag), I.obj === void 0)
|
|
1559
1559
|
throw "obj shall be specified for 'tag'.";
|
|
1560
|
-
return
|
|
1560
|
+
return at.obj = R(I.obj), new A(at);
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
1563
|
}, this.jsonToASN1HEX = function(i) {
|
|
@@ -1633,7 +1633,7 @@ p.asn1.DERAbstractString = function(i) {
|
|
|
1633
1633
|
return this.hV;
|
|
1634
1634
|
}, typeof i < "u" && (typeof i == "string" ? this.setString(i) : typeof i.str < "u" ? this.setString(i.str) : typeof i.hex < "u" && this.setStringHex(i.hex));
|
|
1635
1635
|
};
|
|
1636
|
-
|
|
1636
|
+
N(p.asn1.DERAbstractString, p.asn1.ASN1Object);
|
|
1637
1637
|
p.asn1.DERAbstractTime = function(i) {
|
|
1638
1638
|
p.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(t) {
|
|
1639
1639
|
utc = t.getTime() + t.getTimezoneOffset() * 6e4;
|
|
@@ -1664,7 +1664,7 @@ p.asn1.DERAbstractTime = function(i) {
|
|
|
1664
1664
|
return this.hV;
|
|
1665
1665
|
};
|
|
1666
1666
|
};
|
|
1667
|
-
|
|
1667
|
+
N(p.asn1.DERAbstractTime, p.asn1.ASN1Object);
|
|
1668
1668
|
p.asn1.DERAbstractStructured = function(i) {
|
|
1669
1669
|
p.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(t) {
|
|
1670
1670
|
this.hTLV = null, this.isModified = !0, this.asn1Array = t;
|
|
@@ -1672,11 +1672,11 @@ p.asn1.DERAbstractStructured = function(i) {
|
|
|
1672
1672
|
this.hTLV = null, this.isModified = !0, this.asn1Array.push(t);
|
|
1673
1673
|
}, this.asn1Array = new Array(), typeof i < "u" && typeof i.array < "u" && (this.asn1Array = i.array);
|
|
1674
1674
|
};
|
|
1675
|
-
|
|
1675
|
+
N(p.asn1.DERAbstractStructured, p.asn1.ASN1Object);
|
|
1676
1676
|
p.asn1.DERBoolean = function() {
|
|
1677
1677
|
p.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
|
|
1678
1678
|
};
|
|
1679
|
-
|
|
1679
|
+
N(p.asn1.DERBoolean, p.asn1.ASN1Object);
|
|
1680
1680
|
p.asn1.DERInteger = function(i) {
|
|
1681
1681
|
p.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(t) {
|
|
1682
1682
|
this.hTLV = null, this.isModified = !0, this.hV = p.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
|
|
@@ -1689,7 +1689,7 @@ p.asn1.DERInteger = function(i) {
|
|
|
1689
1689
|
return this.hV;
|
|
1690
1690
|
}, typeof i < "u" && (typeof i.bigint < "u" ? this.setByBigInteger(i.bigint) : typeof i.int < "u" ? this.setByInteger(i.int) : typeof i == "number" ? this.setByInteger(i) : typeof i.hex < "u" && this.setValueHex(i.hex));
|
|
1691
1691
|
};
|
|
1692
|
-
|
|
1692
|
+
N(p.asn1.DERInteger, p.asn1.ASN1Object);
|
|
1693
1693
|
p.asn1.DERBitString = function(i) {
|
|
1694
1694
|
if (i !== void 0 && typeof i.obj < "u") {
|
|
1695
1695
|
var t = p.asn1.ASN1Util.newObject(i.obj);
|
|
@@ -1725,7 +1725,7 @@ p.asn1.DERBitString = function(i) {
|
|
|
1725
1725
|
return this.hV;
|
|
1726
1726
|
}, typeof i < "u" && (typeof i == "string" && i.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(i) : typeof i.hex < "u" ? this.setHexValueIncludingUnusedBits(i.hex) : typeof i.bin < "u" ? this.setByBinaryString(i.bin) : typeof i.array < "u" && this.setByBooleanArray(i.array));
|
|
1727
1727
|
};
|
|
1728
|
-
|
|
1728
|
+
N(p.asn1.DERBitString, p.asn1.ASN1Object);
|
|
1729
1729
|
p.asn1.DEROctetString = function(i) {
|
|
1730
1730
|
if (i !== void 0 && typeof i.obj < "u") {
|
|
1731
1731
|
var t = p.asn1.ASN1Util.newObject(i.obj);
|
|
@@ -1733,11 +1733,11 @@ p.asn1.DEROctetString = function(i) {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
p.asn1.DEROctetString.superclass.constructor.call(this, i), this.hT = "04";
|
|
1735
1735
|
};
|
|
1736
|
-
|
|
1736
|
+
N(p.asn1.DEROctetString, p.asn1.DERAbstractString);
|
|
1737
1737
|
p.asn1.DERNull = function() {
|
|
1738
1738
|
p.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
|
|
1739
1739
|
};
|
|
1740
|
-
|
|
1740
|
+
N(p.asn1.DERNull, p.asn1.ASN1Object);
|
|
1741
1741
|
p.asn1.DERObjectIdentifier = function(i) {
|
|
1742
1742
|
var t = function(n) {
|
|
1743
1743
|
var r = n.toString(16);
|
|
@@ -1774,7 +1774,7 @@ p.asn1.DERObjectIdentifier = function(i) {
|
|
|
1774
1774
|
return this.hV;
|
|
1775
1775
|
}, i !== void 0 && (typeof i == "string" ? i.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(i) : this.setValueName(i) : i.oid !== void 0 ? this.setValueOidString(i.oid) : i.hex !== void 0 ? this.setValueHex(i.hex) : i.name !== void 0 && this.setValueName(i.name));
|
|
1776
1776
|
};
|
|
1777
|
-
|
|
1777
|
+
N(p.asn1.DERObjectIdentifier, p.asn1.ASN1Object);
|
|
1778
1778
|
p.asn1.DEREnumerated = function(i) {
|
|
1779
1779
|
p.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(t) {
|
|
1780
1780
|
this.hTLV = null, this.isModified = !0, this.hV = p.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
|
|
@@ -1787,27 +1787,27 @@ p.asn1.DEREnumerated = function(i) {
|
|
|
1787
1787
|
return this.hV;
|
|
1788
1788
|
}, typeof i < "u" && (typeof i.int < "u" ? this.setByInteger(i.int) : typeof i == "number" ? this.setByInteger(i) : typeof i.hex < "u" && this.setValueHex(i.hex));
|
|
1789
1789
|
};
|
|
1790
|
-
|
|
1790
|
+
N(p.asn1.DEREnumerated, p.asn1.ASN1Object);
|
|
1791
1791
|
p.asn1.DERUTF8String = function(i) {
|
|
1792
1792
|
p.asn1.DERUTF8String.superclass.constructor.call(this, i), this.hT = "0c";
|
|
1793
1793
|
};
|
|
1794
|
-
|
|
1794
|
+
N(p.asn1.DERUTF8String, p.asn1.DERAbstractString);
|
|
1795
1795
|
p.asn1.DERNumericString = function(i) {
|
|
1796
1796
|
p.asn1.DERNumericString.superclass.constructor.call(this, i), this.hT = "12";
|
|
1797
1797
|
};
|
|
1798
|
-
|
|
1798
|
+
N(p.asn1.DERNumericString, p.asn1.DERAbstractString);
|
|
1799
1799
|
p.asn1.DERPrintableString = function(i) {
|
|
1800
1800
|
p.asn1.DERPrintableString.superclass.constructor.call(this, i), this.hT = "13";
|
|
1801
1801
|
};
|
|
1802
|
-
|
|
1802
|
+
N(p.asn1.DERPrintableString, p.asn1.DERAbstractString);
|
|
1803
1803
|
p.asn1.DERTeletexString = function(i) {
|
|
1804
1804
|
p.asn1.DERTeletexString.superclass.constructor.call(this, i), this.hT = "14";
|
|
1805
1805
|
};
|
|
1806
|
-
|
|
1806
|
+
N(p.asn1.DERTeletexString, p.asn1.DERAbstractString);
|
|
1807
1807
|
p.asn1.DERIA5String = function(i) {
|
|
1808
1808
|
p.asn1.DERIA5String.superclass.constructor.call(this, i), this.hT = "16";
|
|
1809
1809
|
};
|
|
1810
|
-
|
|
1810
|
+
N(p.asn1.DERIA5String, p.asn1.DERAbstractString);
|
|
1811
1811
|
p.asn1.DERUTCTime = function(i) {
|
|
1812
1812
|
p.asn1.DERUTCTime.superclass.constructor.call(this, i), this.hT = "17", this.setByDate = function(t) {
|
|
1813
1813
|
this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
|
|
@@ -1815,7 +1815,7 @@ p.asn1.DERUTCTime = function(i) {
|
|
|
1815
1815
|
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;
|
|
1816
1816
|
}, i !== void 0 && (i.str !== void 0 ? this.setString(i.str) : typeof i == "string" && i.match(/^[0-9]{12}Z$/) ? this.setString(i) : i.hex !== void 0 ? this.setStringHex(i.hex) : i.date !== void 0 && this.setByDate(i.date));
|
|
1817
1817
|
};
|
|
1818
|
-
|
|
1818
|
+
N(p.asn1.DERUTCTime, p.asn1.DERAbstractTime);
|
|
1819
1819
|
p.asn1.DERGeneralizedTime = function(i) {
|
|
1820
1820
|
p.asn1.DERGeneralizedTime.superclass.constructor.call(this, i), this.hT = "18", this.withMillis = !1, this.setByDate = function(t) {
|
|
1821
1821
|
this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
|
|
@@ -1823,7 +1823,7 @@ p.asn1.DERGeneralizedTime = function(i) {
|
|
|
1823
1823
|
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;
|
|
1824
1824
|
}, i !== void 0 && (i.str !== void 0 ? this.setString(i.str) : typeof i == "string" && i.match(/^[0-9]{14}Z$/) ? this.setString(i) : i.hex !== void 0 ? this.setStringHex(i.hex) : i.date !== void 0 && this.setByDate(i.date), i.millis === !0 && (this.withMillis = !0));
|
|
1825
1825
|
};
|
|
1826
|
-
|
|
1826
|
+
N(p.asn1.DERGeneralizedTime, p.asn1.DERAbstractTime);
|
|
1827
1827
|
p.asn1.DERSequence = function(i) {
|
|
1828
1828
|
p.asn1.DERSequence.superclass.constructor.call(this, i), this.hT = "30", this.getFreshValueHex = function() {
|
|
1829
1829
|
for (var t = "", e = 0; e < this.asn1Array.length; e++) {
|
|
@@ -1833,7 +1833,7 @@ p.asn1.DERSequence = function(i) {
|
|
|
1833
1833
|
return this.hV = t, this.hV;
|
|
1834
1834
|
};
|
|
1835
1835
|
};
|
|
1836
|
-
|
|
1836
|
+
N(p.asn1.DERSequence, p.asn1.DERAbstractStructured);
|
|
1837
1837
|
p.asn1.DERSet = function(i) {
|
|
1838
1838
|
p.asn1.DERSet.superclass.constructor.call(this, i), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
|
|
1839
1839
|
for (var t = new Array(), e = 0; e < this.asn1Array.length; e++) {
|
|
@@ -1843,7 +1843,7 @@ p.asn1.DERSet = function(i) {
|
|
|
1843
1843
|
return this.sortFlag == !0 && t.sort(), this.hV = t.join(""), this.hV;
|
|
1844
1844
|
}, typeof i < "u" && typeof i.sortflag < "u" && i.sortflag == !1 && (this.sortFlag = !1);
|
|
1845
1845
|
};
|
|
1846
|
-
|
|
1846
|
+
N(p.asn1.DERSet, p.asn1.DERAbstractStructured);
|
|
1847
1847
|
p.asn1.DERTaggedObject = function(i) {
|
|
1848
1848
|
p.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(t, e, n) {
|
|
1849
1849
|
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);
|
|
@@ -1851,8 +1851,8 @@ p.asn1.DERTaggedObject = function(i) {
|
|
|
1851
1851
|
return this.hV;
|
|
1852
1852
|
}, typeof i < "u" && (typeof i.tag < "u" && (this.hT = i.tag), typeof i.explicit < "u" && (this.isExplicit = i.explicit), typeof i.obj < "u" && (this.asn1Object = i.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
|
|
1853
1853
|
};
|
|
1854
|
-
|
|
1855
|
-
var
|
|
1854
|
+
N(p.asn1.DERTaggedObject, p.asn1.ASN1Object);
|
|
1855
|
+
var di = /* @__PURE__ */ (function() {
|
|
1856
1856
|
var i = function(t, e) {
|
|
1857
1857
|
return i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
1858
1858
|
n.__proto__ = r;
|
|
@@ -1869,37 +1869,37 @@ var li = /* @__PURE__ */ (function() {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
1871
1871
|
};
|
|
1872
|
-
})(),
|
|
1872
|
+
})(), ke = (
|
|
1873
1873
|
/** @class */
|
|
1874
1874
|
(function(i) {
|
|
1875
|
-
|
|
1875
|
+
di(t, i);
|
|
1876
1876
|
function t(e) {
|
|
1877
1877
|
var n = i.call(this) || this;
|
|
1878
1878
|
return e && (typeof e == "string" ? n.parseKey(e) : (t.hasPrivateKeyProperty(e) || t.hasPublicKeyProperty(e)) && n.parsePropertiesFrom(e)), n;
|
|
1879
1879
|
}
|
|
1880
1880
|
return t.prototype.parseKey = function(e) {
|
|
1881
1881
|
try {
|
|
1882
|
-
var n = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ?
|
|
1882
|
+
var n = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? Fn.decode(e) : ce.unarmor(e), o = qn.decode(a);
|
|
1883
1883
|
if (o.sub.length === 3 && (o = o.sub[2].sub[0]), o.sub.length === 9) {
|
|
1884
|
-
n = o.sub[1].getHexStringValue(), this.n =
|
|
1884
|
+
n = o.sub[1].getHexStringValue(), this.n = D(n, 16), r = o.sub[2].getHexStringValue(), this.e = parseInt(r, 16);
|
|
1885
1885
|
var c = o.sub[3].getHexStringValue();
|
|
1886
|
-
this.d =
|
|
1886
|
+
this.d = D(c, 16);
|
|
1887
1887
|
var u = o.sub[4].getHexStringValue();
|
|
1888
|
-
this.p =
|
|
1888
|
+
this.p = D(u, 16);
|
|
1889
1889
|
var l = o.sub[5].getHexStringValue();
|
|
1890
|
-
this.q =
|
|
1890
|
+
this.q = D(l, 16);
|
|
1891
1891
|
var f = o.sub[6].getHexStringValue();
|
|
1892
|
-
this.dmp1 =
|
|
1892
|
+
this.dmp1 = D(f, 16);
|
|
1893
1893
|
var d = o.sub[7].getHexStringValue();
|
|
1894
|
-
this.dmq1 =
|
|
1894
|
+
this.dmq1 = D(d, 16);
|
|
1895
1895
|
var g = o.sub[8].getHexStringValue();
|
|
1896
|
-
this.coeff =
|
|
1896
|
+
this.coeff = D(g, 16);
|
|
1897
1897
|
} else if (o.sub.length === 2)
|
|
1898
1898
|
if (o.sub[0].sub) {
|
|
1899
1899
|
var P = o.sub[1], m = P.sub[0];
|
|
1900
|
-
n = m.sub[0].getHexStringValue(), this.n =
|
|
1900
|
+
n = m.sub[0].getHexStringValue(), this.n = D(n, 16), r = m.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
|
|
1901
1901
|
} else
|
|
1902
|
-
n = o.sub[0].getHexStringValue(), this.n =
|
|
1902
|
+
n = o.sub[0].getHexStringValue(), this.n = D(n, 16), r = o.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
|
|
1903
1903
|
else
|
|
1904
1904
|
return !1;
|
|
1905
1905
|
return !0;
|
|
@@ -1922,7 +1922,7 @@ var li = /* @__PURE__ */ (function() {
|
|
|
1922
1922
|
}, n = new p.asn1.DERSequence(e);
|
|
1923
1923
|
return n.getEncodedHex();
|
|
1924
1924
|
}, t.prototype.getPrivateBaseKeyB64 = function() {
|
|
1925
|
-
return
|
|
1925
|
+
return Rt(this.getPrivateBaseKey());
|
|
1926
1926
|
}, t.prototype.getPublicBaseKey = function() {
|
|
1927
1927
|
var e = new p.asn1.DERSequence({
|
|
1928
1928
|
array: [
|
|
@@ -1942,7 +1942,7 @@ var li = /* @__PURE__ */ (function() {
|
|
|
1942
1942
|
});
|
|
1943
1943
|
return s.getEncodedHex();
|
|
1944
1944
|
}, t.prototype.getPublicBaseKeyB64 = function() {
|
|
1945
|
-
return
|
|
1945
|
+
return Rt(this.getPublicBaseKey());
|
|
1946
1946
|
}, t.wordwrap = function(e, n) {
|
|
1947
1947
|
if (n = n || 64, !e)
|
|
1948
1948
|
return e;
|
|
@@ -1967,34 +1967,34 @@ var li = /* @__PURE__ */ (function() {
|
|
|
1967
1967
|
}, t.prototype.parsePropertiesFrom = function(e) {
|
|
1968
1968
|
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);
|
|
1969
1969
|
}, t;
|
|
1970
|
-
})(
|
|
1971
|
-
), ie,
|
|
1970
|
+
})(li)
|
|
1971
|
+
), ie, _i = typeof process < "u" ? (ie = process.env) === null || ie === void 0 ? void 0 : ie.npm_package_version : void 0, gi = (
|
|
1972
1972
|
/** @class */
|
|
1973
1973
|
(function() {
|
|
1974
1974
|
function i(t) {
|
|
1975
1975
|
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;
|
|
1976
1976
|
}
|
|
1977
1977
|
return i.prototype.setKey = function(t) {
|
|
1978
|
-
t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new
|
|
1978
|
+
t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new ke(t)) : !this.key && this.log && console.error("A key was not set.");
|
|
1979
1979
|
}, i.prototype.setPrivateKey = function(t) {
|
|
1980
1980
|
this.setKey(t);
|
|
1981
1981
|
}, i.prototype.setPublicKey = function(t) {
|
|
1982
1982
|
this.setKey(t);
|
|
1983
1983
|
}, i.prototype.decrypt = function(t) {
|
|
1984
1984
|
try {
|
|
1985
|
-
return this.getKey().decrypt(
|
|
1985
|
+
return this.getKey().decrypt(Ie(t));
|
|
1986
1986
|
} catch {
|
|
1987
1987
|
return !1;
|
|
1988
1988
|
}
|
|
1989
1989
|
}, i.prototype.encrypt = function(t) {
|
|
1990
1990
|
try {
|
|
1991
|
-
return
|
|
1991
|
+
return Rt(this.getKey().encrypt(t));
|
|
1992
1992
|
} catch {
|
|
1993
1993
|
return !1;
|
|
1994
1994
|
}
|
|
1995
1995
|
}, i.prototype.encryptOAEP = function(t) {
|
|
1996
1996
|
try {
|
|
1997
|
-
return
|
|
1997
|
+
return Rt(this.getKey().encrypt(t, ui));
|
|
1998
1998
|
} catch {
|
|
1999
1999
|
return !1;
|
|
2000
2000
|
}
|
|
@@ -2003,30 +2003,30 @@ var li = /* @__PURE__ */ (function() {
|
|
|
2003
2003
|
return r;
|
|
2004
2004
|
}), n === void 0 && (n = "");
|
|
2005
2005
|
try {
|
|
2006
|
-
return
|
|
2006
|
+
return Rt(this.getKey().sign(t, e, n));
|
|
2007
2007
|
} catch {
|
|
2008
2008
|
return !1;
|
|
2009
2009
|
}
|
|
2010
2010
|
}, i.prototype.signSha256 = function(t) {
|
|
2011
2011
|
return this.sign(t, function(e) {
|
|
2012
|
-
return
|
|
2012
|
+
return Me(ue(e));
|
|
2013
2013
|
}, "sha256");
|
|
2014
2014
|
}, i.prototype.verify = function(t, e, n) {
|
|
2015
2015
|
n === void 0 && (n = function(r) {
|
|
2016
2016
|
return r;
|
|
2017
2017
|
});
|
|
2018
2018
|
try {
|
|
2019
|
-
return this.getKey().verify(t,
|
|
2019
|
+
return this.getKey().verify(t, Ie(e), n);
|
|
2020
2020
|
} catch {
|
|
2021
2021
|
return !1;
|
|
2022
2022
|
}
|
|
2023
2023
|
}, i.prototype.verifySha256 = function(t, e) {
|
|
2024
2024
|
return this.verify(t, e, function(n) {
|
|
2025
|
-
return
|
|
2025
|
+
return Me(ue(n));
|
|
2026
2026
|
});
|
|
2027
2027
|
}, i.prototype.getKey = function(t) {
|
|
2028
2028
|
if (!this.key) {
|
|
2029
|
-
if (this.key = new
|
|
2029
|
+
if (this.key = new ke(), t && {}.toString.call(t) === "[object Function]") {
|
|
2030
2030
|
this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
|
|
2031
2031
|
return;
|
|
2032
2032
|
}
|
|
@@ -2041,66 +2041,66 @@ var li = /* @__PURE__ */ (function() {
|
|
|
2041
2041
|
return this.getKey().getPublicKey();
|
|
2042
2042
|
}, i.prototype.getPublicKeyB64 = function() {
|
|
2043
2043
|
return this.getKey().getPublicBaseKeyB64();
|
|
2044
|
-
}, i.version =
|
|
2044
|
+
}, i.version = _i, i;
|
|
2045
2045
|
})()
|
|
2046
2046
|
);
|
|
2047
|
-
function
|
|
2047
|
+
function on(i, t) {
|
|
2048
2048
|
return function() {
|
|
2049
2049
|
return i.apply(t, arguments);
|
|
2050
2050
|
};
|
|
2051
2051
|
}
|
|
2052
|
-
const { toString:
|
|
2053
|
-
const e =
|
|
2052
|
+
const { toString: mi } = Object.prototype, { getPrototypeOf: zt } = Object, { iterator: Gt, toStringTag: cn } = Symbol, $t = /* @__PURE__ */ ((i) => (t) => {
|
|
2053
|
+
const e = mi.call(t);
|
|
2054
2054
|
return i[e] || (i[e] = e.slice(8, -1).toLowerCase());
|
|
2055
|
-
})(/* @__PURE__ */ Object.create(null)), W = (i) => (i = i.toLowerCase(), (t) => $t(t) === i), Jt = (i) => (t) => typeof t === i, { isArray:
|
|
2056
|
-
function
|
|
2057
|
-
return i !== null && !
|
|
2055
|
+
})(/* @__PURE__ */ Object.create(null)), W = (i) => (i = i.toLowerCase(), (t) => $t(t) === i), Jt = (i) => (t) => typeof t === i, { isArray: ht } = Array, Pt = Jt("undefined");
|
|
2056
|
+
function wt(i) {
|
|
2057
|
+
return i !== null && !Pt(i) && i.constructor !== null && !Pt(i.constructor) && F(i.constructor.isBuffer) && i.constructor.isBuffer(i);
|
|
2058
2058
|
}
|
|
2059
|
-
const
|
|
2060
|
-
function
|
|
2059
|
+
const un = W("ArrayBuffer");
|
|
2060
|
+
function yi(i) {
|
|
2061
2061
|
let t;
|
|
2062
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(i) : t = i && i.buffer &&
|
|
2062
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(i) : t = i && i.buffer && un(i.buffer), t;
|
|
2063
2063
|
}
|
|
2064
|
-
const
|
|
2064
|
+
const bi = Jt("string"), F = Jt("function"), ln = Jt("number"), Ct = (i) => i !== null && typeof i == "object", Pi = (i) => i === !0 || i === !1, jt = (i) => {
|
|
2065
2065
|
if ($t(i) !== "object")
|
|
2066
2066
|
return !1;
|
|
2067
2067
|
const t = zt(i);
|
|
2068
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
2069
|
-
},
|
|
2070
|
-
if (!
|
|
2068
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(cn in i) && !(Gt in i);
|
|
2069
|
+
}, Ei = (i) => {
|
|
2070
|
+
if (!Ct(i) || wt(i))
|
|
2071
2071
|
return !1;
|
|
2072
2072
|
try {
|
|
2073
2073
|
return Object.keys(i).length === 0 && Object.getPrototypeOf(i) === Object.prototype;
|
|
2074
2074
|
} catch {
|
|
2075
2075
|
return !1;
|
|
2076
2076
|
}
|
|
2077
|
-
},
|
|
2078
|
-
function
|
|
2077
|
+
}, wi = W("Date"), vi = W("File"), Si = (i) => !!(i && typeof i.uri < "u"), Ti = (i) => i && typeof i.getParts < "u", Ai = W("Blob"), Ri = W("FileList"), Ci = (i) => Ct(i) && F(i.pipe);
|
|
2078
|
+
function Oi() {
|
|
2079
2079
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
2080
2080
|
}
|
|
2081
|
-
const
|
|
2081
|
+
const je = Oi(), qe = typeof je.FormData < "u" ? je.FormData : void 0, Di = (i) => {
|
|
2082
2082
|
if (!i) return !1;
|
|
2083
|
-
if (
|
|
2083
|
+
if (qe && i instanceof qe) return !0;
|
|
2084
2084
|
const t = zt(i);
|
|
2085
|
-
if (!t || t === Object.prototype || !
|
|
2085
|
+
if (!t || t === Object.prototype || !F(i.append)) return !1;
|
|
2086
2086
|
const e = $t(i);
|
|
2087
2087
|
return e === "formdata" || // detect form-data instance
|
|
2088
|
-
e === "object" &&
|
|
2089
|
-
},
|
|
2088
|
+
e === "object" && F(i.toString) && i.toString() === "[object FormData]";
|
|
2089
|
+
}, Ii = W("URLSearchParams"), [Ni, Bi, xi, Ui] = [
|
|
2090
2090
|
"ReadableStream",
|
|
2091
2091
|
"Request",
|
|
2092
2092
|
"Response",
|
|
2093
2093
|
"Headers"
|
|
2094
|
-
].map(W),
|
|
2095
|
-
function
|
|
2094
|
+
].map(W), Li = (i) => i.trim ? i.trim() : i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
2095
|
+
function Ot(i, t, { allOwnKeys: e = !1 } = {}) {
|
|
2096
2096
|
if (i === null || typeof i > "u")
|
|
2097
2097
|
return;
|
|
2098
2098
|
let n, r;
|
|
2099
|
-
if (typeof i != "object" && (i = [i]),
|
|
2099
|
+
if (typeof i != "object" && (i = [i]), ht(i))
|
|
2100
2100
|
for (n = 0, r = i.length; n < r; n++)
|
|
2101
2101
|
t.call(null, i[n], n, i);
|
|
2102
2102
|
else {
|
|
2103
|
-
if (
|
|
2103
|
+
if (wt(i))
|
|
2104
2104
|
return;
|
|
2105
2105
|
const s = e ? Object.getOwnPropertyNames(i) : Object.keys(i), a = s.length;
|
|
2106
2106
|
let o;
|
|
@@ -2108,8 +2108,8 @@ function Ct(i, t, { allOwnKeys: e = !1 } = {}) {
|
|
|
2108
2108
|
o = s[n], t.call(null, i[o], o, i);
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2112
|
-
if (
|
|
2111
|
+
function hn(i, t) {
|
|
2112
|
+
if (wt(i))
|
|
2113
2113
|
return null;
|
|
2114
2114
|
t = t.toLowerCase();
|
|
2115
2115
|
const e = Object.keys(i);
|
|
@@ -2119,26 +2119,34 @@ function un(i, t) {
|
|
|
2119
2119
|
return r;
|
|
2120
2120
|
return null;
|
|
2121
2121
|
}
|
|
2122
|
-
const
|
|
2122
|
+
const ut = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, fn = (i) => !Pt(i) && i !== ut;
|
|
2123
2123
|
function le(...i) {
|
|
2124
|
-
const { caseless: t, skipUndefined: e } =
|
|
2124
|
+
const { caseless: t, skipUndefined: e } = fn(this) && this || {}, n = {}, r = (s, a) => {
|
|
2125
2125
|
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
2126
2126
|
return;
|
|
2127
|
-
const o = t &&
|
|
2128
|
-
jt(c) && jt(s) ? n[o] = le(c, s) : jt(s) ? n[o] = le({}, s) :
|
|
2127
|
+
const o = t && typeof a == "string" && hn(n, a) || a, c = he(n, o) ? n[o] : void 0;
|
|
2128
|
+
jt(c) && jt(s) ? n[o] = le(c, s) : jt(s) ? n[o] = le({}, s) : ht(s) ? n[o] = s.slice() : (!e || !Pt(s)) && (n[o] = s);
|
|
2129
2129
|
};
|
|
2130
|
-
for (let s = 0, a = i.length; s < a; s++)
|
|
2131
|
-
|
|
2130
|
+
for (let s = 0, a = i.length; s < a; s++) {
|
|
2131
|
+
const o = i[s];
|
|
2132
|
+
if (!o || wt(o) || (Ot(o, r), typeof o != "object" || ht(o)))
|
|
2133
|
+
continue;
|
|
2134
|
+
const c = Object.getOwnPropertySymbols(o);
|
|
2135
|
+
for (let u = 0; u < c.length; u++) {
|
|
2136
|
+
const l = c[u];
|
|
2137
|
+
Gi.call(o, l) && r(o[l], l);
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2132
2140
|
return n;
|
|
2133
2141
|
}
|
|
2134
|
-
const
|
|
2142
|
+
const Vi = (i, t, e, { allOwnKeys: n } = {}) => (Ot(
|
|
2135
2143
|
t,
|
|
2136
2144
|
(r, s) => {
|
|
2137
|
-
e &&
|
|
2145
|
+
e && F(r) ? Object.defineProperty(i, s, {
|
|
2138
2146
|
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
2139
2147
|
// hijack defineProperty's accessor-vs-data resolution.
|
|
2140
2148
|
__proto__: null,
|
|
2141
|
-
value:
|
|
2149
|
+
value: on(r, e),
|
|
2142
2150
|
writable: !0,
|
|
2143
2151
|
enumerable: !0,
|
|
2144
2152
|
configurable: !0
|
|
@@ -2151,7 +2159,7 @@ const Bi = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2151
2159
|
});
|
|
2152
2160
|
},
|
|
2153
2161
|
{ allOwnKeys: n }
|
|
2154
|
-
), i),
|
|
2162
|
+
), i), Mi = (i) => (i.charCodeAt(0) === 65279 && (i = i.slice(1)), i), Fi = (i, t, e, n) => {
|
|
2155
2163
|
i.prototype = Object.create(t.prototype, n), Object.defineProperty(i.prototype, "constructor", {
|
|
2156
2164
|
__proto__: null,
|
|
2157
2165
|
value: i,
|
|
@@ -2162,7 +2170,7 @@ const Bi = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2162
2170
|
__proto__: null,
|
|
2163
2171
|
value: t.prototype
|
|
2164
2172
|
}), e && Object.assign(i.prototype, e);
|
|
2165
|
-
},
|
|
2173
|
+
}, ki = (i, t, e, n) => {
|
|
2166
2174
|
let r, s, a;
|
|
2167
2175
|
const o = {};
|
|
2168
2176
|
if (t = t || {}, i == null) return t;
|
|
@@ -2172,46 +2180,46 @@ const Bi = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2172
2180
|
i = e !== !1 && zt(i);
|
|
2173
2181
|
} while (i && (!e || e(i, t)) && i !== Object.prototype);
|
|
2174
2182
|
return t;
|
|
2175
|
-
},
|
|
2183
|
+
}, ji = (i, t, e) => {
|
|
2176
2184
|
i = String(i), (e === void 0 || e > i.length) && (e = i.length), e -= t.length;
|
|
2177
2185
|
const n = i.indexOf(t, e);
|
|
2178
2186
|
return n !== -1 && n === e;
|
|
2179
|
-
},
|
|
2187
|
+
}, qi = (i) => {
|
|
2180
2188
|
if (!i) return null;
|
|
2181
|
-
if (
|
|
2189
|
+
if (ht(i)) return i;
|
|
2182
2190
|
let t = i.length;
|
|
2183
|
-
if (!
|
|
2191
|
+
if (!ln(t)) return null;
|
|
2184
2192
|
const e = new Array(t);
|
|
2185
2193
|
for (; t-- > 0; )
|
|
2186
2194
|
e[t] = i[t];
|
|
2187
2195
|
return e;
|
|
2188
|
-
},
|
|
2196
|
+
}, Ki = /* @__PURE__ */ ((i) => (t) => i && t instanceof i)(typeof Uint8Array < "u" && zt(Uint8Array)), Hi = (i, t) => {
|
|
2189
2197
|
const n = (i && i[Gt]).call(i);
|
|
2190
2198
|
let r;
|
|
2191
2199
|
for (; (r = n.next()) && !r.done; ) {
|
|
2192
2200
|
const s = r.value;
|
|
2193
2201
|
t.call(i, s[0], s[1]);
|
|
2194
2202
|
}
|
|
2195
|
-
},
|
|
2203
|
+
}, Wi = (i, t) => {
|
|
2196
2204
|
let e;
|
|
2197
2205
|
const n = [];
|
|
2198
2206
|
for (; (e = i.exec(t)) !== null; )
|
|
2199
2207
|
n.push(e);
|
|
2200
2208
|
return n;
|
|
2201
|
-
},
|
|
2209
|
+
}, Xi = W("HTMLFormElement"), zi = (i) => i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, n, r) {
|
|
2202
2210
|
return n.toUpperCase() + r;
|
|
2203
|
-
}), he = (({ hasOwnProperty: i }) => (t, e) => i.call(t, e))(Object.prototype),
|
|
2211
|
+
}), he = (({ hasOwnProperty: i }) => (t, e) => i.call(t, e))(Object.prototype), { propertyIsEnumerable: Gi } = Object.prototype, $i = W("RegExp"), pn = (i, t) => {
|
|
2204
2212
|
const e = Object.getOwnPropertyDescriptors(i), n = {};
|
|
2205
|
-
|
|
2213
|
+
Ot(e, (r, s) => {
|
|
2206
2214
|
let a;
|
|
2207
2215
|
(a = t(r, s, i)) !== !1 && (n[s] = a || r);
|
|
2208
2216
|
}), Object.defineProperties(i, n);
|
|
2209
|
-
},
|
|
2210
|
-
|
|
2211
|
-
if (
|
|
2217
|
+
}, Ji = (i) => {
|
|
2218
|
+
pn(i, (t, e) => {
|
|
2219
|
+
if (F(i) && ["arguments", "caller", "callee"].includes(e))
|
|
2212
2220
|
return !1;
|
|
2213
2221
|
const n = i[e];
|
|
2214
|
-
if (
|
|
2222
|
+
if (F(n)) {
|
|
2215
2223
|
if (t.enumerable = !1, "writable" in t) {
|
|
2216
2224
|
t.writable = !1;
|
|
2217
2225
|
return;
|
|
@@ -2221,107 +2229,107 @@ const Bi = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2221
2229
|
});
|
|
2222
2230
|
}
|
|
2223
2231
|
});
|
|
2224
|
-
},
|
|
2232
|
+
}, Qi = (i, t) => {
|
|
2225
2233
|
const e = {}, n = (r) => {
|
|
2226
2234
|
r.forEach((s) => {
|
|
2227
2235
|
e[s] = !0;
|
|
2228
2236
|
});
|
|
2229
2237
|
};
|
|
2230
|
-
return
|
|
2231
|
-
},
|
|
2232
|
-
},
|
|
2233
|
-
function
|
|
2234
|
-
return !!(i &&
|
|
2238
|
+
return ht(i) ? n(i) : n(String(i).split(t)), e;
|
|
2239
|
+
}, Zi = () => {
|
|
2240
|
+
}, Yi = (i, t) => i != null && Number.isFinite(i = +i) ? i : t;
|
|
2241
|
+
function tr(i) {
|
|
2242
|
+
return !!(i && F(i.append) && i[cn] === "FormData" && i[Gt]);
|
|
2235
2243
|
}
|
|
2236
|
-
const
|
|
2244
|
+
const er = (i) => {
|
|
2237
2245
|
const t = /* @__PURE__ */ new WeakSet(), e = (n) => {
|
|
2238
|
-
if (
|
|
2246
|
+
if (Ct(n)) {
|
|
2239
2247
|
if (t.has(n))
|
|
2240
2248
|
return;
|
|
2241
|
-
if (
|
|
2249
|
+
if (wt(n))
|
|
2242
2250
|
return n;
|
|
2243
2251
|
if (!("toJSON" in n)) {
|
|
2244
2252
|
t.add(n);
|
|
2245
|
-
const r =
|
|
2246
|
-
return
|
|
2253
|
+
const r = ht(n) ? [] : {};
|
|
2254
|
+
return Ot(n, (s, a) => {
|
|
2247
2255
|
const o = e(s);
|
|
2248
|
-
!
|
|
2256
|
+
!Pt(o) && (r[a] = o);
|
|
2249
2257
|
}), t.delete(n), r;
|
|
2250
2258
|
}
|
|
2251
2259
|
}
|
|
2252
2260
|
return n;
|
|
2253
2261
|
};
|
|
2254
2262
|
return e(i);
|
|
2255
|
-
},
|
|
2263
|
+
}, nr = W("AsyncFunction"), ir = (i) => i && (Ct(i) || F(i)) && F(i.then) && F(i.catch), dn = ((i, t) => i ? setImmediate : t ? ((e, n) => (ut.addEventListener(
|
|
2256
2264
|
"message",
|
|
2257
2265
|
({ source: r, data: s }) => {
|
|
2258
|
-
r ===
|
|
2266
|
+
r === ut && s === e && n.length && n.shift()();
|
|
2259
2267
|
},
|
|
2260
2268
|
!1
|
|
2261
2269
|
), (r) => {
|
|
2262
|
-
n.push(r),
|
|
2263
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function",
|
|
2264
|
-
isArray:
|
|
2265
|
-
isArrayBuffer:
|
|
2266
|
-
isBuffer:
|
|
2267
|
-
isFormData:
|
|
2268
|
-
isArrayBufferView:
|
|
2269
|
-
isString:
|
|
2270
|
-
isNumber:
|
|
2271
|
-
isBoolean:
|
|
2272
|
-
isObject:
|
|
2270
|
+
n.push(r), ut.postMessage(e, "*");
|
|
2271
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", F(ut.postMessage)), rr = typeof queueMicrotask < "u" ? queueMicrotask.bind(ut) : typeof process < "u" && process.nextTick || dn, sr = (i) => i != null && F(i[Gt]), h = {
|
|
2272
|
+
isArray: ht,
|
|
2273
|
+
isArrayBuffer: un,
|
|
2274
|
+
isBuffer: wt,
|
|
2275
|
+
isFormData: Di,
|
|
2276
|
+
isArrayBufferView: yi,
|
|
2277
|
+
isString: bi,
|
|
2278
|
+
isNumber: ln,
|
|
2279
|
+
isBoolean: Pi,
|
|
2280
|
+
isObject: Ct,
|
|
2273
2281
|
isPlainObject: jt,
|
|
2274
|
-
isEmptyObject:
|
|
2275
|
-
isReadableStream:
|
|
2276
|
-
isRequest:
|
|
2277
|
-
isResponse:
|
|
2278
|
-
isHeaders:
|
|
2279
|
-
isUndefined:
|
|
2280
|
-
isDate:
|
|
2281
|
-
isFile:
|
|
2282
|
-
isReactNativeBlob:
|
|
2283
|
-
isReactNative:
|
|
2284
|
-
isBlob:
|
|
2285
|
-
isRegExp:
|
|
2286
|
-
isFunction:
|
|
2287
|
-
isStream:
|
|
2288
|
-
isURLSearchParams:
|
|
2289
|
-
isTypedArray:
|
|
2290
|
-
isFileList:
|
|
2291
|
-
forEach:
|
|
2282
|
+
isEmptyObject: Ei,
|
|
2283
|
+
isReadableStream: Ni,
|
|
2284
|
+
isRequest: Bi,
|
|
2285
|
+
isResponse: xi,
|
|
2286
|
+
isHeaders: Ui,
|
|
2287
|
+
isUndefined: Pt,
|
|
2288
|
+
isDate: wi,
|
|
2289
|
+
isFile: vi,
|
|
2290
|
+
isReactNativeBlob: Si,
|
|
2291
|
+
isReactNative: Ti,
|
|
2292
|
+
isBlob: Ai,
|
|
2293
|
+
isRegExp: $i,
|
|
2294
|
+
isFunction: F,
|
|
2295
|
+
isStream: Ci,
|
|
2296
|
+
isURLSearchParams: Ii,
|
|
2297
|
+
isTypedArray: Ki,
|
|
2298
|
+
isFileList: Ri,
|
|
2299
|
+
forEach: Ot,
|
|
2292
2300
|
merge: le,
|
|
2293
|
-
extend:
|
|
2294
|
-
trim:
|
|
2295
|
-
stripBOM:
|
|
2296
|
-
inherits:
|
|
2297
|
-
toFlatObject:
|
|
2301
|
+
extend: Vi,
|
|
2302
|
+
trim: Li,
|
|
2303
|
+
stripBOM: Mi,
|
|
2304
|
+
inherits: Fi,
|
|
2305
|
+
toFlatObject: ki,
|
|
2298
2306
|
kindOf: $t,
|
|
2299
2307
|
kindOfTest: W,
|
|
2300
|
-
endsWith:
|
|
2301
|
-
toArray:
|
|
2302
|
-
forEachEntry:
|
|
2303
|
-
matchAll:
|
|
2304
|
-
isHTMLForm:
|
|
2308
|
+
endsWith: ji,
|
|
2309
|
+
toArray: qi,
|
|
2310
|
+
forEachEntry: Hi,
|
|
2311
|
+
matchAll: Wi,
|
|
2312
|
+
isHTMLForm: Xi,
|
|
2305
2313
|
hasOwnProperty: he,
|
|
2306
2314
|
hasOwnProp: he,
|
|
2307
2315
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
2308
|
-
reduceDescriptors:
|
|
2309
|
-
freezeMethods:
|
|
2310
|
-
toObjectSet:
|
|
2311
|
-
toCamelCase:
|
|
2312
|
-
noop:
|
|
2313
|
-
toFiniteNumber:
|
|
2314
|
-
findKey:
|
|
2315
|
-
global:
|
|
2316
|
-
isContextDefined:
|
|
2317
|
-
isSpecCompliantForm:
|
|
2318
|
-
toJSONObject:
|
|
2319
|
-
isAsyncFn:
|
|
2320
|
-
isThenable:
|
|
2321
|
-
setImmediate:
|
|
2322
|
-
asap:
|
|
2323
|
-
isIterable:
|
|
2324
|
-
},
|
|
2316
|
+
reduceDescriptors: pn,
|
|
2317
|
+
freezeMethods: Ji,
|
|
2318
|
+
toObjectSet: Qi,
|
|
2319
|
+
toCamelCase: zi,
|
|
2320
|
+
noop: Zi,
|
|
2321
|
+
toFiniteNumber: Yi,
|
|
2322
|
+
findKey: hn,
|
|
2323
|
+
global: ut,
|
|
2324
|
+
isContextDefined: fn,
|
|
2325
|
+
isSpecCompliantForm: tr,
|
|
2326
|
+
toJSONObject: er,
|
|
2327
|
+
isAsyncFn: nr,
|
|
2328
|
+
isThenable: ir,
|
|
2329
|
+
setImmediate: dn,
|
|
2330
|
+
asap: rr,
|
|
2331
|
+
isIterable: sr
|
|
2332
|
+
}, ar = h.toObjectSet([
|
|
2325
2333
|
"age",
|
|
2326
2334
|
"authorization",
|
|
2327
2335
|
"content-length",
|
|
@@ -2339,15 +2347,15 @@ const Ji = (i) => {
|
|
|
2339
2347
|
"referer",
|
|
2340
2348
|
"retry-after",
|
|
2341
2349
|
"user-agent"
|
|
2342
|
-
]),
|
|
2350
|
+
]), or = (i) => {
|
|
2343
2351
|
const t = {};
|
|
2344
2352
|
let e, n, r;
|
|
2345
2353
|
return i && i.split(`
|
|
2346
2354
|
`).forEach(function(a) {
|
|
2347
|
-
r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), n = a.substring(r + 1).trim(), !(!e || t[e] &&
|
|
2355
|
+
r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), n = a.substring(r + 1).trim(), !(!e || t[e] && ar[e]) && (e === "set-cookie" ? t[e] ? t[e].push(n) : t[e] = [n] : t[e] = t[e] ? t[e] + ", " + n : n);
|
|
2348
2356
|
}), t;
|
|
2349
2357
|
};
|
|
2350
|
-
function
|
|
2358
|
+
function cr(i) {
|
|
2351
2359
|
let t = 0, e = i.length;
|
|
2352
2360
|
for (; t < e; ) {
|
|
2353
2361
|
const n = i.charCodeAt(t);
|
|
@@ -2363,32 +2371,32 @@ function ir(i) {
|
|
|
2363
2371
|
}
|
|
2364
2372
|
return t === 0 && e === i.length ? i : i.slice(t, e);
|
|
2365
2373
|
}
|
|
2366
|
-
const
|
|
2374
|
+
const ur = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), lr = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
2367
2375
|
function ge(i, t) {
|
|
2368
|
-
return h.isArray(i) ? i.map((e) => ge(e, t)) :
|
|
2376
|
+
return h.isArray(i) ? i.map((e) => ge(e, t)) : cr(String(i).replace(t, ""));
|
|
2369
2377
|
}
|
|
2370
|
-
const
|
|
2371
|
-
function
|
|
2378
|
+
const hr = (i) => ge(i, ur), fr = (i) => ge(i, lr);
|
|
2379
|
+
function _n(i) {
|
|
2372
2380
|
const t = /* @__PURE__ */ Object.create(null);
|
|
2373
2381
|
return h.forEach(i.toJSON(), (e, n) => {
|
|
2374
|
-
t[n] =
|
|
2382
|
+
t[n] = fr(e);
|
|
2375
2383
|
}), t;
|
|
2376
2384
|
}
|
|
2377
|
-
const
|
|
2378
|
-
function
|
|
2385
|
+
const Ke = /* @__PURE__ */ Symbol("internals");
|
|
2386
|
+
function Tt(i) {
|
|
2379
2387
|
return i && String(i).trim().toLowerCase();
|
|
2380
2388
|
}
|
|
2381
2389
|
function qt(i) {
|
|
2382
|
-
return i === !1 || i == null ? i : h.isArray(i) ? i.map(qt) :
|
|
2390
|
+
return i === !1 || i == null ? i : h.isArray(i) ? i.map(qt) : hr(String(i));
|
|
2383
2391
|
}
|
|
2384
|
-
function
|
|
2392
|
+
function pr(i) {
|
|
2385
2393
|
const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
2386
2394
|
let n;
|
|
2387
2395
|
for (; n = e.exec(i); )
|
|
2388
2396
|
t[n[1]] = n[2];
|
|
2389
2397
|
return t;
|
|
2390
2398
|
}
|
|
2391
|
-
const
|
|
2399
|
+
const dr = (i) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());
|
|
2392
2400
|
function re(i, t, e, n, r) {
|
|
2393
2401
|
if (h.isFunction(n))
|
|
2394
2402
|
return n.call(this, t, e);
|
|
@@ -2399,10 +2407,10 @@ function re(i, t, e, n, r) {
|
|
|
2399
2407
|
return n.test(t);
|
|
2400
2408
|
}
|
|
2401
2409
|
}
|
|
2402
|
-
function
|
|
2410
|
+
function _r(i) {
|
|
2403
2411
|
return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, e, n) => e.toUpperCase() + n);
|
|
2404
2412
|
}
|
|
2405
|
-
function
|
|
2413
|
+
function gr(i, t) {
|
|
2406
2414
|
const e = h.toCamelCase(" " + t);
|
|
2407
2415
|
["get", "set", "has"].forEach((n) => {
|
|
2408
2416
|
Object.defineProperty(i, n + e, {
|
|
@@ -2423,22 +2431,22 @@ let V = class {
|
|
|
2423
2431
|
set(t, e, n) {
|
|
2424
2432
|
const r = this;
|
|
2425
2433
|
function s(o, c, u) {
|
|
2426
|
-
const l =
|
|
2434
|
+
const l = Tt(c);
|
|
2427
2435
|
if (!l)
|
|
2428
|
-
|
|
2436
|
+
return;
|
|
2429
2437
|
const f = h.findKey(r, l);
|
|
2430
2438
|
(!f || r[f] === void 0 || u === !0 || u === void 0 && r[f] !== !1) && (r[f || c] = qt(o));
|
|
2431
2439
|
}
|
|
2432
2440
|
const a = (o, c) => h.forEach(o, (u, l) => s(u, l, c));
|
|
2433
2441
|
if (h.isPlainObject(t) || t instanceof this.constructor)
|
|
2434
2442
|
a(t, e);
|
|
2435
|
-
else if (h.isString(t) && (t = t.trim()) && !
|
|
2436
|
-
a(
|
|
2443
|
+
else if (h.isString(t) && (t = t.trim()) && !dr(t))
|
|
2444
|
+
a(or(t), e);
|
|
2437
2445
|
else if (h.isObject(t) && h.isIterable(t)) {
|
|
2438
2446
|
let o = {}, c, u;
|
|
2439
2447
|
for (const l of t) {
|
|
2440
2448
|
if (!h.isArray(l))
|
|
2441
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
2449
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
2442
2450
|
o[u = l[0]] = (c = o[u]) ? h.isArray(c) ? [...c, l[1]] : [c, l[1]] : l[1];
|
|
2443
2451
|
}
|
|
2444
2452
|
a(o, e);
|
|
@@ -2447,14 +2455,14 @@ let V = class {
|
|
|
2447
2455
|
return this;
|
|
2448
2456
|
}
|
|
2449
2457
|
get(t, e) {
|
|
2450
|
-
if (t =
|
|
2458
|
+
if (t = Tt(t), t) {
|
|
2451
2459
|
const n = h.findKey(this, t);
|
|
2452
2460
|
if (n) {
|
|
2453
2461
|
const r = this[n];
|
|
2454
2462
|
if (!e)
|
|
2455
2463
|
return r;
|
|
2456
2464
|
if (e === !0)
|
|
2457
|
-
return
|
|
2465
|
+
return pr(r);
|
|
2458
2466
|
if (h.isFunction(e))
|
|
2459
2467
|
return e.call(this, r, n);
|
|
2460
2468
|
if (h.isRegExp(e))
|
|
@@ -2464,7 +2472,7 @@ let V = class {
|
|
|
2464
2472
|
}
|
|
2465
2473
|
}
|
|
2466
2474
|
has(t, e) {
|
|
2467
|
-
if (t =
|
|
2475
|
+
if (t = Tt(t), t) {
|
|
2468
2476
|
const n = h.findKey(this, t);
|
|
2469
2477
|
return !!(n && this[n] !== void 0 && (!e || re(this, this[n], n, e)));
|
|
2470
2478
|
}
|
|
@@ -2474,7 +2482,7 @@ let V = class {
|
|
|
2474
2482
|
const n = this;
|
|
2475
2483
|
let r = !1;
|
|
2476
2484
|
function s(a) {
|
|
2477
|
-
if (a =
|
|
2485
|
+
if (a = Tt(a), a) {
|
|
2478
2486
|
const o = h.findKey(n, a);
|
|
2479
2487
|
o && (!e || re(n, n[o], o, e)) && (delete n[o], r = !0);
|
|
2480
2488
|
}
|
|
@@ -2498,7 +2506,7 @@ let V = class {
|
|
|
2498
2506
|
e[a] = qt(r), delete e[s];
|
|
2499
2507
|
return;
|
|
2500
2508
|
}
|
|
2501
|
-
const o = t ?
|
|
2509
|
+
const o = t ? _r(s) : String(s).trim();
|
|
2502
2510
|
o !== s && delete e[s], e[o] = qt(r), n[o] = !0;
|
|
2503
2511
|
}), this;
|
|
2504
2512
|
}
|
|
@@ -2532,12 +2540,12 @@ let V = class {
|
|
|
2532
2540
|
return e.forEach((r) => n.set(r)), n;
|
|
2533
2541
|
}
|
|
2534
2542
|
static accessor(t) {
|
|
2535
|
-
const n = (this[
|
|
2543
|
+
const n = (this[Ke] = this[Ke] = {
|
|
2536
2544
|
accessors: {}
|
|
2537
2545
|
}).accessors, r = this.prototype;
|
|
2538
2546
|
function s(a) {
|
|
2539
|
-
const o =
|
|
2540
|
-
n[o] || (
|
|
2547
|
+
const o = Tt(a);
|
|
2548
|
+
n[o] || (gr(r, a), n[o] = !0);
|
|
2541
2549
|
}
|
|
2542
2550
|
return h.isArray(t) ? t.forEach(s) : s(t), this;
|
|
2543
2551
|
}
|
|
@@ -2560,8 +2568,8 @@ h.reduceDescriptors(V.prototype, ({ value: i }, t) => {
|
|
|
2560
2568
|
};
|
|
2561
2569
|
});
|
|
2562
2570
|
h.freezeMethods(V);
|
|
2563
|
-
const
|
|
2564
|
-
function
|
|
2571
|
+
const mr = "[REDACTED ****]";
|
|
2572
|
+
function yr(i) {
|
|
2565
2573
|
if (h.hasOwnProp(i, "toJSON"))
|
|
2566
2574
|
return !0;
|
|
2567
2575
|
let t = Object.getPrototypeOf(i);
|
|
@@ -2572,7 +2580,7 @@ function pr(i) {
|
|
|
2572
2580
|
}
|
|
2573
2581
|
return !1;
|
|
2574
2582
|
}
|
|
2575
|
-
function
|
|
2583
|
+
function br(i, t) {
|
|
2576
2584
|
const e = new Set(t.map((s) => String(s).toLowerCase())), n = [], r = (s) => {
|
|
2577
2585
|
if (s === null || typeof s != "object" || h.isBuffer(s)) return s;
|
|
2578
2586
|
if (n.indexOf(s) !== -1) return;
|
|
@@ -2584,11 +2592,11 @@ function dr(i, t) {
|
|
|
2584
2592
|
h.isUndefined(u) || (a[c] = u);
|
|
2585
2593
|
});
|
|
2586
2594
|
else {
|
|
2587
|
-
if (!h.isPlainObject(s) &&
|
|
2595
|
+
if (!h.isPlainObject(s) && yr(s))
|
|
2588
2596
|
return n.pop(), s;
|
|
2589
2597
|
a = /* @__PURE__ */ Object.create(null);
|
|
2590
2598
|
for (const [o, c] of Object.entries(s)) {
|
|
2591
|
-
const u = e.has(o.toLowerCase()) ?
|
|
2599
|
+
const u = e.has(o.toLowerCase()) ? mr : r(c);
|
|
2592
2600
|
h.isUndefined(u) || (a[o] = u);
|
|
2593
2601
|
}
|
|
2594
2602
|
}
|
|
@@ -2596,9 +2604,9 @@ function dr(i, t) {
|
|
|
2596
2604
|
};
|
|
2597
2605
|
return r(i);
|
|
2598
2606
|
}
|
|
2599
|
-
let
|
|
2607
|
+
let b = class gn extends Error {
|
|
2600
2608
|
static from(t, e, n, r, s, a) {
|
|
2601
|
-
const o = new
|
|
2609
|
+
const o = new gn(t.message, e || t.code, n, r, s);
|
|
2602
2610
|
return o.cause = t, o.name = t.name, t.status != null && o.status == null && (o.status = t.status), a && Object.assign(o, a), o;
|
|
2603
2611
|
}
|
|
2604
2612
|
/**
|
|
@@ -2624,7 +2632,7 @@ let y = class dn extends Error {
|
|
|
2624
2632
|
}), this.name = "AxiosError", this.isAxiosError = !0, e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status);
|
|
2625
2633
|
}
|
|
2626
2634
|
toJSON() {
|
|
2627
|
-
const t = this.config, e = t && h.hasOwnProp(t, "redact") ? t.redact : void 0, n = h.isArray(e) && e.length > 0 ?
|
|
2635
|
+
const t = this.config, e = t && h.hasOwnProp(t, "redact") ? t.redact : void 0, n = h.isArray(e) && e.length > 0 ? br(t, e) : h.toJSONObject(t);
|
|
2628
2636
|
return {
|
|
2629
2637
|
// Standard
|
|
2630
2638
|
message: this.message,
|
|
@@ -2644,36 +2652,36 @@ let y = class dn extends Error {
|
|
|
2644
2652
|
};
|
|
2645
2653
|
}
|
|
2646
2654
|
};
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
const
|
|
2655
|
+
b.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
2656
|
+
b.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
2657
|
+
b.ECONNABORTED = "ECONNABORTED";
|
|
2658
|
+
b.ETIMEDOUT = "ETIMEDOUT";
|
|
2659
|
+
b.ECONNREFUSED = "ECONNREFUSED";
|
|
2660
|
+
b.ERR_NETWORK = "ERR_NETWORK";
|
|
2661
|
+
b.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
2662
|
+
b.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
2663
|
+
b.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
2664
|
+
b.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
2665
|
+
b.ERR_CANCELED = "ERR_CANCELED";
|
|
2666
|
+
b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
2667
|
+
b.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
2668
|
+
b.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
2669
|
+
const Pr = null;
|
|
2662
2670
|
function fe(i) {
|
|
2663
2671
|
return h.isPlainObject(i) || h.isArray(i);
|
|
2664
2672
|
}
|
|
2665
|
-
function
|
|
2673
|
+
function mn(i) {
|
|
2666
2674
|
return h.endsWith(i, "[]") ? i.slice(0, -2) : i;
|
|
2667
2675
|
}
|
|
2668
2676
|
function se(i, t, e) {
|
|
2669
2677
|
return i ? i.concat(t).map(function(r, s) {
|
|
2670
|
-
return r =
|
|
2678
|
+
return r = mn(r), !e && s ? "[" + r + "]" : r;
|
|
2671
2679
|
}).join(e ? "." : "") : t;
|
|
2672
2680
|
}
|
|
2673
|
-
function
|
|
2681
|
+
function Er(i) {
|
|
2674
2682
|
return h.isArray(i) && !i.some(fe);
|
|
2675
2683
|
}
|
|
2676
|
-
const
|
|
2684
|
+
const wr = h.toFlatObject(h, {}, null, function(t) {
|
|
2677
2685
|
return /^is[A-Z]/.test(t);
|
|
2678
2686
|
});
|
|
2679
2687
|
function Qt(i, t, e) {
|
|
@@ -2687,8 +2695,8 @@ function Qt(i, t, e) {
|
|
|
2687
2695
|
indexes: !1
|
|
2688
2696
|
},
|
|
2689
2697
|
!1,
|
|
2690
|
-
function(_,
|
|
2691
|
-
return !h.isUndefined(
|
|
2698
|
+
function(_, y) {
|
|
2699
|
+
return !h.isUndefined(y[_]);
|
|
2692
2700
|
}
|
|
2693
2701
|
);
|
|
2694
2702
|
const n = e.metaTokens, r = e.visitor || f, s = e.dots, a = e.indexes, o = e.Blob || typeof Blob < "u" && Blob, c = e.maxDepth === void 0 ? 100 : e.maxDepth, u = o && h.isSpecCompliantForm(t);
|
|
@@ -2701,43 +2709,43 @@ function Qt(i, t, e) {
|
|
|
2701
2709
|
if (h.isBoolean(m))
|
|
2702
2710
|
return m.toString();
|
|
2703
2711
|
if (!u && h.isBlob(m))
|
|
2704
|
-
throw new
|
|
2712
|
+
throw new b("Blob is not supported. Use a Buffer instead.");
|
|
2705
2713
|
return h.isArrayBuffer(m) || h.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
2706
2714
|
}
|
|
2707
|
-
function f(m, _,
|
|
2715
|
+
function f(m, _, y) {
|
|
2708
2716
|
let v = m;
|
|
2709
2717
|
if (h.isReactNative(t) && h.isReactNativeBlob(m))
|
|
2710
|
-
return t.append(se(
|
|
2711
|
-
if (m && !
|
|
2718
|
+
return t.append(se(y, _, s), l(m)), !1;
|
|
2719
|
+
if (m && !y && typeof m == "object") {
|
|
2712
2720
|
if (h.endsWith(_, "{}"))
|
|
2713
2721
|
_ = n ? _ : _.slice(0, -2), m = JSON.stringify(m);
|
|
2714
|
-
else if (h.isArray(m) &&
|
|
2715
|
-
return _ =
|
|
2716
|
-
!(h.isUndefined(
|
|
2722
|
+
else if (h.isArray(m) && Er(m) || (h.isFileList(m) || h.endsWith(_, "[]")) && (v = h.toArray(m)))
|
|
2723
|
+
return _ = mn(_), v.forEach(function(R, U) {
|
|
2724
|
+
!(h.isUndefined(R) || R === null) && t.append(
|
|
2717
2725
|
// eslint-disable-next-line no-nested-ternary
|
|
2718
|
-
a === !0 ? se([_],
|
|
2719
|
-
l(
|
|
2726
|
+
a === !0 ? se([_], U, s) : a === null ? _ : _ + "[]",
|
|
2727
|
+
l(R)
|
|
2720
2728
|
);
|
|
2721
2729
|
}), !1;
|
|
2722
2730
|
}
|
|
2723
|
-
return fe(m) ? !0 : (t.append(se(
|
|
2731
|
+
return fe(m) ? !0 : (t.append(se(y, _, s), l(m)), !1);
|
|
2724
2732
|
}
|
|
2725
|
-
const d = [], g = Object.assign(
|
|
2733
|
+
const d = [], g = Object.assign(wr, {
|
|
2726
2734
|
defaultVisitor: f,
|
|
2727
2735
|
convertValue: l,
|
|
2728
2736
|
isVisitable: fe
|
|
2729
2737
|
});
|
|
2730
|
-
function P(m, _,
|
|
2738
|
+
function P(m, _, y = 0) {
|
|
2731
2739
|
if (!h.isUndefined(m)) {
|
|
2732
|
-
if (
|
|
2733
|
-
throw new
|
|
2734
|
-
"Object is too deeply nested (" +
|
|
2735
|
-
|
|
2740
|
+
if (y > c)
|
|
2741
|
+
throw new b(
|
|
2742
|
+
"Object is too deeply nested (" + y + " levels). Max depth: " + c,
|
|
2743
|
+
b.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
2736
2744
|
);
|
|
2737
2745
|
if (d.indexOf(m) !== -1)
|
|
2738
|
-
throw Error("Circular reference detected in " + _.join("."));
|
|
2739
|
-
d.push(m), h.forEach(m, function(
|
|
2740
|
-
(!(h.isUndefined(
|
|
2746
|
+
throw new Error("Circular reference detected in " + _.join("."));
|
|
2747
|
+
d.push(m), h.forEach(m, function(A, R) {
|
|
2748
|
+
(!(h.isUndefined(A) || A === null) && r.call(t, A, h.isString(R) ? R.trim() : R, _, g)) === !0 && P(A, _ ? _.concat(R) : [R], y + 1);
|
|
2741
2749
|
}), d.pop();
|
|
2742
2750
|
}
|
|
2743
2751
|
}
|
|
@@ -2745,7 +2753,7 @@ function Qt(i, t, e) {
|
|
|
2745
2753
|
throw new TypeError("data must be an object");
|
|
2746
2754
|
return P(i), t;
|
|
2747
2755
|
}
|
|
2748
|
-
function
|
|
2756
|
+
function He(i) {
|
|
2749
2757
|
const t = {
|
|
2750
2758
|
"!": "%21",
|
|
2751
2759
|
"'": "%27",
|
|
@@ -2761,25 +2769,25 @@ function Ke(i) {
|
|
|
2761
2769
|
function me(i, t) {
|
|
2762
2770
|
this._pairs = [], i && Qt(i, this, t);
|
|
2763
2771
|
}
|
|
2764
|
-
const
|
|
2765
|
-
|
|
2772
|
+
const yn = me.prototype;
|
|
2773
|
+
yn.append = function(t, e) {
|
|
2766
2774
|
this._pairs.push([t, e]);
|
|
2767
2775
|
};
|
|
2768
|
-
|
|
2776
|
+
yn.toString = function(t) {
|
|
2769
2777
|
const e = t ? function(n) {
|
|
2770
|
-
return t.call(this, n,
|
|
2771
|
-
} :
|
|
2778
|
+
return t.call(this, n, He);
|
|
2779
|
+
} : He;
|
|
2772
2780
|
return this._pairs.map(function(r) {
|
|
2773
2781
|
return e(r[0]) + "=" + e(r[1]);
|
|
2774
2782
|
}, "").join("&");
|
|
2775
2783
|
};
|
|
2776
|
-
function
|
|
2784
|
+
function vr(i) {
|
|
2777
2785
|
return encodeURIComponent(i).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
2778
2786
|
}
|
|
2779
|
-
function
|
|
2787
|
+
function bn(i, t, e) {
|
|
2780
2788
|
if (!t)
|
|
2781
2789
|
return i;
|
|
2782
|
-
const n = e && e.encode ||
|
|
2790
|
+
const n = e && e.encode || vr, r = h.isFunction(e) ? {
|
|
2783
2791
|
serialize: e
|
|
2784
2792
|
} : e, s = r && r.serialize;
|
|
2785
2793
|
let a;
|
|
@@ -2789,7 +2797,7 @@ function mn(i, t, e) {
|
|
|
2789
2797
|
}
|
|
2790
2798
|
return i;
|
|
2791
2799
|
}
|
|
2792
|
-
class
|
|
2800
|
+
class We {
|
|
2793
2801
|
constructor() {
|
|
2794
2802
|
this.handlers = [];
|
|
2795
2803
|
}
|
|
@@ -2848,28 +2856,29 @@ const ye = {
|
|
|
2848
2856
|
silentJSONParsing: !0,
|
|
2849
2857
|
forcedJSONParsing: !0,
|
|
2850
2858
|
clarifyTimeoutError: !1,
|
|
2851
|
-
legacyInterceptorReqResOrdering: !0
|
|
2852
|
-
|
|
2859
|
+
legacyInterceptorReqResOrdering: !0,
|
|
2860
|
+
advertiseZstdAcceptEncoding: !1
|
|
2861
|
+
}, Sr = typeof URLSearchParams < "u" ? URLSearchParams : me, Tr = typeof FormData < "u" ? FormData : null, Ar = typeof Blob < "u" ? Blob : null, Rr = {
|
|
2853
2862
|
isBrowser: !0,
|
|
2854
2863
|
classes: {
|
|
2855
|
-
URLSearchParams:
|
|
2856
|
-
FormData:
|
|
2857
|
-
Blob:
|
|
2864
|
+
URLSearchParams: Sr,
|
|
2865
|
+
FormData: Tr,
|
|
2866
|
+
Blob: Ar
|
|
2858
2867
|
},
|
|
2859
2868
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
2860
|
-
}, be = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0,
|
|
2861
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
2869
|
+
}, be = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, Cr = be && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), Or = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
2870
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Dr = be && window.location.href || "http://localhost", Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2862
2871
|
__proto__: null,
|
|
2863
2872
|
hasBrowserEnv: be,
|
|
2864
|
-
hasStandardBrowserEnv:
|
|
2865
|
-
hasStandardBrowserWebWorkerEnv:
|
|
2873
|
+
hasStandardBrowserEnv: Cr,
|
|
2874
|
+
hasStandardBrowserWebWorkerEnv: Or,
|
|
2866
2875
|
navigator: pe,
|
|
2867
|
-
origin:
|
|
2876
|
+
origin: Dr
|
|
2868
2877
|
}, Symbol.toStringTag, { value: "Module" })), x = {
|
|
2869
|
-
...
|
|
2870
|
-
...
|
|
2878
|
+
...Ir,
|
|
2879
|
+
...Rr
|
|
2871
2880
|
};
|
|
2872
|
-
function
|
|
2881
|
+
function Nr(i, t) {
|
|
2873
2882
|
return Qt(i, new x.classes.URLSearchParams(), {
|
|
2874
2883
|
visitor: function(e, n, r, s) {
|
|
2875
2884
|
return x.isNode && h.isBuffer(e) ? (this.append(n, e.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
@@ -2877,10 +2886,10 @@ function Rr(i, t) {
|
|
|
2877
2886
|
...t
|
|
2878
2887
|
});
|
|
2879
2888
|
}
|
|
2880
|
-
function
|
|
2889
|
+
function Br(i) {
|
|
2881
2890
|
return h.matchAll(/\w+|\[(\w*)]/g, i).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
2882
2891
|
}
|
|
2883
|
-
function
|
|
2892
|
+
function xr(i) {
|
|
2884
2893
|
const t = {}, e = Object.keys(i);
|
|
2885
2894
|
let n;
|
|
2886
2895
|
const r = e.length;
|
|
@@ -2889,23 +2898,23 @@ function Or(i) {
|
|
|
2889
2898
|
s = e[n], t[s] = i[s];
|
|
2890
2899
|
return t;
|
|
2891
2900
|
}
|
|
2892
|
-
function
|
|
2901
|
+
function Pn(i) {
|
|
2893
2902
|
function t(e, n, r, s) {
|
|
2894
2903
|
let a = e[s++];
|
|
2895
2904
|
if (a === "__proto__") return !0;
|
|
2896
2905
|
const o = Number.isFinite(+a), c = s >= e.length;
|
|
2897
|
-
return a = !a && h.isArray(r) ? r.length : a, c ? (h.hasOwnProp(r, a) ? r[a] = h.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!h.hasOwnProp(r, a) || !h.isObject(r[a])) && (r[a] = []), t(e, n, r[a], s) && h.isArray(r[a]) && (r[a] =
|
|
2906
|
+
return a = !a && h.isArray(r) ? r.length : a, c ? (h.hasOwnProp(r, a) ? r[a] = h.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!h.hasOwnProp(r, a) || !h.isObject(r[a])) && (r[a] = []), t(e, n, r[a], s) && h.isArray(r[a]) && (r[a] = xr(r[a])), !o);
|
|
2898
2907
|
}
|
|
2899
2908
|
if (h.isFormData(i) && h.isFunction(i.entries)) {
|
|
2900
2909
|
const e = {};
|
|
2901
2910
|
return h.forEachEntry(i, (n, r) => {
|
|
2902
|
-
t(
|
|
2911
|
+
t(Br(n), r, e, 0);
|
|
2903
2912
|
}), e;
|
|
2904
2913
|
}
|
|
2905
2914
|
return null;
|
|
2906
2915
|
}
|
|
2907
|
-
const
|
|
2908
|
-
function
|
|
2916
|
+
const mt = (i, t) => i != null && h.hasOwnProp(i, t) ? i[t] : void 0;
|
|
2917
|
+
function Ur(i, t, e) {
|
|
2909
2918
|
if (h.isString(i))
|
|
2910
2919
|
try {
|
|
2911
2920
|
return (t || JSON.parse)(i), h.trim(i);
|
|
@@ -2915,14 +2924,14 @@ function Dr(i, t, e) {
|
|
|
2915
2924
|
}
|
|
2916
2925
|
return (e || JSON.stringify)(i);
|
|
2917
2926
|
}
|
|
2918
|
-
const
|
|
2927
|
+
const Dt = {
|
|
2919
2928
|
transitional: ye,
|
|
2920
2929
|
adapter: ["xhr", "http", "fetch"],
|
|
2921
2930
|
transformRequest: [
|
|
2922
2931
|
function(t, e) {
|
|
2923
2932
|
const n = e.getContentType() || "", r = n.indexOf("application/json") > -1, s = h.isObject(t);
|
|
2924
2933
|
if (s && h.isHTMLForm(t) && (t = new FormData(t)), h.isFormData(t))
|
|
2925
|
-
return r ? JSON.stringify(
|
|
2934
|
+
return r ? JSON.stringify(Pn(t)) : t;
|
|
2926
2935
|
if (h.isArrayBuffer(t) || h.isBuffer(t) || h.isStream(t) || h.isFile(t) || h.isBlob(t) || h.isReadableStream(t))
|
|
2927
2936
|
return t;
|
|
2928
2937
|
if (h.isArrayBufferView(t))
|
|
@@ -2931,11 +2940,11 @@ const Ot = {
|
|
|
2931
2940
|
return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
2932
2941
|
let o;
|
|
2933
2942
|
if (s) {
|
|
2934
|
-
const c =
|
|
2943
|
+
const c = mt(this, "formSerializer");
|
|
2935
2944
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
2936
|
-
return
|
|
2945
|
+
return Nr(t, c).toString();
|
|
2937
2946
|
if ((o = h.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
2938
|
-
const u =
|
|
2947
|
+
const u = mt(this, "env"), l = u && u.FormData;
|
|
2939
2948
|
return Qt(
|
|
2940
2949
|
o ? { "files[]": t } : t,
|
|
2941
2950
|
l && new l(),
|
|
@@ -2943,21 +2952,21 @@ const Ot = {
|
|
|
2943
2952
|
);
|
|
2944
2953
|
}
|
|
2945
2954
|
}
|
|
2946
|
-
return s || r ? (e.setContentType("application/json", !1),
|
|
2955
|
+
return s || r ? (e.setContentType("application/json", !1), Ur(t)) : t;
|
|
2947
2956
|
}
|
|
2948
2957
|
],
|
|
2949
2958
|
transformResponse: [
|
|
2950
2959
|
function(t) {
|
|
2951
|
-
const e =
|
|
2960
|
+
const e = mt(this, "transitional") || Dt.transitional, n = e && e.forcedJSONParsing, r = mt(this, "responseType"), s = r === "json";
|
|
2952
2961
|
if (h.isResponse(t) || h.isReadableStream(t))
|
|
2953
2962
|
return t;
|
|
2954
2963
|
if (t && h.isString(t) && (n && !r || s)) {
|
|
2955
2964
|
const o = !(e && e.silentJSONParsing) && s;
|
|
2956
2965
|
try {
|
|
2957
|
-
return JSON.parse(t,
|
|
2966
|
+
return JSON.parse(t, mt(this, "parseReviver"));
|
|
2958
2967
|
} catch (c) {
|
|
2959
2968
|
if (o)
|
|
2960
|
-
throw c.name === "SyntaxError" ?
|
|
2969
|
+
throw c.name === "SyntaxError" ? b.from(c, b.ERR_BAD_RESPONSE, this, null, mt(this, "response")) : c;
|
|
2961
2970
|
}
|
|
2962
2971
|
}
|
|
2963
2972
|
return t;
|
|
@@ -2987,19 +2996,19 @@ const Ot = {
|
|
|
2987
2996
|
}
|
|
2988
2997
|
};
|
|
2989
2998
|
h.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (i) => {
|
|
2990
|
-
|
|
2999
|
+
Dt.headers[i] = {};
|
|
2991
3000
|
});
|
|
2992
3001
|
function ae(i, t) {
|
|
2993
|
-
const e = this ||
|
|
3002
|
+
const e = this || Dt, n = t || e, r = V.from(n.headers);
|
|
2994
3003
|
let s = n.data;
|
|
2995
3004
|
return h.forEach(i, function(o) {
|
|
2996
3005
|
s = o.call(e, s, r.normalize(), t ? t.status : void 0);
|
|
2997
3006
|
}), r.normalize(), s;
|
|
2998
3007
|
}
|
|
2999
|
-
function
|
|
3008
|
+
function En(i) {
|
|
3000
3009
|
return !!(i && i.__CANCEL__);
|
|
3001
3010
|
}
|
|
3002
|
-
let
|
|
3011
|
+
let It = class extends b {
|
|
3003
3012
|
/**
|
|
3004
3013
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
3005
3014
|
*
|
|
@@ -3010,24 +3019,24 @@ let Dt = class extends y {
|
|
|
3010
3019
|
* @returns {CanceledError} The created error.
|
|
3011
3020
|
*/
|
|
3012
3021
|
constructor(t, e, n) {
|
|
3013
|
-
super(t ?? "canceled",
|
|
3022
|
+
super(t ?? "canceled", b.ERR_CANCELED, e, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
3014
3023
|
}
|
|
3015
3024
|
};
|
|
3016
|
-
function
|
|
3025
|
+
function wn(i, t, e) {
|
|
3017
3026
|
const n = e.config.validateStatus;
|
|
3018
|
-
!e.status || !n || n(e.status) ? i(e) : t(new
|
|
3027
|
+
!e.status || !n || n(e.status) ? i(e) : t(new b(
|
|
3019
3028
|
"Request failed with status code " + e.status,
|
|
3020
|
-
e.status >= 400 && e.status < 500 ?
|
|
3029
|
+
e.status >= 400 && e.status < 500 ? b.ERR_BAD_REQUEST : b.ERR_BAD_RESPONSE,
|
|
3021
3030
|
e.config,
|
|
3022
3031
|
e.request,
|
|
3023
3032
|
e
|
|
3024
3033
|
));
|
|
3025
3034
|
}
|
|
3026
|
-
function
|
|
3035
|
+
function Lr(i) {
|
|
3027
3036
|
const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(i);
|
|
3028
3037
|
return t && t[1] || "";
|
|
3029
3038
|
}
|
|
3030
|
-
function
|
|
3039
|
+
function Vr(i, t) {
|
|
3031
3040
|
i = i || 10;
|
|
3032
3041
|
const e = new Array(i), n = new Array(i);
|
|
3033
3042
|
let r = 0, s = 0, a;
|
|
@@ -3043,7 +3052,7 @@ function Nr(i, t) {
|
|
|
3043
3052
|
return g ? Math.round(d * 1e3 / g) : void 0;
|
|
3044
3053
|
};
|
|
3045
3054
|
}
|
|
3046
|
-
function
|
|
3055
|
+
function Mr(i, t) {
|
|
3047
3056
|
let e = 0, n = 1e3 / t, r, s;
|
|
3048
3057
|
const a = (u, l = Date.now()) => {
|
|
3049
3058
|
e = l, r = null, s && (clearTimeout(s), s = null), i(...u);
|
|
@@ -3057,8 +3066,8 @@ function Br(i, t) {
|
|
|
3057
3066
|
}
|
|
3058
3067
|
const Wt = (i, t, e = 3) => {
|
|
3059
3068
|
let n = 0;
|
|
3060
|
-
const r =
|
|
3061
|
-
return
|
|
3069
|
+
const r = Vr(50, 250);
|
|
3070
|
+
return Mr((s) => {
|
|
3062
3071
|
if (!s || typeof s.loaded != "number")
|
|
3063
3072
|
return;
|
|
3064
3073
|
const a = s.loaded, o = s.lengthComputable ? s.total : void 0, c = o != null ? Math.min(a, o) : a, u = Math.max(0, c - n), l = r(u);
|
|
@@ -3076,7 +3085,7 @@ const Wt = (i, t, e = 3) => {
|
|
|
3076
3085
|
};
|
|
3077
3086
|
i(f);
|
|
3078
3087
|
}, e);
|
|
3079
|
-
},
|
|
3088
|
+
}, Xe = (i, t) => {
|
|
3080
3089
|
const e = i != null;
|
|
3081
3090
|
return [
|
|
3082
3091
|
(n) => t[0]({
|
|
@@ -3086,10 +3095,10 @@ const Wt = (i, t, e = 3) => {
|
|
|
3086
3095
|
}),
|
|
3087
3096
|
t[1]
|
|
3088
3097
|
];
|
|
3089
|
-
},
|
|
3098
|
+
}, ze = (i) => (...t) => h.asap(() => i(...t)), Fr = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((i, t) => (e) => (e = new URL(e, x.origin), i.protocol === e.protocol && i.host === e.host && (t || i.port === e.port)))(
|
|
3090
3099
|
new URL(x.origin),
|
|
3091
3100
|
x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
|
|
3092
|
-
) : () => !0,
|
|
3101
|
+
) : () => !0, kr = x.hasStandardBrowserEnv ? (
|
|
3093
3102
|
// Standard browser envs support document.cookie
|
|
3094
3103
|
{
|
|
3095
3104
|
write(i, t, e, n, r, s, a) {
|
|
@@ -3123,18 +3132,18 @@ const Wt = (i, t, e = 3) => {
|
|
|
3123
3132
|
}
|
|
3124
3133
|
}
|
|
3125
3134
|
);
|
|
3126
|
-
function
|
|
3135
|
+
function jr(i) {
|
|
3127
3136
|
return typeof i != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(i);
|
|
3128
3137
|
}
|
|
3129
|
-
function
|
|
3138
|
+
function qr(i, t) {
|
|
3130
3139
|
return t ? i.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : i;
|
|
3131
3140
|
}
|
|
3132
|
-
function
|
|
3133
|
-
let n = !
|
|
3134
|
-
return i && (n || e === !1) ?
|
|
3141
|
+
function vn(i, t, e) {
|
|
3142
|
+
let n = !jr(t);
|
|
3143
|
+
return i && (n || e === !1) ? qr(i, t) : t;
|
|
3135
3144
|
}
|
|
3136
|
-
const
|
|
3137
|
-
function
|
|
3145
|
+
const Ge = (i) => i instanceof V ? { ...i } : i;
|
|
3146
|
+
function ft(i, t) {
|
|
3138
3147
|
t = t || {};
|
|
3139
3148
|
const e = /* @__PURE__ */ Object.create(null);
|
|
3140
3149
|
Object.defineProperty(e, "hasOwnProperty", {
|
|
@@ -3201,7 +3210,7 @@ function lt(i, t) {
|
|
|
3201
3210
|
allowedSocketPaths: a,
|
|
3202
3211
|
responseEncoding: a,
|
|
3203
3212
|
validateStatus: o,
|
|
3204
|
-
headers: (u, l, f) => r(
|
|
3213
|
+
headers: (u, l, f) => r(Ge(u), Ge(l), f, !0)
|
|
3205
3214
|
};
|
|
3206
3215
|
return h.forEach(Object.keys({ ...i, ...t }), function(l) {
|
|
3207
3216
|
if (l === "__proto__" || l === "constructor" || l === "prototype") return;
|
|
@@ -3209,40 +3218,42 @@ function lt(i, t) {
|
|
|
3209
3218
|
h.isUndefined(P) && f !== o || (e[l] = P);
|
|
3210
3219
|
}), e;
|
|
3211
3220
|
}
|
|
3212
|
-
const
|
|
3213
|
-
function
|
|
3221
|
+
const Kr = ["content-type", "content-length"];
|
|
3222
|
+
function Hr(i, t, e) {
|
|
3214
3223
|
if (e !== "content-only") {
|
|
3215
3224
|
i.set(t);
|
|
3216
3225
|
return;
|
|
3217
3226
|
}
|
|
3218
3227
|
Object.entries(t).forEach(([n, r]) => {
|
|
3219
|
-
|
|
3228
|
+
Kr.includes(n.toLowerCase()) && i.set(n, r);
|
|
3220
3229
|
});
|
|
3221
3230
|
}
|
|
3222
|
-
const
|
|
3231
|
+
const Wr = (i) => encodeURIComponent(i).replace(
|
|
3223
3232
|
/%([0-9A-F]{2})/gi,
|
|
3224
3233
|
(t, e) => String.fromCharCode(parseInt(e, 16))
|
|
3225
|
-
)
|
|
3226
|
-
|
|
3234
|
+
);
|
|
3235
|
+
function Sn(i) {
|
|
3236
|
+
const t = ft({}, i), e = (d) => h.hasOwnProp(t, d) ? t[d] : void 0, n = e("data");
|
|
3227
3237
|
let r = e("withXSRFToken");
|
|
3228
3238
|
const s = e("xsrfHeaderName"), a = e("xsrfCookieName");
|
|
3229
3239
|
let o = e("headers");
|
|
3230
3240
|
const c = e("auth"), u = e("baseURL"), l = e("allowAbsoluteUrls"), f = e("url");
|
|
3231
|
-
if (t.headers = o = V.from(o), t.url =
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3241
|
+
if (t.headers = o = V.from(o), t.url = bn(
|
|
3242
|
+
vn(u, f, l),
|
|
3243
|
+
e("params"),
|
|
3244
|
+
e("paramsSerializer")
|
|
3235
3245
|
), c && o.set(
|
|
3236
3246
|
"Authorization",
|
|
3237
|
-
"Basic " + btoa((c.username || "") + ":" + (c.password ?
|
|
3238
|
-
), h.isFormData(n) && (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv ? o.setContentType(void 0) : h.isFunction(n.getHeaders) &&
|
|
3239
|
-
const g = s && a &&
|
|
3247
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? Wr(c.password) : ""))
|
|
3248
|
+
), h.isFormData(n) && (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv || h.isReactNative(n) ? o.setContentType(void 0) : h.isFunction(n.getHeaders) && Hr(o, n.getHeaders(), e("formDataHeaderPolicy"))), x.hasStandardBrowserEnv && (h.isFunction(r) && (r = r(t)), r === !0 || r == null && Fr(t.url))) {
|
|
3249
|
+
const g = s && a && kr.read(a);
|
|
3240
3250
|
g && o.set(s, g);
|
|
3241
3251
|
}
|
|
3242
3252
|
return t;
|
|
3243
|
-
}
|
|
3253
|
+
}
|
|
3254
|
+
const Xr = typeof XMLHttpRequest < "u", zr = Xr && function(i) {
|
|
3244
3255
|
return new Promise(function(e, n) {
|
|
3245
|
-
const r =
|
|
3256
|
+
const r = Sn(i);
|
|
3246
3257
|
let s = r.data;
|
|
3247
3258
|
const a = V.from(r.headers).normalize();
|
|
3248
3259
|
let { responseType: o, onUploadProgress: c, onDownloadProgress: u } = r, l, f, d, g, P;
|
|
@@ -3251,58 +3262,58 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3251
3262
|
}
|
|
3252
3263
|
let _ = new XMLHttpRequest();
|
|
3253
3264
|
_.open(r.method.toUpperCase(), r.url, !0), _.timeout = r.timeout;
|
|
3254
|
-
function
|
|
3265
|
+
function y() {
|
|
3255
3266
|
if (!_)
|
|
3256
3267
|
return;
|
|
3257
|
-
const
|
|
3268
|
+
const A = V.from(
|
|
3258
3269
|
"getAllResponseHeaders" in _ && _.getAllResponseHeaders()
|
|
3259
|
-
),
|
|
3270
|
+
), U = {
|
|
3260
3271
|
data: !o || o === "text" || o === "json" ? _.responseText : _.response,
|
|
3261
3272
|
status: _.status,
|
|
3262
3273
|
statusText: _.statusText,
|
|
3263
|
-
headers:
|
|
3274
|
+
headers: A,
|
|
3264
3275
|
config: i,
|
|
3265
3276
|
request: _
|
|
3266
3277
|
};
|
|
3267
|
-
|
|
3278
|
+
wn(
|
|
3268
3279
|
function(K) {
|
|
3269
3280
|
e(K), m();
|
|
3270
3281
|
},
|
|
3271
3282
|
function(K) {
|
|
3272
3283
|
n(K), m();
|
|
3273
3284
|
},
|
|
3274
|
-
|
|
3285
|
+
U
|
|
3275
3286
|
), _ = null;
|
|
3276
3287
|
}
|
|
3277
|
-
"onloadend" in _ ? _.onloadend =
|
|
3278
|
-
!_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.startsWith("file:")) || setTimeout(
|
|
3288
|
+
"onloadend" in _ ? _.onloadend = y : _.onreadystatechange = function() {
|
|
3289
|
+
!_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.startsWith("file:")) || setTimeout(y);
|
|
3279
3290
|
}, _.onabort = function() {
|
|
3280
|
-
_ && (n(new
|
|
3281
|
-
}, _.onerror = function(
|
|
3282
|
-
const
|
|
3283
|
-
E.event =
|
|
3291
|
+
_ && (n(new b("Request aborted", b.ECONNABORTED, i, _)), m(), _ = null);
|
|
3292
|
+
}, _.onerror = function(R) {
|
|
3293
|
+
const U = R && R.message ? R.message : "Network Error", E = new b(U, b.ERR_NETWORK, i, _);
|
|
3294
|
+
E.event = R || null, n(E), m(), _ = null;
|
|
3284
3295
|
}, _.ontimeout = function() {
|
|
3285
|
-
let
|
|
3286
|
-
const
|
|
3287
|
-
r.timeoutErrorMessage && (
|
|
3288
|
-
new
|
|
3289
|
-
|
|
3290
|
-
|
|
3296
|
+
let R = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
3297
|
+
const U = r.transitional || ye;
|
|
3298
|
+
r.timeoutErrorMessage && (R = r.timeoutErrorMessage), n(
|
|
3299
|
+
new b(
|
|
3300
|
+
R,
|
|
3301
|
+
U.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
|
|
3291
3302
|
i,
|
|
3292
3303
|
_
|
|
3293
3304
|
)
|
|
3294
3305
|
), m(), _ = null;
|
|
3295
|
-
}, s === void 0 && a.setContentType(null), "setRequestHeader" in _ && h.forEach(
|
|
3296
|
-
_.setRequestHeader(
|
|
3297
|
-
}), h.isUndefined(r.withCredentials) || (_.withCredentials = !!r.withCredentials), o && o !== "json" && (_.responseType = r.responseType), u && ([d, P] = Wt(u, !0), _.addEventListener("progress", d)), c && _.upload && ([f, g] = Wt(c), _.upload.addEventListener("progress", f), _.upload.addEventListener("loadend", g)), (r.cancelToken || r.signal) && (l = (
|
|
3298
|
-
_ && (n(!
|
|
3306
|
+
}, s === void 0 && a.setContentType(null), "setRequestHeader" in _ && h.forEach(_n(a), function(R, U) {
|
|
3307
|
+
_.setRequestHeader(U, R);
|
|
3308
|
+
}), h.isUndefined(r.withCredentials) || (_.withCredentials = !!r.withCredentials), o && o !== "json" && (_.responseType = r.responseType), u && ([d, P] = Wt(u, !0), _.addEventListener("progress", d)), c && _.upload && ([f, g] = Wt(c), _.upload.addEventListener("progress", f), _.upload.addEventListener("loadend", g)), (r.cancelToken || r.signal) && (l = (A) => {
|
|
3309
|
+
_ && (n(!A || A.type ? new It(null, i, _) : A), _.abort(), m(), _ = null);
|
|
3299
3310
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
3300
|
-
const v =
|
|
3311
|
+
const v = Lr(r.url);
|
|
3301
3312
|
if (v && !x.protocols.includes(v)) {
|
|
3302
3313
|
n(
|
|
3303
|
-
new
|
|
3314
|
+
new b(
|
|
3304
3315
|
"Unsupported protocol " + v + ":",
|
|
3305
|
-
|
|
3316
|
+
b.ERR_BAD_REQUEST,
|
|
3306
3317
|
i
|
|
3307
3318
|
)
|
|
3308
3319
|
);
|
|
@@ -3310,7 +3321,7 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3310
3321
|
}
|
|
3311
3322
|
_.send(s || null);
|
|
3312
3323
|
});
|
|
3313
|
-
},
|
|
3324
|
+
}, Gr = (i, t) => {
|
|
3314
3325
|
if (i = i ? i.filter(Boolean) : [], !t && !i.length)
|
|
3315
3326
|
return;
|
|
3316
3327
|
const e = new AbortController();
|
|
@@ -3320,12 +3331,12 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3320
3331
|
n = !0, a();
|
|
3321
3332
|
const u = c instanceof Error ? c : this.reason;
|
|
3322
3333
|
e.abort(
|
|
3323
|
-
u instanceof
|
|
3334
|
+
u instanceof b ? u : new It(u instanceof Error ? u.message : u)
|
|
3324
3335
|
);
|
|
3325
3336
|
}
|
|
3326
3337
|
};
|
|
3327
3338
|
let s = t && setTimeout(() => {
|
|
3328
|
-
s = null, r(new
|
|
3339
|
+
s = null, r(new b(`timeout of ${t}ms exceeded`, b.ETIMEDOUT));
|
|
3329
3340
|
}, t);
|
|
3330
3341
|
const a = () => {
|
|
3331
3342
|
i && (s && clearTimeout(s), s = null, i.forEach((c) => {
|
|
@@ -3335,7 +3346,7 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3335
3346
|
i.forEach((c) => c.addEventListener("abort", r));
|
|
3336
3347
|
const { signal: o } = e;
|
|
3337
3348
|
return o.unsubscribe = () => h.asap(a), o;
|
|
3338
|
-
},
|
|
3349
|
+
}, $r = function* (i, t) {
|
|
3339
3350
|
let e = i.byteLength;
|
|
3340
3351
|
if (e < t) {
|
|
3341
3352
|
yield i;
|
|
@@ -3344,10 +3355,10 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3344
3355
|
let n = 0, r;
|
|
3345
3356
|
for (; n < e; )
|
|
3346
3357
|
r = n + t, yield i.slice(n, r), n = r;
|
|
3347
|
-
},
|
|
3348
|
-
for await (const e of
|
|
3349
|
-
yield*
|
|
3350
|
-
},
|
|
3358
|
+
}, Jr = async function* (i, t) {
|
|
3359
|
+
for await (const e of Qr(i))
|
|
3360
|
+
yield* $r(e, t);
|
|
3361
|
+
}, Qr = async function* (i) {
|
|
3351
3362
|
if (i[Symbol.asyncIterator]) {
|
|
3352
3363
|
yield* i;
|
|
3353
3364
|
return;
|
|
@@ -3363,8 +3374,8 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3363
3374
|
} finally {
|
|
3364
3375
|
await t.cancel();
|
|
3365
3376
|
}
|
|
3366
|
-
},
|
|
3367
|
-
const r =
|
|
3377
|
+
}, $e = (i, t, e, n) => {
|
|
3378
|
+
const r = Jr(i, t);
|
|
3368
3379
|
let s = 0, a, o = (c) => {
|
|
3369
3380
|
a || (a = !0, n && n(c));
|
|
3370
3381
|
};
|
|
@@ -3396,7 +3407,7 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3396
3407
|
}
|
|
3397
3408
|
);
|
|
3398
3409
|
};
|
|
3399
|
-
function
|
|
3410
|
+
function Zr(i) {
|
|
3400
3411
|
if (!i || typeof i != "string" || !i.startsWith("data:")) return 0;
|
|
3401
3412
|
const t = i.indexOf(",");
|
|
3402
3413
|
if (t < 0) return 0;
|
|
@@ -3434,13 +3445,28 @@ function zr(i) {
|
|
|
3434
3445
|
}
|
|
3435
3446
|
return s;
|
|
3436
3447
|
}
|
|
3437
|
-
const Pe = "1.
|
|
3448
|
+
const Pe = "1.17.0", Je = 64 * 1024, { isFunction: Ft } = h, Yr = (i) => encodeURIComponent(i).replace(
|
|
3449
|
+
/%([0-9A-F]{2})/gi,
|
|
3450
|
+
(t, e) => String.fromCharCode(parseInt(e, 16))
|
|
3451
|
+
), Qe = (i) => {
|
|
3452
|
+
if (!h.isString(i))
|
|
3453
|
+
return i;
|
|
3454
|
+
try {
|
|
3455
|
+
return decodeURIComponent(i);
|
|
3456
|
+
} catch {
|
|
3457
|
+
return i;
|
|
3458
|
+
}
|
|
3459
|
+
}, Ze = (i, ...t) => {
|
|
3438
3460
|
try {
|
|
3439
3461
|
return !!i(...t);
|
|
3440
3462
|
} catch {
|
|
3441
3463
|
return !1;
|
|
3442
3464
|
}
|
|
3443
|
-
},
|
|
3465
|
+
}, ts = (i) => {
|
|
3466
|
+
const t = i.indexOf("://");
|
|
3467
|
+
let e = i;
|
|
3468
|
+
return t !== -1 && (e = e.slice(t + 3)), e.includes("@") || e.includes(":");
|
|
3469
|
+
}, es = (i) => {
|
|
3444
3470
|
const t = h.global !== void 0 && h.global !== null ? h.global : globalThis, { ReadableStream: e, TextEncoder: n } = t;
|
|
3445
3471
|
i = h.merge.call(
|
|
3446
3472
|
{
|
|
@@ -3455,223 +3481,246 @@ const Pe = "1.16.1", $e = 64 * 1024, { isFunction: Ft } = h, Je = (i, ...t) => {
|
|
|
3455
3481
|
const { fetch: r, Request: s, Response: a } = i, o = r ? Ft(r) : typeof fetch == "function", c = Ft(s), u = Ft(a);
|
|
3456
3482
|
if (!o)
|
|
3457
3483
|
return !1;
|
|
3458
|
-
const l = o && Ft(e), f = o && (typeof n == "function" ? /* @__PURE__ */ ((
|
|
3459
|
-
let
|
|
3484
|
+
const l = o && Ft(e), f = o && (typeof n == "function" ? /* @__PURE__ */ ((y) => (v) => y.encode(v))(new n()) : async (y) => new Uint8Array(await new s(y).arrayBuffer())), d = c && l && Ze(() => {
|
|
3485
|
+
let y = !1;
|
|
3460
3486
|
const v = new s(x.origin, {
|
|
3461
3487
|
body: new e(),
|
|
3462
3488
|
method: "POST",
|
|
3463
3489
|
get duplex() {
|
|
3464
|
-
return
|
|
3490
|
+
return y = !0, "half";
|
|
3465
3491
|
}
|
|
3466
|
-
}),
|
|
3467
|
-
return v.body != null && v.body.cancel(),
|
|
3468
|
-
}), g = u && l &&
|
|
3469
|
-
stream: g && ((
|
|
3492
|
+
}), A = v.headers.has("Content-Type");
|
|
3493
|
+
return v.body != null && v.body.cancel(), y && !A;
|
|
3494
|
+
}), g = u && l && Ze(() => h.isReadableStream(new a("").body)), P = {
|
|
3495
|
+
stream: g && ((y) => y.body)
|
|
3470
3496
|
};
|
|
3471
|
-
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
3472
|
-
!P[
|
|
3473
|
-
let
|
|
3474
|
-
if (
|
|
3475
|
-
return
|
|
3476
|
-
throw new
|
|
3477
|
-
`Response type '${
|
|
3478
|
-
|
|
3479
|
-
|
|
3497
|
+
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((y) => {
|
|
3498
|
+
!P[y] && (P[y] = (v, A) => {
|
|
3499
|
+
let R = v && v[y];
|
|
3500
|
+
if (R)
|
|
3501
|
+
return R.call(v);
|
|
3502
|
+
throw new b(
|
|
3503
|
+
`Response type '${y}' is not supported`,
|
|
3504
|
+
b.ERR_NOT_SUPPORT,
|
|
3505
|
+
A
|
|
3480
3506
|
);
|
|
3481
3507
|
});
|
|
3482
3508
|
});
|
|
3483
|
-
const m = async (
|
|
3484
|
-
if (
|
|
3509
|
+
const m = async (y) => {
|
|
3510
|
+
if (y == null)
|
|
3485
3511
|
return 0;
|
|
3486
|
-
if (h.isBlob(
|
|
3487
|
-
return
|
|
3488
|
-
if (h.isSpecCompliantForm(
|
|
3512
|
+
if (h.isBlob(y))
|
|
3513
|
+
return y.size;
|
|
3514
|
+
if (h.isSpecCompliantForm(y))
|
|
3489
3515
|
return (await new s(x.origin, {
|
|
3490
3516
|
method: "POST",
|
|
3491
|
-
body:
|
|
3517
|
+
body: y
|
|
3492
3518
|
}).arrayBuffer()).byteLength;
|
|
3493
|
-
if (h.isArrayBufferView(
|
|
3494
|
-
return
|
|
3495
|
-
if (h.isURLSearchParams(
|
|
3496
|
-
return (await f(
|
|
3497
|
-
}, _ = async (
|
|
3498
|
-
const
|
|
3499
|
-
return
|
|
3519
|
+
if (h.isArrayBufferView(y) || h.isArrayBuffer(y))
|
|
3520
|
+
return y.byteLength;
|
|
3521
|
+
if (h.isURLSearchParams(y) && (y = y + ""), h.isString(y))
|
|
3522
|
+
return (await f(y)).byteLength;
|
|
3523
|
+
}, _ = async (y, v) => {
|
|
3524
|
+
const A = h.toFiniteNumber(y.getContentLength());
|
|
3525
|
+
return A ?? m(v);
|
|
3500
3526
|
};
|
|
3501
|
-
return async (
|
|
3527
|
+
return async (y) => {
|
|
3502
3528
|
let {
|
|
3503
3529
|
url: v,
|
|
3504
|
-
method:
|
|
3505
|
-
data:
|
|
3506
|
-
signal:
|
|
3530
|
+
method: A,
|
|
3531
|
+
data: R,
|
|
3532
|
+
signal: U,
|
|
3507
3533
|
cancelToken: E,
|
|
3508
3534
|
timeout: K,
|
|
3509
|
-
onDownloadProgress:
|
|
3535
|
+
onDownloadProgress: Z,
|
|
3510
3536
|
onUploadProgress: X,
|
|
3511
|
-
responseType:
|
|
3537
|
+
responseType: k,
|
|
3512
3538
|
headers: I,
|
|
3513
|
-
withCredentials:
|
|
3514
|
-
fetchOptions:
|
|
3539
|
+
withCredentials: pt = "same-origin",
|
|
3540
|
+
fetchOptions: at,
|
|
3515
3541
|
maxContentLength: z,
|
|
3516
3542
|
maxBodyLength: Yt
|
|
3517
|
-
} =
|
|
3518
|
-
const
|
|
3543
|
+
} = Sn(y);
|
|
3544
|
+
const vt = h.isNumber(z) && z > -1, On = h.isNumber(Yt) && Yt > -1, Dn = (O) => h.hasOwnProp(y, O) ? y[O] : void 0;
|
|
3519
3545
|
let we = r || fetch;
|
|
3520
|
-
|
|
3521
|
-
let
|
|
3522
|
-
[
|
|
3546
|
+
k = k ? (k + "").toLowerCase() : "text";
|
|
3547
|
+
let nt = Gr(
|
|
3548
|
+
[U, E && E.toAbortSignal()],
|
|
3523
3549
|
K
|
|
3524
|
-
),
|
|
3525
|
-
const
|
|
3526
|
-
|
|
3550
|
+
), j = null;
|
|
3551
|
+
const ot = nt && nt.unsubscribe && (() => {
|
|
3552
|
+
nt.unsubscribe();
|
|
3527
3553
|
});
|
|
3528
3554
|
let ve;
|
|
3529
3555
|
try {
|
|
3530
|
-
|
|
3531
|
-
|
|
3556
|
+
let O;
|
|
3557
|
+
const Y = Dn("auth");
|
|
3558
|
+
if (Y) {
|
|
3559
|
+
const S = Y.username || "", $ = Y.password || "";
|
|
3560
|
+
O = {
|
|
3561
|
+
username: S,
|
|
3562
|
+
password: $
|
|
3563
|
+
};
|
|
3564
|
+
}
|
|
3565
|
+
if (ts(v)) {
|
|
3566
|
+
const S = new URL(v, x.origin);
|
|
3567
|
+
if (!O && (S.username || S.password)) {
|
|
3568
|
+
const $ = Qe(S.username), dt = Qe(S.password);
|
|
3569
|
+
O = {
|
|
3570
|
+
username: $,
|
|
3571
|
+
password: dt
|
|
3572
|
+
};
|
|
3573
|
+
}
|
|
3574
|
+
(S.username || S.password) && (S.username = "", S.password = "", v = S.href);
|
|
3575
|
+
}
|
|
3576
|
+
if (O && (I.delete("authorization"), I.set(
|
|
3577
|
+
"Authorization",
|
|
3578
|
+
"Basic " + btoa(Yr((O.username || "") + ":" + (O.password || "")))
|
|
3579
|
+
)), vt && typeof v == "string" && v.startsWith("data:") && Zr(v) > z)
|
|
3580
|
+
throw new b(
|
|
3532
3581
|
"maxContentLength size of " + z + " exceeded",
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3582
|
+
b.ERR_BAD_RESPONSE,
|
|
3583
|
+
y,
|
|
3584
|
+
j
|
|
3536
3585
|
);
|
|
3537
|
-
if (
|
|
3538
|
-
const
|
|
3539
|
-
if (typeof
|
|
3540
|
-
throw new
|
|
3586
|
+
if (On && A !== "get" && A !== "head") {
|
|
3587
|
+
const S = await _(I, R);
|
|
3588
|
+
if (typeof S == "number" && isFinite(S) && S > Yt)
|
|
3589
|
+
throw new b(
|
|
3541
3590
|
"Request body larger than maxBodyLength limit",
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3591
|
+
b.ERR_BAD_REQUEST,
|
|
3592
|
+
y,
|
|
3593
|
+
j
|
|
3545
3594
|
);
|
|
3546
3595
|
}
|
|
3547
|
-
if (X && d &&
|
|
3548
|
-
let
|
|
3596
|
+
if (X && d && A !== "get" && A !== "head" && (ve = await _(I, R)) !== 0) {
|
|
3597
|
+
let S = new s(v, {
|
|
3549
3598
|
method: "POST",
|
|
3550
|
-
body:
|
|
3599
|
+
body: R,
|
|
3551
3600
|
duplex: "half"
|
|
3552
|
-
}),
|
|
3553
|
-
if (h.isFormData(
|
|
3554
|
-
const [
|
|
3601
|
+
}), $;
|
|
3602
|
+
if (h.isFormData(R) && ($ = S.headers.get("content-type")) && I.setContentType($), S.body) {
|
|
3603
|
+
const [dt, Nt] = Xe(
|
|
3555
3604
|
ve,
|
|
3556
|
-
Wt(
|
|
3605
|
+
Wt(ze(X))
|
|
3557
3606
|
);
|
|
3558
|
-
|
|
3607
|
+
R = $e(S.body, Je, dt, Nt);
|
|
3559
3608
|
}
|
|
3560
3609
|
}
|
|
3561
|
-
h.isString(
|
|
3562
|
-
const
|
|
3563
|
-
if (h.isFormData(
|
|
3564
|
-
const
|
|
3565
|
-
|
|
3610
|
+
h.isString(pt) || (pt = pt ? "include" : "omit");
|
|
3611
|
+
const In = c && "credentials" in s.prototype;
|
|
3612
|
+
if (h.isFormData(R)) {
|
|
3613
|
+
const S = I.getContentType();
|
|
3614
|
+
S && /^multipart\/form-data/i.test(S) && !/boundary=/i.test(S) && I.delete("content-type");
|
|
3566
3615
|
}
|
|
3567
3616
|
I.set("User-Agent", "axios/" + Pe, !1);
|
|
3568
|
-
const
|
|
3569
|
-
...
|
|
3570
|
-
signal:
|
|
3571
|
-
method:
|
|
3572
|
-
headers:
|
|
3573
|
-
body:
|
|
3617
|
+
const Se = {
|
|
3618
|
+
...at,
|
|
3619
|
+
signal: nt,
|
|
3620
|
+
method: A.toUpperCase(),
|
|
3621
|
+
headers: _n(I.normalize()),
|
|
3622
|
+
body: R,
|
|
3574
3623
|
duplex: "half",
|
|
3575
|
-
credentials:
|
|
3624
|
+
credentials: In ? pt : void 0
|
|
3576
3625
|
};
|
|
3577
|
-
|
|
3578
|
-
let G = await (c ? we(
|
|
3579
|
-
if (
|
|
3580
|
-
const
|
|
3581
|
-
if (
|
|
3582
|
-
throw new
|
|
3626
|
+
j = c && new s(v, Se);
|
|
3627
|
+
let G = await (c ? we(j, at) : we(v, Se));
|
|
3628
|
+
if (vt) {
|
|
3629
|
+
const S = h.toFiniteNumber(G.headers.get("content-length"));
|
|
3630
|
+
if (S != null && S > z)
|
|
3631
|
+
throw new b(
|
|
3583
3632
|
"maxContentLength size of " + z + " exceeded",
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3633
|
+
b.ERR_BAD_RESPONSE,
|
|
3634
|
+
y,
|
|
3635
|
+
j
|
|
3587
3636
|
);
|
|
3588
3637
|
}
|
|
3589
|
-
const te = g && (
|
|
3590
|
-
if (g && G.body && (
|
|
3591
|
-
const
|
|
3592
|
-
["status", "statusText", "headers"].forEach((
|
|
3593
|
-
|
|
3638
|
+
const te = g && (k === "stream" || k === "response");
|
|
3639
|
+
if (g && G.body && (Z || vt || te && ot)) {
|
|
3640
|
+
const S = {};
|
|
3641
|
+
["status", "statusText", "headers"].forEach((St) => {
|
|
3642
|
+
S[St] = G[St];
|
|
3594
3643
|
});
|
|
3595
|
-
const
|
|
3596
|
-
|
|
3597
|
-
Wt(
|
|
3644
|
+
const $ = h.toFiniteNumber(G.headers.get("content-length")), [dt, Nt] = Z && Xe(
|
|
3645
|
+
$,
|
|
3646
|
+
Wt(ze(Z), !0)
|
|
3598
3647
|
) || [];
|
|
3599
|
-
let
|
|
3600
|
-
const
|
|
3601
|
-
if (
|
|
3602
|
-
throw new
|
|
3648
|
+
let Te = 0;
|
|
3649
|
+
const Nn = (St) => {
|
|
3650
|
+
if (vt && (Te = St, Te > z))
|
|
3651
|
+
throw new b(
|
|
3603
3652
|
"maxContentLength size of " + z + " exceeded",
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3653
|
+
b.ERR_BAD_RESPONSE,
|
|
3654
|
+
y,
|
|
3655
|
+
j
|
|
3607
3656
|
);
|
|
3608
|
-
|
|
3657
|
+
dt && dt(St);
|
|
3609
3658
|
};
|
|
3610
3659
|
G = new a(
|
|
3611
|
-
|
|
3612
|
-
Nt && Nt(),
|
|
3660
|
+
$e(G.body, Je, Nn, () => {
|
|
3661
|
+
Nt && Nt(), ot && ot();
|
|
3613
3662
|
}),
|
|
3614
|
-
|
|
3663
|
+
S
|
|
3615
3664
|
);
|
|
3616
3665
|
}
|
|
3617
|
-
|
|
3618
|
-
let
|
|
3666
|
+
k = k || "text";
|
|
3667
|
+
let tt = await P[h.findKey(P, k) || "text"](
|
|
3619
3668
|
G,
|
|
3620
|
-
|
|
3669
|
+
y
|
|
3621
3670
|
);
|
|
3622
|
-
if (
|
|
3623
|
-
let
|
|
3624
|
-
if (
|
|
3625
|
-
throw new
|
|
3671
|
+
if (vt && !g && !te) {
|
|
3672
|
+
let S;
|
|
3673
|
+
if (tt != null && (typeof tt.byteLength == "number" ? S = tt.byteLength : typeof tt.size == "number" ? S = tt.size : typeof tt == "string" && (S = typeof n == "function" ? new n().encode(tt).byteLength : tt.length)), typeof S == "number" && S > z)
|
|
3674
|
+
throw new b(
|
|
3626
3675
|
"maxContentLength size of " + z + " exceeded",
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3676
|
+
b.ERR_BAD_RESPONSE,
|
|
3677
|
+
y,
|
|
3678
|
+
j
|
|
3630
3679
|
);
|
|
3631
3680
|
}
|
|
3632
|
-
return !te &&
|
|
3633
|
-
|
|
3634
|
-
data:
|
|
3681
|
+
return !te && ot && ot(), await new Promise((S, $) => {
|
|
3682
|
+
wn(S, $, {
|
|
3683
|
+
data: tt,
|
|
3635
3684
|
headers: V.from(G.headers),
|
|
3636
3685
|
status: G.status,
|
|
3637
3686
|
statusText: G.statusText,
|
|
3638
|
-
config:
|
|
3639
|
-
request:
|
|
3687
|
+
config: y,
|
|
3688
|
+
request: j
|
|
3640
3689
|
});
|
|
3641
3690
|
});
|
|
3642
|
-
} catch (
|
|
3643
|
-
if (
|
|
3644
|
-
const
|
|
3645
|
-
throw
|
|
3691
|
+
} catch (O) {
|
|
3692
|
+
if (ot && ot(), nt && nt.aborted && nt.reason instanceof b) {
|
|
3693
|
+
const Y = nt.reason;
|
|
3694
|
+
throw Y.config = y, j && (Y.request = j), O !== Y && (Y.cause = O), Y;
|
|
3646
3695
|
}
|
|
3647
|
-
throw
|
|
3648
|
-
new
|
|
3696
|
+
throw O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message) ? Object.assign(
|
|
3697
|
+
new b(
|
|
3649
3698
|
"Network Error",
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3699
|
+
b.ERR_NETWORK,
|
|
3700
|
+
y,
|
|
3701
|
+
j,
|
|
3702
|
+
O && O.response
|
|
3654
3703
|
),
|
|
3655
3704
|
{
|
|
3656
|
-
cause:
|
|
3705
|
+
cause: O.cause || O
|
|
3657
3706
|
}
|
|
3658
|
-
) :
|
|
3707
|
+
) : b.from(O, O && O.code, y, j, O && O.response);
|
|
3659
3708
|
}
|
|
3660
3709
|
};
|
|
3661
|
-
},
|
|
3710
|
+
}, ns = /* @__PURE__ */ new Map(), Tn = (i) => {
|
|
3662
3711
|
let t = i && i.env || {};
|
|
3663
3712
|
const { fetch: e, Request: n, Response: r } = t, s = [n, r, e];
|
|
3664
|
-
let a = s.length, o = a, c, u, l =
|
|
3713
|
+
let a = s.length, o = a, c, u, l = ns;
|
|
3665
3714
|
for (; o--; )
|
|
3666
|
-
c = s[o], u = l.get(c), u === void 0 && l.set(c, u = o ? /* @__PURE__ */ new Map() :
|
|
3715
|
+
c = s[o], u = l.get(c), u === void 0 && l.set(c, u = o ? /* @__PURE__ */ new Map() : es(t)), l = u;
|
|
3667
3716
|
return u;
|
|
3668
3717
|
};
|
|
3669
|
-
|
|
3718
|
+
Tn();
|
|
3670
3719
|
const Ee = {
|
|
3671
|
-
http:
|
|
3672
|
-
xhr:
|
|
3720
|
+
http: Pr,
|
|
3721
|
+
xhr: zr,
|
|
3673
3722
|
fetch: {
|
|
3674
|
-
get:
|
|
3723
|
+
get: Tn
|
|
3675
3724
|
}
|
|
3676
3725
|
};
|
|
3677
3726
|
h.forEach(Ee, (i, t) => {
|
|
@@ -3683,8 +3732,8 @@ h.forEach(Ee, (i, t) => {
|
|
|
3683
3732
|
Object.defineProperty(i, "adapterName", { __proto__: null, value: t });
|
|
3684
3733
|
}
|
|
3685
3734
|
});
|
|
3686
|
-
const
|
|
3687
|
-
function
|
|
3735
|
+
const Ye = (i) => `- ${i}`, is = (i) => h.isFunction(i) || i === null || i === !1;
|
|
3736
|
+
function rs(i, t) {
|
|
3688
3737
|
i = h.isArray(i) ? i : [i];
|
|
3689
3738
|
const { length: e } = i;
|
|
3690
3739
|
let n, r;
|
|
@@ -3692,8 +3741,8 @@ function Qr(i, t) {
|
|
|
3692
3741
|
for (let a = 0; a < e; a++) {
|
|
3693
3742
|
n = i[a];
|
|
3694
3743
|
let o;
|
|
3695
|
-
if (r = n, !
|
|
3696
|
-
throw new
|
|
3744
|
+
if (r = n, !is(n) && (r = Ee[(o = String(n)).toLowerCase()], r === void 0))
|
|
3745
|
+
throw new b(`Unknown adapter '${o}'`);
|
|
3697
3746
|
if (r && (h.isFunction(r) || (r = r.get(t))))
|
|
3698
3747
|
break;
|
|
3699
3748
|
s[o || "#" + a] = r;
|
|
@@ -3703,21 +3752,21 @@ function Qr(i, t) {
|
|
|
3703
3752
|
([c, u]) => `adapter ${c} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
3704
3753
|
);
|
|
3705
3754
|
let o = e ? a.length > 1 ? `since :
|
|
3706
|
-
` + a.map(
|
|
3707
|
-
`) : " " +
|
|
3708
|
-
throw new
|
|
3755
|
+
` + a.map(Ye).join(`
|
|
3756
|
+
`) : " " + Ye(a[0]) : "as no adapter specified";
|
|
3757
|
+
throw new b(
|
|
3709
3758
|
"There is no suitable adapter to dispatch the request " + o,
|
|
3710
3759
|
"ERR_NOT_SUPPORT"
|
|
3711
3760
|
);
|
|
3712
3761
|
}
|
|
3713
3762
|
return r;
|
|
3714
3763
|
}
|
|
3715
|
-
const
|
|
3764
|
+
const An = {
|
|
3716
3765
|
/**
|
|
3717
3766
|
* Resolve an adapter from a list of adapter names or functions.
|
|
3718
3767
|
* @type {Function}
|
|
3719
3768
|
*/
|
|
3720
|
-
getAdapter:
|
|
3769
|
+
getAdapter: rs,
|
|
3721
3770
|
/**
|
|
3722
3771
|
* Exposes all known adapters
|
|
3723
3772
|
* @type {Object<string, Function|Object>}
|
|
@@ -3726,10 +3775,10 @@ const Sn = {
|
|
|
3726
3775
|
};
|
|
3727
3776
|
function oe(i) {
|
|
3728
3777
|
if (i.cancelToken && i.cancelToken.throwIfRequested(), i.signal && i.signal.aborted)
|
|
3729
|
-
throw new
|
|
3778
|
+
throw new It(null, i);
|
|
3730
3779
|
}
|
|
3731
|
-
function
|
|
3732
|
-
return oe(i), i.headers = V.from(i.headers), i.data = ae.call(i, i.transformRequest), ["post", "put", "patch"].indexOf(i.method) !== -1 && i.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
3780
|
+
function tn(i) {
|
|
3781
|
+
return oe(i), i.headers = V.from(i.headers), i.data = ae.call(i, i.transformRequest), ["post", "put", "patch"].indexOf(i.method) !== -1 && i.headers.setContentType("application/x-www-form-urlencoded", !1), An.getAdapter(i.adapter || Dt.adapter, i)(i).then(
|
|
3733
3782
|
function(n) {
|
|
3734
3783
|
oe(i), i.response = n;
|
|
3735
3784
|
try {
|
|
@@ -3740,7 +3789,7 @@ function Ze(i) {
|
|
|
3740
3789
|
return n.headers = V.from(n.headers), n;
|
|
3741
3790
|
},
|
|
3742
3791
|
function(n) {
|
|
3743
|
-
if (!
|
|
3792
|
+
if (!En(n) && (oe(i), n && n.response)) {
|
|
3744
3793
|
i.response = n.response;
|
|
3745
3794
|
try {
|
|
3746
3795
|
n.response.data = ae.call(
|
|
@@ -3763,18 +3812,18 @@ const Zt = {};
|
|
|
3763
3812
|
return typeof n === i || "a" + (t < 1 ? "n " : " ") + i;
|
|
3764
3813
|
};
|
|
3765
3814
|
});
|
|
3766
|
-
const
|
|
3815
|
+
const en = {};
|
|
3767
3816
|
Zt.transitional = function(t, e, n) {
|
|
3768
3817
|
function r(s, a) {
|
|
3769
3818
|
return "[Axios v" + Pe + "] Transitional option '" + s + "'" + a + (n ? ". " + n : "");
|
|
3770
3819
|
}
|
|
3771
3820
|
return (s, a, o) => {
|
|
3772
3821
|
if (t === !1)
|
|
3773
|
-
throw new
|
|
3822
|
+
throw new b(
|
|
3774
3823
|
r(a, " has been removed" + (e ? " in " + e : "")),
|
|
3775
|
-
|
|
3824
|
+
b.ERR_DEPRECATED
|
|
3776
3825
|
);
|
|
3777
|
-
return e && !
|
|
3826
|
+
return e && !en[a] && (en[a] = !0, console.warn(
|
|
3778
3827
|
r(
|
|
3779
3828
|
a,
|
|
3780
3829
|
" has been deprecated since v" + e + " and will be removed in the near future"
|
|
@@ -3785,9 +3834,9 @@ Zt.transitional = function(t, e, n) {
|
|
|
3785
3834
|
Zt.spelling = function(t) {
|
|
3786
3835
|
return (e, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
3787
3836
|
};
|
|
3788
|
-
function
|
|
3837
|
+
function ss(i, t, e) {
|
|
3789
3838
|
if (typeof i != "object")
|
|
3790
|
-
throw new
|
|
3839
|
+
throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
|
|
3791
3840
|
const n = Object.keys(i);
|
|
3792
3841
|
let r = n.length;
|
|
3793
3842
|
for (; r-- > 0; ) {
|
|
@@ -3795,25 +3844,25 @@ function Zr(i, t, e) {
|
|
|
3795
3844
|
if (a) {
|
|
3796
3845
|
const o = i[s], c = o === void 0 || a(o, s, i);
|
|
3797
3846
|
if (c !== !0)
|
|
3798
|
-
throw new
|
|
3847
|
+
throw new b(
|
|
3799
3848
|
"option " + s + " must be " + c,
|
|
3800
|
-
|
|
3849
|
+
b.ERR_BAD_OPTION_VALUE
|
|
3801
3850
|
);
|
|
3802
3851
|
continue;
|
|
3803
3852
|
}
|
|
3804
3853
|
if (e !== !0)
|
|
3805
|
-
throw new
|
|
3854
|
+
throw new b("Unknown option " + s, b.ERR_BAD_OPTION);
|
|
3806
3855
|
}
|
|
3807
3856
|
}
|
|
3808
3857
|
const Kt = {
|
|
3809
|
-
assertOptions:
|
|
3858
|
+
assertOptions: ss,
|
|
3810
3859
|
validators: Zt
|
|
3811
|
-
},
|
|
3812
|
-
let
|
|
3860
|
+
}, M = Kt.validators;
|
|
3861
|
+
let lt = class {
|
|
3813
3862
|
constructor(t) {
|
|
3814
3863
|
this.defaults = t || {}, this.interceptors = {
|
|
3815
|
-
request: new
|
|
3816
|
-
response: new
|
|
3864
|
+
request: new We(),
|
|
3865
|
+
response: new We()
|
|
3817
3866
|
};
|
|
3818
3867
|
}
|
|
3819
3868
|
/**
|
|
@@ -3855,15 +3904,16 @@ let ut = class {
|
|
|
3855
3904
|
}
|
|
3856
3905
|
}
|
|
3857
3906
|
_request(t, e) {
|
|
3858
|
-
typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e =
|
|
3907
|
+
typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e = ft(this.defaults, e);
|
|
3859
3908
|
const { transitional: n, paramsSerializer: r, headers: s } = e;
|
|
3860
3909
|
n !== void 0 && Kt.assertOptions(
|
|
3861
3910
|
n,
|
|
3862
3911
|
{
|
|
3863
|
-
silentJSONParsing:
|
|
3864
|
-
forcedJSONParsing:
|
|
3865
|
-
clarifyTimeoutError:
|
|
3866
|
-
legacyInterceptorReqResOrdering:
|
|
3912
|
+
silentJSONParsing: M.transitional(M.boolean),
|
|
3913
|
+
forcedJSONParsing: M.transitional(M.boolean),
|
|
3914
|
+
clarifyTimeoutError: M.transitional(M.boolean),
|
|
3915
|
+
legacyInterceptorReqResOrdering: M.transitional(M.boolean),
|
|
3916
|
+
advertiseZstdAcceptEncoding: M.transitional(M.boolean)
|
|
3867
3917
|
},
|
|
3868
3918
|
!1
|
|
3869
3919
|
), r != null && (h.isFunction(r) ? e.paramsSerializer = {
|
|
@@ -3871,15 +3921,15 @@ let ut = class {
|
|
|
3871
3921
|
} : Kt.assertOptions(
|
|
3872
3922
|
r,
|
|
3873
3923
|
{
|
|
3874
|
-
encode:
|
|
3875
|
-
serialize:
|
|
3924
|
+
encode: M.function,
|
|
3925
|
+
serialize: M.function
|
|
3876
3926
|
},
|
|
3877
3927
|
!0
|
|
3878
3928
|
)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), Kt.assertOptions(
|
|
3879
3929
|
e,
|
|
3880
3930
|
{
|
|
3881
|
-
baseUrl:
|
|
3882
|
-
withXsrfToken:
|
|
3931
|
+
baseUrl: M.spelling("baseURL"),
|
|
3932
|
+
withXsrfToken: M.spelling("withXSRFToken")
|
|
3883
3933
|
},
|
|
3884
3934
|
!0
|
|
3885
3935
|
), e.method = (e.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -3902,7 +3952,7 @@ let ut = class {
|
|
|
3902
3952
|
});
|
|
3903
3953
|
let l, f = 0, d;
|
|
3904
3954
|
if (!c) {
|
|
3905
|
-
const P = [
|
|
3955
|
+
const P = [tn.bind(this), void 0];
|
|
3906
3956
|
for (P.unshift(...o), P.push(...u), d = P.length, l = Promise.resolve(e); f < d; )
|
|
3907
3957
|
l = l.then(P[f++], P[f++]);
|
|
3908
3958
|
return l;
|
|
@@ -3919,7 +3969,7 @@ let ut = class {
|
|
|
3919
3969
|
}
|
|
3920
3970
|
}
|
|
3921
3971
|
try {
|
|
3922
|
-
l =
|
|
3972
|
+
l = tn.call(this, g);
|
|
3923
3973
|
} catch (P) {
|
|
3924
3974
|
return Promise.reject(P);
|
|
3925
3975
|
}
|
|
@@ -3928,15 +3978,15 @@ let ut = class {
|
|
|
3928
3978
|
return l;
|
|
3929
3979
|
}
|
|
3930
3980
|
getUri(t) {
|
|
3931
|
-
t =
|
|
3932
|
-
const e =
|
|
3933
|
-
return
|
|
3981
|
+
t = ft(this.defaults, t);
|
|
3982
|
+
const e = vn(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
3983
|
+
return bn(e, t.params, t.paramsSerializer);
|
|
3934
3984
|
}
|
|
3935
3985
|
};
|
|
3936
3986
|
h.forEach(["delete", "get", "head", "options"], function(t) {
|
|
3937
|
-
|
|
3987
|
+
lt.prototype[t] = function(e, n) {
|
|
3938
3988
|
return this.request(
|
|
3939
|
-
|
|
3989
|
+
ft(n || {}, {
|
|
3940
3990
|
method: t,
|
|
3941
3991
|
url: e,
|
|
3942
3992
|
data: (n || {}).data
|
|
@@ -3948,7 +3998,7 @@ h.forEach(["post", "put", "patch", "query"], function(t) {
|
|
|
3948
3998
|
function e(n) {
|
|
3949
3999
|
return function(s, a, o) {
|
|
3950
4000
|
return this.request(
|
|
3951
|
-
|
|
4001
|
+
ft(o || {}, {
|
|
3952
4002
|
method: t,
|
|
3953
4003
|
headers: n ? {
|
|
3954
4004
|
"Content-Type": "multipart/form-data"
|
|
@@ -3959,9 +4009,9 @@ h.forEach(["post", "put", "patch", "query"], function(t) {
|
|
|
3959
4009
|
);
|
|
3960
4010
|
};
|
|
3961
4011
|
}
|
|
3962
|
-
|
|
4012
|
+
lt.prototype[t] = e(), t !== "query" && (lt.prototype[t + "Form"] = e(!0));
|
|
3963
4013
|
});
|
|
3964
|
-
let
|
|
4014
|
+
let as = class Rn {
|
|
3965
4015
|
constructor(t) {
|
|
3966
4016
|
if (typeof t != "function")
|
|
3967
4017
|
throw new TypeError("executor must be a function.");
|
|
@@ -3985,7 +4035,7 @@ let Yr = class Tn {
|
|
|
3985
4035
|
n.unsubscribe(s);
|
|
3986
4036
|
}, a;
|
|
3987
4037
|
}, t(function(s, a, o) {
|
|
3988
|
-
n.reason || (n.reason = new
|
|
4038
|
+
n.reason || (n.reason = new It(s, a, o), e(n.reason));
|
|
3989
4039
|
});
|
|
3990
4040
|
}
|
|
3991
4041
|
/**
|
|
@@ -4027,19 +4077,19 @@ let Yr = class Tn {
|
|
|
4027
4077
|
static source() {
|
|
4028
4078
|
let t;
|
|
4029
4079
|
return {
|
|
4030
|
-
token: new
|
|
4080
|
+
token: new Rn(function(r) {
|
|
4031
4081
|
t = r;
|
|
4032
4082
|
}),
|
|
4033
4083
|
cancel: t
|
|
4034
4084
|
};
|
|
4035
4085
|
}
|
|
4036
4086
|
};
|
|
4037
|
-
function
|
|
4087
|
+
function os(i) {
|
|
4038
4088
|
return function(e) {
|
|
4039
4089
|
return i.apply(null, e);
|
|
4040
4090
|
};
|
|
4041
4091
|
}
|
|
4042
|
-
function
|
|
4092
|
+
function cs(i) {
|
|
4043
4093
|
return h.isObject(i) && i.isAxiosError === !0;
|
|
4044
4094
|
}
|
|
4045
4095
|
const de = {
|
|
@@ -4116,52 +4166,52 @@ const de = {
|
|
|
4116
4166
|
Object.entries(de).forEach(([i, t]) => {
|
|
4117
4167
|
de[t] = i;
|
|
4118
4168
|
});
|
|
4119
|
-
function
|
|
4120
|
-
const t = new
|
|
4121
|
-
return h.extend(e,
|
|
4122
|
-
return
|
|
4169
|
+
function Cn(i) {
|
|
4170
|
+
const t = new lt(i), e = on(lt.prototype.request, t);
|
|
4171
|
+
return h.extend(e, lt.prototype, t, { allOwnKeys: !0 }), h.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(r) {
|
|
4172
|
+
return Cn(ft(i, r));
|
|
4123
4173
|
}, e;
|
|
4124
4174
|
}
|
|
4125
|
-
const C =
|
|
4126
|
-
C.Axios =
|
|
4127
|
-
C.CanceledError =
|
|
4128
|
-
C.CancelToken =
|
|
4129
|
-
C.isCancel =
|
|
4175
|
+
const C = Cn(Dt);
|
|
4176
|
+
C.Axios = lt;
|
|
4177
|
+
C.CanceledError = It;
|
|
4178
|
+
C.CancelToken = as;
|
|
4179
|
+
C.isCancel = En;
|
|
4130
4180
|
C.VERSION = Pe;
|
|
4131
4181
|
C.toFormData = Qt;
|
|
4132
|
-
C.AxiosError =
|
|
4182
|
+
C.AxiosError = b;
|
|
4133
4183
|
C.Cancel = C.CanceledError;
|
|
4134
4184
|
C.all = function(t) {
|
|
4135
4185
|
return Promise.all(t);
|
|
4136
4186
|
};
|
|
4137
|
-
C.spread =
|
|
4138
|
-
C.isAxiosError =
|
|
4139
|
-
C.mergeConfig =
|
|
4187
|
+
C.spread = os;
|
|
4188
|
+
C.isAxiosError = cs;
|
|
4189
|
+
C.mergeConfig = ft;
|
|
4140
4190
|
C.AxiosHeaders = V;
|
|
4141
|
-
C.formToJSON = (i) =>
|
|
4142
|
-
C.getAdapter =
|
|
4191
|
+
C.formToJSON = (i) => Pn(h.isHTMLForm(i) ? new FormData(i) : i);
|
|
4192
|
+
C.getAdapter = An.getAdapter;
|
|
4143
4193
|
C.HttpStatusCode = de;
|
|
4144
4194
|
C.default = C;
|
|
4145
4195
|
const {
|
|
4146
|
-
Axios:
|
|
4147
|
-
AxiosError:
|
|
4148
|
-
CanceledError:
|
|
4149
|
-
isCancel:
|
|
4150
|
-
CancelToken:
|
|
4151
|
-
VERSION:
|
|
4152
|
-
all:
|
|
4153
|
-
Cancel:
|
|
4154
|
-
isAxiosError:
|
|
4155
|
-
spread:
|
|
4156
|
-
toFormData:
|
|
4157
|
-
AxiosHeaders:
|
|
4158
|
-
HttpStatusCode:
|
|
4159
|
-
formToJSON:
|
|
4160
|
-
getAdapter:
|
|
4161
|
-
mergeConfig:
|
|
4162
|
-
create:
|
|
4196
|
+
Axios: ds,
|
|
4197
|
+
AxiosError: _s,
|
|
4198
|
+
CanceledError: gs,
|
|
4199
|
+
isCancel: ms,
|
|
4200
|
+
CancelToken: ys,
|
|
4201
|
+
VERSION: bs,
|
|
4202
|
+
all: Ps,
|
|
4203
|
+
Cancel: Es,
|
|
4204
|
+
isAxiosError: ws,
|
|
4205
|
+
spread: vs,
|
|
4206
|
+
toFormData: Ss,
|
|
4207
|
+
AxiosHeaders: Ts,
|
|
4208
|
+
HttpStatusCode: As,
|
|
4209
|
+
formToJSON: Rs,
|
|
4210
|
+
getAdapter: Cs,
|
|
4211
|
+
mergeConfig: Os,
|
|
4212
|
+
create: Ds
|
|
4163
4213
|
} = C;
|
|
4164
|
-
class
|
|
4214
|
+
class Is extends Bn {
|
|
4165
4215
|
__pinPad__ = {
|
|
4166
4216
|
buffer: null,
|
|
4167
4217
|
about: {
|
|
@@ -4349,11 +4399,11 @@ class Ss extends On {
|
|
|
4349
4399
|
environment: "production",
|
|
4350
4400
|
socket: !1
|
|
4351
4401
|
}) {
|
|
4352
|
-
if (super({ filters: t, config_port: e, no_device: n, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !
|
|
4402
|
+
if (super({ filters: t, config_port: e, no_device: n, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !xn())
|
|
4353
4403
|
throw new Error("Crypto not supported in this browser");
|
|
4354
|
-
if (
|
|
4404
|
+
if (Ce.getCustom(this.typeDevice, n))
|
|
4355
4405
|
throw new Error(`Device ${this.typeDevice} ${n} already exists`);
|
|
4356
|
-
this.__internal__.time.response_connection = 3e3, this.__internal__.time.response_general = 5e3, this.__internal__.serial.delay_first_connection = 1e3, this.environment = o, s && (this.username = s), a && (this.password = a), this.#A(),
|
|
4406
|
+
this.__internal__.time.response_connection = 3e3, this.__internal__.time.response_general = 5e3, this.__internal__.serial.delay_first_connection = 1e3, this.environment = o, s && (this.username = s), a && (this.password = a), this.#A(), Ce.add(this);
|
|
4357
4407
|
}
|
|
4358
4408
|
#A() {
|
|
4359
4409
|
const t = [
|
|
@@ -4496,7 +4546,7 @@ class Ss extends On {
|
|
|
4496
4546
|
e.length > 10 && e.includes("E93A10") && (this.__pinPad__.waiting.statusReadCardWaiting === "pending" && (this.__pinPad__.waiting.statusReadCardWaiting = "rejected"), this.dispatch("pp:error", { message: "Operation cancelled by user." }));
|
|
4497
4547
|
}
|
|
4498
4548
|
// @ts-expect-error parts is not used
|
|
4499
|
-
#
|
|
4549
|
+
#U(t, e) {
|
|
4500
4550
|
if (this.__pinPad__.about.model?.toLowerCase() === "vx520") {
|
|
4501
4551
|
if (e.length > 11)
|
|
4502
4552
|
if (e.includes("P59A00"))
|
|
@@ -4522,7 +4572,7 @@ class Ss extends On {
|
|
|
4522
4572
|
this.dispatch("pp:print", n);
|
|
4523
4573
|
}
|
|
4524
4574
|
}
|
|
4525
|
-
#
|
|
4575
|
+
#L(t, e) {
|
|
4526
4576
|
console.log(t, e);
|
|
4527
4577
|
}
|
|
4528
4578
|
#V(t, e) {
|
|
@@ -4564,13 +4614,13 @@ class Ss extends On {
|
|
|
4564
4614
|
e.name = "cancel pinpad", e.description = "response of cancel", e.no_code = 107;
|
|
4565
4615
|
break;
|
|
4566
4616
|
case "print":
|
|
4567
|
-
this.#
|
|
4617
|
+
this.#U(s, r), e.name = "print voucher", e.description = "response of print", e.no_code = 108;
|
|
4568
4618
|
break;
|
|
4569
4619
|
case "cancel-read-card":
|
|
4570
4620
|
this.#x(s, r), e.name = "cancel read card", e.description = "response of cancel read card", e.no_code = 109;
|
|
4571
4621
|
break;
|
|
4572
4622
|
case "code93":
|
|
4573
|
-
this.#
|
|
4623
|
+
this.#L(s, r), e.name = "code 93", e.description = "response of code 93", e.no_code = 110;
|
|
4574
4624
|
break;
|
|
4575
4625
|
case "finish-emv-end":
|
|
4576
4626
|
this.#V(s, r), e.name = "Finish EMV End", e.description = "response of finish EMV End", e.no_code = 111;
|
|
@@ -4668,7 +4718,7 @@ class Ss extends On {
|
|
|
4668
4718
|
// Updated to WS v4
|
|
4669
4719
|
// ========================================================================================
|
|
4670
4720
|
#s(t, e) {
|
|
4671
|
-
const n = new
|
|
4721
|
+
const n = new gi();
|
|
4672
4722
|
return n.setPublicKey(t), n.encrypt(e);
|
|
4673
4723
|
}
|
|
4674
4724
|
#a(t) {
|
|
@@ -4873,7 +4923,7 @@ class Ss extends On {
|
|
|
4873
4923
|
return /^[A-Z-a-z0-9\s]+$/g.test(t);
|
|
4874
4924
|
}
|
|
4875
4925
|
#X(t) {
|
|
4876
|
-
if (
|
|
4926
|
+
if (J(t))
|
|
4877
4927
|
return !0;
|
|
4878
4928
|
const e = /^[A-Z-a-z0-9\s]+$/g.test(t) === !0;
|
|
4879
4929
|
if (!e)
|
|
@@ -4926,7 +4976,7 @@ class Ss extends On {
|
|
|
4926
4976
|
return e + n;
|
|
4927
4977
|
}
|
|
4928
4978
|
async checkPositionPermission() {
|
|
4929
|
-
if (!
|
|
4979
|
+
if (!Ae())
|
|
4930
4980
|
throw new Error("Geolocation not supported");
|
|
4931
4981
|
return new Promise((t, e) => {
|
|
4932
4982
|
navigator.permissions.query({ name: "geolocation" }).then((n) => {
|
|
@@ -4955,7 +5005,7 @@ class Ss extends On {
|
|
|
4955
5005
|
} catch {
|
|
4956
5006
|
localStorage.removeItem(t);
|
|
4957
5007
|
}
|
|
4958
|
-
return
|
|
5008
|
+
return Ae() ? new Promise((r) => {
|
|
4959
5009
|
navigator.permissions.query({ name: "geolocation" }).then((s) => {
|
|
4960
5010
|
s.state === "granted" ? navigator.geolocation.getCurrentPosition(
|
|
4961
5011
|
(a) => {
|
|
@@ -5136,7 +5186,7 @@ class Ss extends On {
|
|
|
5136
5186
|
if (this.__pinPad__.waiting.statusAboutWaiting) throw new Error("AboutPP is already running");
|
|
5137
5187
|
const e = this.__pinPad__.constants.STX, n = this.__pinPad__.constants.ETX;
|
|
5138
5188
|
let r = "C56AABOUT";
|
|
5139
|
-
if (r = e + this.#e(r) + r + n, r = r + this.#n(r),
|
|
5189
|
+
if (r = e + this.#e(r) + r + n, r = r + this.#n(r), J(this.__pinPad__.about.pp)) {
|
|
5140
5190
|
this.__pinPad__.waiting.statusAboutWaiting = "pending";
|
|
5141
5191
|
const a = this.parseStringToBytes(r, "");
|
|
5142
5192
|
await this.appendToQueue(a, "about");
|
|
@@ -5146,7 +5196,7 @@ class Ss extends On {
|
|
|
5146
5196
|
return new Promise((a, o) => {
|
|
5147
5197
|
s = setInterval(() => {
|
|
5148
5198
|
if (this.__pinPad__.waiting.statusAboutWaiting === "resolved") {
|
|
5149
|
-
if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null,
|
|
5199
|
+
if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null, J(this.__pinPad__.about.pp))
|
|
5150
5200
|
return;
|
|
5151
5201
|
if (!t || typeof t != "function") {
|
|
5152
5202
|
a(!0);
|
|
@@ -5162,11 +5212,11 @@ class Ss extends On {
|
|
|
5162
5212
|
});
|
|
5163
5213
|
}
|
|
5164
5214
|
async #h(t, e) {
|
|
5165
|
-
if (t = t ? t.toString() : "", e = e ? e.toString() : "",
|
|
5215
|
+
if (t = t ? t.toString() : "", e = e ? e.toString() : "", J(t) || t === "0") {
|
|
5166
5216
|
this.dispatch("pp:dukpt", { status: "unsupported", already: !1 });
|
|
5167
5217
|
return;
|
|
5168
5218
|
}
|
|
5169
|
-
if (
|
|
5219
|
+
if (J(e) || e === "1") {
|
|
5170
5220
|
this.dispatch("pp:dukpt", { status: "charged", already: !0 });
|
|
5171
5221
|
return;
|
|
5172
5222
|
}
|
|
@@ -5231,7 +5281,7 @@ class Ss extends On {
|
|
|
5231
5281
|
async #tt() {
|
|
5232
5282
|
this.__pinPad__.operation.errors = 0;
|
|
5233
5283
|
let t = "ACERQUE, INSERTE CHIP O DESLICE TARJETA";
|
|
5234
|
-
if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model?.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"),
|
|
5284
|
+
if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model?.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), J(this.amount) || isNaN(parseFloat(this.amount)))
|
|
5235
5285
|
throw new Error("Amount required");
|
|
5236
5286
|
if (parseFloat(this.amount) <= 0)
|
|
5237
5287
|
throw new Error("Amount must be greater than 0");
|
|
@@ -5258,14 +5308,14 @@ class Ss extends On {
|
|
|
5258
5308
|
});
|
|
5259
5309
|
}
|
|
5260
5310
|
async #et(t) {
|
|
5261
|
-
return await
|
|
5311
|
+
return await Re(t * 1e3);
|
|
5262
5312
|
}
|
|
5263
5313
|
/**
|
|
5264
5314
|
* @param {null|string} reference
|
|
5265
5315
|
* @return {Promise<any>}
|
|
5266
5316
|
*/
|
|
5267
5317
|
async consult({ reference: t = null } = { reference: null }) {
|
|
5268
|
-
return t || (t = this.reference),
|
|
5318
|
+
return t || (t = this.reference), J(t) && (t = "--", this.reference = t), this.#X(this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await this.#u({
|
|
5269
5319
|
Ambiente: this.environment,
|
|
5270
5320
|
User: this.username,
|
|
5271
5321
|
Pwd: this.password,
|
|
@@ -5327,7 +5377,7 @@ class Ss extends On {
|
|
|
5327
5377
|
return r ? Promise.reject(r) : Promise.reject("Communication error with CDP. IL/MTY");
|
|
5328
5378
|
}
|
|
5329
5379
|
#rt(t) {
|
|
5330
|
-
if (
|
|
5380
|
+
if (J(t)) throw new Error("Number of authorization invalid");
|
|
5331
5381
|
if (/^[A-Za-z0-9]+$/g.test(t) !== !0) throw new Error("Number of authorization invalid");
|
|
5332
5382
|
if (t.length !== 6) throw new Error("Number of authorization invalid");
|
|
5333
5383
|
return !0;
|
|
@@ -5626,7 +5676,7 @@ class Ss extends On {
|
|
|
5626
5676
|
this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
|
|
5627
5677
|
else {
|
|
5628
5678
|
const t = this.parseStringToBytes(this.__pinPad__.operation.ignore.C93Global, "");
|
|
5629
|
-
await this.appendToQueue(t, "code93"), await
|
|
5679
|
+
await this.appendToQueue(t, "code93"), await Re(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
|
|
5630
5680
|
}
|
|
5631
5681
|
}
|
|
5632
5682
|
#T(t) {
|
|
@@ -5728,7 +5778,7 @@ class Ss extends On {
|
|
|
5728
5778
|
} = {}) {
|
|
5729
5779
|
if (t = parseFloat(t.toString()), isNaN(t) || t <= 0)
|
|
5730
5780
|
throw new Error("Amount is required and must be greater than 0");
|
|
5731
|
-
if (this.amount = t, (!e ||
|
|
5781
|
+
if (this.amount = t, (!e || J(e)) && (e = this.createReference()), !e || J(e) || !this.#g(e))
|
|
5732
5782
|
throw new Error("Reference is required and must be alphanumeric");
|
|
5733
5783
|
if (this.reference = e, /^[A-Z-a-z\s]+$/g.test(this.__pinPad__.config.currency) === !1)
|
|
5734
5784
|
throw new Error("Invalid currency");
|
|
@@ -5756,5 +5806,5 @@ class Ss extends On {
|
|
|
5756
5806
|
}
|
|
5757
5807
|
}
|
|
5758
5808
|
export {
|
|
5759
|
-
|
|
5809
|
+
Is as PinPad
|
|
5760
5810
|
};
|