@getauthui/core 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { state as d, property as m, customElement as T, query as rt } from "lit/decorators.js";
2
- import { css as L, LitElement as at, nothing as n, html as r, svg as h } from "lit";
3
- import { Client as lt, Account as ct, Teams as kt, ID as W, Avatars as Ct } from "appwrite";
1
+ import { state as c, property as m, customElement as T, query as at } from "lit/decorators.js";
2
+ import { css as L, LitElement as nt, nothing as n, html as r, svg as u } from "lit";
3
+ import { Client as ct, Account as dt, Teams as kt, ID as W, Avatars as Ct } from "appwrite";
4
4
  const St = {
5
5
  signIn: "Sign in",
6
6
  dialogSignIn: "Sign in",
@@ -248,13 +248,13 @@ const K = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }),
248
248
  "juniper",
249
249
  "kite",
250
250
  "lumen"
251
- ], dt = () => `${G[Math.floor(Math.random() * G.length)]}-${G[Math.floor(Math.random() * G.length)]}`, z = () => Math.random().toString(36).slice(2, 12), ut = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), It = {
251
+ ], ht = () => `${G[Math.floor(Math.random() * G.length)]}-${G[Math.floor(Math.random() * G.length)]}`, D = () => Math.random().toString(36).slice(2, 12), ut = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), Et = {
252
252
  name: "Ada Lovelace",
253
253
  email: "ada@example.com",
254
254
  phone: "+15550100"
255
255
  };
256
- class Ut {
257
- constructor(t = It) {
256
+ class It {
257
+ constructor(t = Et) {
258
258
  this.seed = t, this.user = null, this.mfaPending = !1, this.mfaEnabled = !1, this.totpEnrolled = !1, this.recoveryCodes = [], this.lastChallenge = 0, this.sessions = [], this.identities = [], this.logs = [], this.tokens = /* @__PURE__ */ new Map(), this.pendingAuthenticator = null;
259
259
  }
260
260
  // ───────────────────────── helpers ─────────────────────────
@@ -318,7 +318,7 @@ class Ut {
318
318
  },
319
319
  {
320
320
  ...i,
321
- $id: z(),
321
+ $id: D(),
322
322
  $createdAt: M(300),
323
323
  provider: t,
324
324
  ip: "198.51.100.7",
@@ -335,7 +335,7 @@ class Ut {
335
335
  },
336
336
  {
337
337
  ...i,
338
- $id: z(),
338
+ $id: D(),
339
339
  $createdAt: M(1440 * 3),
340
340
  provider: "oauth2",
341
341
  ip: "192.0.2.90",
@@ -436,26 +436,26 @@ class Ut {
436
436
  }
437
437
  async createMagicURLToken(t, i) {
438
438
  return this.tokens.set(t, { email: i }), this.delay({
439
- $id: z(),
439
+ $id: D(),
440
440
  $createdAt: P(),
441
441
  userId: t,
442
442
  secret: "",
443
443
  expire: "",
444
- phrase: dt()
444
+ phrase: ht()
445
445
  });
446
446
  }
447
447
  async createEmailToken(t, i) {
448
448
  return this.tokens.set(t, { email: i }), this.delay({
449
- $id: z(),
449
+ $id: D(),
450
450
  $createdAt: P(),
451
451
  userId: t,
452
452
  secret: "",
453
453
  expire: "",
454
- phrase: dt()
454
+ phrase: ht()
455
455
  });
456
456
  }
457
457
  async createPhoneToken(t, i) {
458
- return this.tokens.set(t, { phone: i }), this.delay({ $id: z(), $createdAt: P(), userId: t, secret: "", expire: "", phrase: "" });
458
+ return this.tokens.set(t, { phone: i }), this.delay({ $id: D(), $createdAt: P(), userId: t, secret: "", expire: "", phrase: "" });
459
459
  }
460
460
  async createSession(t) {
461
461
  return this.delay(() => {
@@ -547,7 +547,7 @@ class Ut {
547
547
  });
548
548
  }
549
549
  async createMFAChallenge() {
550
- return this.delay({ $id: z(), $createdAt: P(), userId: "preview-user", expire: "" });
550
+ return this.delay({ $id: D(), $createdAt: P(), userId: "preview-user", expire: "" });
551
551
  }
552
552
  async updateMFAChallenge() {
553
553
  return this.delay(() => (this.mfaPending = !1, this.lastChallenge = Date.now(), this.sessions[0]));
@@ -591,20 +591,20 @@ class Ut {
591
591
  this.user = null, this.mfaPending = !1, this.sessions = [], this.identities = [], this.logs = [], this.tokens.clear();
592
592
  }
593
593
  }
594
- function Et(e) {
594
+ function Ut(e) {
595
595
  let t = 2166136261;
596
596
  const i = () => (t ^= t << 13, t ^= t >>> 17, t ^= t << 5, (t >>> 0) / 4294967296);
597
- for (const v of e) t = (t ^ v.charCodeAt(0)) * 16777619;
597
+ for (const g of e) t = (t ^ g.charCodeAt(0)) * 16777619;
598
598
  const s = 25;
599
599
  let a = "";
600
- const u = (v, y) => `<rect x="${v}" y="${y}" width="7" height="7"/><rect x="${v + 1}" y="${y + 1}" width="5" height="5" fill="#fff"/><rect x="${v + 2}" y="${y + 2}" width="3" height="3"/>`;
601
- for (let v = 0; v < s; v++)
600
+ const h = (g, y) => `<rect x="${g}" y="${y}" width="7" height="7"/><rect x="${g + 1}" y="${y + 1}" width="5" height="5" fill="#fff"/><rect x="${g + 2}" y="${y + 2}" width="3" height="3"/>`;
601
+ for (let g = 0; g < s; g++)
602
602
  for (let y = 0; y < s; y++)
603
- !(y < 8 && v < 8 || y >= s - 8 && v < 8 || y < 8 && v >= s - 8) && i() < 0.45 && (a += `<rect x="${y}" y="${v}" width="1" height="1"/>`);
604
- const c = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${s}" shape-rendering="crispEdges"><rect width="${s}" height="${s}" fill="#fff"/><g fill="#000">${u(0, 0)}${u(s - 7, 0)}${u(0, s - 7)}${a}</g></svg>`;
605
- return `data:image/svg+xml;utf8,${encodeURIComponent(c)}`;
603
+ !(y < 8 && g < 8 || y >= s - 8 && g < 8 || y < 8 && g >= s - 8) && i() < 0.45 && (a += `<rect x="${y}" y="${g}" width="1" height="1"/>`);
604
+ const d = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${s}" shape-rendering="crispEdges"><rect width="${s}" height="${s}" fill="#fff"/><g fill="#000">${h(0, 0)}${h(s - 7, 0)}${h(0, s - 7)}${a}</g></svg>`;
605
+ return `data:image/svg+xml;utf8,${encodeURIComponent(d)}`;
606
606
  }
607
- const g = {
607
+ const v = {
608
608
  moreFactorsRequired: "user_more_factors_required",
609
609
  invalidCredentials: "user_invalid_credentials",
610
610
  userAlreadyExists: "user_already_exists",
@@ -639,7 +639,7 @@ const g = {
639
639
  targetAlreadyExists: "user_target_already_exists",
640
640
  argumentInvalid: "general_argument_invalid"
641
641
  };
642
- function _(e) {
642
+ function q(e) {
643
643
  if (e && typeof e == "object") {
644
644
  const t = e;
645
645
  let i = typeof t.message == "string" ? t.message : "Unknown error";
@@ -652,60 +652,60 @@ function _(e) {
652
652
  return { message: String(e), type: "", code: 0 };
653
653
  }
654
654
  function j(e, t) {
655
- return _(e).type === t;
655
+ return q(e).type === t;
656
656
  }
657
657
  function Y(e, t, i = "link") {
658
- const s = _(e);
658
+ const s = q(e);
659
659
  switch (s.type) {
660
- case g.invalidCredentials:
660
+ case v.invalidCredentials:
661
661
  return i === "password" ? t.errorCurrentPassword : t.errorInvalidCredentials;
662
- case g.userAlreadyExists:
663
- case g.emailAlreadyExists:
664
- case g.phoneAlreadyExists:
662
+ case v.userAlreadyExists:
663
+ case v.emailAlreadyExists:
664
+ case v.phoneAlreadyExists:
665
665
  return t.errorUserExists;
666
- case g.userBlocked:
666
+ case v.userBlocked:
667
667
  return t.errorUserBlocked;
668
- case g.rateLimit:
668
+ case v.rateLimit:
669
669
  return t.errorRateLimit;
670
- case g.invalidToken:
670
+ case v.invalidToken:
671
671
  return i === "code" ? t.errorInvalidCode : t.errorInvalidToken;
672
- case g.invalidCode:
672
+ case v.invalidCode:
673
673
  return t.errorInvalidCode;
674
- case g.passwordMismatch:
674
+ case v.passwordMismatch:
675
675
  return t.errorPasswordMismatch;
676
- case g.passwordRecentlyUsed:
676
+ case v.passwordRecentlyUsed:
677
677
  return t.errorPasswordRecentlyUsed;
678
- case g.passwordPersonalData:
678
+ case v.passwordPersonalData:
679
679
  return t.errorPasswordPersonalData;
680
- case g.passwordWeak:
680
+ case v.passwordWeak:
681
681
  return t.errorPasswordWeak;
682
- case g.passwordPwned:
682
+ case v.passwordPwned:
683
683
  return t.errorPasswordPwned;
684
- case g.challengeRequired:
684
+ case v.challengeRequired:
685
685
  return t.errorChallengeRequired;
686
- case g.sessionAlreadyExists:
686
+ case v.sessionAlreadyExists:
687
687
  return t.errorSessionExists;
688
- case g.oauthUnauthorized:
689
- case g.oauthBadRequest:
688
+ case v.oauthUnauthorized:
689
+ case v.oauthBadRequest:
690
690
  return t.errorOAuth;
691
- case g.authMethodUnsupported:
691
+ case v.authMethodUnsupported:
692
692
  return t.errorMethodDisabled;
693
693
  }
694
- if (s.type === g.argumentInvalid || /Invalid `\w+` param/i.test(s.message)) {
694
+ if (s.type === v.argumentInvalid || /Invalid `\w+` param/i.test(s.message)) {
695
695
  const a = s.message.match(/Invalid `([^`]+)` param/i)?.[1]?.toLowerCase();
696
696
  return a === "email" ? t.errorInvalidEmail : a === "password" ? t.errorInvalidPassword : a === "phone" ? t.errorInvalidPhone : a === "name" ? t.errorInvalidName : t.errorGeneric;
697
697
  }
698
- return s.type === g.projectNotFound || s.type === g.unknownOrigin ? t.errorConfig : s.type === g.routeNotFound ? t.errorConfigEndpoint : s.code === 0 && /fetch|network/i.test(s.message) ? t.errorNetwork : /Invalid `\w+` param/i.test(s.message) ? t.errorGeneric : s.message ? s.message || t.errorGeneric : s.code === 404 || s.type === g.routeNotFound ? t.errorConfigEndpoint : t.errorGeneric;
698
+ return s.type === v.projectNotFound || s.type === v.unknownOrigin ? t.errorConfig : s.type === v.routeNotFound ? t.errorConfigEndpoint : s.code === 0 && /fetch|network/i.test(s.message) ? t.errorNetwork : /Invalid `\w+` param/i.test(s.message) ? t.errorGeneric : s.message ? s.message || t.errorGeneric : s.code === 404 || s.type === v.routeNotFound ? t.errorConfigEndpoint : t.errorGeneric;
699
699
  }
700
700
  function Mt(e) {
701
- const t = _(e);
702
- return !!(t.type === g.projectNotFound || t.type === g.unknownOrigin || t.type === g.routeNotFound || !t.message && t.code === 404 || t.code === 0 && /fetch|network|load failed|failed to fetch/i.test(t.message));
701
+ const t = q(e);
702
+ return !!(t.type === v.projectNotFound || t.type === v.unknownOrigin || t.type === v.routeNotFound || !t.message && t.code === 404 || t.code === 0 && /fetch|network|load failed|failed to fetch/i.test(t.message));
703
703
  }
704
- const tt = (e) => `authui:active-team:${e}`;
705
- function ht(e) {
704
+ const et = (e) => `authui:active-team:${e}`;
705
+ function pt(e) {
706
706
  if (typeof localStorage > "u" || !e) return null;
707
707
  try {
708
- return localStorage.getItem(tt(e));
708
+ return localStorage.getItem(et(e));
709
709
  } catch {
710
710
  return null;
711
711
  }
@@ -713,26 +713,26 @@ function ht(e) {
713
713
  function Ot(e, t) {
714
714
  if (!(typeof localStorage > "u" || !e))
715
715
  try {
716
- t ? localStorage.setItem(tt(e), t) : localStorage.removeItem(tt(e));
716
+ t ? localStorage.setItem(et(e), t) : localStorage.removeItem(et(e));
717
717
  } catch {
718
718
  }
719
719
  }
720
- const nt = "authui:last-method";
721
- function V(e) {
720
+ const ot = "authui:last-method";
721
+ function _(e) {
722
722
  if (!(typeof localStorage > "u")) {
723
723
  if (!e || e === "mfa" || e === "sign-up")
724
724
  if (e === "sign-up") e = "email-password";
725
725
  else return;
726
726
  try {
727
- localStorage.setItem(nt, e);
727
+ localStorage.setItem(ot, e);
728
728
  } catch {
729
729
  }
730
730
  }
731
731
  }
732
- function D() {
732
+ function z() {
733
733
  if (typeof localStorage > "u") return null;
734
734
  try {
735
- return localStorage.getItem(nt);
735
+ return localStorage.getItem(ot);
736
736
  } catch {
737
737
  return null;
738
738
  }
@@ -740,7 +740,7 @@ function D() {
740
740
  function le() {
741
741
  if (!(typeof localStorage > "u"))
742
742
  try {
743
- localStorage.removeItem(nt);
743
+ localStorage.removeItem(ot);
744
744
  } catch {
745
745
  }
746
746
  }
@@ -752,15 +752,15 @@ function Ft(e) {
752
752
  } catch {
753
753
  }
754
754
  }
755
- function wt() {
755
+ function $t() {
756
756
  if (!(typeof sessionStorage > "u"))
757
757
  try {
758
758
  const e = sessionStorage.getItem(Z);
759
- sessionStorage.removeItem(Z), e && V(`oauth:${e}`);
759
+ sessionStorage.removeItem(Z), e && _(`oauth:${e}`);
760
760
  } catch {
761
761
  }
762
762
  }
763
- function pt() {
763
+ function mt() {
764
764
  if (!(typeof sessionStorage > "u"))
765
765
  try {
766
766
  sessionStorage.removeItem(Z);
@@ -777,7 +777,7 @@ function A(e, t, i) {
777
777
  new Error(`Appwrite SDK is missing ${t[0]}(). Update the appwrite package.`)
778
778
  );
779
779
  }
780
- const et = "authui", mt = ["userId", "secret", "expire", "project", "error", et], ft = () => ({
780
+ const it = "authui", ft = ["userId", "secret", "expire", "project", "error", it], gt = () => ({
781
781
  status: "loading",
782
782
  user: null,
783
783
  mfaFactors: null,
@@ -787,7 +787,7 @@ const et = "authui", mt = ["userId", "secret", "expire", "project", "error", et]
787
787
  });
788
788
  class Lt {
789
789
  constructor() {
790
- this.client = null, this.account = null, this.config = null, this.state = ft(), this.listeners = /* @__PURE__ */ new Map(), this.refreshPromise = null, this.preview = null, this.teams = null, this.activeTeamId = null;
790
+ this.client = null, this.account = null, this.config = null, this.state = gt(), this.listeners = /* @__PURE__ */ new Map(), this.refreshPromise = null, this.preview = null, this.teams = null, this.activeTeamId = null;
791
791
  }
792
792
  // ───────────────────────────── configuration ─────────────────────────────
793
793
  /** Configure the Appwrite client. Safe to call more than once; the last call wins. */
@@ -795,7 +795,7 @@ class Lt {
795
795
  const i = t.endpoint.trim().replace(/\/+$/, "");
796
796
  i && !i.endsWith("/v1") && console.warn(
797
797
  `[authui] endpoint should end with /v1 (got "${t.endpoint}"). Without it Appwrite returns HTML 404 pages.`
798
- ), this.config = t, this.client = new lt().setEndpoint(t.endpoint).setProject(t.project), this.preview = t.preview ? new Ut() : null, this.account = this.preview ? this.preview : new ct(this.client), this.teams = null, this.activeTeamId = ht(t.project), this.setState({ configured: !0, status: "loading", configError: null }), this.preview ? this.refresh() : typeof window < "u" && this.handleRedirect().then(() => this.refresh());
798
+ ), this.config = t, this.client = new ct().setEndpoint(t.endpoint).setProject(t.project), this.preview = t.preview ? new It() : null, this.account = this.preview ? this.preview : new dt(this.client), this.teams = null, this.activeTeamId = pt(t.project), this.setState({ configured: !0, status: "loading", configError: null }), this.preview ? this.refresh() : typeof window < "u" && this.handleRedirect().then(() => this.refresh());
799
799
  }
800
800
  /**
801
801
  * Called by <authui-config> when it is on the page but missing endpoint or project.
@@ -851,7 +851,7 @@ class Lt {
851
851
  getActiveTeamId() {
852
852
  if (this.activeTeamId) return this.activeTeamId;
853
853
  const t = this.config?.project;
854
- return t ? (this.activeTeamId = ht(t), this.activeTeamId) : null;
854
+ return t ? (this.activeTeamId = pt(t), this.activeTeamId) : null;
855
855
  }
856
856
  /**
857
857
  * Remember the active team locally and emit `active-team`.
@@ -888,7 +888,7 @@ class Lt {
888
888
  this.state = { ...this.state, ...t }, this.emit("change", this.getState());
889
889
  }
890
890
  fail(t) {
891
- const i = _(t);
891
+ const i = q(t);
892
892
  throw this.emit("error", i), t;
893
893
  }
894
894
  acct() {
@@ -908,7 +908,7 @@ class Lt {
908
908
  const i = await this.account.get();
909
909
  this.setState({ status: "signed-in", user: i, mfaFactors: null, configError: null }), t || this.emit("signed-in", i);
910
910
  } catch (i) {
911
- if (j(i, g.moreFactorsRequired)) {
911
+ if (j(i, v.moreFactorsRequired)) {
912
912
  let s = null;
913
913
  try {
914
914
  s = await A(
@@ -919,7 +919,7 @@ class Lt {
919
919
  } catch {
920
920
  }
921
921
  this.setState({ status: "mfa-required", user: null, mfaFactors: s });
922
- } else if (j(i, g.userBlocked))
922
+ } else if (j(i, v.userBlocked))
923
923
  await this.purgeLocalSession(), this.setState({
924
924
  status: "signed-out",
925
925
  user: null,
@@ -935,8 +935,8 @@ class Lt {
935
935
  console.warn(
936
936
  `[authui] ${a} (endpoint=${this.config?.endpoint ?? "?"}, project=${this.config?.project ?? "?"})`
937
937
  );
938
- const u = _(i);
939
- this.emit("error", { message: a, type: u.type, code: u.code }), this.setState({
938
+ const h = q(i);
939
+ this.emit("error", { message: a, type: h.type, code: h.code }), this.setState({
940
940
  status: "signed-out",
941
941
  user: null,
942
942
  mfaFactors: null,
@@ -955,7 +955,7 @@ class Lt {
955
955
  const i = this.state.pending;
956
956
  if (i?.type === "notice" && i.tone === "error")
957
957
  throw Object.assign(new Error(i.message), {
958
- type: g.userBlocked,
958
+ type: v.userBlocked,
959
959
  code: 401
960
960
  });
961
961
  }
@@ -980,7 +980,7 @@ class Lt {
980
980
  localStorage.removeItem("cookieFallback");
981
981
  } catch {
982
982
  }
983
- this.config && !this.preview && (this.client = new lt().setEndpoint(this.config.endpoint).setProject(this.config.project), this.account = new ct(this.client));
983
+ this.config && !this.preview && (this.client = new ct().setEndpoint(this.config.endpoint).setProject(this.config.project), this.account = new dt(this.client));
984
984
  }
985
985
  // ─────────────────────────────── sign in ───────────────────────────────
986
986
  async signInWithEmailPassword(t, i) {
@@ -1332,8 +1332,8 @@ class Lt {
1332
1332
  /** Build the URL Appwrite should send the user back to for a given flow. */
1333
1333
  redirectUrl(t) {
1334
1334
  const i = this.config?.redirectUrl ?? (typeof window < "u" ? window.location.origin + window.location.pathname : ""), s = new URL(i, typeof window < "u" ? window.location.href : void 0);
1335
- for (const a of mt) s.searchParams.delete(a);
1336
- return s.searchParams.set(et, t), s.toString();
1335
+ for (const a of ft) s.searchParams.delete(a);
1336
+ return s.searchParams.set(it, t), s.toString();
1337
1337
  }
1338
1338
  setPending(t) {
1339
1339
  this.setState({ pending: t });
@@ -1344,11 +1344,11 @@ class Lt {
1344
1344
  */
1345
1345
  async handleRedirect() {
1346
1346
  if (typeof window > "u") return !1;
1347
- const t = new URLSearchParams(window.location.search), i = t.get(et);
1347
+ const t = new URLSearchParams(window.location.search), i = t.get(it);
1348
1348
  if (!i) return !1;
1349
1349
  const s = t.get("userId") ?? "", a = t.get("secret") ?? "";
1350
1350
  this.cleanUrl();
1351
- const u = () => {
1351
+ const h = () => {
1352
1352
  this.setState({
1353
1353
  pending: {
1354
1354
  type: "notice",
@@ -1361,10 +1361,10 @@ class Lt {
1361
1361
  switch (i) {
1362
1362
  case "oauth":
1363
1363
  case "magic-url":
1364
- s && a ? (await this.acct().createSession(s, a), i === "oauth" && wt()) : (i === "oauth" && pt(), u());
1364
+ s && a ? (await this.acct().createSession(s, a), i === "oauth" ? $t() : _("magic-url")) : (i === "oauth" && mt(), h());
1365
1365
  break;
1366
1366
  case "oauth-failed":
1367
- pt(), this.setState({
1367
+ mt(), this.setState({
1368
1368
  pending: {
1369
1369
  type: "notice",
1370
1370
  tone: "error",
@@ -1373,7 +1373,7 @@ class Lt {
1373
1373
  });
1374
1374
  break;
1375
1375
  case "recovery":
1376
- s && a ? this.setState({ pending: { type: "reset-password", userId: s, secret: a } }) : u();
1376
+ s && a ? this.setState({ pending: { type: "reset-password", userId: s, secret: a } }) : h();
1377
1377
  break;
1378
1378
  case "verify-email":
1379
1379
  s && a ? (await A(
@@ -1386,23 +1386,23 @@ class Lt {
1386
1386
  message: this.getStrings().emailVerified,
1387
1387
  tone: "success"
1388
1388
  }
1389
- })) : u();
1389
+ })) : h();
1390
1390
  break;
1391
1391
  }
1392
- } catch (c) {
1393
- const v = _(c), y = Y(c, this.getStrings(), "link");
1394
- this.emit("error", v), this.setState({ pending: { type: "notice", message: y, tone: "error" } });
1392
+ } catch (d) {
1393
+ const g = q(d), y = Y(d, this.getStrings(), "link");
1394
+ this.emit("error", g), this.setState({ pending: { type: "notice", message: y, tone: "error" } });
1395
1395
  }
1396
1396
  return !0;
1397
1397
  }
1398
1398
  cleanUrl() {
1399
1399
  const t = new URL(window.location.href);
1400
- for (const i of mt) t.searchParams.delete(i);
1400
+ for (const i of ft) t.searchParams.delete(i);
1401
1401
  window.history.replaceState(window.history.state, "", t.toString());
1402
1402
  }
1403
1403
  /** Test helper. */
1404
1404
  reset() {
1405
- this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = ft(), this.listeners.clear();
1405
+ this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = gt(), this.listeners.clear();
1406
1406
  }
1407
1407
  }
1408
1408
  const o = new Lt();
@@ -1434,7 +1434,7 @@ class Rt {
1434
1434
  this.observer?.disconnect(), this.observer = null, this.media?.removeEventListener?.("change", this.notify), this.media = null;
1435
1435
  }
1436
1436
  }
1437
- const gt = new Rt(), vt = {
1437
+ const vt = new Rt(), bt = {
1438
1438
  none: "0px",
1439
1439
  sm: "0.25rem",
1440
1440
  md: "0.625rem",
@@ -1519,7 +1519,7 @@ const gt = new Rt(), vt = {
1519
1519
  --authui-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
1520
1520
  color-scheme: dark;
1521
1521
  }
1522
- `, zt = L`
1522
+ `, Dt = L`
1523
1523
  *,
1524
1524
  *::before,
1525
1525
  *::after {
@@ -2522,12 +2522,12 @@ const gt = new Rt(), vt = {
2522
2522
  }
2523
2523
  }
2524
2524
  `;
2525
- var Dt = Object.defineProperty, _t = (e, t, i, s) => {
2526
- for (var a = void 0, u = e.length - 1, c; u >= 0; u--)
2527
- (c = e[u]) && (a = c(t, i, a) || a);
2528
- return a && Dt(t, i, a), a;
2525
+ var zt = Object.defineProperty, _t = (e, t, i, s) => {
2526
+ for (var a = void 0, h = e.length - 1, d; h >= 0; h--)
2527
+ (d = e[h]) && (a = d(t, i, a) || a);
2528
+ return a && zt(t, i, a), a;
2529
2529
  }, O;
2530
- const $t = (O = class extends at {
2530
+ const xt = (O = class extends nt {
2531
2531
  constructor() {
2532
2532
  super(...arguments), this.auth = o.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (t) => t.stopPropagation();
2533
2533
  }
@@ -2536,7 +2536,7 @@ const $t = (O = class extends at {
2536
2536
  for (const t of O.KEY_EVENTS) this.addEventListener(t, this.stopKeys);
2537
2537
  this.auth = o.getState(), this.unsubscribeStore = o.on("change", (t) => {
2538
2538
  this.auth = t, this.applyBranding();
2539
- }), this.unsubscribeTheme = gt.subscribe(() => this.applyBranding()), this.applyBranding();
2539
+ }), this.unsubscribeTheme = vt.subscribe(() => this.applyBranding()), this.applyBranding();
2540
2540
  }
2541
2541
  disconnectedCallback() {
2542
2542
  super.disconnectedCallback();
@@ -2558,27 +2558,27 @@ const $t = (O = class extends at {
2558
2558
  }
2559
2559
  /** Push theme and branding from config onto the host element. */
2560
2560
  applyBranding() {
2561
- const t = this.config?.branding, i = gt.isDark(t?.theme ?? "auto");
2561
+ const t = this.config?.branding, i = vt.isDark(t?.theme ?? "auto");
2562
2562
  this.setAttribute("data-theme", i ? "dark" : "light"), t?.primary && (this.style.setProperty("--authui-primary", t.primary), this.style.setProperty(
2563
2563
  "--authui-primary-foreground",
2564
2564
  t.primaryForeground ?? "#ffffff"
2565
- )), t?.radius && vt[t.radius] && this.style.setProperty("--authui-radius", vt[t.radius]);
2565
+ )), t?.radius && bt[t.radius] && this.style.setProperty("--authui-radius", bt[t.radius]);
2566
2566
  }
2567
2567
  /** Emit a composed custom event from this element. */
2568
2568
  fire(t, i) {
2569
2569
  this.dispatchEvent(new CustomEvent(t, { detail: i, bubbles: !0, composed: !0 }));
2570
2570
  }
2571
- }, O.styles = [Tt, zt], O.KEY_EVENTS = ["keydown", "keyup", "keypress"], O);
2571
+ }, O.styles = [Tt, Dt], O.KEY_EVENTS = ["keydown", "keyup", "keypress"], O);
2572
2572
  _t([
2573
- d()
2574
- ], $t.prototype, "auth");
2575
- let E = $t;
2576
- var qt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, $ = (e, t, i, s) => {
2577
- for (var a = s > 1 ? void 0 : s ? Vt(t, i) : t, u = e.length - 1, c; u >= 0; u--)
2578
- (c = e[u]) && (a = (s ? c(t, i, a) : c(a)) || a);
2573
+ c()
2574
+ ], xt.prototype, "auth");
2575
+ let U = xt;
2576
+ var qt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, x = (e, t, i, s) => {
2577
+ for (var a = s > 1 ? void 0 : s ? Vt(t, i) : t, h = e.length - 1, d; h >= 0; h--)
2578
+ (d = e[h]) && (a = (s ? d(t, i, a) : d(a)) || a);
2579
2579
  return s && a && qt(t, i, a), a;
2580
2580
  };
2581
- let w = class extends at {
2581
+ let w = class extends nt {
2582
2582
  constructor() {
2583
2583
  super(...arguments), this.endpoint = "", this.project = "", this.redirectUrl = "", this.successUrl = "", this.methods = "email-password", this.signUp = "true", this.requireName = "true", this.mfa = "true", this.securityPhrase = "true", this.name = "", this.logo = "", this.theme = "auto", this.radius = "", this.primary = "", this.primaryForeground = "", this.termsUrl = "", this.privacyUrl = "", this.requireAcceptance = "", this.oauthLayout = "", this.preview = "";
2584
2584
  }
@@ -2634,103 +2634,103 @@ w.styles = L`
2634
2634
  display: none;
2635
2635
  }
2636
2636
  `;
2637
- $([
2637
+ x([
2638
2638
  m({ type: String })
2639
2639
  ], w.prototype, "endpoint", 2);
2640
- $([
2640
+ x([
2641
2641
  m({ type: String })
2642
2642
  ], w.prototype, "project", 2);
2643
- $([
2643
+ x([
2644
2644
  m({ type: String, attribute: "redirect-url" })
2645
2645
  ], w.prototype, "redirectUrl", 2);
2646
- $([
2646
+ x([
2647
2647
  m({ type: String, attribute: "success-url" })
2648
2648
  ], w.prototype, "successUrl", 2);
2649
- $([
2649
+ x([
2650
2650
  m({ type: String })
2651
2651
  ], w.prototype, "methods", 2);
2652
- $([
2652
+ x([
2653
2653
  m({ type: String, attribute: "sign-up" })
2654
2654
  ], w.prototype, "signUp", 2);
2655
- $([
2655
+ x([
2656
2656
  m({ type: String, attribute: "require-name" })
2657
2657
  ], w.prototype, "requireName", 2);
2658
- $([
2658
+ x([
2659
2659
  m({ type: String })
2660
2660
  ], w.prototype, "mfa", 2);
2661
- $([
2661
+ x([
2662
2662
  m({ type: String, attribute: "security-phrase" })
2663
2663
  ], w.prototype, "securityPhrase", 2);
2664
- $([
2664
+ x([
2665
2665
  m({ type: String })
2666
2666
  ], w.prototype, "name", 2);
2667
- $([
2667
+ x([
2668
2668
  m({ type: String })
2669
2669
  ], w.prototype, "logo", 2);
2670
- $([
2670
+ x([
2671
2671
  m({ type: String })
2672
2672
  ], w.prototype, "theme", 2);
2673
- $([
2673
+ x([
2674
2674
  m({ type: String })
2675
2675
  ], w.prototype, "radius", 2);
2676
- $([
2676
+ x([
2677
2677
  m({ type: String })
2678
2678
  ], w.prototype, "primary", 2);
2679
- $([
2679
+ x([
2680
2680
  m({ type: String, attribute: "primary-foreground" })
2681
2681
  ], w.prototype, "primaryForeground", 2);
2682
- $([
2682
+ x([
2683
2683
  m({ type: String, attribute: "terms-url" })
2684
2684
  ], w.prototype, "termsUrl", 2);
2685
- $([
2685
+ x([
2686
2686
  m({ type: String, attribute: "privacy-url" })
2687
2687
  ], w.prototype, "privacyUrl", 2);
2688
- $([
2688
+ x([
2689
2689
  m({ type: String, attribute: "require-acceptance" })
2690
2690
  ], w.prototype, "requireAcceptance", 2);
2691
- $([
2691
+ x([
2692
2692
  m({ type: String, attribute: "oauth-layout" })
2693
2693
  ], w.prototype, "oauthLayout", 2);
2694
- $([
2694
+ x([
2695
2695
  m({ type: String })
2696
2696
  ], w.prototype, "preview", 2);
2697
- w = $([
2697
+ w = x([
2698
2698
  T("authui-config")
2699
2699
  ], w);
2700
2700
  var Nt = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, Q = (e, t, i, s) => {
2701
- for (var a = s > 1 ? void 0 : s ? Bt(t, i) : t, u = e.length - 1, c; u >= 0; u--)
2702
- (c = e[u]) && (a = (s ? c(t, i, a) : c(a)) || a);
2701
+ for (var a = s > 1 ? void 0 : s ? Bt(t, i) : t, h = e.length - 1, d; h >= 0; h--)
2702
+ (d = e[h]) && (a = (s ? d(t, i, a) : d(a)) || a);
2703
2703
  return s && a && Nt(t, i, a), a;
2704
2704
  };
2705
- const bt = "authui-show:not([ready]){display:none}", ce = "authui-show:not([ready]){display:none}authui-button:not(:defined),authui-user-button:not(:defined){visibility:hidden}";
2706
- let yt = !1;
2705
+ const yt = "authui-show:not([ready]){display:none}", ce = "authui-show:not([ready]){display:none}authui-button:not(:defined),authui-user-button:not(:defined){visibility:hidden}";
2706
+ let wt = !1;
2707
2707
  function jt() {
2708
- if (!(typeof document > "u" || yt)) {
2709
- yt = !0;
2708
+ if (!(typeof document > "u" || wt)) {
2709
+ wt = !0;
2710
2710
  try {
2711
2711
  if (typeof CSSStyleSheet < "u" && "adoptedStyleSheets" in Document.prototype) {
2712
2712
  const e = new CSSStyleSheet();
2713
- e.replaceSync(bt), document.adoptedStyleSheets = [...document.adoptedStyleSheets, e];
2713
+ e.replaceSync(yt), document.adoptedStyleSheets = [...document.adoptedStyleSheets, e];
2714
2714
  return;
2715
2715
  }
2716
2716
  } catch {
2717
2717
  }
2718
2718
  if (!document.getElementById("authui-fouc")) {
2719
2719
  const e = document.createElement("style");
2720
- e.id = "authui-fouc", e.textContent = bt, document.head.appendChild(e);
2720
+ e.id = "authui-fouc", e.textContent = yt, document.head.appendChild(e);
2721
2721
  }
2722
2722
  }
2723
2723
  }
2724
2724
  jt();
2725
2725
  const Ht = ["loading", "signed-out", "signed-in", "mfa-required"];
2726
- function it(e) {
2726
+ function st(e) {
2727
2727
  return e ? e.split(/[\s,]+/).map((t) => t.trim()).filter((t) => Ht.includes(t)) : [];
2728
2728
  }
2729
2729
  function Wt(e, t, i) {
2730
- const s = it(t), a = it(i);
2730
+ const s = st(t), a = st(i);
2731
2731
  return !(e === "loading" && !s.includes("loading") || s.length > 0 && !s.includes(e) || a.includes(e));
2732
2732
  }
2733
- let H = class extends at {
2733
+ let H = class extends nt {
2734
2734
  constructor() {
2735
2735
  super(...arguments), this.when = "", this.unless = "", this.status = o.getState().status, this.unsubscribe = null;
2736
2736
  }
@@ -2745,7 +2745,7 @@ let H = class extends at {
2745
2745
  return Wt(this.status, this.when, this.unless);
2746
2746
  }
2747
2747
  updated() {
2748
- (this.status !== "loading" || it(this.when).includes("loading")) && (this.setAttribute("ready", ""), this.style.display = "contents");
2748
+ (this.status !== "loading" || st(this.when).includes("loading")) && (this.setAttribute("ready", ""), this.style.display = "contents");
2749
2749
  }
2750
2750
  render() {
2751
2751
  return this.visible ? r`<slot></slot>` : n;
@@ -2758,7 +2758,7 @@ Q([
2758
2758
  m({ type: String })
2759
2759
  ], H.prototype, "unless", 2);
2760
2760
  Q([
2761
- d()
2761
+ c()
2762
2762
  ], H.prototype, "status", 2);
2763
2763
  H = Q([
2764
2764
  T("authui-show")
@@ -2830,146 +2830,146 @@ const Kt = L`
2830
2830
  ${e}
2831
2831
  </svg>`, l = {
2832
2832
  mail: b(
2833
- h`<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>`
2833
+ u`<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>`
2834
2834
  ),
2835
2835
  phone: b(
2836
- h`<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>`
2836
+ u`<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>`
2837
2837
  ),
2838
2838
  user: b(
2839
- h`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`
2839
+ u`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`
2840
2840
  ),
2841
2841
  userX: b(
2842
- h`<path d="M2 21a8 8 0 0 1 11.873-7"/><circle cx="10" cy="8" r="5"/><path d="m17 17 5 5"/><path d="m22 17-5 5"/>`
2842
+ u`<path d="M2 21a8 8 0 0 1 11.873-7"/><circle cx="10" cy="8" r="5"/><path d="m17 17 5 5"/><path d="m22 17-5 5"/>`
2843
2843
  ),
2844
2844
  lock: b(
2845
- h`<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`
2845
+ u`<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`
2846
2846
  ),
2847
2847
  key: b(
2848
- h`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"/><path d="m21 2-9.6 9.6"/><circle cx="7.5" cy="15.5" r="5.5"/>`
2848
+ u`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"/><path d="m21 2-9.6 9.6"/><circle cx="7.5" cy="15.5" r="5.5"/>`
2849
2849
  ),
2850
2850
  shield: b(
2851
- h`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>`
2851
+ u`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>`
2852
2852
  ),
2853
2853
  shieldCheck: b(
2854
- h`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>`
2854
+ u`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>`
2855
2855
  ),
2856
2856
  smartphone: b(
2857
- h`<rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><path d="M12 18h.01"/>`
2857
+ u`<rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><path d="M12 18h.01"/>`
2858
2858
  ),
2859
2859
  monitor: b(
2860
- h`<rect width="20" height="14" x="2" y="3" rx="2"/><line x1="8" x2="16" y1="21" y2="21"/><line x1="12" x2="12" y1="17" y2="21"/>`
2860
+ u`<rect width="20" height="14" x="2" y="3" rx="2"/><line x1="8" x2="16" y1="21" y2="21"/><line x1="12" x2="12" y1="17" y2="21"/>`
2861
2861
  ),
2862
2862
  globe: b(
2863
- h`<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>`
2863
+ u`<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>`
2864
2864
  ),
2865
2865
  logOut: b(
2866
- h`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/>`
2866
+ u`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/>`
2867
2867
  ),
2868
2868
  settings: b(
2869
- h`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`
2869
+ u`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`
2870
2870
  ),
2871
- x: b(h`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`),
2872
- check: b(h`<path d="M20 6 9 17l-5-5"/>`),
2871
+ x: b(u`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`),
2872
+ check: b(u`<path d="M20 6 9 17l-5-5"/>`),
2873
2873
  users: b(
2874
- h`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`
2874
+ u`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`
2875
2875
  ),
2876
2876
  copy: b(
2877
- h`<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`
2877
+ u`<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`
2878
2878
  ),
2879
2879
  eye: b(
2880
- h`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>`
2880
+ u`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>`
2881
2881
  ),
2882
2882
  eyeOff: b(
2883
- h`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>`
2883
+ u`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>`
2884
2884
  ),
2885
- arrowLeft: b(h`<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`),
2885
+ arrowLeft: b(u`<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`),
2886
2886
  alert: b(
2887
- h`<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>`
2887
+ u`<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>`
2888
2888
  ),
2889
- info: b(h`<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`),
2890
- checkCircle: b(h`<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>`),
2889
+ info: b(u`<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`),
2890
+ checkCircle: b(u`<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>`),
2891
2891
  link: b(
2892
- h`<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`
2892
+ u`<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`
2893
2893
  ),
2894
2894
  activity: b(
2895
- h`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>`
2895
+ u`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>`
2896
2896
  ),
2897
2897
  trash: b(
2898
- h`<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>`
2898
+ u`<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>`
2899
2899
  ),
2900
2900
  sparkles: b(
2901
- h`<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>`
2901
+ u`<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>`
2902
2902
  ),
2903
2903
  refresh: b(
2904
- h`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>`
2904
+ u`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>`
2905
2905
  ),
2906
- chevronDown: b(h`<path d="m6 9 6 6 6-6"/>`),
2906
+ chevronDown: b(u`<path d="m6 9 6 6 6-6"/>`),
2907
2907
  ghost: b(
2908
- h`<path d="M9 10h.01"/><path d="M15 10h.01"/><path d="M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z"/>`
2908
+ u`<path d="M9 10h.01"/><path d="M15 10h.01"/><path d="M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z"/>`
2909
2909
  ),
2910
2910
  qr: b(
2911
- h`<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"/>`
2911
+ u`<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"/>`
2912
2912
  )
2913
- }, k = (e, t = "0 0 24 24") => r`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${t} aria-hidden="true">${e}</svg>`, Gt = {
2914
- google: k(
2915
- h`<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"/>`
2913
+ }, S = (e, t = "0 0 24 24") => r`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${t} aria-hidden="true">${e}</svg>`, Gt = {
2914
+ google: S(
2915
+ u`<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"/>`
2916
2916
  ),
2917
- github: k(
2918
- h`<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"/>`
2917
+ github: S(
2918
+ u`<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"/>`
2919
2919
  ),
2920
- apple: k(
2921
- h`<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"/>`
2920
+ apple: S(
2921
+ u`<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"/>`
2922
2922
  ),
2923
- facebook: k(
2924
- h`<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"/>`
2923
+ facebook: S(
2924
+ u`<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"/>`
2925
2925
  ),
2926
- x: k(
2927
- h`<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"/>`
2926
+ x: S(
2927
+ u`<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"/>`
2928
2928
  ),
2929
- microsoft: k(
2930
- h`<path fill="#F25022" d="M1 1h10v10H1z"/><path fill="#7FBA00" d="M13 1h10v10H13z"/><path fill="#00A4EF" d="M1 13h10v10H1z"/><path fill="#FFB900" d="M13 13h10v10H13z"/>`
2929
+ microsoft: S(
2930
+ u`<path fill="#F25022" d="M1 1h10v10H1z"/><path fill="#7FBA00" d="M13 1h10v10H13z"/><path fill="#00A4EF" d="M1 13h10v10H1z"/><path fill="#FFB900" d="M13 13h10v10H13z"/>`
2931
2931
  ),
2932
- discord: k(
2933
- h`<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"/>`
2932
+ discord: S(
2933
+ u`<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"/>`
2934
2934
  ),
2935
- gitlab: k(
2936
- h`<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"/>`
2935
+ gitlab: S(
2936
+ u`<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"/>`
2937
2937
  ),
2938
- linkedin: k(
2939
- h`<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"/>`
2938
+ linkedin: S(
2939
+ u`<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"/>`
2940
2940
  ),
2941
- slack: k(
2942
- h`<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"/>`
2941
+ slack: S(
2942
+ u`<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"/>`
2943
2943
  ),
2944
- twitch: k(
2945
- h`<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"/>`
2944
+ twitch: S(
2945
+ u`<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"/>`
2946
2946
  ),
2947
- spotify: k(
2948
- h`<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"/>`
2947
+ spotify: S(
2948
+ u`<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"/>`
2949
2949
  ),
2950
- notion: k(
2951
- h`<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"/>`
2950
+ notion: S(
2951
+ u`<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"/>`
2952
2952
  ),
2953
- dropbox: k(
2954
- h`<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"/>`
2953
+ dropbox: S(
2954
+ u`<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"/>`
2955
2955
  ),
2956
- figma: k(
2957
- h`<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"/>`
2956
+ figma: S(
2957
+ u`<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"/>`
2958
2958
  ),
2959
- bitbucket: k(
2960
- h`<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"/>`
2959
+ bitbucket: S(
2960
+ u`<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"/>`
2961
2961
  ),
2962
- amazon: k(
2963
- h`<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"/>`
2962
+ amazon: S(
2963
+ u`<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"/>`
2964
2964
  ),
2965
- paypal: k(
2966
- h`<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"/>`
2965
+ paypal: S(
2966
+ u`<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"/>`
2967
2967
  )
2968
2968
  };
2969
2969
  function B(e) {
2970
2970
  return Gt[e] ?? l.globe;
2971
2971
  }
2972
- function ot(e) {
2972
+ function lt(e) {
2973
2973
  const t = (e.trim()[0] ?? "?").toUpperCase();
2974
2974
  return /[A-Z0-9]/i.test(t) ? t : l.user;
2975
2975
  }
@@ -2981,7 +2981,7 @@ function X(e) {
2981
2981
  function de() {
2982
2982
  typeof window > "u" || window.dispatchEvent(new CustomEvent("authui:close"));
2983
2983
  }
2984
- function st(e) {
2984
+ function rt(e) {
2985
2985
  const t = {
2986
2986
  length: e.length >= 8,
2987
2987
  long: e.length >= 12,
@@ -2997,29 +2997,33 @@ function st(e) {
2997
2997
  let s, a;
2998
2998
  return !t.length || i <= 1 ? (s = 1, a = "passwordStrengthTooWeak") : i === 2 ? (s = 2, a = "passwordStrengthWeak") : i === 3 ? (s = 3, a = "passwordStrengthFair") : i >= 5 && t.long && t.lower && t.upper && t.number && t.symbol ? (s = 4, a = "passwordStrengthVeryStrong") : (s = 4, a = "passwordStrengthStrong"), { level: s, percent: s * 25, labelKey: a, checks: t };
2999
2999
  }
3000
- var Yt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, C = (e, t, i, s) => {
3001
- for (var a = s > 1 ? void 0 : s ? Zt(t, i) : t, u = e.length - 1, c; u >= 0; u--)
3002
- (c = e[u]) && (a = (s ? c(t, i, a) : c(a)) || a);
3000
+ var Yt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, k = (e, t, i, s) => {
3001
+ for (var a = s > 1 ? void 0 : s ? Zt(t, i) : t, h = e.length - 1, d; h >= 0; h--)
3002
+ (d = e[h]) && (a = (s ? d(t, i, a) : d(a)) || a);
3003
3003
  return s && a && Yt(t, i, a), a;
3004
3004
  };
3005
- let x = class extends E {
3005
+ let $ = class extends U {
3006
3006
  constructor() {
3007
- 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 = (e) => {
3007
+ 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 = (e) => {
3008
3008
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
3009
- await o.signInWithEmailPassword(this.email, this.password), this.password = "", V("email-password"), this.fire("authui-success", { method: "email-password" });
3009
+ await o.signInWithEmailPassword(this.email, this.password), this.password = "", _("email-password"), this.fire("authui-success", { method: "email-password" });
3010
3010
  });
3011
3011
  }, this.onSignUp = (e) => {
3012
- e.preventDefault(), this.requireValid(e) && this.ensureLegalAccepted() && this.run(async () => {
3013
- await o.signUp(this.email, this.password, this.name), this.password = "", V("email-password"), this.fire("authui-success", { method: "sign-up" });
3014
- });
3012
+ e.preventDefault(), this.requireValid(e) && (this.legalErrorFromOAuth = !1, this.ensureLegalAccepted() && this.run(async () => {
3013
+ await o.signUp(this.email, this.password, this.name), this.password = "", _("email-password"), this.fire("authui-success", { method: "sign-up" });
3014
+ }));
3015
3015
  }, this.onGuest = () => {
3016
3016
  this.run(async () => {
3017
- await o.signInAnonymously(), V("anonymous"), this.fire("authui-success", { method: "anonymous" });
3017
+ await o.signInAnonymously(), _("anonymous"), this.fire("authui-success", { method: "anonymous" });
3018
3018
  });
3019
3019
  }, this.onOAuth = (e) => {
3020
- this.step === "sign-up" && !this.ensureLegalAccepted() || this.run(async () => {
3020
+ if (this.step === "sign-up" && !this.ensureLegalAccepted()) {
3021
+ this.legalErrorFromOAuth = !0;
3022
+ return;
3023
+ }
3024
+ this.legalErrorFromOAuth = !1, this.run(async () => {
3021
3025
  if (Ft(e), await o.signInWithOAuth(e), o.isPreview) {
3022
- wt(), this.fire("authui-success", { method: "oauth" });
3026
+ $t(), this.fire("authui-success", { method: "oauth" });
3023
3027
  return;
3024
3028
  }
3025
3029
  await new Promise((t) => setTimeout(t, 4e3));
@@ -3056,18 +3060,18 @@ let x = class extends E {
3056
3060
  kind: "email-otp",
3057
3061
  target: this.email,
3058
3062
  phrase: t.phrase
3059
- }, this.code = "";
3063
+ }, this.code = "", this.resendCooldownUntil = Date.now() + 3e4, window.setTimeout(() => this.requestUpdate(), 3e4);
3060
3064
  });
3061
3065
  }, this.onPhoneOtp = (e) => {
3062
3066
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
3063
3067
  const t = await o.sendPhoneOtp(this.phone);
3064
- this.token = { userId: t.userId, kind: "phone", target: this.phone }, this.code = "";
3068
+ this.token = { userId: t.userId, kind: "phone", target: this.phone }, this.code = "", this.resendCooldownUntil = Date.now() + 3e4, window.setTimeout(() => this.requestUpdate(), 3e4);
3065
3069
  });
3066
3070
  }, this.onVerifyCode = (e) => {
3067
3071
  if (e.preventDefault(), !this.requireValid(e)) return;
3068
3072
  const t = this.token;
3069
3073
  t && this.run(async () => {
3070
- await o.signInWithToken(t.userId, this.code), this.code = "", this.token = null, V(t.kind), this.fire("authui-success", { method: t.kind });
3074
+ await o.signInWithToken(t.userId, this.code), this.code = "", this.token = null, _(t.kind), this.fire("authui-success", { method: t.kind });
3071
3075
  }, "code");
3072
3076
  }, this.onChooseFactor = (e) => {
3073
3077
  this.run(async () => {
@@ -3085,7 +3089,7 @@ let x = class extends E {
3085
3089
  try {
3086
3090
  await o.signOut();
3087
3091
  } catch (e) {
3088
- if (!j(e, g.sessionNotFound)) throw e;
3092
+ if (!j(e, v.sessionNotFound)) throw e;
3089
3093
  }
3090
3094
  this.go("sign-in");
3091
3095
  });
@@ -3117,7 +3121,7 @@ let x = class extends E {
3117
3121
  this.notice = null, this.auth.pending?.type === "notice" && o.setPending(null);
3118
3122
  }
3119
3123
  go(e) {
3120
- e === "sign-up" && this.config?.signUp === !1 && (e = "sign-in"), this.focusOnStep = !0, this.step = e, this.error = "", this.notice = null, this.busy = !1, this.showPassword = !1, this.password = "", this.passwordConfirm = "", this.legalAccepted = !1, e !== "mfa" && (this.challenge = null), e !== "email-otp" && e !== "phone" && e !== "magic-url" && (this.token = null), this.fire("authui-view", { view: e });
3124
+ e === "sign-up" && this.config?.signUp === !1 && (e = "sign-in"), this.focusOnStep = !0, this.step = e, this.error = "", this.notice = null, this.busy = !1, this.showPassword = !1, this.showPasswordConfirm = !1, this.password = "", this.passwordConfirm = "", this.legalAccepted = !1, this.legalErrorFromOAuth = !1, e !== "mfa" && (this.challenge = null), e !== "email-otp" && e !== "phone" && e !== "magic-url" && (this.token = null), this.fire("authui-view", { view: e });
3121
3125
  }
3122
3126
  // ───────────────────────────── actions ─────────────────────────────
3123
3127
  async run(e, t = "link") {
@@ -3219,7 +3223,7 @@ let x = class extends E {
3219
3223
  </button>`;
3220
3224
  }
3221
3225
  passwordField(e) {
3222
- const t = this[e.field], i = e.meter ? st(t) : null;
3226
+ const t = this[e.field], i = e.field === "passwordConfirm" ? this.showPasswordConfirm : this.showPassword, s = e.meter ? rt(t) : null;
3223
3227
  return r`
3224
3228
  <div class="field">
3225
3229
  <div class="field-header">
@@ -3236,7 +3240,7 @@ let x = class extends E {
3236
3240
  <input
3237
3241
  class="input"
3238
3242
  id=${e.id}
3239
- type=${this.showPassword ? "text" : "password"}
3243
+ type=${i ? "text" : "password"}
3240
3244
  autocomplete=${e.autocomplete}
3241
3245
  required
3242
3246
  minlength="8"
@@ -3246,26 +3250,28 @@ let x = class extends E {
3246
3250
  <button
3247
3251
  type="button"
3248
3252
  class="btn btn-ghost btn-icon"
3249
- @click=${() => this.showPassword = !this.showPassword}
3250
- aria-label=${this.showPassword ? this.t("hidePassword") : this.t("showPassword")}
3253
+ @click=${() => {
3254
+ e.field === "passwordConfirm" ? this.showPasswordConfirm = !this.showPasswordConfirm : this.showPassword = !this.showPassword;
3255
+ }}
3256
+ aria-label=${i ? this.t("hidePassword") : this.t("showPassword")}
3251
3257
  >
3252
- ${this.showPassword ? l.eyeOff : l.eye}
3258
+ ${i ? l.eyeOff : l.eye}
3253
3259
  </button>
3254
3260
  </div>
3255
- ${i && t ? r`<div class="strength" aria-live="polite">
3261
+ ${s && t ? r`<div class="strength" aria-live="polite">
3256
3262
  <div
3257
3263
  class="strength-meter"
3258
- data-level=${String(i.level)}
3264
+ data-level=${String(s.level)}
3259
3265
  role="meter"
3260
3266
  aria-label=${this.t("passwordStrengthLabel")}
3261
3267
  aria-valuemin="0"
3262
3268
  aria-valuemax="4"
3263
- aria-valuenow=${String(i.level)}
3264
- aria-valuetext=${this.t(i.labelKey)}
3269
+ aria-valuenow=${String(s.level)}
3270
+ aria-valuetext=${this.t(s.labelKey)}
3265
3271
  >
3266
3272
  <span></span><span></span><span></span><span></span>
3267
3273
  </div>
3268
- <p class="strength-label">${this.t(i.labelKey)}</p>
3274
+ <p class="strength-label">${this.t(s.labelKey)}</p>
3269
3275
  </div>` : e.hint ? r`<p class="hint">${e.hint}</p>` : n}
3270
3276
  </div>
3271
3277
  `;
@@ -3330,7 +3336,7 @@ let x = class extends E {
3330
3336
  type="checkbox"
3331
3337
  .checked=${this.legalAccepted}
3332
3338
  @change=${(e) => {
3333
- this.legalAccepted = e.target.checked, this.legalAccepted && this.error === this.t("errorLegalRequired") && (this.error = "");
3339
+ this.legalAccepted = e.target.checked, this.legalAccepted && this.error === this.t("errorLegalRequired") && (this.error = "", this.legalErrorFromOAuth = !1);
3334
3340
  }}
3335
3341
  />
3336
3342
  <span>${this.t("acceptLegal")} ${this.legalLinks()}.</span>
@@ -3382,7 +3388,7 @@ let x = class extends E {
3382
3388
  <div class="stack">
3383
3389
  <div class="row">
3384
3390
  <div class="inline">
3385
- <span class="avatar">${ot(t)}</span>
3391
+ <span class="avatar">${lt(t)}</span>
3386
3392
  <div class="row-main">
3387
3393
  <span class="row-title" title=${t}>${t}</span>
3388
3394
  ${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : n}
@@ -3412,51 +3418,56 @@ let x = class extends E {
3412
3418
  renderProviders() {
3413
3419
  const e = [...this.config?.methods?.oauth ?? []];
3414
3420
  if (e.length === 0) return n;
3415
- const t = D(), i = e.find((c) => t === `oauth:${c}`) ?? null, s = this.config?.methods?.oauthLayout, a = s === "horizontal" || s === "icon" ? "icon" : s === "stack" || s === "accordion" ? s : e.length <= 2 ? "stack" : "accordion";
3416
- if (a === "icon")
3421
+ const t = z(), i = e.find((d) => t === `oauth:${d}`) ?? null, s = this.config?.methods?.oauthLayout, a = s === "horizontal" || s === "icon" ? "icon" : s === "stack" || s === "accordion" ? s : e.length <= 2 ? "stack" : "accordion";
3422
+ if (a === "icon") {
3423
+ const d = [...e].sort((g, y) => {
3424
+ const C = t === `oauth:${g}` ? 0 : 1, tt = t === `oauth:${y}` ? 0 : 1;
3425
+ return C - tt;
3426
+ });
3417
3427
  return r`
3418
3428
  <div class="providers icon">
3419
- ${e.map((c) => {
3420
- const v = t === `oauth:${c}`, y = this.t("continueWith", { provider: N(c) });
3429
+ ${d.map((g) => {
3430
+ const y = t === `oauth:${g}`, C = this.t("continueWith", { provider: N(g) });
3421
3431
  return r`<button
3422
3432
  type="button"
3423
- class="btn btn-outline ${v ? "last-used" : ""}"
3424
- @click=${() => this.onOAuth(c)}
3433
+ class="btn btn-outline ${y ? "last-used" : ""}"
3434
+ @click=${() => this.onOAuth(g)}
3425
3435
  ?disabled=${this.busy}
3426
- aria-label=${v ? `${y}. ${this.t("lastUsed")}` : y}
3427
- title=${y}
3436
+ aria-label=${y ? `${C}. ${this.t("lastUsed")}` : C}
3437
+ title=${C}
3428
3438
  >
3429
- ${B(c)}
3430
- ${v ? r`<span class="oauth-last-used-dot" aria-hidden="true"></span>` : n}
3439
+ ${B(g)}
3440
+ ${y ? r`<span class="oauth-last-used-dot" aria-hidden="true"></span>` : n}
3431
3441
  </button>`;
3432
3442
  })}
3433
3443
  </div>
3434
3444
  `;
3445
+ }
3435
3446
  if (a === "stack") {
3436
- const c = [...e].sort((v, y) => {
3437
- const S = t === `oauth:${v}` ? 0 : 1, xt = t === `oauth:${y}` ? 0 : 1;
3438
- return S - xt;
3447
+ const d = [...e].sort((g, y) => {
3448
+ const C = t === `oauth:${g}` ? 0 : 1, tt = t === `oauth:${y}` ? 0 : 1;
3449
+ return C - tt;
3439
3450
  });
3440
3451
  return r`
3441
3452
  <div class="providers">
3442
- ${c.map((v) => {
3443
- const y = t === `oauth:${v}`, S = this.t("continueWith", { provider: N(v) });
3453
+ ${d.map((g) => {
3454
+ const y = t === `oauth:${g}`, C = this.t("continueWith", { provider: N(g) });
3444
3455
  return r`<button
3445
3456
  type="button"
3446
3457
  class="btn btn-outline ${y ? "last-used" : ""}"
3447
- @click=${() => this.onOAuth(v)}
3458
+ @click=${() => this.onOAuth(g)}
3448
3459
  ?disabled=${this.busy}
3449
- aria-label=${y ? `${S}. ${this.t("lastUsed")}` : S}
3460
+ aria-label=${y ? `${C}. ${this.t("lastUsed")}` : C}
3450
3461
  >
3451
- ${B(v)}
3452
- <span>${S}</span>
3462
+ ${B(g)}
3463
+ <span>${C}</span>
3453
3464
  ${y ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : n}
3454
3465
  </button>`;
3455
3466
  })}
3456
3467
  </div>
3457
3468
  `;
3458
3469
  }
3459
- const u = this.expandedOAuth && e.includes(this.expandedOAuth) ? this.expandedOAuth : i ?? e[0];
3470
+ const h = this.expandedOAuth && e.includes(this.expandedOAuth) ? this.expandedOAuth : i ?? e[0];
3460
3471
  return r`
3461
3472
  <div
3462
3473
  class="providers accordion"
@@ -3464,29 +3475,29 @@ let x = class extends E {
3464
3475
  this.expandedOAuth = i ?? e[0];
3465
3476
  }}
3466
3477
  >
3467
- ${e.map((c) => {
3468
- const v = t === `oauth:${c}`, y = u === c, S = this.t("continueWith", { provider: N(c) });
3478
+ ${e.map((d) => {
3479
+ const g = t === `oauth:${d}`, y = h === d, C = this.t("continueWith", { provider: N(d) });
3469
3480
  return r`<div
3470
3481
  class="provider-slot ${y ? "is-expanded" : ""}"
3471
3482
  @mouseenter=${() => {
3472
- this.expandedOAuth = c;
3483
+ this.expandedOAuth = d;
3473
3484
  }}
3474
3485
  >
3475
3486
  <button
3476
3487
  type="button"
3477
3488
  class="btn btn-outline"
3478
- @click=${() => this.onOAuth(c)}
3489
+ @click=${() => this.onOAuth(d)}
3479
3490
  @focus=${() => {
3480
- this.expandedOAuth = c;
3491
+ this.expandedOAuth = d;
3481
3492
  }}
3482
3493
  ?disabled=${this.busy}
3483
- aria-label=${v ? `${S}. ${this.t("lastUsed")}` : S}
3494
+ aria-label=${g ? `${C}. ${this.t("lastUsed")}` : C}
3484
3495
  >
3485
- ${B(c)}
3496
+ ${B(d)}
3486
3497
  <span class="provider-label"
3487
- ><span><span class="provider-label-text">${S}</span></span></span
3498
+ ><span><span class="provider-label-text">${C}</span></span></span
3488
3499
  >
3489
- ${v ? r`<span class="oauth-last-used" data-last-used=${c} aria-hidden="true">
3500
+ ${g ? r`<span class="oauth-last-used" data-last-used=${d} aria-hidden="true">
3490
3501
  <span class="oauth-last-used-dot"></span>
3491
3502
  <span class="oauth-last-used-pill">${this.t("lastUsed")}</span>
3492
3503
  </span>` : n}
@@ -3507,11 +3518,11 @@ let x = class extends E {
3507
3518
  ${this.renderProviders()}
3508
3519
  ${i && (t || s.length > 0) ? r`<div class="separator-text">${this.t("or")}</div>` : n}
3509
3520
  ${t ? r`<form
3510
- class="form ${D() === "email-password" ? "last-used-form" : ""}"
3521
+ class="form ${z() === "email-password" ? "last-used-form" : ""}"
3511
3522
  @submit=${this.onSignIn}
3512
3523
  novalidate
3513
3524
  >
3514
- ${D() === "email-password" ? r`<p class="hint">
3525
+ ${z() === "email-password" ? r`<p class="hint">
3515
3526
  <span class="last-used-badge">${this.t("lastUsed")}</span>
3516
3527
  </p>` : n}
3517
3528
  ${this.emailField()}
@@ -3520,25 +3531,26 @@ let x = class extends E {
3520
3531
  </form>` : this.renderError()}
3521
3532
  ${s.length > 0 ? r`<div class="stack-sm">
3522
3533
  ${s.map((a) => {
3523
- const u = D() === a.step;
3534
+ const h = z() === a.step;
3524
3535
  return r`<button
3525
3536
  type="button"
3526
- class="btn btn-secondary btn-block ${u ? "last-used" : ""}"
3537
+ class="btn btn-secondary btn-block ${h ? "last-used" : ""}"
3527
3538
  @click=${() => this.go(a.step)}
3539
+ ?disabled=${this.busy}
3528
3540
  >
3529
3541
  ${a.icon} ${a.label}
3530
- ${u ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : n}
3542
+ ${h ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : n}
3531
3543
  </button>`;
3532
3544
  })}
3533
3545
  </div>` : n}
3534
3546
  ${e.anonymous ? r`<button
3535
3547
  type="button"
3536
- class="btn btn-ghost btn-block ${D() === "anonymous" ? "last-used" : ""}"
3548
+ class="btn btn-ghost btn-block ${z() === "anonymous" ? "last-used" : ""}"
3537
3549
  @click=${this.onGuest}
3538
3550
  ?disabled=${this.busy}
3539
3551
  >
3540
3552
  ${l.ghost} ${this.t("continueAsGuest")}
3541
- ${D() === "anonymous" ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : n}
3553
+ ${z() === "anonymous" ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : n}
3542
3554
  </button>` : n}
3543
3555
  ${t && this.config?.signUp !== !1 ? r`<div class="links">
3544
3556
  <span>${this.t("noAccount")}</span>
@@ -3551,9 +3563,10 @@ let x = class extends E {
3551
3563
  `;
3552
3564
  }
3553
3565
  renderSignUp() {
3566
+ const e = this.legalErrorFromOAuth && this.error === this.t("errorLegalRequired");
3554
3567
  return r`
3555
3568
  <div class="stack">
3556
- ${this.renderProviders()}
3569
+ ${this.renderProviders()} ${e ? this.renderError() : n}
3557
3570
  ${(this.config?.methods?.oauth?.length ?? 0) > 0 ? r`<div class="separator-text">${this.t("or")}</div>` : n}
3558
3571
  <form class="form" @submit=${this.onSignUp} novalidate>
3559
3572
  ${this.config?.requireName !== !1 ? r`<div class="field">
@@ -3570,7 +3583,7 @@ let x = class extends E {
3570
3583
  </div>` : n}
3571
3584
  ${this.emailField()}
3572
3585
  ${this.passwordField({ label: this.t("password"), autocomplete: "new-password", id: "authui-password", field: "password", hint: this.t("passwordHint"), meter: !0 })}
3573
- ${this.legalAcceptField()} ${this.renderError()}
3586
+ ${this.legalAcceptField()} ${e ? n : this.renderError()}
3574
3587
  ${this.submitButton(this.t("createAccount"))}
3575
3588
  </form>
3576
3589
  <div class="links">
@@ -3825,69 +3838,75 @@ let x = class extends E {
3825
3838
  `;
3826
3839
  }
3827
3840
  };
3828
- x.styles = [...E.styles, Kt];
3829
- C([
3841
+ $.styles = [...U.styles, Kt];
3842
+ k([
3830
3843
  m({ type: String })
3831
- ], x.prototype, "view", 2);
3832
- C([
3844
+ ], $.prototype, "view", 2);
3845
+ k([
3833
3846
  m({ type: Boolean })
3834
- ], x.prototype, "embedded", 2);
3835
- C([
3836
- d()
3837
- ], x.prototype, "step", 2);
3838
- C([
3839
- d()
3840
- ], x.prototype, "busy", 2);
3841
- C([
3842
- d()
3843
- ], x.prototype, "error", 2);
3844
- C([
3845
- d()
3846
- ], x.prototype, "notice", 2);
3847
- C([
3848
- d()
3849
- ], x.prototype, "showPassword", 2);
3850
- C([
3851
- d()
3852
- ], x.prototype, "expandedOAuth", 2);
3853
- C([
3854
- d()
3855
- ], x.prototype, "token", 2);
3856
- C([
3857
- d()
3858
- ], x.prototype, "resendCooldownUntil", 2);
3859
- C([
3860
- d()
3861
- ], x.prototype, "challenge", 2);
3862
- C([
3863
- d()
3864
- ], x.prototype, "recovery", 2);
3865
- C([
3866
- rt("form input:not([type=hidden])")
3867
- ], x.prototype, "firstInput", 2);
3868
- C([
3869
- d()
3870
- ], x.prototype, "password", 2);
3871
- C([
3872
- d()
3873
- ], x.prototype, "passwordConfirm", 2);
3874
- C([
3875
- d()
3876
- ], x.prototype, "legalAccepted", 2);
3877
- x = C([
3847
+ ], $.prototype, "embedded", 2);
3848
+ k([
3849
+ c()
3850
+ ], $.prototype, "step", 2);
3851
+ k([
3852
+ c()
3853
+ ], $.prototype, "busy", 2);
3854
+ k([
3855
+ c()
3856
+ ], $.prototype, "error", 2);
3857
+ k([
3858
+ c()
3859
+ ], $.prototype, "notice", 2);
3860
+ k([
3861
+ c()
3862
+ ], $.prototype, "showPassword", 2);
3863
+ k([
3864
+ c()
3865
+ ], $.prototype, "showPasswordConfirm", 2);
3866
+ k([
3867
+ c()
3868
+ ], $.prototype, "expandedOAuth", 2);
3869
+ k([
3870
+ c()
3871
+ ], $.prototype, "token", 2);
3872
+ k([
3873
+ c()
3874
+ ], $.prototype, "resendCooldownUntil", 2);
3875
+ k([
3876
+ c()
3877
+ ], $.prototype, "challenge", 2);
3878
+ k([
3879
+ c()
3880
+ ], $.prototype, "recovery", 2);
3881
+ k([
3882
+ at("form input:not([type=hidden])")
3883
+ ], $.prototype, "firstInput", 2);
3884
+ k([
3885
+ c()
3886
+ ], $.prototype, "password", 2);
3887
+ k([
3888
+ c()
3889
+ ], $.prototype, "passwordConfirm", 2);
3890
+ k([
3891
+ c()
3892
+ ], $.prototype, "legalAccepted", 2);
3893
+ k([
3894
+ c()
3895
+ ], $.prototype, "legalErrorFromOAuth", 2);
3896
+ $ = k([
3878
3897
  T("authui-sign-in")
3879
- ], x);
3898
+ ], $);
3880
3899
  var Xt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, f = (e, t, i, s) => {
3881
- for (var a = s > 1 ? void 0 : s ? Qt(t, i) : t, u = e.length - 1, c; u >= 0; u--)
3882
- (c = e[u]) && (a = (s ? c(t, i, a) : c(a)) || a);
3900
+ for (var a = s > 1 ? void 0 : s ? Qt(t, i) : t, h = e.length - 1, d; h >= 0; h--)
3901
+ (d = e[h]) && (a = (s ? d(t, i, a) : d(a)) || a);
3883
3902
  return s && a && Xt(t, i, a), a;
3884
3903
  };
3885
- let p = class extends E {
3904
+ let p = class extends U {
3886
3905
  constructor() {
3887
3906
  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 = (e) => {
3888
3907
  const t = [...this.renderRoot?.querySelectorAll('[role="tab"]') ?? []];
3889
3908
  if (!t.length) return;
3890
- const i = t.findIndex((u) => u.getAttribute("aria-selected") === "true");
3909
+ const i = t.findIndex((h) => h.getAttribute("aria-selected") === "true");
3891
3910
  let s = i;
3892
3911
  if (e.key === "ArrowRight" || e.key === "ArrowDown") s = (i + 1) % t.length;
3893
3912
  else if (e.key === "ArrowLeft" || e.key === "ArrowUp")
@@ -3988,7 +4007,7 @@ let p = class extends E {
3988
4007
  try {
3989
4008
  this.recoveryCodes = await o.createRecoveryCodes();
3990
4009
  } catch (e) {
3991
- if (!j(e, g.recoveryCodesExist)) throw e;
4010
+ if (!j(e, v.recoveryCodesExist)) throw e;
3992
4011
  this.recoveryCodes = await o.getRecoveryCodes();
3993
4012
  }
3994
4013
  await this.loadFactors();
@@ -4111,7 +4130,7 @@ let p = class extends E {
4111
4130
  try {
4112
4131
  await t(), i && this.setNotice("success", i);
4113
4132
  } catch (s) {
4114
- j(s, g.challengeRequired) ? this.stepUp = { retry: () => this.run(e, t, i) } : this.errors = {
4133
+ j(s, v.challengeRequired) ? this.stepUp = { retry: () => this.run(e, t, i) } : this.errors = {
4115
4134
  ...this.errors,
4116
4135
  [e]: Y(
4117
4136
  s,
@@ -4260,7 +4279,7 @@ let p = class extends E {
4260
4279
  return r`
4261
4280
  <div class="between">
4262
4281
  <div class="identity">
4263
- <span class="avatar">${ot(t)}</span>
4282
+ <span class="avatar">${lt(t)}</span>
4264
4283
  <div class="row-main">
4265
4284
  <span class="row-title" title=${t}>
4266
4285
  ${t}
@@ -4385,7 +4404,7 @@ let p = class extends E {
4385
4404
  autocomplete="new-password"
4386
4405
  />
4387
4406
  ${this.emailPassword ? (() => {
4388
- const t = st(this.emailPassword);
4407
+ const t = rt(this.emailPassword);
4389
4408
  return r`<div class="strength" aria-live="polite">
4390
4409
  <div
4391
4410
  class="strength-meter"
@@ -4646,7 +4665,7 @@ let p = class extends E {
4646
4665
  autocomplete="new-password"
4647
4666
  />
4648
4667
  ${this.newPassword ? (() => {
4649
- const i = st(this.newPassword);
4668
+ const i = rt(this.newPassword);
4650
4669
  return r`<div class="strength" aria-live="polite">
4651
4670
  <div
4652
4671
  class="strength-meter"
@@ -4695,7 +4714,7 @@ let p = class extends E {
4695
4714
  </div>`;
4696
4715
  }
4697
4716
  renderMfaCard() {
4698
- const e = this.user, t = this.factors?.totp ?? !1, i = this.authenticator ? o.isPreview ? Et(this.authenticator.uri) : new Ct(o.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
4717
+ const e = this.user, t = this.factors?.totp ?? !1, i = this.authenticator ? o.isPreview ? Ut(this.authenticator.uri) : new Ct(o.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
4699
4718
  return this.card(
4700
4719
  this.t("twoFactor"),
4701
4720
  this.t("twoFactorDescription"),
@@ -5109,7 +5128,7 @@ let p = class extends E {
5109
5128
  }
5110
5129
  };
5111
5130
  p.styles = [
5112
- ...E.styles,
5131
+ ...U.styles,
5113
5132
  L`
5114
5133
  :host {
5115
5134
  display: block;
@@ -5213,110 +5232,110 @@ f([
5213
5232
  m({ type: String })
5214
5233
  ], p.prototype, "tab", 2);
5215
5234
  f([
5216
- d()
5235
+ c()
5217
5236
  ], p.prototype, "active", 2);
5218
5237
  f([
5219
- d()
5238
+ c()
5220
5239
  ], p.prototype, "busy", 2);
5221
5240
  f([
5222
- d()
5241
+ c()
5223
5242
  ], p.prototype, "notice", 2);
5224
5243
  f([
5225
- d()
5244
+ c()
5226
5245
  ], p.prototype, "errors", 2);
5227
5246
  f([
5228
- d()
5247
+ c()
5229
5248
  ], p.prototype, "nameInput", 2);
5230
5249
  f([
5231
- d()
5250
+ c()
5232
5251
  ], p.prototype, "emailInput", 2);
5233
5252
  f([
5234
- d()
5253
+ c()
5235
5254
  ], p.prototype, "emailPassword", 2);
5236
5255
  f([
5237
- d()
5256
+ c()
5238
5257
  ], p.prototype, "phoneInput", 2);
5239
5258
  f([
5240
- d()
5259
+ c()
5241
5260
  ], p.prototype, "phonePassword", 2);
5242
5261
  f([
5243
- d()
5262
+ c()
5244
5263
  ], p.prototype, "phoneCode", 2);
5245
5264
  f([
5246
- d()
5265
+ c()
5247
5266
  ], p.prototype, "phoneCodeSent", 2);
5248
5267
  f([
5249
- d()
5268
+ c()
5250
5269
  ], p.prototype, "guestName", 2);
5251
5270
  f([
5252
- d()
5271
+ c()
5253
5272
  ], p.prototype, "oldPassword", 2);
5254
5273
  f([
5255
- d()
5274
+ c()
5256
5275
  ], p.prototype, "newPassword", 2);
5257
5276
  f([
5258
- d()
5277
+ c()
5259
5278
  ], p.prototype, "newPasswordConfirm", 2);
5260
5279
  f([
5261
- d()
5280
+ c()
5262
5281
  ], p.prototype, "authenticator", 2);
5263
5282
  f([
5264
- d()
5283
+ c()
5265
5284
  ], p.prototype, "authenticatorCode", 2);
5266
5285
  f([
5267
- d()
5286
+ c()
5268
5287
  ], p.prototype, "factors", 2);
5269
5288
  f([
5270
- d()
5289
+ c()
5271
5290
  ], p.prototype, "recoveryCodes", 2);
5272
5291
  f([
5273
- d()
5292
+ c()
5274
5293
  ], p.prototype, "stepUp", 2);
5275
5294
  f([
5276
- d()
5295
+ c()
5277
5296
  ], p.prototype, "stepUpCode", 2);
5278
5297
  f([
5279
- d()
5298
+ c()
5280
5299
  ], p.prototype, "copied", 2);
5281
5300
  f([
5282
- d()
5301
+ c()
5283
5302
  ], p.prototype, "sessions", 2);
5284
5303
  f([
5285
- d()
5304
+ c()
5286
5305
  ], p.prototype, "identities", 2);
5287
5306
  f([
5288
- d()
5307
+ c()
5289
5308
  ], p.prototype, "logs", 2);
5290
5309
  f([
5291
- d()
5310
+ c()
5292
5311
  ], p.prototype, "logsSupported", 2);
5293
5312
  f([
5294
- d()
5313
+ c()
5295
5314
  ], p.prototype, "confirmDelete", 2);
5296
5315
  f([
5297
- d()
5316
+ c()
5298
5317
  ], p.prototype, "confirmRegenerate", 2);
5299
5318
  f([
5300
- d()
5319
+ c()
5301
5320
  ], p.prototype, "confirmRemoveAuthenticator", 2);
5302
5321
  f([
5303
- d()
5322
+ c()
5304
5323
  ], p.prototype, "confirmSignOutAll", 2);
5305
5324
  f([
5306
- d()
5325
+ c()
5307
5326
  ], p.prototype, "confirmDisconnectId", 2);
5308
5327
  f([
5309
- d()
5328
+ c()
5310
5329
  ], p.prototype, "verifyEmailCooldownUntil", 2);
5311
5330
  p = f([
5312
5331
  T("authui-account")
5313
5332
  ], p);
5314
5333
  var Jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, R = (e, t, i, s) => {
5315
- for (var a = s > 1 ? void 0 : s ? te(t, i) : t, u = e.length - 1, c; u >= 0; u--)
5316
- (c = e[u]) && (a = (s ? c(t, i, a) : c(a)) || a);
5334
+ for (var a = s > 1 ? void 0 : s ? te(t, i) : t, h = e.length - 1, d; h >= 0; h--)
5335
+ (d = e[h]) && (a = (s ? d(t, i, a) : d(a)) || a);
5317
5336
  return s && a && Jt(t, i, a), a;
5318
5337
  };
5319
- let U = class extends E {
5338
+ let I = class extends U {
5320
5339
  constructor() {
5321
5340
  super(...arguments), this.open = !1, this.view = "sign-in", this.closeOnSuccess = !0, this.handledPending = null, this.scrollCue = !1, this.bodyResizeObserver = null, this.onOpenEvent = (e) => {
5322
5341
  const t = e.detail ?? {};
@@ -5412,8 +5431,8 @@ let U = class extends E {
5412
5431
  `;
5413
5432
  }
5414
5433
  };
5415
- U.styles = [
5416
- ...E.styles,
5434
+ I.styles = [
5435
+ ...U.styles,
5417
5436
  L`
5418
5437
  :host {
5419
5438
  display: contents;
@@ -5504,10 +5523,10 @@ U.styles = [
5504
5523
  ];
5505
5524
  R([
5506
5525
  m({ type: Boolean, reflect: !0 })
5507
- ], U.prototype, "open", 2);
5526
+ ], I.prototype, "open", 2);
5508
5527
  R([
5509
5528
  m({ type: String })
5510
- ], U.prototype, "view", 2);
5529
+ ], I.prototype, "view", 2);
5511
5530
  R([
5512
5531
  m({
5513
5532
  attribute: "close-on-success",
@@ -5523,28 +5542,28 @@ R([
5523
5542
  }
5524
5543
  }
5525
5544
  })
5526
- ], U.prototype, "closeOnSuccess", 2);
5545
+ ], I.prototype, "closeOnSuccess", 2);
5527
5546
  R([
5528
- d()
5529
- ], U.prototype, "handledPending", 2);
5547
+ c()
5548
+ ], I.prototype, "handledPending", 2);
5530
5549
  R([
5531
- d()
5532
- ], U.prototype, "scrollCue", 2);
5550
+ c()
5551
+ ], I.prototype, "scrollCue", 2);
5533
5552
  R([
5534
- rt("dialog")
5535
- ], U.prototype, "dialog", 2);
5553
+ at("dialog")
5554
+ ], I.prototype, "dialog", 2);
5536
5555
  R([
5537
- rt(".body")
5538
- ], U.prototype, "bodyEl", 2);
5539
- U = R([
5556
+ at(".body")
5557
+ ], I.prototype, "bodyEl", 2);
5558
+ I = R([
5540
5559
  T("authui-modal")
5541
- ], U);
5560
+ ], I);
5542
5561
  var ee = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, J = (e, t, i, s) => {
5543
- for (var a = s > 1 ? void 0 : s ? ie(t, i) : t, u = e.length - 1, c; u >= 0; u--)
5544
- (c = e[u]) && (a = (s ? c(t, i, a) : c(a)) || a);
5562
+ for (var a = s > 1 ? void 0 : s ? ie(t, i) : t, h = e.length - 1, d; h >= 0; h--)
5563
+ (d = e[h]) && (a = (s ? d(t, i, a) : d(a)) || a);
5545
5564
  return s && a && ee(t, i, a), a;
5546
5565
  };
5547
- let q = class extends E {
5566
+ let V = class extends U {
5548
5567
  constructor() {
5549
5568
  super(...arguments), this.view = "sign-in", this.variant = "primary", this.size = "md";
5550
5569
  }
@@ -5561,8 +5580,8 @@ let q = class extends E {
5561
5580
  </button>`;
5562
5581
  }
5563
5582
  };
5564
- q.styles = [
5565
- ...E.styles,
5583
+ V.styles = [
5584
+ ...U.styles,
5566
5585
  L`
5567
5586
  :host {
5568
5587
  display: inline-block;
@@ -5574,22 +5593,22 @@ q.styles = [
5574
5593
  ];
5575
5594
  J([
5576
5595
  m({ type: String })
5577
- ], q.prototype, "view", 2);
5596
+ ], V.prototype, "view", 2);
5578
5597
  J([
5579
5598
  m({ type: String })
5580
- ], q.prototype, "variant", 2);
5599
+ ], V.prototype, "variant", 2);
5581
5600
  J([
5582
5601
  m({ type: String })
5583
- ], q.prototype, "size", 2);
5584
- q = J([
5602
+ ], V.prototype, "size", 2);
5603
+ V = J([
5585
5604
  T("authui-button")
5586
- ], q);
5605
+ ], V);
5587
5606
  var se = Object.defineProperty, re = Object.getOwnPropertyDescriptor, F = (e, t, i, s) => {
5588
- for (var a = s > 1 ? void 0 : s ? re(t, i) : t, u = e.length - 1, c; u >= 0; u--)
5589
- (c = e[u]) && (a = (s ? c(t, i, a) : c(a)) || a);
5607
+ for (var a = s > 1 ? void 0 : s ? re(t, i) : t, h = e.length - 1, d; h >= 0; h--)
5608
+ (d = e[h]) && (a = (s ? d(t, i, a) : d(a)) || a);
5590
5609
  return s && a && se(t, i, a), a;
5591
5610
  };
5592
- let I = class extends E {
5611
+ let E = class extends U {
5593
5612
  constructor() {
5594
5613
  super(...arguments), this.showTeams = !1, this.menuItems = [], this.src = "", this.menuOpen = !1, this.menuAbove = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.onReposition = () => {
5595
5614
  this.menuOpen && this.placeMenu();
@@ -5634,10 +5653,10 @@ let I = class extends E {
5634
5653
  if (!e || !t) return;
5635
5654
  const i = e.getBoundingClientRect(), s = 6, a = 8;
5636
5655
  t.style.maxHeight = "";
5637
- const u = t.offsetHeight + s, c = window.innerHeight - i.bottom, v = i.top, y = c < u && v > c;
5656
+ const h = t.offsetHeight + s, d = window.innerHeight - i.bottom, g = i.top, y = d < h && g > d;
5638
5657
  y !== this.menuAbove && (this.menuAbove = y);
5639
- const S = Math.max(80, (y ? v : c) - s - a);
5640
- t.style.maxHeight = `${S}px`;
5658
+ const C = Math.max(80, (y ? g : d) - s - a);
5659
+ t.style.maxHeight = `${C}px`;
5641
5660
  }
5642
5661
  focusMenuItem(e) {
5643
5662
  [
@@ -5677,7 +5696,7 @@ let I = class extends E {
5677
5696
  aria-label=${s}
5678
5697
  >
5679
5698
  <span class="avatar"
5680
- >${this.src ? r`<img src=${this.src} alt="" />` : ot(s)}</span
5699
+ >${this.src ? r`<img src=${this.src} alt="" />` : lt(s)}</span
5681
5700
  >
5682
5701
  </button>
5683
5702
  ${this.menuOpen ? r`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
@@ -5762,8 +5781,8 @@ let I = class extends E {
5762
5781
  }) : n;
5763
5782
  }
5764
5783
  };
5765
- I.styles = [
5766
- ...E.styles,
5784
+ E.styles = [
5785
+ ...U.styles,
5767
5786
  L`
5768
5787
  :host {
5769
5788
  display: inline-block;
@@ -5886,61 +5905,61 @@ I.styles = [
5886
5905
  ];
5887
5906
  F([
5888
5907
  m({ type: Boolean, attribute: "show-teams" })
5889
- ], I.prototype, "showTeams", 2);
5908
+ ], E.prototype, "showTeams", 2);
5890
5909
  F([
5891
5910
  m({ attribute: !1 })
5892
- ], I.prototype, "menuItems", 2);
5911
+ ], E.prototype, "menuItems", 2);
5893
5912
  F([
5894
5913
  m({ type: String })
5895
- ], I.prototype, "src", 2);
5914
+ ], E.prototype, "src", 2);
5896
5915
  F([
5897
- d()
5898
- ], I.prototype, "menuOpen", 2);
5916
+ c()
5917
+ ], E.prototype, "menuOpen", 2);
5899
5918
  F([
5900
- d()
5901
- ], I.prototype, "menuAbove", 2);
5919
+ c()
5920
+ ], E.prototype, "menuAbove", 2);
5902
5921
  F([
5903
- d()
5904
- ], I.prototype, "teams", 2);
5922
+ c()
5923
+ ], E.prototype, "teams", 2);
5905
5924
  F([
5906
- d()
5907
- ], I.prototype, "teamsLoading", 2);
5925
+ c()
5926
+ ], E.prototype, "teamsLoading", 2);
5908
5927
  F([
5909
- d()
5910
- ], I.prototype, "activeTeamId", 2);
5911
- I = F([
5928
+ c()
5929
+ ], E.prototype, "activeTeamId", 2);
5930
+ E = F([
5912
5931
  T("authui-user-button")
5913
- ], I);
5932
+ ], E);
5914
5933
  export {
5915
5934
  Lt as A,
5916
5935
  ce as C,
5917
- g as E,
5918
- bt as F,
5919
- Ut as P,
5936
+ v as E,
5937
+ yt as F,
5938
+ It as P,
5920
5939
  o as a,
5921
5940
  p as b,
5922
5941
  de as c,
5923
- q as d,
5942
+ V as d,
5924
5943
  w as e,
5925
- E as f,
5926
- U as g,
5944
+ U as f,
5945
+ I as g,
5927
5946
  H as h,
5928
- x as i,
5929
- I as j,
5947
+ $ as i,
5948
+ E as j,
5930
5949
  le as k,
5931
- pt as l,
5950
+ mt as l,
5932
5951
  St as m,
5933
5952
  Y as n,
5934
5953
  X as o,
5935
- D as p,
5936
- ht as q,
5954
+ z as p,
5955
+ pt as q,
5937
5956
  Mt as r,
5938
5957
  N as s,
5939
- V as t,
5940
- wt as u,
5941
- st as v,
5958
+ _ as t,
5959
+ $t as u,
5960
+ rt as v,
5942
5961
  Ot as w,
5943
5962
  Ft as x,
5944
- _ as y,
5963
+ q as y,
5945
5964
  Wt as z
5946
5965
  };