@wral/report-it 0.1.1 → 0.1.3

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,4 +1,4 @@
1
- var cn = /* @__PURE__ */ (function() {
1
+ var dn = /* @__PURE__ */ (function() {
2
2
  function n(t) {
3
3
  var r = t || {}, i = r.ValidationData, s = r.Username, o = r.Password, l = r.AuthParameters, h = r.ClientMetadata;
4
4
  this.validationData = i || {}, this.authParameters = l || {}, this.clientMetadata = h || {}, this.username = s, this.password = o;
@@ -40,82 +40,82 @@ function Ut(n) {
40
40
  });
41
41
  }), t;
42
42
  }
43
- var rt = {}, ye = {}, zt;
44
- function hn() {
45
- if (zt) return ye;
46
- zt = 1, ye.byteLength = l, ye.toByteArray = d, ye.fromByteArray = v;
43
+ var rt = {}, we = {}, zt;
44
+ function pn() {
45
+ if (zt) return we;
46
+ zt = 1, we.byteLength = l, we.toByteArray = d, we.fromByteArray = y;
47
47
  for (var n = [], e = [], t = typeof Uint8Array < "u" ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, s = r.length; i < s; ++i)
48
48
  n[i] = r[i], e[r.charCodeAt(i)] = i;
49
49
  e[45] = 62, e[95] = 63;
50
- function o(y) {
51
- var S = y.length;
52
- if (S % 4 > 0)
50
+ function o(v) {
51
+ var b = v.length;
52
+ if (b % 4 > 0)
53
53
  throw new Error("Invalid string. Length must be a multiple of 4");
54
- var _ = y.indexOf("=");
55
- _ === -1 && (_ = S);
56
- var E = _ === S ? 0 : 4 - _ % 4;
57
- return [_, E];
54
+ var _ = v.indexOf("=");
55
+ _ === -1 && (_ = b);
56
+ var C = _ === b ? 0 : 4 - _ % 4;
57
+ return [_, C];
58
58
  }
59
- function l(y) {
60
- var S = o(y), _ = S[0], E = S[1];
61
- return (_ + E) * 3 / 4 - E;
59
+ function l(v) {
60
+ var b = o(v), _ = b[0], C = b[1];
61
+ return (_ + C) * 3 / 4 - C;
62
62
  }
63
- function h(y, S, _) {
64
- return (S + _) * 3 / 4 - _;
63
+ function h(v, b, _) {
64
+ return (b + _) * 3 / 4 - _;
65
65
  }
66
- function d(y) {
67
- var S, _ = o(y), E = _[0], x = _[1], U = new t(h(y, E, x)), P = 0, B = x > 0 ? E - 4 : E, F;
66
+ function d(v) {
67
+ var b, _ = o(v), C = _[0], E = _[1], T = new t(h(v, C, E)), P = 0, B = E > 0 ? C - 4 : C, F;
68
68
  for (F = 0; F < B; F += 4)
69
- S = e[y.charCodeAt(F)] << 18 | e[y.charCodeAt(F + 1)] << 12 | e[y.charCodeAt(F + 2)] << 6 | e[y.charCodeAt(F + 3)], U[P++] = S >> 16 & 255, U[P++] = S >> 8 & 255, U[P++] = S & 255;
70
- return x === 2 && (S = e[y.charCodeAt(F)] << 2 | e[y.charCodeAt(F + 1)] >> 4, U[P++] = S & 255), x === 1 && (S = e[y.charCodeAt(F)] << 10 | e[y.charCodeAt(F + 1)] << 4 | e[y.charCodeAt(F + 2)] >> 2, U[P++] = S >> 8 & 255, U[P++] = S & 255), U;
69
+ b = e[v.charCodeAt(F)] << 18 | e[v.charCodeAt(F + 1)] << 12 | e[v.charCodeAt(F + 2)] << 6 | e[v.charCodeAt(F + 3)], T[P++] = b >> 16 & 255, T[P++] = b >> 8 & 255, T[P++] = b & 255;
70
+ return E === 2 && (b = e[v.charCodeAt(F)] << 2 | e[v.charCodeAt(F + 1)] >> 4, T[P++] = b & 255), E === 1 && (b = e[v.charCodeAt(F)] << 10 | e[v.charCodeAt(F + 1)] << 4 | e[v.charCodeAt(F + 2)] >> 2, T[P++] = b >> 8 & 255, T[P++] = b & 255), T;
71
71
  }
72
- function p(y) {
73
- return n[y >> 18 & 63] + n[y >> 12 & 63] + n[y >> 6 & 63] + n[y & 63];
74
- }
75
- function m(y, S, _) {
76
- for (var E, x = [], U = S; U < _; U += 3)
77
- E = (y[U] << 16 & 16711680) + (y[U + 1] << 8 & 65280) + (y[U + 2] & 255), x.push(p(E));
78
- return x.join("");
79
- }
80
- function v(y) {
81
- for (var S, _ = y.length, E = _ % 3, x = [], U = 16383, P = 0, B = _ - E; P < B; P += U)
82
- x.push(m(y, P, P + U > B ? B : P + U));
83
- return E === 1 ? (S = y[_ - 1], x.push(
84
- n[S >> 2] + n[S << 4 & 63] + "=="
85
- )) : E === 2 && (S = (y[_ - 2] << 8) + y[_ - 1], x.push(
86
- n[S >> 10] + n[S >> 4 & 63] + n[S << 2 & 63] + "="
87
- )), x.join("");
72
+ function p(v) {
73
+ return n[v >> 18 & 63] + n[v >> 12 & 63] + n[v >> 6 & 63] + n[v & 63];
74
+ }
75
+ function m(v, b, _) {
76
+ for (var C, E = [], T = b; T < _; T += 3)
77
+ C = (v[T] << 16 & 16711680) + (v[T + 1] << 8 & 65280) + (v[T + 2] & 255), E.push(p(C));
78
+ return E.join("");
79
+ }
80
+ function y(v) {
81
+ for (var b, _ = v.length, C = _ % 3, E = [], T = 16383, P = 0, B = _ - C; P < B; P += T)
82
+ E.push(m(v, P, P + T > B ? B : P + T));
83
+ return C === 1 ? (b = v[_ - 1], E.push(
84
+ n[b >> 2] + n[b << 4 & 63] + "=="
85
+ )) : C === 2 && (b = (v[_ - 2] << 8) + v[_ - 1], E.push(
86
+ n[b >> 10] + n[b >> 4 & 63] + n[b << 2 & 63] + "="
87
+ )), E.join("");
88
88
  }
89
- return ye;
89
+ return we;
90
90
  }
91
91
  var Ke = {};
92
92
  var Wt;
93
- function fn() {
93
+ function gn() {
94
94
  return Wt || (Wt = 1, Ke.read = function(n, e, t, r, i) {
95
- var s, o, l = i * 8 - r - 1, h = (1 << l) - 1, d = h >> 1, p = -7, m = t ? i - 1 : 0, v = t ? -1 : 1, y = n[e + m];
96
- for (m += v, s = y & (1 << -p) - 1, y >>= -p, p += l; p > 0; s = s * 256 + n[e + m], m += v, p -= 8)
95
+ var s, o, l = i * 8 - r - 1, h = (1 << l) - 1, d = h >> 1, p = -7, m = t ? i - 1 : 0, y = t ? -1 : 1, v = n[e + m];
96
+ for (m += y, s = v & (1 << -p) - 1, v >>= -p, p += l; p > 0; s = s * 256 + n[e + m], m += y, p -= 8)
97
97
  ;
98
- for (o = s & (1 << -p) - 1, s >>= -p, p += r; p > 0; o = o * 256 + n[e + m], m += v, p -= 8)
98
+ for (o = s & (1 << -p) - 1, s >>= -p, p += r; p > 0; o = o * 256 + n[e + m], m += y, p -= 8)
99
99
  ;
100
100
  if (s === 0)
101
101
  s = 1 - d;
102
102
  else {
103
103
  if (s === h)
104
- return o ? NaN : (y ? -1 : 1) * (1 / 0);
104
+ return o ? NaN : (v ? -1 : 1) * (1 / 0);
105
105
  o = o + Math.pow(2, r), s = s - d;
106
106
  }
107
- return (y ? -1 : 1) * o * Math.pow(2, s - r);
107
+ return (v ? -1 : 1) * o * Math.pow(2, s - r);
108
108
  }, Ke.write = function(n, e, t, r, i, s) {
109
- var o, l, h, d = s * 8 - i - 1, p = (1 << d) - 1, m = p >> 1, v = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = r ? 0 : s - 1, S = r ? 1 : -1, _ = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
110
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (l = isNaN(e) ? 1 : 0, o = p) : (o = Math.floor(Math.log(e) / Math.LN2), e * (h = Math.pow(2, -o)) < 1 && (o--, h *= 2), o + m >= 1 ? e += v / h : e += v * Math.pow(2, 1 - m), e * h >= 2 && (o++, h /= 2), o + m >= p ? (l = 0, o = p) : o + m >= 1 ? (l = (e * h - 1) * Math.pow(2, i), o = o + m) : (l = e * Math.pow(2, m - 1) * Math.pow(2, i), o = 0)); i >= 8; n[t + y] = l & 255, y += S, l /= 256, i -= 8)
109
+ var o, l, h, d = s * 8 - i - 1, p = (1 << d) - 1, m = p >> 1, y = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, v = r ? 0 : s - 1, b = r ? 1 : -1, _ = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
110
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (l = isNaN(e) ? 1 : 0, o = p) : (o = Math.floor(Math.log(e) / Math.LN2), e * (h = Math.pow(2, -o)) < 1 && (o--, h *= 2), o + m >= 1 ? e += y / h : e += y * Math.pow(2, 1 - m), e * h >= 2 && (o++, h /= 2), o + m >= p ? (l = 0, o = p) : o + m >= 1 ? (l = (e * h - 1) * Math.pow(2, i), o = o + m) : (l = e * Math.pow(2, m - 1) * Math.pow(2, i), o = 0)); i >= 8; n[t + v] = l & 255, v += b, l /= 256, i -= 8)
111
111
  ;
112
- for (o = o << i | l, d += i; d > 0; n[t + y] = o & 255, y += S, o /= 256, d -= 8)
112
+ for (o = o << i | l, d += i; d > 0; n[t + v] = o & 255, v += b, o /= 256, d -= 8)
113
113
  ;
114
- n[t + y - S] |= _ * 128;
114
+ n[t + v - b] |= _ * 128;
115
115
  }), Ke;
116
116
  }
117
117
  var nt, Yt;
118
- function dn() {
118
+ function mn() {
119
119
  if (Yt) return nt;
120
120
  Yt = 1;
121
121
  var n = {}.toString;
@@ -124,10 +124,10 @@ function dn() {
124
124
  }, nt;
125
125
  }
126
126
  var Gt;
127
- function pn() {
127
+ function yn() {
128
128
  return Gt || (Gt = 1, (function(n) {
129
- var e = hn(), t = fn(), r = dn();
130
- n.Buffer = l, n.SlowBuffer = x, n.INSPECT_MAX_BYTES = 50, l.TYPED_ARRAY_SUPPORT = globalThis.TYPED_ARRAY_SUPPORT !== void 0 ? globalThis.TYPED_ARRAY_SUPPORT : i(), n.kMaxLength = s();
129
+ var e = pn(), t = gn(), r = mn();
130
+ n.Buffer = l, n.SlowBuffer = E, n.INSPECT_MAX_BYTES = 50, l.TYPED_ARRAY_SUPPORT = globalThis.TYPED_ARRAY_SUPPORT !== void 0 ? globalThis.TYPED_ARRAY_SUPPORT : i(), n.kMaxLength = s();
131
131
  function i() {
132
132
  try {
133
133
  var c = new Uint8Array(1);
@@ -166,7 +166,7 @@ function pn() {
166
166
  function h(c, a, u, f) {
167
167
  if (typeof a == "number")
168
168
  throw new TypeError('"value" argument must not be a number');
169
- return typeof ArrayBuffer < "u" && a instanceof ArrayBuffer ? S(c, a, u, f) : typeof a == "string" ? v(c, a, u) : _(c, a);
169
+ return typeof ArrayBuffer < "u" && a instanceof ArrayBuffer ? b(c, a, u, f) : typeof a == "string" ? y(c, a, u) : _(c, a);
170
170
  }
171
171
  l.from = function(c, a, u) {
172
172
  return h(null, c, a, u);
@@ -187,7 +187,7 @@ function pn() {
187
187
  return p(null, c, a, u);
188
188
  };
189
189
  function m(c, a) {
190
- if (d(a), c = o(c, a < 0 ? 0 : E(a) | 0), !l.TYPED_ARRAY_SUPPORT)
190
+ if (d(a), c = o(c, a < 0 ? 0 : C(a) | 0), !l.TYPED_ARRAY_SUPPORT)
191
191
  for (var u = 0; u < a; ++u)
192
192
  c[u] = 0;
193
193
  return c;
@@ -197,47 +197,47 @@ function pn() {
197
197
  }, l.allocUnsafeSlow = function(c) {
198
198
  return m(null, c);
199
199
  };
200
- function v(c, a, u) {
200
+ function y(c, a, u) {
201
201
  if ((typeof u != "string" || u === "") && (u = "utf8"), !l.isEncoding(u))
202
202
  throw new TypeError('"encoding" must be a valid string encoding');
203
- var f = U(a, u) | 0;
203
+ var f = T(a, u) | 0;
204
204
  c = o(c, f);
205
205
  var g = c.write(a, u);
206
206
  return g !== f && (c = c.slice(0, g)), c;
207
207
  }
208
- function y(c, a) {
209
- var u = a.length < 0 ? 0 : E(a.length) | 0;
208
+ function v(c, a) {
209
+ var u = a.length < 0 ? 0 : C(a.length) | 0;
210
210
  c = o(c, u);
211
211
  for (var f = 0; f < u; f += 1)
212
212
  c[f] = a[f] & 255;
213
213
  return c;
214
214
  }
215
- function S(c, a, u, f) {
215
+ function b(c, a, u, f) {
216
216
  if (a.byteLength, u < 0 || a.byteLength < u)
217
217
  throw new RangeError("'offset' is out of bounds");
218
218
  if (a.byteLength < u + (f || 0))
219
219
  throw new RangeError("'length' is out of bounds");
220
- return u === void 0 && f === void 0 ? a = new Uint8Array(a) : f === void 0 ? a = new Uint8Array(a, u) : a = new Uint8Array(a, u, f), l.TYPED_ARRAY_SUPPORT ? (c = a, c.__proto__ = l.prototype) : c = y(c, a), c;
220
+ return u === void 0 && f === void 0 ? a = new Uint8Array(a) : f === void 0 ? a = new Uint8Array(a, u) : a = new Uint8Array(a, u, f), l.TYPED_ARRAY_SUPPORT ? (c = a, c.__proto__ = l.prototype) : c = v(c, a), c;
221
221
  }
222
222
  function _(c, a) {
223
223
  if (l.isBuffer(a)) {
224
- var u = E(a.length) | 0;
224
+ var u = C(a.length) | 0;
225
225
  return c = o(c, u), c.length === 0 || a.copy(c, 0, 0, u), c;
226
226
  }
227
227
  if (a) {
228
228
  if (typeof ArrayBuffer < "u" && a.buffer instanceof ArrayBuffer || "length" in a)
229
- return typeof a.length != "number" || ln(a.length) ? o(c, 0) : y(c, a);
229
+ return typeof a.length != "number" || fn(a.length) ? o(c, 0) : v(c, a);
230
230
  if (a.type === "Buffer" && r(a.data))
231
- return y(c, a.data);
231
+ return v(c, a.data);
232
232
  }
233
233
  throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
234
234
  }
235
- function E(c) {
235
+ function C(c) {
236
236
  if (c >= s())
237
237
  throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s().toString(16) + " bytes");
238
238
  return c | 0;
239
239
  }
240
- function x(c) {
240
+ function E(c) {
241
241
  return +c != c && (c = 0), l.alloc(+c);
242
242
  }
243
243
  l.isBuffer = function(a) {
@@ -246,7 +246,7 @@ function pn() {
246
246
  if (!l.isBuffer(a) || !l.isBuffer(u))
247
247
  throw new TypeError("Arguments must be Buffers");
248
248
  if (a === u) return 0;
249
- for (var f = a.length, g = u.length, w = 0, b = Math.min(f, g); w < b; ++w)
249
+ for (var f = a.length, g = u.length, w = 0, S = Math.min(f, g); w < S; ++w)
250
250
  if (a[w] !== u[w]) {
251
251
  f = a[w], g = u[w];
252
252
  break;
@@ -280,14 +280,14 @@ function pn() {
280
280
  u += a[f].length;
281
281
  var g = l.allocUnsafe(u), w = 0;
282
282
  for (f = 0; f < a.length; ++f) {
283
- var b = a[f];
284
- if (!l.isBuffer(b))
283
+ var S = a[f];
284
+ if (!l.isBuffer(S))
285
285
  throw new TypeError('"list" argument must be an Array of Buffers');
286
- b.copy(g, w), w += b.length;
286
+ S.copy(g, w), w += S.length;
287
287
  }
288
288
  return g;
289
289
  };
290
- function U(c, a) {
290
+ function T(c, a) {
291
291
  if (l.isBuffer(c))
292
292
  return c.length;
293
293
  if (typeof ArrayBuffer < "u" && typeof ArrayBuffer.isView == "function" && (ArrayBuffer.isView(c) || c instanceof ArrayBuffer))
@@ -313,13 +313,13 @@ function pn() {
313
313
  case "hex":
314
314
  return u >>> 1;
315
315
  case "base64":
316
- return Vt(c).length;
316
+ return jt(c).length;
317
317
  default:
318
318
  if (f) return Ne(c).length;
319
319
  a = ("" + a).toLowerCase(), f = !0;
320
320
  }
321
321
  }
322
- l.byteLength = U;
322
+ l.byteLength = T;
323
323
  function P(c, a, u) {
324
324
  var f = !1;
325
325
  if ((a === void 0 || a < 0) && (a = 0), a > this.length || ((u === void 0 || u > this.length) && (u = this.length), u <= 0) || (u >>>= 0, a >>>= 0, u <= a))
@@ -327,22 +327,22 @@ function pn() {
327
327
  for (c || (c = "utf8"); ; )
328
328
  switch (c) {
329
329
  case "hex":
330
- return en(this, a, u);
330
+ return nn(this, a, u);
331
331
  case "utf8":
332
332
  case "utf-8":
333
333
  return ve(this, a, u);
334
334
  case "ascii":
335
- return Xr(this, a, u);
335
+ return tn(this, a, u);
336
336
  case "latin1":
337
337
  case "binary":
338
- return Qr(this, a, u);
338
+ return rn(this, a, u);
339
339
  case "base64":
340
340
  return le(this, a, u);
341
341
  case "ucs2":
342
342
  case "ucs-2":
343
343
  case "utf16le":
344
344
  case "utf-16le":
345
- return tn(this, a, u);
345
+ return sn(this, a, u);
346
346
  default:
347
347
  if (f) throw new TypeError("Unknown encoding: " + c);
348
348
  c = (c + "").toLowerCase(), f = !0;
@@ -395,12 +395,12 @@ function pn() {
395
395
  if (u >= f)
396
396
  return 1;
397
397
  if (u >>>= 0, f >>>= 0, g >>>= 0, w >>>= 0, this === a) return 0;
398
- for (var b = w - g, I = f - u, D = Math.min(b, I), k = this.slice(g, w), O = a.slice(u, f), $ = 0; $ < D; ++$)
399
- if (k[$] !== O[$]) {
400
- b = k[$], I = O[$];
398
+ for (var S = w - g, I = f - u, D = Math.min(S, I), R = this.slice(g, w), O = a.slice(u, f), $ = 0; $ < D; ++$)
399
+ if (R[$] !== O[$]) {
400
+ S = R[$], I = O[$];
401
401
  break;
402
402
  }
403
- return b < I ? -1 : I < b ? 1 : 0;
403
+ return S < I ? -1 : I < S ? 1 : 0;
404
404
  };
405
405
  function F(c, a, u, f, g) {
406
406
  if (c.length === 0) return -1;
@@ -417,31 +417,31 @@ function pn() {
417
417
  throw new TypeError("val must be string, number or Buffer");
418
418
  }
419
419
  function X(c, a, u, f, g) {
420
- var w = 1, b = c.length, I = a.length;
420
+ var w = 1, S = c.length, I = a.length;
421
421
  if (f !== void 0 && (f = String(f).toLowerCase(), f === "ucs2" || f === "ucs-2" || f === "utf16le" || f === "utf-16le")) {
422
422
  if (c.length < 2 || a.length < 2)
423
423
  return -1;
424
- w = 2, b /= 2, I /= 2, u /= 2;
424
+ w = 2, S /= 2, I /= 2, u /= 2;
425
425
  }
426
- function D(jt, Ht) {
427
- return w === 1 ? jt[Ht] : jt.readUInt16BE(Ht * w);
426
+ function D(Vt, Ht) {
427
+ return w === 1 ? Vt[Ht] : Vt.readUInt16BE(Ht * w);
428
428
  }
429
- var k;
429
+ var R;
430
430
  if (g) {
431
431
  var O = -1;
432
- for (k = u; k < b; k++)
433
- if (D(c, k) === D(a, O === -1 ? 0 : k - O)) {
434
- if (O === -1 && (O = k), k - O + 1 === I) return O * w;
432
+ for (R = u; R < S; R++)
433
+ if (D(c, R) === D(a, O === -1 ? 0 : R - O)) {
434
+ if (O === -1 && (O = R), R - O + 1 === I) return O * w;
435
435
  } else
436
- O !== -1 && (k -= k - O), O = -1;
436
+ O !== -1 && (R -= R - O), O = -1;
437
437
  } else
438
- for (u + I > b && (u = b - I), k = u; k >= 0; k--) {
438
+ for (u + I > S && (u = S - I), R = u; R >= 0; R--) {
439
439
  for (var $ = !0, Le = 0; Le < I; Le++)
440
- if (D(c, k + Le) !== D(a, Le)) {
440
+ if (D(c, R + Le) !== D(a, Le)) {
441
441
  $ = !1;
442
442
  break;
443
443
  }
444
- if ($) return k;
444
+ if ($) return R;
445
445
  }
446
446
  return -1;
447
447
  }
@@ -452,34 +452,34 @@ function pn() {
452
452
  }, l.prototype.lastIndexOf = function(a, u, f) {
453
453
  return F(this, a, u, f, !1);
454
454
  };
455
- function ge(c, a, u, f) {
455
+ function me(c, a, u, f) {
456
456
  u = Number(u) || 0;
457
457
  var g = c.length - u;
458
458
  f ? (f = Number(f), f > g && (f = g)) : f = g;
459
459
  var w = a.length;
460
460
  if (w % 2 !== 0) throw new TypeError("Invalid hex string");
461
461
  f > w / 2 && (f = w / 2);
462
- for (var b = 0; b < f; ++b) {
463
- var I = parseInt(a.substr(b * 2, 2), 16);
464
- if (isNaN(I)) return b;
465
- c[u + b] = I;
462
+ for (var S = 0; S < f; ++S) {
463
+ var I = parseInt(a.substr(S * 2, 2), 16);
464
+ if (isNaN(I)) return S;
465
+ c[u + S] = I;
466
466
  }
467
- return b;
467
+ return S;
468
468
  }
469
469
  function G(c, a, u, f) {
470
470
  return qe(Ne(a, c.length - u), c, u, f);
471
471
  }
472
472
  function K(c, a, u, f) {
473
- return qe(an(a), c, u, f);
473
+ return qe(cn(a), c, u, f);
474
474
  }
475
475
  function Q(c, a, u, f) {
476
476
  return K(c, a, u, f);
477
477
  }
478
478
  function ue(c, a, u, f) {
479
- return qe(Vt(a), c, u, f);
479
+ return qe(jt(a), c, u, f);
480
480
  }
481
- function me(c, a, u, f) {
482
- return qe(un(a, c.length - u), c, u, f);
481
+ function ye(c, a, u, f) {
482
+ return qe(hn(a, c.length - u), c, u, f);
483
483
  }
484
484
  l.prototype.write = function(a, u, f, g) {
485
485
  if (u === void 0)
@@ -496,10 +496,10 @@ function pn() {
496
496
  if ((f === void 0 || f > w) && (f = w), a.length > 0 && (f < 0 || u < 0) || u > this.length)
497
497
  throw new RangeError("Attempt to write outside buffer bounds");
498
498
  g || (g = "utf8");
499
- for (var b = !1; ; )
499
+ for (var S = !1; ; )
500
500
  switch (g) {
501
501
  case "hex":
502
- return ge(this, a, u, f);
502
+ return me(this, a, u, f);
503
503
  case "utf8":
504
504
  case "utf-8":
505
505
  return G(this, a, u, f);
@@ -514,10 +514,10 @@ function pn() {
514
514
  case "ucs-2":
515
515
  case "utf16le":
516
516
  case "utf-16le":
517
- return me(this, a, u, f);
517
+ return ye(this, a, u, f);
518
518
  default:
519
- if (b) throw new TypeError("Unknown encoding: " + g);
520
- g = ("" + g).toLowerCase(), b = !0;
519
+ if (S) throw new TypeError("Unknown encoding: " + g);
520
+ g = ("" + g).toLowerCase(), S = !0;
521
521
  }
522
522
  }, l.prototype.toJSON = function() {
523
523
  return {
@@ -531,24 +531,24 @@ function pn() {
531
531
  function ve(c, a, u) {
532
532
  u = Math.min(c.length, u);
533
533
  for (var f = [], g = a; g < u; ) {
534
- var w = c[g], b = null, I = w > 239 ? 4 : w > 223 ? 3 : w > 191 ? 2 : 1;
534
+ var w = c[g], S = null, I = w > 239 ? 4 : w > 223 ? 3 : w > 191 ? 2 : 1;
535
535
  if (g + I <= u) {
536
- var D, k, O, $;
536
+ var D, R, O, $;
537
537
  switch (I) {
538
538
  case 1:
539
- w < 128 && (b = w);
539
+ w < 128 && (S = w);
540
540
  break;
541
541
  case 2:
542
- D = c[g + 1], (D & 192) === 128 && ($ = (w & 31) << 6 | D & 63, $ > 127 && (b = $));
542
+ D = c[g + 1], (D & 192) === 128 && ($ = (w & 31) << 6 | D & 63, $ > 127 && (S = $));
543
543
  break;
544
544
  case 3:
545
- D = c[g + 1], k = c[g + 2], (D & 192) === 128 && (k & 192) === 128 && ($ = (w & 15) << 12 | (D & 63) << 6 | k & 63, $ > 2047 && ($ < 55296 || $ > 57343) && (b = $));
545
+ D = c[g + 1], R = c[g + 2], (D & 192) === 128 && (R & 192) === 128 && ($ = (w & 15) << 12 | (D & 63) << 6 | R & 63, $ > 2047 && ($ < 55296 || $ > 57343) && (S = $));
546
546
  break;
547
547
  case 4:
548
- D = c[g + 1], k = c[g + 2], O = c[g + 3], (D & 192) === 128 && (k & 192) === 128 && (O & 192) === 128 && ($ = (w & 15) << 18 | (D & 63) << 12 | (k & 63) << 6 | O & 63, $ > 65535 && $ < 1114112 && (b = $));
548
+ D = c[g + 1], R = c[g + 2], O = c[g + 3], (D & 192) === 128 && (R & 192) === 128 && (O & 192) === 128 && ($ = (w & 15) << 18 | (D & 63) << 12 | (R & 63) << 6 | O & 63, $ > 65535 && $ < 1114112 && (S = $));
549
549
  }
550
550
  }
551
- b === null ? (b = 65533, I = 1) : b > 65535 && (b -= 65536, f.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), f.push(b), g += I;
551
+ S === null ? (S = 65533, I = 1) : S > 65535 && (S -= 65536, f.push(S >>> 10 & 1023 | 55296), S = 56320 | S & 1023), f.push(S), g += I;
552
552
  }
553
553
  return tt(f);
554
554
  }
@@ -564,28 +564,28 @@ function pn() {
564
564
  );
565
565
  return u;
566
566
  }
567
- function Xr(c, a, u) {
567
+ function tn(c, a, u) {
568
568
  var f = "";
569
569
  u = Math.min(c.length, u);
570
570
  for (var g = a; g < u; ++g)
571
571
  f += String.fromCharCode(c[g] & 127);
572
572
  return f;
573
573
  }
574
- function Qr(c, a, u) {
574
+ function rn(c, a, u) {
575
575
  var f = "";
576
576
  u = Math.min(c.length, u);
577
577
  for (var g = a; g < u; ++g)
578
578
  f += String.fromCharCode(c[g]);
579
579
  return f;
580
580
  }
581
- function en(c, a, u) {
581
+ function nn(c, a, u) {
582
582
  var f = c.length;
583
583
  (!a || a < 0) && (a = 0), (!u || u < 0 || u > f) && (u = f);
584
584
  for (var g = "", w = a; w < u; ++w)
585
- g += on(c[w]);
585
+ g += ln(c[w]);
586
586
  return g;
587
587
  }
588
- function tn(c, a, u) {
588
+ function sn(c, a, u) {
589
589
  for (var f = c.slice(a, u), g = "", w = 0; w < f.length; w += 2)
590
590
  g += String.fromCharCode(f[w] + f[w + 1] * 256);
591
591
  return g;
@@ -599,8 +599,8 @@ function pn() {
599
599
  else {
600
600
  var w = u - a;
601
601
  g = new l(w, void 0);
602
- for (var b = 0; b < w; ++b)
603
- g[b] = this[b + a];
602
+ for (var S = 0; S < w; ++S)
603
+ g[S] = this[S + a];
604
604
  }
605
605
  return g;
606
606
  };
@@ -610,8 +610,8 @@ function pn() {
610
610
  }
611
611
  l.prototype.readUIntLE = function(a, u, f) {
612
612
  a = a | 0, u = u | 0, f || M(a, u, this.length);
613
- for (var g = this[a], w = 1, b = 0; ++b < u && (w *= 256); )
614
- g += this[a + b] * w;
613
+ for (var g = this[a], w = 1, S = 0; ++S < u && (w *= 256); )
614
+ g += this[a + S] * w;
615
615
  return g;
616
616
  }, l.prototype.readUIntBE = function(a, u, f) {
617
617
  a = a | 0, u = u | 0, f || M(a, u, this.length);
@@ -630,14 +630,14 @@ function pn() {
630
630
  return u || M(a, 4, this.length), this[a] * 16777216 + (this[a + 1] << 16 | this[a + 2] << 8 | this[a + 3]);
631
631
  }, l.prototype.readIntLE = function(a, u, f) {
632
632
  a = a | 0, u = u | 0, f || M(a, u, this.length);
633
- for (var g = this[a], w = 1, b = 0; ++b < u && (w *= 256); )
634
- g += this[a + b] * w;
633
+ for (var g = this[a], w = 1, S = 0; ++S < u && (w *= 256); )
634
+ g += this[a + S] * w;
635
635
  return w *= 128, g >= w && (g -= Math.pow(2, 8 * u)), g;
636
636
  }, l.prototype.readIntBE = function(a, u, f) {
637
637
  a = a | 0, u = u | 0, f || M(a, u, this.length);
638
- for (var g = u, w = 1, b = this[a + --g]; g > 0 && (w *= 256); )
639
- b += this[a + --g] * w;
640
- return w *= 128, b >= w && (b -= Math.pow(2, 8 * u)), b;
638
+ for (var g = u, w = 1, S = this[a + --g]; g > 0 && (w *= 256); )
639
+ S += this[a + --g] * w;
640
+ return w *= 128, S >= w && (S -= Math.pow(2, 8 * u)), S;
641
641
  }, l.prototype.readInt8 = function(a, u) {
642
642
  return u || M(a, 1, this.length), this[a] & 128 ? (255 - this[a] + 1) * -1 : this[a];
643
643
  }, l.prototype.readInt16LE = function(a, u) {
@@ -671,18 +671,18 @@ function pn() {
671
671
  var w = Math.pow(2, 8 * f) - 1;
672
672
  L(this, a, u, f, w, 0);
673
673
  }
674
- var b = 1, I = 0;
675
- for (this[u] = a & 255; ++I < f && (b *= 256); )
676
- this[u + I] = a / b & 255;
674
+ var S = 1, I = 0;
675
+ for (this[u] = a & 255; ++I < f && (S *= 256); )
676
+ this[u + I] = a / S & 255;
677
677
  return u + f;
678
678
  }, l.prototype.writeUIntBE = function(a, u, f, g) {
679
679
  if (a = +a, u = u | 0, f = f | 0, !g) {
680
680
  var w = Math.pow(2, 8 * f) - 1;
681
681
  L(this, a, u, f, w, 0);
682
682
  }
683
- var b = f - 1, I = 1;
684
- for (this[u + b] = a & 255; --b >= 0 && (I *= 256); )
685
- this[u + b] = a / I & 255;
683
+ var S = f - 1, I = 1;
684
+ for (this[u + S] = a & 255; --S >= 0 && (I *= 256); )
685
+ this[u + S] = a / I & 255;
686
686
  return u + f;
687
687
  }, l.prototype.writeUInt8 = function(a, u, f) {
688
688
  return a = +a, u = u | 0, f || L(this, a, u, 1, 255, 0), l.TYPED_ARRAY_SUPPORT || (a = Math.floor(a)), this[u] = a & 255, u + 1;
@@ -711,18 +711,18 @@ function pn() {
711
711
  var w = Math.pow(2, 8 * f - 1);
712
712
  L(this, a, u, f, w - 1, -w);
713
713
  }
714
- var b = 0, I = 1, D = 0;
715
- for (this[u] = a & 255; ++b < f && (I *= 256); )
716
- a < 0 && D === 0 && this[u + b - 1] !== 0 && (D = 1), this[u + b] = (a / I >> 0) - D & 255;
714
+ var S = 0, I = 1, D = 0;
715
+ for (this[u] = a & 255; ++S < f && (I *= 256); )
716
+ a < 0 && D === 0 && this[u + S - 1] !== 0 && (D = 1), this[u + S] = (a / I >> 0) - D & 255;
717
717
  return u + f;
718
718
  }, l.prototype.writeIntBE = function(a, u, f, g) {
719
719
  if (a = +a, u = u | 0, !g) {
720
720
  var w = Math.pow(2, 8 * f - 1);
721
721
  L(this, a, u, f, w - 1, -w);
722
722
  }
723
- var b = f - 1, I = 1, D = 0;
724
- for (this[u + b] = a & 255; --b >= 0 && (I *= 256); )
725
- a < 0 && D === 0 && this[u + b + 1] !== 0 && (D = 1), this[u + b] = (a / I >> 0) - D & 255;
723
+ var S = f - 1, I = 1, D = 0;
724
+ for (this[u + S] = a & 255; --S >= 0 && (I *= 256); )
725
+ a < 0 && D === 0 && this[u + S + 1] !== 0 && (D = 1), this[u + S] = (a / I >> 0) - D & 255;
726
726
  return u + f;
727
727
  }, l.prototype.writeInt8 = function(a, u, f) {
728
728
  return a = +a, u = u | 0, f || L(this, a, u, 1, 127, -128), l.TYPED_ARRAY_SUPPORT || (a = Math.floor(a)), a < 0 && (a = 255 + a + 1), this[u] = a & 255, u + 1;
@@ -761,13 +761,13 @@ function pn() {
761
761
  if (f < 0 || f >= this.length) throw new RangeError("sourceStart out of bounds");
762
762
  if (g < 0) throw new RangeError("sourceEnd out of bounds");
763
763
  g > this.length && (g = this.length), a.length - u < g - f && (g = a.length - u + f);
764
- var w = g - f, b;
764
+ var w = g - f, S;
765
765
  if (this === a && f < u && u < g)
766
- for (b = w - 1; b >= 0; --b)
767
- a[b + u] = this[b + f];
766
+ for (S = w - 1; S >= 0; --S)
767
+ a[S + u] = this[S + f];
768
768
  else if (w < 1e3 || !l.TYPED_ARRAY_SUPPORT)
769
- for (b = 0; b < w; ++b)
770
- a[b + u] = this[b + f];
769
+ for (S = 0; S < w; ++S)
770
+ a[S + u] = this[S + f];
771
771
  else
772
772
  Uint8Array.prototype.set.call(
773
773
  a,
@@ -791,39 +791,39 @@ function pn() {
791
791
  if (f <= u)
792
792
  return this;
793
793
  u = u >>> 0, f = f === void 0 ? this.length : f >>> 0, a || (a = 0);
794
- var b;
794
+ var S;
795
795
  if (typeof a == "number")
796
- for (b = u; b < f; ++b)
797
- this[b] = a;
796
+ for (S = u; S < f; ++S)
797
+ this[S] = a;
798
798
  else {
799
799
  var I = l.isBuffer(a) ? a : Ne(new l(a, g).toString()), D = I.length;
800
- for (b = 0; b < f - u; ++b)
801
- this[b + u] = I[b % D];
800
+ for (S = 0; S < f - u; ++S)
801
+ this[S + u] = I[S % D];
802
802
  }
803
803
  return this;
804
804
  };
805
- var rn = /[^+\/0-9A-Za-z-_]/g;
806
- function nn(c) {
807
- if (c = sn(c).replace(rn, ""), c.length < 2) return "";
805
+ var on = /[^+\/0-9A-Za-z-_]/g;
806
+ function an(c) {
807
+ if (c = un(c).replace(on, ""), c.length < 2) return "";
808
808
  for (; c.length % 4 !== 0; )
809
809
  c = c + "=";
810
810
  return c;
811
811
  }
812
- function sn(c) {
812
+ function un(c) {
813
813
  return c.trim ? c.trim() : c.replace(/^\s+|\s+$/g, "");
814
814
  }
815
- function on(c) {
815
+ function ln(c) {
816
816
  return c < 16 ? "0" + c.toString(16) : c.toString(16);
817
817
  }
818
818
  function Ne(c, a) {
819
819
  a = a || 1 / 0;
820
- for (var u, f = c.length, g = null, w = [], b = 0; b < f; ++b) {
821
- if (u = c.charCodeAt(b), u > 55295 && u < 57344) {
820
+ for (var u, f = c.length, g = null, w = [], S = 0; S < f; ++S) {
821
+ if (u = c.charCodeAt(S), u > 55295 && u < 57344) {
822
822
  if (!g) {
823
823
  if (u > 56319) {
824
824
  (a -= 3) > -1 && w.push(239, 191, 189);
825
825
  continue;
826
- } else if (b + 1 === f) {
826
+ } else if (S + 1 === f) {
827
827
  (a -= 3) > -1 && w.push(239, 191, 189);
828
828
  continue;
829
829
  }
@@ -865,30 +865,30 @@ function pn() {
865
865
  }
866
866
  return w;
867
867
  }
868
- function an(c) {
868
+ function cn(c) {
869
869
  for (var a = [], u = 0; u < c.length; ++u)
870
870
  a.push(c.charCodeAt(u) & 255);
871
871
  return a;
872
872
  }
873
- function un(c, a) {
874
- for (var u, f, g, w = [], b = 0; b < c.length && !((a -= 2) < 0); ++b)
875
- u = c.charCodeAt(b), f = u >> 8, g = u % 256, w.push(g), w.push(f);
873
+ function hn(c, a) {
874
+ for (var u, f, g, w = [], S = 0; S < c.length && !((a -= 2) < 0); ++S)
875
+ u = c.charCodeAt(S), f = u >> 8, g = u % 256, w.push(g), w.push(f);
876
876
  return w;
877
877
  }
878
- function Vt(c) {
879
- return e.toByteArray(nn(c));
878
+ function jt(c) {
879
+ return e.toByteArray(an(c));
880
880
  }
881
881
  function qe(c, a, u, f) {
882
882
  for (var g = 0; g < f && !(g + u >= a.length || g >= c.length); ++g)
883
883
  a[g + u] = c[g];
884
884
  return g;
885
885
  }
886
- function ln(c) {
886
+ function fn(c) {
887
887
  return c !== c;
888
888
  }
889
889
  })(rt)), rt;
890
890
  }
891
- var R = pn(), W;
891
+ var k = yn(), W;
892
892
  typeof window < "u" && window.crypto && (W = window.crypto);
893
893
  !W && typeof window < "u" && window.msCrypto && (W = window.msCrypto);
894
894
  !W && typeof globalThis < "u" && globalThis.crypto && (W = globalThis.crypto);
@@ -897,7 +897,7 @@ if (!W && typeof require == "function")
897
897
  W = require("crypto");
898
898
  } catch {
899
899
  }
900
- function gn() {
900
+ function vn() {
901
901
  if (W) {
902
902
  if (typeof W.getRandomValues == "function")
903
903
  try {
@@ -912,24 +912,24 @@ function gn() {
912
912
  }
913
913
  throw new Error("Native crypto module could not be used to get secure random number.");
914
914
  }
915
- function mn(n) {
915
+ function wn(n) {
916
916
  for (var e = n.words, t = n.sigBytes, r = [], i = 0; i < t; i++) {
917
917
  var s = e[i >>> 2] >>> 24 - i % 4 * 8 & 255;
918
918
  r.push((s >>> 4).toString(16)), r.push((s & 15).toString(16));
919
919
  }
920
920
  return r.join("");
921
921
  }
922
- var Ir = /* @__PURE__ */ (function() {
922
+ var Rr = /* @__PURE__ */ (function() {
923
923
  function n(t, r) {
924
924
  t = this.words = t || [], r != null ? this.sigBytes = r : this.sigBytes = t.length * 4;
925
925
  }
926
926
  var e = n.prototype;
927
927
  return e.random = function(r) {
928
928
  for (var i = [], s = 0; s < r; s += 4)
929
- i.push(gn());
929
+ i.push(vn());
930
930
  return new n(i, r);
931
931
  }, e.toString = function() {
932
- return mn(this);
932
+ return wn(this);
933
933
  }, n;
934
934
  })(), it = {};
935
935
  var ht = function(n, e) {
@@ -939,7 +939,7 @@ var ht = function(n, e) {
939
939
  for (var i in r) r.hasOwnProperty(i) && (t[i] = r[i]);
940
940
  }, ht(n, e);
941
941
  };
942
- function vn(n, e) {
942
+ function bn(n, e) {
943
943
  ht(n, e);
944
944
  function t() {
945
945
  this.constructor = n;
@@ -955,7 +955,7 @@ var ft = function() {
955
955
  return e;
956
956
  }, ft.apply(this, arguments);
957
957
  };
958
- function yn(n, e) {
958
+ function Sn(n, e) {
959
959
  var t = {};
960
960
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
961
961
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -963,21 +963,21 @@ function yn(n, e) {
963
963
  e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
964
964
  return t;
965
965
  }
966
- function wn(n, e, t, r) {
966
+ function _n(n, e, t, r) {
967
967
  var i = arguments.length, s = i < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, t) : r, o;
968
968
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(n, e, t, r);
969
969
  else for (var l = n.length - 1; l >= 0; l--) (o = n[l]) && (s = (i < 3 ? o(s) : i > 3 ? o(e, t, s) : o(e, t)) || s);
970
970
  return i > 3 && s && Object.defineProperty(e, t, s), s;
971
971
  }
972
- function Sn(n, e) {
972
+ function An(n, e) {
973
973
  return function(t, r) {
974
974
  e(t, r, n);
975
975
  };
976
976
  }
977
- function bn(n, e) {
977
+ function xn(n, e) {
978
978
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(n, e);
979
979
  }
980
- function _n(n, e, t, r) {
980
+ function Cn(n, e, t, r) {
981
981
  function i(s) {
982
982
  return s instanceof t ? s : new t(function(o) {
983
983
  o(s);
@@ -1004,7 +1004,7 @@ function _n(n, e, t, r) {
1004
1004
  d((r = r.apply(n, e || [])).next());
1005
1005
  });
1006
1006
  }
1007
- function An(n, e) {
1007
+ function En(n, e) {
1008
1008
  var t = { label: 0, sent: function() {
1009
1009
  if (s[0] & 1) throw s[1];
1010
1010
  return s[1];
@@ -1064,10 +1064,10 @@ function An(n, e) {
1064
1064
  return { value: d[0] ? d[1] : void 0, done: !0 };
1065
1065
  }
1066
1066
  }
1067
- function Cn(n, e, t, r) {
1067
+ function Un(n, e, t, r) {
1068
1068
  r === void 0 && (r = t), n[r] = e[t];
1069
1069
  }
1070
- function xn(n, e) {
1070
+ function Tn(n, e) {
1071
1071
  for (var t in n) t !== "default" && !e.hasOwnProperty(t) && (e[t] = n[t]);
1072
1072
  }
1073
1073
  function dt(n) {
@@ -1080,7 +1080,7 @@ function dt(n) {
1080
1080
  };
1081
1081
  throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
1082
1082
  }
1083
- function Dr(n, e) {
1083
+ function $r(n, e) {
1084
1084
  var t = typeof Symbol == "function" && n[Symbol.iterator];
1085
1085
  if (!t) return n;
1086
1086
  var r = t.call(n), i, s = [], o;
@@ -1097,55 +1097,55 @@ function Dr(n, e) {
1097
1097
  }
1098
1098
  return s;
1099
1099
  }
1100
- function En() {
1100
+ function In() {
1101
1101
  for (var n = [], e = 0; e < arguments.length; e++)
1102
- n = n.concat(Dr(arguments[e]));
1102
+ n = n.concat($r(arguments[e]));
1103
1103
  return n;
1104
1104
  }
1105
- function Un() {
1105
+ function Dn() {
1106
1106
  for (var n = 0, e = 0, t = arguments.length; e < t; e++) n += arguments[e].length;
1107
1107
  for (var r = Array(n), i = 0, e = 0; e < t; e++)
1108
1108
  for (var s = arguments[e], o = 0, l = s.length; o < l; o++, i++)
1109
1109
  r[i] = s[o];
1110
1110
  return r;
1111
1111
  }
1112
- function Re(n) {
1113
- return this instanceof Re ? (this.v = n, this) : new Re(n);
1112
+ function ke(n) {
1113
+ return this instanceof ke ? (this.v = n, this) : new ke(n);
1114
1114
  }
1115
- function Tn(n, e, t) {
1115
+ function kn(n, e, t) {
1116
1116
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1117
1117
  var r = t.apply(n, e || []), i, s = [];
1118
1118
  return i = {}, o("next"), o("throw"), o("return"), i[Symbol.asyncIterator] = function() {
1119
1119
  return this;
1120
1120
  }, i;
1121
- function o(v) {
1122
- r[v] && (i[v] = function(y) {
1123
- return new Promise(function(S, _) {
1124
- s.push([v, y, S, _]) > 1 || l(v, y);
1121
+ function o(y) {
1122
+ r[y] && (i[y] = function(v) {
1123
+ return new Promise(function(b, _) {
1124
+ s.push([y, v, b, _]) > 1 || l(y, v);
1125
1125
  });
1126
1126
  });
1127
1127
  }
1128
- function l(v, y) {
1128
+ function l(y, v) {
1129
1129
  try {
1130
- h(r[v](y));
1131
- } catch (S) {
1132
- m(s[0][3], S);
1130
+ h(r[y](v));
1131
+ } catch (b) {
1132
+ m(s[0][3], b);
1133
1133
  }
1134
1134
  }
1135
- function h(v) {
1136
- v.value instanceof Re ? Promise.resolve(v.value.v).then(d, p) : m(s[0][2], v);
1135
+ function h(y) {
1136
+ y.value instanceof ke ? Promise.resolve(y.value.v).then(d, p) : m(s[0][2], y);
1137
1137
  }
1138
- function d(v) {
1139
- l("next", v);
1138
+ function d(y) {
1139
+ l("next", y);
1140
1140
  }
1141
- function p(v) {
1142
- l("throw", v);
1141
+ function p(y) {
1142
+ l("throw", y);
1143
1143
  }
1144
- function m(v, y) {
1145
- v(y), s.shift(), s.length && l(s[0][0], s[0][1]);
1144
+ function m(y, v) {
1145
+ y(v), s.shift(), s.length && l(s[0][0], s[0][1]);
1146
1146
  }
1147
1147
  }
1148
- function In(n) {
1148
+ function Rn(n) {
1149
1149
  var e, t;
1150
1150
  return e = {}, r("next"), r("throw", function(i) {
1151
1151
  throw i;
@@ -1154,11 +1154,11 @@ function In(n) {
1154
1154
  }, e;
1155
1155
  function r(i, s) {
1156
1156
  e[i] = n[i] ? function(o) {
1157
- return (t = !t) ? { value: Re(n[i](o)), done: i === "return" } : s ? s(o) : o;
1157
+ return (t = !t) ? { value: ke(n[i](o)), done: i === "return" } : s ? s(o) : o;
1158
1158
  } : s;
1159
1159
  }
1160
1160
  }
1161
- function Dn(n) {
1161
+ function $n(n) {
1162
1162
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1163
1163
  var e = n[Symbol.asyncIterator], t;
1164
1164
  return e ? e.call(n) : (n = typeof dt == "function" ? dt(n) : n[Symbol.iterator](), t = {}, r("next"), r("throw"), r("return"), t[Symbol.asyncIterator] = function() {
@@ -1177,60 +1177,60 @@ function Dn(n) {
1177
1177
  }, o);
1178
1178
  }
1179
1179
  }
1180
- function Rn(n, e) {
1180
+ function Pn(n, e) {
1181
1181
  return Object.defineProperty ? Object.defineProperty(n, "raw", { value: e }) : n.raw = e, n;
1182
1182
  }
1183
- function kn(n) {
1183
+ function Fn(n) {
1184
1184
  if (n && n.__esModule) return n;
1185
1185
  var e = {};
1186
1186
  if (n != null)
1187
1187
  for (var t in n) Object.hasOwnProperty.call(n, t) && (e[t] = n[t]);
1188
1188
  return e.default = n, e;
1189
1189
  }
1190
- function $n(n) {
1190
+ function Bn(n) {
1191
1191
  return n && n.__esModule ? n : { default: n };
1192
1192
  }
1193
- function Pn(n, e) {
1193
+ function Mn(n, e) {
1194
1194
  if (!e.has(n))
1195
1195
  throw new TypeError("attempted to get private field on non-instance");
1196
1196
  return e.get(n);
1197
1197
  }
1198
- function Fn(n, e, t) {
1198
+ function On(n, e, t) {
1199
1199
  if (!e.has(n))
1200
1200
  throw new TypeError("attempted to set private field on non-instance");
1201
1201
  return e.set(n, t), t;
1202
1202
  }
1203
- const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1203
+ const Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1204
1204
  __proto__: null,
1205
1205
  get __assign() {
1206
1206
  return ft;
1207
1207
  },
1208
- __asyncDelegator: In,
1209
- __asyncGenerator: Tn,
1210
- __asyncValues: Dn,
1211
- __await: Re,
1212
- __awaiter: _n,
1213
- __classPrivateFieldGet: Pn,
1214
- __classPrivateFieldSet: Fn,
1215
- __createBinding: Cn,
1216
- __decorate: wn,
1217
- __exportStar: xn,
1218
- __extends: vn,
1219
- __generator: An,
1220
- __importDefault: $n,
1221
- __importStar: kn,
1222
- __makeTemplateObject: Rn,
1223
- __metadata: bn,
1224
- __param: Sn,
1225
- __read: Dr,
1226
- __rest: yn,
1227
- __spread: En,
1228
- __spreadArrays: Un,
1208
+ __asyncDelegator: Rn,
1209
+ __asyncGenerator: kn,
1210
+ __asyncValues: $n,
1211
+ __await: ke,
1212
+ __awaiter: Cn,
1213
+ __classPrivateFieldGet: Mn,
1214
+ __classPrivateFieldSet: On,
1215
+ __createBinding: Un,
1216
+ __decorate: _n,
1217
+ __exportStar: Tn,
1218
+ __extends: bn,
1219
+ __generator: En,
1220
+ __importDefault: Bn,
1221
+ __importStar: Fn,
1222
+ __makeTemplateObject: Pn,
1223
+ __metadata: xn,
1224
+ __param: An,
1225
+ __read: $r,
1226
+ __rest: Sn,
1227
+ __spread: In,
1228
+ __spreadArrays: Dn,
1229
1229
  __values: dt
1230
- }, Symbol.toStringTag, { value: "Module" })), Rr = /* @__PURE__ */ Ut(Bn);
1231
- var we = {}, V = {}, Jt;
1232
- function kr() {
1233
- return Jt || (Jt = 1, Object.defineProperty(V, "__esModule", { value: !0 }), V.MAX_HASHABLE_LENGTH = V.INIT = V.KEY = V.DIGEST_LENGTH = V.BLOCK_SIZE = void 0, V.BLOCK_SIZE = 64, V.DIGEST_LENGTH = 32, V.KEY = new Uint32Array([
1230
+ }, Symbol.toStringTag, { value: "Module" })), Pr = /* @__PURE__ */ Ut(Nn);
1231
+ var be = {}, j = {}, Jt;
1232
+ function Fr() {
1233
+ return Jt || (Jt = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.MAX_HASHABLE_LENGTH = j.INIT = j.KEY = j.DIGEST_LENGTH = j.BLOCK_SIZE = void 0, j.BLOCK_SIZE = 64, j.DIGEST_LENGTH = 32, j.KEY = new Uint32Array([
1234
1234
  1116352408,
1235
1235
  1899447441,
1236
1236
  3049323471,
@@ -1295,7 +1295,7 @@ function kr() {
1295
1295
  2756734187,
1296
1296
  3204031479,
1297
1297
  3329325298
1298
- ]), V.INIT = [
1298
+ ]), j.INIT = [
1299
1299
  1779033703,
1300
1300
  3144134277,
1301
1301
  1013904242,
@@ -1304,13 +1304,13 @@ function kr() {
1304
1304
  2600822924,
1305
1305
  528734635,
1306
1306
  1541459225
1307
- ], V.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1), V;
1307
+ ], j.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1), j;
1308
1308
  }
1309
1309
  var Se = {}, Zt;
1310
- function Mn() {
1310
+ function qn() {
1311
1311
  if (Zt) return Se;
1312
1312
  Zt = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.RawSha256 = void 0;
1313
- var n = kr(), e = (
1313
+ var n = Fr(), e = (
1314
1314
  /** @class */
1315
1315
  (function() {
1316
1316
  function t() {
@@ -1340,26 +1340,26 @@ function Mn() {
1340
1340
  l[o * 4] = this.state[o] >>> 24 & 255, l[o * 4 + 1] = this.state[o] >>> 16 & 255, l[o * 4 + 2] = this.state[o] >>> 8 & 255, l[o * 4 + 3] = this.state[o] >>> 0 & 255;
1341
1341
  return l;
1342
1342
  }, t.prototype.hashBuffer = function() {
1343
- for (var r = this, i = r.buffer, s = r.state, o = s[0], l = s[1], h = s[2], d = s[3], p = s[4], m = s[5], v = s[6], y = s[7], S = 0; S < n.BLOCK_SIZE; S++) {
1344
- if (S < 16)
1345
- this.temp[S] = (i[S * 4] & 255) << 24 | (i[S * 4 + 1] & 255) << 16 | (i[S * 4 + 2] & 255) << 8 | i[S * 4 + 3] & 255;
1343
+ for (var r = this, i = r.buffer, s = r.state, o = s[0], l = s[1], h = s[2], d = s[3], p = s[4], m = s[5], y = s[6], v = s[7], b = 0; b < n.BLOCK_SIZE; b++) {
1344
+ if (b < 16)
1345
+ this.temp[b] = (i[b * 4] & 255) << 24 | (i[b * 4 + 1] & 255) << 16 | (i[b * 4 + 2] & 255) << 8 | i[b * 4 + 3] & 255;
1346
1346
  else {
1347
- var _ = this.temp[S - 2], E = (_ >>> 17 | _ << 15) ^ (_ >>> 19 | _ << 13) ^ _ >>> 10;
1348
- _ = this.temp[S - 15];
1349
- var x = (_ >>> 7 | _ << 25) ^ (_ >>> 18 | _ << 14) ^ _ >>> 3;
1350
- this.temp[S] = (E + this.temp[S - 7] | 0) + (x + this.temp[S - 16] | 0);
1347
+ var _ = this.temp[b - 2], C = (_ >>> 17 | _ << 15) ^ (_ >>> 19 | _ << 13) ^ _ >>> 10;
1348
+ _ = this.temp[b - 15];
1349
+ var E = (_ >>> 7 | _ << 25) ^ (_ >>> 18 | _ << 14) ^ _ >>> 3;
1350
+ this.temp[b] = (C + this.temp[b - 7] | 0) + (E + this.temp[b - 16] | 0);
1351
1351
  }
1352
- var U = (((p >>> 6 | p << 26) ^ (p >>> 11 | p << 21) ^ (p >>> 25 | p << 7)) + (p & m ^ ~p & v) | 0) + (y + (n.KEY[S] + this.temp[S] | 0) | 0) | 0, P = ((o >>> 2 | o << 30) ^ (o >>> 13 | o << 19) ^ (o >>> 22 | o << 10)) + (o & l ^ o & h ^ l & h) | 0;
1353
- y = v, v = m, m = p, p = d + U | 0, d = h, h = l, l = o, o = U + P | 0;
1352
+ var T = (((p >>> 6 | p << 26) ^ (p >>> 11 | p << 21) ^ (p >>> 25 | p << 7)) + (p & m ^ ~p & y) | 0) + (v + (n.KEY[b] + this.temp[b] | 0) | 0) | 0, P = ((o >>> 2 | o << 30) ^ (o >>> 13 | o << 19) ^ (o >>> 22 | o << 10)) + (o & l ^ o & h ^ l & h) | 0;
1353
+ v = y, y = m, m = p, p = d + T | 0, d = h, h = l, l = o, o = T + P | 0;
1354
1354
  }
1355
- s[0] += o, s[1] += l, s[2] += h, s[3] += d, s[4] += p, s[5] += m, s[6] += v, s[7] += y;
1355
+ s[0] += o, s[1] += l, s[2] += h, s[3] += d, s[4] += p, s[5] += m, s[6] += y, s[7] += v;
1356
1356
  }, t;
1357
1357
  })()
1358
1358
  );
1359
1359
  return Se.RawSha256 = e, Se;
1360
1360
  }
1361
- var st = {}, be = {};
1362
- const On = (n) => {
1361
+ var st = {}, _e = {};
1362
+ const Ln = (n) => {
1363
1363
  const e = [];
1364
1364
  for (let t = 0, r = n.length; t < r; t++) {
1365
1365
  const i = n.charCodeAt(t);
@@ -1374,7 +1374,7 @@ const On = (n) => {
1374
1374
  e.push(i >> 12 | 224, i >> 6 & 63 | 128, i & 63 | 128);
1375
1375
  }
1376
1376
  return Uint8Array.from(e);
1377
- }, Nn = (n) => {
1377
+ }, Kn = (n) => {
1378
1378
  let e = "";
1379
1379
  for (let t = 0, r = n.length; t < r; t++) {
1380
1380
  const i = n[t];
@@ -1391,42 +1391,42 @@ const On = (n) => {
1391
1391
  }
1392
1392
  return e;
1393
1393
  };
1394
- function qn(n) {
1394
+ function jn(n) {
1395
1395
  return new TextEncoder().encode(n);
1396
1396
  }
1397
- function Ln(n) {
1397
+ function Vn(n) {
1398
1398
  return new TextDecoder("utf-8").decode(n);
1399
1399
  }
1400
- const Kn = (n) => typeof TextEncoder == "function" ? qn(n) : On(n), Vn = (n) => typeof TextDecoder == "function" ? Ln(n) : Nn(n), jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1400
+ const Hn = (n) => typeof TextEncoder == "function" ? jn(n) : Ln(n), zn = (n) => typeof TextDecoder == "function" ? Vn(n) : Kn(n), Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1401
1401
  __proto__: null,
1402
- fromUtf8: Kn,
1403
- toUtf8: Vn
1404
- }, Symbol.toStringTag, { value: "Module" })), Hn = /* @__PURE__ */ Ut(jn);
1402
+ fromUtf8: Hn,
1403
+ toUtf8: zn
1404
+ }, Symbol.toStringTag, { value: "Module" })), Yn = /* @__PURE__ */ Ut(Wn);
1405
1405
  var Xt;
1406
- function zn() {
1407
- if (Xt) return be;
1408
- Xt = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.convertToBuffer = void 0;
1409
- var n = Hn, e = typeof Buffer < "u" && Buffer.from ? function(r) {
1406
+ function Gn() {
1407
+ if (Xt) return _e;
1408
+ Xt = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.convertToBuffer = void 0;
1409
+ var n = Yn, e = typeof Buffer < "u" && Buffer.from ? function(r) {
1410
1410
  return Buffer.from(r, "utf8");
1411
1411
  } : n.fromUtf8;
1412
1412
  function t(r) {
1413
1413
  return r instanceof Uint8Array ? r : typeof r == "string" ? e(r) : ArrayBuffer.isView(r) ? new Uint8Array(r.buffer, r.byteOffset, r.byteLength / Uint8Array.BYTES_PER_ELEMENT) : new Uint8Array(r);
1414
1414
  }
1415
- return be.convertToBuffer = t, be;
1415
+ return _e.convertToBuffer = t, _e;
1416
1416
  }
1417
- var _e = {}, Qt;
1418
- function Wn() {
1419
- if (Qt) return _e;
1420
- Qt = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.isEmptyData = void 0;
1417
+ var Ae = {}, Qt;
1418
+ function Jn() {
1419
+ if (Qt) return Ae;
1420
+ Qt = 1, Object.defineProperty(Ae, "__esModule", { value: !0 }), Ae.isEmptyData = void 0;
1421
1421
  function n(e) {
1422
1422
  return typeof e == "string" ? e.length === 0 : e.byteLength === 0;
1423
1423
  }
1424
- return _e.isEmptyData = n, _e;
1424
+ return Ae.isEmptyData = n, Ae;
1425
1425
  }
1426
- var Ae = {}, er;
1427
- function Yn() {
1428
- if (er) return Ae;
1429
- er = 1, Object.defineProperty(Ae, "__esModule", { value: !0 }), Ae.numToUint8 = void 0;
1426
+ var xe = {}, er;
1427
+ function Zn() {
1428
+ if (er) return xe;
1429
+ er = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.numToUint8 = void 0;
1430
1430
  function n(e) {
1431
1431
  return new Uint8Array([
1432
1432
  (e & 4278190080) >> 24,
@@ -1435,10 +1435,10 @@ function Yn() {
1435
1435
  e & 255
1436
1436
  ]);
1437
1437
  }
1438
- return Ae.numToUint8 = n, Ae;
1438
+ return xe.numToUint8 = n, xe;
1439
1439
  }
1440
1440
  var Ce = {}, tr;
1441
- function Gn() {
1441
+ function Xn() {
1442
1442
  if (tr) return Ce;
1443
1443
  tr = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.uint32ArrayFrom = void 0;
1444
1444
  function n(e) {
@@ -1452,32 +1452,32 @@ function Gn() {
1452
1452
  return Ce.uint32ArrayFrom = n, Ce;
1453
1453
  }
1454
1454
  var rr;
1455
- function Jn() {
1455
+ function Qn() {
1456
1456
  return rr || (rr = 1, (function(n) {
1457
1457
  Object.defineProperty(n, "__esModule", { value: !0 }), n.uint32ArrayFrom = n.numToUint8 = n.isEmptyData = n.convertToBuffer = void 0;
1458
- var e = zn();
1458
+ var e = Gn();
1459
1459
  Object.defineProperty(n, "convertToBuffer", { enumerable: !0, get: function() {
1460
1460
  return e.convertToBuffer;
1461
1461
  } });
1462
- var t = Wn();
1462
+ var t = Jn();
1463
1463
  Object.defineProperty(n, "isEmptyData", { enumerable: !0, get: function() {
1464
1464
  return t.isEmptyData;
1465
1465
  } });
1466
- var r = Yn();
1466
+ var r = Zn();
1467
1467
  Object.defineProperty(n, "numToUint8", { enumerable: !0, get: function() {
1468
1468
  return r.numToUint8;
1469
1469
  } });
1470
- var i = Gn();
1470
+ var i = Xn();
1471
1471
  Object.defineProperty(n, "uint32ArrayFrom", { enumerable: !0, get: function() {
1472
1472
  return i.uint32ArrayFrom;
1473
1473
  } });
1474
1474
  })(st)), st;
1475
1475
  }
1476
1476
  var nr;
1477
- function Zn() {
1478
- if (nr) return we;
1479
- nr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.Sha256 = void 0;
1480
- var n = Rr, e = kr(), t = Mn(), r = Jn(), i = (
1477
+ function ei() {
1478
+ if (nr) return be;
1479
+ nr = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.Sha256 = void 0;
1480
+ var n = Pr, e = Fr(), t = qn(), r = Qn(), i = (
1481
1481
  /** @class */
1482
1482
  (function() {
1483
1483
  function o(l) {
@@ -1512,7 +1512,7 @@ function Zn() {
1512
1512
  }, o;
1513
1513
  })()
1514
1514
  );
1515
- we.Sha256 = i;
1515
+ be.Sha256 = i;
1516
1516
  function s(o) {
1517
1517
  var l = (0, r.convertToBuffer)(o);
1518
1518
  if (l.byteLength > e.BLOCK_SIZE) {
@@ -1522,39 +1522,39 @@ function Zn() {
1522
1522
  var d = new Uint8Array(e.BLOCK_SIZE);
1523
1523
  return d.set(l), d;
1524
1524
  }
1525
- return we;
1525
+ return be;
1526
1526
  }
1527
1527
  var ir;
1528
- function Xn() {
1528
+ function ti() {
1529
1529
  return ir || (ir = 1, (function(n) {
1530
1530
  Object.defineProperty(n, "__esModule", { value: !0 });
1531
- var e = Rr;
1532
- (0, e.__exportStar)(Zn(), n);
1531
+ var e = Pr;
1532
+ (0, e.__exportStar)(ei(), n);
1533
1533
  })(it)), it;
1534
1534
  }
1535
- var Ie = Xn();
1535
+ var Ie = ti();
1536
1536
  function A(n, e) {
1537
1537
  n != null && this.fromString(n, e);
1538
1538
  }
1539
1539
  function q() {
1540
1540
  return new A(null);
1541
1541
  }
1542
- var Z, Qn = 244837814094590, sr = (Qn & 16777215) == 15715070;
1543
- function ei(n, e, t, r, i, s) {
1542
+ var Z, ri = 244837814094590, sr = (ri & 16777215) == 15715070;
1543
+ function ni(n, e, t, r, i, s) {
1544
1544
  for (; --s >= 0; ) {
1545
1545
  var o = e * this[n++] + t[r] + i;
1546
1546
  i = Math.floor(o / 67108864), t[r++] = o & 67108863;
1547
1547
  }
1548
1548
  return i;
1549
1549
  }
1550
- function ti(n, e, t, r, i, s) {
1550
+ function ii(n, e, t, r, i, s) {
1551
1551
  for (var o = e & 32767, l = e >> 15; --s >= 0; ) {
1552
1552
  var h = this[n] & 32767, d = this[n++] >> 15, p = l * h + d * o;
1553
1553
  h = o * h + ((p & 32767) << 15) + t[r] + (i & 1073741823), i = (h >>> 30) + (p >>> 15) + l * d + (i >>> 30), t[r++] = h & 1073741823;
1554
1554
  }
1555
1555
  return i;
1556
1556
  }
1557
- function ri(n, e, t, r, i, s) {
1557
+ function si(n, e, t, r, i, s) {
1558
1558
  for (var o = e & 16383, l = e >> 14; --s >= 0; ) {
1559
1559
  var h = this[n] & 16383, d = this[n++] >> 14, p = l * h + d * o;
1560
1560
  h = o * h + ((p & 16383) << 14) + t[r] + i, i = (h >> 28) + (p >> 14) + l * d, t[r++] = h & 268435455;
@@ -1562,7 +1562,7 @@ function ri(n, e, t, r, i, s) {
1562
1562
  return i;
1563
1563
  }
1564
1564
  var or = typeof navigator < "u";
1565
- or && sr && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am = ti, Z = 30) : or && sr && navigator.appName != "Netscape" ? (A.prototype.am = ei, Z = 26) : (A.prototype.am = ri, Z = 28);
1565
+ or && sr && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am = ii, Z = 30) : or && sr && navigator.appName != "Netscape" ? (A.prototype.am = ni, Z = 26) : (A.prototype.am = si, Z = 28);
1566
1566
  A.prototype.DB = Z;
1567
1567
  A.prototype.DM = (1 << Z) - 1;
1568
1568
  A.prototype.DV = 1 << Z;
@@ -1570,32 +1570,32 @@ var Tt = 52;
1570
1570
  A.prototype.FV = Math.pow(2, Tt);
1571
1571
  A.prototype.F1 = Tt - Z;
1572
1572
  A.prototype.F2 = 2 * Z - Tt;
1573
- var ni = "0123456789abcdefghijklmnopqrstuvwxyz", Xe = new Array(), de, Y;
1574
- de = 48;
1575
- for (Y = 0; Y <= 9; ++Y) Xe[de++] = Y;
1576
- de = 97;
1577
- for (Y = 10; Y < 36; ++Y) Xe[de++] = Y;
1578
- de = 65;
1579
- for (Y = 10; Y < 36; ++Y) Xe[de++] = Y;
1573
+ var oi = "0123456789abcdefghijklmnopqrstuvwxyz", Xe = new Array(), pe, Y;
1574
+ pe = 48;
1575
+ for (Y = 0; Y <= 9; ++Y) Xe[pe++] = Y;
1576
+ pe = 97;
1577
+ for (Y = 10; Y < 36; ++Y) Xe[pe++] = Y;
1578
+ pe = 65;
1579
+ for (Y = 10; Y < 36; ++Y) Xe[pe++] = Y;
1580
1580
  function ar(n) {
1581
- return ni.charAt(n);
1581
+ return oi.charAt(n);
1582
1582
  }
1583
- function ii(n, e) {
1583
+ function ai(n, e) {
1584
1584
  var t = Xe[n.charCodeAt(e)];
1585
1585
  return t ?? -1;
1586
1586
  }
1587
- function si(n) {
1587
+ function ui(n) {
1588
1588
  for (var e = this.t - 1; e >= 0; --e) n[e] = this[e];
1589
1589
  n.t = this.t, n.s = this.s;
1590
1590
  }
1591
- function oi(n) {
1591
+ function li(n) {
1592
1592
  this.t = 1, this.s = n < 0 ? -1 : 0, n > 0 ? this[0] = n : n < -1 ? this[0] = n + this.DV : this.t = 0;
1593
1593
  }
1594
1594
  function It(n) {
1595
1595
  var e = q();
1596
1596
  return e.fromInt(n), e;
1597
1597
  }
1598
- function ai(n, e) {
1598
+ function ci(n, e) {
1599
1599
  var t;
1600
1600
  if (e == 16) t = 4;
1601
1601
  else if (e == 8) t = 3;
@@ -1605,7 +1605,7 @@ function ai(n, e) {
1605
1605
  else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");
1606
1606
  this.t = 0, this.s = 0;
1607
1607
  for (var r = n.length, i = !1, s = 0; --r >= 0; ) {
1608
- var o = ii(n, r);
1608
+ var o = ai(n, r);
1609
1609
  if (o < 0) {
1610
1610
  n.charAt(r) == "-" && (i = !0);
1611
1611
  continue;
@@ -1614,10 +1614,10 @@ function ai(n, e) {
1614
1614
  }
1615
1615
  this.clamp(), i && A.ZERO.subTo(this, this);
1616
1616
  }
1617
- function ui() {
1617
+ function hi() {
1618
1618
  for (var n = this.s & this.DM; this.t > 0 && this[this.t - 1] == n; ) --this.t;
1619
1619
  }
1620
- function li(n) {
1620
+ function fi(n) {
1621
1621
  if (this.s < 0) return "-" + this.negate().toString(n);
1622
1622
  var e;
1623
1623
  if (n == 16) e = 4;
@@ -1632,14 +1632,14 @@ function li(n) {
1632
1632
  l < e ? (r = (this[o] & (1 << l) - 1) << e - l, r |= this[--o] >> (l += this.DB - e)) : (r = this[o] >> (l -= e) & t, l <= 0 && (l += this.DB, --o)), r > 0 && (i = !0), i && (s += ar(r));
1633
1633
  return i ? s : "0";
1634
1634
  }
1635
- function ci() {
1635
+ function di() {
1636
1636
  var n = q();
1637
1637
  return A.ZERO.subTo(this, n), n;
1638
1638
  }
1639
- function hi() {
1639
+ function pi() {
1640
1640
  return this.s < 0 ? this.negate() : this;
1641
1641
  }
1642
- function fi(n) {
1642
+ function gi(n) {
1643
1643
  var e = this.s - n.s;
1644
1644
  if (e != 0) return e;
1645
1645
  var t = this.t;
@@ -1651,27 +1651,27 @@ function Dt(n) {
1651
1651
  var e = 1, t;
1652
1652
  return (t = n >>> 16) != 0 && (n = t, e += 16), (t = n >> 8) != 0 && (n = t, e += 8), (t = n >> 4) != 0 && (n = t, e += 4), (t = n >> 2) != 0 && (n = t, e += 2), (t = n >> 1) != 0 && (n = t, e += 1), e;
1653
1653
  }
1654
- function di() {
1654
+ function mi() {
1655
1655
  return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Dt(this[this.t - 1] ^ this.s & this.DM);
1656
1656
  }
1657
- function pi(n, e) {
1657
+ function yi(n, e) {
1658
1658
  var t;
1659
1659
  for (t = this.t - 1; t >= 0; --t) e[t + n] = this[t];
1660
1660
  for (t = n - 1; t >= 0; --t) e[t] = 0;
1661
1661
  e.t = this.t + n, e.s = this.s;
1662
1662
  }
1663
- function gi(n, e) {
1663
+ function vi(n, e) {
1664
1664
  for (var t = n; t < this.t; ++t) e[t - n] = this[t];
1665
1665
  e.t = Math.max(this.t - n, 0), e.s = this.s;
1666
1666
  }
1667
- function mi(n, e) {
1667
+ function wi(n, e) {
1668
1668
  var t = n % this.DB, r = this.DB - t, i = (1 << r) - 1, s = Math.floor(n / this.DB), o = this.s << t & this.DM, l;
1669
1669
  for (l = this.t - 1; l >= 0; --l)
1670
1670
  e[l + s + 1] = this[l] >> r | o, o = (this[l] & i) << t;
1671
1671
  for (l = s - 1; l >= 0; --l) e[l] = 0;
1672
1672
  e[s] = o, e.t = this.t + s + 1, e.s = this.s, e.clamp();
1673
1673
  }
1674
- function vi(n, e) {
1674
+ function bi(n, e) {
1675
1675
  e.s = this.s;
1676
1676
  var t = Math.floor(n / this.DB);
1677
1677
  if (t >= this.t) {
@@ -1684,7 +1684,7 @@ function vi(n, e) {
1684
1684
  e[o - t - 1] |= (this[o] & s) << i, e[o - t] = this[o] >> r;
1685
1685
  r > 0 && (e[this.t - t - 1] |= (this.s & s) << i), e.t = this.t - t, e.clamp();
1686
1686
  }
1687
- function yi(n, e) {
1687
+ function Si(n, e) {
1688
1688
  for (var t = 0, r = 0, i = Math.min(n.t, this.t); t < i; )
1689
1689
  r += this[t] - n[t], e[t++] = r & this.DM, r >>= this.DB;
1690
1690
  if (n.t < this.t) {
@@ -1698,13 +1698,13 @@ function yi(n, e) {
1698
1698
  }
1699
1699
  e.s = r < 0 ? -1 : 0, r < -1 ? e[t++] = this.DV + r : r > 0 && (e[t++] = r), e.t = t, e.clamp();
1700
1700
  }
1701
- function wi(n, e) {
1701
+ function _i(n, e) {
1702
1702
  var t = this.abs(), r = n.abs(), i = t.t;
1703
1703
  for (e.t = i + r.t; --i >= 0; ) e[i] = 0;
1704
1704
  for (i = 0; i < r.t; ++i) e[i + t.t] = t.am(0, r[i], e, i, 0, t.t);
1705
1705
  e.s = 0, e.clamp(), this.s != n.s && A.ZERO.subTo(e, e);
1706
1706
  }
1707
- function Si(n) {
1707
+ function Ai(n) {
1708
1708
  for (var e = this.abs(), t = n.t = 2 * e.t; --t >= 0; ) n[t] = 0;
1709
1709
  for (t = 0; t < e.t - 1; ++t) {
1710
1710
  var r = e.am(t, e[t], n, 2 * t, 0, 1);
@@ -1712,7 +1712,7 @@ function Si(n) {
1712
1712
  }
1713
1713
  n.t > 0 && (n[n.t - 1] += e.am(t, e[t], n, 2 * t, 0, 1)), n.s = 0, n.clamp();
1714
1714
  }
1715
- function bi(n, e, t) {
1715
+ function xi(n, e, t) {
1716
1716
  var r = n.abs();
1717
1717
  if (!(r.t <= 0)) {
1718
1718
  var i = this.abs();
@@ -1725,32 +1725,32 @@ function bi(n, e, t) {
1725
1725
  h > 0 ? (r.lShiftTo(h, s), i.lShiftTo(h, t)) : (r.copyTo(s), i.copyTo(t));
1726
1726
  var d = s.t, p = s[d - 1];
1727
1727
  if (p != 0) {
1728
- var m = p * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0), v = this.FV / m, y = (1 << this.F1) / m, S = 1 << this.F2, _ = t.t, E = _ - d, x = e ?? q();
1729
- for (s.dlShiftTo(E, x), t.compareTo(x) >= 0 && (t[t.t++] = 1, t.subTo(x, t)), A.ONE.dlShiftTo(d, x), x.subTo(s, s); s.t < d; ) s[s.t++] = 0;
1730
- for (; --E >= 0; ) {
1731
- var U = t[--_] == p ? this.DM : Math.floor(t[_] * v + (t[_ - 1] + S) * y);
1732
- if ((t[_] += s.am(0, U, t, E, 0, d)) < U)
1733
- for (s.dlShiftTo(E, x), t.subTo(x, t); t[_] < --U; ) t.subTo(x, t);
1728
+ var m = p * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0), y = this.FV / m, v = (1 << this.F1) / m, b = 1 << this.F2, _ = t.t, C = _ - d, E = e ?? q();
1729
+ for (s.dlShiftTo(C, E), t.compareTo(E) >= 0 && (t[t.t++] = 1, t.subTo(E, t)), A.ONE.dlShiftTo(d, E), E.subTo(s, s); s.t < d; ) s[s.t++] = 0;
1730
+ for (; --C >= 0; ) {
1731
+ var T = t[--_] == p ? this.DM : Math.floor(t[_] * y + (t[_ - 1] + b) * v);
1732
+ if ((t[_] += s.am(0, T, t, C, 0, d)) < T)
1733
+ for (s.dlShiftTo(C, E), t.subTo(E, t); t[_] < --T; ) t.subTo(E, t);
1734
1734
  }
1735
1735
  e != null && (t.drShiftTo(d, e), o != l && A.ZERO.subTo(e, e)), t.t = d, t.clamp(), h > 0 && t.rShiftTo(h, t), o < 0 && A.ZERO.subTo(t, t);
1736
1736
  }
1737
1737
  }
1738
1738
  }
1739
- function _i(n) {
1739
+ function Ci(n) {
1740
1740
  var e = q();
1741
1741
  return this.abs().divRemTo(n, null, e), this.s < 0 && e.compareTo(A.ZERO) > 0 && n.subTo(e, e), e;
1742
1742
  }
1743
- function Ai() {
1743
+ function Ei() {
1744
1744
  if (this.t < 1) return 0;
1745
1745
  var n = this[0];
1746
1746
  if ((n & 1) == 0) return 0;
1747
1747
  var e = n & 3;
1748
1748
  return e = e * (2 - (n & 15) * e) & 15, e = e * (2 - (n & 255) * e) & 255, e = e * (2 - ((n & 65535) * e & 65535)) & 65535, e = e * (2 - n * e % this.DV) % this.DV, e > 0 ? this.DV - e : -e;
1749
1749
  }
1750
- function Ci(n) {
1750
+ function Ui(n) {
1751
1751
  return this.compareTo(n) == 0;
1752
1752
  }
1753
- function xi(n, e) {
1753
+ function Ti(n, e) {
1754
1754
  for (var t = 0, r = 0, i = Math.min(n.t, this.t); t < i; )
1755
1755
  r += this[t] + n[t], e[t++] = r & this.DM, r >>= this.DB;
1756
1756
  if (n.t < this.t) {
@@ -1764,34 +1764,34 @@ function xi(n, e) {
1764
1764
  }
1765
1765
  e.s = r < 0 ? -1 : 0, r > 0 ? e[t++] = r : r < -1 && (e[t++] = this.DV + r), e.t = t, e.clamp();
1766
1766
  }
1767
- function Ei(n) {
1767
+ function Ii(n) {
1768
1768
  var e = q();
1769
1769
  return this.addTo(n, e), e;
1770
1770
  }
1771
- function Ui(n) {
1771
+ function Di(n) {
1772
1772
  var e = q();
1773
1773
  return this.subTo(n, e), e;
1774
1774
  }
1775
- function Ti(n) {
1775
+ function ki(n) {
1776
1776
  var e = q();
1777
1777
  return this.multiplyTo(n, e), e;
1778
1778
  }
1779
- function Ii(n) {
1779
+ function Ri(n) {
1780
1780
  var e = q();
1781
1781
  return this.divRemTo(n, e, null), e;
1782
1782
  }
1783
- function pe(n) {
1783
+ function ge(n) {
1784
1784
  this.m = n, this.mp = n.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << n.DB - 15) - 1, this.mt2 = 2 * n.t;
1785
1785
  }
1786
- function Di(n) {
1786
+ function $i(n) {
1787
1787
  var e = q();
1788
1788
  return n.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), n.s < 0 && e.compareTo(A.ZERO) > 0 && this.m.subTo(e, e), e;
1789
1789
  }
1790
- function Ri(n) {
1790
+ function Pi(n) {
1791
1791
  var e = q();
1792
1792
  return n.copyTo(e), this.reduce(e), e;
1793
1793
  }
1794
- function ki(n) {
1794
+ function Fi(n) {
1795
1795
  for (; n.t <= this.mt2; )
1796
1796
  n[n.t++] = 0;
1797
1797
  for (var e = 0; e < this.m.t; ++e) {
@@ -1801,19 +1801,19 @@ function ki(n) {
1801
1801
  }
1802
1802
  n.clamp(), n.drShiftTo(this.m.t, n), n.compareTo(this.m) >= 0 && n.subTo(this.m, n);
1803
1803
  }
1804
- function $i(n, e) {
1804
+ function Bi(n, e) {
1805
1805
  n.squareTo(e), this.reduce(e);
1806
1806
  }
1807
- function Pi(n, e, t) {
1807
+ function Mi(n, e, t) {
1808
1808
  n.multiplyTo(e, t), this.reduce(t);
1809
1809
  }
1810
- pe.prototype.convert = Di;
1811
- pe.prototype.revert = Ri;
1812
- pe.prototype.reduce = ki;
1813
- pe.prototype.mulTo = Pi;
1814
- pe.prototype.sqrTo = $i;
1815
- function Fi(n, e, t) {
1816
- var r = n.bitLength(), i, s = It(1), o = new pe(e);
1810
+ ge.prototype.convert = $i;
1811
+ ge.prototype.revert = Pi;
1812
+ ge.prototype.reduce = Fi;
1813
+ ge.prototype.mulTo = Mi;
1814
+ ge.prototype.sqrTo = Bi;
1815
+ function Oi(n, e, t) {
1816
+ var r = n.bitLength(), i, s = It(1), o = new ge(e);
1817
1817
  if (r <= 0) return s;
1818
1818
  r < 18 ? i = 1 : r < 48 ? i = 3 : r < 144 ? i = 4 : r < 768 ? i = 5 : i = 6;
1819
1819
  var l = new Array(), h = 3, d = i - 1, p = (1 << i) - 1;
@@ -1822,58 +1822,58 @@ function Fi(n, e, t) {
1822
1822
  for (o.sqrTo(l[1], m); h <= p; )
1823
1823
  l[h] = q(), o.mulTo(m, l[h - 2], l[h]), h += 2;
1824
1824
  }
1825
- var v = n.t - 1, y, S = !0, _ = q(), E;
1826
- for (r = Dt(n[v]) - 1; v >= 0; ) {
1827
- for (r >= d ? y = n[v] >> r - d & p : (y = (n[v] & (1 << r + 1) - 1) << d - r, v > 0 && (y |= n[v - 1] >> this.DB + r - d)), h = i; (y & 1) == 0; )
1828
- y >>= 1, --h;
1829
- if ((r -= h) < 0 && (r += this.DB, --v), S)
1830
- l[y].copyTo(s), S = !1;
1825
+ var y = n.t - 1, v, b = !0, _ = q(), C;
1826
+ for (r = Dt(n[y]) - 1; y >= 0; ) {
1827
+ for (r >= d ? v = n[y] >> r - d & p : (v = (n[y] & (1 << r + 1) - 1) << d - r, y > 0 && (v |= n[y - 1] >> this.DB + r - d)), h = i; (v & 1) == 0; )
1828
+ v >>= 1, --h;
1829
+ if ((r -= h) < 0 && (r += this.DB, --y), b)
1830
+ l[v].copyTo(s), b = !1;
1831
1831
  else {
1832
1832
  for (; h > 1; )
1833
1833
  o.sqrTo(s, _), o.sqrTo(_, s), h -= 2;
1834
- h > 0 ? o.sqrTo(s, _) : (E = s, s = _, _ = E), o.mulTo(_, l[y], s);
1835
- }
1836
- for (; v >= 0 && (n[v] & 1 << r) == 0; )
1837
- o.sqrTo(s, _), E = s, s = _, _ = E, --r < 0 && (r = this.DB - 1, --v);
1838
- }
1839
- var x = o.revert(s);
1840
- return t(null, x), x;
1841
- }
1842
- A.prototype.copyTo = si;
1843
- A.prototype.fromInt = oi;
1844
- A.prototype.fromString = ai;
1845
- A.prototype.clamp = ui;
1846
- A.prototype.dlShiftTo = pi;
1847
- A.prototype.drShiftTo = gi;
1848
- A.prototype.lShiftTo = mi;
1849
- A.prototype.rShiftTo = vi;
1850
- A.prototype.subTo = yi;
1851
- A.prototype.multiplyTo = wi;
1852
- A.prototype.squareTo = Si;
1853
- A.prototype.divRemTo = bi;
1854
- A.prototype.invDigit = Ai;
1855
- A.prototype.addTo = xi;
1856
- A.prototype.toString = li;
1857
- A.prototype.negate = ci;
1858
- A.prototype.abs = hi;
1859
- A.prototype.compareTo = fi;
1860
- A.prototype.bitLength = di;
1861
- A.prototype.mod = _i;
1862
- A.prototype.equals = Ci;
1863
- A.prototype.add = Ei;
1864
- A.prototype.subtract = Ui;
1865
- A.prototype.multiply = Ti;
1866
- A.prototype.divide = Ii;
1867
- A.prototype.modPow = Fi;
1834
+ h > 0 ? o.sqrTo(s, _) : (C = s, s = _, _ = C), o.mulTo(_, l[v], s);
1835
+ }
1836
+ for (; y >= 0 && (n[y] & 1 << r) == 0; )
1837
+ o.sqrTo(s, _), C = s, s = _, _ = C, --r < 0 && (r = this.DB - 1, --y);
1838
+ }
1839
+ var E = o.revert(s);
1840
+ return t(null, E), E;
1841
+ }
1842
+ A.prototype.copyTo = ui;
1843
+ A.prototype.fromInt = li;
1844
+ A.prototype.fromString = ci;
1845
+ A.prototype.clamp = hi;
1846
+ A.prototype.dlShiftTo = yi;
1847
+ A.prototype.drShiftTo = vi;
1848
+ A.prototype.lShiftTo = wi;
1849
+ A.prototype.rShiftTo = bi;
1850
+ A.prototype.subTo = Si;
1851
+ A.prototype.multiplyTo = _i;
1852
+ A.prototype.squareTo = Ai;
1853
+ A.prototype.divRemTo = xi;
1854
+ A.prototype.invDigit = Ei;
1855
+ A.prototype.addTo = Ti;
1856
+ A.prototype.toString = fi;
1857
+ A.prototype.negate = di;
1858
+ A.prototype.abs = pi;
1859
+ A.prototype.compareTo = gi;
1860
+ A.prototype.bitLength = mi;
1861
+ A.prototype.mod = Ci;
1862
+ A.prototype.equals = Ui;
1863
+ A.prototype.add = Ii;
1864
+ A.prototype.subtract = Di;
1865
+ A.prototype.multiply = ki;
1866
+ A.prototype.divide = Ri;
1867
+ A.prototype.modPow = Oi;
1868
1868
  A.ZERO = It(0);
1869
1869
  A.ONE = It(1);
1870
1870
  function ot(n) {
1871
- return R.Buffer.from(new Ir().random(n).toString(), "hex");
1871
+ return k.Buffer.from(new Rr().random(n).toString(), "hex");
1872
1872
  }
1873
- var Bi = /^[89a-f]/i, Mi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", Oi = "userAttributes.", ne = /* @__PURE__ */ (function() {
1873
+ var Ni = /^[89a-f]/i, qi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", Li = "userAttributes.", ne = /* @__PURE__ */ (function() {
1874
1874
  function n(t) {
1875
- this.N = new A(Mi, 16), this.g = new A("2", 16), this.k = new A(this.hexHash("" + this.padHex(this.N) + this.padHex(this.g)), 16), this.smallAValue = this.generateRandomSmallA(), this.getLargeAValue(function() {
1876
- }), this.infoBits = R.Buffer.from("Caldera Derived Key", "utf8"), this.poolName = t;
1875
+ this.N = new A(qi, 16), this.g = new A("2", 16), this.k = new A(this.hexHash("" + this.padHex(this.N) + this.padHex(this.g)), 16), this.smallAValue = this.generateRandomSmallA(), this.getLargeAValue(function() {
1876
+ }), this.infoBits = k.Buffer.from("Caldera Derived Key", "utf8"), this.poolName = t;
1877
1877
  }
1878
1878
  var e = n.prototype;
1879
1879
  return e.getSmallAValue = function() {
@@ -1913,12 +1913,12 @@ var Bi = /^[89a-f]/i, Mi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
1913
1913
  }, e.hash = function(r) {
1914
1914
  var i = new Ie.Sha256();
1915
1915
  i.update(r);
1916
- var s = i.digestSync(), o = R.Buffer.from(s).toString("hex");
1916
+ var s = i.digestSync(), o = k.Buffer.from(s).toString("hex");
1917
1917
  return new Array(64 - o.length).join("0") + o;
1918
1918
  }, e.hexHash = function(r) {
1919
- return this.hash(R.Buffer.from(r, "hex"));
1919
+ return this.hash(k.Buffer.from(r, "hex"));
1920
1920
  }, e.computehkdf = function(r, i) {
1921
- var s = R.Buffer.concat([this.infoBits, R.Buffer.from("", "utf8")]), o = new Ie.Sha256(i);
1921
+ var s = k.Buffer.concat([this.infoBits, k.Buffer.from("", "utf8")]), o = new Ie.Sha256(i);
1922
1922
  o.update(r);
1923
1923
  var l = o.digestSync(), h = new Ie.Sha256(l);
1924
1924
  h.update(s);
@@ -1931,10 +1931,10 @@ var Bi = /^[89a-f]/i, Mi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
1931
1931
  if (this.UValue = this.calculateU(this.largeAValue, s), this.UValue.equals(A.ZERO))
1932
1932
  throw new Error("U cannot be zero.");
1933
1933
  var d = "" + this.poolName + r + ":" + i, p = this.hash(d), m = new A(this.hexHash(this.padHex(o) + p), 16);
1934
- this.calculateS(m, s, function(v, y) {
1935
- v && l(v, null);
1936
- var S = h.computehkdf(R.Buffer.from(h.padHex(y), "hex"), R.Buffer.from(h.padHex(h.UValue), "hex"));
1937
- l(null, S);
1934
+ this.calculateS(m, s, function(y, v) {
1935
+ y && l(y, null);
1936
+ var b = h.computehkdf(k.Buffer.from(h.padHex(v), "hex"), k.Buffer.from(h.padHex(h.UValue), "hex"));
1937
+ l(null, b);
1938
1938
  });
1939
1939
  }, e.calculateS = function(r, i, s) {
1940
1940
  var o = this;
@@ -1946,12 +1946,12 @@ var Bi = /^[89a-f]/i, Mi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
1946
1946
  });
1947
1947
  });
1948
1948
  }, e.getNewPasswordRequiredChallengeUserAttributePrefix = function() {
1949
- return Oi;
1949
+ return Li;
1950
1950
  }, e.padHex = function(r) {
1951
1951
  if (!(r instanceof A))
1952
1952
  throw new Error("Not a BigInteger");
1953
1953
  var i = r.compareTo(A.ZERO) < 0, s = r.abs().toString(16);
1954
- if (s = s.length % 2 !== 0 ? "0" + s : s, s = Bi.test(s) ? "00" + s : s, i) {
1954
+ if (s = s.length % 2 !== 0 ? "0" + s : s, s = Ni.test(s) ? "00" + s : s, i) {
1955
1955
  var o = s.split("").map(function(h) {
1956
1956
  var d = ~parseInt(h, 16) & 15;
1957
1957
  return "0123456789ABCDEF".charAt(d);
@@ -1961,7 +1961,7 @@ var Bi = /^[89a-f]/i, Mi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
1961
1961
  return s;
1962
1962
  }, n;
1963
1963
  })();
1964
- var $r = /* @__PURE__ */ (function() {
1964
+ var Br = /* @__PURE__ */ (function() {
1965
1965
  function n(t) {
1966
1966
  this.jwtToken = t || "", this.payload = this.decodePayload();
1967
1967
  }
@@ -1975,13 +1975,13 @@ var $r = /* @__PURE__ */ (function() {
1975
1975
  }, e.decodePayload = function() {
1976
1976
  var r = this.jwtToken.split(".")[1];
1977
1977
  try {
1978
- return JSON.parse(R.Buffer.from(r, "base64").toString("utf8"));
1978
+ return JSON.parse(k.Buffer.from(r, "base64").toString("utf8"));
1979
1979
  } catch {
1980
1980
  return {};
1981
1981
  }
1982
1982
  }, n;
1983
1983
  })();
1984
- function Ni(n, e) {
1984
+ function Ki(n, e) {
1985
1985
  n.prototype = Object.create(e.prototype), n.prototype.constructor = n, pt(n, e);
1986
1986
  }
1987
1987
  function pt(n, e) {
@@ -1994,9 +1994,9 @@ var gt = /* @__PURE__ */ (function(n) {
1994
1994
  var r = t === void 0 ? {} : t, i = r.AccessToken;
1995
1995
  return n.call(this, i || "") || this;
1996
1996
  }
1997
- return Ni(e, n), e;
1998
- })($r);
1999
- function qi(n, e) {
1997
+ return Ki(e, n), e;
1998
+ })(Br);
1999
+ function ji(n, e) {
2000
2000
  n.prototype = Object.create(e.prototype), n.prototype.constructor = n, mt(n, e);
2001
2001
  }
2002
2002
  function mt(n, e) {
@@ -2004,14 +2004,14 @@ function mt(n, e) {
2004
2004
  return t.__proto__ = r, t;
2005
2005
  }, mt(n, e);
2006
2006
  }
2007
- var vt = /* @__PURE__ */ (function(n) {
2007
+ var yt = /* @__PURE__ */ (function(n) {
2008
2008
  function e(t) {
2009
2009
  var r = t === void 0 ? {} : t, i = r.IdToken;
2010
2010
  return n.call(this, i || "") || this;
2011
2011
  }
2012
- return qi(e, n), e;
2013
- })($r);
2014
- var yt = /* @__PURE__ */ (function() {
2012
+ return ji(e, n), e;
2013
+ })(Br);
2014
+ var vt = /* @__PURE__ */ (function() {
2015
2015
  function n(t) {
2016
2016
  var r = t === void 0 ? {} : t, i = r.RefreshToken;
2017
2017
  this.token = i || "";
@@ -2020,12 +2020,12 @@ var yt = /* @__PURE__ */ (function() {
2020
2020
  return e.getToken = function() {
2021
2021
  return this.token;
2022
2022
  }, n;
2023
- })(), Li = "5.0.4";
2024
- var Ki = "aws-amplify/" + Li, Pr = {
2025
- userAgent: Ki,
2023
+ })(), Vi = "5.0.4";
2024
+ var Hi = "aws-amplify/" + Vi, Mr = {
2025
+ userAgent: Hi,
2026
2026
  isReactNative: typeof navigator < "u" && navigator.product === "ReactNative"
2027
- }, Vi = function() {
2028
- return Pr.userAgent;
2027
+ }, zi = function() {
2028
+ return Mr.userAgent;
2029
2029
  };
2030
2030
  var wt = /* @__PURE__ */ (function() {
2031
2031
  function n(t) {
@@ -2051,12 +2051,12 @@ var wt = /* @__PURE__ */ (function() {
2051
2051
  return i < this.accessToken.getExpiration() && i < this.idToken.getExpiration();
2052
2052
  }, n;
2053
2053
  })();
2054
- var ji = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Hi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], St = /* @__PURE__ */ (function() {
2054
+ var Wi = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Yi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], bt = /* @__PURE__ */ (function() {
2055
2055
  function n() {
2056
2056
  }
2057
2057
  var e = n.prototype;
2058
2058
  return e.getNowString = function() {
2059
- var r = /* @__PURE__ */ new Date(), i = Hi[r.getUTCDay()], s = ji[r.getUTCMonth()], o = r.getUTCDate(), l = r.getUTCHours();
2059
+ var r = /* @__PURE__ */ new Date(), i = Yi[r.getUTCDay()], s = Wi[r.getUTCMonth()], o = r.getUTCDate(), l = r.getUTCHours();
2060
2060
  l < 10 && (l = "0" + l);
2061
2061
  var h = r.getUTCMinutes();
2062
2062
  h < 10 && (h = "0" + h);
@@ -2066,7 +2066,7 @@ var ji = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
2066
2066
  return m;
2067
2067
  }, n;
2068
2068
  })();
2069
- var Fr = /* @__PURE__ */ (function() {
2069
+ var Or = /* @__PURE__ */ (function() {
2070
2070
  function n(t) {
2071
2071
  var r = t === void 0 ? {} : t, i = r.Name, s = r.Value;
2072
2072
  this.Name = i || "", this.Value = s || "";
@@ -2089,7 +2089,7 @@ var Fr = /* @__PURE__ */ (function() {
2089
2089
  };
2090
2090
  }, n;
2091
2091
  })();
2092
- var te = {}, zi = /* @__PURE__ */ (function() {
2092
+ var te = {}, Gi = /* @__PURE__ */ (function() {
2093
2093
  function n() {
2094
2094
  }
2095
2095
  return n.setItem = function(t, r) {
@@ -2101,12 +2101,12 @@ var te = {}, zi = /* @__PURE__ */ (function() {
2101
2101
  }, n.clear = function() {
2102
2102
  return te = {}, te;
2103
2103
  }, n;
2104
- })(), Br = /* @__PURE__ */ (function() {
2104
+ })(), Nr = /* @__PURE__ */ (function() {
2105
2105
  function n() {
2106
2106
  try {
2107
2107
  this.storageWindow = window.localStorage, this.storageWindow.setItem("aws.cognito.test-ls", 1), this.storageWindow.removeItem("aws.cognito.test-ls");
2108
2108
  } catch {
2109
- this.storageWindow = zi;
2109
+ this.storageWindow = Gi;
2110
2110
  }
2111
2111
  }
2112
2112
  var e = n.prototype;
@@ -2114,11 +2114,11 @@ var te = {}, zi = /* @__PURE__ */ (function() {
2114
2114
  return this.storageWindow;
2115
2115
  }, n;
2116
2116
  })();
2117
- var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : navigator.userAgent : "nodejs", bt = /* @__PURE__ */ (function() {
2117
+ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : navigator.userAgent : "nodejs", St = /* @__PURE__ */ (function() {
2118
2118
  function n(t) {
2119
2119
  if (t == null || t.Username == null || t.Pool == null)
2120
2120
  throw new Error("Username and Pool information are required.");
2121
- this.username = t.Username || "", this.pool = t.Pool, this.Session = null, this.client = t.Pool.client, this.signInUserSession = null, this.authenticationFlowType = "USER_SRP_AUTH", this.storage = t.Storage || new Br().getStorage(), this.keyPrefix = "CognitoIdentityServiceProvider." + this.pool.getClientId(), this.userDataKey = this.keyPrefix + "." + this.username + ".userData";
2121
+ this.username = t.Username || "", this.pool = t.Pool, this.Session = null, this.client = t.Pool.client, this.signInUserSession = null, this.authenticationFlowType = "USER_SRP_AUTH", this.storage = t.Storage || new Nr().getStorage(), this.keyPrefix = "CognitoIdentityServiceProvider." + this.pool.getClientId(), this.userDataKey = this.keyPrefix + "." + this.username + ".userData";
2122
2122
  }
2123
2123
  var e = n.prototype;
2124
2124
  return e.setSignInUserSession = function(r) {
@@ -2143,31 +2143,31 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2143
2143
  this.getUserContextData() && (h.UserContextData = this.getUserContextData()), this.client.request("InitiateAuth", h, function(d, p) {
2144
2144
  if (d)
2145
2145
  return i.onFailure(d);
2146
- var m = p.ChallengeName, v = p.ChallengeParameters;
2147
- return m === "CUSTOM_CHALLENGE" ? (s.Session = p.Session, i.customChallenge(v)) : (s.signInUserSession = s.getCognitoUserSession(p.AuthenticationResult), s.cacheTokens(), i.onSuccess(s.signInUserSession));
2146
+ var m = p.ChallengeName, y = p.ChallengeParameters;
2147
+ return m === "CUSTOM_CHALLENGE" ? (s.Session = p.Session, i.customChallenge(y)) : (s.signInUserSession = s.getCognitoUserSession(p.AuthenticationResult), s.cacheTokens(), i.onSuccess(s.signInUserSession));
2148
2148
  });
2149
2149
  }, e.authenticateUser = function(r, i) {
2150
2150
  return this.authenticationFlowType === "USER_PASSWORD_AUTH" ? this.authenticateUserPlainUsernamePassword(r, i) : this.authenticationFlowType === "USER_SRP_AUTH" || this.authenticationFlowType === "CUSTOM_AUTH" ? this.authenticateUserDefaultAuth(r, i) : i.onFailure(new Error("Authentication flow type is invalid."));
2151
2151
  }, e.authenticateUserDefaultAuth = function(r, i) {
2152
- var s = this, o = new ne(this.pool.getUserPoolName()), l = new St(), h, d, p = {};
2153
- this.deviceKey != null && (p.DEVICE_KEY = this.deviceKey), p.USERNAME = this.username, o.getLargeAValue(function(m, v) {
2154
- m && i.onFailure(m), p.SRP_A = v.toString(16), s.authenticationFlowType === "CUSTOM_AUTH" && (p.CHALLENGE_NAME = "SRP_A");
2155
- var y = Object.keys(r.getValidationData()).length !== 0 ? r.getValidationData() : r.getClientMetadata(), S = {
2152
+ var s = this, o = new ne(this.pool.getUserPoolName()), l = new bt(), h, d, p = {};
2153
+ this.deviceKey != null && (p.DEVICE_KEY = this.deviceKey), p.USERNAME = this.username, o.getLargeAValue(function(m, y) {
2154
+ m && i.onFailure(m), p.SRP_A = y.toString(16), s.authenticationFlowType === "CUSTOM_AUTH" && (p.CHALLENGE_NAME = "SRP_A");
2155
+ var v = Object.keys(r.getValidationData()).length !== 0 ? r.getValidationData() : r.getClientMetadata(), b = {
2156
2156
  AuthFlow: s.authenticationFlowType,
2157
2157
  ClientId: s.pool.getClientId(),
2158
2158
  AuthParameters: p,
2159
- ClientMetadata: y
2159
+ ClientMetadata: v
2160
2160
  };
2161
- s.getUserContextData(s.username) && (S.UserContextData = s.getUserContextData(s.username)), s.client.request("InitiateAuth", S, function(_, E) {
2161
+ s.getUserContextData(s.username) && (b.UserContextData = s.getUserContextData(s.username)), s.client.request("InitiateAuth", b, function(_, C) {
2162
2162
  if (_)
2163
2163
  return i.onFailure(_);
2164
- var x = E.ChallengeParameters;
2165
- s.username = x.USER_ID_FOR_SRP, s.userDataKey = s.keyPrefix + "." + s.username + ".userData", h = new A(x.SRP_B, 16), d = new A(x.SALT, 16), s.getCachedDeviceKeyAndPassword(), o.getPasswordAuthenticationKey(s.username, r.getPassword(), h, d, function(U, P) {
2166
- U && i.onFailure(U);
2167
- var B = l.getNowString(), F = R.Buffer.concat([R.Buffer.from(s.pool.getUserPoolName(), "utf8"), R.Buffer.from(s.username, "utf8"), R.Buffer.from(x.SECRET_BLOCK, "base64"), R.Buffer.from(B, "utf8")]), X = new Ie.Sha256(P);
2164
+ var E = C.ChallengeParameters;
2165
+ s.username = E.USER_ID_FOR_SRP, s.userDataKey = s.keyPrefix + "." + s.username + ".userData", h = new A(E.SRP_B, 16), d = new A(E.SALT, 16), s.getCachedDeviceKeyAndPassword(), o.getPasswordAuthenticationKey(s.username, r.getPassword(), h, d, function(T, P) {
2166
+ T && i.onFailure(T);
2167
+ var B = l.getNowString(), F = k.Buffer.concat([k.Buffer.from(s.pool.getUserPoolName(), "utf8"), k.Buffer.from(s.username, "utf8"), k.Buffer.from(E.SECRET_BLOCK, "base64"), k.Buffer.from(B, "utf8")]), X = new Ie.Sha256(P);
2168
2168
  X.update(F);
2169
- var ge = X.digestSync(), G = R.Buffer.from(ge).toString("base64"), K = {};
2170
- K.USERNAME = s.username, K.PASSWORD_CLAIM_SECRET_BLOCK = x.SECRET_BLOCK, K.TIMESTAMP = B, K.PASSWORD_CLAIM_SIGNATURE = G, s.deviceKey != null && (K.DEVICE_KEY = s.deviceKey);
2169
+ var me = X.digestSync(), G = k.Buffer.from(me).toString("base64"), K = {};
2170
+ K.USERNAME = s.username, K.PASSWORD_CLAIM_SECRET_BLOCK = E.SECRET_BLOCK, K.TIMESTAMP = B, K.PASSWORD_CLAIM_SIGNATURE = G, s.deviceKey != null && (K.DEVICE_KEY = s.deviceKey);
2171
2171
  var Q = function(le, ve) {
2172
2172
  return s.client.request("RespondToAuthChallenge", le, function(ee, tt) {
2173
2173
  return ee && ee.code === "ResourceNotFoundException" && ee.message.toLowerCase().indexOf("device") !== -1 ? (K.DEVICE_KEY = null, s.deviceKey = null, s.randomPassword = null, s.deviceGroupKey = null, s.clearCachedDeviceKeyAndPassword(), Q(le, ve)) : ve(ee, tt);
@@ -2176,11 +2176,11 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2176
2176
  ChallengeName: "PASSWORD_VERIFIER",
2177
2177
  ClientId: s.pool.getClientId(),
2178
2178
  ChallengeResponses: K,
2179
- Session: E.Session,
2180
- ClientMetadata: y
2179
+ Session: C.Session,
2180
+ ClientMetadata: v
2181
2181
  };
2182
- s.getUserContextData() && (ue.UserContextData = s.getUserContextData()), Q(ue, function(me, le) {
2183
- return me ? i.onFailure(me) : s.authenticateUserInternal(le, o, i);
2182
+ s.getUserContextData() && (ue.UserContextData = s.getUserContextData()), Q(ue, function(ye, le) {
2183
+ return ye ? i.onFailure(ye) : s.authenticateUserInternal(le, o, i);
2184
2184
  });
2185
2185
  });
2186
2186
  });
@@ -2216,10 +2216,10 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2216
2216
  return this.Session = r.Session, s.customChallenge(h);
2217
2217
  if (l === "NEW_PASSWORD_REQUIRED") {
2218
2218
  this.Session = r.Session;
2219
- var d = null, p = null, m = [], v = i.getNewPasswordRequiredChallengeUserAttributePrefix();
2219
+ var d = null, p = null, m = [], y = i.getNewPasswordRequiredChallengeUserAttributePrefix();
2220
2220
  if (h && (d = JSON.parse(r.ChallengeParameters.userAttributes), p = JSON.parse(r.ChallengeParameters.requiredAttributes)), p)
2221
- for (var y = 0; y < p.length; y++)
2222
- m[y] = p[y].substr(v.length);
2221
+ for (var v = 0; v < p.length; v++)
2222
+ m[v] = p[v].substr(y.length);
2223
2223
  return s.newPasswordRequired(d, m);
2224
2224
  }
2225
2225
  if (l === "DEVICE_SRP_AUTH") {
@@ -2227,23 +2227,23 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2227
2227
  return;
2228
2228
  }
2229
2229
  this.signInUserSession = this.getCognitoUserSession(r.AuthenticationResult), this.challengeName = l, this.cacheTokens();
2230
- var S = r.AuthenticationResult.NewDeviceMetadata;
2231
- if (S == null)
2230
+ var b = r.AuthenticationResult.NewDeviceMetadata;
2231
+ if (b == null)
2232
2232
  return s.onSuccess(this.signInUserSession);
2233
2233
  i.generateHashDevice(r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, r.AuthenticationResult.NewDeviceMetadata.DeviceKey, function(_) {
2234
2234
  if (_)
2235
2235
  return s.onFailure(_);
2236
- var E = {
2237
- Salt: R.Buffer.from(i.getSaltDevices(), "hex").toString("base64"),
2238
- PasswordVerifier: R.Buffer.from(i.getVerifierDevices(), "hex").toString("base64")
2236
+ var C = {
2237
+ Salt: k.Buffer.from(i.getSaltDevices(), "hex").toString("base64"),
2238
+ PasswordVerifier: k.Buffer.from(i.getVerifierDevices(), "hex").toString("base64")
2239
2239
  };
2240
- o.verifierDevices = E.PasswordVerifier, o.deviceGroupKey = S.DeviceGroupKey, o.randomPassword = i.getRandomPassword(), o.client.request("ConfirmDevice", {
2241
- DeviceKey: S.DeviceKey,
2240
+ o.verifierDevices = C.PasswordVerifier, o.deviceGroupKey = b.DeviceGroupKey, o.randomPassword = i.getRandomPassword(), o.client.request("ConfirmDevice", {
2241
+ DeviceKey: b.DeviceKey,
2242
2242
  AccessToken: o.signInUserSession.getAccessToken().getJwtToken(),
2243
- DeviceSecretVerifierConfig: E,
2243
+ DeviceSecretVerifierConfig: C,
2244
2244
  DeviceName: ur
2245
- }, function(x, U) {
2246
- return x ? s.onFailure(x) : (o.deviceKey = r.AuthenticationResult.NewDeviceMetadata.DeviceKey, o.cacheDeviceKeyAndPassword(), U.UserConfirmationNecessary === !0 ? s.onSuccess(o.signInUserSession, U.UserConfirmationNecessary) : s.onSuccess(o.signInUserSession));
2245
+ }, function(E, T) {
2246
+ return E ? s.onFailure(E) : (o.deviceKey = r.AuthenticationResult.NewDeviceMetadata.DeviceKey, o.cacheDeviceKeyAndPassword(), T.UserConfirmationNecessary === !0 ? s.onSuccess(o.signInUserSession, T.UserConfirmationNecessary) : s.onSuccess(o.signInUserSession));
2247
2247
  });
2248
2248
  });
2249
2249
  }, e.completeNewPasswordChallenge = function(r, i, s, o) {
@@ -2251,8 +2251,8 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2251
2251
  if (!r)
2252
2252
  return s.onFailure(new Error("New password is required."));
2253
2253
  var h = new ne(this.pool.getUserPoolName()), d = h.getNewPasswordRequiredChallengeUserAttributePrefix(), p = {};
2254
- i && Object.keys(i).forEach(function(v) {
2255
- p[d + v] = i[v];
2254
+ i && Object.keys(i).forEach(function(y) {
2255
+ p[d + y] = i[y];
2256
2256
  }), p.NEW_PASSWORD = r, p.USERNAME = this.username;
2257
2257
  var m = {
2258
2258
  ChallengeName: "NEW_PASSWORD_REQUIRED",
@@ -2261,11 +2261,11 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2261
2261
  Session: this.Session,
2262
2262
  ClientMetadata: o
2263
2263
  };
2264
- this.getUserContextData() && (m.UserContextData = this.getUserContextData()), this.client.request("RespondToAuthChallenge", m, function(v, y) {
2265
- return v ? s.onFailure(v) : l.authenticateUserInternal(y, h, s);
2264
+ this.getUserContextData() && (m.UserContextData = this.getUserContextData()), this.client.request("RespondToAuthChallenge", m, function(y, v) {
2265
+ return y ? s.onFailure(y) : l.authenticateUserInternal(v, h, s);
2266
2266
  });
2267
2267
  }, e.getDeviceResponse = function(r, i) {
2268
- var s = this, o = new ne(this.deviceGroupKey), l = new St(), h = {};
2268
+ var s = this, o = new ne(this.deviceGroupKey), l = new bt(), h = {};
2269
2269
  h.USERNAME = this.username, h.DEVICE_KEY = this.deviceKey, o.getLargeAValue(function(d, p) {
2270
2270
  d && r.onFailure(d), h.SRP_A = p.toString(16);
2271
2271
  var m = {
@@ -2275,22 +2275,22 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2275
2275
  ClientMetadata: i,
2276
2276
  Session: s.Session
2277
2277
  };
2278
- s.getUserContextData() && (m.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", m, function(v, y) {
2279
- if (v)
2280
- return r.onFailure(v);
2281
- var S = y.ChallengeParameters, _ = new A(S.SRP_B, 16), E = new A(S.SALT, 16);
2282
- o.getPasswordAuthenticationKey(s.deviceKey, s.randomPassword, _, E, function(x, U) {
2283
- if (x)
2284
- return r.onFailure(x);
2285
- var P = l.getNowString(), B = R.Buffer.concat([R.Buffer.from(s.deviceGroupKey, "utf8"), R.Buffer.from(s.deviceKey, "utf8"), R.Buffer.from(S.SECRET_BLOCK, "base64"), R.Buffer.from(P, "utf8")]), F = new Ie.Sha256(U);
2278
+ s.getUserContextData() && (m.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", m, function(y, v) {
2279
+ if (y)
2280
+ return r.onFailure(y);
2281
+ var b = v.ChallengeParameters, _ = new A(b.SRP_B, 16), C = new A(b.SALT, 16);
2282
+ o.getPasswordAuthenticationKey(s.deviceKey, s.randomPassword, _, C, function(E, T) {
2283
+ if (E)
2284
+ return r.onFailure(E);
2285
+ var P = l.getNowString(), B = k.Buffer.concat([k.Buffer.from(s.deviceGroupKey, "utf8"), k.Buffer.from(s.deviceKey, "utf8"), k.Buffer.from(b.SECRET_BLOCK, "base64"), k.Buffer.from(P, "utf8")]), F = new Ie.Sha256(T);
2286
2286
  F.update(B);
2287
- var X = F.digestSync(), ge = R.Buffer.from(X).toString("base64"), G = {};
2288
- G.USERNAME = s.username, G.PASSWORD_CLAIM_SECRET_BLOCK = S.SECRET_BLOCK, G.TIMESTAMP = P, G.PASSWORD_CLAIM_SIGNATURE = ge, G.DEVICE_KEY = s.deviceKey;
2287
+ var X = F.digestSync(), me = k.Buffer.from(X).toString("base64"), G = {};
2288
+ G.USERNAME = s.username, G.PASSWORD_CLAIM_SECRET_BLOCK = b.SECRET_BLOCK, G.TIMESTAMP = P, G.PASSWORD_CLAIM_SIGNATURE = me, G.DEVICE_KEY = s.deviceKey;
2289
2289
  var K = {
2290
2290
  ChallengeName: "DEVICE_PASSWORD_VERIFIER",
2291
2291
  ClientId: s.pool.getClientId(),
2292
2292
  ChallengeResponses: G,
2293
- Session: y.Session
2293
+ Session: v.Session
2294
2294
  };
2295
2295
  s.getUserContextData() && (K.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", K, function(Q, ue) {
2296
2296
  return Q ? r.onFailure(Q) : (s.signInUserSession = s.getCognitoUserSession(ue.AuthenticationResult), s.cacheTokens(), r.onSuccess(s.signInUserSession));
@@ -2336,31 +2336,31 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2336
2336
  Session: this.Session,
2337
2337
  ClientMetadata: o
2338
2338
  };
2339
- this.getUserContextData() && (p.UserContextData = this.getUserContextData()), this.client.request("RespondToAuthChallenge", p, function(m, v) {
2339
+ this.getUserContextData() && (p.UserContextData = this.getUserContextData()), this.client.request("RespondToAuthChallenge", p, function(m, y) {
2340
2340
  if (m)
2341
2341
  return i.onFailure(m);
2342
- var y = v.ChallengeName;
2343
- if (y === "DEVICE_SRP_AUTH") {
2342
+ var v = y.ChallengeName;
2343
+ if (v === "DEVICE_SRP_AUTH") {
2344
2344
  l.getDeviceResponse(i);
2345
2345
  return;
2346
2346
  }
2347
- if (l.signInUserSession = l.getCognitoUserSession(v.AuthenticationResult), l.cacheTokens(), v.AuthenticationResult.NewDeviceMetadata == null)
2347
+ if (l.signInUserSession = l.getCognitoUserSession(y.AuthenticationResult), l.cacheTokens(), y.AuthenticationResult.NewDeviceMetadata == null)
2348
2348
  return i.onSuccess(l.signInUserSession);
2349
- var S = new ne(l.pool.getUserPoolName());
2350
- S.generateHashDevice(v.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, v.AuthenticationResult.NewDeviceMetadata.DeviceKey, function(_) {
2349
+ var b = new ne(l.pool.getUserPoolName());
2350
+ b.generateHashDevice(y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, y.AuthenticationResult.NewDeviceMetadata.DeviceKey, function(_) {
2351
2351
  if (_)
2352
2352
  return i.onFailure(_);
2353
- var E = {
2354
- Salt: R.Buffer.from(S.getSaltDevices(), "hex").toString("base64"),
2355
- PasswordVerifier: R.Buffer.from(S.getVerifierDevices(), "hex").toString("base64")
2353
+ var C = {
2354
+ Salt: k.Buffer.from(b.getSaltDevices(), "hex").toString("base64"),
2355
+ PasswordVerifier: k.Buffer.from(b.getVerifierDevices(), "hex").toString("base64")
2356
2356
  };
2357
- l.verifierDevices = E.PasswordVerifier, l.deviceGroupKey = v.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, l.randomPassword = S.getRandomPassword(), l.client.request("ConfirmDevice", {
2358
- DeviceKey: v.AuthenticationResult.NewDeviceMetadata.DeviceKey,
2357
+ l.verifierDevices = C.PasswordVerifier, l.deviceGroupKey = y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, l.randomPassword = b.getRandomPassword(), l.client.request("ConfirmDevice", {
2358
+ DeviceKey: y.AuthenticationResult.NewDeviceMetadata.DeviceKey,
2359
2359
  AccessToken: l.signInUserSession.getAccessToken().getJwtToken(),
2360
- DeviceSecretVerifierConfig: E,
2360
+ DeviceSecretVerifierConfig: C,
2361
2361
  DeviceName: ur
2362
- }, function(x, U) {
2363
- return x ? i.onFailure(x) : (l.deviceKey = v.AuthenticationResult.NewDeviceMetadata.DeviceKey, l.cacheDeviceKeyAndPassword(), U.UserConfirmationNecessary === !0 ? i.onSuccess(l.signInUserSession, U.UserConfirmationNecessary) : i.onSuccess(l.signInUserSession));
2362
+ }, function(E, T) {
2363
+ return E ? i.onFailure(E) : (l.deviceKey = y.AuthenticationResult.NewDeviceMetadata.DeviceKey, l.cacheDeviceKeyAndPassword(), T.UserConfirmationNecessary === !0 ? i.onSuccess(l.signInUserSession, T.UserConfirmationNecessary) : i.onSuccess(l.signInUserSession));
2364
2364
  });
2365
2365
  });
2366
2366
  });
@@ -2445,7 +2445,7 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2445
2445
  var h = {
2446
2446
  Name: s.UserAttributes[l].Name,
2447
2447
  Value: s.UserAttributes[l].Value
2448
- }, d = new Fr(h);
2448
+ }, d = new Or(h);
2449
2449
  o.push(d);
2450
2450
  }
2451
2451
  return r(null, o);
@@ -2537,23 +2537,23 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2537
2537
  return r(null, this.signInUserSession);
2538
2538
  var s = "CognitoIdentityServiceProvider." + this.pool.getClientId() + "." + this.username, o = s + ".idToken", l = s + ".accessToken", h = s + ".refreshToken", d = s + ".clockDrift";
2539
2539
  if (this.storage.getItem(o)) {
2540
- var p = new vt({
2540
+ var p = new yt({
2541
2541
  IdToken: this.storage.getItem(o)
2542
2542
  }), m = new gt({
2543
2543
  AccessToken: this.storage.getItem(l)
2544
- }), v = new yt({
2544
+ }), y = new vt({
2545
2545
  RefreshToken: this.storage.getItem(h)
2546
- }), y = parseInt(this.storage.getItem(d), 0) || 0, S = {
2546
+ }), v = parseInt(this.storage.getItem(d), 0) || 0, b = {
2547
2547
  IdToken: p,
2548
2548
  AccessToken: m,
2549
- RefreshToken: v,
2550
- ClockDrift: y
2551
- }, _ = new wt(S);
2549
+ RefreshToken: y,
2550
+ ClockDrift: v
2551
+ }, _ = new wt(b);
2552
2552
  if (_.isValid())
2553
2553
  return this.signInUserSession = _, r(null, this.signInUserSession);
2554
- if (!v.getToken())
2554
+ if (!y.getToken())
2555
2555
  return r(new Error("Cannot retrieve a new session. Please authenticate."), null);
2556
- this.refreshSession(v, r, i.clientMetadata);
2556
+ this.refreshSession(y, r, i.clientMetadata);
2557
2557
  } else
2558
2558
  r(new Error("Local storage is missing an ID Token, Please authenticate"), null);
2559
2559
  }, e.refreshSession = function(r, i, s) {
@@ -2565,17 +2565,17 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2565
2565
  var m = d + "." + this.username + ".deviceKey";
2566
2566
  this.deviceKey = this.storage.getItem(m), h.DEVICE_KEY = this.deviceKey;
2567
2567
  }
2568
- var v = {
2568
+ var y = {
2569
2569
  ClientId: this.pool.getClientId(),
2570
2570
  AuthFlow: "REFRESH_TOKEN_AUTH",
2571
2571
  AuthParameters: h,
2572
2572
  ClientMetadata: s
2573
2573
  };
2574
- this.getUserContextData() && (v.UserContextData = this.getUserContextData()), this.client.requestWithRetry("InitiateAuth", v, function(y, S) {
2575
- if (y)
2576
- return y.code === "NotAuthorizedException" && o.clearCachedUser(), l(y, null);
2577
- if (S) {
2578
- var _ = S.AuthenticationResult;
2574
+ this.getUserContextData() && (y.UserContextData = this.getUserContextData()), this.client.requestWithRetry("InitiateAuth", y, function(v, b) {
2575
+ if (v)
2576
+ return v.code === "NotAuthorizedException" && o.clearCachedUser(), l(v, null);
2577
+ if (b) {
2578
+ var _ = b.AuthenticationResult;
2579
2579
  return Object.prototype.hasOwnProperty.call(_, "RefreshToken") || (_.RefreshToken = r.getToken()), o.signInUserSession = o.getCognitoUserSession(_), o.cacheTokens(), l(null, o.signInUserSession);
2580
2580
  }
2581
2581
  });
@@ -2601,7 +2601,7 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2601
2601
  var r = "CognitoIdentityServiceProvider." + this.pool.getClientId(), i = r + "." + this.username + ".idToken", s = r + "." + this.username + ".accessToken", o = r + "." + this.username + ".refreshToken", l = r + ".LastAuthUser", h = r + "." + this.username + ".clockDrift";
2602
2602
  this.storage.removeItem(i), this.storage.removeItem(s), this.storage.removeItem(o), this.storage.removeItem(l), this.storage.removeItem(h);
2603
2603
  }, e.getCognitoUserSession = function(r) {
2604
- var i = new vt(r), s = new gt(r), o = new yt(r), l = {
2604
+ var i = new yt(r), s = new gt(r), o = new vt(r), l = {
2605
2605
  IdToken: i,
2606
2606
  AccessToken: s,
2607
2607
  RefreshToken: o
@@ -2819,13 +2819,13 @@ var Wi = typeof navigator < "u", ur = Wi ? Pr.isReactNative ? "react-native" : n
2819
2819
  ChallengeResponses: d,
2820
2820
  Session: o.Session
2821
2821
  };
2822
- o.getUserContextData() && (p.UserContextData = o.getUserContextData()), o.client.request("RespondToAuthChallenge", p, function(m, v) {
2823
- return m ? s.onFailure(m) : (o.signInUserSession = o.getCognitoUserSession(v.AuthenticationResult), o.cacheTokens(), s.onSuccess(o.signInUserSession));
2822
+ o.getUserContextData() && (p.UserContextData = o.getUserContextData()), o.client.request("RespondToAuthChallenge", p, function(m, y) {
2823
+ return m ? s.onFailure(m) : (o.signInUserSession = o.getCognitoUserSession(y.AuthenticationResult), o.cacheTokens(), s.onSuccess(o.signInUserSession));
2824
2824
  });
2825
2825
  });
2826
2826
  }, n;
2827
2827
  })();
2828
- function Yi(n, e) {
2828
+ function Zi(n, e) {
2829
2829
  return e = e || {}, new Promise(function(t, r) {
2830
2830
  var i = new XMLHttpRequest(), s = [], o = [], l = {}, h = function() {
2831
2831
  return { ok: (i.status / 100 | 0) == 2, statusText: i.statusText, status: i.status, url: i.responseURL, text: function() {
@@ -2845,90 +2845,90 @@ function Yi(n, e) {
2845
2845
  } } };
2846
2846
  };
2847
2847
  for (var d in i.open(e.method || "get", n, !0), i.onload = function() {
2848
- i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(p, m, v) {
2849
- s.push(m = m.toLowerCase()), o.push([m, v]), l[m] = l[m] ? l[m] + "," + v : v;
2848
+ i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(p, m, y) {
2849
+ s.push(m = m.toLowerCase()), o.push([m, y]), l[m] = l[m] ? l[m] + "," + y : y;
2850
2850
  }), t(h());
2851
2851
  }, i.onerror = r, i.withCredentials = e.credentials == "include", e.headers) i.setRequestHeader(d, e.headers[d]);
2852
2852
  i.send(e.body || null);
2853
2853
  });
2854
2854
  }
2855
- const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2855
+ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2856
2856
  __proto__: null,
2857
- default: Yi
2858
- }, Symbol.toStringTag, { value: "Module" })), lr = /* @__PURE__ */ Ut(Gi);
2857
+ default: Zi
2858
+ }, Symbol.toStringTag, { value: "Module" })), lr = /* @__PURE__ */ Ut(Xi);
2859
2859
  var at, cr;
2860
- function Ji() {
2860
+ function Qi() {
2861
2861
  return cr || (cr = 1, at = self.fetch || (self.fetch = lr.default || lr)), at;
2862
2862
  }
2863
- Ji();
2864
- function j() {
2863
+ Qi();
2864
+ function H() {
2865
2865
  }
2866
- j.prototype.userAgent = Vi();
2867
- var Zi = function(e) {
2868
- e && (j.prototype.userAgent && !j.prototype.userAgent.includes(e) && (j.prototype.userAgent = j.prototype.userAgent.concat(" ", e)), (!j.prototype.userAgent || j.prototype.userAgent === "") && (j.prototype.userAgent = e));
2869
- }, Xi = function(e) {
2870
- var t = j.category ? " " + j.category : "", r = j.framework ? " framework/" + j.framework : "", i = "" + j.prototype.userAgent + t + r;
2866
+ H.prototype.userAgent = zi();
2867
+ var es = function(e) {
2868
+ e && (H.prototype.userAgent && !H.prototype.userAgent.includes(e) && (H.prototype.userAgent = H.prototype.userAgent.concat(" ", e)), (!H.prototype.userAgent || H.prototype.userAgent === "") && (H.prototype.userAgent = e));
2869
+ }, ts = function(e) {
2870
+ var t = H.category ? " " + H.category : "", r = H.framework ? " framework/" + H.framework : "", i = "" + H.prototype.userAgent + t + r;
2871
2871
  return i;
2872
2872
  };
2873
- function Qi(n, e) {
2874
- n.prototype = Object.create(e.prototype), n.prototype.constructor = n, ke(n, e);
2873
+ function rs(n, e) {
2874
+ n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Re(n, e);
2875
2875
  }
2876
2876
  function _t(n) {
2877
2877
  var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
2878
2878
  return _t = function(r) {
2879
- if (r === null || !ts(r)) return r;
2879
+ if (r === null || !is(r)) return r;
2880
2880
  if (typeof r != "function") throw new TypeError("Super expression must either be null or a function");
2881
2881
  if (e !== void 0) {
2882
2882
  if (e.has(r)) return e.get(r);
2883
2883
  e.set(r, i);
2884
2884
  }
2885
2885
  function i() {
2886
- return es(r, arguments, At(this).constructor);
2886
+ return ns(r, arguments, At(this).constructor);
2887
2887
  }
2888
- return i.prototype = Object.create(r.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), ke(i, r);
2888
+ return i.prototype = Object.create(r.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), Re(i, r);
2889
2889
  }, _t(n);
2890
2890
  }
2891
- function es(n, e, t) {
2892
- if (Mr()) return Reflect.construct.apply(null, arguments);
2891
+ function ns(n, e, t) {
2892
+ if (qr()) return Reflect.construct.apply(null, arguments);
2893
2893
  var r = [null];
2894
2894
  r.push.apply(r, e);
2895
2895
  var i = new (n.bind.apply(n, r))();
2896
- return t && ke(i, t.prototype), i;
2896
+ return t && Re(i, t.prototype), i;
2897
2897
  }
2898
- function Mr() {
2898
+ function qr() {
2899
2899
  try {
2900
2900
  var n = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
2901
2901
  }));
2902
2902
  } catch {
2903
2903
  }
2904
- return (Mr = function() {
2904
+ return (qr = function() {
2905
2905
  return !!n;
2906
2906
  })();
2907
2907
  }
2908
- function ts(n) {
2908
+ function is(n) {
2909
2909
  try {
2910
2910
  return Function.toString.call(n).indexOf("[native code]") !== -1;
2911
2911
  } catch {
2912
2912
  return typeof n == "function";
2913
2913
  }
2914
2914
  }
2915
- function ke(n, e) {
2916
- return ke = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
2915
+ function Re(n, e) {
2916
+ return Re = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
2917
2917
  return t.__proto__ = r, t;
2918
- }, ke(n, e);
2918
+ }, Re(n, e);
2919
2919
  }
2920
2920
  function At(n) {
2921
2921
  return At = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2922
2922
  return e.__proto__ || Object.getPrototypeOf(e);
2923
2923
  }, At(n);
2924
2924
  }
2925
- var rs = /* @__PURE__ */ (function(n) {
2925
+ var ss = /* @__PURE__ */ (function(n) {
2926
2926
  function e(t, r, i, s) {
2927
2927
  var o;
2928
2928
  return o = n.call(this, t) || this, o.code = r, o.name = i, o.statusCode = s, o;
2929
2929
  }
2930
- return Qi(e, n), e;
2931
- })(/* @__PURE__ */ _t(Error)), ns = /* @__PURE__ */ (function() {
2930
+ return rs(e, n), e;
2931
+ })(/* @__PURE__ */ _t(Error)), os = /* @__PURE__ */ (function() {
2932
2932
  function n(t, r, i) {
2933
2933
  this.endpoint = r || "https://cognito-idp." + t + ".amazonaws.com/";
2934
2934
  var s = i || {}, o = s.credentials;
@@ -2941,15 +2941,15 @@ var rs = /* @__PURE__ */ (function(n) {
2941
2941
  var s = this;
2942
2942
  return new Promise(function(o, l) {
2943
2943
  s.request(r, i, function(h, d) {
2944
- h ? l(new rs(h.message, h.code, h.name, h.statusCode)) : o(d);
2944
+ h ? l(new ss(h.message, h.code, h.name, h.statusCode)) : o(d);
2945
2945
  });
2946
2946
  });
2947
2947
  }, e.requestWithRetry = function(r, i, s) {
2948
2948
  var o = this, l = 5 * 1e3;
2949
- os(function(h) {
2949
+ ls(function(h) {
2950
2950
  return new Promise(function(d, p) {
2951
- o.request(r, h, function(m, v) {
2952
- m ? p(m) : d(v);
2951
+ o.request(r, h, function(m, y) {
2952
+ m ? p(m) : d(y);
2953
2953
  });
2954
2954
  });
2955
2955
  }, [i], l).then(function(h) {
@@ -2961,7 +2961,7 @@ var rs = /* @__PURE__ */ (function(n) {
2961
2961
  var o = {
2962
2962
  "Content-Type": "application/x-amz-json-1.1",
2963
2963
  "X-Amz-Target": "AWSCognitoIdentityProviderService." + r,
2964
- "X-Amz-User-Agent": Xi(),
2964
+ "X-Amz-User-Agent": ts(),
2965
2965
  "Cache-Control": "no-store"
2966
2966
  }, l = Object.assign({}, this.fetchOptions, {
2967
2967
  headers: o,
@@ -2993,48 +2993,48 @@ var rs = /* @__PURE__ */ (function(n) {
2993
2993
  return s(d);
2994
2994
  });
2995
2995
  }, n;
2996
- })(), Ve = {
2996
+ })(), je = {
2997
2997
  debug: function() {
2998
2998
  }
2999
- }, is = function(e) {
2999
+ }, as = function(e) {
3000
3000
  var t = "nonRetryable";
3001
3001
  return e && e[t];
3002
3002
  };
3003
- function Or(n, e, t, r) {
3003
+ function Lr(n, e, t, r) {
3004
3004
  if (r === void 0 && (r = 1), typeof n != "function")
3005
3005
  throw Error("functionToRetry must be a function");
3006
- return Ve.debug(n.name + " attempt #" + r + " with args: " + JSON.stringify(e)), n.apply(void 0, e).catch(function(i) {
3007
- if (Ve.debug("error on " + n.name, i), is(i))
3008
- throw Ve.debug(n.name + " non retryable error", i), i;
3006
+ return je.debug(n.name + " attempt #" + r + " with args: " + JSON.stringify(e)), n.apply(void 0, e).catch(function(i) {
3007
+ if (je.debug("error on " + n.name, i), as(i))
3008
+ throw je.debug(n.name + " non retryable error", i), i;
3009
3009
  var s = t(r, e, i);
3010
- if (Ve.debug(n.name + " retrying in " + s + " ms"), s !== !1)
3010
+ if (je.debug(n.name + " retrying in " + s + " ms"), s !== !1)
3011
3011
  return new Promise(function(o) {
3012
3012
  return setTimeout(o, s);
3013
3013
  }).then(function() {
3014
- return Or(n, e, t, r + 1);
3014
+ return Lr(n, e, t, r + 1);
3015
3015
  });
3016
3016
  throw i;
3017
3017
  });
3018
3018
  }
3019
- function ss(n) {
3019
+ function us(n) {
3020
3020
  var e = 100, t = 100;
3021
3021
  return function(r) {
3022
3022
  var i = Math.pow(2, r) * e + t * Math.random();
3023
3023
  return i > n ? !1 : i;
3024
3024
  };
3025
3025
  }
3026
- function os(n, e, t) {
3027
- return Or(n, e, ss(t));
3026
+ function ls(n, e, t) {
3027
+ return Lr(n, e, us(t));
3028
3028
  }
3029
- var as = 55, us = /* @__PURE__ */ (function() {
3029
+ var cs = 55, hs = /* @__PURE__ */ (function() {
3030
3030
  function n(t, r) {
3031
3031
  var i = t || {}, s = i.UserPoolId, o = i.ClientId, l = i.endpoint, h = i.fetchOptions, d = i.AdvancedSecurityDataCollectionFlag;
3032
3032
  if (!s || !o)
3033
3033
  throw new Error("Both UserPoolId and ClientId are required.");
3034
- if (s.length > as || !/^[\w-]+_[0-9a-zA-Z]+$/.test(s))
3034
+ if (s.length > cs || !/^[\w-]+_[0-9a-zA-Z]+$/.test(s))
3035
3035
  throw new Error("Invalid UserPoolId format.");
3036
3036
  var p = s.split("_")[0];
3037
- this.userPoolId = s, this.clientId = o, this.client = new ns(p, l, h), this.advancedSecurityDataCollectionFlag = d !== !1, this.storage = t.Storage || new Br().getStorage(), r && (this.wrapRefreshSessionCallback = r);
3037
+ this.userPoolId = s, this.clientId = o, this.client = new os(p, l, h), this.advancedSecurityDataCollectionFlag = d !== !1, this.storage = t.Storage || new Nr().getStorage(), r && (this.wrapRefreshSessionCallback = r);
3038
3038
  }
3039
3039
  var e = n.prototype;
3040
3040
  return e.getUserPoolId = function() {
@@ -3052,20 +3052,20 @@ var as = 55, us = /* @__PURE__ */ (function() {
3052
3052
  ValidationData: o,
3053
3053
  ClientMetadata: h
3054
3054
  };
3055
- this.getUserContextData(r) && (p.UserContextData = this.getUserContextData(r)), this.client.request("SignUp", p, function(m, v) {
3055
+ this.getUserContextData(r) && (p.UserContextData = this.getUserContextData(r)), this.client.request("SignUp", p, function(m, y) {
3056
3056
  if (m)
3057
3057
  return l(m, null);
3058
- var y = {
3058
+ var v = {
3059
3059
  Username: r,
3060
3060
  Pool: d,
3061
3061
  Storage: d.storage
3062
- }, S = {
3063
- user: new bt(y),
3064
- userConfirmed: v.UserConfirmed,
3065
- userSub: v.UserSub,
3066
- codeDeliveryDetails: v.CodeDeliveryDetails
3062
+ }, b = {
3063
+ user: new St(v),
3064
+ userConfirmed: y.UserConfirmed,
3065
+ userSub: y.UserSub,
3066
+ codeDeliveryDetails: y.CodeDeliveryDetails
3067
3067
  };
3068
- return l(null, S);
3068
+ return l(null, b);
3069
3069
  });
3070
3070
  }, e.getCurrentUser = function() {
3071
3071
  var r = "CognitoIdentityServiceProvider." + this.clientId + ".LastAuthUser", i = this.storage.getItem(r);
@@ -3075,7 +3075,7 @@ var as = 55, us = /* @__PURE__ */ (function() {
3075
3075
  Pool: this,
3076
3076
  Storage: this.storage
3077
3077
  };
3078
- return new bt(s);
3078
+ return new St(s);
3079
3079
  }
3080
3080
  return null;
3081
3081
  }, e.getUserContextData = function(r) {
@@ -3094,7 +3094,7 @@ var as = 55, us = /* @__PURE__ */ (function() {
3094
3094
  }
3095
3095
  }, n;
3096
3096
  })();
3097
- function je(n) {
3097
+ function Ve(n) {
3098
3098
  for (var e = 1; e < arguments.length; e++) {
3099
3099
  var t = arguments[e];
3100
3100
  for (var r in t)
@@ -3102,7 +3102,7 @@ function je(n) {
3102
3102
  }
3103
3103
  return n;
3104
3104
  }
3105
- var ls = {
3105
+ var fs = {
3106
3106
  read: function(n) {
3107
3107
  return n[0] === '"' && (n = n.slice(1, -1)), n.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
3108
3108
  },
@@ -3113,10 +3113,10 @@ var ls = {
3113
3113
  );
3114
3114
  }
3115
3115
  };
3116
- function Ct(n, e) {
3116
+ function xt(n, e) {
3117
3117
  function t(i, s, o) {
3118
3118
  if (!(typeof document > "u")) {
3119
- o = je({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3119
+ o = Ve({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3120
3120
  var l = "";
3121
3121
  for (var h in o)
3122
3122
  o[h] && (l += "; " + h, o[h] !== !0 && (l += "=" + o[h].split(";")[0]));
@@ -3145,16 +3145,16 @@ function Ct(n, e) {
3145
3145
  t(
3146
3146
  i,
3147
3147
  "",
3148
- je({}, s, {
3148
+ Ve({}, s, {
3149
3149
  expires: -1
3150
3150
  })
3151
3151
  );
3152
3152
  },
3153
3153
  withAttributes: function(i) {
3154
- return Ct(this.converter, je({}, this.attributes, i));
3154
+ return xt(this.converter, Ve({}, this.attributes, i));
3155
3155
  },
3156
3156
  withConverter: function(i) {
3157
- return Ct(je({}, this.converter, i), this.attributes);
3157
+ return xt(Ve({}, this.converter, i), this.attributes);
3158
3158
  }
3159
3159
  },
3160
3160
  {
@@ -3163,7 +3163,7 @@ function Ct(n, e) {
3163
3163
  }
3164
3164
  );
3165
3165
  }
3166
- var xe = Ct(ls, { path: "/" }), cs = /* @__PURE__ */ (function() {
3166
+ var Ee = xt(fs, { path: "/" }), ds = /* @__PURE__ */ (function() {
3167
3167
  function n(t) {
3168
3168
  if (t === void 0 && (t = {}), t.domain && (this.domain = t.domain), t.path ? this.path = t.path : this.path = "/", Object.prototype.hasOwnProperty.call(t, "expires") ? this.expires = t.expires : this.expires = 365, Object.prototype.hasOwnProperty.call(t, "secure") ? this.secure = t.secure : this.secure = !0, Object.prototype.hasOwnProperty.call(t, "sameSite")) {
3169
3169
  if (!["strict", "lax", "none"].includes(t.sameSite))
@@ -3182,9 +3182,9 @@ var xe = Ct(ls, { path: "/" }), cs = /* @__PURE__ */ (function() {
3182
3182
  domain: this.domain,
3183
3183
  secure: this.secure
3184
3184
  };
3185
- return this.sameSite && (s.sameSite = this.sameSite), xe.set(r, i, s), xe.get(r);
3185
+ return this.sameSite && (s.sameSite = this.sameSite), Ee.set(r, i, s), Ee.get(r);
3186
3186
  }, e.getItem = function(r) {
3187
- var i = xe.get(r);
3187
+ var i = Ee.get(r);
3188
3188
  return i ?? null;
3189
3189
  }, e.removeItem = function(r) {
3190
3190
  var i = {
@@ -3193,39 +3193,39 @@ var xe = Ct(ls, { path: "/" }), cs = /* @__PURE__ */ (function() {
3193
3193
  domain: this.domain,
3194
3194
  secure: this.secure
3195
3195
  };
3196
- return this.sameSite && (i.sameSite = this.sameSite), xe.remove(r, i);
3196
+ return this.sameSite && (i.sameSite = this.sameSite), Ee.remove(r, i);
3197
3197
  }, e.clear = function() {
3198
- for (var r = xe.get(), i = Object.keys(r).length, s = 0; s < i; ++s)
3198
+ for (var r = Ee.get(), i = Object.keys(r).length, s = 0; s < i; ++s)
3199
3199
  this.removeItem(Object.keys(r)[s]);
3200
3200
  return {};
3201
3201
  }, n;
3202
3202
  })();
3203
- const hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3203
+ const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3204
3204
  __proto__: null,
3205
- AuthenticationDetails: cn,
3205
+ AuthenticationDetails: dn,
3206
3206
  AuthenticationHelper: ne,
3207
3207
  CognitoAccessToken: gt,
3208
- CognitoIdToken: vt,
3209
- CognitoRefreshToken: yt,
3210
- CognitoUser: bt,
3211
- CognitoUserAttribute: Fr,
3212
- CognitoUserPool: us,
3208
+ CognitoIdToken: yt,
3209
+ CognitoRefreshToken: vt,
3210
+ CognitoUser: St,
3211
+ CognitoUserAttribute: Or,
3212
+ CognitoUserPool: hs,
3213
3213
  CognitoUserSession: wt,
3214
- CookieStorage: cs,
3215
- DateHelper: St,
3216
- WordArray: Ir,
3217
- appendToCognitoUserAgent: Zi
3214
+ CookieStorage: ds,
3215
+ DateHelper: bt,
3216
+ WordArray: Rr,
3217
+ appendToCognitoUserAgent: es
3218
3218
  }, Symbol.toStringTag, { value: "Module" }));
3219
- const ze = globalThis, Rt = ze.ShadowRoot && (ze.ShadyCSS === void 0 || ze.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, kt = /* @__PURE__ */ Symbol(), hr = /* @__PURE__ */ new WeakMap();
3220
- let Nr = class {
3219
+ const ze = globalThis, kt = ze.ShadowRoot && (ze.ShadyCSS === void 0 || ze.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Rt = /* @__PURE__ */ Symbol(), hr = /* @__PURE__ */ new WeakMap();
3220
+ let Kr = class {
3221
3221
  constructor(e, t, r) {
3222
- if (this._$cssResult$ = !0, r !== kt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
3222
+ if (this._$cssResult$ = !0, r !== Rt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
3223
3223
  this.cssText = e, this.t = t;
3224
3224
  }
3225
3225
  get styleSheet() {
3226
3226
  let e = this.o;
3227
3227
  const t = this.t;
3228
- if (Rt && e === void 0) {
3228
+ if (kt && e === void 0) {
3229
3229
  const r = t !== void 0 && t.length === 1;
3230
3230
  r && (e = hr.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && hr.set(t, e));
3231
3231
  }
@@ -3235,28 +3235,28 @@ let Nr = class {
3235
3235
  return this.cssText;
3236
3236
  }
3237
3237
  };
3238
- const fs = (n) => new Nr(typeof n == "string" ? n : n + "", void 0, kt), H = (n, ...e) => {
3238
+ const gs = (n) => new Kr(typeof n == "string" ? n : n + "", void 0, Rt), z = (n, ...e) => {
3239
3239
  const t = n.length === 1 ? n[0] : e.reduce((r, i, s) => r + ((o) => {
3240
3240
  if (o._$cssResult$ === !0) return o.cssText;
3241
3241
  if (typeof o == "number") return o;
3242
3242
  throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
3243
3243
  })(i) + n[s + 1], n[0]);
3244
- return new Nr(t, n, kt);
3245
- }, ds = (n, e) => {
3246
- if (Rt) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
3244
+ return new Kr(t, n, Rt);
3245
+ }, ms = (n, e) => {
3246
+ if (kt) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
3247
3247
  else for (const t of e) {
3248
3248
  const r = document.createElement("style"), i = ze.litNonce;
3249
3249
  i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, n.appendChild(r);
3250
3250
  }
3251
- }, fr = Rt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
3251
+ }, fr = kt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
3252
3252
  let t = "";
3253
3253
  for (const r of e.cssRules) t += r.cssText;
3254
- return fs(t);
3254
+ return gs(t);
3255
3255
  })(n) : n;
3256
- const { is: ps, defineProperty: gs, getOwnPropertyDescriptor: ms, getOwnPropertyNames: vs, getOwnPropertySymbols: ys, getPrototypeOf: ws } = Object, Qe = globalThis, dr = Qe.trustedTypes, Ss = dr ? dr.emptyScript : "", bs = Qe.reactiveElementPolyfillSupport, De = (n, e) => n, xt = { toAttribute(n, e) {
3256
+ const { is: ys, defineProperty: vs, getOwnPropertyDescriptor: ws, getOwnPropertyNames: bs, getOwnPropertySymbols: Ss, getPrototypeOf: _s } = Object, Qe = globalThis, dr = Qe.trustedTypes, As = dr ? dr.emptyScript : "", xs = Qe.reactiveElementPolyfillSupport, De = (n, e) => n, Ct = { toAttribute(n, e) {
3257
3257
  switch (e) {
3258
3258
  case Boolean:
3259
- n = n ? Ss : null;
3259
+ n = n ? As : null;
3260
3260
  break;
3261
3261
  case Object:
3262
3262
  case Array:
@@ -3281,9 +3281,9 @@ const { is: ps, defineProperty: gs, getOwnPropertyDescriptor: ms, getOwnProperty
3281
3281
  }
3282
3282
  }
3283
3283
  return t;
3284
- } }, qr = (n, e) => !ps(n, e), pr = { attribute: !0, type: String, converter: xt, reflect: !1, useDefault: !1, hasChanged: qr };
3284
+ } }, jr = (n, e) => !ys(n, e), pr = { attribute: !0, type: String, converter: Ct, reflect: !1, useDefault: !1, hasChanged: jr };
3285
3285
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Qe.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
3286
- let ce = class extends HTMLElement {
3286
+ let he = class extends HTMLElement {
3287
3287
  static addInitializer(e) {
3288
3288
  this._$Ei(), (this.l ??= []).push(e);
3289
3289
  }
@@ -3293,11 +3293,11 @@ let ce = class extends HTMLElement {
3293
3293
  static createProperty(e, t = pr) {
3294
3294
  if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
3295
3295
  const r = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(e, r, t);
3296
- i !== void 0 && gs(this.prototype, e, i);
3296
+ i !== void 0 && vs(this.prototype, e, i);
3297
3297
  }
3298
3298
  }
3299
3299
  static getPropertyDescriptor(e, t, r) {
3300
- const { get: i, set: s } = ms(this.prototype, e) ?? { get() {
3300
+ const { get: i, set: s } = ws(this.prototype, e) ?? { get() {
3301
3301
  return this[t];
3302
3302
  }, set(o) {
3303
3303
  this[t] = o;
@@ -3312,13 +3312,13 @@ let ce = class extends HTMLElement {
3312
3312
  }
3313
3313
  static _$Ei() {
3314
3314
  if (this.hasOwnProperty(De("elementProperties"))) return;
3315
- const e = ws(this);
3315
+ const e = _s(this);
3316
3316
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
3317
3317
  }
3318
3318
  static finalize() {
3319
3319
  if (this.hasOwnProperty(De("finalized"))) return;
3320
3320
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(De("properties"))) {
3321
- const t = this.properties, r = [...vs(t), ...ys(t)];
3321
+ const t = this.properties, r = [...bs(t), ...Ss(t)];
3322
3322
  for (const i of r) this.createProperty(i, t[i]);
3323
3323
  }
3324
3324
  const e = this[Symbol.metadata];
@@ -3364,7 +3364,7 @@ let ce = class extends HTMLElement {
3364
3364
  }
3365
3365
  createRenderRoot() {
3366
3366
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
3367
- return ds(e, this.constructor.elementStyles), e;
3367
+ return ms(e, this.constructor.elementStyles), e;
3368
3368
  }
3369
3369
  connectedCallback() {
3370
3370
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
@@ -3380,14 +3380,14 @@ let ce = class extends HTMLElement {
3380
3380
  _$ET(e, t) {
3381
3381
  const r = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, r);
3382
3382
  if (i !== void 0 && r.reflect === !0) {
3383
- const s = (r.converter?.toAttribute !== void 0 ? r.converter : xt).toAttribute(t, r.type);
3383
+ const s = (r.converter?.toAttribute !== void 0 ? r.converter : Ct).toAttribute(t, r.type);
3384
3384
  this._$Em = e, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$Em = null;
3385
3385
  }
3386
3386
  }
3387
3387
  _$AK(e, t) {
3388
3388
  const r = this.constructor, i = r._$Eh.get(e);
3389
3389
  if (i !== void 0 && this._$Em !== i) {
3390
- const s = r.getPropertyOptions(i), o = typeof s.converter == "function" ? { fromAttribute: s.converter } : s.converter?.fromAttribute !== void 0 ? s.converter : xt;
3390
+ const s = r.getPropertyOptions(i), o = typeof s.converter == "function" ? { fromAttribute: s.converter } : s.converter?.fromAttribute !== void 0 ? s.converter : Ct;
3391
3391
  this._$Em = i;
3392
3392
  const l = o.fromAttribute(t, s.type);
3393
3393
  this[i] = l ?? this._$Ej?.get(i) ?? l, this._$Em = null;
@@ -3396,7 +3396,7 @@ let ce = class extends HTMLElement {
3396
3396
  requestUpdate(e, t, r, i = !1, s) {
3397
3397
  if (e !== void 0) {
3398
3398
  const o = this.constructor;
3399
- if (i === !1 && (s = this[e]), r ??= o.getPropertyOptions(e), !((r.hasChanged ?? qr)(s, t) || r.useDefault && r.reflect && s === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, r)))) return;
3399
+ if (i === !1 && (s = this[e]), r ??= o.getPropertyOptions(e), !((r.hasChanged ?? jr)(s, t) || r.useDefault && r.reflect && s === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, r)))) return;
3400
3400
  this.C(e, t, r);
3401
3401
  }
3402
3402
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
@@ -3464,51 +3464,51 @@ let ce = class extends HTMLElement {
3464
3464
  firstUpdated(e) {
3465
3465
  }
3466
3466
  };
3467
- ce.elementStyles = [], ce.shadowRootOptions = { mode: "open" }, ce[De("elementProperties")] = /* @__PURE__ */ new Map(), ce[De("finalized")] = /* @__PURE__ */ new Map(), bs?.({ ReactiveElement: ce }), (Qe.reactiveElementVersions ??= []).push("2.1.2");
3468
- const $t = globalThis, gr = (n) => n, Ye = $t.trustedTypes, mr = Ye ? Ye.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Lr = "$lit$", J = `lit$${Math.random().toFixed(9).slice(2)}$`, Kr = "?" + J, _s = `<${Kr}>`, oe = document, $e = () => oe.createComment(""), Pe = (n) => n === null || typeof n != "object" && typeof n != "function", Pt = Array.isArray, As = (n) => Pt(n) || typeof n?.[Symbol.iterator] == "function", ut = `[
3469
- \f\r]`, Ee = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, vr = /-->/g, yr = />/g, re = RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
3470
- \f\r"'\`<>=]|("|')|))|$)`, "g"), wr = /'/g, Sr = /"/g, Vr = /^(?:script|style|textarea|title)$/i, Cs = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), C = Cs(1), he = /* @__PURE__ */ Symbol.for("lit-noChange"), T = /* @__PURE__ */ Symbol.for("lit-nothing"), br = /* @__PURE__ */ new WeakMap(), ie = oe.createTreeWalker(oe, 129);
3471
- function jr(n, e) {
3467
+ he.elementStyles = [], he.shadowRootOptions = { mode: "open" }, he[De("elementProperties")] = /* @__PURE__ */ new Map(), he[De("finalized")] = /* @__PURE__ */ new Map(), xs?.({ ReactiveElement: he }), (Qe.reactiveElementVersions ??= []).push("2.1.2");
3468
+ const $t = globalThis, gr = (n) => n, Ye = $t.trustedTypes, mr = Ye ? Ye.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Vr = "$lit$", J = `lit$${Math.random().toFixed(9).slice(2)}$`, Hr = "?" + J, Cs = `<${Hr}>`, oe = document, $e = () => oe.createComment(""), Pe = (n) => n === null || typeof n != "object" && typeof n != "function", Pt = Array.isArray, Es = (n) => Pt(n) || typeof n?.[Symbol.iterator] == "function", ut = `[
3469
+ \f\r]`, Ue = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, yr = /-->/g, vr = />/g, re = RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
3470
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), wr = /'/g, br = /"/g, zr = /^(?:script|style|textarea|title)$/i, Us = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), x = Us(1), fe = /* @__PURE__ */ Symbol.for("lit-noChange"), U = /* @__PURE__ */ Symbol.for("lit-nothing"), Sr = /* @__PURE__ */ new WeakMap(), ie = oe.createTreeWalker(oe, 129);
3471
+ function Wr(n, e) {
3472
3472
  if (!Pt(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
3473
3473
  return mr !== void 0 ? mr.createHTML(e) : e;
3474
3474
  }
3475
- const xs = (n, e) => {
3475
+ const Ts = (n, e) => {
3476
3476
  const t = n.length - 1, r = [];
3477
- let i, s = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", o = Ee;
3477
+ let i, s = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", o = Ue;
3478
3478
  for (let l = 0; l < t; l++) {
3479
3479
  const h = n[l];
3480
- let d, p, m = -1, v = 0;
3481
- for (; v < h.length && (o.lastIndex = v, p = o.exec(h), p !== null); ) v = o.lastIndex, o === Ee ? p[1] === "!--" ? o = vr : p[1] !== void 0 ? o = yr : p[2] !== void 0 ? (Vr.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = re) : p[3] !== void 0 && (o = re) : o === re ? p[0] === ">" ? (o = i ?? Ee, m = -1) : p[1] === void 0 ? m = -2 : (m = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? re : p[3] === '"' ? Sr : wr) : o === Sr || o === wr ? o = re : o === vr || o === yr ? o = Ee : (o = re, i = void 0);
3482
- const y = o === re && n[l + 1].startsWith("/>") ? " " : "";
3483
- s += o === Ee ? h + _s : m >= 0 ? (r.push(d), h.slice(0, m) + Lr + h.slice(m) + J + y) : h + J + (m === -2 ? l : y);
3480
+ let d, p, m = -1, y = 0;
3481
+ for (; y < h.length && (o.lastIndex = y, p = o.exec(h), p !== null); ) y = o.lastIndex, o === Ue ? p[1] === "!--" ? o = yr : p[1] !== void 0 ? o = vr : p[2] !== void 0 ? (zr.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = re) : p[3] !== void 0 && (o = re) : o === re ? p[0] === ">" ? (o = i ?? Ue, m = -1) : p[1] === void 0 ? m = -2 : (m = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? re : p[3] === '"' ? br : wr) : o === br || o === wr ? o = re : o === yr || o === vr ? o = Ue : (o = re, i = void 0);
3482
+ const v = o === re && n[l + 1].startsWith("/>") ? " " : "";
3483
+ s += o === Ue ? h + Cs : m >= 0 ? (r.push(d), h.slice(0, m) + Vr + h.slice(m) + J + v) : h + J + (m === -2 ? l : v);
3484
3484
  }
3485
- return [jr(n, s + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
3485
+ return [Wr(n, s + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
3486
3486
  };
3487
3487
  class Fe {
3488
3488
  constructor({ strings: e, _$litType$: t }, r) {
3489
3489
  let i;
3490
3490
  this.parts = [];
3491
3491
  let s = 0, o = 0;
3492
- const l = e.length - 1, h = this.parts, [d, p] = xs(e, t);
3492
+ const l = e.length - 1, h = this.parts, [d, p] = Ts(e, t);
3493
3493
  if (this.el = Fe.createElement(d, r), ie.currentNode = this.el.content, t === 2 || t === 3) {
3494
3494
  const m = this.el.content.firstChild;
3495
3495
  m.replaceWith(...m.childNodes);
3496
3496
  }
3497
3497
  for (; (i = ie.nextNode()) !== null && h.length < l; ) {
3498
3498
  if (i.nodeType === 1) {
3499
- if (i.hasAttributes()) for (const m of i.getAttributeNames()) if (m.endsWith(Lr)) {
3500
- const v = p[o++], y = i.getAttribute(m).split(J), S = /([.?@])?(.*)/.exec(v);
3501
- h.push({ type: 1, index: s, name: S[2], strings: y, ctor: S[1] === "." ? Us : S[1] === "?" ? Ts : S[1] === "@" ? Is : et }), i.removeAttribute(m);
3499
+ if (i.hasAttributes()) for (const m of i.getAttributeNames()) if (m.endsWith(Vr)) {
3500
+ const y = p[o++], v = i.getAttribute(m).split(J), b = /([.?@])?(.*)/.exec(y);
3501
+ h.push({ type: 1, index: s, name: b[2], strings: v, ctor: b[1] === "." ? Ds : b[1] === "?" ? ks : b[1] === "@" ? Rs : et }), i.removeAttribute(m);
3502
3502
  } else m.startsWith(J) && (h.push({ type: 6, index: s }), i.removeAttribute(m));
3503
- if (Vr.test(i.tagName)) {
3504
- const m = i.textContent.split(J), v = m.length - 1;
3505
- if (v > 0) {
3503
+ if (zr.test(i.tagName)) {
3504
+ const m = i.textContent.split(J), y = m.length - 1;
3505
+ if (y > 0) {
3506
3506
  i.textContent = Ye ? Ye.emptyScript : "";
3507
- for (let y = 0; y < v; y++) i.append(m[y], $e()), ie.nextNode(), h.push({ type: 2, index: ++s });
3508
- i.append(m[v], $e());
3507
+ for (let v = 0; v < y; v++) i.append(m[v], $e()), ie.nextNode(), h.push({ type: 2, index: ++s });
3508
+ i.append(m[y], $e());
3509
3509
  }
3510
3510
  }
3511
- } else if (i.nodeType === 8) if (i.data === Kr) h.push({ type: 2, index: s });
3511
+ } else if (i.nodeType === 8) if (i.data === Hr) h.push({ type: 2, index: s });
3512
3512
  else {
3513
3513
  let m = -1;
3514
3514
  for (; (m = i.data.indexOf(J, m + 1)) !== -1; ) h.push({ type: 7, index: s }), m += J.length - 1;
@@ -3521,13 +3521,13 @@ class Fe {
3521
3521
  return r.innerHTML = e, r;
3522
3522
  }
3523
3523
  }
3524
- function fe(n, e, t = n, r) {
3525
- if (e === he) return e;
3524
+ function de(n, e, t = n, r) {
3525
+ if (e === fe) return e;
3526
3526
  let i = r !== void 0 ? t._$Co?.[r] : t._$Cl;
3527
3527
  const s = Pe(e) ? void 0 : e._$litDirective$;
3528
- return i?.constructor !== s && (i?._$AO?.(!1), s === void 0 ? i = void 0 : (i = new s(n), i._$AT(n, t, r)), r !== void 0 ? (t._$Co ??= [])[r] = i : t._$Cl = i), i !== void 0 && (e = fe(n, i._$AS(n, e.values), i, r)), e;
3528
+ return i?.constructor !== s && (i?._$AO?.(!1), s === void 0 ? i = void 0 : (i = new s(n), i._$AT(n, t, r)), r !== void 0 ? (t._$Co ??= [])[r] = i : t._$Cl = i), i !== void 0 && (e = de(n, i._$AS(n, e.values), i, r)), e;
3529
3529
  }
3530
- class Es {
3530
+ class Is {
3531
3531
  constructor(e, t) {
3532
3532
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
3533
3533
  }
@@ -3544,7 +3544,7 @@ class Es {
3544
3544
  for (; h !== void 0; ) {
3545
3545
  if (o === h.index) {
3546
3546
  let d;
3547
- h.type === 2 ? d = new Be(s, s.nextSibling, this, e) : h.type === 1 ? d = new h.ctor(s, h.name, h.strings, this, e) : h.type === 6 && (d = new Ds(s, this, e)), this._$AV.push(d), h = r[++l];
3547
+ h.type === 2 ? d = new Be(s, s.nextSibling, this, e) : h.type === 1 ? d = new h.ctor(s, h.name, h.strings, this, e) : h.type === 6 && (d = new $s(s, this, e)), this._$AV.push(d), h = r[++l];
3548
3548
  }
3549
3549
  o !== h?.index && (s = ie.nextNode(), o++);
3550
3550
  }
@@ -3560,7 +3560,7 @@ class Be {
3560
3560
  return this._$AM?._$AU ?? this._$Cv;
3561
3561
  }
3562
3562
  constructor(e, t, r, i) {
3563
- this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
3563
+ this.type = 2, this._$AH = U, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
3564
3564
  }
3565
3565
  get parentNode() {
3566
3566
  let e = this._$AA.parentNode;
@@ -3574,7 +3574,7 @@ class Be {
3574
3574
  return this._$AB;
3575
3575
  }
3576
3576
  _$AI(e, t = this) {
3577
- e = fe(this, e, t), Pe(e) ? e === T || e == null || e === "" ? (this._$AH !== T && this._$AR(), this._$AH = T) : e !== this._$AH && e !== he && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : As(e) ? this.k(e) : this._(e);
3577
+ e = de(this, e, t), Pe(e) ? e === U || e == null || e === "" ? (this._$AH !== U && this._$AR(), this._$AH = U) : e !== this._$AH && e !== fe && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Es(e) ? this.k(e) : this._(e);
3578
3578
  }
3579
3579
  O(e) {
3580
3580
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -3583,19 +3583,19 @@ class Be {
3583
3583
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
3584
3584
  }
3585
3585
  _(e) {
3586
- this._$AH !== T && Pe(this._$AH) ? this._$AA.nextSibling.data = e : this.T(oe.createTextNode(e)), this._$AH = e;
3586
+ this._$AH !== U && Pe(this._$AH) ? this._$AA.nextSibling.data = e : this.T(oe.createTextNode(e)), this._$AH = e;
3587
3587
  }
3588
3588
  $(e) {
3589
- const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = Fe.createElement(jr(r.h, r.h[0]), this.options)), r);
3589
+ const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = Fe.createElement(Wr(r.h, r.h[0]), this.options)), r);
3590
3590
  if (this._$AH?._$AD === i) this._$AH.p(t);
3591
3591
  else {
3592
- const s = new Es(i, this), o = s.u(this.options);
3592
+ const s = new Is(i, this), o = s.u(this.options);
3593
3593
  s.p(t), this.T(o), this._$AH = s;
3594
3594
  }
3595
3595
  }
3596
3596
  _$AC(e) {
3597
- let t = br.get(e.strings);
3598
- return t === void 0 && br.set(e.strings, t = new Fe(e)), t;
3597
+ let t = Sr.get(e.strings);
3598
+ return t === void 0 && Sr.set(e.strings, t = new Fe(e)), t;
3599
3599
  }
3600
3600
  k(e) {
3601
3601
  Pt(this._$AH) || (this._$AH = [], this._$AR());
@@ -3622,53 +3622,53 @@ class et {
3622
3622
  return this._$AM._$AU;
3623
3623
  }
3624
3624
  constructor(e, t, r, i, s) {
3625
- this.type = 1, this._$AH = T, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = s, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = T;
3625
+ this.type = 1, this._$AH = U, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = s, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = U;
3626
3626
  }
3627
3627
  _$AI(e, t = this, r, i) {
3628
3628
  const s = this.strings;
3629
3629
  let o = !1;
3630
- if (s === void 0) e = fe(this, e, t, 0), o = !Pe(e) || e !== this._$AH && e !== he, o && (this._$AH = e);
3630
+ if (s === void 0) e = de(this, e, t, 0), o = !Pe(e) || e !== this._$AH && e !== fe, o && (this._$AH = e);
3631
3631
  else {
3632
3632
  const l = e;
3633
3633
  let h, d;
3634
- for (e = s[0], h = 0; h < s.length - 1; h++) d = fe(this, l[r + h], t, h), d === he && (d = this._$AH[h]), o ||= !Pe(d) || d !== this._$AH[h], d === T ? e = T : e !== T && (e += (d ?? "") + s[h + 1]), this._$AH[h] = d;
3634
+ for (e = s[0], h = 0; h < s.length - 1; h++) d = de(this, l[r + h], t, h), d === fe && (d = this._$AH[h]), o ||= !Pe(d) || d !== this._$AH[h], d === U ? e = U : e !== U && (e += (d ?? "") + s[h + 1]), this._$AH[h] = d;
3635
3635
  }
3636
3636
  o && !i && this.j(e);
3637
3637
  }
3638
3638
  j(e) {
3639
- e === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
3639
+ e === U ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
3640
3640
  }
3641
3641
  }
3642
- class Us extends et {
3642
+ class Ds extends et {
3643
3643
  constructor() {
3644
3644
  super(...arguments), this.type = 3;
3645
3645
  }
3646
3646
  j(e) {
3647
- this.element[this.name] = e === T ? void 0 : e;
3647
+ this.element[this.name] = e === U ? void 0 : e;
3648
3648
  }
3649
3649
  }
3650
- class Ts extends et {
3650
+ class ks extends et {
3651
3651
  constructor() {
3652
3652
  super(...arguments), this.type = 4;
3653
3653
  }
3654
3654
  j(e) {
3655
- this.element.toggleAttribute(this.name, !!e && e !== T);
3655
+ this.element.toggleAttribute(this.name, !!e && e !== U);
3656
3656
  }
3657
3657
  }
3658
- class Is extends et {
3658
+ class Rs extends et {
3659
3659
  constructor(e, t, r, i, s) {
3660
3660
  super(e, t, r, i, s), this.type = 5;
3661
3661
  }
3662
3662
  _$AI(e, t = this) {
3663
- if ((e = fe(this, e, t, 0) ?? T) === he) return;
3664
- const r = this._$AH, i = e === T && r !== T || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, s = e !== T && (r === T || i);
3663
+ if ((e = de(this, e, t, 0) ?? U) === fe) return;
3664
+ const r = this._$AH, i = e === U && r !== U || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, s = e !== U && (r === U || i);
3665
3665
  i && this.element.removeEventListener(this.name, this, r), s && this.element.addEventListener(this.name, this, e), this._$AH = e;
3666
3666
  }
3667
3667
  handleEvent(e) {
3668
3668
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
3669
3669
  }
3670
3670
  }
3671
- class Ds {
3671
+ class $s {
3672
3672
  constructor(e, t, r) {
3673
3673
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = r;
3674
3674
  }
@@ -3676,12 +3676,12 @@ class Ds {
3676
3676
  return this._$AM._$AU;
3677
3677
  }
3678
3678
  _$AI(e) {
3679
- fe(this, e);
3679
+ de(this, e);
3680
3680
  }
3681
3681
  }
3682
- const Rs = $t.litHtmlPolyfillSupport;
3683
- Rs?.(Fe, Be), ($t.litHtmlVersions ??= []).push("3.3.3");
3684
- const ks = (n, e, t) => {
3682
+ const Ps = $t.litHtmlPolyfillSupport;
3683
+ Ps?.(Fe, Be), ($t.litHtmlVersions ??= []).push("3.3.3");
3684
+ const Fs = (n, e, t) => {
3685
3685
  const r = t?.renderBefore ?? e;
3686
3686
  let i = r._$litPart$;
3687
3687
  if (i === void 0) {
@@ -3691,7 +3691,7 @@ const ks = (n, e, t) => {
3691
3691
  return i._$AI(n), i;
3692
3692
  };
3693
3693
  const Ft = globalThis;
3694
- class se extends ce {
3694
+ class se extends he {
3695
3695
  constructor() {
3696
3696
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
3697
3697
  }
@@ -3701,7 +3701,7 @@ class se extends ce {
3701
3701
  }
3702
3702
  update(e) {
3703
3703
  const t = this.render();
3704
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = ks(t, this.renderRoot, this.renderOptions);
3704
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Fs(t, this.renderRoot, this.renderOptions);
3705
3705
  }
3706
3706
  connectedCallback() {
3707
3707
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -3710,14 +3710,14 @@ class se extends ce {
3710
3710
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
3711
3711
  }
3712
3712
  render() {
3713
- return he;
3713
+ return fe;
3714
3714
  }
3715
3715
  }
3716
3716
  se._$litElement$ = !0, se.finalized = !0, Ft.litElementHydrateSupport?.({ LitElement: se });
3717
- const $s = Ft.litElementPolyfillSupport;
3718
- $s?.({ LitElement: se });
3717
+ const Bs = Ft.litElementPolyfillSupport;
3718
+ Bs?.({ LitElement: se });
3719
3719
  (Ft.litElementVersions ??= []).push("4.2.2");
3720
- const Ps = H`
3720
+ const Ms = z`
3721
3721
  :host {
3722
3722
  display: block;
3723
3723
  box-sizing: border-box;
@@ -3741,7 +3741,7 @@ const Ps = H`
3741
3741
  position: absolute; width: 1px; height: 1px; overflow: hidden;
3742
3742
  clip: rect(0 0 0 0); white-space: nowrap;
3743
3743
  }
3744
- `, Fs = H`
3744
+ `, Os = z`
3745
3745
  @keyframes pop-in {
3746
3746
  0% { opacity: 0; transform: translateY(16px) scale(0.95); }
3747
3747
  100% { opacity: 1; transform: translateY(0) scale(1); }
@@ -3772,7 +3772,7 @@ const Ps = H`
3772
3772
  animation: none !important;
3773
3773
  }
3774
3774
  }
3775
- `, Bs = H`
3775
+ `, Ns = z`
3776
3776
  .msg { max-width: 85%; padding: 12px 16px; border-radius: 14px; font-size: 15px; }
3777
3777
  .msg.bot {
3778
3778
  background: var(--wral-semantic-surface-default, #FFFFFF);
@@ -3794,7 +3794,7 @@ const Ps = H`
3794
3794
  .msg .sub { display: block; font-size: 13px; color: var(--wral-semantic-fg-muted, #64748B); margin-top: 4px; }
3795
3795
  .msg.user .sub { color: rgba(255, 255, 255, 0.75); }
3796
3796
  .msg.error { border-left: 3px solid var(--wral-base-red-on-light, #D1232A); }
3797
- `, Ms = H`
3797
+ `, qs = z`
3798
3798
  .options { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 92%; padding: 2px 0 6px; }
3799
3799
  .chip {
3800
3800
  font-family: var(--wral-base-font-ui, 'IBM Plex Sans Condensed', sans-serif);
@@ -3808,7 +3808,7 @@ const Ps = H`
3808
3808
  .chip:hover { background: var(--wral-base-secondary-1, #2594E3); color: #FFFFFF; }
3809
3809
  .chip:focus-visible { outline: 2px solid var(--wral-base-secondary-1, #2594E3); outline-offset: 2px; }
3810
3810
  .chip:active { transform: scale(0.97); }
3811
- `, Os = H`
3811
+ `, Ls = z`
3812
3812
  .form-card {
3813
3813
  align-self: stretch;
3814
3814
  background: var(--wral-semantic-surface-default, #FFFFFF);
@@ -3873,7 +3873,7 @@ const Ps = H`
3873
3873
  .btn-ghost:hover { border-color: var(--wral-base-secondary-1, #2594E3); }
3874
3874
  .btn-ghost:active { transform: scale(0.97); }
3875
3875
  .btn-ghost:focus-visible { outline: 2px solid var(--wral-base-secondary-1, #2594E3); outline-offset: 2px; }
3876
- `, Ns = H`
3876
+ `, Ks = z`
3877
3877
  .login-card { padding: 28px 26px; }
3878
3878
  .login-card h2 {
3879
3879
  font-family: var(--wral-base-font-display, 'IBM Plex Sans Condensed', sans-serif);
@@ -3918,7 +3918,49 @@ const Ps = H`
3918
3918
  }
3919
3919
  .login-why ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--color-gray-6, #565454); }
3920
3920
  .login-why li { margin-bottom: 4px; line-height: 1.5; }
3921
- `, qs = H`
3921
+ .login-why a { color: var(--color-secondary, #2594E3); font-weight: 600; text-decoration: underline; }
3922
+ .login-alt {
3923
+ border-top: 1px solid var(--color-gray-2, #E7E5E4); margin-top: 16px; padding-top: 12px;
3924
+ }
3925
+ .login-alt > summary {
3926
+ display: flex; align-items: center; gap: 7px;
3927
+ font-size: 14px; font-weight: 600;
3928
+ color: var(--color-gray-5, #6C6C6C);
3929
+ padding: 3px 0; cursor: pointer; list-style: none;
3930
+ }
3931
+ .login-alt > summary::-webkit-details-marker { display: none; }
3932
+ .login-alt > summary::before {
3933
+ content: ''; flex-shrink: 0; padding: 2.5px;
3934
+ border: solid currentColor; border-width: 0 1.5px 1.5px 0;
3935
+ transform: rotate(-45deg); transition: transform 150ms;
3936
+ }
3937
+ .login-alt[open] > summary::before { transform: rotate(45deg); }
3938
+ .login-alt > summary:hover { color: var(--color-gray-8, #263238); }
3939
+ .login-alt > summary:focus-visible { outline: 2px solid var(--color-secondary, #2594E3); outline-offset: 2px; }
3940
+ .login-alt .alt-body {
3941
+ font-size: 13.5px; color: var(--color-gray-6, #565454);
3942
+ line-height: 1.55; padding: 6px 0 2px;
3943
+ }
3944
+ .login-alt .alt-row { margin: 0 0 10px; }
3945
+ .login-alt .alt-row:last-child { margin-bottom: 0; }
3946
+ .login-alt a, .login-alt .alt-link {
3947
+ color: var(--color-primary-dark, #00144A); font-weight: 600;
3948
+ text-decoration: underline;
3949
+ }
3950
+ .login-alt a { text-decoration: none; white-space: nowrap; }
3951
+ .login-alt a:hover { text-decoration: underline; }
3952
+ .login-alt .alt-link {
3953
+ background: none; border: none; padding: 0; cursor: pointer;
3954
+ font-family: inherit; font-size: inherit;
3955
+ }
3956
+ .login-alt .alt-link:focus-visible { outline: 2px solid var(--color-secondary, #2594E3); outline-offset: 2px; }
3957
+ .anon-costs { margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; color: var(--color-gray-6, #565454); }
3958
+ .anon-costs li { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 9px; line-height: 1.5; }
3959
+ .anon-costs li:last-child { margin-bottom: 0; }
3960
+ .anon-costs .x { flex-shrink: 0; font-weight: 700; color: var(--wral-base-red-on-light, #D1232A); }
3961
+ .anon-actions { display: flex; flex-direction: column; gap: 10px; }
3962
+ .anon-actions .btn-ghost { width: 100%; }
3963
+ `, js = z`
3922
3964
  .review-list { margin: 0; padding: 0; list-style: none; font-size: 14px; }
3923
3965
  .review-list li {
3924
3966
  display: grid; grid-template-columns: 130px 1fr; gap: 10px;
@@ -3950,7 +3992,7 @@ const Ps = H`
3950
3992
  color: var(--wral-base-primary-1, #001D68);
3951
3993
  }
3952
3994
  @media (max-width: 540px) { .review-list li { grid-template-columns: 1fr; gap: 2px; } }
3953
- `, Ls = H`
3995
+ `, Vs = z`
3954
3996
  .upload-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; }
3955
3997
  .upload-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3956
3998
  .upload-row .state { font-size: 12px; color: var(--wral-semantic-fg-subtle, #64748B); }
@@ -3966,7 +4008,7 @@ const Ps = H`
3966
4008
  border-radius: 999px; padding: 3px 12px; cursor: pointer;
3967
4009
  }
3968
4010
  .retry-chip:focus-visible { outline: 2px solid var(--wral-base-secondary-1, #2594E3); outline-offset: 2px; }
3969
- `, Ks = H`
4011
+ `, Hs = z`
3970
4012
  .confirm-card {
3971
4013
  align-self: stretch;
3972
4014
  background: var(--wral-base-primary-1, #001D68);
@@ -4016,7 +4058,7 @@ const Ps = H`
4016
4058
  .c-again:hover { background: rgba(255, 255, 255, 0.12); }
4017
4059
  .c-again:focus-visible { outline: 2px solid var(--wral-base-secondary-2, #50A9E8); outline-offset: 2px; }
4018
4060
  .c-again:active { transform: scale(0.97); }
4019
- `, Vs = H`
4061
+ `, zs = z`
4020
4062
  .journey {
4021
4063
  align-self: stretch;
4022
4064
  background: var(--wral-semantic-surface-default, #FFFFFF);
@@ -4057,7 +4099,7 @@ const Ps = H`
4057
4099
  color: var(--wral-base-primary-1, #001D68); margin-bottom: 2px;
4058
4100
  }
4059
4101
  .j-body .j-d { font-size: 13.5px; color: var(--wral-semantic-fg-muted, #475569); line-height: 1.55; }
4060
- `, js = H`
4102
+ `, Ws = z`
4061
4103
  .bottom-bar {
4062
4104
  position: sticky; bottom: 0; z-index: 20;
4063
4105
  background: var(--wral-semantic-surface-default, #FFFFFF);
@@ -4070,32 +4112,32 @@ const Ps = H`
4070
4112
  }
4071
4113
  .bottom-bar .note { margin-left: auto; font-size: 12px; color: var(--wral-semantic-fg-subtle, #64748B); }
4072
4114
  @media (max-width: 540px) { .bottom-bar .note { display: none; } }
4073
- `, Hs = [Ps, Fs, Bs, Ms, Os, Ns, qs, Ls, Ks, Vs, js];
4074
- function z(n, e, { noAnim: t = !1, error: r = !1 } = {}) {
4075
- return C`
4115
+ `, Ys = [Ms, Os, Ns, qs, Ls, Ks, js, Vs, Hs, zs, Ws];
4116
+ function V(n, e, { noAnim: t = !1, error: r = !1 } = {}) {
4117
+ return x`
4076
4118
  <div class="msg bot ${t ? "no-anim" : ""} ${r ? "error" : ""}">
4077
4119
  <span class="lead">${n}</span>
4078
- ${e ? C`<span class="sub">${e}</span>` : T}
4120
+ ${e ? x`<span class="sub">${e}</span>` : U}
4079
4121
  </div>
4080
4122
  `;
4081
4123
  }
4082
4124
  function He(n, { noAnim: e = !1 } = {}) {
4083
- return C`<div class="msg user ${e ? "no-anim" : ""}">${n}</div>`;
4125
+ return x`<div class="msg user ${e ? "no-anim" : ""}">${n}</div>`;
4084
4126
  }
4085
4127
  function lt() {
4086
- return C`<div class="msg bot typing"><span></span><span></span><span></span></div>`;
4128
+ return x`<div class="msg bot typing"><span></span><span></span><span></span></div>`;
4087
4129
  }
4088
- function zs(n) {
4089
- return n ? C`<span class="flag-pill ${n}">${n === "urgent" ? "Urgent" : "Moderate"}</span>` : T;
4130
+ function Gs(n) {
4131
+ return n ? x`<span class="flag-pill ${n}">${n === "urgent" ? "Urgent" : "Moderate"}</span>` : U;
4090
4132
  }
4091
- function Ws() {
4092
- return C`
4133
+ function Js() {
4134
+ return x`
4093
4135
  <svg viewBox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="3"
4094
4136
  stroke-linecap="round" stroke-linejoin="round" width="20" height="20"
4095
4137
  aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
4096
4138
  `;
4097
4139
  }
4098
- const Ys = (n = {}) => ({
4140
+ const Zs = (n = {}) => ({
4099
4141
  userPoolId: n.userPoolId || "us-east-1_5Hz6i23GR",
4100
4142
  clientId: n.clientId || "835efrp61536otaeun4ob6iqn",
4101
4143
  region: n.region || "us-east-1",
@@ -4113,7 +4155,7 @@ const Ys = (n = {}) => ({
4113
4155
  } catch {
4114
4156
  return null;
4115
4157
  }
4116
- }, Gs = () => {
4158
+ }, Xs = () => {
4117
4159
  const n = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789", e = "!@#$%^&*";
4118
4160
  return [...Array(12)].map(() => n.charAt(Math.floor(Math.random() * n.length))).join("") + "Aa1" + e.charAt(Math.floor(Math.random() * e.length));
4119
4161
  }, Bt = (n) => new AmazonCognitoIdentity.CognitoUserPool({
@@ -4126,7 +4168,7 @@ const Ys = (n = {}) => ({
4126
4168
  idToken: n.getIdToken().getJwtToken(),
4127
4169
  accessToken: n.getAccessToken().getJwtToken(),
4128
4170
  refreshToken: n.getRefreshToken().getToken()
4129
- }), Hr = () => ({
4171
+ }), Yr = () => ({
4130
4172
  get: (n) => localStorage.getItem(n),
4131
4173
  set: (n, e) => localStorage.setItem(n, e),
4132
4174
  remove: (n) => localStorage.removeItem(n),
@@ -4135,7 +4177,7 @@ const Ys = (n = {}) => ({
4135
4177
  n.set(N.idToken, e.idToken), n.set(N.accessToken, e.accessToken), n.set(N.refreshToken, e.refreshToken);
4136
4178
  const r = t(e.idToken), i = r?.exp ? (r.exp * 1e3).toString() : (Date.now() + 3600 * 1e3).toString();
4137
4179
  n.set(N.idTokenExpiry, i), n.set(N.userEmail, r?.email || ""), n.set(N.userId, r?.sub || "");
4138
- }, Js = (n, e, t) => new Promise((r) => {
4180
+ }, Qs = (n, e, t) => new Promise((r) => {
4139
4181
  const i = t();
4140
4182
  e.signUp(
4141
4183
  n,
@@ -4150,27 +4192,27 @@ const Ys = (n = {}) => ({
4150
4192
  r({ exists: !1, result: o });
4151
4193
  }
4152
4194
  );
4153
- }), Zs = async (n, e, t, r, i, s, o, l, h) => {
4195
+ }), eo = async (n, e, t, r, i, s, o, l, h) => {
4154
4196
  const d = e.toLowerCase().trim(), p = r(n);
4155
- await i(d, p, Gs);
4197
+ await i(d, p, Xs);
4156
4198
  const m = s(d, p);
4157
- return m.setAuthenticationFlowType("CUSTOM_AUTH"), new Promise((v, y) => {
4199
+ return m.setAuthenticationFlowType("CUSTOM_AUTH"), new Promise((y, v) => {
4158
4200
  m.initiateAuth(new AmazonCognitoIdentity.AuthenticationDetails({
4159
4201
  Username: d
4160
4202
  }), {
4161
- onSuccess: (S) => {
4162
- const _ = o(S);
4163
- l(t, _, h), v({ success: !0, authenticated: !0, cognitoUser: m });
4203
+ onSuccess: (b) => {
4204
+ const _ = o(b);
4205
+ l(t, _, h), y({ success: !0, authenticated: !0, cognitoUser: m });
4164
4206
  },
4165
- onFailure: (S) => {
4166
- console.error("[sendCode] initiateAuth failed:", S), y(S);
4207
+ onFailure: (b) => {
4208
+ console.error("[sendCode] initiateAuth failed:", b), v(b);
4167
4209
  },
4168
4210
  customChallenge: () => {
4169
- console.log("[sendCode] Custom challenge issued - code sent to email"), v({ success: !0, challengeRequired: !0, cognitoUser: m });
4211
+ console.log("[sendCode] Custom challenge issued - code sent to email"), y({ success: !0, challengeRequired: !0, cognitoUser: m });
4170
4212
  }
4171
4213
  });
4172
4214
  });
4173
- }, Xs = (n, e, t, r, i, s) => new Promise((o, l) => {
4215
+ }, to = (n, e, t, r, i, s) => new Promise((o, l) => {
4174
4216
  n.sendCustomChallengeAnswer(e, {
4175
4217
  onSuccess: (h) => {
4176
4218
  const d = r(h);
@@ -4179,7 +4221,7 @@ const Ys = (n = {}) => ({
4179
4221
  onFailure: l,
4180
4222
  customChallenge: () => l(new Error("Invalid code"))
4181
4223
  });
4182
- }), zr = async (n, e, t, r, i, s, o) => {
4224
+ }), Gr = async (n, e, t, r, i, s, o) => {
4183
4225
  const l = e.get(N.refreshToken);
4184
4226
  if (!l) return null;
4185
4227
  const h = e.get(N.userEmail);
@@ -4187,18 +4229,18 @@ const Ys = (n = {}) => ({
4187
4229
  const d = t(n), p = r(h, d), m = new AmazonCognitoIdentity.CognitoRefreshToken({
4188
4230
  RefreshToken: l
4189
4231
  });
4190
- return new Promise((v) => {
4191
- p.refreshSession(m, (y, S) => {
4192
- if (y)
4193
- return e.clear(), v(null);
4194
- const _ = i(S);
4195
- s(e, _, o), v(_.accessToken);
4232
+ return new Promise((y) => {
4233
+ p.refreshSession(m, (v, b) => {
4234
+ if (v)
4235
+ return e.clear(), y(null);
4236
+ const _ = i(b);
4237
+ s(e, _, o), y(_.accessToken);
4196
4238
  });
4197
4239
  });
4198
- }, Qs = async (n, e) => {
4240
+ }, ro = async (n, e) => {
4199
4241
  let t = e.get(N.accessToken);
4200
4242
  if (!t) {
4201
- const r = await zr(
4243
+ const r = await Gr(
4202
4244
  n,
4203
4245
  e,
4204
4246
  Bt,
@@ -4217,11 +4259,11 @@ const Ys = (n = {}) => ({
4217
4259
  };
4218
4260
  let ct = null, _r = null;
4219
4261
  function Ot() {
4220
- return ct || (ct = Ys(window.authConfig || {}), _r = Hr()), { config: ct, storage: _r };
4262
+ return ct || (ct = Zs(window.authConfig || {}), _r = Yr()), { config: ct, storage: _r };
4221
4263
  }
4222
- async function Wr() {
4264
+ async function Jr() {
4223
4265
  const { config: n, storage: e } = Ot();
4224
- return zr(
4266
+ return Gr(
4225
4267
  n,
4226
4268
  e,
4227
4269
  Bt,
@@ -4231,93 +4273,118 @@ async function Wr() {
4231
4273
  Ge
4232
4274
  );
4233
4275
  }
4234
- async function eo() {
4276
+ async function no() {
4235
4277
  const { storage: n } = Ot(), e = n.get(N.accessToken), t = n.get(N.idTokenExpiry);
4236
- return e && t && Date.now() < Number(t) ? !0 : !!await Wr();
4278
+ return e && t && Date.now() < Number(t) ? !0 : !!await Jr();
4237
4279
  }
4238
- class Ue extends Error {
4280
+ class ce extends Error {
4239
4281
  constructor(e, t) {
4240
4282
  super(`api-forms request failed with status ${e}`), this.status = e, this.body = t;
4241
4283
  }
4242
4284
  }
4243
- function to({
4285
+ const Ar = Object.freeze({ enabled: !1, humanCheck: null });
4286
+ function io({
4244
4287
  baseUrl: n,
4245
4288
  fetchFn: e = (...i) => fetch(...i),
4246
4289
  xhrFactory: t = () => new XMLHttpRequest(),
4247
4290
  getAuthHeaders: r
4248
4291
  }) {
4249
4292
  const i = String(n || "").replace(/\/+$/, "");
4250
- async function s(o, { method: l = "GET", body: h, auth: d = !1 } = {}) {
4251
- const p = { Accept: "application/json" };
4252
- d && Object.assign(p, await r()), h !== void 0 && (p["Content-Type"] = "application/json");
4253
- let m;
4293
+ let s = Ar, o = null;
4294
+ async function l(h, { method: d = "GET", body: p, auth: m = !1 } = {}) {
4295
+ const y = { Accept: "application/json" };
4296
+ m && Object.assign(y, o ? { Authorization: `Bearer ${o}` } : await r()), p !== void 0 && (y["Content-Type"] = "application/json");
4297
+ let v;
4254
4298
  try {
4255
- m = await e(`${i}${o}`, {
4256
- method: l,
4257
- headers: p,
4258
- ...h !== void 0 ? { body: JSON.stringify(h) } : {}
4299
+ v = await e(`${i}${h}`, {
4300
+ method: d,
4301
+ headers: y,
4302
+ ...p !== void 0 ? { body: JSON.stringify(p) } : {}
4259
4303
  });
4260
- } catch (y) {
4261
- throw Object.assign(new Ue(0, null), { cause: y });
4304
+ } catch (_) {
4305
+ throw Object.assign(new ce(0, null), { cause: _ });
4262
4306
  }
4263
- let v = null;
4307
+ let b = null;
4264
4308
  try {
4265
- v = await m.json();
4309
+ b = await v.json();
4266
4310
  } catch {
4267
4311
  }
4268
- if (!m.ok)
4269
- throw new Ue(m.status, v);
4270
- return v;
4312
+ if (!v.ok)
4313
+ throw new ce(v.status, b);
4314
+ return b;
4271
4315
  }
4272
4316
  return {
4273
4317
  /** @returns {Promise<Array>} published form documents */
4274
4318
  listForms: async () => {
4275
- const { forms: o } = await s("/v1/forms");
4276
- return (o || []).filter((l) => l?.formId && l?.start && Array.isArray(l?.nodes));
4319
+ const h = await l("/v1/forms");
4320
+ return s = h?.anonymous?.enabled === !0 ? { enabled: !0, humanCheck: h.anonymous.humanCheck || null } : Ar, (h?.forms || []).filter((d) => d?.formId && d?.start && Array.isArray(d?.nodes));
4321
+ },
4322
+ /**
4323
+ * What the server advertised on the last listForms.
4324
+ * @returns {{enabled: boolean, humanCheck: {provider, siteKey}|null}}
4325
+ */
4326
+ anonymousCapability: () => s,
4327
+ /**
4328
+ * Mint a submission-scoped anonymous session; subsequent auth-bearing
4329
+ * calls present it until endAnonSession(). Unauthenticated by design.
4330
+ * @returns {Promise<{expiresIn: number}>}
4331
+ */
4332
+ createAnonSession: async ({ formId: h, requestId: d, humanToken: p }) => {
4333
+ const m = await l("/v1/anon/sessions", {
4334
+ method: "POST",
4335
+ body: { formId: h, requestId: d, ...p ? { humanToken: p } : {} }
4336
+ });
4337
+ if (o = m?.token || null, !o)
4338
+ throw new ce(502, { message: "The anonymous session had no token" });
4339
+ return { expiresIn: m.expiresIn };
4340
+ },
4341
+ /** Drop the anonymous session so identity headers apply again. */
4342
+ endAnonSession: () => {
4343
+ o = null;
4277
4344
  },
4278
4345
  /** @returns {Promise<Array<{assetId,url,method,expires,assetUrl}>>} */
4279
- createUploads: async (o) => {
4280
- const { uploads: l } = await s("/v1/uploads", { method: "POST", body: o, auth: !0 });
4281
- return l || [];
4346
+ createUploads: async (h) => {
4347
+ const { uploads: d } = await l("/v1/uploads", { method: "POST", body: h, auth: !0 });
4348
+ return d || [];
4282
4349
  },
4283
4350
  /**
4284
4351
  * PUT one file to its presigned URL. XHR (not fetch) so upload
4285
4352
  * progress is observable. Resolves on 2xx; rejects with
4286
4353
  * ApiError(status) otherwise. Returns { promise, abort }.
4287
4354
  */
4288
- uploadFile: ({ url: o, file: l, contentType: h, onProgress: d = () => {
4355
+ uploadFile: ({ url: h, file: d, contentType: p, onProgress: m = () => {
4289
4356
  } }) => {
4290
- const p = t();
4291
- return { promise: new Promise((v, y) => {
4292
- p.open("PUT", o), p.setRequestHeader("Content-Type", h || l.type), p.upload && (p.upload.onprogress = (S) => {
4293
- d({ loaded: S.loaded, total: S.total || l.size });
4294
- }), p.onload = () => {
4295
- p.status >= 200 && p.status < 300 ? v({ status: p.status }) : y(new Ue(p.status, null));
4296
- }, p.onerror = () => y(new Ue(0, null)), p.onabort = () => y(new Ue(0, { aborted: !0 })), p.send(l);
4297
- }), abort: () => p.abort() };
4357
+ const y = t();
4358
+ return { promise: new Promise((b, _) => {
4359
+ y.open("PUT", h), y.setRequestHeader("Content-Type", p || d.type), y.upload && (y.upload.onprogress = (C) => {
4360
+ m({ loaded: C.loaded, total: C.total || d.size });
4361
+ }), y.onload = () => {
4362
+ y.status >= 200 && y.status < 300 ? b({ status: y.status }) : _(new ce(y.status, null));
4363
+ }, y.onerror = () => _(new ce(0, null)), y.onabort = () => _(new ce(0, { aborted: !0 })), y.send(d);
4364
+ }), abort: () => y.abort() };
4298
4365
  },
4299
4366
  /** @returns {Promise<{requestId,reference,confirmation,routing}>} */
4300
- putRequest: async (o, l) => await s(`/v1/requests/${o}`, { method: "PUT", body: l, auth: !0 })
4367
+ putRequest: async (h, d) => await l(`/v1/requests/${h}`, { method: "PUT", body: d, auth: !0 })
4301
4368
  };
4302
4369
  }
4303
- function ro() {
4370
+ function so() {
4304
4371
  const { config: n, storage: e } = Ot();
4305
4372
  let t = null;
4306
4373
  return {
4307
- isAuthenticated: () => eo(),
4374
+ isAuthenticated: () => no(),
4308
4375
  signedInEmail: () => e.get(N.userEmail) || null,
4309
- getAuthHeaders: () => Qs(n, e),
4376
+ getAuthHeaders: () => ro(n, e),
4310
4377
  /**
4311
4378
  * Email step. Keeps the challenge user in memory for verifyCode.
4312
4379
  * @returns {{challengeRequired?: boolean, authenticated?: boolean}}
4313
4380
  */
4314
4381
  sendCode: async (r) => {
4315
- const i = await Zs(
4382
+ const i = await eo(
4316
4383
  n,
4317
4384
  r,
4318
4385
  e,
4319
4386
  Bt,
4320
- Js,
4387
+ Qs,
4321
4388
  Mt,
4322
4389
  Je,
4323
4390
  Ze,
@@ -4336,7 +4403,7 @@ function ro() {
4336
4403
  if (!t)
4337
4404
  throw new Error("Please enter your email again to get a new code.");
4338
4405
  try {
4339
- await Xs(
4406
+ await to(
4340
4407
  t,
4341
4408
  r,
4342
4409
  e,
@@ -4347,11 +4414,11 @@ function ro() {
4347
4414
  } catch {
4348
4415
  throw new Error("Invalid or expired code. Please request a new one and try again.");
4349
4416
  }
4350
- return await Wr(), { success: !0 };
4417
+ return await Jr(), { success: !0 };
4351
4418
  },
4352
4419
  /** Local sign-out only ("use a different email"). */
4353
4420
  signOut: () => {
4354
- t = null, Hr().clear();
4421
+ t = null, Yr().clear();
4355
4422
  },
4356
4423
  /**
4357
4424
  * Detect a login completed in ANOTHER tab (the storage event
@@ -4365,14 +4432,14 @@ function ro() {
4365
4432
  }
4366
4433
  };
4367
4434
  }
4368
- function no({ baseUrl: n }) {
4369
- const e = ro();
4370
- return { ...to({ baseUrl: n, getAuthHeaders: e.getAuthHeaders }), ...e };
4435
+ function oo({ baseUrl: n }) {
4436
+ const e = so();
4437
+ return { ...io({ baseUrl: n, getAuthHeaders: e.getAuthHeaders }), ...e };
4371
4438
  }
4372
4439
  function ae(n, e) {
4373
4440
  return (n?.nodes || []).find((t) => t.id === e);
4374
4441
  }
4375
- function Yr(n, e = []) {
4442
+ function Zr(n, e = []) {
4376
4443
  const t = [];
4377
4444
  let r = n?.start;
4378
4445
  for (const s of e) {
@@ -4393,9 +4460,9 @@ function Yr(n, e = []) {
4393
4460
  r = o.next;
4394
4461
  }
4395
4462
  const i = ae(n, r);
4396
- return i ? { nodeId: r, node: i, flags: Jr(t), error: null } : { nodeId: null, node: null, flags: t, error: { step: null, reason: `unknown node: ${r}` } };
4463
+ return i ? { nodeId: r, node: i, flags: Qr(t), error: null } : { nodeId: null, node: null, flags: t, error: { step: null, reason: `unknown node: ${r}` } };
4397
4464
  }
4398
- function io(n, e = []) {
4465
+ function ao(n, e = []) {
4399
4466
  const t = [];
4400
4467
  for (const r of e) {
4401
4468
  if (r.kind !== "collect") continue;
@@ -4404,46 +4471,46 @@ function io(n, e = []) {
4404
4471
  }
4405
4472
  return t;
4406
4473
  }
4407
- function so(n = []) {
4474
+ function uo(n = []) {
4408
4475
  const e = {};
4409
4476
  for (const t of n)
4410
4477
  t.kind === "collect" && Object.assign(e, t.values || {});
4411
4478
  return e;
4412
4479
  }
4413
- function oo(n = []) {
4480
+ function lo(n = []) {
4414
4481
  return n.filter((e) => e.kind === "choice").map((e) => `${e.nodeId}:${e.optionId}`);
4415
4482
  }
4416
- function Gr(n, e = []) {
4483
+ function Xr(n, e = []) {
4417
4484
  const t = [];
4418
4485
  for (const r of e) {
4419
4486
  if (r.kind !== "choice") continue;
4420
4487
  const s = (ae(n, r.nodeId)?.options || []).find((o) => o.id === r.optionId);
4421
4488
  t.push(...s?.flags || []);
4422
4489
  }
4423
- return Jr(t);
4490
+ return Qr(t);
4424
4491
  }
4425
- function ao(n = []) {
4492
+ function co(n = []) {
4426
4493
  return n.includes("urgent") ? "urgent" : n.includes("moderate") ? "moderate" : null;
4427
4494
  }
4428
- function Jr(n) {
4495
+ function Qr(n) {
4429
4496
  return [...new Set(n)];
4430
4497
  }
4431
- const uo = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/, Ar = {
4498
+ const ho = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/, xr = {
4432
4499
  text: 500,
4433
4500
  textarea: 5e3,
4434
4501
  url: 2048
4435
4502
  };
4436
- function lo(n, e) {
4437
- if (e == null || e === "" || n.kind === "location" && co(e))
4503
+ function fo(n, e) {
4504
+ if (e == null || e === "" || n.kind === "location" && po(e))
4438
4505
  return n.required ? `Please fill in: ${n.label.toLowerCase()}.` : null;
4439
4506
  switch (n.kind) {
4440
4507
  case "text":
4441
4508
  case "textarea": {
4442
- const r = n.maxLength || Ar[n.kind];
4509
+ const r = n.maxLength || xr[n.kind];
4443
4510
  return typeof e != "string" ? `Please enter text for ${n.label.toLowerCase()}.` : e.length > r ? `Please keep ${n.label.toLowerCase()} under ${r} characters.` : null;
4444
4511
  }
4445
4512
  case "url": {
4446
- if (typeof e != "string" || e.length > Ar.url)
4513
+ if (typeof e != "string" || e.length > xr.url)
4447
4514
  return "Please enter a valid link.";
4448
4515
  try {
4449
4516
  return new URL(e), null;
@@ -4452,30 +4519,30 @@ function lo(n, e) {
4452
4519
  }
4453
4520
  }
4454
4521
  case "datetime":
4455
- return uo.test(String(e)) ? null : "Please pick a date and time.";
4522
+ return ho.test(String(e)) ? null : "Please pick a date and time.";
4456
4523
  case "select":
4457
4524
  return (n.options || []).map((i) => i.id).includes(e) ? null : `Please choose one of the options for ${n.label.toLowerCase()}.`;
4458
4525
  case "consent":
4459
4526
  return e === !0 ? null : "Please confirm the rights statement so we can use what you send.";
4460
4527
  case "location":
4461
- return ho(n, e);
4528
+ return go(n, e);
4462
4529
  case "media":
4463
4530
  return null;
4464
4531
  default:
4465
4532
  return `Unsupported field: ${n.kind}`;
4466
4533
  }
4467
4534
  }
4468
- function co(n) {
4535
+ function po(n) {
4469
4536
  return n == null ? !0 : typeof n != "object" ? !1 : !n.county && !n.where && !(Array.isArray(n.gps) && n.gps.length);
4470
4537
  }
4471
- function ho(n, e) {
4538
+ function go(n, e) {
4472
4539
  return typeof e != "object" || Array.isArray(e) ? "Please tell us where this was." : e.county !== void 0 && (typeof e.county != "string" || e.county.length > 100) ? "Please choose a county." : e.where !== void 0 && (typeof e.where != "string" || e.where.length > 500) ? "Please shorten the location description." : e.gps !== void 0 && !(Array.isArray(e.gps) && e.gps.length === 2 && e.gps.every((r) => typeof r == "number" && Number.isFinite(r))) ? "Location coordinates look wrong; try re-sharing your location." : n.required && !e.county && !e.where ? `Please fill in: ${n.label.toLowerCase()}.` : null;
4473
4540
  }
4474
4541
  function Cr(n, e = {}) {
4475
4542
  const t = {};
4476
4543
  for (const r of n) {
4477
4544
  if (r.kind === "media") continue;
4478
- const i = lo(r, e[r.key]);
4545
+ const i = fo(r, e[r.key]);
4479
4546
  i && (t[r.key] = i);
4480
4547
  }
4481
4548
  return { ok: Object.keys(t).length === 0, errors: t };
@@ -4501,15 +4568,15 @@ function Et(n = [], e = {}, { required: t = !1 } = {}) {
4501
4568
  });
4502
4569
  }), { ok: o.length === 0, errors: o };
4503
4570
  }
4504
- function xr({ formId: n, requestId: e, files: t }) {
4571
+ function Er({ formId: n, requestId: e, files: t }) {
4505
4572
  return {
4506
4573
  formId: n,
4507
4574
  requestId: e,
4508
4575
  files: t.map((r) => ({ contentType: r.type, size: r.size }))
4509
4576
  };
4510
4577
  }
4511
- function fo({ form: n, steps: e, media: t = [] }) {
4512
- const r = io(n, e), i = so(e), s = {};
4578
+ function mo({ form: n, steps: e, media: t = [] }) {
4579
+ const r = ao(n, e), i = uo(e), s = {};
4513
4580
  for (const o of r) {
4514
4581
  if (o.kind === "media") continue;
4515
4582
  const l = i[o.key];
@@ -4525,12 +4592,12 @@ function fo({ form: n, steps: e, media: t = [] }) {
4525
4592
  return {
4526
4593
  formId: n.formId,
4527
4594
  flowVersion: n.flowVersion,
4528
- path: oo(e),
4595
+ path: lo(e),
4529
4596
  answers: s,
4530
4597
  media: t.map(({ assetId: o, type: l }) => ({ assetId: o, type: l }))
4531
4598
  };
4532
4599
  }
4533
- function po(n, e) {
4600
+ function Ur(n, e) {
4534
4601
  if (n === 429)
4535
4602
  return {
4536
4603
  kind: "throttled",
@@ -4568,15 +4635,15 @@ function po(n, e) {
4568
4635
  message: "Something went wrong on our end; please try again."
4569
4636
  };
4570
4637
  }
4571
- const go = 34, mo = 44;
4572
- function Er(n, e) {
4638
+ const yo = 34, vo = 44;
4639
+ function Tr(n, e) {
4573
4640
  const t = String(n);
4574
4641
  return t.length > e ? `${t.slice(0, e)}…` : t;
4575
4642
  }
4576
- function vo(n) {
4643
+ function wo(n) {
4577
4644
  return !n || typeof n != "object" ? "" : [n.county, n.where].filter(Boolean).join(", ");
4578
4645
  }
4579
- function yo(n, e = {}, t = []) {
4646
+ function bo(n, e = {}, t = []) {
4580
4647
  const r = [];
4581
4648
  for (const i of n) {
4582
4649
  if (i.kind === "consent") continue;
@@ -4584,21 +4651,21 @@ function yo(n, e = {}, t = []) {
4584
4651
  t.length && r.push(`${t.length} ${t.length === 1 ? "file" : "files"}`);
4585
4652
  continue;
4586
4653
  }
4587
- const s = i.kind === "location" ? vo(e[i.key]) : e[i.key];
4588
- s == null || s === "" || (i.kind === "textarea" ? r.push(`"${Er(s, mo)}"`) : r.push(Er(s, go)));
4654
+ const s = i.kind === "location" ? wo(e[i.key]) : e[i.key];
4655
+ s == null || s === "" || (i.kind === "textarea" ? r.push(`"${Tr(s, vo)}"`) : r.push(Tr(s, yo)));
4589
4656
  }
4590
4657
  return r.join(" · ") || "Details provided";
4591
4658
  }
4592
- function wo(n, e = [], t = null) {
4659
+ function So(n, e = [], t = null) {
4593
4660
  const r = [];
4594
4661
  for (const s of e) {
4595
4662
  const o = ae(n, s.nodeId);
4596
- s.kind === "choice" && o && r.push({ k: (o.prompt || "").replace(/\?$/, ""), v: s.label || s.optionId }), s.kind === "collect" && r.push({ k: "Details", v: s.summary || "Details provided" }), s.kind === "gate" && (s.email || t) && r.push({ k: "Verified email", v: s.email || t });
4663
+ s.kind === "choice" && o && r.push({ k: (o.prompt || "").replace(/\?$/, ""), v: s.label || s.optionId }), s.kind === "collect" && r.push({ k: "Details", v: s.summary || "Details provided" }), s.kind === "gate" && (s.anonymous ? r.push({ k: "Contact", v: "Anonymous — we will have no way to reach you" }) : (s.email || t) && r.push({ k: "Verified email", v: s.email || t }));
4597
4664
  }
4598
- const i = ao(Gr(n, e));
4665
+ const i = co(Xr(n, e));
4599
4666
  return i && r.push({ k: "Priority", v: i === "urgent" ? "Urgent" : "Moderate", pill: i }), r;
4600
4667
  }
4601
- function So(n, e = []) {
4668
+ function _o(n, e = []) {
4602
4669
  const t = n?.confirmation || {};
4603
4670
  return {
4604
4671
  title: t.title || "Report received.",
@@ -4606,12 +4673,12 @@ function So(n, e = []) {
4606
4673
  urgentNote: e.includes("urgent") ? t.urgentNote : void 0
4607
4674
  };
4608
4675
  }
4609
- function bo(n, e) {
4676
+ function Ao(n, e) {
4610
4677
  const t = e === "failed" ? " The notification is queued for a delivery retry." : "";
4611
4678
  return n?.startsWith("studio+email:") ? `Sent to the Studio review queue; the desk is emailed.${t}` : n?.startsWith("studio:") ? "Sent to the Studio review queue." : n?.startsWith("jsm:") ? `A ticket is opened for tech support with your details as fields, not prose.${t}` : n?.startsWith("email:") ? `Emailed to the owning desk with a link to your report.${t}` : "Routed to the right team.";
4612
4679
  }
4613
- function _o({ routing: n = {}, flags: e = [], reference: t = "" }) {
4614
- const r = e.includes("urgent");
4680
+ function xo({ routing: n = {}, flags: e = [], reference: t = "", anonymous: r = !1 }) {
4681
+ const i = e.includes("urgent");
4615
4682
  return [
4616
4683
  {
4617
4684
  title: "Received",
@@ -4619,12 +4686,12 @@ function _o({ routing: n = {}, flags: e = [], reference: t = "" }) {
4619
4686
  },
4620
4687
  {
4621
4688
  title: "Routed",
4622
- body: bo(n.destination, n.state),
4623
- pill: r ? "Urgent · pinned first" : void 0
4689
+ body: Ao(n.destination, n.state),
4690
+ pill: i ? "Urgent · pinned first" : void 0
4624
4691
  },
4625
4692
  {
4626
4693
  title: "Reviewed",
4627
- body: "An editor reviews it in the Report It queue: accept and promote with your credit, reject, or re-route."
4694
+ body: r ? "An editor reviews it in the Report It queue: accept and promote it uncredited, reject, or re-route." : "An editor reviews it in the Report It queue: accept and promote with your credit, reject, or re-route."
4628
4695
  },
4629
4696
  {
4630
4697
  title: "Monitored",
@@ -4636,30 +4703,30 @@ function _o({ routing: n = {}, flags: e = [], reference: t = "" }) {
4636
4703
  }
4637
4704
  ];
4638
4705
  }
4639
- const Nt = "wral-report-it:draft:v1", Zr = 1;
4640
- function Ao(n, e) {
4706
+ const Nt = "wral-report-it:draft:v1", en = 1;
4707
+ function Co(n, e) {
4641
4708
  try {
4642
- n.setItem(Nt, JSON.stringify({ ...e, v: Zr, savedAt: Date.now() }));
4709
+ n.setItem(Nt, JSON.stringify({ ...e, v: en, savedAt: Date.now() }));
4643
4710
  } catch {
4644
4711
  }
4645
4712
  }
4646
- function Co(n) {
4713
+ function Eo(n) {
4647
4714
  try {
4648
4715
  const e = n.getItem(Nt);
4649
4716
  if (!e) return null;
4650
4717
  const t = JSON.parse(e);
4651
- return t?.v !== Zr ? null : t;
4718
+ return t?.v !== en ? null : t;
4652
4719
  } catch {
4653
4720
  return null;
4654
4721
  }
4655
4722
  }
4656
- function Ur(n) {
4723
+ function Ir(n) {
4657
4724
  try {
4658
4725
  n.removeItem(Nt);
4659
4726
  } catch {
4660
4727
  }
4661
4728
  }
4662
- function xo({ apiOrigin: n, form: e, steps: t, requestId: r = null, mediaMeta: i = {} }) {
4729
+ function Uo({ apiOrigin: n, form: e, steps: t, requestId: r = null, mediaMeta: i = {} }) {
4663
4730
  return {
4664
4731
  apiOrigin: n,
4665
4732
  formId: e.formId,
@@ -4669,13 +4736,13 @@ function xo({ apiOrigin: n, form: e, steps: t, requestId: r = null, mediaMeta: i
4669
4736
  media: i
4670
4737
  };
4671
4738
  }
4672
- function Eo(n, e, { apiOrigin: t } = {}) {
4739
+ function To(n, e, { apiOrigin: t } = {}) {
4673
4740
  if (!n) return { status: "discarded" };
4674
4741
  if (t && n.apiOrigin && n.apiOrigin !== t)
4675
4742
  return { status: "discarded" };
4676
4743
  const r = (e || []).find((o) => o.formId === n.formId);
4677
4744
  if (!r) return { status: "discarded" };
4678
- const { error: i } = Yr(r, n.steps || []);
4745
+ const { error: i } = Zr(r, n.steps || []);
4679
4746
  if (i) return { status: "discarded" };
4680
4747
  const s = {};
4681
4748
  for (const [o, l] of Object.entries(n.media || {}))
@@ -4708,7 +4775,7 @@ function We(n = []) {
4708
4775
  error: null
4709
4776
  };
4710
4777
  }
4711
- function Uo(n, e) {
4778
+ function Io(n, e) {
4712
4779
  switch (e.type) {
4713
4780
  case "START":
4714
4781
  return { ...n, stage: n.files.length ? "minting" : "requesting", error: null };
@@ -4735,7 +4802,7 @@ function Uo(n, e) {
4735
4802
  }));
4736
4803
  case "FILE_DONE": {
4737
4804
  const t = Te(n, e.i, (r) => ({ ...r, status: "done", progress: 1 }));
4738
- return To(t);
4805
+ return Do(t);
4739
4806
  }
4740
4807
  case "FILE_FAIL":
4741
4808
  return { ...Te(n, e.i, (r) => ({
@@ -4776,14 +4843,14 @@ function Te(n, e, t) {
4776
4843
  const r = n.files.map((i, s) => s === e ? t(i) : i);
4777
4844
  return { ...n, files: r };
4778
4845
  }
4779
- function To(n) {
4846
+ function Do(n) {
4780
4847
  const e = n.files.every((r) => r.status === "done"), t = n.files.some((r) => r.status === "failed");
4781
4848
  return e ? { ...n, stage: "requesting" } : t ? { ...n, stage: "uploading-error" } : n;
4782
4849
  }
4783
- function Tr(n) {
4850
+ function Dr(n) {
4784
4851
  return n.files.map((e, t) => ({ ...e, i: t })).filter((e) => e.status === "failed");
4785
4852
  }
4786
- const Io = [
4853
+ const ko = [
4787
4854
  "Wake",
4788
4855
  "Durham",
4789
4856
  "Orange",
@@ -4800,9 +4867,18 @@ const Io = [
4800
4867
  "Moore",
4801
4868
  "Sampson",
4802
4869
  "Other / outside the area"
4803
- ], Do = "https://api.wral.com/forms", Ro = 480, ko = 2;
4804
- class $o extends se {
4805
- static styles = Hs;
4870
+ ], kr = "(919) 821-8600", Ro = "https://www.wral.com/my-wral/", $o = Object.freeze([
4871
+ "We cannot come back to you for the detail that often turns a tip into a story.",
4872
+ "We cannot credit you if we use your photos or video.",
4873
+ "If you lose your reference number, we cannot look it up for you."
4874
+ ]);
4875
+ function Po(n) {
4876
+ const e = String(n).replace(/\D/g, "");
4877
+ return `tel:+1${e.length === 11 && e.startsWith("1") ? e.slice(1) : e}`;
4878
+ }
4879
+ const Fo = "https://api.wral.com/forms", Bo = 480, Mo = 2;
4880
+ class Oo extends se {
4881
+ static styles = Ys;
4806
4882
  static properties = {
4807
4883
  api: { type: String },
4808
4884
  _phase: { state: !0 },
@@ -4818,34 +4894,35 @@ class $o extends se {
4818
4894
  _notice: { state: !0 },
4819
4895
  _result: { state: !0 }
4820
4896
  };
4821
- #a = null;
4822
- #s = null;
4897
+ #u = null;
4898
+ #o = null;
4823
4899
  #h = null;
4824
4900
  #t = null;
4825
4901
  #r = {};
4826
4902
  #n = {};
4827
4903
  #i = /* @__PURE__ */ new Map();
4828
- #g = null;
4829
- #m = !1;
4830
- #u = null;
4904
+ #y = null;
4905
+ #v = !1;
4906
+ #l = null;
4907
+ #C = 0;
4831
4908
  constructor() {
4832
- super(), this.api = Do, this._phase = "loading", this._forms = [], this._form = null, this._steps = [], this._typing = !1, this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, this._submit = We([]), this._banner = null, this._notice = null, this._result = null;
4909
+ super(), this.api = Fo, this._phase = "loading", this._forms = [], this._form = null, this._steps = [], this._typing = !1, this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, this._submit = We([]), this._banner = null, this._notice = null, this._result = null;
4833
4910
  }
4834
4911
  get client() {
4835
- return this.#a ? this.#a : ((!this.#s || this.#h !== this.api) && (this.#s = no({ baseUrl: this.api }), this.#h = this.api), this.#s);
4912
+ return this.#u ? this.#u : ((!this.#o || this.#h !== this.api) && (this.#o = oo({ baseUrl: this.api }), this.#h = this.api), this.#o);
4836
4913
  }
4837
4914
  set client(e) {
4838
- this.#a = e || null, this.isConnected && this.#v();
4915
+ this.#u = e || null, this.isConnected && this.#w();
4839
4916
  }
4840
4917
  connectedCallback() {
4841
- super.connectedCallback(), this.#v();
4918
+ super.connectedCallback(), this.#w();
4842
4919
  }
4843
4920
  disconnectedCallback() {
4844
- super.disconnectedCallback(), clearTimeout(this.#g), this.#u?.();
4921
+ super.disconnectedCallback(), clearTimeout(this.#y), this.#l?.();
4845
4922
  for (const { abort: e } of this.#i.values()) e?.();
4846
4923
  this.#i.clear();
4847
4924
  }
4848
- get #D() {
4925
+ get #$() {
4849
4926
  try {
4850
4927
  return matchMedia("(prefers-reduced-motion: reduce)").matches;
4851
4928
  } catch {
@@ -4861,28 +4938,45 @@ class $o extends se {
4861
4938
  } };
4862
4939
  }
4863
4940
  }
4941
+ /*
4942
+ * The anonymous route is offered only where it can actually complete.
4943
+ * The server is the authority: GET /v1/forms says whether anonymous
4944
+ * submission is enabled on this deployment, and a form whose desk needs
4945
+ * a way to reach the viewer opts out with allowAnonymous: false.
4946
+ */
4947
+ get #P() {
4948
+ return this.client.anonymousCapability?.().enabled === !0 && this._form?.allowAnonymous !== !1;
4949
+ }
4950
+ /* Derived from the gate step, so a reload restores the choice. */
4951
+ get #d() {
4952
+ return this._steps.some((e) => e.kind === "gate" && e.anonymous === !0);
4953
+ }
4864
4954
  // ── Loading + draft restore ─────────────────────────────────────
4865
- async #v() {
4955
+ async #w() {
4956
+ const e = ++this.#C, t = () => e === this.#C;
4866
4957
  this._phase = "loading", this._banner = null;
4958
+ let r;
4867
4959
  try {
4868
- this._forms = await this.client.listForms();
4960
+ r = await this.client.listForms();
4869
4961
  } catch {
4870
- this._phase = "load-error";
4962
+ t() && (this._phase = "load-error");
4871
4963
  return;
4872
4964
  }
4873
- const e = Eo(Co(this.#f), this._forms, { apiOrigin: this.api });
4874
- if (e.status === "ok" || e.status === "review-required") {
4875
- this._form = e.form, this._steps = e.steps, this.#t = e.requestId, this.#n = e.lostMedia || {}, e.status === "review-required" ? this._notice = "This form changed since your last visit — please review your answers." : Object.keys(this.#n).length && (this._notice = "Welcome back — your answers were saved, but attachments need to be re-attached."), this.#o({ animate: !1 });
4965
+ if (!t()) return;
4966
+ this._forms = r;
4967
+ const i = To(Eo(this.#f), this._forms, { apiOrigin: this.api });
4968
+ if (i.status === "ok" || i.status === "review-required") {
4969
+ this._form = i.form, this._steps = i.steps, this.#t = i.requestId, this.#n = i.lostMedia || {}, i.status === "review-required" ? this._notice = "This form changed since your last visit — please review your answers." : Object.keys(this.#n).length && (this._notice = "Welcome back — your answers were saved, but attachments need to be re-attached."), this.#a({ animate: !1 });
4876
4970
  return;
4877
4971
  }
4878
4972
  this._phase = "pick";
4879
4973
  }
4880
- #l() {
4974
+ #c() {
4881
4975
  if (!this._form) return;
4882
4976
  const e = {};
4883
4977
  for (const [t, r] of Object.entries(this.#r))
4884
4978
  r.length && (e[t] = r.map(({ name: i, type: s, size: o }) => ({ name: i, type: s, size: o })));
4885
- Ao(this.#f, xo({
4979
+ Co(this.#f, Uo({
4886
4980
  apiOrigin: this.api,
4887
4981
  form: this._form,
4888
4982
  steps: this._steps,
@@ -4891,41 +4985,41 @@ class $o extends se {
4891
4985
  }));
4892
4986
  }
4893
4987
  // ── Walk mechanics ──────────────────────────────────────────────
4894
- #o({ animate: e = !0 } = {}) {
4895
- this._phase = "walk", this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, e && !this.#D ? (this._typing = !0, clearTimeout(this.#g), this.#g = setTimeout(() => {
4988
+ #a({ animate: e = !0 } = {}) {
4989
+ this._phase = "walk", this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, e && !this.#$ ? (this._typing = !0, clearTimeout(this.#y), this.#y = setTimeout(() => {
4896
4990
  this._typing = !1;
4897
- }, Ro)) : this._typing = !1;
4991
+ }, Bo)) : this._typing = !1;
4898
4992
  }
4899
- get #A() {
4900
- return this._form ? Yr(this._form, this._steps) : { node: null };
4993
+ get #b() {
4994
+ return this._form ? Zr(this._form, this._steps) : { node: null };
4901
4995
  }
4902
- #R(e) {
4903
- this._form = e, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._notice = null, this.#l(), this.#o();
4996
+ #F(e) {
4997
+ this._form = e, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._notice = null, this.#c(), this.#a();
4904
4998
  }
4905
- #y(e) {
4906
- this._steps = [...this._steps, e], this.#l(), this.#o();
4999
+ #p(e) {
5000
+ this._steps = [...this._steps, e], this.#c(), this.#a();
4907
5001
  }
4908
- #k() {
5002
+ #B() {
4909
5003
  if (this._phase === "done" || this._phase === "submitting") return;
4910
5004
  if (this._phase === "review") {
4911
- this.#o({ animate: !1 });
5005
+ this.#a({ animate: !1 });
4912
5006
  return;
4913
5007
  }
4914
5008
  if (!this._steps.length) {
4915
- this.#w();
5009
+ this.#S();
4916
5010
  return;
4917
5011
  }
4918
5012
  const e = this._steps.at(-1);
4919
- this._steps = this._steps.slice(0, -1), e.kind === "collect" && (this._cardValues = { ...e.values }), this.#l(), this.#o({ animate: !1 });
5013
+ this._steps = this._steps.slice(0, -1), e.kind === "collect" && (this._cardValues = { ...e.values }), this.#c(), this.#a({ animate: !1 });
4920
5014
  }
4921
- #w() {
4922
- this._form = null, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._result = null, this._banner = null, this._notice = null, this._submit = We([]), Ur(this.#f), this._phase = "pick";
5015
+ #S() {
5016
+ this.client.endAnonSession?.(), this._form = null, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._result = null, this._banner = null, this._notice = null, this._submit = We([]), Ir(this.#f), this._phase = "pick";
4923
5017
  }
4924
5018
  // ── Collect card ────────────────────────────────────────────────
4925
- #S(e, t) {
5019
+ #_(e, t) {
4926
5020
  this._cardValues = { ...this._cardValues, [e]: t };
4927
5021
  }
4928
- #$(e) {
5022
+ #M(e) {
4929
5023
  const t = e.fields || [], { ok: r, errors: i } = Cr(t, this._cardValues), s = t.find((h) => h.kind === "media");
4930
5024
  let o = !0;
4931
5025
  if (s) {
@@ -4939,29 +5033,29 @@ class $o extends se {
4939
5033
  return;
4940
5034
  }
4941
5035
  const l = this.#r[e.id] || [];
4942
- this.#y({
5036
+ this.#p({
4943
5037
  nodeId: e.id,
4944
5038
  kind: "collect",
4945
5039
  values: { ...this._cardValues },
4946
- summary: yo(t, this._cardValues, l)
5040
+ summary: bo(t, this._cardValues, l)
4947
5041
  });
4948
5042
  }
4949
5043
  // ── Gate ────────────────────────────────────────────────────────
4950
- async #C() {
4951
- if (!(this._gate.stage || this.#m)) {
4952
- this.#m = !0;
5044
+ async #E() {
5045
+ if (!(this._gate.stage || this.#v)) {
5046
+ this.#v = !0;
4953
5047
  try {
4954
5048
  const e = await this.client.isAuthenticated();
4955
5049
  this._gate = e ? { stage: "signedin", email: this.client.signedInEmail?.() || "", error: "", loading: !1 } : { stage: "email", email: "", error: "", loading: !1 };
4956
5050
  } finally {
4957
- this.#m = !1;
5051
+ this.#v = !1;
4958
5052
  }
4959
- this._gate.stage === "email" && this.client.onCrossTabLogin && !this.#u && (this.#u = this.client.onCrossTabLogin(() => {
4960
- this.#u?.(), this.#u = null, this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#C();
5053
+ this._gate.stage === "email" && this.client.onCrossTabLogin && !this.#l && (this.#l = this.client.onCrossTabLogin(() => {
5054
+ this.#l?.(), this.#l = null, this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#E();
4961
5055
  }));
4962
5056
  }
4963
5057
  }
4964
- async #b() {
5058
+ async #A() {
4965
5059
  const e = this._gate.email.trim();
4966
5060
  if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
4967
5061
  this._gate = { ...this._gate, error: "Please enter a valid email address." };
@@ -4979,10 +5073,10 @@ class $o extends se {
4979
5073
  };
4980
5074
  }
4981
5075
  }
4982
- async #x(e) {
5076
+ async #U(e) {
4983
5077
  this._gate = { ...this._gate, error: "", loading: !0 };
4984
5078
  try {
4985
- await this.client.verifyCode(e), this.#E(this._gate.email);
5079
+ await this.client.verifyCode(e), this.#T(this._gate.email);
4986
5080
  } catch (t) {
4987
5081
  this._gate = {
4988
5082
  ...this._gate,
@@ -4991,19 +5085,53 @@ class $o extends se {
4991
5085
  };
4992
5086
  }
4993
5087
  }
4994
- #E(e) {
5088
+ #T(e) {
4995
5089
  if (this._gate = { stage: null, email: "", error: "", loading: !1 }, this._submit.stage === "auth") {
4996
- this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#c();
5090
+ this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#s();
4997
5091
  return;
4998
5092
  }
4999
- const { node: t } = this.#A;
5000
- t?.type === "gate" && this.#y({ nodeId: t.id, kind: "gate", email: e });
5093
+ const { node: t } = this.#b;
5094
+ t?.type === "gate" && this.#p({ nodeId: t.id, kind: "gate", email: e });
5001
5095
  }
5002
- #P() {
5096
+ #O() {
5003
5097
  this.client.signOut?.(), this._gate = { stage: "email", email: "", error: "", loading: !1 };
5004
5098
  }
5099
+ // ── Anonymous route ─────────────────────────────────────────────
5100
+ #N() {
5101
+ this._gate = { ...this._gate, stage: "anon-confirm", error: "" };
5102
+ }
5103
+ #q() {
5104
+ this._gate = { ...this._gate, stage: "email", error: "" };
5105
+ }
5106
+ /*
5107
+ * Records the choice only. The session is minted at submit, against
5108
+ * the requestId, so an abandoned form leaves nothing behind.
5109
+ */
5110
+ #L() {
5111
+ const { node: e } = this.#b;
5112
+ e?.type === "gate" && (this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#p({ nodeId: e.id, kind: "gate", anonymous: !0 }));
5113
+ }
5114
+ async #I() {
5115
+ try {
5116
+ return await this.client.createAnonSession({
5117
+ formId: this._form.formId,
5118
+ requestId: this.#t
5119
+ }), !0;
5120
+ } catch (e) {
5121
+ return this._banner = Ur(e?.status ?? 0, e?.body ?? null), !1;
5122
+ }
5123
+ }
5124
+ /* An anonymous session outliving the upload run re-mints in place; there
5125
+ * is no identity to send back to the sign-in card. */
5126
+ async #K() {
5127
+ if (await this.#I()) {
5128
+ this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#s();
5129
+ return;
5130
+ }
5131
+ this.#e({ type: "REQUEST_FAIL", error: this._banner });
5132
+ }
5005
5133
  // ── Submit pipeline ─────────────────────────────────────────────
5006
- get #d() {
5134
+ get #g() {
5007
5135
  const e = [];
5008
5136
  for (const t of this._steps)
5009
5137
  if (t.kind === "collect")
@@ -5012,9 +5140,9 @@ class $o extends se {
5012
5140
  return e;
5013
5141
  }
5014
5142
  #e(e) {
5015
- this._submit = Uo(this._submit, e);
5143
+ this._submit = Io(this._submit, e);
5016
5144
  }
5017
- async #F() {
5145
+ async #j() {
5018
5146
  this._banner = null;
5019
5147
  for (let e = 0; e < this._steps.length; e++) {
5020
5148
  const t = this._steps[e];
@@ -5028,42 +5156,50 @@ class $o extends se {
5028
5156
  d.ok || (l = !1, s[o.key] = d.errors[0].message);
5029
5157
  }
5030
5158
  if (!i || !l) {
5031
- this._steps = this._steps.slice(0, e), this._cardValues = { ...t.values }, this._fieldErrors = s, this.#l(), this.#o({ animate: !1 });
5159
+ this._steps = this._steps.slice(0, e), this._cardValues = { ...t.values }, this._fieldErrors = s, this.#c(), this.#a({ animate: !1 });
5032
5160
  return;
5033
5161
  }
5034
5162
  }
5035
- if (this.#t = this.#t || crypto.randomUUID(), this.#l(), this._submit = We(this.#d), this._phase = "submitting", !await this.client.isAuthenticated()) {
5163
+ if (this.#t = this.#t || crypto.randomUUID(), this.#c(), this.#d) {
5164
+ if (!await this.#I()) return;
5165
+ } else
5166
+ this.client.endAnonSession?.();
5167
+ if (this._submit = We(this.#g), this._phase = "submitting", this.#d) {
5168
+ this.#e({ type: "START" }), this.#s();
5169
+ return;
5170
+ }
5171
+ if (!await this.client.isAuthenticated()) {
5036
5172
  this.#e({ type: "START" }), this.#e({ type: "AUTH_REQUIRED" }), this._gate = { stage: "email", email: "", error: "", loading: !1 };
5037
5173
  return;
5038
5174
  }
5039
- this.#e({ type: "START" }), this.#c();
5175
+ this.#e({ type: "START" }), this.#s();
5040
5176
  }
5041
- async #c() {
5177
+ async #s() {
5042
5178
  const e = this._submit.stage;
5043
- if (e === "minting") return this.#B();
5044
- if (e === "uploading") return this.#U();
5045
- if (e === "requesting") return this.#N();
5179
+ if (e === "minting") return this.#V();
5180
+ if (e === "uploading") return this.#D();
5181
+ if (e === "requesting") return this.#W();
5046
5182
  }
5047
- async #B() {
5183
+ async #V() {
5048
5184
  try {
5049
- const e = await this.client.createUploads(xr({
5185
+ const e = await this.client.createUploads(Er({
5050
5186
  formId: this._form.formId,
5051
5187
  requestId: this.#t,
5052
- files: this.#d
5188
+ files: this.#g
5053
5189
  }));
5054
- this.#e({ type: "MINTED", uploads: e }), this.#c();
5190
+ this.#e({ type: "MINTED", uploads: e }), this.#s();
5055
5191
  } catch (e) {
5056
- this.#_(e);
5192
+ this.#x(e);
5057
5193
  }
5058
5194
  }
5059
- #U() {
5195
+ #D() {
5060
5196
  const e = this._submit.files, t = this.#i.size;
5061
5197
  let r = 0;
5062
- for (let i = 0; i < e.length && t + r < ko; i++)
5063
- e[i].status !== "uploading" || this.#i.has(i) || (r += 1, this.#M(i));
5198
+ for (let i = 0; i < e.length && t + r < Mo; i++)
5199
+ e[i].status !== "uploading" || this.#i.has(i) || (r += 1, this.#H(i));
5064
5200
  }
5065
- #M(e) {
5066
- const t = this._submit.files[e], r = this.#d[e], { promise: i, abort: s } = this.client.uploadFile({
5201
+ #H(e) {
5202
+ const t = this._submit.files[e], r = this.#g[e], { promise: i, abort: s } = this.client.uploadFile({
5067
5203
  url: t.url,
5068
5204
  file: r,
5069
5205
  contentType: t.type,
@@ -5072,7 +5208,7 @@ class $o extends se {
5072
5208
  }
5073
5209
  });
5074
5210
  this.#i.set(e, { abort: s }), i.then(() => {
5075
- this.#i.delete(e), this.#e({ type: "FILE_DONE", i: e }), this.#c();
5211
+ this.#i.delete(e), this.#e({ type: "FILE_DONE", i: e }), this.#s();
5076
5212
  }).catch((o) => {
5077
5213
  this.#i.delete(e), this.#e({
5078
5214
  type: "FILE_FAIL",
@@ -5081,48 +5217,52 @@ class $o extends se {
5081
5217
  });
5082
5218
  });
5083
5219
  }
5084
- async #O(e) {
5220
+ async #z(e) {
5085
5221
  if (this._submit.files[e].error === "expired")
5086
5222
  try {
5087
- const [r] = await this.client.createUploads(xr({
5223
+ const [r] = await this.client.createUploads(Er({
5088
5224
  formId: this._form.formId,
5089
5225
  requestId: this.#t,
5090
- files: [this.#d[e]]
5226
+ files: [this.#g[e]]
5091
5227
  }));
5092
5228
  this.#e({ type: "REMINT_FILE", i: e, upload: r });
5093
5229
  } catch (r) {
5094
- this.#_(r);
5230
+ this.#x(r);
5095
5231
  return;
5096
5232
  }
5097
5233
  else
5098
5234
  this.#e({ type: "RETRY_FILE", i: e });
5099
- this.#U();
5235
+ this.#D();
5100
5236
  }
5101
- async #N() {
5237
+ async #W() {
5102
5238
  try {
5103
- const e = this._submit.files.map(({ assetId: r, type: i }) => ({ assetId: r, type: i })), t = await this.client.putRequest(this.#t, fo({
5239
+ const e = this._submit.files.map(({ assetId: r, type: i }) => ({ assetId: r, type: i })), t = await this.client.putRequest(this.#t, mo({
5104
5240
  form: this._form,
5105
5241
  steps: this._steps,
5106
5242
  media: e
5107
5243
  }));
5108
- this.#e({ type: "REQUEST_OK", result: t }), this._result = t, Ur(this.#f), this._phase = "done";
5244
+ this.#e({ type: "REQUEST_OK", result: t }), this._result = t, Ir(this.#f), this.client.endAnonSession?.(), this._phase = "done";
5109
5245
  } catch (e) {
5110
- this.#_(e);
5246
+ this.#x(e);
5111
5247
  }
5112
5248
  }
5113
- #_(e) {
5114
- const t = po(e?.status ?? 0, e?.body ?? null);
5249
+ #x(e) {
5250
+ const t = Ur(e?.status ?? 0, e?.body ?? null);
5115
5251
  if (t.kind === "auth") {
5116
- this.#e({ type: "AUTH_REQUIRED" }), this._gate = { stage: "email", email: "", error: "", loading: !1 };
5252
+ if (this.#e({ type: "AUTH_REQUIRED" }), this.#d) {
5253
+ this.#K();
5254
+ return;
5255
+ }
5256
+ this._gate = { stage: "email", email: "", error: "", loading: !1 };
5117
5257
  return;
5118
5258
  }
5119
5259
  if (t.kind === "stale") {
5120
- this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t }), this.#q();
5260
+ this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t }), this.#Y();
5121
5261
  return;
5122
5262
  }
5123
5263
  this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t });
5124
5264
  }
5125
- async #q() {
5265
+ async #Y() {
5126
5266
  try {
5127
5267
  this._forms = await this.client.listForms();
5128
5268
  const e = this._forms.find((t) => t.formId === this._form.formId);
@@ -5130,86 +5270,90 @@ class $o extends se {
5130
5270
  } catch {
5131
5271
  }
5132
5272
  }
5133
- #L() {
5134
- this._banner = null, this.#e({ type: "REQUEST_START" }), this.#c();
5273
+ #G() {
5274
+ this._banner = null, this.#e({ type: "REQUEST_START" }), this.#s();
5135
5275
  }
5136
5276
  // ── Render ──────────────────────────────────────────────────────
5137
5277
  render() {
5138
- return C`
5278
+ return x`
5139
5279
  <div class="chat" aria-live="polite">
5140
- ${this.#K()}
5280
+ ${this.#J()}
5141
5281
  </div>
5142
- ${this.#Q()}
5282
+ ${this.#le()}
5143
5283
  `;
5144
5284
  }
5145
- #K() {
5285
+ #J() {
5146
5286
  switch (this._phase) {
5147
5287
  case "loading":
5148
5288
  return lt();
5149
5289
  case "load-error":
5150
- return C`
5151
- ${z("We could not load the forms.", "Check your connection and try again.", { error: !0 })}
5290
+ return x`
5291
+ ${V("We could not load the forms.", "Check your connection and try again.", { error: !0 })}
5152
5292
  <div class="options">
5153
- <button type="button" class="chip" @click=${() => this.#v()}>Try again</button>
5293
+ <button type="button" class="chip" @click=${() => this.#w()}>Try again</button>
5154
5294
  </div>
5155
5295
  `;
5156
5296
  case "pick":
5157
- return this.#V();
5297
+ return this.#Z();
5158
5298
  case "walk":
5159
- return C`${this.#p()}${this._typing ? lt() : this.#j()}`;
5299
+ return x`${this.#m()}${this._typing ? lt() : this.#X()}`;
5160
5300
  case "review":
5161
- return C`${this.#p()}${this.#I()}`;
5301
+ return x`${this.#m()}${this.#R()}`;
5162
5302
  case "submitting":
5163
- return C`${this.#p()}${this.#Z()}`;
5303
+ return x`${this.#m()}${this.#ae()}`;
5164
5304
  case "done":
5165
- return C`${this.#p()}${this.#X()}`;
5305
+ return x`${this.#m()}${this.#ue()}`;
5166
5306
  default:
5167
- return T;
5307
+ return U;
5168
5308
  }
5169
5309
  }
5170
- #V() {
5310
+ #Z() {
5171
5311
  const e = this._forms;
5172
- return C`
5173
- ${z(
5312
+ return x`
5313
+ ${V(
5174
5314
  "Welcome to Report It. What would you like to send us?",
5175
5315
  "A few quick questions route your report to the right team."
5176
5316
  )}
5177
5317
  <div class="options" role="group" aria-label="What would you like to send us?">
5178
- ${e.map((t, r) => C`
5318
+ ${e.map((t, r) => x`
5179
5319
  <button type="button" class="chip" style="animation-delay: ${60 + r * 50}ms"
5180
- @click=${() => this.#R(t)}>${t.title}</button>
5320
+ @click=${() => this.#F(t)}>${t.title}</button>
5181
5321
  `)}
5182
5322
  </div>
5183
5323
  `;
5184
5324
  }
5185
- #p() {
5325
+ #m() {
5186
5326
  const e = [];
5187
- this._form && (e.push(z(
5327
+ this._form && (e.push(V(
5188
5328
  "Welcome to Report It. What would you like to send us?",
5189
5329
  "A few quick questions route your report to the right team.",
5190
5330
  { noAnim: !0 }
5191
- )), e.push(He(this._form.title, { noAnim: !0 }))), this._notice && e.push(z(this._notice, "", { noAnim: !0 }));
5331
+ )), e.push(He(this._form.title, { noAnim: !0 }))), this._notice && e.push(V(this._notice, "", { noAnim: !0 }));
5192
5332
  for (const t of this._steps) {
5193
5333
  const r = ae(this._form, t.nodeId);
5194
- r?.prompt && e.push(z(r.prompt, r.help, { noAnim: !0 })), r?.type === "gate" && e.push(z(
5334
+ r?.prompt && e.push(V(r.prompt, r.help, { noAnim: !0 })), r?.type === "gate" && e.push(t.anonymous ? V(
5335
+ "Last step: how can we reach you?",
5336
+ "You chose to send this anonymously.",
5337
+ { noAnim: !0 }
5338
+ ) : V(
5195
5339
  "Last step: verify your email so we can follow up.",
5196
5340
  "One address, one code. No password needed.",
5197
5341
  { noAnim: !0 }
5198
- )), t.kind === "choice" && e.push(He(t.label || t.optionId, { noAnim: !0 })), t.kind === "collect" && e.push(He(t.summary || "Details provided", { noAnim: !0 })), t.kind === "gate" && e.push(He(t.email, { noAnim: !0 }));
5342
+ )), t.kind === "choice" && e.push(He(t.label || t.optionId, { noAnim: !0 })), t.kind === "collect" && e.push(He(t.summary || "Details provided", { noAnim: !0 })), t.kind === "gate" && e.push(He(t.anonymous ? "Send anonymously" : t.email, { noAnim: !0 }));
5199
5343
  }
5200
5344
  return e;
5201
5345
  }
5202
- #j() {
5203
- const { node: e, error: t } = this.#A;
5204
- return t || !e ? z("Something went sideways with this form.", "Please start over.", { error: !0 }) : e.type === "choice" ? this.#H(e) : e.type === "collect" ? this.#z(e) : e.type === "gate" ? this.#T(e) : e.type === "redirect" ? this.#J(e) : e.type === "terminal" ? this.#I() : T;
5346
+ #X() {
5347
+ const { node: e, error: t } = this.#b;
5348
+ return t || !e ? V("Something went sideways with this form.", "Please start over.", { error: !0 }) : e.type === "choice" ? this.#Q(e) : e.type === "collect" ? this.#ee(e) : e.type === "gate" ? this.#k(e) : e.type === "redirect" ? this.#oe(e) : e.type === "terminal" ? this.#R() : U;
5205
5349
  }
5206
- #H(e) {
5207
- return C`
5208
- ${z(e.prompt, e.help)}
5350
+ #Q(e) {
5351
+ return x`
5352
+ ${V(e.prompt, e.help)}
5209
5353
  <div class="options" role="group" aria-label=${e.prompt || "Choose one"}>
5210
- ${(e.options || []).map((t, r) => C`
5354
+ ${(e.options || []).map((t, r) => x`
5211
5355
  <button type="button" class="chip" style="animation-delay: ${60 + r * 50}ms"
5212
- @click=${() => this.#y({
5356
+ @click=${() => this.#p({
5213
5357
  nodeId: e.id,
5214
5358
  kind: "choice",
5215
5359
  optionId: t.id,
@@ -5219,61 +5363,61 @@ class $o extends se {
5219
5363
  </div>
5220
5364
  `;
5221
5365
  }
5222
- #z(e) {
5366
+ #ee(e) {
5223
5367
  const t = e.fields || [];
5224
- return C`
5225
- ${z(e.prompt, e.help)}
5368
+ return x`
5369
+ ${V(e.prompt, e.help)}
5226
5370
  <div class="form-card">
5227
- ${t.map((r) => this.#W(e, r))}
5228
- <button type="button" class="btn-primary" @click=${() => this.#$(e)}>
5371
+ ${t.map((r) => this.#te(e, r))}
5372
+ <button type="button" class="btn-primary" @click=${() => this.#M(e)}>
5229
5373
  Continue
5230
5374
  </button>
5231
5375
  </div>
5232
5376
  `;
5233
5377
  }
5234
- #W(e, t) {
5235
- const r = this._cardValues[t.key], i = this._fieldErrors[t.key], s = !t.required && t.kind !== "consent" ? C` <span class="opt">optional</span>` : T, o = t.kind === "consent" ? T : C`
5378
+ #te(e, t) {
5379
+ const r = this._cardValues[t.key], i = this._fieldErrors[t.key], s = !t.required && t.kind !== "consent" ? x` <span class="opt">optional</span>` : U, o = t.kind === "consent" ? U : x`
5236
5380
  <label for="f-${t.key}">${t.label}${s}</label>
5237
5381
  `;
5238
- return C`
5382
+ return x`
5239
5383
  <div class="field">
5240
5384
  ${o}
5241
- ${this.#Y(e, t, r)}
5242
- ${i ? C`<div class="err" role="alert">${i}</div>` : T}
5385
+ ${this.#re(e, t, r)}
5386
+ ${i ? x`<div class="err" role="alert">${i}</div>` : U}
5243
5387
  </div>
5244
5388
  `;
5245
5389
  }
5246
- #Y(e, t, r) {
5247
- const i = (s) => (o) => this.#S(s, o.target.value);
5390
+ #re(e, t, r) {
5391
+ const i = (s) => (o) => this.#_(s, o.target.value);
5248
5392
  switch (t.kind) {
5249
5393
  case "text":
5250
- return C`<input type="text" id="f-${t.key}" .value=${r || ""}
5394
+ return x`<input type="text" id="f-${t.key}" .value=${r || ""}
5251
5395
  placeholder=${t.placeholder || ""} @input=${i(t.key)}>`;
5252
5396
  case "url":
5253
- return C`<input type="url" id="f-${t.key}" .value=${r || ""}
5397
+ return x`<input type="url" id="f-${t.key}" .value=${r || ""}
5254
5398
  placeholder=${t.placeholder || ""} @input=${i(t.key)}>`;
5255
5399
  case "textarea":
5256
- return C`<textarea id="f-${t.key}" .value=${r || ""}
5400
+ return x`<textarea id="f-${t.key}" .value=${r || ""}
5257
5401
  placeholder=${t.placeholder || ""} @input=${i(t.key)}></textarea>`;
5258
5402
  case "datetime":
5259
- return C`<input type="datetime-local" id="f-${t.key}" .value=${r || ""}
5403
+ return x`<input type="datetime-local" id="f-${t.key}" .value=${r || ""}
5260
5404
  @input=${i(t.key)}>`;
5261
5405
  case "select":
5262
- return C`
5406
+ return x`
5263
5407
  <select id="f-${t.key}" @change=${i(t.key)}>
5264
5408
  <option value="">Choose one</option>
5265
- ${(t.options || []).map((s) => C`
5409
+ ${(t.options || []).map((s) => x`
5266
5410
  <option value=${s.id} ?selected=${r === s.id}>${s.label}</option>
5267
5411
  `)}
5268
5412
  </select>
5269
5413
  `;
5270
5414
  case "location":
5271
- return this.#G(t, r || {});
5415
+ return this.#ne(t, r || {});
5272
5416
  case "consent":
5273
- return C`
5417
+ return x`
5274
5418
  <div class="consent-row">
5275
5419
  <input type="checkbox" id="f-${t.key}" .checked=${r === !0}
5276
- @change=${(s) => this.#S(t.key, s.target.checked)}>
5420
+ @change=${(s) => this.#_(t.key, s.target.checked)}>
5277
5421
  <label for="f-${t.key}" style="all: unset; cursor: pointer;">
5278
5422
  I took or own this material and give WRAL permission to use it
5279
5423
  on air and online with credit to me.
@@ -5281,7 +5425,7 @@ class $o extends se {
5281
5425
  </div>
5282
5426
  `;
5283
5427
  case "media":
5284
- return C`
5428
+ return x`
5285
5429
  <wral-report-media
5286
5430
  .files=${this.#r[e.id] || []}
5287
5431
  .lostMeta=${this.#n[e.id] || []}
@@ -5293,16 +5437,16 @@ class $o extends se {
5293
5437
  }}></wral-report-media>
5294
5438
  `;
5295
5439
  default:
5296
- return T;
5440
+ return U;
5297
5441
  }
5298
5442
  }
5299
- #G(e, t) {
5300
- const r = e.counties || Io, i = (s) => this.#S(e.key, { ...t, ...s });
5301
- return C`
5443
+ #ne(e, t) {
5444
+ const r = e.counties || ko, i = (s) => this.#_(e.key, { ...t, ...s });
5445
+ return x`
5302
5446
  <select id="f-${e.key}" aria-label="County"
5303
5447
  @change=${(s) => i({ county: s.target.value || void 0 })}>
5304
5448
  <option value="">Choose a county</option>
5305
- ${r.map((s) => C`
5449
+ ${r.map((s) => x`
5306
5450
  <option value=${s} ?selected=${t.county === s}>${s}</option>
5307
5451
  `)}
5308
5452
  </select>
@@ -5313,24 +5457,24 @@ class $o extends se {
5313
5457
  @input=${(s) => i({ where: s.target.value || void 0 })}>
5314
5458
  `;
5315
5459
  }
5316
- #T(e) {
5317
- this.#C();
5318
- const t = this._gate, r = z(
5460
+ #k(e) {
5461
+ this.#E();
5462
+ const t = this._gate, r = V(
5319
5463
  "Last step: verify your email so we can follow up.",
5320
5464
  "One address, one code. No password needed."
5321
5465
  );
5322
- return t.stage ? t.stage === "signedin" ? C`
5466
+ return t.stage ? t.stage === "signedin" ? x`
5323
5467
  ${r}
5324
5468
  <div class="form-card">
5325
5469
  <p style="margin: 0 0 12px; font-size: 14.5px;">
5326
5470
  You are signed in as <strong>${t.email || "your My WRAL account"}</strong> on this device.
5327
5471
  </p>
5328
5472
  <button type="button" class="btn-primary"
5329
- @click=${() => this.#E(t.email)}>Continue</button>
5473
+ @click=${() => this.#T(t.email)}>Continue</button>
5330
5474
  <button type="button" class="btn-ghost"
5331
- @click=${() => this.#P()}>Use a different email</button>
5475
+ @click=${() => this.#O()}>Use a different email</button>
5332
5476
  </div>
5333
- ` : t.stage === "email" ? C`
5477
+ ` : t.stage === "email" ? x`
5334
5478
  ${r}
5335
5479
  <div class="form-card login-card">
5336
5480
  <h2>Sign in or create account</h2>
@@ -5345,12 +5489,12 @@ class $o extends se {
5345
5489
  this._gate = { ...t, email: i.target.value };
5346
5490
  }}
5347
5491
  @keydown=${(i) => {
5348
- i.key === "Enter" && this.#b();
5492
+ i.key === "Enter" && this.#A();
5349
5493
  }}>
5350
5494
  </div>
5351
- ${t.error ? C`<div class="err" role="alert">${t.error}</div>` : T}
5495
+ ${t.error ? x`<div class="err" role="alert">${t.error}</div>` : U}
5352
5496
  <button type="button" class="login-btn" ?disabled=${t.loading}
5353
- @click=${() => this.#b()}>
5497
+ @click=${() => this.#A()}>
5354
5498
  ${t.loading ? "Sending…" : "Continue with email"}
5355
5499
  </button>
5356
5500
  <div class="login-why">
@@ -5359,10 +5503,12 @@ class $o extends se {
5359
5503
  <li>We can follow up on your report</li>
5360
5504
  <li>Your contact information fills in automatically next time</li>
5361
5505
  <li>You are credited by name when we use your photos or video</li>
5506
+ <li><a href=${Ro} target="_blank" rel="noopener">All other My WRAL account benefits</a></li>
5362
5507
  </ul>
5363
5508
  </div>
5509
+ ${this._submit.stage === "auth" ? U : this.#ie()}
5364
5510
  </div>
5365
- ` : C`
5511
+ ` : t.stage === "anon-confirm" ? this.#se(r) : x`
5366
5512
  ${r}
5367
5513
  <div class="form-card login-card">
5368
5514
  <h2>Enter verification code</h2>
@@ -5376,27 +5522,71 @@ class $o extends se {
5376
5522
  <div class="field">
5377
5523
  <label>Verification code</label>
5378
5524
  <wral-code-input
5379
- @code-complete=${(i) => this.#x(i.detail?.code ?? i.detail?.value ?? i.target.value)}>
5525
+ @code-complete=${(i) => this.#U(i.detail?.code ?? i.detail?.value ?? i.target.value)}>
5380
5526
  </wral-code-input>
5381
5527
  </div>
5382
- ${t.error ? C`<div class="err" role="alert">${t.error}</div>` : T}
5528
+ ${t.error ? x`<div class="err" role="alert">${t.error}</div>` : U}
5383
5529
  <button type="button" class="login-btn" ?disabled=${t.loading}
5384
5530
  @click=${() => {
5385
5531
  const i = this.renderRoot.querySelector("wral-code-input");
5386
- this.#x(i?.value || "");
5532
+ this.#U(i?.value || "");
5387
5533
  }}>
5388
5534
  ${t.loading ? "Checking…" : "Sign in"}
5389
5535
  </button>
5390
5536
  <p class="login-help">
5391
5537
  Didn’t receive a code? Check your spam folder or
5392
- <button type="button" @click=${() => this.#b()}>resend a new code</button>.
5538
+ <button type="button" @click=${() => this.#A()}>resend a new code</button>.
5393
5539
  </p>
5394
5540
  </div>
5395
- ` : C`${r}${lt()}`;
5541
+ ` : x`${r}${lt()}`;
5542
+ }
5543
+ /* Collapsed by default: findable for whoever needs it, never the
5544
+ * first thing a viewer reaches for. */
5545
+ #ie() {
5546
+ return x`
5547
+ <details class="login-alt">
5548
+ <summary>Other ways to send this</summary>
5549
+ <div class="alt-body">
5550
+ <p class="alt-row">
5551
+ Call the newsroom desk at
5552
+ <a href=${Po(kr)}>${kr}</a>.
5553
+ </p>
5554
+ ${this.#P ? x`
5555
+ <p class="alt-row">
5556
+ <button type="button" class="alt-link"
5557
+ @click=${() => this.#N()}>Send this anonymously</button>
5558
+ — no follow-up, and no credit if we use your photos or video.
5559
+ </p>
5560
+ ` : U}
5561
+ </div>
5562
+ </details>
5563
+ `;
5396
5564
  }
5397
- #J(e) {
5565
+ #se(e) {
5566
+ return x`
5567
+ ${e}
5568
+ <div class="form-card login-card">
5569
+ <h2>Before you send anonymously</h2>
5570
+ <p class="login-sub">
5571
+ You can send this report without an account. Here is what it costs you.
5572
+ </p>
5573
+ <ul class="anon-costs">
5574
+ ${$o.map((t) => x`
5575
+ <li><span class="x" aria-hidden="true">✕</span><span>${t}</span></li>
5576
+ `)}
5577
+ </ul>
5578
+ <div class="anon-actions">
5579
+ <button type="button" class="login-btn"
5580
+ @click=${() => this.#q()}>Sign in instead</button>
5581
+ <button type="button" class="btn-ghost"
5582
+ @click=${() => this.#L()}>Continue anonymously</button>
5583
+ </div>
5584
+ </div>
5585
+ `;
5586
+ }
5587
+ #oe(e) {
5398
5588
  const t = e.redirect || {};
5399
- return C`
5589
+ return x`
5400
5590
  <div class="form-card">
5401
5591
  <p style="margin: 0 0 6px; font-weight: 600; font-size: 16px;
5402
5592
  color: var(--wral-base-primary-1, #001D68);
@@ -5413,30 +5603,33 @@ class $o extends se {
5413
5603
  </div>
5414
5604
  `;
5415
5605
  }
5416
- #I() {
5417
- const e = wo(this._form, this._steps);
5418
- return C`
5419
- ${z("Here is what you are sending.", "Check it over, then submit.")}
5606
+ #R() {
5607
+ const e = So(this._form, this._steps);
5608
+ return x`
5609
+ ${V("Here is what you are sending.", "Check it over, then submit.")}
5420
5610
  <div class="form-card">
5421
5611
  <ul class="review-list">
5422
- ${e.map((t) => C`
5612
+ ${e.map((t) => x`
5423
5613
  <li>
5424
5614
  <span class="k">${t.k}</span>
5425
- <span>${t.pill ? zs(t.pill) : t.v}</span>
5615
+ <span>${t.pill ? Gs(t.pill) : t.v}</span>
5426
5616
  </li>
5427
5617
  `)}
5428
5618
  </ul>
5619
+ ${this._banner ? x`
5620
+ <div class="err" role="alert" style="margin-top: 12px;">${this._banner.message}</div>
5621
+ ` : U}
5429
5622
  <div style="margin-top: 16px;">
5430
- <button type="button" class="btn-primary" @click=${() => this.#F()}>
5623
+ <button type="button" class="btn-primary" @click=${() => this.#j()}>
5431
5624
  Submit report
5432
5625
  </button>
5433
5626
  </div>
5434
5627
  </div>
5435
5628
  `;
5436
5629
  }
5437
- #Z() {
5630
+ #ae() {
5438
5631
  const e = this._submit;
5439
- if (e.stage === "auth") return this.#T({ id: null, type: "gate" });
5632
+ if (e.stage === "auth") return this.#k({ id: null, type: "gate" });
5440
5633
  const t = {
5441
5634
  minting: "Preparing your uploads…",
5442
5635
  uploading: "Uploading your files…",
@@ -5444,10 +5637,10 @@ class $o extends se {
5444
5637
  requesting: "Sending your report…",
5445
5638
  "requesting-error": this._banner?.message || "We could not send your report."
5446
5639
  }[e.stage] || "Working…";
5447
- return C`
5448
- ${z("Submitting your report.", t)}
5640
+ return x`
5641
+ ${V("Submitting your report.", t)}
5449
5642
  <div class="form-card">
5450
- ${e.files.map((r, i) => C`
5643
+ ${e.files.map((r, i) => x`
5451
5644
  <div class="upload-row">
5452
5645
  <span class="name">${r.name}</span>
5453
5646
  <div class="upload-bar" role="progressbar"
@@ -5458,62 +5651,63 @@ class $o extends se {
5458
5651
  <span class="state ${r.status === "failed" ? "failed" : ""}">
5459
5652
  ${r.status === "done" ? "Done" : r.status === "failed" ? "Failed" : "Uploading"}
5460
5653
  </span>
5461
- ${r.status === "failed" ? C`
5462
- <button type="button" class="retry-chip" @click=${() => this.#O(i)}>
5654
+ ${r.status === "failed" ? x`
5655
+ <button type="button" class="retry-chip" @click=${() => this.#z(i)}>
5463
5656
  Retry
5464
5657
  </button>
5465
- ` : T}
5658
+ ` : U}
5466
5659
  </div>
5467
5660
  `)}
5468
- ${e.stage === "requesting-error" ? C`
5661
+ ${e.stage === "requesting-error" ? x`
5469
5662
  <div class="err" role="alert">${this._banner?.message || ""}</div>
5470
- ${this._banner?.retryAfter ? C`
5663
+ ${this._banner?.retryAfter ? x`
5471
5664
  <div class="file-note">You can try again in about
5472
5665
  ${Math.ceil(this._banner.retryAfter / 60)} minutes.</div>
5473
- ` : T}
5666
+ ` : U}
5474
5667
  <button type="button" class="btn-primary" style="margin-top: 8px;"
5475
- @click=${() => this.#L()}>Try again</button>
5476
- ` : T}
5477
- ${Tr(e).length && e.stage === "uploading-error" ? C`
5668
+ @click=${() => this.#G()}>Try again</button>
5669
+ ` : U}
5670
+ ${Dr(e).length && e.stage === "uploading-error" ? x`
5478
5671
  <div class="err" role="alert">Retry the failed
5479
- ${Tr(e).length === 1 ? "file" : "files"} to continue.</div>
5480
- ` : T}
5672
+ ${Dr(e).length === 1 ? "file" : "files"} to continue.</div>
5673
+ ` : U}
5481
5674
  </div>
5482
5675
  `;
5483
5676
  }
5484
- #X() {
5485
- const e = Gr(this._form, this._steps), t = So(this._result, e), r = _o({
5677
+ #ue() {
5678
+ const e = Xr(this._form, this._steps), t = _o(this._result, e), r = xo({
5486
5679
  routing: this._result?.routing || {},
5487
5680
  flags: e,
5488
- reference: this._result?.reference || ""
5681
+ reference: this._result?.reference || "",
5682
+ anonymous: this.#d
5489
5683
  });
5490
- return C`
5684
+ return x`
5491
5685
  <div class="confirm-card">
5492
5686
  <div class="c-head">
5493
- <div class="c-check">${Ws()}</div>
5687
+ <div class="c-check">${Js()}</div>
5494
5688
  <div>
5495
5689
  <div class="eyebrow">Report received</div>
5496
5690
  <h2>${t.title}</h2>
5497
5691
  </div>
5498
5692
  </div>
5499
5693
  <p>${t.body}</p>
5500
- ${t.urgentNote ? C`<p>${t.urgentNote}</p>` : T}
5694
+ ${t.urgentNote ? x`<p>${t.urgentNote}</p>` : U}
5501
5695
  <div class="refs">
5502
5696
  <span class="ref"><span class="rk">Reference</span>${this._result?.reference || ""}</span>
5503
5697
  </div>
5504
- <button type="button" class="c-again" @click=${() => this.#w()}>
5698
+ <button type="button" class="c-again" @click=${() => this.#S()}>
5505
5699
  Start a new report
5506
5700
  </button>
5507
5701
  </div>
5508
5702
  <div class="journey">
5509
5703
  <div class="j-eyebrow">Behind the scenes</div>
5510
5704
  <div class="j-title">What happens to your report now</div>
5511
- ${r.map((i, s) => C`
5705
+ ${r.map((i, s) => x`
5512
5706
  <div class="j-step">
5513
5707
  <div class="j-dot">${s + 1}</div>
5514
5708
  <div class="j-body">
5515
5709
  <div class="j-t">${i.title}
5516
- ${i.pill ? C` <span class="flag-pill urgent">${i.pill}</span>` : T}
5710
+ ${i.pill ? x` <span class="flag-pill urgent">${i.pill}</span>` : U}
5517
5711
  </div>
5518
5712
  <div class="j-d">${i.body}</div>
5519
5713
  </div>
@@ -5522,15 +5716,15 @@ class $o extends se {
5522
5716
  </div>
5523
5717
  `;
5524
5718
  }
5525
- #Q() {
5719
+ #le() {
5526
5720
  const e = this._phase === "submitting" || this._phase === "done" || this._phase === "loading" || this._phase === "load-error";
5527
- return C`
5721
+ return x`
5528
5722
  <div class="bottom-bar">
5529
5723
  <div class="inner">
5530
5724
  <button type="button" class="btn-ghost" ?disabled=${e || this._phase === "pick"}
5531
- @click=${() => this.#k()}>← Back</button>
5725
+ @click=${() => this.#B()}>← Back</button>
5532
5726
  <button type="button" class="btn-ghost" ?disabled=${this._phase === "submitting"}
5533
- @click=${() => this.#w()}>Start over</button>
5727
+ @click=${() => this.#S()}>Start over</button>
5534
5728
  <span class="note">Your report goes to a person on the right desk.</span>
5535
5729
  </div>
5536
5730
  </div>
@@ -5540,7 +5734,7 @@ class $o extends se {
5540
5734
  this.renderRoot?.querySelector(".chat")?.lastElementChild?.scrollIntoView?.({ block: "nearest" });
5541
5735
  }
5542
5736
  }
5543
- class Po extends se {
5737
+ class No extends se {
5544
5738
  static properties = {
5545
5739
  files: { attribute: !1 },
5546
5740
  lostMeta: { attribute: !1 },
@@ -5548,7 +5742,7 @@ class Po extends se {
5548
5742
  required: { type: Boolean },
5549
5743
  label: { type: String }
5550
5744
  };
5551
- static styles = H`
5745
+ static styles = z`
5552
5746
  :host { display: block; }
5553
5747
  input[type=file] { font-family: inherit; font-size: 14px; }
5554
5748
  .file-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
@@ -5570,10 +5764,10 @@ class Po extends se {
5570
5764
  constructor() {
5571
5765
  super(), this.files = [], this.lostMeta = [], this.budget = {}, this.required = !1, this.label = "Photos or video";
5572
5766
  }
5573
- get #a() {
5767
+ get #u() {
5574
5768
  return (this.budget?.allowedTypes || []).join(",");
5575
5769
  }
5576
- #s(e) {
5770
+ #o(e) {
5577
5771
  this.dispatchEvent(new CustomEvent("files-changed", {
5578
5772
  detail: { files: e },
5579
5773
  bubbles: !0,
@@ -5582,52 +5776,52 @@ class Po extends se {
5582
5776
  }
5583
5777
  #h(e) {
5584
5778
  const t = [...e.target.files || []];
5585
- this.#s([...this.files || [], ...t]), e.target.value = "";
5779
+ this.#o([...this.files || [], ...t]), e.target.value = "";
5586
5780
  }
5587
5781
  #t(e) {
5588
5782
  const t = [...this.files];
5589
- t.splice(e, 1), this.#s(t);
5783
+ t.splice(e, 1), this.#o(t);
5590
5784
  }
5591
5785
  render() {
5592
5786
  const e = this.files || [], { errors: t } = Et(e, this.budget, { required: !1 });
5593
- return C`
5787
+ return x`
5594
5788
  <input type="file" multiple
5595
- accept=${this.#a || T}
5789
+ accept=${this.#u || U}
5596
5790
  aria-label=${this.label}
5597
5791
  @change=${this.#h}>
5598
- ${e.length ? C`
5792
+ ${e.length ? x`
5599
5793
  <ul class="file-list">
5600
- ${e.map((r, i) => C`
5794
+ ${e.map((r, i) => x`
5601
5795
  <li>
5602
5796
  <span>${r.name}</span>
5603
- <span class="size">${Fo(r.size)}</span>
5797
+ <span class="size">${qo(r.size)}</span>
5604
5798
  <button type="button" class="remove"
5605
5799
  aria-label="Remove ${r.name}"
5606
5800
  @click=${() => this.#t(i)}>✕</button>
5607
5801
  </li>
5608
5802
  `)}
5609
5803
  </ul>
5610
- ` : T}
5611
- ${(this.lostMeta || []).length ? C`
5804
+ ` : U}
5805
+ ${(this.lostMeta || []).length ? x`
5612
5806
  <div class="lost">
5613
5807
  Please re-attach your ${this.lostMeta.length === 1 ? "file" : "files"}
5614
5808
  (${this.lostMeta.map((r) => r.name).join(", ")}) —
5615
5809
  attachments can't be saved between visits.
5616
5810
  </div>
5617
- ` : T}
5618
- ${t.map((r) => C`<div class="err">${r.message}</div>`)}
5811
+ ` : U}
5812
+ ${t.map((r) => x`<div class="err">${r.message}</div>`)}
5619
5813
  `;
5620
5814
  }
5621
5815
  }
5622
- function Fo(n) {
5816
+ function qo(n) {
5623
5817
  return Number.isFinite(n) ? n >= 1024 * 1024 ? `${(n / (1024 * 1024)).toFixed(1)} MB` : n >= 1024 ? `${Math.round(n / 1024)} KB` : `${n} B` : "";
5624
5818
  }
5625
- const Bo = (n, e, t, r) => {
5819
+ const Lo = (n, e, t, r) => {
5626
5820
  const i = e.target.value.replace(/\D/g, "").slice(-1), s = [...t];
5627
5821
  s[n] = i;
5628
5822
  const o = s.join(""), l = s.every((h) => h !== "");
5629
5823
  return r("code-change", { value: o, complete: l }), i && l && r("code-complete", { value: o }), s;
5630
- }, Mo = (n, e, t, r) => {
5824
+ }, Ko = (n, e, t, r) => {
5631
5825
  if (e.key === "Backspace") {
5632
5826
  const i = [...t];
5633
5827
  !i[n] && n > 0 ? i[n - 1] = "" : i[n] && (i[n] = "");
@@ -5635,7 +5829,7 @@ const Bo = (n, e, t, r) => {
5635
5829
  return r("code-change", { value: s, complete: !1 }), i;
5636
5830
  }
5637
5831
  return t;
5638
- }, Oo = (n, e, t) => {
5832
+ }, jo = (n, e, t) => {
5639
5833
  n.preventDefault();
5640
5834
  const r = n.clipboardData.getData("text").replace(/\D/g, "").slice(0, 6);
5641
5835
  if (r.length === 0) return e;
@@ -5645,13 +5839,13 @@ const Bo = (n, e, t, r) => {
5645
5839
  const s = i.join(""), o = i.every((l) => l !== "");
5646
5840
  return t("code-change", { value: s, complete: o }), r.length === 6 && t("code-complete", { value: s }), i;
5647
5841
  };
5648
- class No extends se {
5842
+ class Vo extends se {
5649
5843
  static formAssociated = !0;
5650
5844
  static properties = {
5651
5845
  _values: { type: Array, state: !0 },
5652
5846
  disabled: { type: Boolean, reflect: !0 }
5653
5847
  };
5654
- static styles = H`
5848
+ static styles = z`
5655
5849
  :host {
5656
5850
  display: block;
5657
5851
  width: 100%;
@@ -5750,7 +5944,7 @@ class No extends se {
5750
5944
  this.getInputs()[e]?.focus();
5751
5945
  }
5752
5946
  inputHandler(e, t) {
5753
- this._values = Bo(
5947
+ this._values = Lo(
5754
5948
  e,
5755
5949
  t,
5756
5950
  this._values,
@@ -5760,7 +5954,7 @@ class No extends se {
5760
5954
  keydownHandler(e, t) {
5761
5955
  if (t.key === "Backspace") {
5762
5956
  const r = !this._values[e];
5763
- this._values = Mo(
5957
+ this._values = Ko(
5764
5958
  e,
5765
5959
  t,
5766
5960
  this._values,
@@ -5769,12 +5963,12 @@ class No extends se {
5769
5963
  }
5770
5964
  }
5771
5965
  pasteHandler(e) {
5772
- this._values = Oo(e, this._values, this.dispatchCustomEvent.bind(this));
5966
+ this._values = jo(e, this._values, this.dispatchCustomEvent.bind(this));
5773
5967
  }
5774
5968
  render() {
5775
- return C`
5969
+ return x`
5776
5970
  <div class="code-inputs">
5777
- ${[0, 1, 2, 3, 4, 5].map((e) => C`
5971
+ ${[0, 1, 2, 3, 4, 5].map((e) => x`
5778
5972
  <input
5779
5973
  type = "text"
5780
5974
  inputmode = "numeric"
@@ -5793,19 +5987,19 @@ class No extends se {
5793
5987
  `;
5794
5988
  }
5795
5989
  }
5796
- typeof window < "u" && !window.AmazonCognitoIdentity && (window.AmazonCognitoIdentity = hs);
5797
- const qo = {
5798
- "wral-report-it": $o,
5799
- "wral-report-media": Po,
5800
- "wral-code-input": No
5990
+ typeof window < "u" && !window.AmazonCognitoIdentity && (window.AmazonCognitoIdentity = ps);
5991
+ const Ho = {
5992
+ "wral-report-it": Oo,
5993
+ "wral-report-media": No,
5994
+ "wral-code-input": Vo
5801
5995
  };
5802
- function Lo() {
5996
+ function zo() {
5803
5997
  const n = globalThis?.customElements;
5804
5998
  if (n)
5805
- for (const [e, t] of Object.entries(qo))
5999
+ for (const [e, t] of Object.entries(Ho))
5806
6000
  n.get(e) || n.define(e, t);
5807
6001
  }
5808
- typeof window < "u" && globalThis.customElements && Lo();
6002
+ typeof window < "u" && globalThis.customElements && zo();
5809
6003
  export {
5810
- Lo as defineAll
6004
+ zo as defineAll
5811
6005
  };