@danidoble/webserial 4.4.0-beta.2 → 4.4.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/boardroid.cjs +1 -1
  2. package/dist/boardroid.js +99 -95
  3. package/dist/hopper.cjs +2 -2
  4. package/dist/hopper.js +66 -51
  5. package/dist/jofemar.cjs +1 -1
  6. package/dist/jofemar.js +57 -141
  7. package/dist/kernel-C1HLYiV1.cjs +1 -0
  8. package/dist/kernel-C8ISUhzV.cjs +1 -0
  9. package/dist/kernel-CQcZ_OiG.js +831 -0
  10. package/dist/{kernel-CXM5xoJD.js → kernel-DkC7Kj3m.js} +147 -124
  11. package/dist/kernel-DtXV8d8B.js +831 -0
  12. package/dist/kernel-DyNuXvtW.cjs +1 -0
  13. package/dist/kernel-aqBCxtkj.js +831 -0
  14. package/dist/kernel-pO_elWba.cjs +1 -0
  15. package/dist/kernel.cjs +2 -2
  16. package/dist/kernel.d.ts +14 -0
  17. package/dist/kernel.d.ts.map +1 -0
  18. package/dist/kernel.js +3 -4
  19. package/dist/locker.cjs +1 -1
  20. package/dist/locker.js +32 -26
  21. package/dist/main.d.ts +28 -0
  22. package/dist/main.d.ts.map +1 -0
  23. package/dist/pinpad.cjs +14 -14
  24. package/dist/pinpad.js +816 -791
  25. package/dist/pinpax.cjs +4 -4
  26. package/dist/pinpax.js +54 -54
  27. package/dist/relay.cjs +1 -1
  28. package/dist/relay.js +11 -18
  29. package/dist/serial/boardroid.d.ts +206 -0
  30. package/dist/serial/boardroid.d.ts.map +1 -0
  31. package/dist/serial/hopper.d.ts +85 -0
  32. package/dist/serial/hopper.d.ts.map +1 -0
  33. package/dist/serial/jofemar.d.ts +218 -0
  34. package/dist/serial/jofemar.d.ts.map +1 -0
  35. package/dist/serial/kernel.d.ts +137 -0
  36. package/dist/serial/kernel.d.ts.map +1 -0
  37. package/dist/serial/locker.d.ts +33 -0
  38. package/dist/serial/locker.d.ts.map +1 -0
  39. package/dist/serial/pinpad.d.ts +263 -0
  40. package/dist/serial/pinpad.d.ts.map +1 -0
  41. package/dist/serial/pinpax.d.ts +60 -0
  42. package/dist/serial/pinpax.d.ts.map +1 -0
  43. package/dist/serial/relay.d.ts +13 -0
  44. package/dist/serial/relay.d.ts.map +1 -0
  45. package/dist/utils/devices.d.ts +26 -0
  46. package/dist/utils/devices.d.ts.map +1 -0
  47. package/dist/utils/dispatcher.d.ts +17 -0
  48. package/dist/utils/dispatcher.d.ts.map +1 -0
  49. package/dist/utils/emulator.d.ts +80 -0
  50. package/dist/utils/emulator.d.ts.map +1 -0
  51. package/dist/utils/utils.d.ts +7 -0
  52. package/dist/utils/utils.d.ts.map +1 -0
  53. package/dist/webserial-core-CH2Xov2y.js +3325 -0
  54. package/dist/webserial-core-Cj_EZjAU.cjs +4 -0
  55. package/dist/webserial.cjs +2 -2
  56. package/dist/webserial.js +16 -16
  57. package/package.json +88 -76
  58. package/dist/kernel-Dizfdw3M.cjs +0 -1
package/dist/pinpad.js CHANGED
@@ -1,5 +1,4 @@
1
- import { K as mi, a as yi, i as z, b as he, w as le } from "./kernel-CXM5xoJD.js";
2
- import { a as fe } from "./webserial-core-D3luFguv.js";
1
+ import { K as mi, a as yi, D as le, i as z, b as fe, w as pe } from "./kernel-DtXV8d8B.js";
3
2
  var bi = "0123456789abcdefghijklmnopqrstuvwxyz";
4
3
  function G(n) {
5
4
  return bi.charAt(n);
@@ -7,13 +6,13 @@ function G(n) {
7
6
  function Pi(n, t) {
8
7
  return n & t;
9
8
  }
10
- function wt(n, t) {
9
+ function St(n, t) {
11
10
  return n | t;
12
11
  }
13
- function pe(n, t) {
12
+ function de(n, t) {
14
13
  return n ^ t;
15
14
  }
16
- function de(n, t) {
15
+ function _e(n, t) {
17
16
  return n & ~t;
18
17
  }
19
18
  function vi(n) {
@@ -27,42 +26,42 @@ function Ei(n) {
27
26
  n &= n - 1, ++t;
28
27
  return t;
29
28
  }
30
- var ut = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", je = "=";
31
- function mt(n) {
29
+ var ht = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", qe = "=";
30
+ function yt(n) {
32
31
  var t, e, i = "";
33
32
  for (t = 0; t + 3 <= n.length; t += 3)
34
- e = parseInt(n.substring(t, t + 3), 16), i += ut.charAt(e >> 6) + ut.charAt(e & 63);
35
- for (t + 1 == n.length ? (e = parseInt(n.substring(t, t + 1), 16), i += ut.charAt(e << 2)) : t + 2 == n.length && (e = parseInt(n.substring(t, t + 2), 16), i += ut.charAt(e >> 2) + ut.charAt((e & 3) << 4)); (i.length & 3) > 0; )
36
- i += je;
33
+ e = parseInt(n.substring(t, t + 3), 16), i += ht.charAt(e >> 6) + ht.charAt(e & 63);
34
+ for (t + 1 == n.length ? (e = parseInt(n.substring(t, t + 1), 16), i += ht.charAt(e << 2)) : t + 2 == n.length && (e = parseInt(n.substring(t, t + 2), 16), i += ht.charAt(e >> 2) + ht.charAt((e & 3) << 4)); (i.length & 3) > 0; )
35
+ i += qe;
37
36
  return i;
38
37
  }
39
- function _e(n) {
38
+ function ge(n) {
40
39
  var t = "", e, i = 0, r = 0;
41
- for (e = 0; e < n.length && n.charAt(e) != je; ++e) {
42
- var s = ut.indexOf(n.charAt(e));
40
+ for (e = 0; e < n.length && n.charAt(e) != qe; ++e) {
41
+ var s = ht.indexOf(n.charAt(e));
43
42
  s < 0 || (i == 0 ? (t += G(s >> 2), r = s & 3, i = 1) : i == 1 ? (t += G(r << 2 | s >> 4), r = s & 15, i = 2) : i == 2 ? (t += G(r), t += G(s >> 2), r = s & 3, i = 3) : (t += G(r << 2 | s >> 4), t += G(s & 15), i = 0));
44
43
  }
45
44
  return i == 1 && (t += G(r << 2)), t;
46
45
  }
47
- var ot, wi = {
46
+ var ct, wi = {
48
47
  decode: function(n) {
49
48
  var t;
50
- if (ot === void 0) {
49
+ if (ct === void 0) {
51
50
  var e = "0123456789ABCDEF", i = ` \f
52
51
  \r  \u2028\u2029`;
53
- for (ot = {}, t = 0; t < 16; ++t)
54
- ot[e.charAt(t)] = t;
52
+ for (ct = {}, t = 0; t < 16; ++t)
53
+ ct[e.charAt(t)] = t;
55
54
  for (e = e.toLowerCase(), t = 10; t < 16; ++t)
56
- ot[e.charAt(t)] = t;
55
+ ct[e.charAt(t)] = t;
57
56
  for (t = 0; t < i.length; ++t)
58
- ot[i.charAt(t)] = -1;
57
+ ct[i.charAt(t)] = -1;
59
58
  }
60
59
  var r = [], s = 0, a = 0;
61
60
  for (t = 0; t < n.length; ++t) {
62
61
  var o = n.charAt(t);
63
62
  if (o == "=")
64
63
  break;
65
- if (o = ot[o], o != -1) {
64
+ if (o = ct[o], o != -1) {
66
65
  if (o === void 0)
67
66
  throw new Error("Illegal character at offset " + t);
68
67
  s |= o, ++a >= 2 ? (r[r.length] = s, s = 0, a = 0) : s <<= 4;
@@ -72,7 +71,7 @@ var ot, wi = {
72
71
  throw new Error("Hex encoding incomplete: 4 bits missing");
73
72
  return r;
74
73
  }
75
- }, et, $t = {
74
+ }, et, Jt = {
76
75
  decode: function(n) {
77
76
  var t;
78
77
  if (et === void 0) {
@@ -108,7 +107,7 @@ var ot, wi = {
108
107
  },
109
108
  re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
110
109
  unarmor: function(n) {
111
- var t = $t.re.exec(n);
110
+ var t = Jt.re.exec(n);
112
111
  if (t)
113
112
  if (t[1])
114
113
  n = t[1];
@@ -116,9 +115,9 @@ var ot, wi = {
116
115
  n = t[2];
117
116
  else
118
117
  throw new Error("RegExp out of sync");
119
- return $t.decode(n);
118
+ return Jt.decode(n);
120
119
  }
121
- }, ct = 1e13, gt = (
120
+ }, ut = 1e13, mt = (
122
121
  /** @class */
123
122
  (function() {
124
123
  function n(t) {
@@ -127,34 +126,34 @@ var ot, wi = {
127
126
  return n.prototype.mulAdd = function(t, e) {
128
127
  var i = this.buf, r = i.length, s, a;
129
128
  for (s = 0; s < r; ++s)
130
- a = i[s] * t + e, a < ct ? e = 0 : (e = 0 | a / ct, a -= e * ct), i[s] = a;
129
+ a = i[s] * t + e, a < ut ? e = 0 : (e = 0 | a / ut, a -= e * ut), i[s] = a;
131
130
  e > 0 && (i[s] = e);
132
131
  }, n.prototype.sub = function(t) {
133
132
  var e = this.buf, i = e.length, r, s;
134
133
  for (r = 0; r < i; ++r)
135
- s = e[r] - t, s < 0 ? (s += ct, t = 1) : t = 0, e[r] = s;
134
+ s = e[r] - t, s < 0 ? (s += ut, t = 1) : t = 0, e[r] = s;
136
135
  for (; e[e.length - 1] === 0; )
137
136
  e.pop();
138
137
  }, n.prototype.toString = function(t) {
139
138
  if ((t || 10) != 10)
140
139
  throw new Error("only base 10 is supported");
141
140
  for (var e = this.buf, i = e[e.length - 1].toString(), r = e.length - 2; r >= 0; --r)
142
- i += (ct + e[r]).toString().substring(1);
141
+ i += (ut + e[r]).toString().substring(1);
143
142
  return i;
144
143
  }, n.prototype.valueOf = function() {
145
144
  for (var t = this.buf, e = 0, i = t.length - 1; i >= 0; --i)
146
- e = e * ct + t[i];
145
+ e = e * ut + t[i];
147
146
  return e;
148
147
  }, n.prototype.simplify = function() {
149
148
  var t = this.buf;
150
149
  return t.length == 1 ? t[0] : this;
151
150
  }, n;
152
151
  })()
153
- ), qe = "…", Si = /^(\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)?)?$/, Ti = /^(\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 ht(n, t) {
155
- return n.length > t && (n = n.substring(0, t) + qe), n;
152
+ ), Ke = "…", Si = /^(\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)?)?$/, Ti = /^(\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)?)?$/;
153
+ function lt(n, t) {
154
+ return n.length > t && (n = n.substring(0, t) + Ke), n;
156
155
  }
157
- var Kt = (
156
+ var Ht = (
158
157
  /** @class */
159
158
  (function() {
160
159
  function n(t, e) {
@@ -217,7 +216,7 @@ var Kt = (
217
216
  `;
218
217
  }
219
218
  r && (i = i - 256);
220
- for (var c = new gt(i), h = t + 1; h < e; ++h)
219
+ for (var c = new mt(i), h = t + 1; h < e; ++h)
221
220
  c.mulAdd(256, this.get(h));
222
221
  return o + c.toString();
223
222
  }, n.prototype.parseBitString = function(t, e, i) {
@@ -226,24 +225,24 @@ var Kt = (
226
225
  for (var h = this.get(c), u = c == e - 1 ? r : 0, f = 7; f >= u; --f)
227
226
  o += h >> f & 1 ? "1" : "0";
228
227
  if (o.length > i)
229
- return a + ht(o, i);
228
+ return a + lt(o, i);
230
229
  }
231
230
  return a + o;
232
231
  }, n.prototype.parseOctetString = function(t, e, i) {
233
232
  if (this.isASCII(t, e))
234
- return ht(this.parseStringISO(t, e), i);
233
+ return lt(this.parseStringISO(t, e), i);
235
234
  var r = e - t, s = "(" + r + ` byte)
236
235
  `;
237
236
  i /= 2, r > i && (e = t + i);
238
237
  for (var a = t; a < e; ++a)
239
238
  s += this.hexByte(this.get(a));
240
- return r > i && (s += qe), s;
239
+ return r > i && (s += Ke), s;
241
240
  }, n.prototype.parseOID = function(t, e, i) {
242
- for (var r = "", s = new gt(), a = 0, o = t; o < e; ++o) {
241
+ for (var r = "", s = new mt(), a = 0, o = t; o < e; ++o) {
243
242
  var c = this.get(o);
244
243
  if (s.mulAdd(128, c & 127), a += 7, !(c & 128)) {
245
244
  if (r === "")
246
- if (s = s.simplify(), s instanceof gt)
245
+ if (s = s.simplify(), s instanceof mt)
247
246
  s.sub(80), r = "2." + s.toString();
248
247
  else {
249
248
  var h = s < 80 ? s < 40 ? 0 : 1 : 2;
@@ -252,18 +251,18 @@ var Kt = (
252
251
  else
253
252
  r += "." + s.toString();
254
253
  if (r.length > i)
255
- return ht(r, i);
256
- s = new gt(), a = 0;
254
+ return lt(r, i);
255
+ s = new mt(), a = 0;
257
256
  }
258
257
  }
259
258
  return a > 0 && (r += ".incomplete"), r;
260
259
  }, n;
261
260
  })()
262
- ), Ci = (
261
+ ), Ai = (
263
262
  /** @class */
264
263
  (function() {
265
264
  function n(t, e, i, r, s) {
266
- if (!(r instanceof ge))
265
+ if (!(r instanceof me))
267
266
  throw new Error("Invalid tag value.");
268
267
  this.stream = t, this.header = e, this.length = i, this.tag = r, this.sub = s;
269
268
  }
@@ -368,7 +367,7 @@ var Kt = (
368
367
  case 17:
369
368
  return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
370
369
  case 12:
371
- return ht(this.stream.parseStringUTF(e, e + i), t);
370
+ return lt(this.stream.parseStringUTF(e, e + i), t);
372
371
  case 18:
373
372
  // NumericString
374
373
  case 19:
@@ -381,9 +380,9 @@ var Kt = (
381
380
  // IA5String
382
381
  // case 0x19: // GraphicString
383
382
  case 26:
384
- return ht(this.stream.parseStringISO(e, e + i), t);
383
+ return lt(this.stream.parseStringISO(e, e + i), t);
385
384
  case 30:
386
- return ht(this.stream.parseStringBMP(e, e + i), t);
385
+ return lt(this.stream.parseStringBMP(e, e + i), t);
387
386
  case 23:
388
387
  // UTCTime
389
388
  case 24:
@@ -427,8 +426,8 @@ var Kt = (
427
426
  return t.substring(e, e + i);
428
427
  }, n.decode = function(t) {
429
428
  var e;
430
- t instanceof Kt ? e = t : e = new Kt(t, 0);
431
- var i = new Kt(e), r = new ge(e), s = n.decodeLength(e), a = e.pos, o = a - i.pos, c = null, h = function() {
429
+ t instanceof Ht ? e = t : e = new Ht(t, 0);
430
+ var i = new Ht(e), r = new me(e), s = n.decodeLength(e), a = e.pos, o = a - i.pos, c = null, h = function() {
432
431
  var f = [];
433
432
  if (s !== null) {
434
433
  for (var _ = a + s; e.pos < _; )
@@ -438,10 +437,10 @@ var Kt = (
438
437
  } else
439
438
  try {
440
439
  for (; ; ) {
441
- var m = n.decode(e);
442
- if (m.tag.isEOC())
440
+ var y = n.decode(e);
441
+ if (y.tag.isEOC())
443
442
  break;
444
- f[f.length] = m;
443
+ f[f.length] = y;
445
444
  }
446
445
  s = a - e.pos;
447
446
  } catch (d) {
@@ -470,13 +469,13 @@ var Kt = (
470
469
  return new n(i, o, s, r, c);
471
470
  }, n;
472
471
  })()
473
- ), ge = (
472
+ ), me = (
474
473
  /** @class */
475
474
  (function() {
476
475
  function n(t) {
477
476
  var e = t.get();
478
477
  if (this.tagClass = e >> 6, this.tagConstructed = (e & 32) !== 0, this.tagNumber = e & 31, this.tagNumber == 31) {
479
- var i = new gt();
478
+ var i = new mt();
480
479
  do
481
480
  e = t.get(), i.mulAdd(128, e & 127);
482
481
  while (e & 128);
@@ -489,7 +488,7 @@ var Kt = (
489
488
  return this.tagClass === 0 && this.tagNumber === 0;
490
489
  }, n;
491
490
  })()
492
- ), Y, Ai = 244837814094590, me = (Ai & 16777215) == 15715070, N = [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], Ri = (1 << 26) / N[N.length - 1], P = (
491
+ ), Y, Ci = 244837814094590, ye = (Ci & 16777215) == 15715070, N = [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], Ri = (1 << 26) / N[N.length - 1], P = (
493
492
  /** @class */
494
493
  (function() {
495
494
  function n(t, e, i) {
@@ -533,13 +532,13 @@ var Kt = (
533
532
  return e;
534
533
  return 0;
535
534
  }, n.prototype.bitLength = function() {
536
- return this.t <= 0 ? 0 : this.DB * (this.t - 1) + St(this[this.t - 1] ^ this.s & this.DM);
535
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Tt(this[this.t - 1] ^ this.s & this.DM);
537
536
  }, n.prototype.mod = function(t) {
538
537
  var e = E();
539
538
  return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(n.ZERO) > 0 && t.subTo(e, e), e;
540
539
  }, n.prototype.modPowInt = function(t, e) {
541
540
  var i;
542
- return t < 256 || e.isEven() ? i = new ye(e) : i = new be(e), this.exp(t, i);
541
+ return t < 256 || e.isEven() ? i = new be(e) : i = new Pe(e), this.exp(t, i);
543
542
  }, n.prototype.clone = function() {
544
543
  var t = E();
545
544
  return this.copyTo(t), t;
@@ -581,13 +580,13 @@ var Kt = (
581
580
  return this.bitwiseTo(t, Pi, e), e;
582
581
  }, n.prototype.or = function(t) {
583
582
  var e = E();
584
- return this.bitwiseTo(t, wt, e), e;
583
+ return this.bitwiseTo(t, St, e), e;
585
584
  }, n.prototype.xor = function(t) {
586
585
  var e = E();
587
- return this.bitwiseTo(t, pe, e), e;
586
+ return this.bitwiseTo(t, de, e), e;
588
587
  }, n.prototype.andNot = function(t) {
589
588
  var e = E();
590
- return this.bitwiseTo(t, de, e), e;
589
+ return this.bitwiseTo(t, _e, e), e;
591
590
  }, n.prototype.not = function() {
592
591
  for (var t = E(), e = 0; e < this.t; ++e)
593
592
  t[e] = this.DM & ~this[e];
@@ -611,11 +610,11 @@ var Kt = (
611
610
  var e = Math.floor(t / this.DB);
612
611
  return e >= this.t ? this.s != 0 : (this[e] & 1 << t % this.DB) != 0;
613
612
  }, n.prototype.setBit = function(t) {
614
- return this.changeBit(t, wt);
613
+ return this.changeBit(t, St);
615
614
  }, n.prototype.clearBit = function(t) {
616
- return this.changeBit(t, de);
615
+ return this.changeBit(t, _e);
617
616
  }, n.prototype.flipBit = function(t) {
618
- return this.changeBit(t, pe);
617
+ return this.changeBit(t, de);
619
618
  }, n.prototype.add = function(t) {
620
619
  var e = E();
621
620
  return this.addTo(t, e), e;
@@ -638,26 +637,26 @@ var Kt = (
638
637
  var i = t.bitLength(), r, s = Q(1), a;
639
638
  if (i <= 0)
640
639
  return s;
641
- i < 18 ? r = 1 : i < 48 ? r = 3 : i < 144 ? r = 4 : i < 768 ? r = 5 : r = 6, i < 8 ? a = new ye(e) : e.isEven() ? a = new xi(e) : a = new be(e);
640
+ i < 18 ? r = 1 : i < 48 ? r = 3 : i < 144 ? r = 4 : i < 768 ? r = 5 : r = 6, i < 8 ? a = new be(e) : e.isEven() ? a = new Di(e) : a = new Pe(e);
642
641
  var o = [], c = 3, h = r - 1, u = (1 << r) - 1;
643
642
  if (o[1] = a.convert(this), r > 1) {
644
643
  var f = E();
645
644
  for (a.sqrTo(o[1], f); c <= u; )
646
645
  o[c] = E(), a.mulTo(f, o[c - 2], o[c]), c += 2;
647
646
  }
648
- var _ = t.t - 1, m, d = !0, y = E(), g;
649
- for (i = St(t[_]) - 1; _ >= 0; ) {
650
- for (i >= h ? m = t[_] >> i - h & u : (m = (t[_] & (1 << i + 1) - 1) << h - i, _ > 0 && (m |= t[_ - 1] >> this.DB + i - h)), c = r; (m & 1) == 0; )
651
- m >>= 1, --c;
647
+ var _ = t.t - 1, y, d = !0, m = E(), g;
648
+ for (i = Tt(t[_]) - 1; _ >= 0; ) {
649
+ for (i >= h ? y = t[_] >> i - h & u : (y = (t[_] & (1 << i + 1) - 1) << h - i, _ > 0 && (y |= t[_ - 1] >> this.DB + i - h)), c = r; (y & 1) == 0; )
650
+ y >>= 1, --c;
652
651
  if ((i -= c) < 0 && (i += this.DB, --_), d)
653
- o[m].copyTo(s), d = !1;
652
+ o[y].copyTo(s), d = !1;
654
653
  else {
655
654
  for (; c > 1; )
656
- a.sqrTo(s, y), a.sqrTo(y, s), c -= 2;
657
- c > 0 ? a.sqrTo(s, y) : (g = s, s = y, y = g), a.mulTo(y, o[m], s);
655
+ a.sqrTo(s, m), a.sqrTo(m, s), c -= 2;
656
+ c > 0 ? a.sqrTo(s, m) : (g = s, s = m, m = g), a.mulTo(m, o[y], s);
658
657
  }
659
658
  for (; _ >= 0 && (t[_] & 1 << i) == 0; )
660
- a.sqrTo(s, y), g = s, s = y, y = g, --i < 0 && (i = this.DB - 1, --_);
659
+ a.sqrTo(s, m), g = s, s = m, m = g, --i < 0 && (i = this.DB - 1, --_);
661
660
  }
662
661
  return a.revert(s);
663
662
  }, n.prototype.modInverse = function(t) {
@@ -738,7 +737,7 @@ var Kt = (
738
737
  }
739
738
  this.t = 0, this.s = 0;
740
739
  for (var r = t.length, s = !1, a = 0; --r >= 0; ) {
741
- var o = i == 8 ? +t[r] & 255 : ve(t, r);
740
+ var o = i == 8 ? +t[r] & 255 : Ee(t, r);
742
741
  if (o < 0) {
743
742
  t.charAt(r) == "-" && (s = !0);
744
743
  continue;
@@ -815,18 +814,18 @@ var Kt = (
815
814
  return;
816
815
  }
817
816
  i == null && (i = E());
818
- var a = E(), o = this.s, c = t.s, h = this.DB - St(r[r.t - 1]);
817
+ var a = E(), o = this.s, c = t.s, h = this.DB - Tt(r[r.t - 1]);
819
818
  h > 0 ? (r.lShiftTo(h, a), s.lShiftTo(h, i)) : (r.copyTo(a), s.copyTo(i));
820
819
  var u = a.t, f = a[u - 1];
821
820
  if (f != 0) {
822
- var _ = f * (1 << this.F1) + (u > 1 ? a[u - 2] >> this.F2 : 0), m = this.FV / _, d = (1 << this.F1) / _, y = 1 << this.F2, g = i.t, w = g - u, C = e ?? E();
823
- for (a.dlShiftTo(w, C), i.compareTo(C) >= 0 && (i[i.t++] = 1, i.subTo(C, i)), n.ONE.dlShiftTo(u, C), C.subTo(a, a); a.t < u; )
821
+ var _ = f * (1 << this.F1) + (u > 1 ? a[u - 2] >> this.F2 : 0), y = this.FV / _, d = (1 << this.F1) / _, m = 1 << this.F2, g = i.t, w = g - u, A = e ?? E();
822
+ for (a.dlShiftTo(w, A), i.compareTo(A) >= 0 && (i[i.t++] = 1, i.subTo(A, i)), n.ONE.dlShiftTo(u, A), A.subTo(a, a); a.t < u; )
824
823
  a[a.t++] = 0;
825
824
  for (; --w >= 0; ) {
826
- var T = i[--g] == f ? this.DM : Math.floor(i[g] * m + (i[g - 1] + y) * d);
825
+ var T = i[--g] == f ? this.DM : Math.floor(i[g] * y + (i[g - 1] + m) * d);
827
826
  if ((i[g] += a.am(0, T, i, w, 0, u)) < T)
828
- for (a.dlShiftTo(w, C), i.subTo(C, i); i[g] < --T; )
829
- i.subTo(C, i);
827
+ for (a.dlShiftTo(w, A), i.subTo(A, i); i[g] < --T; )
828
+ i.subTo(A, i);
830
829
  }
831
830
  e != null && (i.drShiftTo(u, e), o != c && n.ZERO.subTo(e, e)), i.t = u, i.clamp(), h > 0 && i.rShiftTo(h, i), o < 0 && n.ZERO.subTo(i, i);
832
831
  }
@@ -844,7 +843,7 @@ var Kt = (
844
843
  }, n.prototype.exp = function(t, e) {
845
844
  if (t > 4294967295 || t < 1)
846
845
  return n.ONE;
847
- var i = E(), r = E(), s = e.convert(this), a = St(t) - 1;
846
+ var i = E(), r = E(), s = e.convert(this), a = Tt(t) - 1;
848
847
  for (s.copyTo(i); --a >= 0; )
849
848
  if (e.sqrTo(i, r), (t & 1 << a) > 0)
850
849
  e.mulTo(r, s, i);
@@ -865,7 +864,7 @@ var Kt = (
865
864
  }, n.prototype.fromRadix = function(t, e) {
866
865
  this.fromInt(0), e == null && (e = 10);
867
866
  for (var i = this.chunkSize(e), r = Math.pow(e, i), s = !1, a = 0, o = 0, c = 0; c < t.length; ++c) {
868
- var h = ve(t, c);
867
+ var h = Ee(t, c);
869
868
  if (h < 0) {
870
869
  t.charAt(c) == "-" && this.signum() == 0 && (s = !0);
871
870
  continue;
@@ -878,7 +877,7 @@ var Kt = (
878
877
  if (t < 2)
879
878
  this.fromInt(1);
880
879
  else
881
- for (this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(n.ONE.shiftLeft(t - 1), wt, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
880
+ for (this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(n.ONE.shiftLeft(t - 1), St, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
882
881
  this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(n.ONE.shiftLeft(t - 1), this);
883
882
  else {
884
883
  var r = [], s = t & 7;
@@ -995,7 +994,7 @@ var Kt = (
995
994
  if (t < 2)
996
995
  this.fromInt(1);
997
996
  else {
998
- this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(n.ONE.shiftLeft(t - 1), wt, this), this.isEven() && this.dAddOffset(1, 0);
997
+ this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(n.ONE.shiftLeft(t - 1), St, this), this.isEven() && this.dAddOffset(1, 0);
999
998
  var s = this, a = function() {
1000
999
  s.dAddOffset(2, 0), s.bitLength() > t && s.subTo(n.ONE.shiftLeft(t - 1), s), s.isProbablePrime(e) ? setTimeout(function() {
1001
1000
  r();
@@ -1024,7 +1023,7 @@ var Kt = (
1024
1023
  t.squareTo(e);
1025
1024
  }, n;
1026
1025
  })()
1027
- ), ye = (
1026
+ ), be = (
1028
1027
  /** @class */
1029
1028
  (function() {
1030
1029
  function n(t) {
@@ -1042,7 +1041,7 @@ var Kt = (
1042
1041
  t.squareTo(e), this.reduce(e);
1043
1042
  }, n;
1044
1043
  })()
1045
- ), be = (
1044
+ ), Pe = (
1046
1045
  /** @class */
1047
1046
  (function() {
1048
1047
  function n(t) {
@@ -1069,7 +1068,7 @@ var Kt = (
1069
1068
  t.squareTo(e), this.reduce(e);
1070
1069
  }, n;
1071
1070
  })()
1072
- ), xi = (
1071
+ ), Di = (
1073
1072
  /** @class */
1074
1073
  (function() {
1075
1074
  function n(t) {
@@ -1099,17 +1098,17 @@ var Kt = (
1099
1098
  function E() {
1100
1099
  return new P(null);
1101
1100
  }
1102
- function A(n, t) {
1101
+ function C(n, t) {
1103
1102
  return new P(n, t);
1104
1103
  }
1105
- var Pe = typeof navigator < "u";
1106
- Pe && me && navigator.appName == "Microsoft Internet Explorer" ? (P.prototype.am = function(t, e, i, r, s, a) {
1104
+ var ve = typeof navigator < "u";
1105
+ ve && ye && navigator.appName == "Microsoft Internet Explorer" ? (P.prototype.am = function(t, e, i, r, s, a) {
1107
1106
  for (var o = e & 32767, c = e >> 15; --a >= 0; ) {
1108
1107
  var h = this[t] & 32767, u = this[t++] >> 15, f = c * h + u * o;
1109
1108
  h = o * h + ((f & 32767) << 15) + i[r] + (s & 1073741823), s = (h >>> 30) + (f >>> 15) + c * u + (s >>> 30), i[r++] = h & 1073741823;
1110
1109
  }
1111
1110
  return s;
1112
- }, Y = 30) : Pe && me && navigator.appName != "Netscape" ? (P.prototype.am = function(t, e, i, r, s, a) {
1111
+ }, Y = 30) : ve && ye && navigator.appName != "Netscape" ? (P.prototype.am = function(t, e, i, r, s, a) {
1113
1112
  for (; --a >= 0; ) {
1114
1113
  var o = e * this[t++] + i[r] + s;
1115
1114
  s = Math.floor(o / 67108864), i[r++] = o & 67108863;
@@ -1125,35 +1124,35 @@ Pe && me && navigator.appName == "Microsoft Internet Explorer" ? (P.prototype.am
1125
1124
  P.prototype.DB = Y;
1126
1125
  P.prototype.DM = (1 << Y) - 1;
1127
1126
  P.prototype.DV = 1 << Y;
1128
- var ie = 52;
1129
- P.prototype.FV = Math.pow(2, ie);
1130
- P.prototype.F1 = ie - Y;
1131
- P.prototype.F2 = 2 * Y - ie;
1132
- var Ut = [], ft, F;
1133
- ft = 48;
1134
- for (F = 0; F <= 9; ++F)
1135
- Ut[ft++] = F;
1136
- ft = 97;
1137
- for (F = 10; F < 36; ++F)
1138
- Ut[ft++] = F;
1139
- ft = 65;
1140
- for (F = 10; F < 36; ++F)
1141
- Ut[ft++] = F;
1142
- function ve(n, t) {
1143
- var e = Ut[n.charCodeAt(t)];
1127
+ var ne = 52;
1128
+ P.prototype.FV = Math.pow(2, ne);
1129
+ P.prototype.F1 = ne - Y;
1130
+ P.prototype.F2 = 2 * Y - ne;
1131
+ var Lt = [], pt, k;
1132
+ pt = 48;
1133
+ for (k = 0; k <= 9; ++k)
1134
+ Lt[pt++] = k;
1135
+ pt = 97;
1136
+ for (k = 10; k < 36; ++k)
1137
+ Lt[pt++] = k;
1138
+ pt = 65;
1139
+ for (k = 10; k < 36; ++k)
1140
+ Lt[pt++] = k;
1141
+ function Ee(n, t) {
1142
+ var e = Lt[n.charCodeAt(t)];
1144
1143
  return e ?? -1;
1145
1144
  }
1146
1145
  function Q(n) {
1147
1146
  var t = E();
1148
1147
  return t.fromInt(n), t;
1149
1148
  }
1150
- function St(n) {
1149
+ function Tt(n) {
1151
1150
  var t = 1, e;
1152
1151
  return (e = n >>> 16) != 0 && (n = e, t += 16), (e = n >> 8) != 0 && (n = e, t += 8), (e = n >> 4) != 0 && (n = e, t += 4), (e = n >> 2) != 0 && (n = e, t += 2), (e = n >> 1) != 0 && (n = e, t += 1), t;
1153
1152
  }
1154
1153
  P.ZERO = Q(0);
1155
1154
  P.ONE = Q(1);
1156
- var Di = (
1155
+ var Ii = (
1157
1156
  /** @class */
1158
1157
  (function() {
1159
1158
  function n() {
@@ -1172,65 +1171,65 @@ var Di = (
1172
1171
  }, n;
1173
1172
  })()
1174
1173
  );
1175
- function Ii() {
1176
- return new Di();
1174
+ function Bi() {
1175
+ return new Ii();
1177
1176
  }
1178
- var Ke = 256, Tt, Z = null, j;
1177
+ var He = 256, At, Z = null, F;
1179
1178
  if (Z == null) {
1180
- Z = [], j = 0;
1179
+ Z = [], F = 0;
1181
1180
  var Ct = void 0;
1182
1181
  if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
1183
- var Ht = new Uint32Array(256);
1184
- for (self.crypto.getRandomValues(Ht), Ct = 0; Ct < Ht.length; ++Ct)
1185
- Z[j++] = Ht[Ct] & 255;
1182
+ var Wt = new Uint32Array(256);
1183
+ for (self.crypto.getRandomValues(Wt), Ct = 0; Ct < Wt.length; ++Ct)
1184
+ Z[F++] = Wt[Ct] & 255;
1186
1185
  }
1187
- var At = 0, Rt = function(n) {
1188
- if (At = At || 0, At >= 256 || j >= Ke) {
1189
- self.removeEventListener ? self.removeEventListener("mousemove", Rt, !1) : self.detachEvent && self.detachEvent("onmousemove", Rt);
1186
+ var Rt = 0, Ot = function(n) {
1187
+ if (Rt = Rt || 0, Rt >= 256 || F >= He) {
1188
+ self.removeEventListener ? self.removeEventListener("mousemove", Ot, !1) : self.detachEvent && self.detachEvent("onmousemove", Ot);
1190
1189
  return;
1191
1190
  }
1192
1191
  try {
1193
1192
  var t = n.x + n.y;
1194
- Z[j++] = t & 255, At += 1;
1193
+ Z[F++] = t & 255, Rt += 1;
1195
1194
  } catch {
1196
1195
  }
1197
1196
  };
1198
- typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Rt, !1) : self.attachEvent && self.attachEvent("onmousemove", Rt));
1197
+ typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Ot, !1) : self.attachEvent && self.attachEvent("onmousemove", Ot));
1199
1198
  }
1200
- function Bi() {
1201
- if (Tt == null) {
1202
- for (Tt = Ii(); j < Ke; ) {
1199
+ function Ni() {
1200
+ if (At == null) {
1201
+ for (At = Bi(); F < He; ) {
1203
1202
  var n = Math.floor(65536 * Math.random());
1204
- Z[j++] = n & 255;
1203
+ Z[F++] = n & 255;
1205
1204
  }
1206
- for (Tt.init(Z), j = 0; j < Z.length; ++j)
1207
- Z[j] = 0;
1208
- j = 0;
1205
+ for (At.init(Z), F = 0; F < Z.length; ++F)
1206
+ Z[F] = 0;
1207
+ F = 0;
1209
1208
  }
1210
- return Tt.next();
1209
+ return At.next();
1211
1210
  }
1212
- var Nt = (
1211
+ var Vt = (
1213
1212
  /** @class */
1214
1213
  (function() {
1215
1214
  function n() {
1216
1215
  }
1217
1216
  return n.prototype.nextBytes = function(t) {
1218
1217
  for (var e = 0; e < t.length; ++e)
1219
- t[e] = Bi();
1218
+ t[e] = Ni();
1220
1219
  }, n;
1221
1220
  })()
1222
1221
  );
1223
- function Jt(n) {
1224
- return Vi(Ki(Ni(n), n.length * 8));
1222
+ function Qt(n) {
1223
+ return Vi(Ki(xi(n), n.length * 8));
1225
1224
  }
1226
- function Ee(n) {
1225
+ function we(n) {
1227
1226
  for (var t = "0123456789abcdef", e = "", i = 0; i < n.length; i++) {
1228
1227
  var r = n.charCodeAt(i);
1229
1228
  e += t.charAt(r >>> 4 & 15) + t.charAt(r & 15);
1230
1229
  }
1231
1230
  return e;
1232
1231
  }
1233
- function Ni(n) {
1232
+ function xi(n) {
1234
1233
  for (var t = Array(n.length >> 2), e = 0; e < t.length; e++)
1235
1234
  t[e] = 0;
1236
1235
  for (var e = 0; e < n.length * 8; e += 8)
@@ -1245,7 +1244,7 @@ function Vi(n) {
1245
1244
  function W(n, t) {
1246
1245
  return n >>> t | n << 32 - t;
1247
1246
  }
1248
- function He(n, t) {
1247
+ function We(n, t) {
1249
1248
  return n >>> t;
1250
1249
  }
1251
1250
  function Ui(n, t, e) {
@@ -1261,22 +1260,22 @@ function ki(n) {
1261
1260
  return W(n, 6) ^ W(n, 11) ^ W(n, 25);
1262
1261
  }
1263
1262
  function Fi(n) {
1264
- return W(n, 7) ^ W(n, 18) ^ He(n, 3);
1263
+ return W(n, 7) ^ W(n, 18) ^ We(n, 3);
1265
1264
  }
1266
1265
  function ji(n) {
1267
- return W(n, 17) ^ W(n, 19) ^ He(n, 10);
1266
+ return W(n, 17) ^ W(n, 19) ^ We(n, 10);
1268
1267
  }
1269
1268
  var qi = 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
1269
  function Ki(n, t) {
1271
- var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), i = new Array(64), r, s, a, o, c, h, u, f, _, m, d, y;
1270
+ var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), i = new Array(64), r, s, a, o, c, h, u, f, _, y, d, m;
1272
1271
  for (n[t >> 5] |= 128 << 24 - t % 32, n[(t + 64 >> 9 << 4) + 15] = t, _ = 0; _ < n.length; _ += 16) {
1273
- for (r = e[0], s = e[1], a = e[2], o = e[3], c = e[4], h = e[5], u = e[6], f = e[7], m = 0; m < 64; m++)
1274
- m < 16 ? i[m] = n[m + _] : i[m] = D(D(D(ji(i[m - 2]), i[m - 7]), Fi(i[m - 15])), i[m - 16]), d = D(D(D(D(f, ki(c)), Ui(c, h, u)), qi[m]), i[m]), y = D(Mi(r), Li(r, s, a)), f = u, u = h, h = c, c = D(o, d), o = a, a = s, s = r, r = D(d, y);
1275
- e[0] = D(r, e[0]), e[1] = D(s, e[1]), e[2] = D(a, e[2]), e[3] = D(o, e[3]), e[4] = D(c, e[4]), e[5] = D(h, e[5]), e[6] = D(u, e[6]), e[7] = D(f, e[7]);
1272
+ for (r = e[0], s = e[1], a = e[2], o = e[3], c = e[4], h = e[5], u = e[6], f = e[7], y = 0; y < 64; y++)
1273
+ y < 16 ? i[y] = n[y + _] : i[y] = I(I(I(ji(i[y - 2]), i[y - 7]), Fi(i[y - 15])), i[y - 16]), d = I(I(I(I(f, ki(c)), Ui(c, h, u)), qi[y]), i[y]), m = I(Mi(r), Li(r, s, a)), f = u, u = h, h = c, c = I(o, d), o = a, a = s, s = r, r = I(d, m);
1274
+ e[0] = I(r, e[0]), e[1] = I(s, e[1]), e[2] = I(a, e[2]), e[3] = I(o, e[3]), e[4] = I(c, e[4]), e[5] = I(h, e[5]), e[6] = I(u, e[6]), e[7] = I(f, e[7]);
1276
1275
  }
1277
1276
  return e;
1278
1277
  }
1279
- function D(n, t) {
1278
+ function I(n, t) {
1280
1279
  var e = (n & 65535) + (t & 65535), i = (n >> 16) + (t >> 16) + (e >> 16);
1281
1280
  return i << 16 | e & 65535;
1282
1281
  }
@@ -1286,7 +1285,7 @@ function Hi(n, t) {
1286
1285
  for (var e = t - n.length - 6, i = "", r = 0; r < e; r += 2)
1287
1286
  i += "ff";
1288
1287
  var s = "0001" + i + "00" + n;
1289
- return A(s, 16);
1288
+ return C(s, 16);
1290
1289
  }
1291
1290
  function Wi(n, t) {
1292
1291
  if (t < n.length + 11)
@@ -1296,14 +1295,14 @@ function Wi(n, t) {
1296
1295
  r < 128 ? e[--t] = r : r > 127 && r < 2048 ? (e[--t] = r & 63 | 128, e[--t] = r >> 6 | 192) : (e[--t] = r & 63 | 128, e[--t] = r >> 6 & 63 | 128, e[--t] = r >> 12 | 224);
1297
1296
  }
1298
1297
  e[--t] = 0;
1299
- for (var s = new Nt(), a = []; t > 2; ) {
1298
+ for (var s = new Vt(), a = []; t > 2; ) {
1300
1299
  for (a[0] = 0; a[0] == 0; )
1301
1300
  s.nextBytes(a);
1302
1301
  e[--t] = a[0];
1303
1302
  }
1304
1303
  return e[--t] = 2, e[--t] = 0, new P(e);
1305
1304
  }
1306
- function we(n, t, e) {
1305
+ function Se(n, t, e) {
1307
1306
  for (var i = "", r = 0; i.length < t; )
1308
1307
  i += e(String.fromCharCode.apply(String, n.concat([
1309
1308
  (r & 4278190080) >> 24,
@@ -1315,18 +1314,18 @@ function we(n, t, e) {
1315
1314
  }
1316
1315
  var Xi = 32;
1317
1316
  function zi(n, t) {
1318
- var e = Xi, i = Jt;
1317
+ var e = Xi, i = Qt;
1319
1318
  if (n.length + 2 * e + 2 > t)
1320
1319
  throw "Message too long for RSA";
1321
1320
  var r = "", s;
1322
1321
  for (s = 0; s < t - n.length - 2 * e - 2; s += 1)
1323
1322
  r += "\0";
1324
1323
  var a = i("") + r + "" + n, o = new Array(e);
1325
- new Nt().nextBytes(o);
1326
- var c = we(o, a.length, i), h = [];
1324
+ new Vt().nextBytes(o);
1325
+ var c = Se(o, a.length, i), h = [];
1327
1326
  for (s = 0; s < a.length; s += 1)
1328
1327
  h[s] = a.charCodeAt(s) ^ c.charCodeAt(s);
1329
- var u = we(h, o.length, i), f = [0];
1328
+ var u = Se(h, o.length, i), f = [0];
1330
1329
  for (s = 0; s < o.length; s += 1)
1331
1330
  f[s + 1] = o[s] ^ u.charCodeAt(s);
1332
1331
  return new P(f.concat(h));
@@ -1346,7 +1345,7 @@ var Gi = (
1346
1345
  e = e.add(this.p);
1347
1346
  return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i);
1348
1347
  }, n.prototype.setPublic = function(t, e) {
1349
- t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = A(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
1348
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = C(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
1350
1349
  }, n.prototype.encrypt = function(t, e) {
1351
1350
  typeof e > "u" && (e = Wi);
1352
1351
  var i = this.n.bitLength() + 7 >> 3, r = e(t, i);
@@ -1359,11 +1358,11 @@ var Gi = (
1359
1358
  a = "0" + a;
1360
1359
  return a;
1361
1360
  }, n.prototype.setPrivate = function(t, e, i) {
1362
- t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = A(t, 16), this.e = parseInt(e, 16), this.d = A(i, 16)) : console.error("Invalid RSA private key");
1361
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = C(t, 16), this.e = parseInt(e, 16), this.d = C(i, 16)) : console.error("Invalid RSA private key");
1363
1362
  }, n.prototype.setPrivateEx = function(t, e, i, r, s, a, o, c) {
1364
- t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = A(t, 16), this.e = parseInt(e, 16), this.d = A(i, 16), this.p = A(r, 16), this.q = A(s, 16), this.dmp1 = A(a, 16), this.dmq1 = A(o, 16), this.coeff = A(c, 16)) : console.error("Invalid RSA private key");
1363
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = C(t, 16), this.e = parseInt(e, 16), this.d = C(i, 16), this.p = C(r, 16), this.q = C(s, 16), this.dmp1 = C(a, 16), this.dmq1 = C(o, 16), this.coeff = C(c, 16)) : console.error("Invalid RSA private key");
1365
1364
  }, n.prototype.generate = function(t, e) {
1366
- var i = new Nt(), r = t >> 1;
1365
+ var i = new Vt(), r = t >> 1;
1367
1366
  this.e = parseInt(e, 16);
1368
1367
  for (var s = new P(e, 16); ; ) {
1369
1368
  for (; this.p = new P(t - r, 1, i), !(this.p.subtract(P.ONE).gcd(s).compareTo(P.ONE) == 0 && this.p.isProbablePrime(10)); )
@@ -1381,10 +1380,10 @@ var Gi = (
1381
1380
  }
1382
1381
  }
1383
1382
  }, n.prototype.decrypt = function(t) {
1384
- var e = A(t, 16), i = this.doPrivate(e);
1383
+ var e = C(t, 16), i = this.doPrivate(e);
1385
1384
  return i == null ? null : $i(i, this.n.bitLength() + 7 >> 3);
1386
1385
  }, n.prototype.generateAsync = function(t, e, i) {
1387
- var r = new Nt(), s = t >> 1;
1386
+ var r = new Vt(), s = t >> 1;
1388
1387
  this.e = parseInt(e, 16);
1389
1388
  var a = new P(e, 16), o = this, c = function() {
1390
1389
  var h = function() {
@@ -1392,8 +1391,8 @@ var Gi = (
1392
1391
  var _ = o.p;
1393
1392
  o.p = o.q, o.q = _;
1394
1393
  }
1395
- var m = o.p.subtract(P.ONE), d = o.q.subtract(P.ONE), y = m.multiply(d);
1396
- y.gcd(a).compareTo(P.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(y), o.dmp1 = o.d.mod(m), o.dmq1 = o.d.mod(d), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
1394
+ var y = o.p.subtract(P.ONE), d = o.q.subtract(P.ONE), m = y.multiply(d);
1395
+ m.gcd(a).compareTo(P.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(m), o.dmp1 = o.d.mod(y), o.dmq1 = o.d.mod(d), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
1397
1396
  i();
1398
1397
  }, 0)) : setTimeout(c, 0);
1399
1398
  }, u = function() {
@@ -1423,7 +1422,7 @@ var Gi = (
1423
1422
  h = "0" + h;
1424
1423
  return h;
1425
1424
  }, n.prototype.verify = function(t, e, i) {
1426
- var r = A(e, 16), s = this.doPublic(r);
1425
+ var r = C(e, 16), s = this.doPublic(r);
1427
1426
  if (s == null)
1428
1427
  return null;
1429
1428
  var a = s.toString(16).replace(/^1f+00/, ""), o = Qi(a);
@@ -1445,7 +1444,7 @@ function $i(n, t) {
1445
1444
  }
1446
1445
  return r;
1447
1446
  }
1448
- var xt = {
1447
+ var It = {
1449
1448
  md2: "3020300c06082a864886f70d020205000410",
1450
1449
  md5: "3020300c06082a864886f70d020505000410",
1451
1450
  sha1: "3021300906052b0e03021a05000414",
@@ -1456,12 +1455,12 @@ var xt = {
1456
1455
  ripemd160: "3021300906052b2403020105000414"
1457
1456
  };
1458
1457
  function Ji(n) {
1459
- return xt[n] || "";
1458
+ return It[n] || "";
1460
1459
  }
1461
1460
  function Qi(n) {
1462
- for (var t in xt)
1463
- if (xt.hasOwnProperty(t)) {
1464
- var e = xt[t], i = e.length;
1461
+ for (var t in It)
1462
+ if (It.hasOwnProperty(t)) {
1463
+ var e = It[t], i = e.length;
1465
1464
  if (n.substring(0, i) == e)
1466
1465
  return n.substring(i);
1467
1466
  }
@@ -1504,10 +1503,10 @@ p.asn1.ASN1Util = new function() {
1504
1503
  }, this.getPEMStringFromHex = function(n, t) {
1505
1504
  return hextopem(n, t);
1506
1505
  }, this.newObject = function(n) {
1507
- var t = p, e = t.asn1, i = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, h = e.DEREnumerated, u = e.DERUTF8String, f = e.DERNumericString, _ = e.DERPrintableString, m = e.DERTeletexString, d = e.DERIA5String, y = e.DERUTCTime, g = e.DERGeneralizedTime, w = e.DERSequence, C = e.DERSet, T = e.DERTaggedObject, O = e.ASN1Util.newObject, V = Object.keys(n);
1508
- if (V.length != 1)
1506
+ var t = p, e = t.asn1, i = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, h = e.DEREnumerated, u = e.DERUTF8String, f = e.DERNumericString, _ = e.DERPrintableString, y = e.DERTeletexString, d = e.DERIA5String, m = e.DERUTCTime, g = e.DERGeneralizedTime, w = e.DERSequence, A = e.DERSet, T = e.DERTaggedObject, O = e.ASN1Util.newObject, x = Object.keys(n);
1507
+ if (x.length != 1)
1509
1508
  throw "key of param shall be only one.";
1510
- var b = V[0];
1509
+ var b = x[0];
1511
1510
  if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + b + ":") == -1)
1512
1511
  throw "undefined key: " + b;
1513
1512
  if (b == "bool")
@@ -1531,41 +1530,41 @@ p.asn1.ASN1Util = new function() {
1531
1530
  if (b == "prnstr")
1532
1531
  return new _(n[b]);
1533
1532
  if (b == "telstr")
1534
- return new m(n[b]);
1533
+ return new y(n[b]);
1535
1534
  if (b == "ia5str")
1536
1535
  return new d(n[b]);
1537
1536
  if (b == "utctime")
1538
- return new y(n[b]);
1537
+ return new m(n[b]);
1539
1538
  if (b == "gentime")
1540
1539
  return new g(n[b]);
1541
1540
  if (b == "seq") {
1542
- for (var x = n[b], X = [], M = 0; M < x.length; M++) {
1543
- var st = O(x[M]);
1541
+ for (var D = n[b], X = [], M = 0; M < D.length; M++) {
1542
+ var st = O(D[M]);
1544
1543
  X.push(st);
1545
1544
  }
1546
1545
  return new w({ array: X });
1547
1546
  }
1548
1547
  if (b == "set") {
1549
- for (var x = n[b], X = [], M = 0; M < x.length; M++) {
1550
- var st = O(x[M]);
1548
+ for (var D = n[b], X = [], M = 0; M < D.length; M++) {
1549
+ var st = O(D[M]);
1551
1550
  X.push(st);
1552
1551
  }
1553
- return new C({ array: X });
1552
+ return new A({ array: X });
1554
1553
  }
1555
1554
  if (b == "tag") {
1556
- var I = n[b];
1557
- if (Object.prototype.toString.call(I) === "[object Array]" && I.length == 3) {
1558
- var tt = O(I[2]);
1555
+ var V = n[b];
1556
+ if (Object.prototype.toString.call(V) === "[object Array]" && V.length == 3) {
1557
+ var at = O(V[2]);
1559
1558
  return new T({
1560
- tag: I[0],
1561
- explicit: I[1],
1562
- obj: tt
1559
+ tag: V[0],
1560
+ explicit: V[1],
1561
+ obj: at
1563
1562
  });
1564
1563
  } else {
1565
- var k = {};
1566
- if (I.explicit !== void 0 && (k.explicit = I.explicit), I.tag !== void 0 && (k.tag = I.tag), I.obj === void 0)
1564
+ var q = {};
1565
+ if (V.explicit !== void 0 && (q.explicit = V.explicit), V.tag !== void 0 && (q.tag = V.tag), V.obj === void 0)
1567
1566
  throw "obj shall be specified for 'tag'.";
1568
- return k.obj = O(I.obj), new T(k);
1567
+ return q.obj = O(V.obj), new T(q);
1569
1568
  }
1570
1569
  }
1571
1570
  }, this.jsonToASN1HEX = function(n) {
@@ -1590,12 +1589,12 @@ p.asn1.ASN1Util.oidIntToHex = function(n) {
1590
1589
  }, e = function(o) {
1591
1590
  var c = "", h = new P(o, 10), u = h.toString(2), f = 7 - u.length % 7;
1592
1591
  f == 7 && (f = 0);
1593
- for (var _ = "", m = 0; m < f; m++)
1592
+ for (var _ = "", y = 0; y < f; y++)
1594
1593
  _ += "0";
1595
1594
  u = _ + u;
1596
- for (var m = 0; m < u.length - 1; m += 7) {
1597
- var d = u.substring(m, m + 7);
1598
- m != u.length - 7 && (d = "1" + d), c += t(parseInt(d, 2));
1595
+ for (var y = 0; y < u.length - 1; y += 7) {
1596
+ var d = u.substring(y, y + 7);
1597
+ y != u.length - 7 && (d = "1" + d), c += t(parseInt(d, 2));
1599
1598
  }
1600
1599
  return c;
1601
1600
  };
@@ -1652,9 +1651,9 @@ p.asn1.DERAbstractTime = function(n) {
1652
1651
  e == "utc" && (a = a.substring(2, 4));
1653
1652
  var o = r(String(s.getMonth() + 1), 2), c = r(String(s.getDate()), 2), h = r(String(s.getHours()), 2), u = r(String(s.getMinutes()), 2), f = r(String(s.getSeconds()), 2), _ = a + o + c + h + u + f;
1654
1653
  if (i === !0) {
1655
- var m = s.getMilliseconds();
1656
- if (m != 0) {
1657
- var d = r(String(m), 3);
1654
+ var y = s.getMilliseconds();
1655
+ if (y != 0) {
1656
+ var d = r(String(y), 3);
1658
1657
  d = d.replace(/[0]+$/, ""), _ = _ + "." + d;
1659
1658
  }
1660
1659
  }
@@ -1877,7 +1876,7 @@ var Zi = /* @__PURE__ */ (function() {
1877
1876
  }
1878
1877
  t.prototype = e === null ? Object.create(e) : (i.prototype = e.prototype, new i());
1879
1878
  };
1880
- })(), Se = (
1879
+ })(), Te = (
1881
1880
  /** @class */
1882
1881
  (function(n) {
1883
1882
  Zi(t, n);
@@ -1887,27 +1886,27 @@ var Zi = /* @__PURE__ */ (function() {
1887
1886
  }
1888
1887
  return t.prototype.parseKey = function(e) {
1889
1888
  try {
1890
- var i = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? wi.decode(e) : $t.unarmor(e), o = Ci.decode(a);
1889
+ var i = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? wi.decode(e) : Jt.unarmor(e), o = Ai.decode(a);
1891
1890
  if (o.sub.length === 3 && (o = o.sub[2].sub[0]), o.sub.length === 9) {
1892
- i = o.sub[1].getHexStringValue(), this.n = A(i, 16), r = o.sub[2].getHexStringValue(), this.e = parseInt(r, 16);
1891
+ i = o.sub[1].getHexStringValue(), this.n = C(i, 16), r = o.sub[2].getHexStringValue(), this.e = parseInt(r, 16);
1893
1892
  var c = o.sub[3].getHexStringValue();
1894
- this.d = A(c, 16);
1893
+ this.d = C(c, 16);
1895
1894
  var h = o.sub[4].getHexStringValue();
1896
- this.p = A(h, 16);
1895
+ this.p = C(h, 16);
1897
1896
  var u = o.sub[5].getHexStringValue();
1898
- this.q = A(u, 16);
1897
+ this.q = C(u, 16);
1899
1898
  var f = o.sub[6].getHexStringValue();
1900
- this.dmp1 = A(f, 16);
1899
+ this.dmp1 = C(f, 16);
1901
1900
  var _ = o.sub[7].getHexStringValue();
1902
- this.dmq1 = A(_, 16);
1903
- var m = o.sub[8].getHexStringValue();
1904
- this.coeff = A(m, 16);
1901
+ this.dmq1 = C(_, 16);
1902
+ var y = o.sub[8].getHexStringValue();
1903
+ this.coeff = C(y, 16);
1905
1904
  } else if (o.sub.length === 2)
1906
1905
  if (o.sub[0].sub) {
1907
- var d = o.sub[1], y = d.sub[0];
1908
- i = y.sub[0].getHexStringValue(), this.n = A(i, 16), r = y.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
1906
+ var d = o.sub[1], m = d.sub[0];
1907
+ i = m.sub[0].getHexStringValue(), this.n = C(i, 16), r = m.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
1909
1908
  } else
1910
- i = o.sub[0].getHexStringValue(), this.n = A(i, 16), r = o.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
1909
+ i = o.sub[0].getHexStringValue(), this.n = C(i, 16), r = o.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
1911
1910
  else
1912
1911
  return !1;
1913
1912
  return !0;
@@ -1930,7 +1929,7 @@ var Zi = /* @__PURE__ */ (function() {
1930
1929
  }, i = new p.asn1.DERSequence(e);
1931
1930
  return i.getEncodedHex();
1932
1931
  }, t.prototype.getPrivateBaseKeyB64 = function() {
1933
- return mt(this.getPrivateBaseKey());
1932
+ return yt(this.getPrivateBaseKey());
1934
1933
  }, t.prototype.getPublicBaseKey = function() {
1935
1934
  var e = new p.asn1.DERSequence({
1936
1935
  array: [
@@ -1950,7 +1949,7 @@ var Zi = /* @__PURE__ */ (function() {
1950
1949
  });
1951
1950
  return s.getEncodedHex();
1952
1951
  }, t.prototype.getPublicBaseKeyB64 = function() {
1953
- return mt(this.getPublicBaseKey());
1952
+ return yt(this.getPublicBaseKey());
1954
1953
  }, t.wordwrap = function(e, i) {
1955
1954
  if (i = i || 64, !e)
1956
1955
  return e;
@@ -1976,33 +1975,33 @@ var Zi = /* @__PURE__ */ (function() {
1976
1975
  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);
1977
1976
  }, t;
1978
1977
  })(Gi)
1979
- ), Wt, Yi = typeof process < "u" ? (Wt = process.env) === null || Wt === void 0 ? void 0 : Wt.npm_package_version : void 0, tn = (
1978
+ ), Xt, Yi = typeof process < "u" ? (Xt = process.env) === null || Xt === void 0 ? void 0 : Xt.npm_package_version : void 0, tn = (
1980
1979
  /** @class */
1981
1980
  (function() {
1982
1981
  function n(t) {
1983
1982
  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;
1984
1983
  }
1985
1984
  return n.prototype.setKey = function(t) {
1986
- t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Se(t)) : !this.key && this.log && console.error("A key was not set.");
1985
+ t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Te(t)) : !this.key && this.log && console.error("A key was not set.");
1987
1986
  }, n.prototype.setPrivateKey = function(t) {
1988
1987
  this.setKey(t);
1989
1988
  }, n.prototype.setPublicKey = function(t) {
1990
1989
  this.setKey(t);
1991
1990
  }, n.prototype.decrypt = function(t) {
1992
1991
  try {
1993
- return this.getKey().decrypt(_e(t));
1992
+ return this.getKey().decrypt(ge(t));
1994
1993
  } catch {
1995
1994
  return !1;
1996
1995
  }
1997
1996
  }, n.prototype.encrypt = function(t) {
1998
1997
  try {
1999
- return mt(this.getKey().encrypt(t));
1998
+ return yt(this.getKey().encrypt(t));
2000
1999
  } catch {
2001
2000
  return !1;
2002
2001
  }
2003
2002
  }, n.prototype.encryptOAEP = function(t) {
2004
2003
  try {
2005
- return mt(this.getKey().encrypt(t, zi));
2004
+ return yt(this.getKey().encrypt(t, zi));
2006
2005
  } catch {
2007
2006
  return !1;
2008
2007
  }
@@ -2011,30 +2010,30 @@ var Zi = /* @__PURE__ */ (function() {
2011
2010
  return r;
2012
2011
  }), i === void 0 && (i = "");
2013
2012
  try {
2014
- return mt(this.getKey().sign(t, e, i));
2013
+ return yt(this.getKey().sign(t, e, i));
2015
2014
  } catch {
2016
2015
  return !1;
2017
2016
  }
2018
2017
  }, n.prototype.signSha256 = function(t) {
2019
2018
  return this.sign(t, function(e) {
2020
- return Ee(Jt(e));
2019
+ return we(Qt(e));
2021
2020
  }, "sha256");
2022
2021
  }, n.prototype.verify = function(t, e, i) {
2023
2022
  i === void 0 && (i = function(r) {
2024
2023
  return r;
2025
2024
  });
2026
2025
  try {
2027
- return this.getKey().verify(t, _e(e), i);
2026
+ return this.getKey().verify(t, ge(e), i);
2028
2027
  } catch {
2029
2028
  return !1;
2030
2029
  }
2031
2030
  }, n.prototype.verifySha256 = function(t, e) {
2032
2031
  return this.verify(t, e, function(i) {
2033
- return Ee(Jt(i));
2032
+ return we(Qt(i));
2034
2033
  });
2035
2034
  }, n.prototype.getKey = function(t) {
2036
2035
  if (!this.key) {
2037
- if (this.key = new Se(), t && {}.toString.call(t) === "[object Function]") {
2036
+ if (this.key = new Te(), t && {}.toString.call(t) === "[object Function]") {
2038
2037
  this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
2039
2038
  return;
2040
2039
  }
@@ -2052,50 +2051,50 @@ var Zi = /* @__PURE__ */ (function() {
2052
2051
  }, n.version = Yi, n;
2053
2052
  })()
2054
2053
  );
2055
- function We(n, t) {
2054
+ function Xe(n, t) {
2056
2055
  return function() {
2057
2056
  return n.apply(t, arguments);
2058
2057
  };
2059
2058
  }
2060
- const { toString: en } = Object.prototype, { getPrototypeOf: ne } = Object, { iterator: Lt, toStringTag: Xe } = Symbol, Mt = /* @__PURE__ */ ((n) => (t) => {
2059
+ const { toString: en } = Object.prototype, { getPrototypeOf: re } = Object, { iterator: Mt, toStringTag: ze } = Symbol, kt = /* @__PURE__ */ ((n) => (t) => {
2061
2060
  const e = en.call(t);
2062
2061
  return n[e] || (n[e] = e.slice(8, -1).toLowerCase());
2063
- })(/* @__PURE__ */ Object.create(null)), q = (n) => (n = n.toLowerCase(), (t) => Mt(t) === n), kt = (n) => (t) => typeof t === n, { isArray: pt } = Array, lt = kt("undefined");
2064
- function yt(n) {
2065
- return n !== null && !lt(n) && n.constructor !== null && !lt(n.constructor) && U(n.constructor.isBuffer) && n.constructor.isBuffer(n);
2062
+ })(/* @__PURE__ */ Object.create(null)), j = (n) => (n = n.toLowerCase(), (t) => kt(t) === n), Ft = (n) => (t) => typeof t === n, { isArray: dt } = Array, ft = Ft("undefined");
2063
+ function bt(n) {
2064
+ return n !== null && !ft(n) && n.constructor !== null && !ft(n.constructor) && U(n.constructor.isBuffer) && n.constructor.isBuffer(n);
2066
2065
  }
2067
- const ze = q("ArrayBuffer");
2066
+ const Ge = j("ArrayBuffer");
2068
2067
  function nn(n) {
2069
2068
  let t;
2070
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(n) : t = n && n.buffer && ze(n.buffer), t;
2069
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(n) : t = n && n.buffer && Ge(n.buffer), t;
2071
2070
  }
2072
- const rn = kt("string"), U = kt("function"), Ge = kt("number"), bt = (n) => n !== null && typeof n == "object", sn = (n) => n === !0 || n === !1, Dt = (n) => {
2073
- if (Mt(n) !== "object")
2071
+ const rn = Ft("string"), U = Ft("function"), $e = Ft("number"), Pt = (n) => n !== null && typeof n == "object", sn = (n) => n === !0 || n === !1, Bt = (n) => {
2072
+ if (kt(n) !== "object")
2074
2073
  return !1;
2075
- const t = ne(n);
2076
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Xe in n) && !(Lt in n);
2074
+ const t = re(n);
2075
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ze in n) && !(Mt in n);
2077
2076
  }, an = (n) => {
2078
- if (!bt(n) || yt(n))
2077
+ if (!Pt(n) || bt(n))
2079
2078
  return !1;
2080
2079
  try {
2081
2080
  return Object.keys(n).length === 0 && Object.getPrototypeOf(n) === Object.prototype;
2082
2081
  } catch {
2083
2082
  return !1;
2084
2083
  }
2085
- }, on = q("Date"), cn = q("File"), un = q("Blob"), hn = q("FileList"), ln = (n) => bt(n) && U(n.pipe), fn = (n) => {
2084
+ }, on = j("Date"), cn = j("File"), un = j("Blob"), hn = j("FileList"), ln = (n) => Pt(n) && U(n.pipe), fn = (n) => {
2086
2085
  let t;
2087
- return n && (typeof FormData == "function" && n instanceof FormData || U(n.append) && ((t = Mt(n)) === "formdata" || // detect form-data instance
2086
+ return n && (typeof FormData == "function" && n instanceof FormData || U(n.append) && ((t = kt(n)) === "formdata" || // detect form-data instance
2088
2087
  t === "object" && U(n.toString) && n.toString() === "[object FormData]"));
2089
- }, pn = q("URLSearchParams"), [dn, _n, gn, mn] = ["ReadableStream", "Request", "Response", "Headers"].map(q), yn = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
2090
- function Pt(n, t, { allOwnKeys: e = !1 } = {}) {
2088
+ }, pn = j("URLSearchParams"), [dn, _n, gn, mn] = ["ReadableStream", "Request", "Response", "Headers"].map(j), yn = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
2089
+ function vt(n, t, { allOwnKeys: e = !1 } = {}) {
2091
2090
  if (n === null || typeof n > "u")
2092
2091
  return;
2093
2092
  let i, r;
2094
- if (typeof n != "object" && (n = [n]), pt(n))
2093
+ if (typeof n != "object" && (n = [n]), dt(n))
2095
2094
  for (i = 0, r = n.length; i < r; i++)
2096
2095
  t.call(null, n[i], i, n);
2097
2096
  else {
2098
- if (yt(n))
2097
+ if (bt(n))
2099
2098
  return;
2100
2099
  const s = e ? Object.getOwnPropertyNames(n) : Object.keys(n), a = s.length;
2101
2100
  let o;
@@ -2103,8 +2102,8 @@ function Pt(n, t, { allOwnKeys: e = !1 } = {}) {
2103
2102
  o = s[i], t.call(null, n[o], o, n);
2104
2103
  }
2105
2104
  }
2106
- function $e(n, t) {
2107
- if (yt(n))
2105
+ function Je(n, t) {
2106
+ if (bt(n))
2108
2107
  return null;
2109
2108
  t = t.toLowerCase();
2110
2109
  const e = Object.keys(n);
@@ -2114,18 +2113,18 @@ function $e(n, t) {
2114
2113
  return r;
2115
2114
  return null;
2116
2115
  }
2117
- const it = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Je = (n) => !lt(n) && n !== it;
2118
- function Qt() {
2119
- const { caseless: n, skipUndefined: t } = Je(this) && this || {}, e = {}, i = (r, s) => {
2120
- const a = n && $e(e, s) || s;
2121
- Dt(e[a]) && Dt(r) ? e[a] = Qt(e[a], r) : Dt(r) ? e[a] = Qt({}, r) : pt(r) ? e[a] = r.slice() : (!t || !lt(r)) && (e[a] = r);
2116
+ const it = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Qe = (n) => !ft(n) && n !== it;
2117
+ function Zt() {
2118
+ const { caseless: n, skipUndefined: t } = Qe(this) && this || {}, e = {}, i = (r, s) => {
2119
+ const a = n && Je(e, s) || s;
2120
+ Bt(e[a]) && Bt(r) ? e[a] = Zt(e[a], r) : Bt(r) ? e[a] = Zt({}, r) : dt(r) ? e[a] = r.slice() : (!t || !ft(r)) && (e[a] = r);
2122
2121
  };
2123
2122
  for (let r = 0, s = arguments.length; r < s; r++)
2124
- arguments[r] && Pt(arguments[r], i);
2123
+ arguments[r] && vt(arguments[r], i);
2125
2124
  return e;
2126
2125
  }
2127
- const bn = (n, t, e, { allOwnKeys: i } = {}) => (Pt(t, (r, s) => {
2128
- e && U(r) ? n[s] = We(r, e) : n[s] = r;
2126
+ const bn = (n, t, e, { allOwnKeys: i } = {}) => (vt(t, (r, s) => {
2127
+ e && U(r) ? n[s] = Xe(r, e) : n[s] = r;
2129
2128
  }, { allOwnKeys: i }), n), Pn = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), vn = (n, t, e, i) => {
2130
2129
  n.prototype = Object.create(t.prototype, i), n.prototype.constructor = n, Object.defineProperty(n, "super", {
2131
2130
  value: t.prototype
@@ -2137,7 +2136,7 @@ const bn = (n, t, e, { allOwnKeys: i } = {}) => (Pt(t, (r, s) => {
2137
2136
  do {
2138
2137
  for (r = Object.getOwnPropertyNames(n), s = r.length; s-- > 0; )
2139
2138
  a = r[s], (!i || i(a, n, t)) && !o[a] && (t[a] = n[a], o[a] = !0);
2140
- n = e !== !1 && ne(n);
2139
+ n = e !== !1 && re(n);
2141
2140
  } while (n && (!e || e(n, t)) && n !== Object.prototype);
2142
2141
  return t;
2143
2142
  }, wn = (n, t, e) => {
@@ -2146,39 +2145,39 @@ const bn = (n, t, e, { allOwnKeys: i } = {}) => (Pt(t, (r, s) => {
2146
2145
  return i !== -1 && i === e;
2147
2146
  }, Sn = (n) => {
2148
2147
  if (!n) return null;
2149
- if (pt(n)) return n;
2148
+ if (dt(n)) return n;
2150
2149
  let t = n.length;
2151
- if (!Ge(t)) return null;
2150
+ if (!$e(t)) return null;
2152
2151
  const e = new Array(t);
2153
2152
  for (; t-- > 0; )
2154
2153
  e[t] = n[t];
2155
2154
  return e;
2156
- }, Tn = /* @__PURE__ */ ((n) => (t) => n && t instanceof n)(typeof Uint8Array < "u" && ne(Uint8Array)), Cn = (n, t) => {
2157
- const i = (n && n[Lt]).call(n);
2155
+ }, Tn = /* @__PURE__ */ ((n) => (t) => n && t instanceof n)(typeof Uint8Array < "u" && re(Uint8Array)), An = (n, t) => {
2156
+ const i = (n && n[Mt]).call(n);
2158
2157
  let r;
2159
2158
  for (; (r = i.next()) && !r.done; ) {
2160
2159
  const s = r.value;
2161
2160
  t.call(n, s[0], s[1]);
2162
2161
  }
2163
- }, An = (n, t) => {
2162
+ }, Cn = (n, t) => {
2164
2163
  let e;
2165
2164
  const i = [];
2166
2165
  for (; (e = n.exec(t)) !== null; )
2167
2166
  i.push(e);
2168
2167
  return i;
2169
- }, Rn = q("HTMLFormElement"), On = (n) => n.toLowerCase().replace(
2168
+ }, Rn = j("HTMLFormElement"), On = (n) => n.toLowerCase().replace(
2170
2169
  /[-_\s]([a-z\d])(\w*)/g,
2171
2170
  function(e, i, r) {
2172
2171
  return i.toUpperCase() + r;
2173
2172
  }
2174
- ), Te = (({ hasOwnProperty: n }) => (t, e) => n.call(t, e))(Object.prototype), xn = q("RegExp"), Qe = (n, t) => {
2173
+ ), Ae = (({ hasOwnProperty: n }) => (t, e) => n.call(t, e))(Object.prototype), Dn = j("RegExp"), Ze = (n, t) => {
2175
2174
  const e = Object.getOwnPropertyDescriptors(n), i = {};
2176
- Pt(e, (r, s) => {
2175
+ vt(e, (r, s) => {
2177
2176
  let a;
2178
2177
  (a = t(r, s, n)) !== !1 && (i[s] = a || r);
2179
2178
  }), Object.defineProperties(n, i);
2180
- }, Dn = (n) => {
2181
- Qe(n, (t, e) => {
2179
+ }, In = (n) => {
2180
+ Ze(n, (t, e) => {
2182
2181
  if (U(n) && ["arguments", "caller", "callee"].indexOf(e) !== -1)
2183
2182
  return !1;
2184
2183
  const i = n[e];
@@ -2192,101 +2191,101 @@ const bn = (n, t, e, { allOwnKeys: i } = {}) => (Pt(t, (r, s) => {
2192
2191
  });
2193
2192
  }
2194
2193
  });
2195
- }, In = (n, t) => {
2194
+ }, Bn = (n, t) => {
2196
2195
  const e = {}, i = (r) => {
2197
2196
  r.forEach((s) => {
2198
2197
  e[s] = !0;
2199
2198
  });
2200
2199
  };
2201
- return pt(n) ? i(n) : i(String(n).split(t)), e;
2202
- }, Bn = () => {
2203
- }, Nn = (n, t) => n != null && Number.isFinite(n = +n) ? n : t;
2200
+ return dt(n) ? i(n) : i(String(n).split(t)), e;
2201
+ }, Nn = () => {
2202
+ }, xn = (n, t) => n != null && Number.isFinite(n = +n) ? n : t;
2204
2203
  function Vn(n) {
2205
- return !!(n && U(n.append) && n[Xe] === "FormData" && n[Lt]);
2204
+ return !!(n && U(n.append) && n[ze] === "FormData" && n[Mt]);
2206
2205
  }
2207
2206
  const Un = (n) => {
2208
2207
  const t = new Array(10), e = (i, r) => {
2209
- if (bt(i)) {
2208
+ if (Pt(i)) {
2210
2209
  if (t.indexOf(i) >= 0)
2211
2210
  return;
2212
- if (yt(i))
2211
+ if (bt(i))
2213
2212
  return i;
2214
2213
  if (!("toJSON" in i)) {
2215
2214
  t[r] = i;
2216
- const s = pt(i) ? [] : {};
2217
- return Pt(i, (a, o) => {
2215
+ const s = dt(i) ? [] : {};
2216
+ return vt(i, (a, o) => {
2218
2217
  const c = e(a, r + 1);
2219
- !lt(c) && (s[o] = c);
2218
+ !ft(c) && (s[o] = c);
2220
2219
  }), t[r] = void 0, s;
2221
2220
  }
2222
2221
  }
2223
2222
  return i;
2224
2223
  };
2225
2224
  return e(n, 0);
2226
- }, Ln = q("AsyncFunction"), Mn = (n) => n && (bt(n) || U(n)) && U(n.then) && U(n.catch), Ze = ((n, t) => n ? setImmediate : t ? ((e, i) => (it.addEventListener("message", ({ source: r, data: s }) => {
2225
+ }, Ln = j("AsyncFunction"), Mn = (n) => n && (Pt(n) || U(n)) && U(n.then) && U(n.catch), Ye = ((n, t) => n ? setImmediate : t ? ((e, i) => (it.addEventListener("message", ({ source: r, data: s }) => {
2227
2226
  r === it && s === e && i.length && i.shift()();
2228
2227
  }, !1), (r) => {
2229
2228
  i.push(r), it.postMessage(e, "*");
2230
2229
  }))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(
2231
2230
  typeof setImmediate == "function",
2232
2231
  U(it.postMessage)
2233
- ), kn = typeof queueMicrotask < "u" ? queueMicrotask.bind(it) : typeof process < "u" && process.nextTick || Ze, Fn = (n) => n != null && U(n[Lt]), l = {
2234
- isArray: pt,
2235
- isArrayBuffer: ze,
2236
- isBuffer: yt,
2232
+ ), kn = typeof queueMicrotask < "u" ? queueMicrotask.bind(it) : typeof process < "u" && process.nextTick || Ye, Fn = (n) => n != null && U(n[Mt]), l = {
2233
+ isArray: dt,
2234
+ isArrayBuffer: Ge,
2235
+ isBuffer: bt,
2237
2236
  isFormData: fn,
2238
2237
  isArrayBufferView: nn,
2239
2238
  isString: rn,
2240
- isNumber: Ge,
2239
+ isNumber: $e,
2241
2240
  isBoolean: sn,
2242
- isObject: bt,
2243
- isPlainObject: Dt,
2241
+ isObject: Pt,
2242
+ isPlainObject: Bt,
2244
2243
  isEmptyObject: an,
2245
2244
  isReadableStream: dn,
2246
2245
  isRequest: _n,
2247
2246
  isResponse: gn,
2248
2247
  isHeaders: mn,
2249
- isUndefined: lt,
2248
+ isUndefined: ft,
2250
2249
  isDate: on,
2251
2250
  isFile: cn,
2252
2251
  isBlob: un,
2253
- isRegExp: xn,
2252
+ isRegExp: Dn,
2254
2253
  isFunction: U,
2255
2254
  isStream: ln,
2256
2255
  isURLSearchParams: pn,
2257
2256
  isTypedArray: Tn,
2258
2257
  isFileList: hn,
2259
- forEach: Pt,
2260
- merge: Qt,
2258
+ forEach: vt,
2259
+ merge: Zt,
2261
2260
  extend: bn,
2262
2261
  trim: yn,
2263
2262
  stripBOM: Pn,
2264
2263
  inherits: vn,
2265
2264
  toFlatObject: En,
2266
- kindOf: Mt,
2267
- kindOfTest: q,
2265
+ kindOf: kt,
2266
+ kindOfTest: j,
2268
2267
  endsWith: wn,
2269
2268
  toArray: Sn,
2270
- forEachEntry: Cn,
2271
- matchAll: An,
2269
+ forEachEntry: An,
2270
+ matchAll: Cn,
2272
2271
  isHTMLForm: Rn,
2273
- hasOwnProperty: Te,
2274
- hasOwnProp: Te,
2272
+ hasOwnProperty: Ae,
2273
+ hasOwnProp: Ae,
2275
2274
  // an alias to avoid ESLint no-prototype-builtins detection
2276
- reduceDescriptors: Qe,
2277
- freezeMethods: Dn,
2278
- toObjectSet: In,
2275
+ reduceDescriptors: Ze,
2276
+ freezeMethods: In,
2277
+ toObjectSet: Bn,
2279
2278
  toCamelCase: On,
2280
- noop: Bn,
2281
- toFiniteNumber: Nn,
2282
- findKey: $e,
2279
+ noop: Nn,
2280
+ toFiniteNumber: xn,
2281
+ findKey: Je,
2283
2282
  global: it,
2284
- isContextDefined: Je,
2283
+ isContextDefined: Qe,
2285
2284
  isSpecCompliantForm: Vn,
2286
2285
  toJSONObject: Un,
2287
2286
  isAsyncFn: Ln,
2288
2287
  isThenable: Mn,
2289
- setImmediate: Ze,
2288
+ setImmediate: Ye,
2290
2289
  asap: kn,
2291
2290
  isIterable: Fn
2292
2291
  };
@@ -2314,7 +2313,7 @@ l.inherits(v, Error, {
2314
2313
  };
2315
2314
  }
2316
2315
  });
2317
- const Ye = v.prototype, ti = {};
2316
+ const ti = v.prototype, ei = {};
2318
2317
  [
2319
2318
  "ERR_BAD_OPTION_VALUE",
2320
2319
  "ERR_BAD_OPTION",
@@ -2330,12 +2329,12 @@ const Ye = v.prototype, ti = {};
2330
2329
  "ERR_INVALID_URL"
2331
2330
  // eslint-disable-next-line func-names
2332
2331
  ].forEach((n) => {
2333
- ti[n] = { value: n };
2332
+ ei[n] = { value: n };
2334
2333
  });
2335
- Object.defineProperties(v, ti);
2336
- Object.defineProperty(Ye, "isAxiosError", { value: !0 });
2334
+ Object.defineProperties(v, ei);
2335
+ Object.defineProperty(ti, "isAxiosError", { value: !0 });
2337
2336
  v.from = (n, t, e, i, r, s) => {
2338
- const a = Object.create(Ye);
2337
+ const a = Object.create(ti);
2339
2338
  l.toFlatObject(n, a, function(u) {
2340
2339
  return u !== Error.prototype;
2341
2340
  }, (h) => h !== "isAxiosError");
@@ -2343,32 +2342,32 @@ v.from = (n, t, e, i, r, s) => {
2343
2342
  return v.call(a, o, c, e, i, r), n && a.cause == null && Object.defineProperty(a, "cause", { value: n, configurable: !0 }), a.name = n && n.name || "Error", s && Object.assign(a, s), a;
2344
2343
  };
2345
2344
  const jn = null;
2346
- function Zt(n) {
2345
+ function Yt(n) {
2347
2346
  return l.isPlainObject(n) || l.isArray(n);
2348
2347
  }
2349
- function ei(n) {
2348
+ function ii(n) {
2350
2349
  return l.endsWith(n, "[]") ? n.slice(0, -2) : n;
2351
2350
  }
2352
2351
  function Ce(n, t, e) {
2353
2352
  return n ? n.concat(t).map(function(r, s) {
2354
- return r = ei(r), !e && s ? "[" + r + "]" : r;
2353
+ return r = ii(r), !e && s ? "[" + r + "]" : r;
2355
2354
  }).join(e ? "." : "") : t;
2356
2355
  }
2357
2356
  function qn(n) {
2358
- return l.isArray(n) && !n.some(Zt);
2357
+ return l.isArray(n) && !n.some(Yt);
2359
2358
  }
2360
2359
  const Kn = l.toFlatObject(l, {}, null, function(t) {
2361
2360
  return /^is[A-Z]/.test(t);
2362
2361
  });
2363
- function Ft(n, t, e) {
2362
+ function jt(n, t, e) {
2364
2363
  if (!l.isObject(n))
2365
2364
  throw new TypeError("target must be an object");
2366
2365
  t = t || new FormData(), e = l.toFlatObject(e, {
2367
2366
  metaTokens: !0,
2368
2367
  dots: !1,
2369
2368
  indexes: !1
2370
- }, !1, function(y, g) {
2371
- return !l.isUndefined(g[y]);
2369
+ }, !1, function(m, g) {
2370
+ return !l.isUndefined(g[m]);
2372
2371
  });
2373
2372
  const i = e.metaTokens, r = e.visitor || u, s = e.dots, a = e.indexes, c = (e.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(t);
2374
2373
  if (!l.isFunction(r))
@@ -2383,47 +2382,47 @@ function Ft(n, t, e) {
2383
2382
  throw new v("Blob is not supported. Use a Buffer instead.");
2384
2383
  return l.isArrayBuffer(d) || l.isTypedArray(d) ? c && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
2385
2384
  }
2386
- function u(d, y, g) {
2385
+ function u(d, m, g) {
2387
2386
  let w = d;
2388
2387
  if (d && !g && typeof d == "object") {
2389
- if (l.endsWith(y, "{}"))
2390
- y = i ? y : y.slice(0, -2), d = JSON.stringify(d);
2391
- else if (l.isArray(d) && qn(d) || (l.isFileList(d) || l.endsWith(y, "[]")) && (w = l.toArray(d)))
2392
- return y = ei(y), w.forEach(function(T, O) {
2388
+ if (l.endsWith(m, "{}"))
2389
+ m = i ? m : m.slice(0, -2), d = JSON.stringify(d);
2390
+ else if (l.isArray(d) && qn(d) || (l.isFileList(d) || l.endsWith(m, "[]")) && (w = l.toArray(d)))
2391
+ return m = ii(m), w.forEach(function(T, O) {
2393
2392
  !(l.isUndefined(T) || T === null) && t.append(
2394
2393
  // eslint-disable-next-line no-nested-ternary
2395
- a === !0 ? Ce([y], O, s) : a === null ? y : y + "[]",
2394
+ a === !0 ? Ce([m], O, s) : a === null ? m : m + "[]",
2396
2395
  h(T)
2397
2396
  );
2398
2397
  }), !1;
2399
2398
  }
2400
- return Zt(d) ? !0 : (t.append(Ce(g, y, s), h(d)), !1);
2399
+ return Yt(d) ? !0 : (t.append(Ce(g, m, s), h(d)), !1);
2401
2400
  }
2402
2401
  const f = [], _ = Object.assign(Kn, {
2403
2402
  defaultVisitor: u,
2404
2403
  convertValue: h,
2405
- isVisitable: Zt
2404
+ isVisitable: Yt
2406
2405
  });
2407
- function m(d, y) {
2406
+ function y(d, m) {
2408
2407
  if (!l.isUndefined(d)) {
2409
2408
  if (f.indexOf(d) !== -1)
2410
- throw Error("Circular reference detected in " + y.join("."));
2411
- f.push(d), l.forEach(d, function(w, C) {
2409
+ throw Error("Circular reference detected in " + m.join("."));
2410
+ f.push(d), l.forEach(d, function(w, A) {
2412
2411
  (!(l.isUndefined(w) || w === null) && r.call(
2413
2412
  t,
2414
2413
  w,
2415
- l.isString(C) ? C.trim() : C,
2416
- y,
2414
+ l.isString(A) ? A.trim() : A,
2415
+ m,
2417
2416
  _
2418
- )) === !0 && m(w, y ? y.concat(C) : [C]);
2417
+ )) === !0 && y(w, m ? m.concat(A) : [A]);
2419
2418
  }), f.pop();
2420
2419
  }
2421
2420
  }
2422
2421
  if (!l.isObject(n))
2423
2422
  throw new TypeError("data must be an object");
2424
- return m(n), t;
2423
+ return y(n), t;
2425
2424
  }
2426
- function Ae(n) {
2425
+ function Re(n) {
2427
2426
  const t = {
2428
2427
  "!": "%21",
2429
2428
  "'": "%27",
@@ -2437,17 +2436,17 @@ function Ae(n) {
2437
2436
  return t[i];
2438
2437
  });
2439
2438
  }
2440
- function re(n, t) {
2441
- this._pairs = [], n && Ft(n, this, t);
2439
+ function se(n, t) {
2440
+ this._pairs = [], n && jt(n, this, t);
2442
2441
  }
2443
- const ii = re.prototype;
2444
- ii.append = function(t, e) {
2442
+ const ni = se.prototype;
2443
+ ni.append = function(t, e) {
2445
2444
  this._pairs.push([t, e]);
2446
2445
  };
2447
- ii.toString = function(t) {
2446
+ ni.toString = function(t) {
2448
2447
  const e = t ? function(i) {
2449
- return t.call(this, i, Ae);
2450
- } : Ae;
2448
+ return t.call(this, i, Re);
2449
+ } : Re;
2451
2450
  return this._pairs.map(function(r) {
2452
2451
  return e(r[0]) + "=" + e(r[1]);
2453
2452
  }, "").join("&");
@@ -2455,7 +2454,7 @@ ii.toString = function(t) {
2455
2454
  function Hn(n) {
2456
2455
  return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
2457
2456
  }
2458
- function ni(n, t, e) {
2457
+ function ri(n, t, e) {
2459
2458
  if (!t)
2460
2459
  return n;
2461
2460
  const i = e && e.encode || Hn;
@@ -2464,13 +2463,13 @@ function ni(n, t, e) {
2464
2463
  });
2465
2464
  const r = e && e.serialize;
2466
2465
  let s;
2467
- if (r ? s = r(t, e) : s = l.isURLSearchParams(t) ? t.toString() : new re(t, e).toString(i), s) {
2466
+ if (r ? s = r(t, e) : s = l.isURLSearchParams(t) ? t.toString() : new se(t, e).toString(i), s) {
2468
2467
  const a = n.indexOf("#");
2469
2468
  a !== -1 && (n = n.slice(0, a)), n += (n.indexOf("?") === -1 ? "?" : "&") + s;
2470
2469
  }
2471
2470
  return n;
2472
2471
  }
2473
- class Re {
2472
+ class Oe {
2474
2473
  constructor() {
2475
2474
  this.handlers = [];
2476
2475
  }
@@ -2524,11 +2523,11 @@ class Re {
2524
2523
  });
2525
2524
  }
2526
2525
  }
2527
- const ri = {
2526
+ const si = {
2528
2527
  silentJSONParsing: !0,
2529
2528
  forcedJSONParsing: !0,
2530
2529
  clarifyTimeoutError: !1
2531
- }, Wn = typeof URLSearchParams < "u" ? URLSearchParams : re, Xn = typeof FormData < "u" ? FormData : null, zn = typeof Blob < "u" ? Blob : null, Gn = {
2530
+ }, Wn = typeof URLSearchParams < "u" ? URLSearchParams : se, Xn = typeof FormData < "u" ? FormData : null, zn = typeof Blob < "u" ? Blob : null, Gn = {
2532
2531
  isBrowser: !0,
2533
2532
  classes: {
2534
2533
  URLSearchParams: Wn,
@@ -2536,20 +2535,20 @@ const ri = {
2536
2535
  Blob: zn
2537
2536
  },
2538
2537
  protocols: ["http", "https", "file", "blob", "url", "data"]
2539
- }, se = typeof window < "u" && typeof document < "u", Yt = typeof navigator == "object" && navigator || void 0, $n = se && (!Yt || ["ReactNative", "NativeScript", "NS"].indexOf(Yt.product) < 0), Jn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
2540
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Qn = se && window.location.href || "http://localhost", Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2538
+ }, ae = typeof window < "u" && typeof document < "u", te = typeof navigator == "object" && navigator || void 0, $n = ae && (!te || ["ReactNative", "NativeScript", "NS"].indexOf(te.product) < 0), Jn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
2539
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Qn = ae && window.location.href || "http://localhost", Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2541
2540
  __proto__: null,
2542
- hasBrowserEnv: se,
2541
+ hasBrowserEnv: ae,
2543
2542
  hasStandardBrowserEnv: $n,
2544
2543
  hasStandardBrowserWebWorkerEnv: Jn,
2545
- navigator: Yt,
2544
+ navigator: te,
2546
2545
  origin: Qn
2547
2546
  }, Symbol.toStringTag, { value: "Module" })), B = {
2548
2547
  ...Zn,
2549
2548
  ...Gn
2550
2549
  };
2551
2550
  function Yn(n, t) {
2552
- return Ft(n, new B.classes.URLSearchParams(), {
2551
+ return jt(n, new B.classes.URLSearchParams(), {
2553
2552
  visitor: function(e, i, r, s) {
2554
2553
  return B.isNode && l.isBuffer(e) ? (this.append(i, e.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
2555
2554
  },
@@ -2568,7 +2567,7 @@ function er(n) {
2568
2567
  s = e[i], t[s] = n[s];
2569
2568
  return t;
2570
2569
  }
2571
- function si(n) {
2570
+ function ai(n) {
2572
2571
  function t(e, i, r, s) {
2573
2572
  let a = e[s++];
2574
2573
  if (a === "__proto__") return !0;
@@ -2593,13 +2592,13 @@ function ir(n, t, e) {
2593
2592
  }
2594
2593
  return (e || JSON.stringify)(n);
2595
2594
  }
2596
- const vt = {
2597
- transitional: ri,
2595
+ const Et = {
2596
+ transitional: si,
2598
2597
  adapter: ["xhr", "http", "fetch"],
2599
2598
  transformRequest: [function(t, e) {
2600
2599
  const i = e.getContentType() || "", r = i.indexOf("application/json") > -1, s = l.isObject(t);
2601
2600
  if (s && l.isHTMLForm(t) && (t = new FormData(t)), l.isFormData(t))
2602
- return r ? JSON.stringify(si(t)) : t;
2601
+ return r ? JSON.stringify(ai(t)) : t;
2603
2602
  if (l.isArrayBuffer(t) || l.isBuffer(t) || l.isStream(t) || l.isFile(t) || l.isBlob(t) || l.isReadableStream(t))
2604
2603
  return t;
2605
2604
  if (l.isArrayBufferView(t))
@@ -2612,7 +2611,7 @@ const vt = {
2612
2611
  return Yn(t, this.formSerializer).toString();
2613
2612
  if ((o = l.isFileList(t)) || i.indexOf("multipart/form-data") > -1) {
2614
2613
  const c = this.env && this.env.FormData;
2615
- return Ft(
2614
+ return jt(
2616
2615
  o ? { "files[]": t } : t,
2617
2616
  c && new c(),
2618
2617
  this.formSerializer
@@ -2622,7 +2621,7 @@ const vt = {
2622
2621
  return s || r ? (e.setContentType("application/json", !1), ir(t)) : t;
2623
2622
  }],
2624
2623
  transformResponse: [function(t) {
2625
- const e = this.transitional || vt.transitional, i = e && e.forcedJSONParsing, r = this.responseType === "json";
2624
+ const e = this.transitional || Et.transitional, i = e && e.forcedJSONParsing, r = this.responseType === "json";
2626
2625
  if (l.isResponse(t) || l.isReadableStream(t))
2627
2626
  return t;
2628
2627
  if (t && l.isString(t) && (i && !this.responseType || r)) {
@@ -2660,7 +2659,7 @@ const vt = {
2660
2659
  }
2661
2660
  };
2662
2661
  l.forEach(["delete", "get", "head", "post", "put", "patch"], (n) => {
2663
- vt.headers[n] = {};
2662
+ Et.headers[n] = {};
2664
2663
  });
2665
2664
  const nr = l.toObjectSet([
2666
2665
  "age",
@@ -2687,12 +2686,12 @@ const nr = l.toObjectSet([
2687
2686
  `).forEach(function(a) {
2688
2687
  r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), i = a.substring(r + 1).trim(), !(!e || t[e] && nr[e]) && (e === "set-cookie" ? t[e] ? t[e].push(i) : t[e] = [i] : t[e] = t[e] ? t[e] + ", " + i : i);
2689
2688
  }), t;
2690
- }, Oe = Symbol("internals");
2691
- function _t(n) {
2689
+ }, De = Symbol("internals");
2690
+ function gt(n) {
2692
2691
  return n && String(n).trim().toLowerCase();
2693
2692
  }
2694
- function It(n) {
2695
- return n === !1 || n == null ? n : l.isArray(n) ? n.map(It) : String(n);
2693
+ function Nt(n) {
2694
+ return n === !1 || n == null ? n : l.isArray(n) ? n.map(Nt) : String(n);
2696
2695
  }
2697
2696
  function sr(n) {
2698
2697
  const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -2702,7 +2701,7 @@ function sr(n) {
2702
2701
  return t;
2703
2702
  }
2704
2703
  const ar = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
2705
- function Xt(n, t, e, i, r) {
2704
+ function zt(n, t, e, i, r) {
2706
2705
  if (l.isFunction(i))
2707
2706
  return i.call(this, t, e);
2708
2707
  if (r && (t = e), !!l.isString(t)) {
@@ -2733,11 +2732,11 @@ let L = class {
2733
2732
  set(t, e, i) {
2734
2733
  const r = this;
2735
2734
  function s(o, c, h) {
2736
- const u = _t(c);
2735
+ const u = gt(c);
2737
2736
  if (!u)
2738
2737
  throw new Error("header name must be a non-empty string");
2739
2738
  const f = l.findKey(r, u);
2740
- (!f || r[f] === void 0 || h === !0 || h === void 0 && r[f] !== !1) && (r[f || c] = It(o));
2739
+ (!f || r[f] === void 0 || h === !0 || h === void 0 && r[f] !== !1) && (r[f || c] = Nt(o));
2741
2740
  }
2742
2741
  const a = (o, c) => l.forEach(o, (h, u) => s(h, u, c));
2743
2742
  if (l.isPlainObject(t) || t instanceof this.constructor)
@@ -2757,7 +2756,7 @@ let L = class {
2757
2756
  return this;
2758
2757
  }
2759
2758
  get(t, e) {
2760
- if (t = _t(t), t) {
2759
+ if (t = gt(t), t) {
2761
2760
  const i = l.findKey(this, t);
2762
2761
  if (i) {
2763
2762
  const r = this[i];
@@ -2774,9 +2773,9 @@ let L = class {
2774
2773
  }
2775
2774
  }
2776
2775
  has(t, e) {
2777
- if (t = _t(t), t) {
2776
+ if (t = gt(t), t) {
2778
2777
  const i = l.findKey(this, t);
2779
- return !!(i && this[i] !== void 0 && (!e || Xt(this, this[i], i, e)));
2778
+ return !!(i && this[i] !== void 0 && (!e || zt(this, this[i], i, e)));
2780
2779
  }
2781
2780
  return !1;
2782
2781
  }
@@ -2784,9 +2783,9 @@ let L = class {
2784
2783
  const i = this;
2785
2784
  let r = !1;
2786
2785
  function s(a) {
2787
- if (a = _t(a), a) {
2786
+ if (a = gt(a), a) {
2788
2787
  const o = l.findKey(i, a);
2789
- o && (!e || Xt(i, i[o], o, e)) && (delete i[o], r = !0);
2788
+ o && (!e || zt(i, i[o], o, e)) && (delete i[o], r = !0);
2790
2789
  }
2791
2790
  }
2792
2791
  return l.isArray(t) ? t.forEach(s) : s(t), r;
@@ -2796,7 +2795,7 @@ let L = class {
2796
2795
  let i = e.length, r = !1;
2797
2796
  for (; i--; ) {
2798
2797
  const s = e[i];
2799
- (!t || Xt(this, this[s], s, t, !0)) && (delete this[s], r = !0);
2798
+ (!t || zt(this, this[s], s, t, !0)) && (delete this[s], r = !0);
2800
2799
  }
2801
2800
  return r;
2802
2801
  }
@@ -2805,11 +2804,11 @@ let L = class {
2805
2804
  return l.forEach(this, (r, s) => {
2806
2805
  const a = l.findKey(i, s);
2807
2806
  if (a) {
2808
- e[a] = It(r), delete e[s];
2807
+ e[a] = Nt(r), delete e[s];
2809
2808
  return;
2810
2809
  }
2811
2810
  const o = t ? or(s) : String(s).trim();
2812
- o !== s && delete e[s], e[o] = It(r), i[o] = !0;
2811
+ o !== s && delete e[s], e[o] = Nt(r), i[o] = !0;
2813
2812
  }), this;
2814
2813
  }
2815
2814
  concat(...t) {
@@ -2842,11 +2841,11 @@ let L = class {
2842
2841
  return e.forEach((r) => i.set(r)), i;
2843
2842
  }
2844
2843
  static accessor(t) {
2845
- const i = (this[Oe] = this[Oe] = {
2844
+ const i = (this[De] = this[De] = {
2846
2845
  accessors: {}
2847
2846
  }).accessors, r = this.prototype;
2848
2847
  function s(a) {
2849
- const o = _t(a);
2848
+ const o = gt(a);
2850
2849
  i[o] || (cr(r, a), i[o] = !0);
2851
2850
  }
2852
2851
  return l.isArray(t) ? t.forEach(s) : s(t), this;
@@ -2863,23 +2862,23 @@ l.reduceDescriptors(L.prototype, ({ value: n }, t) => {
2863
2862
  };
2864
2863
  });
2865
2864
  l.freezeMethods(L);
2866
- function zt(n, t) {
2867
- const e = this || vt, i = t || e, r = L.from(i.headers);
2865
+ function Gt(n, t) {
2866
+ const e = this || Et, i = t || e, r = L.from(i.headers);
2868
2867
  let s = i.data;
2869
2868
  return l.forEach(n, function(o) {
2870
2869
  s = o.call(e, s, r.normalize(), t ? t.status : void 0);
2871
2870
  }), r.normalize(), s;
2872
2871
  }
2873
- function ai(n) {
2872
+ function oi(n) {
2874
2873
  return !!(n && n.__CANCEL__);
2875
2874
  }
2876
- function dt(n, t, e) {
2875
+ function _t(n, t, e) {
2877
2876
  v.call(this, n ?? "canceled", v.ERR_CANCELED, t, e), this.name = "CanceledError";
2878
2877
  }
2879
- l.inherits(dt, v, {
2878
+ l.inherits(_t, v, {
2880
2879
  __CANCEL__: !0
2881
2880
  });
2882
- function oi(n, t, e) {
2881
+ function ci(n, t, e) {
2883
2882
  const i = e.config.validateStatus;
2884
2883
  !e.status || !i || i(e.status) ? n(e) : t(new v(
2885
2884
  "Request failed with status code " + e.status,
@@ -2905,8 +2904,8 @@ function hr(n, t) {
2905
2904
  _ += e[f++], f = f % n;
2906
2905
  if (r = (r + 1) % n, r === s && (s = (s + 1) % n), h - a < t)
2907
2906
  return;
2908
- const m = u && h - u;
2909
- return m ? Math.round(_ * 1e3 / m) : void 0;
2907
+ const y = u && h - u;
2908
+ return y ? Math.round(_ * 1e3 / y) : void 0;
2910
2909
  };
2911
2910
  }
2912
2911
  function lr(n, t) {
@@ -2921,7 +2920,7 @@ function lr(n, t) {
2921
2920
  }, i - f)));
2922
2921
  }, () => r && a(r)];
2923
2922
  }
2924
- const Vt = (n, t, e = 3) => {
2923
+ const Ut = (n, t, e = 3) => {
2925
2924
  let i = 0;
2926
2925
  const r = hr(50, 250);
2927
2926
  return lr((s) => {
@@ -2940,14 +2939,14 @@ const Vt = (n, t, e = 3) => {
2940
2939
  };
2941
2940
  n(f);
2942
2941
  }, e);
2943
- }, xe = (n, t) => {
2942
+ }, Ie = (n, t) => {
2944
2943
  const e = n != null;
2945
2944
  return [(i) => t[0]({
2946
2945
  lengthComputable: e,
2947
2946
  total: n,
2948
2947
  loaded: i
2949
2948
  }), t[1]];
2950
- }, De = (n) => (...t) => l.asap(() => n(...t)), fr = B.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, t) => (e) => (e = new URL(e, B.origin), n.protocol === e.protocol && n.host === e.host && (t || n.port === e.port)))(
2949
+ }, Be = (n) => (...t) => l.asap(() => n(...t)), fr = B.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, t) => (e) => (e = new URL(e, B.origin), n.protocol === e.protocol && n.host === e.host && (t || n.port === e.port)))(
2951
2950
  new URL(B.origin),
2952
2951
  B.navigator && /(msie|trident)/i.test(B.navigator.userAgent)
2953
2952
  ) : () => !0, pr = B.hasStandardBrowserEnv ? (
@@ -2983,11 +2982,11 @@ function dr(n) {
2983
2982
  function _r(n, t) {
2984
2983
  return t ? n.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : n;
2985
2984
  }
2986
- function ci(n, t, e) {
2985
+ function ui(n, t, e) {
2987
2986
  let i = !dr(t);
2988
2987
  return n && (i || e == !1) ? _r(n, t) : t;
2989
2988
  }
2990
- const Ie = (n) => n instanceof L ? { ...n } : n;
2989
+ const Ne = (n) => n instanceof L ? { ...n } : n;
2991
2990
  function rt(n, t) {
2992
2991
  t = t || {};
2993
2992
  const e = {};
@@ -3045,17 +3044,17 @@ function rt(n, t) {
3045
3044
  socketPath: a,
3046
3045
  responseEncoding: a,
3047
3046
  validateStatus: o,
3048
- headers: (h, u, f) => r(Ie(h), Ie(u), f, !0)
3047
+ headers: (h, u, f) => r(Ne(h), Ne(u), f, !0)
3049
3048
  };
3050
3049
  return l.forEach(Object.keys({ ...n, ...t }), function(u) {
3051
3050
  const f = c[u] || r, _ = f(n[u], t[u], u);
3052
3051
  l.isUndefined(_) && f !== o || (e[u] = _);
3053
3052
  }), e;
3054
3053
  }
3055
- const ui = (n) => {
3054
+ const hi = (n) => {
3056
3055
  const t = rt({}, n);
3057
3056
  let { data: e, withXSRFToken: i, xsrfHeaderName: r, xsrfCookieName: s, headers: a, auth: o } = t;
3058
- if (t.headers = a = L.from(a), t.url = ni(ci(t.baseURL, t.url, t.allowAbsoluteUrls), n.params, n.paramsSerializer), o && a.set(
3057
+ if (t.headers = a = L.from(a), t.url = ri(ui(t.baseURL, t.url, t.allowAbsoluteUrls), n.params, n.paramsSerializer), o && a.set(
3059
3058
  "Authorization",
3060
3059
  "Basic " + btoa((o.username || "") + ":" + (o.password ? unescape(encodeURIComponent(o.password)) : ""))
3061
3060
  ), l.isFormData(e)) {
@@ -3075,12 +3074,12 @@ const ui = (n) => {
3075
3074
  return t;
3076
3075
  }, gr = typeof XMLHttpRequest < "u", mr = gr && function(n) {
3077
3076
  return new Promise(function(e, i) {
3078
- const r = ui(n);
3077
+ const r = hi(n);
3079
3078
  let s = r.data;
3080
3079
  const a = L.from(r.headers).normalize();
3081
- let { responseType: o, onUploadProgress: c, onDownloadProgress: h } = r, u, f, _, m, d;
3082
- function y() {
3083
- m && m(), d && d(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u);
3080
+ let { responseType: o, onUploadProgress: c, onDownloadProgress: h } = r, u, f, _, y, d;
3081
+ function m() {
3082
+ y && y(), d && d(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u);
3084
3083
  }
3085
3084
  let g = new XMLHttpRequest();
3086
3085
  g.open(r.method.toUpperCase(), r.url, !0), g.timeout = r.timeout;
@@ -3089,7 +3088,7 @@ const ui = (n) => {
3089
3088
  return;
3090
3089
  const T = L.from(
3091
3090
  "getAllResponseHeaders" in g && g.getAllResponseHeaders()
3092
- ), V = {
3091
+ ), x = {
3093
3092
  data: !o || o === "text" || o === "json" ? g.responseText : g.response,
3094
3093
  status: g.status,
3095
3094
  statusText: g.statusText,
@@ -3097,36 +3096,36 @@ const ui = (n) => {
3097
3096
  config: n,
3098
3097
  request: g
3099
3098
  };
3100
- oi(function(x) {
3101
- e(x), y();
3102
- }, function(x) {
3103
- i(x), y();
3104
- }, V), g = null;
3099
+ ci(function(D) {
3100
+ e(D), m();
3101
+ }, function(D) {
3102
+ i(D), m();
3103
+ }, x), g = null;
3105
3104
  }
3106
3105
  "onloadend" in g ? g.onloadend = w : g.onreadystatechange = function() {
3107
3106
  !g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(w);
3108
3107
  }, g.onabort = function() {
3109
3108
  g && (i(new v("Request aborted", v.ECONNABORTED, n, g)), g = null);
3110
3109
  }, g.onerror = function(O) {
3111
- const V = O && O.message ? O.message : "Network Error", b = new v(V, v.ERR_NETWORK, n, g);
3110
+ const x = O && O.message ? O.message : "Network Error", b = new v(x, v.ERR_NETWORK, n, g);
3112
3111
  b.event = O || null, i(b), g = null;
3113
3112
  }, g.ontimeout = function() {
3114
3113
  let O = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
3115
- const V = r.transitional || ri;
3114
+ const x = r.transitional || si;
3116
3115
  r.timeoutErrorMessage && (O = r.timeoutErrorMessage), i(new v(
3117
3116
  O,
3118
- V.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
3117
+ x.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
3119
3118
  n,
3120
3119
  g
3121
3120
  )), g = null;
3122
- }, s === void 0 && a.setContentType(null), "setRequestHeader" in g && l.forEach(a.toJSON(), function(O, V) {
3123
- g.setRequestHeader(V, O);
3124
- }), l.isUndefined(r.withCredentials) || (g.withCredentials = !!r.withCredentials), o && o !== "json" && (g.responseType = r.responseType), h && ([_, d] = Vt(h, !0), g.addEventListener("progress", _)), c && g.upload && ([f, m] = Vt(c), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", m)), (r.cancelToken || r.signal) && (u = (T) => {
3125
- g && (i(!T || T.type ? new dt(null, n, g) : T), g.abort(), g = null);
3121
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in g && l.forEach(a.toJSON(), function(O, x) {
3122
+ g.setRequestHeader(x, O);
3123
+ }), l.isUndefined(r.withCredentials) || (g.withCredentials = !!r.withCredentials), o && o !== "json" && (g.responseType = r.responseType), h && ([_, d] = Ut(h, !0), g.addEventListener("progress", _)), c && g.upload && ([f, y] = Ut(c), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", y)), (r.cancelToken || r.signal) && (u = (T) => {
3124
+ g && (i(!T || T.type ? new _t(null, n, g) : T), g.abort(), g = null);
3126
3125
  }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u)));
3127
- const C = ur(r.url);
3128
- if (C && B.protocols.indexOf(C) === -1) {
3129
- i(new v("Unsupported protocol " + C + ":", v.ERR_BAD_REQUEST, n));
3126
+ const A = ur(r.url);
3127
+ if (A && B.protocols.indexOf(A) === -1) {
3128
+ i(new v("Unsupported protocol " + A + ":", v.ERR_BAD_REQUEST, n));
3130
3129
  return;
3131
3130
  }
3132
3131
  g.send(s || null);
@@ -3139,7 +3138,7 @@ const ui = (n) => {
3139
3138
  if (!r) {
3140
3139
  r = !0, o();
3141
3140
  const u = h instanceof Error ? h : this.reason;
3142
- i.abort(u instanceof v ? u : new dt(u instanceof Error ? u.message : u));
3141
+ i.abort(u instanceof v ? u : new _t(u instanceof Error ? u.message : u));
3143
3142
  }
3144
3143
  };
3145
3144
  let a = t && setTimeout(() => {
@@ -3182,7 +3181,7 @@ const ui = (n) => {
3182
3181
  } finally {
3183
3182
  await t.cancel();
3184
3183
  }
3185
- }, Be = (n, t, e, i) => {
3184
+ }, xe = (n, t, e, i) => {
3186
3185
  const r = Pr(n, t);
3187
3186
  let s = 0, a, o = (c) => {
3188
3187
  a || (a = !0, i && i(c));
@@ -3211,41 +3210,43 @@ const ui = (n) => {
3211
3210
  }, {
3212
3211
  highWaterMark: 2
3213
3212
  });
3214
- }, Ne = 64 * 1024, { isFunction: Ot } = l, hi = (({ fetch: n, Request: t, Response: e }) => ({
3215
- fetch: n,
3216
- Request: t,
3217
- Response: e
3213
+ }, Ve = 64 * 1024, { isFunction: Dt } = l, Er = (({ Request: n, Response: t }) => ({
3214
+ Request: n,
3215
+ Response: t
3218
3216
  }))(l.global), {
3219
- ReadableStream: Ve,
3220
- TextEncoder: Ue
3221
- } = l.global, Le = (n, ...t) => {
3217
+ ReadableStream: Ue,
3218
+ TextEncoder: Le
3219
+ } = l.global, Me = (n, ...t) => {
3222
3220
  try {
3223
3221
  return !!n(...t);
3224
3222
  } catch {
3225
3223
  return !1;
3226
3224
  }
3227
- }, Er = (n) => {
3228
- const { fetch: t, Request: e, Response: i } = Object.assign({}, hi, n), r = Ot(t), s = Ot(e), a = Ot(i);
3225
+ }, wr = (n) => {
3226
+ n = l.merge.call({
3227
+ skipUndefined: !0
3228
+ }, Er, n);
3229
+ const { fetch: t, Request: e, Response: i } = n, r = t ? Dt(t) : typeof fetch == "function", s = Dt(e), a = Dt(i);
3229
3230
  if (!r)
3230
3231
  return !1;
3231
- const o = r && Ot(Ve), c = r && (typeof Ue == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new Ue()) : async (d) => new Uint8Array(await new e(d).arrayBuffer())), h = s && o && Le(() => {
3232
+ const o = r && Dt(Ue), c = r && (typeof Le == "function" ? /* @__PURE__ */ ((d) => (m) => d.encode(m))(new Le()) : async (d) => new Uint8Array(await new e(d).arrayBuffer())), h = s && o && Me(() => {
3232
3233
  let d = !1;
3233
- const y = new e(B.origin, {
3234
- body: new Ve(),
3234
+ const m = new e(B.origin, {
3235
+ body: new Ue(),
3235
3236
  method: "POST",
3236
3237
  get duplex() {
3237
3238
  return d = !0, "half";
3238
3239
  }
3239
3240
  }).headers.has("Content-Type");
3240
- return d && !y;
3241
- }), u = a && o && Le(() => l.isReadableStream(new i("").body)), f = {
3241
+ return d && !m;
3242
+ }), u = a && o && Me(() => l.isReadableStream(new i("").body)), f = {
3242
3243
  stream: u && ((d) => d.body)
3243
3244
  };
3244
3245
  r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
3245
- !f[d] && (f[d] = (y, g) => {
3246
- let w = y && y[d];
3246
+ !f[d] && (f[d] = (m, g) => {
3247
+ let w = m && m[d];
3247
3248
  if (w)
3248
- return w.call(y);
3249
+ return w.call(m);
3249
3250
  throw new v(`Response type '${d}' is not supported`, v.ERR_NOT_SUPPORT, g);
3250
3251
  });
3251
3252
  });
@@ -3263,119 +3264,117 @@ const ui = (n) => {
3263
3264
  return d.byteLength;
3264
3265
  if (l.isURLSearchParams(d) && (d = d + ""), l.isString(d))
3265
3266
  return (await c(d)).byteLength;
3266
- }, m = async (d, y) => {
3267
+ }, y = async (d, m) => {
3267
3268
  const g = l.toFiniteNumber(d.getContentLength());
3268
- return g ?? _(y);
3269
+ return g ?? _(m);
3269
3270
  };
3270
3271
  return async (d) => {
3271
3272
  let {
3272
- url: y,
3273
+ url: m,
3273
3274
  method: g,
3274
3275
  data: w,
3275
- signal: C,
3276
+ signal: A,
3276
3277
  cancelToken: T,
3277
3278
  timeout: O,
3278
- onDownloadProgress: V,
3279
+ onDownloadProgress: x,
3279
3280
  onUploadProgress: b,
3280
- responseType: x,
3281
+ responseType: D,
3281
3282
  headers: X,
3282
3283
  withCredentials: M = "same-origin",
3283
3284
  fetchOptions: st
3284
- } = ui(d);
3285
- x = x ? (x + "").toLowerCase() : "text";
3286
- let I = yr([C, T && T.toAbortSignal()], O), tt = null;
3287
- const k = I && I.unsubscribe && (() => {
3288
- I.unsubscribe();
3285
+ } = hi(d), V = t || fetch;
3286
+ D = D ? (D + "").toLowerCase() : "text";
3287
+ let at = yr([A, T && T.toAbortSignal()], O), q = null;
3288
+ const tt = at && at.unsubscribe && (() => {
3289
+ at.unsubscribe();
3289
3290
  });
3290
- let ae;
3291
+ let oe;
3291
3292
  try {
3292
- if (b && h && g !== "get" && g !== "head" && (ae = await m(X, w)) !== 0) {
3293
- let J = new e(y, {
3293
+ if (b && h && g !== "get" && g !== "head" && (oe = await y(X, w)) !== 0) {
3294
+ let J = new e(m, {
3294
3295
  method: "POST",
3295
3296
  body: w,
3296
3297
  duplex: "half"
3297
- }), at;
3298
- if (l.isFormData(w) && (at = J.headers.get("content-type")) && X.setContentType(at), J.body) {
3299
- const [qt, Et] = xe(
3300
- ae,
3301
- Vt(De(b))
3298
+ }), ot;
3299
+ if (l.isFormData(w) && (ot = J.headers.get("content-type")) && X.setContentType(ot), J.body) {
3300
+ const [Kt, wt] = Ie(
3301
+ oe,
3302
+ Ut(Be(b))
3302
3303
  );
3303
- w = Be(J.body, Ne, qt, Et);
3304
+ w = xe(J.body, Ve, Kt, wt);
3304
3305
  }
3305
3306
  }
3306
3307
  l.isString(M) || (M = M ? "include" : "omit");
3307
- const K = s && "credentials" in e.prototype, oe = {
3308
+ const K = s && "credentials" in e.prototype, ce = {
3308
3309
  ...st,
3309
- signal: I,
3310
+ signal: at,
3310
3311
  method: g.toUpperCase(),
3311
3312
  headers: X.normalize().toJSON(),
3312
3313
  body: w,
3313
3314
  duplex: "half",
3314
3315
  credentials: K ? M : void 0
3315
3316
  };
3316
- tt = s && new e(y, oe);
3317
- let $ = await (s ? t(tt, st) : t(y, oe));
3318
- const ce = u && (x === "stream" || x === "response");
3319
- if (u && (V || ce && k)) {
3317
+ q = s && new e(m, ce);
3318
+ let $ = await (s ? V(q, st) : V(m, ce));
3319
+ const ue = u && (D === "stream" || D === "response");
3320
+ if (u && (x || ue && tt)) {
3320
3321
  const J = {};
3321
- ["status", "statusText", "headers"].forEach((ue) => {
3322
- J[ue] = $[ue];
3322
+ ["status", "statusText", "headers"].forEach((he) => {
3323
+ J[he] = $[he];
3323
3324
  });
3324
- const at = l.toFiniteNumber($.headers.get("content-length")), [qt, Et] = V && xe(
3325
- at,
3326
- Vt(De(V), !0)
3325
+ const ot = l.toFiniteNumber($.headers.get("content-length")), [Kt, wt] = x && Ie(
3326
+ ot,
3327
+ Ut(Be(x), !0)
3327
3328
  ) || [];
3328
3329
  $ = new i(
3329
- Be($.body, Ne, qt, () => {
3330
- Et && Et(), k && k();
3330
+ xe($.body, Ve, Kt, () => {
3331
+ wt && wt(), tt && tt();
3331
3332
  }),
3332
3333
  J
3333
3334
  );
3334
3335
  }
3335
- x = x || "text";
3336
- let gi = await f[l.findKey(f, x) || "text"]($, d);
3337
- return !ce && k && k(), await new Promise((J, at) => {
3338
- oi(J, at, {
3336
+ D = D || "text";
3337
+ let gi = await f[l.findKey(f, D) || "text"]($, d);
3338
+ return !ue && tt && tt(), await new Promise((J, ot) => {
3339
+ ci(J, ot, {
3339
3340
  data: gi,
3340
3341
  headers: L.from($.headers),
3341
3342
  status: $.status,
3342
3343
  statusText: $.statusText,
3343
3344
  config: d,
3344
- request: tt
3345
+ request: q
3345
3346
  });
3346
3347
  });
3347
3348
  } catch (K) {
3348
- throw k && k(), K && K.name === "TypeError" && /Load failed|fetch/i.test(K.message) ? Object.assign(
3349
- new v("Network Error", v.ERR_NETWORK, d, tt),
3349
+ throw tt && tt(), K && K.name === "TypeError" && /Load failed|fetch/i.test(K.message) ? Object.assign(
3350
+ new v("Network Error", v.ERR_NETWORK, d, q),
3350
3351
  {
3351
3352
  cause: K.cause || K
3352
3353
  }
3353
- ) : v.from(K, K && K.code, d, tt);
3354
+ ) : v.from(K, K && K.code, d, q);
3354
3355
  }
3355
3356
  };
3356
- }, wr = /* @__PURE__ */ new Map(), li = (n) => {
3357
- let t = l.merge.call({
3358
- skipUndefined: !0
3359
- }, hi, n ? n.env : null);
3357
+ }, Sr = /* @__PURE__ */ new Map(), li = (n) => {
3358
+ let t = n ? n.env : {};
3360
3359
  const { fetch: e, Request: i, Response: r } = t, s = [
3361
3360
  i,
3362
3361
  r,
3363
3362
  e
3364
3363
  ];
3365
- let a = s.length, o = a, c, h, u = wr;
3364
+ let a = s.length, o = a, c, h, u = Sr;
3366
3365
  for (; o--; )
3367
- c = s[o], h = u.get(c), h === void 0 && u.set(c, h = o ? /* @__PURE__ */ new Map() : Er(t)), u = h;
3366
+ c = s[o], h = u.get(c), h === void 0 && u.set(c, h = o ? /* @__PURE__ */ new Map() : wr(t)), u = h;
3368
3367
  return h;
3369
3368
  };
3370
3369
  li();
3371
- const te = {
3370
+ const ee = {
3372
3371
  http: jn,
3373
3372
  xhr: mr,
3374
3373
  fetch: {
3375
3374
  get: li
3376
3375
  }
3377
3376
  };
3378
- l.forEach(te, (n, t) => {
3377
+ l.forEach(ee, (n, t) => {
3379
3378
  if (n) {
3380
3379
  try {
3381
3380
  Object.defineProperty(n, "name", { value: t });
@@ -3384,7 +3383,7 @@ l.forEach(te, (n, t) => {
3384
3383
  Object.defineProperty(n, "adapterName", { value: t });
3385
3384
  }
3386
3385
  });
3387
- const Me = (n) => `- ${n}`, Sr = (n) => l.isFunction(n) || n === null || n === !1, fi = {
3386
+ const ke = (n) => `- ${n}`, Tr = (n) => l.isFunction(n) || n === null || n === !1, fi = {
3388
3387
  getAdapter: (n, t) => {
3389
3388
  n = l.isArray(n) ? n : [n];
3390
3389
  const { length: e } = n;
@@ -3393,7 +3392,7 @@ const Me = (n) => `- ${n}`, Sr = (n) => l.isFunction(n) || n === null || n === !
3393
3392
  for (let a = 0; a < e; a++) {
3394
3393
  i = n[a];
3395
3394
  let o;
3396
- if (r = i, !Sr(i) && (r = te[(o = String(i)).toLowerCase()], r === void 0))
3395
+ if (r = i, !Tr(i) && (r = ee[(o = String(i)).toLowerCase()], r === void 0))
3397
3396
  throw new v(`Unknown adapter '${o}'`);
3398
3397
  if (r && (l.isFunction(r) || (r = r.get(t))))
3399
3398
  break;
@@ -3404,8 +3403,8 @@ const Me = (n) => `- ${n}`, Sr = (n) => l.isFunction(n) || n === null || n === !
3404
3403
  ([c, h]) => `adapter ${c} ` + (h === !1 ? "is not supported by the environment" : "is not available in the build")
3405
3404
  );
3406
3405
  let o = e ? a.length > 1 ? `since :
3407
- ` + a.map(Me).join(`
3408
- `) : " " + Me(a[0]) : "as no adapter specified";
3406
+ ` + a.map(ke).join(`
3407
+ `) : " " + ke(a[0]) : "as no adapter specified";
3409
3408
  throw new v(
3410
3409
  "There is no suitable adapter to dispatch the request " + o,
3411
3410
  "ERR_NOT_SUPPORT"
@@ -3413,38 +3412,38 @@ const Me = (n) => `- ${n}`, Sr = (n) => l.isFunction(n) || n === null || n === !
3413
3412
  }
3414
3413
  return r;
3415
3414
  },
3416
- adapters: te
3415
+ adapters: ee
3417
3416
  };
3418
- function Gt(n) {
3417
+ function $t(n) {
3419
3418
  if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
3420
- throw new dt(null, n);
3419
+ throw new _t(null, n);
3421
3420
  }
3422
- function ke(n) {
3423
- return Gt(n), n.headers = L.from(n.headers), n.data = zt.call(
3421
+ function Fe(n) {
3422
+ return $t(n), n.headers = L.from(n.headers), n.data = Gt.call(
3424
3423
  n,
3425
3424
  n.transformRequest
3426
- ), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), fi.getAdapter(n.adapter || vt.adapter, n)(n).then(function(i) {
3427
- return Gt(n), i.data = zt.call(
3425
+ ), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), fi.getAdapter(n.adapter || Et.adapter, n)(n).then(function(i) {
3426
+ return $t(n), i.data = Gt.call(
3428
3427
  n,
3429
3428
  n.transformResponse,
3430
3429
  i
3431
3430
  ), i.headers = L.from(i.headers), i;
3432
3431
  }, function(i) {
3433
- return ai(i) || (Gt(n), i && i.response && (i.response.data = zt.call(
3432
+ return oi(i) || ($t(n), i && i.response && (i.response.data = Gt.call(
3434
3433
  n,
3435
3434
  n.transformResponse,
3436
3435
  i.response
3437
3436
  ), i.response.headers = L.from(i.response.headers))), Promise.reject(i);
3438
3437
  });
3439
3438
  }
3440
- const pi = "1.12.1", jt = {};
3439
+ const pi = "1.12.2", qt = {};
3441
3440
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((n, t) => {
3442
- jt[n] = function(i) {
3441
+ qt[n] = function(i) {
3443
3442
  return typeof i === n || "a" + (t < 1 ? "n " : " ") + n;
3444
3443
  };
3445
3444
  });
3446
- const Fe = {};
3447
- jt.transitional = function(t, e, i) {
3445
+ const je = {};
3446
+ qt.transitional = function(t, e, i) {
3448
3447
  function r(s, a) {
3449
3448
  return "[Axios v" + pi + "] Transitional option '" + s + "'" + a + (i ? ". " + i : "");
3450
3449
  }
@@ -3454,7 +3453,7 @@ jt.transitional = function(t, e, i) {
3454
3453
  r(a, " has been removed" + (e ? " in " + e : "")),
3455
3454
  v.ERR_DEPRECATED
3456
3455
  );
3457
- return e && !Fe[a] && (Fe[a] = !0, console.warn(
3456
+ return e && !je[a] && (je[a] = !0, console.warn(
3458
3457
  r(
3459
3458
  a,
3460
3459
  " has been deprecated since v" + e + " and will be removed in the near future"
@@ -3462,10 +3461,10 @@ jt.transitional = function(t, e, i) {
3462
3461
  )), t ? t(s, a, o) : !0;
3463
3462
  };
3464
3463
  };
3465
- jt.spelling = function(t) {
3464
+ qt.spelling = function(t) {
3466
3465
  return (e, i) => (console.warn(`${i} is likely a misspelling of ${t}`), !0);
3467
3466
  };
3468
- function Tr(n, t, e) {
3467
+ function Ar(n, t, e) {
3469
3468
  if (typeof n != "object")
3470
3469
  throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
3471
3470
  const i = Object.keys(n);
@@ -3482,15 +3481,15 @@ function Tr(n, t, e) {
3482
3481
  throw new v("Unknown option " + s, v.ERR_BAD_OPTION);
3483
3482
  }
3484
3483
  }
3485
- const Bt = {
3486
- assertOptions: Tr,
3487
- validators: jt
3488
- }, H = Bt.validators;
3484
+ const xt = {
3485
+ assertOptions: Ar,
3486
+ validators: qt
3487
+ }, H = xt.validators;
3489
3488
  let nt = class {
3490
3489
  constructor(t) {
3491
3490
  this.defaults = t || {}, this.interceptors = {
3492
- request: new Re(),
3493
- response: new Re()
3491
+ request: new Oe(),
3492
+ response: new Oe()
3494
3493
  };
3495
3494
  }
3496
3495
  /**
@@ -3521,16 +3520,16 @@ let nt = class {
3521
3520
  _request(t, e) {
3522
3521
  typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e = rt(this.defaults, e);
3523
3522
  const { transitional: i, paramsSerializer: r, headers: s } = e;
3524
- i !== void 0 && Bt.assertOptions(i, {
3523
+ i !== void 0 && xt.assertOptions(i, {
3525
3524
  silentJSONParsing: H.transitional(H.boolean),
3526
3525
  forcedJSONParsing: H.transitional(H.boolean),
3527
3526
  clarifyTimeoutError: H.transitional(H.boolean)
3528
3527
  }, !1), r != null && (l.isFunction(r) ? e.paramsSerializer = {
3529
3528
  serialize: r
3530
- } : Bt.assertOptions(r, {
3529
+ } : xt.assertOptions(r, {
3531
3530
  encode: H.function,
3532
3531
  serialize: H.function
3533
- }, !0)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), Bt.assertOptions(e, {
3532
+ }, !0)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), xt.assertOptions(e, {
3534
3533
  baseUrl: H.spelling("baseURL"),
3535
3534
  withXsrfToken: H.spelling("withXSRFToken")
3536
3535
  }, !0), e.method = (e.method || this.defaults.method || "get").toLowerCase();
@@ -3546,33 +3545,33 @@ let nt = class {
3546
3545
  ), e.headers = L.concat(a, s);
3547
3546
  const o = [];
3548
3547
  let c = !0;
3549
- this.interceptors.request.forEach(function(y) {
3550
- typeof y.runWhen == "function" && y.runWhen(e) === !1 || (c = c && y.synchronous, o.unshift(y.fulfilled, y.rejected));
3548
+ this.interceptors.request.forEach(function(m) {
3549
+ typeof m.runWhen == "function" && m.runWhen(e) === !1 || (c = c && m.synchronous, o.unshift(m.fulfilled, m.rejected));
3551
3550
  });
3552
3551
  const h = [];
3553
- this.interceptors.response.forEach(function(y) {
3554
- h.push(y.fulfilled, y.rejected);
3552
+ this.interceptors.response.forEach(function(m) {
3553
+ h.push(m.fulfilled, m.rejected);
3555
3554
  });
3556
3555
  let u, f = 0, _;
3557
3556
  if (!c) {
3558
- const d = [ke.bind(this), void 0];
3557
+ const d = [Fe.bind(this), void 0];
3559
3558
  for (d.unshift(...o), d.push(...h), _ = d.length, u = Promise.resolve(e); f < _; )
3560
3559
  u = u.then(d[f++], d[f++]);
3561
3560
  return u;
3562
3561
  }
3563
3562
  _ = o.length;
3564
- let m = e;
3565
- for (f = 0; f < _; ) {
3566
- const d = o[f++], y = o[f++];
3563
+ let y = e;
3564
+ for (; f < _; ) {
3565
+ const d = o[f++], m = o[f++];
3567
3566
  try {
3568
- m = d(m);
3567
+ y = d(y);
3569
3568
  } catch (g) {
3570
- y.call(this, g);
3569
+ m.call(this, g);
3571
3570
  break;
3572
3571
  }
3573
3572
  }
3574
3573
  try {
3575
- u = ke.call(this, m);
3574
+ u = Fe.call(this, y);
3576
3575
  } catch (d) {
3577
3576
  return Promise.reject(d);
3578
3577
  }
@@ -3582,8 +3581,8 @@ let nt = class {
3582
3581
  }
3583
3582
  getUri(t) {
3584
3583
  t = rt(this.defaults, t);
3585
- const e = ci(t.baseURL, t.url, t.allowAbsoluteUrls);
3586
- return ni(e, t.params, t.paramsSerializer);
3584
+ const e = ui(t.baseURL, t.url, t.allowAbsoluteUrls);
3585
+ return ri(e, t.params, t.paramsSerializer);
3587
3586
  }
3588
3587
  };
3589
3588
  l.forEach(["delete", "get", "head", "options"], function(t) {
@@ -3634,7 +3633,7 @@ let Cr = class di {
3634
3633
  i.unsubscribe(s);
3635
3634
  }, a;
3636
3635
  }, t(function(s, a, o) {
3637
- i.reason || (i.reason = new dt(s, a, o), e(i.reason));
3636
+ i.reason || (i.reason = new _t(s, a, o), e(i.reason));
3638
3637
  });
3639
3638
  }
3640
3639
  /**
@@ -3683,15 +3682,15 @@ let Cr = class di {
3683
3682
  };
3684
3683
  }
3685
3684
  };
3686
- function Ar(n) {
3685
+ function Rr(n) {
3687
3686
  return function(e) {
3688
3687
  return n.apply(null, e);
3689
3688
  };
3690
3689
  }
3691
- function Rr(n) {
3690
+ function Or(n) {
3692
3691
  return l.isObject(n) && n.isAxiosError === !0;
3693
3692
  }
3694
- const ee = {
3693
+ const ie = {
3695
3694
  Continue: 100,
3696
3695
  SwitchingProtocols: 101,
3697
3696
  Processing: 102,
@@ -3756,38 +3755,38 @@ const ee = {
3756
3755
  NotExtended: 510,
3757
3756
  NetworkAuthenticationRequired: 511
3758
3757
  };
3759
- Object.entries(ee).forEach(([n, t]) => {
3760
- ee[t] = n;
3758
+ Object.entries(ie).forEach(([n, t]) => {
3759
+ ie[t] = n;
3761
3760
  });
3762
3761
  function _i(n) {
3763
- const t = new nt(n), e = We(nt.prototype.request, t);
3762
+ const t = new nt(n), e = Xe(nt.prototype.request, t);
3764
3763
  return l.extend(e, nt.prototype, t, { allOwnKeys: !0 }), l.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(r) {
3765
3764
  return _i(rt(n, r));
3766
3765
  }, e;
3767
3766
  }
3768
- const S = _i(vt);
3767
+ const S = _i(Et);
3769
3768
  S.Axios = nt;
3770
- S.CanceledError = dt;
3769
+ S.CanceledError = _t;
3771
3770
  S.CancelToken = Cr;
3772
- S.isCancel = ai;
3771
+ S.isCancel = oi;
3773
3772
  S.VERSION = pi;
3774
- S.toFormData = Ft;
3773
+ S.toFormData = jt;
3775
3774
  S.AxiosError = v;
3776
3775
  S.Cancel = S.CanceledError;
3777
3776
  S.all = function(t) {
3778
3777
  return Promise.all(t);
3779
3778
  };
3780
- S.spread = Ar;
3781
- S.isAxiosError = Rr;
3779
+ S.spread = Rr;
3780
+ S.isAxiosError = Or;
3782
3781
  S.mergeConfig = rt;
3783
3782
  S.AxiosHeaders = L;
3784
- S.formToJSON = (n) => si(l.isHTMLForm(n) ? new FormData(n) : n);
3783
+ S.formToJSON = (n) => ai(l.isHTMLForm(n) ? new FormData(n) : n);
3785
3784
  S.getAdapter = fi.getAdapter;
3786
- S.HttpStatusCode = ee;
3785
+ S.HttpStatusCode = ie;
3787
3786
  S.default = S;
3788
3787
  const {
3789
- Axios: Br,
3790
- AxiosError: Nr,
3788
+ Axios: Nr,
3789
+ AxiosError: xr,
3791
3790
  CanceledError: Vr,
3792
3791
  isCancel: Ur,
3793
3792
  CancelToken: Lr,
@@ -3911,7 +3910,7 @@ class $r extends mi {
3911
3910
  }
3912
3911
  },
3913
3912
  operation: {
3914
- amount: 0,
3913
+ amount: "0",
3915
3914
  reference: null,
3916
3915
  folio: null,
3917
3916
  authorization: null,
@@ -3920,7 +3919,14 @@ class $r extends mi {
3920
3919
  commerceVoucher: "",
3921
3920
  clientVoucher: "",
3922
3921
  consultDate: null,
3923
- ignore: { counter: !1, counterSale: !1, isError92TRX: !1, C93Global: !1, error: "" },
3922
+ ignore: {
3923
+ responseGlobal: {},
3924
+ counter: !1,
3925
+ counterSale: !1,
3926
+ isError92TRX: !1,
3927
+ C93Global: !1,
3928
+ error: ""
3929
+ },
3924
3930
  finalResult: {},
3925
3931
  moto: {
3926
3932
  ccType: "",
@@ -3946,7 +3952,9 @@ class $r extends mi {
3946
3952
  statusAboutWaiting: null,
3947
3953
  statusInjectWaiting: null,
3948
3954
  statusReadCardWaiting: null,
3949
- statusSecondGenerateWaiting: null
3955
+ statusSecondGenerateWaiting: null,
3956
+ statusinitDUKPTWaiting: null,
3957
+ statuswritingDUKPTWaiting: null
3950
3958
  }
3951
3959
  };
3952
3960
  constructor({
@@ -3984,12 +3992,9 @@ class $r extends mi {
3984
3992
  }) {
3985
3993
  if (super({ filters: t, config_port: e, no_device: i, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !yi())
3986
3994
  throw new Error("Crypto not supported in this browser");
3987
- if (fe.getCustom(this.typeDevice, i))
3995
+ if (le.getCustom(this.typeDevice, i))
3988
3996
  throw new Error(`Device ${this.typeDevice} ${i} already exists`);
3989
- 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(), this.#C();
3990
- }
3991
- #C() {
3992
- fe.add(this);
3997
+ 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(), le.add(this);
3993
3998
  }
3994
3999
  #A() {
3995
4000
  const t = [
@@ -4008,7 +4013,7 @@ class $r extends mi {
4008
4013
  async timeout(t, e) {
4009
4014
  await super.timeout(t, e), this.__pinPad__.waiting.statusAboutWaiting && e === "about" ? this.__pinPad__.waiting.statusAboutWaiting = "rejected" : this.__pinPad__.waiting.statusInjectWaiting && e === "inject" ? this.__pinPad__.waiting.statusInjectWaiting = "rejected" : this.__pinPad__.waiting.statusinitDUKPTWaiting && e === "init-dukpt" ? this.__pinPad__.waiting.statusinitDUKPTWaiting = "rejected" : this.__pinPad__.waiting.statuswritingDUKPTWaiting && e === "dukpt" ? this.__pinPad__.waiting.statuswritingDUKPTWaiting = "rejected" : this.__pinPad__.waiting.statusReadCardWaiting && e === "read-card" ? this.__pinPad__.waiting.statusReadCardWaiting = "rejected" : this.__pinPad__.waiting.statusSecondGenerateWaiting && e === "second-generate" && (this.__pinPad__.waiting.statusSecondGenerateWaiting = "rejected");
4010
4015
  }
4011
- #R(t) {
4016
+ #C(t) {
4012
4017
  const e = this.__pinPad__.constants.STX, i = this.__pinPad__.constants.ETX, r = this.__pinPad__.constants.FS, s = this.__pinPad__.constants.getNULL;
4013
4018
  t = t.replace(new RegExp(e, "g"), "");
4014
4019
  const a = t.split(i);
@@ -4021,6 +4026,7 @@ class $r extends mi {
4021
4026
  return { [f]: _.replace(new RegExp(s, "g"), "") };
4022
4027
  }).forEach((h) => Object.assign(c, h)), c;
4023
4028
  }
4029
+ // @ts-expect-error parts is not used
4024
4030
  #f(t, e) {
4025
4031
  const i = this.__pinPad__.constants.ETX, r = e.substring(e.indexOf("D") + 2, e.indexOf("E"));
4026
4032
  let s = 0;
@@ -4029,14 +4035,8 @@ class $r extends mi {
4029
4035
  const h = r.replace("MITP_1.00.", "").replace("MITP_01.00.", "").replace("MITD_1.00.", "").replace("MITD_01.00.", "");
4030
4036
  s = parseInt(h), s >= 15 && (this.__pinPad__.about.hasCashback = !0);
4031
4037
  }
4032
- this.__pinPad__.about.supportInjection = a, e.indexOf("M") > 0 ? (this.__pinPad__.about.supportSign = e.substring(e.indexOf("L") + 2, e.indexOf("M")), this.__pinPad__.about.supportInjection ? this.__pinPad__.about.supportContactlessCollisionCard = e.substring(
4033
- e.indexOf("M") + 2,
4034
- e.indexOf("N")
4035
- ) : (this.__pinPad__.about.supportContactlessCollisionCard = e.substring(
4036
- e.indexOf("M") + 2,
4037
- e.indexOf(i)
4038
- ), this.__pinPad__.about.supportContactless = !0)) : (this.__pinPad__.about.supportSign = e.substring(e.indexOf("L") + 2, e.indexOf(i)), this.__pinPad__.about.supportContactless = !1), this.__pinPad__.about.supportDUKPT = e.substring(e.indexOf("J") + 2, e.indexOf("K")), this.__pinPad__.about.EMV = e.substring(e.indexOf("E") + 2, e.indexOf("F")), this.__pinPad__.about.serial = e.substring(e.indexOf("C") + 2, e.indexOf("D")), this.__pinPad__.about.printer = e.substring(e.indexOf("F") + 2, e.indexOf("G")), this.__pinPad__.about.model = e.substring(e.indexOf("B") + 2, e.indexOf("C")), this.__pinPad__.about.brand = o, this.__pinPad__.about.appVersion = r;
4039
- const c = e.substring(e.indexOf("K") + 2, e.indexOf("L"));
4038
+ this.__pinPad__.about.supportInjection = a, e.indexOf("M") > 0 ? (this.__pinPad__.about.supportSign = e.substring(e.indexOf("L") + 2, e.indexOf("M")) == "1", this.__pinPad__.about.supportInjection ? this.__pinPad__.about.supportContactlessCollisionCard = e.substring(e.indexOf("M") + 2, e.indexOf("N")) === "1" : (this.__pinPad__.about.supportContactlessCollisionCard = e.substring(e.indexOf("M") + 2, e.indexOf(i)) == "1", this.__pinPad__.about.supportContactless = !0)) : (this.__pinPad__.about.supportSign = e.substring(e.indexOf("L") + 2, e.indexOf(i)) == "1", this.__pinPad__.about.supportContactless = !1), this.__pinPad__.about.supportDUKPT = e.substring(e.indexOf("J") + 2, e.indexOf("K")), this.__pinPad__.about.EMV = e.substring(e.indexOf("E") + 2, e.indexOf("F")), this.__pinPad__.about.serial = e.substring(e.indexOf("C") + 2, e.indexOf("D")), this.__pinPad__.about.printer = e.substring(e.indexOf("F") + 2, e.indexOf("G")), this.__pinPad__.about.model = e.substring(e.indexOf("B") + 2, e.indexOf("C")), this.__pinPad__.about.brand = o, this.__pinPad__.about.appVersion = r;
4039
+ const c = e.substring(e.indexOf("K") + 2, e.indexOf("L")) == "1";
4040
4040
  this.__pinPad__.about.pp = {
4041
4041
  brand: o,
4042
4042
  appVersion: r,
@@ -4046,7 +4046,7 @@ class $r extends mi {
4046
4046
  supportSign: this.__pinPad__.about.supportSign,
4047
4047
  supportContactlessCollisionCard: this.__pinPad__.about.supportContactlessCollisionCard,
4048
4048
  supportContactless: this.__pinPad__.about.supportContactless,
4049
- supportDUKPT: this.__pinPad__.about.supportDUKPT,
4049
+ supportDUKPT: this.__pinPad__.about.supportDUKPT == "1",
4050
4050
  hasDUKPTKeys: c,
4051
4051
  EMV: this.__pinPad__.about.EMV,
4052
4052
  serial: this.__pinPad__.about.serial,
@@ -4054,11 +4054,11 @@ class $r extends mi {
4054
4054
  model: this.__pinPad__.about.model
4055
4055
  }, this.__pinPad__.waiting.statusAboutWaiting && (this.__pinPad__.waiting.statusAboutWaiting = "resolved");
4056
4056
  }
4057
- // eslint-disable-next-line no-unused-vars
4058
- #O(t, e) {
4057
+ #R() {
4059
4058
  this.__pinPad__.waiting.statusInjectWaiting = "resolved";
4060
4059
  }
4061
- #x(t, e) {
4060
+ // @ts-expect-error parts is not used
4061
+ #O(t, e) {
4062
4062
  e = e.replace("010P93A00B01t036P81AACERQUE, INSERTE CHIP O DESLICE*", ""), this.__pinPad__.config.terminal = {
4063
4063
  nb_kcv: e.substring(e.indexOf("E") + 2, e.indexOf("F")),
4064
4064
  nb_marca_terminal: e.substring(e.indexOf("P91A") + 4, e.indexOf("B")),
@@ -4068,12 +4068,12 @@ class $r extends mi {
4068
4068
  nb_version_terminal: e.substring(e.indexOf("D") + 2, e.indexOf("E"))
4069
4069
  }, this.__pinPad__.waiting.statusinitDUKPTWaiting = "resolved";
4070
4070
  }
4071
- // eslint-disable-next-line no-unused-vars
4072
- #D(t, e) {
4071
+ #D() {
4073
4072
  this.__pinPad__.waiting.statuswritingDUKPTWaiting = "resolved";
4074
4073
  }
4074
+ // @ts-expect-error parts is not used
4075
4075
  #I(t, e) {
4076
- const i = this.__pinPad__.about.brand.toLowerCase(), r = this.__pinPad__.about.model.toLowerCase(), s = i === "ingenico" && r === "ipp320" ? 500 : 350;
4076
+ const i = this.__pinPad__.about?.brand?.toLowerCase(), r = this.__pinPad__.about?.model?.toLowerCase(), s = i === "ingenico" && r === "ipp320" ? 500 : 350;
4077
4077
  if (e.length < s) {
4078
4078
  e = e.replace("006P93A00.", "").replace("006P93A00,", ""), e.includes("E93") ? this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E93") + 3, e.indexOf("E93") + 6) : e.includes("E71") && (this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E71") + 3, e.indexOf("E71") + 6)), this.__pinPad__.operation.ignore.error !== "" && e.indexOf("OPERACION CANCELADA") === -1 && e.indexOf("TIEMPO EXCEDIDO") === -1 && this.__pinPad__.operation.ignore.error.length === 3 && (this.__pinPad__.operation.last_error = this.#T(this.__pinPad__.operation.ignore.error), this.__pinPad__.waiting.statusReadCardWaiting = "rejected");
4079
4079
  return;
@@ -4083,13 +4083,14 @@ class $r extends mi {
4083
4083
  i === "verifone" && (a = e.replace("006P93A00.", "").substring(e.indexOf("P93A"), e.indexOf("P93A") + 7)), e.includes("P81APROCESANDO, NO RETIRE TARJETA") || e.includes("P81APROCESANDO TARJETA") || a.includes("P93A022") || a.includes("P81AINSERTE CHIP O DESLICE TARJETA") || a.includes("ACERQUE, INSERTE CHIP O DESLICE") || a.includes("P81AACERQUE, INSERTE CHIP O DESLICE TARJETA") ? this.dispatch("pp:processing-card", { waiting: !0 }) : e.length > s && this.#N(e);
4084
4084
  }
4085
4085
  }
4086
+ // @ts-expect-error parts is not used
4086
4087
  #B(t, e) {
4087
4088
  const i = this.__pinPad__.constants.ETX;
4088
4089
  let r = e.replace("023P81AFAVOR RETIRAR TARJ.", "").replace("020P81A DECLINADA EMV ", "").replace("020P81A DECLINADA EMV ", "");
4089
4090
  r = r.substring(r.indexOf("B") + 2, r.indexOf(i)), r.includes("006E93A16") && (r = "01"), this.__pinPad__.operation.applyReverse = r === "01" && this.__pinPad__.operation.responseMit._approved && this.__pinPad__.config.otherLogin.executeReverse === "1", this.__pinPad__.waiting.statusSecondGenerateWaiting = "resolved";
4090
4091
  }
4091
4092
  #N(t) {
4092
- const e = this.__pinPad__.constants.ETX, i = this.__pinPad__.about.brand.toLowerCase();
4093
+ const e = this.__pinPad__.constants.ETX, i = this.__pinPad__.about?.brand?.toLowerCase();
4093
4094
  let r, s, a, o, c;
4094
4095
  i === "verifone" ? t = t.replace("006P93A00.", "").replace("009P93A00", "").replace("010P93A00B01v", "") : t = t.replace("006P93A00,", ""), this.__pinPad__.config.read.POSEM = t.substring(t.indexOf("P93A") + 4, t.indexOf("B"));
4095
4096
  const h = this.__pinPad__.config.read.POSEM;
@@ -4121,7 +4122,7 @@ class $r extends mi {
4121
4122
  u = t.substring(t.indexOf("P93A022"), t.indexOf("I") + 23), u = u.substring(u.indexOf("I") + 2, u.indexOf(e));
4122
4123
  else
4123
4124
  u = t.substring(t.indexOf("P93A800"), t.indexOf("I") + 23), u = u.substring(u.indexOf("I") + 2, u.indexOf(e));
4124
- this.__pinPad__.config.read.NB_ksn = u, this.__pinPad__.config.read.NB_Data = t.substring(t.indexOf("B") + 2, t.indexOf("C")), s = t.substring(t.indexOf("F") + 2, t.indexOf("G")), r = t.substring(t.indexOf("G") + 2, t.indexOf("H")), this.__pinPad__.about.model.toLowerCase() === "vx520" ? (a = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.ChipName = a) : (a = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.ChipName = a);
4125
+ this.__pinPad__.config.read.NB_ksn = u, this.__pinPad__.config.read.NB_Data = t.substring(t.indexOf("B") + 2, t.indexOf("C")), s = t.substring(t.indexOf("F") + 2, t.indexOf("G")), r = t.substring(t.indexOf("G") + 2, t.indexOf("H")), this.__pinPad__.about.model?.toLowerCase() === "vx520" ? (a = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.ChipName = a) : (a = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.ChipName = a);
4125
4126
  }
4126
4127
  r.includes("/") && (r = r.replace("/", "")), r.toString().length === 4 ? (c = r.toString().substring(0, 2), o = r.toString().substring(2)) : (c = "", o = ""), this.__pinPad__.config.read.Chip === "1" ? (this.__pinPad__.config.read.EMV = "3", this.__pinPad__.config.read.ChipNameEnc = "1") : (this.__pinPad__.config.read.ChipNameEnc = "", this.__pinPad__.config.read.EMV = "2"), this.__pinPad__.config.read.AppIdLabel.toLowerCase().includes("american") || this.__pinPad__.config.read.AppIdLabel.toLowerCase().includes("amex") ? this.__pinPad__.config.read.Type = "AMEX" : this.__pinPad__.config.read.Type = "V/MC", this.__pinPad__.operation.bin = s, s.length > 6 && (this.__pinPad__.operation.bin = s.substring(0, 6)), this.__pinPad__.waiting.statusReadCardWaiting = "resolved", this.dispatch("pp:read-card", {
4127
4128
  ERROR: "",
@@ -4131,41 +4132,42 @@ class $r extends mi {
4131
4132
  year: o
4132
4133
  });
4133
4134
  }
4134
- #V(t, e) {
4135
+ // @ts-expect-error parts is not used
4136
+ #x(t, e) {
4135
4137
  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." }));
4136
4138
  }
4137
- #U(t, e) {
4138
- const i = this;
4139
- if (this.__pinPad__.about.model.toLowerCase() === "vx520") {
4139
+ // @ts-expect-error parts is not used
4140
+ #V(t, e) {
4141
+ if (this.__pinPad__.about.model?.toLowerCase() === "vx520") {
4140
4142
  if (e.length > 11)
4141
4143
  if (e.includes("P59A00"))
4142
- this.__pinPad__.operation.clientVoucher !== "" ? setTimeout(function() {
4143
- i.print("client").then(() => {
4144
- }).catch((r) => {
4145
- console.error(r);
4144
+ this.__pinPad__.operation.clientVoucher !== "" ? setTimeout(() => {
4145
+ this.print("client").then(() => {
4146
+ }).catch((i) => {
4147
+ console.error(i);
4146
4148
  });
4147
4149
  }, 1e3) : this.dispatch("pp:print", { type: "success" });
4148
4150
  else {
4149
- const r = e.includes("E17") || e.includes("A17") ? { type: "warning", message: "printer without paper" } : { type: "error", message: "The voucher could not be printed" };
4150
- this.dispatch("pp:print", r);
4151
+ const i = e.includes("E17") || e.includes("A17") ? { type: "warning", message: "printer without paper" } : { type: "error", message: "The voucher could not be printed" };
4152
+ this.dispatch("pp:print", i);
4151
4153
  }
4152
4154
  } else if (e.includes("P59A00"))
4153
- this.__pinPad__.operation.clientVoucher !== "" ? setTimeout(function() {
4154
- i.print("client").then(() => {
4155
- }).catch((r) => {
4156
- console.error(r);
4155
+ this.__pinPad__.operation.clientVoucher !== "" ? setTimeout(() => {
4156
+ this.print("client").then(() => {
4157
+ }).catch((i) => {
4158
+ console.error(i);
4157
4159
  });
4158
4160
  }, 1e3) : this.dispatch("pp:print", { type: "success" });
4159
4161
  else {
4160
- const r = e.includes("E17") || e.includes("A17") ? { type: "warning", message: "printer without paper" } : { type: "error", message: "The voucher could not be printed" };
4161
- this.dispatch("pp:print", r);
4162
+ const i = e.includes("E17") || e.includes("A17") ? { type: "warning", message: "printer without paper" } : { type: "error", message: "The voucher could not be printed" };
4163
+ this.dispatch("pp:print", i);
4162
4164
  }
4163
4165
  }
4164
- // eslint-disable-next-line no-unused-vars
4165
- #L(t, e) {
4166
+ #U(t, e) {
4167
+ console.log(t, e);
4166
4168
  }
4167
- // eslint-disable-next-line no-unused-vars
4168
- #M(t, e) {
4169
+ #L(t, e) {
4170
+ console.log(t, e);
4169
4171
  }
4170
4172
  serialMessage(t) {
4171
4173
  const e = {
@@ -4176,8 +4178,7 @@ class $r extends mi {
4176
4178
  request: this.lastAction,
4177
4179
  no_code: 0,
4178
4180
  parsed: null
4179
- }, i = this.parseHexToUint8(t), r = this.parseUint8ArrayToString(i);
4180
- let s = this.#R(r);
4181
+ }, i = this.parseHexToUint8(t), r = this.parseUint8ArrayToString(i), s = this.#C(r);
4181
4182
  switch (this.__pinPad__.buffer = r, e.parsed = s, e.code = r, e.request) {
4182
4183
  case "connect":
4183
4184
  e.name = "connected", e.description = "Connection established", e.no_code = 100, this.#f(s, r);
@@ -4186,13 +4187,13 @@ class $r extends mi {
4186
4187
  e.name = "About PinPad", e.description = "Response of about", e.no_code = 101, this.#f(s, r);
4187
4188
  break;
4188
4189
  case "inject":
4189
- e.name = "Inject", e.description = "Response of inject values", e.no_code = 102, this.#O(s, r);
4190
+ e.name = "Inject", e.description = "Response of inject values", e.no_code = 102, this.#R();
4190
4191
  break;
4191
4192
  case "init-dukpt":
4192
- e.name = "Init DUKPT", e.description = "Response of init DUKPT", e.no_code = 103, this.#x(s, r);
4193
+ e.name = "Init DUKPT", e.description = "Response of init DUKPT", e.no_code = 103, this.#O(s, r);
4193
4194
  break;
4194
4195
  case "dukpt":
4195
- e.name = "Write DUKPT", e.description = "Response of write DUKPT", e.no_code = 104, this.#D(s, r);
4196
+ e.name = "Write DUKPT", e.description = "Response of write DUKPT", e.no_code = 104, this.#D();
4196
4197
  break;
4197
4198
  case "read-card":
4198
4199
  e.name = "read card", e.description = "response of read card", e.no_code = 105, this.#I(s, r);
@@ -4204,16 +4205,16 @@ class $r extends mi {
4204
4205
  e.name = "cancel pinpad", e.description = "response of cancel", e.no_code = 107;
4205
4206
  break;
4206
4207
  case "print":
4207
- this.#U(s, r), e.name = "print voucher", e.description = "response of print", e.no_code = 108;
4208
+ this.#V(s, r), e.name = "print voucher", e.description = "response of print", e.no_code = 108;
4208
4209
  break;
4209
4210
  case "cancel-read-card":
4210
- this.#V(s, r), e.name = "cancel read card", e.description = "response of cancel read card", e.no_code = 109;
4211
+ this.#x(s, r), e.name = "cancel read card", e.description = "response of cancel read card", e.no_code = 109;
4211
4212
  break;
4212
4213
  case "code93":
4213
- this.#L(s, r), e.name = "code 93", e.description = "response of code 93", e.no_code = 110;
4214
+ this.#U(s, r), e.name = "code 93", e.description = "response of code 93", e.no_code = 110;
4214
4215
  break;
4215
4216
  case "finish-emv-end":
4216
- this.#M(s, r), e.name = "Finish EMV End", e.description = "response of finish EMV End", e.no_code = 111;
4217
+ this.#L(s, r), e.name = "Finish EMV End", e.description = "response of finish EMV End", e.no_code = 111;
4217
4218
  break;
4218
4219
  default:
4219
4220
  e.name = "unknown", e.description = "Unknown command", e.no_code = 400;
@@ -4221,16 +4222,15 @@ class $r extends mi {
4221
4222
  }
4222
4223
  this.dispatch("serial:message", e);
4223
4224
  }
4224
- // eslint-disable-next-line no-unused-vars
4225
- serialSetConnectionConstant(t = 1) {
4226
- let r = "C56AABOUT";
4227
- r = "" + r.length.toString().padStart(3, "0") + r + "";
4228
- let s = 0;
4229
- for (let o = 0; o < r.length; o++)
4230
- s ^= r.charCodeAt(o);
4231
- r = r + String.fromCharCode(s);
4232
- const a = this.parseStringToBytes(r, "");
4233
- return this.add0x(a);
4225
+ serialSetConnectionConstant() {
4226
+ let i = "C56AABOUT";
4227
+ i = "" + i.length.toString().padStart(3, "0") + i + "";
4228
+ let r = 0;
4229
+ for (let a = 0; a < i.length; a++)
4230
+ r ^= i.charCodeAt(a);
4231
+ i = i + String.fromCharCode(r);
4232
+ const s = this.parseStringToBytes(i, "");
4233
+ return this.add0x(s);
4234
4234
  }
4235
4235
  async sendCustomCode({ code: t = "" } = {}) {
4236
4236
  if (typeof t != "string") throw new Error("Invalid string");
@@ -4265,7 +4265,7 @@ class $r extends mi {
4265
4265
  this.__pinPad__.operation.reference = t.trim().toString().replaceAll(" ", "").toUpperCase();
4266
4266
  }
4267
4267
  get reference() {
4268
- return this.__pinPad__.operation.reference;
4268
+ return this.__pinPad__.operation.reference || "";
4269
4269
  }
4270
4270
  get url() {
4271
4271
  const t = this.environment;
@@ -4321,7 +4321,7 @@ class $r extends mi {
4321
4321
  }
4322
4322
  return i;
4323
4323
  }
4324
- #k(t) {
4324
+ #M(t) {
4325
4325
  const e = "0123456789abcdef", i = [], r = [];
4326
4326
  for (let s = 0; s < 256; s++)
4327
4327
  i[s] = e.charAt(s >> 4) + e.charAt(s & 15);
@@ -4347,8 +4347,8 @@ class $r extends mi {
4347
4347
  // return decodedArray.join('');
4348
4348
  // }
4349
4349
  async #o(t, e) {
4350
- const i = new Uint8Array(t.match(/.{1,2}/g).map((f) => parseInt(f, 16))), r = crypto.getRandomValues(new Uint8Array(16)), a = new TextEncoder().encode(e), o = await crypto.subtle.importKey("raw", i, { name: "AES-CBC" }, !1, ["encrypt"]), c = await crypto.subtle.encrypt({ name: "AES-CBC", iv: r }, o, a), h = btoa(String.fromCharCode(...r)), u = btoa(String.fromCharCode(...new Uint8Array(c)));
4351
- return h + u;
4350
+ const i = t.match(/.{1,2}/g) || [], r = new Uint8Array(i.map((_) => parseInt(_, 16))), s = crypto.getRandomValues(new Uint8Array(16)), o = new TextEncoder().encode(e), c = await crypto.subtle.importKey("raw", r, { name: "AES-CBC" }, !1, ["encrypt"]), h = await crypto.subtle.encrypt({ name: "AES-CBC", iv: s }, c, o), u = btoa(String.fromCharCode(...s)), f = btoa(String.fromCharCode(...new Uint8Array(h)));
4351
+ return u + f;
4352
4352
  }
4353
4353
  // async AESDecrypt(key, encryptedMessage) {
4354
4354
  // const keyBytes = new Uint8Array(key.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));
@@ -4373,7 +4373,7 @@ class $r extends mi {
4373
4373
  // const decoder = new TextDecoder();
4374
4374
  // return decoder.decode(decrypted);
4375
4375
  // }
4376
- #F(t, e, i = !1) {
4376
+ #k(t, e, i = !1) {
4377
4377
  const r = [];
4378
4378
  for (let h = 0; h < 256; h++)
4379
4379
  r[h] = h;
@@ -4383,15 +4383,15 @@ class $r extends mi {
4383
4383
  let a = 0, o = 0, c = "";
4384
4384
  for (const h of e) {
4385
4385
  a = (a + 1) % 256, o = (o + r[a]) % 256, [r[a], r[o]] = [r[o], r[a]];
4386
- let u = r[(r[a] + r[o]) % 256];
4386
+ const u = r[(r[a] + r[o]) % 256];
4387
4387
  c += String.fromCharCode(h.charCodeAt(0) ^ u);
4388
4388
  }
4389
- return i ? this.#k(c).toUpperCase() : c;
4389
+ return i ? this.#M(c).toUpperCase() : c;
4390
4390
  }
4391
4391
  #n(t, e) {
4392
- return this.#F(t, this.hexToAscii(e));
4392
+ return this.#k(t, this.hexToAscii(e));
4393
4393
  }
4394
- #j(t) {
4394
+ #F(t) {
4395
4395
  return t.replaceAll("Á", "A"), t.replaceAll("É", "E"), t.replaceAll("Í", "I"), t.replaceAll("Ó", "O"), t.replaceAll("Ú", "U"), t.replaceAll("á", "a"), t.replaceAll("é", "e"), t.replaceAll("í", "i"), t.replaceAll("ó", "o"), t.replaceAll("ú", "u"), t.replaceAll("ñ", "n"), t.replaceAll("Ñ", "N"), t.replaceAll('Electr?a"', "Electronica"), t;
4396
4396
  }
4397
4397
  #t(t, e, i) {
@@ -4401,12 +4401,12 @@ class $r extends mi {
4401
4401
  }
4402
4402
  return t.trim() + "@br @br @br @br @br";
4403
4403
  }
4404
- #q(t, e) {
4404
+ #j(t, e) {
4405
4405
  const i = "@logo3 @br", r = "@cnn " + e;
4406
4406
  return t.includes("@cnb Santander") ? (t = t.replace("@cnb Santander", "@logo1@br"), this.#t(t, i, r)) : t.includes("@cnb American Express") ? (t = t.replace("@cnb American Express", "@logo2@br"), this.#t(t, i, r)) : t.includes("@cnb HSBC") ? (t = t.replace("@cnb HSBC", "@logo7@br"), this.#t(t, i, r)) : t.includes("@cnb IXE") ? (t = t.replace("@cnb IXE", "@logo11@br"), this.#t(t, i, r)) : t.includes("@cnb MULTIVA") ? (t = t.replace("@cnb MULTIVA", "@logo15@br"), this.#t(t, i, r)) : t.includes("@cnb Multiva") ? (t = t.replace("@cnb Multiva", "@logo15@br"), this.#t(t, i, r)) : t.includes("@cnb SCOTIA BANK") ? (t = t.replace("@cnb SCOTIA BANK", "@logo16@br"), this.#t(t, i, r)) : t.includes("@cnb SCOTIABANK") ? (t = t.replace("@cnb SCOTIABANK", "@logo16@br"), this.#t(t, i, r)) : t.includes("@cnb BANCOMER") ? (t = t.replace("@cnb BANCOMER", "@logo17@br"), this.#t(t, i, r)) : t.includes("@cnb Bancomer") ? (t = t.replace("@cnb Bancomer", "@logo17@br"), this.#t(t, i, r)) : t.includes("@cnb BBVA") ? (t = t.replace("@cnb BBVA", "@logo17@br"), this.#t(t, i, r)) : t.includes("@cnb BANORTE") ? (t = t.replace("@cnb BANORTE", "@logo18@br"), this.#t(t, i, r)) : t.includes("@cnb Banorte") ? (t = t.replace("@cnb Banorte", "@logo18@br"), this.#t(t, i, r)) : t.includes("@cnb BANREGIO") ? (t = t.replace("@cnb BANREGIO", "@logo19@br"), this.#t(t, i, r)) : t.includes("@cnb Banregio") ? (t = t.replace("@cnb Banregio", "@logo19@br"), this.#t(t, i, r)) : t.includes("@cnb GETNET") ? (t = t.replace("@cnb GETNET", "@logo20@br"), this.#t(t, i, r)) : t.includes("@cnb GetNET") ? (t = t.replace("@cnb GetNET", "@logo20@br"), this.#t(t, i, r)) : this.#t(t, i, r);
4407
4407
  }
4408
- async #K(t = !1) {
4409
- if (this.#W(), this.__pinPad__.config.loginResponse && !t) return await this.#p();
4408
+ async #q(t = !1) {
4409
+ if (this.#H(), this.__pinPad__.config.loginResponse && !t) return await this.#p();
4410
4410
  const e = this.url + this.__pinPad__.constants.uris.login, i = {
4411
4411
  usuario: this.username,
4412
4412
  password: this.password,
@@ -4417,42 +4417,44 @@ class $r extends mi {
4417
4417
  };
4418
4418
  if (await this.#c(), this.#d())
4419
4419
  throw new Error("Empty RSA Key");
4420
- const r = this.#a(32), s = this.#s(this.__pinPad__.config.publicKeyRSA, r), a = await this.#o(r, JSON.stringify(i)), o = await S.post(e, a, {
4420
+ const r = this.#a(32), s = this.#s(this.__pinPad__.config.publicKeyRSA || "", r), a = await this.#o(r, JSON.stringify(i)), o = await S.post(e, a, {
4421
4421
  headers: {
4422
4422
  "Content-Type": "application/json",
4423
4423
  "cache-control": "no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0",
4424
4424
  data: s || ""
4425
4425
  }
4426
- }).catch((h) => {
4427
- throw new Error(`Error in request, verify internet connection: ${h.response?.status} ${h.message}`);
4428
- });
4429
- let c = this.#b(JSON.stringify(o.data));
4430
- if (typeof c == "string" && (c = JSON.parse(c)), !c)
4426
+ }).catch((u) => {
4427
+ throw new Error(`Error in request, verify internet connection: ${u.response?.status} ${u.message}`);
4428
+ }), c = this.#b(JSON.stringify(o.data));
4429
+ let h = c;
4430
+ if (typeof c == "string" && (h = JSON.parse(c)), !h)
4431
4431
  throw new Error("Invalid response JSON");
4432
- if (c.RESPUESTA === "error")
4433
- throw new Error(c);
4434
- return this.__pinPad__.config.loginResponse = c, localStorage.setItem(
4432
+ if (h.RESPUESTA === "error")
4433
+ throw new Error(h);
4434
+ return this.__pinPad__.config.loginResponse = h, localStorage.setItem(
4435
4435
  "ppLoginResponse",
4436
4436
  JSON.stringify({
4437
4437
  timestamp: (/* @__PURE__ */ new Date()).getTime(),
4438
- data: c
4438
+ data: h
4439
4439
  })
4440
4440
  ), await this.#p();
4441
4441
  }
4442
4442
  async #p() {
4443
- await this.#J();
4443
+ await this.#G();
4444
4444
  try {
4445
- await this.#$();
4445
+ await this.getPosition();
4446
4446
  } catch (t) {
4447
4447
  console.log("Error getting position", t);
4448
4448
  }
4449
- return this.__pinPad__.config.otherLogin = {}, this.#H(this.__pinPad__.config.loginResponse), this.__pinPad__.config.otherLogin;
4449
+ return this.__pinPad__.config.otherLogin = {}, this.#K(this.__pinPad__.config.loginResponse), this.__pinPad__.config.otherLogin;
4450
4450
  }
4451
- #H(t) {
4451
+ #K(t) {
4452
4452
  let e = "", i = "";
4453
4453
  t.xml?.ventaspropias?.merchant_currencyb && (e = t.xml.ventaspropias.merchant_currencyb), t.xml?.ventaspropias?.merchant_currencym && (i = t.xml.ventaspropias.merchant_currencym);
4454
4454
  let r = t.xml?.emvReverso;
4455
- r || (r = "0"), this.__pinPad__.config.internal.stTokenization = t.xml?.st_tokenizacion, !this.__pinPad__.config.internal.stTokenization || this.__pinPad__.config.internal.stTokenization === "false" || this.__pinPad__.config.internal.stTokenization === "0" ? this.__pinPad__.config.internal.stTokenization = !1 : this.__pinPad__.config.internal.stTokenization && (this.__pinPad__.config.internal.stTokenization = !0), this.__pinPad__.config.internal.emv = t.xml.importesPGS, this.__pinPad__.config.internal.qpsDomestic = this.__pinPad__.config.internal.emv.qps_dom, this.__pinPad__.config.internal.qpsInternational = this.__pinPad__.config.internal.emv.qps_il, this.__pinPad__.config.internal.cvmlVMCDomestic = this.__pinPad__.config.internal.emv.cvml_vm_dom, this.__pinPad__.config.internal.cvmlVMCInternational = this.__pinPad__.config.internal.emv.cvml_vm_il, this.__pinPad__.config.internal.cvmlAmex = this.__pinPad__.config.internal.emv.cvml_amex, this.__pinPad__.config.internal.translimitCTLSVMC = this.__pinPad__.config.internal.emv.tl_mc, this.__pinPad__.config.internal.translimitCTLSAmex = this.__pinPad__.config.internal.emv.tl_amex, this.__pinPad__.config.country = t.country.toUpperCase(), this.__pinPad__.config.idBranch = t.id_branch.toUpperCase(), this.__pinPad__.config.idCompany = t.id_company.toUpperCase(), this.__pinPad__.config.otherLogin = {
4455
+ r || (r = "0");
4456
+ const s = t.xml?.st_tokenizacion;
4457
+ !s || s === "false" || s === "0" ? this.__pinPad__.config.internal.stTokenization = !1 : this.__pinPad__.config.internal.stTokenization && (this.__pinPad__.config.internal.stTokenization = !0), this.__pinPad__.config.internal.emv = t.xml.importesPGS, this.__pinPad__.config.internal.qpsDomestic = this.__pinPad__.config.internal.emv.qps_dom, this.__pinPad__.config.internal.qpsInternational = this.__pinPad__.config.internal.emv.qps_il, this.__pinPad__.config.internal.cvmlVMCDomestic = this.__pinPad__.config.internal.emv.cvml_vm_dom, this.__pinPad__.config.internal.cvmlVMCInternational = this.__pinPad__.config.internal.emv.cvml_vm_il, this.__pinPad__.config.internal.cvmlAmex = this.__pinPad__.config.internal.emv.cvml_amex, this.__pinPad__.config.internal.translimitCTLSVMC = this.__pinPad__.config.internal.emv.tl_mc, this.__pinPad__.config.internal.translimitCTLSAmex = this.__pinPad__.config.internal.emv.tl_amex, this.__pinPad__.config.country = t.country.toUpperCase(), this.__pinPad__.config.idBranch = t.id_branch.toUpperCase(), this.__pinPad__.config.idCompany = t.id_company.toUpperCase(), this.__pinPad__.config.otherLogin = {
4456
4458
  bsUser: t.user,
4457
4459
  nbUser: t.nb_user,
4458
4460
  bsCompany: t.id_company,
@@ -4466,18 +4468,22 @@ class $r extends mi {
4466
4468
  executeReverse: r
4467
4469
  };
4468
4470
  }
4469
- #W() {
4470
- let t = localStorage.getItem("ppLoginResponse");
4471
- t && (t = JSON.parse(t), this.__pinPad__.config.loginResponse || (this.__pinPad__.config.loginResponse = t.data), (/* @__PURE__ */ new Date()).getTime() - t.timestamp >= 864e5 && (this.__pinPad__.config.loginResponse = null));
4471
+ #H() {
4472
+ const t = localStorage.getItem("ppLoginResponse");
4473
+ let e = null;
4474
+ t && (e = JSON.parse(t), this.__pinPad__.config.loginResponse || (this.__pinPad__.config.loginResponse = e?.data), (/* @__PURE__ */ new Date()).getTime() - e?.timestamp >= 864e5 && (this.__pinPad__.config.loginResponse = null));
4472
4475
  }
4473
4476
  async login({ force: t = !1 } = {}) {
4474
- return await this.#K(t);
4477
+ return await this.#q(t);
4475
4478
  }
4476
- async #X() {
4477
- const t = this.url + this.__pinPad__.constants.uris.RSAKey, e = await S.get(t).catch((i) => {
4478
- throw new Error(`Error in request, verify internet connection: ${i.response.status} ${i.message}`);
4479
+ async #W() {
4480
+ const t = this.url + this.__pinPad__.constants.uris.RSAKey, e = await S.get(t).catch((r) => {
4481
+ throw new Error(`Error in request, verify internet connection: ${r.response.status} ${r.message}`);
4479
4482
  });
4480
- if (e.headers.get("content-type").indexOf("application/json") === -1)
4483
+ if (!e) return "";
4484
+ const i = e.headers;
4485
+ if (!i) return "";
4486
+ if (i.get("content-type").indexOf("application/json") === -1)
4481
4487
  throw new Error("Fail to fetch RSA public key");
4482
4488
  return this.__pinPad__.config.publicKeyRSA = e.data.key_public, localStorage.setItem(
4483
4489
  "ppRSAKey",
@@ -4491,11 +4497,13 @@ class $r extends mi {
4491
4497
  localStorage.removeItem("ppLoginResponse"), localStorage.removeItem("ppRSAKey"), localStorage.removeItem("ppPublicIP");
4492
4498
  }
4493
4499
  #d() {
4494
- let t = localStorage.getItem("ppRSAKey");
4495
- return !t || (t = JSON.parse(t), this.__pinPad__.config.publicKeyRSA = t.data, (/* @__PURE__ */ new Date()).getTime() - t.timestamp >= 864e5) ? !0 : !this.__pinPad__.config.publicKeyRSA;
4500
+ const t = localStorage.getItem("ppRSAKey");
4501
+ if (!t) return !0;
4502
+ const e = JSON.parse(t);
4503
+ return !e.data || (this.__pinPad__.config.publicKeyRSA = e.data, (/* @__PURE__ */ new Date()).getTime() - e.timestamp >= 864e5) ? !0 : !this.__pinPad__.config.publicKeyRSA;
4496
4504
  }
4497
4505
  async #_() {
4498
- return this.#d() ? await this.#X() : this.__pinPad__.config.publicKeyRSA;
4506
+ return this.#d() ? await this.#W() : this.__pinPad__.config.publicKeyRSA;
4499
4507
  }
4500
4508
  async #c() {
4501
4509
  if (!await this.#_())
@@ -4504,7 +4512,7 @@ class $r extends mi {
4504
4512
  #g(t) {
4505
4513
  return /^[A-Z-a-z0-9\s]+$/g.test(t);
4506
4514
  }
4507
- #z(t) {
4515
+ #X(t) {
4508
4516
  if (z(t))
4509
4517
  return !0;
4510
4518
  const e = /^[A-Z-a-z0-9\s]+$/g.test(t) === !0;
@@ -4542,7 +4550,7 @@ class $r extends mi {
4542
4550
  if (typeof t != "string") throw new Error("Invalid string");
4543
4551
  return !t || /<html(?:\s+lang=["'][^"']*["'])?>/i.test(t) || (t = t.replace(/aaa/g, "á"), t = t.replace(/eee/g, "é"), t = t.replace(/iii/g, "í"), t = t.replace(/ooo/g, "ó"), t = t.replace(/uuu/g, "ú"), t = t.replace(/NNN/g, "Ñ"), t = t.replace(/nnn/g, "ñ"), t = t.replace(/á/g, "á")), t;
4544
4552
  }
4545
- async #G() {
4553
+ async #z() {
4546
4554
  const t = this.__pinPad__.constants.STX, e = this.__pinPad__.constants.ETX;
4547
4555
  let i = "C55ACANCEL";
4548
4556
  i = t + this.#e(i) + i + e, i = i + this.#i(i);
@@ -4558,7 +4566,7 @@ class $r extends mi {
4558
4566
  return e + i;
4559
4567
  }
4560
4568
  async checkPositionPermission() {
4561
- if (!he())
4569
+ if (!fe())
4562
4570
  throw new Error("Geolocation not supported");
4563
4571
  return new Promise((t, e) => {
4564
4572
  navigator.permissions.query({ name: "geolocation" }).then((i) => {
@@ -4566,8 +4574,8 @@ class $r extends mi {
4566
4574
  }).catch(() => e(!1));
4567
4575
  });
4568
4576
  }
4569
- async #$() {
4570
- return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, he() ? new Promise((t) => {
4577
+ async getPosition() {
4578
+ return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, fe() ? new Promise((t) => {
4571
4579
  navigator.geolocation.getCurrentPosition(
4572
4580
  (e) => {
4573
4581
  this.__pinPad__.config.latitude = e.coords.latitude, this.__pinPad__.config.longitude = e.coords.longitude, t(this.latitudeLongitude);
@@ -4578,23 +4586,30 @@ class $r extends mi {
4578
4586
  );
4579
4587
  }) : this.latitudeLongitude);
4580
4588
  }
4581
- async #J() {
4582
- let t = localStorage.getItem("ppPublicIP");
4583
- if (t && (t = JSON.parse(t), this.__pinPad__.config.publicIP = t.data, (/* @__PURE__ */ new Date()).getTime() - t.timestamp >= 864e5 && (this.__pinPad__.config.publicIP = null)), this.__pinPad__.config.publicIP) return this.__pinPad__.config.publicIP;
4589
+ async #G() {
4590
+ const t = localStorage.getItem("ppPublicIP");
4591
+ if (t) {
4592
+ const s = JSON.parse(t);
4593
+ this.__pinPad__.config.publicIP = s.data, (/* @__PURE__ */ new Date()).getTime() - s.timestamp >= 864e5 && (this.__pinPad__.config.publicIP = null);
4594
+ }
4595
+ if (this.__pinPad__.config.publicIP) return this.__pinPad__.config.publicIP;
4584
4596
  this.__pinPad__.config.publicIP = null;
4585
4597
  let e = !1;
4586
4598
  const i = await S.get("https://api.ipify.org?format=json").catch(() => e = !0);
4587
- return e ? null : (this.__pinPad__.config.publicIP = i.data.ip || null, localStorage.setItem(
4599
+ if (e || typeof i != "object" || !i || !i.data)
4600
+ return null;
4601
+ const r = i.data || {};
4602
+ return this.__pinPad__.config.publicIP = r.ip || null, localStorage.setItem(
4588
4603
  "ppPublicIP",
4589
4604
  JSON.stringify({
4590
4605
  timestamp: (/* @__PURE__ */ new Date()).getTime(),
4591
- data: i.data.ip
4606
+ data: r.ip
4592
4607
  })
4593
- ), this.__pinPad__.config.publicIP);
4608
+ ), this.__pinPad__.config.publicIP;
4594
4609
  }
4595
4610
  async cancelReadCard() {
4596
4611
  let t = "012VXVCANCELl";
4597
- this.__pinPad__.about.model.toLowerCase() === "ingenico" && (t = "029C50AOPERACION CANCELADA");
4612
+ this.__pinPad__.about.model?.toLowerCase() === "ingenico" && (t = "029C50AOPERACION CANCELADA");
4598
4613
  const e = this.parseStringToBytes(t, "");
4599
4614
  await this.appendToQueue(e, "cancel-read-card");
4600
4615
  }
@@ -4617,7 +4632,7 @@ class $r extends mi {
4617
4632
  });
4618
4633
  return;
4619
4634
  }
4620
- r = this.#j(r), r = this.#q(r, this.__pinPad__.constants.appName + this.__pinPad__.constants.appVersion);
4635
+ r = this.#F(r), r = this.#j(r, this.__pinPad__.constants.appName + this.__pinPad__.constants.appVersion);
4621
4636
  let s = "C59A" + r;
4622
4637
  s = e + this.#e(s) + s + i, s = s + this.#i(s), t === "client" ? this.__pinPad__.operation.clientVoucher = "" : t === "commerce" && (this.__pinPad__.operation.commerceVoucher = "");
4623
4638
  const a = this.parseStringToBytes(s, "");
@@ -4625,8 +4640,7 @@ class $r extends mi {
4625
4640
  }
4626
4641
  async #r(t, e) {
4627
4642
  await this.#c();
4628
- const i = this.#a(32);
4629
- let r = this.#s(this.__pinPad__.config.publicKeyRSA, i), s = await this.#o(i, JSON.stringify(e));
4643
+ const i = this.#a(32), r = this.#s(this.__pinPad__.config.publicKeyRSA || "", i), s = await this.#o(i, JSON.stringify(e));
4630
4644
  return (await S.post(t, s, {
4631
4645
  headers: {
4632
4646
  "Content-Type": "application/json",
@@ -4661,9 +4675,13 @@ class $r extends mi {
4661
4675
  // this.dispatch('pp:merchant-moto', response);
4662
4676
  // return response;
4663
4677
  // }
4664
- async #E({ data: t, url: e, cancelable: i = !1 } = {}) {
4678
+ async #E({ data: t, url: e, cancelable: i = !1 } = {
4679
+ data: null,
4680
+ url: "",
4681
+ cancelable: !1
4682
+ }) {
4665
4683
  await this.#c();
4666
- const r = this.#a(32), s = this.#s(this.__pinPad__.config.publicKeyRSA, r), a = await this.#o(r, JSON.stringify(t)), o = this;
4684
+ const r = this.#a(32), s = this.#s(this.__pinPad__.config.publicKeyRSA || "", r), a = await this.#o(r, JSON.stringify(t)), o = this;
4667
4685
  return (await S.post(e, a, {
4668
4686
  headers: {
4669
4687
  "Content-Type": "application/json",
@@ -4672,10 +4690,10 @@ class $r extends mi {
4672
4690
  }
4673
4691
  }).catch(async (h) => {
4674
4692
  let u = `Error in request, verify internet connection: ${h.status} ${h.message}`;
4675
- throw h.response.status >= 500 && h.response.status <= 599 ? u = "Service Temporarily Unavailable" : h.response.status >= 400 && h.response.status <= 499 && (u = "Bad Request"), i && await o.#G(), new Error(u);
4693
+ throw h.response.status >= 500 && h.response.status <= 599 ? u = "Service Temporarily Unavailable" : h.response.status >= 400 && h.response.status <= 499 && (u = "Bad Request"), i && await o.#z(), new Error(u);
4676
4694
  })).data;
4677
4695
  }
4678
- async #Q() {
4696
+ async #$() {
4679
4697
  const t = this.__pinPad__.constants.FS, e = this.__pinPad__.constants.ETX, i = this.__pinPad__.constants.STX;
4680
4698
  let r = "C57A" + this.__pinPad__.config.internal.qpsDomestic;
4681
4699
  if (r = r + t + "B" + this.__pinPad__.config.internal.qpsInternational, r = r + t + "C" + this.__pinPad__.config.internal.cvmlVMCDomestic, r = r + t + "D" + this.__pinPad__.config.internal.cvmlVMCInternational, r = r + t + "E" + this.__pinPad__.config.internal.cvmlAmex, r = r + t + "F" + this.__pinPad__.config.internal.translimitCTLSVMC, r = r + t + "G" + this.__pinPad__.config.internal.translimitCTLSAmex, r = i + this.#e(r) + r + e, r = r + this.#i(r), !this.__pinPad__.about.injectedValues) {
@@ -4683,13 +4701,13 @@ class $r extends mi {
4683
4701
  await this.appendToQueue(s, "inject");
4684
4702
  }
4685
4703
  }
4686
- async #Z() {
4704
+ async #J() {
4687
4705
  this.__pinPad__.operation.bin8 && (this.__pinPad__.operation.bin = this.__pinPad__.operation.bin8), this.__pinPad__.operation.bin8 = "";
4688
4706
  const t = await this.#E({
4689
4707
  data: {
4690
4708
  accion: "tipoPagoInfo",
4691
4709
  cc_num: this.__pinPad__.operation.bin,
4692
- usuario: this.username.toUpperCase(),
4710
+ usuario: this.username?.toUpperCase(),
4693
4711
  canal: this.__pinPad__.constants.typeChannel,
4694
4712
  tp_canal: "1",
4695
4713
  tp_moneda: this.__pinPad__.config.currency.toUpperCase()
@@ -4710,25 +4728,32 @@ class $r extends mi {
4710
4728
  * @param {function|null} callback
4711
4729
  * @return {Promise<unknown>}
4712
4730
  */
4713
- async #Y(t = null) {
4731
+ async #Q(t = null) {
4714
4732
  if (this.__pinPad__.waiting.statusAboutWaiting) throw new Error("AboutPP is already running");
4715
4733
  const e = this.__pinPad__.constants.STX, i = this.__pinPad__.constants.ETX;
4716
4734
  let r = "C56AABOUT";
4717
4735
  if (r = e + this.#e(r) + r + i, r = r + this.#i(r), z(this.__pinPad__.about.pp)) {
4718
4736
  this.__pinPad__.waiting.statusAboutWaiting = "pending";
4719
- const o = this.parseStringToBytes(r, "");
4720
- await this.appendToQueue(o, "about");
4737
+ const a = this.parseStringToBytes(r, "");
4738
+ await this.appendToQueue(a, "about");
4721
4739
  } else
4722
- return t ? t(this.__pinPad__.about.pp.supportDUKPT, this.__pinPad__.about.pp.hasDUKPTKeys) : !0;
4723
- const s = this;
4724
- let a = 0;
4725
- return new Promise((o, c) => {
4726
- a = setInterval(() => {
4727
- if (s.__pinPad__.waiting.statusAboutWaiting === "resolved") {
4728
- if (clearInterval(a), s.__pinPad__.waiting.statusAboutWaiting = null, z(s.__pinPad__.about.pp))
4740
+ return t ? t(this.__pinPad__.about.pp?.supportDUKPT || !1, this.__pinPad__.about.pp?.hasDUKPTKeys || !1) : !0;
4741
+ let s = 0;
4742
+ return new Promise((a, o) => {
4743
+ s = setInterval(() => {
4744
+ if (this.__pinPad__.waiting.statusAboutWaiting === "resolved") {
4745
+ if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null, z(this.__pinPad__.about.pp))
4746
+ return;
4747
+ if (!t || typeof t != "function") {
4748
+ a(!0);
4729
4749
  return;
4730
- t || o(!0), o(t(s.__pinPad__.about.pp.supportDUKPT, s.__pinPad__.about.pp.hasDUKPTKeys));
4731
- } else s.__pinPad__.waiting.statusAboutWaiting === "rejected" && (clearInterval(a), s.__pinPad__.waiting.statusAboutWaiting = null, c("Error"));
4750
+ }
4751
+ const c = t(
4752
+ this.__pinPad__.about.pp?.supportDUKPT || !1,
4753
+ this.__pinPad__.about.pp?.hasDUKPTKeys || !1
4754
+ );
4755
+ a(c);
4756
+ } else this.__pinPad__.waiting.statusAboutWaiting === "rejected" && (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null, o("Error"));
4732
4757
  }, 500);
4733
4758
  });
4734
4759
  }
@@ -4747,23 +4772,21 @@ class $r extends mi {
4747
4772
  const h = this.parseStringToBytes(c, "");
4748
4773
  await this.appendToQueue(h, "init-dukpt");
4749
4774
  let u = 0;
4750
- this.__pinPad__.waiting.statusinitDUKPTWaiting = "pending";
4751
- const f = this;
4752
- return new Promise((_, m) => {
4775
+ return this.__pinPad__.waiting.statusinitDUKPTWaiting = "pending", new Promise((f, _) => {
4753
4776
  u = setInterval(async () => {
4754
- f.__pinPad__.waiting.statusinitDUKPTWaiting === "resolved" ? (clearInterval(u), f.__pinPad__.waiting.statusinitDUKPTWaiting = null, f.dispatch("pp:dukpt", { status: "charged", already: !1 }), await f.#tt(), _(!0)) : f.__pinPad__.waiting.statusinitDUKPTWaiting === "rejected" && (clearInterval(u), f.__pinPad__.waiting.statusinitDUKPTWaiting = null, m("Error"));
4777
+ this.__pinPad__.waiting.statusinitDUKPTWaiting === "resolved" ? (clearInterval(u), this.__pinPad__.waiting.statusinitDUKPTWaiting = null, this.dispatch("pp:dukpt", { status: "charged", already: !1 }), await this.#Z(), f(!0)) : this.__pinPad__.waiting.statusinitDUKPTWaiting === "rejected" && (clearInterval(u), this.__pinPad__.waiting.statusinitDUKPTWaiting = null, _("Error"));
4755
4778
  }, 500);
4756
4779
  });
4757
4780
  }
4758
- async #tt() {
4781
+ async #Z() {
4759
4782
  const t = {
4760
4783
  IPEK_REQUESTType: {
4761
4784
  business: {
4762
- country: this.__pinPad__.config.country.toUpperCase(),
4763
- id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
4764
- id_company: this.__pinPad__.config.idCompany.toUpperCase(),
4765
- pwd: this.password.toUpperCase(),
4766
- user: this.username.toUpperCase()
4785
+ country: this.__pinPad__.config.country?.toUpperCase(),
4786
+ id_branch: this.__pinPad__.config.idBranch?.toUpperCase(),
4787
+ id_company: this.__pinPad__.config.idCompany?.toUpperCase(),
4788
+ pwd: this.password?.toUpperCase(),
4789
+ user: this.username?.toUpperCase()
4767
4790
  },
4768
4791
  terminal: this.__pinPad__.config.terminal
4769
4792
  }
@@ -4771,17 +4794,17 @@ class $r extends mi {
4771
4794
  data: t,
4772
4795
  url: this.url + this.__pinPad__.constants.uris.keysDUKPT
4773
4796
  });
4774
- await this.#ft(e);
4797
+ await this.#ht(e);
4775
4798
  }
4776
- async #et() {
4799
+ async #Y() {
4777
4800
  if (!await this.#_())
4778
4801
  throw new Error("RSA public key is empty");
4779
4802
  const e = this;
4780
- await this.#Y(async function(r, s) {
4803
+ await this.#Q(async function(r, s) {
4781
4804
  if (e.__pinPad__.about.supportInjection && e.__pinPad__.config.internal.emv && e.__pinPad__.about.injectedValues)
4782
4805
  return await e.#l(r, s), !0;
4783
4806
  let a = 0;
4784
- return e.__pinPad__.waiting.statusInjectWaiting = "pending", await e.#Q(), new Promise((o, c) => {
4807
+ return e.__pinPad__.waiting.statusInjectWaiting = "pending", await e.#$(), new Promise((o, c) => {
4785
4808
  a = setInterval(async () => {
4786
4809
  e.__pinPad__.waiting.statusInjectWaiting === "resolved" ? (clearInterval(a), e.__pinPad__.waiting.statusInjectWaiting = null, await e.#l(r, s), o(!0)) : e.__pinPad__.waiting.statusInjectWaiting === "rejected" && (clearInterval(a), e.__pinPad__.waiting.statusInjectWaiting = null, c("Error"));
4787
4810
  }, 500);
@@ -4792,7 +4815,7 @@ class $r extends mi {
4792
4815
  if (t = parseFloat(t.toString().replace(/[^0-9.-]/g, "")), isNaN(t) || t === 0)
4793
4816
  return parseFloat("0").toFixed(e);
4794
4817
  t = t.toFixed(e);
4795
- let i = t.split(".");
4818
+ const i = t.split(".");
4796
4819
  return i[0] = i[0].replace(/\B(?=(\d{3})+(?!\d))/g, ""), i.join(".");
4797
4820
  }
4798
4821
  getClientVoucher() {
@@ -4801,43 +4824,44 @@ class $r extends mi {
4801
4824
  getCommerceVoucher() {
4802
4825
  return this.__pinPad__.operation.commerceVoucher;
4803
4826
  }
4804
- async #it() {
4827
+ async #tt() {
4805
4828
  this.__pinPad__.operation.errors = 0;
4806
4829
  let t = "ACERQUE, INSERTE CHIP O DESLICE TARJETA";
4807
- if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), z(this.amount) || this.amount <= 0)
4830
+ if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model?.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), z(this.amount) || isNaN(parseFloat(this.amount)))
4808
4831
  throw new Error("Amount required");
4832
+ if (parseFloat(this.amount) <= 0)
4833
+ throw new Error("Amount must be greater than 0");
4809
4834
  if (this.#m(this.amount) === !1)
4810
4835
  throw new Error("Invalid amount required");
4811
- if (this.#h(this.amount, 2) <= 0)
4836
+ if (parseFloat(this.#h(this.amount, 2)) <= 0)
4812
4837
  throw new Error("Amount must be greater than 0");
4813
4838
  const e = this.__pinPad__.constants.FS, i = this.__pinPad__.constants.STX, r = this.__pinPad__.constants.ETX;
4814
4839
  let s = "C93A" + t;
4815
- s = s + e + "B" + this.#P(), s = s + e + "C" + this.#v(), s = s + e + "D" + this.#h(this.amount, 2), s = s + e + "E0.00", s = s + e + "F" + this.__pinPad__.config.currencyCode, this.__pinPad__.about.supportDUKPT && this.__pinPad__.about.supportDUKPT !== "0" && this.__pinPad__.about.supportDUKPT !== "false" && (this.__pinPad__.about.supportContactless ? (s = s + e + "G" + this.timeoutPinPad, s = s + e + "HTAGS", s = s + e + "I" + this.__pinPad__.config.requireCVVAmex, s = s + e + "J" + this.__pinPad__.config.forceOnline, s = s + e + "K" + this.__pinPad__.about.supportContactless, s = s + e + "L" + this.__pinPad__.config.emvCard, this.__pinPad__.about.hasCashback && (s = s + e + "M0", s = s + e + "N00")) : (s = s + e + "G" + this.timeoutPinPad, s = s + e + "HTAGS", s = s + e + "I" + this.__pinPad__.config.requireCVVAmex, s = s + e + "L" + this.__pinPad__.config.emvCard), this.__pinPad__.about.supportInjection && (s = s + e + "O" + this.__pinPad__.config.validateQPS)), s = i + this.#e(s) + s + r, s = s + this.#i(s), this.#pt();
4840
+ s = s + e + "B" + this.#P(), s = s + e + "C" + this.#v(), s = s + e + "D" + this.#h(this.amount, 2), s = s + e + "E0.00", s = s + e + "F" + this.__pinPad__.config.currencyCode, this.__pinPad__.about.supportDUKPT && this.__pinPad__.about.supportDUKPT !== "0" && this.__pinPad__.about.supportDUKPT !== "false" && (this.__pinPad__.about.supportContactless ? (s = s + e + "G" + this.timeoutPinPad, s = s + e + "HTAGS", s = s + e + "I" + this.__pinPad__.config.requireCVVAmex, s = s + e + "J" + this.__pinPad__.config.forceOnline, s = s + e + "K" + this.__pinPad__.about.supportContactless, s = s + e + "L" + this.__pinPad__.config.emvCard, this.__pinPad__.about.hasCashback && (s = s + e + "M0", s = s + e + "N00")) : (s = s + e + "G" + this.timeoutPinPad, s = s + e + "HTAGS", s = s + e + "I" + this.__pinPad__.config.requireCVVAmex, s = s + e + "L" + this.__pinPad__.config.emvCard), this.__pinPad__.about.supportInjection && (s = s + e + "O" + this.__pinPad__.config.validateQPS)), s = i + this.#e(s) + s + r, s = s + this.#i(s), this.#lt();
4816
4841
  const a = this.parseStringToBytes(s, "");
4817
4842
  await this.appendToQueue(a, "read-card");
4818
4843
  let o = 0;
4819
- const c = this;
4820
- return this.__pinPad__.waiting.statusReadCardWaiting = "pending", new Promise((h, u) => {
4844
+ return this.__pinPad__.waiting.statusReadCardWaiting = "pending", new Promise((c, h) => {
4821
4845
  o = setInterval(() => {
4822
- if (c.__pinPad__.waiting.statusReadCardWaiting === "resolved")
4823
- clearInterval(o), c.__pinPad__.waiting.statusReadCardWaiting = null, h(!0);
4824
- else if (c.__pinPad__.waiting.statusReadCardWaiting === "rejected") {
4825
- clearInterval(o), c.__pinPad__.waiting.statusReadCardWaiting = null;
4826
- const f = c.__pinPad__.operation.last_error;
4827
- u(f ?? "Error reading card");
4846
+ if (this.__pinPad__.waiting.statusReadCardWaiting === "resolved")
4847
+ clearInterval(o), this.__pinPad__.waiting.statusReadCardWaiting = null, c(!0);
4848
+ else if (this.__pinPad__.waiting.statusReadCardWaiting === "rejected") {
4849
+ clearInterval(o), this.__pinPad__.waiting.statusReadCardWaiting = null;
4850
+ const u = this.__pinPad__.operation.last_error;
4851
+ h(u ?? "Error reading card");
4828
4852
  }
4829
4853
  }, 500);
4830
4854
  });
4831
4855
  }
4832
- async #nt(t) {
4833
- return await le(t * 1e3);
4856
+ async #et(t) {
4857
+ return await pe(t * 1e3);
4834
4858
  }
4835
4859
  /**
4836
4860
  * @param {null|string} reference
4837
4861
  * @return {Promise<any>}
4838
4862
  */
4839
- async consult({ reference: t = null }) {
4840
- return t || (t = this.reference), z(t) && (t = "--", this.reference = t), this.#z(this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await this.#u({
4863
+ async consult({ reference: t = null } = { reference: null }) {
4864
+ return t || (t = this.reference), z(t) && (t = "--", this.reference = t), this.#X(this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await this.#u({
4841
4865
  Ambiente: this.environment,
4842
4866
  User: this.username,
4843
4867
  Pwd: this.password,
@@ -4846,36 +4870,36 @@ class $r extends mi {
4846
4870
  Country: this.__pinPad__.config.country,
4847
4871
  Tx_Date: this.__pinPad__.operation.consultDate
4848
4872
  }), this.#r(this.url + this.__pinPad__.constants.uris.consult, {
4849
- user: this.username.toUpperCase(),
4850
- pwd: this.password.toUpperCase(),
4851
- id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
4852
- id_company: this.__pinPad__.config.idCompany.toUpperCase(),
4873
+ user: this.username?.toUpperCase(),
4874
+ pwd: this.password?.toUpperCase(),
4875
+ id_branch: this.__pinPad__.config.idBranch?.toUpperCase(),
4876
+ id_company: this.__pinPad__.config.idCompany?.toUpperCase(),
4853
4877
  date: this.__pinPad__.operation.consultDate,
4854
4878
  reference: this.reference
4855
4879
  });
4856
4880
  }
4857
- async #rt(t) {
4881
+ async #it(t) {
4858
4882
  let e = this.url + this.__pinPad__.constants.uris.consult;
4859
4883
  return t > 1 && this.environment === "production" && (e = e.replace(
4860
4884
  this.__pinPad__.constants.urls.production,
4861
4885
  this.__pinPad__.constants.urls.productionAlternative
4862
4886
  )), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await this.#r(e, {
4863
- user: this.username.toUpperCase(),
4864
- pwd: this.password.toUpperCase(),
4865
- id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
4866
- id_company: this.__pinPad__.config.idCompany.toUpperCase(),
4887
+ user: this.username?.toUpperCase(),
4888
+ pwd: this.password?.toUpperCase(),
4889
+ id_branch: this.__pinPad__.config.idBranch?.toUpperCase(),
4890
+ id_company: this.__pinPad__.config.idCompany?.toUpperCase(),
4867
4891
  date: this.__pinPad__.operation.consultDate,
4868
4892
  reference: this.reference
4869
4893
  });
4870
4894
  }
4871
- async #st(t = "", e = {}) {
4895
+ async #nt(t = "", e = {}) {
4872
4896
  let i = 1, r = null;
4873
4897
  do {
4874
4898
  i > 1 && this.environment === "production" && (t = t.replace(
4875
4899
  this.__pinPad__.constants.urls.production,
4876
4900
  this.__pinPad__.constants.urls.productionAlternative
4877
- ), await this.#nt(5)), await this.#c();
4878
- const s = this.#a(32), a = this.#s(this.__pinPad__.config.publicKeyRSA, s), o = await this.#o(s, JSON.stringify(e));
4901
+ ), await this.#et(5)), await this.#c();
4902
+ const s = this.#a(32), a = this.#s(this.__pinPad__.config.publicKeyRSA || "", s), o = await this.#o(s, JSON.stringify(e));
4879
4903
  let c = !1;
4880
4904
  const h = await S.post(t, o, {
4881
4905
  headers: {
@@ -4885,15 +4909,20 @@ class $r extends mi {
4885
4909
  }).catch(async (u) => {
4886
4910
  let f = `Error in request, verify internet connection: ${u.status} ${u.message}`;
4887
4911
  u.response.status >= 500 && u.response.status <= 599 ? f = "Service Temporarily Unavailable" : u.response.status >= 400 && u.response.status <= 499 && (f = "Bad Request"), console.warn(u), r = f;
4888
- const _ = await this.#rt(i);
4912
+ const _ = await this.#it(i);
4889
4913
  _ && _ !== "{}" && !_.includes('"transacciones":""') && _.includes("nu_operaion") && (i = 5, r = "EE32"), c = !0;
4890
4914
  });
4891
- if (!c)
4915
+ if (!c) {
4916
+ if (!h || typeof h != "object" || !h.data) {
4917
+ r = "It was not possible to obtain the affiliations.";
4918
+ continue;
4919
+ }
4892
4920
  return h.data;
4921
+ }
4893
4922
  } while (i++ <= 3);
4894
4923
  return r ? Promise.reject(r) : Promise.reject("Communication error with CDP. IL/MTY");
4895
4924
  }
4896
- #at(t) {
4925
+ #rt(t) {
4897
4926
  if (z(t)) throw new Error("Number of authorization invalid");
4898
4927
  if (/^[A-Za-z0-9]+$/g.test(t) !== !0) throw new Error("Number of authorization invalid");
4899
4928
  if (t.length !== 6) throw new Error("Number of authorization invalid");
@@ -4904,36 +4933,37 @@ class $r extends mi {
4904
4933
  * @return {Promise<any>}
4905
4934
  */
4906
4935
  async rePrint({ folio: t = null } = {}) {
4907
- t === null && (t = this.__pinPad__.operation.folio || ""), this.#y(t), await this.#u({
4936
+ let e = "";
4937
+ t === null && (e = this.__pinPad__.operation.folio || ""), this.#y(e), await this.#u({
4908
4938
  Ambiente: this.environment,
4909
4939
  User: this.username,
4910
4940
  Pwd: this.password,
4911
4941
  IdBranch: this.__pinPad__.config.idBranch,
4912
4942
  IdCompany: this.__pinPad__.config.idCompany,
4913
4943
  Country: this.__pinPad__.config.country,
4914
- Tx_OperationNumber: t
4944
+ Tx_OperationNumber: e
4915
4945
  });
4916
- const e = await this.#r(this.url + this.__pinPad__.constants.uris.rePrint, {
4946
+ const i = await this.#r(this.url + this.__pinPad__.constants.uris.rePrint, {
4917
4947
  REPRINTVOUCHER: {
4918
4948
  business: {
4919
- country: this.__pinPad__.config.country.toUpperCase(),
4920
- id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
4921
- id_company: this.__pinPad__.config.idCompany.toUpperCase(),
4922
- pwd: this.password.toUpperCase(),
4923
- user: this.username.toUpperCase()
4949
+ country: this.__pinPad__.config.country?.toUpperCase(),
4950
+ id_branch: this.__pinPad__.config.idBranch?.toUpperCase(),
4951
+ id_company: this.__pinPad__.config.idCompany?.toUpperCase(),
4952
+ pwd: this.password?.toUpperCase(),
4953
+ user: this.username?.toUpperCase()
4924
4954
  },
4925
4955
  no_operacion: t,
4926
4956
  crypto: "2"
4927
4957
  }
4928
4958
  });
4929
- let i = e.voucher_comercio;
4930
- return this.__pinPad__.operation.commerceVoucher = "", i && (e.voucher_comercio.includes(":") ? this.__pinPad__.operation.commerceVoucher = e.voucher_comercio : this.__pinPad__.operation.commerceVoucher = this.#n(
4959
+ let r = i.voucher_comercio;
4960
+ return this.__pinPad__.operation.commerceVoucher = "", r && (i.voucher_comercio.includes(":") ? this.__pinPad__.operation.commerceVoucher = i.voucher_comercio : this.__pinPad__.operation.commerceVoucher = this.#n(
4931
4961
  this.__pinPad__.config.RC4Key,
4932
- e.voucher_comercio
4933
- )), i = e.voucher_cliente, this.__pinPad__.operation.clientVoucher = "", i && (e.voucher_cliente.includes(":") ? this.__pinPad__.operation.clientVoucher = e.voucher_cliente : this.__pinPad__.operation.clientVoucher = this.#n(
4962
+ i.voucher_comercio
4963
+ )), r = i.voucher_cliente, this.__pinPad__.operation.clientVoucher = "", r && (i.voucher_cliente.includes(":") ? this.__pinPad__.operation.clientVoucher = i.voucher_cliente : this.__pinPad__.operation.clientVoucher = this.#n(
4934
4964
  this.__pinPad__.config.RC4Key,
4935
- e.voucher_cliente
4936
- )), e;
4965
+ i.voucher_cliente
4966
+ )), i;
4937
4967
  }
4938
4968
  // jsonTokenization() {
4939
4969
  // // build json "11"
@@ -4965,18 +4995,17 @@ class $r extends mi {
4965
4995
  // },
4966
4996
  // };
4967
4997
  // }
4968
- #ot(t) {
4969
- const e = this;
4998
+ #st(t) {
4970
4999
  this.__pinPad__.operation.responseMit._approved = t.response === "approved", this.__pinPad__.operation.responseMit._status = t.response, this.__pinPad__.operation.responseMit._originalToken = t.number_tkn ?? "", this.__pinPad__.operation.folio = t.foliocpagos, this.__pinPad__.operation.authorization = t.auth;
4971
- let i = t.cd_response?.toUpperCase();
4972
- return i.toUpperCase() === "0C" || this.__pinPad__.operation.responseMit._approved ? i = "00" : (i !== "Z3" && i !== "05" || t.cd_error === "92") && (i = "01"), this.__pinPad__.operation.responseMit._cdResponse = i, this.__pinPad__.finishCommand.A = i, this.__pinPad__.finishCommand.B = "", this.__pinPad__.finishCommand.C = "", this.__pinPad__.finishCommand.D = "", this.__pinPad__.finishCommand.E = t.emv_key_date ? t.emv_key_date : "", this.__pinPad__.finishCommand.F = t.icc_csn ? t.icc_csn : "", this.__pinPad__.finishCommand.G = t.icc_atc ? t.icc_atc : "", this.__pinPad__.finishCommand.H = t.icc_arpc ? t.icc_arpc : "", this.__pinPad__.finishCommand.I = t.icc_issuer_script ? t.icc_issuer_script : "", this.__pinPad__.finishCommand.J = t.authorized_amount ? t.authorized_amount : "", this.__pinPad__.finishCommand.K = t.account_balance_1 ? t.account_balance_1 : "", {
5000
+ let e = t.cd_response?.toUpperCase();
5001
+ return e.toUpperCase() === "0C" || this.__pinPad__.operation.responseMit._approved ? e = "00" : (e !== "Z3" && e !== "05" || t.cd_error === "92") && (e = "01"), this.__pinPad__.operation.responseMit._cdResponse = e, this.__pinPad__.finishCommand.A = e, this.__pinPad__.finishCommand.B = "", this.__pinPad__.finishCommand.C = "", this.__pinPad__.finishCommand.D = "", this.__pinPad__.finishCommand.E = t.emv_key_date ? t.emv_key_date : "", this.__pinPad__.finishCommand.F = t.icc_csn ? t.icc_csn : "", this.__pinPad__.finishCommand.G = t.icc_atc ? t.icc_atc : "", this.__pinPad__.finishCommand.H = t.icc_arpc ? t.icc_arpc : "", this.__pinPad__.finishCommand.I = t.icc_issuer_script ? t.icc_issuer_script : "", this.__pinPad__.finishCommand.J = t.authorized_amount ? t.authorized_amount : "", this.__pinPad__.finishCommand.K = t.account_balance_1 ? t.account_balance_1 : "", {
4973
5002
  reference: t.reference,
4974
5003
  response: t.response,
4975
5004
  foliocpagos: t.foliocpagos,
4976
5005
  auth: t.auth,
4977
- cd_response: i,
5006
+ cd_response: e,
4978
5007
  cd_error: t.cd_error,
4979
- nb_error: e.#b(t.nb_error ?? ""),
5008
+ nb_error: this.#b(t.nb_error ?? ""),
4980
5009
  time: t.time,
4981
5010
  date: t.date,
4982
5011
  nb_company: t.nb_company,
@@ -4999,10 +5028,9 @@ class $r extends mi {
4999
5028
  }
5000
5029
  async cancelPurchase({ amount: t = 0, authorization: e = "", folio: i = "" } = {}) {
5001
5030
  if (!this.#m(t)) throw new Error("Invalid amount");
5002
- if (!this.#at(e)) throw new Error("Invalid authorization");
5031
+ if (!this.#rt(e)) throw new Error("Invalid authorization");
5003
5032
  if (!this.#y(i)) throw new Error("Invalid folio");
5004
- t = this.#w(t, 2);
5005
- const r = {
5033
+ const r = this.#w(t, 2), s = {
5006
5034
  Ambiente: this.environment,
5007
5035
  User: this.username,
5008
5036
  Pwd: this.password,
@@ -5012,50 +5040,49 @@ class $r extends mi {
5012
5040
  UserTRX: "userPinpadWeb",
5013
5041
  Tx_OperationNumber: i,
5014
5042
  Tx_Auth: e,
5015
- Amount: t
5043
+ Amount: r
5016
5044
  };
5017
- await this.#u(r);
5018
- const s = this.#r(this.url + this.__pinPad__.constants.uris.cancellation, {
5045
+ await this.#u(s);
5046
+ const a = await this.#r(this.url + this.__pinPad__.constants.uris.cancellation, {
5019
5047
  VMCAMEXMCANCELACION: {
5020
5048
  business: {
5021
- country: this.__pinPad__.config.country.toUpperCase(),
5022
- id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
5023
- id_company: this.__pinPad__.config.idCompany.toUpperCase(),
5024
- pwd: this.password.toUpperCase(),
5025
- user: this.username.toUpperCase()
5049
+ country: this.__pinPad__.config.country?.toUpperCase(),
5050
+ id_branch: this.__pinPad__.config.idBranch?.toUpperCase(),
5051
+ id_company: this.__pinPad__.config.idCompany?.toUpperCase(),
5052
+ pwd: this.password?.toUpperCase(),
5053
+ user: this.username?.toUpperCase()
5026
5054
  },
5027
5055
  transacction: {
5028
5056
  amount: t,
5029
5057
  auth: e.toUpperCase(),
5030
5058
  crypto: "2",
5031
5059
  no_operacion: i,
5032
- usrtransacction: this.username.toUpperCase(),
5060
+ usrtransacction: this.username?.toUpperCase(),
5033
5061
  version: this.__pinPad__.constants.appName + this.__pinPad__.constants.appVersion
5034
5062
  }
5035
5063
  }
5036
5064
  });
5037
- return this.__pinPad__.operation.commerceVoucher = "", s.voucher_comercio && (s.voucher_comercio.includes(":") ? this.__pinPad__.operation.commerceVoucher = s.voucher_comercio : this.__pinPad__.operation.commerceVoucher = this.#n(
5065
+ return this.__pinPad__.operation.commerceVoucher = "", a.voucher_comercio && (a.voucher_comercio.includes(":") ? this.__pinPad__.operation.commerceVoucher = a.voucher_comercio : this.__pinPad__.operation.commerceVoucher = this.#n(
5038
5066
  this.__pinPad__.config.RC4Key,
5039
- s.voucher_comercio
5040
- )), this.__pinPad__.operation.clientVoucher = "", s.voucher_cliente && (s.voucher_cliente.includes(":") ? this.__pinPad__.operation.clientVoucher = s.voucher_cliente : this.__pinPad__.operation.clientVoucher = this.#n(
5067
+ a.voucher_comercio
5068
+ )), this.__pinPad__.operation.clientVoucher = "", a.voucher_cliente && (a.voucher_cliente.includes(":") ? this.__pinPad__.operation.clientVoucher = a.voucher_cliente : this.__pinPad__.operation.clientVoucher = this.#n(
5041
5069
  this.__pinPad__.config.RC4Key,
5042
- s.voucher_cliente
5043
- )), JSON.stringify(s);
5070
+ a.voucher_cliente
5071
+ )), JSON.stringify(a);
5044
5072
  }
5045
- async #ct() {
5046
- const t = this;
5073
+ async #at() {
5047
5074
  this.__pinPad__.operation.errors = 0, this.__pinPad__.operation.ignore.counterSale = !1;
5048
- const e = this.__pinPad__.operation.onlyMerchant;
5049
- if (/^[0-9]+$/.test(e) === !1) throw new Error("Invalid merchant");
5075
+ const t = this.__pinPad__.operation.onlyMerchant;
5076
+ if (/^[0-9]+$/.test(t) === !1) throw new Error("Invalid merchant");
5050
5077
  this.__pinPad__.operation.typeOperation = "29";
5051
- let i = {
5078
+ const e = {
5052
5079
  error: !1,
5053
5080
  message: null,
5054
5081
  approved: !1,
5055
5082
  object: {}
5056
5083
  };
5057
5084
  try {
5058
- const r = await this.#w(this.amount, 2);
5085
+ const i = await this.#w(this.amount, 2);
5059
5086
  await this.#u({
5060
5087
  Ambiente: this.environment,
5061
5088
  Country: this.__pinPad__.config.country,
@@ -5072,26 +5099,28 @@ class $r extends mi {
5072
5099
  VersionTerminal: this.__pinPad__.about.appVersion,
5073
5100
  TpOperation: this.__pinPad__.operation.typeOperation,
5074
5101
  Reference: this.reference,
5075
- Amount: r,
5102
+ Amount: i,
5076
5103
  Currency: this.__pinPad__.config.currency,
5077
- Merchant: e,
5104
+ Merchant: t,
5078
5105
  Reverse: this.__pinPad__.config.otherLogin.executeReverse
5079
5106
  });
5080
- const s = this.__pinPad__.about.supportContactless && this.__pinPad__.about.supportContactless !== "0" ? "1" : "0", a = await this.#st(this.url + this.__pinPad__.constants.uris.sale, {
5107
+ let r = this.__pinPad__.about.supportContactless;
5108
+ typeof r == "string" && (r = r !== "0");
5109
+ const s = this.__pinPad__.about.supportContactless && r, a = await this.#nt(this.url + this.__pinPad__.constants.uris.sale, {
5081
5110
  VMCAMEXB: {
5082
5111
  business: {
5083
- country: this.__pinPad__.config.country.toUpperCase(),
5084
- id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
5085
- id_company: this.__pinPad__.config.idCompany.toUpperCase(),
5086
- pwd: this.password.toUpperCase(),
5087
- user: this.username.toUpperCase()
5112
+ country: this.__pinPad__.config.country?.toUpperCase(),
5113
+ id_branch: this.__pinPad__.config.idBranch?.toUpperCase(),
5114
+ id_company: this.__pinPad__.config.idCompany?.toUpperCase(),
5115
+ pwd: this.password?.toUpperCase(),
5116
+ user: this.username?.toUpperCase()
5088
5117
  },
5089
5118
  dcc: {
5090
5119
  dcc_amount: "0",
5091
5120
  dcc_status: "0"
5092
5121
  },
5093
5122
  transacction: {
5094
- amount: r,
5123
+ amount: i,
5095
5124
  creditcard: {
5096
5125
  appid: this.__pinPad__.config.read.AppId,
5097
5126
  appidlabel: this.__pinPad__.config.read.AppIdLabel,
@@ -5125,7 +5154,7 @@ class $r extends mi {
5125
5154
  },
5126
5155
  tp_operation: this.__pinPad__.operation.typeOperation,
5127
5156
  tp_resp: this.__pinPad__.operation.typeResponse,
5128
- usrtransacction: this.username.toUpperCase(),
5157
+ usrtransacction: this.username?.toUpperCase(),
5129
5158
  version: this.__pinPad__.constants.appName + this.__pinPad__.constants.appVersion,
5130
5159
  version_terminal: this.__pinPad__.about.appVersion
5131
5160
  },
@@ -5136,14 +5165,14 @@ class $r extends mi {
5136
5165
  }
5137
5166
  }
5138
5167
  });
5139
- a.response === "error" && (i.error = !0, i.message = a.nb_error || "Error in response");
5140
- const o = this.#ot(a);
5141
- return i.object = o, await this.#ut(o), i.approved = this.__pinPad__.operation.responseMit._approved, this.__pinPad__.operation.finalResult = o, i;
5142
- } catch (r) {
5143
- throw t.__pinPad__.finishCommand.A = "01", t.__pinPad__.finishCommand.B = "", t.__pinPad__.finishCommand.C = "", t.__pinPad__.finishCommand.D = "", t.__pinPad__.finishCommand.E = "", t.__pinPad__.finishCommand.F = "", t.__pinPad__.finishCommand.G = "", t.__pinPad__.finishCommand.H = "", t.__pinPad__.finishCommand.I = "", t.__pinPad__.finishCommand.J = "", t.__pinPad__.finishCommand.K = "", await t.#lt(t.#T(r)), r;
5168
+ a.response === "error" && (e.error = !0, e.message = a.nb_error || "Error in response");
5169
+ const o = this.#st(a);
5170
+ return e.object = o, await this.#ot(o), e.approved = this.__pinPad__.operation.responseMit._approved, this.__pinPad__.operation.finalResult = o, e;
5171
+ } catch (i) {
5172
+ throw this.__pinPad__.finishCommand.A = "01", this.__pinPad__.finishCommand.B = "", this.__pinPad__.finishCommand.C = "", this.__pinPad__.finishCommand.D = "", this.__pinPad__.finishCommand.E = "", this.__pinPad__.finishCommand.F = "", this.__pinPad__.finishCommand.G = "", this.__pinPad__.finishCommand.H = "", this.__pinPad__.finishCommand.I = "", this.__pinPad__.finishCommand.J = "", this.__pinPad__.finishCommand.K = "", await this.#ut(this.#T(i)), i;
5144
5173
  }
5145
5174
  }
5146
- async #ut(t) {
5175
+ async #ot(t) {
5147
5176
  if (this.__pinPad__.config.read.POSEM === "022" || this.__pinPad__.config.read.POSEM === "800" || this.__pinPad__.config.read.ReadCTLS === "1")
5148
5177
  return this.dispatch("pp:finish-emv", t), !0;
5149
5178
  const e = this.__pinPad__.constants.FS, i = this.__pinPad__.constants.STX, r = this.__pinPad__.constants.ETX;
@@ -5152,49 +5181,48 @@ class $r extends mi {
5152
5181
  const a = this.parseStringToBytes(s, "");
5153
5182
  this.__pinPad__.waiting.statusSecondGenerateWaiting = "pending", await this.appendToQueue(a, "second-generate");
5154
5183
  let o = 0;
5155
- const c = this;
5156
- return new Promise((h, u) => {
5184
+ return new Promise((c, h) => {
5157
5185
  o = setInterval(async () => {
5158
- if (c.__pinPad__.waiting.statusSecondGenerateWaiting === "resolved") {
5159
- if (clearInterval(o), c.__pinPad__.waiting.statusSecondGenerateWaiting = null, c.__pinPad__.operation.applyReverse) {
5160
- const f = await c.#r(c.url + c.__pinPad__.constants.uris.reverse, {
5186
+ if (this.__pinPad__.waiting.statusSecondGenerateWaiting === "resolved") {
5187
+ if (clearInterval(o), this.__pinPad__.waiting.statusSecondGenerateWaiting = null, this.__pinPad__.operation.applyReverse) {
5188
+ const u = await this.#r(this.url + this.__pinPad__.constants.uris.reverse, {
5161
5189
  VMCAMEXMREVERSO: {
5162
5190
  business: {
5163
- id_company: this.__pinPad__.config.idCompany.toUpperCase(),
5164
- id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
5165
- country: this.__pinPad__.config.country.toUpperCase(),
5166
- user: this.username.toUpperCase(),
5167
- pwd: this.password.toUpperCase()
5191
+ id_company: this.__pinPad__.config.idCompany?.toUpperCase(),
5192
+ id_branch: this.__pinPad__.config.idBranch?.toUpperCase(),
5193
+ country: this.__pinPad__.config.country?.toUpperCase(),
5194
+ user: this.username?.toUpperCase(),
5195
+ pwd: this.password?.toUpperCase()
5168
5196
  },
5169
5197
  transacction: {
5170
5198
  amount: this.#h(this.amount, 2),
5171
5199
  no_operacion: this.__pinPad__.operation.folio,
5172
- auth: this.__pinPad__.operation.authorization.toUpperCase(),
5200
+ auth: this.__pinPad__.operation.authorization?.toUpperCase(),
5173
5201
  tracks: "",
5174
- usrtransacction: this.username.toUpperCase(),
5202
+ usrtransacction: this.username?.toUpperCase(),
5175
5203
  crypto: "2",
5176
5204
  version: this.__pinPad__.constants.appName + this.__pinPad__.constants.appVersion
5177
5205
  }
5178
5206
  }
5179
- }), _ = JSON.parse(f);
5180
- let m;
5181
- _.response === "approved" ? m = { message: "Transaction rejected by PinPad." } : m = { message: "No communication, please check your report." }, c.__pinPad__.operation.ignore.counterSale || (c.dispatch("pp:finish-emv", m), c.__pinPad__.operation.ignore.counterSale = !0);
5207
+ }), f = JSON.parse(u);
5208
+ let _;
5209
+ f.response === "approved" ? _ = { message: "Transaction rejected by PinPad." } : _ = { message: "No communication, please check your report." }, this.__pinPad__.operation.ignore.counterSale || (this.dispatch("pp:finish-emv", _), this.__pinPad__.operation.ignore.counterSale = !0);
5182
5210
  } else
5183
- c.__pinPad__.operation.ignore.counterSale || (c.dispatch("pp:finish-emv", t), c.__pinPad__.operation.ignore.counterSale = !0);
5184
- t.cd_error === "92" && await c.#ht(t, s), h(!0);
5185
- } else c.__pinPad__.waiting.statusSecondGenerateWaiting === "rejected" && (clearInterval(o), c.__pinPad__.waiting.statusSecondGenerateWaiting = null, u("There is no response from the reader, check that it is connected."));
5211
+ this.__pinPad__.operation.ignore.counterSale || (this.dispatch("pp:finish-emv", t), this.__pinPad__.operation.ignore.counterSale = !0);
5212
+ t.cd_error === "92" && await this.#ct(t, s), c(!0);
5213
+ } else this.__pinPad__.waiting.statusSecondGenerateWaiting === "rejected" && (clearInterval(o), this.__pinPad__.waiting.statusSecondGenerateWaiting = null, h("There is no response from the reader, check that it is connected."));
5186
5214
  }, 500);
5187
5215
  });
5188
5216
  }
5189
- async #ht(t, e) {
5190
- this.__pinPad__.operation.ignore.responseGlobal = t, this.__pinPad__.operation.ignore.C93Global = e, this.__pinPad__.operation.ignore.isError92TRX = !0, await this.#l(1, 0);
5217
+ async #ct(t, e) {
5218
+ this.__pinPad__.operation.ignore.responseGlobal = t, this.__pinPad__.operation.ignore.C93Global = e, this.__pinPad__.operation.ignore.isError92TRX = !0, await this.#l(!0, !1);
5191
5219
  }
5192
5220
  async #S() {
5193
5221
  if (this.__pinPad__.operation.ignore.isError92TRX = !1, this.__pinPad__.config.read.POSEM === "022" || this.__pinPad__.config.read.POSEM === "800" || this.__pinPad__.config.read.ReadCTLS === "1")
5194
5222
  this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5195
5223
  else {
5196
5224
  const t = this.parseStringToBytes(this.__pinPad__.operation.ignore.C93Global, "");
5197
- await this.appendToQueue(t, "code93"), await le(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5225
+ await this.appendToQueue(t, "code93"), await pe(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5198
5226
  }
5199
5227
  }
5200
5228
  #T(t) {
@@ -5236,14 +5264,13 @@ class $r extends mi {
5236
5264
  EE33: "Error de comunicacion con CDP. IL/MTY",
5237
5265
  EE20: "La Referencia contiene caracteres inválidos",
5238
5266
  EE99: "Error código 99."
5239
- };
5240
- let i = e[t] ? {
5267
+ }, i = e[t] ? {
5241
5268
  error: t,
5242
5269
  message: e[t]
5243
5270
  } : { error: t, message: "Error desconocido" };
5244
5271
  return this.dispatch("pp:error", i), i;
5245
5272
  }
5246
- async #lt(t) {
5273
+ async #ut(t) {
5247
5274
  const e = this.__pinPad__.constants.FS, i = this.__pinPad__.constants.STX, r = this.__pinPad__.constants.ETX;
5248
5275
  let s = "C93A" + this.__pinPad__.finishCommand.A;
5249
5276
  if (s = s + e + "B" + this.__pinPad__.finishCommand.B, s = s + e + "C" + this.__pinPad__.finishCommand.C, s = s + e + "D" + this.__pinPad__.finishCommand.D, s = s + e + "E" + this.__pinPad__.finishCommand.E, s = s + e + "F" + this.__pinPad__.finishCommand.F, s = s + e + "G" + this.__pinPad__.finishCommand.G, s = s + e + "H" + this.__pinPad__.finishCommand.H, s = s + e + "I" + this.__pinPad__.finishCommand.I, s = s + e + "J" + this.__pinPad__.finishCommand.J, s = s + e + "K" + this.__pinPad__.finishCommand.K, s = i + this.#e(s) + s + r, s = s + this.#i(s), this.__pinPad__.config.read.POSEM === "022" || this.__pinPad__.config.read.POSEM === "800" || this.__pinPad__.config.read.ReadCTLS === "1") {
@@ -5253,7 +5280,7 @@ class $r extends mi {
5253
5280
  const a = this.parseStringToBytes(s, "");
5254
5281
  await this.appendToQueue(a, "finish-emv-end");
5255
5282
  }
5256
- async #ft(t) {
5283
+ async #ht(t) {
5257
5284
  if (t.cd_estatus = t.cd_estatus ? t.cd_estatus : "0", t.cd_estatus !== "1") {
5258
5285
  this.__pinPad__.operation.ignore.isError92TRX && await this.#S();
5259
5286
  return;
@@ -5264,15 +5291,13 @@ class $r extends mi {
5264
5291
  const h = this.parseStringToBytes(c, "");
5265
5292
  await this.appendToQueue(h, "dukpt");
5266
5293
  let u = 0;
5267
- this.__pinPad__.waiting.statuswritingDUKPTWaiting = "pending";
5268
- const f = this;
5269
- return new Promise((_, m) => {
5294
+ return this.__pinPad__.waiting.statuswritingDUKPTWaiting = "pending", new Promise((f, _) => {
5270
5295
  u = setInterval(async () => {
5271
- f.__pinPad__.waiting.statuswritingDUKPTWaiting === "resolved" ? (clearInterval(u), f.__pinPad__.waiting.statuswritingDUKPTWaiting = null, this.__pinPad__.operation.ignore.isError92TRX && await f.#S(), _(!0)) : f.__pinPad__.waiting.statuswritingDUKPTWaiting === "rejected" && (clearInterval(u), f.__pinPad__.waiting.statuswritingDUKPTWaiting = null, m("Error writing DUKPT keys"));
5296
+ this.__pinPad__.waiting.statuswritingDUKPTWaiting === "resolved" ? (clearInterval(u), this.__pinPad__.waiting.statuswritingDUKPTWaiting = null, this.__pinPad__.operation.ignore.isError92TRX && await this.#S(), f(!0)) : this.__pinPad__.waiting.statuswritingDUKPTWaiting === "rejected" && (clearInterval(u), this.__pinPad__.waiting.statuswritingDUKPTWaiting = null, _("Error writing DUKPT keys"));
5272
5297
  }, 500);
5273
5298
  });
5274
5299
  }
5275
- #pt() {
5300
+ #lt() {
5276
5301
  this.__pinPad__.config.read.AppId = "", this.__pinPad__.config.read.AppIdLabel = "", this.__pinPad__.config.read.Arqc = "", this.__pinPad__.config.read.ChipName = "", this.__pinPad__.config.read.ReadCTLS = "", this.__pinPad__.config.read.NB_Data = "", this.__pinPad__.config.read.NB_ksn = "", this.__pinPad__.config.read.PIN = "", this.__pinPad__.config.read.POSEM = "", this.__pinPad__.config.read.Tags = "", this.__pinPad__.config.read.Type = "", this.__pinPad__.config.read.Chip = "", this.__pinPad__.config.read.ChipNameEnc = "", this.__pinPad__.operation.ignore.error = "", this.__pinPad__.operation.ignore.C93Global = "", this.__pinPad__.operation.folio = "", this.__pinPad__.operation.authorization = "", this.__pinPad__.config.tokenizeTRX = !1;
5277
5302
  }
5278
5303
  // ========================================================================================
@@ -5290,14 +5315,14 @@ class $r extends mi {
5290
5315
  throw new Error("Reference is required and must be alphanumeric");
5291
5316
  if (this.reference = e, /^[A-Z-a-z\s]+$/g.test(this.__pinPad__.config.currency) === !1)
5292
5317
  throw new Error("Invalid currency");
5293
- let i = {
5318
+ const i = {
5294
5319
  error: !1,
5295
5320
  message: null,
5296
5321
  approved: !1,
5297
5322
  object: {}
5298
5323
  };
5299
5324
  try {
5300
- return await this.login(), await this.#et(), !await this.#it() || !await this.#Z() ? i : await this.#ct();
5325
+ return await this.login(), await this.#Y(), !await this.#tt() || !await this.#J() ? i : await this.#at();
5301
5326
  } catch (r) {
5302
5327
  console.warn(r), i.error = !0, i.message = r.message, i.approved = !1, i.object = r;
5303
5328
  }