@danidoble/webserial 4.5.0-beta.8 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pinpad.js CHANGED
@@ -1,50 +1,50 @@
1
- import { K as Rn, a as Cn, i as Z, b as Se, w as Te } from "./kernel-B9Cl3HQU.js";
2
- import { D as Ae } from "./devices-B5N__0E-.js";
3
- var On = "0123456789abcdefghijklmnopqrstuvwxyz";
1
+ import { K as On, s as Dn, i as $, a as Te, w as Ae } from "./kernel-D9C1iBu-.js";
2
+ import { D as Re } from "./devices-CzEcntFZ.js";
3
+ var In = "0123456789abcdefghijklmnopqrstuvwxyz";
4
4
  function Y(i) {
5
- return On.charAt(i);
5
+ return In.charAt(i);
6
6
  }
7
- function Dn(i, t) {
7
+ function Nn(i, t) {
8
8
  return i & t;
9
9
  }
10
10
  function Bt(i, t) {
11
11
  return i | t;
12
12
  }
13
- function Re(i, t) {
13
+ function Ce(i, t) {
14
14
  return i ^ t;
15
15
  }
16
- function Ce(i, t) {
16
+ function Oe(i, t) {
17
17
  return i & ~t;
18
18
  }
19
- function In(i) {
19
+ function Bn(i) {
20
20
  if (i == 0)
21
21
  return -1;
22
22
  var t = 0;
23
23
  return (i & 65535) == 0 && (i >>= 16, t += 16), (i & 255) == 0 && (i >>= 8, t += 8), (i & 15) == 0 && (i >>= 4, t += 4), (i & 3) == 0 && (i >>= 2, t += 2), (i & 1) == 0 && ++t, t;
24
24
  }
25
- function Nn(i) {
25
+ function xn(i) {
26
26
  for (var t = 0; i != 0; )
27
27
  i &= i - 1, ++t;
28
28
  return t;
29
29
  }
30
- var gt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ye = "=";
30
+ var gt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", tn = "=";
31
31
  function Tt(i) {
32
32
  var t, e, n = "";
33
33
  for (t = 0; t + 3 <= i.length; t += 3)
34
34
  e = parseInt(i.substring(t, t + 3), 16), n += gt.charAt(e >> 6) + gt.charAt(e & 63);
35
35
  for (t + 1 == i.length ? (e = parseInt(i.substring(t, t + 1), 16), n += gt.charAt(e << 2)) : t + 2 == i.length && (e = parseInt(i.substring(t, t + 2), 16), n += gt.charAt(e >> 2) + gt.charAt((e & 3) << 4)); (n.length & 3) > 0; )
36
- n += Ye;
36
+ n += tn;
37
37
  return n;
38
38
  }
39
- function Oe(i) {
39
+ function De(i) {
40
40
  var t = "", e, n = 0, r = 0;
41
- for (e = 0; e < i.length && i.charAt(e) != Ye; ++e) {
41
+ for (e = 0; e < i.length && i.charAt(e) != tn; ++e) {
42
42
  var s = gt.indexOf(i.charAt(e));
43
43
  s < 0 || (n == 0 ? (t += Y(s >> 2), r = s & 3, n = 1) : n == 1 ? (t += Y(r << 2 | s >> 4), r = s & 15, n = 2) : n == 2 ? (t += Y(r), t += Y(s >> 2), r = s & 3, n = 3) : (t += Y(r << 2 | s >> 4), t += Y(s & 15), n = 0));
44
44
  }
45
45
  return n == 1 && (t += Y(r << 2)), t;
46
46
  }
47
- var pt, Bn = {
47
+ var pt, Ln = {
48
48
  decode: function(i) {
49
49
  var t;
50
50
  if (pt === void 0) {
@@ -150,9 +150,9 @@ var pt, Bn = {
150
150
  return t.length == 1 ? t[0] : this;
151
151
  }, i;
152
152
  })()
153
- ), tn = "…", xn = /^(\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)?)?$/, Un = /^(\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
+ ), en = "…", Un = /^(\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)?)?$/, Vn = /^(\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
154
  function mt(i, t) {
155
- return i.length > t && (i = i.substring(0, t) + tn), i;
155
+ return i.length > t && (i = i.substring(0, t) + en), i;
156
156
  }
157
157
  var ee = (
158
158
  /** @class */
@@ -203,7 +203,7 @@ var ee = (
203
203
  r = this.get(a++), s = this.get(a++), n += String.fromCharCode(r << 8 | s);
204
204
  return n;
205
205
  }, i.prototype.parseTime = function(t, e, n) {
206
- var r = this.parseStringISO(t, e), s = (n ? xn : Un).exec(r);
206
+ var r = this.parseStringISO(t, e), s = (n ? Un : Vn).exec(r);
207
207
  return s ? (n && (s[1] = +s[1], s[1] += +s[1] < 70 ? 2e3 : 1900), r = s[1] + "-" + s[2] + "-" + s[3] + " " + s[4], s[5] && (r += ":" + s[5], s[6] && (r += ":" + s[6], s[7] && (r += "." + s[7]))), s[8] && (r += " UTC", s[8] != "Z" && (r += s[8], s[9] && (r += ":" + s[9]))), r) : "Unrecognized time: " + r;
208
208
  }, i.prototype.parseInteger = function(t, e) {
209
209
  for (var n = this.get(t), r = n > 127, s = r ? 255 : 0, a, o = ""; n == s && ++t < e; )
@@ -237,7 +237,7 @@ var ee = (
237
237
  n /= 2, r > n && (e = t + n);
238
238
  for (var a = t; a < e; ++a)
239
239
  s += this.hexByte(this.get(a));
240
- return r > n && (s += tn), s;
240
+ return r > n && (s += en), s;
241
241
  }, i.prototype.parseOID = function(t, e, n) {
242
242
  for (var r = "", s = new St(), a = 0, o = t; o < e; ++o) {
243
243
  var c = this.get(o);
@@ -259,11 +259,11 @@ var ee = (
259
259
  return a > 0 && (r += ".incomplete"), r;
260
260
  }, i;
261
261
  })()
262
- ), Ln = (
262
+ ), Mn = (
263
263
  /** @class */
264
264
  (function() {
265
265
  function i(t, e, n, r, s) {
266
- if (!(r instanceof De))
266
+ if (!(r instanceof Ie))
267
267
  throw new Error("Invalid tag value.");
268
268
  this.stream = t, this.header = e, this.length = n, this.tag = r, this.sub = s;
269
269
  }
@@ -428,7 +428,7 @@ var ee = (
428
428
  }, i.decode = function(t) {
429
429
  var e;
430
430
  t instanceof ee ? e = t : e = new ee(t, 0);
431
- var n = new ee(e), r = new De(e), s = i.decodeLength(e), a = e.pos, o = a - n.pos, c = null, u = function() {
431
+ var n = new ee(e), r = new Ie(e), s = i.decodeLength(e), a = e.pos, o = a - n.pos, c = null, u = function() {
432
432
  var f = [];
433
433
  if (s !== null) {
434
434
  for (var d = a + s; e.pos < d; )
@@ -470,7 +470,7 @@ var ee = (
470
470
  return new i(n, o, s, r, c);
471
471
  }, i;
472
472
  })()
473
- ), De = (
473
+ ), Ie = (
474
474
  /** @class */
475
475
  (function() {
476
476
  function i(t) {
@@ -489,7 +489,7 @@ var ee = (
489
489
  return this.tagClass === 0 && this.tagNumber === 0;
490
490
  }, i;
491
491
  })()
492
- ), rt, Vn = 244837814094590, Ie = (Vn & 16777215) == 15715070, L = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], Mn = (1 << 26) / L[L.length - 1], v = (
492
+ ), rt, Fn = 244837814094590, Ne = (Fn & 16777215) == 15715070, U = [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], kn = (1 << 26) / U[U.length - 1], w = (
493
493
  /** @class */
494
494
  (function() {
495
495
  function i(t, e, n) {
@@ -539,7 +539,7 @@ var ee = (
539
539
  return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(i.ZERO) > 0 && t.subTo(e, e), e;
540
540
  }, i.prototype.modPowInt = function(t, e) {
541
541
  var n;
542
- return t < 256 || e.isEven() ? n = new Ne(e) : n = new Be(e), this.exp(t, n);
542
+ return t < 256 || e.isEven() ? n = new Be(e) : n = new xe(e), this.exp(t, n);
543
543
  }, i.prototype.clone = function() {
544
544
  var t = S();
545
545
  return this.copyTo(t), t;
@@ -578,16 +578,16 @@ var ee = (
578
578
  return this.compareTo(t) > 0 ? this : t;
579
579
  }, i.prototype.and = function(t) {
580
580
  var e = S();
581
- return this.bitwiseTo(t, Dn, e), e;
581
+ return this.bitwiseTo(t, Nn, e), e;
582
582
  }, i.prototype.or = function(t) {
583
583
  var e = S();
584
584
  return this.bitwiseTo(t, Bt, e), e;
585
585
  }, i.prototype.xor = function(t) {
586
586
  var e = S();
587
- return this.bitwiseTo(t, Re, e), e;
587
+ return this.bitwiseTo(t, Ce, e), e;
588
588
  }, i.prototype.andNot = function(t) {
589
589
  var e = S();
590
- return this.bitwiseTo(t, Ce, e), e;
590
+ return this.bitwiseTo(t, Oe, e), e;
591
591
  }, i.prototype.not = function() {
592
592
  for (var t = S(), e = 0; e < this.t; ++e)
593
593
  t[e] = this.DM & ~this[e];
@@ -601,11 +601,11 @@ var ee = (
601
601
  }, i.prototype.getLowestSetBit = function() {
602
602
  for (var t = 0; t < this.t; ++t)
603
603
  if (this[t] != 0)
604
- return t * this.DB + In(this[t]);
604
+ return t * this.DB + Bn(this[t]);
605
605
  return this.s < 0 ? this.t * this.DB : -1;
606
606
  }, i.prototype.bitCount = function() {
607
607
  for (var t = 0, e = this.s & this.DM, n = 0; n < this.t; ++n)
608
- t += Nn(this[n] ^ e);
608
+ t += xn(this[n] ^ e);
609
609
  return t;
610
610
  }, i.prototype.testBit = function(t) {
611
611
  var e = Math.floor(t / this.DB);
@@ -613,9 +613,9 @@ var ee = (
613
613
  }, i.prototype.setBit = function(t) {
614
614
  return this.changeBit(t, Bt);
615
615
  }, i.prototype.clearBit = function(t) {
616
- return this.changeBit(t, Ce);
616
+ return this.changeBit(t, Oe);
617
617
  }, i.prototype.flipBit = function(t) {
618
- return this.changeBit(t, Re);
618
+ return this.changeBit(t, Ce);
619
619
  }, i.prototype.add = function(t) {
620
620
  var e = S();
621
621
  return this.addTo(t, e), e;
@@ -638,7 +638,7 @@ var ee = (
638
638
  var n = t.bitLength(), r, s = nt(1), a;
639
639
  if (n <= 0)
640
640
  return s;
641
- n < 18 ? r = 1 : n < 48 ? r = 3 : n < 144 ? r = 4 : n < 768 ? r = 5 : r = 6, n < 8 ? a = new Ne(e) : e.isEven() ? a = new kn(e) : a = new Be(e);
641
+ n < 18 ? r = 1 : n < 48 ? r = 3 : n < 144 ? r = 4 : n < 768 ? r = 5 : r = 6, n < 8 ? a = new Be(e) : e.isEven() ? a = new qn(e) : a = new xe(e);
642
642
  var o = [], c = 3, u = r - 1, l = (1 << r) - 1;
643
643
  if (o[1] = a.convert(this), r > 1) {
644
644
  var f = S();
@@ -681,7 +681,7 @@ var ee = (
681
681
  return c;
682
682
  return c.signum() < 0 ? c.add(t) : c;
683
683
  }, i.prototype.pow = function(t) {
684
- return this.exp(t, new Fn());
684
+ return this.exp(t, new jn());
685
685
  }, i.prototype.gcd = function(t) {
686
686
  var e = this.s < 0 ? this.negate() : this.clone(), n = t.s < 0 ? t.negate() : t.clone();
687
687
  if (e.compareTo(n) < 0) {
@@ -696,19 +696,19 @@ var ee = (
696
696
  return a > 0 && n.lShiftTo(a, n), n;
697
697
  }, i.prototype.isProbablePrime = function(t) {
698
698
  var e, n = this.abs();
699
- if (n.t == 1 && n[0] <= L[L.length - 1]) {
700
- for (e = 0; e < L.length; ++e)
701
- if (n[0] == L[e])
699
+ if (n.t == 1 && n[0] <= U[U.length - 1]) {
700
+ for (e = 0; e < U.length; ++e)
701
+ if (n[0] == U[e])
702
702
  return !0;
703
703
  return !1;
704
704
  }
705
705
  if (n.isEven())
706
706
  return !1;
707
- for (e = 1; e < L.length; ) {
708
- for (var r = L[e], s = e + 1; s < L.length && r < Mn; )
709
- r *= L[s++];
707
+ for (e = 1; e < U.length; ) {
708
+ for (var r = U[e], s = e + 1; s < U.length && r < kn; )
709
+ r *= U[s++];
710
710
  for (r = n.modInt(r); e < s; )
711
- if (r % L[e++] == 0)
711
+ if (r % U[e++] == 0)
712
712
  return !1;
713
713
  }
714
714
  return n.millerRabin(t);
@@ -819,14 +819,14 @@ var ee = (
819
819
  u > 0 ? (r.lShiftTo(u, a), s.lShiftTo(u, n)) : (r.copyTo(a), s.copyTo(n));
820
820
  var l = a.t, f = a[l - 1];
821
821
  if (f != 0) {
822
- var d = f * (1 << this.F1) + (l > 1 ? a[l - 2] >> this.F2 : 0), g = this.FV / d, P = (1 << this.F1) / d, m = 1 << this.F2, _ = n.t, b = _ - l, w = e ?? S();
823
- for (a.dlShiftTo(b, w), n.compareTo(w) >= 0 && (n[n.t++] = 1, n.subTo(w, n)), i.ONE.dlShiftTo(l, w), w.subTo(a, a); a.t < l; )
822
+ var d = f * (1 << this.F1) + (l > 1 ? a[l - 2] >> this.F2 : 0), g = this.FV / d, P = (1 << this.F1) / d, m = 1 << this.F2, _ = n.t, b = _ - l, v = e ?? S();
823
+ for (a.dlShiftTo(b, v), n.compareTo(v) >= 0 && (n[n.t++] = 1, n.subTo(v, n)), i.ONE.dlShiftTo(l, v), v.subTo(a, a); a.t < l; )
824
824
  a[a.t++] = 0;
825
825
  for (; --b >= 0; ) {
826
826
  var T = n[--_] == f ? this.DM : Math.floor(n[_] * g + (n[_ - 1] + m) * P);
827
827
  if ((n[_] += a.am(0, T, n, b, 0, l)) < T)
828
- for (a.dlShiftTo(b, w), n.subTo(w, n); n[_] < --T; )
829
- n.subTo(w, n);
828
+ for (a.dlShiftTo(b, v), n.subTo(v, n); n[_] < --T; )
829
+ n.subTo(v, n);
830
830
  }
831
831
  e != null && (n.drShiftTo(l, e), o != c && i.ZERO.subTo(e, e)), n.t = l, n.clamp(), u > 0 && n.rShiftTo(u, n), o < 0 && i.ZERO.subTo(n, n);
832
832
  }
@@ -956,9 +956,9 @@ var ee = (
956
956
  if (n <= 0)
957
957
  return !1;
958
958
  var r = e.shiftRight(n);
959
- t = t + 1 >> 1, t > L.length && (t = L.length);
959
+ t = t + 1 >> 1, t > U.length && (t = U.length);
960
960
  for (var s = S(), a = 0; a < t; ++a) {
961
- s.fromInt(L[Math.floor(Math.random() * L.length)]);
961
+ s.fromInt(U[Math.floor(Math.random() * U.length)]);
962
962
  var o = s.modPow(r, this);
963
963
  if (o.compareTo(i.ONE) != 0 && o.compareTo(e) != 0) {
964
964
  for (var c = 1; c++ < n && o.compareTo(e) != 0; )
@@ -1009,7 +1009,7 @@ var ee = (
1009
1009
  }
1010
1010
  }, i;
1011
1011
  })()
1012
- ), Fn = (
1012
+ ), jn = (
1013
1013
  /** @class */
1014
1014
  (function() {
1015
1015
  function i() {
@@ -1024,7 +1024,7 @@ var ee = (
1024
1024
  t.squareTo(e);
1025
1025
  }, i;
1026
1026
  })()
1027
- ), Ne = (
1027
+ ), Be = (
1028
1028
  /** @class */
1029
1029
  (function() {
1030
1030
  function i(t) {
@@ -1042,7 +1042,7 @@ var ee = (
1042
1042
  t.squareTo(e), this.reduce(e);
1043
1043
  }, i;
1044
1044
  })()
1045
- ), Be = (
1045
+ ), xe = (
1046
1046
  /** @class */
1047
1047
  (function() {
1048
1048
  function i(t) {
@@ -1050,7 +1050,7 @@ var ee = (
1050
1050
  }
1051
1051
  return i.prototype.convert = function(t) {
1052
1052
  var e = S();
1053
- return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(v.ZERO) > 0 && this.m.subTo(e, e), e;
1053
+ return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(w.ZERO) > 0 && this.m.subTo(e, e), e;
1054
1054
  }, i.prototype.revert = function(t) {
1055
1055
  var e = S();
1056
1056
  return t.copyTo(e), this.reduce(e), e;
@@ -1069,11 +1069,11 @@ var ee = (
1069
1069
  t.squareTo(e), this.reduce(e);
1070
1070
  }, i;
1071
1071
  })()
1072
- ), kn = (
1072
+ ), qn = (
1073
1073
  /** @class */
1074
1074
  (function() {
1075
1075
  function i(t) {
1076
- this.m = t, this.r2 = S(), this.q3 = S(), v.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
1076
+ this.m = t, this.r2 = S(), this.q3 = S(), w.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
1077
1077
  }
1078
1078
  return i.prototype.convert = function(t) {
1079
1079
  if (t.s < 0 || t.t > 2 * this.m.t)
@@ -1097,38 +1097,38 @@ var ee = (
1097
1097
  })()
1098
1098
  );
1099
1099
  function S() {
1100
- return new v(null);
1100
+ return new w(null);
1101
1101
  }
1102
1102
  function O(i, t) {
1103
- return new v(i, t);
1103
+ return new w(i, t);
1104
1104
  }
1105
- var xe = typeof navigator < "u";
1106
- xe && Ie && navigator.appName == "Microsoft Internet Explorer" ? (v.prototype.am = function(t, e, n, r, s, a) {
1105
+ var Le = typeof navigator < "u";
1106
+ Le && Ne && navigator.appName == "Microsoft Internet Explorer" ? (w.prototype.am = function(t, e, n, r, s, a) {
1107
1107
  for (var o = e & 32767, c = e >> 15; --a >= 0; ) {
1108
1108
  var u = this[t] & 32767, l = this[t++] >> 15, f = c * u + l * o;
1109
1109
  u = o * u + ((f & 32767) << 15) + n[r] + (s & 1073741823), s = (u >>> 30) + (f >>> 15) + c * l + (s >>> 30), n[r++] = u & 1073741823;
1110
1110
  }
1111
1111
  return s;
1112
- }, rt = 30) : xe && Ie && navigator.appName != "Netscape" ? (v.prototype.am = function(t, e, n, r, s, a) {
1112
+ }, rt = 30) : Le && Ne && navigator.appName != "Netscape" ? (w.prototype.am = function(t, e, n, r, s, a) {
1113
1113
  for (; --a >= 0; ) {
1114
1114
  var o = e * this[t++] + n[r] + s;
1115
1115
  s = Math.floor(o / 67108864), n[r++] = o & 67108863;
1116
1116
  }
1117
1117
  return s;
1118
- }, rt = 26) : (v.prototype.am = function(t, e, n, r, s, a) {
1118
+ }, rt = 26) : (w.prototype.am = function(t, e, n, r, s, a) {
1119
1119
  for (var o = e & 16383, c = e >> 14; --a >= 0; ) {
1120
1120
  var u = this[t] & 16383, l = this[t++] >> 14, f = c * u + l * o;
1121
1121
  u = o * u + ((f & 16383) << 14) + n[r] + s, s = (u >> 28) + (f >> 14) + c * l, n[r++] = u & 268435455;
1122
1122
  }
1123
1123
  return s;
1124
1124
  }, rt = 28);
1125
- v.prototype.DB = rt;
1126
- v.prototype.DM = (1 << rt) - 1;
1127
- v.prototype.DV = 1 << rt;
1125
+ w.prototype.DB = rt;
1126
+ w.prototype.DM = (1 << rt) - 1;
1127
+ w.prototype.DV = 1 << rt;
1128
1128
  var _e = 52;
1129
- v.prototype.FV = Math.pow(2, _e);
1130
- v.prototype.F1 = _e - rt;
1131
- v.prototype.F2 = 2 * rt - _e;
1129
+ w.prototype.FV = Math.pow(2, _e);
1130
+ w.prototype.F1 = _e - rt;
1131
+ w.prototype.F2 = 2 * rt - _e;
1132
1132
  var Xt = [], bt, q;
1133
1133
  bt = 48;
1134
1134
  for (q = 0; q <= 9; ++q)
@@ -1151,9 +1151,9 @@ function xt(i) {
1151
1151
  var t = 1, e;
1152
1152
  return (e = i >>> 16) != 0 && (i = e, t += 16), (e = i >> 8) != 0 && (i = e, t += 8), (e = i >> 4) != 0 && (i = e, t += 4), (e = i >> 2) != 0 && (i = e, t += 2), (e = i >> 1) != 0 && (i = e, t += 1), t;
1153
1153
  }
1154
- v.ZERO = nt(0);
1155
- v.ONE = nt(1);
1156
- var jn = (
1154
+ w.ZERO = nt(0);
1155
+ w.ONE = nt(1);
1156
+ var Kn = (
1157
1157
  /** @class */
1158
1158
  (function() {
1159
1159
  function i() {
@@ -1172,20 +1172,20 @@ var jn = (
1172
1172
  }, i;
1173
1173
  })()
1174
1174
  );
1175
- function qn() {
1176
- return new jn();
1175
+ function Hn() {
1176
+ return new Kn();
1177
1177
  }
1178
- var en = 256, Ut, it = null, H;
1178
+ var nn = 256, Lt, it = null, H;
1179
1179
  if (it == null) {
1180
1180
  it = [], H = 0;
1181
- var Lt = void 0;
1181
+ var Ut = void 0;
1182
1182
  if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
1183
1183
  var ne = new Uint32Array(256);
1184
- for (self.crypto.getRandomValues(ne), Lt = 0; Lt < ne.length; ++Lt)
1185
- it[H++] = ne[Lt] & 255;
1184
+ for (self.crypto.getRandomValues(ne), Ut = 0; Ut < ne.length; ++Ut)
1185
+ it[H++] = ne[Ut] & 255;
1186
1186
  }
1187
1187
  var Vt = 0, Mt = function(i) {
1188
- if (Vt = Vt || 0, Vt >= 256 || H >= en) {
1188
+ if (Vt = Vt || 0, Vt >= 256 || H >= nn) {
1189
1189
  self.removeEventListener ? self.removeEventListener("mousemove", Mt, !1) : self.detachEvent && self.detachEvent("onmousemove", Mt);
1190
1190
  return;
1191
1191
  }
@@ -1197,17 +1197,17 @@ if (it == null) {
1197
1197
  };
1198
1198
  typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Mt, !1) : self.attachEvent && self.attachEvent("onmousemove", Mt));
1199
1199
  }
1200
- function Kn() {
1201
- if (Ut == null) {
1202
- for (Ut = qn(); H < en; ) {
1200
+ function Wn() {
1201
+ if (Lt == null) {
1202
+ for (Lt = Hn(); H < nn; ) {
1203
1203
  var i = Math.floor(65536 * Math.random());
1204
1204
  it[H++] = i & 255;
1205
1205
  }
1206
- for (Ut.init(it), H = 0; H < it.length; ++H)
1206
+ for (Lt.init(it), H = 0; H < it.length; ++H)
1207
1207
  it[H] = 0;
1208
1208
  H = 0;
1209
1209
  }
1210
- return Ut.next();
1210
+ return Lt.next();
1211
1211
  }
1212
1212
  var Ht = (
1213
1213
  /** @class */
@@ -1216,62 +1216,62 @@ var Ht = (
1216
1216
  }
1217
1217
  return i.prototype.nextBytes = function(t) {
1218
1218
  for (var e = 0; e < t.length; ++e)
1219
- t[e] = Kn();
1219
+ t[e] = Wn();
1220
1220
  }, i;
1221
1221
  })()
1222
1222
  );
1223
1223
  function ue(i) {
1224
- return Wn(Yn(Hn(i), i.length * 8));
1224
+ return zn(ei(Xn(i), i.length * 8));
1225
1225
  }
1226
- function Le(i) {
1226
+ function Ve(i) {
1227
1227
  for (var t = "0123456789abcdef", e = "", n = 0; n < i.length; n++) {
1228
1228
  var r = i.charCodeAt(n);
1229
1229
  e += t.charAt(r >>> 4 & 15) + t.charAt(r & 15);
1230
1230
  }
1231
1231
  return e;
1232
1232
  }
1233
- function Hn(i) {
1233
+ function Xn(i) {
1234
1234
  for (var t = Array(i.length >> 2), e = 0; e < t.length; e++)
1235
1235
  t[e] = 0;
1236
1236
  for (var e = 0; e < i.length * 8; e += 8)
1237
1237
  t[e >> 5] |= (i.charCodeAt(e / 8) & 255) << 24 - e % 32;
1238
1238
  return t;
1239
1239
  }
1240
- function Wn(i) {
1240
+ function zn(i) {
1241
1241
  for (var t = "", e = 0; e < i.length * 32; e += 8)
1242
1242
  t += String.fromCharCode(i[e >> 5] >>> 24 - e % 32 & 255);
1243
1243
  return t;
1244
1244
  }
1245
- function $(i, t) {
1245
+ function J(i, t) {
1246
1246
  return i >>> t | i << 32 - t;
1247
1247
  }
1248
- function nn(i, t) {
1248
+ function rn(i, t) {
1249
1249
  return i >>> t;
1250
1250
  }
1251
- function Xn(i, t, e) {
1251
+ function Gn(i, t, e) {
1252
1252
  return i & t ^ ~i & e;
1253
1253
  }
1254
- function zn(i, t, e) {
1254
+ function $n(i, t, e) {
1255
1255
  return i & t ^ i & e ^ t & e;
1256
1256
  }
1257
- function Gn(i) {
1258
- return $(i, 2) ^ $(i, 13) ^ $(i, 22);
1259
- }
1260
- function $n(i) {
1261
- return $(i, 6) ^ $(i, 11) ^ $(i, 25);
1262
- }
1263
1257
  function Jn(i) {
1264
- return $(i, 7) ^ $(i, 18) ^ nn(i, 3);
1258
+ return J(i, 2) ^ J(i, 13) ^ J(i, 22);
1265
1259
  }
1266
1260
  function Qn(i) {
1267
- return $(i, 17) ^ $(i, 19) ^ nn(i, 10);
1261
+ return J(i, 6) ^ J(i, 11) ^ J(i, 25);
1262
+ }
1263
+ function Zn(i) {
1264
+ return J(i, 7) ^ J(i, 18) ^ rn(i, 3);
1268
1265
  }
1269
- var Zn = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998);
1270
- function Yn(i, t) {
1266
+ function Yn(i) {
1267
+ return J(i, 17) ^ J(i, 19) ^ rn(i, 10);
1268
+ }
1269
+ var ti = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998);
1270
+ function ei(i, t) {
1271
1271
  var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), n = new Array(64), r, s, a, o, c, u, l, f, d, g, P, m;
1272
1272
  for (i[t >> 5] |= 128 << 24 - t % 32, i[(t + 64 >> 9 << 4) + 15] = t, d = 0; d < i.length; d += 16) {
1273
1273
  for (r = e[0], s = e[1], a = e[2], o = e[3], c = e[4], u = e[5], l = e[6], f = e[7], g = 0; g < 64; g++)
1274
- g < 16 ? n[g] = i[g + d] : n[g] = N(N(N(Qn(n[g - 2]), n[g - 7]), Jn(n[g - 15])), n[g - 16]), P = N(N(N(N(f, $n(c)), Xn(c, u, l)), Zn[g]), n[g]), m = N(Gn(r), zn(r, s, a)), f = l, l = u, u = c, c = N(o, P), o = a, a = s, s = r, r = N(P, m);
1274
+ g < 16 ? n[g] = i[g + d] : n[g] = N(N(N(Yn(n[g - 2]), n[g - 7]), Zn(n[g - 15])), n[g - 16]), P = N(N(N(N(f, Qn(c)), Gn(c, u, l)), ti[g]), n[g]), m = N(Jn(r), $n(r, s, a)), f = l, l = u, u = c, c = N(o, P), o = a, a = s, s = r, r = N(P, m);
1275
1275
  e[0] = N(r, e[0]), e[1] = N(s, e[1]), e[2] = N(a, e[2]), e[3] = N(o, e[3]), e[4] = N(c, e[4]), e[5] = N(u, e[5]), e[6] = N(l, e[6]), e[7] = N(f, e[7]);
1276
1276
  }
1277
1277
  return e;
@@ -1280,7 +1280,7 @@ function N(i, t) {
1280
1280
  var e = (i & 65535) + (t & 65535), n = (i >> 16) + (t >> 16) + (e >> 16);
1281
1281
  return n << 16 | e & 65535;
1282
1282
  }
1283
- function ti(i, t) {
1283
+ function ni(i, t) {
1284
1284
  if (t < i.length + 22)
1285
1285
  return console.error("Message too long for RSA"), null;
1286
1286
  for (var e = t - i.length - 6, n = "", r = 0; r < e; r += 2)
@@ -1288,7 +1288,7 @@ function ti(i, t) {
1288
1288
  var s = "0001" + n + "00" + i;
1289
1289
  return O(s, 16);
1290
1290
  }
1291
- function ei(i, t) {
1291
+ function ii(i, t) {
1292
1292
  if (t < i.length + 11)
1293
1293
  return console.error("Message too long for RSA"), null;
1294
1294
  for (var e = [], n = i.length - 1; n >= 0 && t > 0; ) {
@@ -1301,9 +1301,9 @@ function ei(i, t) {
1301
1301
  s.nextBytes(a);
1302
1302
  e[--t] = a[0];
1303
1303
  }
1304
- return e[--t] = 2, e[--t] = 0, new v(e);
1304
+ return e[--t] = 2, e[--t] = 0, new w(e);
1305
1305
  }
1306
- function Ve(i, t, e) {
1306
+ function Me(i, t, e) {
1307
1307
  for (var n = "", r = 0; n.length < t; )
1308
1308
  n += e(String.fromCharCode.apply(String, i.concat([
1309
1309
  (r & 4278190080) >> 24,
@@ -1313,9 +1313,9 @@ function Ve(i, t, e) {
1313
1313
  ]))), r += 1;
1314
1314
  return n;
1315
1315
  }
1316
- var ni = 32;
1317
- function ii(i, t) {
1318
- var e = ni, n = ue;
1316
+ var ri = 32;
1317
+ function si(i, t) {
1318
+ var e = ri, n = ue;
1319
1319
  if (i.length + 2 * e + 2 > t)
1320
1320
  throw "Message too long for RSA";
1321
1321
  var r = "", s;
@@ -1323,15 +1323,15 @@ function ii(i, t) {
1323
1323
  r += "\0";
1324
1324
  var a = n("") + r + "" + i, o = new Array(e);
1325
1325
  new Ht().nextBytes(o);
1326
- var c = Ve(o, a.length, n), u = [];
1326
+ var c = Me(o, a.length, n), u = [];
1327
1327
  for (s = 0; s < a.length; s += 1)
1328
1328
  u[s] = a.charCodeAt(s) ^ c.charCodeAt(s);
1329
- var l = Ve(u, o.length, n), f = [0];
1329
+ var l = Me(u, o.length, n), f = [0];
1330
1330
  for (s = 0; s < o.length; s += 1)
1331
1331
  f[s + 1] = o[s] ^ l.charCodeAt(s);
1332
- return new v(f.concat(u));
1332
+ return new w(f.concat(u));
1333
1333
  }
1334
- var ri = (
1334
+ var ai = (
1335
1335
  /** @class */
1336
1336
  (function() {
1337
1337
  function i() {
@@ -1348,7 +1348,7 @@ var ri = (
1348
1348
  }, i.prototype.setPublic = function(t, e) {
1349
1349
  t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = O(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
1350
1350
  }, i.prototype.encrypt = function(t, e) {
1351
- typeof e > "u" && (e = ei);
1351
+ typeof e > "u" && (e = ii);
1352
1352
  var n = this.n.bitLength() + 7 >> 3, r = e(t, n);
1353
1353
  if (r == null)
1354
1354
  return null;
@@ -1365,47 +1365,47 @@ var ri = (
1365
1365
  }, i.prototype.generate = function(t, e) {
1366
1366
  var n = new Ht(), r = t >> 1;
1367
1367
  this.e = parseInt(e, 16);
1368
- for (var s = new v(e, 16); ; ) {
1369
- for (; this.p = new v(t - r, 1, n), !(this.p.subtract(v.ONE).gcd(s).compareTo(v.ONE) == 0 && this.p.isProbablePrime(10)); )
1368
+ for (var s = new w(e, 16); ; ) {
1369
+ for (; this.p = new w(t - r, 1, n), !(this.p.subtract(w.ONE).gcd(s).compareTo(w.ONE) == 0 && this.p.isProbablePrime(10)); )
1370
1370
  ;
1371
- for (; this.q = new v(r, 1, n), !(this.q.subtract(v.ONE).gcd(s).compareTo(v.ONE) == 0 && this.q.isProbablePrime(10)); )
1371
+ for (; this.q = new w(r, 1, n), !(this.q.subtract(w.ONE).gcd(s).compareTo(w.ONE) == 0 && this.q.isProbablePrime(10)); )
1372
1372
  ;
1373
1373
  if (this.p.compareTo(this.q) <= 0) {
1374
1374
  var a = this.p;
1375
1375
  this.p = this.q, this.q = a;
1376
1376
  }
1377
- var o = this.p.subtract(v.ONE), c = this.q.subtract(v.ONE), u = o.multiply(c);
1378
- if (u.gcd(s).compareTo(v.ONE) == 0) {
1377
+ var o = this.p.subtract(w.ONE), c = this.q.subtract(w.ONE), u = o.multiply(c);
1378
+ if (u.gcd(s).compareTo(w.ONE) == 0) {
1379
1379
  this.n = this.p.multiply(this.q), this.d = s.modInverse(u), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(c), this.coeff = this.q.modInverse(this.p);
1380
1380
  break;
1381
1381
  }
1382
1382
  }
1383
1383
  }, i.prototype.decrypt = function(t) {
1384
1384
  var e = O(t, 16), n = this.doPrivate(e);
1385
- return n == null ? null : si(n, this.n.bitLength() + 7 >> 3);
1385
+ return n == null ? null : oi(n, this.n.bitLength() + 7 >> 3);
1386
1386
  }, i.prototype.generateAsync = function(t, e, n) {
1387
1387
  var r = new Ht(), s = t >> 1;
1388
1388
  this.e = parseInt(e, 16);
1389
- var a = new v(e, 16), o = this, c = function() {
1389
+ var a = new w(e, 16), o = this, c = function() {
1390
1390
  var u = function() {
1391
1391
  if (o.p.compareTo(o.q) <= 0) {
1392
1392
  var d = o.p;
1393
1393
  o.p = o.q, o.q = d;
1394
1394
  }
1395
- var g = o.p.subtract(v.ONE), P = o.q.subtract(v.ONE), m = g.multiply(P);
1396
- m.gcd(a).compareTo(v.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(m), o.dmp1 = o.d.mod(g), o.dmq1 = o.d.mod(P), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
1395
+ var g = o.p.subtract(w.ONE), P = o.q.subtract(w.ONE), m = g.multiply(P);
1396
+ m.gcd(a).compareTo(w.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(m), o.dmp1 = o.d.mod(g), o.dmq1 = o.d.mod(P), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
1397
1397
  n();
1398
1398
  }, 0)) : setTimeout(c, 0);
1399
1399
  }, l = function() {
1400
1400
  o.q = S(), o.q.fromNumberAsync(s, 1, r, function() {
1401
- o.q.subtract(v.ONE).gcda(a, function(d) {
1402
- d.compareTo(v.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(u, 0) : setTimeout(l, 0);
1401
+ o.q.subtract(w.ONE).gcda(a, function(d) {
1402
+ d.compareTo(w.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(u, 0) : setTimeout(l, 0);
1403
1403
  });
1404
1404
  });
1405
1405
  }, f = function() {
1406
1406
  o.p = S(), o.p.fromNumberAsync(t - s, 1, r, function() {
1407
- o.p.subtract(v.ONE).gcda(a, function(d) {
1408
- d.compareTo(v.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(f, 0);
1407
+ o.p.subtract(w.ONE).gcda(a, function(d) {
1408
+ d.compareTo(w.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(f, 0);
1409
1409
  });
1410
1410
  });
1411
1411
  };
@@ -1413,7 +1413,7 @@ var ri = (
1413
1413
  };
1414
1414
  setTimeout(c, 0);
1415
1415
  }, i.prototype.sign = function(t, e, n) {
1416
- var r = ai(n), s = r + e(t).toString(), a = this.n.bitLength() / 4, o = ti(s, a);
1416
+ var r = ci(n), s = r + e(t).toString(), a = this.n.bitLength() / 4, o = ni(s, a);
1417
1417
  if (o == null)
1418
1418
  return null;
1419
1419
  var c = this.doPrivate(o);
@@ -1426,12 +1426,12 @@ var ri = (
1426
1426
  var r = O(e, 16), s = this.doPublic(r);
1427
1427
  if (s == null)
1428
1428
  return null;
1429
- var a = s.toString(16).replace(/^1f+00/, ""), o = oi(a);
1429
+ var a = s.toString(16).replace(/^1f+00/, ""), o = ui(a);
1430
1430
  return o == n(t).toString();
1431
1431
  }, i;
1432
1432
  })()
1433
1433
  );
1434
- function si(i, t) {
1434
+ function oi(i, t) {
1435
1435
  for (var e = i.toByteArray(), n = 0; n < e.length && e[n] == 0; )
1436
1436
  ++n;
1437
1437
  if (e.length - n != t - 1 || e[n] != 2)
@@ -1455,10 +1455,10 @@ var kt = {
1455
1455
  sha512: "3051300d060960864801650304020305000440",
1456
1456
  ripemd160: "3021300906052b2403020105000414"
1457
1457
  };
1458
- function ai(i) {
1458
+ function ci(i) {
1459
1459
  return kt[i] || "";
1460
1460
  }
1461
- function oi(i) {
1461
+ function ui(i) {
1462
1462
  for (var t in kt)
1463
1463
  if (kt.hasOwnProperty(t)) {
1464
1464
  var e = kt[t], n = e.length;
@@ -1489,17 +1489,17 @@ p.asn1.ASN1Util = new function() {
1489
1489
  n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
1490
1490
  for (var r = "", s = 0; s < n; s++)
1491
1491
  r += "f";
1492
- var a = new v(r, 16), o = a.xor(i).add(v.ONE);
1492
+ var a = new w(r, 16), o = a.xor(i).add(w.ONE);
1493
1493
  t = o.toString(16).replace(/^-/, "");
1494
1494
  }
1495
1495
  return t;
1496
1496
  }, this.getPEMStringFromHex = function(i, t) {
1497
1497
  return hextopem(i, t);
1498
1498
  }, this.newObject = function(i) {
1499
- var t = p, e = t.asn1, n = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, u = e.DEREnumerated, l = e.DERUTF8String, f = e.DERNumericString, d = e.DERPrintableString, g = e.DERTeletexString, P = e.DERIA5String, m = e.DERUTCTime, _ = e.DERGeneralizedTime, b = e.DERSequence, w = e.DERSet, T = e.DERTaggedObject, A = e.ASN1Util.newObject, U = Object.keys(i);
1500
- if (U.length != 1)
1499
+ var t = p, e = t.asn1, n = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, u = e.DEREnumerated, l = e.DERUTF8String, f = e.DERNumericString, d = e.DERPrintableString, g = e.DERTeletexString, P = e.DERIA5String, m = e.DERUTCTime, _ = e.DERGeneralizedTime, b = e.DERSequence, v = e.DERSet, T = e.DERTaggedObject, A = e.ASN1Util.newObject, L = Object.keys(i);
1500
+ if (L.length != 1)
1501
1501
  throw "key of param shall be only one.";
1502
- var E = U[0];
1502
+ var E = L[0];
1503
1503
  if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + E + ":") == -1)
1504
1504
  throw "undefined key: " + E;
1505
1505
  if (E == "bool")
@@ -1531,18 +1531,18 @@ p.asn1.ASN1Util = new function() {
1531
1531
  if (E == "gentime")
1532
1532
  return new _(i[E]);
1533
1533
  if (E == "seq") {
1534
- for (var K = i[E], J = [], X = 0; X < K.length; X++) {
1534
+ for (var K = i[E], Q = [], X = 0; X < K.length; X++) {
1535
1535
  var F = A(K[X]);
1536
- J.push(F);
1536
+ Q.push(F);
1537
1537
  }
1538
- return new b({ array: J });
1538
+ return new b({ array: Q });
1539
1539
  }
1540
1540
  if (E == "set") {
1541
- for (var K = i[E], J = [], X = 0; X < K.length; X++) {
1541
+ for (var K = i[E], Q = [], X = 0; X < K.length; X++) {
1542
1542
  var F = A(K[X]);
1543
- J.push(F);
1543
+ Q.push(F);
1544
1544
  }
1545
- return new w({ array: J });
1545
+ return new v({ array: Q });
1546
1546
  }
1547
1547
  if (E == "tag") {
1548
1548
  var I = i[E];
@@ -1569,7 +1569,7 @@ p.asn1.ASN1Util.oidHexToInt = function(i) {
1569
1569
  for (var r = "", t = parseInt(i.substring(0, 2), 16), e = Math.floor(t / 40), n = t % 40, r = e + "." + n, s = "", a = 2; a < i.length; a += 2) {
1570
1570
  var o = parseInt(i.substring(a, a + 2), 16), c = ("00000000" + o.toString(2)).slice(-8);
1571
1571
  if (s = s + c.substring(1, 8), c.substring(0, 1) == "0") {
1572
- var u = new v(s, 2);
1572
+ var u = new w(s, 2);
1573
1573
  r = r + "." + u.toString(10), s = "";
1574
1574
  }
1575
1575
  }
@@ -1580,7 +1580,7 @@ p.asn1.ASN1Util.oidIntToHex = function(i) {
1580
1580
  var c = o.toString(16);
1581
1581
  return c.length == 1 && (c = "0" + c), c;
1582
1582
  }, e = function(o) {
1583
- var c = "", u = new v(o, 10), l = u.toString(2), f = 7 - l.length % 7;
1583
+ var c = "", u = new w(o, 10), l = u.toString(2), f = 7 - l.length % 7;
1584
1584
  f == 7 && (f = 0);
1585
1585
  for (var d = "", g = 0; g < f; g++)
1586
1586
  d += "0";
@@ -1681,7 +1681,7 @@ p.asn1.DERInteger = function(i) {
1681
1681
  p.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(t) {
1682
1682
  this.hTLV = null, this.isModified = !0, this.hV = p.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
1683
1683
  }, this.setByInteger = function(t) {
1684
- var e = new v(String(t), 10);
1684
+ var e = new w(String(t), 10);
1685
1685
  this.setByBigInteger(e);
1686
1686
  }, this.setValueHex = function(t) {
1687
1687
  this.hV = t;
@@ -1743,7 +1743,7 @@ p.asn1.DERObjectIdentifier = function(i) {
1743
1743
  var r = n.toString(16);
1744
1744
  return r.length == 1 && (r = "0" + r), r;
1745
1745
  }, e = function(n) {
1746
- var r = "", s = new v(n, 10), a = s.toString(2), o = 7 - a.length % 7;
1746
+ var r = "", s = new w(n, 10), a = s.toString(2), o = 7 - a.length % 7;
1747
1747
  o == 7 && (o = 0);
1748
1748
  for (var c = "", u = 0; u < o; u++)
1749
1749
  c += "0";
@@ -1779,7 +1779,7 @@ p.asn1.DEREnumerated = function(i) {
1779
1779
  p.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(t) {
1780
1780
  this.hTLV = null, this.isModified = !0, this.hV = p.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
1781
1781
  }, this.setByInteger = function(t) {
1782
- var e = new v(String(t), 10);
1782
+ var e = new w(String(t), 10);
1783
1783
  this.setByBigInteger(e);
1784
1784
  }, this.setValueHex = function(t) {
1785
1785
  this.hV = t;
@@ -1852,7 +1852,7 @@ p.asn1.DERTaggedObject = function(i) {
1852
1852
  }, typeof i < "u" && (typeof i.tag < "u" && (this.hT = i.tag), typeof i.explicit < "u" && (this.isExplicit = i.explicit), typeof i.obj < "u" && (this.asn1Object = i.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
1853
1853
  };
1854
1854
  D(p.asn1.DERTaggedObject, p.asn1.ASN1Object);
1855
- var ci = /* @__PURE__ */ (function() {
1855
+ var li = /* @__PURE__ */ (function() {
1856
1856
  var i = function(t, e) {
1857
1857
  return i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
1858
1858
  n.__proto__ = r;
@@ -1869,17 +1869,17 @@ var ci = /* @__PURE__ */ (function() {
1869
1869
  }
1870
1870
  t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
1871
1871
  };
1872
- })(), Me = (
1872
+ })(), Fe = (
1873
1873
  /** @class */
1874
1874
  (function(i) {
1875
- ci(t, i);
1875
+ li(t, i);
1876
1876
  function t(e) {
1877
1877
  var n = i.call(this) || this;
1878
1878
  return e && (typeof e == "string" ? n.parseKey(e) : (t.hasPrivateKeyProperty(e) || t.hasPublicKeyProperty(e)) && n.parsePropertiesFrom(e)), n;
1879
1879
  }
1880
1880
  return t.prototype.parseKey = function(e) {
1881
1881
  try {
1882
- var n = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? Bn.decode(e) : ce.unarmor(e), o = Ln.decode(a);
1882
+ var n = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? Ln.decode(e) : ce.unarmor(e), o = Mn.decode(a);
1883
1883
  if (o.sub.length === 3 && (o = o.sub[2].sub[0]), o.sub.length === 9) {
1884
1884
  n = o.sub[1].getHexStringValue(), this.n = O(n, 16), r = o.sub[2].getHexStringValue(), this.e = parseInt(r, 16);
1885
1885
  var c = o.sub[3].getHexStringValue();
@@ -1967,22 +1967,22 @@ var ci = /* @__PURE__ */ (function() {
1967
1967
  }, t.prototype.parsePropertiesFrom = function(e) {
1968
1968
  this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
1969
1969
  }, t;
1970
- })(ri)
1971
- ), ie, ui = typeof process < "u" ? (ie = process.env) === null || ie === void 0 ? void 0 : ie.npm_package_version : void 0, li = (
1970
+ })(ai)
1971
+ ), ie, hi = typeof process < "u" ? (ie = process.env) === null || ie === void 0 ? void 0 : ie.npm_package_version : void 0, fi = (
1972
1972
  /** @class */
1973
1973
  (function() {
1974
1974
  function i(t) {
1975
1975
  t === void 0 && (t = {}), this.default_key_size = t.default_key_size ? parseInt(t.default_key_size, 10) : 1024, this.default_public_exponent = t.default_public_exponent || "010001", this.log = t.log || !1, this.key = t.key || null;
1976
1976
  }
1977
1977
  return i.prototype.setKey = function(t) {
1978
- t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Me(t)) : !this.key && this.log && console.error("A key was not set.");
1978
+ t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Fe(t)) : !this.key && this.log && console.error("A key was not set.");
1979
1979
  }, i.prototype.setPrivateKey = function(t) {
1980
1980
  this.setKey(t);
1981
1981
  }, i.prototype.setPublicKey = function(t) {
1982
1982
  this.setKey(t);
1983
1983
  }, i.prototype.decrypt = function(t) {
1984
1984
  try {
1985
- return this.getKey().decrypt(Oe(t));
1985
+ return this.getKey().decrypt(De(t));
1986
1986
  } catch {
1987
1987
  return !1;
1988
1988
  }
@@ -1994,7 +1994,7 @@ var ci = /* @__PURE__ */ (function() {
1994
1994
  }
1995
1995
  }, i.prototype.encryptOAEP = function(t) {
1996
1996
  try {
1997
- return Tt(this.getKey().encrypt(t, ii));
1997
+ return Tt(this.getKey().encrypt(t, si));
1998
1998
  } catch {
1999
1999
  return !1;
2000
2000
  }
@@ -2009,24 +2009,24 @@ var ci = /* @__PURE__ */ (function() {
2009
2009
  }
2010
2010
  }, i.prototype.signSha256 = function(t) {
2011
2011
  return this.sign(t, function(e) {
2012
- return Le(ue(e));
2012
+ return Ve(ue(e));
2013
2013
  }, "sha256");
2014
2014
  }, i.prototype.verify = function(t, e, n) {
2015
2015
  n === void 0 && (n = function(r) {
2016
2016
  return r;
2017
2017
  });
2018
2018
  try {
2019
- return this.getKey().verify(t, Oe(e), n);
2019
+ return this.getKey().verify(t, De(e), n);
2020
2020
  } catch {
2021
2021
  return !1;
2022
2022
  }
2023
2023
  }, i.prototype.verifySha256 = function(t, e) {
2024
2024
  return this.verify(t, e, function(n) {
2025
- return Le(ue(n));
2025
+ return Ve(ue(n));
2026
2026
  });
2027
2027
  }, i.prototype.getKey = function(t) {
2028
2028
  if (!this.key) {
2029
- if (this.key = new Me(), t && {}.toString.call(t) === "[object Function]") {
2029
+ if (this.key = new Fe(), t && {}.toString.call(t) === "[object Function]") {
2030
2030
  this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
2031
2031
  return;
2032
2032
  }
@@ -2041,32 +2041,32 @@ var ci = /* @__PURE__ */ (function() {
2041
2041
  return this.getKey().getPublicKey();
2042
2042
  }, i.prototype.getPublicKeyB64 = function() {
2043
2043
  return this.getKey().getPublicBaseKeyB64();
2044
- }, i.version = ui, i;
2044
+ }, i.version = hi, i;
2045
2045
  })()
2046
2046
  );
2047
- function rn(i, t) {
2047
+ function sn(i, t) {
2048
2048
  return function() {
2049
2049
  return i.apply(t, arguments);
2050
2050
  };
2051
2051
  }
2052
- const { toString: hi } = Object.prototype, { getPrototypeOf: zt } = Object, { iterator: Gt, toStringTag: sn } = Symbol, $t = /* @__PURE__ */ ((i) => (t) => {
2053
- const e = hi.call(t);
2052
+ const { toString: pi } = Object.prototype, { getPrototypeOf: zt } = Object, { iterator: Gt, toStringTag: an } = Symbol, $t = /* @__PURE__ */ ((i) => (t) => {
2053
+ const e = pi.call(t);
2054
2054
  return i[e] || (i[e] = e.slice(8, -1).toLowerCase());
2055
2055
  })(/* @__PURE__ */ Object.create(null)), W = (i) => (i = i.toLowerCase(), (t) => $t(t) === i), Jt = (i) => (t) => typeof t === i, { isArray: Pt } = Array, yt = Jt("undefined");
2056
2056
  function At(i) {
2057
2057
  return i !== null && !yt(i) && i.constructor !== null && !yt(i.constructor) && M(i.constructor.isBuffer) && i.constructor.isBuffer(i);
2058
2058
  }
2059
- const an = W("ArrayBuffer");
2060
- function fi(i) {
2059
+ const on = W("ArrayBuffer");
2060
+ function di(i) {
2061
2061
  let t;
2062
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(i) : t = i && i.buffer && an(i.buffer), t;
2062
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(i) : t = i && i.buffer && on(i.buffer), t;
2063
2063
  }
2064
- const pi = Jt("string"), M = Jt("function"), on = Jt("number"), Rt = (i) => i !== null && typeof i == "object", di = (i) => i === !0 || i === !1, jt = (i) => {
2064
+ const _i = Jt("string"), M = Jt("function"), cn = Jt("number"), Rt = (i) => i !== null && typeof i == "object", gi = (i) => i === !0 || i === !1, jt = (i) => {
2065
2065
  if ($t(i) !== "object")
2066
2066
  return !1;
2067
2067
  const t = zt(i);
2068
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(sn in i) && !(Gt in i);
2069
- }, _i = (i) => {
2068
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(an in i) && !(Gt in i);
2069
+ }, mi = (i) => {
2070
2070
  if (!Rt(i) || At(i))
2071
2071
  return !1;
2072
2072
  try {
@@ -2074,24 +2074,24 @@ const pi = Jt("string"), M = Jt("function"), on = Jt("number"), Rt = (i) => i !=
2074
2074
  } catch {
2075
2075
  return !1;
2076
2076
  }
2077
- }, gi = W("Date"), mi = W("File"), yi = (i) => !!(i && typeof i.uri < "u"), bi = (i) => i && typeof i.getParts < "u", Pi = W("Blob"), Ei = W("FileList"), vi = (i) => Rt(i) && M(i.pipe);
2078
- function wi() {
2077
+ }, yi = W("Date"), bi = W("File"), Pi = (i) => !!(i && typeof i.uri < "u"), Ei = (i) => i && typeof i.getParts < "u", wi = W("Blob"), vi = W("FileList"), Si = (i) => Rt(i) && M(i.pipe);
2078
+ function Ti() {
2079
2079
  return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
2080
2080
  }
2081
- const Fe = wi(), ke = typeof Fe.FormData < "u" ? Fe.FormData : void 0, Si = (i) => {
2081
+ const ke = Ti(), je = typeof ke.FormData < "u" ? ke.FormData : void 0, Ai = (i) => {
2082
2082
  if (!i) return !1;
2083
- if (ke && i instanceof ke) return !0;
2083
+ if (je && i instanceof je) return !0;
2084
2084
  const t = zt(i);
2085
2085
  if (!t || t === Object.prototype || !M(i.append)) return !1;
2086
2086
  const e = $t(i);
2087
2087
  return e === "formdata" || // detect form-data instance
2088
2088
  e === "object" && M(i.toString) && i.toString() === "[object FormData]";
2089
- }, Ti = W("URLSearchParams"), [Ai, Ri, Ci, Oi] = [
2089
+ }, Ri = W("URLSearchParams"), [Ci, Oi, Di, Ii] = [
2090
2090
  "ReadableStream",
2091
2091
  "Request",
2092
2092
  "Response",
2093
2093
  "Headers"
2094
- ].map(W), Di = (i) => i.trim ? i.trim() : i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
2094
+ ].map(W), Ni = (i) => i.trim ? i.trim() : i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
2095
2095
  function Ct(i, t, { allOwnKeys: e = !1 } = {}) {
2096
2096
  if (i === null || typeof i > "u")
2097
2097
  return;
@@ -2108,7 +2108,7 @@ function Ct(i, t, { allOwnKeys: e = !1 } = {}) {
2108
2108
  o = s[n], t.call(null, i[o], o, i);
2109
2109
  }
2110
2110
  }
2111
- function cn(i, t) {
2111
+ function un(i, t) {
2112
2112
  if (At(i))
2113
2113
  return null;
2114
2114
  t = t.toLowerCase();
@@ -2119,26 +2119,26 @@ function cn(i, t) {
2119
2119
  return r;
2120
2120
  return null;
2121
2121
  }
2122
- const ct = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, un = (i) => !yt(i) && i !== ct;
2122
+ const ct = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ln = (i) => !yt(i) && i !== ct;
2123
2123
  function le(...i) {
2124
- const { caseless: t, skipUndefined: e } = un(this) && this || {}, n = {}, r = (s, a) => {
2124
+ const { caseless: t, skipUndefined: e } = ln(this) && this || {}, n = {}, r = (s, a) => {
2125
2125
  if (a === "__proto__" || a === "constructor" || a === "prototype")
2126
2126
  return;
2127
- const o = t && cn(n, a) || a, c = he(n, o) ? n[o] : void 0;
2127
+ const o = t && un(n, a) || a, c = he(n, o) ? n[o] : void 0;
2128
2128
  jt(c) && jt(s) ? n[o] = le(c, s) : jt(s) ? n[o] = le({}, s) : Pt(s) ? n[o] = s.slice() : (!e || !yt(s)) && (n[o] = s);
2129
2129
  };
2130
2130
  for (let s = 0, a = i.length; s < a; s++)
2131
2131
  i[s] && Ct(i[s], r);
2132
2132
  return n;
2133
2133
  }
2134
- const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
2134
+ const Bi = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
2135
2135
  t,
2136
2136
  (r, s) => {
2137
2137
  e && M(r) ? Object.defineProperty(i, s, {
2138
2138
  // Null-proto descriptor so a polluted Object.prototype.get cannot
2139
2139
  // hijack defineProperty's accessor-vs-data resolution.
2140
2140
  __proto__: null,
2141
- value: rn(r, e),
2141
+ value: sn(r, e),
2142
2142
  writable: !0,
2143
2143
  enumerable: !0,
2144
2144
  configurable: !0
@@ -2151,7 +2151,7 @@ const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
2151
2151
  });
2152
2152
  },
2153
2153
  { allOwnKeys: n }
2154
- ), i), Ni = (i) => (i.charCodeAt(0) === 65279 && (i = i.slice(1)), i), Bi = (i, t, e, n) => {
2154
+ ), i), xi = (i) => (i.charCodeAt(0) === 65279 && (i = i.slice(1)), i), Li = (i, t, e, n) => {
2155
2155
  i.prototype = Object.create(t.prototype, n), Object.defineProperty(i.prototype, "constructor", {
2156
2156
  __proto__: null,
2157
2157
  value: i,
@@ -2162,7 +2162,7 @@ const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
2162
2162
  __proto__: null,
2163
2163
  value: t.prototype
2164
2164
  }), e && Object.assign(i.prototype, e);
2165
- }, xi = (i, t, e, n) => {
2165
+ }, Ui = (i, t, e, n) => {
2166
2166
  let r, s, a;
2167
2167
  const o = {};
2168
2168
  if (t = t || {}, i == null) return t;
@@ -2172,42 +2172,42 @@ const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
2172
2172
  i = e !== !1 && zt(i);
2173
2173
  } while (i && (!e || e(i, t)) && i !== Object.prototype);
2174
2174
  return t;
2175
- }, Ui = (i, t, e) => {
2175
+ }, Vi = (i, t, e) => {
2176
2176
  i = String(i), (e === void 0 || e > i.length) && (e = i.length), e -= t.length;
2177
2177
  const n = i.indexOf(t, e);
2178
2178
  return n !== -1 && n === e;
2179
- }, Li = (i) => {
2179
+ }, Mi = (i) => {
2180
2180
  if (!i) return null;
2181
2181
  if (Pt(i)) return i;
2182
2182
  let t = i.length;
2183
- if (!on(t)) return null;
2183
+ if (!cn(t)) return null;
2184
2184
  const e = new Array(t);
2185
2185
  for (; t-- > 0; )
2186
2186
  e[t] = i[t];
2187
2187
  return e;
2188
- }, Vi = /* @__PURE__ */ ((i) => (t) => i && t instanceof i)(typeof Uint8Array < "u" && zt(Uint8Array)), Mi = (i, t) => {
2188
+ }, Fi = /* @__PURE__ */ ((i) => (t) => i && t instanceof i)(typeof Uint8Array < "u" && zt(Uint8Array)), ki = (i, t) => {
2189
2189
  const n = (i && i[Gt]).call(i);
2190
2190
  let r;
2191
2191
  for (; (r = n.next()) && !r.done; ) {
2192
2192
  const s = r.value;
2193
2193
  t.call(i, s[0], s[1]);
2194
2194
  }
2195
- }, Fi = (i, t) => {
2195
+ }, ji = (i, t) => {
2196
2196
  let e;
2197
2197
  const n = [];
2198
2198
  for (; (e = i.exec(t)) !== null; )
2199
2199
  n.push(e);
2200
2200
  return n;
2201
- }, ki = W("HTMLFormElement"), ji = (i) => i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, n, r) {
2201
+ }, qi = W("HTMLFormElement"), Ki = (i) => i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, n, r) {
2202
2202
  return n.toUpperCase() + r;
2203
- }), he = (({ hasOwnProperty: i }) => (t, e) => i.call(t, e))(Object.prototype), qi = W("RegExp"), ln = (i, t) => {
2203
+ }), he = (({ hasOwnProperty: i }) => (t, e) => i.call(t, e))(Object.prototype), Hi = W("RegExp"), hn = (i, t) => {
2204
2204
  const e = Object.getOwnPropertyDescriptors(i), n = {};
2205
2205
  Ct(e, (r, s) => {
2206
2206
  let a;
2207
2207
  (a = t(r, s, i)) !== !1 && (n[s] = a || r);
2208
2208
  }), Object.defineProperties(i, n);
2209
- }, Ki = (i) => {
2210
- ln(i, (t, e) => {
2209
+ }, Wi = (i) => {
2210
+ hn(i, (t, e) => {
2211
2211
  if (M(i) && ["arguments", "caller", "callee"].includes(e))
2212
2212
  return !1;
2213
2213
  const n = i[e];
@@ -2221,38 +2221,38 @@ const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
2221
2221
  });
2222
2222
  }
2223
2223
  });
2224
- }, Hi = (i, t) => {
2224
+ }, Xi = (i, t) => {
2225
2225
  const e = {}, n = (r) => {
2226
2226
  r.forEach((s) => {
2227
2227
  e[s] = !0;
2228
2228
  });
2229
2229
  };
2230
2230
  return Pt(i) ? n(i) : n(String(i).split(t)), e;
2231
- }, Wi = () => {
2232
- }, Xi = (i, t) => i != null && Number.isFinite(i = +i) ? i : t;
2233
- function zi(i) {
2234
- return !!(i && M(i.append) && i[sn] === "FormData" && i[Gt]);
2231
+ }, zi = () => {
2232
+ }, Gi = (i, t) => i != null && Number.isFinite(i = +i) ? i : t;
2233
+ function $i(i) {
2234
+ return !!(i && M(i.append) && i[an] === "FormData" && i[Gt]);
2235
2235
  }
2236
- const Gi = (i) => {
2237
- const t = new Array(10), e = (n, r) => {
2236
+ const Ji = (i) => {
2237
+ const t = /* @__PURE__ */ new WeakSet(), e = (n) => {
2238
2238
  if (Rt(n)) {
2239
- if (t.indexOf(n) >= 0)
2239
+ if (t.has(n))
2240
2240
  return;
2241
2241
  if (At(n))
2242
2242
  return n;
2243
2243
  if (!("toJSON" in n)) {
2244
- t[r] = n;
2245
- const s = Pt(n) ? [] : {};
2246
- return Ct(n, (a, o) => {
2247
- const c = e(a, r + 1);
2248
- !yt(c) && (s[o] = c);
2249
- }), t[r] = void 0, s;
2244
+ t.add(n);
2245
+ const r = Pt(n) ? [] : {};
2246
+ return Ct(n, (s, a) => {
2247
+ const o = e(s);
2248
+ !yt(o) && (r[a] = o);
2249
+ }), t.delete(n), r;
2250
2250
  }
2251
2251
  }
2252
2252
  return n;
2253
2253
  };
2254
- return e(i, 0);
2255
- }, $i = W("AsyncFunction"), Ji = (i) => i && (Rt(i) || M(i)) && M(i.then) && M(i.catch), hn = ((i, t) => i ? setImmediate : t ? ((e, n) => (ct.addEventListener(
2254
+ return e(i);
2255
+ }, Qi = W("AsyncFunction"), Zi = (i) => i && (Rt(i) || M(i)) && M(i.then) && M(i.catch), fn = ((i, t) => i ? setImmediate : t ? ((e, n) => (ct.addEventListener(
2256
2256
  "message",
2257
2257
  ({ source: r, data: s }) => {
2258
2258
  r === ct && s === e && n.length && n.shift()();
@@ -2260,68 +2260,68 @@ const Gi = (i) => {
2260
2260
  !1
2261
2261
  ), (r) => {
2262
2262
  n.push(r), ct.postMessage(e, "*");
2263
- }))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", M(ct.postMessage)), Qi = typeof queueMicrotask < "u" ? queueMicrotask.bind(ct) : typeof process < "u" && process.nextTick || hn, Zi = (i) => i != null && M(i[Gt]), h = {
2263
+ }))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", M(ct.postMessage)), Yi = typeof queueMicrotask < "u" ? queueMicrotask.bind(ct) : typeof process < "u" && process.nextTick || fn, tr = (i) => i != null && M(i[Gt]), h = {
2264
2264
  isArray: Pt,
2265
- isArrayBuffer: an,
2265
+ isArrayBuffer: on,
2266
2266
  isBuffer: At,
2267
- isFormData: Si,
2268
- isArrayBufferView: fi,
2269
- isString: pi,
2270
- isNumber: on,
2271
- isBoolean: di,
2267
+ isFormData: Ai,
2268
+ isArrayBufferView: di,
2269
+ isString: _i,
2270
+ isNumber: cn,
2271
+ isBoolean: gi,
2272
2272
  isObject: Rt,
2273
2273
  isPlainObject: jt,
2274
- isEmptyObject: _i,
2275
- isReadableStream: Ai,
2276
- isRequest: Ri,
2277
- isResponse: Ci,
2278
- isHeaders: Oi,
2274
+ isEmptyObject: mi,
2275
+ isReadableStream: Ci,
2276
+ isRequest: Oi,
2277
+ isResponse: Di,
2278
+ isHeaders: Ii,
2279
2279
  isUndefined: yt,
2280
- isDate: gi,
2281
- isFile: mi,
2282
- isReactNativeBlob: yi,
2283
- isReactNative: bi,
2284
- isBlob: Pi,
2285
- isRegExp: qi,
2280
+ isDate: yi,
2281
+ isFile: bi,
2282
+ isReactNativeBlob: Pi,
2283
+ isReactNative: Ei,
2284
+ isBlob: wi,
2285
+ isRegExp: Hi,
2286
2286
  isFunction: M,
2287
- isStream: vi,
2288
- isURLSearchParams: Ti,
2289
- isTypedArray: Vi,
2290
- isFileList: Ei,
2287
+ isStream: Si,
2288
+ isURLSearchParams: Ri,
2289
+ isTypedArray: Fi,
2290
+ isFileList: vi,
2291
2291
  forEach: Ct,
2292
2292
  merge: le,
2293
- extend: Ii,
2294
- trim: Di,
2295
- stripBOM: Ni,
2296
- inherits: Bi,
2297
- toFlatObject: xi,
2293
+ extend: Bi,
2294
+ trim: Ni,
2295
+ stripBOM: xi,
2296
+ inherits: Li,
2297
+ toFlatObject: Ui,
2298
2298
  kindOf: $t,
2299
2299
  kindOfTest: W,
2300
- endsWith: Ui,
2301
- toArray: Li,
2302
- forEachEntry: Mi,
2303
- matchAll: Fi,
2304
- isHTMLForm: ki,
2300
+ endsWith: Vi,
2301
+ toArray: Mi,
2302
+ forEachEntry: ki,
2303
+ matchAll: ji,
2304
+ isHTMLForm: qi,
2305
2305
  hasOwnProperty: he,
2306
2306
  hasOwnProp: he,
2307
2307
  // an alias to avoid ESLint no-prototype-builtins detection
2308
- reduceDescriptors: ln,
2309
- freezeMethods: Ki,
2310
- toObjectSet: Hi,
2311
- toCamelCase: ji,
2312
- noop: Wi,
2313
- toFiniteNumber: Xi,
2314
- findKey: cn,
2308
+ reduceDescriptors: hn,
2309
+ freezeMethods: Wi,
2310
+ toObjectSet: Xi,
2311
+ toCamelCase: Ki,
2312
+ noop: zi,
2313
+ toFiniteNumber: Gi,
2314
+ findKey: un,
2315
2315
  global: ct,
2316
- isContextDefined: un,
2317
- isSpecCompliantForm: zi,
2318
- toJSONObject: Gi,
2319
- isAsyncFn: $i,
2320
- isThenable: Ji,
2321
- setImmediate: hn,
2322
- asap: Qi,
2323
- isIterable: Zi
2324
- }, Yi = h.toObjectSet([
2316
+ isContextDefined: ln,
2317
+ isSpecCompliantForm: $i,
2318
+ toJSONObject: Ji,
2319
+ isAsyncFn: Qi,
2320
+ isThenable: Zi,
2321
+ setImmediate: fn,
2322
+ asap: Yi,
2323
+ isIterable: tr
2324
+ }, er = h.toObjectSet([
2325
2325
  "age",
2326
2326
  "authorization",
2327
2327
  "content-length",
@@ -2339,15 +2339,15 @@ const Gi = (i) => {
2339
2339
  "referer",
2340
2340
  "retry-after",
2341
2341
  "user-agent"
2342
- ]), tr = (i) => {
2342
+ ]), nr = (i) => {
2343
2343
  const t = {};
2344
2344
  let e, n, r;
2345
2345
  return i && i.split(`
2346
2346
  `).forEach(function(a) {
2347
- r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), n = a.substring(r + 1).trim(), !(!e || t[e] && Yi[e]) && (e === "set-cookie" ? t[e] ? t[e].push(n) : t[e] = [n] : t[e] = t[e] ? t[e] + ", " + n : n);
2347
+ r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), n = a.substring(r + 1).trim(), !(!e || t[e] && er[e]) && (e === "set-cookie" ? t[e] ? t[e].push(n) : t[e] = [n] : t[e] = t[e] ? t[e] + ", " + n : n);
2348
2348
  }), t;
2349
- }, je = /* @__PURE__ */ Symbol("internals"), er = /[^\x09\x20-\x7E\x80-\xFF]/g;
2350
- function nr(i) {
2349
+ };
2350
+ function ir(i) {
2351
2351
  let t = 0, e = i.length;
2352
2352
  for (; t < e; ) {
2353
2353
  const n = i.charCodeAt(t);
@@ -2363,23 +2363,32 @@ function nr(i) {
2363
2363
  }
2364
2364
  return t === 0 && e === i.length ? i : i.slice(t, e);
2365
2365
  }
2366
- function wt(i) {
2367
- return i && String(i).trim().toLowerCase();
2366
+ const rr = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), sr = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
2367
+ function ge(i, t) {
2368
+ return h.isArray(i) ? i.map((e) => ge(e, t)) : ir(String(i).replace(t, ""));
2368
2369
  }
2369
- function ir(i) {
2370
- return nr(i.replace(er, ""));
2370
+ const ar = (i) => ge(i, rr), or = (i) => ge(i, sr);
2371
+ function pn(i) {
2372
+ const t = /* @__PURE__ */ Object.create(null);
2373
+ return h.forEach(i.toJSON(), (e, n) => {
2374
+ t[n] = or(e);
2375
+ }), t;
2376
+ }
2377
+ const qe = /* @__PURE__ */ Symbol("internals");
2378
+ function vt(i) {
2379
+ return i && String(i).trim().toLowerCase();
2371
2380
  }
2372
2381
  function qt(i) {
2373
- return i === !1 || i == null ? i : h.isArray(i) ? i.map(qt) : ir(String(i));
2382
+ return i === !1 || i == null ? i : h.isArray(i) ? i.map(qt) : ar(String(i));
2374
2383
  }
2375
- function rr(i) {
2384
+ function cr(i) {
2376
2385
  const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
2377
2386
  let n;
2378
2387
  for (; n = e.exec(i); )
2379
2388
  t[n[1]] = n[2];
2380
2389
  return t;
2381
2390
  }
2382
- const sr = (i) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());
2391
+ const ur = (i) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());
2383
2392
  function re(i, t, e, n, r) {
2384
2393
  if (h.isFunction(n))
2385
2394
  return n.call(this, t, e);
@@ -2390,10 +2399,10 @@ function re(i, t, e, n, r) {
2390
2399
  return n.test(t);
2391
2400
  }
2392
2401
  }
2393
- function ar(i) {
2402
+ function lr(i) {
2394
2403
  return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, e, n) => e.toUpperCase() + n);
2395
2404
  }
2396
- function or(i, t) {
2405
+ function hr(i, t) {
2397
2406
  const e = h.toCamelCase(" " + t);
2398
2407
  ["get", "set", "has"].forEach((n) => {
2399
2408
  Object.defineProperty(i, n + e, {
@@ -2414,7 +2423,7 @@ let V = class {
2414
2423
  set(t, e, n) {
2415
2424
  const r = this;
2416
2425
  function s(o, c, u) {
2417
- const l = wt(c);
2426
+ const l = vt(c);
2418
2427
  if (!l)
2419
2428
  throw new Error("header name must be a non-empty string");
2420
2429
  const f = h.findKey(r, l);
@@ -2423,8 +2432,8 @@ let V = class {
2423
2432
  const a = (o, c) => h.forEach(o, (u, l) => s(u, l, c));
2424
2433
  if (h.isPlainObject(t) || t instanceof this.constructor)
2425
2434
  a(t, e);
2426
- else if (h.isString(t) && (t = t.trim()) && !sr(t))
2427
- a(tr(t), e);
2435
+ else if (h.isString(t) && (t = t.trim()) && !ur(t))
2436
+ a(nr(t), e);
2428
2437
  else if (h.isObject(t) && h.isIterable(t)) {
2429
2438
  let o = {}, c, u;
2430
2439
  for (const l of t) {
@@ -2438,14 +2447,14 @@ let V = class {
2438
2447
  return this;
2439
2448
  }
2440
2449
  get(t, e) {
2441
- if (t = wt(t), t) {
2450
+ if (t = vt(t), t) {
2442
2451
  const n = h.findKey(this, t);
2443
2452
  if (n) {
2444
2453
  const r = this[n];
2445
2454
  if (!e)
2446
2455
  return r;
2447
2456
  if (e === !0)
2448
- return rr(r);
2457
+ return cr(r);
2449
2458
  if (h.isFunction(e))
2450
2459
  return e.call(this, r, n);
2451
2460
  if (h.isRegExp(e))
@@ -2455,7 +2464,7 @@ let V = class {
2455
2464
  }
2456
2465
  }
2457
2466
  has(t, e) {
2458
- if (t = wt(t), t) {
2467
+ if (t = vt(t), t) {
2459
2468
  const n = h.findKey(this, t);
2460
2469
  return !!(n && this[n] !== void 0 && (!e || re(this, this[n], n, e)));
2461
2470
  }
@@ -2465,7 +2474,7 @@ let V = class {
2465
2474
  const n = this;
2466
2475
  let r = !1;
2467
2476
  function s(a) {
2468
- if (a = wt(a), a) {
2477
+ if (a = vt(a), a) {
2469
2478
  const o = h.findKey(n, a);
2470
2479
  o && (!e || re(n, n[o], o, e)) && (delete n[o], r = !0);
2471
2480
  }
@@ -2489,7 +2498,7 @@ let V = class {
2489
2498
  e[a] = qt(r), delete e[s];
2490
2499
  return;
2491
2500
  }
2492
- const o = t ? ar(s) : String(s).trim();
2501
+ const o = t ? lr(s) : String(s).trim();
2493
2502
  o !== s && delete e[s], e[o] = qt(r), n[o] = !0;
2494
2503
  }), this;
2495
2504
  }
@@ -2523,12 +2532,12 @@ let V = class {
2523
2532
  return e.forEach((r) => n.set(r)), n;
2524
2533
  }
2525
2534
  static accessor(t) {
2526
- const n = (this[je] = this[je] = {
2535
+ const n = (this[qe] = this[qe] = {
2527
2536
  accessors: {}
2528
2537
  }).accessors, r = this.prototype;
2529
2538
  function s(a) {
2530
- const o = wt(a);
2531
- n[o] || (or(r, a), n[o] = !0);
2539
+ const o = vt(a);
2540
+ n[o] || (hr(r, a), n[o] = !0);
2532
2541
  }
2533
2542
  return h.isArray(t) ? t.forEach(s) : s(t), this;
2534
2543
  }
@@ -2551,8 +2560,8 @@ h.reduceDescriptors(V.prototype, ({ value: i }, t) => {
2551
2560
  };
2552
2561
  });
2553
2562
  h.freezeMethods(V);
2554
- const cr = "[REDACTED ****]";
2555
- function ur(i) {
2563
+ const fr = "[REDACTED ****]";
2564
+ function pr(i) {
2556
2565
  if (h.hasOwnProp(i, "toJSON"))
2557
2566
  return !0;
2558
2567
  let t = Object.getPrototypeOf(i);
@@ -2563,7 +2572,7 @@ function ur(i) {
2563
2572
  }
2564
2573
  return !1;
2565
2574
  }
2566
- function lr(i, t) {
2575
+ function dr(i, t) {
2567
2576
  const e = new Set(t.map((s) => String(s).toLowerCase())), n = [], r = (s) => {
2568
2577
  if (s === null || typeof s != "object" || h.isBuffer(s)) return s;
2569
2578
  if (n.indexOf(s) !== -1) return;
@@ -2575,11 +2584,11 @@ function lr(i, t) {
2575
2584
  h.isUndefined(u) || (a[c] = u);
2576
2585
  });
2577
2586
  else {
2578
- if (!h.isPlainObject(s) && ur(s))
2587
+ if (!h.isPlainObject(s) && pr(s))
2579
2588
  return n.pop(), s;
2580
2589
  a = /* @__PURE__ */ Object.create(null);
2581
2590
  for (const [o, c] of Object.entries(s)) {
2582
- const u = e.has(o.toLowerCase()) ? cr : r(c);
2591
+ const u = e.has(o.toLowerCase()) ? fr : r(c);
2583
2592
  h.isUndefined(u) || (a[o] = u);
2584
2593
  }
2585
2594
  }
@@ -2587,9 +2596,9 @@ function lr(i, t) {
2587
2596
  };
2588
2597
  return r(i);
2589
2598
  }
2590
- let y = class fn extends Error {
2599
+ let y = class dn extends Error {
2591
2600
  static from(t, e, n, r, s, a) {
2592
- const o = new fn(t.message, e || t.code, n, r, s);
2601
+ const o = new dn(t.message, e || t.code, n, r, s);
2593
2602
  return o.cause = t, o.name = t.name, t.status != null && o.status == null && (o.status = t.status), a && Object.assign(o, a), o;
2594
2603
  }
2595
2604
  /**
@@ -2615,7 +2624,7 @@ let y = class fn extends Error {
2615
2624
  }), this.name = "AxiosError", this.isAxiosError = !0, e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status);
2616
2625
  }
2617
2626
  toJSON() {
2618
- const t = this.config, e = t && h.hasOwnProp(t, "redact") ? t.redact : void 0, n = h.isArray(e) && e.length > 0 ? lr(t, e) : h.toJSONObject(t);
2627
+ const t = this.config, e = t && h.hasOwnProp(t, "redact") ? t.redact : void 0, n = h.isArray(e) && e.length > 0 ? dr(t, e) : h.toJSONObject(t);
2619
2628
  return {
2620
2629
  // Standard
2621
2630
  message: this.message,
@@ -2649,22 +2658,22 @@ y.ERR_CANCELED = "ERR_CANCELED";
2649
2658
  y.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
2650
2659
  y.ERR_INVALID_URL = "ERR_INVALID_URL";
2651
2660
  y.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
2652
- const hr = null;
2661
+ const _r = null;
2653
2662
  function fe(i) {
2654
2663
  return h.isPlainObject(i) || h.isArray(i);
2655
2664
  }
2656
- function pn(i) {
2665
+ function _n(i) {
2657
2666
  return h.endsWith(i, "[]") ? i.slice(0, -2) : i;
2658
2667
  }
2659
2668
  function se(i, t, e) {
2660
2669
  return i ? i.concat(t).map(function(r, s) {
2661
- return r = pn(r), !e && s ? "[" + r + "]" : r;
2670
+ return r = _n(r), !e && s ? "[" + r + "]" : r;
2662
2671
  }).join(e ? "." : "") : t;
2663
2672
  }
2664
- function fr(i) {
2673
+ function gr(i) {
2665
2674
  return h.isArray(i) && !i.some(fe);
2666
2675
  }
2667
- const pr = h.toFlatObject(h, {}, null, function(t) {
2676
+ const mr = h.toFlatObject(h, {}, null, function(t) {
2668
2677
  return /^is[A-Z]/.test(t);
2669
2678
  });
2670
2679
  function Qt(i, t, e) {
@@ -2696,24 +2705,24 @@ function Qt(i, t, e) {
2696
2705
  return h.isArrayBuffer(m) || h.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
2697
2706
  }
2698
2707
  function f(m, _, b) {
2699
- let w = m;
2708
+ let v = m;
2700
2709
  if (h.isReactNative(t) && h.isReactNativeBlob(m))
2701
2710
  return t.append(se(b, _, s), l(m)), !1;
2702
2711
  if (m && !b && typeof m == "object") {
2703
2712
  if (h.endsWith(_, "{}"))
2704
2713
  _ = n ? _ : _.slice(0, -2), m = JSON.stringify(m);
2705
- else if (h.isArray(m) && fr(m) || (h.isFileList(m) || h.endsWith(_, "[]")) && (w = h.toArray(m)))
2706
- return _ = pn(_), w.forEach(function(A, U) {
2714
+ else if (h.isArray(m) && gr(m) || (h.isFileList(m) || h.endsWith(_, "[]")) && (v = h.toArray(m)))
2715
+ return _ = _n(_), v.forEach(function(A, L) {
2707
2716
  !(h.isUndefined(A) || A === null) && t.append(
2708
2717
  // eslint-disable-next-line no-nested-ternary
2709
- a === !0 ? se([_], U, s) : a === null ? _ : _ + "[]",
2718
+ a === !0 ? se([_], L, s) : a === null ? _ : _ + "[]",
2710
2719
  l(A)
2711
2720
  );
2712
2721
  }), !1;
2713
2722
  }
2714
2723
  return fe(m) ? !0 : (t.append(se(b, _, s), l(m)), !1);
2715
2724
  }
2716
- const d = [], g = Object.assign(pr, {
2725
+ const d = [], g = Object.assign(mr, {
2717
2726
  defaultVisitor: f,
2718
2727
  convertValue: l,
2719
2728
  isVisitable: fe
@@ -2736,7 +2745,7 @@ function Qt(i, t, e) {
2736
2745
  throw new TypeError("data must be an object");
2737
2746
  return P(i), t;
2738
2747
  }
2739
- function qe(i) {
2748
+ function Ke(i) {
2740
2749
  const t = {
2741
2750
  "!": "%21",
2742
2751
  "'": "%27",
@@ -2749,38 +2758,38 @@ function qe(i) {
2749
2758
  return t[n];
2750
2759
  });
2751
2760
  }
2752
- function ge(i, t) {
2761
+ function me(i, t) {
2753
2762
  this._pairs = [], i && Qt(i, this, t);
2754
2763
  }
2755
- const dn = ge.prototype;
2756
- dn.append = function(t, e) {
2764
+ const gn = me.prototype;
2765
+ gn.append = function(t, e) {
2757
2766
  this._pairs.push([t, e]);
2758
2767
  };
2759
- dn.toString = function(t) {
2768
+ gn.toString = function(t) {
2760
2769
  const e = t ? function(n) {
2761
- return t.call(this, n, qe);
2762
- } : qe;
2770
+ return t.call(this, n, Ke);
2771
+ } : Ke;
2763
2772
  return this._pairs.map(function(r) {
2764
2773
  return e(r[0]) + "=" + e(r[1]);
2765
2774
  }, "").join("&");
2766
2775
  };
2767
- function dr(i) {
2776
+ function yr(i) {
2768
2777
  return encodeURIComponent(i).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
2769
2778
  }
2770
- function _n(i, t, e) {
2779
+ function mn(i, t, e) {
2771
2780
  if (!t)
2772
2781
  return i;
2773
- const n = e && e.encode || dr, r = h.isFunction(e) ? {
2782
+ const n = e && e.encode || yr, r = h.isFunction(e) ? {
2774
2783
  serialize: e
2775
2784
  } : e, s = r && r.serialize;
2776
2785
  let a;
2777
- if (s ? a = s(t, r) : a = h.isURLSearchParams(t) ? t.toString() : new ge(t, r).toString(n), a) {
2786
+ if (s ? a = s(t, r) : a = h.isURLSearchParams(t) ? t.toString() : new me(t, r).toString(n), a) {
2778
2787
  const o = i.indexOf("#");
2779
2788
  o !== -1 && (i = i.slice(0, o)), i += (i.indexOf("?") === -1 ? "?" : "&") + a;
2780
2789
  }
2781
2790
  return i;
2782
2791
  }
2783
- class Ke {
2792
+ class He {
2784
2793
  constructor() {
2785
2794
  this.handlers = [];
2786
2795
  }
@@ -2835,32 +2844,32 @@ class Ke {
2835
2844
  });
2836
2845
  }
2837
2846
  }
2838
- const me = {
2847
+ const ye = {
2839
2848
  silentJSONParsing: !0,
2840
2849
  forcedJSONParsing: !0,
2841
2850
  clarifyTimeoutError: !1,
2842
2851
  legacyInterceptorReqResOrdering: !0
2843
- }, _r = typeof URLSearchParams < "u" ? URLSearchParams : ge, gr = typeof FormData < "u" ? FormData : null, mr = typeof Blob < "u" ? Blob : null, yr = {
2852
+ }, br = typeof URLSearchParams < "u" ? URLSearchParams : me, Pr = typeof FormData < "u" ? FormData : null, Er = typeof Blob < "u" ? Blob : null, wr = {
2844
2853
  isBrowser: !0,
2845
2854
  classes: {
2846
- URLSearchParams: _r,
2847
- FormData: gr,
2848
- Blob: mr
2855
+ URLSearchParams: br,
2856
+ FormData: Pr,
2857
+ Blob: Er
2849
2858
  },
2850
2859
  protocols: ["http", "https", "file", "blob", "url", "data"]
2851
- }, ye = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, br = ye && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), Pr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
2852
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Er = ye && window.location.href || "http://localhost", vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2860
+ }, be = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, vr = be && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), Sr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
2861
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Tr = be && window.location.href || "http://localhost", Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2853
2862
  __proto__: null,
2854
- hasBrowserEnv: ye,
2855
- hasStandardBrowserEnv: br,
2856
- hasStandardBrowserWebWorkerEnv: Pr,
2863
+ hasBrowserEnv: be,
2864
+ hasStandardBrowserEnv: vr,
2865
+ hasStandardBrowserWebWorkerEnv: Sr,
2857
2866
  navigator: pe,
2858
- origin: Er
2867
+ origin: Tr
2859
2868
  }, Symbol.toStringTag, { value: "Module" })), x = {
2860
- ...vr,
2861
- ...yr
2869
+ ...Ar,
2870
+ ...wr
2862
2871
  };
2863
- function wr(i, t) {
2872
+ function Rr(i, t) {
2864
2873
  return Qt(i, new x.classes.URLSearchParams(), {
2865
2874
  visitor: function(e, n, r, s) {
2866
2875
  return x.isNode && h.isBuffer(e) ? (this.append(n, e.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
@@ -2868,10 +2877,10 @@ function wr(i, t) {
2868
2877
  ...t
2869
2878
  });
2870
2879
  }
2871
- function Sr(i) {
2880
+ function Cr(i) {
2872
2881
  return h.matchAll(/\w+|\[(\w*)]/g, i).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
2873
2882
  }
2874
- function Tr(i) {
2883
+ function Or(i) {
2875
2884
  const t = {}, e = Object.keys(i);
2876
2885
  let n;
2877
2886
  const r = e.length;
@@ -2880,23 +2889,23 @@ function Tr(i) {
2880
2889
  s = e[n], t[s] = i[s];
2881
2890
  return t;
2882
2891
  }
2883
- function gn(i) {
2892
+ function yn(i) {
2884
2893
  function t(e, n, r, s) {
2885
2894
  let a = e[s++];
2886
2895
  if (a === "__proto__") return !0;
2887
2896
  const o = Number.isFinite(+a), c = s >= e.length;
2888
- return a = !a && h.isArray(r) ? r.length : a, c ? (h.hasOwnProp(r, a) ? r[a] = h.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!r[a] || !h.isObject(r[a])) && (r[a] = []), t(e, n, r[a], s) && h.isArray(r[a]) && (r[a] = Tr(r[a])), !o);
2897
+ return a = !a && h.isArray(r) ? r.length : a, c ? (h.hasOwnProp(r, a) ? r[a] = h.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!h.hasOwnProp(r, a) || !h.isObject(r[a])) && (r[a] = []), t(e, n, r[a], s) && h.isArray(r[a]) && (r[a] = Or(r[a])), !o);
2889
2898
  }
2890
2899
  if (h.isFormData(i) && h.isFunction(i.entries)) {
2891
2900
  const e = {};
2892
2901
  return h.forEachEntry(i, (n, r) => {
2893
- t(Sr(n), r, e, 0);
2902
+ t(Cr(n), r, e, 0);
2894
2903
  }), e;
2895
2904
  }
2896
2905
  return null;
2897
2906
  }
2898
2907
  const _t = (i, t) => i != null && h.hasOwnProp(i, t) ? i[t] : void 0;
2899
- function Ar(i, t, e) {
2908
+ function Dr(i, t, e) {
2900
2909
  if (h.isString(i))
2901
2910
  try {
2902
2911
  return (t || JSON.parse)(i), h.trim(i);
@@ -2907,13 +2916,13 @@ function Ar(i, t, e) {
2907
2916
  return (e || JSON.stringify)(i);
2908
2917
  }
2909
2918
  const Ot = {
2910
- transitional: me,
2919
+ transitional: ye,
2911
2920
  adapter: ["xhr", "http", "fetch"],
2912
2921
  transformRequest: [
2913
2922
  function(t, e) {
2914
2923
  const n = e.getContentType() || "", r = n.indexOf("application/json") > -1, s = h.isObject(t);
2915
2924
  if (s && h.isHTMLForm(t) && (t = new FormData(t)), h.isFormData(t))
2916
- return r ? JSON.stringify(gn(t)) : t;
2925
+ return r ? JSON.stringify(yn(t)) : t;
2917
2926
  if (h.isArrayBuffer(t) || h.isBuffer(t) || h.isStream(t) || h.isFile(t) || h.isBlob(t) || h.isReadableStream(t))
2918
2927
  return t;
2919
2928
  if (h.isArrayBufferView(t))
@@ -2924,7 +2933,7 @@ const Ot = {
2924
2933
  if (s) {
2925
2934
  const c = _t(this, "formSerializer");
2926
2935
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
2927
- return wr(t, c).toString();
2936
+ return Rr(t, c).toString();
2928
2937
  if ((o = h.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
2929
2938
  const u = _t(this, "env"), l = u && u.FormData;
2930
2939
  return Qt(
@@ -2934,7 +2943,7 @@ const Ot = {
2934
2943
  );
2935
2944
  }
2936
2945
  }
2937
- return s || r ? (e.setContentType("application/json", !1), Ar(t)) : t;
2946
+ return s || r ? (e.setContentType("application/json", !1), Dr(t)) : t;
2938
2947
  }
2939
2948
  ],
2940
2949
  transformResponse: [
@@ -2987,7 +2996,7 @@ function ae(i, t) {
2987
2996
  s = o.call(e, s, r.normalize(), t ? t.status : void 0);
2988
2997
  }), r.normalize(), s;
2989
2998
  }
2990
- function mn(i) {
2999
+ function bn(i) {
2991
3000
  return !!(i && i.__CANCEL__);
2992
3001
  }
2993
3002
  let Dt = class extends y {
@@ -3004,7 +3013,7 @@ let Dt = class extends y {
3004
3013
  super(t ?? "canceled", y.ERR_CANCELED, e, n), this.name = "CanceledError", this.__CANCEL__ = !0;
3005
3014
  }
3006
3015
  };
3007
- function yn(i, t, e) {
3016
+ function Pn(i, t, e) {
3008
3017
  const n = e.config.validateStatus;
3009
3018
  !e.status || !n || n(e.status) ? i(e) : t(new y(
3010
3019
  "Request failed with status code " + e.status,
@@ -3014,11 +3023,11 @@ function yn(i, t, e) {
3014
3023
  e
3015
3024
  ));
3016
3025
  }
3017
- function Rr(i) {
3026
+ function Ir(i) {
3018
3027
  const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(i);
3019
3028
  return t && t[1] || "";
3020
3029
  }
3021
- function Cr(i, t) {
3030
+ function Nr(i, t) {
3022
3031
  i = i || 10;
3023
3032
  const e = new Array(i), n = new Array(i);
3024
3033
  let r = 0, s = 0, a;
@@ -3034,7 +3043,7 @@ function Cr(i, t) {
3034
3043
  return g ? Math.round(d * 1e3 / g) : void 0;
3035
3044
  };
3036
3045
  }
3037
- function Or(i, t) {
3046
+ function Br(i, t) {
3038
3047
  let e = 0, n = 1e3 / t, r, s;
3039
3048
  const a = (u, l = Date.now()) => {
3040
3049
  e = l, r = null, s && (clearTimeout(s), s = null), i(...u);
@@ -3048,8 +3057,10 @@ function Or(i, t) {
3048
3057
  }
3049
3058
  const Wt = (i, t, e = 3) => {
3050
3059
  let n = 0;
3051
- const r = Cr(50, 250);
3052
- return Or((s) => {
3060
+ const r = Nr(50, 250);
3061
+ return Br((s) => {
3062
+ if (!s || typeof s.loaded != "number")
3063
+ return;
3053
3064
  const a = s.loaded, o = s.lengthComputable ? s.total : void 0, c = o != null ? Math.min(a, o) : a, u = Math.max(0, c - n), l = r(u);
3054
3065
  n = Math.max(n, c);
3055
3066
  const f = {
@@ -3065,7 +3076,7 @@ const Wt = (i, t, e = 3) => {
3065
3076
  };
3066
3077
  i(f);
3067
3078
  }, e);
3068
- }, He = (i, t) => {
3079
+ }, We = (i, t) => {
3069
3080
  const e = i != null;
3070
3081
  return [
3071
3082
  (n) => t[0]({
@@ -3075,10 +3086,10 @@ const Wt = (i, t, e = 3) => {
3075
3086
  }),
3076
3087
  t[1]
3077
3088
  ];
3078
- }, We = (i) => (...t) => h.asap(() => i(...t)), Dr = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((i, t) => (e) => (e = new URL(e, x.origin), i.protocol === e.protocol && i.host === e.host && (t || i.port === e.port)))(
3089
+ }, Xe = (i) => (...t) => h.asap(() => i(...t)), xr = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((i, t) => (e) => (e = new URL(e, x.origin), i.protocol === e.protocol && i.host === e.host && (t || i.port === e.port)))(
3079
3090
  new URL(x.origin),
3080
3091
  x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
3081
- ) : () => !0, Ir = x.hasStandardBrowserEnv ? (
3092
+ ) : () => !0, Lr = x.hasStandardBrowserEnv ? (
3082
3093
  // Standard browser envs support document.cookie
3083
3094
  {
3084
3095
  write(i, t, e, n, r, s, a) {
@@ -3112,17 +3123,17 @@ const Wt = (i, t, e = 3) => {
3112
3123
  }
3113
3124
  }
3114
3125
  );
3115
- function Nr(i) {
3126
+ function Ur(i) {
3116
3127
  return typeof i != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(i);
3117
3128
  }
3118
- function Br(i, t) {
3129
+ function Vr(i, t) {
3119
3130
  return t ? i.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : i;
3120
3131
  }
3121
- function bn(i, t, e) {
3122
- let n = !Nr(t);
3123
- return i && (n || e === !1) ? Br(i, t) : t;
3132
+ function En(i, t, e) {
3133
+ let n = !Ur(t);
3134
+ return i && (n || e === !1) ? Vr(i, t) : t;
3124
3135
  }
3125
- const Xe = (i) => i instanceof V ? { ...i } : i;
3136
+ const ze = (i) => i instanceof V ? { ...i } : i;
3126
3137
  function lt(i, t) {
3127
3138
  t = t || {};
3128
3139
  const e = /* @__PURE__ */ Object.create(null);
@@ -3190,7 +3201,7 @@ function lt(i, t) {
3190
3201
  allowedSocketPaths: a,
3191
3202
  responseEncoding: a,
3192
3203
  validateStatus: o,
3193
- headers: (u, l, f) => r(Xe(u), Xe(l), f, !0)
3204
+ headers: (u, l, f) => r(ze(u), ze(l), f, !0)
3194
3205
  };
3195
3206
  return h.forEach(Object.keys({ ...i, ...t }), function(l) {
3196
3207
  if (l === "__proto__" || l === "constructor" || l === "prototype") return;
@@ -3198,40 +3209,40 @@ function lt(i, t) {
3198
3209
  h.isUndefined(P) && f !== o || (e[l] = P);
3199
3210
  }), e;
3200
3211
  }
3201
- const xr = ["content-type", "content-length"];
3202
- function Ur(i, t, e) {
3212
+ const Mr = ["content-type", "content-length"];
3213
+ function Fr(i, t, e) {
3203
3214
  if (e !== "content-only") {
3204
3215
  i.set(t);
3205
3216
  return;
3206
3217
  }
3207
3218
  Object.entries(t).forEach(([n, r]) => {
3208
- xr.includes(n.toLowerCase()) && i.set(n, r);
3219
+ Mr.includes(n.toLowerCase()) && i.set(n, r);
3209
3220
  });
3210
3221
  }
3211
- const Lr = (i) => encodeURIComponent(i).replace(
3222
+ const kr = (i) => encodeURIComponent(i).replace(
3212
3223
  /%([0-9A-F]{2})/gi,
3213
3224
  (t, e) => String.fromCharCode(parseInt(e, 16))
3214
- ), Pn = (i) => {
3225
+ ), wn = (i) => {
3215
3226
  const t = lt({}, i), e = (d) => h.hasOwnProp(t, d) ? t[d] : void 0, n = e("data");
3216
3227
  let r = e("withXSRFToken");
3217
3228
  const s = e("xsrfHeaderName"), a = e("xsrfCookieName");
3218
3229
  let o = e("headers");
3219
3230
  const c = e("auth"), u = e("baseURL"), l = e("allowAbsoluteUrls"), f = e("url");
3220
- if (t.headers = o = V.from(o), t.url = _n(
3221
- bn(u, f, l),
3231
+ if (t.headers = o = V.from(o), t.url = mn(
3232
+ En(u, f, l),
3222
3233
  i.params,
3223
3234
  i.paramsSerializer
3224
3235
  ), c && o.set(
3225
3236
  "Authorization",
3226
- "Basic " + btoa((c.username || "") + ":" + (c.password ? Lr(c.password) : ""))
3227
- ), h.isFormData(n) && (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv ? o.setContentType(void 0) : h.isFunction(n.getHeaders) && Ur(o, n.getHeaders(), e("formDataHeaderPolicy"))), x.hasStandardBrowserEnv && (h.isFunction(r) && (r = r(t)), r === !0 || r == null && Dr(t.url))) {
3228
- const g = s && a && Ir.read(a);
3237
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? kr(c.password) : ""))
3238
+ ), h.isFormData(n) && (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv ? o.setContentType(void 0) : h.isFunction(n.getHeaders) && Fr(o, n.getHeaders(), e("formDataHeaderPolicy"))), x.hasStandardBrowserEnv && (h.isFunction(r) && (r = r(t)), r === !0 || r == null && xr(t.url))) {
3239
+ const g = s && a && Lr.read(a);
3229
3240
  g && o.set(s, g);
3230
3241
  }
3231
3242
  return t;
3232
- }, Vr = typeof XMLHttpRequest < "u", Mr = Vr && function(i) {
3243
+ }, jr = typeof XMLHttpRequest < "u", qr = jr && function(i) {
3233
3244
  return new Promise(function(e, n) {
3234
- const r = Pn(i);
3245
+ const r = wn(i);
3235
3246
  let s = r.data;
3236
3247
  const a = V.from(r.headers).normalize();
3237
3248
  let { responseType: o, onUploadProgress: c, onDownloadProgress: u } = r, l, f, d, g, P;
@@ -3245,7 +3256,7 @@ const Lr = (i) => encodeURIComponent(i).replace(
3245
3256
  return;
3246
3257
  const T = V.from(
3247
3258
  "getAllResponseHeaders" in _ && _.getAllResponseHeaders()
3248
- ), U = {
3259
+ ), L = {
3249
3260
  data: !o || o === "text" || o === "json" ? _.responseText : _.response,
3250
3261
  status: _.status,
3251
3262
  statusText: _.statusText,
@@ -3253,14 +3264,14 @@ const Lr = (i) => encodeURIComponent(i).replace(
3253
3264
  config: i,
3254
3265
  request: _
3255
3266
  };
3256
- yn(
3267
+ Pn(
3257
3268
  function(K) {
3258
3269
  e(K), m();
3259
3270
  },
3260
3271
  function(K) {
3261
3272
  n(K), m();
3262
3273
  },
3263
- U
3274
+ L
3264
3275
  ), _ = null;
3265
3276
  }
3266
3277
  "onloadend" in _ ? _.onloadend = b : _.onreadystatechange = function() {
@@ -3268,29 +3279,29 @@ const Lr = (i) => encodeURIComponent(i).replace(
3268
3279
  }, _.onabort = function() {
3269
3280
  _ && (n(new y("Request aborted", y.ECONNABORTED, i, _)), m(), _ = null);
3270
3281
  }, _.onerror = function(A) {
3271
- const U = A && A.message ? A.message : "Network Error", E = new y(U, y.ERR_NETWORK, i, _);
3282
+ const L = A && A.message ? A.message : "Network Error", E = new y(L, y.ERR_NETWORK, i, _);
3272
3283
  E.event = A || null, n(E), m(), _ = null;
3273
3284
  }, _.ontimeout = function() {
3274
3285
  let A = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
3275
- const U = r.transitional || me;
3286
+ const L = r.transitional || ye;
3276
3287
  r.timeoutErrorMessage && (A = r.timeoutErrorMessage), n(
3277
3288
  new y(
3278
3289
  A,
3279
- U.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
3290
+ L.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
3280
3291
  i,
3281
3292
  _
3282
3293
  )
3283
3294
  ), m(), _ = null;
3284
- }, s === void 0 && a.setContentType(null), "setRequestHeader" in _ && h.forEach(a.toJSON(), function(A, U) {
3285
- _.setRequestHeader(U, A);
3295
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in _ && h.forEach(pn(a), function(A, L) {
3296
+ _.setRequestHeader(L, A);
3286
3297
  }), h.isUndefined(r.withCredentials) || (_.withCredentials = !!r.withCredentials), o && o !== "json" && (_.responseType = r.responseType), u && ([d, P] = Wt(u, !0), _.addEventListener("progress", d)), c && _.upload && ([f, g] = Wt(c), _.upload.addEventListener("progress", f), _.upload.addEventListener("loadend", g)), (r.cancelToken || r.signal) && (l = (T) => {
3287
3298
  _ && (n(!T || T.type ? new Dt(null, i, _) : T), _.abort(), m(), _ = null);
3288
3299
  }, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
3289
- const w = Rr(r.url);
3290
- if (w && !x.protocols.includes(w)) {
3300
+ const v = Ir(r.url);
3301
+ if (v && !x.protocols.includes(v)) {
3291
3302
  n(
3292
3303
  new y(
3293
- "Unsupported protocol " + w + ":",
3304
+ "Unsupported protocol " + v + ":",
3294
3305
  y.ERR_BAD_REQUEST,
3295
3306
  i
3296
3307
  )
@@ -3299,32 +3310,32 @@ const Lr = (i) => encodeURIComponent(i).replace(
3299
3310
  }
3300
3311
  _.send(s || null);
3301
3312
  });
3302
- }, Fr = (i, t) => {
3303
- const { length: e } = i = i ? i.filter(Boolean) : [];
3304
- if (t || e) {
3305
- let n = new AbortController(), r;
3306
- const s = function(u) {
3307
- if (!r) {
3308
- r = !0, o();
3309
- const l = u instanceof Error ? u : this.reason;
3310
- n.abort(
3311
- l instanceof y ? l : new Dt(l instanceof Error ? l.message : l)
3312
- );
3313
- }
3314
- };
3315
- let a = t && setTimeout(() => {
3316
- a = null, s(new y(`timeout of ${t}ms exceeded`, y.ETIMEDOUT));
3317
- }, t);
3318
- const o = () => {
3319
- i && (a && clearTimeout(a), a = null, i.forEach((u) => {
3320
- u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
3321
- }), i = null);
3322
- };
3323
- i.forEach((u) => u.addEventListener("abort", s));
3324
- const { signal: c } = n;
3325
- return c.unsubscribe = () => h.asap(o), c;
3326
- }
3327
- }, kr = function* (i, t) {
3313
+ }, Kr = (i, t) => {
3314
+ if (i = i ? i.filter(Boolean) : [], !t && !i.length)
3315
+ return;
3316
+ const e = new AbortController();
3317
+ let n = !1;
3318
+ const r = function(c) {
3319
+ if (!n) {
3320
+ n = !0, a();
3321
+ const u = c instanceof Error ? c : this.reason;
3322
+ e.abort(
3323
+ u instanceof y ? u : new Dt(u instanceof Error ? u.message : u)
3324
+ );
3325
+ }
3326
+ };
3327
+ let s = t && setTimeout(() => {
3328
+ s = null, r(new y(`timeout of ${t}ms exceeded`, y.ETIMEDOUT));
3329
+ }, t);
3330
+ const a = () => {
3331
+ i && (s && clearTimeout(s), s = null, i.forEach((c) => {
3332
+ c.unsubscribe ? c.unsubscribe(r) : c.removeEventListener("abort", r);
3333
+ }), i = null);
3334
+ };
3335
+ i.forEach((c) => c.addEventListener("abort", r));
3336
+ const { signal: o } = e;
3337
+ return o.unsubscribe = () => h.asap(a), o;
3338
+ }, Hr = function* (i, t) {
3328
3339
  let e = i.byteLength;
3329
3340
  if (e < t) {
3330
3341
  yield i;
@@ -3333,10 +3344,10 @@ const Lr = (i) => encodeURIComponent(i).replace(
3333
3344
  let n = 0, r;
3334
3345
  for (; n < e; )
3335
3346
  r = n + t, yield i.slice(n, r), n = r;
3336
- }, jr = async function* (i, t) {
3337
- for await (const e of qr(i))
3338
- yield* kr(e, t);
3339
- }, qr = async function* (i) {
3347
+ }, Wr = async function* (i, t) {
3348
+ for await (const e of Xr(i))
3349
+ yield* Hr(e, t);
3350
+ }, Xr = async function* (i) {
3340
3351
  if (i[Symbol.asyncIterator]) {
3341
3352
  yield* i;
3342
3353
  return;
@@ -3352,8 +3363,8 @@ const Lr = (i) => encodeURIComponent(i).replace(
3352
3363
  } finally {
3353
3364
  await t.cancel();
3354
3365
  }
3355
- }, ze = (i, t, e, n) => {
3356
- const r = jr(i, t);
3366
+ }, Ge = (i, t, e, n) => {
3367
+ const r = Wr(i, t);
3357
3368
  let s = 0, a, o = (c) => {
3358
3369
  a || (a = !0, n && n(c));
3359
3370
  };
@@ -3385,7 +3396,7 @@ const Lr = (i) => encodeURIComponent(i).replace(
3385
3396
  }
3386
3397
  );
3387
3398
  };
3388
- function Kr(i) {
3399
+ function zr(i) {
3389
3400
  if (!i || typeof i != "string" || !i.startsWith("data:")) return 0;
3390
3401
  const t = i.indexOf(",");
3391
3402
  if (t < 0) return 0;
@@ -3423,14 +3434,14 @@ function Kr(i) {
3423
3434
  }
3424
3435
  return s;
3425
3436
  }
3426
- const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3437
+ const Pe = "1.16.1", $e = 64 * 1024, { isFunction: Ft } = h, Je = (i, ...t) => {
3427
3438
  try {
3428
3439
  return !!i(...t);
3429
3440
  } catch {
3430
3441
  return !1;
3431
3442
  }
3432
- }, Hr = (i) => {
3433
- const t = h.global ?? globalThis, { ReadableStream: e, TextEncoder: n } = t;
3443
+ }, Gr = (i) => {
3444
+ const t = h.global !== void 0 && h.global !== null ? h.global : globalThis, { ReadableStream: e, TextEncoder: n } = t;
3434
3445
  i = h.merge.call(
3435
3446
  {
3436
3447
  skipUndefined: !0
@@ -3444,24 +3455,24 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3444
3455
  const { fetch: r, Request: s, Response: a } = i, o = r ? Ft(r) : typeof fetch == "function", c = Ft(s), u = Ft(a);
3445
3456
  if (!o)
3446
3457
  return !1;
3447
- const l = o && Ft(e), f = o && (typeof n == "function" ? /* @__PURE__ */ ((b) => (w) => b.encode(w))(new n()) : async (b) => new Uint8Array(await new s(b).arrayBuffer())), d = c && l && $e(() => {
3458
+ const l = o && Ft(e), f = o && (typeof n == "function" ? /* @__PURE__ */ ((b) => (v) => b.encode(v))(new n()) : async (b) => new Uint8Array(await new s(b).arrayBuffer())), d = c && l && Je(() => {
3448
3459
  let b = !1;
3449
- const w = new s(x.origin, {
3460
+ const v = new s(x.origin, {
3450
3461
  body: new e(),
3451
3462
  method: "POST",
3452
3463
  get duplex() {
3453
3464
  return b = !0, "half";
3454
3465
  }
3455
- }), T = w.headers.has("Content-Type");
3456
- return w.body != null && w.body.cancel(), b && !T;
3457
- }), g = u && l && $e(() => h.isReadableStream(new a("").body)), P = {
3466
+ }), T = v.headers.has("Content-Type");
3467
+ return v.body != null && v.body.cancel(), b && !T;
3468
+ }), g = u && l && Je(() => h.isReadableStream(new a("").body)), P = {
3458
3469
  stream: g && ((b) => b.body)
3459
3470
  };
3460
3471
  o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((b) => {
3461
- !P[b] && (P[b] = (w, T) => {
3462
- let A = w && w[b];
3472
+ !P[b] && (P[b] = (v, T) => {
3473
+ let A = v && v[b];
3463
3474
  if (A)
3464
- return A.call(w);
3475
+ return A.call(v);
3465
3476
  throw new y(
3466
3477
  `Response type '${b}' is not supported`,
3467
3478
  y.ERR_NOT_SUPPORT,
@@ -3483,19 +3494,19 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3483
3494
  return b.byteLength;
3484
3495
  if (h.isURLSearchParams(b) && (b = b + ""), h.isString(b))
3485
3496
  return (await f(b)).byteLength;
3486
- }, _ = async (b, w) => {
3497
+ }, _ = async (b, v) => {
3487
3498
  const T = h.toFiniteNumber(b.getContentLength());
3488
- return T ?? m(w);
3499
+ return T ?? m(v);
3489
3500
  };
3490
3501
  return async (b) => {
3491
3502
  let {
3492
- url: w,
3503
+ url: v,
3493
3504
  method: T,
3494
3505
  data: A,
3495
- signal: U,
3506
+ signal: L,
3496
3507
  cancelToken: E,
3497
3508
  timeout: K,
3498
- onDownloadProgress: J,
3509
+ onDownloadProgress: Q,
3499
3510
  onUploadProgress: X,
3500
3511
  responseType: F,
3501
3512
  headers: I,
@@ -3503,12 +3514,12 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3503
3514
  fetchOptions: st,
3504
3515
  maxContentLength: z,
3505
3516
  maxBodyLength: Yt
3506
- } = Pn(b);
3507
- const Et = h.isNumber(z) && z > -1, Tn = h.isNumber(Yt) && Yt > -1;
3508
- let Ee = r || fetch;
3517
+ } = wn(b);
3518
+ const Et = h.isNumber(z) && z > -1, Rn = h.isNumber(Yt) && Yt > -1;
3519
+ let we = r || fetch;
3509
3520
  F = F ? (F + "").toLowerCase() : "text";
3510
- let tt = Fr(
3511
- [U, E && E.toAbortSignal()],
3521
+ let tt = Kr(
3522
+ [L, E && E.toAbortSignal()],
3512
3523
  K
3513
3524
  ), k = null;
3514
3525
  const at = tt && tt.unsubscribe && (() => {
@@ -3516,14 +3527,14 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3516
3527
  });
3517
3528
  let ve;
3518
3529
  try {
3519
- if (Et && typeof w == "string" && w.startsWith("data:") && Kr(w) > z)
3530
+ if (Et && typeof v == "string" && v.startsWith("data:") && zr(v) > z)
3520
3531
  throw new y(
3521
3532
  "maxContentLength size of " + z + " exceeded",
3522
3533
  y.ERR_BAD_RESPONSE,
3523
3534
  b,
3524
3535
  k
3525
3536
  );
3526
- if (Tn && T !== "get" && T !== "head") {
3537
+ if (Rn && T !== "get" && T !== "head") {
3527
3538
  const R = await _(I, A);
3528
3539
  if (typeof R == "number" && isFinite(R) && R > Yt)
3529
3540
  throw new y(
@@ -3534,17 +3545,17 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3534
3545
  );
3535
3546
  }
3536
3547
  if (X && d && T !== "get" && T !== "head" && (ve = await _(I, A)) !== 0) {
3537
- let R = new s(w, {
3548
+ let R = new s(v, {
3538
3549
  method: "POST",
3539
3550
  body: A,
3540
3551
  duplex: "half"
3541
3552
  }), ft;
3542
3553
  if (h.isFormData(A) && (ft = R.headers.get("content-type")) && I.setContentType(ft), R.body) {
3543
- const [It, Nt] = He(
3554
+ const [It, Nt] = We(
3544
3555
  ve,
3545
- Wt(We(X))
3556
+ Wt(Xe(X))
3546
3557
  );
3547
- A = ze(R.body, Ge, It, Nt);
3558
+ A = Ge(R.body, $e, It, Nt);
3548
3559
  }
3549
3560
  }
3550
3561
  h.isString(ht) || (ht = ht ? "include" : "omit");
@@ -3553,18 +3564,18 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3553
3564
  const R = I.getContentType();
3554
3565
  R && /^multipart\/form-data/i.test(R) && !/boundary=/i.test(R) && I.delete("content-type");
3555
3566
  }
3556
- I.set("User-Agent", "axios/" + be, !1);
3567
+ I.set("User-Agent", "axios/" + Pe, !1);
3557
3568
  const et = {
3558
3569
  ...st,
3559
3570
  signal: tt,
3560
3571
  method: T.toUpperCase(),
3561
- headers: I.normalize().toJSON(),
3572
+ headers: pn(I.normalize()),
3562
3573
  body: A,
3563
3574
  duplex: "half",
3564
3575
  credentials: B ? ht : void 0
3565
3576
  };
3566
- k = c && new s(w, et);
3567
- let G = await (c ? Ee(k, st) : Ee(w, et));
3577
+ k = c && new s(v, et);
3578
+ let G = await (c ? we(k, st) : we(v, et));
3568
3579
  if (Et) {
3569
3580
  const R = h.toFiniteNumber(G.headers.get("content-length"));
3570
3581
  if (R != null && R > z)
@@ -3576,41 +3587,41 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3576
3587
  );
3577
3588
  }
3578
3589
  const te = g && (F === "stream" || F === "response");
3579
- if (g && G.body && (J || Et || te && at)) {
3590
+ if (g && G.body && (Q || Et || te && at)) {
3580
3591
  const R = {};
3581
- ["status", "statusText", "headers"].forEach((vt) => {
3582
- R[vt] = G[vt];
3592
+ ["status", "statusText", "headers"].forEach((wt) => {
3593
+ R[wt] = G[wt];
3583
3594
  });
3584
- const ft = h.toFiniteNumber(G.headers.get("content-length")), [It, Nt] = J && He(
3595
+ const ft = h.toFiniteNumber(G.headers.get("content-length")), [It, Nt] = Q && We(
3585
3596
  ft,
3586
- Wt(We(J), !0)
3597
+ Wt(Xe(Q), !0)
3587
3598
  ) || [];
3588
- let we = 0;
3589
- const An = (vt) => {
3590
- if (Et && (we = vt, we > z))
3599
+ let Se = 0;
3600
+ const Cn = (wt) => {
3601
+ if (Et && (Se = wt, Se > z))
3591
3602
  throw new y(
3592
3603
  "maxContentLength size of " + z + " exceeded",
3593
3604
  y.ERR_BAD_RESPONSE,
3594
3605
  b,
3595
3606
  k
3596
3607
  );
3597
- It && It(vt);
3608
+ It && It(wt);
3598
3609
  };
3599
3610
  G = new a(
3600
- ze(G.body, Ge, An, () => {
3611
+ Ge(G.body, $e, Cn, () => {
3601
3612
  Nt && Nt(), at && at();
3602
3613
  }),
3603
3614
  R
3604
3615
  );
3605
3616
  }
3606
3617
  F = F || "text";
3607
- let Q = await P[h.findKey(P, F) || "text"](
3618
+ let Z = await P[h.findKey(P, F) || "text"](
3608
3619
  G,
3609
3620
  b
3610
3621
  );
3611
3622
  if (Et && !g && !te) {
3612
3623
  let R;
3613
- if (Q != null && (typeof Q.byteLength == "number" ? R = Q.byteLength : typeof Q.size == "number" ? R = Q.size : typeof Q == "string" && (R = typeof n == "function" ? new n().encode(Q).byteLength : Q.length)), typeof R == "number" && R > z)
3624
+ if (Z != null && (typeof Z.byteLength == "number" ? R = Z.byteLength : typeof Z.size == "number" ? R = Z.size : typeof Z == "string" && (R = typeof n == "function" ? new n().encode(Z).byteLength : Z.length)), typeof R == "number" && R > z)
3614
3625
  throw new y(
3615
3626
  "maxContentLength size of " + z + " exceeded",
3616
3627
  y.ERR_BAD_RESPONSE,
@@ -3619,8 +3630,8 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3619
3630
  );
3620
3631
  }
3621
3632
  return !te && at && at(), await new Promise((R, ft) => {
3622
- yn(R, ft, {
3623
- data: Q,
3633
+ Pn(R, ft, {
3634
+ data: Z,
3624
3635
  headers: V.from(G.headers),
3625
3636
  status: G.status,
3626
3637
  statusText: G.statusText,
@@ -3647,23 +3658,23 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
3647
3658
  ) : y.from(B, B && B.code, b, k, B && B.response);
3648
3659
  }
3649
3660
  };
3650
- }, Wr = /* @__PURE__ */ new Map(), En = (i) => {
3661
+ }, $r = /* @__PURE__ */ new Map(), vn = (i) => {
3651
3662
  let t = i && i.env || {};
3652
3663
  const { fetch: e, Request: n, Response: r } = t, s = [n, r, e];
3653
- let a = s.length, o = a, c, u, l = Wr;
3664
+ let a = s.length, o = a, c, u, l = $r;
3654
3665
  for (; o--; )
3655
- c = s[o], u = l.get(c), u === void 0 && l.set(c, u = o ? /* @__PURE__ */ new Map() : Hr(t)), l = u;
3666
+ c = s[o], u = l.get(c), u === void 0 && l.set(c, u = o ? /* @__PURE__ */ new Map() : Gr(t)), l = u;
3656
3667
  return u;
3657
3668
  };
3658
- En();
3659
- const Pe = {
3660
- http: hr,
3661
- xhr: Mr,
3669
+ vn();
3670
+ const Ee = {
3671
+ http: _r,
3672
+ xhr: qr,
3662
3673
  fetch: {
3663
- get: En
3674
+ get: vn
3664
3675
  }
3665
3676
  };
3666
- h.forEach(Pe, (i, t) => {
3677
+ h.forEach(Ee, (i, t) => {
3667
3678
  if (i) {
3668
3679
  try {
3669
3680
  Object.defineProperty(i, "name", { __proto__: null, value: t });
@@ -3672,8 +3683,8 @@ h.forEach(Pe, (i, t) => {
3672
3683
  Object.defineProperty(i, "adapterName", { __proto__: null, value: t });
3673
3684
  }
3674
3685
  });
3675
- const Je = (i) => `- ${i}`, Xr = (i) => h.isFunction(i) || i === null || i === !1;
3676
- function zr(i, t) {
3686
+ const Qe = (i) => `- ${i}`, Jr = (i) => h.isFunction(i) || i === null || i === !1;
3687
+ function Qr(i, t) {
3677
3688
  i = h.isArray(i) ? i : [i];
3678
3689
  const { length: e } = i;
3679
3690
  let n, r;
@@ -3681,7 +3692,7 @@ function zr(i, t) {
3681
3692
  for (let a = 0; a < e; a++) {
3682
3693
  n = i[a];
3683
3694
  let o;
3684
- if (r = n, !Xr(n) && (r = Pe[(o = String(n)).toLowerCase()], r === void 0))
3695
+ if (r = n, !Jr(n) && (r = Ee[(o = String(n)).toLowerCase()], r === void 0))
3685
3696
  throw new y(`Unknown adapter '${o}'`);
3686
3697
  if (r && (h.isFunction(r) || (r = r.get(t))))
3687
3698
  break;
@@ -3692,8 +3703,8 @@ function zr(i, t) {
3692
3703
  ([c, u]) => `adapter ${c} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
3693
3704
  );
3694
3705
  let o = e ? a.length > 1 ? `since :
3695
- ` + a.map(Je).join(`
3696
- `) : " " + Je(a[0]) : "as no adapter specified";
3706
+ ` + a.map(Qe).join(`
3707
+ `) : " " + Qe(a[0]) : "as no adapter specified";
3697
3708
  throw new y(
3698
3709
  "There is no suitable adapter to dispatch the request " + o,
3699
3710
  "ERR_NOT_SUPPORT"
@@ -3701,24 +3712,24 @@ function zr(i, t) {
3701
3712
  }
3702
3713
  return r;
3703
3714
  }
3704
- const vn = {
3715
+ const Sn = {
3705
3716
  /**
3706
3717
  * Resolve an adapter from a list of adapter names or functions.
3707
3718
  * @type {Function}
3708
3719
  */
3709
- getAdapter: zr,
3720
+ getAdapter: Qr,
3710
3721
  /**
3711
3722
  * Exposes all known adapters
3712
3723
  * @type {Object<string, Function|Object>}
3713
3724
  */
3714
- adapters: Pe
3725
+ adapters: Ee
3715
3726
  };
3716
3727
  function oe(i) {
3717
3728
  if (i.cancelToken && i.cancelToken.throwIfRequested(), i.signal && i.signal.aborted)
3718
3729
  throw new Dt(null, i);
3719
3730
  }
3720
- function Qe(i) {
3721
- return oe(i), i.headers = V.from(i.headers), i.data = ae.call(i, i.transformRequest), ["post", "put", "patch"].indexOf(i.method) !== -1 && i.headers.setContentType("application/x-www-form-urlencoded", !1), vn.getAdapter(i.adapter || Ot.adapter, i)(i).then(
3731
+ function Ze(i) {
3732
+ return oe(i), i.headers = V.from(i.headers), i.data = ae.call(i, i.transformRequest), ["post", "put", "patch"].indexOf(i.method) !== -1 && i.headers.setContentType("application/x-www-form-urlencoded", !1), Sn.getAdapter(i.adapter || Ot.adapter, i)(i).then(
3722
3733
  function(n) {
3723
3734
  oe(i), i.response = n;
3724
3735
  try {
@@ -3729,7 +3740,7 @@ function Qe(i) {
3729
3740
  return n.headers = V.from(n.headers), n;
3730
3741
  },
3731
3742
  function(n) {
3732
- if (!mn(n) && (oe(i), n && n.response)) {
3743
+ if (!bn(n) && (oe(i), n && n.response)) {
3733
3744
  i.response = n.response;
3734
3745
  try {
3735
3746
  n.response.data = ae.call(
@@ -3752,10 +3763,10 @@ const Zt = {};
3752
3763
  return typeof n === i || "a" + (t < 1 ? "n " : " ") + i;
3753
3764
  };
3754
3765
  });
3755
- const Ze = {};
3766
+ const Ye = {};
3756
3767
  Zt.transitional = function(t, e, n) {
3757
3768
  function r(s, a) {
3758
- return "[Axios v" + be + "] Transitional option '" + s + "'" + a + (n ? ". " + n : "");
3769
+ return "[Axios v" + Pe + "] Transitional option '" + s + "'" + a + (n ? ". " + n : "");
3759
3770
  }
3760
3771
  return (s, a, o) => {
3761
3772
  if (t === !1)
@@ -3763,7 +3774,7 @@ Zt.transitional = function(t, e, n) {
3763
3774
  r(a, " has been removed" + (e ? " in " + e : "")),
3764
3775
  y.ERR_DEPRECATED
3765
3776
  );
3766
- return e && !Ze[a] && (Ze[a] = !0, console.warn(
3777
+ return e && !Ye[a] && (Ye[a] = !0, console.warn(
3767
3778
  r(
3768
3779
  a,
3769
3780
  " has been deprecated since v" + e + " and will be removed in the near future"
@@ -3774,7 +3785,7 @@ Zt.transitional = function(t, e, n) {
3774
3785
  Zt.spelling = function(t) {
3775
3786
  return (e, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
3776
3787
  };
3777
- function Gr(i, t, e) {
3788
+ function Zr(i, t, e) {
3778
3789
  if (typeof i != "object")
3779
3790
  throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
3780
3791
  const n = Object.keys(i);
@@ -3795,14 +3806,14 @@ function Gr(i, t, e) {
3795
3806
  }
3796
3807
  }
3797
3808
  const Kt = {
3798
- assertOptions: Gr,
3809
+ assertOptions: Zr,
3799
3810
  validators: Zt
3800
3811
  }, j = Kt.validators;
3801
3812
  let ut = class {
3802
3813
  constructor(t) {
3803
3814
  this.defaults = t || {}, this.interceptors = {
3804
- request: new Ke(),
3805
- response: new Ke()
3815
+ request: new He(),
3816
+ response: new He()
3806
3817
  };
3807
3818
  }
3808
3819
  /**
@@ -3882,7 +3893,7 @@ let ut = class {
3882
3893
  if (typeof m.runWhen == "function" && m.runWhen(e) === !1)
3883
3894
  return;
3884
3895
  c = c && m.synchronous;
3885
- const _ = e.transitional || me;
3896
+ const _ = e.transitional || ye;
3886
3897
  _ && _.legacyInterceptorReqResOrdering ? o.unshift(m.fulfilled, m.rejected) : o.push(m.fulfilled, m.rejected);
3887
3898
  });
3888
3899
  const u = [];
@@ -3891,7 +3902,7 @@ let ut = class {
3891
3902
  });
3892
3903
  let l, f = 0, d;
3893
3904
  if (!c) {
3894
- const P = [Qe.bind(this), void 0];
3905
+ const P = [Ze.bind(this), void 0];
3895
3906
  for (P.unshift(...o), P.push(...u), d = P.length, l = Promise.resolve(e); f < d; )
3896
3907
  l = l.then(P[f++], P[f++]);
3897
3908
  return l;
@@ -3908,7 +3919,7 @@ let ut = class {
3908
3919
  }
3909
3920
  }
3910
3921
  try {
3911
- l = Qe.call(this, g);
3922
+ l = Ze.call(this, g);
3912
3923
  } catch (P) {
3913
3924
  return Promise.reject(P);
3914
3925
  }
@@ -3918,8 +3929,8 @@ let ut = class {
3918
3929
  }
3919
3930
  getUri(t) {
3920
3931
  t = lt(this.defaults, t);
3921
- const e = bn(t.baseURL, t.url, t.allowAbsoluteUrls);
3922
- return _n(e, t.params, t.paramsSerializer);
3932
+ const e = En(t.baseURL, t.url, t.allowAbsoluteUrls);
3933
+ return mn(e, t.params, t.paramsSerializer);
3923
3934
  }
3924
3935
  };
3925
3936
  h.forEach(["delete", "get", "head", "options"], function(t) {
@@ -3950,7 +3961,7 @@ h.forEach(["post", "put", "patch", "query"], function(t) {
3950
3961
  }
3951
3962
  ut.prototype[t] = e(), t !== "query" && (ut.prototype[t + "Form"] = e(!0));
3952
3963
  });
3953
- let $r = class wn {
3964
+ let Yr = class Tn {
3954
3965
  constructor(t) {
3955
3966
  if (typeof t != "function")
3956
3967
  throw new TypeError("executor must be a function.");
@@ -4016,19 +4027,19 @@ let $r = class wn {
4016
4027
  static source() {
4017
4028
  let t;
4018
4029
  return {
4019
- token: new wn(function(r) {
4030
+ token: new Tn(function(r) {
4020
4031
  t = r;
4021
4032
  }),
4022
4033
  cancel: t
4023
4034
  };
4024
4035
  }
4025
4036
  };
4026
- function Jr(i) {
4037
+ function ts(i) {
4027
4038
  return function(e) {
4028
4039
  return i.apply(null, e);
4029
4040
  };
4030
4041
  }
4031
- function Qr(i) {
4042
+ function es(i) {
4032
4043
  return h.isObject(i) && i.isAxiosError === !0;
4033
4044
  }
4034
4045
  const de = {
@@ -4105,52 +4116,52 @@ const de = {
4105
4116
  Object.entries(de).forEach(([i, t]) => {
4106
4117
  de[t] = i;
4107
4118
  });
4108
- function Sn(i) {
4109
- const t = new ut(i), e = rn(ut.prototype.request, t);
4119
+ function An(i) {
4120
+ const t = new ut(i), e = sn(ut.prototype.request, t);
4110
4121
  return h.extend(e, ut.prototype, t, { allOwnKeys: !0 }), h.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(r) {
4111
- return Sn(lt(i, r));
4122
+ return An(lt(i, r));
4112
4123
  }, e;
4113
4124
  }
4114
- const C = Sn(Ot);
4125
+ const C = An(Ot);
4115
4126
  C.Axios = ut;
4116
4127
  C.CanceledError = Dt;
4117
- C.CancelToken = $r;
4118
- C.isCancel = mn;
4119
- C.VERSION = be;
4128
+ C.CancelToken = Yr;
4129
+ C.isCancel = bn;
4130
+ C.VERSION = Pe;
4120
4131
  C.toFormData = Qt;
4121
4132
  C.AxiosError = y;
4122
4133
  C.Cancel = C.CanceledError;
4123
4134
  C.all = function(t) {
4124
4135
  return Promise.all(t);
4125
4136
  };
4126
- C.spread = Jr;
4127
- C.isAxiosError = Qr;
4137
+ C.spread = ts;
4138
+ C.isAxiosError = es;
4128
4139
  C.mergeConfig = lt;
4129
4140
  C.AxiosHeaders = V;
4130
- C.formToJSON = (i) => gn(h.isHTMLForm(i) ? new FormData(i) : i);
4131
- C.getAdapter = vn.getAdapter;
4141
+ C.formToJSON = (i) => yn(h.isHTMLForm(i) ? new FormData(i) : i);
4142
+ C.getAdapter = Sn.getAdapter;
4132
4143
  C.HttpStatusCode = de;
4133
4144
  C.default = C;
4134
4145
  const {
4135
- Axios: is,
4136
- AxiosError: rs,
4137
- CanceledError: ss,
4138
- isCancel: as,
4139
- CancelToken: os,
4140
- VERSION: cs,
4141
- all: us,
4142
- Cancel: ls,
4143
- isAxiosError: hs,
4144
- spread: fs,
4145
- toFormData: ps,
4146
- AxiosHeaders: ds,
4147
- HttpStatusCode: _s,
4148
- formToJSON: gs,
4149
- getAdapter: ms,
4150
- mergeConfig: ys,
4151
- create: bs
4146
+ Axios: os,
4147
+ AxiosError: cs,
4148
+ CanceledError: us,
4149
+ isCancel: ls,
4150
+ CancelToken: hs,
4151
+ VERSION: fs,
4152
+ all: ps,
4153
+ Cancel: ds,
4154
+ isAxiosError: _s,
4155
+ spread: gs,
4156
+ toFormData: ms,
4157
+ AxiosHeaders: ys,
4158
+ HttpStatusCode: bs,
4159
+ formToJSON: Ps,
4160
+ getAdapter: Es,
4161
+ mergeConfig: ws,
4162
+ create: vs
4152
4163
  } = C;
4153
- class Ps extends Rn {
4164
+ class Ss extends On {
4154
4165
  __pinPad__ = {
4155
4166
  buffer: null,
4156
4167
  about: {
@@ -4338,11 +4349,11 @@ class Ps extends Rn {
4338
4349
  environment: "production",
4339
4350
  socket: !1
4340
4351
  }) {
4341
- if (super({ filters: t, config_port: e, no_device: n, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !Cn())
4352
+ if (super({ filters: t, config_port: e, no_device: n, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !Dn())
4342
4353
  throw new Error("Crypto not supported in this browser");
4343
- if (Ae.getCustom(this.typeDevice, n))
4354
+ if (Re.getCustom(this.typeDevice, n))
4344
4355
  throw new Error(`Device ${this.typeDevice} ${n} already exists`);
4345
- 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(), Ae.add(this);
4356
+ this.__internal__.time.response_connection = 3e3, this.__internal__.time.response_general = 5e3, this.__internal__.serial.delay_first_connection = 1e3, this.environment = o, s && (this.username = s), a && (this.password = a), this.#A(), Re.add(this);
4346
4357
  }
4347
4358
  #A() {
4348
4359
  const t = [
@@ -4423,7 +4434,7 @@ class Ps extends Rn {
4423
4434
  #I(t, e) {
4424
4435
  const n = this.__pinPad__.about?.brand?.toLowerCase(), r = this.__pinPad__.about?.model?.toLowerCase(), s = n === "ingenico" && r === "ipp320" ? 500 : 350;
4425
4436
  if (e.length < s) {
4426
- 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");
4437
+ 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"), e.includes("INSERTE CHIP O DESLICE TARJETA") && (this.dispatch("pp:sale-process", { step: "insert-card", message: "Please insert or swipe the card" }), this.dispatch("pp:insert-card", { waiting: !0 }));
4427
4438
  return;
4428
4439
  }
4429
4440
  if (e.includes("M1") || e.includes("M0") || e.includes("M1") || e.includes("N1") || e.includes("N1") || e.includes("P93A022") && e.substring(e.length - 24).includes("I") && e.substring(e.length - 1).includes("") || e.includes("P93A800") && e.substring(e.length - 24).includes("I") && e.substring(e.length - 1).includes("") || e.includes("P93A022") && e.length >= 406 && r === "vx820" || e.includes("P93A022") && e.length >= 406 && r === "vx520" || e.includes("P93A800") && e.length >= 406 && r === "vx520" || e.includes("P93A800") && e.length >= 406 && r === "vx820" || e.includes("P93A022") && e.length >= 406 && r === "p400" || e.includes("P93A800") && e.length >= 406 && r === "p400" || e.includes("P93A022") && e.length >= 406 && r === "v205c" || e.includes("P93A800") && e.length >= 406 && r === "v205c" || e.includes("P93A022") && e.length >= 406 && r === "move2500" || e.includes("P93A800") && e.length >= 406 && r === "move2500" || e.includes("P93A022") && e.length >= 406 && r === "lane3000" || e.includes("P93A800") && e.length >= 406 && r === "lane3000") {
@@ -4485,7 +4496,7 @@ class Ps extends Rn {
4485
4496
  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." }));
4486
4497
  }
4487
4498
  // @ts-expect-error parts is not used
4488
- #U(t, e) {
4499
+ #L(t, e) {
4489
4500
  if (this.__pinPad__.about.model?.toLowerCase() === "vx520") {
4490
4501
  if (e.length > 11)
4491
4502
  if (e.includes("P59A00"))
@@ -4511,7 +4522,7 @@ class Ps extends Rn {
4511
4522
  this.dispatch("pp:print", n);
4512
4523
  }
4513
4524
  }
4514
- #L(t, e) {
4525
+ #U(t, e) {
4515
4526
  console.log(t, e);
4516
4527
  }
4517
4528
  #V(t, e) {
@@ -4535,13 +4546,13 @@ class Ps extends Rn {
4535
4546
  e.name = "About PinPad", e.description = "Response of about", e.no_code = 101, this.#f(s, r);
4536
4547
  break;
4537
4548
  case "inject":
4538
- e.name = "Inject", e.description = "Response of inject values", e.no_code = 102, this.#C();
4549
+ this.dispatch("pp:sale-process", { step: "inject", message: "Injecting values..." }), e.name = "Inject", e.description = "Response of inject values", e.no_code = 102, this.#C();
4539
4550
  break;
4540
4551
  case "init-dukpt":
4541
- e.name = "Init DUKPT", e.description = "Response of init DUKPT", e.no_code = 103, this.#O(s, r);
4552
+ this.dispatch("pp:sale-process", { step: "dukpt-init", message: "Initializing DUKPT..." }), e.name = "Init DUKPT", e.description = "Response of init DUKPT", e.no_code = 103, this.#O(s, r);
4542
4553
  break;
4543
4554
  case "dukpt":
4544
- e.name = "Write DUKPT", e.description = "Response of write DUKPT", e.no_code = 104, this.#D();
4555
+ this.dispatch("pp:sale-process", { step: "dukpt-written", message: "Written DUKPT..." }), e.name = "Write DUKPT", e.description = "Response of write DUKPT", e.no_code = 104, this.#D();
4545
4556
  break;
4546
4557
  case "read-card":
4547
4558
  e.name = "read card", e.description = "response of read card", e.no_code = 105, this.#I(s, r);
@@ -4553,13 +4564,13 @@ class Ps extends Rn {
4553
4564
  e.name = "cancel pinpad", e.description = "response of cancel", e.no_code = 107;
4554
4565
  break;
4555
4566
  case "print":
4556
- this.#U(s, r), e.name = "print voucher", e.description = "response of print", e.no_code = 108;
4567
+ this.#L(s, r), e.name = "print voucher", e.description = "response of print", e.no_code = 108;
4557
4568
  break;
4558
4569
  case "cancel-read-card":
4559
4570
  this.#x(s, r), e.name = "cancel read card", e.description = "response of cancel read card", e.no_code = 109;
4560
4571
  break;
4561
4572
  case "code93":
4562
- this.#L(s, r), e.name = "code 93", e.description = "response of code 93", e.no_code = 110;
4573
+ this.#U(s, r), e.name = "code 93", e.description = "response of code 93", e.no_code = 110;
4563
4574
  break;
4564
4575
  case "finish-emv-end":
4565
4576
  this.#V(s, r), e.name = "Finish EMV End", e.description = "response of finish EMV End", e.no_code = 111;
@@ -4657,7 +4668,7 @@ class Ps extends Rn {
4657
4668
  // Updated to WS v4
4658
4669
  // ========================================================================================
4659
4670
  #s(t, e) {
4660
- const n = new li();
4671
+ const n = new fi();
4661
4672
  return n.setPublicKey(t), n.encrypt(e);
4662
4673
  }
4663
4674
  #a(t) {
@@ -4754,7 +4765,8 @@ class Ps extends Rn {
4754
4765
  return t.includes("@cnb Santander") ? (t = t.replace("@cnb Santander", "@logo1@br"), this.#t(t, n, r)) : t.includes("@cnb American Express") ? (t = t.replace("@cnb American Express", "@logo2@br"), this.#t(t, n, r)) : t.includes("@cnb HSBC") ? (t = t.replace("@cnb HSBC", "@logo7@br"), this.#t(t, n, r)) : t.includes("@cnb IXE") ? (t = t.replace("@cnb IXE", "@logo11@br"), this.#t(t, n, r)) : t.includes("@cnb MULTIVA") ? (t = t.replace("@cnb MULTIVA", "@logo15@br"), this.#t(t, n, r)) : t.includes("@cnb Multiva") ? (t = t.replace("@cnb Multiva", "@logo15@br"), this.#t(t, n, r)) : t.includes("@cnb SCOTIA BANK") ? (t = t.replace("@cnb SCOTIA BANK", "@logo16@br"), this.#t(t, n, r)) : t.includes("@cnb SCOTIABANK") ? (t = t.replace("@cnb SCOTIABANK", "@logo16@br"), this.#t(t, n, r)) : t.includes("@cnb BANCOMER") ? (t = t.replace("@cnb BANCOMER", "@logo17@br"), this.#t(t, n, r)) : t.includes("@cnb Bancomer") ? (t = t.replace("@cnb Bancomer", "@logo17@br"), this.#t(t, n, r)) : t.includes("@cnb BBVA") ? (t = t.replace("@cnb BBVA", "@logo17@br"), this.#t(t, n, r)) : t.includes("@cnb BANORTE") ? (t = t.replace("@cnb BANORTE", "@logo18@br"), this.#t(t, n, r)) : t.includes("@cnb Banorte") ? (t = t.replace("@cnb Banorte", "@logo18@br"), this.#t(t, n, r)) : t.includes("@cnb BANREGIO") ? (t = t.replace("@cnb BANREGIO", "@logo19@br"), this.#t(t, n, r)) : t.includes("@cnb Banregio") ? (t = t.replace("@cnb Banregio", "@logo19@br"), this.#t(t, n, r)) : t.includes("@cnb GETNET") ? (t = t.replace("@cnb GETNET", "@logo20@br"), this.#t(t, n, r)) : t.includes("@cnb GetNET") ? (t = t.replace("@cnb GetNET", "@logo20@br"), this.#t(t, n, r)) : this.#t(t, n, r);
4755
4766
  }
4756
4767
  async #q(t = !1) {
4757
- if (this.#H(), this.__pinPad__.config.loginResponse && !t) return await this.#p();
4768
+ if (this.#H(), this.__pinPad__.config.loginResponse && !t)
4769
+ return await this.#p();
4758
4770
  const e = this.url + this.__pinPad__.constants.uris.login, n = {
4759
4771
  usuario: this.username,
4760
4772
  password: this.password,
@@ -4842,7 +4854,7 @@ class Ps extends Rn {
4842
4854
  ), this.__pinPad__.config.publicKeyRSA;
4843
4855
  }
4844
4856
  clearSession() {
4845
- localStorage.removeItem("ppLoginResponse"), localStorage.removeItem("ppRSAKey"), localStorage.removeItem("ppPublicIP");
4857
+ localStorage.removeItem("ppLoginResponse"), localStorage.removeItem("ppRSAKey"), localStorage.removeItem("ppPublicIP"), localStorage.removeItem("ppGeolocation");
4846
4858
  }
4847
4859
  #d() {
4848
4860
  const t = localStorage.getItem("ppRSAKey");
@@ -4861,7 +4873,7 @@ class Ps extends Rn {
4861
4873
  return /^[A-Z-a-z0-9\s]+$/g.test(t);
4862
4874
  }
4863
4875
  #X(t) {
4864
- if (Z(t))
4876
+ if ($(t))
4865
4877
  return !0;
4866
4878
  const e = /^[A-Z-a-z0-9\s]+$/g.test(t) === !0;
4867
4879
  if (!e)
@@ -4914,7 +4926,7 @@ class Ps extends Rn {
4914
4926
  return e + n;
4915
4927
  }
4916
4928
  async checkPositionPermission() {
4917
- if (!Se())
4929
+ if (!Te())
4918
4930
  throw new Error("Geolocation not supported");
4919
4931
  return new Promise((t, e) => {
4920
4932
  navigator.permissions.query({ name: "geolocation" }).then((n) => {
@@ -4923,35 +4935,75 @@ class Ps extends Rn {
4923
4935
  });
4924
4936
  }
4925
4937
  async getPosition() {
4926
- return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, Se() ? new Promise((t) => {
4927
- navigator.geolocation.getCurrentPosition(
4928
- (e) => {
4929
- this.__pinPad__.config.latitude = e.coords.latitude, this.__pinPad__.config.longitude = e.coords.longitude, t(this.latitudeLongitude);
4930
- },
4931
- () => {
4932
- t(this.latitudeLongitude);
4938
+ const t = "ppGeolocation";
4939
+ if (!this.__pinPad__.config.latitude || !this.__pinPad__.config.longitude) {
4940
+ const r = localStorage.getItem(t);
4941
+ if (r)
4942
+ try {
4943
+ const s = JSON.parse(r);
4944
+ s.data?.latitude && s.data?.longitude && (this.__pinPad__.config.latitude = s.data.latitude, this.__pinPad__.config.longitude = s.data.longitude);
4945
+ } catch {
4946
+ localStorage.removeItem(t);
4933
4947
  }
4934
- );
4935
- }) : this.latitudeLongitude);
4948
+ }
4949
+ const n = localStorage.getItem(t);
4950
+ if (n)
4951
+ try {
4952
+ const r = JSON.parse(n);
4953
+ if ((/* @__PURE__ */ new Date()).getTime() - r.timestamp < 864e5 && r.data?.latitude && r.data?.longitude)
4954
+ return this.__pinPad__.config.latitude = r.data.latitude, this.__pinPad__.config.longitude = r.data.longitude, this.latitudeLongitude;
4955
+ } catch {
4956
+ localStorage.removeItem(t);
4957
+ }
4958
+ return Te() ? new Promise((r) => {
4959
+ navigator.permissions.query({ name: "geolocation" }).then((s) => {
4960
+ s.state === "granted" ? navigator.geolocation.getCurrentPosition(
4961
+ (a) => {
4962
+ this.__pinPad__.config.latitude = a.coords.latitude, this.__pinPad__.config.longitude = a.coords.longitude, localStorage.setItem(
4963
+ t,
4964
+ JSON.stringify({
4965
+ timestamp: (/* @__PURE__ */ new Date()).getTime(),
4966
+ data: {
4967
+ latitude: a.coords.latitude,
4968
+ longitude: a.coords.longitude
4969
+ }
4970
+ })
4971
+ ), r(this.latitudeLongitude);
4972
+ },
4973
+ () => {
4974
+ r(this.latitudeLongitude);
4975
+ },
4976
+ {
4977
+ enableHighAccuracy: !1,
4978
+ timeout: 5e3,
4979
+ maximumAge: 6e4
4980
+ }
4981
+ ) : r(this.latitudeLongitude);
4982
+ }).catch(() => r(this.latitudeLongitude));
4983
+ }) : this.latitudeLongitude;
4936
4984
  }
4937
4985
  async #G() {
4938
- const t = localStorage.getItem("ppPublicIP");
4939
- if (t) {
4940
- const s = JSON.parse(t);
4941
- this.__pinPad__.config.publicIP = s.data, (/* @__PURE__ */ new Date()).getTime() - s.timestamp >= 864e5 && (this.__pinPad__.config.publicIP = null);
4942
- }
4943
- if (this.__pinPad__.config.publicIP) return this.__pinPad__.config.publicIP;
4944
- this.__pinPad__.config.publicIP = null;
4945
- let e = !1;
4946
- const n = await C.get("https://api.ipify.org?format=json").catch(() => e = !0);
4947
- if (e || typeof n != "object" || !n || !n.data)
4948
- return null;
4949
- const r = n.data || {};
4950
- return this.__pinPad__.config.publicIP = r.ip || null, localStorage.setItem(
4986
+ const e = localStorage.getItem("ppPublicIP");
4987
+ let n = null, r = !1;
4988
+ if (e)
4989
+ try {
4990
+ const c = JSON.parse(e);
4991
+ if (n = c.data || null, this.__pinPad__.config.publicIP = n, (/* @__PURE__ */ new Date()).getTime() - c.timestamp < 864e5)
4992
+ return this.__pinPad__.config.publicIP;
4993
+ r = !0;
4994
+ } catch {
4995
+ localStorage.removeItem("ppPublicIP");
4996
+ }
4997
+ let s = !1;
4998
+ const a = await C.get("https://api.ipify.org?format=json").catch(() => s = !0);
4999
+ if (s || typeof a != "object" || !a || !a.data)
5000
+ return r && n ? this.__pinPad__.config.publicIP : (this.__pinPad__.config.publicIP = null, null);
5001
+ const o = a.data || {};
5002
+ return this.__pinPad__.config.publicIP = o.ip || null, localStorage.setItem(
4951
5003
  "ppPublicIP",
4952
5004
  JSON.stringify({
4953
5005
  timestamp: (/* @__PURE__ */ new Date()).getTime(),
4954
- data: r.ip
5006
+ data: o.ip
4955
5007
  })
4956
5008
  ), this.__pinPad__.config.publicIP;
4957
5009
  }
@@ -5023,7 +5075,7 @@ class Ps extends Rn {
5023
5075
  // this.dispatch('pp:merchant-moto', response);
5024
5076
  // return response;
5025
5077
  // }
5026
- async #v({ data: t, url: e, cancelable: n = !1 } = {
5078
+ async #w({ data: t, url: e, cancelable: n = !1 } = {
5027
5079
  data: null,
5028
5080
  url: "",
5029
5081
  cancelable: !1
@@ -5037,8 +5089,12 @@ class Ps extends Rn {
5037
5089
  data: s || ""
5038
5090
  }
5039
5091
  }).catch(async (u) => {
5040
- let l = `Error in request, verify internet connection: ${u.status} ${u.message}`;
5041
- throw u.response.status >= 500 && u.response.status <= 599 ? l = "Service Temporarily Unavailable" : u.response.status >= 400 && u.response.status <= 499 && (l = "Bad Request"), n && await o.#z(), new Error(l);
5092
+ let l;
5093
+ throw u.code === "ERR_NETWORK" && u.name === "AxiosError" && (l = `Error in request, verify internet connection: ${u.code} ${u.message}`), u.status && u.response && (l = `Error in request, verify internet connection: ${u.status} ${u.message}`, u.response.status >= 500 && u.response.status <= 599 ? l = "Service Temporarily Unavailable" : u.response.status >= 400 && u.response.status <= 499 && (l = "Bad Request")), n && await o.#z(), o.dispatch("pp:error", {
5094
+ error: !0,
5095
+ code: u.response?.status || "NETWORK_ERROR",
5096
+ message: l
5097
+ }), new Error(l);
5042
5098
  })).data;
5043
5099
  }
5044
5100
  async #$() {
@@ -5051,7 +5107,7 @@ class Ps extends Rn {
5051
5107
  }
5052
5108
  async #J() {
5053
5109
  this.__pinPad__.operation.bin8 && (this.__pinPad__.operation.bin = this.__pinPad__.operation.bin8), this.__pinPad__.operation.bin8 = "";
5054
- const t = await this.#v({
5110
+ const t = await this.#w({
5055
5111
  data: {
5056
5112
  accion: "tipoPagoInfo",
5057
5113
  cc_num: this.__pinPad__.operation.bin,
@@ -5080,7 +5136,7 @@ class Ps extends Rn {
5080
5136
  if (this.__pinPad__.waiting.statusAboutWaiting) throw new Error("AboutPP is already running");
5081
5137
  const e = this.__pinPad__.constants.STX, n = this.__pinPad__.constants.ETX;
5082
5138
  let r = "C56AABOUT";
5083
- if (r = e + this.#e(r) + r + n, r = r + this.#n(r), Z(this.__pinPad__.about.pp)) {
5139
+ if (r = e + this.#e(r) + r + n, r = r + this.#n(r), $(this.__pinPad__.about.pp)) {
5084
5140
  this.__pinPad__.waiting.statusAboutWaiting = "pending";
5085
5141
  const a = this.parseStringToBytes(r, "");
5086
5142
  await this.appendToQueue(a, "about");
@@ -5090,7 +5146,7 @@ class Ps extends Rn {
5090
5146
  return new Promise((a, o) => {
5091
5147
  s = setInterval(() => {
5092
5148
  if (this.__pinPad__.waiting.statusAboutWaiting === "resolved") {
5093
- if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null, Z(this.__pinPad__.about.pp))
5149
+ if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null, $(this.__pinPad__.about.pp))
5094
5150
  return;
5095
5151
  if (!t || typeof t != "function") {
5096
5152
  a(!0);
@@ -5106,11 +5162,11 @@ class Ps extends Rn {
5106
5162
  });
5107
5163
  }
5108
5164
  async #h(t, e) {
5109
- if (t = t ? t.toString() : "", e = e ? e.toString() : "", Z(t) || t === "0") {
5165
+ if (t = t ? t.toString() : "", e = e ? e.toString() : "", $(t) || t === "0") {
5110
5166
  this.dispatch("pp:dukpt", { status: "unsupported", already: !1 });
5111
5167
  return;
5112
5168
  }
5113
- if (Z(e) || e === "1") {
5169
+ if ($(e) || e === "1") {
5114
5170
  this.dispatch("pp:dukpt", { status: "charged", already: !0 });
5115
5171
  return;
5116
5172
  }
@@ -5138,7 +5194,7 @@ class Ps extends Rn {
5138
5194
  },
5139
5195
  terminal: this.__pinPad__.config.terminal
5140
5196
  }
5141
- }, e = await this.#v({
5197
+ }, e = await this.#w({
5142
5198
  data: t,
5143
5199
  url: this.url + this.__pinPad__.constants.uris.keysDUKPT
5144
5200
  });
@@ -5159,7 +5215,7 @@ class Ps extends Rn {
5159
5215
  });
5160
5216
  });
5161
5217
  }
5162
- #w(t, e = 0) {
5218
+ #v(t, e = 0) {
5163
5219
  if (t = parseFloat(t.toString().replace(/[^0-9.-]/g, "")), isNaN(t) || t === 0)
5164
5220
  return parseFloat("0").toFixed(e);
5165
5221
  t = t.toFixed(e);
@@ -5175,7 +5231,7 @@ class Ps extends Rn {
5175
5231
  async #tt() {
5176
5232
  this.__pinPad__.operation.errors = 0;
5177
5233
  let t = "ACERQUE, INSERTE CHIP O DESLICE TARJETA";
5178
- 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)))
5234
+ if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model?.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), $(this.amount) || isNaN(parseFloat(this.amount)))
5179
5235
  throw new Error("Amount required");
5180
5236
  if (parseFloat(this.amount) <= 0)
5181
5237
  throw new Error("Amount must be greater than 0");
@@ -5202,14 +5258,14 @@ class Ps extends Rn {
5202
5258
  });
5203
5259
  }
5204
5260
  async #et(t) {
5205
- return await Te(t * 1e3);
5261
+ return await Ae(t * 1e3);
5206
5262
  }
5207
5263
  /**
5208
5264
  * @param {null|string} reference
5209
5265
  * @return {Promise<any>}
5210
5266
  */
5211
5267
  async consult({ reference: t = null } = { reference: null }) {
5212
- 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({
5268
+ return t || (t = this.reference), $(t) && (t = "--", this.reference = t), this.#X(this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await this.#u({
5213
5269
  Ambiente: this.environment,
5214
5270
  User: this.username,
5215
5271
  Pwd: this.password,
@@ -5271,7 +5327,7 @@ class Ps extends Rn {
5271
5327
  return r ? Promise.reject(r) : Promise.reject("Communication error with CDP. IL/MTY");
5272
5328
  }
5273
5329
  #rt(t) {
5274
- if (Z(t)) throw new Error("Number of authorization invalid");
5330
+ if ($(t)) throw new Error("Number of authorization invalid");
5275
5331
  if (/^[A-Za-z0-9]+$/g.test(t) !== !0) throw new Error("Number of authorization invalid");
5276
5332
  if (t.length !== 6) throw new Error("Number of authorization invalid");
5277
5333
  return !0;
@@ -5378,7 +5434,7 @@ class Ps extends Rn {
5378
5434
  if (!this.#m(t)) throw new Error("Invalid amount");
5379
5435
  if (!this.#rt(e)) throw new Error("Invalid authorization");
5380
5436
  if (!this.#y(n)) throw new Error("Invalid folio");
5381
- const r = this.#w(t, 2), s = {
5437
+ const r = this.#v(t, 2), s = {
5382
5438
  Ambiente: this.environment,
5383
5439
  User: this.username,
5384
5440
  Pwd: this.password,
@@ -5430,7 +5486,7 @@ class Ps extends Rn {
5430
5486
  object: {}
5431
5487
  };
5432
5488
  try {
5433
- const n = await this.#w(this.amount, 2);
5489
+ const n = await this.#v(this.amount, 2);
5434
5490
  await this.#u({
5435
5491
  Ambiente: this.environment,
5436
5492
  Country: this.__pinPad__.config.country,
@@ -5496,7 +5552,7 @@ class Ps extends Rn {
5496
5552
  serie: this.__pinPad__.about.serial,
5497
5553
  terminal: {
5498
5554
  display: "1",
5499
- is_contactless: s,
5555
+ is_contactless: s ? "1" : "0",
5500
5556
  is_mobile: "0",
5501
5557
  printer: this.__pinPad__.about.printer
5502
5558
  },
@@ -5570,7 +5626,7 @@ class Ps extends Rn {
5570
5626
  this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5571
5627
  else {
5572
5628
  const t = this.parseStringToBytes(this.__pinPad__.operation.ignore.C93Global, "");
5573
- await this.appendToQueue(t, "code93"), await Te(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5629
+ await this.appendToQueue(t, "code93"), await Ae(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5574
5630
  }
5575
5631
  }
5576
5632
  #T(t) {
@@ -5648,6 +5704,16 @@ class Ps extends Rn {
5648
5704
  #ht() {
5649
5705
  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;
5650
5706
  }
5707
+ createReference() {
5708
+ const t = Date.now().toString(), e = Math.random().toString(36).substring(2, 12).toUpperCase();
5709
+ return `${t}${e}`;
5710
+ }
5711
+ verifyNetwork() {
5712
+ return new Promise((t) => {
5713
+ const e = new Image();
5714
+ e.onload = () => t(!0), e.onerror = () => t(!1), e.src = "https://www.google.com/favicon.ico?" + (/* @__PURE__ */ new Date()).getTime();
5715
+ });
5716
+ }
5651
5717
  // ========================================================================================
5652
5718
  // Needed for WS v4
5653
5719
  // ========================================================================================
@@ -5656,13 +5722,20 @@ class Ps extends Rn {
5656
5722
  * @param {null|string} reference
5657
5723
  * @returns {Promise<{error: boolean, message: null, approved: boolean, object: {}}>}
5658
5724
  */
5659
- async makeSale({ amount: t = 0, reference: e = null } = {}) {
5725
+ async makeSale({
5726
+ amount: t = 0,
5727
+ reference: e = null
5728
+ } = {}) {
5660
5729
  if (t = parseFloat(t.toString()), isNaN(t) || t <= 0)
5661
5730
  throw new Error("Amount is required and must be greater than 0");
5662
- if (this.amount = t, !e || Z(e) || !this.#g(e))
5731
+ if (this.amount = t, (!e || $(e)) && (e = this.createReference()), !e || $(e) || !this.#g(e))
5663
5732
  throw new Error("Reference is required and must be alphanumeric");
5664
5733
  if (this.reference = e, /^[A-Z-a-z\s]+$/g.test(this.__pinPad__.config.currency) === !1)
5665
5734
  throw new Error("Invalid currency");
5735
+ if (this.username === null || this.username.trim() === "")
5736
+ throw new Error("Username are required");
5737
+ if (this.password === null || this.password.trim() === "")
5738
+ throw new Error("Password are required");
5666
5739
  const n = {
5667
5740
  error: !1,
5668
5741
  message: null,
@@ -5670,13 +5743,18 @@ class Ps extends Rn {
5670
5743
  object: {}
5671
5744
  };
5672
5745
  try {
5746
+ if (!await this.verifyNetwork())
5747
+ throw new Error("No internet connection");
5673
5748
  return await this.login(), await this.#Y(), !await this.#tt() || !await this.#J() ? n : await this.#at();
5674
5749
  } catch (r) {
5675
- console.warn(r), n.error = !0, n.message = r.message, n.approved = !1, n.object = r;
5750
+ this.dispatch("pp:sale-process", {
5751
+ step: "error",
5752
+ message: r.message
5753
+ }), n.error = !0, n.message = r.message, n.approved = !1, n.object = r;
5676
5754
  }
5677
5755
  return n;
5678
5756
  }
5679
5757
  }
5680
5758
  export {
5681
- Ps as PinPad
5759
+ Ss as PinPad
5682
5760
  };