@opensecret/react 1.5.1 → 1.5.2

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.
@@ -1,9 +1,9 @@
1
- var Xy = Object.defineProperty;
1
+ var Qy = Object.defineProperty;
2
2
  var Cf = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var Qy = (r, e, t) => e in r ? Xy(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var Ke = (r, e, t) => Qy(r, typeof e != "symbol" ? e + "" : e, t), Vc = (r, e, t) => e.has(r) || Cf("Cannot " + t);
5
+ var eg = (r, e, t) => e in r ? Qy(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var Ke = (r, e, t) => eg(r, typeof e != "symbol" ? e + "" : e, t), Vc = (r, e, t) => e.has(r) || Cf("Cannot " + t);
7
7
  var $ = (r, e, t) => (Vc(r, e, "read from private field"), t ? t.call(r) : e.get(r)), rr = (r, e, t) => e.has(r) ? Cf("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), kt = (r, e, t, n) => (Vc(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), Ve = (r, e, t) => (Vc(r, e, "access private method"), t);
8
8
  var Bf = (r, e, t, n) => ({
9
9
  set _(i) {
@@ -16,7 +16,7 @@ var Bf = (r, e, t, n) => ({
16
16
  import { jsx as Sd } from "react/jsx-runtime";
17
17
  import { createContext as _d, useState as Do, useEffect as Os, useContext as Ed } from "react";
18
18
  const hr = 256;
19
- class eg {
19
+ class tg {
20
20
  // TODO(dchest): methods to encode chunk-by-chunk.
21
21
  constructor(e = "=") {
22
22
  Ke(this, "_paddingCharacter");
@@ -84,7 +84,7 @@ class eg {
84
84
  return t;
85
85
  }
86
86
  }
87
- const Id = new eg();
87
+ const Id = new tg();
88
88
  function _r(r) {
89
89
  return Id.encode(r);
90
90
  }
@@ -102,12 +102,12 @@ function Br(r) {
102
102
  r[e] = 0;
103
103
  return r;
104
104
  }
105
- const tg = 20;
106
- function rg(r, e, t) {
107
- let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], h = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], v = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], b = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], H = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], T = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], m = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], A = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], k = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], I = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], P = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], D = n, pe = i, tt = s, De = o, Te = c, He = u, yt = h, pt = v, ue = b, fe = H, ye = T, Ae = m, Re = A, Je = k, ie = I, ke = P;
108
- for (let mt = 0; mt < tg; mt += 2)
109
- D = D + Te | 0, Re ^= D, Re = Re >>> 16 | Re << 16, ue = ue + Re | 0, Te ^= ue, Te = Te >>> 20 | Te << 12, pe = pe + He | 0, Je ^= pe, Je = Je >>> 16 | Je << 16, fe = fe + Je | 0, He ^= fe, He = He >>> 20 | He << 12, tt = tt + yt | 0, ie ^= tt, ie = ie >>> 16 | ie << 16, ye = ye + ie | 0, yt ^= ye, yt = yt >>> 20 | yt << 12, De = De + pt | 0, ke ^= De, ke = ke >>> 16 | ke << 16, Ae = Ae + ke | 0, pt ^= Ae, pt = pt >>> 20 | pt << 12, tt = tt + yt | 0, ie ^= tt, ie = ie >>> 24 | ie << 8, ye = ye + ie | 0, yt ^= ye, yt = yt >>> 25 | yt << 7, De = De + pt | 0, ke ^= De, ke = ke >>> 24 | ke << 8, Ae = Ae + ke | 0, pt ^= Ae, pt = pt >>> 25 | pt << 7, pe = pe + He | 0, Je ^= pe, Je = Je >>> 24 | Je << 8, fe = fe + Je | 0, He ^= fe, He = He >>> 25 | He << 7, D = D + Te | 0, Re ^= D, Re = Re >>> 24 | Re << 8, ue = ue + Re | 0, Te ^= ue, Te = Te >>> 25 | Te << 7, D = D + He | 0, ke ^= D, ke = ke >>> 16 | ke << 16, ye = ye + ke | 0, He ^= ye, He = He >>> 20 | He << 12, pe = pe + yt | 0, Re ^= pe, Re = Re >>> 16 | Re << 16, Ae = Ae + Re | 0, yt ^= Ae, yt = yt >>> 20 | yt << 12, tt = tt + pt | 0, Je ^= tt, Je = Je >>> 16 | Je << 16, ue = ue + Je | 0, pt ^= ue, pt = pt >>> 20 | pt << 12, De = De + Te | 0, ie ^= De, ie = ie >>> 16 | ie << 16, fe = fe + ie | 0, Te ^= fe, Te = Te >>> 20 | Te << 12, tt = tt + pt | 0, Je ^= tt, Je = Je >>> 24 | Je << 8, ue = ue + Je | 0, pt ^= ue, pt = pt >>> 25 | pt << 7, De = De + Te | 0, ie ^= De, ie = ie >>> 24 | ie << 8, fe = fe + ie | 0, Te ^= fe, Te = Te >>> 25 | Te << 7, pe = pe + yt | 0, Re ^= pe, Re = Re >>> 24 | Re << 8, Ae = Ae + Re | 0, yt ^= Ae, yt = yt >>> 25 | yt << 7, D = D + He | 0, ke ^= D, ke = ke >>> 24 | ke << 8, ye = ye + ke | 0, He ^= ye, He = He >>> 25 | He << 7;
110
- zt(D + n | 0, r, 0), zt(pe + i | 0, r, 4), zt(tt + s | 0, r, 8), zt(De + o | 0, r, 12), zt(Te + c | 0, r, 16), zt(He + u | 0, r, 20), zt(yt + h | 0, r, 24), zt(pt + v | 0, r, 28), zt(ue + b | 0, r, 32), zt(fe + H | 0, r, 36), zt(ye + T | 0, r, 40), zt(Ae + m | 0, r, 44), zt(Re + A | 0, r, 48), zt(Je + k | 0, r, 52), zt(ie + I | 0, r, 56), zt(ke + P | 0, r, 60);
105
+ const rg = 20;
106
+ function ng(r, e, t) {
107
+ let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], h = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], v = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], b = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], H = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], T = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], m = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], A = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], k = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], I = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], P = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], D = n, ye = i, tt = s, De = o, Te = c, He = u, yt = h, pt = v, ue = b, fe = H, ge = T, Se = m, Re = A, Je = k, ie = I, ke = P;
108
+ for (let mt = 0; mt < rg; mt += 2)
109
+ D = D + Te | 0, Re ^= D, Re = Re >>> 16 | Re << 16, ue = ue + Re | 0, Te ^= ue, Te = Te >>> 20 | Te << 12, ye = ye + He | 0, Je ^= ye, Je = Je >>> 16 | Je << 16, fe = fe + Je | 0, He ^= fe, He = He >>> 20 | He << 12, tt = tt + yt | 0, ie ^= tt, ie = ie >>> 16 | ie << 16, ge = ge + ie | 0, yt ^= ge, yt = yt >>> 20 | yt << 12, De = De + pt | 0, ke ^= De, ke = ke >>> 16 | ke << 16, Se = Se + ke | 0, pt ^= Se, pt = pt >>> 20 | pt << 12, tt = tt + yt | 0, ie ^= tt, ie = ie >>> 24 | ie << 8, ge = ge + ie | 0, yt ^= ge, yt = yt >>> 25 | yt << 7, De = De + pt | 0, ke ^= De, ke = ke >>> 24 | ke << 8, Se = Se + ke | 0, pt ^= Se, pt = pt >>> 25 | pt << 7, ye = ye + He | 0, Je ^= ye, Je = Je >>> 24 | Je << 8, fe = fe + Je | 0, He ^= fe, He = He >>> 25 | He << 7, D = D + Te | 0, Re ^= D, Re = Re >>> 24 | Re << 8, ue = ue + Re | 0, Te ^= ue, Te = Te >>> 25 | Te << 7, D = D + He | 0, ke ^= D, ke = ke >>> 16 | ke << 16, ge = ge + ke | 0, He ^= ge, He = He >>> 20 | He << 12, ye = ye + yt | 0, Re ^= ye, Re = Re >>> 16 | Re << 16, Se = Se + Re | 0, yt ^= Se, yt = yt >>> 20 | yt << 12, tt = tt + pt | 0, Je ^= tt, Je = Je >>> 16 | Je << 16, ue = ue + Je | 0, pt ^= ue, pt = pt >>> 20 | pt << 12, De = De + Te | 0, ie ^= De, ie = ie >>> 16 | ie << 16, fe = fe + ie | 0, Te ^= fe, Te = Te >>> 20 | Te << 12, tt = tt + pt | 0, Je ^= tt, Je = Je >>> 24 | Je << 8, ue = ue + Je | 0, pt ^= ue, pt = pt >>> 25 | pt << 7, De = De + Te | 0, ie ^= De, ie = ie >>> 24 | ie << 8, fe = fe + ie | 0, Te ^= fe, Te = Te >>> 25 | Te << 7, ye = ye + yt | 0, Re ^= ye, Re = Re >>> 24 | Re << 8, Se = Se + Re | 0, yt ^= Se, yt = yt >>> 25 | yt << 7, D = D + He | 0, ke ^= D, ke = ke >>> 24 | ke << 8, ge = ge + ke | 0, He ^= ge, He = He >>> 25 | He << 7;
110
+ zt(D + n | 0, r, 0), zt(ye + i | 0, r, 4), zt(tt + s | 0, r, 8), zt(De + o | 0, r, 12), zt(Te + c | 0, r, 16), zt(He + u | 0, r, 20), zt(yt + h | 0, r, 24), zt(pt + v | 0, r, 28), zt(ue + b | 0, r, 32), zt(fe + H | 0, r, 36), zt(ge + T | 0, r, 40), zt(Se + m | 0, r, 44), zt(Re + A | 0, r, 48), zt(Je + k | 0, r, 52), zt(ie + I | 0, r, 56), zt(ke + P | 0, r, 60);
111
111
  }
112
112
  function il(r, e, t, n, i = 0) {
113
113
  if (r.length !== 32)
@@ -126,24 +126,24 @@ function il(r, e, t, n, i = 0) {
126
126
  }
127
127
  const c = new Uint8Array(64);
128
128
  for (let u = 0; u < t.length; u += 64) {
129
- rg(c, s, r);
129
+ ng(c, s, r);
130
130
  for (let h = u; h < u + 64 && h < t.length; h++)
131
131
  n[h] = t[h] ^ c[h - u];
132
- ng(s, 0, o);
132
+ ig(s, 0, o);
133
133
  }
134
134
  return Br(c), i === 0 && Br(s), n;
135
135
  }
136
136
  function Tf(r, e, t, n = 0) {
137
137
  return Br(t), il(r, e, t, t, n);
138
138
  }
139
- function ng(r, e, t) {
139
+ function ig(r, e, t) {
140
140
  let n = 1;
141
141
  for (; t--; )
142
142
  n = n + (r[e] & 255) | 0, r[e] = n & 255, n >>>= 8, e++;
143
143
  if (n > 0)
144
144
  throw new Error("ChaCha: counter overflow");
145
145
  }
146
- function ig(r, e) {
146
+ function sg(r, e) {
147
147
  if (r.length !== e.length)
148
148
  return 0;
149
149
  let t = 0;
@@ -151,13 +151,13 @@ function ig(r, e) {
151
151
  t |= r[n] ^ e[n];
152
152
  return 1 & t - 1 >>> 8;
153
153
  }
154
- function sg(r, e) {
155
- return r.length === 0 || e.length === 0 ? !1 : ig(r, e) !== 0;
154
+ function og(r, e) {
155
+ return r.length === 0 || e.length === 0 ? !1 : sg(r, e) !== 0;
156
156
  }
157
- const og = 16;
158
- class ag {
157
+ const ag = 16;
158
+ class cg {
159
159
  constructor(e) {
160
- Ke(this, "digestLength", og);
160
+ Ke(this, "digestLength", ag);
161
161
  Ke(this, "_buffer", new Uint8Array(16));
162
162
  Ke(this, "_r", new Uint16Array(10));
163
163
  Ke(this, "_h", new Uint16Array(10));
@@ -183,7 +183,7 @@ class ag {
183
183
  this._r[8] = (u >>> 8 | h << 8) & 8191, this._r[9] = h >>> 5 & 127, this._pad[0] = e[16] | e[17] << 8, this._pad[1] = e[18] | e[19] << 8, this._pad[2] = e[20] | e[21] << 8, this._pad[3] = e[22] | e[23] << 8, this._pad[4] = e[24] | e[25] << 8, this._pad[5] = e[26] | e[27] << 8, this._pad[6] = e[28] | e[29] << 8, this._pad[7] = e[30] | e[31] << 8;
184
184
  }
185
185
  _blocks(e, t, n) {
186
- let i = this._fin ? 0 : 2048, s = this._h[0], o = this._h[1], c = this._h[2], u = this._h[3], h = this._h[4], v = this._h[5], b = this._h[6], H = this._h[7], T = this._h[8], m = this._h[9], A = this._r[0], k = this._r[1], I = this._r[2], P = this._r[3], D = this._r[4], pe = this._r[5], tt = this._r[6], De = this._r[7], Te = this._r[8], He = this._r[9];
186
+ let i = this._fin ? 0 : 2048, s = this._h[0], o = this._h[1], c = this._h[2], u = this._h[3], h = this._h[4], v = this._h[5], b = this._h[6], H = this._h[7], T = this._h[8], m = this._h[9], A = this._r[0], k = this._r[1], I = this._r[2], P = this._r[3], D = this._r[4], ye = this._r[5], tt = this._r[6], De = this._r[7], Te = this._r[8], He = this._r[9];
187
187
  for (; n >= 16; ) {
188
188
  let yt = e[t + 0] | e[t + 1] << 8;
189
189
  s += yt & 8191;
@@ -193,34 +193,34 @@ class ag {
193
193
  c += (pt >>> 10 | ue << 6) & 8191;
194
194
  let fe = e[t + 6] | e[t + 7] << 8;
195
195
  u += (ue >>> 7 | fe << 9) & 8191;
196
- let ye = e[t + 8] | e[t + 9] << 8;
197
- h += (fe >>> 4 | ye << 12) & 8191, v += ye >>> 1 & 8191;
198
- let Ae = e[t + 10] | e[t + 11] << 8;
199
- b += (ye >>> 14 | Ae << 2) & 8191;
196
+ let ge = e[t + 8] | e[t + 9] << 8;
197
+ h += (fe >>> 4 | ge << 12) & 8191, v += ge >>> 1 & 8191;
198
+ let Se = e[t + 10] | e[t + 11] << 8;
199
+ b += (ge >>> 14 | Se << 2) & 8191;
200
200
  let Re = e[t + 12] | e[t + 13] << 8;
201
- H += (Ae >>> 11 | Re << 5) & 8191;
201
+ H += (Se >>> 11 | Re << 5) & 8191;
202
202
  let Je = e[t + 14] | e[t + 15] << 8;
203
203
  T += (Re >>> 8 | Je << 8) & 8191, m += Je >>> 5 | i;
204
204
  let ie = 0, ke = ie;
205
- ke += s * A, ke += o * (5 * He), ke += c * (5 * Te), ke += u * (5 * De), ke += h * (5 * tt), ie = ke >>> 13, ke &= 8191, ke += v * (5 * pe), ke += b * (5 * D), ke += H * (5 * P), ke += T * (5 * I), ke += m * (5 * k), ie += ke >>> 13, ke &= 8191;
205
+ ke += s * A, ke += o * (5 * He), ke += c * (5 * Te), ke += u * (5 * De), ke += h * (5 * tt), ie = ke >>> 13, ke &= 8191, ke += v * (5 * ye), ke += b * (5 * D), ke += H * (5 * P), ke += T * (5 * I), ke += m * (5 * k), ie += ke >>> 13, ke &= 8191;
206
206
  let mt = ie;
207
- mt += s * k, mt += o * A, mt += c * (5 * He), mt += u * (5 * Te), mt += h * (5 * De), ie = mt >>> 13, mt &= 8191, mt += v * (5 * tt), mt += b * (5 * pe), mt += H * (5 * D), mt += T * (5 * P), mt += m * (5 * I), ie += mt >>> 13, mt &= 8191;
207
+ mt += s * k, mt += o * A, mt += c * (5 * He), mt += u * (5 * Te), mt += h * (5 * De), ie = mt >>> 13, mt &= 8191, mt += v * (5 * tt), mt += b * (5 * ye), mt += H * (5 * D), mt += T * (5 * P), mt += m * (5 * I), ie += mt >>> 13, mt &= 8191;
208
208
  let Ut = ie;
209
- Ut += s * I, Ut += o * k, Ut += c * A, Ut += u * (5 * He), Ut += h * (5 * Te), ie = Ut >>> 13, Ut &= 8191, Ut += v * (5 * De), Ut += b * (5 * tt), Ut += H * (5 * pe), Ut += T * (5 * D), Ut += m * (5 * P), ie += Ut >>> 13, Ut &= 8191;
209
+ Ut += s * I, Ut += o * k, Ut += c * A, Ut += u * (5 * He), Ut += h * (5 * Te), ie = Ut >>> 13, Ut &= 8191, Ut += v * (5 * De), Ut += b * (5 * tt), Ut += H * (5 * ye), Ut += T * (5 * D), Ut += m * (5 * P), ie += Ut >>> 13, Ut &= 8191;
210
210
  let Dt = ie;
211
- Dt += s * P, Dt += o * I, Dt += c * k, Dt += u * A, Dt += h * (5 * He), ie = Dt >>> 13, Dt &= 8191, Dt += v * (5 * Te), Dt += b * (5 * De), Dt += H * (5 * tt), Dt += T * (5 * pe), Dt += m * (5 * D), ie += Dt >>> 13, Dt &= 8191;
211
+ Dt += s * P, Dt += o * I, Dt += c * k, Dt += u * A, Dt += h * (5 * He), ie = Dt >>> 13, Dt &= 8191, Dt += v * (5 * Te), Dt += b * (5 * De), Dt += H * (5 * tt), Dt += T * (5 * ye), Dt += m * (5 * D), ie += Dt >>> 13, Dt &= 8191;
212
212
  let ae = ie;
213
- ae += s * D, ae += o * P, ae += c * I, ae += u * k, ae += h * A, ie = ae >>> 13, ae &= 8191, ae += v * (5 * He), ae += b * (5 * Te), ae += H * (5 * De), ae += T * (5 * tt), ae += m * (5 * pe), ie += ae >>> 13, ae &= 8191;
213
+ ae += s * D, ae += o * P, ae += c * I, ae += u * k, ae += h * A, ie = ae >>> 13, ae &= 8191, ae += v * (5 * He), ae += b * (5 * Te), ae += H * (5 * De), ae += T * (5 * tt), ae += m * (5 * ye), ie += ae >>> 13, ae &= 8191;
214
214
  let ot = ie;
215
- ot += s * pe, ot += o * D, ot += c * P, ot += u * I, ot += h * k, ie = ot >>> 13, ot &= 8191, ot += v * A, ot += b * (5 * He), ot += H * (5 * Te), ot += T * (5 * De), ot += m * (5 * tt), ie += ot >>> 13, ot &= 8191;
215
+ ot += s * ye, ot += o * D, ot += c * P, ot += u * I, ot += h * k, ie = ot >>> 13, ot &= 8191, ot += v * A, ot += b * (5 * He), ot += H * (5 * Te), ot += T * (5 * De), ot += m * (5 * tt), ie += ot >>> 13, ot &= 8191;
216
216
  let wt = ie;
217
- wt += s * tt, wt += o * pe, wt += c * D, wt += u * P, wt += h * I, ie = wt >>> 13, wt &= 8191, wt += v * k, wt += b * A, wt += H * (5 * He), wt += T * (5 * Te), wt += m * (5 * De), ie += wt >>> 13, wt &= 8191;
217
+ wt += s * tt, wt += o * ye, wt += c * D, wt += u * P, wt += h * I, ie = wt >>> 13, wt &= 8191, wt += v * k, wt += b * A, wt += H * (5 * He), wt += T * (5 * Te), wt += m * (5 * De), ie += wt >>> 13, wt &= 8191;
218
218
  let Q = ie;
219
- Q += s * De, Q += o * tt, Q += c * pe, Q += u * D, Q += h * P, ie = Q >>> 13, Q &= 8191, Q += v * I, Q += b * k, Q += H * A, Q += T * (5 * He), Q += m * (5 * Te), ie += Q >>> 13, Q &= 8191;
219
+ Q += s * De, Q += o * tt, Q += c * ye, Q += u * D, Q += h * P, ie = Q >>> 13, Q &= 8191, Q += v * I, Q += b * k, Q += H * A, Q += T * (5 * He), Q += m * (5 * Te), ie += Q >>> 13, Q &= 8191;
220
220
  let gt = ie;
221
- gt += s * Te, gt += o * De, gt += c * tt, gt += u * pe, gt += h * D, ie = gt >>> 13, gt &= 8191, gt += v * P, gt += b * I, gt += H * k, gt += T * A, gt += m * (5 * He), ie += gt >>> 13, gt &= 8191;
221
+ gt += s * Te, gt += o * De, gt += c * tt, gt += u * ye, gt += h * D, ie = gt >>> 13, gt &= 8191, gt += v * P, gt += b * I, gt += H * k, gt += T * A, gt += m * (5 * He), ie += gt >>> 13, gt &= 8191;
222
222
  let Vt = ie;
223
- Vt += s * He, Vt += o * Te, Vt += c * De, Vt += u * tt, Vt += h * pe, ie = Vt >>> 13, Vt &= 8191, Vt += v * D, Vt += b * P, Vt += H * I, Vt += T * k, Vt += m * A, ie += Vt >>> 13, Vt &= 8191, ie = (ie << 2) + ie | 0, ie = ie + ke | 0, ke = ie & 8191, ie = ie >>> 13, mt += ie, s = ke, o = mt, c = Ut, u = Dt, h = ae, v = ot, b = wt, H = Q, T = gt, m = Vt, t += 16, n -= 16;
223
+ Vt += s * He, Vt += o * Te, Vt += c * De, Vt += u * tt, Vt += h * ye, ie = Vt >>> 13, Vt &= 8191, Vt += v * D, Vt += b * P, Vt += H * I, Vt += T * k, Vt += m * A, ie += Vt >>> 13, Vt &= 8191, ie = (ie << 2) + ie | 0, ie = ie + ke | 0, ke = ie & 8191, ie = ie >>> 13, mt += ie, s = ke, o = mt, c = Ut, u = Dt, h = ae, v = ot, b = wt, H = Q, T = gt, m = Vt, t += 16, n -= 16;
224
224
  }
225
225
  this._h[0] = s, this._h[1] = o, this._h[2] = c, this._h[3] = u, this._h[4] = h, this._h[5] = v, this._h[6] = b, this._h[7] = H, this._h[8] = T, this._h[9] = m;
226
226
  }
@@ -271,16 +271,16 @@ class ag {
271
271
  return Br(this._buffer), Br(this._r), Br(this._h), Br(this._pad), this._leftover = 0, this._fin = 0, this._finished = !0, this;
272
272
  }
273
273
  }
274
- const cg = 32, lg = 12, ug = 16, Nf = new Uint8Array(16);
274
+ const lg = 32, ug = 12, fg = 16, Nf = new Uint8Array(16);
275
275
  class Nu {
276
276
  /**
277
277
  * Creates a new instance with the given 32-byte key.
278
278
  */
279
279
  constructor(e) {
280
- Ke(this, "nonceLength", lg);
281
- Ke(this, "tagLength", ug);
280
+ Ke(this, "nonceLength", ug);
281
+ Ke(this, "tagLength", fg);
282
282
  Ke(this, "_key");
283
- if (e.length !== cg)
283
+ if (e.length !== lg)
284
284
  throw new Error("ChaCha20Poly1305 needs 32-byte key");
285
285
  this._key = new Uint8Array(e);
286
286
  }
@@ -336,7 +336,7 @@ class Nu {
336
336
  const o = new Uint8Array(32);
337
337
  Tf(this._key, s, o, 4);
338
338
  const c = new Uint8Array(this.tagLength);
339
- if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !sg(c, t.subarray(t.length - this.tagLength, t.length)))
339
+ if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !og(c, t.subarray(t.length - this.tagLength, t.length)))
340
340
  return null;
341
341
  const u = t.length - this.tagLength;
342
342
  let h;
@@ -352,7 +352,7 @@ class Nu {
352
352
  return Br(this._key), this;
353
353
  }
354
354
  _authenticate(e, t, n, i) {
355
- const s = new ag(t);
355
+ const s = new cg(t);
356
356
  i && (s.update(i), i.length % 16 > 0 && s.update(Nf.subarray(i.length % 16))), s.update(n), n.length % 16 > 0 && s.update(Nf.subarray(n.length % 16));
357
357
  const o = new Uint8Array(8);
358
358
  i && Of(i.length, o), s.update(o), Of(n.length, o), s.update(o);
@@ -363,7 +363,7 @@ class Nu {
363
363
  }
364
364
  }
365
365
  const Pf = 65536;
366
- class fg {
366
+ class hg {
367
367
  constructor() {
368
368
  Ke(this, "isAvailable", !1);
369
369
  Ke(this, "isInstantiated", !1);
@@ -378,12 +378,12 @@ class fg {
378
378
  return t;
379
379
  }
380
380
  }
381
- const hg = new fg();
382
- function dg(r, e = hg) {
381
+ const dg = new hg();
382
+ function pg(r, e = dg) {
383
383
  return e.randomBytes(r);
384
384
  }
385
385
  function kd(r, e) {
386
- const t = new Nu(r), n = dg(12), s = new TextEncoder().encode(e), o = t.seal(n, s), c = new Uint8Array(n.length + o.length);
386
+ const t = new Nu(r), n = pg(12), s = new TextEncoder().encode(e), o = t.seal(n, s), c = new Uint8Array(n.length + o.length);
387
387
  return c.set(n), c.set(o, n.length), _r(c);
388
388
  }
389
389
  function sl(r, e) {
@@ -393,10 +393,10 @@ function sl(r, e) {
393
393
  return new TextDecoder().decode(c);
394
394
  }
395
395
  var ol = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
396
- function pg(r) {
396
+ function yg(r) {
397
397
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
398
398
  }
399
- function yg(r) {
399
+ function gg(r) {
400
400
  if (r.__esModule) return r;
401
401
  var e = r.default;
402
402
  if (typeof e == "function") {
@@ -489,7 +489,7 @@ var jf;
489
489
  throw new TypeError();
490
490
  if (!Q(K) && !ae(K) && !ot(K))
491
491
  throw new TypeError();
492
- return ot(K) && (K = void 0), N = or(N), ye(_, C, N, K);
492
+ return ot(K) && (K = void 0), N = or(N), ge(_, C, N, K);
493
493
  }
494
494
  }
495
495
  e("decorate", P);
@@ -504,16 +504,16 @@ var jf;
504
504
  return N;
505
505
  }
506
506
  e("metadata", D);
507
- function pe(_, C, N, K) {
507
+ function ye(_, C, N, K) {
508
508
  if (!Q(N))
509
509
  throw new TypeError();
510
510
  return ae(K) || (K = or(K)), ke(_, C, N, K);
511
511
  }
512
- e("defineMetadata", pe);
512
+ e("defineMetadata", ye);
513
513
  function tt(_, C, N) {
514
514
  if (!Q(C))
515
515
  throw new TypeError();
516
- return ae(N) || (N = or(N)), Ae(_, C, N);
516
+ return ae(N) || (N = or(N)), Se(_, C, N);
517
517
  }
518
518
  e("hasMetadata", tt);
519
519
  function De(_, C, N) {
@@ -572,7 +572,7 @@ var jf;
572
572
  }
573
573
  return C;
574
574
  }
575
- function ye(_, C, N, K) {
575
+ function ge(_, C, N, K) {
576
576
  for (var xe = _.length - 1; xe >= 0; --xe) {
577
577
  var _t = _[xe], Et = _t(C, N, K);
578
578
  if (!ae(Et) && !ot(Et)) {
@@ -583,12 +583,12 @@ var jf;
583
583
  }
584
584
  return K;
585
585
  }
586
- function Ae(_, C, N) {
586
+ function Se(_, C, N) {
587
587
  var K = Re(_, C, N);
588
588
  if (K)
589
589
  return !0;
590
590
  var xe = Bi(C);
591
- return ot(xe) ? !1 : Ae(_, xe, N);
591
+ return ot(xe) ? !1 : Se(_, xe, N);
592
592
  }
593
593
  function Re(_, C, N) {
594
594
  var K = Wr(
@@ -639,8 +639,8 @@ var jf;
639
639
  var ee = Z[$e], ce = _t.has(ee);
640
640
  ce || (_t.add(ee), Et.push(ee));
641
641
  }
642
- for (var ge = 0, et = xe; ge < et.length; ge++) {
643
- var ee = et[ge], ce = _t.has(ee);
642
+ for (var ve = 0, et = xe; ve < et.length; ve++) {
643
+ var ee = et[ve], ce = _t.has(ee);
644
644
  ce || (_t.add(ee), Et.push(ee));
645
645
  }
646
646
  return Et;
@@ -807,33 +807,33 @@ var jf;
807
807
  setProvider: ce
808
808
  };
809
809
  return _t;
810
- function Et(ge) {
810
+ function Et(ve) {
811
811
  if (!Object.isExtensible(_t))
812
812
  throw new Error("Cannot add provider to a frozen registry.");
813
813
  switch (!0) {
814
- case _ === ge:
814
+ case _ === ve:
815
815
  break;
816
816
  case ae(C):
817
- C = ge;
817
+ C = ve;
818
818
  break;
819
- case C === ge:
819
+ case C === ve:
820
820
  break;
821
821
  case ae(N):
822
- N = ge;
822
+ N = ve;
823
823
  break;
824
- case N === ge:
824
+ case N === ve:
825
825
  break;
826
826
  default:
827
- K === void 0 && (K = new T()), K.add(ge);
827
+ K === void 0 && (K = new T()), K.add(ve);
828
828
  break;
829
829
  }
830
830
  }
831
- function $e(ge, et) {
831
+ function $e(ve, et) {
832
832
  if (!ae(C)) {
833
- if (C.isProviderFor(ge, et))
833
+ if (C.isProviderFor(ve, et))
834
834
  return C;
835
835
  if (!ae(N)) {
836
- if (N.isProviderFor(ge, et))
836
+ if (N.isProviderFor(ve, et))
837
837
  return C;
838
838
  if (!ae(K))
839
839
  for (var nt = ys(K); ; ) {
@@ -841,32 +841,32 @@ var jf;
841
841
  if (!bt)
842
842
  return;
843
843
  var Gt = gs(bt);
844
- if (Gt.isProviderFor(ge, et))
844
+ if (Gt.isProviderFor(ve, et))
845
845
  return Xn(nt), Gt;
846
846
  }
847
847
  }
848
848
  }
849
- if (!ae(_) && _.isProviderFor(ge, et))
849
+ if (!ae(_) && _.isProviderFor(ve, et))
850
850
  return _;
851
851
  }
852
- function Z(ge, et) {
853
- var nt = xe.get(ge), bt;
854
- return ae(nt) || (bt = nt.get(et)), ae(bt) && (bt = $e(ge, et), ae(bt) || (ae(nt) && (nt = new H(), xe.set(ge, nt)), nt.set(et, bt))), bt;
852
+ function Z(ve, et) {
853
+ var nt = xe.get(ve), bt;
854
+ return ae(nt) || (bt = nt.get(et)), ae(bt) && (bt = $e(ve, et), ae(bt) || (ae(nt) && (nt = new H(), xe.set(ve, nt)), nt.set(et, bt))), bt;
855
855
  }
856
- function ee(ge) {
857
- if (ae(ge))
856
+ function ee(ve) {
857
+ if (ae(ve))
858
858
  throw new TypeError();
859
- return C === ge || N === ge || !ae(K) && K.has(ge);
859
+ return C === ve || N === ve || !ae(K) && K.has(ve);
860
860
  }
861
- function ce(ge, et, nt) {
861
+ function ce(ve, et, nt) {
862
862
  if (!ee(nt))
863
863
  throw new Error("Metadata provider not registered.");
864
- var bt = Z(ge, et);
864
+ var bt = Z(ve, et);
865
865
  if (bt !== nt) {
866
866
  if (!ae(bt))
867
867
  return !1;
868
- var Gt = xe.get(ge);
869
- ae(Gt) && (Gt = new H(), xe.set(ge, Gt)), Gt.set(et, nt);
868
+ var Gt = xe.get(ve);
869
+ ae(Gt) && (Gt = new H(), xe.set(ve, Gt)), Gt.set(et, nt);
870
870
  }
871
871
  return !0;
872
872
  }
@@ -883,8 +883,8 @@ var jf;
883
883
  function Oi(_) {
884
884
  var C = new m(), N = {
885
885
  isProviderFor: function(ee, ce) {
886
- var ge = C.get(ee);
887
- return ae(ge) ? !1 : ge.has(ce);
886
+ var ve = C.get(ee);
887
+ return ae(ve) ? !1 : ve.has(ce);
888
888
  },
889
889
  OrdinaryDefineOwnMetadata: Et,
890
890
  OrdinaryHasOwnMetadata: xe,
@@ -893,44 +893,44 @@ var jf;
893
893
  OrdinaryDeleteMetadata: Z
894
894
  };
895
895
  return k.registerProvider(N), N;
896
- function K(ee, ce, ge) {
896
+ function K(ee, ce, ve) {
897
897
  var et = C.get(ee), nt = !1;
898
898
  if (ae(et)) {
899
- if (!ge)
899
+ if (!ve)
900
900
  return;
901
901
  et = new H(), C.set(ee, et), nt = !0;
902
902
  }
903
903
  var bt = et.get(ce);
904
904
  if (ae(bt)) {
905
- if (!ge)
905
+ if (!ve)
906
906
  return;
907
907
  if (bt = new H(), et.set(ce, bt), !_.setProvider(ee, ce, N))
908
908
  throw et.delete(ce), nt && C.delete(ee), new Error("Wrong provider for target.");
909
909
  }
910
910
  return bt;
911
911
  }
912
- function xe(ee, ce, ge) {
912
+ function xe(ee, ce, ve) {
913
913
  var et = K(
914
914
  ce,
915
- ge,
915
+ ve,
916
916
  /*Create*/
917
917
  !1
918
918
  );
919
919
  return ae(et) ? !1 : fs(et.has(ee));
920
920
  }
921
- function _t(ee, ce, ge) {
921
+ function _t(ee, ce, ve) {
922
922
  var et = K(
923
923
  ce,
924
- ge,
924
+ ve,
925
925
  /*Create*/
926
926
  !1
927
927
  );
928
928
  if (!ae(et))
929
929
  return et.get(ee);
930
930
  }
931
- function Et(ee, ce, ge, et) {
931
+ function Et(ee, ce, ve, et) {
932
932
  var nt = K(
933
- ge,
933
+ ve,
934
934
  et,
935
935
  /*Create*/
936
936
  !0
@@ -938,21 +938,21 @@ var jf;
938
938
  nt.set(ee, ce);
939
939
  }
940
940
  function $e(ee, ce) {
941
- var ge = [], et = K(
941
+ var ve = [], et = K(
942
942
  ee,
943
943
  ce,
944
944
  /*Create*/
945
945
  !1
946
946
  );
947
947
  if (ae(et))
948
- return ge;
948
+ return ve;
949
949
  for (var nt = et.keys(), bt = ys(nt), Gt = 0; ; ) {
950
950
  var Ti = Zr(bt);
951
951
  if (!Ti)
952
- return ge.length = Gt, ge;
952
+ return ve.length = Gt, ve;
953
953
  var Ss = gs(Ti);
954
954
  try {
955
- ge[Gt] = Ss;
955
+ ve[Gt] = Ss;
956
956
  } catch (Oo) {
957
957
  try {
958
958
  Xn(bt);
@@ -963,10 +963,10 @@ var jf;
963
963
  Gt++;
964
964
  }
965
965
  }
966
- function Z(ee, ce, ge) {
966
+ function Z(ee, ce, ve) {
967
967
  var et = K(
968
968
  ce,
969
- ge,
969
+ ve,
970
970
  /*Create*/
971
971
  !1
972
972
  );
@@ -974,7 +974,7 @@ var jf;
974
974
  return !1;
975
975
  if (et.size === 0) {
976
976
  var nt = C.get(ce);
977
- ae(nt) || (nt.delete(ge), nt.size === 0 && C.delete(nt));
977
+ ae(nt) || (nt.delete(ve), nt.size === 0 && C.delete(nt));
978
978
  }
979
979
  return !0;
980
980
  }
@@ -1066,8 +1066,8 @@ var jf;
1066
1066
  !1
1067
1067
  );
1068
1068
  if (ee >= 0) {
1069
- for (var ce = this._keys.length, ge = ee + 1; ge < ce; ge++)
1070
- this._keys[ge - 1] = this._keys[ge], this._values[ge - 1] = this._values[ge];
1069
+ for (var ce = this._keys.length, ve = ee + 1; ve < ce; ve++)
1070
+ this._keys[ve - 1] = this._keys[ve], this._values[ve - 1] = this._values[ve];
1071
1071
  return this._keys.length--, this._values.length--, ps(Z, this._cacheKey) && (this._cacheKey = _, this._cacheIndex = -2), !0;
1072
1072
  }
1073
1073
  return !1;
@@ -1166,12 +1166,12 @@ var jf;
1166
1166
  );
1167
1167
  return ce !== void 0 ? v.get(ce, this._key) : void 0;
1168
1168
  }, Z.prototype.set = function(ee, ce) {
1169
- var ge = xe(
1169
+ var ve = xe(
1170
1170
  ee,
1171
1171
  /*create*/
1172
1172
  !0
1173
1173
  );
1174
- return ge[this._key] = ce, this;
1174
+ return ve[this._key] = ce, this;
1175
1175
  }, Z.prototype.delete = function(ee) {
1176
1176
  var ce = xe(
1177
1177
  ee,
@@ -1215,8 +1215,8 @@ var jf;
1215
1215
  var Z = Et(_);
1216
1216
  Z[6] = Z[6] & 79 | 64, Z[8] = Z[8] & 191 | 128;
1217
1217
  for (var ee = "", ce = 0; ce < _; ++ce) {
1218
- var ge = Z[ce];
1219
- (ce === 4 || ce === 6 || ce === 8) && (ee += "-"), ge < 16 && (ee += "0"), ee += ge.toString(16).toLowerCase();
1218
+ var ve = Z[ce];
1219
+ (ce === 4 || ce === 6 || ce === 8) && (ee += "-"), ve < 16 && (ee += "0"), ee += ve.toString(16).toLowerCase();
1220
1220
  }
1221
1221
  return ee;
1222
1222
  }
@@ -1250,10 +1250,10 @@ var jf;
1250
1250
  * SOFTWARE.
1251
1251
  *
1252
1252
  */
1253
- const gg = "[object ArrayBuffer]";
1253
+ const vg = "[object ArrayBuffer]";
1254
1254
  class W {
1255
1255
  static isArrayBuffer(e) {
1256
- return Object.prototype.toString.call(e) === gg;
1256
+ return Object.prototype.toString.call(e) === vg;
1257
1257
  }
1258
1258
  static toArrayBuffer(e) {
1259
1259
  return this.isArrayBuffer(e) ? e : e.byteLength === e.buffer.byteLength || e.byteOffset === 0 && e.byteLength === e.buffer.byteLength ? e.buffer : this.toUint8Array(e.buffer).slice(e.byteOffset, e.byteOffset + e.byteLength).buffer;
@@ -1300,7 +1300,7 @@ class W {
1300
1300
  return e[e.length - 1] instanceof Function ? this.toView(i, e[e.length - 1]) : i.buffer;
1301
1301
  }
1302
1302
  }
1303
- const Lc = "string", vg = /^[0-9a-f]+$/i, mg = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/, wg = /^[a-zA-Z0-9-_]+$/;
1303
+ const Lc = "string", mg = /^[0-9a-f]+$/i, wg = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/, bg = /^[a-zA-Z0-9-_]+$/;
1304
1304
  class Rf {
1305
1305
  static fromString(e) {
1306
1306
  const t = unescape(encodeURIComponent(e)), n = new Uint8Array(t.length);
@@ -1335,13 +1335,13 @@ class Yr {
1335
1335
  }
1336
1336
  class le {
1337
1337
  static isHex(e) {
1338
- return typeof e === Lc && vg.test(e);
1338
+ return typeof e === Lc && mg.test(e);
1339
1339
  }
1340
1340
  static isBase64(e) {
1341
- return typeof e === Lc && mg.test(e);
1341
+ return typeof e === Lc && wg.test(e);
1342
1342
  }
1343
1343
  static isBase64Url(e) {
1344
- return typeof e === Lc && wg.test(e);
1344
+ return typeof e === Lc && bg.test(e);
1345
1345
  }
1346
1346
  static ToString(e, t = "utf8") {
1347
1347
  const n = W.toUint8Array(e);
@@ -1502,7 +1502,7 @@ class le {
1502
1502
  }
1503
1503
  }
1504
1504
  le.DEFAULT_UTF8_ENCODING = "utf8";
1505
- function bg(...r) {
1505
+ function xg(...r) {
1506
1506
  const e = r.map((i) => i.byteLength).reduce((i, s) => i + s), t = new Uint8Array(e);
1507
1507
  let n = 0;
1508
1508
  return r.map((i) => new Uint8Array(i)).forEach((i) => {
@@ -1578,7 +1578,7 @@ function Cd() {
1578
1578
  s[c] = r[c];
1579
1579
  return s[0] &= 127, Mi(s, 8) - n;
1580
1580
  }
1581
- function xg(r) {
1581
+ function Ag(r) {
1582
1582
  const e = r < 0 ? r * -1 : r;
1583
1583
  let t = 128;
1584
1584
  for (let n = 1; n < 8; n++) {
@@ -1601,7 +1601,7 @@ function xg(r) {
1601
1601
  }
1602
1602
  return new ArrayBuffer(0);
1603
1603
  }
1604
- function Ag(r, e) {
1604
+ function Sg(r, e) {
1605
1605
  if (r.byteLength !== e.byteLength)
1606
1606
  return !1;
1607
1607
  const t = new Uint8Array(r), n = new Uint8Array(e);
@@ -1683,7 +1683,7 @@ class Fa {
1683
1683
  return Pu(this.items);
1684
1684
  }
1685
1685
  }
1686
- const _s = [new Uint8Array([1])], Uf = "0123456789", Hc = "name", Df = "valueHexView", Sg = "isHexOnly", _g = "idBlock", Eg = "tagClass", Ig = "tagNumber", kg = "isConstructed", Cg = "fromBER", Bg = "toBER", Og = "local", yr = "", Kr = new ArrayBuffer(0), Ga = new Uint8Array(0), Us = "EndOfContent", Bd = "OCTET STRING", Od = "BIT STRING";
1686
+ const _s = [new Uint8Array([1])], Uf = "0123456789", Hc = "name", Df = "valueHexView", _g = "isHexOnly", Eg = "idBlock", Ig = "tagClass", kg = "tagNumber", Cg = "isConstructed", Bg = "fromBER", Og = "toBER", Tg = "local", yr = "", Kr = new ArrayBuffer(0), Ga = new Uint8Array(0), Us = "EndOfContent", Bd = "OCTET STRING", Od = "BIT STRING";
1687
1687
  function fn(r) {
1688
1688
  var e;
1689
1689
  return e = class extends r {
@@ -1975,7 +1975,7 @@ class Jt extends Ei {
1975
1975
  if (!(e instanceof this.constructor))
1976
1976
  return !1;
1977
1977
  const t = this.toBER(), n = e.toBER();
1978
- return Ag(t, n);
1978
+ return Sg(t, n);
1979
1979
  }
1980
1980
  }
1981
1981
  Jt.NAME = "BaseBlock";
@@ -2019,7 +2019,7 @@ class fo extends Jt {
2019
2019
  Rd = fo;
2020
2020
  se.Primitive = Rd;
2021
2021
  fo.NAME = "PRIMITIVE";
2022
- function Tg(r, e) {
2022
+ function Ng(r, e) {
2023
2023
  if (r instanceof e)
2024
2024
  return r;
2025
2025
  const t = new e();
@@ -2176,7 +2176,7 @@ function ns(r, e = 0, t = r.length) {
2176
2176
  default:
2177
2177
  u = i.idBlock.isConstructed ? se.Constructed : se.Primitive;
2178
2178
  }
2179
- return i = Tg(i, u), c = i.fromBER(r, e, i.lenBlock.isIndefiniteForm ? t : i.lenBlock.length), i.valueBeforeDecodeView = r.subarray(n, n + i.blockLength), {
2179
+ return i = Ng(i, u), c = i.fromBER(r, e, i.lenBlock.isIndefiniteForm ? t : i.lenBlock.length), i.valueBeforeDecodeView = r.subarray(n, n + i.blockLength), {
2180
2180
  offset: c,
2181
2181
  result: i
2182
2182
  };
@@ -2191,7 +2191,7 @@ function Ui(r) {
2191
2191
  }
2192
2192
  return ns(W.toUint8Array(r).slice(), 0, r.byteLength);
2193
2193
  }
2194
- function Ng(r, e) {
2194
+ function Pg(r, e) {
2195
2195
  return r ? 1 : e;
2196
2196
  }
2197
2197
  class Vn extends fr {
@@ -2205,7 +2205,7 @@ class Vn extends fr {
2205
2205
  if (this.valueBeforeDecodeView = i.subarray(t, t + n), this.valueBeforeDecodeView.length === 0)
2206
2206
  return this.warnings.push("Zero buffer length"), t;
2207
2207
  let s = t;
2208
- for (; Ng(this.isIndefiniteForm, n) > 0; ) {
2208
+ for (; Pg(this.isIndefiniteForm, n) > 0; ) {
2209
2209
  const o = ns(i, s, n);
2210
2210
  if (o.offset === -1)
2211
2211
  return this.error = o.result.error, this.warnings.concat(o.result.warnings), -1;
@@ -2523,7 +2523,7 @@ Kd = oi;
2523
2523
  se.BitString = Kd;
2524
2524
  oi.NAME = Od;
2525
2525
  var qd;
2526
- function Pg(r, e) {
2526
+ function jg(r, e) {
2527
2527
  const t = new Uint8Array([0]), n = new Uint8Array(r), i = new Uint8Array(e);
2528
2528
  let s = n.slice(0);
2529
2529
  const o = s.length - 1, c = i.slice(0), u = c.length - 1;
@@ -2561,7 +2561,7 @@ function $f(r) {
2561
2561
  }
2562
2562
  return _s[r];
2563
2563
  }
2564
- function jg(r, e) {
2564
+ function Rg(r, e) {
2565
2565
  let t = 0;
2566
2566
  const n = new Uint8Array(r), i = new Uint8Array(e), s = n.slice(0), o = s.length - 1, c = i.slice(0), u = c.length - 1;
2567
2567
  let h, v = 0;
@@ -2591,7 +2591,7 @@ class Uu extends fn(fr) {
2591
2591
  this.valueHexView.length >= 4 ? (this.warnings.push("Too big Integer for decoding, hex only"), this.isHexOnly = !0, this._valueDec = 0) : (this.isHexOnly = !1, this.valueHexView.length > 0 && (this._valueDec = Cd.call(this)));
2592
2592
  }
2593
2593
  set valueDec(e) {
2594
- this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(xg(e));
2594
+ this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(Ag(e));
2595
2595
  }
2596
2596
  get valueDec() {
2597
2597
  return this._valueDec;
@@ -2642,10 +2642,10 @@ class Uu extends fn(fr) {
2642
2642
  if ((i & 1) === 1)
2643
2643
  switch (n) {
2644
2644
  case e:
2645
- t = jg($f(n), t), o = "-";
2645
+ t = Rg($f(n), t), o = "-";
2646
2646
  break;
2647
2647
  default:
2648
- t = Pg(t, $f(n));
2648
+ t = jg(t, $f(n));
2649
2649
  }
2650
2650
  n++, i >>= 1;
2651
2651
  }
@@ -3463,7 +3463,7 @@ class zo extends ui {
3463
3463
  super(n), this.value = e, this.local = t;
3464
3464
  }
3465
3465
  }
3466
- class Rg {
3466
+ class Ug {
3467
3467
  constructor({ data: e = Ga } = {}) {
3468
3468
  this.dataView = W.toUint8Array(e);
3469
3469
  }
@@ -3519,17 +3519,17 @@ function ri(r, e, t) {
3519
3519
  verified: !1,
3520
3520
  result: { error: "Wrong ASN.1 schema" }
3521
3521
  };
3522
- if (!(_g in t))
3522
+ if (!(Eg in t))
3523
3523
  return {
3524
3524
  verified: !1,
3525
3525
  result: { error: "Wrong ASN.1 schema" }
3526
3526
  };
3527
- if (!(Cg in t.idBlock))
3527
+ if (!(Bg in t.idBlock))
3528
3528
  return {
3529
3529
  verified: !1,
3530
3530
  result: { error: "Wrong ASN.1 schema" }
3531
3531
  };
3532
- if (!(Bg in t.idBlock))
3532
+ if (!(Og in t.idBlock))
3533
3533
  return {
3534
3534
  verified: !1,
3535
3535
  result: { error: "Wrong ASN.1 schema" }
@@ -3545,7 +3545,7 @@ function ri(r, e, t) {
3545
3545
  verified: !1,
3546
3546
  result: { error: "Error decoding idBlock for ASN.1 schema" }
3547
3547
  };
3548
- if (t.idBlock.hasOwnProperty(Eg) === !1)
3548
+ if (t.idBlock.hasOwnProperty(Ig) === !1)
3549
3549
  return {
3550
3550
  verified: !1,
3551
3551
  result: { error: "Wrong ASN.1 schema" }
@@ -3555,7 +3555,7 @@ function ri(r, e, t) {
3555
3555
  verified: !1,
3556
3556
  result: r
3557
3557
  };
3558
- if (t.idBlock.hasOwnProperty(Ig) === !1)
3558
+ if (t.idBlock.hasOwnProperty(kg) === !1)
3559
3559
  return {
3560
3560
  verified: !1,
3561
3561
  result: { error: "Wrong ASN.1 schema" }
@@ -3565,7 +3565,7 @@ function ri(r, e, t) {
3565
3565
  verified: !1,
3566
3566
  result: r
3567
3567
  };
3568
- if (t.idBlock.hasOwnProperty(kg) === !1)
3568
+ if (t.idBlock.hasOwnProperty(Cg) === !1)
3569
3569
  return {
3570
3570
  verified: !1,
3571
3571
  result: { error: "Wrong ASN.1 schema" }
@@ -3575,7 +3575,7 @@ function ri(r, e, t) {
3575
3575
  verified: !1,
3576
3576
  result: r
3577
3577
  };
3578
- if (!(Sg in t.idBlock))
3578
+ if (!(_g in t.idBlock))
3579
3579
  return {
3580
3580
  verified: !1,
3581
3581
  result: { error: "Wrong ASN.1 schema" }
@@ -3645,7 +3645,7 @@ function ri(r, e, t) {
3645
3645
  return t.name && (t.name = t.name.replace(/^\s+|\s+$/g, yr), t.name && delete r[t.name]), o;
3646
3646
  if (Hc in t.valueBlock.value[0] && t.valueBlock.value[0].name.length > 0) {
3647
3647
  let h = {};
3648
- Og in t.valueBlock.value[0] && t.valueBlock.value[0].local ? h = e : h = r, typeof h[t.valueBlock.value[0].name] > "u" && (h[t.valueBlock.value[0].name] = []), h[t.valueBlock.value[0].name].push(e.valueBlock.value[u]);
3648
+ Tg in t.valueBlock.value[0] && t.valueBlock.value[0].local ? h = e : h = r, typeof h[t.valueBlock.value[0].name] > "u" && (h[t.valueBlock.value[0].name] = []), h[t.valueBlock.value[0].name].push(e.valueBlock.value[u]);
3649
3649
  }
3650
3650
  } else if (o = ri(r, e.valueBlock.value[u - s], t.valueBlock.value[u]), o.verified === !1)
3651
3651
  if (t.valueBlock.value[u].optional)
@@ -3680,7 +3680,7 @@ function ri(r, e, t) {
3680
3680
  result: r
3681
3681
  };
3682
3682
  }
3683
- function Ug(r, e) {
3683
+ function Dg(r, e) {
3684
3684
  if (!(e instanceof Object))
3685
3685
  return {
3686
3686
  verified: !1,
@@ -3720,7 +3720,7 @@ const Ip = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3720
3720
  OctetString: si,
3721
3721
  Primitive: fo,
3722
3722
  PrintableString: Ja,
3723
- RawData: Rg,
3723
+ RawData: Ug,
3724
3724
  RelativeObjectIdentifier: Du,
3725
3725
  Repeated: zo,
3726
3726
  Sequence: mn,
@@ -3737,7 +3737,7 @@ const Ip = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3737
3737
  VisibleString: ho,
3738
3738
  compareSchema: ri,
3739
3739
  fromBER: Ui,
3740
- verifySchema: Ug
3740
+ verifySchema: Dg
3741
3741
  }, Symbol.toStringTag, { value: "Module" }));
3742
3742
  var M;
3743
3743
  (function(r) {
@@ -3809,7 +3809,7 @@ class st {
3809
3809
  return new si({ name: e });
3810
3810
  }
3811
3811
  }
3812
- const Dg = {
3812
+ const $g = {
3813
3813
  fromASN: (r) => r instanceof li ? null : r.valueBeforeDecodeView,
3814
3814
  toASN: (r) => {
3815
3815
  if (r === null)
@@ -3819,28 +3819,28 @@ const Dg = {
3819
3819
  throw new Error(e.result.error);
3820
3820
  return e.result;
3821
3821
  }
3822
- }, $g = {
3822
+ }, Mg = {
3823
3823
  fromASN: (r) => r.valueBlock.valueHexView.byteLength >= 4 ? r.valueBlock.toString() : r.valueBlock.valueDec,
3824
3824
  toASN: (r) => new nn({ value: +r })
3825
- }, Mg = {
3825
+ }, Vg = {
3826
3826
  fromASN: (r) => r.valueBlock.valueDec,
3827
3827
  toASN: (r) => new Ka({ value: r })
3828
3828
  }, St = {
3829
3829
  fromASN: (r) => r.valueBlock.valueHexView,
3830
3830
  toASN: (r) => new nn({ valueHex: r })
3831
- }, Vg = {
3831
+ }, Lg = {
3832
3832
  fromASN: (r) => r.valueBlock.valueHexView,
3833
3833
  toASN: (r) => new oi({ valueHex: r })
3834
- }, Lg = {
3834
+ }, Hg = {
3835
3835
  fromASN: (r) => r.valueBlock.toString(),
3836
3836
  toASN: (r) => new qa({ value: r })
3837
- }, Hg = {
3837
+ }, Fg = {
3838
3838
  fromASN: (r) => r.valueBlock.value,
3839
3839
  toASN: (r) => new za({ value: r })
3840
3840
  }, Ko = {
3841
3841
  fromASN: (r) => r.valueBlock.valueHexView,
3842
3842
  toASN: (r) => new si({ valueHex: r })
3843
- }, Fg = {
3843
+ }, Gg = {
3844
3844
  fromASN: (r) => new st(r.getValue()),
3845
3845
  toASN: (r) => r.toASN()
3846
3846
  };
@@ -3850,62 +3850,62 @@ function Nr(r) {
3850
3850
  toASN: (e) => new r({ value: e })
3851
3851
  };
3852
3852
  }
3853
- const kp = Nr(kn), Gg = Nr(Za), zg = Nr(Wa), Kg = Nr(Ya), qg = Nr(Ja), Zg = Nr(Xa), Wg = Nr(Qa), Yg = Nr(ec), Jg = Nr(tc), Xg = Nr(ho), Qg = Nr(rc), ev = Nr(nc), tv = {
3853
+ const kp = Nr(kn), zg = Nr(Za), Kg = Nr(Wa), qg = Nr(Ya), Zg = Nr(Ja), Wg = Nr(Xa), Yg = Nr(Qa), Jg = Nr(ec), Xg = Nr(tc), Qg = Nr(ho), ev = Nr(rc), tv = Nr(nc), rv = {
3854
3854
  fromASN: (r) => r.toDate(),
3855
3855
  toASN: (r) => new po({ valueDate: r })
3856
- }, rv = {
3856
+ }, nv = {
3857
3857
  fromASN: (r) => r.toDate(),
3858
3858
  toASN: (r) => new ic({ valueDate: r })
3859
- }, nv = {
3859
+ }, iv = {
3860
3860
  fromASN: () => null,
3861
3861
  toASN: () => new li()
3862
3862
  };
3863
3863
  function Gu(r) {
3864
3864
  switch (r) {
3865
3865
  case x.Any:
3866
- return Dg;
3866
+ return $g;
3867
3867
  case x.BitString:
3868
- return Vg;
3868
+ return Lg;
3869
3869
  case x.BmpString:
3870
- return Gg;
3870
+ return zg;
3871
3871
  case x.Boolean:
3872
- return Hg;
3872
+ return Fg;
3873
3873
  case x.CharacterString:
3874
- return ev;
3874
+ return tv;
3875
3875
  case x.Enumerated:
3876
- return Mg;
3876
+ return Vg;
3877
3877
  case x.GeneralString:
3878
- return Qg;
3878
+ return ev;
3879
3879
  case x.GeneralizedTime:
3880
- return rv;
3880
+ return nv;
3881
3881
  case x.GraphicString:
3882
- return Jg;
3882
+ return Xg;
3883
3883
  case x.IA5String:
3884
- return Yg;
3884
+ return Jg;
3885
3885
  case x.Integer:
3886
- return $g;
3886
+ return Mg;
3887
3887
  case x.Null:
3888
- return nv;
3888
+ return iv;
3889
3889
  case x.NumericString:
3890
- return Kg;
3890
+ return qg;
3891
3891
  case x.ObjectIdentifier:
3892
- return Lg;
3892
+ return Hg;
3893
3893
  case x.OctetString:
3894
3894
  return Ko;
3895
3895
  case x.PrintableString:
3896
- return qg;
3897
- case x.TeletexString:
3898
3896
  return Zg;
3897
+ case x.TeletexString:
3898
+ return Wg;
3899
3899
  case x.UTCTime:
3900
- return tv;
3900
+ return rv;
3901
3901
  case x.UniversalString:
3902
- return zg;
3902
+ return Kg;
3903
3903
  case x.Utf8String:
3904
3904
  return kp;
3905
3905
  case x.VideotexString:
3906
- return Wg;
3906
+ return Yg;
3907
3907
  case x.VisibleString:
3908
- return Xg;
3908
+ return Qg;
3909
3909
  default:
3910
3910
  return null;
3911
3911
  }
@@ -3921,7 +3921,7 @@ function Cp(r) {
3921
3921
  }
3922
3922
  return !1;
3923
3923
  }
3924
- function iv(r, e) {
3924
+ function sv(r, e) {
3925
3925
  if (!(r && e) || r.byteLength !== e.byteLength)
3926
3926
  return !1;
3927
3927
  const t = new Uint8Array(r), n = new Uint8Array(e);
@@ -3930,7 +3930,7 @@ function iv(r, e) {
3930
3930
  return !1;
3931
3931
  return !0;
3932
3932
  }
3933
- class sv {
3933
+ class ov {
3934
3934
  constructor() {
3935
3935
  this.items = /* @__PURE__ */ new WeakMap();
3936
3936
  }
@@ -4038,7 +4038,7 @@ class sv {
4038
4038
  return t ? this.items.get(t) || this.findParentSchema(t) : null;
4039
4039
  }
4040
4040
  }
4041
- const Or = new sv(), F = (r) => (e) => {
4041
+ const Or = new ov(), F = (r) => (e) => {
4042
4042
  let t;
4043
4043
  Or.has(e) ? t = Or.get(e) : (t = Or.createDefault(e), Or.set(e, t)), Object.assign(t, r);
4044
4044
  }, y = (r) => (e, t) => {
@@ -4058,7 +4058,7 @@ class Mf extends Error {
4058
4058
  super(...arguments), this.schemas = [];
4059
4059
  }
4060
4060
  }
4061
- class ov {
4061
+ class av {
4062
4062
  static parse(e, t) {
4063
4063
  const n = Ui(e);
4064
4064
  if (n.result.error)
@@ -4176,7 +4176,7 @@ class zu {
4176
4176
  } else
4177
4177
  for (const o in n.items) {
4178
4178
  const c = n.items[o], u = e[o];
4179
- if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" && iv(this.serialize(c.defaultValue), this.serialize(u)))
4179
+ if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" && sv(this.serialize(c.defaultValue), this.serialize(u)))
4180
4180
  continue;
4181
4181
  const h = zu.toAsnItem(c, o, t, u);
4182
4182
  if (typeof c.context == "number")
@@ -4270,7 +4270,7 @@ class q {
4270
4270
  return zu.serialize(e);
4271
4271
  }
4272
4272
  static parse(e, t) {
4273
- return ov.parse(e, t);
4273
+ return av.parse(e, t);
4274
4274
  }
4275
4275
  static toString(e) {
4276
4276
  const t = W.isBufferSource(e) ? W.toArrayBuffer(e) : q.serialize(e), n = Ui(t);
@@ -4302,12 +4302,12 @@ var Bp = { exports: {} };
4302
4302
  function h(m, A) {
4303
4303
  if (m.indexOf("::") !== m.lastIndexOf("::"))
4304
4304
  return null;
4305
- let k = 0, I = -1, P = (m.match(u.zoneIndex) || [])[0], D, pe;
4305
+ let k = 0, I = -1, P = (m.match(u.zoneIndex) || [])[0], D, ye;
4306
4306
  for (P && (P = P.substring(1), m = m.replace(/%.+$/, "")); (I = m.indexOf(":", I + 1)) >= 0; )
4307
4307
  k++;
4308
4308
  if (m.substr(0, 2) === "::" && k--, m.substr(-2, 2) === "::" && k--, k > A)
4309
4309
  return null;
4310
- for (pe = A - k, D = ":"; pe--; )
4310
+ for (ye = A - k, D = ":"; ye--; )
4311
4311
  D += "0:";
4312
4312
  return m = m.replace("::", D), m[0] === ":" && (m = m.slice(1)), m[m.length - 1] === ":" && (m = m.slice(0, -1)), A = function() {
4313
4313
  const tt = m.split(":"), De = [];
@@ -4412,12 +4412,12 @@ var Bp = { exports: {} };
4412
4412
  254: 1,
4413
4413
  255: 0
4414
4414
  };
4415
- let P, D, pe;
4415
+ let P, D, ye;
4416
4416
  for (P = 3; P >= 0; P -= 1)
4417
4417
  if (D = this.octets[P], D in I) {
4418
- if (pe = I[D], k && pe !== 0)
4418
+ if (ye = I[D], k && ye !== 0)
4419
4419
  return null;
4420
- pe !== 8 && (k = !0), A += pe;
4420
+ ye !== 8 && (k = !0), A += ye;
4421
4421
  } else
4422
4422
  return null;
4423
4423
  return 32 - A;
@@ -4491,8 +4491,8 @@ var Bp = { exports: {} };
4491
4491
  if (A = m.match(n.fourOctet))
4492
4492
  return function() {
4493
4493
  const P = A.slice(1, 6), D = [];
4494
- for (let pe = 0; pe < P.length; pe++)
4495
- k = P[pe], D.push(b(k));
4494
+ for (let ye = 0; ye < P.length; ye++)
4495
+ k = P[ye], D.push(b(k));
4496
4496
  return D;
4497
4497
  }();
4498
4498
  if (A = m.match(n.longValue)) {
@@ -4606,8 +4606,8 @@ var Bp = { exports: {} };
4606
4606
  65535: 0
4607
4607
  };
4608
4608
  let P, D;
4609
- for (let pe = 7; pe >= 0; pe -= 1)
4610
- if (P = this.parts[pe], P in I) {
4609
+ for (let ye = 7; ye >= 0; ye -= 1)
4610
+ if (P = this.parts[ye], P in I) {
4611
4611
  if (D = I[P], k && D !== 0)
4612
4612
  return null;
4613
4613
  D !== 16 && (k = !0), A += D;
@@ -4689,8 +4689,8 @@ var Bp = { exports: {} };
4689
4689
  for (A = this.parseCIDR(m), I = A[0].toByteArray(), D = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), P = [], k = 0; k < 16; )
4690
4690
  P.push(parseInt(I[k], 10) & parseInt(D[k], 10)), k++;
4691
4691
  return new this(P);
4692
- } catch (pe) {
4693
- throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${pe})`);
4692
+ } catch (ye) {
4693
+ throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${ye})`);
4694
4694
  }
4695
4695
  }, T.IPv6.parse = function(m) {
4696
4696
  const A = this.parser(m);
@@ -4707,12 +4707,12 @@ var Bp = { exports: {} };
4707
4707
  }), I;
4708
4708
  throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range");
4709
4709
  }, T.IPv6.parser = function(m) {
4710
- let A, k, I, P, D, pe;
4710
+ let A, k, I, P, D, ye;
4711
4711
  if (I = m.match(u.deprecatedTransitional))
4712
4712
  return this.parser(`::ffff:${I[1]}`);
4713
4713
  if (u.native.test(m))
4714
4714
  return h(m, 8);
4715
- if ((I = m.match(u.transitional)) && (pe = I[6] || "", A = I[1], I[1].endsWith("::") || (A = A.slice(0, -1)), A = h(A + pe, 6), A.parts)) {
4715
+ if ((I = m.match(u.transitional)) && (ye = I[6] || "", A = I[1], I[1].endsWith("::") || (A = A.slice(0, -1)), A = h(A + ye, 6), A.parts)) {
4716
4716
  for (D = [
4717
4717
  parseInt(I[2]),
4718
4718
  parseInt(I[3]),
@@ -4767,12 +4767,12 @@ var Bp = { exports: {} };
4767
4767
  const A = this.parse(m);
4768
4768
  return A.kind() === "ipv6" && A.isIPv4MappedAddress() ? A.toIPv4Address() : A;
4769
4769
  }, T.subnetMatch = function(m, A, k) {
4770
- let I, P, D, pe;
4770
+ let I, P, D, ye;
4771
4771
  k == null && (k = "unicast");
4772
4772
  for (P in A)
4773
4773
  if (Object.prototype.hasOwnProperty.call(A, P)) {
4774
4774
  for (D = A[P], D[0] && !(D[0] instanceof Array) && (D = [D]), I = 0; I < D.length; I++)
4775
- if (pe = D[I], m.kind() === pe[0].kind() && m.match.apply(m, pe))
4775
+ if (ye = D[I], m.kind() === ye[0].kind() && m.match.apply(m, ye))
4776
4776
  return P;
4777
4777
  }
4778
4778
  return k;
@@ -4881,7 +4881,7 @@ let Ht = hl = class extends dl {
4881
4881
  Ht = hl = f([
4882
4882
  F({ type: M.Sequence })
4883
4883
  ], Ht);
4884
- const av = {
4884
+ const cv = {
4885
4885
  fromASN: (r) => Lf.toString(Ko.fromASN(r)),
4886
4886
  toASN: (r) => Ko.toASN(Lf.fromString(r))
4887
4887
  };
@@ -4934,7 +4934,7 @@ f([
4934
4934
  y({ type: x.IA5String, context: 6, implicit: !0 })
4935
4935
  ], Le.prototype, "uniformResourceIdentifier", void 0);
4936
4936
  f([
4937
- y({ type: x.OctetString, context: 7, implicit: !0, converter: av })
4937
+ y({ type: x.OctetString, context: 7, implicit: !0, converter: cv })
4938
4938
  ], Le.prototype, "iPAddress", void 0);
4939
4939
  f([
4940
4940
  y({ type: x.ObjectIdentifier, context: 8, implicit: !0 })
@@ -4942,9 +4942,9 @@ f([
4942
4942
  Le = f([
4943
4943
  F({ type: M.Choice })
4944
4944
  ], Le);
4945
- const qu = "1.3.6.1.5.5.7", cv = `${qu}.1`, is = `${qu}.3`, ac = `${qu}.48`, Hf = `${ac}.1`, Ff = `${ac}.2`, Gf = `${ac}.3`, zf = `${ac}.5`, Yn = "2.5.29";
4945
+ const qu = "1.3.6.1.5.5.7", lv = `${qu}.1`, is = `${qu}.3`, ac = `${qu}.48`, Hf = `${ac}.1`, Ff = `${ac}.2`, Gf = `${ac}.3`, zf = `${ac}.5`, Yn = "2.5.29";
4946
4946
  var pl;
4947
- const yl = `${cv}.1`;
4947
+ const yl = `${lv}.1`;
4948
4948
  class yo {
4949
4949
  constructor(e = {}) {
4950
4950
  this.accessMethod = "", this.accessLocation = new Le(), Object.assign(this, e);
@@ -5239,7 +5239,7 @@ let Xo = Sl = class extends vt {
5239
5239
  Xo = Sl = f([
5240
5240
  F({ type: M.Sequence, itemType: x.ObjectIdentifier })
5241
5241
  ], Xo);
5242
- const lv = `${is}.1`, uv = `${is}.2`, fv = `${is}.3`, hv = `${is}.4`, dv = `${is}.8`, pv = `${is}.9`;
5242
+ const uv = `${is}.1`, fv = `${is}.2`, hv = `${is}.3`, dv = `${is}.4`, pv = `${is}.8`, yv = `${is}.9`;
5243
5243
  let _l = class {
5244
5244
  constructor(e = new ArrayBuffer(0)) {
5245
5245
  this.value = e;
@@ -6160,7 +6160,7 @@ f([
6160
6160
  y({ type: st, context: 0, implicit: !0, optional: !0 })
6161
6161
  ], Vs.prototype, "value", void 0);
6162
6162
  f([
6163
- y({ type: st, converter: Fg, context: 0, implicit: !0, optional: !0, repeated: "sequence" })
6163
+ y({ type: st, converter: Gg, context: 0, implicit: !0, optional: !0, repeated: "sequence" })
6164
6164
  ], Vs.prototype, "constructedValue", void 0);
6165
6165
  Vs = f([
6166
6166
  F({ type: M.Choice })
@@ -6479,7 +6479,7 @@ f([
6479
6479
  f([
6480
6480
  y({ type: Zl, context: 1, implicit: !0, optional: !0 })
6481
6481
  ], Ao.prototype, "unprotectedAttrs", void 0);
6482
- const yv = "1.2.840.113549.1.7.1", Wl = "1.2.840.113549.1.7.2";
6482
+ const gv = "1.2.840.113549.1.7.1", Wl = "1.2.840.113549.1.7.2";
6483
6483
  var Yl;
6484
6484
  let la = Yl = class extends vt {
6485
6485
  constructor(e) {
@@ -6516,9 +6516,9 @@ const Ls = "1.2.840.10045.2.1", hf = "1.2.840.10045.4.1", Fp = "1.2.840.10045.4.
6516
6516
  function So(r) {
6517
6517
  return new ne({ algorithm: r });
6518
6518
  }
6519
- const gv = So(hf);
6519
+ const vv = So(hf);
6520
6520
  So(Fp);
6521
- const vv = So(df), mv = So(pf), wv = So(yf);
6521
+ const mv = So(df), wv = So(pf), bv = So(yf);
6522
6522
  let Hs = class {
6523
6523
  constructor(e = {}) {
6524
6524
  Object.assign(this, e);
@@ -6533,7 +6533,7 @@ f([
6533
6533
  Hs = f([
6534
6534
  F({ type: M.Sequence })
6535
6535
  ], Hs);
6536
- class bv extends st {
6536
+ class xv extends st {
6537
6537
  }
6538
6538
  let Wi = class {
6539
6539
  constructor(e = {}) {
@@ -6571,7 +6571,7 @@ f([
6571
6571
  y({ type: Wi })
6572
6572
  ], _n.prototype, "curve", void 0);
6573
6573
  f([
6574
- y({ type: bv })
6574
+ y({ type: xv })
6575
6575
  ], _n.prototype, "base", void 0);
6576
6576
  f([
6577
6577
  y({ type: x.Integer, converter: St })
@@ -6627,29 +6627,29 @@ f([
6627
6627
  f([
6628
6628
  y({ type: x.Integer, converter: St })
6629
6629
  ], ua.prototype, "s", void 0);
6630
- const wr = "1.2.840.113549.1.1", gi = `${wr}.1`, xv = `${wr}.7`, Av = `${wr}.9`, Ps = `${wr}.10`, Sv = `${wr}.2`, _v = `${wr}.4`, fa = `${wr}.5`, Ev = `${wr}.14`, Xl = `${wr}.11`, ha = `${wr}.12`, da = `${wr}.13`, Gp = `${wr}.15`, zp = `${wr}.16`, pa = "1.3.14.3.2.26", Kp = "2.16.840.1.101.3.4.2.4", ya = "2.16.840.1.101.3.4.2.1", ga = "2.16.840.1.101.3.4.2.2", va = "2.16.840.1.101.3.4.2.3", Iv = "2.16.840.1.101.3.4.2.5", kv = "2.16.840.1.101.3.4.2.6", Cv = "1.2.840.113549.2.2", Bv = "1.2.840.113549.2.5", Sc = `${wr}.8`;
6630
+ const wr = "1.2.840.113549.1.1", gi = `${wr}.1`, Av = `${wr}.7`, Sv = `${wr}.9`, Ps = `${wr}.10`, _v = `${wr}.2`, Ev = `${wr}.4`, fa = `${wr}.5`, Iv = `${wr}.14`, Xl = `${wr}.11`, ha = `${wr}.12`, da = `${wr}.13`, Gp = `${wr}.15`, zp = `${wr}.16`, pa = "1.3.14.3.2.26", Kp = "2.16.840.1.101.3.4.2.4", ya = "2.16.840.1.101.3.4.2.1", ga = "2.16.840.1.101.3.4.2.2", va = "2.16.840.1.101.3.4.2.3", kv = "2.16.840.1.101.3.4.2.5", Cv = "2.16.840.1.101.3.4.2.6", Bv = "1.2.840.113549.2.2", Ov = "1.2.840.113549.2.5", Sc = `${wr}.8`;
6631
6631
  function Ft(r) {
6632
6632
  return new ne({ algorithm: r, parameters: null });
6633
6633
  }
6634
- Ft(Cv);
6635
6634
  Ft(Bv);
6635
+ Ft(Ov);
6636
6636
  const vi = Ft(pa);
6637
6637
  Ft(Kp);
6638
6638
  Ft(ya);
6639
6639
  Ft(ga);
6640
6640
  Ft(va);
6641
- Ft(Iv);
6642
6641
  Ft(kv);
6642
+ Ft(Cv);
6643
6643
  const qp = new ne({
6644
6644
  algorithm: Sc,
6645
6645
  parameters: q.serialize(vi)
6646
6646
  }), Zp = new ne({
6647
- algorithm: Av,
6647
+ algorithm: Sv,
6648
6648
  parameters: q.serialize(Ko.toASN(new Uint8Array([218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9]).buffer))
6649
6649
  });
6650
6650
  Ft(gi);
6651
- Ft(Sv);
6652
6651
  Ft(_v);
6652
+ Ft(Ev);
6653
6653
  Ft(fa);
6654
6654
  Ft(Gp);
6655
6655
  Ft(zp);
@@ -6675,7 +6675,7 @@ f([
6675
6675
  y({ type: ne, context: 2, defaultValue: Zp })
6676
6676
  ], _c.prototype, "pSourceAlgorithm", void 0);
6677
6677
  new ne({
6678
- algorithm: xv,
6678
+ algorithm: Av,
6679
6679
  parameters: q.serialize(new _c())
6680
6680
  });
6681
6681
  class mi {
@@ -6815,7 +6815,7 @@ function vf(r, e) {
6815
6815
  }
6816
6816
  r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
6817
6817
  }
6818
- function Ov(r, e, t, n) {
6818
+ function Tv(r, e, t, n) {
6819
6819
  function i(s) {
6820
6820
  return s instanceof t ? s : new t(function(o) {
6821
6821
  o(s);
@@ -6842,7 +6842,7 @@ function Ov(r, e, t, n) {
6842
6842
  h((n = n.apply(r, [])).next());
6843
6843
  });
6844
6844
  }
6845
- function Tv(r, e) {
6845
+ function Nv(r, e) {
6846
6846
  var t = { label: 0, sent: function() {
6847
6847
  if (s[0] & 1) throw s[1];
6848
6848
  return s[1];
@@ -6934,9 +6934,9 @@ function ti() {
6934
6934
  r = r.concat(ma(arguments[e]));
6935
6935
  return r;
6936
6936
  }
6937
- var Nv = "injectionTokens";
6938
- function Pv(r) {
6939
- var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(Nv, r) || {};
6937
+ var Pv = "injectionTokens";
6938
+ function jv(r) {
6939
+ var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(Pv, r) || {};
6940
6940
  return Object.keys(t).forEach(function(n) {
6941
6941
  e[+n] = t[n];
6942
6942
  }), e;
@@ -6984,13 +6984,13 @@ var Yp = function() {
6984
6984
  function Ni(r) {
6985
6985
  return typeof r == "string" || typeof r == "symbol";
6986
6986
  }
6987
- function jv(r) {
6987
+ function Rv(r) {
6988
6988
  return typeof r == "object" && "token" in r && "multiple" in r;
6989
6989
  }
6990
6990
  function oh(r) {
6991
6991
  return typeof r == "object" && "token" in r && "transform" in r;
6992
6992
  }
6993
- function Rv(r) {
6993
+ function Uv(r) {
6994
6994
  return typeof r == "function" || r instanceof Yp;
6995
6995
  }
6996
6996
  function $o(r) {
@@ -6999,7 +6999,7 @@ function $o(r) {
6999
6999
  function Mo(r) {
7000
7000
  return r.useValue != null;
7001
7001
  }
7002
- function Uv(r) {
7002
+ function Dv(r) {
7003
7003
  return Wp(r) || Mo(r) || $o(r) || nu(r);
7004
7004
  }
7005
7005
  var mf = function() {
@@ -7025,7 +7025,7 @@ var mf = function() {
7025
7025
  }, r.prototype.ensure = function(e) {
7026
7026
  this._registryMap.has(e) || this._registryMap.set(e, []);
7027
7027
  }, r;
7028
- }(), Dv = function(r) {
7028
+ }(), $v = function(r) {
7029
7029
  vf(e, r);
7030
7030
  function e() {
7031
7031
  return r !== null && r.apply(this, arguments) || this;
@@ -7037,54 +7037,54 @@ var mf = function() {
7037
7037
  }
7038
7038
  return r;
7039
7039
  }();
7040
- function $v(r, e) {
7040
+ function Mv(r, e) {
7041
7041
  if (r === null)
7042
7042
  return "at position #" + e;
7043
7043
  var t = r.split(",")[e].trim();
7044
7044
  return '"' + t + '" at position #' + e;
7045
7045
  }
7046
- function Mv(r, e, t) {
7046
+ function Vv(r, e, t) {
7047
7047
  return t === void 0 && (t = " "), ti([r], e.message.split(`
7048
7048
  `).map(function(n) {
7049
7049
  return t + n;
7050
7050
  })).join(`
7051
7051
  `);
7052
7052
  }
7053
- function Vv(r, e, t) {
7054
- var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o = $v(s, e);
7055
- return Mv("Cannot inject the dependency " + o + ' of "' + r.name + '" constructor. Reason:', t);
7053
+ function Lv(r, e, t) {
7054
+ var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o = Mv(s, e);
7055
+ return Vv("Cannot inject the dependency " + o + ' of "' + r.name + '" constructor. Reason:', t);
7056
7056
  }
7057
- function Lv(r) {
7057
+ function Hv(r) {
7058
7058
  if (typeof r.dispose != "function")
7059
7059
  return !1;
7060
7060
  var e = r.dispose;
7061
7061
  return !(e.length > 0);
7062
7062
  }
7063
- var Hv = function(r) {
7063
+ var Fv = function(r) {
7064
7064
  vf(e, r);
7065
7065
  function e() {
7066
7066
  return r !== null && r.apply(this, arguments) || this;
7067
7067
  }
7068
7068
  return e;
7069
- }(mf), Fv = function(r) {
7069
+ }(mf), Gv = function(r) {
7070
7070
  vf(e, r);
7071
7071
  function e() {
7072
7072
  return r !== null && r.apply(this, arguments) || this;
7073
7073
  }
7074
7074
  return e;
7075
- }(mf), Gv = /* @__PURE__ */ function() {
7075
+ }(mf), zv = /* @__PURE__ */ function() {
7076
7076
  function r() {
7077
- this.preResolution = new Hv(), this.postResolution = new Fv();
7077
+ this.preResolution = new Fv(), this.postResolution = new Gv();
7078
7078
  }
7079
7079
  return r;
7080
- }(), Jp = /* @__PURE__ */ new Map(), zv = function() {
7080
+ }(), Jp = /* @__PURE__ */ new Map(), Kv = function() {
7081
7081
  function r(e) {
7082
- this.parent = e, this._registry = new Dv(), this.interceptors = new Gv(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
7082
+ this.parent = e, this._registry = new $v(), this.interceptors = new zv(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
7083
7083
  }
7084
7084
  return r.prototype.register = function(e, t, n) {
7085
7085
  n === void 0 && (n = { lifecycle: dr.Transient }), this.ensureNotDisposed();
7086
7086
  var i;
7087
- if (Uv(t) ? i = t : i = { useClass: t }, $o(i))
7087
+ if (Dv(t) ? i = t : i = { useClass: t }, $o(i))
7088
7088
  for (var s = [e], o = i; o != null; ) {
7089
7089
  var c = o.useToken;
7090
7090
  if (s.includes(c))
@@ -7131,7 +7131,7 @@ var Hv = function(r) {
7131
7131
  var i = this.resolveRegistration(n, t);
7132
7132
  return this.executePostResolutionInterceptor(e, i, "Single"), i;
7133
7133
  }
7134
- if (Rv(e)) {
7134
+ if (Uv(e)) {
7135
7135
  var i = this.construct(e, t);
7136
7136
  return this.executePostResolutionInterceptor(e, i, "Single"), i;
7137
7137
  }
@@ -7258,9 +7258,9 @@ var Hv = function(r) {
7258
7258
  options: n
7259
7259
  });
7260
7260
  }, r.prototype.dispose = function() {
7261
- return Ov(this, void 0, void 0, function() {
7261
+ return Tv(this, void 0, void 0, function() {
7262
7262
  var e;
7263
- return Tv(this, function(t) {
7263
+ return Nv(this, function(t) {
7264
7264
  switch (t.label) {
7265
7265
  case 0:
7266
7266
  return this.disposed = !0, e = [], this.disposables.forEach(function(n) {
@@ -7292,25 +7292,25 @@ var Hv = function(r) {
7292
7292
  var o = s.map(n.resolveParams(t, e));
7293
7293
  return new (e.bind.apply(e, ti([void 0], o)))();
7294
7294
  }();
7295
- return Lv(i) && this.disposables.add(i), i;
7295
+ return Hv(i) && this.disposables.add(i), i;
7296
7296
  }, r.prototype.resolveParams = function(e, t) {
7297
7297
  var n = this;
7298
7298
  return function(i, s) {
7299
7299
  var o, c, u;
7300
7300
  try {
7301
- return jv(i) ? oh(i) ? i.multiple ? (o = n.resolve(i.transform)).transform.apply(o, ti([n.resolveAll(i.token)], i.transformArgs)) : (c = n.resolve(i.transform)).transform.apply(c, ti([n.resolve(i.token, e)], i.transformArgs)) : i.multiple ? n.resolveAll(i.token) : n.resolve(i.token, e) : oh(i) ? (u = n.resolve(i.transform, e)).transform.apply(u, ti([n.resolve(i.token, e)], i.transformArgs)) : n.resolve(i, e);
7301
+ return Rv(i) ? oh(i) ? i.multiple ? (o = n.resolve(i.transform)).transform.apply(o, ti([n.resolveAll(i.token)], i.transformArgs)) : (c = n.resolve(i.transform)).transform.apply(c, ti([n.resolve(i.token, e)], i.transformArgs)) : i.multiple ? n.resolveAll(i.token) : n.resolve(i.token, e) : oh(i) ? (u = n.resolve(i.transform, e)).transform.apply(u, ti([n.resolve(i.token, e)], i.transformArgs)) : n.resolve(i, e);
7302
7302
  } catch (h) {
7303
- throw new Error(Vv(t, s, h));
7303
+ throw new Error(Lv(t, s, h));
7304
7304
  }
7305
7305
  };
7306
7306
  }, r.prototype.ensureNotDisposed = function() {
7307
7307
  if (this.disposed)
7308
7308
  throw new Error("This container has been disposed, you cannot interact with a disposed container");
7309
7309
  }, r;
7310
- }(), lr = new zv();
7310
+ }(), lr = new Kv();
7311
7311
  function kc() {
7312
7312
  return function(r) {
7313
- Jp.set(r, Pv(r));
7313
+ Jp.set(r, jv(r));
7314
7314
  };
7315
7315
  }
7316
7316
  if (typeof Reflect > "u" || !Reflect.getMetadata)
@@ -7742,7 +7742,7 @@ f([
7742
7742
  *
7743
7743
  */
7744
7744
  const Io = "crypto.algorithm";
7745
- class Kv {
7745
+ class qv {
7746
7746
  getAlgorithms() {
7747
7747
  return lr.resolveAll(Io);
7748
7748
  }
@@ -7778,7 +7778,7 @@ class Kv {
7778
7778
  }
7779
7779
  }
7780
7780
  const Yi = "crypto.algorithmProvider";
7781
- lr.registerSingleton(Yi, Kv);
7781
+ lr.registerSingleton(Yi, qv);
7782
7782
  var Vo;
7783
7783
  const br = "1.3.36.3.3.2.8.1.1", Ih = `${br}.1`, kh = `${br}.2`, Ch = `${br}.3`, Bh = `${br}.4`, Oh = `${br}.5`, Th = `${br}.6`, Nh = `${br}.7`, Ph = `${br}.8`, jh = `${br}.9`, Rh = `${br}.10`, Uh = `${br}.11`, Dh = `${br}.12`, $h = `${br}.13`, Mh = `${br}.14`, Vh = "brainpoolP160r1", Lh = "brainpoolP160t1", Hh = "brainpoolP192r1", Fh = "brainpoolP192t1", Gh = "brainpoolP224r1", zh = "brainpoolP224t1", Kh = "brainpoolP256r1", qh = "brainpoolP256t1", Zh = "brainpoolP320r1", Wh = "brainpoolP320t1", Yh = "brainpoolP384r1", Jh = "brainpoolP384t1", Xh = "brainpoolP512r1", Qh = "brainpoolP512t1", Ct = "ECDSA";
7784
7784
  let Gs = Vo = class {
@@ -7788,13 +7788,13 @@ let Gs = Vo = class {
7788
7788
  if ("hash" in e)
7789
7789
  switch ((typeof e.hash == "string" ? e.hash : e.hash.name).toLowerCase()) {
7790
7790
  case "sha-1":
7791
- return gv;
7792
- case "sha-256":
7793
7791
  return vv;
7794
- case "sha-384":
7792
+ case "sha-256":
7795
7793
  return mv;
7796
- case "sha-512":
7794
+ case "sha-384":
7797
7795
  return wv;
7796
+ case "sha-512":
7797
+ return bv;
7798
7798
  }
7799
7799
  else if ("namedCurve" in e) {
7800
7800
  let t = "";
@@ -7934,7 +7934,7 @@ class it {
7934
7934
  }
7935
7935
  it.NAME = s0;
7936
7936
  it.VALUE = o0;
7937
- class qv {
7937
+ class Zv {
7938
7938
  static toTextObject(e) {
7939
7939
  const t = new it("Algorithm Identifier", {}, Bn.toString(e.algorithm));
7940
7940
  if (e.parameters)
@@ -7964,7 +7964,7 @@ Bn.items = {
7964
7964
  [va]: "sha512",
7965
7965
  [gi]: "rsaEncryption",
7966
7966
  [fa]: "sha1WithRSAEncryption",
7967
- [Ev]: "sha224WithRSAEncryption",
7967
+ [Iv]: "sha224WithRSAEncryption",
7968
7968
  [Xl]: "sha256WithRSAEncryption",
7969
7969
  [ha]: "sha384WithRSAEncryption",
7970
7970
  [da]: "sha512WithRSAEncryption",
@@ -7974,12 +7974,12 @@ Bn.items = {
7974
7974
  [df]: "ecdsaWithSHA256",
7975
7975
  [pf]: "ecdsaWithSHA384",
7976
7976
  [yf]: "ecdsaWithSHA512",
7977
- [lv]: "TLS WWW server authentication",
7978
- [uv]: "TLS WWW client authentication",
7979
- [fv]: "Code Signing",
7980
- [hv]: "E-mail Protection",
7981
- [dv]: "Time Stamping",
7982
- [pv]: "OCSP Signing",
7977
+ [uv]: "TLS WWW server authentication",
7978
+ [fv]: "TLS WWW client authentication",
7979
+ [hv]: "Code Signing",
7980
+ [dv]: "E-mail Protection",
7981
+ [pv]: "Time Stamping",
7982
+ [yv]: "OCSP Signing",
7983
7983
  [Wl]: "Signed Data"
7984
7984
  };
7985
7985
  class zn {
@@ -8036,7 +8036,7 @@ class zn {
8036
8036
  }
8037
8037
  }
8038
8038
  zn.oidSerializer = Bn;
8039
- zn.algorithmSerializer = qv;
8039
+ zn.algorithmSerializer = Zv;
8040
8040
  class Jn {
8041
8041
  constructor(...e) {
8042
8042
  if (e.length === 1) {
@@ -8155,9 +8155,9 @@ class Dn {
8155
8155
  }
8156
8156
  a0 = Symbol.toStringTag;
8157
8157
  Dn.DEFAULT = "default";
8158
- const Zt = new Dn(), Zv = /^[0-2](?:\.[1-9][0-9]*)+$/;
8159
- function Wv(r) {
8160
- return new RegExp(Zv).test(r);
8158
+ const Zt = new Dn(), Wv = /^[0-2](?:\.[1-9][0-9]*)+$/;
8159
+ function Yv(r) {
8160
+ return new RegExp(Wv).test(r);
8161
8161
  }
8162
8162
  class c0 {
8163
8163
  constructor(e = {}) {
@@ -8169,7 +8169,7 @@ class c0 {
8169
8169
  return this.items[e] || null;
8170
8170
  }
8171
8171
  findId(e) {
8172
- return Wv(e) ? e : this.get(e);
8172
+ return Yv(e) ? e : this.get(e);
8173
8173
  }
8174
8174
  register(e, t) {
8175
8175
  this.items[e] = t, this.items[t] = e;
@@ -8188,11 +8188,11 @@ mr.register("G", "2.5.4.42");
8188
8188
  mr.register("I", "2.5.4.43");
8189
8189
  mr.register("SN", "2.5.4.4");
8190
8190
  mr.register("T", "2.5.4.12");
8191
- function Yv(r, e) {
8191
+ function Jv(r, e) {
8192
8192
  return `\\${le.ToHex(le.FromUtf8String(e)).toUpperCase()}`;
8193
8193
  }
8194
- function Jv(r) {
8195
- return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/, Yv);
8194
+ function Xv(r) {
8195
+ return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/, Jv);
8196
8196
  }
8197
8197
  class Hn {
8198
8198
  static isASCII(e) {
@@ -8225,7 +8225,7 @@ class Hn {
8225
8225
  }
8226
8226
  toString() {
8227
8227
  return this.asn.map((e) => e.map((t) => {
8228
- const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${le.ToHex(t.value.anyValue)}` : Jv(t.value.toString());
8228
+ const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${le.ToHex(t.value.anyValue)}` : Xv(t.value.toString());
8229
8229
  return `${n}=${i}`;
8230
8230
  }).join("+")).join(", ");
8231
8231
  }
@@ -8319,7 +8319,7 @@ class Hn {
8319
8319
  return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (i = e[0] || i, n = e[1] || Zt.get()) : n = e[0] || Zt.get(), await n.subtle.digest(i, this.toArrayBuffer());
8320
8320
  }
8321
8321
  }
8322
- const l0 = "Cannot initialize GeneralName from ASN.1 data.", ed = `${l0} Unsupported string format in use.`, Xv = `${l0} Value doesn't match to GUID regular expression.`, td = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, rd = "1.3.6.1.4.1.311.25.1", nd = "1.3.6.1.4.1.311.20.2.3", Gc = "dns", zc = "dn", Kc = "email", qc = "ip", Zc = "url", Wc = "guid", Yc = "upn", No = "id";
8322
+ const l0 = "Cannot initialize GeneralName from ASN.1 data.", ed = `${l0} Unsupported string format in use.`, Qv = `${l0} Value doesn't match to GUID regular expression.`, td = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, rd = "1.3.6.1.4.1.311.25.1", nd = "1.3.6.1.4.1.311.20.2.3", Gc = "dns", zc = "dn", Kc = "email", qc = "ip", Zc = "url", Wc = "guid", Yc = "upn", No = "id";
8323
8323
  class $n extends Jn {
8324
8324
  constructor(...e) {
8325
8325
  let t;
@@ -8391,7 +8391,7 @@ class $n extends Jn {
8391
8391
  this.type = Wc;
8392
8392
  const t = q.parse(e.otherName.value, st), n = new RegExp(td, "i").exec(le.ToHex(t));
8393
8393
  if (!n)
8394
- throw new Error(Xv);
8394
+ throw new Error(Qv);
8395
8395
  this.value = n.slice(1).map((i, s) => s < 3 ? le.ToHex(new Uint8Array(le.FromHex(i)).reverse()) : i).join("-");
8396
8396
  } else if (e.otherName.typeId === nd)
8397
8397
  this.type = Yc, this.value = q.parse(e.otherName.value, Xt).toString();
@@ -8476,7 +8476,7 @@ class zs extends Jn {
8476
8476
  }
8477
8477
  }
8478
8478
  zs.NAME = "GeneralNames";
8479
- const js = "-{5}", Ks = "\\n", Qv = `[^${Ks}]+`, em = `${js}BEGIN (${Qv}(?=${js}))${js}`, tm = `${js}END \\1${js}`, Ji = "\\n", rm = `[^:${Ks}]+`, nm = `(?:[^${Ks}]+${Ji}(?: +[^${Ks}]+${Ji})*)`, im = "[a-zA-Z0-9=+/]+", sm = `(?:${im}${Ji})+`, id = `${em}${Ji}(?:((?:${rm}: ${nm})+))?${Ji}?(${sm})${tm}`;
8479
+ const js = "-{5}", Ks = "\\n", em = `[^${Ks}]+`, tm = `${js}BEGIN (${em}(?=${js}))${js}`, rm = `${js}END \\1${js}`, Ji = "\\n", nm = `[^:${Ks}]+`, im = `(?:[^${Ks}]+${Ji}(?: +[^${Ks}]+${Ji})*)`, sm = "[a-zA-Z0-9=+/]+", om = `(?:${sm}${Ji})+`, id = `${tm}${Ji}(?:((?:${nm}: ${im})+))?${Ji}?(${om})${rm}`;
8480
8480
  class gr {
8481
8481
  static isPem(e) {
8482
8482
  return typeof e == "string" && new RegExp(id, "g").test(e);
@@ -8623,7 +8623,7 @@ class sn extends Fr {
8623
8623
  e.length > 1 ? (i = e[0] || i, n = e[1] || n, t = e[2] || Zt.get()) : t = e[0] || Zt.get();
8624
8624
  let s = this.rawData;
8625
8625
  const o = q.parse(this.rawData, rn);
8626
- return o.algorithm.algorithm === Ps && (s = om(o, s)), t.subtle.importKey("spki", s, i, !0, n);
8626
+ return o.algorithm.algorithm === Ps && (s = am(o, s)), t.subtle.importKey("spki", s, i, !0, n);
8627
8627
  }
8628
8628
  onInit(e) {
8629
8629
  const t = lr.resolve(Yi), n = this.algorithm = t.toWebAlgorithm(e.algorithm);
@@ -8659,7 +8659,7 @@ class sn extends Fr {
8659
8659
  return e;
8660
8660
  }
8661
8661
  }
8662
- function om(r, e) {
8662
+ function am(r, e) {
8663
8663
  return r.algorithm = new ne({
8664
8664
  algorithm: gi,
8665
8665
  parameters: null
@@ -9010,7 +9010,7 @@ class Pc {
9010
9010
  }
9011
9011
  Pc.items = /* @__PURE__ */ new Map();
9012
9012
  const jc = "crypto.signatureFormatter";
9013
- class am {
9013
+ class cm {
9014
9014
  toAsnSignature(e, t) {
9015
9015
  return W.toArrayBuffer(t);
9016
9016
  }
@@ -9162,7 +9162,7 @@ class Tr {
9162
9162
  toWebSignature(e, t) {
9163
9163
  if (e.name === "ECDSA") {
9164
9164
  const n = q.parse(t, ua), i = e.namedCurve, s = Tr.namedCurveSize.get(i) || Tr.defaultNamedCurveSize, o = this.addPadding(s, this.removePadding(n.r)), c = this.addPadding(s, this.removePadding(n.s));
9165
- return bg(o, c);
9165
+ return xg(o, c);
9166
9166
  }
9167
9167
  return null;
9168
9168
  }
@@ -9222,7 +9222,7 @@ Su = f([
9222
9222
  kc()
9223
9223
  ], Su);
9224
9224
  lr.registerSingleton(Io, Su);
9225
- class cm extends Fr {
9225
+ class lm extends Fr {
9226
9226
  constructor(e) {
9227
9227
  Fr.isAsnEncoded(e) ? super(e, Fs) : super(e), this.tag = gr.CertificateRequestTag;
9228
9228
  }
@@ -9281,7 +9281,7 @@ class cm extends Fr {
9281
9281
  }), e;
9282
9282
  }
9283
9283
  }
9284
- cm.NAME = "PKCS#10 Certificate Request";
9284
+ lm.NAME = "PKCS#10 Certificate Request";
9285
9285
  class wi extends Fr {
9286
9286
  constructor(e) {
9287
9287
  Fr.isAsnEncoded(e) ? super(e, di) : super(e), this.tag = gr.CertificateTag;
@@ -9380,7 +9380,7 @@ class wi extends Fr {
9380
9380
  }
9381
9381
  }
9382
9382
  wi.NAME = "Certificate";
9383
- class lm extends Array {
9383
+ class um extends Array {
9384
9384
  constructor(e) {
9385
9385
  if (super(), Fr.isAsnEncoded(e))
9386
9386
  this.import(e);
@@ -9392,7 +9392,7 @@ class lm extends Array {
9392
9392
  }
9393
9393
  export(e) {
9394
9394
  const t = new xn();
9395
- t.version = 1, t.encapContentInfo.eContentType = yv, t.encapContentInfo.eContent = new Ki({
9395
+ t.version = 1, t.encapContentInfo.eContentType = gv, t.encapContentInfo.eContent = new Ki({
9396
9396
  single: new st()
9397
9397
  }), t.certificates = new Ms(this.map((s) => new pi({
9398
9398
  certificate: q.parse(s.rawData, di)
@@ -9449,12 +9449,12 @@ class lm extends Array {
9449
9449
  });
9450
9450
  }
9451
9451
  }
9452
- class um {
9452
+ class fm {
9453
9453
  constructor(e = {}) {
9454
9454
  this.certificates = [], e.certificates && (this.certificates = e.certificates);
9455
9455
  }
9456
9456
  async build(e, t = Zt.get()) {
9457
- const n = new lm(e);
9457
+ const n = new um(e);
9458
9458
  let i = e;
9459
9459
  for (; i = await this.findIssuer(i, t); ) {
9460
9460
  const s = await i.getThumbprint(t);
@@ -9510,13 +9510,13 @@ Rr.register(bl, y0);
9510
9510
  Rr.register(yl, g0);
9511
9511
  Pc.register(i0, v0);
9512
9512
  Pc.register(wf, bf);
9513
- lr.registerSingleton(jc, am);
9513
+ lr.registerSingleton(jc, cm);
9514
9514
  lr.registerSingleton(jc, Tr);
9515
9515
  Tr.namedCurveSize.set("P-256", 32);
9516
9516
  Tr.namedCurveSize.set("K-256", 32);
9517
9517
  Tr.namedCurveSize.set("P-384", 48);
9518
9518
  Tr.namedCurveSize.set("P-521", 66);
9519
- const me = { POS_INT: 0, NEG_INT: 1, BYTE_STRING: 2, UTF8_STRING: 3, ARRAY: 4, MAP: 5, TAG: 6, SIMPLE_FLOAT: 7 }, It = { DATE_STRING: 0, DATE_EPOCH: 1, POS_BIGINT: 2, NEG_BIGINT: 3, DECIMAL_FRAC: 4, BIGFLOAT: 5, BASE64URL_EXPECTED: 21, BASE64_EXPECTED: 22, BASE16_EXPECTED: 23, CBOR: 24, URI: 32, BASE64URL: 33, BASE64: 34, MIME: 36, SET: 258, JSON: 262, REGEXP: 21066, SELF_DESCRIBED: 55799, INVALID_16: 65535, INVALID_32: 4294967295, INVALID_64: 0xffffffffffffffffn }, At = { ZERO: 0, ONE: 24, TWO: 25, FOUR: 26, EIGHT: 27, INDEFINITE: 31 }, Mn = { FALSE: 20, TRUE: 21, NULL: 22, UNDEFINED: 23 };
9519
+ const we = { POS_INT: 0, NEG_INT: 1, BYTE_STRING: 2, UTF8_STRING: 3, ARRAY: 4, MAP: 5, TAG: 6, SIMPLE_FLOAT: 7 }, It = { DATE_STRING: 0, DATE_EPOCH: 1, POS_BIGINT: 2, NEG_BIGINT: 3, DECIMAL_FRAC: 4, BIGFLOAT: 5, BASE64URL_EXPECTED: 21, BASE64_EXPECTED: 22, BASE16_EXPECTED: 23, CBOR: 24, URI: 32, BASE64URL: 33, BASE64: 34, MIME: 36, SET: 258, JSON: 262, REGEXP: 21066, SELF_DESCRIBED: 55799, INVALID_16: 65535, INVALID_32: 4294967295, INVALID_64: 0xffffffffffffffffn }, At = { ZERO: 0, ONE: 24, TWO: 25, FOUR: 26, EIGHT: 27, INDEFINITE: 31 }, Mn = { FALSE: 20, TRUE: 21, NULL: 22, UNDEFINED: 23 };
9520
9520
  var Es;
9521
9521
  let Ir = (Es = class {
9522
9522
  }, Ke(Es, "BREAK", Symbol.for("github.com/hildjj/cbor2/break")), Ke(Es, "ENCODED", Symbol.for("github.com/hildjj/cbor2/cbor-encoded")), Ke(Es, "LENGTH", Symbol.for("github.com/hildjj/cbor2/length")), Es);
@@ -9564,7 +9564,7 @@ let Qe = (vn = class {
9564
9564
  function _a(r) {
9565
9565
  if (r != null && typeof r == "object") return r[Ir.ENCODED];
9566
9566
  }
9567
- function fm(r) {
9567
+ function hm(r) {
9568
9568
  if (r != null && typeof r == "object") return r[Ir.LENGTH];
9569
9569
  }
9570
9570
  function Zs(r, e) {
@@ -9584,7 +9584,7 @@ function m0(r) {
9584
9584
  function Vr(r) {
9585
9585
  return r.reduce((e, t) => e + t.toString(16).padStart(2, "0"), "");
9586
9586
  }
9587
- function hm(r) {
9587
+ function dm(r) {
9588
9588
  const e = r.reduce((i, s) => i + s.length, 0), t = new Uint8Array(e);
9589
9589
  let n = 0;
9590
9590
  for (const i of r) t.set(i, n), n += i.length;
@@ -9594,12 +9594,12 @@ function xf(r) {
9594
9594
  const e = atob(r);
9595
9595
  return Uint8Array.from(e, (t) => t.codePointAt(0));
9596
9596
  }
9597
- const dm = { "-": "+", _: "/" };
9598
- function pm(r) {
9599
- const e = r.replace(/[_-]/g, (t) => dm[t]);
9597
+ const pm = { "-": "+", _: "/" };
9598
+ function ym(r) {
9599
+ const e = r.replace(/[_-]/g, (t) => pm[t]);
9600
9600
  return xf(e.padEnd(Math.ceil(e.length / 4) * 4, "="));
9601
9601
  }
9602
- function ym() {
9602
+ function gm() {
9603
9603
  const r = new Uint8Array(4), e = new Uint32Array(r.buffer);
9604
9604
  return !((e[0] = 1) & r[0]);
9605
9605
  }
@@ -9704,7 +9704,7 @@ function b0(r, e = 0, t = !1) {
9704
9704
  } else if (i === 31) return s ? NaN : n * (1 / 0);
9705
9705
  return n * 2 ** (i - 25) * (1024 + s);
9706
9706
  }
9707
- function gm(r) {
9707
+ function vm(r) {
9708
9708
  const e = new DataView(new ArrayBuffer(4));
9709
9709
  e.setFloat32(0, r, !1);
9710
9710
  const t = e.getUint32(0, !1);
@@ -9719,7 +9719,7 @@ function gm(r) {
9719
9719
  else return null;
9720
9720
  return n;
9721
9721
  }
9722
- function vm(r) {
9722
+ function mm(r) {
9723
9723
  if (r !== 0) {
9724
9724
  const e = new ArrayBuffer(8), t = new DataView(e);
9725
9725
  t.setFloat64(0, r, !1);
@@ -9728,7 +9728,7 @@ function vm(r) {
9728
9728
  }
9729
9729
  return r;
9730
9730
  }
9731
- function mm(r) {
9731
+ function wm(r) {
9732
9732
  switch (r.length) {
9733
9733
  case 2:
9734
9734
  b0(r, 0, !0);
@@ -9747,7 +9747,7 @@ function mm(r) {
9747
9747
  throw new TypeError(`Bad input to isSubnormal: ${r}`);
9748
9748
  }
9749
9749
  }
9750
- const fd = me.SIMPLE_FLOAT << 5 | At.TWO, wm = me.SIMPLE_FLOAT << 5 | At.FOUR, bm = me.SIMPLE_FLOAT << 5 | At.EIGHT, xm = me.SIMPLE_FLOAT << 5 | Mn.TRUE, Am = me.SIMPLE_FLOAT << 5 | Mn.FALSE, Sm = me.SIMPLE_FLOAT << 5 | Mn.UNDEFINED, _m = me.SIMPLE_FLOAT << 5 | Mn.NULL, Em = new TextEncoder(), Im = { ...Ea.defaultOptions, avoidInts: !1, cde: !1, collapseBigInts: !0, dcbor: !1, float64: !1, flushToZero: !1, forceEndian: null, ignoreOriginalEncoding: !1, largeNegativeAsBigInt: !1, reduceUnsafeNumbers: !1, rejectBigInts: !1, rejectCustomSimples: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectUndefined: !1, simplifyNegativeZero: !1, sortKeys: null, stringNormalization: null }, x0 = { cde: !0, ignoreOriginalEncoding: !0, sortKeys: w0 }, km = { ...x0, dcbor: !0, largeNegativeAsBigInt: !0, reduceUnsafeNumbers: !0, rejectCustomSimples: !0, rejectDuplicateKeys: !0, rejectUndefined: !0, simplifyNegativeZero: !0, stringNormalization: "NFC" };
9750
+ const fd = we.SIMPLE_FLOAT << 5 | At.TWO, bm = we.SIMPLE_FLOAT << 5 | At.FOUR, xm = we.SIMPLE_FLOAT << 5 | At.EIGHT, Am = we.SIMPLE_FLOAT << 5 | Mn.TRUE, Sm = we.SIMPLE_FLOAT << 5 | Mn.FALSE, _m = we.SIMPLE_FLOAT << 5 | Mn.UNDEFINED, Em = we.SIMPLE_FLOAT << 5 | Mn.NULL, Im = new TextEncoder(), km = { ...Ea.defaultOptions, avoidInts: !1, cde: !1, collapseBigInts: !0, dcbor: !1, float64: !1, flushToZero: !1, forceEndian: null, ignoreOriginalEncoding: !1, largeNegativeAsBigInt: !1, reduceUnsafeNumbers: !1, rejectBigInts: !1, rejectCustomSimples: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectUndefined: !1, simplifyNegativeZero: !1, sortKeys: null, stringNormalization: null }, x0 = { cde: !0, ignoreOriginalEncoding: !0, sortKeys: w0 }, Cm = { ...x0, dcbor: !0, largeNegativeAsBigInt: !0, reduceUnsafeNumbers: !0, rejectCustomSimples: !0, rejectDuplicateKeys: !0, rejectUndefined: !0, simplifyNegativeZero: !0, stringNormalization: "NFC" };
9751
9751
  function A0(r) {
9752
9752
  const e = r < 0;
9753
9753
  return typeof r == "bigint" ? [e ? -r - 1n : r, e] : [e ? -r - 1 : r, e];
@@ -9756,17 +9756,17 @@ function Qc(r, e, t) {
9756
9756
  if (t.rejectFloats) throw new Error(`Attempt to encode an unwanted floating point number: ${r}`);
9757
9757
  if (isNaN(r)) e.writeUint8(fd), e.writeUint16(32256);
9758
9758
  else if (!t.float64 && Math.fround(r) === r) {
9759
- const n = gm(r);
9760
- n === null ? (e.writeUint8(wm), e.writeFloat32(r)) : (e.writeUint8(fd), e.writeUint16(n));
9761
- } else e.writeUint8(bm), e.writeFloat64(r);
9759
+ const n = vm(r);
9760
+ n === null ? (e.writeUint8(bm), e.writeFloat32(r)) : (e.writeUint8(fd), e.writeUint16(n));
9761
+ } else e.writeUint8(xm), e.writeFloat64(r);
9762
9762
  }
9763
9763
  function Gr(r, e, t) {
9764
9764
  const [n, i] = A0(r);
9765
9765
  if (i && t) throw new TypeError(`Negative size: ${r}`);
9766
- t ?? (t = i ? me.NEG_INT : me.POS_INT), t <<= 5, n < 24 ? e.writeUint8(t | n) : n <= 255 ? (e.writeUint8(t | At.ONE), e.writeUint8(n)) : n <= 65535 ? (e.writeUint8(t | At.TWO), e.writeUint16(n)) : n <= 4294967295 ? (e.writeUint8(t | At.FOUR), e.writeUint32(n)) : (e.writeUint8(t | At.EIGHT), e.writeBigUint64(BigInt(n)));
9766
+ t ?? (t = i ? we.NEG_INT : we.POS_INT), t <<= 5, n < 24 ? e.writeUint8(t | n) : n <= 255 ? (e.writeUint8(t | At.ONE), e.writeUint8(n)) : n <= 65535 ? (e.writeUint8(t | At.TWO), e.writeUint16(n)) : n <= 4294967295 ? (e.writeUint8(t | At.FOUR), e.writeUint32(n)) : (e.writeUint8(t | At.EIGHT), e.writeBigUint64(BigInt(n)));
9767
9767
  }
9768
9768
  function Ia(r, e, t) {
9769
- typeof r == "number" ? Gr(r, e, me.TAG) : typeof r == "object" && !t.ignoreOriginalEncoding && Ir.ENCODED in r ? e.write(r[Ir.ENCODED]) : r <= Number.MAX_SAFE_INTEGER ? Gr(Number(r), e, me.TAG) : (e.writeUint8(me.TAG << 5 | At.EIGHT), e.writeBigUint64(BigInt(r)));
9769
+ typeof r == "number" ? Gr(r, e, we.TAG) : typeof r == "object" && !t.ignoreOriginalEncoding && Ir.ENCODED in r ? e.write(r[Ir.ENCODED]) : r <= Number.MAX_SAFE_INTEGER ? Gr(Number(r), e, we.TAG) : (e.writeUint8(we.TAG << 5 | At.EIGHT), e.writeBigUint64(BigInt(r)));
9770
9770
  }
9771
9771
  function S0(r, e, t) {
9772
9772
  const [n, i] = A0(r);
@@ -9776,7 +9776,7 @@ function S0(r, e, t) {
9776
9776
  return;
9777
9777
  }
9778
9778
  if (n <= 0xffffffffffffffffn) {
9779
- const h = (i ? me.NEG_INT : me.POS_INT) << 5;
9779
+ const h = (i ? we.NEG_INT : we.POS_INT) << 5;
9780
9780
  e.writeUint8(h | At.EIGHT), e.writeBigUint64(n);
9781
9781
  return;
9782
9782
  }
@@ -9785,36 +9785,36 @@ function S0(r, e, t) {
9785
9785
  const s = i ? It.NEG_BIGINT : It.POS_BIGINT, o = n.toString(16), c = o.length % 2 ? "0" : "";
9786
9786
  Ia(s, e, t);
9787
9787
  const u = m0(c + o);
9788
- Gr(u.length, e, me.BYTE_STRING), e.write(u);
9789
- }
9790
- function Cm(r, e, t) {
9791
- t.flushToZero && (r = vm(r)), Object.is(r, -0) ? t.simplifyNegativeZero ? t.avoidInts ? Qc(0, e, t) : Gr(0, e) : Qc(r, e, t) : !t.avoidInts && Number.isSafeInteger(r) ? Gr(r, e) : t.reduceUnsafeNumbers && Math.floor(r) === r && r >= Sa.MIN && r <= Sa.MAX ? S0(BigInt(r), e, t) : Qc(r, e, t);
9788
+ Gr(u.length, e, we.BYTE_STRING), e.write(u);
9792
9789
  }
9793
9790
  function Bm(r, e, t) {
9794
- const n = t.stringNormalization ? r.normalize(t.stringNormalization) : r, i = Em.encode(n);
9795
- Gr(i.length, e, me.UTF8_STRING), e.write(i);
9791
+ t.flushToZero && (r = mm(r)), Object.is(r, -0) ? t.simplifyNegativeZero ? t.avoidInts ? Qc(0, e, t) : Gr(0, e) : Qc(r, e, t) : !t.avoidInts && Number.isSafeInteger(r) ? Gr(r, e) : t.reduceUnsafeNumbers && Math.floor(r) === r && r >= Sa.MIN && r <= Sa.MAX ? S0(BigInt(r), e, t) : Qc(r, e, t);
9796
9792
  }
9797
9793
  function Om(r, e, t) {
9794
+ const n = t.stringNormalization ? r.normalize(t.stringNormalization) : r, i = Im.encode(n);
9795
+ Gr(i.length, e, we.UTF8_STRING), e.write(i);
9796
+ }
9797
+ function Tm(r, e, t) {
9798
9798
  const n = r;
9799
- Af(n, n.length, me.ARRAY, e, t);
9799
+ Af(n, n.length, we.ARRAY, e, t);
9800
9800
  for (const i of n) ii(i, e, t);
9801
9801
  }
9802
- function Tm(r, e) {
9802
+ function Nm(r, e) {
9803
9803
  const t = r;
9804
- Gr(t.length, e, me.BYTE_STRING), e.write(t);
9804
+ Gr(t.length, e, we.BYTE_STRING), e.write(t);
9805
9805
  }
9806
- const Eu = /* @__PURE__ */ new Map([[Array, Om], [Uint8Array, Tm]]);
9806
+ const Eu = /* @__PURE__ */ new Map([[Array, Tm], [Uint8Array, Nm]]);
9807
9807
  function Rt(r, e) {
9808
9808
  const t = Eu.get(r);
9809
9809
  return Eu.set(r, e), t;
9810
9810
  }
9811
9811
  function Af(r, e, t, n, i) {
9812
- const s = fm(r);
9812
+ const s = hm(r);
9813
9813
  s && !i.ignoreOriginalEncoding ? n.write(s) : Gr(e, n, t);
9814
9814
  }
9815
- function Nm(r, e, t) {
9815
+ function Pm(r, e, t) {
9816
9816
  if (r === null) {
9817
- e.writeUint8(_m);
9817
+ e.writeUint8(Em);
9818
9818
  return;
9819
9819
  }
9820
9820
  if (!t.ignoreOriginalEncoding && Ir.ENCODED in r) {
@@ -9837,29 +9837,29 @@ function Nm(r, e, t) {
9837
9837
  return;
9838
9838
  }
9839
9839
  const i = Object.entries(r).map((s) => [s[0], s[1], Rc(s[0], t)]);
9840
- t.sortKeys && i.sort(t.sortKeys), Af(r, i.length, me.MAP, e, t);
9840
+ t.sortKeys && i.sort(t.sortKeys), Af(r, i.length, we.MAP, e, t);
9841
9841
  for (const [s, o, c] of i) e.write(c), ii(o, e, t);
9842
9842
  }
9843
9843
  function ii(r, e, t) {
9844
9844
  switch (typeof r) {
9845
9845
  case "number":
9846
- Cm(r, e, t);
9846
+ Bm(r, e, t);
9847
9847
  break;
9848
9848
  case "bigint":
9849
9849
  S0(r, e, t);
9850
9850
  break;
9851
9851
  case "string":
9852
- Bm(r, e, t);
9852
+ Om(r, e, t);
9853
9853
  break;
9854
9854
  case "boolean":
9855
- e.writeUint8(r ? xm : Am);
9855
+ e.writeUint8(r ? Am : Sm);
9856
9856
  break;
9857
9857
  case "undefined":
9858
9858
  if (t.rejectUndefined) throw new Error("Attempt to encode unwanted undefined.");
9859
- e.writeUint8(Sm);
9859
+ e.writeUint8(_m);
9860
9860
  break;
9861
9861
  case "object":
9862
- Nm(r, e, t);
9862
+ Pm(r, e, t);
9863
9863
  break;
9864
9864
  case "symbol":
9865
9865
  throw new TypeError(`Unknown symbol: ${r.toString()}`);
@@ -9868,8 +9868,8 @@ function ii(r, e, t) {
9868
9868
  }
9869
9869
  }
9870
9870
  function Rc(r, e = {}) {
9871
- const t = { ...Im };
9872
- e.dcbor ? Object.assign(t, km) : e.cde && Object.assign(t, x0), Object.assign(t, e);
9871
+ const t = { ...km };
9872
+ e.dcbor ? Object.assign(t, Cm) : e.cde && Object.assign(t, x0), Object.assign(t, e);
9873
9873
  const n = new Ea(t);
9874
9874
  return ii(r, n, t), n.read();
9875
9875
  }
@@ -9884,7 +9884,7 @@ const Tn = class Tn {
9884
9884
  }
9885
9885
  toCBOR(e, t) {
9886
9886
  if (t.rejectCustomSimples) throw new Error(`Cannot encode non-standard Simple value: ${this.value}`);
9887
- Gr(this.value, e, me.SIMPLE_FLOAT);
9887
+ Gr(this.value, e, we.SIMPLE_FLOAT);
9888
9888
  }
9889
9889
  toString() {
9890
9890
  return `simple(${this.value})`;
@@ -9898,7 +9898,7 @@ const Tn = class Tn {
9898
9898
  };
9899
9899
  Ke(Tn, "KnownSimple", /* @__PURE__ */ new Map([[Mn.FALSE, !1], [Mn.TRUE, !0], [Mn.NULL, null], [Mn.UNDEFINED, void 0]]));
9900
9900
  let Ws = Tn;
9901
- const Pm = new TextDecoder("utf8", { fatal: !0, ignoreBOM: !0 });
9901
+ const jm = new TextDecoder("utf8", { fatal: !0, ignoreBOM: !0 });
9902
9902
  var Ar, $r, qt, Cr, Wt, ei, Iu, ks;
9903
9903
  const La = class La {
9904
9904
  constructor(e, t) {
@@ -9933,21 +9933,21 @@ Ar = new WeakMap(), $r = new WeakMap(), qt = new WeakMap(), Cr = new WeakMap(),
9933
9933
  let o = s, c = !1, u = 0;
9934
9934
  switch (s) {
9935
9935
  case At.ONE:
9936
- if (u = 1, o = $(this, $r).getUint8($(this, qt)), i === me.SIMPLE_FLOAT) {
9936
+ if (u = 1, o = $(this, $r).getUint8($(this, qt)), i === we.SIMPLE_FLOAT) {
9937
9937
  if (o < 32) throw new Error(`Invalid simple encoding in extra byte: ${o}`);
9938
9938
  c = !0;
9939
9939
  } else if ($(this, Cr).requirePreferred && o < 24) throw new Error(`Unexpectedly long integer encoding (1) for ${o}`);
9940
9940
  break;
9941
9941
  case At.TWO:
9942
- if (u = 2, i === me.SIMPLE_FLOAT) o = b0($(this, Ar), $(this, qt));
9942
+ if (u = 2, i === we.SIMPLE_FLOAT) o = b0($(this, Ar), $(this, qt));
9943
9943
  else if (o = $(this, $r).getUint16($(this, qt), !1), $(this, Cr).requirePreferred && o <= 255) throw new Error(`Unexpectedly long integer encoding (2) for ${o}`);
9944
9944
  break;
9945
9945
  case At.FOUR:
9946
- if (u = 4, i === me.SIMPLE_FLOAT) o = $(this, $r).getFloat32($(this, qt), !1);
9946
+ if (u = 4, i === we.SIMPLE_FLOAT) o = $(this, $r).getFloat32($(this, qt), !1);
9947
9947
  else if (o = $(this, $r).getUint32($(this, qt), !1), $(this, Cr).requirePreferred && o <= 65535) throw new Error(`Unexpectedly long integer encoding (4) for ${o}`);
9948
9948
  break;
9949
9949
  case At.EIGHT: {
9950
- if (u = 8, i === me.SIMPLE_FLOAT) o = $(this, $r).getFloat64($(this, qt), !1);
9950
+ if (u = 8, i === we.SIMPLE_FLOAT) o = $(this, $r).getFloat64($(this, qt), !1);
9951
9951
  else if (o = $(this, $r).getBigUint64($(this, qt), !1), o <= Number.MAX_SAFE_INTEGER && (o = Number(o)), $(this, Cr).requirePreferred && o <= 4294967295) throw new Error(`Unexpectedly long integer encoding (8) for ${o}`);
9952
9952
  break;
9953
9953
  }
@@ -9957,11 +9957,11 @@ Ar = new WeakMap(), $r = new WeakMap(), qt = new WeakMap(), Cr = new WeakMap(),
9957
9957
  throw new Error(`Additional info not implemented: ${s}`);
9958
9958
  case At.INDEFINITE:
9959
9959
  switch (i) {
9960
- case me.POS_INT:
9961
- case me.NEG_INT:
9962
- case me.TAG:
9960
+ case we.POS_INT:
9961
+ case we.NEG_INT:
9962
+ case we.TAG:
9963
9963
  throw new Error(`Invalid indefinite encoding for MT ${i}`);
9964
- case me.SIMPLE_FLOAT:
9964
+ case we.SIMPLE_FLOAT:
9965
9965
  yield [i, s, Ir.BREAK, t, 0];
9966
9966
  return;
9967
9967
  }
@@ -9971,19 +9971,19 @@ Ar = new WeakMap(), $r = new WeakMap(), qt = new WeakMap(), Cr = new WeakMap(),
9971
9971
  c = !0;
9972
9972
  }
9973
9973
  switch (kt(this, qt, $(this, qt) + u), i) {
9974
- case me.POS_INT:
9974
+ case we.POS_INT:
9975
9975
  yield [i, s, o, t, u];
9976
9976
  break;
9977
- case me.NEG_INT:
9977
+ case we.NEG_INT:
9978
9978
  yield [i, s, typeof o == "bigint" ? -1n - o : -1 - Number(o), t, u];
9979
9979
  break;
9980
- case me.BYTE_STRING:
9980
+ case we.BYTE_STRING:
9981
9981
  o === 1 / 0 ? yield* Ve(this, Wt, ks).call(this, i, e, t) : yield [i, s, Ve(this, Wt, Iu).call(this, o), t, o];
9982
9982
  break;
9983
- case me.UTF8_STRING:
9984
- o === 1 / 0 ? yield* Ve(this, Wt, ks).call(this, i, e, t) : yield [i, s, Pm.decode(Ve(this, Wt, Iu).call(this, o)), t, o];
9983
+ case we.UTF8_STRING:
9984
+ o === 1 / 0 ? yield* Ve(this, Wt, ks).call(this, i, e, t) : yield [i, s, jm.decode(Ve(this, Wt, Iu).call(this, o)), t, o];
9985
9985
  break;
9986
- case me.ARRAY:
9986
+ case we.ARRAY:
9987
9987
  if (o === 1 / 0) yield* Ve(this, Wt, ks).call(this, i, e, t, !1);
9988
9988
  else {
9989
9989
  const h = Number(o);
@@ -9991,7 +9991,7 @@ Ar = new WeakMap(), $r = new WeakMap(), qt = new WeakMap(), Cr = new WeakMap(),
9991
9991
  for (let v = 0; v < h; v++) yield* Ve(this, Wt, ei).call(this, e + 1);
9992
9992
  }
9993
9993
  break;
9994
- case me.MAP:
9994
+ case we.MAP:
9995
9995
  if (o === 1 / 0) yield* Ve(this, Wt, ks).call(this, i, e, t, !1);
9996
9996
  else {
9997
9997
  const h = Number(o);
@@ -9999,10 +9999,10 @@ Ar = new WeakMap(), $r = new WeakMap(), qt = new WeakMap(), Cr = new WeakMap(),
9999
9999
  for (let v = 0; v < h; v++) yield* Ve(this, Wt, ei).call(this, e), yield* Ve(this, Wt, ei).call(this, e);
10000
10000
  }
10001
10001
  break;
10002
- case me.TAG:
10002
+ case we.TAG:
10003
10003
  yield [i, s, o, t, u], yield* Ve(this, Wt, ei).call(this, e);
10004
10004
  break;
10005
- case me.SIMPLE_FLOAT: {
10005
+ case we.SIMPLE_FLOAT: {
10006
10006
  const h = o;
10007
10007
  c && (o = Ws.create(Number(o))), yield [i, s, o, t, h];
10008
10008
  break;
@@ -10027,7 +10027,7 @@ Ar = new WeakMap(), $r = new WeakMap(), qt = new WeakMap(), Cr = new WeakMap(),
10027
10027
  }
10028
10028
  }, Ke(La, "defaultOptions", { maxDepth: 1024, encoding: "hex", requirePreferred: !1 });
10029
10029
  let Ys = La;
10030
- const jm = /* @__PURE__ */ new Map([[At.ZERO, 1], [At.ONE, 2], [At.TWO, 3], [At.FOUR, 5], [At.EIGHT, 9]]), Rm = new Uint8Array(0);
10030
+ const Rm = /* @__PURE__ */ new Map([[At.ZERO, 1], [At.ONE, 2], [At.TWO, 3], [At.FOUR, 5], [At.EIGHT, 9]]), Um = new Uint8Array(0);
10031
10031
  var tn, ar, en, Ha, E0;
10032
10032
  let Nn = (tn = class {
10033
10033
  constructor(e, t, n, i) {
@@ -10042,7 +10042,7 @@ let Nn = (tn = class {
10042
10042
  Ke(this, "depth", 0);
10043
10043
  rr(this, ar);
10044
10044
  rr(this, en, null);
10045
- if ([this.mt, this.ai, , this.offset] = e, this.left = t, this.parent = n, kt(this, ar, i), n && (this.depth = n.depth + 1), this.mt === me.MAP && ($(this, ar).sortKeys || $(this, ar).rejectDuplicateKeys) && kt(this, en, []), $(this, ar).rejectStreaming && this.ai === At.INDEFINITE) throw new Error("Streaming not supported");
10045
+ if ([this.mt, this.ai, , this.offset] = e, this.left = t, this.parent = n, kt(this, ar, i), n && (this.depth = n.depth + 1), this.mt === we.MAP && ($(this, ar).sortKeys || $(this, ar).rejectDuplicateKeys) && kt(this, en, []), $(this, ar).rejectStreaming && this.ai === At.INDEFINITE) throw new Error("Streaming not supported");
10046
10046
  }
10047
10047
  get isStreaming() {
10048
10048
  return this.left === 1 / 0;
@@ -10053,14 +10053,14 @@ let Nn = (tn = class {
10053
10053
  static create(e, t, n, i) {
10054
10054
  const [s, o, c, u] = e;
10055
10055
  switch (s) {
10056
- case me.POS_INT:
10057
- case me.NEG_INT: {
10056
+ case we.POS_INT:
10057
+ case we.NEG_INT: {
10058
10058
  if (n.rejectInts) throw new Error(`Unexpected integer: ${c}`);
10059
10059
  if (n.rejectLargeNegatives && c < -0x8000000000000000n) throw new Error(`Invalid 65bit negative number: ${c}`);
10060
10060
  let h = c;
10061
10061
  return n.convertUnsafeIntsToFloat && h >= Sa.MIN && h <= Sa.MAX && (h = Number(c)), n.boxed ? Is(h, i.toHere(u)) : h;
10062
10062
  }
10063
- case me.SIMPLE_FLOAT:
10063
+ case we.SIMPLE_FLOAT:
10064
10064
  if (o > At.ONE) {
10065
10065
  if (n.rejectFloats) throw new Error(`Decoding unwanted floating point number: ${c}`);
10066
10066
  if (n.rejectNegativeZero && Object.is(c, -0)) throw new Error("Decoding negative zero");
@@ -10068,10 +10068,10 @@ let Nn = (tn = class {
10068
10068
  const h = i.toHere(u);
10069
10069
  if (h.length !== 3 || h[1] !== 126 || h[2] !== 0) throw new Error(`Invalid NaN encoding: "${Vr(h)}"`);
10070
10070
  }
10071
- if (n.rejectSubnormals && mm(i.toHere(u + 1)), n.rejectLongFloats) {
10071
+ if (n.rejectSubnormals && wm(i.toHere(u + 1)), n.rejectLongFloats) {
10072
10072
  const h = Rc(c, { chunkSize: 9, reduceUnsafeNumbers: n.rejectUnsafeFloatInts });
10073
10073
  if (h[0] >> 5 !== s) throw new Error(`Should have been encoded as int, not float: ${c}`);
10074
- if (h.length < jm.get(o)) throw new Error(`Number should have been encoded shorter: ${c}`);
10074
+ if (h.length < Rm.get(o)) throw new Error(`Number should have been encoded shorter: ${c}`);
10075
10075
  }
10076
10076
  if (typeof c == "number" && n.boxed) return Is(c, i.toHere(u));
10077
10077
  } else {
@@ -10079,19 +10079,19 @@ let Nn = (tn = class {
10079
10079
  if (n.rejectUndefined && c === void 0) throw new Error("Unexpected undefined");
10080
10080
  }
10081
10081
  return c;
10082
- case me.BYTE_STRING:
10083
- case me.UTF8_STRING:
10082
+ case we.BYTE_STRING:
10083
+ case we.UTF8_STRING:
10084
10084
  if (c === 1 / 0) return new n.ParentType(e, 1 / 0, t, n);
10085
10085
  if (n.rejectStringsNotNormalizedAs && typeof c == "string") {
10086
10086
  const h = c.normalize(n.rejectStringsNotNormalizedAs);
10087
10087
  if (c !== h) throw new Error(`String not normalized as "${n.rejectStringsNotNormalizedAs}", got [${ud(c)}] instead of [${ud(h)}]`);
10088
10088
  }
10089
10089
  return n.boxed ? Is(c, i.toHere(u)) : c;
10090
- case me.ARRAY:
10090
+ case we.ARRAY:
10091
10091
  return new n.ParentType(e, c, t, n);
10092
- case me.MAP:
10092
+ case we.MAP:
10093
10093
  return new n.ParentType(e, c * 2, t, n);
10094
- case me.TAG: {
10094
+ case we.TAG: {
10095
10095
  const h = new n.ParentType(e, 1, t, n);
10096
10096
  return h.children = new Qe(c), h;
10097
10097
  }
@@ -10116,10 +10116,10 @@ let Nn = (tn = class {
10116
10116
  convert(e) {
10117
10117
  let t;
10118
10118
  switch (this.mt) {
10119
- case me.ARRAY:
10119
+ case we.ARRAY:
10120
10120
  t = this.children;
10121
10121
  break;
10122
- case me.MAP: {
10122
+ case we.MAP: {
10123
10123
  const n = Ve(this, Ha, E0).call(this);
10124
10124
  if ($(this, ar).sortKeys) {
10125
10125
  let i;
@@ -10138,14 +10138,14 @@ let Nn = (tn = class {
10138
10138
  t = !$(this, ar).boxed && !$(this, ar).preferMap && n.every(([i]) => typeof i == "string") ? Object.fromEntries(n) : new Map(n);
10139
10139
  break;
10140
10140
  }
10141
- case me.BYTE_STRING:
10142
- return hm(this.children);
10143
- case me.UTF8_STRING: {
10141
+ case we.BYTE_STRING:
10142
+ return dm(this.children);
10143
+ case we.UTF8_STRING: {
10144
10144
  const n = this.children.join("");
10145
10145
  t = $(this, ar).boxed ? Is(n, e.toHere(this.offset)) : n;
10146
10146
  break;
10147
10147
  }
10148
- case me.TAG:
10148
+ case we.TAG:
10149
10149
  t = this.children.decode($(this, ar));
10150
10150
  break;
10151
10151
  default:
@@ -10158,7 +10158,7 @@ let Nn = (tn = class {
10158
10158
  if (t % 2) throw new Error("Missing map value");
10159
10159
  const n = new Array(t / 2);
10160
10160
  if ($(this, en)) for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], $(this, en)[i]];
10161
- else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], Rm];
10161
+ else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], Um];
10162
10162
  return n;
10163
10163
  }, Ke(tn, "defaultDecodeOptions", { ...Ys.defaultOptions, ParentType: tn, boxed: !1, cde: !1, dcbor: !1, diagnosticSizes: _0.PREFERRED, convertUnsafeIntsToFloat: !1, pretty: !1, preferMap: !1, rejectLargeNegatives: !1, rejectBigInts: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectInts: !1, rejectLongLoundNaN: !1, rejectLongFloats: !1, rejectNegativeZero: !1, rejectSimple: !1, rejectStreaming: !1, rejectStringsNotNormalizedAs: null, rejectSubnormals: !1, rejectUndefined: !1, rejectUnsafeFloatInts: !1, saveOriginal: !1, sortKeys: null }), Ke(tn, "cdeDecodeOptions", { cde: !0, rejectStreaming: !0, requirePreferred: !0, sortKeys: w0 }), Ke(tn, "dcborDecodeOptions", { ...tn.cdeDecodeOptions, dcbor: !0, convertUnsafeIntsToFloat: !0, rejectDuplicateKeys: !0, rejectLargeNegatives: !0, rejectLongLoundNaN: !0, rejectLongFloats: !0, rejectNegativeZero: !0, rejectSimple: !0, rejectUndefined: !0, rejectUnsafeFloatInts: !0, rejectStringsNotNormalizedAs: "NFC" }), tn);
10164
10164
  var xd, Ad;
@@ -10205,25 +10205,25 @@ function k0(r, e, t) {
10205
10205
  let o = !1;
10206
10206
  const [c] = r.children;
10207
10207
  switch (r.mt) {
10208
- case me.POS_INT:
10208
+ case we.POS_INT:
10209
10209
  n += `Unsigned: ${c}`, typeof c == "bigint" && (n += "n");
10210
10210
  break;
10211
- case me.NEG_INT:
10211
+ case we.NEG_INT:
10212
10212
  n += `Negative: ${c}`, typeof c == "bigint" && (n += "n");
10213
10213
  break;
10214
- case me.BYTE_STRING:
10214
+ case we.BYTE_STRING:
10215
10215
  n += `Bytes (Length: ${Ro(r.length)})`;
10216
10216
  break;
10217
- case me.UTF8_STRING:
10217
+ case we.UTF8_STRING:
10218
10218
  n += `UTF8 (Length: ${Ro(r.length)})`, r.length !== 1 / 0 && (n += `: ${JSON.stringify(c)}`);
10219
10219
  break;
10220
- case me.ARRAY:
10220
+ case we.ARRAY:
10221
10221
  n += `Array (Length: ${Ro(r.value, "item")})`;
10222
10222
  break;
10223
- case me.MAP:
10223
+ case we.MAP:
10224
10224
  n += `Map (Length: ${Ro(r.value, "pair")})`;
10225
10225
  break;
10226
- case me.TAG: {
10226
+ case we.TAG: {
10227
10227
  n += `Tag #${r.value}`;
10228
10228
  const u = r.children, [h] = u.contents.children, v = new Qe(u.tag, h);
10229
10229
  Zs(v, i);
@@ -10231,7 +10231,7 @@ function k0(r, e, t) {
10231
10231
  b && (n += ": ", n += b), o || (o = v.noChildren);
10232
10232
  break;
10233
10233
  }
10234
- case me.SIMPLE_FLOAT:
10234
+ case we.SIMPLE_FLOAT:
10235
10235
  c === Ir.BREAK ? n += "BREAK" : r.ai > At.ONE ? Object.is(c, -0) ? n += "Float: -0" : n += `Float: ${c}` : (n += "Simple: ", c instanceof Ws ? n += c.value : n += c);
10236
10236
  break;
10237
10237
  }
@@ -10249,16 +10249,16 @@ function k0(r, e, t) {
10249
10249
  for (const h of r.children) {
10250
10250
  if (I0(h)) {
10251
10251
  let v = String(u);
10252
- r.mt === me.MAP ? v = u % 2 ? `val ${(u - 1) / 2}` : `key ${u / 2}` : r.mt === me.TAG && (v = ""), n += k0(h, e, v);
10252
+ r.mt === we.MAP ? v = u % 2 ? `val ${(u - 1) / 2}` : `key ${u / 2}` : r.mt === we.TAG && (v = ""), n += k0(h, e, v);
10253
10253
  }
10254
10254
  u++;
10255
10255
  }
10256
10256
  }
10257
10257
  return n;
10258
10258
  }
10259
- const Um = { ...Nn.defaultDecodeOptions, initialDepth: 0, noPrefixHex: !1, minCol: 0 };
10260
- function Dm(r, e) {
10261
- const t = { ...Um, ...e, ParentType: ku, saveOriginal: !0 }, n = new Ys(r, t);
10259
+ const Dm = { ...Nn.defaultDecodeOptions, initialDepth: 0, noPrefixHex: !1, minCol: 0 };
10260
+ function $m(r, e) {
10261
+ const t = { ...Dm, ...e, ParentType: ku, saveOriginal: !0 }, n = new Ys(r, t);
10262
10262
  let i, s;
10263
10263
  for (const c of n) {
10264
10264
  if (s = Nn.create(c, i, t, n), c[2] === Ir.BREAK) if (i != null && i.isStreaming) i.left = 1;
@@ -10276,7 +10276,7 @@ function Dm(r, e) {
10276
10276
  `;
10277
10277
  return o += k0(s, t), o;
10278
10278
  }
10279
- const hd = !ym();
10279
+ const hd = !gm();
10280
10280
  function C0(r) {
10281
10281
  if (typeof r == "object" && r) {
10282
10282
  if (r.constructor !== Number) throw new Error(`Expected number: ${r}`);
@@ -10303,7 +10303,7 @@ Rt(Map, (r, e, t) => {
10303
10303
  i.add(u);
10304
10304
  }
10305
10305
  }
10306
- t.sortKeys && n.sort(t.sortKeys), Af(r, r.size, me.MAP, e, t);
10306
+ t.sortKeys && n.sort(t.sortKeys), Af(r, r.size, we.MAP, e, t);
10307
10307
  for (const [i, s, o] of n) e.write(o), ii(s, e, t);
10308
10308
  });
10309
10309
  function dd(r) {
@@ -10333,12 +10333,12 @@ tl.comment = (r, e, t) => {
10333
10333
  const o = i[s] & 31;
10334
10334
  let c = Vr(i.subarray(s, ++s));
10335
10335
  o >= 24 && (c += " ", c += Vr(i.subarray(s, s + 2 ** (o - 24)))), n.minCol = Math.max(n.minCol, (t + 1) * 2 + c.length);
10336
- const u = Dm(r.contents, n);
10336
+ const u = $m(r.contents, n);
10337
10337
  let h = `Embedded CBOR
10338
10338
  `;
10339
10339
  return h += `${"".padStart((t + 1) * 2, " ")}${c}`.padEnd(n.minCol + 1, " "), h += `-- Bytes (Length: ${r.contents.length})
10340
10340
  `, h += u, h;
10341
- }, tl.noChildren = !0, Qe.registerDecoder(It.CBOR, tl), Qe.registerDecoder(It.URI, (r) => (Pn(r.contents), new URL(r.contents)), "URI"), Rt(URL, (r) => [It.URI, r.toString()]), Qe.registerDecoder(It.BASE64URL, (r) => (Pn(r.contents), pm(r.contents)), "Base64url-encoded"), Qe.registerDecoder(It.BASE64, (r) => (Pn(r.contents), xf(r.contents)), "Base64-encoded"), Qe.registerDecoder(35, (r) => (Pn(r.contents), new RegExp(r.contents)), "RegExp"), Qe.registerDecoder(21065, (r) => {
10341
+ }, tl.noChildren = !0, Qe.registerDecoder(It.CBOR, tl), Qe.registerDecoder(It.URI, (r) => (Pn(r.contents), new URL(r.contents)), "URI"), Rt(URL, (r) => [It.URI, r.toString()]), Qe.registerDecoder(It.BASE64URL, (r) => (Pn(r.contents), ym(r.contents)), "Base64url-encoded"), Qe.registerDecoder(It.BASE64, (r) => (Pn(r.contents), xf(r.contents)), "Base64-encoded"), Qe.registerDecoder(35, (r) => (Pn(r.contents), new RegExp(r.contents)), "RegExp"), Qe.registerDecoder(21065, (r) => {
10342
10342
  Pn(r.contents);
10343
10343
  let e = r.contents.replace(new RegExp("(?<!\\\\)(?<!\\[(?:[^\\]]|\\\\\\])*)\\.", "g"), `[^
10344
10344
  \r]`);
@@ -10358,7 +10358,7 @@ function nr(r, e, t) {
10358
10358
  }
10359
10359
  function On(r, e, t, n, i) {
10360
10360
  const s = i.forceEndian ?? hd;
10361
- if (Ia(s ? e : t, r, i), Gr(n.byteLength, r, me.BYTE_STRING), hd === s) r.write(new Uint8Array(n.buffer, n.byteOffset, n.byteLength));
10361
+ if (Ia(s ? e : t, r, i), Gr(n.byteLength, r, we.BYTE_STRING), hd === s) r.write(new Uint8Array(n.buffer, n.byteOffset, n.byteLength));
10362
10362
  else {
10363
10363
  const o = `write${n.constructor.name.replace(/Array/, "")}`, c = r[o].bind(r);
10364
10364
  for (const u of n) c(u, s);
@@ -10501,7 +10501,7 @@ const re = lt.arrayToEnum([
10501
10501
  "invalid_intersection_types",
10502
10502
  "not_multiple_of",
10503
10503
  "not_finite"
10504
- ]), $m = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
10504
+ ]), Mm = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
10505
10505
  class Er extends Error {
10506
10506
  constructor(e) {
10507
10507
  super(), this.issues = [], this.addIssue = (n) => {
@@ -10619,7 +10619,7 @@ const Xi = (r, e) => {
10619
10619
  return { message: t };
10620
10620
  };
10621
10621
  let O0 = Xi;
10622
- function Mm(r) {
10622
+ function Vm(r) {
10623
10623
  O0 = r;
10624
10624
  }
10625
10625
  function Ba() {
@@ -10645,7 +10645,7 @@ const Oa = (r) => {
10645
10645
  path: s,
10646
10646
  message: c
10647
10647
  };
10648
- }, Vm = [];
10648
+ }, Lm = [];
10649
10649
  function X(r, e) {
10650
10650
  const t = Ba(), n = Oa({
10651
10651
  issueData: e,
@@ -10713,10 +10713,10 @@ function T0(r, e, t, n, i) {
10713
10713
  if (typeof e == "function" ? r !== e || !i : !e.has(r)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10714
10714
  return e.set(r, t), t;
10715
10715
  }
10716
- var _e;
10716
+ var Ee;
10717
10717
  (function(r) {
10718
10718
  r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
10719
- })(_e || (_e = {}));
10719
+ })(Ee || (Ee = {}));
10720
10720
  var Cs, Bs;
10721
10721
  class ln {
10722
10722
  constructor(e, t, n, i) {
@@ -10936,14 +10936,14 @@ class Ye {
10936
10936
  return this.safeParse(null).success;
10937
10937
  }
10938
10938
  }
10939
- const Lm = /^c[^\s-]{8,}$/i, Hm = /^[0-9a-z]+$/, Fm = /^[0-9A-HJKMNP-TV-Z]{26}$/, Gm = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, zm = /^[a-z0-9_-]{21}$/i, Km = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, qm = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Zm = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
10939
+ const Hm = /^c[^\s-]{8,}$/i, Fm = /^[0-9a-z]+$/, Gm = /^[0-9A-HJKMNP-TV-Z]{26}$/, zm = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Km = /^[a-z0-9_-]{21}$/i, qm = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Zm = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Wm = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
10940
10940
  let nl;
10941
- const Wm = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ym = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Jm = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, N0 = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Xm = new RegExp(`^${N0}$`);
10941
+ const Ym = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Jm = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Xm = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, N0 = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Qm = new RegExp(`^${N0}$`);
10942
10942
  function P0(r) {
10943
10943
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
10944
10944
  return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
10945
10945
  }
10946
- function Qm(r) {
10946
+ function e1(r) {
10947
10947
  return new RegExp(`^${P0(r)}$`);
10948
10948
  }
10949
10949
  function j0(r) {
@@ -10951,8 +10951,8 @@ function j0(r) {
10951
10951
  const t = [];
10952
10952
  return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
10953
10953
  }
10954
- function e1(r, e) {
10955
- return !!((e === "v4" || !e) && Wm.test(r) || (e === "v6" || !e) && Ym.test(r));
10954
+ function t1(r, e) {
10955
+ return !!((e === "v4" || !e) && Ym.test(r) || (e === "v6" || !e) && Jm.test(r));
10956
10956
  }
10957
10957
  class Mr extends Ye {
10958
10958
  _parse(e) {
@@ -11003,43 +11003,43 @@ class Mr extends Ye {
11003
11003
  message: s.message
11004
11004
  }), n.dirty());
11005
11005
  } else if (s.kind === "email")
11006
- qm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11006
+ Zm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11007
11007
  validation: "email",
11008
11008
  code: G.invalid_string,
11009
11009
  message: s.message
11010
11010
  }), n.dirty());
11011
11011
  else if (s.kind === "emoji")
11012
- nl || (nl = new RegExp(Zm, "u")), nl.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11012
+ nl || (nl = new RegExp(Wm, "u")), nl.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11013
11013
  validation: "emoji",
11014
11014
  code: G.invalid_string,
11015
11015
  message: s.message
11016
11016
  }), n.dirty());
11017
11017
  else if (s.kind === "uuid")
11018
- Gm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11018
+ zm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11019
11019
  validation: "uuid",
11020
11020
  code: G.invalid_string,
11021
11021
  message: s.message
11022
11022
  }), n.dirty());
11023
11023
  else if (s.kind === "nanoid")
11024
- zm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11024
+ Km.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11025
11025
  validation: "nanoid",
11026
11026
  code: G.invalid_string,
11027
11027
  message: s.message
11028
11028
  }), n.dirty());
11029
11029
  else if (s.kind === "cuid")
11030
- Lm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11030
+ Hm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11031
11031
  validation: "cuid",
11032
11032
  code: G.invalid_string,
11033
11033
  message: s.message
11034
11034
  }), n.dirty());
11035
11035
  else if (s.kind === "cuid2")
11036
- Hm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11036
+ Fm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11037
11037
  validation: "cuid2",
11038
11038
  code: G.invalid_string,
11039
11039
  message: s.message
11040
11040
  }), n.dirty());
11041
11041
  else if (s.kind === "ulid")
11042
- Fm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11042
+ Gm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11043
11043
  validation: "ulid",
11044
11044
  code: G.invalid_string,
11045
11045
  message: s.message
@@ -11074,23 +11074,23 @@ class Mr extends Ye {
11074
11074
  code: G.invalid_string,
11075
11075
  validation: "datetime",
11076
11076
  message: s.message
11077
- }), n.dirty()) : s.kind === "date" ? Xm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11077
+ }), n.dirty()) : s.kind === "date" ? Qm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11078
11078
  code: G.invalid_string,
11079
11079
  validation: "date",
11080
11080
  message: s.message
11081
- }), n.dirty()) : s.kind === "time" ? Qm(s).test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11081
+ }), n.dirty()) : s.kind === "time" ? e1(s).test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11082
11082
  code: G.invalid_string,
11083
11083
  validation: "time",
11084
11084
  message: s.message
11085
- }), n.dirty()) : s.kind === "duration" ? Km.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11085
+ }), n.dirty()) : s.kind === "duration" ? qm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11086
11086
  validation: "duration",
11087
11087
  code: G.invalid_string,
11088
11088
  message: s.message
11089
- }), n.dirty()) : s.kind === "ip" ? e1(e.data, s.version) || (i = this._getOrReturnCtx(e, i), X(i, {
11089
+ }), n.dirty()) : s.kind === "ip" ? t1(e.data, s.version) || (i = this._getOrReturnCtx(e, i), X(i, {
11090
11090
  validation: "ip",
11091
11091
  code: G.invalid_string,
11092
11092
  message: s.message
11093
- }), n.dirty()) : s.kind === "base64" ? Jm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11093
+ }), n.dirty()) : s.kind === "base64" ? Xm.test(e.data) || (i = this._getOrReturnCtx(e, i), X(i, {
11094
11094
  validation: "base64",
11095
11095
  code: G.invalid_string,
11096
11096
  message: s.message
@@ -11101,7 +11101,7 @@ class Mr extends Ye {
11101
11101
  return this.refinement((i) => e.test(i), {
11102
11102
  validation: t,
11103
11103
  code: G.invalid_string,
11104
- ..._e.errToObj(n)
11104
+ ...Ee.errToObj(n)
11105
11105
  });
11106
11106
  }
11107
11107
  _addCheck(e) {
@@ -11111,34 +11111,34 @@ class Mr extends Ye {
11111
11111
  });
11112
11112
  }
11113
11113
  email(e) {
11114
- return this._addCheck({ kind: "email", ..._e.errToObj(e) });
11114
+ return this._addCheck({ kind: "email", ...Ee.errToObj(e) });
11115
11115
  }
11116
11116
  url(e) {
11117
- return this._addCheck({ kind: "url", ..._e.errToObj(e) });
11117
+ return this._addCheck({ kind: "url", ...Ee.errToObj(e) });
11118
11118
  }
11119
11119
  emoji(e) {
11120
- return this._addCheck({ kind: "emoji", ..._e.errToObj(e) });
11120
+ return this._addCheck({ kind: "emoji", ...Ee.errToObj(e) });
11121
11121
  }
11122
11122
  uuid(e) {
11123
- return this._addCheck({ kind: "uuid", ..._e.errToObj(e) });
11123
+ return this._addCheck({ kind: "uuid", ...Ee.errToObj(e) });
11124
11124
  }
11125
11125
  nanoid(e) {
11126
- return this._addCheck({ kind: "nanoid", ..._e.errToObj(e) });
11126
+ return this._addCheck({ kind: "nanoid", ...Ee.errToObj(e) });
11127
11127
  }
11128
11128
  cuid(e) {
11129
- return this._addCheck({ kind: "cuid", ..._e.errToObj(e) });
11129
+ return this._addCheck({ kind: "cuid", ...Ee.errToObj(e) });
11130
11130
  }
11131
11131
  cuid2(e) {
11132
- return this._addCheck({ kind: "cuid2", ..._e.errToObj(e) });
11132
+ return this._addCheck({ kind: "cuid2", ...Ee.errToObj(e) });
11133
11133
  }
11134
11134
  ulid(e) {
11135
- return this._addCheck({ kind: "ulid", ..._e.errToObj(e) });
11135
+ return this._addCheck({ kind: "ulid", ...Ee.errToObj(e) });
11136
11136
  }
11137
11137
  base64(e) {
11138
- return this._addCheck({ kind: "base64", ..._e.errToObj(e) });
11138
+ return this._addCheck({ kind: "base64", ...Ee.errToObj(e) });
11139
11139
  }
11140
11140
  ip(e) {
11141
- return this._addCheck({ kind: "ip", ..._e.errToObj(e) });
11141
+ return this._addCheck({ kind: "ip", ...Ee.errToObj(e) });
11142
11142
  }
11143
11143
  datetime(e) {
11144
11144
  var t, n;
@@ -11153,7 +11153,7 @@ class Mr extends Ye {
11153
11153
  precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
11154
11154
  offset: (t = e == null ? void 0 : e.offset) !== null && t !== void 0 ? t : !1,
11155
11155
  local: (n = e == null ? void 0 : e.local) !== null && n !== void 0 ? n : !1,
11156
- ..._e.errToObj(e == null ? void 0 : e.message)
11156
+ ...Ee.errToObj(e == null ? void 0 : e.message)
11157
11157
  });
11158
11158
  }
11159
11159
  date(e) {
@@ -11167,17 +11167,17 @@ class Mr extends Ye {
11167
11167
  }) : this._addCheck({
11168
11168
  kind: "time",
11169
11169
  precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
11170
- ..._e.errToObj(e == null ? void 0 : e.message)
11170
+ ...Ee.errToObj(e == null ? void 0 : e.message)
11171
11171
  });
11172
11172
  }
11173
11173
  duration(e) {
11174
- return this._addCheck({ kind: "duration", ..._e.errToObj(e) });
11174
+ return this._addCheck({ kind: "duration", ...Ee.errToObj(e) });
11175
11175
  }
11176
11176
  regex(e, t) {
11177
11177
  return this._addCheck({
11178
11178
  kind: "regex",
11179
11179
  regex: e,
11180
- ..._e.errToObj(t)
11180
+ ...Ee.errToObj(t)
11181
11181
  });
11182
11182
  }
11183
11183
  includes(e, t) {
@@ -11185,42 +11185,42 @@ class Mr extends Ye {
11185
11185
  kind: "includes",
11186
11186
  value: e,
11187
11187
  position: t == null ? void 0 : t.position,
11188
- ..._e.errToObj(t == null ? void 0 : t.message)
11188
+ ...Ee.errToObj(t == null ? void 0 : t.message)
11189
11189
  });
11190
11190
  }
11191
11191
  startsWith(e, t) {
11192
11192
  return this._addCheck({
11193
11193
  kind: "startsWith",
11194
11194
  value: e,
11195
- ..._e.errToObj(t)
11195
+ ...Ee.errToObj(t)
11196
11196
  });
11197
11197
  }
11198
11198
  endsWith(e, t) {
11199
11199
  return this._addCheck({
11200
11200
  kind: "endsWith",
11201
11201
  value: e,
11202
- ..._e.errToObj(t)
11202
+ ...Ee.errToObj(t)
11203
11203
  });
11204
11204
  }
11205
11205
  min(e, t) {
11206
11206
  return this._addCheck({
11207
11207
  kind: "min",
11208
11208
  value: e,
11209
- ..._e.errToObj(t)
11209
+ ...Ee.errToObj(t)
11210
11210
  });
11211
11211
  }
11212
11212
  max(e, t) {
11213
11213
  return this._addCheck({
11214
11214
  kind: "max",
11215
11215
  value: e,
11216
- ..._e.errToObj(t)
11216
+ ...Ee.errToObj(t)
11217
11217
  });
11218
11218
  }
11219
11219
  length(e, t) {
11220
11220
  return this._addCheck({
11221
11221
  kind: "length",
11222
11222
  value: e,
11223
- ..._e.errToObj(t)
11223
+ ...Ee.errToObj(t)
11224
11224
  });
11225
11225
  }
11226
11226
  /**
@@ -11228,7 +11228,7 @@ class Mr extends Ye {
11228
11228
  * @see {@link ZodString.min}
11229
11229
  */
11230
11230
  nonempty(e) {
11231
- return this.min(1, _e.errToObj(e));
11231
+ return this.min(1, Ee.errToObj(e));
11232
11232
  }
11233
11233
  trim() {
11234
11234
  return new Mr({
@@ -11312,7 +11312,7 @@ Mr.create = (r) => {
11312
11312
  ...qe(r)
11313
11313
  });
11314
11314
  };
11315
- function t1(r, e) {
11315
+ function r1(r, e) {
11316
11316
  const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, i = t > n ? t : n, s = parseInt(r.toFixed(i).replace(".", "")), o = parseInt(e.toFixed(i).replace(".", ""));
11317
11317
  return s % o / Math.pow(10, i);
11318
11318
  }
@@ -11351,7 +11351,7 @@ class Kn extends Ye {
11351
11351
  inclusive: s.inclusive,
11352
11352
  exact: !1,
11353
11353
  message: s.message
11354
- }), i.dirty()) : s.kind === "multipleOf" ? t1(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), X(n, {
11354
+ }), i.dirty()) : s.kind === "multipleOf" ? r1(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), X(n, {
11355
11355
  code: G.not_multiple_of,
11356
11356
  multipleOf: s.value,
11357
11357
  message: s.message
@@ -11362,16 +11362,16 @@ class Kn extends Ye {
11362
11362
  return { status: i.value, value: e.data };
11363
11363
  }
11364
11364
  gte(e, t) {
11365
- return this.setLimit("min", e, !0, _e.toString(t));
11365
+ return this.setLimit("min", e, !0, Ee.toString(t));
11366
11366
  }
11367
11367
  gt(e, t) {
11368
- return this.setLimit("min", e, !1, _e.toString(t));
11368
+ return this.setLimit("min", e, !1, Ee.toString(t));
11369
11369
  }
11370
11370
  lte(e, t) {
11371
- return this.setLimit("max", e, !0, _e.toString(t));
11371
+ return this.setLimit("max", e, !0, Ee.toString(t));
11372
11372
  }
11373
11373
  lt(e, t) {
11374
- return this.setLimit("max", e, !1, _e.toString(t));
11374
+ return this.setLimit("max", e, !1, Ee.toString(t));
11375
11375
  }
11376
11376
  setLimit(e, t, n, i) {
11377
11377
  return new Kn({
@@ -11382,7 +11382,7 @@ class Kn extends Ye {
11382
11382
  kind: e,
11383
11383
  value: t,
11384
11384
  inclusive: n,
11385
- message: _e.toString(i)
11385
+ message: Ee.toString(i)
11386
11386
  }
11387
11387
  ]
11388
11388
  });
@@ -11396,7 +11396,7 @@ class Kn extends Ye {
11396
11396
  int(e) {
11397
11397
  return this._addCheck({
11398
11398
  kind: "int",
11399
- message: _e.toString(e)
11399
+ message: Ee.toString(e)
11400
11400
  });
11401
11401
  }
11402
11402
  positive(e) {
@@ -11404,7 +11404,7 @@ class Kn extends Ye {
11404
11404
  kind: "min",
11405
11405
  value: 0,
11406
11406
  inclusive: !1,
11407
- message: _e.toString(e)
11407
+ message: Ee.toString(e)
11408
11408
  });
11409
11409
  }
11410
11410
  negative(e) {
@@ -11412,7 +11412,7 @@ class Kn extends Ye {
11412
11412
  kind: "max",
11413
11413
  value: 0,
11414
11414
  inclusive: !1,
11415
- message: _e.toString(e)
11415
+ message: Ee.toString(e)
11416
11416
  });
11417
11417
  }
11418
11418
  nonpositive(e) {
@@ -11420,7 +11420,7 @@ class Kn extends Ye {
11420
11420
  kind: "max",
11421
11421
  value: 0,
11422
11422
  inclusive: !0,
11423
- message: _e.toString(e)
11423
+ message: Ee.toString(e)
11424
11424
  });
11425
11425
  }
11426
11426
  nonnegative(e) {
@@ -11428,20 +11428,20 @@ class Kn extends Ye {
11428
11428
  kind: "min",
11429
11429
  value: 0,
11430
11430
  inclusive: !0,
11431
- message: _e.toString(e)
11431
+ message: Ee.toString(e)
11432
11432
  });
11433
11433
  }
11434
11434
  multipleOf(e, t) {
11435
11435
  return this._addCheck({
11436
11436
  kind: "multipleOf",
11437
11437
  value: e,
11438
- message: _e.toString(t)
11438
+ message: Ee.toString(t)
11439
11439
  });
11440
11440
  }
11441
11441
  finite(e) {
11442
11442
  return this._addCheck({
11443
11443
  kind: "finite",
11444
- message: _e.toString(e)
11444
+ message: Ee.toString(e)
11445
11445
  });
11446
11446
  }
11447
11447
  safe(e) {
@@ -11449,12 +11449,12 @@ class Kn extends Ye {
11449
11449
  kind: "min",
11450
11450
  inclusive: !0,
11451
11451
  value: Number.MIN_SAFE_INTEGER,
11452
- message: _e.toString(e)
11452
+ message: Ee.toString(e)
11453
11453
  })._addCheck({
11454
11454
  kind: "max",
11455
11455
  inclusive: !0,
11456
11456
  value: Number.MAX_SAFE_INTEGER,
11457
- message: _e.toString(e)
11457
+ message: Ee.toString(e)
11458
11458
  });
11459
11459
  }
11460
11460
  get minValue() {
@@ -11524,16 +11524,16 @@ class qn extends Ye {
11524
11524
  return { status: i.value, value: e.data };
11525
11525
  }
11526
11526
  gte(e, t) {
11527
- return this.setLimit("min", e, !0, _e.toString(t));
11527
+ return this.setLimit("min", e, !0, Ee.toString(t));
11528
11528
  }
11529
11529
  gt(e, t) {
11530
- return this.setLimit("min", e, !1, _e.toString(t));
11530
+ return this.setLimit("min", e, !1, Ee.toString(t));
11531
11531
  }
11532
11532
  lte(e, t) {
11533
- return this.setLimit("max", e, !0, _e.toString(t));
11533
+ return this.setLimit("max", e, !0, Ee.toString(t));
11534
11534
  }
11535
11535
  lt(e, t) {
11536
- return this.setLimit("max", e, !1, _e.toString(t));
11536
+ return this.setLimit("max", e, !1, Ee.toString(t));
11537
11537
  }
11538
11538
  setLimit(e, t, n, i) {
11539
11539
  return new qn({
@@ -11544,7 +11544,7 @@ class qn extends Ye {
11544
11544
  kind: e,
11545
11545
  value: t,
11546
11546
  inclusive: n,
11547
- message: _e.toString(i)
11547
+ message: Ee.toString(i)
11548
11548
  }
11549
11549
  ]
11550
11550
  });
@@ -11560,7 +11560,7 @@ class qn extends Ye {
11560
11560
  kind: "min",
11561
11561
  value: BigInt(0),
11562
11562
  inclusive: !1,
11563
- message: _e.toString(e)
11563
+ message: Ee.toString(e)
11564
11564
  });
11565
11565
  }
11566
11566
  negative(e) {
@@ -11568,7 +11568,7 @@ class qn extends Ye {
11568
11568
  kind: "max",
11569
11569
  value: BigInt(0),
11570
11570
  inclusive: !1,
11571
- message: _e.toString(e)
11571
+ message: Ee.toString(e)
11572
11572
  });
11573
11573
  }
11574
11574
  nonpositive(e) {
@@ -11576,7 +11576,7 @@ class qn extends Ye {
11576
11576
  kind: "max",
11577
11577
  value: BigInt(0),
11578
11578
  inclusive: !0,
11579
- message: _e.toString(e)
11579
+ message: Ee.toString(e)
11580
11580
  });
11581
11581
  }
11582
11582
  nonnegative(e) {
@@ -11584,14 +11584,14 @@ class qn extends Ye {
11584
11584
  kind: "min",
11585
11585
  value: BigInt(0),
11586
11586
  inclusive: !0,
11587
- message: _e.toString(e)
11587
+ message: Ee.toString(e)
11588
11588
  });
11589
11589
  }
11590
11590
  multipleOf(e, t) {
11591
11591
  return this._addCheck({
11592
11592
  kind: "multipleOf",
11593
11593
  value: e,
11594
- message: _e.toString(t)
11594
+ message: Ee.toString(t)
11595
11595
  });
11596
11596
  }
11597
11597
  get minValue() {
@@ -11683,14 +11683,14 @@ class xi extends Ye {
11683
11683
  return this._addCheck({
11684
11684
  kind: "min",
11685
11685
  value: e.getTime(),
11686
- message: _e.toString(t)
11686
+ message: Ee.toString(t)
11687
11687
  });
11688
11688
  }
11689
11689
  max(e, t) {
11690
11690
  return this._addCheck({
11691
11691
  kind: "max",
11692
11692
  value: e.getTime(),
11693
- message: _e.toString(t)
11693
+ message: Ee.toString(t)
11694
11694
  });
11695
11695
  }
11696
11696
  get minDate() {
@@ -11864,19 +11864,19 @@ class Lr extends Ye {
11864
11864
  min(e, t) {
11865
11865
  return new Lr({
11866
11866
  ...this._def,
11867
- minLength: { value: e, message: _e.toString(t) }
11867
+ minLength: { value: e, message: Ee.toString(t) }
11868
11868
  });
11869
11869
  }
11870
11870
  max(e, t) {
11871
11871
  return new Lr({
11872
11872
  ...this._def,
11873
- maxLength: { value: e, message: _e.toString(t) }
11873
+ maxLength: { value: e, message: Ee.toString(t) }
11874
11874
  });
11875
11875
  }
11876
11876
  length(e, t) {
11877
11877
  return new Lr({
11878
11878
  ...this._def,
11879
- exactLength: { value: e, message: _e.toString(t) }
11879
+ exactLength: { value: e, message: Ee.toString(t) }
11880
11880
  });
11881
11881
  }
11882
11882
  nonempty(e) {
@@ -11984,7 +11984,7 @@ class Ot extends Ye {
11984
11984
  return this._def.shape();
11985
11985
  }
11986
11986
  strict(e) {
11987
- return _e.errToObj, new Ot({
11987
+ return Ee.errToObj, new Ot({
11988
11988
  ...this._def,
11989
11989
  unknownKeys: "strict",
11990
11990
  ...e !== void 0 ? {
@@ -11992,7 +11992,7 @@ class Ot extends Ye {
11992
11992
  var i, s, o, c;
11993
11993
  const u = (o = (s = (i = this._def).errorMap) === null || s === void 0 ? void 0 : s.call(i, t, n).message) !== null && o !== void 0 ? o : n.defaultError;
11994
11994
  return t.code === "unrecognized_keys" ? {
11995
- message: (c = _e.errToObj(e).message) !== null && c !== void 0 ? c : u
11995
+ message: (c = Ee.errToObj(e).message) !== null && c !== void 0 ? c : u
11996
11996
  } : {
11997
11997
  message: u
11998
11998
  };
@@ -12574,13 +12574,13 @@ class Ai extends Ye {
12574
12574
  min(e, t) {
12575
12575
  return new Ai({
12576
12576
  ...this._def,
12577
- minSize: { value: e, message: _e.toString(t) }
12577
+ minSize: { value: e, message: Ee.toString(t) }
12578
12578
  });
12579
12579
  }
12580
12580
  max(e, t) {
12581
12581
  return new Ai({
12582
12582
  ...this._def,
12583
- maxSize: { value: e, message: _e.toString(t) }
12583
+ maxSize: { value: e, message: Ee.toString(t) }
12584
12584
  });
12585
12585
  }
12586
12586
  size(e, t) {
@@ -13052,7 +13052,7 @@ Ra.create = (r) => new Ra({
13052
13052
  typeName: Ce.ZodNaN,
13053
13053
  ...qe(r)
13054
13054
  });
13055
- const r1 = Symbol("zod_brand");
13055
+ const n1 = Symbol("zod_brand");
13056
13056
  class Sf extends Ye {
13057
13057
  _parse(e) {
13058
13058
  const { ctx: t } = this._processInputParams(e), n = t.data;
@@ -13129,16 +13129,16 @@ function U0(r, e = {}, t) {
13129
13129
  }
13130
13130
  }) : Qi.create();
13131
13131
  }
13132
- const n1 = {
13132
+ const i1 = {
13133
13133
  object: Ot.lazycreate
13134
13134
  };
13135
13135
  var Ce;
13136
13136
  (function(r) {
13137
13137
  r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
13138
13138
  })(Ce || (Ce = {}));
13139
- const i1 = (r, e = {
13139
+ const s1 = (r, e = {
13140
13140
  message: `Input not instance of ${r.name}`
13141
- }) => U0((t) => t instanceof r, e), D0 = Mr.create, $0 = Kn.create, s1 = Ra.create, o1 = qn.create, M0 = Qs.create, a1 = xi.create, c1 = Na.create, l1 = eo.create, u1 = to.create, f1 = Qi.create, h1 = ai.create, d1 = En.create, p1 = Pa.create, y1 = Lr.create, g1 = Ot.create, v1 = Ot.strictCreate, m1 = ro.create, w1 = Uc.create, b1 = no.create, x1 = un.create, A1 = io.create, S1 = ja.create, _1 = Ai.create, E1 = $i.create, I1 = so.create, k1 = oo.create, C1 = Zn.create, B1 = ao.create, O1 = es.create, md = zr.create, T1 = on.create, N1 = Wn.create, P1 = zr.createWithPreprocess, j1 = ko.create, R1 = () => D0().optional(), U1 = () => $0().optional(), D1 = () => M0().optional(), $1 = {
13141
+ }) => U0((t) => t instanceof r, e), D0 = Mr.create, $0 = Kn.create, o1 = Ra.create, a1 = qn.create, M0 = Qs.create, c1 = xi.create, l1 = Na.create, u1 = eo.create, f1 = to.create, h1 = Qi.create, d1 = ai.create, p1 = En.create, y1 = Pa.create, g1 = Lr.create, v1 = Ot.create, m1 = Ot.strictCreate, w1 = ro.create, b1 = Uc.create, x1 = no.create, A1 = un.create, S1 = io.create, _1 = ja.create, E1 = Ai.create, I1 = $i.create, k1 = so.create, C1 = oo.create, B1 = Zn.create, O1 = ao.create, T1 = es.create, md = zr.create, N1 = on.create, P1 = Wn.create, j1 = zr.createWithPreprocess, R1 = ko.create, U1 = () => D0().optional(), D1 = () => $0().optional(), $1 = () => M0().optional(), M1 = {
13142
13142
  string: (r) => Mr.create({ ...r, coerce: !0 }),
13143
13143
  number: (r) => Kn.create({ ...r, coerce: !0 }),
13144
13144
  boolean: (r) => Qs.create({
@@ -13147,14 +13147,14 @@ const i1 = (r, e = {
13147
13147
  }),
13148
13148
  bigint: (r) => qn.create({ ...r, coerce: !0 }),
13149
13149
  date: (r) => xi.create({ ...r, coerce: !0 })
13150
- }, M1 = Be;
13150
+ }, V1 = Be;
13151
13151
  var Bt = /* @__PURE__ */ Object.freeze({
13152
13152
  __proto__: null,
13153
13153
  defaultErrorMap: Xi,
13154
- setErrorMap: Mm,
13154
+ setErrorMap: Vm,
13155
13155
  getErrorMap: Ba,
13156
13156
  makeIssue: Oa,
13157
- EMPTY_PATH: Vm,
13157
+ EMPTY_PATH: Lm,
13158
13158
  addIssueToContext: X,
13159
13159
  ParseStatus: sr,
13160
13160
  INVALID: Be,
@@ -13208,66 +13208,66 @@ var Bt = /* @__PURE__ */ Object.freeze({
13208
13208
  ZodDefault: co,
13209
13209
  ZodCatch: lo,
13210
13210
  ZodNaN: Ra,
13211
- BRAND: r1,
13211
+ BRAND: n1,
13212
13212
  ZodBranded: Sf,
13213
13213
  ZodPipeline: ko,
13214
13214
  ZodReadonly: uo,
13215
13215
  custom: U0,
13216
13216
  Schema: Ye,
13217
13217
  ZodSchema: Ye,
13218
- late: n1,
13218
+ late: i1,
13219
13219
  get ZodFirstPartyTypeKind() {
13220
13220
  return Ce;
13221
13221
  },
13222
- coerce: $1,
13223
- any: f1,
13224
- array: y1,
13225
- bigint: o1,
13222
+ coerce: M1,
13223
+ any: h1,
13224
+ array: g1,
13225
+ bigint: a1,
13226
13226
  boolean: M0,
13227
- date: a1,
13228
- discriminatedUnion: w1,
13227
+ date: c1,
13228
+ discriminatedUnion: b1,
13229
13229
  effect: md,
13230
- enum: C1,
13231
- function: E1,
13232
- instanceof: i1,
13233
- intersection: b1,
13234
- lazy: I1,
13235
- literal: k1,
13236
- map: S1,
13237
- nan: s1,
13238
- nativeEnum: B1,
13239
- never: d1,
13240
- null: u1,
13241
- nullable: N1,
13230
+ enum: B1,
13231
+ function: I1,
13232
+ instanceof: s1,
13233
+ intersection: x1,
13234
+ lazy: k1,
13235
+ literal: C1,
13236
+ map: _1,
13237
+ nan: o1,
13238
+ nativeEnum: O1,
13239
+ never: p1,
13240
+ null: f1,
13241
+ nullable: P1,
13242
13242
  number: $0,
13243
- object: g1,
13244
- oboolean: D1,
13245
- onumber: U1,
13246
- optional: T1,
13247
- ostring: R1,
13248
- pipeline: j1,
13249
- preprocess: P1,
13250
- promise: O1,
13251
- record: A1,
13252
- set: _1,
13253
- strictObject: v1,
13243
+ object: v1,
13244
+ oboolean: $1,
13245
+ onumber: D1,
13246
+ optional: N1,
13247
+ ostring: U1,
13248
+ pipeline: R1,
13249
+ preprocess: j1,
13250
+ promise: T1,
13251
+ record: S1,
13252
+ set: E1,
13253
+ strictObject: m1,
13254
13254
  string: D0,
13255
- symbol: c1,
13255
+ symbol: l1,
13256
13256
  transformer: md,
13257
- tuple: x1,
13258
- undefined: l1,
13259
- union: m1,
13260
- unknown: h1,
13261
- void: p1,
13262
- NEVER: M1,
13257
+ tuple: A1,
13258
+ undefined: u1,
13259
+ union: w1,
13260
+ unknown: d1,
13261
+ void: y1,
13262
+ NEVER: V1,
13263
13263
  ZodIssueCode: G,
13264
- quotelessJson: $m,
13264
+ quotelessJson: Mm,
13265
13265
  ZodError: Er
13266
13266
  });
13267
13267
  const Ua = new Uint8Array([48, 130, 2, 17, 48, 130, 1, 150, 160, 3, 2, 1, 2, 2, 17, 0, 249, 49, 117, 104, 27, 144, 175, 225, 29, 70, 204, 180, 228, 231, 248, 86, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 3, 48, 73, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 12, 6, 65, 109, 97, 122, 111, 110, 49, 12, 48, 10, 6, 3, 85, 4, 11, 12, 3, 65, 87, 83, 49, 27, 48, 25, 6, 3, 85, 4, 3, 12, 18, 97, 119, 115, 46, 110, 105, 116, 114, 111, 45, 101, 110, 99, 108, 97, 118, 101, 115, 48, 30, 23, 13, 49, 57, 49, 48, 50, 56, 49, 51, 50, 56, 48, 53, 90, 23, 13, 52, 57, 49, 48, 50, 56, 49, 52, 50, 56, 48, 53, 90, 48, 73, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 12, 6, 65, 109, 97, 122, 111, 110, 49, 12, 48, 10, 6, 3, 85, 4, 11, 12, 3, 65, 87, 83, 49, 27, 48, 25, 6, 3, 85, 4, 3, 12, 18, 97, 119, 115, 46, 110, 105, 116, 114, 111, 45, 101, 110, 99, 108, 97, 118, 101, 115, 48, 118, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 3, 98, 0, 4, 252, 2, 84, 235, 166, 8, 193, 243, 104, 112, 226, 154, 218, 144, 190, 70, 56, 50, 146, 115, 110, 137, 75, 255, 246, 114, 217, 137, 68, 75, 80, 81, 229, 52, 164, 177, 246, 219, 227, 192, 188, 88, 26, 50, 183, 177, 118, 7, 14, 222, 18, 214, 154, 63, 234, 33, 27, 102, 231, 82, 207, 125, 209, 221, 9, 95, 111, 19, 112, 244, 23, 8, 67, 217, 220, 16, 1, 33, 228, 207, 99, 1, 40, 9, 102, 68, 135, 201, 121, 98, 132, 48, 77, 197, 63, 244, 163, 66, 48, 64, 48, 15, 6, 3, 85, 29, 19, 1, 1, 255, 4, 5, 48, 3, 1, 1, 255, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 144, 37, 181, 13, 217, 5, 71, 231, 150, 195, 150, 250, 114, 157, 207, 153, 169, 223, 75, 150, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 1, 134, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 3, 3, 105, 0, 48, 102, 2, 49, 0, 163, 127, 47, 145, 161, 201, 189, 94, 231, 184, 98, 124, 22, 152, 210, 85, 3, 142, 31, 3, 67, 249, 91, 99, 169, 98, 140, 61, 57, 128, 149, 69, 161, 30, 188, 191, 46, 59, 85, 216, 174, 238, 113, 180, 195, 214, 173, 243, 2, 49, 0, 162, 243, 155, 22, 5, 178, 112, 40, 165, 221, 75, 160, 105, 181, 1, 110, 101, 180, 251, 222, 143, 224, 6, 29, 106, 83, 25, 127, 156, 218, 245, 217, 67, 188, 97, 252, 43, 235, 3, 203, 111, 238, 141, 35, 2, 243, 223, 246]);
13268
13268
  if (!Ua || Ua.length === 0)
13269
13269
  throw new Error("AWS root certificate is empty or not loaded correctly");
13270
- const V1 = Bt.object({
13270
+ const L1 = Bt.object({
13271
13271
  module_id: Bt.string().min(1),
13272
13272
  digest: Bt.literal("SHA384"),
13273
13273
  timestamp: Bt.number().min(1677721600),
@@ -13277,18 +13277,18 @@ const V1 = Bt.object({
13277
13277
  public_key: Bt.nullable(Bt.instanceof(Uint8Array)),
13278
13278
  user_data: Bt.nullable(Bt.instanceof(Uint8Array)),
13279
13279
  nonce: Bt.nullable(Bt.instanceof(Uint8Array))
13280
- }), L1 = Bt.object({
13280
+ }), H1 = Bt.object({
13281
13281
  protected: Bt.instanceof(Uint8Array),
13282
13282
  // There's an "unprotected" header in the CBOR, but we never use it
13283
13283
  payload: Bt.instanceof(Uint8Array),
13284
13284
  signature: Bt.instanceof(Uint8Array)
13285
13285
  });
13286
- async function H1(r) {
13286
+ async function F1(r) {
13287
13287
  try {
13288
13288
  if (!r)
13289
13289
  throw new Error("Attestation document is empty.");
13290
13290
  const e = Rs(r), t = Ca(e), n = t[0], i = t[2], s = t[3];
13291
- return L1.parse({
13291
+ return H1.parse({
13292
13292
  protected: n,
13293
13293
  payload: i,
13294
13294
  signature: s
@@ -13297,15 +13297,15 @@ async function H1(r) {
13297
13297
  throw console.error("Error parsing document data:", e), new Error("Failed to parse document data.");
13298
13298
  }
13299
13299
  }
13300
- async function F1(r) {
13300
+ async function G1(r) {
13301
13301
  try {
13302
13302
  const e = Ca(r);
13303
- return V1.parse(e);
13303
+ return L1.parse(e);
13304
13304
  } catch (e) {
13305
13305
  throw console.error("Error parsing document payload:", e), new Error("Failed to parse document payload.");
13306
13306
  }
13307
13307
  }
13308
- function G1(r, e) {
13308
+ function z1(r, e) {
13309
13309
  const t = [
13310
13310
  "Signature1",
13311
13311
  // Context string
@@ -13318,10 +13318,10 @@ function G1(r, e) {
13318
13318
  ];
13319
13319
  return Rc(t);
13320
13320
  }
13321
- async function z1(r, e) {
13321
+ async function K1(r, e) {
13322
13322
  try {
13323
13323
  console.log("SIGNATURE:"), console.log(_r(r.signature));
13324
- const t = G1(r.protected, r.payload), n = await crypto.subtle.digest("SHA-384", t);
13324
+ const t = z1(r.protected, r.payload), n = await crypto.subtle.digest("SHA-384", t);
13325
13325
  return console.log("SIGNATURE STRUCTURE DIGEST:"), console.log(_r(new Uint8Array(n))), await crypto.subtle.verify(
13326
13326
  // TODO: these could be derived from the document, but we're hardcoding them for now
13327
13327
  {
@@ -13338,7 +13338,7 @@ async function z1(r, e) {
13338
13338
  }
13339
13339
  async function Si(r, e, t) {
13340
13340
  try {
13341
- const n = await H1(r), i = await F1(n.payload);
13341
+ const n = await F1(r), i = await G1(n.payload);
13342
13342
  if (!i.nonce)
13343
13343
  throw new Error("Attestation document does not have a nonce.");
13344
13344
  const o = new TextDecoder("utf-8").decode(i.nonce);
@@ -13351,7 +13351,7 @@ async function Si(r, e, t) {
13351
13351
  const P = new wi(i.cabundle[I]);
13352
13352
  c.push(P);
13353
13353
  }
13354
- const h = new wi(i.certificate), b = await new um({
13354
+ const h = new wi(i.certificate), b = await new fm({
13355
13355
  certificates: c
13356
13356
  }).build(h);
13357
13357
  console.log("Chain items:", b);
@@ -13366,7 +13366,7 @@ async function Si(r, e, t) {
13366
13366
  throw new Error("Certificate chain length does not match length of cabundle.");
13367
13367
  const m = h.publicKey;
13368
13368
  console.log("PUBLIC KEY:"), console.log(_r(new Uint8Array(m.rawData)));
13369
- const A = await m.export(), k = await z1(n, A);
13369
+ const A = await m.export(), k = await K1(n, A);
13370
13370
  if (console.log("Signature verified:", k), !k)
13371
13371
  throw new Error("Signature verification failed.");
13372
13372
  return i;
@@ -13374,29 +13374,29 @@ async function Si(r, e, t) {
13374
13374
  throw console.error("Error verifying attestation document:", n), n;
13375
13375
  }
13376
13376
  }
13377
- const K1 = Bt.object({
13377
+ const q1 = Bt.object({
13378
13378
  public_key: Bt.nullable(Bt.instanceof(Uint8Array))
13379
13379
  });
13380
- async function q1(r) {
13380
+ async function Z1(r) {
13381
13381
  const e = Rs(r), n = Ca(e)[2], i = Ca(n);
13382
- return await K1.parse(i);
13382
+ return await q1.parse(i);
13383
13383
  }
13384
- async function Z1(r, e) {
13384
+ async function W1(r, e) {
13385
13385
  try {
13386
- const t = await vw(r, e), n = e || uw();
13387
- return n && (n === "http://127.0.0.1:3000" || n === "http://localhost:3000" || n === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await q1(t)) : await Si(t, Ua, r);
13386
+ const t = await mw(r, e), n = e || fw();
13387
+ return n && (n === "http://127.0.0.1:3000" || n === "http://localhost:3000" || n === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await Z1(t)) : await Si(t, Ua, r);
13388
13388
  } catch (t) {
13389
13389
  throw t instanceof Error ? (console.error("Error verifying attestation document:", t), new Error(`Couldn't process attestation document: ${t.message}`)) : (console.error("Error verifying attestation document:", t), new Error("Couldn't process attestation document."));
13390
13390
  }
13391
13391
  }
13392
- function W1(r) {
13392
+ function Y1(r) {
13393
13393
  throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
13394
13394
  }
13395
13395
  var V0 = { exports: {} };
13396
- const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13396
+ const J1 = {}, X1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13397
13397
  __proto__: null,
13398
- default: Y1
13399
- }, Symbol.toStringTag, { value: "Module" })), X1 = /* @__PURE__ */ yg(J1);
13398
+ default: J1
13399
+ }, Symbol.toStringTag, { value: "Module" })), Q1 = /* @__PURE__ */ gg(X1);
13400
13400
  (function(r) {
13401
13401
  (function(e) {
13402
13402
  var t = function(l) {
@@ -13423,16 +13423,16 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13423
13423
  return A(l, p, d, a, 32);
13424
13424
  }
13425
13425
  function P(l, p, d, a) {
13426
- for (var g = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, S = d[0] & 255 | (d[1] & 255) << 8 | (d[2] & 255) << 16 | (d[3] & 255) << 24, E = d[4] & 255 | (d[5] & 255) << 8 | (d[6] & 255) << 16 | (d[7] & 255) << 24, R = d[8] & 255 | (d[9] & 255) << 8 | (d[10] & 255) << 16 | (d[11] & 255) << 24, z = d[12] & 255 | (d[13] & 255) << 8 | (d[14] & 255) << 16 | (d[15] & 255) << 24, be = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, J = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24, ft = p[4] & 255 | (p[5] & 255) << 8 | (p[6] & 255) << 16 | (p[7] & 255) << 24, oe = p[8] & 255 | (p[9] & 255) << 8 | (p[10] & 255) << 16 | (p[11] & 255) << 24, Oe = p[12] & 255 | (p[13] & 255) << 8 | (p[14] & 255) << 16 | (p[15] & 255) << 24, Ne = a[8] & 255 | (a[9] & 255) << 8 | (a[10] & 255) << 16 | (a[11] & 255) << 24, Fe = d[16] & 255 | (d[17] & 255) << 8 | (d[18] & 255) << 16 | (d[19] & 255) << 24, Me = d[20] & 255 | (d[21] & 255) << 8 | (d[22] & 255) << 16 | (d[23] & 255) << 24, Pe = d[24] & 255 | (d[25] & 255) << 8 | (d[26] & 255) << 16 | (d[27] & 255) << 24, Ue = d[28] & 255 | (d[29] & 255) << 8 | (d[30] & 255) << 16 | (d[31] & 255) << 24, je = a[12] & 255 | (a[13] & 255) << 8 | (a[14] & 255) << 16 | (a[15] & 255) << 24, he = g, Se = S, te = E, de = R, ve = z, Y = be, B = J, O = ft, V = oe, j = Oe, U = Ne, L = Fe, Ie = Me, Ge = Pe, Ze = Ue, ze = je, w, Xe = 0; Xe < 20; Xe += 2)
13427
- w = he + Ie | 0, ve ^= w << 7 | w >>> 25, w = ve + he | 0, V ^= w << 9 | w >>> 23, w = V + ve | 0, Ie ^= w << 13 | w >>> 19, w = Ie + V | 0, he ^= w << 18 | w >>> 14, w = Y + Se | 0, j ^= w << 7 | w >>> 25, w = j + Y | 0, Ge ^= w << 9 | w >>> 23, w = Ge + j | 0, Se ^= w << 13 | w >>> 19, w = Se + Ge | 0, Y ^= w << 18 | w >>> 14, w = U + B | 0, Ze ^= w << 7 | w >>> 25, w = Ze + U | 0, te ^= w << 9 | w >>> 23, w = te + Ze | 0, B ^= w << 13 | w >>> 19, w = B + te | 0, U ^= w << 18 | w >>> 14, w = ze + L | 0, de ^= w << 7 | w >>> 25, w = de + ze | 0, O ^= w << 9 | w >>> 23, w = O + de | 0, L ^= w << 13 | w >>> 19, w = L + O | 0, ze ^= w << 18 | w >>> 14, w = he + de | 0, Se ^= w << 7 | w >>> 25, w = Se + he | 0, te ^= w << 9 | w >>> 23, w = te + Se | 0, de ^= w << 13 | w >>> 19, w = de + te | 0, he ^= w << 18 | w >>> 14, w = Y + ve | 0, B ^= w << 7 | w >>> 25, w = B + Y | 0, O ^= w << 9 | w >>> 23, w = O + B | 0, ve ^= w << 13 | w >>> 19, w = ve + O | 0, Y ^= w << 18 | w >>> 14, w = U + j | 0, L ^= w << 7 | w >>> 25, w = L + U | 0, V ^= w << 9 | w >>> 23, w = V + L | 0, j ^= w << 13 | w >>> 19, w = j + V | 0, U ^= w << 18 | w >>> 14, w = ze + Ze | 0, Ie ^= w << 7 | w >>> 25, w = Ie + ze | 0, Ge ^= w << 9 | w >>> 23, w = Ge + Ie | 0, Ze ^= w << 13 | w >>> 19, w = Ze + Ge | 0, ze ^= w << 18 | w >>> 14;
13428
- he = he + g | 0, Se = Se + S | 0, te = te + E | 0, de = de + R | 0, ve = ve + z | 0, Y = Y + be | 0, B = B + J | 0, O = O + ft | 0, V = V + oe | 0, j = j + Oe | 0, U = U + Ne | 0, L = L + Fe | 0, Ie = Ie + Me | 0, Ge = Ge + Pe | 0, Ze = Ze + Ue | 0, ze = ze + je | 0, l[0] = he >>> 0 & 255, l[1] = he >>> 8 & 255, l[2] = he >>> 16 & 255, l[3] = he >>> 24 & 255, l[4] = Se >>> 0 & 255, l[5] = Se >>> 8 & 255, l[6] = Se >>> 16 & 255, l[7] = Se >>> 24 & 255, l[8] = te >>> 0 & 255, l[9] = te >>> 8 & 255, l[10] = te >>> 16 & 255, l[11] = te >>> 24 & 255, l[12] = de >>> 0 & 255, l[13] = de >>> 8 & 255, l[14] = de >>> 16 & 255, l[15] = de >>> 24 & 255, l[16] = ve >>> 0 & 255, l[17] = ve >>> 8 & 255, l[18] = ve >>> 16 & 255, l[19] = ve >>> 24 & 255, l[20] = Y >>> 0 & 255, l[21] = Y >>> 8 & 255, l[22] = Y >>> 16 & 255, l[23] = Y >>> 24 & 255, l[24] = B >>> 0 & 255, l[25] = B >>> 8 & 255, l[26] = B >>> 16 & 255, l[27] = B >>> 24 & 255, l[28] = O >>> 0 & 255, l[29] = O >>> 8 & 255, l[30] = O >>> 16 & 255, l[31] = O >>> 24 & 255, l[32] = V >>> 0 & 255, l[33] = V >>> 8 & 255, l[34] = V >>> 16 & 255, l[35] = V >>> 24 & 255, l[36] = j >>> 0 & 255, l[37] = j >>> 8 & 255, l[38] = j >>> 16 & 255, l[39] = j >>> 24 & 255, l[40] = U >>> 0 & 255, l[41] = U >>> 8 & 255, l[42] = U >>> 16 & 255, l[43] = U >>> 24 & 255, l[44] = L >>> 0 & 255, l[45] = L >>> 8 & 255, l[46] = L >>> 16 & 255, l[47] = L >>> 24 & 255, l[48] = Ie >>> 0 & 255, l[49] = Ie >>> 8 & 255, l[50] = Ie >>> 16 & 255, l[51] = Ie >>> 24 & 255, l[52] = Ge >>> 0 & 255, l[53] = Ge >>> 8 & 255, l[54] = Ge >>> 16 & 255, l[55] = Ge >>> 24 & 255, l[56] = Ze >>> 0 & 255, l[57] = Ze >>> 8 & 255, l[58] = Ze >>> 16 & 255, l[59] = Ze >>> 24 & 255, l[60] = ze >>> 0 & 255, l[61] = ze >>> 8 & 255, l[62] = ze >>> 16 & 255, l[63] = ze >>> 24 & 255;
13426
+ for (var g = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, S = d[0] & 255 | (d[1] & 255) << 8 | (d[2] & 255) << 16 | (d[3] & 255) << 24, E = d[4] & 255 | (d[5] & 255) << 8 | (d[6] & 255) << 16 | (d[7] & 255) << 24, R = d[8] & 255 | (d[9] & 255) << 8 | (d[10] & 255) << 16 | (d[11] & 255) << 24, z = d[12] & 255 | (d[13] & 255) << 8 | (d[14] & 255) << 16 | (d[15] & 255) << 24, be = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, J = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24, ft = p[4] & 255 | (p[5] & 255) << 8 | (p[6] & 255) << 16 | (p[7] & 255) << 24, oe = p[8] & 255 | (p[9] & 255) << 8 | (p[10] & 255) << 16 | (p[11] & 255) << 24, Oe = p[12] & 255 | (p[13] & 255) << 8 | (p[14] & 255) << 16 | (p[15] & 255) << 24, Ne = a[8] & 255 | (a[9] & 255) << 8 | (a[10] & 255) << 16 | (a[11] & 255) << 24, Fe = d[16] & 255 | (d[17] & 255) << 8 | (d[18] & 255) << 16 | (d[19] & 255) << 24, Me = d[20] & 255 | (d[21] & 255) << 8 | (d[22] & 255) << 16 | (d[23] & 255) << 24, Pe = d[24] & 255 | (d[25] & 255) << 8 | (d[26] & 255) << 16 | (d[27] & 255) << 24, Ue = d[28] & 255 | (d[29] & 255) << 8 | (d[30] & 255) << 16 | (d[31] & 255) << 24, je = a[12] & 255 | (a[13] & 255) << 8 | (a[14] & 255) << 16 | (a[15] & 255) << 24, he = g, _e = S, te = E, de = R, me = z, Y = be, B = J, O = ft, V = oe, j = Oe, U = Ne, L = Fe, Ie = Me, Ge = Pe, Ze = Ue, ze = je, w, Xe = 0; Xe < 20; Xe += 2)
13427
+ w = he + Ie | 0, me ^= w << 7 | w >>> 25, w = me + he | 0, V ^= w << 9 | w >>> 23, w = V + me | 0, Ie ^= w << 13 | w >>> 19, w = Ie + V | 0, he ^= w << 18 | w >>> 14, w = Y + _e | 0, j ^= w << 7 | w >>> 25, w = j + Y | 0, Ge ^= w << 9 | w >>> 23, w = Ge + j | 0, _e ^= w << 13 | w >>> 19, w = _e + Ge | 0, Y ^= w << 18 | w >>> 14, w = U + B | 0, Ze ^= w << 7 | w >>> 25, w = Ze + U | 0, te ^= w << 9 | w >>> 23, w = te + Ze | 0, B ^= w << 13 | w >>> 19, w = B + te | 0, U ^= w << 18 | w >>> 14, w = ze + L | 0, de ^= w << 7 | w >>> 25, w = de + ze | 0, O ^= w << 9 | w >>> 23, w = O + de | 0, L ^= w << 13 | w >>> 19, w = L + O | 0, ze ^= w << 18 | w >>> 14, w = he + de | 0, _e ^= w << 7 | w >>> 25, w = _e + he | 0, te ^= w << 9 | w >>> 23, w = te + _e | 0, de ^= w << 13 | w >>> 19, w = de + te | 0, he ^= w << 18 | w >>> 14, w = Y + me | 0, B ^= w << 7 | w >>> 25, w = B + Y | 0, O ^= w << 9 | w >>> 23, w = O + B | 0, me ^= w << 13 | w >>> 19, w = me + O | 0, Y ^= w << 18 | w >>> 14, w = U + j | 0, L ^= w << 7 | w >>> 25, w = L + U | 0, V ^= w << 9 | w >>> 23, w = V + L | 0, j ^= w << 13 | w >>> 19, w = j + V | 0, U ^= w << 18 | w >>> 14, w = ze + Ze | 0, Ie ^= w << 7 | w >>> 25, w = Ie + ze | 0, Ge ^= w << 9 | w >>> 23, w = Ge + Ie | 0, Ze ^= w << 13 | w >>> 19, w = Ze + Ge | 0, ze ^= w << 18 | w >>> 14;
13428
+ he = he + g | 0, _e = _e + S | 0, te = te + E | 0, de = de + R | 0, me = me + z | 0, Y = Y + be | 0, B = B + J | 0, O = O + ft | 0, V = V + oe | 0, j = j + Oe | 0, U = U + Ne | 0, L = L + Fe | 0, Ie = Ie + Me | 0, Ge = Ge + Pe | 0, Ze = Ze + Ue | 0, ze = ze + je | 0, l[0] = he >>> 0 & 255, l[1] = he >>> 8 & 255, l[2] = he >>> 16 & 255, l[3] = he >>> 24 & 255, l[4] = _e >>> 0 & 255, l[5] = _e >>> 8 & 255, l[6] = _e >>> 16 & 255, l[7] = _e >>> 24 & 255, l[8] = te >>> 0 & 255, l[9] = te >>> 8 & 255, l[10] = te >>> 16 & 255, l[11] = te >>> 24 & 255, l[12] = de >>> 0 & 255, l[13] = de >>> 8 & 255, l[14] = de >>> 16 & 255, l[15] = de >>> 24 & 255, l[16] = me >>> 0 & 255, l[17] = me >>> 8 & 255, l[18] = me >>> 16 & 255, l[19] = me >>> 24 & 255, l[20] = Y >>> 0 & 255, l[21] = Y >>> 8 & 255, l[22] = Y >>> 16 & 255, l[23] = Y >>> 24 & 255, l[24] = B >>> 0 & 255, l[25] = B >>> 8 & 255, l[26] = B >>> 16 & 255, l[27] = B >>> 24 & 255, l[28] = O >>> 0 & 255, l[29] = O >>> 8 & 255, l[30] = O >>> 16 & 255, l[31] = O >>> 24 & 255, l[32] = V >>> 0 & 255, l[33] = V >>> 8 & 255, l[34] = V >>> 16 & 255, l[35] = V >>> 24 & 255, l[36] = j >>> 0 & 255, l[37] = j >>> 8 & 255, l[38] = j >>> 16 & 255, l[39] = j >>> 24 & 255, l[40] = U >>> 0 & 255, l[41] = U >>> 8 & 255, l[42] = U >>> 16 & 255, l[43] = U >>> 24 & 255, l[44] = L >>> 0 & 255, l[45] = L >>> 8 & 255, l[46] = L >>> 16 & 255, l[47] = L >>> 24 & 255, l[48] = Ie >>> 0 & 255, l[49] = Ie >>> 8 & 255, l[50] = Ie >>> 16 & 255, l[51] = Ie >>> 24 & 255, l[52] = Ge >>> 0 & 255, l[53] = Ge >>> 8 & 255, l[54] = Ge >>> 16 & 255, l[55] = Ge >>> 24 & 255, l[56] = Ze >>> 0 & 255, l[57] = Ze >>> 8 & 255, l[58] = Ze >>> 16 & 255, l[59] = Ze >>> 24 & 255, l[60] = ze >>> 0 & 255, l[61] = ze >>> 8 & 255, l[62] = ze >>> 16 & 255, l[63] = ze >>> 24 & 255;
13429
13429
  }
13430
13430
  function D(l, p, d, a) {
13431
- for (var g = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, S = d[0] & 255 | (d[1] & 255) << 8 | (d[2] & 255) << 16 | (d[3] & 255) << 24, E = d[4] & 255 | (d[5] & 255) << 8 | (d[6] & 255) << 16 | (d[7] & 255) << 24, R = d[8] & 255 | (d[9] & 255) << 8 | (d[10] & 255) << 16 | (d[11] & 255) << 24, z = d[12] & 255 | (d[13] & 255) << 8 | (d[14] & 255) << 16 | (d[15] & 255) << 24, be = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, J = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24, ft = p[4] & 255 | (p[5] & 255) << 8 | (p[6] & 255) << 16 | (p[7] & 255) << 24, oe = p[8] & 255 | (p[9] & 255) << 8 | (p[10] & 255) << 16 | (p[11] & 255) << 24, Oe = p[12] & 255 | (p[13] & 255) << 8 | (p[14] & 255) << 16 | (p[15] & 255) << 24, Ne = a[8] & 255 | (a[9] & 255) << 8 | (a[10] & 255) << 16 | (a[11] & 255) << 24, Fe = d[16] & 255 | (d[17] & 255) << 8 | (d[18] & 255) << 16 | (d[19] & 255) << 24, Me = d[20] & 255 | (d[21] & 255) << 8 | (d[22] & 255) << 16 | (d[23] & 255) << 24, Pe = d[24] & 255 | (d[25] & 255) << 8 | (d[26] & 255) << 16 | (d[27] & 255) << 24, Ue = d[28] & 255 | (d[29] & 255) << 8 | (d[30] & 255) << 16 | (d[31] & 255) << 24, je = a[12] & 255 | (a[13] & 255) << 8 | (a[14] & 255) << 16 | (a[15] & 255) << 24, he = g, Se = S, te = E, de = R, ve = z, Y = be, B = J, O = ft, V = oe, j = Oe, U = Ne, L = Fe, Ie = Me, Ge = Pe, Ze = Ue, ze = je, w, Xe = 0; Xe < 20; Xe += 2)
13432
- w = he + Ie | 0, ve ^= w << 7 | w >>> 25, w = ve + he | 0, V ^= w << 9 | w >>> 23, w = V + ve | 0, Ie ^= w << 13 | w >>> 19, w = Ie + V | 0, he ^= w << 18 | w >>> 14, w = Y + Se | 0, j ^= w << 7 | w >>> 25, w = j + Y | 0, Ge ^= w << 9 | w >>> 23, w = Ge + j | 0, Se ^= w << 13 | w >>> 19, w = Se + Ge | 0, Y ^= w << 18 | w >>> 14, w = U + B | 0, Ze ^= w << 7 | w >>> 25, w = Ze + U | 0, te ^= w << 9 | w >>> 23, w = te + Ze | 0, B ^= w << 13 | w >>> 19, w = B + te | 0, U ^= w << 18 | w >>> 14, w = ze + L | 0, de ^= w << 7 | w >>> 25, w = de + ze | 0, O ^= w << 9 | w >>> 23, w = O + de | 0, L ^= w << 13 | w >>> 19, w = L + O | 0, ze ^= w << 18 | w >>> 14, w = he + de | 0, Se ^= w << 7 | w >>> 25, w = Se + he | 0, te ^= w << 9 | w >>> 23, w = te + Se | 0, de ^= w << 13 | w >>> 19, w = de + te | 0, he ^= w << 18 | w >>> 14, w = Y + ve | 0, B ^= w << 7 | w >>> 25, w = B + Y | 0, O ^= w << 9 | w >>> 23, w = O + B | 0, ve ^= w << 13 | w >>> 19, w = ve + O | 0, Y ^= w << 18 | w >>> 14, w = U + j | 0, L ^= w << 7 | w >>> 25, w = L + U | 0, V ^= w << 9 | w >>> 23, w = V + L | 0, j ^= w << 13 | w >>> 19, w = j + V | 0, U ^= w << 18 | w >>> 14, w = ze + Ze | 0, Ie ^= w << 7 | w >>> 25, w = Ie + ze | 0, Ge ^= w << 9 | w >>> 23, w = Ge + Ie | 0, Ze ^= w << 13 | w >>> 19, w = Ze + Ge | 0, ze ^= w << 18 | w >>> 14;
13431
+ for (var g = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, S = d[0] & 255 | (d[1] & 255) << 8 | (d[2] & 255) << 16 | (d[3] & 255) << 24, E = d[4] & 255 | (d[5] & 255) << 8 | (d[6] & 255) << 16 | (d[7] & 255) << 24, R = d[8] & 255 | (d[9] & 255) << 8 | (d[10] & 255) << 16 | (d[11] & 255) << 24, z = d[12] & 255 | (d[13] & 255) << 8 | (d[14] & 255) << 16 | (d[15] & 255) << 24, be = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, J = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24, ft = p[4] & 255 | (p[5] & 255) << 8 | (p[6] & 255) << 16 | (p[7] & 255) << 24, oe = p[8] & 255 | (p[9] & 255) << 8 | (p[10] & 255) << 16 | (p[11] & 255) << 24, Oe = p[12] & 255 | (p[13] & 255) << 8 | (p[14] & 255) << 16 | (p[15] & 255) << 24, Ne = a[8] & 255 | (a[9] & 255) << 8 | (a[10] & 255) << 16 | (a[11] & 255) << 24, Fe = d[16] & 255 | (d[17] & 255) << 8 | (d[18] & 255) << 16 | (d[19] & 255) << 24, Me = d[20] & 255 | (d[21] & 255) << 8 | (d[22] & 255) << 16 | (d[23] & 255) << 24, Pe = d[24] & 255 | (d[25] & 255) << 8 | (d[26] & 255) << 16 | (d[27] & 255) << 24, Ue = d[28] & 255 | (d[29] & 255) << 8 | (d[30] & 255) << 16 | (d[31] & 255) << 24, je = a[12] & 255 | (a[13] & 255) << 8 | (a[14] & 255) << 16 | (a[15] & 255) << 24, he = g, _e = S, te = E, de = R, me = z, Y = be, B = J, O = ft, V = oe, j = Oe, U = Ne, L = Fe, Ie = Me, Ge = Pe, Ze = Ue, ze = je, w, Xe = 0; Xe < 20; Xe += 2)
13432
+ w = he + Ie | 0, me ^= w << 7 | w >>> 25, w = me + he | 0, V ^= w << 9 | w >>> 23, w = V + me | 0, Ie ^= w << 13 | w >>> 19, w = Ie + V | 0, he ^= w << 18 | w >>> 14, w = Y + _e | 0, j ^= w << 7 | w >>> 25, w = j + Y | 0, Ge ^= w << 9 | w >>> 23, w = Ge + j | 0, _e ^= w << 13 | w >>> 19, w = _e + Ge | 0, Y ^= w << 18 | w >>> 14, w = U + B | 0, Ze ^= w << 7 | w >>> 25, w = Ze + U | 0, te ^= w << 9 | w >>> 23, w = te + Ze | 0, B ^= w << 13 | w >>> 19, w = B + te | 0, U ^= w << 18 | w >>> 14, w = ze + L | 0, de ^= w << 7 | w >>> 25, w = de + ze | 0, O ^= w << 9 | w >>> 23, w = O + de | 0, L ^= w << 13 | w >>> 19, w = L + O | 0, ze ^= w << 18 | w >>> 14, w = he + de | 0, _e ^= w << 7 | w >>> 25, w = _e + he | 0, te ^= w << 9 | w >>> 23, w = te + _e | 0, de ^= w << 13 | w >>> 19, w = de + te | 0, he ^= w << 18 | w >>> 14, w = Y + me | 0, B ^= w << 7 | w >>> 25, w = B + Y | 0, O ^= w << 9 | w >>> 23, w = O + B | 0, me ^= w << 13 | w >>> 19, w = me + O | 0, Y ^= w << 18 | w >>> 14, w = U + j | 0, L ^= w << 7 | w >>> 25, w = L + U | 0, V ^= w << 9 | w >>> 23, w = V + L | 0, j ^= w << 13 | w >>> 19, w = j + V | 0, U ^= w << 18 | w >>> 14, w = ze + Ze | 0, Ie ^= w << 7 | w >>> 25, w = Ie + ze | 0, Ge ^= w << 9 | w >>> 23, w = Ge + Ie | 0, Ze ^= w << 13 | w >>> 19, w = Ze + Ge | 0, ze ^= w << 18 | w >>> 14;
13433
13433
  l[0] = he >>> 0 & 255, l[1] = he >>> 8 & 255, l[2] = he >>> 16 & 255, l[3] = he >>> 24 & 255, l[4] = Y >>> 0 & 255, l[5] = Y >>> 8 & 255, l[6] = Y >>> 16 & 255, l[7] = Y >>> 24 & 255, l[8] = U >>> 0 & 255, l[9] = U >>> 8 & 255, l[10] = U >>> 16 & 255, l[11] = U >>> 24 & 255, l[12] = ze >>> 0 & 255, l[13] = ze >>> 8 & 255, l[14] = ze >>> 16 & 255, l[15] = ze >>> 24 & 255, l[16] = B >>> 0 & 255, l[17] = B >>> 8 & 255, l[18] = B >>> 16 & 255, l[19] = B >>> 24 & 255, l[20] = O >>> 0 & 255, l[21] = O >>> 8 & 255, l[22] = O >>> 16 & 255, l[23] = O >>> 24 & 255, l[24] = V >>> 0 & 255, l[25] = V >>> 8 & 255, l[26] = V >>> 16 & 255, l[27] = V >>> 24 & 255, l[28] = j >>> 0 & 255, l[29] = j >>> 8 & 255, l[30] = j >>> 16 & 255, l[31] = j >>> 24 & 255;
13434
13434
  }
13435
- function pe(l, p, d, a) {
13435
+ function ye(l, p, d, a) {
13436
13436
  P(l, p, d, a);
13437
13437
  }
13438
13438
  function tt(l, p, d, a) {
@@ -13444,13 +13444,13 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13444
13444
  for (J = 0; J < 16; J++) R[J] = 0;
13445
13445
  for (J = 0; J < 8; J++) R[J] = S[J];
13446
13446
  for (; g >= 64; ) {
13447
- for (pe(z, R, E, De), J = 0; J < 64; J++) l[p + J] = d[a + J] ^ z[J];
13447
+ for (ye(z, R, E, De), J = 0; J < 64; J++) l[p + J] = d[a + J] ^ z[J];
13448
13448
  for (be = 1, J = 8; J < 16; J++)
13449
13449
  be = be + (R[J] & 255) | 0, R[J] = be & 255, be >>>= 8;
13450
13450
  g -= 64, p += 64, a += 64;
13451
13451
  }
13452
13452
  if (g > 0)
13453
- for (pe(z, R, E, De), J = 0; J < g; J++) l[p + J] = d[a + J] ^ z[J];
13453
+ for (ye(z, R, E, De), J = 0; J < g; J++) l[p + J] = d[a + J] ^ z[J];
13454
13454
  return 0;
13455
13455
  }
13456
13456
  function He(l, p, d, a, g) {
@@ -13458,13 +13458,13 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13458
13458
  for (z = 0; z < 16; z++) S[z] = 0;
13459
13459
  for (z = 0; z < 8; z++) S[z] = a[z];
13460
13460
  for (; d >= 64; ) {
13461
- for (pe(E, S, g, De), z = 0; z < 64; z++) l[p + z] = E[z];
13461
+ for (ye(E, S, g, De), z = 0; z < 64; z++) l[p + z] = E[z];
13462
13462
  for (R = 1, z = 8; z < 16; z++)
13463
13463
  R = R + (S[z] & 255) | 0, S[z] = R & 255, R >>>= 8;
13464
13464
  d -= 64, p += 64;
13465
13465
  }
13466
13466
  if (d > 0)
13467
- for (pe(E, S, g, De), z = 0; z < d; z++) l[p + z] = E[z];
13467
+ for (ye(E, S, g, De), z = 0; z < d; z++) l[p + z] = E[z];
13468
13468
  return 0;
13469
13469
  }
13470
13470
  function yt(l, p, d, a, g) {
@@ -13485,9 +13485,9 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13485
13485
  p = l[0] & 255 | (l[1] & 255) << 8, this.r[0] = p & 8191, d = l[2] & 255 | (l[3] & 255) << 8, this.r[1] = (p >>> 13 | d << 3) & 8191, a = l[4] & 255 | (l[5] & 255) << 8, this.r[2] = (d >>> 10 | a << 6) & 7939, g = l[6] & 255 | (l[7] & 255) << 8, this.r[3] = (a >>> 7 | g << 9) & 8191, S = l[8] & 255 | (l[9] & 255) << 8, this.r[4] = (g >>> 4 | S << 12) & 255, this.r[5] = S >>> 1 & 8190, E = l[10] & 255 | (l[11] & 255) << 8, this.r[6] = (S >>> 14 | E << 2) & 8191, R = l[12] & 255 | (l[13] & 255) << 8, this.r[7] = (E >>> 11 | R << 5) & 8065, z = l[14] & 255 | (l[15] & 255) << 8, this.r[8] = (R >>> 8 | z << 8) & 8191, this.r[9] = z >>> 5 & 127, this.pad[0] = l[16] & 255 | (l[17] & 255) << 8, this.pad[1] = l[18] & 255 | (l[19] & 255) << 8, this.pad[2] = l[20] & 255 | (l[21] & 255) << 8, this.pad[3] = l[22] & 255 | (l[23] & 255) << 8, this.pad[4] = l[24] & 255 | (l[25] & 255) << 8, this.pad[5] = l[26] & 255 | (l[27] & 255) << 8, this.pad[6] = l[28] & 255 | (l[29] & 255) << 8, this.pad[7] = l[30] & 255 | (l[31] & 255) << 8;
13486
13486
  };
13487
13487
  ue.prototype.blocks = function(l, p, d) {
13488
- for (var a = this.fin ? 0 : 2048, g, S, E, R, z, be, J, ft, oe, Oe, Ne, Fe, Me, Pe, Ue, je, he, Se, te, de = this.h[0], ve = this.h[1], Y = this.h[2], B = this.h[3], O = this.h[4], V = this.h[5], j = this.h[6], U = this.h[7], L = this.h[8], Ie = this.h[9], Ge = this.r[0], Ze = this.r[1], ze = this.r[2], w = this.r[3], Xe = this.r[4], ht = this.r[5], dt = this.r[6], We = this.r[7], at = this.r[8], ct = this.r[9]; d >= 16; )
13489
- g = l[p + 0] & 255 | (l[p + 1] & 255) << 8, de += g & 8191, S = l[p + 2] & 255 | (l[p + 3] & 255) << 8, ve += (g >>> 13 | S << 3) & 8191, E = l[p + 4] & 255 | (l[p + 5] & 255) << 8, Y += (S >>> 10 | E << 6) & 8191, R = l[p + 6] & 255 | (l[p + 7] & 255) << 8, B += (E >>> 7 | R << 9) & 8191, z = l[p + 8] & 255 | (l[p + 9] & 255) << 8, O += (R >>> 4 | z << 12) & 8191, V += z >>> 1 & 8191, be = l[p + 10] & 255 | (l[p + 11] & 255) << 8, j += (z >>> 14 | be << 2) & 8191, J = l[p + 12] & 255 | (l[p + 13] & 255) << 8, U += (be >>> 11 | J << 5) & 8191, ft = l[p + 14] & 255 | (l[p + 15] & 255) << 8, L += (J >>> 8 | ft << 8) & 8191, Ie += ft >>> 5 | a, oe = 0, Oe = oe, Oe += de * Ge, Oe += ve * (5 * ct), Oe += Y * (5 * at), Oe += B * (5 * We), Oe += O * (5 * dt), oe = Oe >>> 13, Oe &= 8191, Oe += V * (5 * ht), Oe += j * (5 * Xe), Oe += U * (5 * w), Oe += L * (5 * ze), Oe += Ie * (5 * Ze), oe += Oe >>> 13, Oe &= 8191, Ne = oe, Ne += de * Ze, Ne += ve * Ge, Ne += Y * (5 * ct), Ne += B * (5 * at), Ne += O * (5 * We), oe = Ne >>> 13, Ne &= 8191, Ne += V * (5 * dt), Ne += j * (5 * ht), Ne += U * (5 * Xe), Ne += L * (5 * w), Ne += Ie * (5 * ze), oe += Ne >>> 13, Ne &= 8191, Fe = oe, Fe += de * ze, Fe += ve * Ze, Fe += Y * Ge, Fe += B * (5 * ct), Fe += O * (5 * at), oe = Fe >>> 13, Fe &= 8191, Fe += V * (5 * We), Fe += j * (5 * dt), Fe += U * (5 * ht), Fe += L * (5 * Xe), Fe += Ie * (5 * w), oe += Fe >>> 13, Fe &= 8191, Me = oe, Me += de * w, Me += ve * ze, Me += Y * Ze, Me += B * Ge, Me += O * (5 * ct), oe = Me >>> 13, Me &= 8191, Me += V * (5 * at), Me += j * (5 * We), Me += U * (5 * dt), Me += L * (5 * ht), Me += Ie * (5 * Xe), oe += Me >>> 13, Me &= 8191, Pe = oe, Pe += de * Xe, Pe += ve * w, Pe += Y * ze, Pe += B * Ze, Pe += O * Ge, oe = Pe >>> 13, Pe &= 8191, Pe += V * (5 * ct), Pe += j * (5 * at), Pe += U * (5 * We), Pe += L * (5 * dt), Pe += Ie * (5 * ht), oe += Pe >>> 13, Pe &= 8191, Ue = oe, Ue += de * ht, Ue += ve * Xe, Ue += Y * w, Ue += B * ze, Ue += O * Ze, oe = Ue >>> 13, Ue &= 8191, Ue += V * Ge, Ue += j * (5 * ct), Ue += U * (5 * at), Ue += L * (5 * We), Ue += Ie * (5 * dt), oe += Ue >>> 13, Ue &= 8191, je = oe, je += de * dt, je += ve * ht, je += Y * Xe, je += B * w, je += O * ze, oe = je >>> 13, je &= 8191, je += V * Ze, je += j * Ge, je += U * (5 * ct), je += L * (5 * at), je += Ie * (5 * We), oe += je >>> 13, je &= 8191, he = oe, he += de * We, he += ve * dt, he += Y * ht, he += B * Xe, he += O * w, oe = he >>> 13, he &= 8191, he += V * ze, he += j * Ze, he += U * Ge, he += L * (5 * ct), he += Ie * (5 * at), oe += he >>> 13, he &= 8191, Se = oe, Se += de * at, Se += ve * We, Se += Y * dt, Se += B * ht, Se += O * Xe, oe = Se >>> 13, Se &= 8191, Se += V * w, Se += j * ze, Se += U * Ze, Se += L * Ge, Se += Ie * (5 * ct), oe += Se >>> 13, Se &= 8191, te = oe, te += de * ct, te += ve * at, te += Y * We, te += B * dt, te += O * ht, oe = te >>> 13, te &= 8191, te += V * Xe, te += j * w, te += U * ze, te += L * Ze, te += Ie * Ge, oe += te >>> 13, te &= 8191, oe = (oe << 2) + oe | 0, oe = oe + Oe | 0, Oe = oe & 8191, oe = oe >>> 13, Ne += oe, de = Oe, ve = Ne, Y = Fe, B = Me, O = Pe, V = Ue, j = je, U = he, L = Se, Ie = te, p += 16, d -= 16;
13490
- this.h[0] = de, this.h[1] = ve, this.h[2] = Y, this.h[3] = B, this.h[4] = O, this.h[5] = V, this.h[6] = j, this.h[7] = U, this.h[8] = L, this.h[9] = Ie;
13488
+ for (var a = this.fin ? 0 : 2048, g, S, E, R, z, be, J, ft, oe, Oe, Ne, Fe, Me, Pe, Ue, je, he, _e, te, de = this.h[0], me = this.h[1], Y = this.h[2], B = this.h[3], O = this.h[4], V = this.h[5], j = this.h[6], U = this.h[7], L = this.h[8], Ie = this.h[9], Ge = this.r[0], Ze = this.r[1], ze = this.r[2], w = this.r[3], Xe = this.r[4], ht = this.r[5], dt = this.r[6], We = this.r[7], at = this.r[8], ct = this.r[9]; d >= 16; )
13489
+ g = l[p + 0] & 255 | (l[p + 1] & 255) << 8, de += g & 8191, S = l[p + 2] & 255 | (l[p + 3] & 255) << 8, me += (g >>> 13 | S << 3) & 8191, E = l[p + 4] & 255 | (l[p + 5] & 255) << 8, Y += (S >>> 10 | E << 6) & 8191, R = l[p + 6] & 255 | (l[p + 7] & 255) << 8, B += (E >>> 7 | R << 9) & 8191, z = l[p + 8] & 255 | (l[p + 9] & 255) << 8, O += (R >>> 4 | z << 12) & 8191, V += z >>> 1 & 8191, be = l[p + 10] & 255 | (l[p + 11] & 255) << 8, j += (z >>> 14 | be << 2) & 8191, J = l[p + 12] & 255 | (l[p + 13] & 255) << 8, U += (be >>> 11 | J << 5) & 8191, ft = l[p + 14] & 255 | (l[p + 15] & 255) << 8, L += (J >>> 8 | ft << 8) & 8191, Ie += ft >>> 5 | a, oe = 0, Oe = oe, Oe += de * Ge, Oe += me * (5 * ct), Oe += Y * (5 * at), Oe += B * (5 * We), Oe += O * (5 * dt), oe = Oe >>> 13, Oe &= 8191, Oe += V * (5 * ht), Oe += j * (5 * Xe), Oe += U * (5 * w), Oe += L * (5 * ze), Oe += Ie * (5 * Ze), oe += Oe >>> 13, Oe &= 8191, Ne = oe, Ne += de * Ze, Ne += me * Ge, Ne += Y * (5 * ct), Ne += B * (5 * at), Ne += O * (5 * We), oe = Ne >>> 13, Ne &= 8191, Ne += V * (5 * dt), Ne += j * (5 * ht), Ne += U * (5 * Xe), Ne += L * (5 * w), Ne += Ie * (5 * ze), oe += Ne >>> 13, Ne &= 8191, Fe = oe, Fe += de * ze, Fe += me * Ze, Fe += Y * Ge, Fe += B * (5 * ct), Fe += O * (5 * at), oe = Fe >>> 13, Fe &= 8191, Fe += V * (5 * We), Fe += j * (5 * dt), Fe += U * (5 * ht), Fe += L * (5 * Xe), Fe += Ie * (5 * w), oe += Fe >>> 13, Fe &= 8191, Me = oe, Me += de * w, Me += me * ze, Me += Y * Ze, Me += B * Ge, Me += O * (5 * ct), oe = Me >>> 13, Me &= 8191, Me += V * (5 * at), Me += j * (5 * We), Me += U * (5 * dt), Me += L * (5 * ht), Me += Ie * (5 * Xe), oe += Me >>> 13, Me &= 8191, Pe = oe, Pe += de * Xe, Pe += me * w, Pe += Y * ze, Pe += B * Ze, Pe += O * Ge, oe = Pe >>> 13, Pe &= 8191, Pe += V * (5 * ct), Pe += j * (5 * at), Pe += U * (5 * We), Pe += L * (5 * dt), Pe += Ie * (5 * ht), oe += Pe >>> 13, Pe &= 8191, Ue = oe, Ue += de * ht, Ue += me * Xe, Ue += Y * w, Ue += B * ze, Ue += O * Ze, oe = Ue >>> 13, Ue &= 8191, Ue += V * Ge, Ue += j * (5 * ct), Ue += U * (5 * at), Ue += L * (5 * We), Ue += Ie * (5 * dt), oe += Ue >>> 13, Ue &= 8191, je = oe, je += de * dt, je += me * ht, je += Y * Xe, je += B * w, je += O * ze, oe = je >>> 13, je &= 8191, je += V * Ze, je += j * Ge, je += U * (5 * ct), je += L * (5 * at), je += Ie * (5 * We), oe += je >>> 13, je &= 8191, he = oe, he += de * We, he += me * dt, he += Y * ht, he += B * Xe, he += O * w, oe = he >>> 13, he &= 8191, he += V * ze, he += j * Ze, he += U * Ge, he += L * (5 * ct), he += Ie * (5 * at), oe += he >>> 13, he &= 8191, _e = oe, _e += de * at, _e += me * We, _e += Y * dt, _e += B * ht, _e += O * Xe, oe = _e >>> 13, _e &= 8191, _e += V * w, _e += j * ze, _e += U * Ze, _e += L * Ge, _e += Ie * (5 * ct), oe += _e >>> 13, _e &= 8191, te = oe, te += de * ct, te += me * at, te += Y * We, te += B * dt, te += O * ht, oe = te >>> 13, te &= 8191, te += V * Xe, te += j * w, te += U * ze, te += L * Ze, te += Ie * Ge, oe += te >>> 13, te &= 8191, oe = (oe << 2) + oe | 0, oe = oe + Oe | 0, Oe = oe & 8191, oe = oe >>> 13, Ne += oe, de = Oe, me = Ne, Y = Fe, B = Me, O = Pe, V = Ue, j = je, U = he, L = _e, Ie = te, p += 16, d -= 16;
13490
+ this.h[0] = de, this.h[1] = me, this.h[2] = Y, this.h[3] = B, this.h[4] = O, this.h[5] = V, this.h[6] = j, this.h[7] = U, this.h[8] = L, this.h[9] = Ie;
13491
13491
  }, ue.prototype.finish = function(l, p) {
13492
13492
  var d = new Uint16Array(10), a, g, S, E;
13493
13493
  if (this.leftover) {
@@ -13522,11 +13522,11 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13522
13522
  var E = new ue(S);
13523
13523
  return E.update(d, a, g), E.finish(l, p), 0;
13524
13524
  }
13525
- function ye(l, p, d, a, g, S) {
13525
+ function ge(l, p, d, a, g, S) {
13526
13526
  var E = new Uint8Array(16);
13527
13527
  return fe(E, 0, d, a, g, S), k(l, p, E, 0);
13528
13528
  }
13529
- function Ae(l, p, d, a, g) {
13529
+ function Se(l, p, d, a, g) {
13530
13530
  var S;
13531
13531
  if (d < 32) return -1;
13532
13532
  for (pt(l, 0, p, 0, d, a, g), fe(l, 16, l, 32, d - 32, l), S = 0; S < 16; S++) l[S] = 0;
@@ -13534,7 +13534,7 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13534
13534
  }
13535
13535
  function Re(l, p, d, a, g) {
13536
13536
  var S, E = new Uint8Array(32);
13537
- if (d < 32 || (yt(E, 0, 32, a, g), ye(p, 16, p, 32, d - 32, E) !== 0)) return -1;
13537
+ if (d < 32 || (yt(E, 0, 32, a, g), ge(p, 16, p, 32, d - 32, E) !== 0)) return -1;
13538
13538
  for (pt(l, 0, p, 0, d, a, g), S = 0; S < 32; S++) l[S] = 0;
13539
13539
  return 0;
13540
13540
  }
@@ -13583,8 +13583,8 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13583
13583
  for (var a = 0; a < 16; a++) l[a] = p[a] - d[a];
13584
13584
  }
13585
13585
  function Q(l, p, d) {
13586
- var a, g, S = 0, E = 0, R = 0, z = 0, be = 0, J = 0, ft = 0, oe = 0, Oe = 0, Ne = 0, Fe = 0, Me = 0, Pe = 0, Ue = 0, je = 0, he = 0, Se = 0, te = 0, de = 0, ve = 0, Y = 0, B = 0, O = 0, V = 0, j = 0, U = 0, L = 0, Ie = 0, Ge = 0, Ze = 0, ze = 0, w = d[0], Xe = d[1], ht = d[2], dt = d[3], We = d[4], at = d[5], ct = d[6], $t = d[7], xt = d[8], Nt = d[9], Pt = d[10], jt = d[11], Lt = d[12], Qt = d[13], er = d[14], tr = d[15];
13587
- a = p[0], S += a * w, E += a * Xe, R += a * ht, z += a * dt, be += a * We, J += a * at, ft += a * ct, oe += a * $t, Oe += a * xt, Ne += a * Nt, Fe += a * Pt, Me += a * jt, Pe += a * Lt, Ue += a * Qt, je += a * er, he += a * tr, a = p[1], E += a * w, R += a * Xe, z += a * ht, be += a * dt, J += a * We, ft += a * at, oe += a * ct, Oe += a * $t, Ne += a * xt, Fe += a * Nt, Me += a * Pt, Pe += a * jt, Ue += a * Lt, je += a * Qt, he += a * er, Se += a * tr, a = p[2], R += a * w, z += a * Xe, be += a * ht, J += a * dt, ft += a * We, oe += a * at, Oe += a * ct, Ne += a * $t, Fe += a * xt, Me += a * Nt, Pe += a * Pt, Ue += a * jt, je += a * Lt, he += a * Qt, Se += a * er, te += a * tr, a = p[3], z += a * w, be += a * Xe, J += a * ht, ft += a * dt, oe += a * We, Oe += a * at, Ne += a * ct, Fe += a * $t, Me += a * xt, Pe += a * Nt, Ue += a * Pt, je += a * jt, he += a * Lt, Se += a * Qt, te += a * er, de += a * tr, a = p[4], be += a * w, J += a * Xe, ft += a * ht, oe += a * dt, Oe += a * We, Ne += a * at, Fe += a * ct, Me += a * $t, Pe += a * xt, Ue += a * Nt, je += a * Pt, he += a * jt, Se += a * Lt, te += a * Qt, de += a * er, ve += a * tr, a = p[5], J += a * w, ft += a * Xe, oe += a * ht, Oe += a * dt, Ne += a * We, Fe += a * at, Me += a * ct, Pe += a * $t, Ue += a * xt, je += a * Nt, he += a * Pt, Se += a * jt, te += a * Lt, de += a * Qt, ve += a * er, Y += a * tr, a = p[6], ft += a * w, oe += a * Xe, Oe += a * ht, Ne += a * dt, Fe += a * We, Me += a * at, Pe += a * ct, Ue += a * $t, je += a * xt, he += a * Nt, Se += a * Pt, te += a * jt, de += a * Lt, ve += a * Qt, Y += a * er, B += a * tr, a = p[7], oe += a * w, Oe += a * Xe, Ne += a * ht, Fe += a * dt, Me += a * We, Pe += a * at, Ue += a * ct, je += a * $t, he += a * xt, Se += a * Nt, te += a * Pt, de += a * jt, ve += a * Lt, Y += a * Qt, B += a * er, O += a * tr, a = p[8], Oe += a * w, Ne += a * Xe, Fe += a * ht, Me += a * dt, Pe += a * We, Ue += a * at, je += a * ct, he += a * $t, Se += a * xt, te += a * Nt, de += a * Pt, ve += a * jt, Y += a * Lt, B += a * Qt, O += a * er, V += a * tr, a = p[9], Ne += a * w, Fe += a * Xe, Me += a * ht, Pe += a * dt, Ue += a * We, je += a * at, he += a * ct, Se += a * $t, te += a * xt, de += a * Nt, ve += a * Pt, Y += a * jt, B += a * Lt, O += a * Qt, V += a * er, j += a * tr, a = p[10], Fe += a * w, Me += a * Xe, Pe += a * ht, Ue += a * dt, je += a * We, he += a * at, Se += a * ct, te += a * $t, de += a * xt, ve += a * Nt, Y += a * Pt, B += a * jt, O += a * Lt, V += a * Qt, j += a * er, U += a * tr, a = p[11], Me += a * w, Pe += a * Xe, Ue += a * ht, je += a * dt, he += a * We, Se += a * at, te += a * ct, de += a * $t, ve += a * xt, Y += a * Nt, B += a * Pt, O += a * jt, V += a * Lt, j += a * Qt, U += a * er, L += a * tr, a = p[12], Pe += a * w, Ue += a * Xe, je += a * ht, he += a * dt, Se += a * We, te += a * at, de += a * ct, ve += a * $t, Y += a * xt, B += a * Nt, O += a * Pt, V += a * jt, j += a * Lt, U += a * Qt, L += a * er, Ie += a * tr, a = p[13], Ue += a * w, je += a * Xe, he += a * ht, Se += a * dt, te += a * We, de += a * at, ve += a * ct, Y += a * $t, B += a * xt, O += a * Nt, V += a * Pt, j += a * jt, U += a * Lt, L += a * Qt, Ie += a * er, Ge += a * tr, a = p[14], je += a * w, he += a * Xe, Se += a * ht, te += a * dt, de += a * We, ve += a * at, Y += a * ct, B += a * $t, O += a * xt, V += a * Nt, j += a * Pt, U += a * jt, L += a * Lt, Ie += a * Qt, Ge += a * er, Ze += a * tr, a = p[15], he += a * w, Se += a * Xe, te += a * ht, de += a * dt, ve += a * We, Y += a * at, B += a * ct, O += a * $t, V += a * xt, j += a * Nt, U += a * Pt, L += a * jt, Ie += a * Lt, Ge += a * Qt, Ze += a * er, ze += a * tr, S += 38 * Se, E += 38 * te, R += 38 * de, z += 38 * ve, be += 38 * Y, J += 38 * B, ft += 38 * O, oe += 38 * V, Oe += 38 * j, Ne += 38 * U, Fe += 38 * L, Me += 38 * Ie, Pe += 38 * Ge, Ue += 38 * Ze, je += 38 * ze, g = 1, a = S + g + 65535, g = Math.floor(a / 65536), S = a - g * 65536, a = E + g + 65535, g = Math.floor(a / 65536), E = a - g * 65536, a = R + g + 65535, g = Math.floor(a / 65536), R = a - g * 65536, a = z + g + 65535, g = Math.floor(a / 65536), z = a - g * 65536, a = be + g + 65535, g = Math.floor(a / 65536), be = a - g * 65536, a = J + g + 65535, g = Math.floor(a / 65536), J = a - g * 65536, a = ft + g + 65535, g = Math.floor(a / 65536), ft = a - g * 65536, a = oe + g + 65535, g = Math.floor(a / 65536), oe = a - g * 65536, a = Oe + g + 65535, g = Math.floor(a / 65536), Oe = a - g * 65536, a = Ne + g + 65535, g = Math.floor(a / 65536), Ne = a - g * 65536, a = Fe + g + 65535, g = Math.floor(a / 65536), Fe = a - g * 65536, a = Me + g + 65535, g = Math.floor(a / 65536), Me = a - g * 65536, a = Pe + g + 65535, g = Math.floor(a / 65536), Pe = a - g * 65536, a = Ue + g + 65535, g = Math.floor(a / 65536), Ue = a - g * 65536, a = je + g + 65535, g = Math.floor(a / 65536), je = a - g * 65536, a = he + g + 65535, g = Math.floor(a / 65536), he = a - g * 65536, S += g - 1 + 37 * (g - 1), g = 1, a = S + g + 65535, g = Math.floor(a / 65536), S = a - g * 65536, a = E + g + 65535, g = Math.floor(a / 65536), E = a - g * 65536, a = R + g + 65535, g = Math.floor(a / 65536), R = a - g * 65536, a = z + g + 65535, g = Math.floor(a / 65536), z = a - g * 65536, a = be + g + 65535, g = Math.floor(a / 65536), be = a - g * 65536, a = J + g + 65535, g = Math.floor(a / 65536), J = a - g * 65536, a = ft + g + 65535, g = Math.floor(a / 65536), ft = a - g * 65536, a = oe + g + 65535, g = Math.floor(a / 65536), oe = a - g * 65536, a = Oe + g + 65535, g = Math.floor(a / 65536), Oe = a - g * 65536, a = Ne + g + 65535, g = Math.floor(a / 65536), Ne = a - g * 65536, a = Fe + g + 65535, g = Math.floor(a / 65536), Fe = a - g * 65536, a = Me + g + 65535, g = Math.floor(a / 65536), Me = a - g * 65536, a = Pe + g + 65535, g = Math.floor(a / 65536), Pe = a - g * 65536, a = Ue + g + 65535, g = Math.floor(a / 65536), Ue = a - g * 65536, a = je + g + 65535, g = Math.floor(a / 65536), je = a - g * 65536, a = he + g + 65535, g = Math.floor(a / 65536), he = a - g * 65536, S += g - 1 + 37 * (g - 1), l[0] = S, l[1] = E, l[2] = R, l[3] = z, l[4] = be, l[5] = J, l[6] = ft, l[7] = oe, l[8] = Oe, l[9] = Ne, l[10] = Fe, l[11] = Me, l[12] = Pe, l[13] = Ue, l[14] = je, l[15] = he;
13586
+ var a, g, S = 0, E = 0, R = 0, z = 0, be = 0, J = 0, ft = 0, oe = 0, Oe = 0, Ne = 0, Fe = 0, Me = 0, Pe = 0, Ue = 0, je = 0, he = 0, _e = 0, te = 0, de = 0, me = 0, Y = 0, B = 0, O = 0, V = 0, j = 0, U = 0, L = 0, Ie = 0, Ge = 0, Ze = 0, ze = 0, w = d[0], Xe = d[1], ht = d[2], dt = d[3], We = d[4], at = d[5], ct = d[6], $t = d[7], xt = d[8], Nt = d[9], Pt = d[10], jt = d[11], Lt = d[12], Qt = d[13], er = d[14], tr = d[15];
13587
+ a = p[0], S += a * w, E += a * Xe, R += a * ht, z += a * dt, be += a * We, J += a * at, ft += a * ct, oe += a * $t, Oe += a * xt, Ne += a * Nt, Fe += a * Pt, Me += a * jt, Pe += a * Lt, Ue += a * Qt, je += a * er, he += a * tr, a = p[1], E += a * w, R += a * Xe, z += a * ht, be += a * dt, J += a * We, ft += a * at, oe += a * ct, Oe += a * $t, Ne += a * xt, Fe += a * Nt, Me += a * Pt, Pe += a * jt, Ue += a * Lt, je += a * Qt, he += a * er, _e += a * tr, a = p[2], R += a * w, z += a * Xe, be += a * ht, J += a * dt, ft += a * We, oe += a * at, Oe += a * ct, Ne += a * $t, Fe += a * xt, Me += a * Nt, Pe += a * Pt, Ue += a * jt, je += a * Lt, he += a * Qt, _e += a * er, te += a * tr, a = p[3], z += a * w, be += a * Xe, J += a * ht, ft += a * dt, oe += a * We, Oe += a * at, Ne += a * ct, Fe += a * $t, Me += a * xt, Pe += a * Nt, Ue += a * Pt, je += a * jt, he += a * Lt, _e += a * Qt, te += a * er, de += a * tr, a = p[4], be += a * w, J += a * Xe, ft += a * ht, oe += a * dt, Oe += a * We, Ne += a * at, Fe += a * ct, Me += a * $t, Pe += a * xt, Ue += a * Nt, je += a * Pt, he += a * jt, _e += a * Lt, te += a * Qt, de += a * er, me += a * tr, a = p[5], J += a * w, ft += a * Xe, oe += a * ht, Oe += a * dt, Ne += a * We, Fe += a * at, Me += a * ct, Pe += a * $t, Ue += a * xt, je += a * Nt, he += a * Pt, _e += a * jt, te += a * Lt, de += a * Qt, me += a * er, Y += a * tr, a = p[6], ft += a * w, oe += a * Xe, Oe += a * ht, Ne += a * dt, Fe += a * We, Me += a * at, Pe += a * ct, Ue += a * $t, je += a * xt, he += a * Nt, _e += a * Pt, te += a * jt, de += a * Lt, me += a * Qt, Y += a * er, B += a * tr, a = p[7], oe += a * w, Oe += a * Xe, Ne += a * ht, Fe += a * dt, Me += a * We, Pe += a * at, Ue += a * ct, je += a * $t, he += a * xt, _e += a * Nt, te += a * Pt, de += a * jt, me += a * Lt, Y += a * Qt, B += a * er, O += a * tr, a = p[8], Oe += a * w, Ne += a * Xe, Fe += a * ht, Me += a * dt, Pe += a * We, Ue += a * at, je += a * ct, he += a * $t, _e += a * xt, te += a * Nt, de += a * Pt, me += a * jt, Y += a * Lt, B += a * Qt, O += a * er, V += a * tr, a = p[9], Ne += a * w, Fe += a * Xe, Me += a * ht, Pe += a * dt, Ue += a * We, je += a * at, he += a * ct, _e += a * $t, te += a * xt, de += a * Nt, me += a * Pt, Y += a * jt, B += a * Lt, O += a * Qt, V += a * er, j += a * tr, a = p[10], Fe += a * w, Me += a * Xe, Pe += a * ht, Ue += a * dt, je += a * We, he += a * at, _e += a * ct, te += a * $t, de += a * xt, me += a * Nt, Y += a * Pt, B += a * jt, O += a * Lt, V += a * Qt, j += a * er, U += a * tr, a = p[11], Me += a * w, Pe += a * Xe, Ue += a * ht, je += a * dt, he += a * We, _e += a * at, te += a * ct, de += a * $t, me += a * xt, Y += a * Nt, B += a * Pt, O += a * jt, V += a * Lt, j += a * Qt, U += a * er, L += a * tr, a = p[12], Pe += a * w, Ue += a * Xe, je += a * ht, he += a * dt, _e += a * We, te += a * at, de += a * ct, me += a * $t, Y += a * xt, B += a * Nt, O += a * Pt, V += a * jt, j += a * Lt, U += a * Qt, L += a * er, Ie += a * tr, a = p[13], Ue += a * w, je += a * Xe, he += a * ht, _e += a * dt, te += a * We, de += a * at, me += a * ct, Y += a * $t, B += a * xt, O += a * Nt, V += a * Pt, j += a * jt, U += a * Lt, L += a * Qt, Ie += a * er, Ge += a * tr, a = p[14], je += a * w, he += a * Xe, _e += a * ht, te += a * dt, de += a * We, me += a * at, Y += a * ct, B += a * $t, O += a * xt, V += a * Nt, j += a * Pt, U += a * jt, L += a * Lt, Ie += a * Qt, Ge += a * er, Ze += a * tr, a = p[15], he += a * w, _e += a * Xe, te += a * ht, de += a * dt, me += a * We, Y += a * at, B += a * ct, O += a * $t, V += a * xt, j += a * Nt, U += a * Pt, L += a * jt, Ie += a * Lt, Ge += a * Qt, Ze += a * er, ze += a * tr, S += 38 * _e, E += 38 * te, R += 38 * de, z += 38 * me, be += 38 * Y, J += 38 * B, ft += 38 * O, oe += 38 * V, Oe += 38 * j, Ne += 38 * U, Fe += 38 * L, Me += 38 * Ie, Pe += 38 * Ge, Ue += 38 * Ze, je += 38 * ze, g = 1, a = S + g + 65535, g = Math.floor(a / 65536), S = a - g * 65536, a = E + g + 65535, g = Math.floor(a / 65536), E = a - g * 65536, a = R + g + 65535, g = Math.floor(a / 65536), R = a - g * 65536, a = z + g + 65535, g = Math.floor(a / 65536), z = a - g * 65536, a = be + g + 65535, g = Math.floor(a / 65536), be = a - g * 65536, a = J + g + 65535, g = Math.floor(a / 65536), J = a - g * 65536, a = ft + g + 65535, g = Math.floor(a / 65536), ft = a - g * 65536, a = oe + g + 65535, g = Math.floor(a / 65536), oe = a - g * 65536, a = Oe + g + 65535, g = Math.floor(a / 65536), Oe = a - g * 65536, a = Ne + g + 65535, g = Math.floor(a / 65536), Ne = a - g * 65536, a = Fe + g + 65535, g = Math.floor(a / 65536), Fe = a - g * 65536, a = Me + g + 65535, g = Math.floor(a / 65536), Me = a - g * 65536, a = Pe + g + 65535, g = Math.floor(a / 65536), Pe = a - g * 65536, a = Ue + g + 65535, g = Math.floor(a / 65536), Ue = a - g * 65536, a = je + g + 65535, g = Math.floor(a / 65536), je = a - g * 65536, a = he + g + 65535, g = Math.floor(a / 65536), he = a - g * 65536, S += g - 1 + 37 * (g - 1), g = 1, a = S + g + 65535, g = Math.floor(a / 65536), S = a - g * 65536, a = E + g + 65535, g = Math.floor(a / 65536), E = a - g * 65536, a = R + g + 65535, g = Math.floor(a / 65536), R = a - g * 65536, a = z + g + 65535, g = Math.floor(a / 65536), z = a - g * 65536, a = be + g + 65535, g = Math.floor(a / 65536), be = a - g * 65536, a = J + g + 65535, g = Math.floor(a / 65536), J = a - g * 65536, a = ft + g + 65535, g = Math.floor(a / 65536), ft = a - g * 65536, a = oe + g + 65535, g = Math.floor(a / 65536), oe = a - g * 65536, a = Oe + g + 65535, g = Math.floor(a / 65536), Oe = a - g * 65536, a = Ne + g + 65535, g = Math.floor(a / 65536), Ne = a - g * 65536, a = Fe + g + 65535, g = Math.floor(a / 65536), Fe = a - g * 65536, a = Me + g + 65535, g = Math.floor(a / 65536), Me = a - g * 65536, a = Pe + g + 65535, g = Math.floor(a / 65536), Pe = a - g * 65536, a = Ue + g + 65535, g = Math.floor(a / 65536), Ue = a - g * 65536, a = je + g + 65535, g = Math.floor(a / 65536), je = a - g * 65536, a = he + g + 65535, g = Math.floor(a / 65536), he = a - g * 65536, S += g - 1 + 37 * (g - 1), l[0] = S, l[1] = E, l[2] = R, l[3] = z, l[4] = be, l[5] = J, l[6] = ft, l[7] = oe, l[8] = Oe, l[9] = Ne, l[10] = Fe, l[11] = Me, l[12] = Pe, l[13] = Ue, l[14] = je, l[15] = he;
13588
13588
  }
13589
13589
  function gt(l, p) {
13590
13590
  Q(l, p, p);
@@ -13625,7 +13625,7 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13625
13625
  var a = new Uint8Array(32);
13626
13626
  return Ci(a, d, p), tt(l, i, a, De);
13627
13627
  }
13628
- var ds = Ae, Mc = Re;
13628
+ var ds = Se, Mc = Re;
13629
13629
  function ps(l, p, d, a, g, S) {
13630
13630
  var E = new Uint8Array(32);
13631
13631
  return pn(E, g, S), ds(l, p, d, a, E);
@@ -13797,11 +13797,11 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13797
13797
  1246189591
13798
13798
  ];
13799
13799
  function gs(l, p, d, a) {
13800
- for (var g = new Int32Array(16), S = new Int32Array(16), E, R, z, be, J, ft, oe, Oe, Ne, Fe, Me, Pe, Ue, je, he, Se, te, de, ve, Y, B, O, V, j, U, L, Ie = l[0], Ge = l[1], Ze = l[2], ze = l[3], w = l[4], Xe = l[5], ht = l[6], dt = l[7], We = p[0], at = p[1], ct = p[2], $t = p[3], xt = p[4], Nt = p[5], Pt = p[6], jt = p[7], Lt = 0; a >= 128; ) {
13801
- for (ve = 0; ve < 16; ve++)
13802
- Y = 8 * ve + Lt, g[ve] = d[Y + 0] << 24 | d[Y + 1] << 16 | d[Y + 2] << 8 | d[Y + 3], S[ve] = d[Y + 4] << 24 | d[Y + 5] << 16 | d[Y + 6] << 8 | d[Y + 7];
13803
- for (ve = 0; ve < 80; ve++)
13804
- if (E = Ie, R = Ge, z = Ze, be = ze, J = w, ft = Xe, oe = ht, Oe = dt, Ne = We, Fe = at, Me = ct, Pe = $t, Ue = xt, je = Nt, he = Pt, Se = jt, B = dt, O = jt, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = (w >>> 14 | xt << 18) ^ (w >>> 18 | xt << 14) ^ (xt >>> 9 | w << 23), O = (xt >>> 14 | w << 18) ^ (xt >>> 18 | w << 14) ^ (w >>> 9 | xt << 23), V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, B = w & Xe ^ ~w & ht, O = xt & Nt ^ ~xt & Pt, V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, B = ys[ve * 2], O = ys[ve * 2 + 1], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, B = g[ve % 16], O = S[ve % 16], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, te = U & 65535 | L << 16, de = V & 65535 | j << 16, B = te, O = de, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = (Ie >>> 28 | We << 4) ^ (We >>> 2 | Ie << 30) ^ (We >>> 7 | Ie << 25), O = (We >>> 28 | Ie << 4) ^ (Ie >>> 2 | We << 30) ^ (Ie >>> 7 | We << 25), V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, B = Ie & Ge ^ Ie & Ze ^ Ge & Ze, O = We & at ^ We & ct ^ at & ct, V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, Oe = U & 65535 | L << 16, Se = V & 65535 | j << 16, B = be, O = Pe, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = te, O = de, V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, be = U & 65535 | L << 16, Pe = V & 65535 | j << 16, Ge = E, Ze = R, ze = z, w = be, Xe = J, ht = ft, dt = oe, Ie = Oe, at = Ne, ct = Fe, $t = Me, xt = Pe, Nt = Ue, Pt = je, jt = he, We = Se, ve % 16 === 15)
13800
+ for (var g = new Int32Array(16), S = new Int32Array(16), E, R, z, be, J, ft, oe, Oe, Ne, Fe, Me, Pe, Ue, je, he, _e, te, de, me, Y, B, O, V, j, U, L, Ie = l[0], Ge = l[1], Ze = l[2], ze = l[3], w = l[4], Xe = l[5], ht = l[6], dt = l[7], We = p[0], at = p[1], ct = p[2], $t = p[3], xt = p[4], Nt = p[5], Pt = p[6], jt = p[7], Lt = 0; a >= 128; ) {
13801
+ for (me = 0; me < 16; me++)
13802
+ Y = 8 * me + Lt, g[me] = d[Y + 0] << 24 | d[Y + 1] << 16 | d[Y + 2] << 8 | d[Y + 3], S[me] = d[Y + 4] << 24 | d[Y + 5] << 16 | d[Y + 6] << 8 | d[Y + 7];
13803
+ for (me = 0; me < 80; me++)
13804
+ if (E = Ie, R = Ge, z = Ze, be = ze, J = w, ft = Xe, oe = ht, Oe = dt, Ne = We, Fe = at, Me = ct, Pe = $t, Ue = xt, je = Nt, he = Pt, _e = jt, B = dt, O = jt, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = (w >>> 14 | xt << 18) ^ (w >>> 18 | xt << 14) ^ (xt >>> 9 | w << 23), O = (xt >>> 14 | w << 18) ^ (xt >>> 18 | w << 14) ^ (w >>> 9 | xt << 23), V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, B = w & Xe ^ ~w & ht, O = xt & Nt ^ ~xt & Pt, V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, B = ys[me * 2], O = ys[me * 2 + 1], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, B = g[me % 16], O = S[me % 16], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, te = U & 65535 | L << 16, de = V & 65535 | j << 16, B = te, O = de, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = (Ie >>> 28 | We << 4) ^ (We >>> 2 | Ie << 30) ^ (We >>> 7 | Ie << 25), O = (We >>> 28 | Ie << 4) ^ (Ie >>> 2 | We << 30) ^ (Ie >>> 7 | We << 25), V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, B = Ie & Ge ^ Ie & Ze ^ Ge & Ze, O = We & at ^ We & ct ^ at & ct, V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, Oe = U & 65535 | L << 16, _e = V & 65535 | j << 16, B = be, O = Pe, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = te, O = de, V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, be = U & 65535 | L << 16, Pe = V & 65535 | j << 16, Ge = E, Ze = R, ze = z, w = be, Xe = J, ht = ft, dt = oe, Ie = Oe, at = Ne, ct = Fe, $t = Me, xt = Pe, Nt = Ue, Pt = je, jt = he, We = _e, me % 16 === 15)
13805
13805
  for (Y = 0; Y < 16; Y++)
13806
13806
  B = g[Y], O = S[Y], V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = g[(Y + 9) % 16], O = S[(Y + 9) % 16], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, te = g[(Y + 1) % 16], de = S[(Y + 1) % 16], B = (te >>> 1 | de << 31) ^ (te >>> 8 | de << 24) ^ te >>> 7, O = (de >>> 1 | te << 31) ^ (de >>> 8 | te << 24) ^ (de >>> 7 | te << 25), V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, te = g[(Y + 14) % 16], de = S[(Y + 14) % 16], B = (te >>> 19 | de << 13) ^ (de >>> 29 | te << 3) ^ te >>> 6, O = (de >>> 19 | te << 13) ^ (te >>> 29 | de << 3) ^ (de >>> 6 | te << 26), V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, g[Y] = U & 65535 | L << 16, S[Y] = V & 65535 | j << 16;
13807
13807
  B = Ie, O = We, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = l[0], O = p[0], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, l[0] = Ie = U & 65535 | L << 16, p[0] = We = V & 65535 | j << 16, B = Ge, O = at, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = l[1], O = p[1], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, l[1] = Ge = U & 65535 | L << 16, p[1] = at = V & 65535 | j << 16, B = Ze, O = ct, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = l[2], O = p[2], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, l[2] = Ze = U & 65535 | L << 16, p[2] = ct = V & 65535 | j << 16, B = ze, O = $t, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = l[3], O = p[3], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, l[3] = ze = U & 65535 | L << 16, p[3] = $t = V & 65535 | j << 16, B = w, O = xt, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = l[4], O = p[4], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, l[4] = w = U & 65535 | L << 16, p[4] = xt = V & 65535 | j << 16, B = Xe, O = Nt, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = l[5], O = p[5], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, l[5] = Xe = U & 65535 | L << 16, p[5] = Nt = V & 65535 | j << 16, B = ht, O = Pt, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = l[6], O = p[6], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, l[6] = ht = U & 65535 | L << 16, p[6] = Pt = V & 65535 | j << 16, B = dt, O = jt, V = O & 65535, j = O >>> 16, U = B & 65535, L = B >>> 16, B = l[7], O = p[7], V += O & 65535, j += O >>> 16, U += B & 65535, L += B >>> 16, j += V >>> 16, U += j >>> 16, L += U >>> 16, l[7] = dt = U & 65535 | L << 16, p[7] = jt = V & 65535 | j << 16, Lt += 128, a -= 128;
@@ -13891,7 +13891,7 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13891
13891
  for (g = 0; g < d; g++) l[g] = p[g + 64];
13892
13892
  return d;
13893
13893
  }
13894
- var C = 32, N = 24, K = 32, xe = 16, _t = 32, Et = 32, $e = 32, Z = 32, ee = 32, ce = N, ge = K, et = xe, nt = 64, bt = 32, Gt = 64, Ti = 32, Ss = 64;
13894
+ var C = 32, N = 24, K = 32, xe = 16, _t = 32, Et = 32, $e = 32, Z = 32, ee = 32, ce = N, ve = K, et = xe, nt = 64, bt = 32, Gt = 64, Ti = 32, Ss = 64;
13895
13895
  e.lowlevel = {
13896
13896
  crypto_core_hsalsa20: tt,
13897
13897
  crypto_stream_xor: pt,
@@ -13899,10 +13899,10 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13899
13899
  crypto_stream_salsa20_xor: Te,
13900
13900
  crypto_stream_salsa20: He,
13901
13901
  crypto_onetimeauth: fe,
13902
- crypto_onetimeauth_verify: ye,
13902
+ crypto_onetimeauth_verify: ge,
13903
13903
  crypto_verify_16: k,
13904
13904
  crypto_verify_32: I,
13905
- crypto_secretbox: Ae,
13905
+ crypto_secretbox: Se,
13906
13906
  crypto_secretbox_open: Re,
13907
13907
  crypto_scalarmult: Ci,
13908
13908
  crypto_scalarmult_base: or,
@@ -13925,7 +13925,7 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13925
13925
  crypto_box_SECRETKEYBYTES: Z,
13926
13926
  crypto_box_BEFORENMBYTES: ee,
13927
13927
  crypto_box_NONCEBYTES: ce,
13928
- crypto_box_ZEROBYTES: ge,
13928
+ crypto_box_ZEROBYTES: ve,
13929
13929
  crypto_box_BOXZEROBYTES: et,
13930
13930
  crypto_sign_BYTES: nt,
13931
13931
  crypto_sign_PUBLICKEYBYTES: bt,
@@ -13952,7 +13952,7 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13952
13952
  if (l.length !== C) throw new Error("bad key size");
13953
13953
  if (p.length !== N) throw new Error("bad nonce size");
13954
13954
  }
13955
- function Jy(l, p) {
13955
+ function Xy(l, p) {
13956
13956
  if (l.length !== $e) throw new Error("bad public key size");
13957
13957
  if (p.length !== Z) throw new Error("bad secret key size");
13958
13958
  }
@@ -13970,7 +13970,7 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13970
13970
  }, e.secretbox = function(l, p, d) {
13971
13971
  xr(l, p, d), Oo(d, p);
13972
13972
  for (var a = new Uint8Array(K + l.length), g = new Uint8Array(a.length), S = 0; S < l.length; S++) a[S + K] = l[S];
13973
- return Ae(g, a, a.length, p, d), g.subarray(xe);
13973
+ return Se(g, a, a.length, p, d), g.subarray(xe);
13974
13974
  }, e.secretbox.open = function(l, p, d) {
13975
13975
  xr(l, p, d), Oo(d, p);
13976
13976
  for (var a = new Uint8Array(xe + l.length), g = new Uint8Array(a.length), S = 0; S < l.length; S++) a[S + xe] = l[S];
@@ -13988,7 +13988,7 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
13988
13988
  var g = e.box.before(d, a);
13989
13989
  return e.secretbox(l, p, g);
13990
13990
  }, e.box.before = function(l, p) {
13991
- xr(l, p), Jy(l, p);
13991
+ xr(l, p), Xy(l, p);
13992
13992
  var d = new Uint8Array(ee);
13993
13993
  return pn(d, l, p), d;
13994
13994
  }, e.box.after = e.secretbox, e.box.open = function(l, p, d, a) {
@@ -14058,7 +14058,7 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14058
14058
  for (g = 0; g < a; g++) d[g] = S[g];
14059
14059
  kf(S);
14060
14060
  });
14061
- } else typeof W1 < "u" && (l = X1, l && l.randomBytes && e.setPRNG(function(d, a) {
14061
+ } else typeof Y1 < "u" && (l = Q1, l && l.randomBytes && e.setPRNG(function(d, a) {
14062
14062
  var g, S = l.randomBytes(a);
14063
14063
  for (g = 0; g < a; g++) d[g] = S[g];
14064
14064
  kf(S);
@@ -14066,9 +14066,9 @@ const Y1 = {}, J1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14066
14066
  }();
14067
14067
  })(r.exports ? r.exports : self.nacl = self.nacl || {});
14068
14068
  })(V0);
14069
- var Q1 = V0.exports;
14070
- const L0 = /* @__PURE__ */ pg(Q1);
14071
- function ew() {
14069
+ var ew = V0.exports;
14070
+ const L0 = /* @__PURE__ */ yg(ew);
14071
+ function tw() {
14072
14072
  return L0.box.keyPair();
14073
14073
  }
14074
14074
  async function _i(r, e) {
@@ -14081,12 +14081,12 @@ async function _i(r, e) {
14081
14081
  }
14082
14082
  const i = window.crypto.randomUUID();
14083
14083
  console.log("Generated attestation nonce:", i);
14084
- const s = await Z1(i, e);
14084
+ const s = await W1(i, e);
14085
14085
  if (s && s.public_key) {
14086
14086
  console.log("Attestation document verification succeeded");
14087
- const o = ew();
14087
+ const o = tw();
14088
14088
  console.log("Generated client key pair");
14089
- const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await mw(
14089
+ const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await ww(
14090
14090
  _r(o.publicKey),
14091
14091
  i,
14092
14092
  e
@@ -14105,10 +14105,10 @@ async function _i(r, e) {
14105
14105
  }
14106
14106
  }
14107
14107
  let ut = "";
14108
- function tw(r) {
14108
+ function rw(r) {
14109
14109
  ut = r;
14110
14110
  }
14111
- async function rw(r, e) {
14111
+ async function nw(r, e) {
14112
14112
  return Tt(
14113
14113
  `${ut}/platform/login`,
14114
14114
  "POST",
@@ -14117,7 +14117,7 @@ async function rw(r, e) {
14117
14117
  "Failed to login"
14118
14118
  );
14119
14119
  }
14120
- async function nw(r, e, t, n) {
14120
+ async function iw(r, e, t, n) {
14121
14121
  return Tt(
14122
14122
  `${ut}/platform/register`,
14123
14123
  "POST",
@@ -14126,7 +14126,7 @@ async function nw(r, e, t, n) {
14126
14126
  "Failed to register"
14127
14127
  );
14128
14128
  }
14129
- async function iw(r) {
14129
+ async function sw(r) {
14130
14130
  return Tt(
14131
14131
  `${ut}/platform/logout`,
14132
14132
  "POST",
@@ -14135,7 +14135,7 @@ async function iw(r) {
14135
14135
  "Failed to logout"
14136
14136
  );
14137
14137
  }
14138
- async function sw() {
14138
+ async function ow() {
14139
14139
  const r = window.localStorage.getItem("refresh_token");
14140
14140
  if (!r) throw new Error("No refresh token available");
14141
14141
  const e = { refresh_token: r };
@@ -14153,113 +14153,113 @@ async function sw() {
14153
14153
  }
14154
14154
  }
14155
14155
  async function H0(r) {
14156
- return we(
14156
+ return pe(
14157
14157
  `${ut}/platform/orgs`,
14158
14158
  "POST",
14159
14159
  { name: r }
14160
14160
  );
14161
14161
  }
14162
14162
  async function F0() {
14163
- return we(
14163
+ return pe(
14164
14164
  `${ut}/platform/orgs`,
14165
14165
  "GET",
14166
14166
  void 0
14167
14167
  );
14168
14168
  }
14169
14169
  async function G0(r) {
14170
- return we(
14170
+ return pe(
14171
14171
  `${ut}/platform/orgs/${r}`,
14172
14172
  "DELETE",
14173
14173
  void 0
14174
14174
  );
14175
14175
  }
14176
14176
  async function z0(r, e, t) {
14177
- return we(
14177
+ return pe(
14178
14178
  `${ut}/platform/orgs/${r}/projects`,
14179
14179
  "POST",
14180
14180
  { name: e, description: t }
14181
14181
  );
14182
14182
  }
14183
14183
  async function K0(r) {
14184
- return we(
14184
+ return pe(
14185
14185
  `${ut}/platform/orgs/${r}/projects`,
14186
14186
  "GET",
14187
14187
  void 0
14188
14188
  );
14189
14189
  }
14190
14190
  async function q0(r, e) {
14191
- return we(
14191
+ return pe(
14192
14192
  `${ut}/platform/orgs/${r}/projects/${e}`,
14193
14193
  "GET",
14194
14194
  void 0
14195
14195
  );
14196
14196
  }
14197
14197
  async function Z0(r, e, t) {
14198
- return we(
14198
+ return pe(
14199
14199
  `${ut}/platform/orgs/${r}/projects/${e}`,
14200
14200
  "PATCH",
14201
14201
  t
14202
14202
  );
14203
14203
  }
14204
14204
  async function W0(r, e) {
14205
- return we(
14205
+ return pe(
14206
14206
  `${ut}/platform/orgs/${r}/projects/${e}`,
14207
14207
  "DELETE",
14208
14208
  void 0
14209
14209
  );
14210
14210
  }
14211
- function ow(r) {
14211
+ function aw(r) {
14212
14212
  const e = /^[A-Za-z0-9+/]*[=]{0,2}$/, t = r.length % 4 === 0, n = e.test(r);
14213
14213
  return t && n;
14214
14214
  }
14215
14215
  async function Y0(r, e, t, n) {
14216
- if (!ow(n))
14216
+ if (!aw(n))
14217
14217
  throw new Error(
14218
14218
  "Secret must be base64 encoded. Use @stablelib/base64's encode function to encode your data."
14219
14219
  );
14220
- return we(
14220
+ return pe(
14221
14221
  `${ut}/platform/orgs/${r}/projects/${e}/secrets`,
14222
14222
  "POST",
14223
14223
  { key_name: t, secret: n }
14224
14224
  );
14225
14225
  }
14226
14226
  async function J0(r, e) {
14227
- return we(
14227
+ return pe(
14228
14228
  `${ut}/platform/orgs/${r}/projects/${e}/secrets`,
14229
14229
  "GET",
14230
14230
  void 0
14231
14231
  );
14232
14232
  }
14233
14233
  async function X0(r, e, t) {
14234
- return we(
14234
+ return pe(
14235
14235
  `${ut}/platform/orgs/${r}/projects/${e}/secrets/${t}`,
14236
14236
  "DELETE",
14237
14237
  void 0
14238
14238
  );
14239
14239
  }
14240
14240
  async function Q0(r, e) {
14241
- return we(
14241
+ return pe(
14242
14242
  `${ut}/platform/orgs/${r}/projects/${e}/settings/email`,
14243
14243
  "GET",
14244
14244
  void 0
14245
14245
  );
14246
14246
  }
14247
14247
  async function ey(r, e, t) {
14248
- return we(
14248
+ return pe(
14249
14249
  `${ut}/platform/orgs/${r}/projects/${e}/settings/email`,
14250
14250
  "PUT",
14251
14251
  t
14252
14252
  );
14253
14253
  }
14254
14254
  async function ty(r, e) {
14255
- return we(
14255
+ return pe(
14256
14256
  `${ut}/platform/orgs/${r}/projects/${e}/settings/oauth`,
14257
14257
  "GET",
14258
14258
  void 0
14259
14259
  );
14260
14260
  }
14261
14261
  async function ry(r, e, t) {
14262
- return we(
14262
+ return pe(
14263
14263
  `${ut}/platform/orgs/${r}/projects/${e}/settings/oauth`,
14264
14264
  "PUT",
14265
14265
  t
@@ -14268,63 +14268,63 @@ async function ry(r, e, t) {
14268
14268
  async function ny(r, e, t) {
14269
14269
  if (!e || e.trim() === "")
14270
14270
  throw new Error("Email is required");
14271
- return we(
14271
+ return pe(
14272
14272
  `${ut}/platform/orgs/${r}/invites`,
14273
14273
  "POST",
14274
14274
  { email: e, role: t }
14275
14275
  );
14276
14276
  }
14277
14277
  async function iy(r) {
14278
- return we(
14278
+ return pe(
14279
14279
  `${ut}/platform/orgs/${r}/invites`,
14280
14280
  "GET",
14281
14281
  void 0
14282
14282
  );
14283
14283
  }
14284
14284
  async function sy(r, e) {
14285
- return we(
14285
+ return pe(
14286
14286
  `${ut}/platform/orgs/${r}/invites/${e}`,
14287
14287
  "GET",
14288
14288
  void 0
14289
14289
  );
14290
14290
  }
14291
14291
  async function oy(r, e) {
14292
- return we(
14292
+ return pe(
14293
14293
  `${ut}/platform/orgs/${r}/invites/${e}`,
14294
14294
  "DELETE",
14295
14295
  void 0
14296
14296
  );
14297
14297
  }
14298
14298
  async function ay(r) {
14299
- return we(
14299
+ return pe(
14300
14300
  `${ut}/platform/orgs/${r}/memberships`,
14301
14301
  "GET",
14302
14302
  void 0
14303
14303
  );
14304
14304
  }
14305
14305
  async function cy(r, e, t) {
14306
- return we(
14306
+ return pe(
14307
14307
  `${ut}/platform/orgs/${r}/memberships/${e}`,
14308
14308
  "PATCH",
14309
14309
  { role: t }
14310
14310
  );
14311
14311
  }
14312
14312
  async function ly(r, e) {
14313
- return we(
14313
+ return pe(
14314
14314
  `${ut}/platform/orgs/${r}/memberships/${e}`,
14315
14315
  "DELETE",
14316
14316
  void 0
14317
14317
  );
14318
14318
  }
14319
14319
  async function uy(r) {
14320
- return we(
14320
+ return pe(
14321
14321
  `${ut}/platform/accept_invite/${r}`,
14322
14322
  "POST",
14323
14323
  void 0
14324
14324
  );
14325
14325
  }
14326
- async function aw() {
14327
- return we(`${ut}/platform/me`, "GET", void 0);
14326
+ async function cw() {
14327
+ return pe(`${ut}/platform/me`, "GET", void 0);
14328
14328
  }
14329
14329
  async function fy(r) {
14330
14330
  return Tt(
@@ -14336,7 +14336,7 @@ async function fy(r) {
14336
14336
  );
14337
14337
  }
14338
14338
  async function Da() {
14339
- return we(
14339
+ return pe(
14340
14340
  `${ut}/platform/request_verification`,
14341
14341
  "POST",
14342
14342
  void 0,
@@ -14376,14 +14376,14 @@ async function py(r, e) {
14376
14376
  current_password: r,
14377
14377
  new_password: e
14378
14378
  };
14379
- return we(
14379
+ return pe(
14380
14380
  `${ut}/platform/change-password`,
14381
14381
  "POST",
14382
14382
  t,
14383
14383
  "Failed to change platform password"
14384
14384
  );
14385
14385
  }
14386
- class cw {
14386
+ class lw {
14387
14387
  constructor() {
14388
14388
  Ke(this, "_appApiUrl", "");
14389
14389
  Ke(this, "_platformApiUrl", "");
@@ -14438,17 +14438,17 @@ class cw {
14438
14438
  return this.isPlatformPath(e) ? "platformRefreshToken" : "refreshToken";
14439
14439
  }
14440
14440
  }
14441
- const $a = new cw(), yy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14441
+ const $a = new lw(), yy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14442
14442
  __proto__: null,
14443
14443
  apiConfig: $a
14444
14444
  }, Symbol.toStringTag, { value: "Module" }));
14445
- async function we(r, e, t, n) {
14445
+ async function pe(r, e, t, n) {
14446
14446
  const i = async (s = !1) => {
14447
14447
  try {
14448
14448
  if (s) {
14449
14449
  console.log("Refreshing access token");
14450
14450
  const u = $a.getRefreshFunction(r);
14451
- console.log(`Using ${u}`), u === "platformRefreshToken" ? await sw() : await Dc();
14451
+ console.log(`Using ${u}`), u === "platformRefreshToken" ? await ow() : await Dc();
14452
14452
  }
14453
14453
  const o = window.localStorage.getItem("access_token");
14454
14454
  if (!o)
@@ -14475,7 +14475,7 @@ async function we(r, e, t, n) {
14475
14475
  }
14476
14476
  async function gy(r, e, t, n, i) {
14477
14477
  if (!i)
14478
- return we(r, e, t, n);
14478
+ return pe(r, e, t, n);
14479
14479
  const s = await _f(r, e, t, i, n);
14480
14480
  if (s.error)
14481
14481
  throw new Error(s.error);
@@ -14548,29 +14548,29 @@ async function Tt(r, e, t, n, i) {
14548
14548
  throw new Error("No data received from the server");
14549
14549
  return s.data;
14550
14550
  }
14551
- let Ee = "";
14552
- function lw(r) {
14553
- Ee = r;
14551
+ let Ae = "";
14552
+ function uw(r) {
14553
+ Ae = r;
14554
14554
  }
14555
- function uw() {
14556
- return Ee;
14555
+ function fw() {
14556
+ return Ae;
14557
14557
  }
14558
- async function fw(r, e, t) {
14558
+ async function hw(r, e, t) {
14559
14559
  return Tt(
14560
- `${Ee}/login`,
14560
+ `${Ae}/login`,
14561
14561
  "POST",
14562
14562
  { email: r, password: e, client_id: t }
14563
14563
  );
14564
14564
  }
14565
- async function hw(r, e, t) {
14565
+ async function dw(r, e, t) {
14566
14566
  return Tt(
14567
- `${Ee}/login`,
14567
+ `${Ae}/login`,
14568
14568
  "POST",
14569
14569
  { id: r, password: e, client_id: t }
14570
14570
  );
14571
14571
  }
14572
- async function dw(r, e, t, n, i) {
14573
- return Tt(`${Ee}/register`, "POST", {
14572
+ async function pw(r, e, t, n, i) {
14573
+ return Tt(`${Ae}/register`, "POST", {
14574
14574
  email: r,
14575
14575
  password: e,
14576
14576
  inviteCode: t.toLowerCase(),
@@ -14578,8 +14578,8 @@ async function dw(r, e, t, n, i) {
14578
14578
  name: i
14579
14579
  });
14580
14580
  }
14581
- async function pw(r, e, t) {
14582
- return Tt(`${Ee}/register`, "POST", {
14581
+ async function yw(r, e, t) {
14582
+ return Tt(`${Ae}/register`, "POST", {
14583
14583
  password: r,
14584
14584
  inviteCode: e.toLowerCase(),
14585
14585
  client_id: t
@@ -14591,7 +14591,7 @@ async function Dc() {
14591
14591
  const e = { refresh_token: r };
14592
14592
  try {
14593
14593
  const t = await Tt(
14594
- `${Ee}/refresh`,
14594
+ `${Ae}/refresh`,
14595
14595
  "POST",
14596
14596
  e,
14597
14597
  void 0,
@@ -14602,34 +14602,42 @@ async function Dc() {
14602
14602
  throw console.error("Error refreshing token:", t), t;
14603
14603
  }
14604
14604
  }
14605
- async function yw() {
14606
- return we(
14607
- `${Ee}/protected/user`,
14605
+ async function gw() {
14606
+ return pe(
14607
+ `${Ae}/protected/user`,
14608
14608
  "GET",
14609
14609
  void 0,
14610
14610
  "Failed to fetch user"
14611
14611
  );
14612
14612
  }
14613
14613
  async function vy(r, e) {
14614
- return we(
14615
- `${Ee}/protected/kv/${r}`,
14614
+ return pe(
14615
+ `${Ae}/protected/kv/${r}`,
14616
14616
  "PUT",
14617
14617
  e,
14618
14618
  "Failed to put key-value pair"
14619
14619
  );
14620
14620
  }
14621
14621
  async function my(r) {
14622
- return we(
14623
- `${Ee}/protected/kv/${r}`,
14622
+ return pe(
14623
+ `${Ae}/protected/kv/${r}`,
14624
14624
  "DELETE",
14625
14625
  void 0,
14626
14626
  "Failed to delete key-value pair"
14627
14627
  );
14628
14628
  }
14629
- async function wy(r) {
14629
+ async function wy() {
14630
+ return pe(
14631
+ `${Ae}/protected/kv`,
14632
+ "DELETE",
14633
+ void 0,
14634
+ "Failed to delete all key-value pairs"
14635
+ );
14636
+ }
14637
+ async function by(r) {
14630
14638
  try {
14631
- return await we(
14632
- `${Ee}/protected/kv/${r}`,
14639
+ return await pe(
14640
+ `${Ae}/protected/kv/${r}`,
14633
14641
  "GET",
14634
14642
  void 0,
14635
14643
  "Failed to get key-value pair"
@@ -14639,21 +14647,21 @@ async function wy(r) {
14639
14647
  return;
14640
14648
  }
14641
14649
  }
14642
- async function by() {
14643
- return we(
14644
- `${Ee}/protected/kv`,
14650
+ async function xy() {
14651
+ return pe(
14652
+ `${Ae}/protected/kv`,
14645
14653
  "GET",
14646
14654
  void 0,
14647
14655
  "Failed to list key-value pairs"
14648
14656
  );
14649
14657
  }
14650
- async function gw(r) {
14658
+ async function vw(r) {
14651
14659
  const e = { refresh_token: r };
14652
- return Tt(`${Ee}/logout`, "POST", e);
14660
+ return Tt(`${Ae}/logout`, "POST", e);
14653
14661
  }
14654
- async function xy(r) {
14662
+ async function Ay(r) {
14655
14663
  return Tt(
14656
- `${Ee}/verify-email/${r}`,
14664
+ `${Ae}/verify-email/${r}`,
14657
14665
  "GET",
14658
14666
  void 0,
14659
14667
  void 0,
@@ -14661,21 +14669,21 @@ async function xy(r) {
14661
14669
  );
14662
14670
  }
14663
14671
  async function Ma() {
14664
- return we(
14665
- `${Ee}/protected/request_verification`,
14672
+ return pe(
14673
+ `${Ae}/protected/request_verification`,
14666
14674
  "POST",
14667
14675
  void 0,
14668
14676
  "Failed to request new verification code"
14669
14677
  );
14670
14678
  }
14671
- async function vw(r, e) {
14672
- const n = await fetch(`${e || Ee}/attestation/${r}`);
14679
+ async function mw(r, e) {
14680
+ const n = await fetch(`${e || Ae}/attestation/${r}`);
14673
14681
  if (!n.ok)
14674
14682
  throw new Error(`Request failed with status ${n.status}`);
14675
14683
  return (await n.json()).attestation_document;
14676
14684
  }
14677
- async function mw(r, e, t) {
14678
- const i = await fetch(`${t || Ee}/key_exchange`, {
14685
+ async function ww(r, e, t) {
14686
+ const i = await fetch(`${t || Ae}/key_exchange`, {
14679
14687
  method: "POST",
14680
14688
  headers: {
14681
14689
  "Content-Type": "application/json"
@@ -14686,21 +14694,21 @@ async function mw(r, e, t) {
14686
14694
  throw new Error("Key exchange failed");
14687
14695
  return i.json();
14688
14696
  }
14689
- async function ww(r, e, t) {
14697
+ async function bw(r, e, t) {
14690
14698
  const n = {
14691
14699
  email: r,
14692
14700
  hashed_secret: e,
14693
14701
  client_id: t
14694
14702
  };
14695
14703
  return Tt(
14696
- `${Ee}/password-reset/request`,
14704
+ `${Ae}/password-reset/request`,
14697
14705
  "POST",
14698
14706
  n,
14699
14707
  void 0,
14700
14708
  "Failed to request password reset"
14701
14709
  );
14702
14710
  }
14703
- async function bw(r, e, t, n, i) {
14711
+ async function xw(r, e, t, n, i) {
14704
14712
  const s = {
14705
14713
  email: r,
14706
14714
  alphanumeric_code: e,
@@ -14709,29 +14717,29 @@ async function bw(r, e, t, n, i) {
14709
14717
  client_id: i
14710
14718
  };
14711
14719
  return Tt(
14712
- `${Ee}/password-reset/confirm`,
14720
+ `${Ae}/password-reset/confirm`,
14713
14721
  "POST",
14714
14722
  s,
14715
14723
  void 0,
14716
14724
  "Failed to confirm password reset"
14717
14725
  );
14718
14726
  }
14719
- async function Ay(r, e) {
14727
+ async function Sy(r, e) {
14720
14728
  const t = {
14721
14729
  current_password: r,
14722
14730
  new_password: e
14723
14731
  };
14724
- return we(
14725
- `${Ee}/protected/change_password`,
14732
+ return pe(
14733
+ `${Ae}/protected/change_password`,
14726
14734
  "POST",
14727
14735
  t,
14728
14736
  "Failed to change password"
14729
14737
  );
14730
14738
  }
14731
- async function xw(r, e) {
14739
+ async function Aw(r, e) {
14732
14740
  try {
14733
14741
  return await Tt(
14734
- `${Ee}/auth/github`,
14742
+ `${Ae}/auth/github`,
14735
14743
  "POST",
14736
14744
  e ? { invite_code: e, client_id: r } : { client_id: r },
14737
14745
  void 0,
@@ -14741,11 +14749,11 @@ async function xw(r, e) {
14741
14749
  throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
14742
14750
  }
14743
14751
  }
14744
- async function Aw(r, e, t) {
14752
+ async function Sw(r, e, t) {
14745
14753
  const n = { code: r, state: e, invite_code: t };
14746
14754
  try {
14747
14755
  return await Tt(
14748
- `${Ee}/auth/github/callback`,
14756
+ `${Ae}/auth/github/callback`,
14749
14757
  "POST",
14750
14758
  n,
14751
14759
  void 0,
@@ -14759,10 +14767,10 @@ async function Aw(r, e, t) {
14759
14767
  ) : new Error("Failed to authenticate with GitHub. Please try again.") : i;
14760
14768
  }
14761
14769
  }
14762
- async function Sw(r, e) {
14770
+ async function _w(r, e) {
14763
14771
  try {
14764
14772
  return await Tt(
14765
- `${Ee}/auth/google`,
14773
+ `${Ae}/auth/google`,
14766
14774
  "POST",
14767
14775
  e ? { invite_code: e, client_id: r } : { client_id: r },
14768
14776
  void 0,
@@ -14772,11 +14780,11 @@ async function Sw(r, e) {
14772
14780
  throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
14773
14781
  }
14774
14782
  }
14775
- async function _w(r, e, t) {
14783
+ async function Ew(r, e, t) {
14776
14784
  const n = { code: r, state: e, invite_code: t };
14777
14785
  try {
14778
14786
  return await Tt(
14779
- `${Ee}/auth/google/callback`,
14787
+ `${Ae}/auth/google/callback`,
14780
14788
  "POST",
14781
14789
  n,
14782
14790
  void 0,
@@ -14790,10 +14798,10 @@ async function _w(r, e, t) {
14790
14798
  ) : new Error("Failed to authenticate with Google. Please try again.") : i;
14791
14799
  }
14792
14800
  }
14793
- async function Ew(r, e) {
14801
+ async function Iw(r, e) {
14794
14802
  try {
14795
14803
  return await Tt(
14796
- `${Ee}/auth/apple`,
14804
+ `${Ae}/auth/apple`,
14797
14805
  "POST",
14798
14806
  e ? { invite_code: e, client_id: r } : { client_id: r },
14799
14807
  void 0,
@@ -14803,11 +14811,11 @@ async function Ew(r, e) {
14803
14811
  throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
14804
14812
  }
14805
14813
  }
14806
- async function Iw(r, e, t) {
14814
+ async function kw(r, e, t) {
14807
14815
  const n = { code: r, state: e, invite_code: t };
14808
14816
  try {
14809
14817
  return await Tt(
14810
- `${Ee}/auth/apple/callback`,
14818
+ `${Ae}/auth/apple/callback`,
14811
14819
  "POST",
14812
14820
  n,
14813
14821
  void 0,
@@ -14821,7 +14829,7 @@ async function Iw(r, e, t) {
14821
14829
  ) : new Error("Failed to authenticate with Apple. Please try again.") : i;
14822
14830
  }
14823
14831
  }
14824
- async function kw(r, e, t) {
14832
+ async function Cw(r, e, t) {
14825
14833
  const n = {
14826
14834
  ...r,
14827
14835
  client_id: e,
@@ -14829,7 +14837,7 @@ async function kw(r, e, t) {
14829
14837
  };
14830
14838
  try {
14831
14839
  return await Tt(
14832
- `${Ee}/auth/apple/native`,
14840
+ `${Ae}/auth/apple/native`,
14833
14841
  "POST",
14834
14842
  n,
14835
14843
  void 0,
@@ -14843,128 +14851,128 @@ async function kw(r, e, t) {
14843
14851
  ) : i.message.includes("No email found") ? new Error("Unable to retrieve email from Apple. Please try another sign-in method.") : new Error("Failed to authenticate with Apple. Please try again.") : i;
14844
14852
  }
14845
14853
  }
14846
- async function Sy(r) {
14847
- let e = `${Ee}/protected/private_key`;
14854
+ async function _y(r) {
14855
+ let e = `${Ae}/protected/private_key`;
14848
14856
  const t = [];
14849
14857
  return r != null && r.seed_phrase_derivation_path && t.push(
14850
14858
  `seed_phrase_derivation_path=${encodeURIComponent(r.seed_phrase_derivation_path)}`
14851
14859
  ), r != null && r.private_key_derivation_path && t.push(
14852
14860
  `private_key_derivation_path=${encodeURIComponent(r.private_key_derivation_path)}`
14853
- ), t.length > 0 && (e += `?${t.join("&")}`), we(
14861
+ ), t.length > 0 && (e += `?${t.join("&")}`), pe(
14854
14862
  e,
14855
14863
  "GET",
14856
14864
  void 0,
14857
14865
  "Failed to fetch private key"
14858
14866
  );
14859
14867
  }
14860
- async function _y(r) {
14861
- let e = `${Ee}/protected/private_key_bytes`;
14868
+ async function Ey(r) {
14869
+ let e = `${Ae}/protected/private_key_bytes`;
14862
14870
  const t = [];
14863
14871
  return r != null && r.seed_phrase_derivation_path && t.push(
14864
14872
  `seed_phrase_derivation_path=${encodeURIComponent(r.seed_phrase_derivation_path)}`
14865
14873
  ), r != null && r.private_key_derivation_path && t.push(
14866
14874
  `private_key_derivation_path=${encodeURIComponent(r.private_key_derivation_path)}`
14867
- ), t.length > 0 && (e += `?${t.join("&")}`), we(
14875
+ ), t.length > 0 && (e += `?${t.join("&")}`), pe(
14868
14876
  e,
14869
14877
  "GET",
14870
14878
  void 0,
14871
14879
  "Failed to fetch private key bytes"
14872
14880
  );
14873
14881
  }
14874
- async function Ey(r, e, t) {
14882
+ async function Iy(r, e, t) {
14875
14883
  const i = {
14876
14884
  message_base64: _r(r),
14877
14885
  algorithm: e,
14878
14886
  ...t && Object.keys(t).length > 0 && { key_options: t }
14879
14887
  };
14880
- return we(
14881
- `${Ee}/protected/sign_message`,
14888
+ return pe(
14889
+ `${Ae}/protected/sign_message`,
14882
14890
  "POST",
14883
14891
  i,
14884
14892
  "Failed to sign message"
14885
14893
  );
14886
14894
  }
14887
- async function Iy(r, e) {
14888
- let t = `${Ee}/protected/public_key?algorithm=${r}`;
14889
- return e != null && e.seed_phrase_derivation_path && (t += `&seed_phrase_derivation_path=${encodeURIComponent(e.seed_phrase_derivation_path)}`), e != null && e.private_key_derivation_path && (t += `&private_key_derivation_path=${encodeURIComponent(e.private_key_derivation_path)}`), we(
14895
+ async function ky(r, e) {
14896
+ let t = `${Ae}/protected/public_key?algorithm=${r}`;
14897
+ return e != null && e.seed_phrase_derivation_path && (t += `&seed_phrase_derivation_path=${encodeURIComponent(e.seed_phrase_derivation_path)}`), e != null && e.private_key_derivation_path && (t += `&private_key_derivation_path=${encodeURIComponent(e.private_key_derivation_path)}`), pe(
14890
14898
  t,
14891
14899
  "GET",
14892
14900
  void 0,
14893
14901
  "Failed to fetch public key"
14894
14902
  );
14895
14903
  }
14896
- async function Cw(r, e, t) {
14904
+ async function Bw(r, e, t) {
14897
14905
  const n = {
14898
14906
  email: r,
14899
14907
  password: e,
14900
14908
  ...t !== void 0 && { name: t }
14901
14909
  };
14902
- return we(
14903
- `${Ee}/protected/convert_guest`,
14910
+ return pe(
14911
+ `${Ae}/protected/convert_guest`,
14904
14912
  "POST",
14905
14913
  n,
14906
14914
  "Failed to convert guest account"
14907
14915
  );
14908
14916
  }
14909
- async function Bw(r) {
14910
- return we(
14911
- `${Ee}/protected/third_party_token`,
14917
+ async function Ow(r) {
14918
+ return pe(
14919
+ `${Ae}/protected/third_party_token`,
14912
14920
  "POST",
14913
14921
  r ? { audience: r } : {},
14914
14922
  "Failed to generate third party token"
14915
14923
  );
14916
14924
  }
14917
- async function ky(r, e) {
14925
+ async function Cy(r, e) {
14918
14926
  const t = {
14919
14927
  data: r,
14920
14928
  ...e && Object.keys(e).length > 0 && { key_options: e }
14921
14929
  };
14922
- return we(
14923
- `${Ee}/protected/encrypt`,
14930
+ return pe(
14931
+ `${Ae}/protected/encrypt`,
14924
14932
  "POST",
14925
14933
  t,
14926
14934
  "Failed to encrypt data"
14927
14935
  );
14928
14936
  }
14929
- async function Cy(r, e) {
14937
+ async function By(r, e) {
14930
14938
  const t = {
14931
14939
  encrypted_data: r,
14932
14940
  ...e && Object.keys(e).length > 0 && { key_options: e }
14933
14941
  };
14934
- return we(
14935
- `${Ee}/protected/decrypt`,
14942
+ return pe(
14943
+ `${Ae}/protected/decrypt`,
14936
14944
  "POST",
14937
14945
  t,
14938
14946
  "Failed to decrypt data"
14939
14947
  );
14940
14948
  }
14941
- async function Ow(r) {
14949
+ async function Tw(r) {
14942
14950
  const e = {
14943
14951
  hashed_secret: r
14944
14952
  };
14945
- return we(
14946
- `${Ee}/protected/delete-account/request`,
14953
+ return pe(
14954
+ `${Ae}/protected/delete-account/request`,
14947
14955
  "POST",
14948
14956
  e,
14949
14957
  "Failed to request account deletion"
14950
14958
  );
14951
14959
  }
14952
- async function Tw(r, e) {
14960
+ async function Nw(r, e) {
14953
14961
  const t = {
14954
14962
  confirmation_code: r,
14955
14963
  plaintext_secret: e
14956
14964
  };
14957
- return we(
14958
- `${Ee}/protected/delete-account/confirm`,
14965
+ return pe(
14966
+ `${Ae}/protected/delete-account/confirm`,
14959
14967
  "POST",
14960
14968
  t,
14961
14969
  "Failed to confirm account deletion"
14962
14970
  );
14963
14971
  }
14964
- async function By(r) {
14972
+ async function Oy(r) {
14965
14973
  try {
14966
14974
  const e = await gy(
14967
- `${Ee}/v1/models`,
14975
+ `${Ae}/v1/models`,
14968
14976
  "GET",
14969
14977
  void 0,
14970
14978
  "Failed to fetch models",
@@ -14980,30 +14988,30 @@ async function By(r) {
14980
14988
  }
14981
14989
  }
14982
14990
  const wd = 10 * 1024 * 1024;
14983
- function Nw(r) {
14991
+ function Pw(r) {
14984
14992
  return new Promise((e) => setTimeout(e, r));
14985
14993
  }
14986
- async function Oy(r) {
14987
- return we(
14988
- `${Ee}/protected/api-keys`,
14994
+ async function Ty(r) {
14995
+ return pe(
14996
+ `${Ae}/protected/api-keys`,
14989
14997
  "POST",
14990
14998
  { name: r },
14991
14999
  "Failed to create API key"
14992
15000
  );
14993
15001
  }
14994
- async function Ty() {
14995
- const r = await we(
14996
- `${Ee}/protected/api-keys`,
15002
+ async function Ny() {
15003
+ const r = await pe(
15004
+ `${Ae}/protected/api-keys`,
14997
15005
  "GET",
14998
15006
  void 0,
14999
15007
  "Failed to list API keys"
15000
15008
  );
15001
15009
  return r.keys.sort((e, t) => new Date(t.created_at).getTime() - new Date(e.created_at).getTime()), r;
15002
15010
  }
15003
- async function Ny(r) {
15011
+ async function Py(r) {
15004
15012
  const e = encodeURIComponent(r);
15005
- return we(
15006
- `${Ee}/protected/api-keys/${e}`,
15013
+ return pe(
15014
+ `${Ae}/protected/api-keys/${e}`,
15007
15015
  "DELETE",
15008
15016
  void 0,
15009
15017
  "Failed to delete API key"
@@ -15016,8 +15024,8 @@ async function Ef(r) {
15016
15024
  filename: r instanceof File ? r.name : "document",
15017
15025
  content_base64: n
15018
15026
  };
15019
- return we(
15020
- `${Ee}/v1/documents/upload`,
15027
+ return pe(
15028
+ `${Ae}/v1/documents/upload`,
15021
15029
  "POST",
15022
15030
  s,
15023
15031
  "Failed to upload document"
@@ -15027,14 +15035,14 @@ async function If(r) {
15027
15035
  const e = {
15028
15036
  task_id: r
15029
15037
  };
15030
- return we(
15031
- `${Ee}/v1/documents/status`,
15038
+ return pe(
15039
+ `${Ae}/v1/documents/status`,
15032
15040
  "POST",
15033
15041
  e,
15034
15042
  "Failed to check document status"
15035
15043
  );
15036
15044
  }
15037
- async function Py(r, e) {
15045
+ async function jy(r, e) {
15038
15046
  const { pollInterval: t = 2e3, maxAttempts: n = 150, onProgress: i } = e || {}, s = await Ef(r);
15039
15047
  let o = 0;
15040
15048
  for (; o < n; ) {
@@ -15048,7 +15056,7 @@ async function Py(r, e) {
15048
15056
  throw new Error(c.error || "Document processing failed");
15049
15057
  case "pending":
15050
15058
  case "started":
15051
- await Nw(t), o++;
15059
+ await Pw(t), o++;
15052
15060
  break;
15053
15061
  default:
15054
15062
  throw new Error(`Unknown document status: ${c.status}`);
@@ -15056,7 +15064,7 @@ async function Py(r, e) {
15056
15064
  }
15057
15065
  throw new Error("Document processing timed out");
15058
15066
  }
15059
- async function jy(r, e, t, n, i, s) {
15067
+ async function Ry(r, e, t, n, i, s) {
15060
15068
  const o = await r.arrayBuffer(), c = new Uint8Array(o), u = _r(c), h = r instanceof File ? r.name : "audio", v = r.type || "audio/mpeg", b = {
15061
15069
  file: u,
15062
15070
  filename: h,
@@ -15067,124 +15075,124 @@ async function jy(r, e, t, n, i, s) {
15067
15075
  ...i !== void 0 && { temperature: i }
15068
15076
  };
15069
15077
  return gy(
15070
- `${Ee}/v1/audio/transcriptions`,
15078
+ `${Ae}/v1/audio/transcriptions`,
15071
15079
  "POST",
15072
15080
  b,
15073
15081
  "Failed to transcribe audio",
15074
15082
  s
15075
15083
  );
15076
15084
  }
15077
- async function Ry(r) {
15078
- let e = `${Ee}/v1/responses`;
15085
+ async function Uy(r) {
15086
+ let e = `${Ae}/v1/responses`;
15079
15087
  const t = [];
15080
- return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), r != null && r.order && t.push(`order=${encodeURIComponent(r.order)}`), t.length > 0 && (e += `?${t.join("&")}`), we(
15088
+ return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), r != null && r.order && t.push(`order=${encodeURIComponent(r.order)}`), t.length > 0 && (e += `?${t.join("&")}`), pe(
15081
15089
  e,
15082
15090
  "GET",
15083
15091
  void 0,
15084
15092
  "Failed to list responses"
15085
15093
  );
15086
15094
  }
15087
- async function Uy(r) {
15088
- return we(
15089
- `${Ee}/v1/responses/${encodeURIComponent(r)}`,
15095
+ async function Dy(r) {
15096
+ return pe(
15097
+ `${Ae}/v1/responses/${encodeURIComponent(r)}`,
15090
15098
  "GET",
15091
15099
  void 0,
15092
15100
  "Failed to retrieve response"
15093
15101
  );
15094
15102
  }
15095
- async function Dy(r) {
15096
- return we(
15097
- `${Ee}/v1/responses/${encodeURIComponent(r)}/cancel`,
15103
+ async function $y(r) {
15104
+ return pe(
15105
+ `${Ae}/v1/responses/${encodeURIComponent(r)}/cancel`,
15098
15106
  "POST",
15099
15107
  void 0,
15100
15108
  "Failed to cancel response"
15101
15109
  );
15102
15110
  }
15103
- async function $y() {
15104
- return we(
15105
- `${Ee}/v1/conversations`,
15111
+ async function My() {
15112
+ return pe(
15113
+ `${Ae}/v1/conversations`,
15106
15114
  "DELETE",
15107
15115
  void 0,
15108
15116
  "Failed to delete conversations"
15109
15117
  );
15110
15118
  }
15111
- async function My(r) {
15112
- let e = `${Ee}/v1/conversations`;
15119
+ async function Vy(r) {
15120
+ let e = `${Ae}/v1/conversations`;
15113
15121
  const t = [];
15114
- return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), t.length > 0 && (e += `?${t.join("&")}`), we(
15122
+ return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), t.length > 0 && (e += `?${t.join("&")}`), pe(
15115
15123
  e,
15116
15124
  "GET",
15117
15125
  void 0,
15118
15126
  "Failed to list conversations"
15119
15127
  );
15120
15128
  }
15121
- async function Vy(r) {
15122
- return we(
15123
- `${Ee}/v1/responses`,
15129
+ async function Ly(r) {
15130
+ return pe(
15131
+ `${Ae}/v1/responses`,
15124
15132
  "POST",
15125
15133
  r,
15126
15134
  "Failed to create response"
15127
15135
  );
15128
15136
  }
15129
- async function Ly(r) {
15130
- return we(
15131
- `${Ee}/v1/responses/${encodeURIComponent(r)}`,
15137
+ async function Hy(r) {
15138
+ return pe(
15139
+ `${Ae}/v1/responses/${encodeURIComponent(r)}`,
15132
15140
  "DELETE",
15133
15141
  void 0,
15134
15142
  "Failed to delete response"
15135
15143
  );
15136
15144
  }
15137
- async function Hy(r) {
15138
- return we(
15139
- `${Ee}/v1/instructions`,
15145
+ async function Fy(r) {
15146
+ return pe(
15147
+ `${Ae}/v1/instructions`,
15140
15148
  "POST",
15141
15149
  r,
15142
15150
  "Failed to create instruction"
15143
15151
  );
15144
15152
  }
15145
- async function Fy(r) {
15146
- let e = `${Ee}/v1/instructions`;
15153
+ async function Gy(r) {
15154
+ let e = `${Ae}/v1/instructions`;
15147
15155
  const t = [];
15148
- return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), r != null && r.order && t.push(`order=${encodeURIComponent(r.order)}`), t.length > 0 && (e += `?${t.join("&")}`), we(
15156
+ return (r == null ? void 0 : r.limit) !== void 0 && t.push(`limit=${r.limit}`), r != null && r.after && t.push(`after=${encodeURIComponent(r.after)}`), r != null && r.before && t.push(`before=${encodeURIComponent(r.before)}`), r != null && r.order && t.push(`order=${encodeURIComponent(r.order)}`), t.length > 0 && (e += `?${t.join("&")}`), pe(
15149
15157
  e,
15150
15158
  "GET",
15151
15159
  void 0,
15152
15160
  "Failed to list instructions"
15153
15161
  );
15154
15162
  }
15155
- async function Gy(r) {
15156
- return we(
15157
- `${Ee}/v1/instructions/${encodeURIComponent(r)}`,
15163
+ async function zy(r) {
15164
+ return pe(
15165
+ `${Ae}/v1/instructions/${encodeURIComponent(r)}`,
15158
15166
  "GET",
15159
15167
  void 0,
15160
15168
  "Failed to retrieve instruction"
15161
15169
  );
15162
15170
  }
15163
- async function zy(r, e) {
15164
- return we(
15165
- `${Ee}/v1/instructions/${encodeURIComponent(r)}`,
15171
+ async function Ky(r, e) {
15172
+ return pe(
15173
+ `${Ae}/v1/instructions/${encodeURIComponent(r)}`,
15166
15174
  "POST",
15167
15175
  e,
15168
15176
  "Failed to update instruction"
15169
15177
  );
15170
15178
  }
15171
- async function Ky(r) {
15172
- return we(
15173
- `${Ee}/v1/instructions/${encodeURIComponent(r)}`,
15179
+ async function qy(r) {
15180
+ return pe(
15181
+ `${Ae}/v1/instructions/${encodeURIComponent(r)}`,
15174
15182
  "DELETE",
15175
15183
  void 0,
15176
15184
  "Failed to delete instruction"
15177
15185
  );
15178
15186
  }
15179
- async function qy(r) {
15180
- return we(
15181
- `${Ee}/v1/instructions/${encodeURIComponent(r)}/set-default`,
15187
+ async function Zy(r) {
15188
+ return pe(
15189
+ `${Ae}/v1/instructions/${encodeURIComponent(r)}/set-default`,
15182
15190
  "POST",
15183
15191
  void 0,
15184
15192
  "Failed to set default instruction"
15185
15193
  );
15186
15194
  }
15187
- function Pw(r) {
15195
+ function jw(r) {
15188
15196
  return async (e, t) => {
15189
15197
  var i, s;
15190
15198
  const n = () => {
@@ -15227,10 +15235,10 @@ function Pw(r) {
15227
15235
  if (I) break;
15228
15236
  const D = T.decode(P);
15229
15237
  m += D;
15230
- let pe;
15231
- for (; pe = jw(m); ) {
15232
- m = m.slice(pe.length);
15233
- const tt = pe.split(`
15238
+ let ye;
15239
+ for (; ye = Rw(m); ) {
15240
+ m = m.slice(ye.length);
15241
+ const tt = ye.split(`
15234
15242
  `);
15235
15243
  for (const De of tt)
15236
15244
  if (De.trim().startsWith("event: "))
@@ -15310,13 +15318,13 @@ function Pw(r) {
15310
15318
  }
15311
15319
  };
15312
15320
  }
15313
- function jw(r) {
15321
+ function Rw(r) {
15314
15322
  const e = r.indexOf(`
15315
15323
 
15316
15324
  `);
15317
15325
  return e === -1 ? null : r.slice(0, e + 2);
15318
15326
  }
15319
- const Rw = [
15327
+ const Uw = [
15320
15328
  "eeddbb58f57c38894d6d5af5e575fbe791c5bf3bbcfb5df8da8cfcf0c2e1da1913108e6a762112444740b88c163d7f4b",
15321
15329
  "74ed417f88cb0ca76c4a3d10f278bd010f1d3f95eafb254d4732511bb50e404507a4049b779c5230137e4091a5582271",
15322
15330
  "9043fcab93b972d3c14ad2dc8fa78ca7ad374fc937c02435681772a003f7a72876bc4d578089b5c4cf3fe9b480f1aabb",
@@ -15324,7 +15332,7 @@ const Rw = [
15324
15332
  "91cb67311e910cce68cd5b7d0de77aa40610d87c6681439b44c46c3ff786ae643956ab2c812478a1da8745b259f07a45",
15325
15333
  "859065ac81b81d3735130ba08b8af72a7256b603fefb74faabae25ed28cca6edcaa7c10ea32b5948d675c18a9b0f2b1d",
15326
15334
  "acd82a7d3943e23e95a9dc3ce0b0107ea358d6287f9e3afa245622f7c7e3e0a66142a928b6efcc02f594a95366d3a99d"
15327
- ], Uw = [
15335
+ ], Dw = [
15328
15336
  "62c0407056217a4c10764ed9045694c29fa93255d3cc04c2f989cdd9a1f8050c8b169714c71f1118ebce2fcc9951d1a9",
15329
15337
  "cb95519905443f9f66f05f63c548b61ad1561a27fd5717b69285861aaea3c3063fe12a2571773b67fea3c6c11b4d8ec6",
15330
15338
  "deb5895831b5e4286f5a2dcf5e9c27383821446f8df2b465f141d10743599be20ba3bb381ce063bf7139cc89f7f61d4c",
@@ -15332,14 +15340,14 @@ const Rw = [
15332
15340
  "669404ea71435b8f498b48db7816a5c2ab1d258b1a77685b11d84d15a73189504d79c4dee13a658de9f4a0cbfc39cfe8",
15333
15341
  "a791bf92c25ffdfd372660e460a0e238c6778c090672df6509ae4bc065cf8668b6baac6b6a11d554af53ee0ff0172ad5",
15334
15342
  "c4285443b87b9b12a6cea3bef1064ec060f652b235a297095975af8f134e5ed65f92d70d4616fdec80af9dff48bb9f35"
15335
- ], Dw = "MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEHiUY9kFWK1GqBGzczohhwEwElXzgWLDZa9R6wBx3JOBocgSt9+UIzZlJbPDjYeGBfDUXh7Z62BG2vVsh2NgclLB5S7A2ucBBtb1wd8vSQHP8jpdPhZX1slauPgbnROIP", $w = {
15343
+ ], $w = "MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEHiUY9kFWK1GqBGzczohhwEwElXzgWLDZa9R6wBx3JOBocgSt9+UIzZlJbPDjYeGBfDUXh7Z62BG2vVsh2NgclLB5S7A2ucBBtb1wd8vSQHP8jpdPhZX1slauPgbnROIP", Mw = {
15336
15344
  prod: "https://raw.githubusercontent.com/OpenSecretCloud/opensecret/master/pcrProdHistory.json",
15337
15345
  dev: "https://raw.githubusercontent.com/OpenSecretCloud/opensecret/master/pcrDevHistory.json"
15338
15346
  };
15339
- async function Mw() {
15347
+ async function Vw() {
15340
15348
  try {
15341
15349
  const r = new Uint8Array(
15342
- atob(Dw).split("").map((e) => e.charCodeAt(0))
15350
+ atob($w).split("").map((e) => e.charCodeAt(0))
15343
15351
  );
15344
15352
  return await crypto.subtle.importKey(
15345
15353
  "spki",
@@ -15361,9 +15369,9 @@ async function Mw() {
15361
15369
  throw console.error("Error importing verification key:", r), new Error("Failed to import PCR verification key");
15362
15370
  }
15363
15371
  }
15364
- async function Vw(r, e) {
15372
+ async function Lw(r, e) {
15365
15373
  try {
15366
- const t = (e == null ? void 0 : e[r]) || $w[r], n = await fetch(t);
15374
+ const t = (e == null ? void 0 : e[r]) || Mw[r], n = await fetch(t);
15367
15375
  if (!n.ok)
15368
15376
  throw new Error(`Failed to fetch PCR history: ${n.status}`);
15369
15377
  return await n.json();
@@ -15371,7 +15379,7 @@ async function Vw(r, e) {
15371
15379
  throw console.error("Error fetching PCR history:", t), new Error("Failed to fetch PCR history");
15372
15380
  }
15373
15381
  }
15374
- async function Lw(r, e, t) {
15382
+ async function Hw(r, e, t) {
15375
15383
  try {
15376
15384
  const i = new TextEncoder().encode(r), s = new Uint8Array(
15377
15385
  atob(e).split("").map((o) => o.charCodeAt(0))
@@ -15392,9 +15400,9 @@ async function Lw(r, e, t) {
15392
15400
  }
15393
15401
  async function bd(r, e, t) {
15394
15402
  try {
15395
- const n = await Mw(), i = await Vw(e, t);
15403
+ const n = await Vw(), i = await Lw(e, t);
15396
15404
  for (const s of i)
15397
- if (s.PCR0 === r && await Lw(s.PCR0, s.signature, n))
15405
+ if (s.PCR0 === r && await Hw(s.PCR0, s.signature, n))
15398
15406
  return {
15399
15407
  isMatch: !0,
15400
15408
  text: "PCR0 matches remotely attested value",
@@ -15405,8 +15413,8 @@ async function bd(r, e, t) {
15405
15413
  return console.error("PCR remote validation error:", n), null;
15406
15414
  }
15407
15415
  }
15408
- async function Hw(r, e) {
15409
- const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...Rw], n = [...(e == null ? void 0 : e.pcr0DevValues) || [], ...Uw];
15416
+ async function Fw(r, e) {
15417
+ const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...Uw], n = [...(e == null ? void 0 : e.pcr0DevValues) || [], ...Dw];
15410
15418
  if (t.includes(r))
15411
15419
  return {
15412
15420
  isMatch: !0,
@@ -15442,21 +15450,21 @@ async function Hw(r, e) {
15442
15450
  };
15443
15451
  }
15444
15452
  const ts = Ua, $c = "641a0321a3e244efe456463195d606317ed7cdcc3c1756e09893f3c68f79bb5b";
15445
- function Zy(r) {
15453
+ function Wy(r) {
15446
15454
  return Array.from(r).map((e) => e.toString(16).padStart(2, "0")).join("");
15447
15455
  }
15448
- async function Fw(r) {
15456
+ async function Gw(r) {
15449
15457
  const e = await crypto.subtle.digest("SHA-256", r);
15450
- return Zy(new Uint8Array(e));
15458
+ return Wy(new Uint8Array(e));
15451
15459
  }
15452
15460
  async function rs(r, e, t) {
15453
15461
  console.log("Raw timestamp:", r.timestamp), console.log("Date object:", new Date(r.timestamp));
15454
15462
  const n = Array.from(r.pcrs.entries()).map(([v, b]) => ({
15455
15463
  id: v,
15456
- value: Zy(b)
15464
+ value: Wy(b)
15457
15465
  })).filter((v) => !v.value.match(/^0+$/)), i = n.find((v) => v.id === 0);
15458
15466
  let s = null;
15459
- i && (s = await Hw(i.value, t));
15467
+ i && (s = await Fw(i.value, t));
15460
15468
  const o = [...e, r.certificate].map((v) => {
15461
15469
  const b = new wi(v);
15462
15470
  return {
@@ -15466,7 +15474,7 @@ async function rs(r, e, t) {
15466
15474
  pem: b.toString("pem"),
15467
15475
  isRoot: b.subject === "C=US, O=Amazon, OU=AWS, CN=aws.nitro-enclaves"
15468
15476
  };
15469
- }), c = new TextDecoder(), u = new wi(e[0]), h = await Fw(u.rawData);
15477
+ }), c = new TextDecoder(), u = new wi(e[0]), h = await Gw(u.rawData);
15470
15478
  return {
15471
15479
  moduleId: r.module_id,
15472
15480
  publicKey: r.public_key ? _r(r.public_key) : null,
@@ -15488,7 +15496,7 @@ async function rs(r, e, t) {
15488
15496
  validatedPcr0Hash: s
15489
15497
  };
15490
15498
  }
15491
- const Wy = _d({
15499
+ const Yy = _d({
15492
15500
  auth: {
15493
15501
  loading: !0,
15494
15502
  user: void 0
@@ -15513,16 +15521,17 @@ const Wy = _d({
15513
15521
  },
15514
15522
  signOut: async () => {
15515
15523
  },
15516
- get: wy,
15524
+ get: by,
15517
15525
  put: vy,
15518
- list: by,
15526
+ list: xy,
15519
15527
  del: my,
15520
- verifyEmail: xy,
15528
+ delAll: wy,
15529
+ verifyEmail: Ay,
15521
15530
  requestNewVerificationCode: Ma,
15522
15531
  requestNewVerificationEmail: Ma,
15523
15532
  refetchUser: async () => {
15524
15533
  },
15525
- changePassword: Ay,
15534
+ changePassword: Sy,
15526
15535
  refreshAccessToken: Dc,
15527
15536
  requestPasswordReset: async () => {
15528
15537
  },
@@ -15543,10 +15552,10 @@ const Wy = _d({
15543
15552
  },
15544
15553
  handleAppleNativeSignIn: async () => {
15545
15554
  },
15546
- getPrivateKey: Sy,
15547
- getPrivateKeyBytes: _y,
15548
- getPublicKey: Iy,
15549
- signMessage: Ey,
15555
+ getPrivateKey: _y,
15556
+ getPrivateKeyBytes: Ey,
15557
+ getPublicKey: ky,
15558
+ signMessage: Iy,
15550
15559
  aiCustomFetch: async () => new Response(),
15551
15560
  apiUrl: "",
15552
15561
  pcrConfig: {},
@@ -15559,31 +15568,31 @@ const Wy = _d({
15559
15568
  throw new Error("getAttestationDocument called outside of OpenSecretProvider");
15560
15569
  },
15561
15570
  generateThirdPartyToken: async () => ({ token: "" }),
15562
- encryptData: ky,
15563
- decryptData: Cy,
15564
- fetchModels: By,
15571
+ encryptData: Cy,
15572
+ decryptData: By,
15573
+ fetchModels: Oy,
15565
15574
  uploadDocument: Ef,
15566
15575
  checkDocumentStatus: If,
15567
- uploadDocumentWithPolling: Py,
15568
- createApiKey: Oy,
15569
- listApiKeys: Ty,
15570
- deleteApiKey: Ny,
15571
- transcribeAudio: jy,
15572
- fetchResponsesList: Ry,
15573
- fetchResponse: Uy,
15574
- cancelResponse: Dy,
15575
- deleteResponse: Ly,
15576
- createResponse: Vy,
15577
- listConversations: My,
15578
- deleteConversations: $y,
15579
- createInstruction: Hy,
15580
- listInstructions: Fy,
15581
- getInstruction: Gy,
15582
- updateInstruction: zy,
15583
- deleteInstruction: Ky,
15584
- setDefaultInstruction: qy
15576
+ uploadDocumentWithPolling: jy,
15577
+ createApiKey: Ty,
15578
+ listApiKeys: Ny,
15579
+ deleteApiKey: Py,
15580
+ transcribeAudio: Ry,
15581
+ fetchResponsesList: Uy,
15582
+ fetchResponse: Dy,
15583
+ cancelResponse: $y,
15584
+ deleteResponse: Hy,
15585
+ createResponse: Ly,
15586
+ listConversations: Vy,
15587
+ deleteConversations: My,
15588
+ createInstruction: Fy,
15589
+ listInstructions: Gy,
15590
+ getInstruction: zy,
15591
+ updateInstruction: Ky,
15592
+ deleteInstruction: qy,
15593
+ setDefaultInstruction: Zy
15585
15594
  });
15586
- function Gx({
15595
+ function zx({
15587
15596
  children: r,
15588
15597
  apiUrl: e,
15589
15598
  clientId: t,
@@ -15613,12 +15622,12 @@ function Gx({
15613
15622
  throw new Error(
15614
15623
  "OpenSecretProvider requires a non-empty clientId. Please provide a valid project UUID."
15615
15624
  );
15616
- lw(e), Promise.resolve().then(() => yy).then(({ apiConfig: ue }) => {
15625
+ uw(e), Promise.resolve().then(() => yy).then(({ apiConfig: ue }) => {
15617
15626
  const fe = ue.platformApiUrl || "";
15618
15627
  ue.configure(e, fe);
15619
15628
  });
15620
15629
  }, [e, t]), Os(() => {
15621
- h(e ? () => Pw(o ? { apiKey: o } : void 0) : void 0);
15630
+ h(e ? () => jw(o ? { apiKey: o } : void 0) : void 0);
15622
15631
  }, [e, o]);
15623
15632
  async function b() {
15624
15633
  const ue = window.localStorage.getItem("access_token"), fe = window.localStorage.getItem("refresh_token");
@@ -15630,13 +15639,13 @@ function Gx({
15630
15639
  return;
15631
15640
  }
15632
15641
  try {
15633
- const ye = await yw();
15642
+ const ge = await gw();
15634
15643
  s({
15635
15644
  loading: !1,
15636
- user: ye
15645
+ user: ge
15637
15646
  });
15638
- } catch (ye) {
15639
- console.error("Failed to fetch user:", ye), s({
15647
+ } catch (ge) {
15648
+ console.error("Failed to fetch user:", ge), s({
15640
15649
  loading: !1,
15641
15650
  user: void 0
15642
15651
  });
@@ -15648,20 +15657,20 @@ function Gx({
15648
15657
  async function H(ue, fe) {
15649
15658
  console.log("Signing in");
15650
15659
  try {
15651
- const { access_token: ye, refresh_token: Ae } = await fw(ue, fe, t);
15652
- window.localStorage.setItem("access_token", ye), window.localStorage.setItem("refresh_token", Ae), v(void 0), await b();
15653
- } catch (ye) {
15654
- throw console.error(ye), ye;
15660
+ const { access_token: ge, refresh_token: Se } = await hw(ue, fe, t);
15661
+ window.localStorage.setItem("access_token", ge), window.localStorage.setItem("refresh_token", Se), v(void 0), await b();
15662
+ } catch (ge) {
15663
+ throw console.error(ge), ge;
15655
15664
  }
15656
15665
  }
15657
- async function T(ue, fe, ye, Ae) {
15666
+ async function T(ue, fe, ge, Se) {
15658
15667
  try {
15659
- const { access_token: Re, refresh_token: Je } = await dw(
15668
+ const { access_token: Re, refresh_token: Je } = await pw(
15660
15669
  ue,
15661
15670
  fe,
15662
- ye,
15671
+ ge,
15663
15672
  t,
15664
- Ae || null
15673
+ Se || null
15665
15674
  );
15666
15675
  window.localStorage.setItem("access_token", Re), window.localStorage.setItem("refresh_token", Je), v(void 0), await b();
15667
15676
  } catch (Re) {
@@ -15671,36 +15680,36 @@ function Gx({
15671
15680
  async function m(ue, fe) {
15672
15681
  console.log("Signing in Guest");
15673
15682
  try {
15674
- const { access_token: ye, refresh_token: Ae } = await hw(ue, fe, t);
15675
- window.localStorage.setItem("access_token", ye), window.localStorage.setItem("refresh_token", Ae), v(void 0), await b();
15676
- } catch (ye) {
15677
- throw console.error(ye), ye;
15683
+ const { access_token: ge, refresh_token: Se } = await dw(ue, fe, t);
15684
+ window.localStorage.setItem("access_token", ge), window.localStorage.setItem("refresh_token", Se), v(void 0), await b();
15685
+ } catch (ge) {
15686
+ throw console.error(ge), ge;
15678
15687
  }
15679
15688
  }
15680
15689
  async function A(ue, fe) {
15681
15690
  try {
15682
- const { access_token: ye, refresh_token: Ae, id: Re } = await pw(
15691
+ const { access_token: ge, refresh_token: Se, id: Re } = await yw(
15683
15692
  ue,
15684
15693
  fe,
15685
15694
  t
15686
15695
  );
15687
- return window.localStorage.setItem("access_token", ye), window.localStorage.setItem("refresh_token", Ae), v(void 0), await b(), { access_token: ye, refresh_token: Ae, id: Re };
15688
- } catch (ye) {
15689
- throw console.error(ye), ye;
15696
+ return window.localStorage.setItem("access_token", ge), window.localStorage.setItem("refresh_token", Se), v(void 0), await b(), { access_token: ge, refresh_token: Se, id: Re };
15697
+ } catch (ge) {
15698
+ throw console.error(ge), ge;
15690
15699
  }
15691
15700
  }
15692
- async function k(ue, fe, ye) {
15701
+ async function k(ue, fe, ge) {
15693
15702
  try {
15694
- await Cw(ue, fe, ye), await b();
15695
- } catch (Ae) {
15696
- throw console.error(Ae), Ae;
15703
+ await Bw(ue, fe, ge), await b();
15704
+ } catch (Se) {
15705
+ throw console.error(Se), Se;
15697
15706
  }
15698
15707
  }
15699
15708
  async function I() {
15700
15709
  const ue = window.localStorage.getItem("refresh_token");
15701
15710
  if (ue)
15702
15711
  try {
15703
- await gw(ue);
15712
+ await vw(ue);
15704
15713
  } catch (fe) {
15705
15714
  console.error("Error during logout:", fe);
15706
15715
  }
@@ -15720,93 +15729,94 @@ function Gx({
15720
15729
  signUp: T,
15721
15730
  signUpGuest: A,
15722
15731
  convertGuestToUserAccount: k,
15723
- get: wy,
15732
+ get: by,
15724
15733
  put: vy,
15725
- list: by,
15734
+ list: xy,
15726
15735
  del: my,
15736
+ delAll: wy,
15727
15737
  refetchUser: b,
15728
- verifyEmail: xy,
15738
+ verifyEmail: Ay,
15729
15739
  requestNewVerificationCode: Ma,
15730
15740
  requestNewVerificationEmail: Ma,
15731
- changePassword: Ay,
15741
+ changePassword: Sy,
15732
15742
  refreshAccessToken: Dc,
15733
- requestPasswordReset: (ue, fe) => ww(ue, fe, t),
15734
- confirmPasswordReset: (ue, fe, ye, Ae) => bw(ue, fe, ye, Ae, t),
15735
- requestAccountDeletion: Ow,
15736
- confirmAccountDeletion: Tw,
15743
+ requestPasswordReset: (ue, fe) => bw(ue, fe, t),
15744
+ confirmPasswordReset: (ue, fe, ge, Se) => xw(ue, fe, ge, Se, t),
15745
+ requestAccountDeletion: Tw,
15746
+ confirmAccountDeletion: Nw,
15737
15747
  initiateGitHubAuth: async (ue) => {
15738
15748
  try {
15739
- return await xw(t, ue);
15749
+ return await Aw(t, ue);
15740
15750
  } catch (fe) {
15741
15751
  throw console.error("Failed to initiate GitHub auth:", fe), fe;
15742
15752
  }
15743
15753
  },
15744
- handleGitHubCallback: async (ue, fe, ye) => {
15754
+ handleGitHubCallback: async (ue, fe, ge) => {
15745
15755
  try {
15746
- const { access_token: Ae, refresh_token: Re } = await Aw(
15756
+ const { access_token: Se, refresh_token: Re } = await Sw(
15747
15757
  ue,
15748
15758
  fe,
15749
- ye
15759
+ ge
15750
15760
  );
15751
- window.localStorage.setItem("access_token", Ae), window.localStorage.setItem("refresh_token", Re), v(void 0), await b();
15752
- } catch (Ae) {
15753
- throw console.error("GitHub callback error:", Ae), Ae;
15761
+ window.localStorage.setItem("access_token", Se), window.localStorage.setItem("refresh_token", Re), v(void 0), await b();
15762
+ } catch (Se) {
15763
+ throw console.error("GitHub callback error:", Se), Se;
15754
15764
  }
15755
15765
  },
15756
15766
  initiateGoogleAuth: async (ue) => {
15757
15767
  try {
15758
- return await Sw(t, ue);
15768
+ return await _w(t, ue);
15759
15769
  } catch (fe) {
15760
15770
  throw console.error("Failed to initiate Google auth:", fe), fe;
15761
15771
  }
15762
15772
  },
15763
- handleGoogleCallback: async (ue, fe, ye) => {
15773
+ handleGoogleCallback: async (ue, fe, ge) => {
15764
15774
  try {
15765
- const { access_token: Ae, refresh_token: Re } = await _w(
15775
+ const { access_token: Se, refresh_token: Re } = await Ew(
15766
15776
  ue,
15767
15777
  fe,
15768
- ye
15778
+ ge
15769
15779
  );
15770
- window.localStorage.setItem("access_token", Ae), window.localStorage.setItem("refresh_token", Re), v(void 0), await b();
15771
- } catch (Ae) {
15772
- throw console.error("Google callback error:", Ae), Ae;
15780
+ window.localStorage.setItem("access_token", Se), window.localStorage.setItem("refresh_token", Re), v(void 0), await b();
15781
+ } catch (Se) {
15782
+ throw console.error("Google callback error:", Se), Se;
15773
15783
  }
15774
15784
  },
15775
15785
  initiateAppleAuth: async (ue) => {
15776
15786
  try {
15777
- return await Ew(t, ue);
15787
+ return await Iw(t, ue);
15778
15788
  } catch (fe) {
15779
15789
  throw console.error("Failed to initiate Apple auth:", fe), fe;
15780
15790
  }
15781
15791
  },
15782
- handleAppleCallback: async (ue, fe, ye) => {
15792
+ handleAppleCallback: async (ue, fe, ge) => {
15783
15793
  try {
15784
- const { access_token: Ae, refresh_token: Re } = await Iw(
15794
+ const { access_token: Se, refresh_token: Re } = await kw(
15785
15795
  ue,
15786
15796
  fe,
15787
- ye
15797
+ ge
15788
15798
  );
15789
- window.localStorage.setItem("access_token", Ae), window.localStorage.setItem("refresh_token", Re), v(void 0), await b();
15790
- } catch (Ae) {
15791
- throw console.error("Apple callback error:", Ae), Ae;
15799
+ window.localStorage.setItem("access_token", Se), window.localStorage.setItem("refresh_token", Re), v(void 0), await b();
15800
+ } catch (Se) {
15801
+ throw console.error("Apple callback error:", Se), Se;
15792
15802
  }
15793
15803
  },
15794
15804
  handleAppleNativeSignIn: async (ue, fe) => {
15795
15805
  try {
15796
- const { access_token: ye, refresh_token: Ae } = await kw(
15806
+ const { access_token: ge, refresh_token: Se } = await Cw(
15797
15807
  ue,
15798
15808
  t,
15799
15809
  fe
15800
15810
  );
15801
- window.localStorage.setItem("access_token", ye), window.localStorage.setItem("refresh_token", Ae), v(void 0), await b();
15802
- } catch (ye) {
15803
- throw console.error("Apple native sign-in error:", ye), ye;
15811
+ window.localStorage.setItem("access_token", ge), window.localStorage.setItem("refresh_token", Se), v(void 0), await b();
15812
+ } catch (ge) {
15813
+ throw console.error("Apple native sign-in error:", ge), ge;
15804
15814
  }
15805
15815
  },
15806
- getPrivateKey: Sy,
15807
- getPrivateKeyBytes: _y,
15808
- getPublicKey: Iy,
15809
- signMessage: Ey,
15816
+ getPrivateKey: _y,
15817
+ getPrivateKeyBytes: Ey,
15818
+ getPublicKey: ky,
15819
+ signMessage: Iy,
15810
15820
  aiCustomFetch: u || (async () => new Response()),
15811
15821
  apiUrl: e,
15812
15822
  pcrConfig: n,
@@ -15819,41 +15829,41 @@ function Gx({
15819
15829
  const ue = window.crypto.randomUUID(), fe = await fetch(`${e}/attestation/${ue}`);
15820
15830
  if (!fe.ok)
15821
15831
  throw new Error("Failed to fetch attestation document");
15822
- const ye = await fe.json(), Ae = await Si(
15823
- ye.attestation_document,
15832
+ const ge = await fe.json(), Se = await Si(
15833
+ ge.attestation_document,
15824
15834
  ts,
15825
15835
  ue
15826
15836
  );
15827
- return rs(Ae, Ae.cabundle, n);
15837
+ return rs(Se, Se.cabundle, n);
15828
15838
  },
15829
- generateThirdPartyToken: Bw,
15830
- encryptData: ky,
15831
- decryptData: Cy,
15832
- fetchModels: By,
15839
+ generateThirdPartyToken: Ow,
15840
+ encryptData: Cy,
15841
+ decryptData: By,
15842
+ fetchModels: Oy,
15833
15843
  uploadDocument: Ef,
15834
15844
  checkDocumentStatus: If,
15835
- uploadDocumentWithPolling: Py,
15836
- createApiKey: Oy,
15837
- listApiKeys: Ty,
15838
- deleteApiKey: Ny,
15839
- transcribeAudio: jy,
15840
- fetchResponsesList: Ry,
15841
- fetchResponse: Uy,
15842
- cancelResponse: Dy,
15843
- deleteResponse: Ly,
15844
- createResponse: Vy,
15845
- listConversations: My,
15846
- deleteConversations: $y,
15847
- createInstruction: Hy,
15848
- listInstructions: Fy,
15849
- getInstruction: Gy,
15850
- updateInstruction: zy,
15851
- deleteInstruction: Ky,
15852
- setDefaultInstruction: qy
15845
+ uploadDocumentWithPolling: jy,
15846
+ createApiKey: Ty,
15847
+ listApiKeys: Ny,
15848
+ deleteApiKey: Py,
15849
+ transcribeAudio: Ry,
15850
+ fetchResponsesList: Uy,
15851
+ fetchResponse: Dy,
15852
+ cancelResponse: $y,
15853
+ deleteResponse: Hy,
15854
+ createResponse: Ly,
15855
+ listConversations: Vy,
15856
+ deleteConversations: My,
15857
+ createInstruction: Fy,
15858
+ listInstructions: Gy,
15859
+ getInstruction: zy,
15860
+ updateInstruction: Ky,
15861
+ deleteInstruction: qy,
15862
+ setDefaultInstruction: Zy
15853
15863
  };
15854
- return /* @__PURE__ */ Sd(Wy.Provider, { value: pt, children: r });
15864
+ return /* @__PURE__ */ Sd(Yy.Provider, { value: pt, children: r });
15855
15865
  }
15856
- const Yy = _d({
15866
+ const Jy = _d({
15857
15867
  auth: {
15858
15868
  loading: !0,
15859
15869
  developer: void 0
@@ -15910,7 +15920,7 @@ const Yy = _d({
15910
15920
  acceptInvite: uy,
15911
15921
  apiUrl: ""
15912
15922
  });
15913
- function zx({
15923
+ function Kx({
15914
15924
  children: r,
15915
15925
  apiUrl: e,
15916
15926
  pcrConfig: t = {}
@@ -15924,7 +15934,7 @@ function zx({
15924
15934
  throw new Error(
15925
15935
  "OpenSecretDeveloper requires a non-empty apiUrl. Please provide a valid API endpoint URL."
15926
15936
  );
15927
- tw(e), Promise.resolve().then(() => yy).then(({ apiConfig: v }) => {
15937
+ rw(e), Promise.resolve().then(() => yy).then(({ apiConfig: v }) => {
15928
15938
  const b = v.appApiUrl || "";
15929
15939
  v.configure(b, e);
15930
15940
  }).catch((v) => {
@@ -15943,7 +15953,7 @@ function zx({
15943
15953
  return;
15944
15954
  }
15945
15955
  try {
15946
- const H = await aw();
15956
+ const H = await cw();
15947
15957
  i({
15948
15958
  loading: !1,
15949
15959
  developer: {
@@ -15974,7 +15984,7 @@ function zx({
15974
15984
  }, []);
15975
15985
  async function c(v, b) {
15976
15986
  try {
15977
- const { access_token: H, refresh_token: T } = await rw(v, b);
15987
+ const { access_token: H, refresh_token: T } = await nw(v, b);
15978
15988
  return window.localStorage.setItem("access_token", H), window.localStorage.setItem("refresh_token", T), await s(), { access_token: H, refresh_token: T, id: "", email: v };
15979
15989
  } catch (H) {
15980
15990
  throw console.error("Login error:", H), H;
@@ -15982,7 +15992,7 @@ function zx({
15982
15992
  }
15983
15993
  async function u(v, b, H, T) {
15984
15994
  try {
15985
- const { access_token: m, refresh_token: A } = await nw(
15995
+ const { access_token: m, refresh_token: A } = await iw(
15986
15996
  v,
15987
15997
  b,
15988
15998
  H,
@@ -16002,7 +16012,7 @@ function zx({
16002
16012
  const v = window.localStorage.getItem("refresh_token");
16003
16013
  if (v)
16004
16014
  try {
16005
- await iw(v);
16015
+ await sw(v);
16006
16016
  } catch (b) {
16007
16017
  console.error("Error during logout:", b);
16008
16018
  }
@@ -16049,34 +16059,34 @@ function zx({
16049
16059
  acceptInvite: uy,
16050
16060
  apiUrl: e
16051
16061
  };
16052
- return /* @__PURE__ */ Sd(Yy.Provider, { value: h, children: r });
16053
- }
16054
- function Kx() {
16055
- return Ed(Wy);
16062
+ return /* @__PURE__ */ Sd(Jy.Provider, { value: h, children: r });
16056
16063
  }
16057
16064
  function qx() {
16058
16065
  return Ed(Yy);
16059
16066
  }
16060
16067
  function Zx() {
16068
+ return Ed(Jy);
16069
+ }
16070
+ function Wx() {
16061
16071
  const r = new Uint8Array(32);
16062
16072
  return crypto.getRandomValues(r), Array.from(r, (e) => e.toString(16).padStart(2, "0")).join("");
16063
16073
  }
16064
- async function Wx(r) {
16074
+ async function Yx(r) {
16065
16075
  const t = new TextEncoder().encode(r), n = await crypto.subtle.digest("SHA-256", t);
16066
16076
  return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, "0")).join("");
16067
16077
  }
16068
16078
  export {
16069
- Wy as OpenSecretContext,
16070
- zx as OpenSecretDeveloper,
16071
- Yy as OpenSecretDeveloperContext,
16072
- Gx as OpenSecretProvider,
16079
+ Yy as OpenSecretContext,
16080
+ Kx as OpenSecretDeveloper,
16081
+ Jy as OpenSecretDeveloperContext,
16082
+ zx as OpenSecretProvider,
16073
16083
  $a as apiConfig,
16074
- Oy as createApiKey,
16075
- Pw as createCustomFetch,
16076
- Ny as deleteApiKey,
16077
- Zx as generateSecureSecret,
16078
- Wx as hashSecret,
16079
- Ty as listApiKeys,
16080
- Kx as useOpenSecret,
16081
- qx as useOpenSecretDeveloper
16084
+ Ty as createApiKey,
16085
+ jw as createCustomFetch,
16086
+ Py as deleteApiKey,
16087
+ Wx as generateSecureSecret,
16088
+ Yx as hashSecret,
16089
+ Ny as listApiKeys,
16090
+ qx as useOpenSecret,
16091
+ Zx as useOpenSecretDeveloper
16082
16092
  };