@getauthui/core 0.1.10 → 0.1.12

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.
@@ -35,7 +35,7 @@ const cn = (t) => new Qi(typeof t == "string" ? t : t + "", void 0, fi), Ge = (t
35
35
  for (const i of e.cssRules) n += i.cssText;
36
36
  return cn(n);
37
37
  })(t) : t;
38
- const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnPropertyNames: hn, getOwnPropertySymbols: fn, getPrototypeOf: gn } = Object, Rt = globalThis, ji = Rt.trustedTypes, yn = ji ? ji.emptyScript : "", mn = Rt.reactiveElementPolyfillSupport, ut = (t, e) => t, xt = { toAttribute(t, e) {
38
+ const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnPropertyNames: hn, getOwnPropertySymbols: fn, getPrototypeOf: gn } = Object, Mt = globalThis, ji = Mt.trustedTypes, yn = ji ? ji.emptyScript : "", mn = Mt.reactiveElementPolyfillSupport, ut = (t, e) => t, Pt = { toAttribute(t, e) {
39
39
  switch (e) {
40
40
  case Boolean:
41
41
  t = t ? yn : null;
@@ -63,8 +63,8 @@ const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnProperty
63
63
  }
64
64
  }
65
65
  return n;
66
- } }, gi = (t, e) => !ln(t, e), xi = { attribute: !0, type: String, converter: xt, reflect: !1, useDefault: !1, hasChanged: gi };
67
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Rt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
66
+ } }, gi = (t, e) => !ln(t, e), Pi = { attribute: !0, type: String, converter: Pt, reflect: !1, useDefault: !1, hasChanged: gi };
67
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Mt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
68
  let et = class extends HTMLElement {
69
69
  static addInitializer(e) {
70
70
  this._$Ei(), (this.l ??= []).push(e);
@@ -72,7 +72,7 @@ let et = class extends HTMLElement {
72
72
  static get observedAttributes() {
73
73
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
74
74
  }
75
- static createProperty(e, n = xi) {
75
+ static createProperty(e, n = Pi) {
76
76
  if (n.state && (n.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((n = Object.create(n)).wrapped = !0), this.elementProperties.set(e, n), !n.noAccessor) {
77
77
  const i = /* @__PURE__ */ Symbol(), o = this.getPropertyDescriptor(e, i, n);
78
78
  o !== void 0 && un(this.prototype, e, o);
@@ -90,7 +90,7 @@ let et = class extends HTMLElement {
90
90
  }, configurable: !0, enumerable: !0 };
91
91
  }
92
92
  static getPropertyOptions(e) {
93
- return this.elementProperties.get(e) ?? xi;
93
+ return this.elementProperties.get(e) ?? Pi;
94
94
  }
95
95
  static _$Ei() {
96
96
  if (this.hasOwnProperty(ut("elementProperties"))) return;
@@ -162,14 +162,14 @@ let et = class extends HTMLElement {
162
162
  _$ET(e, n) {
163
163
  const i = this.constructor.elementProperties.get(e), o = this.constructor._$Eu(e, i);
164
164
  if (o !== void 0 && i.reflect === !0) {
165
- const a = (i.converter?.toAttribute !== void 0 ? i.converter : xt).toAttribute(n, i.type);
165
+ const a = (i.converter?.toAttribute !== void 0 ? i.converter : Pt).toAttribute(n, i.type);
166
166
  this._$Em = e, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$Em = null;
167
167
  }
168
168
  }
169
169
  _$AK(e, n) {
170
170
  const i = this.constructor, o = i._$Eh.get(e);
171
171
  if (o !== void 0 && this._$Em !== o) {
172
- const a = i.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter : xt;
172
+ const a = i.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter : Pt;
173
173
  this._$Em = o;
174
174
  const r = s.fromAttribute(n, a.type);
175
175
  this[o] = r ?? this._$Ej?.get(o) ?? r, this._$Em = null;
@@ -246,23 +246,23 @@ let et = class extends HTMLElement {
246
246
  firstUpdated(e) {
247
247
  }
248
248
  };
249
- et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[ut("elementProperties")] = /* @__PURE__ */ new Map(), et[ut("finalized")] = /* @__PURE__ */ new Map(), mn?.({ ReactiveElement: et }), (Rt.reactiveElementVersions ??= []).push("2.1.2");
250
- const yi = globalThis, Pi = (t) => t, Pt = yi.trustedTypes, Ci = Pt ? Pt.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ti = "$lit$", Ve = `lit$${Math.random().toFixed(9).slice(2)}$`, zi = "?" + Ve, bn = `<${zi}>`, Te = document, ft = () => Te.createComment(""), gt = (t) => t === null || typeof t != "object" && typeof t != "function", mi = Array.isArray, wn = (t) => mi(t) || typeof t?.[Symbol.iterator] == "function", Wt = `[
251
- \f\r]`, ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ui = /-->/g, Mi = />/g, Je = RegExp(`>|${Wt}(?:([^\\s"'>=/]+)(${Wt}*=${Wt}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Ri = /'/g, Ei = /"/g, Oi = /^(?:script|style|textarea|title)$/i, Fi = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), w = Fi(1), G = Fi(2), it = /* @__PURE__ */ Symbol.for("lit-noChange"), C = /* @__PURE__ */ Symbol.for("lit-nothing"), qi = /* @__PURE__ */ new WeakMap(), Ze = Te.createTreeWalker(Te, 129);
249
+ et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[ut("elementProperties")] = /* @__PURE__ */ new Map(), et[ut("finalized")] = /* @__PURE__ */ new Map(), mn?.({ ReactiveElement: et }), (Mt.reactiveElementVersions ??= []).push("2.1.2");
250
+ const yi = globalThis, xi = (t) => t, xt = yi.trustedTypes, Ci = xt ? xt.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ti = "$lit$", Ve = `lit$${Math.random().toFixed(9).slice(2)}$`, zi = "?" + Ve, wn = `<${zi}>`, Te = document, ft = () => Te.createComment(""), gt = (t) => t === null || typeof t != "object" && typeof t != "function", mi = Array.isArray, bn = (t) => mi(t) || typeof t?.[Symbol.iterator] == "function", Wt = `[
251
+ \f\r]`, dt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ui = /-->/g, Ri = />/g, Je = RegExp(`>|${Wt}(?:([^\\s"'>=/]+)(${Wt}*=${Wt}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Mi = /'/g, Ei = /"/g, Oi = /^(?:script|style|textarea|title)$/i, Fi = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), b = Fi(1), G = Fi(2), nt = /* @__PURE__ */ Symbol.for("lit-noChange"), C = /* @__PURE__ */ Symbol.for("lit-nothing"), qi = /* @__PURE__ */ new WeakMap(), Ze = Te.createTreeWalker(Te, 129);
253
253
  function en(t, e) {
254
254
  if (!mi(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
255
  return Ci !== void 0 ? Ci.createHTML(e) : e;
256
256
  }
257
257
  const vn = (t, e) => {
258
258
  const n = t.length - 1, i = [];
259
- let o, a = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = ct;
259
+ let o, a = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = dt;
260
260
  for (let r = 0; r < n; r++) {
261
261
  const d = t[r];
262
262
  let c, p, u = -1, m = 0;
263
- for (; m < d.length && (s.lastIndex = m, p = s.exec(d), p !== null); ) m = s.lastIndex, s === ct ? p[1] === "!--" ? s = Ui : p[1] !== void 0 ? s = Mi : p[2] !== void 0 ? (Oi.test(p[2]) && (o = RegExp("</" + p[2], "g")), s = Je) : p[3] !== void 0 && (s = Je) : s === Je ? p[0] === ">" ? (s = o ?? ct, u = -1) : p[1] === void 0 ? u = -2 : (u = s.lastIndex - p[2].length, c = p[1], s = p[3] === void 0 ? Je : p[3] === '"' ? Ei : Ri) : s === Ei || s === Ri ? s = Je : s === Ui || s === Mi ? s = ct : (s = Je, o = void 0);
263
+ for (; m < d.length && (s.lastIndex = m, p = s.exec(d), p !== null); ) m = s.lastIndex, s === dt ? p[1] === "!--" ? s = Ui : p[1] !== void 0 ? s = Ri : p[2] !== void 0 ? (Oi.test(p[2]) && (o = RegExp("</" + p[2], "g")), s = Je) : p[3] !== void 0 && (s = Je) : s === Je ? p[0] === ">" ? (s = o ?? dt, u = -1) : p[1] === void 0 ? u = -2 : (u = s.lastIndex - p[2].length, c = p[1], s = p[3] === void 0 ? Je : p[3] === '"' ? Ei : Mi) : s === Ei || s === Mi ? s = Je : s === Ui || s === Ri ? s = dt : (s = Je, o = void 0);
264
264
  const $ = s === Je && t[r + 1].startsWith("/>") ? " " : "";
265
- a += s === ct ? d + bn : u >= 0 ? (i.push(c), d.slice(0, u) + Ti + d.slice(u) + Ve + $) : d + Ve + (u === -2 ? r : $);
265
+ a += s === dt ? d + wn : u >= 0 ? (i.push(c), d.slice(0, u) + Ti + d.slice(u) + Ve + $) : d + Ve + (u === -2 ? r : $);
266
266
  }
267
267
  return [en(t, a + (t[n] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
268
268
  };
@@ -285,7 +285,7 @@ class yt {
285
285
  if (Oi.test(o.tagName)) {
286
286
  const u = o.textContent.split(Ve), m = u.length - 1;
287
287
  if (m > 0) {
288
- o.textContent = Pt ? Pt.emptyScript : "";
288
+ o.textContent = xt ? xt.emptyScript : "";
289
289
  for (let $ = 0; $ < m; $++) o.append(u[$], ft()), Ze.nextNode(), d.push({ type: 2, index: ++a });
290
290
  o.append(u[m], ft());
291
291
  }
@@ -303,11 +303,11 @@ class yt {
303
303
  return i.innerHTML = e, i;
304
304
  }
305
305
  }
306
- function nt(t, e, n = t, i) {
307
- if (e === it) return e;
306
+ function ot(t, e, n = t, i) {
307
+ if (e === nt) return e;
308
308
  let o = i !== void 0 ? n._$Co?.[i] : n._$Cl;
309
309
  const a = gt(e) ? void 0 : e._$litDirective$;
310
- return o?.constructor !== a && (o?._$AO?.(!1), a === void 0 ? o = void 0 : (o = new a(t), o._$AT(t, n, i)), i !== void 0 ? (n._$Co ??= [])[i] = o : n._$Cl = o), o !== void 0 && (e = nt(t, o._$AS(t, e.values), o, i)), e;
310
+ return o?.constructor !== a && (o?._$AO?.(!1), a === void 0 ? o = void 0 : (o = new a(t), o._$AT(t, n, i)), i !== void 0 ? (n._$Co ??= [])[i] = o : n._$Cl = o), o !== void 0 && (e = ot(t, o._$AS(t, e.values), o, i)), e;
311
311
  }
312
312
  class In {
313
313
  constructor(e, n) {
@@ -356,7 +356,7 @@ class vt {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(e, n = this) {
359
- e = nt(this, e, n), gt(e) ? e === C || e == null || e === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : e !== this._$AH && e !== it && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : wn(e) ? this.k(e) : this._(e);
359
+ e = ot(this, e, n), gt(e) ? e === C || e == null || e === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : e !== this._$AH && e !== nt && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : bn(e) ? this.k(e) : this._(e);
360
360
  }
361
361
  O(e) {
362
362
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -388,8 +388,8 @@ class vt {
388
388
  }
389
389
  _$AR(e = this._$AA.nextSibling, n) {
390
390
  for (this._$AP?.(!1, !0, n); e !== this._$AB; ) {
391
- const i = Pi(e).nextSibling;
392
- Pi(e).remove(), e = i;
391
+ const i = xi(e).nextSibling;
392
+ xi(e).remove(), e = i;
393
393
  }
394
394
  }
395
395
  setConnected(e) {
@@ -409,11 +409,11 @@ class Et {
409
409
  _$AI(e, n = this, i, o) {
410
410
  const a = this.strings;
411
411
  let s = !1;
412
- if (a === void 0) e = nt(this, e, n, 0), s = !gt(e) || e !== this._$AH && e !== it, s && (this._$AH = e);
412
+ if (a === void 0) e = ot(this, e, n, 0), s = !gt(e) || e !== this._$AH && e !== nt, s && (this._$AH = e);
413
413
  else {
414
414
  const r = e;
415
415
  let d, c;
416
- for (e = a[0], d = 0; d < a.length - 1; d++) c = nt(this, r[i + d], n, d), c === it && (c = this._$AH[d]), s ||= !gt(c) || c !== this._$AH[d], c === C ? e = C : e !== C && (e += (c ?? "") + a[d + 1]), this._$AH[d] = c;
416
+ for (e = a[0], d = 0; d < a.length - 1; d++) c = ot(this, r[i + d], n, d), c === nt && (c = this._$AH[d]), s ||= !gt(c) || c !== this._$AH[d], c === C ? e = C : e !== C && (e += (c ?? "") + a[d + 1]), this._$AH[d] = c;
417
417
  }
418
418
  s && !o && this.j(e);
419
419
  }
@@ -442,7 +442,7 @@ class Sn extends Et {
442
442
  super(e, n, i, o, a), this.type = 5;
443
443
  }
444
444
  _$AI(e, n = this) {
445
- if ((e = nt(this, e, n, 0) ?? C) === it) return;
445
+ if ((e = ot(this, e, n, 0) ?? C) === nt) return;
446
446
  const i = this._$AH, o = e === C && i !== C || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, a = e !== C && (i === C || o);
447
447
  o && this.element.removeEventListener(this.name, this, i), a && this.element.addEventListener(this.name, this, e), this._$AH = e;
448
448
  }
@@ -458,12 +458,12 @@ class $n {
458
458
  return this._$AM._$AU;
459
459
  }
460
460
  _$AI(e) {
461
- nt(this, e);
461
+ ot(this, e);
462
462
  }
463
463
  }
464
464
  const jn = yi.litHtmlPolyfillSupport;
465
465
  jn?.(yt, vt), (yi.litHtmlVersions ??= []).push("3.3.3");
466
- const xn = (t, e, n) => {
466
+ const Pn = (t, e, n) => {
467
467
  const i = n?.renderBefore ?? e;
468
468
  let o = i._$litPart$;
469
469
  if (o === void 0) {
@@ -472,7 +472,7 @@ const xn = (t, e, n) => {
472
472
  }
473
473
  return o._$AI(t), o;
474
474
  };
475
- const bi = globalThis;
475
+ const wi = globalThis;
476
476
  class Qe extends et {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
@@ -483,7 +483,7 @@ class Qe extends et {
483
483
  }
484
484
  update(e) {
485
485
  const n = this.render();
486
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = xn(n, this.renderRoot, this.renderOptions);
486
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Pn(n, this.renderRoot, this.renderOptions);
487
487
  }
488
488
  connectedCallback() {
489
489
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -492,19 +492,19 @@ class Qe extends et {
492
492
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
493
493
  }
494
494
  render() {
495
- return it;
495
+ return nt;
496
496
  }
497
497
  }
498
- Qe._$litElement$ = !0, Qe.finalized = !0, bi.litElementHydrateSupport?.({ LitElement: Qe });
499
- const Pn = bi.litElementPolyfillSupport;
500
- Pn?.({ LitElement: Qe });
501
- (bi.litElementVersions ??= []).push("4.2.2");
498
+ Qe._$litElement$ = !0, Qe.finalized = !0, wi.litElementHydrateSupport?.({ LitElement: Qe });
499
+ const xn = wi.litElementPolyfillSupport;
500
+ xn?.({ LitElement: Qe });
501
+ (wi.litElementVersions ??= []).push("4.2.2");
502
502
  const ze = (t) => (e, n) => {
503
503
  n !== void 0 ? n.addInitializer(() => {
504
504
  customElements.define(t, e);
505
505
  }) : customElements.define(t, e);
506
506
  };
507
- const Cn = { attribute: !0, type: String, converter: xt, reflect: !1, hasChanged: gi }, Un = (t = Cn, e, n) => {
507
+ const Cn = { attribute: !0, type: String, converter: Pt, reflect: !1, hasChanged: gi }, Un = (t = Cn, e, n) => {
508
508
  const { kind: i, metadata: o } = n;
509
509
  let a = globalThis.litPropertyMetadata.get(o);
510
510
  if (a === void 0 && globalThis.litPropertyMetadata.set(o, a = /* @__PURE__ */ new Map()), i === "setter" && ((t = Object.create(t)).wrapped = !0), a.set(n.name, t), i === "accessor") {
@@ -525,34 +525,34 @@ const Cn = { attribute: !0, type: String, converter: xt, reflect: !1, hasChanged
525
525
  }
526
526
  throw Error("Unsupported decorator location: " + i);
527
527
  };
528
- function O(t) {
528
+ function F(t) {
529
529
  return (e, n) => typeof n == "object" ? Un(t, e, n) : ((i, o, a) => {
530
530
  const s = o.hasOwnProperty(a);
531
531
  return o.constructor.createProperty(a, i), s ? Object.getOwnPropertyDescriptor(o, a) : void 0;
532
532
  })(t, e, n);
533
533
  }
534
- function B(t) {
535
- return O({ ...t, state: !0, attribute: !1 });
534
+ function N(t) {
535
+ return F({ ...t, state: !0, attribute: !1 });
536
536
  }
537
- const Mn = (t, e, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, n), n);
538
- function wi(t, e) {
537
+ const Rn = (t, e, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, n), n);
538
+ function bi(t, e) {
539
539
  return (n, i, o) => {
540
540
  const a = (s) => s.renderRoot?.querySelector(t) ?? null;
541
- return Mn(n, i, { get() {
541
+ return Rn(n, i, { get() {
542
542
  return a(this);
543
543
  } });
544
544
  };
545
545
  }
546
- function Rn(t) {
546
+ function Mn(t) {
547
547
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
548
548
  }
549
- var dt = { exports: {} }, Gt = { exports: {} }, $t = { exports: {} }, En = $t.exports, _i;
549
+ var lt = { exports: {} }, Gt = { exports: {} }, $t = { exports: {} }, En = $t.exports, _i;
550
550
  function tn() {
551
551
  return _i || (_i = 1, (function(t) {
552
552
  (function(e) {
553
553
  var n, i = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, o = Math.ceil, a = Math.floor, s = "[BigNumber Error] ", r = s + "Number primitive has more than 15 significant digits: ", d = 1e14, c = 14, p = 9007199254740991, u = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], m = 1e7, $ = 1e9;
554
554
  function E(H) {
555
- var L, te, V, M = U.prototype = { constructor: U, toString: null, valueOf: null }, Y = new U(1), Q = 20, ie = 4, ce = -7, le = 21, Me = -1e7, ke = 1e7, _e = !1, st = 1, Xe = 0, Nt = {
555
+ var L, te, V, R = U.prototype = { constructor: U, toString: null, valueOf: null }, Y = new U(1), Q = 20, ie = 4, ce = -7, le = 21, Re = -1e7, ke = 1e7, _e = !1, rt = 1, Xe = 0, Nt = {
556
556
  prefix: "",
557
557
  groupSize: 3,
558
558
  secondaryGroupSize: 0,
@@ -562,13 +562,13 @@ function tn() {
562
562
  fractionGroupSeparator: " ",
563
563
  // non-breaking space
564
564
  suffix: ""
565
- }, Ye = "0123456789abcdefghijklmnopqrstuvwxyz", Ht = !0;
565
+ }, Ye = "0123456789abcdefghijklmnopqrstuvwxyz", Dt = !0;
566
566
  function U(l, f) {
567
- var g, k, b, I, j, y, v, S, A = this;
567
+ var g, k, w, I, j, y, v, S, A = this;
568
568
  if (!(A instanceof U)) return new U(l, f);
569
569
  if (f == null) {
570
570
  if (l && l._isBigNumber === !0) {
571
- A.s = l.s, !l.c || l.e > ke ? A.c = A.e = null : l.e < Me ? A.c = [A.e = 0] : (A.e = l.e, A.c = l.c.slice());
571
+ A.s = l.s, !l.c || l.e > ke ? A.c = A.e = null : l.e < Re ? A.c = [A.e = 0] : (A.e = l.e, A.c = l.c.slice());
572
572
  return;
573
573
  }
574
574
  if ((y = typeof l == "number") && l * 0 == 0) {
@@ -584,7 +584,7 @@ function tn() {
584
584
  }
585
585
  (I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (j = S.search(/e/i)) > 0 ? (I < 0 && (I = j), I += +S.slice(j + 1), S = S.substring(0, j)) : I < 0 && (I = S.length);
586
586
  } else {
587
- if (_(f, 2, Ye.length, "Base"), f == 10 && Ht)
587
+ if (_(f, 2, Ye.length, "Base"), f == 10 && Dt)
588
588
  return A = new U(l), Se(A, Q + A.e + 1, ie);
589
589
  if (S = String(l), y = typeof l == "number") {
590
590
  if (l * 0 != 0) return V(A, S, y, f);
@@ -599,8 +599,8 @@ function tn() {
599
599
  I = v;
600
600
  continue;
601
601
  }
602
- } else if (!b && (S == S.toUpperCase() && (S = S.toLowerCase()) || S == S.toLowerCase() && (S = S.toUpperCase()))) {
603
- b = !0, j = -1, I = 0;
602
+ } else if (!w && (S == S.toUpperCase() && (S = S.toLowerCase()) || S == S.toLowerCase() && (S = S.toUpperCase()))) {
603
+ w = !0, j = -1, I = 0;
604
604
  continue;
605
605
  }
606
606
  return V(A, String(l), y, f);
@@ -614,7 +614,7 @@ function tn() {
614
614
  throw Error(r + A.s * l);
615
615
  if ((I = I - j - 1) > ke)
616
616
  A.c = A.e = null;
617
- else if (I < Me)
617
+ else if (I < Re)
618
618
  A.c = [A.e = 0];
619
619
  else {
620
620
  if (A.e = I, A.c = [], j = (I + 1) % c, I < 0 && (j += c), j < v) {
@@ -635,9 +635,9 @@ function tn() {
635
635
  if (typeof l == "object") {
636
636
  if (l.hasOwnProperty(f = "DECIMAL_PLACES") && (g = l[f], _(g, 0, $, f), Q = g), l.hasOwnProperty(f = "ROUNDING_MODE") && (g = l[f], _(g, 0, 8, f), ie = g), l.hasOwnProperty(f = "EXPONENTIAL_AT") && (g = l[f], g && g.pop ? (_(g[0], -$, 0, f), _(g[1], 0, $, f), ce = g[0], le = g[1]) : (_(g, -$, $, f), ce = -(le = g < 0 ? -g : g))), l.hasOwnProperty(f = "RANGE"))
637
637
  if (g = l[f], g && g.pop)
638
- _(g[0], -$, -1, f), _(g[1], 1, $, f), Me = g[0], ke = g[1];
638
+ _(g[0], -$, -1, f), _(g[1], 1, $, f), Re = g[0], ke = g[1];
639
639
  else if (_(g, -$, $, f), g)
640
- Me = -(ke = g < 0 ? -g : g);
640
+ Re = -(ke = g < 0 ? -g : g);
641
641
  else
642
642
  throw Error(s + f + " cannot be zero: " + g);
643
643
  if (l.hasOwnProperty(f = "CRYPTO"))
@@ -651,12 +651,12 @@ function tn() {
651
651
  _e = g;
652
652
  else
653
653
  throw Error(s + f + " not true or false: " + g);
654
- if (l.hasOwnProperty(f = "MODULO_MODE") && (g = l[f], _(g, 0, 9, f), st = g), l.hasOwnProperty(f = "POW_PRECISION") && (g = l[f], _(g, 0, $, f), Xe = g), l.hasOwnProperty(f = "FORMAT"))
654
+ if (l.hasOwnProperty(f = "MODULO_MODE") && (g = l[f], _(g, 0, 9, f), rt = g), l.hasOwnProperty(f = "POW_PRECISION") && (g = l[f], _(g, 0, $, f), Xe = g), l.hasOwnProperty(f = "FORMAT"))
655
655
  if (g = l[f], typeof g == "object") Nt = g;
656
656
  else throw Error(s + f + " not an object: " + g);
657
657
  if (l.hasOwnProperty(f = "ALPHABET"))
658
658
  if (g = l[f], typeof g == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(g))
659
- Ht = g.slice(0, 10) == "0123456789", Ye = g;
659
+ Dt = g.slice(0, 10) == "0123456789", Ye = g;
660
660
  else
661
661
  throw Error(s + f + " invalid: " + g);
662
662
  } else
@@ -665,9 +665,9 @@ function tn() {
665
665
  DECIMAL_PLACES: Q,
666
666
  ROUNDING_MODE: ie,
667
667
  EXPONENTIAL_AT: [ce, le],
668
- RANGE: [Me, ke],
668
+ RANGE: [Re, ke],
669
669
  CRYPTO: _e,
670
- MODULO_MODE: st,
670
+ MODULO_MODE: rt,
671
671
  POW_PRECISION: Xe,
672
672
  FORMAT: Nt,
673
673
  ALPHABET: Ye
@@ -675,20 +675,20 @@ function tn() {
675
675
  }, U.isBigNumber = function(l) {
676
676
  if (!l || l._isBigNumber !== !0) return !1;
677
677
  if (!U.DEBUG) return !0;
678
- var f, g, k = l.c, b = l.e, I = l.s;
678
+ var f, g, k = l.c, w = l.e, I = l.s;
679
679
  e: if ({}.toString.call(k) == "[object Array]") {
680
- if ((I === 1 || I === -1) && b >= -$ && b <= $ && b === a(b)) {
680
+ if ((I === 1 || I === -1) && w >= -$ && w <= $ && w === a(w)) {
681
681
  if (k[0] === 0) {
682
- if (b === 0 && k.length === 1) return !0;
682
+ if (w === 0 && k.length === 1) return !0;
683
683
  break e;
684
684
  }
685
- if (f = (b + 1) % c, f < 1 && (f += c), String(k[0]).length == f) {
685
+ if (f = (w + 1) % c, f < 1 && (f += c), String(k[0]).length == f) {
686
686
  for (f = 0; f < k.length; f++)
687
687
  if (g = k[f], g < 0 || g >= d || g !== a(g)) break e;
688
688
  if (g !== 0) return !0;
689
689
  }
690
690
  }
691
- } else if (k === null && b === null && (I === null || I === 1 || I === -1))
691
+ } else if (k === null && w === null && (I === null || I === 1 || I === -1))
692
692
  return !0;
693
693
  throw Error(s + "Invalid BigNumber: " + l);
694
694
  }, U.maximum = U.max = function() {
@@ -702,11 +702,11 @@ function tn() {
702
702
  return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
703
703
  };
704
704
  return function(g) {
705
- var k, b, I, j, y, v = 0, S = [], A = new U(Y);
705
+ var k, w, I, j, y, v = 0, S = [], A = new U(Y);
706
706
  if (g == null ? g = Q : _(g, 0, $), j = o(g / c), _e)
707
707
  if (crypto.getRandomValues) {
708
708
  for (k = crypto.getRandomValues(new Uint32Array(j *= 2)); v < j; )
709
- y = k[v] * 131072 + (k[v + 1] >>> 11), y >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), k[v] = b[0], k[v + 1] = b[1]) : (S.push(y % 1e14), v += 2);
709
+ y = k[v] * 131072 + (k[v + 1] >>> 11), y >= 9e15 ? (w = crypto.getRandomValues(new Uint32Array(2)), k[v] = w[0], k[v + 1] = w[1]) : (S.push(y % 1e14), v += 2);
710
710
  v = j / 2;
711
711
  } else if (crypto.randomBytes) {
712
712
  for (k = crypto.randomBytes(j *= 7); v < j; )
@@ -732,28 +732,28 @@ function tn() {
732
732
  return g;
733
733
  }, te = /* @__PURE__ */ (function() {
734
734
  var l = "0123456789";
735
- function f(g, k, b, I) {
735
+ function f(g, k, w, I) {
736
736
  for (var j, y = [0], v, S = 0, A = g.length; S < A; ) {
737
737
  for (v = y.length; v--; y[v] *= k) ;
738
738
  for (y[0] += I.indexOf(g.charAt(S++)), j = 0; j < y.length; j++)
739
- y[j] > b - 1 && (y[j + 1] == null && (y[j + 1] = 0), y[j + 1] += y[j] / b | 0, y[j] %= b);
739
+ y[j] > w - 1 && (y[j + 1] == null && (y[j + 1] = 0), y[j + 1] += y[j] / w | 0, y[j] %= w);
740
740
  }
741
741
  return y.reverse();
742
742
  }
743
- return function(g, k, b, I, j) {
744
- var y, v, S, A, P, D, X, ne, ue = g.indexOf("."), fe = Q, ee = ie;
745
- for (ue >= 0 && (A = Xe, Xe = 0, g = g.replace(".", ""), ne = new U(k), D = ne.pow(g.length - ue), Xe = A, ne.c = f(
746
- ae(W(D.c), D.e, "0"),
743
+ return function(g, k, w, I, j) {
744
+ var y, v, S, A, x, B, X, ne, ue = g.indexOf("."), ge = Q, ee = ie;
745
+ for (ue >= 0 && (A = Xe, Xe = 0, g = g.replace(".", ""), ne = new U(k), B = ne.pow(g.length - ue), Xe = A, ne.c = f(
746
+ ae(W(B.c), B.e, "0"),
747
747
  10,
748
- b,
748
+ w,
749
749
  l
750
- ), ne.e = ne.c.length), X = f(g, k, b, j ? (y = Ye, l) : (y = l, Ye)), S = A = X.length; X[--A] == 0; X.pop()) ;
750
+ ), ne.e = ne.c.length), X = f(g, k, w, j ? (y = Ye, l) : (y = l, Ye)), S = A = X.length; X[--A] == 0; X.pop()) ;
751
751
  if (!X[0]) return y.charAt(0);
752
- if (ue < 0 ? --S : (D.c = X, D.e = S, D.s = I, D = L(D, ne, fe, ee, b), X = D.c, P = D.r, S = D.e), v = S + fe + 1, ue = X[v], A = b / 2, P = P || v < 0 || X[v + 1] != null, P = ee < 4 ? (ue != null || P) && (ee == 0 || ee == (D.s < 0 ? 3 : 2)) : ue > A || ue == A && (ee == 4 || P || ee == 6 && X[v - 1] & 1 || ee == (D.s < 0 ? 8 : 7)), v < 1 || !X[0])
753
- g = P ? ae(y.charAt(1), -fe, y.charAt(0)) : y.charAt(0);
752
+ if (ue < 0 ? --S : (B.c = X, B.e = S, B.s = I, B = L(B, ne, ge, ee, w), X = B.c, x = B.r, S = B.e), v = S + ge + 1, ue = X[v], A = w / 2, x = x || v < 0 || X[v + 1] != null, x = ee < 4 ? (ue != null || x) && (ee == 0 || ee == (B.s < 0 ? 3 : 2)) : ue > A || ue == A && (ee == 4 || x || ee == 6 && X[v - 1] & 1 || ee == (B.s < 0 ? 8 : 7)), v < 1 || !X[0])
753
+ g = x ? ae(y.charAt(1), -ge, y.charAt(0)) : y.charAt(0);
754
754
  else {
755
- if (X.length = v, P)
756
- for (--b; ++X[--v] > b; )
755
+ if (X.length = v, x)
756
+ for (--w; ++X[--v] > w; )
757
757
  X[v] = 0, v || (++S, X = [1].concat(X));
758
758
  for (A = X.length; !X[--A]; ) ;
759
759
  for (ue = 0, g = ""; ue <= A; g += y.charAt(X[ue++])) ;
@@ -762,72 +762,72 @@ function tn() {
762
762
  return g;
763
763
  };
764
764
  })(), L = /* @__PURE__ */ (function() {
765
- function l(k, b, I) {
766
- var j, y, v, S, A = 0, P = k.length, D = b % m, X = b / m | 0;
767
- for (k = k.slice(); P--; )
768
- v = k[P] % m, S = k[P] / m | 0, j = X * v + S * D, y = D * v + j % m * m + A, A = (y / I | 0) + (j / m | 0) + X * S, k[P] = y % I;
765
+ function l(k, w, I) {
766
+ var j, y, v, S, A = 0, x = k.length, B = w % m, X = w / m | 0;
767
+ for (k = k.slice(); x--; )
768
+ v = k[x] % m, S = k[x] / m | 0, j = X * v + S * B, y = B * v + j % m * m + A, A = (y / I | 0) + (j / m | 0) + X * S, k[x] = y % I;
769
769
  return A && (k = [A].concat(k)), k;
770
770
  }
771
- function f(k, b, I, j) {
771
+ function f(k, w, I, j) {
772
772
  var y, v;
773
773
  if (I != j)
774
774
  v = I > j ? 1 : -1;
775
775
  else
776
776
  for (y = v = 0; y < I; y++)
777
- if (k[y] != b[y]) {
778
- v = k[y] > b[y] ? 1 : -1;
777
+ if (k[y] != w[y]) {
778
+ v = k[y] > w[y] ? 1 : -1;
779
779
  break;
780
780
  }
781
781
  return v;
782
782
  }
783
- function g(k, b, I, j) {
783
+ function g(k, w, I, j) {
784
784
  for (var y = 0; I--; )
785
- k[I] -= y, y = k[I] < b[I] ? 1 : 0, k[I] = y * j + k[I] - b[I];
785
+ k[I] -= y, y = k[I] < w[I] ? 1 : 0, k[I] = y * j + k[I] - w[I];
786
786
  for (; !k[0] && k.length > 1; k.splice(0, 1)) ;
787
787
  }
788
- return function(k, b, I, j, y) {
789
- var v, S, A, P, D, X, ne, ue, fe, ee, re, we, It, Xt, Vt, Re, rt, $e = k.s == b.s ? 1 : -1, Ie = k.c, pe = b.c;
788
+ return function(k, w, I, j, y) {
789
+ var v, S, A, x, B, X, ne, ue, ge, ee, re, be, It, Xt, Vt, Me, ct, $e = k.s == w.s ? 1 : -1, Ie = k.c, pe = w.c;
790
790
  if (!Ie || !Ie[0] || !pe || !pe[0])
791
791
  return new U(
792
792
  // Return NaN if either NaN, or both Infinity or 0.
793
- !k.s || !b.s || (Ie ? pe && Ie[0] == pe[0] : !pe) ? NaN : (
793
+ !k.s || !w.s || (Ie ? pe && Ie[0] == pe[0] : !pe) ? NaN : (
794
794
  // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
795
795
  Ie && Ie[0] == 0 || !pe ? $e * 0 : $e / 0
796
796
  )
797
797
  );
798
- for (ue = new U($e), fe = ue.c = [], S = k.e - b.e, $e = I + S + 1, y || (y = d, S = Z(k.e / c) - Z(b.e / c), $e = $e / c | 0), A = 0; pe[A] == (Ie[A] || 0); A++) ;
798
+ for (ue = new U($e), ge = ue.c = [], S = k.e - w.e, $e = I + S + 1, y || (y = d, S = Z(k.e / c) - Z(w.e / c), $e = $e / c | 0), A = 0; pe[A] == (Ie[A] || 0); A++) ;
799
799
  if (pe[A] > (Ie[A] || 0) && S--, $e < 0)
800
- fe.push(1), P = !0;
800
+ ge.push(1), x = !0;
801
801
  else {
802
- for (Xt = Ie.length, Re = pe.length, A = 0, $e += 2, D = a(y / (pe[0] + 1)), D > 1 && (pe = l(pe, D, y), Ie = l(Ie, D, y), Re = pe.length, Xt = Ie.length), It = Re, ee = Ie.slice(0, Re), re = ee.length; re < Re; ee[re++] = 0) ;
803
- rt = pe.slice(), rt = [0].concat(rt), Vt = pe[0], pe[1] >= y / 2 && Vt++;
802
+ for (Xt = Ie.length, Me = pe.length, A = 0, $e += 2, B = a(y / (pe[0] + 1)), B > 1 && (pe = l(pe, B, y), Ie = l(Ie, B, y), Me = pe.length, Xt = Ie.length), It = Me, ee = Ie.slice(0, Me), re = ee.length; re < Me; ee[re++] = 0) ;
803
+ ct = pe.slice(), ct = [0].concat(ct), Vt = pe[0], pe[1] >= y / 2 && Vt++;
804
804
  do {
805
- if (D = 0, v = f(pe, ee, Re, re), v < 0) {
806
- if (we = ee[0], Re != re && (we = we * y + (ee[1] || 0)), D = a(we / Vt), D > 1)
807
- for (D >= y && (D = y - 1), X = l(pe, D, y), ne = X.length, re = ee.length; f(X, ee, ne, re) == 1; )
808
- D--, g(X, Re < ne ? rt : pe, ne, y), ne = X.length, v = 1;
805
+ if (B = 0, v = f(pe, ee, Me, re), v < 0) {
806
+ if (be = ee[0], Me != re && (be = be * y + (ee[1] || 0)), B = a(be / Vt), B > 1)
807
+ for (B >= y && (B = y - 1), X = l(pe, B, y), ne = X.length, re = ee.length; f(X, ee, ne, re) == 1; )
808
+ B--, g(X, Me < ne ? ct : pe, ne, y), ne = X.length, v = 1;
809
809
  else
810
- D == 0 && (v = D = 1), X = pe.slice(), ne = X.length;
810
+ B == 0 && (v = B = 1), X = pe.slice(), ne = X.length;
811
811
  if (ne < re && (X = [0].concat(X)), g(ee, X, re, y), re = ee.length, v == -1)
812
- for (; f(pe, ee, Re, re) < 1; )
813
- D++, g(ee, Re < re ? rt : pe, re, y), re = ee.length;
814
- } else v === 0 && (D++, ee = [0]);
815
- fe[A++] = D, ee[0] ? ee[re++] = Ie[It] || 0 : (ee = [Ie[It]], re = 1);
812
+ for (; f(pe, ee, Me, re) < 1; )
813
+ B++, g(ee, Me < re ? ct : pe, re, y), re = ee.length;
814
+ } else v === 0 && (B++, ee = [0]);
815
+ ge[A++] = B, ee[0] ? ee[re++] = Ie[It] || 0 : (ee = [Ie[It]], re = 1);
816
816
  } while ((It++ < Xt || ee[0] != null) && $e--);
817
- P = ee[0] != null, fe[0] || fe.splice(0, 1);
817
+ x = ee[0] != null, ge[0] || ge.splice(0, 1);
818
818
  }
819
819
  if (y == d) {
820
- for (A = 1, $e = fe[0]; $e >= 10; $e /= 10, A++) ;
821
- Se(ue, I + (ue.e = A + S * c - 1) + 1, j, P);
820
+ for (A = 1, $e = ge[0]; $e >= 10; $e /= 10, A++) ;
821
+ Se(ue, I + (ue.e = A + S * c - 1) + 1, j, x);
822
822
  } else
823
- ue.e = S, ue.r = +P;
823
+ ue.e = S, ue.r = +x;
824
824
  return ue;
825
825
  };
826
826
  })();
827
- function Dt(l, f, g, k) {
828
- var b, I, j, y, v;
827
+ function Ht(l, f, g, k) {
828
+ var w, I, j, y, v;
829
829
  if (g == null ? g = ie : _(g, 0, 8), !l.c) return l.toString();
830
- if (b = l.c[0], j = l.e, f == null)
830
+ if (w = l.c[0], j = l.e, f == null)
831
831
  v = W(l.c), v = k == 1 || k == 2 && (j <= ce || j >= le) ? J(v, j) : ae(v, j, "0");
832
832
  else if (l = Se(new U(l), f, g), I = l.e, v = W(l.c), y = v.length, k == 1 || k == 2 && (f <= I || I <= ce)) {
833
833
  for (; y < f; v += "0", y++) ;
@@ -836,27 +836,27 @@ function tn() {
836
836
  if (--f > 0) for (v += "."; f--; v += "0") ;
837
837
  } else if (f += I - y, f > 0)
838
838
  for (I + 1 == y && (v += "."); f--; v += "0") ;
839
- return l.s < 0 && b ? "-" + v : v;
839
+ return l.s < 0 && w ? "-" + v : v;
840
840
  }
841
841
  function ki(l, f) {
842
- for (var g, k, b = 1, I = new U(l[0]); b < l.length; b++)
843
- k = new U(l[b]), (!k.s || (g = K(I, k)) === f || g === 0 && I.s === f) && (I = k);
842
+ for (var g, k, w = 1, I = new U(l[0]); w < l.length; w++)
843
+ k = new U(l[w]), (!k.s || (g = K(I, k)) === f || g === 0 && I.s === f) && (I = k);
844
844
  return I;
845
845
  }
846
846
  function Bt(l, f, g) {
847
- for (var k = 1, b = f.length; !f[--b]; f.pop()) ;
848
- for (b = f[0]; b >= 10; b /= 10, k++) ;
849
- return (g = k + g * c - 1) > ke ? l.c = l.e = null : g < Me ? l.c = [l.e = 0] : (l.e = g, l.c = f), l;
847
+ for (var k = 1, w = f.length; !f[--w]; f.pop()) ;
848
+ for (w = f[0]; w >= 10; w /= 10, k++) ;
849
+ return (g = k + g * c - 1) > ke ? l.c = l.e = null : g < Re ? l.c = [l.e = 0] : (l.e = g, l.c = f), l;
850
850
  }
851
851
  V = /* @__PURE__ */ (function() {
852
- var l = /^(-?)0([xbo])(?=\w[\w.]*$)/i, f = /^([^.]+)\.$/, g = /^\.([^.]+)$/, k = /^-?(Infinity|NaN)$/, b = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
852
+ var l = /^(-?)0([xbo])(?=\w[\w.]*$)/i, f = /^([^.]+)\.$/, g = /^\.([^.]+)$/, k = /^-?(Infinity|NaN)$/, w = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
853
853
  return function(I, j, y, v) {
854
- var S, A = y ? j : j.replace(b, "");
854
+ var S, A = y ? j : j.replace(w, "");
855
855
  if (k.test(A))
856
856
  I.s = isNaN(A) ? null : A < 0 ? -1 : 1;
857
857
  else {
858
- if (!y && (A = A.replace(l, function(P, D, X) {
859
- return S = (X = X.toLowerCase()) == "x" ? 16 : X == "b" ? 2 : 8, !v || v == S ? D : P;
858
+ if (!y && (A = A.replace(l, function(x, B, X) {
859
+ return S = (X = X.toLowerCase()) == "x" ? 16 : X == "b" ? 2 : 8, !v || v == S ? B : x;
860
860
  }), v && (S = v, A = A.replace(f, "$1").replace(g, "0.$1")), j != A))
861
861
  return new U(A, S);
862
862
  if (U.DEBUG)
@@ -867,42 +867,42 @@ function tn() {
867
867
  };
868
868
  })();
869
869
  function Se(l, f, g, k) {
870
- var b, I, j, y, v, S, A, P = l.c, D = u;
871
- if (P) {
870
+ var w, I, j, y, v, S, A, x = l.c, B = u;
871
+ if (x) {
872
872
  e: {
873
- for (b = 1, y = P[0]; y >= 10; y /= 10, b++) ;
874
- if (I = f - b, I < 0)
875
- I += c, j = f, v = P[S = 0], A = a(v / D[b - j - 1] % 10);
876
- else if (S = o((I + 1) / c), S >= P.length)
873
+ for (w = 1, y = x[0]; y >= 10; y /= 10, w++) ;
874
+ if (I = f - w, I < 0)
875
+ I += c, j = f, v = x[S = 0], A = a(v / B[w - j - 1] % 10);
876
+ else if (S = o((I + 1) / c), S >= x.length)
877
877
  if (k) {
878
- for (; P.length <= S; P.push(0)) ;
879
- v = A = 0, b = 1, I %= c, j = I - c + 1;
878
+ for (; x.length <= S; x.push(0)) ;
879
+ v = A = 0, w = 1, I %= c, j = I - c + 1;
880
880
  } else
881
881
  break e;
882
882
  else {
883
- for (v = y = P[S], b = 1; y >= 10; y /= 10, b++) ;
884
- I %= c, j = I - c + b, A = j < 0 ? 0 : a(v / D[b - j - 1] % 10);
883
+ for (v = y = x[S], w = 1; y >= 10; y /= 10, w++) ;
884
+ I %= c, j = I - c + w, A = j < 0 ? 0 : a(v / B[w - j - 1] % 10);
885
885
  }
886
886
  if (k = k || f < 0 || // Are there any non-zero digits after the rounding digit?
887
887
  // The expression n % pows10[d - j - 1] returns all digits of n to the right
888
888
  // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
889
- P[S + 1] != null || (j < 0 ? v : v % D[b - j - 1]), k = g < 4 ? (A || k) && (g == 0 || g == (l.s < 0 ? 3 : 2)) : A > 5 || A == 5 && (g == 4 || k || g == 6 && // Check whether the digit to the left of the rounding digit is odd.
890
- (I > 0 ? j > 0 ? v / D[b - j] : 0 : P[S - 1]) % 10 & 1 || g == (l.s < 0 ? 8 : 7)), f < 1 || !P[0])
891
- return P.length = 0, k ? (f -= l.e + 1, P[0] = D[(c - f % c) % c], l.e = -f || 0) : P[0] = l.e = 0, l;
892
- if (I == 0 ? (P.length = S, y = 1, S--) : (P.length = S + 1, y = D[c - I], P[S] = j > 0 ? a(v / D[b - j] % D[j]) * y : 0), k)
889
+ x[S + 1] != null || (j < 0 ? v : v % B[w - j - 1]), k = g < 4 ? (A || k) && (g == 0 || g == (l.s < 0 ? 3 : 2)) : A > 5 || A == 5 && (g == 4 || k || g == 6 && // Check whether the digit to the left of the rounding digit is odd.
890
+ (I > 0 ? j > 0 ? v / B[w - j] : 0 : x[S - 1]) % 10 & 1 || g == (l.s < 0 ? 8 : 7)), f < 1 || !x[0])
891
+ return x.length = 0, k ? (f -= l.e + 1, x[0] = B[(c - f % c) % c], l.e = -f || 0) : x[0] = l.e = 0, l;
892
+ if (I == 0 ? (x.length = S, y = 1, S--) : (x.length = S + 1, y = B[c - I], x[S] = j > 0 ? a(v / B[w - j] % B[j]) * y : 0), k)
893
893
  for (; ; )
894
894
  if (S == 0) {
895
- for (I = 1, j = P[0]; j >= 10; j /= 10, I++) ;
896
- for (j = P[0] += y, y = 1; j >= 10; j /= 10, y++) ;
897
- I != y && (l.e++, P[0] == d && (P[0] = 1));
895
+ for (I = 1, j = x[0]; j >= 10; j /= 10, I++) ;
896
+ for (j = x[0] += y, y = 1; j >= 10; j /= 10, y++) ;
897
+ I != y && (l.e++, x[0] == d && (x[0] = 1));
898
898
  break;
899
899
  } else {
900
- if (P[S] += y, P[S] != d) break;
901
- P[S--] = 0, y = 1;
900
+ if (x[S] += y, x[S] != d) break;
901
+ x[S--] = 0, y = 1;
902
902
  }
903
- for (I = P.length; P[--I] === 0; P.pop()) ;
903
+ for (I = x.length; x[--I] === 0; x.pop()) ;
904
904
  }
905
- l.e > ke ? l.c = l.e = null : l.e < Me && (l.c = [l.e = 0]);
905
+ l.e > ke ? l.c = l.e = null : l.e < Re && (l.c = [l.e = 0]);
906
906
  }
907
907
  return l;
908
908
  }
@@ -910,167 +910,167 @@ function tn() {
910
910
  var f, g = l.e;
911
911
  return g === null ? l.toString() : (f = W(l.c), f = g <= ce || g >= le ? J(f, g) : ae(f, g, "0"), l.s < 0 ? "-" + f : f);
912
912
  }
913
- return M.absoluteValue = M.abs = function() {
913
+ return R.absoluteValue = R.abs = function() {
914
914
  var l = new U(this);
915
915
  return l.s < 0 && (l.s = 1), l;
916
- }, M.comparedTo = function(l, f) {
916
+ }, R.comparedTo = function(l, f) {
917
917
  return K(this, new U(l, f));
918
- }, M.decimalPlaces = M.dp = function(l, f) {
919
- var g, k, b, I = this;
918
+ }, R.decimalPlaces = R.dp = function(l, f) {
919
+ var g, k, w, I = this;
920
920
  if (l != null)
921
921
  return _(l, 0, $), f == null ? f = ie : _(f, 0, 8), Se(new U(I), l + I.e + 1, f);
922
922
  if (!(g = I.c)) return null;
923
- if (k = ((b = g.length - 1) - Z(this.e / c)) * c, b = g[b]) for (; b % 10 == 0; b /= 10, k--) ;
923
+ if (k = ((w = g.length - 1) - Z(this.e / c)) * c, w = g[w]) for (; w % 10 == 0; w /= 10, k--) ;
924
924
  return k < 0 && (k = 0), k;
925
- }, M.dividedBy = M.div = function(l, f) {
925
+ }, R.dividedBy = R.div = function(l, f) {
926
926
  return L(this, new U(l, f), Q, ie);
927
- }, M.dividedToIntegerBy = M.idiv = function(l, f) {
927
+ }, R.dividedToIntegerBy = R.idiv = function(l, f) {
928
928
  return L(this, new U(l, f), 0, 1);
929
- }, M.exponentiatedBy = M.pow = function(l, f) {
930
- var g, k, b, I, j, y, v, S, A, P = this;
929
+ }, R.exponentiatedBy = R.pow = function(l, f) {
930
+ var g, k, w, I, j, y, v, S, A, x = this;
931
931
  if (l = new U(l), l.c && !l.isInteger())
932
932
  throw Error(s + "Exponent not an integer: " + Le(l));
933
- if (f != null && (f = new U(f)), y = l.e > 14, !P.c || !P.c[0] || P.c[0] == 1 && !P.e && P.c.length == 1 || !l.c || !l.c[0])
934
- return A = new U(Math.pow(+Le(P), y ? l.s * (2 - N(l)) : +Le(l))), f ? A.mod(f) : A;
933
+ if (f != null && (f = new U(f)), y = l.e > 14, !x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !l.c || !l.c[0])
934
+ return A = new U(Math.pow(+Le(x), y ? l.s * (2 - D(l)) : +Le(l))), f ? A.mod(f) : A;
935
935
  if (v = l.s < 0, f) {
936
936
  if (f.c ? !f.c[0] : !f.s) return new U(NaN);
937
- k = !v && P.isInteger() && f.isInteger(), k && (P = P.mod(f));
937
+ k = !v && x.isInteger() && f.isInteger(), k && (x = x.mod(f));
938
938
  } else {
939
- if (l.e > 9 && (P.e > 0 || P.e < -1 || (P.e == 0 ? P.c[0] > 1 || y && P.c[1] >= 24e7 : P.c[0] < 8e13 || y && P.c[0] <= 9999975e7)))
940
- return I = P.s < 0 && N(l) ? -0 : 0, P.e > -1 && (I = 1 / I), new U(v ? 1 / I : I);
939
+ if (l.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 ? x.c[0] > 1 || y && x.c[1] >= 24e7 : x.c[0] < 8e13 || y && x.c[0] <= 9999975e7)))
940
+ return I = x.s < 0 && D(l) ? -0 : 0, x.e > -1 && (I = 1 / I), new U(v ? 1 / I : I);
941
941
  Xe && (I = o(Xe / c + 2));
942
942
  }
943
- for (y ? (g = new U(0.5), v && (l.s = 1), S = N(l)) : (b = Math.abs(+Le(l)), S = b % 2), A = new U(Y); ; ) {
943
+ for (y ? (g = new U(0.5), v && (l.s = 1), S = D(l)) : (w = Math.abs(+Le(l)), S = w % 2), A = new U(Y); ; ) {
944
944
  if (S) {
945
- if (A = A.times(P), !A.c) break;
945
+ if (A = A.times(x), !A.c) break;
946
946
  I ? A.c.length > I && (A.c.length = I) : k && (A = A.mod(f));
947
947
  }
948
- if (b) {
949
- if (b = a(b / 2), b === 0) break;
950
- S = b % 2;
948
+ if (w) {
949
+ if (w = a(w / 2), w === 0) break;
950
+ S = w % 2;
951
951
  } else if (l = l.times(g), Se(l, l.e + 1, 1), l.e > 14)
952
- S = N(l);
952
+ S = D(l);
953
953
  else {
954
- if (b = +Le(l), b === 0) break;
955
- S = b % 2;
954
+ if (w = +Le(l), w === 0) break;
955
+ S = w % 2;
956
956
  }
957
- P = P.times(P), I ? P.c && P.c.length > I && (P.c.length = I) : k && (P = P.mod(f));
957
+ x = x.times(x), I ? x.c && x.c.length > I && (x.c.length = I) : k && (x = x.mod(f));
958
958
  }
959
959
  return k ? A : (v && (A = Y.div(A)), f ? A.mod(f) : I ? Se(A, Xe, ie, j) : A);
960
- }, M.integerValue = function(l) {
960
+ }, R.integerValue = function(l) {
961
961
  var f = new U(this);
962
962
  return l == null ? l = ie : _(l, 0, 8), Se(f, f.e + 1, l);
963
- }, M.isEqualTo = M.eq = function(l, f) {
963
+ }, R.isEqualTo = R.eq = function(l, f) {
964
964
  return K(this, new U(l, f)) === 0;
965
- }, M.isFinite = function() {
965
+ }, R.isFinite = function() {
966
966
  return !!this.c;
967
- }, M.isGreaterThan = M.gt = function(l, f) {
967
+ }, R.isGreaterThan = R.gt = function(l, f) {
968
968
  return K(this, new U(l, f)) > 0;
969
- }, M.isGreaterThanOrEqualTo = M.gte = function(l, f) {
969
+ }, R.isGreaterThanOrEqualTo = R.gte = function(l, f) {
970
970
  return (f = K(this, new U(l, f))) === 1 || f === 0;
971
- }, M.isInteger = function() {
971
+ }, R.isInteger = function() {
972
972
  return !!this.c && Z(this.e / c) > this.c.length - 2;
973
- }, M.isLessThan = M.lt = function(l, f) {
973
+ }, R.isLessThan = R.lt = function(l, f) {
974
974
  return K(this, new U(l, f)) < 0;
975
- }, M.isLessThanOrEqualTo = M.lte = function(l, f) {
975
+ }, R.isLessThanOrEqualTo = R.lte = function(l, f) {
976
976
  return (f = K(this, new U(l, f))) === -1 || f === 0;
977
- }, M.isNaN = function() {
977
+ }, R.isNaN = function() {
978
978
  return !this.s;
979
- }, M.isNegative = function() {
979
+ }, R.isNegative = function() {
980
980
  return this.s < 0;
981
- }, M.isPositive = function() {
981
+ }, R.isPositive = function() {
982
982
  return this.s > 0;
983
- }, M.isZero = function() {
983
+ }, R.isZero = function() {
984
984
  return !!this.c && this.c[0] == 0;
985
- }, M.minus = function(l, f) {
986
- var g, k, b, I, j = this, y = j.s;
985
+ }, R.minus = function(l, f) {
986
+ var g, k, w, I, j = this, y = j.s;
987
987
  if (l = new U(l, f), f = l.s, !y || !f) return new U(NaN);
988
988
  if (y != f)
989
989
  return l.s = -f, j.plus(l);
990
- var v = j.e / c, S = l.e / c, A = j.c, P = l.c;
990
+ var v = j.e / c, S = l.e / c, A = j.c, x = l.c;
991
991
  if (!v || !S) {
992
- if (!A || !P) return A ? (l.s = -f, l) : new U(P ? j : NaN);
993
- if (!A[0] || !P[0])
994
- return P[0] ? (l.s = -f, l) : new U(A[0] ? j : (
992
+ if (!A || !x) return A ? (l.s = -f, l) : new U(x ? j : NaN);
993
+ if (!A[0] || !x[0])
994
+ return x[0] ? (l.s = -f, l) : new U(A[0] ? j : (
995
995
  // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
996
996
  ie == 3 ? -0 : 0
997
997
  ));
998
998
  }
999
999
  if (v = Z(v), S = Z(S), A = A.slice(), y = v - S) {
1000
- for ((I = y < 0) ? (y = -y, b = A) : (S = v, b = P), b.reverse(), f = y; f--; b.push(0)) ;
1001
- b.reverse();
1000
+ for ((I = y < 0) ? (y = -y, w = A) : (S = v, w = x), w.reverse(), f = y; f--; w.push(0)) ;
1001
+ w.reverse();
1002
1002
  } else
1003
- for (k = (I = (y = A.length) < (f = P.length)) ? y : f, y = f = 0; f < k; f++)
1004
- if (A[f] != P[f]) {
1005
- I = A[f] < P[f];
1003
+ for (k = (I = (y = A.length) < (f = x.length)) ? y : f, y = f = 0; f < k; f++)
1004
+ if (A[f] != x[f]) {
1005
+ I = A[f] < x[f];
1006
1006
  break;
1007
1007
  }
1008
- if (I && (b = A, A = P, P = b, l.s = -l.s), f = (k = P.length) - (g = A.length), f > 0) for (; f--; A[g++] = 0) ;
1008
+ if (I && (w = A, A = x, x = w, l.s = -l.s), f = (k = x.length) - (g = A.length), f > 0) for (; f--; A[g++] = 0) ;
1009
1009
  for (f = d - 1; k > y; ) {
1010
- if (A[--k] < P[k]) {
1010
+ if (A[--k] < x[k]) {
1011
1011
  for (g = k; g && !A[--g]; A[g] = f) ;
1012
1012
  --A[g], A[k] += d;
1013
1013
  }
1014
- A[k] -= P[k];
1014
+ A[k] -= x[k];
1015
1015
  }
1016
1016
  for (; A[0] == 0; A.splice(0, 1), --S) ;
1017
1017
  return A[0] ? Bt(l, A, S) : (l.s = ie == 3 ? -1 : 1, l.c = [l.e = 0], l);
1018
- }, M.modulo = M.mod = function(l, f) {
1019
- var g, k, b = this;
1020
- return l = new U(l, f), !b.c || !l.s || l.c && !l.c[0] ? new U(NaN) : !l.c || b.c && !b.c[0] ? new U(b) : (st == 9 ? (k = l.s, l.s = 1, g = L(b, l, 0, 3), l.s = k, g.s *= k) : g = L(b, l, 0, st), l = b.minus(g.times(l)), !l.c[0] && st == 1 && (l.s = b.s), l);
1021
- }, M.multipliedBy = M.times = function(l, f) {
1022
- var g, k, b, I, j, y, v, S, A, P, D, X, ne, ue, fe, ee = this, re = ee.c, we = (l = new U(l, f)).c;
1023
- if (!re || !we || !re[0] || !we[0])
1024
- return !ee.s || !l.s || re && !re[0] && !we || we && !we[0] && !re ? l.c = l.e = l.s = null : (l.s *= ee.s, !re || !we ? l.c = l.e = null : (l.c = [0], l.e = 0)), l;
1025
- for (k = Z(ee.e / c) + Z(l.e / c), l.s *= ee.s, v = re.length, P = we.length, v < P && (ne = re, re = we, we = ne, b = v, v = P, P = b), b = v + P, ne = []; b--; ne.push(0)) ;
1026
- for (ue = d, fe = m, b = P; --b >= 0; ) {
1027
- for (g = 0, D = we[b] % fe, X = we[b] / fe | 0, j = v, I = b + j; I > b; )
1028
- S = re[--j] % fe, A = re[j] / fe | 0, y = X * S + A * D, S = D * S + y % fe * fe + ne[I] + g, g = (S / ue | 0) + (y / fe | 0) + X * A, ne[I--] = S % ue;
1018
+ }, R.modulo = R.mod = function(l, f) {
1019
+ var g, k, w = this;
1020
+ return l = new U(l, f), !w.c || !l.s || l.c && !l.c[0] ? new U(NaN) : !l.c || w.c && !w.c[0] ? new U(w) : (rt == 9 ? (k = l.s, l.s = 1, g = L(w, l, 0, 3), l.s = k, g.s *= k) : g = L(w, l, 0, rt), l = w.minus(g.times(l)), !l.c[0] && rt == 1 && (l.s = w.s), l);
1021
+ }, R.multipliedBy = R.times = function(l, f) {
1022
+ var g, k, w, I, j, y, v, S, A, x, B, X, ne, ue, ge, ee = this, re = ee.c, be = (l = new U(l, f)).c;
1023
+ if (!re || !be || !re[0] || !be[0])
1024
+ return !ee.s || !l.s || re && !re[0] && !be || be && !be[0] && !re ? l.c = l.e = l.s = null : (l.s *= ee.s, !re || !be ? l.c = l.e = null : (l.c = [0], l.e = 0)), l;
1025
+ for (k = Z(ee.e / c) + Z(l.e / c), l.s *= ee.s, v = re.length, x = be.length, v < x && (ne = re, re = be, be = ne, w = v, v = x, x = w), w = v + x, ne = []; w--; ne.push(0)) ;
1026
+ for (ue = d, ge = m, w = x; --w >= 0; ) {
1027
+ for (g = 0, B = be[w] % ge, X = be[w] / ge | 0, j = v, I = w + j; I > w; )
1028
+ S = re[--j] % ge, A = re[j] / ge | 0, y = X * S + A * B, S = B * S + y % ge * ge + ne[I] + g, g = (S / ue | 0) + (y / ge | 0) + X * A, ne[I--] = S % ue;
1029
1029
  ne[I] = g;
1030
1030
  }
1031
1031
  return g ? ++k : ne.splice(0, 1), Bt(l, ne, k);
1032
- }, M.negated = function() {
1032
+ }, R.negated = function() {
1033
1033
  var l = new U(this);
1034
1034
  return l.s = -l.s || null, l;
1035
- }, M.plus = function(l, f) {
1036
- var g, k = this, b = k.s;
1037
- if (l = new U(l, f), f = l.s, !b || !f) return new U(NaN);
1038
- if (b != f)
1035
+ }, R.plus = function(l, f) {
1036
+ var g, k = this, w = k.s;
1037
+ if (l = new U(l, f), f = l.s, !w || !f) return new U(NaN);
1038
+ if (w != f)
1039
1039
  return l.s = -f, k.minus(l);
1040
1040
  var I = k.e / c, j = l.e / c, y = k.c, v = l.c;
1041
1041
  if (!I || !j) {
1042
- if (!y || !v) return new U(b / 0);
1043
- if (!y[0] || !v[0]) return v[0] ? l : new U(y[0] ? k : b * 0);
1042
+ if (!y || !v) return new U(w / 0);
1043
+ if (!y[0] || !v[0]) return v[0] ? l : new U(y[0] ? k : w * 0);
1044
1044
  }
1045
- if (I = Z(I), j = Z(j), y = y.slice(), b = I - j) {
1046
- for (b > 0 ? (j = I, g = v) : (b = -b, g = y), g.reverse(); b--; g.push(0)) ;
1045
+ if (I = Z(I), j = Z(j), y = y.slice(), w = I - j) {
1046
+ for (w > 0 ? (j = I, g = v) : (w = -w, g = y), g.reverse(); w--; g.push(0)) ;
1047
1047
  g.reverse();
1048
1048
  }
1049
- for (b = y.length, f = v.length, b - f < 0 && (g = v, v = y, y = g, f = b), b = 0; f; )
1050
- b = (y[--f] = y[f] + v[f] + b) / d | 0, y[f] = d === y[f] ? 0 : y[f] % d;
1051
- return b && (y = [b].concat(y), ++j), Bt(l, y, j);
1052
- }, M.precision = M.sd = function(l, f) {
1053
- var g, k, b, I = this;
1049
+ for (w = y.length, f = v.length, w - f < 0 && (g = v, v = y, y = g, f = w), w = 0; f; )
1050
+ w = (y[--f] = y[f] + v[f] + w) / d | 0, y[f] = d === y[f] ? 0 : y[f] % d;
1051
+ return w && (y = [w].concat(y), ++j), Bt(l, y, j);
1052
+ }, R.precision = R.sd = function(l, f) {
1053
+ var g, k, w, I = this;
1054
1054
  if (l != null && l !== !!l)
1055
1055
  return _(l, 1, $), f == null ? f = ie : _(f, 0, 8), Se(new U(I), l, f);
1056
1056
  if (!(g = I.c)) return null;
1057
- if (b = g.length - 1, k = b * c + 1, b = g[b]) {
1058
- for (; b % 10 == 0; b /= 10, k--) ;
1059
- for (b = g[0]; b >= 10; b /= 10, k++) ;
1057
+ if (w = g.length - 1, k = w * c + 1, w = g[w]) {
1058
+ for (; w % 10 == 0; w /= 10, k--) ;
1059
+ for (w = g[0]; w >= 10; w /= 10, k++) ;
1060
1060
  }
1061
1061
  return l && I.e + 1 > k && (k = I.e + 1), k;
1062
- }, M.shiftedBy = function(l) {
1062
+ }, R.shiftedBy = function(l) {
1063
1063
  return _(l, -p, p), this.times("1e" + l);
1064
- }, M.squareRoot = M.sqrt = function() {
1065
- var l, f, g, k, b, I = this, j = I.c, y = I.s, v = I.e, S = Q + 4, A = new U("0.5");
1064
+ }, R.squareRoot = R.sqrt = function() {
1065
+ var l, f, g, k, w, I = this, j = I.c, y = I.s, v = I.e, S = Q + 4, A = new U("0.5");
1066
1066
  if (y !== 1 || !j || !j[0])
1067
1067
  return new U(!y || y < 0 && (!j || j[0]) ? NaN : j ? I : 1 / 0);
1068
1068
  if (y = Math.sqrt(+Le(I)), y == 0 || y == 1 / 0 ? (f = W(j), (f.length + v) % 2 == 0 && (f += "0"), y = Math.sqrt(+f), v = Z((v + 1) / 2) - (v < 0 || v % 2), y == 1 / 0 ? f = "5e" + v : (f = y.toExponential(), f = f.slice(0, f.indexOf("e") + 1) + v), g = new U(f)) : g = new U(y + ""), g.c[0]) {
1069
1069
  for (v = g.e, y = v + S, y < 3 && (y = 0); ; )
1070
- if (b = g, g = A.times(b.plus(L(I, b, S, 1))), W(b.c).slice(0, y) === (f = W(g.c)).slice(0, y))
1070
+ if (w = g, g = A.times(w.plus(L(I, w, S, 1))), W(w.c).slice(0, y) === (f = W(g.c)).slice(0, y))
1071
1071
  if (g.e < v && --y, f = f.slice(y - 3, y + 1), f == "9999" || !k && f == "4999") {
1072
- if (!k && (Se(b, b.e + Q + 2, 0), b.times(b).eq(I))) {
1073
- g = b;
1072
+ if (!k && (Se(w, w.e + Q + 2, 0), w.times(w).eq(I))) {
1073
+ g = w;
1074
1074
  break;
1075
1075
  }
1076
1076
  S += 4, y += 4, k = 1;
@@ -1080,76 +1080,76 @@ function tn() {
1080
1080
  }
1081
1081
  }
1082
1082
  return Se(g, g.e + Q + 1, ie, l);
1083
- }, M.toExponential = function(l, f) {
1084
- return l != null && (_(l, 0, $), l++), Dt(this, l, f, 1);
1085
- }, M.toFixed = function(l, f) {
1086
- return l != null && (_(l, 0, $), l = l + this.e + 1), Dt(this, l, f);
1087
- }, M.toFormat = function(l, f, g) {
1088
- var k, b = this;
1083
+ }, R.toExponential = function(l, f) {
1084
+ return l != null && (_(l, 0, $), l++), Ht(this, l, f, 1);
1085
+ }, R.toFixed = function(l, f) {
1086
+ return l != null && (_(l, 0, $), l = l + this.e + 1), Ht(this, l, f);
1087
+ }, R.toFormat = function(l, f, g) {
1088
+ var k, w = this;
1089
1089
  if (g == null)
1090
1090
  l != null && f && typeof f == "object" ? (g = f, f = null) : l && typeof l == "object" ? (g = l, l = f = null) : g = Nt;
1091
1091
  else if (typeof g != "object")
1092
1092
  throw Error(s + "Argument not an object: " + g);
1093
- if (k = b.toFixed(l, f), b.c) {
1094
- var I, j = k.split("."), y = +g.groupSize, v = +g.secondaryGroupSize, S = g.groupSeparator || "", A = j[0], P = j[1], D = b.s < 0, X = D ? A.slice(1) : A, ne = X.length;
1093
+ if (k = w.toFixed(l, f), w.c) {
1094
+ var I, j = k.split("."), y = +g.groupSize, v = +g.secondaryGroupSize, S = g.groupSeparator || "", A = j[0], x = j[1], B = w.s < 0, X = B ? A.slice(1) : A, ne = X.length;
1095
1095
  if (v && (I = y, y = v, v = I, ne -= I), y > 0 && ne > 0) {
1096
1096
  for (I = ne % y || y, A = X.substr(0, I); I < ne; I += y) A += S + X.substr(I, y);
1097
- v > 0 && (A += S + X.slice(I)), D && (A = "-" + A);
1097
+ v > 0 && (A += S + X.slice(I)), B && (A = "-" + A);
1098
1098
  }
1099
- k = P ? A + (g.decimalSeparator || "") + ((v = +g.fractionGroupSize) ? P.replace(
1099
+ k = x ? A + (g.decimalSeparator || "") + ((v = +g.fractionGroupSize) ? x.replace(
1100
1100
  new RegExp("\\d{" + v + "}\\B", "g"),
1101
1101
  "$&" + (g.fractionGroupSeparator || "")
1102
- ) : P) : A;
1102
+ ) : x) : A;
1103
1103
  }
1104
1104
  return (g.prefix || "") + k + (g.suffix || "");
1105
- }, M.toFraction = function(l) {
1106
- var f, g, k, b, I, j, y, v, S, A, P, D, X = this, ne = X.c;
1105
+ }, R.toFraction = function(l) {
1106
+ var f, g, k, w, I, j, y, v, S, A, x, B, X = this, ne = X.c;
1107
1107
  if (l != null && (y = new U(l), !y.isInteger() && (y.c || y.s !== 1) || y.lt(Y)))
1108
1108
  throw Error(s + "Argument " + (y.isInteger() ? "out of range: " : "not an integer: ") + Le(y));
1109
1109
  if (!ne) return new U(X);
1110
- for (f = new U(Y), S = g = new U(Y), k = v = new U(Y), D = W(ne), I = f.e = D.length - X.e - 1, f.c[0] = u[(j = I % c) < 0 ? c + j : j], l = !l || y.comparedTo(f) > 0 ? I > 0 ? f : S : y, j = ke, ke = 1 / 0, y = new U(D), v.c[0] = 0; A = L(y, f, 0, 1), b = g.plus(A.times(k)), b.comparedTo(l) != 1; )
1111
- g = k, k = b, S = v.plus(A.times(b = S)), v = b, f = y.minus(A.times(b = f)), y = b;
1112
- return b = L(l.minus(g), k, 0, 1), v = v.plus(b.times(S)), g = g.plus(b.times(k)), v.s = S.s = X.s, I = I * 2, P = L(S, k, I, ie).minus(X).abs().comparedTo(
1110
+ for (f = new U(Y), S = g = new U(Y), k = v = new U(Y), B = W(ne), I = f.e = B.length - X.e - 1, f.c[0] = u[(j = I % c) < 0 ? c + j : j], l = !l || y.comparedTo(f) > 0 ? I > 0 ? f : S : y, j = ke, ke = 1 / 0, y = new U(B), v.c[0] = 0; A = L(y, f, 0, 1), w = g.plus(A.times(k)), w.comparedTo(l) != 1; )
1111
+ g = k, k = w, S = v.plus(A.times(w = S)), v = w, f = y.minus(A.times(w = f)), y = w;
1112
+ return w = L(l.minus(g), k, 0, 1), v = v.plus(w.times(S)), g = g.plus(w.times(k)), v.s = S.s = X.s, I = I * 2, x = L(S, k, I, ie).minus(X).abs().comparedTo(
1113
1113
  L(v, g, I, ie).minus(X).abs()
1114
- ) < 1 ? [S, k] : [v, g], ke = j, P;
1115
- }, M.toNumber = function() {
1114
+ ) < 1 ? [S, k] : [v, g], ke = j, x;
1115
+ }, R.toNumber = function() {
1116
1116
  return +Le(this);
1117
- }, M.toPrecision = function(l, f) {
1118
- return l != null && _(l, 1, $), Dt(this, l, f, 2);
1119
- }, M.toString = function(l) {
1120
- var f, g = this, k = g.s, b = g.e;
1121
- return b === null ? k ? (f = "Infinity", k < 0 && (f = "-" + f)) : f = "NaN" : (l == null ? f = b <= ce || b >= le ? J(W(g.c), b) : ae(W(g.c), b, "0") : l === 10 && Ht ? (g = Se(new U(g), Q + b + 1, ie), f = ae(W(g.c), g.e, "0")) : (_(l, 2, Ye.length, "Base"), f = te(ae(W(g.c), b, "0"), 10, l, k, !0)), k < 0 && g.c[0] && (f = "-" + f)), f;
1122
- }, M.valueOf = M.toJSON = function() {
1117
+ }, R.toPrecision = function(l, f) {
1118
+ return l != null && _(l, 1, $), Ht(this, l, f, 2);
1119
+ }, R.toString = function(l) {
1120
+ var f, g = this, k = g.s, w = g.e;
1121
+ return w === null ? k ? (f = "Infinity", k < 0 && (f = "-" + f)) : f = "NaN" : (l == null ? f = w <= ce || w >= le ? J(W(g.c), w) : ae(W(g.c), w, "0") : l === 10 && Dt ? (g = Se(new U(g), Q + w + 1, ie), f = ae(W(g.c), g.e, "0")) : (_(l, 2, Ye.length, "Base"), f = te(ae(W(g.c), w, "0"), 10, l, k, !0)), k < 0 && g.c[0] && (f = "-" + f)), f;
1122
+ }, R.valueOf = R.toJSON = function() {
1123
1123
  return Le(this);
1124
- }, M._isBigNumber = !0, H != null && U.set(H), U;
1124
+ }, R._isBigNumber = !0, H != null && U.set(H), U;
1125
1125
  }
1126
1126
  function Z(H) {
1127
1127
  var L = H | 0;
1128
1128
  return H > 0 || H === L ? L : L - 1;
1129
1129
  }
1130
1130
  function W(H) {
1131
- for (var L, te, V = 1, M = H.length, Y = H[0] + ""; V < M; ) {
1131
+ for (var L, te, V = 1, R = H.length, Y = H[0] + ""; V < R; ) {
1132
1132
  for (L = H[V++] + "", te = c - L.length; te--; L = "0" + L) ;
1133
1133
  Y += L;
1134
1134
  }
1135
- for (M = Y.length; Y.charCodeAt(--M) === 48; ) ;
1136
- return Y.slice(0, M + 1 || 1);
1135
+ for (R = Y.length; Y.charCodeAt(--R) === 48; ) ;
1136
+ return Y.slice(0, R + 1 || 1);
1137
1137
  }
1138
1138
  function K(H, L) {
1139
- var te, V, M = H.c, Y = L.c, Q = H.s, ie = L.s, ce = H.e, le = L.e;
1139
+ var te, V, R = H.c, Y = L.c, Q = H.s, ie = L.s, ce = H.e, le = L.e;
1140
1140
  if (!Q || !ie) return null;
1141
- if (te = M && !M[0], V = Y && !Y[0], te || V) return te ? V ? 0 : -ie : Q;
1141
+ if (te = R && !R[0], V = Y && !Y[0], te || V) return te ? V ? 0 : -ie : Q;
1142
1142
  if (Q != ie) return Q;
1143
- if (te = Q < 0, V = ce == le, !M || !Y) return V ? 0 : !M ^ te ? 1 : -1;
1143
+ if (te = Q < 0, V = ce == le, !R || !Y) return V ? 0 : !R ^ te ? 1 : -1;
1144
1144
  if (!V) return ce > le ^ te ? 1 : -1;
1145
- for (ie = (ce = M.length) < (le = Y.length) ? ce : le, Q = 0; Q < ie; Q++) if (M[Q] != Y[Q]) return M[Q] > Y[Q] ^ te ? 1 : -1;
1145
+ for (ie = (ce = R.length) < (le = Y.length) ? ce : le, Q = 0; Q < ie; Q++) if (R[Q] != Y[Q]) return R[Q] > Y[Q] ^ te ? 1 : -1;
1146
1146
  return ce == le ? 0 : ce > le ^ te ? 1 : -1;
1147
1147
  }
1148
1148
  function _(H, L, te, V) {
1149
1149
  if (H < L || H > te || H !== a(H))
1150
1150
  throw Error(s + (V || "Argument") + (typeof H == "number" ? H < L || H > te ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(H));
1151
1151
  }
1152
- function N(H) {
1152
+ function D(H) {
1153
1153
  var L = H.c.length - 1;
1154
1154
  return Z(H.e / c) == L && H.c[L] % 2 != 0;
1155
1155
  }
@@ -1157,13 +1157,13 @@ function tn() {
1157
1157
  return (H.length > 1 ? H.charAt(0) + "." + H.slice(1) : H) + (L < 0 ? "e" : "e+") + L;
1158
1158
  }
1159
1159
  function ae(H, L, te) {
1160
- var V, M;
1160
+ var V, R;
1161
1161
  if (L < 0) {
1162
- for (M = te + "."; ++L; M += te) ;
1163
- H = M + H;
1162
+ for (R = te + "."; ++L; R += te) ;
1163
+ H = R + H;
1164
1164
  } else if (V = H.length, ++L > V) {
1165
- for (M = te, L -= V; --L; M += te) ;
1166
- H += M;
1165
+ for (R = te, L -= V; --L; R += te) ;
1166
+ H += R;
1167
1167
  } else L < V && (H = H.slice(0, L) + "." + H.slice(L));
1168
1168
  return H;
1169
1169
  }
@@ -1193,10 +1193,10 @@ function qn() {
1193
1193
  }) + '"' : '"' + p + '"';
1194
1194
  }
1195
1195
  function c(p, u) {
1196
- var m, $, E, Z, W = o, K, _ = u[p], N = _ != null && (_ instanceof e || e.isBigNumber(_));
1196
+ var m, $, E, Z, W = o, K, _ = u[p], D = _ != null && (_ instanceof e || e.isBigNumber(_));
1197
1197
  switch (_ && typeof _ == "object" && typeof _.toJSON == "function" && (_ = _.toJSON(p)), typeof r == "function" && (_ = r.call(u, p, _)), typeof _) {
1198
1198
  case "string":
1199
- return N ? _ : d(_);
1199
+ return D ? _ : d(_);
1200
1200
  case "number":
1201
1201
  return isFinite(_) ? String(_) : "null";
1202
1202
  case "boolean":
@@ -1288,17 +1288,17 @@ function _n() {
1288
1288
  `,
1289
1289
  r: "\r",
1290
1290
  t: " "
1291
- }, c, p = function(N) {
1291
+ }, c, p = function(D) {
1292
1292
  throw {
1293
1293
  name: "SyntaxError",
1294
- message: N,
1294
+ message: D,
1295
1295
  at: s,
1296
1296
  text: c
1297
1297
  };
1298
- }, u = function(N) {
1299
- return N && N !== r && p("Expected '" + N + "' instead of '" + r + "'"), r = c.charAt(s), s += 1, r;
1298
+ }, u = function(D) {
1299
+ return D && D !== r && p("Expected '" + D + "' instead of '" + r + "'"), r = c.charAt(s), s += 1, r;
1300
1300
  }, m = function() {
1301
- var N, J = "";
1301
+ var D, J = "";
1302
1302
  for (r === "-" && (J = "-", u("-")); r >= "0" && r <= "9"; )
1303
1303
  J += r, u();
1304
1304
  if (r === ".")
@@ -1307,20 +1307,20 @@ function _n() {
1307
1307
  if (r === "e" || r === "E")
1308
1308
  for (J += r, u(), (r === "-" || r === "+") && (J += r, u()); r >= "0" && r <= "9"; )
1309
1309
  J += r, u();
1310
- if (N = +J, !isFinite(N))
1310
+ if (D = +J, !isFinite(D))
1311
1311
  p("Bad number");
1312
1312
  else
1313
- return t == null && (t = tn()), J.length > 15 ? a.storeAsString ? J : a.useNativeBigInt ? BigInt(J) : new t(J) : a.alwaysParseAsBig ? a.useNativeBigInt ? BigInt(N) : new t(N) : N;
1313
+ return t == null && (t = tn()), J.length > 15 ? a.storeAsString ? J : a.useNativeBigInt ? BigInt(J) : new t(J) : a.alwaysParseAsBig ? a.useNativeBigInt ? BigInt(D) : new t(D) : D;
1314
1314
  }, $ = function() {
1315
- var N, J, ae = "", H;
1315
+ var D, J, ae = "", H;
1316
1316
  if (r === '"')
1317
1317
  for (var L = s; u(); ) {
1318
1318
  if (r === '"')
1319
1319
  return s - 1 > L && (ae += c.substring(L, s - 1)), u(), ae;
1320
1320
  if (r === "\\") {
1321
1321
  if (s - 1 > L && (ae += c.substring(L, s - 1)), u(), r === "u") {
1322
- for (H = 0, J = 0; J < 4 && (N = parseInt(u(), 16), !!isFinite(N)); J += 1)
1323
- H = H * 16 + N;
1322
+ for (H = 0, J = 0; J < 4 && (D = parseInt(u(), 16), !!isFinite(D)); J += 1)
1323
+ H = H * 16 + D;
1324
1324
  ae += String.fromCharCode(H);
1325
1325
  } else if (typeof d[r] == "string")
1326
1326
  ae += d[r];
@@ -1344,24 +1344,24 @@ function _n() {
1344
1344
  }
1345
1345
  p("Unexpected '" + r + "'");
1346
1346
  }, W, K = function() {
1347
- var N = [];
1347
+ var D = [];
1348
1348
  if (r === "[") {
1349
1349
  if (u("["), E(), r === "]")
1350
- return u("]"), N;
1350
+ return u("]"), D;
1351
1351
  for (; r; ) {
1352
- if (N.push(W()), E(), r === "]")
1353
- return u("]"), N;
1352
+ if (D.push(W()), E(), r === "]")
1353
+ return u("]"), D;
1354
1354
  u(","), E();
1355
1355
  }
1356
1356
  }
1357
1357
  p("Bad array");
1358
1358
  }, _ = function() {
1359
- var N, J = /* @__PURE__ */ Object.create(null);
1359
+ var D, J = /* @__PURE__ */ Object.create(null);
1360
1360
  if (r === "{") {
1361
1361
  if (u("{"), E(), r === "}")
1362
1362
  return u("}"), J;
1363
1363
  for (; r; ) {
1364
- if (N = $(), E(), u(":"), a.strict === !0 && Object.hasOwnProperty.call(J, N) && p('Duplicate key "' + N + '"'), e.test(N) === !0 ? a.protoAction === "error" ? p("Object contains forbidden prototype property") : a.protoAction === "ignore" ? W() : J[N] = W() : n.test(N) === !0 ? a.constructorAction === "error" ? p("Object contains forbidden constructor property") : a.constructorAction === "ignore" ? W() : J[N] = W() : J[N] = W(), E(), r === "}")
1364
+ if (D = $(), E(), u(":"), a.strict === !0 && Object.hasOwnProperty.call(J, D) && p('Duplicate key "' + D + '"'), e.test(D) === !0 ? a.protoAction === "error" ? p("Object contains forbidden prototype property") : a.protoAction === "ignore" ? W() : J[D] = W() : n.test(D) === !0 ? a.constructorAction === "error" ? p("Object contains forbidden constructor property") : a.constructorAction === "ignore" ? W() : J[D] = W() : J[D] = W(), E(), r === "}")
1365
1365
  return u("}"), J;
1366
1366
  u(","), E();
1367
1367
  }
@@ -1381,32 +1381,32 @@ function _n() {
1381
1381
  default:
1382
1382
  return r >= "0" && r <= "9" ? m() : Z();
1383
1383
  }
1384
- }, function(N, J) {
1384
+ }, function(D, J) {
1385
1385
  var ae;
1386
- return c = N + "", s = 0, r = " ", ae = W(), E(), r && p("Syntax error"), typeof J == "function" ? (function H(L, te) {
1387
- var V, M = L[te];
1388
- return M && typeof M == "object" && Object.keys(M).forEach(function(Y) {
1389
- V = H(M, Y), V !== void 0 ? M[Y] = V : delete M[Y];
1390
- }), J.call(L, te, M);
1386
+ return c = D + "", s = 0, r = " ", ae = W(), E(), r && p("Syntax error"), typeof J == "function" ? (function H(L, te) {
1387
+ var V, R = L[te];
1388
+ return R && typeof R == "object" && Object.keys(R).forEach(function(Y) {
1389
+ V = H(R, Y), V !== void 0 ? R[Y] = V : delete R[Y];
1390
+ }), J.call(L, te, R);
1391
1391
  })({ "": ae }, "") : ae;
1392
1392
  };
1393
1393
  };
1394
1394
  return Kt = i, Kt;
1395
1395
  }
1396
- var Hi;
1396
+ var Di;
1397
1397
  function Ln() {
1398
- if (Hi) return dt.exports;
1399
- Hi = 1;
1398
+ if (Di) return lt.exports;
1399
+ Di = 1;
1400
1400
  var t = qn().stringify, e = _n();
1401
- return dt.exports = function(n) {
1401
+ return lt.exports = function(n) {
1402
1402
  return {
1403
1403
  parse: e(n),
1404
1404
  stringify: t
1405
1405
  };
1406
- }, dt.exports.parse = e(), dt.exports.stringify = t, dt.exports;
1406
+ }, lt.exports.parse = e(), lt.exports.stringify = t, lt.exports;
1407
1407
  }
1408
1408
  var Nn = Ln();
1409
- const vi = /* @__PURE__ */ Rn(Nn);
1409
+ const vi = /* @__PURE__ */ Mn(Nn);
1410
1410
  function Ae(t, e, n, i) {
1411
1411
  function o(a) {
1412
1412
  return a instanceof n ? a : new n(function(s) {
@@ -1434,7 +1434,7 @@ function Ae(t, e, n, i) {
1434
1434
  c((i = i.apply(t, e || [])).next());
1435
1435
  });
1436
1436
  }
1437
- function Hn(t, e, n, i) {
1437
+ function Dn(t, e, n, i) {
1438
1438
  if (typeof e == "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1439
1439
  return n === "m" ? i : n === "a" ? i.call(t) : i ? i.value : e.get(t);
1440
1440
  }
@@ -1456,7 +1456,7 @@ class We {
1456
1456
  * @returns {string}
1457
1457
  */
1458
1458
  static unique(e = 7) {
1459
- const n = Hn(jt, jt, "m", nn).call(jt);
1459
+ const n = Dn(jt, jt, "m", nn).call(jt);
1460
1460
  let i = "";
1461
1461
  for (let o = 0; o < e; o++) {
1462
1462
  const a = Math.floor(Math.random() * 16).toString(16);
@@ -1470,7 +1470,7 @@ jt = We, nn = function() {
1470
1470
  return n.toString(16) + i.toString(16).padStart(5, "0");
1471
1471
  };
1472
1472
  const qt = vi({ useNativeBigInt: !0 });
1473
- class x {
1473
+ class P {
1474
1474
  /**
1475
1475
  * Constructor for Query class.
1476
1476
  *
@@ -1494,82 +1494,82 @@ class x {
1494
1494
  });
1495
1495
  }
1496
1496
  }
1497
- x.equal = (t, e) => new x("equal", t, e).toString();
1498
- x.notEqual = (t, e) => new x("notEqual", t, e).toString();
1499
- x.regex = (t, e) => new x("regex", t, e).toString();
1500
- x.lessThan = (t, e) => new x("lessThan", t, e).toString();
1501
- x.lessThanEqual = (t, e) => new x("lessThanEqual", t, e).toString();
1502
- x.greaterThan = (t, e) => new x("greaterThan", t, e).toString();
1503
- x.greaterThanEqual = (t, e) => new x("greaterThanEqual", t, e).toString();
1504
- x.isNull = (t) => new x("isNull", t).toString();
1505
- x.isNotNull = (t) => new x("isNotNull", t).toString();
1506
- x.exists = (t) => new x("exists", void 0, t).toString();
1507
- x.notExists = (t) => new x("notExists", void 0, t).toString();
1508
- x.between = (t, e, n) => new x("between", t, [
1497
+ P.equal = (t, e) => new P("equal", t, e).toString();
1498
+ P.notEqual = (t, e) => new P("notEqual", t, e).toString();
1499
+ P.regex = (t, e) => new P("regex", t, e).toString();
1500
+ P.lessThan = (t, e) => new P("lessThan", t, e).toString();
1501
+ P.lessThanEqual = (t, e) => new P("lessThanEqual", t, e).toString();
1502
+ P.greaterThan = (t, e) => new P("greaterThan", t, e).toString();
1503
+ P.greaterThanEqual = (t, e) => new P("greaterThanEqual", t, e).toString();
1504
+ P.isNull = (t) => new P("isNull", t).toString();
1505
+ P.isNotNull = (t) => new P("isNotNull", t).toString();
1506
+ P.exists = (t) => new P("exists", void 0, t).toString();
1507
+ P.notExists = (t) => new P("notExists", void 0, t).toString();
1508
+ P.between = (t, e, n) => new P("between", t, [
1509
1509
  e,
1510
1510
  n
1511
1511
  ]).toString();
1512
- x.startsWith = (t, e) => new x("startsWith", t, e).toString();
1513
- x.endsWith = (t, e) => new x("endsWith", t, e).toString();
1514
- x.select = (t) => new x("select", void 0, t).toString();
1515
- x.search = (t, e) => new x("search", t, e).toString();
1516
- x.orderDesc = (t) => new x("orderDesc", t).toString();
1517
- x.orderAsc = (t) => new x("orderAsc", t).toString();
1518
- x.orderRandom = () => new x("orderRandom").toString();
1519
- x.cursorAfter = (t) => new x("cursorAfter", void 0, t).toString();
1520
- x.cursorBefore = (t) => new x("cursorBefore", void 0, t).toString();
1521
- x.limit = (t) => new x("limit", void 0, t).toString();
1522
- x.offset = (t) => new x("offset", void 0, t).toString();
1523
- x.contains = (t, e) => new x("contains", t, e).toString();
1524
- x.containsAny = (t, e) => new x("containsAny", t, e).toString();
1525
- x.containsAll = (t, e) => new x("containsAll", t, e).toString();
1526
- x.notContains = (t, e) => new x("notContains", t, e).toString();
1527
- x.notSearch = (t, e) => new x("notSearch", t, e).toString();
1528
- x.notBetween = (t, e, n) => new x("notBetween", t, [
1512
+ P.startsWith = (t, e) => new P("startsWith", t, e).toString();
1513
+ P.endsWith = (t, e) => new P("endsWith", t, e).toString();
1514
+ P.select = (t) => new P("select", void 0, t).toString();
1515
+ P.search = (t, e) => new P("search", t, e).toString();
1516
+ P.orderDesc = (t) => new P("orderDesc", t).toString();
1517
+ P.orderAsc = (t) => new P("orderAsc", t).toString();
1518
+ P.orderRandom = () => new P("orderRandom").toString();
1519
+ P.cursorAfter = (t) => new P("cursorAfter", void 0, t).toString();
1520
+ P.cursorBefore = (t) => new P("cursorBefore", void 0, t).toString();
1521
+ P.limit = (t) => new P("limit", void 0, t).toString();
1522
+ P.offset = (t) => new P("offset", void 0, t).toString();
1523
+ P.contains = (t, e) => new P("contains", t, e).toString();
1524
+ P.containsAny = (t, e) => new P("containsAny", t, e).toString();
1525
+ P.containsAll = (t, e) => new P("containsAll", t, e).toString();
1526
+ P.notContains = (t, e) => new P("notContains", t, e).toString();
1527
+ P.notSearch = (t, e) => new P("notSearch", t, e).toString();
1528
+ P.notBetween = (t, e, n) => new P("notBetween", t, [
1529
1529
  e,
1530
1530
  n
1531
1531
  ]).toString();
1532
- x.notStartsWith = (t, e) => new x("notStartsWith", t, e).toString();
1533
- x.notEndsWith = (t, e) => new x("notEndsWith", t, e).toString();
1534
- x.createdBefore = (t) => x.lessThan("$createdAt", t);
1535
- x.createdAfter = (t) => x.greaterThan("$createdAt", t);
1536
- x.createdBetween = (t, e) => x.between("$createdAt", t, e);
1537
- x.updatedBefore = (t) => x.lessThan("$updatedAt", t);
1538
- x.updatedAfter = (t) => x.greaterThan("$updatedAt", t);
1539
- x.updatedBetween = (t, e) => x.between("$updatedAt", t, e);
1540
- x.or = (t) => new x("or", void 0, t.map((e) => qt.parse(e))).toString();
1541
- x.and = (t) => new x("and", void 0, t.map((e) => qt.parse(e))).toString();
1542
- x.elemMatch = (t, e) => new x("elemMatch", t, e.map((n) => qt.parse(n))).toString();
1543
- x.distanceEqual = (t, e, n, i = !0) => new x("distanceEqual", t, [
1532
+ P.notStartsWith = (t, e) => new P("notStartsWith", t, e).toString();
1533
+ P.notEndsWith = (t, e) => new P("notEndsWith", t, e).toString();
1534
+ P.createdBefore = (t) => P.lessThan("$createdAt", t);
1535
+ P.createdAfter = (t) => P.greaterThan("$createdAt", t);
1536
+ P.createdBetween = (t, e) => P.between("$createdAt", t, e);
1537
+ P.updatedBefore = (t) => P.lessThan("$updatedAt", t);
1538
+ P.updatedAfter = (t) => P.greaterThan("$updatedAt", t);
1539
+ P.updatedBetween = (t, e) => P.between("$updatedAt", t, e);
1540
+ P.or = (t) => new P("or", void 0, t.map((e) => qt.parse(e))).toString();
1541
+ P.and = (t) => new P("and", void 0, t.map((e) => qt.parse(e))).toString();
1542
+ P.elemMatch = (t, e) => new P("elemMatch", t, e.map((n) => qt.parse(n))).toString();
1543
+ P.distanceEqual = (t, e, n, i = !0) => new P("distanceEqual", t, [
1544
1544
  [e, n, i]
1545
1545
  ]).toString();
1546
- x.distanceNotEqual = (t, e, n, i = !0) => new x("distanceNotEqual", t, [
1546
+ P.distanceNotEqual = (t, e, n, i = !0) => new P("distanceNotEqual", t, [
1547
1547
  [e, n, i]
1548
1548
  ]).toString();
1549
- x.distanceGreaterThan = (t, e, n, i = !0) => new x("distanceGreaterThan", t, [
1549
+ P.distanceGreaterThan = (t, e, n, i = !0) => new P("distanceGreaterThan", t, [
1550
1550
  [e, n, i]
1551
1551
  ]).toString();
1552
- x.distanceLessThan = (t, e, n, i = !0) => new x("distanceLessThan", t, [
1552
+ P.distanceLessThan = (t, e, n, i = !0) => new P("distanceLessThan", t, [
1553
1553
  [e, n, i]
1554
1554
  ]).toString();
1555
- x.vectorDot = (t, e) => new x("vectorDot", t, [
1555
+ P.vectorDot = (t, e) => new P("vectorDot", t, [
1556
1556
  e
1557
1557
  ]).toString();
1558
- x.vectorCosine = (t, e) => new x("vectorCosine", t, [
1558
+ P.vectorCosine = (t, e) => new P("vectorCosine", t, [
1559
1559
  e
1560
1560
  ]).toString();
1561
- x.vectorEuclidean = (t, e) => new x("vectorEuclidean", t, [
1561
+ P.vectorEuclidean = (t, e) => new P("vectorEuclidean", t, [
1562
1562
  e
1563
1563
  ]).toString();
1564
- x.intersects = (t, e) => new x("intersects", t, [e]).toString();
1565
- x.notIntersects = (t, e) => new x("notIntersects", t, [e]).toString();
1566
- x.crosses = (t, e) => new x("crosses", t, [e]).toString();
1567
- x.notCrosses = (t, e) => new x("notCrosses", t, [e]).toString();
1568
- x.overlaps = (t, e) => new x("overlaps", t, [e]).toString();
1569
- x.notOverlaps = (t, e) => new x("notOverlaps", t, [e]).toString();
1570
- x.touches = (t, e) => new x("touches", t, [e]).toString();
1571
- x.notTouches = (t, e) => new x("notTouches", t, [e]).toString();
1572
- const Dn = vi({ storeAsString: !1 }), Bn = vi({ useNativeBigInt: !0 }), Xn = BigInt(Number.MAX_SAFE_INTEGER), Vn = BigInt(Number.MIN_SAFE_INTEGER), Wn = BigInt("9223372036854775807"), Gn = BigInt("-9223372036854775808");
1564
+ P.intersects = (t, e) => new P("intersects", t, [e]).toString();
1565
+ P.notIntersects = (t, e) => new P("notIntersects", t, [e]).toString();
1566
+ P.crosses = (t, e) => new P("crosses", t, [e]).toString();
1567
+ P.notCrosses = (t, e) => new P("notCrosses", t, [e]).toString();
1568
+ P.overlaps = (t, e) => new P("overlaps", t, [e]).toString();
1569
+ P.notOverlaps = (t, e) => new P("notOverlaps", t, [e]).toString();
1570
+ P.touches = (t, e) => new P("touches", t, [e]).toString();
1571
+ P.notTouches = (t, e) => new P("notTouches", t, [e]).toString();
1572
+ const Hn = vi({ storeAsString: !1 }), Bn = vi({ useNativeBigInt: !0 }), Xn = BigInt(Number.MAX_SAFE_INTEGER), Vn = BigInt(Number.MIN_SAFE_INTEGER), Wn = BigInt("9223372036854775807"), Gn = BigInt("-9223372036854775808");
1573
1573
  function Kn(t) {
1574
1574
  return t !== null && typeof t == "object" && t._isBigNumber === !0 && typeof t.isInteger == "function" && typeof t.toFixed == "function" && typeof t.toNumber == "function";
1575
1575
  }
@@ -1584,7 +1584,7 @@ function Yn(t, e) {
1584
1584
  return e;
1585
1585
  }
1586
1586
  const ve = {
1587
- parse: (t) => Dn.parse(t, Yn),
1587
+ parse: (t) => Hn.parse(t, Yn),
1588
1588
  stringify: Bn.stringify
1589
1589
  };
1590
1590
  class h extends Error {
@@ -1600,7 +1600,7 @@ class h extends Error {
1600
1600
  super(e), this.name = "AppwriteException", this.message = e, this.code = n, this.type = i, this.response = o;
1601
1601
  }
1602
1602
  }
1603
- class Pe {
1603
+ class xe {
1604
1604
  constructor() {
1605
1605
  this.config = {
1606
1606
  endpoint: "https://cloud.appwrite.io/v1",
@@ -1991,7 +1991,7 @@ class Pe {
1991
1991
  headers: i
1992
1992
  };
1993
1993
  if (i["X-Appwrite-Dev-Key"] === void 0 && (a.credentials = "include"), e === "GET")
1994
- for (const [s, r] of Object.entries(Pe.flatten(o)))
1994
+ for (const [s, r] of Object.entries(xe.flatten(o)))
1995
1995
  n.searchParams.append(s, r);
1996
1996
  else
1997
1997
  switch (i["content-type"]) {
@@ -2020,9 +2020,9 @@ class Pe {
2020
2020
  const [c, p] = (d = Object.entries(s).find(([Y, Q]) => Q instanceof File)) !== null && d !== void 0 ? d : [];
2021
2021
  if (!p || !c)
2022
2022
  throw new Error("File not found in payload");
2023
- if (p.size <= Pe.CHUNK_SIZE)
2023
+ if (p.size <= xe.CHUNK_SIZE)
2024
2024
  return yield this.call(i, o, a, s);
2025
- const u = Math.ceil(p.size / Pe.CHUNK_SIZE), m = Math.min(Pe.CHUNK_SIZE, p.size), $ = Object.assign(Object.assign({}, a), { "content-range": `bytes 0-${m - 1}/${p.size}` }), E = p.slice(0, m), Z = Object.assign({}, s);
2025
+ const u = Math.ceil(p.size / xe.CHUNK_SIZE), m = Math.min(xe.CHUNK_SIZE, p.size), $ = Object.assign(Object.assign({}, a), { "content-range": `bytes 0-${m - 1}/${p.size}` }), E = p.slice(0, m), Z = Object.assign({}, s);
2026
2026
  Z[c] = new File([E], p.name);
2027
2027
  const W = yield this.call(i, o, $, Z), K = W?.$id;
2028
2028
  if (r && typeof r == "function" && r({
@@ -2035,16 +2035,16 @@ class Pe {
2035
2035
  return W;
2036
2036
  const _ = [];
2037
2037
  for (let Y = 1; Y < u; Y++) {
2038
- const Q = Y * Pe.CHUNK_SIZE, ie = Math.min(Q + Pe.CHUNK_SIZE, p.size);
2038
+ const Q = Y * xe.CHUNK_SIZE, ie = Math.min(Q + xe.CHUNK_SIZE, p.size);
2039
2039
  _.push({ start: Q, end: ie });
2040
2040
  }
2041
- const N = 8;
2041
+ const D = 8;
2042
2042
  let J = 1, ae = m, H = W, L = null, te = !1;
2043
2043
  const V = (Y) => {
2044
2044
  var Q;
2045
2045
  const ie = Y?.chunksUploaded, ce = (Q = Y?.chunksTotal) !== null && Q !== void 0 ? Q : u;
2046
2046
  return typeof ie == "number" && typeof ce == "number" && ie >= ce;
2047
- }, M = (Y) => Ae(this, void 0, void 0, function* () {
2047
+ }, R = (Y) => Ae(this, void 0, void 0, function* () {
2048
2048
  const Q = Object.assign({}, a);
2049
2049
  K && (Q["x-appwrite-id"] = K), Q["content-range"] = `bytes ${Y.start}-${Y.end - 1}/${p.size}`;
2050
2050
  const ie = p.slice(Y.start, Y.end), ce = Object.assign({}, s);
@@ -2060,23 +2060,23 @@ class Pe {
2060
2060
  });
2061
2061
  return yield new Promise((Y, Q) => {
2062
2062
  let ie = 0, ce = 0, le = 0;
2063
- const Me = () => {
2063
+ const Re = () => {
2064
2064
  if (!te) {
2065
2065
  if (le === _.length) {
2066
2066
  Y();
2067
2067
  return;
2068
2068
  }
2069
- for (; ce < N && ie < _.length; ) {
2069
+ for (; ce < D && ie < _.length; ) {
2070
2070
  const ke = _[ie++];
2071
- ce++, M(ke).then(() => {
2072
- ce--, le++, Me();
2071
+ ce++, R(ke).then(() => {
2072
+ ce--, le++, Re();
2073
2073
  }).catch((_e) => {
2074
2074
  te = !0, Q(_e);
2075
2075
  });
2076
2076
  }
2077
2077
  }
2078
2078
  };
2079
- Me();
2079
+ Re();
2080
2080
  }), L ?? H;
2081
2081
  });
2082
2082
  }
@@ -2116,13 +2116,13 @@ class Pe {
2116
2116
  let i = {};
2117
2117
  for (const [o, a] of Object.entries(e)) {
2118
2118
  const s = n ? n + "[" + o + "]" : o;
2119
- Array.isArray(a) ? i = Object.assign(Object.assign({}, i), Pe.flatten(a, s)) : i[s] = a;
2119
+ Array.isArray(a) ? i = Object.assign(Object.assign({}, i), xe.flatten(a, s)) : i[s] = a;
2120
2120
  }
2121
2121
  return i;
2122
2122
  }
2123
2123
  }
2124
- Pe.CHUNK_SIZE = 1024 * 1024 * 5;
2125
- class me {
2124
+ xe.CHUNK_SIZE = 1024 * 1024 * 5;
2125
+ class we {
2126
2126
  constructor(e) {
2127
2127
  this.client = e;
2128
2128
  }
@@ -2130,12 +2130,12 @@ class me {
2130
2130
  let i = {};
2131
2131
  for (const [o, a] of Object.entries(e)) {
2132
2132
  const s = n ? n + "[" + o + "]" : o;
2133
- Array.isArray(a) ? i = Object.assign(Object.assign({}, i), me.flatten(a, s)) : i[s] = a;
2133
+ Array.isArray(a) ? i = Object.assign(Object.assign({}, i), we.flatten(a, s)) : i[s] = a;
2134
2134
  }
2135
2135
  return i;
2136
2136
  }
2137
2137
  }
2138
- me.CHUNK_SIZE = 5 * 1024 * 1024;
2138
+ we.CHUNK_SIZE = 5 * 1024 * 1024;
2139
2139
  class Yt {
2140
2140
  constructor(e) {
2141
2141
  this.client = e;
@@ -2873,7 +2873,7 @@ class Yt {
2873
2873
  typeof a < "u" && (c.success = a), typeof s < "u" && (c.failure = s), typeof r < "u" && (c.scopes = r);
2874
2874
  const p = new URL(this.client.config.endpoint + d);
2875
2875
  c.project = this.client.config.project;
2876
- for (const [u, m] of Object.entries(me.flatten(c)))
2876
+ for (const [u, m] of Object.entries(we.flatten(c)))
2877
2877
  p.searchParams.append(u, m);
2878
2878
  if (typeof window < "u" && window?.location) {
2879
2879
  window.location.href = p.toString();
@@ -3091,7 +3091,7 @@ class Yt {
3091
3091
  typeof a < "u" && (c.success = a), typeof s < "u" && (c.failure = s), typeof r < "u" && (c.scopes = r);
3092
3092
  const p = new URL(this.client.config.endpoint + d);
3093
3093
  c.project = this.client.config.project;
3094
- for (const [u, m] of Object.entries(me.flatten(c)))
3094
+ for (const [u, m] of Object.entries(we.flatten(c)))
3095
3095
  p.searchParams.append(u, m);
3096
3096
  if (typeof window < "u" && window?.location) {
3097
3097
  window.location.href = p.toString();
@@ -3247,7 +3247,7 @@ class on {
3247
3247
  typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
3248
3248
  const p = new URL(this.client.config.endpoint + d);
3249
3249
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3250
- for (const [u, m] of Object.entries(me.flatten(c)))
3250
+ for (const [u, m] of Object.entries(we.flatten(c)))
3251
3251
  p.searchParams.append(u, m);
3252
3252
  return p.toString();
3253
3253
  }
@@ -3266,7 +3266,7 @@ class on {
3266
3266
  typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
3267
3267
  const p = new URL(this.client.config.endpoint + d);
3268
3268
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3269
- for (const [u, m] of Object.entries(me.flatten(c)))
3269
+ for (const [u, m] of Object.entries(we.flatten(c)))
3270
3270
  p.searchParams.append(u, m);
3271
3271
  return p.toString();
3272
3272
  }
@@ -3282,7 +3282,7 @@ class on {
3282
3282
  typeof i < "u" && (a.url = i);
3283
3283
  const s = new URL(this.client.config.endpoint + o);
3284
3284
  a.project = this.client.config.project, a.impersonateuserid = this.client.config.impersonateuserid;
3285
- for (const [r, d] of Object.entries(me.flatten(a)))
3285
+ for (const [r, d] of Object.entries(we.flatten(a)))
3286
3286
  s.searchParams.append(r, d);
3287
3287
  return s.toString();
3288
3288
  }
@@ -3301,7 +3301,7 @@ class on {
3301
3301
  typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
3302
3302
  const p = new URL(this.client.config.endpoint + d);
3303
3303
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3304
- for (const [u, m] of Object.entries(me.flatten(c)))
3304
+ for (const [u, m] of Object.entries(we.flatten(c)))
3305
3305
  p.searchParams.append(u, m);
3306
3306
  return p.toString();
3307
3307
  }
@@ -3319,7 +3319,7 @@ class on {
3319
3319
  typeof o < "u" && (d.url = o), typeof a < "u" && (d.width = a), typeof s < "u" && (d.height = s);
3320
3320
  const c = new URL(this.client.config.endpoint + r);
3321
3321
  d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
3322
- for (const [p, u] of Object.entries(me.flatten(d)))
3322
+ for (const [p, u] of Object.entries(we.flatten(d)))
3323
3323
  c.searchParams.append(p, u);
3324
3324
  return c.toString();
3325
3325
  }
@@ -3335,7 +3335,7 @@ class on {
3335
3335
  typeof o < "u" && (c.name = o), typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.background = r);
3336
3336
  const p = new URL(this.client.config.endpoint + d);
3337
3337
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3338
- for (const [u, m] of Object.entries(me.flatten(c)))
3338
+ for (const [u, m] of Object.entries(we.flatten(c)))
3339
3339
  p.searchParams.append(u, m);
3340
3340
  return p.toString();
3341
3341
  }
@@ -3355,7 +3355,7 @@ class on {
3355
3355
  typeof o < "u" && ($.width = o), typeof a < "u" && ($.height = a), typeof s < "u" && ($.quality = s), typeof r < "u" && ($.output = r), typeof d < "u" && ($.rating = d), typeof c < "u" && ($.userId = c), typeof p < "u" && ($.emailHash = p), typeof u < "u" && ($.name = u);
3356
3356
  const E = new URL(this.client.config.endpoint + m);
3357
3357
  $.project = this.client.config.project, $.impersonateuserid = this.client.config.impersonateuserid;
3358
- for (const [Z, W] of Object.entries(me.flatten($)))
3358
+ for (const [Z, W] of Object.entries(we.flatten($)))
3359
3359
  E.searchParams.append(Z, W);
3360
3360
  return E.toString();
3361
3361
  }
@@ -3374,7 +3374,7 @@ class on {
3374
3374
  typeof o < "u" && (c.text = o), typeof a < "u" && (c.size = a), typeof s < "u" && (c.margin = s), typeof r < "u" && (c.download = r);
3375
3375
  const p = new URL(this.client.config.endpoint + d);
3376
3376
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3377
- for (const [u, m] of Object.entries(me.flatten(c)))
3377
+ for (const [u, m] of Object.entries(we.flatten(c)))
3378
3378
  p.searchParams.append(u, m);
3379
3379
  return p.toString();
3380
3380
  }
@@ -3402,16 +3402,16 @@ class on {
3402
3402
  quality: n[17],
3403
3403
  output: n[18]
3404
3404
  };
3405
- const o = i.url, a = i.headers, s = i.viewportWidth, r = i.viewportHeight, d = i.scale, c = i.theme, p = i.userAgent, u = i.fullpage, m = i.locale, $ = i.timezone, E = i.latitude, Z = i.longitude, W = i.accuracy, K = i.touch, _ = i.permissions, N = i.sleep, J = i.width, ae = i.height, H = i.quality, L = i.output;
3405
+ const o = i.url, a = i.headers, s = i.viewportWidth, r = i.viewportHeight, d = i.scale, c = i.theme, p = i.userAgent, u = i.fullpage, m = i.locale, $ = i.timezone, E = i.latitude, Z = i.longitude, W = i.accuracy, K = i.touch, _ = i.permissions, D = i.sleep, J = i.width, ae = i.height, H = i.quality, L = i.output;
3406
3406
  if (typeof o > "u")
3407
3407
  throw new h('Missing required parameter: "url"');
3408
3408
  const te = "/avatars/screenshots", V = {};
3409
- typeof o < "u" && (V.url = o), typeof a < "u" && (V.headers = a), typeof s < "u" && (V.viewportWidth = s), typeof r < "u" && (V.viewportHeight = r), typeof d < "u" && (V.scale = d), typeof c < "u" && (V.theme = c), typeof p < "u" && (V.userAgent = p), typeof u < "u" && (V.fullpage = u), typeof m < "u" && (V.locale = m), typeof $ < "u" && (V.timezone = $), typeof E < "u" && (V.latitude = E), typeof Z < "u" && (V.longitude = Z), typeof W < "u" && (V.accuracy = W), typeof K < "u" && (V.touch = K), typeof _ < "u" && (V.permissions = _), typeof N < "u" && (V.sleep = N), typeof J < "u" && (V.width = J), typeof ae < "u" && (V.height = ae), typeof H < "u" && (V.quality = H), typeof L < "u" && (V.output = L);
3410
- const M = new URL(this.client.config.endpoint + te);
3409
+ typeof o < "u" && (V.url = o), typeof a < "u" && (V.headers = a), typeof s < "u" && (V.viewportWidth = s), typeof r < "u" && (V.viewportHeight = r), typeof d < "u" && (V.scale = d), typeof c < "u" && (V.theme = c), typeof p < "u" && (V.userAgent = p), typeof u < "u" && (V.fullpage = u), typeof m < "u" && (V.locale = m), typeof $ < "u" && (V.timezone = $), typeof E < "u" && (V.latitude = E), typeof Z < "u" && (V.longitude = Z), typeof W < "u" && (V.accuracy = W), typeof K < "u" && (V.touch = K), typeof _ < "u" && (V.permissions = _), typeof D < "u" && (V.sleep = D), typeof J < "u" && (V.width = J), typeof ae < "u" && (V.height = ae), typeof H < "u" && (V.quality = H), typeof L < "u" && (V.output = L);
3410
+ const R = new URL(this.client.config.endpoint + te);
3411
3411
  V.project = this.client.config.project, V.impersonateuserid = this.client.config.impersonateuserid;
3412
- for (const [Y, Q] of Object.entries(me.flatten(V)))
3413
- M.searchParams.append(Y, Q);
3414
- return M.toString();
3412
+ for (const [Y, Q] of Object.entries(we.flatten(V)))
3413
+ R.searchParams.append(Y, Q);
3414
+ return R.toString();
3415
3415
  }
3416
3416
  }
3417
3417
  class Jn {
@@ -4605,7 +4605,7 @@ class to {
4605
4605
  typeof s < "u" && (d.token = s);
4606
4606
  const c = new URL(this.client.config.endpoint + r);
4607
4607
  d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
4608
- for (const [p, u] of Object.entries(me.flatten(d)))
4608
+ for (const [p, u] of Object.entries(we.flatten(d)))
4609
4609
  c.searchParams.append(p, u);
4610
4610
  return c.toString();
4611
4611
  }
@@ -4632,11 +4632,11 @@ class to {
4632
4632
  throw new h('Missing required parameter: "bucketId"');
4633
4633
  if (typeof a > "u")
4634
4634
  throw new h('Missing required parameter: "fileId"');
4635
- const _ = "/storage/buckets/{bucketId}/files/{fileId}/preview".replace("{bucketId}", encodeURIComponent(String(o))).replace("{fileId}", encodeURIComponent(String(a))), N = {};
4636
- typeof s < "u" && (N.width = s), typeof r < "u" && (N.height = r), typeof d < "u" && (N.gravity = d), typeof c < "u" && (N.quality = c), typeof p < "u" && (N.borderWidth = p), typeof u < "u" && (N.borderColor = u), typeof m < "u" && (N.borderRadius = m), typeof $ < "u" && (N.opacity = $), typeof E < "u" && (N.rotation = E), typeof Z < "u" && (N.background = Z), typeof W < "u" && (N.output = W), typeof K < "u" && (N.token = K);
4635
+ const _ = "/storage/buckets/{bucketId}/files/{fileId}/preview".replace("{bucketId}", encodeURIComponent(String(o))).replace("{fileId}", encodeURIComponent(String(a))), D = {};
4636
+ typeof s < "u" && (D.width = s), typeof r < "u" && (D.height = r), typeof d < "u" && (D.gravity = d), typeof c < "u" && (D.quality = c), typeof p < "u" && (D.borderWidth = p), typeof u < "u" && (D.borderColor = u), typeof m < "u" && (D.borderRadius = m), typeof $ < "u" && (D.opacity = $), typeof E < "u" && (D.rotation = E), typeof Z < "u" && (D.background = Z), typeof W < "u" && (D.output = W), typeof K < "u" && (D.token = K);
4637
4637
  const J = new URL(this.client.config.endpoint + _);
4638
- N.project = this.client.config.project, N.impersonateuserid = this.client.config.impersonateuserid;
4639
- for (const [ae, H] of Object.entries(me.flatten(N)))
4638
+ D.project = this.client.config.project, D.impersonateuserid = this.client.config.impersonateuserid;
4639
+ for (const [ae, H] of Object.entries(we.flatten(D)))
4640
4640
  J.searchParams.append(ae, H);
4641
4641
  return J.toString();
4642
4642
  }
@@ -4656,7 +4656,7 @@ class to {
4656
4656
  typeof s < "u" && (d.token = s);
4657
4657
  const c = new URL(this.client.config.endpoint + r);
4658
4658
  d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
4659
- for (const [p, u] of Object.entries(me.flatten(d)))
4659
+ for (const [p, u] of Object.entries(we.flatten(d)))
4660
4660
  c.searchParams.append(p, u);
4661
4661
  return c.toString();
4662
4662
  }
@@ -5914,13 +5914,13 @@ class oo {
5914
5914
  }
5915
5915
  }
5916
5916
  }
5917
- class at {
5917
+ class st {
5918
5918
  }
5919
- at.read = (t) => `read("${t}")`;
5920
- at.write = (t) => `write("${t}")`;
5921
- at.create = (t) => `create("${t}")`;
5922
- at.update = (t) => `update("${t}")`;
5923
- at.delete = (t) => `delete("${t}")`;
5919
+ st.read = (t) => `read("${t}")`;
5920
+ st.write = (t) => `write("${t}")`;
5921
+ st.create = (t) => `create("${t}")`;
5922
+ st.update = (t) => `update("${t}")`;
5923
+ st.delete = (t) => `delete("${t}")`;
5924
5924
  class ao {
5925
5925
  /**
5926
5926
  * Grants access to anyone.
@@ -6010,16 +6010,16 @@ function Ne(t) {
6010
6010
  throw new Error("Channel ID is required");
6011
6011
  return e;
6012
6012
  }
6013
- class xe {
6013
+ class Pe {
6014
6014
  constructor(e) {
6015
6015
  this.segments = e;
6016
6016
  }
6017
6017
  next(e, n) {
6018
6018
  const i = n === void 0 ? [...this.segments, e] : [...this.segments, e, Ne(n)];
6019
- return new xe(i);
6019
+ return new Pe(i);
6020
6020
  }
6021
6021
  resolve(e) {
6022
- return new xe([...this.segments, e]);
6022
+ return new Pe([...this.segments, e]);
6023
6023
  }
6024
6024
  toString() {
6025
6025
  return this.segments.join(".");
@@ -6060,28 +6060,28 @@ class xe {
6060
6060
  }
6061
6061
  // --- ROOT FACTORIES ---
6062
6062
  static database(e) {
6063
- return new xe(["databases", Ne(e)]);
6063
+ return new Pe(["databases", Ne(e)]);
6064
6064
  }
6065
6065
  static execution(e) {
6066
- return new xe(["executions", Ne(e)]);
6066
+ return new Pe(["executions", Ne(e)]);
6067
6067
  }
6068
6068
  static tablesdb(e) {
6069
- return new xe(["tablesdb", Ne(e)]);
6069
+ return new Pe(["tablesdb", Ne(e)]);
6070
6070
  }
6071
6071
  static bucket(e) {
6072
- return new xe(["buckets", Ne(e)]);
6072
+ return new Pe(["buckets", Ne(e)]);
6073
6073
  }
6074
6074
  static function(e) {
6075
- return new xe(["functions", Ne(e)]);
6075
+ return new Pe(["functions", Ne(e)]);
6076
6076
  }
6077
6077
  static team(e) {
6078
- return new xe(["teams", Ne(e)]);
6078
+ return new Pe(["teams", Ne(e)]);
6079
6079
  }
6080
6080
  static membership(e) {
6081
- return new xe(["memberships", Ne(e)]);
6081
+ return new Pe(["memberships", Ne(e)]);
6082
6082
  }
6083
6083
  static presence(e) {
6084
- return new xe(["presences", Ne(e)]);
6084
+ return new Pe(["presences", Ne(e)]);
6085
6085
  }
6086
6086
  static account() {
6087
6087
  return "account";
@@ -6284,8 +6284,8 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6284
6284
  get BrowserTheme() {
6285
6285
  return ei;
6286
6286
  },
6287
- Channel: xe,
6288
- Client: Pe,
6287
+ Channel: Pe,
6288
+ Client: xe,
6289
6289
  get Condition() {
6290
6290
  return Jt;
6291
6291
  },
@@ -6325,9 +6325,9 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6325
6325
  },
6326
6326
  Operator: T,
6327
6327
  Organization: Fn,
6328
- Permission: at,
6328
+ Permission: st,
6329
6329
  Presences: eo,
6330
- Query: x,
6330
+ Query: P,
6331
6331
  Realtime: oo,
6332
6332
  Role: ao,
6333
6333
  Storage: to,
@@ -6415,7 +6415,7 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6415
6415
  twoFactor: "Two-factor authentication",
6416
6416
  mfaBadge: "MFA",
6417
6417
  twoFactorDescription: "Require a second factor when signing in to this account.",
6418
- mfaNoFactorWarning: "Turn on an authenticator, or verify your email or phone, before enabling two-factor authentication. Without a factor, this setting does not protect the account.",
6418
+ mfaNoFactorWarning: "Two-factor authentication is on, but no factors are set up yet. Add an authenticator, or verify your email or phone. Without a factor, this setting does not protect the account.",
6419
6419
  enable: "Enable",
6420
6420
  disable: "Disable",
6421
6421
  authenticatorApp: "Authenticator app",
@@ -6571,7 +6571,7 @@ const co = {
6571
6571
  function pt(t) {
6572
6572
  return co[t] ?? t.charAt(0).toUpperCase() + t.slice(1);
6573
6573
  }
6574
- const At = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }), Ce = () => (/* @__PURE__ */ new Date()).toISOString(), He = (t) => new Date(Date.now() - t * 6e4).toISOString(), kt = [
6574
+ const At = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }), Ce = () => (/* @__PURE__ */ new Date()).toISOString(), De = (t) => new Date(Date.now() - t * 6e4).toISOString(), kt = [
6575
6575
  "amber",
6576
6576
  "brave",
6577
6577
  "calm",
@@ -6584,7 +6584,7 @@ const At = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }),
6584
6584
  "juniper",
6585
6585
  "kite",
6586
6586
  "lumen"
6587
- ], Di = () => `${kt[Math.floor(Math.random() * kt.length)]}-${kt[Math.floor(Math.random() * kt.length)]}`, Oe = () => Math.random().toString(36).slice(2, 12), Bi = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), lo = {
6587
+ ], Hi = () => `${kt[Math.floor(Math.random() * kt.length)]}-${kt[Math.floor(Math.random() * kt.length)]}`, Oe = () => Math.random().toString(36).slice(2, 12), Bi = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), lo = {
6588
6588
  name: "Ada Lovelace",
6589
6589
  email: "ada@example.com",
6590
6590
  phone: "+15550100"
@@ -6598,13 +6598,13 @@ class uo {
6598
6598
  const n = e.anonymous ?? !1;
6599
6599
  return this.user = {
6600
6600
  $id: "preview-user",
6601
- $createdAt: He(1440 * 30),
6601
+ $createdAt: De(1440 * 30),
6602
6602
  $updatedAt: Ce(),
6603
6603
  name: n ? "" : e.name ?? this.seed.name,
6604
- registration: He(1440 * 30),
6604
+ registration: De(1440 * 30),
6605
6605
  status: !0,
6606
6606
  labels: [],
6607
- passwordUpdate: n ? "" : He(1440 * 7),
6607
+ passwordUpdate: n ? "" : De(1440 * 7),
6608
6608
  email: n ? "" : e.email ?? this.seed.email,
6609
6609
  phone: n ? "" : e.phone ?? this.seed.phone,
6610
6610
  emailVerification: !n,
@@ -6655,7 +6655,7 @@ class uo {
6655
6655
  {
6656
6656
  ...n,
6657
6657
  $id: Oe(),
6658
- $createdAt: He(300),
6658
+ $createdAt: De(300),
6659
6659
  provider: e,
6660
6660
  ip: "198.51.100.7",
6661
6661
  osCode: "IOS",
@@ -6672,7 +6672,7 @@ class uo {
6672
6672
  {
6673
6673
  ...n,
6674
6674
  $id: Oe(),
6675
- $createdAt: He(1440 * 3),
6675
+ $createdAt: De(1440 * 3),
6676
6676
  provider: "oauth2",
6677
6677
  ip: "192.0.2.90",
6678
6678
  osCode: "WIN",
@@ -6687,8 +6687,8 @@ class uo {
6687
6687
  ], this.identities = [
6688
6688
  {
6689
6689
  $id: "identity-github",
6690
- $createdAt: He(1440 * 20),
6691
- $updatedAt: He(1440 * 20),
6690
+ $createdAt: De(1440 * 20),
6691
+ $updatedAt: De(1440 * 20),
6692
6692
  userId: "preview-user",
6693
6693
  provider: "github",
6694
6694
  providerUid: "8675309",
@@ -6708,7 +6708,7 @@ class uo {
6708
6708
  },
6709
6709
  {
6710
6710
  event: "user.update.name",
6711
- time: He(1440 * 2),
6711
+ time: De(1440 * 2),
6712
6712
  clientName: "Safari",
6713
6713
  osName: "iOS",
6714
6714
  countryName: "Germany",
@@ -6716,7 +6716,7 @@ class uo {
6716
6716
  },
6717
6717
  {
6718
6718
  event: "session.create",
6719
- time: He(1440 * 3),
6719
+ time: De(1440 * 3),
6720
6720
  clientName: "Firefox",
6721
6721
  osName: "Windows",
6722
6722
  countryName: "United States",
@@ -6777,7 +6777,7 @@ class uo {
6777
6777
  userId: e,
6778
6778
  secret: "",
6779
6779
  expire: "",
6780
- phrase: Di()
6780
+ phrase: Hi()
6781
6781
  });
6782
6782
  }
6783
6783
  async createEmailToken(e, n) {
@@ -6787,7 +6787,7 @@ class uo {
6787
6787
  userId: e,
6788
6788
  secret: "",
6789
6789
  expire: "",
6790
- phrase: Di()
6790
+ phrase: Hi()
6791
6791
  });
6792
6792
  }
6793
6793
  async createPhoneToken(e, n) {
@@ -6975,7 +6975,7 @@ const oe = {
6975
6975
  targetAlreadyExists: "user_target_already_exists",
6976
6976
  argumentInvalid: "general_argument_invalid"
6977
6977
  };
6978
- function tt(t) {
6978
+ function it(t) {
6979
6979
  if (t && typeof t == "object") {
6980
6980
  const e = t;
6981
6981
  let n = typeof e.message == "string" ? e.message : "Unknown error";
@@ -6988,10 +6988,10 @@ function tt(t) {
6988
6988
  return { message: String(t), type: "", code: 0 };
6989
6989
  }
6990
6990
  function mt(t, e) {
6991
- return tt(t).type === e;
6991
+ return it(t).type === e;
6992
6992
  }
6993
6993
  function Ut(t, e, n = "link") {
6994
- const i = tt(t);
6994
+ const i = it(t);
6995
6995
  switch (i.type) {
6996
6996
  case oe.invalidCredentials:
6997
6997
  return n === "password" ? e.errorCurrentPassword : e.errorInvalidCredentials;
@@ -7034,7 +7034,7 @@ function Ut(t, e, n = "link") {
7034
7034
  return i.type === oe.projectNotFound || i.type === oe.unknownOrigin ? e.errorConfig : i.type === oe.routeNotFound ? e.errorConfigEndpoint : i.code === 0 && /fetch|network/i.test(i.message) ? e.errorNetwork : /Invalid `\w+` param/i.test(i.message) ? e.errorGeneric : i.message ? i.message || e.errorGeneric : i.code === 404 || i.type === oe.routeNotFound ? e.errorConfigEndpoint : e.errorGeneric;
7035
7035
  }
7036
7036
  function ho(t) {
7037
- const e = tt(t);
7037
+ const e = it(t);
7038
7038
  return !!(e.type === oe.projectNotFound || e.type === oe.unknownOrigin || e.type === oe.routeNotFound || !e.message && e.code === 404 || e.code === 0 && /fetch|network|load failed|failed to fetch/i.test(e.message));
7039
7039
  }
7040
7040
  const di = (t) => `authui:active-team:${t}`;
@@ -7054,7 +7054,7 @@ function fo(t, e) {
7054
7054
  }
7055
7055
  }
7056
7056
  const Ii = "authui:last-method";
7057
- function lt(t) {
7057
+ function tt(t) {
7058
7058
  if (!(typeof localStorage > "u")) {
7059
7059
  if (!t || t === "mfa" || t === "sign-up")
7060
7060
  if (t === "sign-up") t = "email-password";
@@ -7080,26 +7080,26 @@ function ia() {
7080
7080
  } catch {
7081
7081
  }
7082
7082
  }
7083
- const Mt = "authui:pending-oauth";
7083
+ const Rt = "authui:pending-oauth";
7084
7084
  function go(t) {
7085
7085
  if (!(typeof sessionStorage > "u"))
7086
7086
  try {
7087
- sessionStorage.setItem(Mt, t);
7087
+ sessionStorage.setItem(Rt, t);
7088
7088
  } catch {
7089
7089
  }
7090
7090
  }
7091
7091
  function sn() {
7092
7092
  if (!(typeof sessionStorage > "u"))
7093
7093
  try {
7094
- const t = sessionStorage.getItem(Mt);
7095
- sessionStorage.removeItem(Mt), t && lt(`oauth:${t}`);
7094
+ const t = sessionStorage.getItem(Rt);
7095
+ sessionStorage.removeItem(Rt), t && tt(`oauth:${t}`);
7096
7096
  } catch {
7097
7097
  }
7098
7098
  }
7099
7099
  function Vi() {
7100
7100
  if (!(typeof sessionStorage > "u"))
7101
7101
  try {
7102
- sessionStorage.removeItem(Mt);
7102
+ sessionStorage.removeItem(Rt);
7103
7103
  } catch {
7104
7104
  }
7105
7105
  }
@@ -7131,7 +7131,7 @@ class yo {
7131
7131
  const n = e.endpoint.trim().replace(/\/+$/, "");
7132
7132
  n && !n.endsWith("/v1") && console.warn(
7133
7133
  `[authui] endpoint should end with /v1 (got "${e.endpoint}"). Without it Appwrite returns HTML 404 pages.`
7134
- ), this.config = e, this.client = new Pe().setEndpoint(e.endpoint).setProject(e.project), this.preview = e.preview ? new uo() : null, this.account = this.preview ? this.preview : new Yt(this.client), this.teams = null, this.activeTeamId = Xi(e.project), this.setState({ configured: !0, status: "loading", configError: null }), this.preview ? this.refresh() : typeof window < "u" && this.handleRedirect().then(() => this.refresh());
7134
+ ), this.config = e, this.client = new xe().setEndpoint(e.endpoint).setProject(e.project), this.preview = e.preview ? new uo() : null, this.account = this.preview ? this.preview : new Yt(this.client), this.teams = null, this.activeTeamId = Xi(e.project), this.setState({ configured: !0, status: "loading", configError: null }), this.preview ? this.refresh() : typeof window < "u" && this.handleRedirect().then(() => this.refresh());
7135
7135
  }
7136
7136
  /**
7137
7137
  * Called by <authui-config> when it is on the page but missing endpoint or project.
@@ -7224,7 +7224,7 @@ class yo {
7224
7224
  this.state = { ...this.state, ...e }, this.emit("change", this.getState());
7225
7225
  }
7226
7226
  fail(e) {
7227
- const n = tt(e);
7227
+ const n = it(e);
7228
7228
  throw this.emit("error", n), e;
7229
7229
  }
7230
7230
  acct() {
@@ -7271,7 +7271,7 @@ class yo {
7271
7271
  console.warn(
7272
7272
  `[authui] ${o} (endpoint=${this.config?.endpoint ?? "?"}, project=${this.config?.project ?? "?"})`
7273
7273
  );
7274
- const a = tt(n);
7274
+ const a = it(n);
7275
7275
  this.emit("error", { message: o, type: a.type, code: a.code }), this.setState({
7276
7276
  status: "signed-out",
7277
7277
  user: null,
@@ -7316,7 +7316,7 @@ class yo {
7316
7316
  localStorage.removeItem("cookieFallback");
7317
7317
  } catch {
7318
7318
  }
7319
- this.config && !this.preview && (this.client = new Pe().setEndpoint(this.config.endpoint).setProject(this.config.project), this.account = new Yt(this.client));
7319
+ this.config && !this.preview && (this.client = new xe().setEndpoint(this.config.endpoint).setProject(this.config.project), this.account = new Yt(this.client));
7320
7320
  }
7321
7321
  // ─────────────────────────────── sign in ───────────────────────────────
7322
7322
  async signInWithEmailPassword(e, n) {
@@ -7697,7 +7697,7 @@ class yo {
7697
7697
  switch (n) {
7698
7698
  case "oauth":
7699
7699
  case "magic-url":
7700
- i && o ? (await this.acct().createSession(i, o), n === "oauth" && sn()) : (n === "oauth" && Vi(), a());
7700
+ i && o ? (await this.acct().createSession(i, o), n === "oauth" ? sn() : tt("magic-url")) : (n === "oauth" && Vi(), a());
7701
7701
  break;
7702
7702
  case "oauth-failed":
7703
7703
  Vi(), this.setState({
@@ -7726,7 +7726,7 @@ class yo {
7726
7726
  break;
7727
7727
  }
7728
7728
  } catch (s) {
7729
- const r = tt(s), d = Ut(s, this.getStrings(), "link");
7729
+ const r = it(s), d = Ut(s, this.getStrings(), "link");
7730
7730
  this.emit("error", r), this.setState({ pending: { type: "notice", message: d, tone: "error" } });
7731
7731
  }
7732
7732
  return !0;
@@ -7741,7 +7741,7 @@ class yo {
7741
7741
  this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = Gi(), this.listeners.clear();
7742
7742
  }
7743
7743
  }
7744
- const R = new yo();
7744
+ const M = new yo();
7745
7745
  class mo {
7746
7746
  constructor() {
7747
7747
  this.listeners = /* @__PURE__ */ new Set(), this.observer = null, this.media = null, this.notify = () => {
@@ -7777,7 +7777,7 @@ const Ki = new mo(), Yi = {
7777
7777
  lg: "0.875rem",
7778
7778
  xl: "1.125rem",
7779
7779
  full: "1.5rem"
7780
- }, bo = Ge`
7780
+ }, wo = Ge`
7781
7781
  :host {
7782
7782
  /* Light theme (matches :root in the console) */
7783
7783
  --authui-background: oklch(1 0 0);
@@ -7855,7 +7855,7 @@ const Ki = new mo(), Yi = {
7855
7855
  --authui-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
7856
7856
  color-scheme: dark;
7857
7857
  }
7858
- `, wo = Ge`
7858
+ `, bo = Ge`
7859
7859
  *,
7860
7860
  *::before,
7861
7861
  *::after {
@@ -8862,32 +8862,32 @@ var vo = Object.defineProperty, Io = (t, e, n, i) => {
8862
8862
  for (var o = void 0, a = t.length - 1, s; a >= 0; a--)
8863
8863
  (s = t[a]) && (o = s(e, n, o) || o);
8864
8864
  return o && vo(e, n, o), o;
8865
- }, De;
8866
- const rn = (De = class extends Qe {
8865
+ }, He;
8866
+ const rn = (He = class extends Qe {
8867
8867
  constructor() {
8868
- super(...arguments), this.auth = R.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (e) => e.stopPropagation();
8868
+ super(...arguments), this.auth = M.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (e) => e.stopPropagation();
8869
8869
  }
8870
8870
  connectedCallback() {
8871
8871
  super.connectedCallback();
8872
- for (const e of De.KEY_EVENTS) this.addEventListener(e, this.stopKeys);
8873
- this.auth = R.getState(), this.unsubscribeStore = R.on("change", (e) => {
8872
+ for (const e of He.KEY_EVENTS) this.addEventListener(e, this.stopKeys);
8873
+ this.auth = M.getState(), this.unsubscribeStore = M.on("change", (e) => {
8874
8874
  this.auth = e, this.applyBranding();
8875
8875
  }), this.unsubscribeTheme = Ki.subscribe(() => this.applyBranding()), this.applyBranding();
8876
8876
  }
8877
8877
  disconnectedCallback() {
8878
8878
  super.disconnectedCallback();
8879
- for (const e of De.KEY_EVENTS) this.removeEventListener(e, this.stopKeys);
8879
+ for (const e of He.KEY_EVENTS) this.removeEventListener(e, this.stopKeys);
8880
8880
  this.unsubscribeStore?.(), this.unsubscribeTheme?.(), this.unsubscribeStore = null, this.unsubscribeTheme = null;
8881
8881
  }
8882
8882
  get strings() {
8883
- return R.getStrings();
8883
+ return M.getStrings();
8884
8884
  }
8885
8885
  /** Translate a string key with optional `{placeholders}`. */
8886
8886
  t(e, n) {
8887
8887
  return ro(this.strings[e], n);
8888
8888
  }
8889
8889
  get config() {
8890
- return R.getConfig();
8890
+ return M.getConfig();
8891
8891
  }
8892
8892
  get productName() {
8893
8893
  return this.config?.branding?.name ?? "";
@@ -8904,12 +8904,12 @@ const rn = (De = class extends Qe {
8904
8904
  fire(e, n) {
8905
8905
  this.dispatchEvent(new CustomEvent(e, { detail: n, bubbles: !0, composed: !0 }));
8906
8906
  }
8907
- }, De.styles = [bo, wo], De.KEY_EVENTS = ["keydown", "keyup", "keypress"], De);
8907
+ }, He.styles = [wo, bo], He.KEY_EVENTS = ["keydown", "keyup", "keypress"], He);
8908
8908
  Io([
8909
- B()
8909
+ N()
8910
8910
  ], rn.prototype, "auth");
8911
8911
  let qe = rn;
8912
- var Ao = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, he = (t, e, n, i) => {
8912
+ var Ao = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, fe = (t, e, n, i) => {
8913
8913
  for (var o = i > 1 ? void 0 : i ? ko(e, n) : e, a = t.length - 1, s; a >= 0; a--)
8914
8914
  (s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
8915
8915
  return i && o && Ao(e, n, o), o;
@@ -8927,12 +8927,12 @@ let de = class extends Qe {
8927
8927
  configure() {
8928
8928
  if (!this.endpoint || !this.project) {
8929
8929
  queueMicrotask(() => {
8930
- (!this.endpoint || !this.project) && R.notifyConfigIncomplete();
8930
+ (!this.endpoint || !this.project) && M.notifyConfigIncomplete();
8931
8931
  });
8932
8932
  return;
8933
8933
  }
8934
- const t = this.toConfig(), e = R.getConfig();
8935
- e && JSON.stringify(e) === JSON.stringify(t) || R.configure(t);
8934
+ const t = this.toConfig(), e = M.getConfig();
8935
+ e && JSON.stringify(e) === JSON.stringify(t) || M.configure(t);
8936
8936
  }
8937
8937
  toConfig() {
8938
8938
  const t = { oauth: [] }, e = this.methods.split(/[\s,]+/).filter(Boolean);
@@ -8970,67 +8970,67 @@ de.styles = Ge`
8970
8970
  display: none;
8971
8971
  }
8972
8972
  `;
8973
- he([
8974
- O({ type: String })
8973
+ fe([
8974
+ F({ type: String })
8975
8975
  ], de.prototype, "endpoint", 2);
8976
- he([
8977
- O({ type: String })
8976
+ fe([
8977
+ F({ type: String })
8978
8978
  ], de.prototype, "project", 2);
8979
- he([
8980
- O({ type: String, attribute: "redirect-url" })
8979
+ fe([
8980
+ F({ type: String, attribute: "redirect-url" })
8981
8981
  ], de.prototype, "redirectUrl", 2);
8982
- he([
8983
- O({ type: String, attribute: "success-url" })
8982
+ fe([
8983
+ F({ type: String, attribute: "success-url" })
8984
8984
  ], de.prototype, "successUrl", 2);
8985
- he([
8986
- O({ type: String })
8985
+ fe([
8986
+ F({ type: String })
8987
8987
  ], de.prototype, "methods", 2);
8988
- he([
8989
- O({ type: String, attribute: "sign-up" })
8988
+ fe([
8989
+ F({ type: String, attribute: "sign-up" })
8990
8990
  ], de.prototype, "signUp", 2);
8991
- he([
8992
- O({ type: String, attribute: "require-name" })
8991
+ fe([
8992
+ F({ type: String, attribute: "require-name" })
8993
8993
  ], de.prototype, "requireName", 2);
8994
- he([
8995
- O({ type: String })
8994
+ fe([
8995
+ F({ type: String })
8996
8996
  ], de.prototype, "mfa", 2);
8997
- he([
8998
- O({ type: String, attribute: "security-phrase" })
8997
+ fe([
8998
+ F({ type: String, attribute: "security-phrase" })
8999
8999
  ], de.prototype, "securityPhrase", 2);
9000
- he([
9001
- O({ type: String })
9000
+ fe([
9001
+ F({ type: String })
9002
9002
  ], de.prototype, "name", 2);
9003
- he([
9004
- O({ type: String })
9003
+ fe([
9004
+ F({ type: String })
9005
9005
  ], de.prototype, "logo", 2);
9006
- he([
9007
- O({ type: String })
9006
+ fe([
9007
+ F({ type: String })
9008
9008
  ], de.prototype, "theme", 2);
9009
- he([
9010
- O({ type: String })
9009
+ fe([
9010
+ F({ type: String })
9011
9011
  ], de.prototype, "radius", 2);
9012
- he([
9013
- O({ type: String })
9012
+ fe([
9013
+ F({ type: String })
9014
9014
  ], de.prototype, "primary", 2);
9015
- he([
9016
- O({ type: String, attribute: "primary-foreground" })
9015
+ fe([
9016
+ F({ type: String, attribute: "primary-foreground" })
9017
9017
  ], de.prototype, "primaryForeground", 2);
9018
- he([
9019
- O({ type: String, attribute: "terms-url" })
9018
+ fe([
9019
+ F({ type: String, attribute: "terms-url" })
9020
9020
  ], de.prototype, "termsUrl", 2);
9021
- he([
9022
- O({ type: String, attribute: "privacy-url" })
9021
+ fe([
9022
+ F({ type: String, attribute: "privacy-url" })
9023
9023
  ], de.prototype, "privacyUrl", 2);
9024
- he([
9025
- O({ type: String, attribute: "require-acceptance" })
9024
+ fe([
9025
+ F({ type: String, attribute: "require-acceptance" })
9026
9026
  ], de.prototype, "requireAcceptance", 2);
9027
- he([
9028
- O({ type: String, attribute: "oauth-layout" })
9027
+ fe([
9028
+ F({ type: String, attribute: "oauth-layout" })
9029
9029
  ], de.prototype, "oauthLayout", 2);
9030
- he([
9031
- O({ type: String })
9030
+ fe([
9031
+ F({ type: String })
9032
9032
  ], de.prototype, "preview", 2);
9033
- de = he([
9033
+ de = fe([
9034
9034
  ze("authui-config")
9035
9035
  ], de);
9036
9036
  var So = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, _t = (t, e, n, i) => {
@@ -9058,47 +9058,47 @@ function jo() {
9058
9058
  }
9059
9059
  }
9060
9060
  jo();
9061
- const xo = ["loading", "signed-out", "signed-in", "mfa-required"];
9061
+ const Po = ["loading", "signed-out", "signed-in", "mfa-required"];
9062
9062
  function ui(t) {
9063
- return t ? t.split(/[\s,]+/).map((e) => e.trim()).filter((e) => xo.includes(e)) : [];
9063
+ return t ? t.split(/[\s,]+/).map((e) => e.trim()).filter((e) => Po.includes(e)) : [];
9064
9064
  }
9065
- function Po(t, e, n) {
9065
+ function xo(t, e, n) {
9066
9066
  const i = ui(e), o = ui(n);
9067
9067
  return !(t === "loading" && !i.includes("loading") || i.length > 0 && !i.includes(t) || o.includes(t));
9068
9068
  }
9069
- let bt = class extends Qe {
9069
+ let wt = class extends Qe {
9070
9070
  constructor() {
9071
- super(...arguments), this.when = "", this.unless = "", this.status = R.getState().status, this.unsubscribe = null;
9071
+ super(...arguments), this.when = "", this.unless = "", this.status = M.getState().status, this.unsubscribe = null;
9072
9072
  }
9073
9073
  connectedCallback() {
9074
- super.connectedCallback(), this.status = R.getState().status, this.unsubscribe = R.on("change", (t) => this.status = t.status);
9074
+ super.connectedCallback(), this.status = M.getState().status, this.unsubscribe = M.on("change", (t) => this.status = t.status);
9075
9075
  }
9076
9076
  disconnectedCallback() {
9077
9077
  super.disconnectedCallback(), this.unsubscribe?.(), this.unsubscribe = null;
9078
9078
  }
9079
9079
  /** Whether the current status satisfies `when` and `unless`. */
9080
9080
  get visible() {
9081
- return Po(this.status, this.when, this.unless);
9081
+ return xo(this.status, this.when, this.unless);
9082
9082
  }
9083
9083
  updated() {
9084
9084
  (this.status !== "loading" || ui(this.when).includes("loading")) && (this.setAttribute("ready", ""), this.style.display = "contents");
9085
9085
  }
9086
9086
  render() {
9087
- return this.visible ? w`<slot></slot>` : C;
9087
+ return this.visible ? b`<slot></slot>` : C;
9088
9088
  }
9089
9089
  };
9090
9090
  _t([
9091
- O({ type: String })
9092
- ], bt.prototype, "when", 2);
9091
+ F({ type: String })
9092
+ ], wt.prototype, "when", 2);
9093
9093
  _t([
9094
- O({ type: String })
9095
- ], bt.prototype, "unless", 2);
9094
+ F({ type: String })
9095
+ ], wt.prototype, "unless", 2);
9096
9096
  _t([
9097
- B()
9098
- ], bt.prototype, "status", 2);
9099
- bt = _t([
9097
+ N()
9098
+ ], wt.prototype, "status", 2);
9099
+ wt = _t([
9100
9100
  ze("authui-show")
9101
- ], bt);
9101
+ ], wt);
9102
9102
  const Co = Ge`
9103
9103
  :host {
9104
9104
  display: block;
@@ -9153,7 +9153,7 @@ const Co = Ge`
9153
9153
  height: 14px;
9154
9154
  margin: 0;
9155
9155
  }
9156
- `, se = (t) => w`<svg
9156
+ `, se = (t) => b`<svg
9157
9157
  xmlns="http://www.w3.org/2000/svg"
9158
9158
  viewBox="0 0 24 24"
9159
9159
  fill="none"
@@ -9246,59 +9246,59 @@ const Co = Ge`
9246
9246
  qr: se(
9247
9247
  G`<rect width="5" height="5" x="3" y="3" rx="1"/><rect width="5" height="5" x="16" y="3" rx="1"/><rect width="5" height="5" x="3" y="16" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3"/><path d="M21 21v.01"/><path d="M12 7v3a2 2 0 0 1-2 2H7"/><path d="M3 12h.01"/><path d="M12 3h.01"/><path d="M12 16v.01"/><path d="M16 12h1"/><path d="M21 12v.01"/><path d="M12 21v-1"/>`
9248
9248
  )
9249
- }, ye = (t, e = "0 0 24 24") => w`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${e} aria-hidden="true">${t}</svg>`, Uo = {
9250
- google: ye(
9249
+ }, me = (t, e = "0 0 24 24") => b`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${e} aria-hidden="true">${t}</svg>`, Uo = {
9250
+ google: me(
9251
9251
  G`<path fill="#4285F4" d="M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47a5.57 5.57 0 0 1-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"/><path fill="#34A853" d="M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09A11.99 11.99 0 0 0 12 24z"/><path fill="#FBBC05" d="M5.27 14.29A7.2 7.2 0 0 1 4.89 12c0-.8.14-1.57.38-2.29V6.62H1.29A11.97 11.97 0 0 0 0 12c0 1.94.46 3.77 1.29 5.38l3.98-3.09z"/><path fill="#EA4335" d="M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"/>`
9252
9252
  ),
9253
- github: ye(
9253
+ github: me(
9254
9254
  G`<path fill="currentColor" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>`
9255
9255
  ),
9256
- apple: ye(
9256
+ apple: me(
9257
9257
  G`<path fill="currentColor" d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/>`
9258
9258
  ),
9259
- facebook: ye(
9259
+ facebook: me(
9260
9260
  G`<path fill="#1877F2" d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>`
9261
9261
  ),
9262
- x: ye(
9262
+ x: me(
9263
9263
  G`<path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>`
9264
9264
  ),
9265
- microsoft: ye(
9265
+ microsoft: me(
9266
9266
  G`<path fill="#F25022" d="M1 1h10v10H1z"/><path fill="#7FBA00" d="M13 1h10v10H13z"/><path fill="#00A4EF" d="M1 13h10v10H1z"/><path fill="#FFB900" d="M13 13h10v10H13z"/>`
9267
9267
  ),
9268
- discord: ye(
9268
+ discord: me(
9269
9269
  G`<path fill="#5865F2" d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>`
9270
9270
  ),
9271
- gitlab: ye(
9271
+ gitlab: me(
9272
9272
  G`<path fill="#FC6D26" d="m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.876.876 0 0 0-1.001.054.874.874 0 0 0-.29.44l-2.205 6.748H7.535L5.33 1.069a.857.857 0 0 0-.29-.441.876.876 0 0 0-1.001-.054.86.86 0 0 0-.336.405L.436 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.011.009.03.021 4.976 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.5-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.006-7.002z"/>`
9273
9273
  ),
9274
- linkedin: ye(
9274
+ linkedin: me(
9275
9275
  G`<path fill="#0A66C2" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>`
9276
9276
  ),
9277
- slack: ye(
9277
+ slack: me(
9278
9278
  G`<path fill="#E01E5A" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"/><path fill="#36C5F0" d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"/><path fill="#2EB67D" d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.163 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"/><path fill="#ECB22E" d="M15.163 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.163 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.315A2.527 2.527 0 0 1 24 15.163a2.528 2.528 0 0 1-2.522 2.523h-6.315z"/>`
9279
9279
  ),
9280
- twitch: ye(
9280
+ twitch: me(
9281
9281
  G`<path fill="#9146FF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0 1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>`
9282
9282
  ),
9283
- spotify: ye(
9283
+ spotify: me(
9284
9284
  G`<path fill="#1DB954" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"/>`
9285
9285
  ),
9286
- notion: ye(
9286
+ notion: me(
9287
9287
  G`<path fill="currentColor" d="M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"/>`
9288
9288
  ),
9289
- dropbox: ye(
9289
+ dropbox: me(
9290
9290
  G`<path fill="#0061FF" d="M6 1.807 0 5.629l6 3.822 6.001-3.822L6 1.807zm12 0-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zm18-3.822-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"/>`
9291
9291
  ),
9292
- figma: ye(
9292
+ figma: me(
9293
9293
  G`<path fill="#F24E1E" d="M8 24a4 4 0 0 0 4-4v-4H8a4 4 0 0 0 0 8z"/><path fill="#A259FF" d="M4 12a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#FF7262" d="M4 4a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#1ABCFE" d="M12 0h4a4 4 0 0 1 0 8h-4V0z"/><path fill="#0ACF83" d="M20 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/>`
9294
9294
  ),
9295
- bitbucket: ye(
9295
+ bitbucket: me(
9296
9296
  G`<path fill="#2684FF" d="M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/>`
9297
9297
  ),
9298
- amazon: ye(
9298
+ amazon: me(
9299
9299
  G`<path fill="currentColor" d="M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 0 1-10.951-.577 17.88 17.88 0 0 1-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.373.15-.61.045a6.62 6.62 0 0 1-.526-.496l-.31-.347a9.858 9.858 0 0 1-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.01zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 0 1 1.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.045-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.06-.02-.106 0-.014.007-.03.02-.06z"/>`
9300
9300
  ),
9301
- paypal: ye(
9301
+ paypal: me(
9302
9302
  G`<path fill="#003087" d="M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z"/>`
9303
9303
  )
9304
9304
  };
@@ -9309,12 +9309,12 @@ function Ai(t) {
9309
9309
  const e = (t.trim()[0] ?? "?").toUpperCase();
9310
9310
  return /[A-Z0-9]/i.test(e) ? e : q.user;
9311
9311
  }
9312
- function wt(t) {
9312
+ function bt(t) {
9313
9313
  typeof document > "u" || (document.querySelector("authui-modal") || document.body.appendChild(document.createElement("authui-modal")), queueMicrotask(() => {
9314
9314
  window.dispatchEvent(new CustomEvent("authui:open", { detail: { view: t } }));
9315
9315
  }));
9316
9316
  }
9317
- function Mo() {
9317
+ function Ro() {
9318
9318
  typeof window > "u" || window.dispatchEvent(new CustomEvent("authui:close"));
9319
9319
  }
9320
9320
  function pi(t) {
@@ -9333,28 +9333,32 @@ function pi(t) {
9333
9333
  let i, o;
9334
9334
  return !e.length || n <= 1 ? (i = 1, o = "passwordStrengthTooWeak") : n === 2 ? (i = 2, o = "passwordStrengthWeak") : n === 3 ? (i = 3, o = "passwordStrengthFair") : n >= 5 && e.long && e.lower && e.upper && e.number && e.symbol ? (i = 4, o = "passwordStrengthVeryStrong") : (i = 4, o = "passwordStrengthStrong"), { level: i, percent: i * 25, labelKey: o, checks: e };
9335
9335
  }
9336
- var Ro = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, be = (t, e, n, i) => {
9336
+ var Mo = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, ye = (t, e, n, i) => {
9337
9337
  for (var o = i > 1 ? void 0 : i ? Eo(e, n) : e, a = t.length - 1, s; a >= 0; a--)
9338
9338
  (s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
9339
- return i && o && Ro(e, n, o), o;
9339
+ return i && o && Mo(e, n, o), o;
9340
9340
  };
9341
- let ge = class extends qe {
9341
+ let he = class extends qe {
9342
9342
  constructor() {
9343
- super(...arguments), this.view = "sign-in", this.embedded = !1, this.step = "sign-in", this.busy = !1, this.error = "", this.notice = null, this.showPassword = !1, this.expandedOAuth = null, this.token = null, this.focusOnStep = !1, this.resendCooldownUntil = 0, this.challenge = null, this.recovery = null, this.email = "", this.password = "", this.passwordConfirm = "", this.name = "", this.phone = "", this.code = "", this.legalAccepted = !1, this.onSignIn = (t) => {
9343
+ super(...arguments), this.view = "sign-in", this.embedded = !1, this.step = "sign-in", this.busy = !1, this.error = "", this.notice = null, this.showPassword = !1, this.showPasswordConfirm = !1, this.expandedOAuth = null, this.token = null, this.focusOnStep = !1, this.resendCooldownUntil = 0, this.challenge = null, this.recovery = null, this.email = "", this.password = "", this.passwordConfirm = "", this.name = "", this.phone = "", this.code = "", this.legalAccepted = !1, this.legalErrorFromOAuth = !1, this.onSignIn = (t) => {
9344
9344
  t.preventDefault(), this.requireValid(t) && this.run(async () => {
9345
- await R.signInWithEmailPassword(this.email, this.password), this.password = "", lt("email-password"), this.fire("authui-success", { method: "email-password" });
9345
+ await M.signInWithEmailPassword(this.email, this.password), this.password = "", tt("email-password"), this.fire("authui-success", { method: "email-password" });
9346
9346
  });
9347
9347
  }, this.onSignUp = (t) => {
9348
- t.preventDefault(), this.requireValid(t) && this.ensureLegalAccepted() && this.run(async () => {
9349
- await R.signUp(this.email, this.password, this.name), this.password = "", lt("email-password"), this.fire("authui-success", { method: "sign-up" });
9350
- });
9348
+ t.preventDefault(), this.requireValid(t) && (this.legalErrorFromOAuth = !1, this.ensureLegalAccepted() && this.run(async () => {
9349
+ await M.signUp(this.email, this.password, this.name), this.password = "", tt("email-password"), this.fire("authui-success", { method: "sign-up" });
9350
+ }));
9351
9351
  }, this.onGuest = () => {
9352
9352
  this.run(async () => {
9353
- await R.signInAnonymously(), lt("anonymous"), this.fire("authui-success", { method: "anonymous" });
9353
+ await M.signInAnonymously(), tt("anonymous"), this.fire("authui-success", { method: "anonymous" });
9354
9354
  });
9355
9355
  }, this.onOAuth = (t) => {
9356
- this.step === "sign-up" && !this.ensureLegalAccepted() || this.run(async () => {
9357
- if (go(t), await R.signInWithOAuth(t), R.isPreview) {
9356
+ if (this.step === "sign-up" && !this.ensureLegalAccepted()) {
9357
+ this.legalErrorFromOAuth = !0;
9358
+ return;
9359
+ }
9360
+ this.legalErrorFromOAuth = !1, this.run(async () => {
9361
+ if (go(t), await M.signInWithOAuth(t), M.isPreview) {
9358
9362
  sn(), this.fire("authui-success", { method: "oauth" });
9359
9363
  return;
9360
9364
  }
@@ -9362,7 +9366,7 @@ let ge = class extends qe {
9362
9366
  });
9363
9367
  }, this.onForgot = (t) => {
9364
9368
  t.preventDefault(), this.requireValid(t) && this.run(async () => {
9365
- await R.sendPasswordRecovery(this.email), this.notice = { tone: "success", message: this.t("resetLinkSent", { email: this.email }) };
9369
+ await M.sendPasswordRecovery(this.email), this.notice = { tone: "success", message: this.t("resetLinkSent", { email: this.email }) };
9366
9370
  });
9367
9371
  }, this.onReset = (t) => {
9368
9372
  if (t.preventDefault(), !this.requireValid(t)) return;
@@ -9372,11 +9376,11 @@ let ge = class extends qe {
9372
9376
  }
9373
9377
  const e = this.recovery;
9374
9378
  e && this.run(async () => {
9375
- await R.completePasswordRecovery(e.userId, e.secret, this.password), this.password = "", this.passwordConfirm = "", this.recovery = null, this.auth.pending?.type === "reset-password" && R.setPending(null), this.go("sign-in"), this.notice = { tone: "success", message: this.t("passwordUpdated") };
9379
+ await M.completePasswordRecovery(e.userId, e.secret, this.password), this.password = "", this.passwordConfirm = "", this.recovery = null, this.auth.pending?.type === "reset-password" && M.setPending(null), this.go("sign-in"), this.notice = { tone: "success", message: this.t("passwordUpdated") };
9376
9380
  });
9377
9381
  }, this.onMagicUrl = (t) => {
9378
9382
  t.preventDefault(), this.requireValid(t) && this.run(async () => {
9379
- const e = await R.sendMagicUrl(this.email);
9383
+ const e = await M.sendMagicUrl(this.email);
9380
9384
  this.token = {
9381
9385
  userId: e.userId,
9382
9386
  kind: "magic-url",
@@ -9386,47 +9390,47 @@ let ge = class extends qe {
9386
9390
  });
9387
9391
  }, this.onEmailOtp = (t) => {
9388
9392
  t.preventDefault(), this.requireValid(t) && this.run(async () => {
9389
- const e = await R.sendEmailOtp(this.email);
9393
+ const e = await M.sendEmailOtp(this.email);
9390
9394
  this.token = {
9391
9395
  userId: e.userId,
9392
9396
  kind: "email-otp",
9393
9397
  target: this.email,
9394
9398
  phrase: e.phrase
9395
- }, this.code = "";
9399
+ }, this.code = "", this.resendCooldownUntil = Date.now() + 3e4, window.setTimeout(() => this.requestUpdate(), 3e4);
9396
9400
  });
9397
9401
  }, this.onPhoneOtp = (t) => {
9398
9402
  t.preventDefault(), this.requireValid(t) && this.run(async () => {
9399
- const e = await R.sendPhoneOtp(this.phone);
9400
- this.token = { userId: e.userId, kind: "phone", target: this.phone }, this.code = "";
9403
+ const e = await M.sendPhoneOtp(this.phone);
9404
+ this.token = { userId: e.userId, kind: "phone", target: this.phone }, this.code = "", this.resendCooldownUntil = Date.now() + 3e4, window.setTimeout(() => this.requestUpdate(), 3e4);
9401
9405
  });
9402
9406
  }, this.onVerifyCode = (t) => {
9403
9407
  if (t.preventDefault(), !this.requireValid(t)) return;
9404
9408
  const e = this.token;
9405
9409
  e && this.run(async () => {
9406
- await R.signInWithToken(e.userId, this.code), this.code = "", this.token = null, lt(e.kind), this.fire("authui-success", { method: e.kind });
9410
+ await M.signInWithToken(e.userId, this.code), this.code = "", this.token = null, tt(e.kind), this.fire("authui-success", { method: e.kind });
9407
9411
  }, "code");
9408
9412
  }, this.onChooseFactor = (t) => {
9409
9413
  this.run(async () => {
9410
- const e = await R.createMfaChallenge(t);
9414
+ const e = await M.createMfaChallenge(t);
9411
9415
  this.challenge = { id: e.$id, factor: t }, this.code = "";
9412
9416
  });
9413
9417
  }, this.onVerifyFactor = (t) => {
9414
9418
  if (t.preventDefault(), !this.requireValid(t)) return;
9415
9419
  const e = this.challenge;
9416
9420
  e && this.run(async () => {
9417
- await R.completeMfaChallenge(e.id, this.code), this.code = "", this.challenge = null, this.go("sign-in"), this.fire("authui-success", { method: "mfa" });
9421
+ await M.completeMfaChallenge(e.id, this.code), this.code = "", this.challenge = null, this.go("sign-in"), this.fire("authui-success", { method: "mfa" });
9418
9422
  }, "code");
9419
9423
  }, this.onCancelMfa = () => {
9420
9424
  this.run(async () => {
9421
9425
  try {
9422
- await R.signOut();
9426
+ await M.signOut();
9423
9427
  } catch (t) {
9424
9428
  if (!mt(t, oe.sessionNotFound)) throw t;
9425
9429
  }
9426
9430
  this.go("sign-in");
9427
9431
  });
9428
9432
  }, this.onSignOut = () => {
9429
- this.run(() => R.signOut());
9433
+ this.run(() => M.signOut());
9430
9434
  };
9431
9435
  }
9432
9436
  connectedCallback() {
@@ -9450,10 +9454,10 @@ let ge = class extends qe {
9450
9454
  }
9451
9455
  /** Navigate between screens and reset transient state. */
9452
9456
  dismissNotice() {
9453
- this.notice = null, this.auth.pending?.type === "notice" && R.setPending(null);
9457
+ this.notice = null, this.auth.pending?.type === "notice" && M.setPending(null);
9454
9458
  }
9455
9459
  go(t) {
9456
- t === "sign-up" && this.config?.signUp === !1 && (t = "sign-in"), this.focusOnStep = !0, this.step = t, this.error = "", this.notice = null, this.busy = !1, this.showPassword = !1, this.password = "", this.passwordConfirm = "", this.legalAccepted = !1, t !== "mfa" && (this.challenge = null), t !== "email-otp" && t !== "phone" && t !== "magic-url" && (this.token = null), this.fire("authui-view", { view: t });
9460
+ t === "sign-up" && this.config?.signUp === !1 && (t = "sign-in"), this.focusOnStep = !0, this.step = t, this.error = "", this.notice = null, this.busy = !1, this.showPassword = !1, this.showPasswordConfirm = !1, this.password = "", this.passwordConfirm = "", this.legalAccepted = !1, this.legalErrorFromOAuth = !1, t !== "mfa" && (this.challenge = null), t !== "email-otp" && t !== "phone" && t !== "magic-url" && (this.token = null), this.fire("authui-view", { view: t });
9457
9461
  }
9458
9462
  // ───────────────────────────── actions ─────────────────────────────
9459
9463
  async run(t, e = "link") {
@@ -9481,10 +9485,10 @@ let ge = class extends qe {
9481
9485
  // ───────────────────────────── render ─────────────────────────────
9482
9486
  render() {
9483
9487
  const t = this.renderStep();
9484
- return w`
9488
+ return b`
9485
9489
  <div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
9486
9490
  ${this.renderHeader()}
9487
- ${this.notice ? w`<div class="alert alert-${this.notice.tone}" role="status">
9491
+ ${this.notice ? b`<div class="alert alert-${this.notice.tone}" role="status">
9488
9492
  ${this.notice.tone === "success" ? q.checkCircle : this.notice.tone === "error" ? q.alert : q.info}
9489
9493
  <div class="alert-body">${this.notice.message}</div>
9490
9494
  <button
@@ -9527,9 +9531,9 @@ let ge = class extends qe {
9527
9531
  n = this.t("mfaTitle"), i = this.t("mfaDescription");
9528
9532
  break;
9529
9533
  }
9530
- return w`
9534
+ return b`
9531
9535
  <div class="header">
9532
- ${t ? w`<img
9536
+ ${t ? b`<img
9533
9537
  class="logo"
9534
9538
  src=${t}
9535
9539
  alt=""
@@ -9537,30 +9541,30 @@ let ge = class extends qe {
9537
9541
  o.target.hidden = !0;
9538
9542
  }}
9539
9543
  />` : C}
9540
- ${R.isPreview ? w`<span class="badge badge-info preview">${this.t("preview")}</span>` : C}
9544
+ ${M.isPreview ? b`<span class="badge badge-info preview">${this.t("preview")}</span>` : C}
9541
9545
  <h2 class="title" id="authui-title">${n}</h2>
9542
- ${i ? w`<p class="description">${i}</p>` : C}
9546
+ ${i ? b`<p class="description">${i}</p>` : C}
9543
9547
  </div>
9544
9548
  `;
9545
9549
  }
9546
9550
  renderError() {
9547
- return this.error ? w`<div class="alert alert-error" role="alert">
9551
+ return this.error ? b`<div class="alert alert-error" role="alert">
9548
9552
  ${q.alert}
9549
9553
  <div class="alert-body">${this.error}</div>
9550
9554
  </div>` : C;
9551
9555
  }
9552
9556
  submitButton(t, e = "btn-primary") {
9553
- return w`<button class="btn ${e} btn-block" type="submit" ?disabled=${this.busy}>
9554
- ${this.busy ? w`<span class="spinner" aria-hidden="true"></span>` : C} ${t}
9557
+ return b`<button class="btn ${e} btn-block" type="submit" ?disabled=${this.busy}>
9558
+ ${this.busy ? b`<span class="spinner" aria-hidden="true"></span>` : C} ${t}
9555
9559
  </button>`;
9556
9560
  }
9557
9561
  passwordField(t) {
9558
- const e = this[t.field], n = t.meter ? pi(e) : null;
9559
- return w`
9562
+ const e = this[t.field], n = t.field === "passwordConfirm" ? this.showPasswordConfirm : this.showPassword, i = t.meter ? pi(e) : null;
9563
+ return b`
9560
9564
  <div class="field">
9561
9565
  <div class="field-header">
9562
9566
  <label class="label" for=${t.id}>${t.label}</label>
9563
- ${t.forgot ? w`<button
9567
+ ${t.forgot ? b`<button
9564
9568
  type="button"
9565
9569
  class="btn btn-link small"
9566
9570
  @click=${() => this.go("forgot-password")}
@@ -9572,7 +9576,7 @@ let ge = class extends qe {
9572
9576
  <input
9573
9577
  class="input"
9574
9578
  id=${t.id}
9575
- type=${this.showPassword ? "text" : "password"}
9579
+ type=${n ? "text" : "password"}
9576
9580
  autocomplete=${t.autocomplete}
9577
9581
  required
9578
9582
  minlength="8"
@@ -9582,32 +9586,34 @@ let ge = class extends qe {
9582
9586
  <button
9583
9587
  type="button"
9584
9588
  class="btn btn-ghost btn-icon"
9585
- @click=${() => this.showPassword = !this.showPassword}
9586
- aria-label=${this.showPassword ? this.t("hidePassword") : this.t("showPassword")}
9589
+ @click=${() => {
9590
+ t.field === "passwordConfirm" ? this.showPasswordConfirm = !this.showPasswordConfirm : this.showPassword = !this.showPassword;
9591
+ }}
9592
+ aria-label=${n ? this.t("hidePassword") : this.t("showPassword")}
9587
9593
  >
9588
- ${this.showPassword ? q.eyeOff : q.eye}
9594
+ ${n ? q.eyeOff : q.eye}
9589
9595
  </button>
9590
9596
  </div>
9591
- ${n && e ? w`<div class="strength" aria-live="polite">
9597
+ ${i && e ? b`<div class="strength" aria-live="polite">
9592
9598
  <div
9593
9599
  class="strength-meter"
9594
- data-level=${String(n.level)}
9600
+ data-level=${String(i.level)}
9595
9601
  role="meter"
9596
9602
  aria-label=${this.t("passwordStrengthLabel")}
9597
9603
  aria-valuemin="0"
9598
9604
  aria-valuemax="4"
9599
- aria-valuenow=${String(n.level)}
9600
- aria-valuetext=${this.t(n.labelKey)}
9605
+ aria-valuenow=${String(i.level)}
9606
+ aria-valuetext=${this.t(i.labelKey)}
9601
9607
  >
9602
9608
  <span></span><span></span><span></span><span></span>
9603
9609
  </div>
9604
- <p class="strength-label">${this.t(n.labelKey)}</p>
9605
- </div>` : t.hint ? w`<p class="hint">${t.hint}</p>` : C}
9610
+ <p class="strength-label">${this.t(i.labelKey)}</p>
9611
+ </div>` : t.hint ? b`<p class="hint">${t.hint}</p>` : C}
9606
9612
  </div>
9607
9613
  `;
9608
9614
  }
9609
9615
  emailField(t = "email") {
9610
- return w`
9616
+ return b`
9611
9617
  <div class="field">
9612
9618
  <label class="label" for="authui-email">${this.t("email")}</label>
9613
9619
  <input
@@ -9624,7 +9630,7 @@ let ge = class extends qe {
9624
9630
  `;
9625
9631
  }
9626
9632
  codeField() {
9627
- return w`
9633
+ return b`
9628
9634
  <div class="field">
9629
9635
  <label class="label" for="authui-code">${this.t("code")}</label>
9630
9636
  <input
@@ -9653,27 +9659,27 @@ let ge = class extends qe {
9653
9659
  }
9654
9660
  legalLinks() {
9655
9661
  const t = this.config?.legal;
9656
- return !t?.termsUrl && !t?.privacyUrl ? C : w`${t.termsUrl ? w`<a href=${t.termsUrl} target="_blank" rel="noopener">${this.t("terms")}</a>` : C}${t.termsUrl && t.privacyUrl ? w` ${this.t("and")} ` : C}${t.privacyUrl ? w`<a href=${t.privacyUrl} target="_blank" rel="noopener">${this.t("privacy")}</a>` : C}`;
9662
+ return !t?.termsUrl && !t?.privacyUrl ? C : b`${t.termsUrl ? b`<a href=${t.termsUrl} target="_blank" rel="noopener">${this.t("terms")}</a>` : C}${t.termsUrl && t.privacyUrl ? b` ${this.t("and")} ` : C}${t.privacyUrl ? b`<a href=${t.privacyUrl} target="_blank" rel="noopener">${this.t("privacy")}</a>` : C}`;
9657
9663
  }
9658
9664
  legal() {
9659
9665
  const t = this.config?.legal;
9660
- return !t?.termsUrl && !t?.privacyUrl || this.step === "sign-up" && this.needsLegalAcceptance() ? C : w`<p class="legal">${this.t("agreeTo")} ${this.legalLinks()}.</p>`;
9666
+ return !t?.termsUrl && !t?.privacyUrl || this.step === "sign-up" && this.needsLegalAcceptance() ? C : b`<p class="legal">${this.t("agreeTo")} ${this.legalLinks()}.</p>`;
9661
9667
  }
9662
9668
  /** Required acceptance checkbox on sign-up when legal.requireAcceptance is set. */
9663
9669
  legalAcceptField() {
9664
- return this.needsLegalAcceptance() ? w`<label class="legal-accept">
9670
+ return this.needsLegalAcceptance() ? b`<label class="legal-accept">
9665
9671
  <input
9666
9672
  type="checkbox"
9667
9673
  .checked=${this.legalAccepted}
9668
9674
  @change=${(t) => {
9669
- this.legalAccepted = t.target.checked, this.legalAccepted && this.error === this.t("errorLegalRequired") && (this.error = "");
9675
+ this.legalAccepted = t.target.checked, this.legalAccepted && this.error === this.t("errorLegalRequired") && (this.error = "", this.legalErrorFromOAuth = !1);
9670
9676
  }}
9671
9677
  />
9672
9678
  <span>${this.t("acceptLegal")} ${this.legalLinks()}.</span>
9673
9679
  </label>` : C;
9674
9680
  }
9675
9681
  backLink(t = "sign-in") {
9676
- return w`<div class="links">
9682
+ return b`<div class="links">
9677
9683
  <button type="button" class="btn btn-link" @click=${() => this.go(t)}>
9678
9684
  ${q.arrowLeft} ${this.t("back")}
9679
9685
  </button>
@@ -9681,17 +9687,17 @@ let ge = class extends qe {
9681
9687
  }
9682
9688
  renderStep() {
9683
9689
  if (this.auth.configError)
9684
- return w`<div class="alert alert-error" role="alert">
9690
+ return b`<div class="alert alert-error" role="alert">
9685
9691
  ${q.alert}
9686
9692
  <div class="alert-body">${this.auth.configError}</div>
9687
9693
  </div>`;
9688
9694
  if (!this.auth.configured)
9689
- return w`<div class="alert alert-error" role="alert">
9695
+ return b`<div class="alert alert-error" role="alert">
9690
9696
  ${q.alert}
9691
9697
  <div class="alert-body">${this.t("errorNotConfigured")}</div>
9692
9698
  </div>`;
9693
9699
  if (this.auth.status === "loading")
9694
- return w`<div class="empty"><span class="spinner"></span></div>`;
9700
+ return b`<div class="empty"><span class="spinner"></span></div>`;
9695
9701
  if (this.auth.status === "signed-in" && this.step !== "mfa") return this.renderSignedIn();
9696
9702
  switch (this.step) {
9697
9703
  case "sign-up":
@@ -9714,26 +9720,26 @@ let ge = class extends qe {
9714
9720
  }
9715
9721
  renderSignedIn() {
9716
9722
  const t = this.auth.user, e = t.name || t.email || t.phone || this.t("guestAccount");
9717
- return w`
9723
+ return b`
9718
9724
  <div class="stack">
9719
9725
  <div class="row">
9720
9726
  <div class="inline">
9721
9727
  <span class="avatar">${Ai(e)}</span>
9722
9728
  <div class="row-main">
9723
9729
  <span class="row-title" title=${e}>${e}</span>
9724
- ${t.email && t.name ? w`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
9730
+ ${t.email && t.name ? b`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
9725
9731
  </div>
9726
9732
  </div>
9727
9733
  </div>
9728
9734
  ${this.renderError()}
9729
9735
  <div class="stack-sm">
9730
- ${this.config?.successUrl ? w`<a class="btn btn-primary btn-block" href=${this.config.successUrl}
9736
+ ${this.config?.successUrl ? b`<a class="btn btn-primary btn-block" href=${this.config.successUrl}
9731
9737
  >${this.t("continue")}</a
9732
9738
  >` : C}
9733
9739
  <button
9734
9740
  class="btn btn-outline btn-block"
9735
9741
  @click=${() => {
9736
- this.embedded ? this.fire("authui-open", { view: "account" }) : wt("account");
9742
+ this.embedded ? this.fire("authui-open", { view: "account" }) : bt("account");
9737
9743
  }}
9738
9744
  >
9739
9745
  ${q.settings} ${this.t("manageAccount")}
@@ -9749,35 +9755,40 @@ let ge = class extends qe {
9749
9755
  const t = [...this.config?.methods?.oauth ?? []];
9750
9756
  if (t.length === 0) return C;
9751
9757
  const e = Fe(), n = t.find((s) => e === `oauth:${s}`) ?? null, i = this.config?.methods?.oauthLayout, o = i === "horizontal" || i === "icon" ? "icon" : i === "stack" || i === "accordion" ? i : t.length <= 2 ? "stack" : "accordion";
9752
- if (o === "icon")
9753
- return w`
9758
+ if (o === "icon") {
9759
+ const s = [...t].sort((r, d) => {
9760
+ const c = e === `oauth:${r}` ? 0 : 1, p = e === `oauth:${d}` ? 0 : 1;
9761
+ return c - p;
9762
+ });
9763
+ return b`
9754
9764
  <div class="providers icon">
9755
- ${t.map((s) => {
9756
- const r = e === `oauth:${s}`, d = this.t("continueWith", { provider: pt(s) });
9757
- return w`<button
9765
+ ${s.map((r) => {
9766
+ const d = e === `oauth:${r}`, c = this.t("continueWith", { provider: pt(r) });
9767
+ return b`<button
9758
9768
  type="button"
9759
- class="btn btn-outline ${r ? "last-used" : ""}"
9760
- @click=${() => this.onOAuth(s)}
9769
+ class="btn btn-outline ${d ? "last-used" : ""}"
9770
+ @click=${() => this.onOAuth(r)}
9761
9771
  ?disabled=${this.busy}
9762
- aria-label=${r ? `${d}. ${this.t("lastUsed")}` : d}
9763
- title=${d}
9772
+ aria-label=${d ? `${c}. ${this.t("lastUsed")}` : c}
9773
+ title=${c}
9764
9774
  >
9765
- ${ht(s)}
9766
- ${r ? w`<span class="oauth-last-used-dot" aria-hidden="true"></span>` : C}
9775
+ ${ht(r)}
9776
+ ${d ? b`<span class="oauth-last-used-dot" aria-hidden="true"></span>` : C}
9767
9777
  </button>`;
9768
9778
  })}
9769
9779
  </div>
9770
9780
  `;
9781
+ }
9771
9782
  if (o === "stack") {
9772
9783
  const s = [...t].sort((r, d) => {
9773
9784
  const c = e === `oauth:${r}` ? 0 : 1, p = e === `oauth:${d}` ? 0 : 1;
9774
9785
  return c - p;
9775
9786
  });
9776
- return w`
9787
+ return b`
9777
9788
  <div class="providers">
9778
9789
  ${s.map((r) => {
9779
9790
  const d = e === `oauth:${r}`, c = this.t("continueWith", { provider: pt(r) });
9780
- return w`<button
9791
+ return b`<button
9781
9792
  type="button"
9782
9793
  class="btn btn-outline ${d ? "last-used" : ""}"
9783
9794
  @click=${() => this.onOAuth(r)}
@@ -9786,14 +9797,14 @@ let ge = class extends qe {
9786
9797
  >
9787
9798
  ${ht(r)}
9788
9799
  <span>${c}</span>
9789
- ${d ? w`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9800
+ ${d ? b`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9790
9801
  </button>`;
9791
9802
  })}
9792
9803
  </div>
9793
9804
  `;
9794
9805
  }
9795
9806
  const a = this.expandedOAuth && t.includes(this.expandedOAuth) ? this.expandedOAuth : n ?? t[0];
9796
- return w`
9807
+ return b`
9797
9808
  <div
9798
9809
  class="providers accordion"
9799
9810
  @mouseleave=${() => {
@@ -9802,7 +9813,7 @@ let ge = class extends qe {
9802
9813
  >
9803
9814
  ${t.map((s) => {
9804
9815
  const r = e === `oauth:${s}`, d = a === s, c = this.t("continueWith", { provider: pt(s) });
9805
- return w`<div
9816
+ return b`<div
9806
9817
  class="provider-slot ${d ? "is-expanded" : ""}"
9807
9818
  @mouseenter=${() => {
9808
9819
  this.expandedOAuth = s;
@@ -9822,7 +9833,7 @@ let ge = class extends qe {
9822
9833
  <span class="provider-label"
9823
9834
  ><span><span class="provider-label-text">${c}</span></span></span
9824
9835
  >
9825
- ${r ? w`<span class="oauth-last-used" data-last-used=${s} aria-hidden="true">
9836
+ ${r ? b`<span class="oauth-last-used" data-last-used=${s} aria-hidden="true">
9826
9837
  <span class="oauth-last-used-dot"></span>
9827
9838
  <span class="oauth-last-used-pill">${this.t("lastUsed")}</span>
9828
9839
  </span>` : C}
@@ -9838,45 +9849,46 @@ let ge = class extends qe {
9838
9849
  t.emailOtp ? { step: "email-otp", icon: q.mail, label: this.t("continueWithEmail") } : null,
9839
9850
  t.phone ? { step: "phone", icon: q.smartphone, label: this.t("continueWithPhone") } : null
9840
9851
  ].filter(Boolean);
9841
- return w`
9852
+ return b`
9842
9853
  <div class="stack">
9843
9854
  ${this.renderProviders()}
9844
- ${n && (e || i.length > 0) ? w`<div class="separator-text">${this.t("or")}</div>` : C}
9845
- ${e ? w`<form
9855
+ ${n && (e || i.length > 0) ? b`<div class="separator-text">${this.t("or")}</div>` : C}
9856
+ ${e ? b`<form
9846
9857
  class="form ${Fe() === "email-password" ? "last-used-form" : ""}"
9847
9858
  @submit=${this.onSignIn}
9848
9859
  novalidate
9849
9860
  >
9850
- ${Fe() === "email-password" ? w`<p class="hint">
9861
+ ${Fe() === "email-password" ? b`<p class="hint">
9851
9862
  <span class="last-used-badge">${this.t("lastUsed")}</span>
9852
9863
  </p>` : C}
9853
9864
  ${this.emailField()}
9854
9865
  ${this.passwordField({ label: this.t("password"), autocomplete: "current-password", id: "authui-password", field: "password", forgot: !0 })}
9855
9866
  ${this.renderError()} ${this.submitButton(this.t("signIn"))}
9856
9867
  </form>` : this.renderError()}
9857
- ${i.length > 0 ? w`<div class="stack-sm">
9868
+ ${i.length > 0 ? b`<div class="stack-sm">
9858
9869
  ${i.map((o) => {
9859
9870
  const a = Fe() === o.step;
9860
- return w`<button
9871
+ return b`<button
9861
9872
  type="button"
9862
9873
  class="btn btn-secondary btn-block ${a ? "last-used" : ""}"
9863
9874
  @click=${() => this.go(o.step)}
9875
+ ?disabled=${this.busy}
9864
9876
  >
9865
9877
  ${o.icon} ${o.label}
9866
- ${a ? w`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9878
+ ${a ? b`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9867
9879
  </button>`;
9868
9880
  })}
9869
9881
  </div>` : C}
9870
- ${t.anonymous ? w`<button
9882
+ ${t.anonymous ? b`<button
9871
9883
  type="button"
9872
9884
  class="btn btn-ghost btn-block ${Fe() === "anonymous" ? "last-used" : ""}"
9873
9885
  @click=${this.onGuest}
9874
9886
  ?disabled=${this.busy}
9875
9887
  >
9876
9888
  ${q.ghost} ${this.t("continueAsGuest")}
9877
- ${Fe() === "anonymous" ? w`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9889
+ ${Fe() === "anonymous" ? b`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9878
9890
  </button>` : C}
9879
- ${e && this.config?.signUp !== !1 ? w`<div class="links">
9891
+ ${e && this.config?.signUp !== !1 ? b`<div class="links">
9880
9892
  <span>${this.t("noAccount")}</span>
9881
9893
  <button type="button" class="btn btn-link" @click=${() => this.go("sign-up")}>
9882
9894
  ${this.t("signUp")}
@@ -9887,12 +9899,13 @@ let ge = class extends qe {
9887
9899
  `;
9888
9900
  }
9889
9901
  renderSignUp() {
9890
- return w`
9902
+ const t = this.legalErrorFromOAuth && this.error === this.t("errorLegalRequired");
9903
+ return b`
9891
9904
  <div class="stack">
9892
- ${this.renderProviders()}
9893
- ${(this.config?.methods?.oauth?.length ?? 0) > 0 ? w`<div class="separator-text">${this.t("or")}</div>` : C}
9905
+ ${this.renderProviders()} ${t ? this.renderError() : C}
9906
+ ${(this.config?.methods?.oauth?.length ?? 0) > 0 ? b`<div class="separator-text">${this.t("or")}</div>` : C}
9894
9907
  <form class="form" @submit=${this.onSignUp} novalidate>
9895
- ${this.config?.requireName !== !1 ? w`<div class="field">
9908
+ ${this.config?.requireName !== !1 ? b`<div class="field">
9896
9909
  <label class="label" for="authui-name">${this.t("name")}</label>
9897
9910
  <input
9898
9911
  class="input"
@@ -9906,7 +9919,7 @@ let ge = class extends qe {
9906
9919
  </div>` : C}
9907
9920
  ${this.emailField()}
9908
9921
  ${this.passwordField({ label: this.t("password"), autocomplete: "new-password", id: "authui-password", field: "password", hint: this.t("passwordHint"), meter: !0 })}
9909
- ${this.legalAcceptField()} ${this.renderError()}
9922
+ ${this.legalAcceptField()} ${t ? C : this.renderError()}
9910
9923
  ${this.submitButton(this.t("createAccount"))}
9911
9924
  </form>
9912
9925
  <div class="links">
@@ -9920,7 +9933,7 @@ let ge = class extends qe {
9920
9933
  `;
9921
9934
  }
9922
9935
  renderForgot() {
9923
- return w`
9936
+ return b`
9924
9937
  <div class="stack">
9925
9938
  <form class="form" @submit=${this.onForgot} novalidate>
9926
9939
  ${this.emailField()} ${this.renderError()} ${this.submitButton(this.t("sendResetLink"))}
@@ -9930,7 +9943,7 @@ let ge = class extends qe {
9930
9943
  `;
9931
9944
  }
9932
9945
  renderReset() {
9933
- return this.recovery ? w`
9946
+ return this.recovery ? b`
9934
9947
  <div class="stack">
9935
9948
  <form class="form" @submit=${this.onReset} novalidate>
9936
9949
  ${this.passwordField({ label: this.t("newPassword"), autocomplete: "new-password", id: "authui-password", field: "password", hint: this.t("passwordHint"), meter: !0 })}
@@ -9949,7 +9962,7 @@ let ge = class extends qe {
9949
9962
  </button>
9950
9963
  </div>
9951
9964
  </div>
9952
- ` : w`<div class="stack">
9965
+ ` : b`<div class="stack">
9953
9966
  <div class="alert alert-error" role="alert">
9954
9967
  ${q.alert}
9955
9968
  <div class="alert-body">${this.t("errorInvalidToken")}</div>
@@ -9968,7 +9981,7 @@ let ge = class extends qe {
9968
9981
  </div>`;
9969
9982
  }
9970
9983
  phraseBox(t) {
9971
- return t ? w`<div class="alert alert-info">
9984
+ return t ? b`<div class="alert alert-info">
9972
9985
  ${q.shield}
9973
9986
  <div class="alert-title">
9974
9987
  ${this.t("securityPhrase")}: <span class="code">${t}</span>
@@ -9977,13 +9990,13 @@ let ge = class extends qe {
9977
9990
  </div>` : C;
9978
9991
  }
9979
9992
  renderMagicUrl() {
9980
- return this.token ? w`<div class="stack">
9993
+ return this.token ? b`<div class="stack">
9981
9994
  <div class="alert alert-success" role="status">
9982
9995
  ${q.mail}
9983
9996
  <div class="alert-body">${this.t("magicLinkSent", { email: this.token.target })}</div>
9984
9997
  </div>
9985
9998
  ${this.phraseBox(this.token.phrase)} ${this.backLink()}
9986
- </div>` : w`
9999
+ </div>` : b`
9987
10000
  <div class="stack">
9988
10001
  <form class="form" @submit=${this.onMagicUrl} novalidate>
9989
10002
  ${this.emailField()} ${this.renderError()} ${this.submitButton(this.t("sendMagicLink"))}
@@ -9996,10 +10009,10 @@ let ge = class extends qe {
9996
10009
  const t = this.token;
9997
10010
  !t || Date.now() < this.resendCooldownUntil || (this.error = "", await this.run(async () => {
9998
10011
  if (t.kind === "phone") {
9999
- const e = await R.sendPhoneOtp(t.target);
10012
+ const e = await M.sendPhoneOtp(t.target);
10000
10013
  this.token = { userId: e.userId, kind: "phone", target: t.target };
10001
10014
  } else {
10002
- const e = await R.sendEmailOtp(t.target);
10015
+ const e = await M.sendEmailOtp(t.target);
10003
10016
  this.token = {
10004
10017
  userId: e.userId,
10005
10018
  kind: "email-otp",
@@ -10012,7 +10025,7 @@ let ge = class extends qe {
10012
10025
  }
10013
10026
  renderCodeEntry() {
10014
10027
  const t = this.token?.kind === "phone", e = Date.now() < this.resendCooldownUntil;
10015
- return w`
10028
+ return b`
10016
10029
  <div class="alert alert-info" role="status">
10017
10030
  ${t ? q.smartphone : q.mail}
10018
10031
  <div class="alert-body">${this.t("codeSent", { target: this.token.target })}</div>
@@ -10046,7 +10059,7 @@ let ge = class extends qe {
10046
10059
  `;
10047
10060
  }
10048
10061
  renderEmailOtp() {
10049
- return this.token ? w`<div class="stack">${this.renderCodeEntry()}</div>` : w`
10062
+ return this.token ? b`<div class="stack">${this.renderCodeEntry()}</div>` : b`
10050
10063
  <div class="stack">
10051
10064
  <form class="form" @submit=${this.onEmailOtp} novalidate>
10052
10065
  ${this.emailField()} ${this.renderError()} ${this.submitButton(this.t("sendCode"))}
@@ -10056,7 +10069,7 @@ let ge = class extends qe {
10056
10069
  `;
10057
10070
  }
10058
10071
  renderPhone() {
10059
- return this.token ? w`<div class="stack">${this.renderCodeEntry()}</div>` : w`
10072
+ return this.token ? b`<div class="stack">${this.renderCodeEntry()}</div>` : b`
10060
10073
  <div class="stack">
10061
10074
  <form class="form" @submit=${this.onPhoneOtp} novalidate>
10062
10075
  <div class="field">
@@ -10107,11 +10120,11 @@ let ge = class extends qe {
10107
10120
  available: t?.recoveryCode ?? !0
10108
10121
  }
10109
10122
  ];
10110
- return w`
10123
+ return b`
10111
10124
  <div class="stack">
10112
10125
  <div class="stack-sm">
10113
10126
  ${n.filter((i) => i.available).map(
10114
- (i) => w`<button
10127
+ (i) => b`<button
10115
10128
  type="button"
10116
10129
  class="choice"
10117
10130
  @click=${() => this.onChooseFactor(i.factor)}
@@ -10131,10 +10144,10 @@ let ge = class extends qe {
10131
10144
  `;
10132
10145
  }
10133
10146
  const e = this.challenge.factor === "recoverycode";
10134
- return w`
10147
+ return b`
10135
10148
  <div class="stack">
10136
10149
  <form class="form" @submit=${this.onVerifyFactor} novalidate>
10137
- ${e ? w`<div class="field">
10150
+ ${e ? b`<div class="field">
10138
10151
  <label class="label" for="authui-code">${this.t("recoveryCode")}</label>
10139
10152
  <input
10140
10153
  class="input mono"
@@ -10161,66 +10174,72 @@ let ge = class extends qe {
10161
10174
  `;
10162
10175
  }
10163
10176
  };
10164
- ge.styles = [...qe.styles, Co];
10165
- be([
10166
- O({ type: String })
10167
- ], ge.prototype, "view", 2);
10168
- be([
10169
- O({ type: Boolean })
10170
- ], ge.prototype, "embedded", 2);
10171
- be([
10172
- B()
10173
- ], ge.prototype, "step", 2);
10174
- be([
10175
- B()
10176
- ], ge.prototype, "busy", 2);
10177
- be([
10178
- B()
10179
- ], ge.prototype, "error", 2);
10180
- be([
10181
- B()
10182
- ], ge.prototype, "notice", 2);
10183
- be([
10184
- B()
10185
- ], ge.prototype, "showPassword", 2);
10186
- be([
10187
- B()
10188
- ], ge.prototype, "expandedOAuth", 2);
10189
- be([
10190
- B()
10191
- ], ge.prototype, "token", 2);
10192
- be([
10193
- B()
10194
- ], ge.prototype, "resendCooldownUntil", 2);
10195
- be([
10196
- B()
10197
- ], ge.prototype, "challenge", 2);
10198
- be([
10199
- B()
10200
- ], ge.prototype, "recovery", 2);
10201
- be([
10202
- wi("form input:not([type=hidden])")
10203
- ], ge.prototype, "firstInput", 2);
10204
- be([
10205
- B()
10206
- ], ge.prototype, "password", 2);
10207
- be([
10208
- B()
10209
- ], ge.prototype, "passwordConfirm", 2);
10210
- be([
10211
- B()
10212
- ], ge.prototype, "legalAccepted", 2);
10213
- ge = be([
10177
+ he.styles = [...qe.styles, Co];
10178
+ ye([
10179
+ F({ type: String })
10180
+ ], he.prototype, "view", 2);
10181
+ ye([
10182
+ F({ type: Boolean })
10183
+ ], he.prototype, "embedded", 2);
10184
+ ye([
10185
+ N()
10186
+ ], he.prototype, "step", 2);
10187
+ ye([
10188
+ N()
10189
+ ], he.prototype, "busy", 2);
10190
+ ye([
10191
+ N()
10192
+ ], he.prototype, "error", 2);
10193
+ ye([
10194
+ N()
10195
+ ], he.prototype, "notice", 2);
10196
+ ye([
10197
+ N()
10198
+ ], he.prototype, "showPassword", 2);
10199
+ ye([
10200
+ N()
10201
+ ], he.prototype, "showPasswordConfirm", 2);
10202
+ ye([
10203
+ N()
10204
+ ], he.prototype, "expandedOAuth", 2);
10205
+ ye([
10206
+ N()
10207
+ ], he.prototype, "token", 2);
10208
+ ye([
10209
+ N()
10210
+ ], he.prototype, "resendCooldownUntil", 2);
10211
+ ye([
10212
+ N()
10213
+ ], he.prototype, "challenge", 2);
10214
+ ye([
10215
+ N()
10216
+ ], he.prototype, "recovery", 2);
10217
+ ye([
10218
+ bi("form input:not([type=hidden])")
10219
+ ], he.prototype, "firstInput", 2);
10220
+ ye([
10221
+ N()
10222
+ ], he.prototype, "password", 2);
10223
+ ye([
10224
+ N()
10225
+ ], he.prototype, "passwordConfirm", 2);
10226
+ ye([
10227
+ N()
10228
+ ], he.prototype, "legalAccepted", 2);
10229
+ ye([
10230
+ N()
10231
+ ], he.prototype, "legalErrorFromOAuth", 2);
10232
+ he = ye([
10214
10233
  ze("authui-sign-in")
10215
- ], ge);
10216
- var qo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, F = (t, e, n, i) => {
10234
+ ], he);
10235
+ var qo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, O = (t, e, n, i) => {
10217
10236
  for (var o = i > 1 ? void 0 : i ? _o(e, n) : e, a = t.length - 1, s; a >= 0; a--)
10218
10237
  (s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
10219
10238
  return i && o && qo(e, n, o), o;
10220
10239
  };
10221
10240
  let z = class extends qe {
10222
10241
  constructor() {
10223
- super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.verifyEmailCooldownTimer = null, this.onTabsKeydown = (t) => {
10242
+ super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.showOldPassword = !1, this.showNewPassword = !1, this.showNewPasswordConfirm = !1, this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.verifyEmailCooldownTimer = null, this.verifyPhoneCooldownUntil = 0, this.verifyPhoneCooldownTimer = null, this.onTabsKeydown = (t) => {
10224
10243
  const e = [...this.renderRoot?.querySelectorAll('[role="tab"]') ?? []];
10225
10244
  if (!e.length) return;
10226
10245
  const n = e.findIndex((a) => a.getAttribute("aria-selected") === "true");
@@ -10235,12 +10254,12 @@ let z = class extends qe {
10235
10254
  const o = e[i].id.replace("authui-tab-", "");
10236
10255
  this.select(o), requestAnimationFrame(() => e[i]?.focus());
10237
10256
  }, this.noticeTimer = null, this.factorsLoading = !1, this.onUpdateName = (t) => {
10238
- t.preventDefault(), this.requireValid(t) && this.run("name", () => R.updateName(this.nameInput), this.t("nameUpdated"));
10257
+ t.preventDefault(), this.requireValid(t) && this.run("name", () => M.updateName(this.nameInput), this.t("nameUpdated"));
10239
10258
  }, this.onUpdateEmail = (t) => {
10240
10259
  t.preventDefault(), this.requireValid(t) && this.run(
10241
10260
  "email",
10242
10261
  async () => {
10243
- await R.updateEmail(this.emailInput, this.emailPassword), this.emailPassword = "";
10262
+ await M.updateEmail(this.emailInput, this.emailPassword), this.emailPassword = "";
10244
10263
  },
10245
10264
  this.t("emailUpdated")
10246
10265
  );
@@ -10248,7 +10267,7 @@ let z = class extends qe {
10248
10267
  t.preventDefault(), this.requireValid(t) && this.run(
10249
10268
  "phone",
10250
10269
  async () => {
10251
- await R.updatePhone(this.phoneInput, this.phonePassword), this.phonePassword = "";
10270
+ await M.updatePhone(this.phoneInput, this.phonePassword), this.phonePassword = "";
10252
10271
  },
10253
10272
  this.t("phoneUpdated")
10254
10273
  );
@@ -10256,7 +10275,7 @@ let z = class extends qe {
10256
10275
  t.preventDefault(), this.requireValid(t) && this.run(
10257
10276
  "guest",
10258
10277
  async () => {
10259
- await R.convertGuest(this.emailInput, this.emailPassword, this.guestName), this.emailPassword = "";
10278
+ await M.convertGuest(this.emailInput, this.emailPassword, this.guestName), this.emailPassword = "";
10260
10279
  },
10261
10280
  this.t("accountConverted")
10262
10281
  );
@@ -10264,19 +10283,19 @@ let z = class extends qe {
10264
10283
  Date.now() < this.verifyEmailCooldownUntil || this.run(
10265
10284
  "verify",
10266
10285
  async () => {
10267
- await R.sendEmailVerification(), this.startVerifyEmailCooldown();
10286
+ await M.sendEmailVerification(), this.startVerifyEmailCooldown();
10268
10287
  },
10269
10288
  this.t("verificationSent")
10270
10289
  );
10271
10290
  }, this.onSendPhoneVerification = () => {
10272
- this.run("verify-phone", async () => {
10273
- await R.sendPhoneVerification(), this.phoneCodeSent = !0;
10291
+ Date.now() < this.verifyPhoneCooldownUntil || this.run("verify-phone", async () => {
10292
+ await M.sendPhoneVerification(), this.phoneCodeSent = !0, this.startVerifyPhoneCooldown();
10274
10293
  });
10275
10294
  }, this.onConfirmPhoneVerification = (t) => {
10276
10295
  t.preventDefault(), this.requireValid(t) && this.run(
10277
10296
  "verify-phone-code",
10278
10297
  async () => {
10279
- await R.confirmPhoneVerification(this.phoneCode), this.phoneCode = "", this.phoneCodeSent = !1;
10298
+ await M.confirmPhoneVerification(this.phoneCode), this.phoneCode = "", this.phoneCodeSent = !1, this.verifyPhoneCooldownUntil = 0, this.clearVerifyPhoneCooldownTimer();
10280
10299
  },
10281
10300
  this.t("phoneVerified")
10282
10301
  );
@@ -10289,7 +10308,7 @@ let z = class extends qe {
10289
10308
  this.run(
10290
10309
  "password",
10291
10310
  async () => {
10292
- await R.updatePassword(this.newPassword, this.oldPassword), this.oldPassword = this.newPassword = this.newPasswordConfirm = "";
10311
+ await M.updatePassword(this.newPassword, this.oldPassword), this.oldPassword = this.newPassword = this.newPasswordConfirm = "";
10293
10312
  },
10294
10313
  this.t("passwordChanged")
10295
10314
  );
@@ -10297,17 +10316,17 @@ let z = class extends qe {
10297
10316
  }, this.onToggleMfa = () => {
10298
10317
  const t = !this.user?.mfa;
10299
10318
  this.run("mfa", async () => {
10300
- await R.setMfaEnabled(t), await this.loadFactors();
10319
+ await M.setMfaEnabled(t), await this.loadFactors();
10301
10320
  });
10302
10321
  }, this.onAddAuthenticator = () => {
10303
10322
  this.run("authenticator", async () => {
10304
- this.authenticator = await R.addAuthenticator(), this.authenticatorCode = "";
10323
+ this.authenticator = await M.addAuthenticator(), this.authenticatorCode = "";
10305
10324
  });
10306
10325
  }, this.onVerifyAuthenticator = (t) => {
10307
10326
  t.preventDefault(), this.requireValid(t) && this.run(
10308
10327
  "authenticator-code",
10309
10328
  async () => {
10310
- await R.verifyAuthenticator(this.authenticatorCode), this.authenticator = null, this.authenticatorCode = "", await this.loadFactors();
10329
+ await M.verifyAuthenticator(this.authenticatorCode), this.authenticator = null, this.authenticatorCode = "", await this.loadFactors();
10311
10330
  },
10312
10331
  this.t("authenticatorAdded")
10313
10332
  );
@@ -10317,15 +10336,15 @@ let z = class extends qe {
10317
10336
  return;
10318
10337
  }
10319
10338
  this.confirmRemoveAuthenticator = !1, this.run("remove-authenticator", async () => {
10320
- await R.removeAuthenticator(), await this.loadFactors();
10339
+ await M.removeAuthenticator(), await this.loadFactors();
10321
10340
  });
10322
10341
  }, this.onRecoveryCodes = () => {
10323
10342
  this.run("recovery", async () => {
10324
10343
  try {
10325
- this.recoveryCodes = await R.createRecoveryCodes();
10344
+ this.recoveryCodes = await M.createRecoveryCodes();
10326
10345
  } catch (t) {
10327
10346
  if (!mt(t, oe.recoveryCodesExist)) throw t;
10328
- this.recoveryCodes = await R.getRecoveryCodes();
10347
+ this.recoveryCodes = await M.getRecoveryCodes();
10329
10348
  }
10330
10349
  await this.loadFactors();
10331
10350
  });
@@ -10335,7 +10354,7 @@ let z = class extends qe {
10335
10354
  return;
10336
10355
  }
10337
10356
  this.confirmRegenerate = !1, this.run("recovery", async () => {
10338
- this.recoveryCodes = await R.regenerateRecoveryCodes();
10357
+ this.recoveryCodes = await M.regenerateRecoveryCodes();
10339
10358
  });
10340
10359
  }, this.onCopyCodes = async () => {
10341
10360
  if (this.recoveryCodes)
@@ -10355,7 +10374,7 @@ let z = class extends qe {
10355
10374
  }
10356
10375
  }, this.onStepUpFactor = (t) => {
10357
10376
  this.run("stepup", async () => {
10358
- const e = await R.createMfaChallenge(t);
10377
+ const e = await M.createMfaChallenge(t);
10359
10378
  this.stepUp = { ...this.stepUp, challenge: { id: e.$id, factor: t } }, this.stepUpCode = "";
10360
10379
  });
10361
10380
  }, this.onStepUpVerify = (t) => {
@@ -10364,40 +10383,40 @@ let z = class extends qe {
10364
10383
  e?.challenge && (async () => {
10365
10384
  let n = !1;
10366
10385
  await this.run("stepup-code", async () => {
10367
- await R.completeMfaChallenge(e.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", n = !0;
10386
+ await M.completeMfaChallenge(e.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", n = !0;
10368
10387
  }), n && await e.retry();
10369
10388
  })();
10370
10389
  }, this.onDeleteSession = (t) => {
10371
10390
  this.run(`session-${t}`, async () => {
10372
10391
  if ((this.sessions ?? []).some((n) => n.$id === t && n.current)) {
10373
- await R.signOut(), this.sessions = [];
10392
+ await M.signOut(), this.sessions = [];
10374
10393
  return;
10375
10394
  }
10376
- await R.signOut(t), this.sessions = (this.sessions ?? []).filter((n) => n.$id !== t);
10395
+ await M.signOut(t), this.sessions = (this.sessions ?? []).filter((n) => n.$id !== t);
10377
10396
  });
10378
10397
  }, this.onSignOutAll = () => {
10379
10398
  if (!this.confirmSignOutAll) {
10380
10399
  this.confirmSignOutAll = !0;
10381
10400
  return;
10382
10401
  }
10383
- this.confirmSignOutAll = !1, this.run("sessions-all", () => R.signOutEverywhere());
10402
+ this.confirmSignOutAll = !1, this.run("sessions-all", () => M.signOutEverywhere());
10384
10403
  }, this.onDeleteIdentity = (t) => {
10385
10404
  if (this.confirmDisconnectId !== t) {
10386
10405
  this.confirmDisconnectId = t;
10387
10406
  return;
10388
10407
  }
10389
10408
  this.confirmDisconnectId = null, this.run(`identity-${t}`, async () => {
10390
- await R.deleteIdentity(t), this.identities = (this.identities ?? []).filter((e) => e.$id !== t);
10409
+ await M.deleteIdentity(t), this.identities = (this.identities ?? []).filter((e) => e.$id !== t);
10391
10410
  });
10392
10411
  }, this.onDeleteAccount = () => {
10393
- this.run("delete", () => R.deleteAccount());
10412
+ this.run("delete", () => M.deleteAccount());
10394
10413
  };
10395
10414
  }
10396
10415
  connectedCallback() {
10397
10416
  super.connectedCallback(), this.active = this.tab, this.hydrate();
10398
10417
  }
10399
10418
  disconnectedCallback() {
10400
- super.disconnectedCallback(), this.clearVerifyEmailCooldownTimer(), this.noticeTimer && (clearTimeout(this.noticeTimer), this.noticeTimer = null);
10419
+ super.disconnectedCallback(), this.clearVerifyEmailCooldownTimer(), this.clearVerifyPhoneCooldownTimer(), this.noticeTimer && (clearTimeout(this.noticeTimer), this.noticeTimer = null);
10401
10420
  }
10402
10421
  willUpdate(t) {
10403
10422
  t.has("tab") && t.get("tab") !== void 0 && (this.active = this.tab), t.has("auth") && this.hydrate(), this.ensureLoaded();
@@ -10426,7 +10445,7 @@ let z = class extends qe {
10426
10445
  '.tab[aria-selected="true"]'
10427
10446
  );
10428
10447
  n && typeof n.scrollIntoView == "function" && n.scrollIntoView({ inline: "nearest", block: "nearest", behavior: "smooth" });
10429
- }), (t.has("confirmDelete") && this.confirmDelete || t.has("confirmSignOutAll") && this.confirmSignOutAll || t.has("confirmDisconnectId") && this.confirmDisconnectId !== null) && requestAnimationFrame(() => {
10448
+ }), (t.has("confirmDelete") && this.confirmDelete || t.has("confirmSignOutAll") && this.confirmSignOutAll || t.has("confirmDisconnectId") && this.confirmDisconnectId !== null || t.has("confirmRegenerate") && this.confirmRegenerate || t.has("confirmRemoveAuthenticator") && this.confirmRemoveAuthenticator) && requestAnimationFrame(() => {
10430
10449
  this.renderRoot.querySelector(
10431
10450
  ".card-footer [autofocus], .row-actions [autofocus], .inline [autofocus], .card-footer .btn-outline, .row-actions .btn-outline, .inline .btn-outline"
10432
10451
  )?.focus({ preventScroll: !0 });
@@ -10463,12 +10482,12 @@ let z = class extends qe {
10463
10482
  // ─────────────────────────── loaders ───────────────────────────
10464
10483
  async loadSessions() {
10465
10484
  await this.run("sessions", async () => {
10466
- this.sessions = await R.listSessions();
10485
+ this.sessions = await M.listSessions();
10467
10486
  });
10468
10487
  }
10469
10488
  async loadIdentities() {
10470
10489
  await this.run("identities", async () => {
10471
- this.identities = await R.listIdentities();
10490
+ this.identities = await M.listIdentities();
10472
10491
  });
10473
10492
  }
10474
10493
  /** Probe once so Activity is never shown on servers without /account/logs. */
@@ -10476,7 +10495,7 @@ let z = class extends qe {
10476
10495
  if (!this.logsProbeStarted) {
10477
10496
  this.logsProbeStarted = !0;
10478
10497
  try {
10479
- this.logs = await R.listLogs(), this.logsSupported = !0;
10498
+ this.logs = await M.listLogs(), this.logsSupported = !0;
10480
10499
  } catch {
10481
10500
  this.logsSupported = !1, this.logs = [], this.active === "activity" && (this.active = "profile");
10482
10501
  }
@@ -10489,7 +10508,7 @@ let z = class extends qe {
10489
10508
  }
10490
10509
  this.busy = "logs";
10491
10510
  try {
10492
- this.logs = await R.listLogs();
10511
+ this.logs = await M.listLogs();
10493
10512
  } catch {
10494
10513
  this.logsSupported = !1, this.logs = [], this.active === "activity" && (this.active = "profile");
10495
10514
  } finally {
@@ -10500,7 +10519,7 @@ let z = class extends qe {
10500
10519
  if (!this.factorsLoading) {
10501
10520
  this.factorsLoading = !0;
10502
10521
  try {
10503
- this.factors = await R.listMfaFactors();
10522
+ this.factors = await M.listMfaFactors();
10504
10523
  } catch {
10505
10524
  this.factors = {
10506
10525
  totp: !1,
@@ -10522,6 +10541,14 @@ let z = class extends qe {
10522
10541
  clearVerifyEmailCooldownTimer() {
10523
10542
  this.verifyEmailCooldownTimer && (clearInterval(this.verifyEmailCooldownTimer), this.verifyEmailCooldownTimer = null);
10524
10543
  }
10544
+ startVerifyPhoneCooldown() {
10545
+ this.verifyPhoneCooldownUntil = Date.now() + 45e3, this.clearVerifyPhoneCooldownTimer(), this.verifyPhoneCooldownTimer = setInterval(() => {
10546
+ this.requestUpdate(), Date.now() >= this.verifyPhoneCooldownUntil && this.clearVerifyPhoneCooldownTimer();
10547
+ }, 1e3);
10548
+ }
10549
+ clearVerifyPhoneCooldownTimer() {
10550
+ this.verifyPhoneCooldownTimer && (clearInterval(this.verifyPhoneCooldownTimer), this.verifyPhoneCooldownTimer = null);
10551
+ }
10525
10552
  bind(t) {
10526
10553
  return (e) => {
10527
10554
  this[t] = e.target.value;
@@ -10530,16 +10557,16 @@ let z = class extends qe {
10530
10557
  // ─────────────────────────── render ───────────────────────────
10531
10558
  render() {
10532
10559
  if (!this.auth.configured)
10533
- return w`<div class="alert alert-error" role="alert">
10560
+ return b`<div class="alert alert-error" role="alert">
10534
10561
  ${q.alert}
10535
10562
  <div class="alert-body">${this.t("errorNotConfigured")}</div>
10536
10563
  </div>`;
10537
10564
  if (this.auth.status === "loading")
10538
- return w`<div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
10565
+ return b`<div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
10539
10566
  <div class="empty"><span class="spinner"></span></div>
10540
10567
  </div>`;
10541
10568
  if (!this.user)
10542
- return w`<div class="panel ${this.embedded ? "embedded" : ""}">
10569
+ return b`<div class="panel ${this.embedded ? "embedded" : ""}">
10543
10570
  <authui-sign-in embedded></authui-sign-in>
10544
10571
  </div>`;
10545
10572
  const t = [
@@ -10549,12 +10576,12 @@ let z = class extends qe {
10549
10576
  { id: "connections", label: this.t("connections") },
10550
10577
  ...this.logsSupported ? [{ id: "activity", label: this.t("activity") }] : []
10551
10578
  ];
10552
- return w`
10579
+ return b`
10553
10580
  <div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
10554
10581
  ${this.renderIdentity()}
10555
10582
  <div class="tabs" role="tablist" @keydown=${this.onTabsKeydown}>
10556
10583
  ${t.map(
10557
- (e) => w`<button
10584
+ (e) => b`<button
10558
10585
  class="tab"
10559
10586
  role="tab"
10560
10587
  id=${`authui-tab-${e.id}`}
@@ -10567,7 +10594,7 @@ let z = class extends qe {
10567
10594
  </button>`
10568
10595
  )}
10569
10596
  </div>
10570
- ${this.notice ? w`<div class="alert alert-${this.notice.tone}" role="status">
10597
+ ${this.notice ? b`<div class="alert alert-${this.notice.tone}" role="status">
10571
10598
  ${this.notice.tone === "success" ? q.checkCircle : q.info}
10572
10599
  <div class="alert-body">${this.notice.message}</div>
10573
10600
  <button
@@ -10580,7 +10607,7 @@ let z = class extends qe {
10580
10607
  ${q.x}
10581
10608
  </button>
10582
10609
  </div>` : C}
10583
- ${this.stepUp ? this.renderStepUp() : w`<div
10610
+ ${this.stepUp ? this.renderStepUp() : b`<div
10584
10611
  class="tabpanel"
10585
10612
  role="tabpanel"
10586
10613
  id=${`authui-panel-${this.active}`}
@@ -10593,20 +10620,20 @@ let z = class extends qe {
10593
10620
  }
10594
10621
  renderIdentity() {
10595
10622
  const t = this.user, e = t.name || t.email || t.phone || this.t("guestAccount");
10596
- return w`
10623
+ return b`
10597
10624
  <div class="between">
10598
10625
  <div class="identity">
10599
10626
  <span class="avatar">${Ai(e)}</span>
10600
10627
  <div class="row-main">
10601
10628
  <span class="row-title" title=${e}>
10602
10629
  ${e}
10603
- ${t.mfa ? w`<span class="badge badge-success">${q.shieldCheck} ${this.t("mfaBadge")}</span>` : C}
10604
- ${R.isPreview ? w`<span class="badge badge-info">${this.t("preview")}</span>` : C}
10630
+ ${t.mfa ? b`<span class="badge badge-success">${q.shieldCheck} ${this.t("mfaBadge")}</span>` : C}
10631
+ ${M.isPreview ? b`<span class="badge badge-info">${this.t("preview")}</span>` : C}
10605
10632
  </span>
10606
- ${t.email && t.name ? w`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
10633
+ ${t.email && t.name ? b`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
10607
10634
  </div>
10608
10635
  </div>
10609
- <button class="btn btn-outline btn-sm" @click=${() => R.signOut()}>
10636
+ <button class="btn btn-outline btn-sm" @click=${() => M.signOut()}>
10610
10637
  ${q.logOut} ${this.t("signOut")}
10611
10638
  </button>
10612
10639
  </div>
@@ -10628,27 +10655,27 @@ let z = class extends qe {
10628
10655
  }
10629
10656
  error(t) {
10630
10657
  const e = this.errors[t];
10631
- return e ? w`<div class="alert alert-error" role="alert">
10658
+ return e ? b`<div class="alert alert-error" role="alert">
10632
10659
  ${q.alert}
10633
10660
  <div class="alert-body">${e}</div>
10634
10661
  </div>` : C;
10635
10662
  }
10636
10663
  spinner(t) {
10637
- return this.busy === t ? w`<span class="spinner" aria-hidden="true"></span>` : C;
10664
+ return this.busy === t ? b`<span class="spinner" aria-hidden="true"></span>` : C;
10638
10665
  }
10639
10666
  card(t, e, n, i, o = !1) {
10640
- return w`<section class="card ${o ? "card-danger" : ""}">
10667
+ return b`<section class="card ${o ? "card-danger" : ""}">
10641
10668
  <div class="card-header">
10642
10669
  <h3 class="card-title">${t}</h3>
10643
- ${e ? w`<p class="card-description">${e}</p>` : C}
10670
+ ${e ? b`<p class="card-description">${e}</p>` : C}
10644
10671
  </div>
10645
- ${n !== C ? w`<div class="card-body">${n}</div>` : C}
10646
- ${i ? w`<div class="card-footer">${i}</div>` : C}
10672
+ ${n !== C ? b`<div class="card-body">${n}</div>` : C}
10673
+ ${i ? b`<div class="card-footer">${i}</div>` : C}
10647
10674
  </section>`;
10648
10675
  }
10649
10676
  /** Vibes-style confirm footer: Cancel first (autofocus), destructive only on confirm. */
10650
10677
  confirmFooter(t, e, n, i) {
10651
- return w`
10678
+ return b`
10652
10679
  <button
10653
10680
  type="button"
10654
10681
  class="btn btn-outline btn-sm"
@@ -10669,23 +10696,23 @@ let z = class extends qe {
10669
10696
  `;
10670
10697
  }
10671
10698
  emptyState(t, e, n) {
10672
- return w`<div class="empty empty-well">
10699
+ return b`<div class="empty empty-well">
10673
10700
  <div class="empty-icon" aria-hidden="true">${t}</div>
10674
10701
  <p class="empty-title">${e}</p>
10675
10702
  <p class="empty-desc">${n}</p>
10676
10703
  </div>`;
10677
10704
  }
10678
10705
  verifiedBadge(t) {
10679
- return t ? w`<span class="badge badge-success">${q.check} ${this.t("verified")}</span>` : w`<span class="badge badge-warning">${this.t("unverified")}</span>`;
10706
+ return t ? b`<span class="badge badge-success">${q.check} ${this.t("verified")}</span>` : b`<span class="badge badge-warning">${this.t("unverified")}</span>`;
10680
10707
  }
10681
10708
  // ── Profile ──
10682
10709
  renderProfile() {
10683
10710
  const t = this.user;
10684
- return this.isGuest ? w`<div class="section">
10711
+ return this.isGuest ? b`<div class="section">
10685
10712
  ${this.card(
10686
10713
  this.t("guestAccount"),
10687
10714
  this.t("guestAccountDescription"),
10688
- w`<form class="form" id="guest-form" @submit=${this.onConvertGuest} novalidate>
10715
+ b`<form class="form" id="guest-form" @submit=${this.onConvertGuest} novalidate>
10689
10716
  <div class="field">
10690
10717
  <label class="label" for="guest-name">${this.t("name")}</label>
10691
10718
  <input
@@ -10722,7 +10749,7 @@ let z = class extends qe {
10722
10749
  />
10723
10750
  ${this.emailPassword ? (() => {
10724
10751
  const e = pi(this.emailPassword);
10725
- return w`<div class="strength" aria-live="polite">
10752
+ return b`<div class="strength" aria-live="polite">
10726
10753
  <div
10727
10754
  class="strength-meter"
10728
10755
  data-level=${String(e.level)}
@@ -10737,11 +10764,11 @@ let z = class extends qe {
10737
10764
  </div>
10738
10765
  <p class="strength-label">${this.t(e.labelKey)}</p>
10739
10766
  </div>`;
10740
- })() : w`<p class="hint">${this.t("passwordHint")}</p>`}
10767
+ })() : b`<p class="hint">${this.t("passwordHint")}</p>`}
10741
10768
  </div>
10742
10769
  ${this.error("guest")}
10743
10770
  </form>`,
10744
- w`<button
10771
+ b`<button
10745
10772
  class="btn btn-primary btn-sm"
10746
10773
  type="submit"
10747
10774
  form="guest-form"
@@ -10750,11 +10777,11 @@ let z = class extends qe {
10750
10777
  ${this.spinner("guest")} ${this.t("createAccount")}
10751
10778
  </button>`
10752
10779
  )}
10753
- </div>` : w`<div class="section">
10780
+ </div>` : b`<div class="section">
10754
10781
  ${this.card(
10755
10782
  this.t("name"),
10756
10783
  void 0,
10757
- w`<form class="form" id="name-form" @submit=${this.onUpdateName} novalidate>
10784
+ b`<form class="form" id="name-form" @submit=${this.onUpdateName} novalidate>
10758
10785
  <div class="field">
10759
10786
  <label class="label" for="acc-name">${this.t("name")}</label>
10760
10787
  <input
@@ -10768,7 +10795,7 @@ let z = class extends qe {
10768
10795
  </div>
10769
10796
  ${this.error("name")}
10770
10797
  </form>`,
10771
- w`<button
10798
+ b`<button
10772
10799
  class="btn btn-primary btn-sm"
10773
10800
  type="submit"
10774
10801
  form="name-form"
@@ -10780,7 +10807,7 @@ let z = class extends qe {
10780
10807
  ${this.card(
10781
10808
  this.t("email"),
10782
10809
  void 0,
10783
- w`<form class="form" id="email-form" @submit=${this.onUpdateEmail} novalidate>
10810
+ b`<form class="form" id="email-form" @submit=${this.onUpdateEmail} novalidate>
10784
10811
  <div class="field">
10785
10812
  <label class="label" for="acc-email"
10786
10813
  >${this.t("email")}
@@ -10796,7 +10823,7 @@ let z = class extends qe {
10796
10823
  required
10797
10824
  />
10798
10825
  </div>
10799
- ${this.emailInput !== t.email ? w`<div class="field">
10826
+ ${this.emailInput !== t.email ? b`<div class="field">
10800
10827
  <label class="label" for="acc-email-password"
10801
10828
  >${t.passwordUpdate ? this.t("currentPassword") : this.t("createPassword")}</label
10802
10829
  >
@@ -10809,12 +10836,12 @@ let z = class extends qe {
10809
10836
  autocomplete=${t.passwordUpdate ? "current-password" : "new-password"}
10810
10837
  required
10811
10838
  />
10812
- ${t.passwordUpdate ? C : w`<p class="hint">${this.t("createPasswordHint")}</p>`}
10839
+ ${t.passwordUpdate ? C : b`<p class="hint">${this.t("createPasswordHint")}</p>`}
10813
10840
  </div>` : C}
10814
10841
  ${this.error("email")} ${this.error("verify")}
10815
10842
  </form>`,
10816
- w`
10817
- ${t.email && !t.emailVerification ? w`<button
10843
+ b`
10844
+ ${t.email && !t.emailVerification ? b`<button
10818
10845
  class="btn btn-outline btn-sm"
10819
10846
  type="button"
10820
10847
  @click=${this.onSendVerification}
@@ -10841,7 +10868,7 @@ let z = class extends qe {
10841
10868
  ${this.card(
10842
10869
  this.t("phone"),
10843
10870
  void 0,
10844
- w`<form class="form" id="phone-form" @submit=${this.onUpdatePhone} novalidate>
10871
+ b`<form class="form" id="phone-form" @submit=${this.onUpdatePhone} novalidate>
10845
10872
  <div class="field">
10846
10873
  <label class="label" for="acc-phone"
10847
10874
  >${this.t("phone")}
@@ -10857,7 +10884,7 @@ let z = class extends qe {
10857
10884
  autocomplete="tel"
10858
10885
  />
10859
10886
  </div>
10860
- ${this.phoneInput !== t.phone ? w`<div class="field">
10887
+ ${this.phoneInput !== t.phone ? b`<div class="field">
10861
10888
  <label class="label" for="acc-phone-password"
10862
10889
  >${t.passwordUpdate ? this.t("currentPassword") : this.t("createPassword")}</label
10863
10890
  >
@@ -10870,9 +10897,9 @@ let z = class extends qe {
10870
10897
  autocomplete=${t.passwordUpdate ? "current-password" : "new-password"}
10871
10898
  required
10872
10899
  />
10873
- ${t.passwordUpdate ? C : w`<p class="hint">${this.t("createPasswordHint")}</p>`}
10900
+ ${t.passwordUpdate ? C : b`<p class="hint">${this.t("createPasswordHint")}</p>`}
10874
10901
  </div>` : C}
10875
- ${this.phoneCodeSent ? w`<div class="field">
10902
+ ${this.phoneCodeSent ? b`<div class="field">
10876
10903
  <label class="label" for="acc-phone-code">${this.t("code")}</label>
10877
10904
  <input
10878
10905
  class="input input-otp"
@@ -10891,8 +10918,8 @@ let z = class extends qe {
10891
10918
  </div>` : C}
10892
10919
  ${this.error("phone")} ${this.error("verify-phone")} ${this.error("verify-phone-code")}
10893
10920
  </form>`,
10894
- w`
10895
- ${t.phone && !t.phoneVerification && !this.phoneCodeSent ? w`<button
10921
+ b`
10922
+ ${t.phone && !t.phoneVerification && !this.phoneCodeSent ? b`<button
10896
10923
  class="btn btn-outline btn-sm"
10897
10924
  type="button"
10898
10925
  @click=${this.onSendPhoneVerification}
@@ -10900,14 +10927,28 @@ let z = class extends qe {
10900
10927
  >
10901
10928
  ${this.spinner("verify-phone")} ${this.t("sendCode")}
10902
10929
  </button>` : C}
10903
- ${this.phoneCodeSent ? w`<button
10904
- class="btn btn-outline btn-sm"
10905
- type="button"
10906
- @click=${this.onConfirmPhoneVerification}
10907
- ?disabled=${!!this.busy}
10908
- >
10909
- ${this.spinner("verify-phone-code")} ${this.t("verifyCode")}
10910
- </button>` : C}
10930
+ ${this.phoneCodeSent ? b`<button
10931
+ class="btn btn-outline btn-sm"
10932
+ type="button"
10933
+ @click=${this.onSendPhoneVerification}
10934
+ ?disabled=${!!this.busy || Date.now() < this.verifyPhoneCooldownUntil}
10935
+ >
10936
+ ${this.spinner("verify-phone")}
10937
+ ${Date.now() < this.verifyPhoneCooldownUntil ? this.t("verificationResendIn", {
10938
+ seconds: Math.max(
10939
+ 1,
10940
+ Math.ceil((this.verifyPhoneCooldownUntil - Date.now()) / 1e3)
10941
+ )
10942
+ }) : this.t("resendCode")}
10943
+ </button>
10944
+ <button
10945
+ class="btn btn-outline btn-sm"
10946
+ type="button"
10947
+ @click=${this.onConfirmPhoneVerification}
10948
+ ?disabled=${!!this.busy}
10949
+ >
10950
+ ${this.spinner("verify-phone-code")} ${this.t("verifyCode")}
10951
+ </button>` : C}
10911
10952
  <button
10912
10953
  class="btn btn-primary btn-sm"
10913
10954
  type="submit"
@@ -10925,7 +10966,7 @@ let z = class extends qe {
10925
10966
  return this.card(
10926
10967
  this.t("deleteAccount"),
10927
10968
  this.t("deleteAccountDescription"),
10928
- this.confirmDelete ? this.error("delete") : w`${this.error("delete")}
10969
+ this.confirmDelete ? this.error("delete") : b`${this.error("delete")}
10929
10970
  <button class="btn btn-outline btn-sm warn" @click=${() => this.confirmDelete = !0}>
10930
10971
  ${q.userX} ${this.t("deleteAccount")}
10931
10972
  </button>`,
@@ -10945,45 +10986,65 @@ let z = class extends qe {
10945
10986
  // ── Security ──
10946
10987
  renderSecurity() {
10947
10988
  const t = this.user, e = this.config?.mfa !== !1;
10948
- return w`<div class="section">
10989
+ return b`<div class="section">
10949
10990
  ${this.isGuest ? C : this.card(
10950
10991
  this.t("changePassword"),
10951
10992
  void 0,
10952
- w`<form
10993
+ b`<form
10953
10994
  class="form"
10954
10995
  id="password-form"
10955
10996
  @submit=${this.onChangePassword}
10956
10997
  novalidate
10957
10998
  >
10958
- ${t.passwordUpdate ? w`<div class="field">
10999
+ ${t.passwordUpdate ? b`<div class="field">
10959
11000
  <label class="label" for="acc-old-password"
10960
11001
  >${this.t("currentPassword")}</label
10961
11002
  >
10962
- <input
10963
- class="input"
10964
- id="acc-old-password"
10965
- type="password"
10966
- .value=${this.oldPassword}
10967
- @input=${this.bind("oldPassword")}
10968
- autocomplete="current-password"
10969
- required
10970
- />
11003
+ <div class="input-wrap">
11004
+ <input
11005
+ class="input"
11006
+ id="acc-old-password"
11007
+ type=${this.showOldPassword ? "text" : "password"}
11008
+ .value=${this.oldPassword}
11009
+ @input=${this.bind("oldPassword")}
11010
+ autocomplete="current-password"
11011
+ required
11012
+ />
11013
+ <button
11014
+ type="button"
11015
+ class="btn btn-ghost btn-icon"
11016
+ @click=${() => this.showOldPassword = !this.showOldPassword}
11017
+ aria-label=${this.showOldPassword ? this.t("hidePassword") : this.t("showPassword")}
11018
+ >
11019
+ ${this.showOldPassword ? q.eyeOff : q.eye}
11020
+ </button>
11021
+ </div>
10971
11022
  </div>` : C}
10972
11023
  <div class="field">
10973
11024
  <label class="label" for="acc-new-password">${this.t("newPassword")}</label>
10974
- <input
10975
- class="input"
10976
- id="acc-new-password"
10977
- type="password"
10978
- required
10979
- minlength="8"
10980
- .value=${this.newPassword}
10981
- @input=${this.bind("newPassword")}
10982
- autocomplete="new-password"
10983
- />
11025
+ <div class="input-wrap">
11026
+ <input
11027
+ class="input"
11028
+ id="acc-new-password"
11029
+ type=${this.showNewPassword ? "text" : "password"}
11030
+ required
11031
+ minlength="8"
11032
+ .value=${this.newPassword}
11033
+ @input=${this.bind("newPassword")}
11034
+ autocomplete="new-password"
11035
+ />
11036
+ <button
11037
+ type="button"
11038
+ class="btn btn-ghost btn-icon"
11039
+ @click=${() => this.showNewPassword = !this.showNewPassword}
11040
+ aria-label=${this.showNewPassword ? this.t("hidePassword") : this.t("showPassword")}
11041
+ >
11042
+ ${this.showNewPassword ? q.eyeOff : q.eye}
11043
+ </button>
11044
+ </div>
10984
11045
  ${this.newPassword ? (() => {
10985
11046
  const n = pi(this.newPassword);
10986
- return w`<div class="strength" aria-live="polite">
11047
+ return b`<div class="strength" aria-live="polite">
10987
11048
  <div
10988
11049
  class="strength-meter"
10989
11050
  data-level=${String(n.level)}
@@ -10998,26 +11059,36 @@ let z = class extends qe {
10998
11059
  </div>
10999
11060
  <p class="strength-label">${this.t(n.labelKey)}</p>
11000
11061
  </div>`;
11001
- })() : w`<p class="hint">${this.t("passwordHint")}</p>`}
11062
+ })() : b`<p class="hint">${this.t("passwordHint")}</p>`}
11002
11063
  </div>
11003
11064
  <div class="field">
11004
11065
  <label class="label" for="acc-new-password-confirm"
11005
11066
  >${this.t("confirmPassword")}</label
11006
11067
  >
11007
- <input
11008
- class="input"
11009
- id="acc-new-password-confirm"
11010
- type="password"
11011
- required
11012
- minlength="8"
11013
- .value=${this.newPasswordConfirm}
11014
- @input=${this.bind("newPasswordConfirm")}
11015
- autocomplete="new-password"
11016
- />
11068
+ <div class="input-wrap">
11069
+ <input
11070
+ class="input"
11071
+ id="acc-new-password-confirm"
11072
+ type=${this.showNewPasswordConfirm ? "text" : "password"}
11073
+ required
11074
+ minlength="8"
11075
+ .value=${this.newPasswordConfirm}
11076
+ @input=${this.bind("newPasswordConfirm")}
11077
+ autocomplete="new-password"
11078
+ />
11079
+ <button
11080
+ type="button"
11081
+ class="btn btn-ghost btn-icon"
11082
+ @click=${() => this.showNewPasswordConfirm = !this.showNewPasswordConfirm}
11083
+ aria-label=${this.showNewPasswordConfirm ? this.t("hidePassword") : this.t("showPassword")}
11084
+ >
11085
+ ${this.showNewPasswordConfirm ? q.eyeOff : q.eye}
11086
+ </button>
11087
+ </div>
11017
11088
  </div>
11018
11089
  ${this.error("password")}
11019
11090
  </form>`,
11020
- w`<button
11091
+ b`<button
11021
11092
  class="btn btn-primary btn-sm"
11022
11093
  type="submit"
11023
11094
  form="password-form"
@@ -11031,11 +11102,11 @@ let z = class extends qe {
11031
11102
  </div>`;
11032
11103
  }
11033
11104
  renderMfaCard() {
11034
- const t = this.user, e = this.factors?.totp ?? !1, n = this.authenticator ? R.isPreview ? po(this.authenticator.uri) : new on(R.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
11105
+ const t = this.user, e = this.factors?.totp ?? !1, n = this.authenticator ? M.isPreview ? po(this.authenticator.uri) : new on(M.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
11035
11106
  return this.card(
11036
11107
  this.t("twoFactor"),
11037
11108
  this.t("twoFactorDescription"),
11038
- w`<div class="kv">
11109
+ b`<div class="kv">
11039
11110
  <div class="toggle-row">
11040
11111
  <div class="row-main">
11041
11112
  <span class="row-title">${this.t("twoFactor")}</span>
@@ -11050,11 +11121,11 @@ let z = class extends qe {
11050
11121
  aria-label=${this.t("twoFactor")}
11051
11122
  ></button>
11052
11123
  </div>
11053
- ${t.mfa && !(this.factors?.totp || t.emailVerification || t.phoneVerification) ? w`<div class="alert alert-warning" role="status">
11124
+ ${t.mfa && !(this.factors?.totp || t.emailVerification || t.phoneVerification) ? b`<div class="alert alert-warning" role="status">
11054
11125
  ${q.alert}
11055
11126
  <div class="alert-body">
11056
11127
  ${this.t("mfaNoFactorWarning")}
11057
- ${this.factors?.totp ? C : w`<div class="links">
11128
+ ${this.factors?.totp ? C : b`<div class="links">
11058
11129
  <button
11059
11130
  type="button"
11060
11131
  class="btn btn-link"
@@ -11075,27 +11146,31 @@ let z = class extends qe {
11075
11146
  ${e ? this.verifiedBadge(!0) : C}</span
11076
11147
  >
11077
11148
  </div>
11078
- ${e ? this.confirmRemoveAuthenticator ? w`<div class="inline">
11149
+ ${e ? this.confirmRemoveAuthenticator ? b`<div class="inline">
11079
11150
  <button
11080
- class="btn btn-outline btn-sm warn"
11081
- @click=${this.onRemoveAuthenticator}
11151
+ type="button"
11152
+ class="btn btn-outline btn-sm"
11153
+ autofocus
11082
11154
  ?disabled=${!!this.busy}
11155
+ @click=${() => this.confirmRemoveAuthenticator = !1}
11083
11156
  >
11084
- ${this.spinner("remove-authenticator")} ${this.t("remove")}
11157
+ ${this.t("cancel")}
11085
11158
  </button>
11086
11159
  <button
11087
- class="btn btn-ghost btn-sm"
11088
- @click=${() => this.confirmRemoveAuthenticator = !1}
11160
+ type="button"
11161
+ class="btn btn-destructive btn-sm"
11162
+ @click=${this.onRemoveAuthenticator}
11163
+ ?disabled=${!!this.busy}
11089
11164
  >
11090
- ${this.t("cancel")}
11165
+ ${this.spinner("remove-authenticator")} ${this.t("remove")}
11091
11166
  </button>
11092
- </div>` : w`<button
11167
+ </div>` : b`<button
11093
11168
  class="btn btn-outline btn-sm"
11094
11169
  @click=${this.onRemoveAuthenticator}
11095
11170
  ?disabled=${!!this.busy}
11096
11171
  >
11097
11172
  ${this.spinner("remove-authenticator")} ${this.t("remove")}
11098
- </button>` : this.authenticator ? C : w`<button
11173
+ </button>` : this.authenticator ? C : b`<button
11099
11174
  class="btn btn-outline btn-sm"
11100
11175
  @click=${this.onAddAuthenticator}
11101
11176
  ?disabled=${!!this.busy}
@@ -11104,7 +11179,7 @@ let z = class extends qe {
11104
11179
  </button>`}
11105
11180
  </div>
11106
11181
  ${this.error("authenticator")} ${this.error("remove-authenticator")}
11107
- ${this.authenticator ? w`<form class="form" @submit=${this.onVerifyAuthenticator} novalidate>
11182
+ ${this.authenticator ? b`<form class="form" @submit=${this.onVerifyAuthenticator} novalidate>
11108
11183
  <p class="hint">${this.t("authenticatorScan")}</p>
11109
11184
  <img class="qr" src=${n} alt=${this.t("qrCodeAlt")} />
11110
11185
  <p class="hint center">${this.t("authenticatorManual")}</p>
@@ -11159,13 +11234,13 @@ let z = class extends qe {
11159
11234
  return this.card(
11160
11235
  this.t("recoveryCodes"),
11161
11236
  this.t("recoveryCodesDescription") + " " + this.t("recoveryCodesOnceHint"),
11162
- w`<div class="kv">
11163
- ${this.recoveryCodes ? w`<div class="alert alert-warning">
11237
+ b`<div class="kv">
11238
+ ${this.recoveryCodes ? b`<div class="alert alert-warning">
11164
11239
  ${q.alert}
11165
11240
  <div class="alert-body">${this.t("recoveryCodesWarning")}</div>
11166
11241
  </div>
11167
11242
  <div class="codes">
11168
- ${this.recoveryCodes.map((e) => w`<span class="code">${e}</span>`)}
11243
+ ${this.recoveryCodes.map((e) => b`<span class="code">${e}</span>`)}
11169
11244
  </div>
11170
11245
  <div class="inline">
11171
11246
  <button class="btn btn-outline btn-sm" @click=${this.onCopyCodes}>
@@ -11175,7 +11250,7 @@ let z = class extends qe {
11175
11250
  <button class="btn btn-ghost btn-sm" @click=${() => this.recoveryCodes = null}>
11176
11251
  ${this.t("done")}
11177
11252
  </button>
11178
- </div>` : w`<div class="inline">
11253
+ </div>` : b`<div class="inline">
11179
11254
  <button
11180
11255
  class="btn btn-outline btn-sm"
11181
11256
  @click=${this.onRecoveryCodes}
@@ -11184,21 +11259,26 @@ let z = class extends qe {
11184
11259
  ${this.spinner("recovery")} ${q.key}
11185
11260
  ${t ? this.t("viewRecoveryCodes") : this.t("generateRecoveryCodes")}
11186
11261
  </button>
11187
- ${t ? this.confirmRegenerate ? w`<div class="inline">
11262
+ ${t ? this.confirmRegenerate ? b`<div class="inline">
11188
11263
  <button
11189
- class="btn btn-outline btn-sm warn"
11190
- @click=${this.onRegenerateRecoveryCodes}
11264
+ type="button"
11265
+ class="btn btn-outline btn-sm"
11266
+ autofocus
11191
11267
  ?disabled=${!!this.busy}
11268
+ @click=${() => this.confirmRegenerate = !1}
11192
11269
  >
11193
- ${q.refresh} ${this.t("regenerateRecoveryCodes")}
11270
+ ${this.t("cancel")}
11194
11271
  </button>
11195
11272
  <button
11196
- class="btn btn-ghost btn-sm"
11197
- @click=${() => this.confirmRegenerate = !1}
11273
+ type="button"
11274
+ class="btn btn-destructive btn-sm"
11275
+ @click=${this.onRegenerateRecoveryCodes}
11276
+ ?disabled=${!!this.busy}
11198
11277
  >
11199
- ${this.t("cancel")}
11278
+ ${this.spinner("recovery")} ${q.refresh}
11279
+ ${this.t("regenerateRecoveryCodes")}
11200
11280
  </button>
11201
- </div>` : w`<button
11281
+ </div>` : b`<button
11202
11282
  class="btn btn-ghost btn-sm"
11203
11283
  @click=${this.onRegenerateRecoveryCodes}
11204
11284
  ?disabled=${!!this.busy}
@@ -11241,8 +11321,8 @@ let z = class extends qe {
11241
11321
  return this.card(
11242
11322
  this.t("mfaTitle"),
11243
11323
  this.t("errorChallengeRequired"),
11244
- w`<div class="kv">
11245
- ${t.challenge ? w`<form class="form" @submit=${this.onStepUpVerify} novalidate>
11324
+ b`<div class="kv">
11325
+ ${t.challenge ? b`<form class="form" @submit=${this.onStepUpVerify} novalidate>
11246
11326
  <div class="field">
11247
11327
  <label class="label" for="acc-stepup"
11248
11328
  >${t.challenge.factor === "recoverycode" ? this.t("recoveryCode") : this.t("code")}</label
@@ -11262,9 +11342,9 @@ let z = class extends qe {
11262
11342
  <button class="btn btn-primary btn-sm" type="submit" ?disabled=${!!this.busy}>
11263
11343
  ${this.spinner("stepup-code")} ${this.t("verifyCode")}
11264
11344
  </button>
11265
- </form>` : w`<div class="stack-sm">
11345
+ </form>` : b`<div class="stack-sm">
11266
11346
  ${n.filter((i) => i.available).map(
11267
- (i) => w`<button
11347
+ (i) => b`<button
11268
11348
  type="button"
11269
11349
  class="choice"
11270
11350
  @click=${() => this.onStepUpFactor(i.factor)}
@@ -11276,7 +11356,7 @@ let z = class extends qe {
11276
11356
  </div>`}
11277
11357
  ${this.error("stepup")} ${this.error("stepup-code")}
11278
11358
  </div>`,
11279
- w`<button class="btn btn-ghost btn-sm" @click=${() => this.stepUp = null}>
11359
+ b`<button class="btn btn-ghost btn-sm" @click=${() => this.stepUp = null}>
11280
11360
  ${this.t("cancel")}
11281
11361
  </button>`
11282
11362
  );
@@ -11288,24 +11368,24 @@ let z = class extends qe {
11288
11368
  }
11289
11369
  renderSessions() {
11290
11370
  const t = this.sessions;
11291
- return w`<div class="section">
11371
+ return b`<div class="section">
11292
11372
  ${this.card(
11293
11373
  this.t("sessions"),
11294
11374
  void 0,
11295
- w`${this.error("sessions")}
11296
- ${t === null ? w`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11375
+ b`${this.error("sessions")}
11376
+ ${t === null ? b`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11297
11377
  q.monitor,
11298
11378
  this.t("noSessions"),
11299
11379
  this.t("noSessionsDescription")
11300
11380
  ) : t.map(
11301
- (e) => w`<div class="row">
11381
+ (e) => b`<div class="row">
11302
11382
  <div class="inline">
11303
11383
  <span class="device">${this.deviceIcon(e)}</span>
11304
11384
  <div class="row-main">
11305
11385
  <span class="row-title">
11306
11386
  ${e.clientName || e.provider}
11307
- ${e.clientVersion ? w`<span class="muted small">${e.clientVersion}</span>` : C}
11308
- ${e.current ? w`<span class="badge badge-info">${this.t("currentSession")}</span>` : C}
11387
+ ${e.clientVersion ? b`<span class="muted small">${e.clientVersion}</span>` : C}
11388
+ ${e.current ? b`<span class="badge badge-info">${this.t("currentSession")}</span>` : C}
11309
11389
  </span>
11310
11390
  <span class="row-sub"
11311
11391
  >${[e.osName, e.countryName || e.countryCode, e.ip].filter(Boolean).join(" · ")}</span
@@ -11313,7 +11393,7 @@ let z = class extends qe {
11313
11393
  </div>
11314
11394
  </div>
11315
11395
  <div class="row-actions">
11316
- ${this.busy === `session-${e.$id}` ? w`<span class="spinner"></span>` : C}
11396
+ ${this.busy === `session-${e.$id}` ? b`<span class="spinner"></span>` : C}
11317
11397
  <button
11318
11398
  class="btn btn-ghost btn-sm"
11319
11399
  @click=${() => this.onDeleteSession(e.$id)}
@@ -11329,7 +11409,7 @@ let z = class extends qe {
11329
11409
  ${this.card(
11330
11410
  this.t("signOutAllSessions"),
11331
11411
  this.t("signOutAllSessionsDescription"),
11332
- this.confirmSignOutAll ? this.error("sessions-all") : w`${this.error("sessions-all")}
11412
+ this.confirmSignOutAll ? this.error("sessions-all") : b`${this.error("sessions-all")}
11333
11413
  <button
11334
11414
  class="btn btn-outline btn-sm warn"
11335
11415
  @click=${this.onSignOutAll}
@@ -11354,17 +11434,17 @@ let z = class extends qe {
11354
11434
  // ── Connections ──
11355
11435
  renderConnections() {
11356
11436
  const t = this.identities, e = this.config?.methods?.oauth ?? [];
11357
- return w`<div class="section">
11437
+ return b`<div class="section">
11358
11438
  ${this.card(
11359
11439
  this.t("connections"),
11360
11440
  void 0,
11361
- w`${this.error("identities")}
11362
- ${t === null ? w`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11441
+ b`${this.error("identities")}
11442
+ ${t === null ? b`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11363
11443
  q.link,
11364
11444
  this.t("noConnections"),
11365
11445
  this.t("noConnectionsDescription")
11366
11446
  ) : t.map(
11367
- (n) => w`<div class="row">
11447
+ (n) => b`<div class="row">
11368
11448
  <div class="inline">
11369
11449
  <span class="device">${ht(n.provider)}</span>
11370
11450
  <div class="row-main">
@@ -11373,7 +11453,7 @@ let z = class extends qe {
11373
11453
  </div>
11374
11454
  </div>
11375
11455
  <div class="row-actions">
11376
- ${this.confirmDisconnectId === n.$id ? w`<div class="inline">
11456
+ ${this.confirmDisconnectId === n.$id ? b`<div class="inline">
11377
11457
  <button
11378
11458
  type="button"
11379
11459
  class="btn btn-outline btn-sm"
@@ -11389,25 +11469,25 @@ let z = class extends qe {
11389
11469
  @click=${() => this.onDeleteIdentity(n.$id)}
11390
11470
  ?disabled=${!!this.busy}
11391
11471
  >
11392
- ${this.busy === `identity-${n.$id}` ? w`<span class="spinner"></span>` : C}
11472
+ ${this.busy === `identity-${n.$id}` ? b`<span class="spinner"></span>` : C}
11393
11473
  ${this.t("disconnect")}
11394
11474
  </button>
11395
- </div>` : w`<button
11475
+ </div>` : b`<button
11396
11476
  class="btn btn-ghost btn-sm"
11397
11477
  @click=${() => this.onDeleteIdentity(n.$id)}
11398
11478
  ?disabled=${!!this.busy}
11399
11479
  >
11400
- ${this.busy === `identity-${n.$id}` ? w`<span class="spinner"></span>` : C}
11480
+ ${this.busy === `identity-${n.$id}` ? b`<span class="spinner"></span>` : C}
11401
11481
  ${this.t("disconnect")}
11402
11482
  </button>`}
11403
11483
  </div>
11404
11484
  </div>`
11405
11485
  )}`,
11406
- e.length > 0 ? w`${e.filter((n) => !(t ?? []).some((i) => i.provider === n)).map(
11407
- (n) => w`<button
11486
+ e.length > 0 ? b`${e.filter((n) => !(t ?? []).some((i) => i.provider === n)).map(
11487
+ (n) => b`<button
11408
11488
  class="btn btn-outline btn-sm"
11409
11489
  @click=${() => {
11410
- this.run(`connect-${n}`, () => R.signInWithOAuth(n));
11490
+ this.run(`connect-${n}`, () => M.signInWithOAuth(n));
11411
11491
  }}
11412
11492
  ?disabled=${!!this.busy}
11413
11493
  >
@@ -11421,16 +11501,16 @@ let z = class extends qe {
11421
11501
  // ── Activity ──
11422
11502
  renderActivity() {
11423
11503
  const t = this.logs;
11424
- return w`<div class="section">
11504
+ return b`<div class="section">
11425
11505
  ${this.card(
11426
11506
  this.t("activity"),
11427
11507
  void 0,
11428
- w`${t === null ? w`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11508
+ b`${t === null ? b`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11429
11509
  q.activity,
11430
11510
  this.t("noActivity"),
11431
11511
  this.t("noActivityDescription")
11432
11512
  ) : t.map(
11433
- (e) => w`<div class="row">
11513
+ (e) => b`<div class="row">
11434
11514
  <div class="row-main">
11435
11515
  <span class="row-title">${e.event}</span>
11436
11516
  <span class="row-sub"
@@ -11542,109 +11622,121 @@ z.styles = [
11542
11622
  }
11543
11623
  `
11544
11624
  ];
11545
- F([
11546
- O({ type: Boolean })
11625
+ O([
11626
+ F({ type: Boolean })
11547
11627
  ], z.prototype, "embedded", 2);
11548
- F([
11549
- O({ type: String })
11628
+ O([
11629
+ F({ type: String })
11550
11630
  ], z.prototype, "tab", 2);
11551
- F([
11552
- B()
11631
+ O([
11632
+ N()
11553
11633
  ], z.prototype, "active", 2);
11554
- F([
11555
- B()
11634
+ O([
11635
+ N()
11556
11636
  ], z.prototype, "busy", 2);
11557
- F([
11558
- B()
11637
+ O([
11638
+ N()
11559
11639
  ], z.prototype, "notice", 2);
11560
- F([
11561
- B()
11640
+ O([
11641
+ N()
11562
11642
  ], z.prototype, "errors", 2);
11563
- F([
11564
- B()
11643
+ O([
11644
+ N()
11565
11645
  ], z.prototype, "nameInput", 2);
11566
- F([
11567
- B()
11646
+ O([
11647
+ N()
11568
11648
  ], z.prototype, "emailInput", 2);
11569
- F([
11570
- B()
11649
+ O([
11650
+ N()
11571
11651
  ], z.prototype, "emailPassword", 2);
11572
- F([
11573
- B()
11652
+ O([
11653
+ N()
11574
11654
  ], z.prototype, "phoneInput", 2);
11575
- F([
11576
- B()
11655
+ O([
11656
+ N()
11577
11657
  ], z.prototype, "phonePassword", 2);
11578
- F([
11579
- B()
11658
+ O([
11659
+ N()
11580
11660
  ], z.prototype, "phoneCode", 2);
11581
- F([
11582
- B()
11661
+ O([
11662
+ N()
11583
11663
  ], z.prototype, "phoneCodeSent", 2);
11584
- F([
11585
- B()
11664
+ O([
11665
+ N()
11586
11666
  ], z.prototype, "guestName", 2);
11587
- F([
11588
- B()
11667
+ O([
11668
+ N()
11589
11669
  ], z.prototype, "oldPassword", 2);
11590
- F([
11591
- B()
11670
+ O([
11671
+ N()
11592
11672
  ], z.prototype, "newPassword", 2);
11593
- F([
11594
- B()
11673
+ O([
11674
+ N()
11595
11675
  ], z.prototype, "newPasswordConfirm", 2);
11596
- F([
11597
- B()
11676
+ O([
11677
+ N()
11678
+ ], z.prototype, "showOldPassword", 2);
11679
+ O([
11680
+ N()
11681
+ ], z.prototype, "showNewPassword", 2);
11682
+ O([
11683
+ N()
11684
+ ], z.prototype, "showNewPasswordConfirm", 2);
11685
+ O([
11686
+ N()
11598
11687
  ], z.prototype, "authenticator", 2);
11599
- F([
11600
- B()
11688
+ O([
11689
+ N()
11601
11690
  ], z.prototype, "authenticatorCode", 2);
11602
- F([
11603
- B()
11691
+ O([
11692
+ N()
11604
11693
  ], z.prototype, "factors", 2);
11605
- F([
11606
- B()
11694
+ O([
11695
+ N()
11607
11696
  ], z.prototype, "recoveryCodes", 2);
11608
- F([
11609
- B()
11697
+ O([
11698
+ N()
11610
11699
  ], z.prototype, "stepUp", 2);
11611
- F([
11612
- B()
11700
+ O([
11701
+ N()
11613
11702
  ], z.prototype, "stepUpCode", 2);
11614
- F([
11615
- B()
11703
+ O([
11704
+ N()
11616
11705
  ], z.prototype, "copied", 2);
11617
- F([
11618
- B()
11706
+ O([
11707
+ N()
11619
11708
  ], z.prototype, "sessions", 2);
11620
- F([
11621
- B()
11709
+ O([
11710
+ N()
11622
11711
  ], z.prototype, "identities", 2);
11623
- F([
11624
- B()
11712
+ O([
11713
+ N()
11625
11714
  ], z.prototype, "logs", 2);
11626
- F([
11627
- B()
11715
+ O([
11716
+ N()
11628
11717
  ], z.prototype, "logsSupported", 2);
11629
- F([
11630
- B()
11718
+ O([
11719
+ N()
11631
11720
  ], z.prototype, "confirmDelete", 2);
11632
- F([
11633
- B()
11721
+ O([
11722
+ N()
11634
11723
  ], z.prototype, "confirmRegenerate", 2);
11635
- F([
11636
- B()
11724
+ O([
11725
+ N()
11637
11726
  ], z.prototype, "confirmRemoveAuthenticator", 2);
11638
- F([
11639
- B()
11727
+ O([
11728
+ N()
11640
11729
  ], z.prototype, "confirmSignOutAll", 2);
11641
- F([
11642
- B()
11730
+ O([
11731
+ N()
11643
11732
  ], z.prototype, "confirmDisconnectId", 2);
11644
- F([
11645
- B()
11733
+ O([
11734
+ N()
11646
11735
  ], z.prototype, "verifyEmailCooldownUntil", 2);
11647
- z = F([
11736
+ O([
11737
+ N()
11738
+ ], z.prototype, "verifyPhoneCooldownUntil", 2);
11739
+ z = O([
11648
11740
  ze("authui-account")
11649
11741
  ], z);
11650
11742
  var Lo = Object.defineProperty, No = Object.getOwnPropertyDescriptor, Ke = (t, e, n, i) => {
@@ -11714,7 +11806,7 @@ let Ee = class extends qe {
11714
11806
  }
11715
11807
  render() {
11716
11808
  const t = this.auth.status === "signed-in", e = this.view === "account" && t;
11717
- return w`
11809
+ return b`
11718
11810
  <dialog
11719
11811
  class=${e ? "wide" : ""}
11720
11812
  aria-label=${e ? this.t("dialogAccount") : this.t("dialogSignIn")}
@@ -11737,7 +11829,7 @@ let Ee = class extends qe {
11737
11829
  </button>
11738
11830
  </div>
11739
11831
  <div class="body" @scroll=${this.syncScrollCue}>
11740
- ${this.open ? e ? w`<authui-account embedded></authui-account>` : w`<authui-sign-in
11832
+ ${this.open ? e ? b`<authui-account embedded></authui-account>` : b`<authui-sign-in
11741
11833
  embedded
11742
11834
  .view=${this.view === "account" ? "sign-in" : this.view}
11743
11835
  ></authui-sign-in>` : C}
@@ -11839,13 +11931,13 @@ Ee.styles = [
11839
11931
  `
11840
11932
  ];
11841
11933
  Ke([
11842
- O({ type: Boolean, reflect: !0 })
11934
+ F({ type: Boolean, reflect: !0 })
11843
11935
  ], Ee.prototype, "open", 2);
11844
11936
  Ke([
11845
- O({ type: String })
11937
+ F({ type: String })
11846
11938
  ], Ee.prototype, "view", 2);
11847
11939
  Ke([
11848
- O({
11940
+ F({
11849
11941
  attribute: "close-on-success",
11850
11942
  reflect: !0,
11851
11943
  converter: {
@@ -11861,34 +11953,34 @@ Ke([
11861
11953
  })
11862
11954
  ], Ee.prototype, "closeOnSuccess", 2);
11863
11955
  Ke([
11864
- B()
11956
+ N()
11865
11957
  ], Ee.prototype, "handledPending", 2);
11866
11958
  Ke([
11867
- B()
11959
+ N()
11868
11960
  ], Ee.prototype, "scrollCue", 2);
11869
11961
  Ke([
11870
- wi("dialog")
11962
+ bi("dialog")
11871
11963
  ], Ee.prototype, "dialog", 2);
11872
11964
  Ke([
11873
- wi(".body")
11965
+ bi(".body")
11874
11966
  ], Ee.prototype, "bodyEl", 2);
11875
11967
  Ee = Ke([
11876
11968
  ze("authui-modal")
11877
11969
  ], Ee);
11878
- var Ho = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, Lt = (t, e, n, i) => {
11879
- for (var o = i > 1 ? void 0 : i ? Do(e, n) : e, a = t.length - 1, s; a >= 0; a--)
11970
+ var Do = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor, Lt = (t, e, n, i) => {
11971
+ for (var o = i > 1 ? void 0 : i ? Ho(e, n) : e, a = t.length - 1, s; a >= 0; a--)
11880
11972
  (s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
11881
- return i && o && Ho(e, n, o), o;
11973
+ return i && o && Do(e, n, o), o;
11882
11974
  };
11883
- let ot = class extends qe {
11975
+ let at = class extends qe {
11884
11976
  constructor() {
11885
11977
  super(...arguments), this.view = "sign-in", this.variant = "primary", this.size = "md";
11886
11978
  }
11887
11979
  render() {
11888
11980
  const t = this.size === "md" ? "" : `btn-${this.size}`;
11889
- return w`<button
11981
+ return b`<button
11890
11982
  class="btn btn-${this.variant} ${t}"
11891
- @click=${() => wt(this.view)}
11983
+ @click=${() => bt(this.view)}
11892
11984
  part="button"
11893
11985
  >
11894
11986
  <slot
@@ -11897,7 +11989,7 @@ let ot = class extends qe {
11897
11989
  </button>`;
11898
11990
  }
11899
11991
  };
11900
- ot.styles = [
11992
+ at.styles = [
11901
11993
  ...qe.styles,
11902
11994
  Ge`
11903
11995
  :host {
@@ -11909,17 +12001,17 @@ ot.styles = [
11909
12001
  `
11910
12002
  ];
11911
12003
  Lt([
11912
- O({ type: String })
11913
- ], ot.prototype, "view", 2);
12004
+ F({ type: String })
12005
+ ], at.prototype, "view", 2);
11914
12006
  Lt([
11915
- O({ type: String })
11916
- ], ot.prototype, "variant", 2);
12007
+ F({ type: String })
12008
+ ], at.prototype, "variant", 2);
11917
12009
  Lt([
11918
- O({ type: String })
11919
- ], ot.prototype, "size", 2);
11920
- ot = Lt([
12010
+ F({ type: String })
12011
+ ], at.prototype, "size", 2);
12012
+ at = Lt([
11921
12013
  ze("authui-button")
11922
- ], ot);
12014
+ ], at);
11923
12015
  var Bo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, Be = (t, e, n, i) => {
11924
12016
  for (var o = i > 1 ? void 0 : i ? Xo(e, n) : e, a = t.length - 1, s; a >= 0; a--)
11925
12017
  (s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
@@ -11949,7 +12041,7 @@ let Ue = class extends qe {
11949
12041
  }, this.toggleMenu = () => {
11950
12042
  this.menuOpen = !this.menuOpen, this.menuOpen && this.showTeams && this.loadTeams();
11951
12043
  }, this.selectTeam = (t) => {
11952
- R.setActiveTeam({ $id: t.$id, name: t.name }), this.activeTeamId = t.$id, this.dispatchEvent(
12044
+ M.setActiveTeam({ $id: t.$id, name: t.name }), this.activeTeamId = t.$id, this.dispatchEvent(
11953
12045
  new CustomEvent("authui-active-team", {
11954
12046
  detail: { teamId: t.$id, team: t },
11955
12047
  bubbles: !0,
@@ -11986,9 +12078,9 @@ let Ue = class extends qe {
11986
12078
  })) : this.menuAbove = !1), this.menuOpen && (t.has("teams") || t.has("teamsLoading")) && requestAnimationFrame(() => this.placeMenu());
11987
12079
  }
11988
12080
  async loadTeams() {
11989
- this.teamsLoading = !0, this.activeTeamId = R.getActiveTeamId();
12081
+ this.teamsLoading = !0, this.activeTeamId = M.getActiveTeamId();
11990
12082
  try {
11991
- this.teams = await R.listTeams(), this.activeTeamId && !this.teams.some((t) => t.$id === this.activeTeamId) && (this.activeTeamId = null, R.setActiveTeam(null));
12083
+ this.teams = await M.listTeams(), this.activeTeamId && !this.teams.some((t) => t.$id === this.activeTeamId) && (this.activeTeamId = null, M.setActiveTeam(null));
11992
12084
  } catch {
11993
12085
  this.teams = [];
11994
12086
  } finally {
@@ -11998,13 +12090,13 @@ let Ue = class extends qe {
11998
12090
  render() {
11999
12091
  const { status: t, user: e, configured: n } = this.auth;
12000
12092
  if (t === "loading" && n)
12001
- return w`<span class="avatar"><span class="spinner"></span></span>`;
12093
+ return b`<span class="avatar"><span class="spinner"></span></span>`;
12002
12094
  if (t !== "signed-in" || !e)
12003
- return w`<button class="btn btn-primary btn-sm" @click=${() => wt("sign-in")}>
12095
+ return b`<button class="btn btn-primary btn-sm" @click=${() => bt("sign-in")}>
12004
12096
  <slot>${this.t("signIn")}</slot>
12005
12097
  </button>`;
12006
12098
  const i = e.name || e.email || e.phone || this.t("guestAccount");
12007
- return w`
12099
+ return b`
12008
12100
  <button
12009
12101
  class="trigger"
12010
12102
  aria-haspopup="menu"
@@ -12013,20 +12105,20 @@ let Ue = class extends qe {
12013
12105
  aria-label=${i}
12014
12106
  >
12015
12107
  <span class="avatar"
12016
- >${this.src ? w`<img src=${this.src} alt="" />` : Ai(i)}</span
12108
+ >${this.src ? b`<img src=${this.src} alt="" />` : Ai(i)}</span
12017
12109
  >
12018
12110
  </button>
12019
- ${this.menuOpen ? w`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
12111
+ ${this.menuOpen ? b`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
12020
12112
  <div class="menu-header">
12021
12113
  <span class="row-title" title=${i}>${i}</span>
12022
- ${e.email && e.name ? w`<span class="row-sub" title=${e.email}>${e.email}</span>` : C}
12114
+ ${e.email && e.name ? b`<span class="row-sub" title=${e.email}>${e.email}</span>` : C}
12023
12115
  </div>
12024
- ${this.showTeams ? w`<div class="menu-section">
12116
+ ${this.showTeams ? b`<div class="menu-section">
12025
12117
  <div class="menu-section-label">${this.t("teamsLabel")}</div>
12026
- ${this.teamsLoading ? w`<div class="menu-item" aria-busy="true">
12118
+ ${this.teamsLoading ? b`<div class="menu-item" aria-busy="true">
12027
12119
  <span class="spinner"></span>
12028
- </div>` : this.teams.length === 0 ? w`<div class="menu-item" role="note">${this.t("noTeams")}</div>` : this.teams.map(
12029
- (o) => w`<button
12120
+ </div>` : this.teams.length === 0 ? b`<div class="menu-item" role="note">${this.t("noTeams")}</div>` : this.teams.map(
12121
+ (o) => b`<button
12030
12122
  class="menu-item ${o.$id === this.activeTeamId ? "active" : ""}"
12031
12123
  role="menuitemradio"
12032
12124
  aria-checked=${o.$id === this.activeTeamId ? "true" : "false"}
@@ -12034,7 +12126,7 @@ let Ue = class extends qe {
12034
12126
  >
12035
12127
  ${q.users}
12036
12128
  <span title=${o.name}>${o.name}</span>
12037
- ${o.$id === this.activeTeamId ? w`<span class="check">${q.check}</span>` : C}
12129
+ ${o.$id === this.activeTeamId ? b`<span class="check">${q.check}</span>` : C}
12038
12130
  </button>`
12039
12131
  )}
12040
12132
  </div>` : C}
@@ -12044,7 +12136,7 @@ let Ue = class extends qe {
12044
12136
  class="menu-item"
12045
12137
  role="menuitem"
12046
12138
  @click=${() => {
12047
- this.menuOpen = !1, wt("account");
12139
+ this.menuOpen = !1, bt("account");
12048
12140
  }}
12049
12141
  >
12050
12142
  ${q.settings} ${this.t("manageAccount")}
@@ -12053,7 +12145,7 @@ let Ue = class extends qe {
12053
12145
  class="menu-item"
12054
12146
  role="menuitem"
12055
12147
  @click=${() => {
12056
- this.menuOpen = !1, R.signOut();
12148
+ this.menuOpen = !1, M.signOut();
12057
12149
  }}
12058
12150
  >
12059
12151
  ${q.logOut} ${this.t("signOut")}
@@ -12065,7 +12157,7 @@ let Ue = class extends qe {
12065
12157
  return this.menuItems?.length ? this.menuItems.map((t) => {
12066
12158
  if (t.href) {
12067
12159
  const n = t.target;
12068
- return w`<a
12160
+ return b`<a
12069
12161
  class="menu-item"
12070
12162
  role="menuitem"
12071
12163
  href=${t.href}
@@ -12079,7 +12171,7 @@ let Ue = class extends qe {
12079
12171
  </a>`;
12080
12172
  }
12081
12173
  const e = t.actionId;
12082
- return w`<button
12174
+ return b`<button
12083
12175
  class="menu-item"
12084
12176
  role="menuitem"
12085
12177
  type="button"
@@ -12221,61 +12313,61 @@ Ue.styles = [
12221
12313
  `
12222
12314
  ];
12223
12315
  Be([
12224
- O({ type: Boolean, attribute: "show-teams" })
12316
+ F({ type: Boolean, attribute: "show-teams" })
12225
12317
  ], Ue.prototype, "showTeams", 2);
12226
12318
  Be([
12227
- O({ attribute: !1 })
12319
+ F({ attribute: !1 })
12228
12320
  ], Ue.prototype, "menuItems", 2);
12229
12321
  Be([
12230
- O({ type: String })
12322
+ F({ type: String })
12231
12323
  ], Ue.prototype, "src", 2);
12232
12324
  Be([
12233
- B()
12325
+ N()
12234
12326
  ], Ue.prototype, "menuOpen", 2);
12235
12327
  Be([
12236
- B()
12328
+ N()
12237
12329
  ], Ue.prototype, "menuAbove", 2);
12238
12330
  Be([
12239
- B()
12331
+ N()
12240
12332
  ], Ue.prototype, "teams", 2);
12241
12333
  Be([
12242
- B()
12334
+ N()
12243
12335
  ], Ue.prototype, "teamsLoading", 2);
12244
12336
  Be([
12245
- B()
12337
+ N()
12246
12338
  ], Ue.prototype, "activeTeamId", 2);
12247
12339
  Ue = Be([
12248
12340
  ze("authui-user-button")
12249
12341
  ], Ue);
12250
12342
  function Vo(t) {
12251
- return R.configure(t), Oo;
12343
+ return M.configure(t), Oo;
12252
12344
  }
12253
12345
  function Wo(t) {
12254
- wt(t);
12346
+ bt(t);
12255
12347
  }
12256
12348
  function Go() {
12257
- Mo();
12349
+ Ro();
12258
12350
  }
12259
12351
  function Ko() {
12260
- return R.signOut();
12352
+ return M.signOut();
12261
12353
  }
12262
12354
  function Yo() {
12263
- return R.user;
12355
+ return M.user;
12264
12356
  }
12265
12357
  function Jo() {
12266
- return R.getState();
12358
+ return M.getState();
12267
12359
  }
12268
12360
  function Zo() {
12269
- return R.getClient();
12361
+ return M.getClient();
12270
12362
  }
12271
12363
  function Qo() {
12272
- return R.getAccount();
12364
+ return M.getAccount();
12273
12365
  }
12274
12366
  function To() {
12275
- return R.previewSignIn();
12367
+ return M.previewSignIn();
12276
12368
  }
12277
12369
  function zo(t, e) {
12278
- return R.on(t, e);
12370
+ return M.on(t, e);
12279
12371
  }
12280
12372
  const Oo = {
12281
12373
  init: Vo,
@@ -12288,29 +12380,29 @@ const Oo = {
12288
12380
  getAccount: Qo,
12289
12381
  on: zo,
12290
12382
  previewSignIn: To,
12291
- store: R
12383
+ store: M
12292
12384
  };
12293
12385
  export {
12294
12386
  yo as AuthStore,
12295
12387
  Oo as AuthUI,
12296
12388
  z as AuthUIAccount,
12297
- ot as AuthUIButton,
12389
+ at as AuthUIButton,
12298
12390
  de as AuthUIConfigElement,
12299
12391
  qe as AuthUIElement,
12300
12392
  Ee as AuthUIModal,
12301
- bt as AuthUIShow,
12302
- ge as AuthUISignIn,
12393
+ wt as AuthUIShow,
12394
+ he as AuthUISignIn,
12303
12395
  Ue as AuthUIUserButton,
12304
12396
  na as CRITICAL_FOUC_CSS,
12305
12397
  oe as ErrorTypes,
12306
12398
  Ji as FOUC_CSS,
12307
12399
  uo as PreviewAccount,
12308
12400
  ta as appwrite,
12309
- R as authStore,
12401
+ M as authStore,
12310
12402
  ia as clearLastMethod,
12311
12403
  Vi as clearPendingOAuth,
12312
12404
  Go as close,
12313
- Mo as closeModal,
12405
+ Ro as closeModal,
12314
12406
  so as defaultStrings,
12315
12407
  Ut as describeError,
12316
12408
  Qo as getAccount,
@@ -12323,14 +12415,14 @@ export {
12323
12415
  ho as isConfigError,
12324
12416
  zo as on,
12325
12417
  Wo as open,
12326
- wt as openModal,
12418
+ bt as openModal,
12327
12419
  To as previewSignIn,
12328
12420
  pt as providerLabel,
12329
- lt as rememberLastMethod,
12421
+ tt as rememberLastMethod,
12330
12422
  sn as rememberPendingOAuth,
12331
12423
  pi as scorePassword,
12332
12424
  fo as setStoredActiveTeamId,
12333
12425
  Ko as signOut,
12334
12426
  go as stashPendingOAuth,
12335
- tt as toAuthUIError
12427
+ it as toAuthUIError
12336
12428
  };