@getauthui/core 0.1.6 → 0.1.8

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 g, customElement as R, query as st } from "lit/decorators.js";
2
- import { css as O, LitElement as rt, nothing as o, html as r, svg as h } from "lit";
3
- import { Client as lt, Account as ct, Teams as xt, ID as H, Avatars as kt } from "appwrite";
1
+ import { state as d, property as g, customElement as T, query as st } from "lit/decorators.js";
2
+ import { css as O, LitElement as rt, nothing as n, html as r, svg as h } from "lit";
3
+ import { Client as lt, Account as ct, Teams as xt, ID as B, Avatars as kt } from "appwrite";
4
4
  const Ct = {
5
5
  signIn: "Sign in",
6
6
  dialogSignIn: "Sign in",
@@ -101,10 +101,13 @@ const Ct = {
101
101
  signOutAllSessions: "Sign out everywhere",
102
102
  signOutAllSessionsDescription: "End every session, including this one.",
103
103
  noConnections: "No connected accounts.",
104
+ noConnectionsDescription: "Link an OAuth provider to sign in faster next time.",
104
105
  disconnect: "Disconnect",
105
106
  connectProvider: "Connect {provider}",
106
107
  noActivity: "No recent activity.",
108
+ noActivityDescription: "Security events for this account will appear here.",
107
109
  noSessions: "No active sessions.",
110
+ noSessionsDescription: "Active sessions will show up here once you sign in on a device.",
108
111
  deleteAccount: "Delete account",
109
112
  deleteAccountDescription: "Deleting disables your account and signs you out everywhere. An administrator can restore it.",
110
113
  deleteAccountConfirm: "Delete my account",
@@ -227,10 +230,10 @@ const At = {
227
230
  zoho: "Zoho",
228
231
  zoom: "Zoom"
229
232
  };
230
- function q(e) {
233
+ function W(e) {
231
234
  return At[e] ?? e.charAt(0).toUpperCase() + e.slice(1);
232
235
  }
233
- const j = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }), A = () => (/* @__PURE__ */ new Date()).toISOString(), U = (e) => new Date(Date.now() - e * 6e4).toISOString(), W = [
236
+ const H = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }), A = () => (/* @__PURE__ */ new Date()).toISOString(), U = (e) => new Date(Date.now() - e * 6e4).toISOString(), j = [
234
237
  "amber",
235
238
  "brave",
236
239
  "calm",
@@ -243,7 +246,7 @@ const j = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }),
243
246
  "juniper",
244
247
  "kite",
245
248
  "lumen"
246
- ], dt = () => `${W[Math.floor(Math.random() * W.length)]}-${W[Math.floor(Math.random() * W.length)]}`, _ = () => Math.random().toString(36).slice(2, 12), ht = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), Pt = {
249
+ ], dt = () => `${j[Math.floor(Math.random() * j.length)]}-${j[Math.floor(Math.random() * j.length)]}`, D = () => Math.random().toString(36).slice(2, 12), ht = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), Pt = {
247
250
  name: "Ada Lovelace",
248
251
  email: "ada@example.com",
249
252
  phone: "+15550100"
@@ -313,7 +316,7 @@ class It {
313
316
  },
314
317
  {
315
318
  ...i,
316
- $id: _(),
319
+ $id: D(),
317
320
  $createdAt: U(300),
318
321
  provider: t,
319
322
  ip: "198.51.100.7",
@@ -330,7 +333,7 @@ class It {
330
333
  },
331
334
  {
332
335
  ...i,
333
- $id: _(),
336
+ $id: D(),
334
337
  $createdAt: U(1440 * 3),
335
338
  provider: "oauth2",
336
339
  ip: "192.0.2.90",
@@ -385,9 +388,9 @@ class It {
385
388
  }
386
389
  requireUser() {
387
390
  if (!this.user)
388
- throw j("general_unauthorized_scope", "User (role: guests) missing scope (account)");
391
+ throw H("general_unauthorized_scope", "User (role: guests) missing scope (account)");
389
392
  if (this.mfaPending)
390
- throw j(
393
+ throw H(
391
394
  "user_more_factors_required",
392
395
  "More factors are required to complete the sign in process."
393
396
  );
@@ -395,7 +398,7 @@ class It {
395
398
  }
396
399
  requireRecentChallenge() {
397
400
  if (Date.now() - this.lastChallenge > 30 * 6e4)
398
- throw j(
401
+ throw H(
399
402
  "user_challenge_required",
400
403
  "A recently successful challenge is required to complete this action."
401
404
  );
@@ -431,7 +434,7 @@ class It {
431
434
  }
432
435
  async createMagicURLToken(t, i) {
433
436
  return this.tokens.set(t, { email: i }), this.delay({
434
- $id: _(),
437
+ $id: D(),
435
438
  $createdAt: A(),
436
439
  userId: t,
437
440
  secret: "",
@@ -441,7 +444,7 @@ class It {
441
444
  }
442
445
  async createEmailToken(t, i) {
443
446
  return this.tokens.set(t, { email: i }), this.delay({
444
- $id: _(),
447
+ $id: D(),
445
448
  $createdAt: A(),
446
449
  userId: t,
447
450
  secret: "",
@@ -450,7 +453,7 @@ class It {
450
453
  });
451
454
  }
452
455
  async createPhoneToken(t, i) {
453
- return this.tokens.set(t, { phone: i }), this.delay({ $id: _(), $createdAt: A(), userId: t, secret: "", expire: "", phrase: "" });
456
+ return this.tokens.set(t, { phone: i }), this.delay({ $id: D(), $createdAt: A(), userId: t, secret: "", expire: "", phrase: "" });
454
457
  }
455
458
  async createSession(t) {
456
459
  return this.delay(() => {
@@ -542,7 +545,7 @@ class It {
542
545
  });
543
546
  }
544
547
  async createMFAChallenge() {
545
- return this.delay({ $id: _(), $createdAt: A(), userId: "preview-user", expire: "" });
548
+ return this.delay({ $id: D(), $createdAt: A(), userId: "preview-user", expire: "" });
546
549
  }
547
550
  async updateMFAChallenge() {
548
551
  return this.delay(() => (this.mfaPending = !1, this.lastChallenge = Date.now(), this.sessions[0]));
@@ -571,7 +574,7 @@ class It {
571
574
  async createMFARecoveryCodes() {
572
575
  return this.delay(() => {
573
576
  if (this.recoveryCodes.length > 0)
574
- throw j("user_recovery_codes_already_exists", "Recovery codes already generated.", 409);
577
+ throw H("user_recovery_codes_already_exists", "Recovery codes already generated.", 409);
575
578
  return this.recoveryCodes = Array.from({ length: 6 }, ht), { recoveryCodes: this.recoveryCodes };
576
579
  });
577
580
  }
@@ -589,13 +592,13 @@ class It {
589
592
  function Et(e) {
590
593
  let t = 2166136261;
591
594
  const i = () => (t ^= t << 13, t ^= t >>> 17, t ^= t << 5, (t >>> 0) / 4294967296);
592
- for (const $ of e) t = (t ^ $.charCodeAt(0)) * 16777619;
595
+ for (const b of e) t = (t ^ b.charCodeAt(0)) * 16777619;
593
596
  const s = 25;
594
597
  let a = "";
595
- const c = ($, x) => `<rect x="${$}" y="${x}" width="7" height="7"/><rect x="${$ + 1}" y="${x + 1}" width="5" height="5" fill="#fff"/><rect x="${$ + 2}" y="${x + 2}" width="3" height="3"/>`;
596
- for (let $ = 0; $ < s; $++)
597
- for (let x = 0; x < s; x++)
598
- !(x < 8 && $ < 8 || x >= s - 8 && $ < 8 || x < 8 && $ >= s - 8) && i() < 0.45 && (a += `<rect x="${x}" y="${$}" width="1" height="1"/>`);
598
+ const c = (b, $) => `<rect x="${b}" y="${$}" width="7" height="7"/><rect x="${b + 1}" y="${$ + 1}" width="5" height="5" fill="#fff"/><rect x="${b + 2}" y="${$ + 2}" width="3" height="3"/>`;
599
+ for (let b = 0; b < s; b++)
600
+ for (let $ = 0; $ < s; $++)
601
+ !($ < 8 && b < 8 || $ >= s - 8 && b < 8 || $ < 8 && b >= s - 8) && i() < 0.45 && (a += `<rect x="${$}" y="${b}" width="1" height="1"/>`);
599
602
  const u = `<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">${c(0, 0)}${c(s - 7, 0)}${c(0, s - 7)}${a}</g></svg>`;
600
603
  return `data:image/svg+xml;utf8,${encodeURIComponent(u)}`;
601
604
  }
@@ -634,7 +637,7 @@ const f = {
634
637
  targetAlreadyExists: "user_target_already_exists",
635
638
  argumentInvalid: "general_argument_invalid"
636
639
  };
637
- function z(e) {
640
+ function _(e) {
638
641
  if (e && typeof e == "object") {
639
642
  const t = e;
640
643
  let i = typeof t.message == "string" ? t.message : "Unknown error";
@@ -646,11 +649,11 @@ function z(e) {
646
649
  }
647
650
  return { message: String(e), type: "", code: 0 };
648
651
  }
649
- function N(e, t) {
650
- return z(e).type === t;
652
+ function q(e, t) {
653
+ return _(e).type === t;
651
654
  }
652
655
  function K(e, t, i = "link") {
653
- const s = z(e);
656
+ const s = _(e);
654
657
  switch (s.type) {
655
658
  case f.invalidCredentials:
656
659
  return i === "password" ? t.errorCurrentPassword : t.errorInvalidCredentials;
@@ -693,14 +696,14 @@ function K(e, t, i = "link") {
693
696
  return s.type === f.projectNotFound || s.type === f.unknownOrigin ? t.errorConfig : s.type === f.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 === f.routeNotFound ? t.errorConfigEndpoint : t.errorGeneric;
694
697
  }
695
698
  function Ut(e) {
696
- const t = z(e);
699
+ const t = _(e);
697
700
  return !!(t.type === f.projectNotFound || t.type === f.unknownOrigin || t.type === f.routeNotFound || !t.message && t.code === 404 || t.code === 0 && /fetch|network|load failed|failed to fetch/i.test(t.message));
698
701
  }
699
- const J = (e) => `authui:active-team:${e}`;
702
+ const tt = (e) => `authui:active-team:${e}`;
700
703
  function ut(e) {
701
704
  if (typeof localStorage > "u" || !e) return null;
702
705
  try {
703
- return localStorage.getItem(J(e));
706
+ return localStorage.getItem(tt(e));
704
707
  } catch {
705
708
  return null;
706
709
  }
@@ -708,7 +711,7 @@ function ut(e) {
708
711
  function Mt(e, t) {
709
712
  if (!(typeof localStorage > "u" || !e))
710
713
  try {
711
- t ? localStorage.setItem(J(e), t) : localStorage.removeItem(J(e));
714
+ t ? localStorage.setItem(tt(e), t) : localStorage.removeItem(tt(e));
712
715
  } catch {
713
716
  }
714
717
  }
@@ -724,7 +727,7 @@ function V(e) {
724
727
  }
725
728
  }
726
729
  }
727
- function D() {
730
+ function z() {
728
731
  if (typeof localStorage > "u") return null;
729
732
  try {
730
733
  return localStorage.getItem(at);
@@ -772,7 +775,7 @@ function S(e, t, i) {
772
775
  new Error(`Appwrite SDK is missing ${t[0]}(). Update the appwrite package.`)
773
776
  );
774
777
  }
775
- const tt = "authui", mt = ["userId", "secret", "expire", "project", "error", tt], ft = () => ({
778
+ const et = "authui", mt = ["userId", "secret", "expire", "project", "error", et], ft = () => ({
776
779
  status: "loading",
777
780
  user: null,
778
781
  mfaFactors: null,
@@ -883,7 +886,7 @@ class Ft {
883
886
  this.state = { ...this.state, ...t }, this.emit("change", this.getState());
884
887
  }
885
888
  fail(t) {
886
- const i = z(t);
889
+ const i = _(t);
887
890
  throw this.emit("error", i), t;
888
891
  }
889
892
  acct() {
@@ -903,7 +906,7 @@ class Ft {
903
906
  const i = await this.account.get();
904
907
  this.setState({ status: "signed-in", user: i, mfaFactors: null, configError: null }), t || this.emit("signed-in", i);
905
908
  } catch (i) {
906
- if (N(i, f.moreFactorsRequired)) {
909
+ if (q(i, f.moreFactorsRequired)) {
907
910
  let s = null;
908
911
  try {
909
912
  s = await S(
@@ -914,7 +917,7 @@ class Ft {
914
917
  } catch {
915
918
  }
916
919
  this.setState({ status: "mfa-required", user: null, mfaFactors: s });
917
- } else if (N(i, f.userBlocked))
920
+ } else if (q(i, f.userBlocked))
918
921
  await this.purgeLocalSession(), this.setState({
919
922
  status: "signed-out",
920
923
  user: null,
@@ -930,7 +933,7 @@ class Ft {
930
933
  console.warn(
931
934
  `[authui] ${a} (endpoint=${this.config?.endpoint ?? "?"}, project=${this.config?.project ?? "?"})`
932
935
  );
933
- const c = z(i);
936
+ const c = _(i);
934
937
  this.emit("error", { message: a, type: c.type, code: c.code }), this.setState({
935
938
  status: "signed-out",
936
939
  user: null,
@@ -988,7 +991,7 @@ class Ft {
988
991
  }
989
992
  async signUp(t, i, s) {
990
993
  try {
991
- await this.acct().create(H.unique(), t.trim(), i, s?.trim() || void 0), await this.acct().createEmailPasswordSession(t.trim(), i);
994
+ await this.acct().create(B.unique(), t.trim(), i, s?.trim() || void 0), await this.acct().createEmailPasswordSession(t.trim(), i);
992
995
  } catch (a) {
993
996
  this.fail(a);
994
997
  }
@@ -1031,7 +1034,7 @@ class Ft {
1031
1034
  async sendMagicUrl(t) {
1032
1035
  try {
1033
1036
  return await this.acct().createMagicURLToken(
1034
- H.unique(),
1037
+ B.unique(),
1035
1038
  t.trim(),
1036
1039
  this.redirectUrl("magic-url"),
1037
1040
  this.config?.securityPhrase ?? !0
@@ -1043,7 +1046,7 @@ class Ft {
1043
1046
  async sendEmailOtp(t) {
1044
1047
  try {
1045
1048
  return await this.acct().createEmailToken(
1046
- H.unique(),
1049
+ B.unique(),
1047
1050
  t.trim(),
1048
1051
  this.config?.securityPhrase ?? !0
1049
1052
  );
@@ -1053,7 +1056,7 @@ class Ft {
1053
1056
  }
1054
1057
  async sendPhoneOtp(t) {
1055
1058
  try {
1056
- return await this.acct().createPhoneToken(H.unique(), t.replace(/[\s()-]/g, ""));
1059
+ return await this.acct().createPhoneToken(B.unique(), t.replace(/[\s()-]/g, ""));
1057
1060
  } catch (i) {
1058
1061
  return this.fail(i);
1059
1062
  }
@@ -1328,7 +1331,7 @@ class Ft {
1328
1331
  redirectUrl(t) {
1329
1332
  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);
1330
1333
  for (const a of mt) s.searchParams.delete(a);
1331
- return s.searchParams.set(tt, t), s.toString();
1334
+ return s.searchParams.set(et, t), s.toString();
1332
1335
  }
1333
1336
  setPending(t) {
1334
1337
  this.setState({ pending: t });
@@ -1339,7 +1342,7 @@ class Ft {
1339
1342
  */
1340
1343
  async handleRedirect() {
1341
1344
  if (typeof window > "u") return !1;
1342
- const t = new URLSearchParams(window.location.search), i = t.get(tt);
1345
+ const t = new URLSearchParams(window.location.search), i = t.get(et);
1343
1346
  if (!i) return !1;
1344
1347
  const s = t.get("userId") ?? "", a = t.get("secret") ?? "";
1345
1348
  this.cleanUrl();
@@ -1385,8 +1388,8 @@ class Ft {
1385
1388
  break;
1386
1389
  }
1387
1390
  } catch (u) {
1388
- const $ = z(u), x = K(u, this.getStrings(), "link");
1389
- this.emit("error", $), this.setState({ pending: { type: "notice", message: x, tone: "error" } });
1391
+ const b = _(u), $ = K(u, this.getStrings(), "link");
1392
+ this.emit("error", b), this.setState({ pending: { type: "notice", message: $, tone: "error" } });
1390
1393
  }
1391
1394
  return !0;
1392
1395
  }
@@ -1400,8 +1403,8 @@ class Ft {
1400
1403
  this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = ft(), this.listeners.clear();
1401
1404
  }
1402
1405
  }
1403
- const n = new Ft();
1404
- class Tt {
1406
+ const o = new Ft();
1407
+ class Rt {
1405
1408
  constructor() {
1406
1409
  this.listeners = /* @__PURE__ */ new Set(), this.observer = null, this.media = null, this.notify = () => {
1407
1410
  const t = this.isDark("auto");
@@ -1429,14 +1432,14 @@ class Tt {
1429
1432
  this.observer?.disconnect(), this.observer = null, this.media?.removeEventListener?.("change", this.notify), this.media = null;
1430
1433
  }
1431
1434
  }
1432
- const gt = new Tt(), vt = {
1435
+ const gt = new Rt(), vt = {
1433
1436
  none: "0px",
1434
1437
  sm: "0.25rem",
1435
1438
  md: "0.625rem",
1436
1439
  lg: "0.875rem",
1437
1440
  xl: "1.125rem",
1438
1441
  full: "1.5rem"
1439
- }, Rt = O`
1442
+ }, Tt = O`
1440
1443
  :host {
1441
1444
  /* Light theme (matches :root in the console) */
1442
1445
  --authui-background: oklch(1 0 0);
@@ -1465,7 +1468,7 @@ const gt = new Tt(), vt = {
1465
1468
  --authui-success-bg: rgba(16, 185, 129, 0.1);
1466
1469
  --authui-warning-foreground: #b45309;
1467
1470
  --authui-warning-bg: rgba(245, 158, 11, 0.1);
1468
- --authui-error-foreground: #dc2626;
1471
+ --authui-error-foreground: #b91c1c;
1469
1472
  --authui-error-bg: rgba(239, 68, 68, 0.1);
1470
1473
  --authui-info-foreground: #475569;
1471
1474
  --authui-info-bg: rgba(100, 116, 139, 0.1);
@@ -1514,7 +1517,7 @@ const gt = new Tt(), vt = {
1514
1517
  --authui-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
1515
1518
  color-scheme: dark;
1516
1519
  }
1517
- `, _t = O`
1520
+ `, Dt = O`
1518
1521
  *,
1519
1522
  *::before,
1520
1523
  *::after {
@@ -1708,11 +1711,13 @@ const gt = new Tt(), vt = {
1708
1711
  flex-direction: column;
1709
1712
  gap: 6px;
1710
1713
  }
1711
- .label {
1714
+ .field-header {
1712
1715
  display: flex;
1713
1716
  align-items: center;
1714
1717
  justify-content: space-between;
1715
1718
  gap: 8px;
1719
+ }
1720
+ .label {
1716
1721
  font-size: 14px;
1717
1722
  line-height: 1;
1718
1723
  font-weight: 500;
@@ -1876,7 +1881,7 @@ const gt = new Tt(), vt = {
1876
1881
  background: var(--authui-error-bg);
1877
1882
  }
1878
1883
  .alert-error .alert-body {
1879
- color: color-mix(in oklab, var(--authui-error-foreground) 90%, transparent);
1884
+ color: var(--authui-error-foreground);
1880
1885
  }
1881
1886
  .alert-success {
1882
1887
  color: var(--authui-success-foreground);
@@ -2227,12 +2232,154 @@ const gt = new Tt(), vt = {
2227
2232
  width: 18px;
2228
2233
  height: 18px;
2229
2234
  }
2235
+ /* OAuth accordion: last-used (or focused) expands; others stay icon-compact. */
2236
+ .providers.accordion {
2237
+ display: flex;
2238
+ width: 100%;
2239
+ gap: 8px;
2240
+ }
2241
+ .providers.accordion > .provider-slot {
2242
+ position: relative;
2243
+ flex: 0 1 2.25rem;
2244
+ min-width: 2.25rem;
2245
+ overflow: visible;
2246
+ transition: flex-grow 480ms cubic-bezier(0.22, 1, 0.36, 1);
2247
+ }
2248
+ .providers.accordion > .provider-slot.is-expanded {
2249
+ flex-grow: 1;
2250
+ }
2251
+ .providers.accordion .btn {
2252
+ position: relative;
2253
+ width: 100%;
2254
+ min-width: 0;
2255
+ justify-content: center;
2256
+ gap: 0;
2257
+ padding-inline: 0;
2258
+ overflow: hidden;
2259
+ }
2260
+ .providers.accordion .btn svg {
2261
+ width: 16px;
2262
+ height: 16px;
2263
+ flex-shrink: 0;
2264
+ }
2265
+ .provider-label {
2266
+ display: grid;
2267
+ min-width: 0;
2268
+ grid-template-columns: 0fr;
2269
+ transition: grid-template-columns 480ms cubic-bezier(0.22, 1, 0.36, 1) 160ms;
2270
+ }
2271
+ .provider-label > span {
2272
+ min-width: 0;
2273
+ overflow: hidden;
2274
+ }
2275
+ .provider-label-text {
2276
+ display: block;
2277
+ white-space: nowrap;
2278
+ padding-inline-start: 6px;
2279
+ opacity: 0;
2280
+ transition: opacity 160ms ease;
2281
+ }
2282
+ .providers.accordion > .provider-slot.is-expanded .provider-label {
2283
+ grid-template-columns: 1fr;
2284
+ transition: grid-template-columns 480ms cubic-bezier(0.22, 1, 0.36, 1);
2285
+ }
2286
+ .providers.accordion > .provider-slot.is-expanded .provider-label-text {
2287
+ opacity: 1;
2288
+ transition: opacity 240ms ease 320ms;
2289
+ }
2290
+ .oauth-last-used {
2291
+ position: absolute;
2292
+ inset: 0;
2293
+ z-index: 10;
2294
+ pointer-events: none;
2295
+ }
2296
+ .oauth-last-used-dot,
2297
+ .oauth-last-used-pill {
2298
+ position: absolute;
2299
+ transition: opacity 180ms ease;
2300
+ }
2301
+ .oauth-last-used-dot {
2302
+ top: -3px;
2303
+ inset-inline-end: -3px;
2304
+ width: 8px;
2305
+ height: 8px;
2306
+ border-radius: 999px;
2307
+ background: var(--authui-brand);
2308
+ box-shadow: 0 0 0 2px var(--authui-card);
2309
+ opacity: 1;
2310
+ }
2311
+ .oauth-last-used-pill {
2312
+ top: -8px;
2313
+ inset-inline-start: 6px;
2314
+ padding: 2px 6px;
2315
+ border-radius: 4px;
2316
+ border: 1px solid var(--authui-border);
2317
+ background: var(--authui-foreground);
2318
+ color: var(--authui-background);
2319
+ font-size: 10px;
2320
+ font-weight: 500;
2321
+ line-height: 1.2;
2322
+ white-space: nowrap;
2323
+ opacity: 0;
2324
+ }
2325
+ .providers.accordion > .provider-slot.is-expanded .oauth-last-used-dot {
2326
+ opacity: 0;
2327
+ }
2328
+ .providers.accordion > .provider-slot.is-expanded .oauth-last-used-pill {
2329
+ opacity: 1;
2330
+ }
2331
+ @media (prefers-reduced-motion: reduce) {
2332
+ .providers.accordion > .provider-slot,
2333
+ .provider-label,
2334
+ .provider-label-text,
2335
+ .oauth-last-used-dot,
2336
+ .oauth-last-used-pill {
2337
+ transition: none;
2338
+ }
2339
+ }
2230
2340
  .empty {
2231
2341
  padding: 24px 0;
2232
2342
  text-align: center;
2233
2343
  font-size: 13px;
2234
2344
  color: var(--authui-muted-foreground);
2235
2345
  }
2346
+ .empty-well {
2347
+ display: flex;
2348
+ flex-direction: column;
2349
+ align-items: center;
2350
+ text-align: center;
2351
+ padding: 28px 16px;
2352
+ border: 1px dashed var(--authui-border);
2353
+ border-radius: var(--authui-radius-xl);
2354
+ background: color-mix(in oklab, var(--authui-card) 50%, transparent);
2355
+ }
2356
+ .empty-icon {
2357
+ width: 48px;
2358
+ height: 48px;
2359
+ border-radius: 999px;
2360
+ background: var(--authui-muted);
2361
+ color: var(--authui-muted-foreground);
2362
+ display: inline-flex;
2363
+ align-items: center;
2364
+ justify-content: center;
2365
+ margin-bottom: 16px;
2366
+ }
2367
+ .empty-icon svg {
2368
+ width: 20px;
2369
+ height: 20px;
2370
+ }
2371
+ .empty-title {
2372
+ margin: 0 0 4px;
2373
+ font-size: 14px;
2374
+ font-weight: 500;
2375
+ color: var(--authui-foreground);
2376
+ }
2377
+ .empty-desc {
2378
+ margin: 0;
2379
+ font-size: 13px;
2380
+ color: var(--authui-muted-foreground);
2381
+ max-width: 280px;
2382
+ }
2236
2383
  .choice {
2237
2384
  display: flex;
2238
2385
  align-items: center;
@@ -2319,19 +2466,19 @@ const gt = new Tt(), vt = {
2319
2466
  }
2320
2467
  }
2321
2468
  `;
2322
- var Dt = Object.defineProperty, zt = (e, t, i, s) => {
2469
+ var zt = Object.defineProperty, _t = (e, t, i, s) => {
2323
2470
  for (var a = void 0, c = e.length - 1, u; c >= 0; c--)
2324
2471
  (u = e[c]) && (a = u(t, i, a) || a);
2325
- return a && Dt(t, i, a), a;
2472
+ return a && zt(t, i, a), a;
2326
2473
  }, M;
2327
2474
  const $t = (M = class extends rt {
2328
2475
  constructor() {
2329
- super(...arguments), this.auth = n.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (t) => t.stopPropagation();
2476
+ super(...arguments), this.auth = o.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (t) => t.stopPropagation();
2330
2477
  }
2331
2478
  connectedCallback() {
2332
2479
  super.connectedCallback();
2333
2480
  for (const t of M.KEY_EVENTS) this.addEventListener(t, this.stopKeys);
2334
- this.auth = n.getState(), this.unsubscribeStore = n.on("change", (t) => {
2481
+ this.auth = o.getState(), this.unsubscribeStore = o.on("change", (t) => {
2335
2482
  this.auth = t, this.applyBranding();
2336
2483
  }), this.unsubscribeTheme = gt.subscribe(() => this.applyBranding()), this.applyBranding();
2337
2484
  }
@@ -2341,14 +2488,14 @@ const $t = (M = class extends rt {
2341
2488
  this.unsubscribeStore?.(), this.unsubscribeTheme?.(), this.unsubscribeStore = null, this.unsubscribeTheme = null;
2342
2489
  }
2343
2490
  get strings() {
2344
- return n.getStrings();
2491
+ return o.getStrings();
2345
2492
  }
2346
2493
  /** Translate a string key with optional `{placeholders}`. */
2347
2494
  t(t, i) {
2348
2495
  return St(this.strings[t], i);
2349
2496
  }
2350
2497
  get config() {
2351
- return n.getConfig();
2498
+ return o.getConfig();
2352
2499
  }
2353
2500
  get productName() {
2354
2501
  return this.config?.branding?.name ?? "";
@@ -2365,17 +2512,17 @@ const $t = (M = class extends rt {
2365
2512
  fire(t, i) {
2366
2513
  this.dispatchEvent(new CustomEvent(t, { detail: i, bubbles: !0, composed: !0 }));
2367
2514
  }
2368
- }, M.styles = [Rt, _t], M.KEY_EVENTS = ["keydown", "keyup", "keypress"], M);
2369
- zt([
2515
+ }, M.styles = [Tt, Dt], M.KEY_EVENTS = ["keydown", "keyup", "keypress"], M);
2516
+ _t([
2370
2517
  d()
2371
2518
  ], $t.prototype, "auth");
2372
2519
  let E = $t;
2373
- var Lt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, y = (e, t, i, s) => {
2520
+ var Lt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, w = (e, t, i, s) => {
2374
2521
  for (var a = s > 1 ? void 0 : s ? Vt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
2375
2522
  (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
2376
2523
  return s && a && Lt(t, i, a), a;
2377
2524
  };
2378
- let b = class extends rt {
2525
+ let y = class extends rt {
2379
2526
  constructor() {
2380
2527
  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.preview = "";
2381
2528
  }
@@ -2388,12 +2535,12 @@ let b = class extends rt {
2388
2535
  configure() {
2389
2536
  if (!this.endpoint || !this.project) {
2390
2537
  queueMicrotask(() => {
2391
- (!this.endpoint || !this.project) && n.notifyConfigIncomplete();
2538
+ (!this.endpoint || !this.project) && o.notifyConfigIncomplete();
2392
2539
  });
2393
2540
  return;
2394
2541
  }
2395
- const e = this.toConfig(), t = n.getConfig();
2396
- t && JSON.stringify(t) === JSON.stringify(e) || n.configure(e);
2542
+ const e = this.toConfig(), t = o.getConfig();
2543
+ t && JSON.stringify(t) === JSON.stringify(e) || o.configure(e);
2397
2544
  }
2398
2545
  toConfig() {
2399
2546
  const e = { oauth: [] }, t = this.methods.split(/[\s,]+/).filter(Boolean);
@@ -2425,69 +2572,69 @@ let b = class extends rt {
2425
2572
  };
2426
2573
  }
2427
2574
  };
2428
- b.styles = O`
2575
+ y.styles = O`
2429
2576
  :host {
2430
2577
  display: none;
2431
2578
  }
2432
2579
  `;
2433
- y([
2580
+ w([
2434
2581
  g({ type: String })
2435
- ], b.prototype, "endpoint", 2);
2436
- y([
2582
+ ], y.prototype, "endpoint", 2);
2583
+ w([
2437
2584
  g({ type: String })
2438
- ], b.prototype, "project", 2);
2439
- y([
2585
+ ], y.prototype, "project", 2);
2586
+ w([
2440
2587
  g({ type: String, attribute: "redirect-url" })
2441
- ], b.prototype, "redirectUrl", 2);
2442
- y([
2588
+ ], y.prototype, "redirectUrl", 2);
2589
+ w([
2443
2590
  g({ type: String, attribute: "success-url" })
2444
- ], b.prototype, "successUrl", 2);
2445
- y([
2591
+ ], y.prototype, "successUrl", 2);
2592
+ w([
2446
2593
  g({ type: String })
2447
- ], b.prototype, "methods", 2);
2448
- y([
2594
+ ], y.prototype, "methods", 2);
2595
+ w([
2449
2596
  g({ type: String, attribute: "sign-up" })
2450
- ], b.prototype, "signUp", 2);
2451
- y([
2597
+ ], y.prototype, "signUp", 2);
2598
+ w([
2452
2599
  g({ type: String, attribute: "require-name" })
2453
- ], b.prototype, "requireName", 2);
2454
- y([
2600
+ ], y.prototype, "requireName", 2);
2601
+ w([
2455
2602
  g({ type: String })
2456
- ], b.prototype, "mfa", 2);
2457
- y([
2603
+ ], y.prototype, "mfa", 2);
2604
+ w([
2458
2605
  g({ type: String, attribute: "security-phrase" })
2459
- ], b.prototype, "securityPhrase", 2);
2460
- y([
2606
+ ], y.prototype, "securityPhrase", 2);
2607
+ w([
2461
2608
  g({ type: String })
2462
- ], b.prototype, "name", 2);
2463
- y([
2609
+ ], y.prototype, "name", 2);
2610
+ w([
2464
2611
  g({ type: String })
2465
- ], b.prototype, "logo", 2);
2466
- y([
2612
+ ], y.prototype, "logo", 2);
2613
+ w([
2467
2614
  g({ type: String })
2468
- ], b.prototype, "theme", 2);
2469
- y([
2615
+ ], y.prototype, "theme", 2);
2616
+ w([
2470
2617
  g({ type: String })
2471
- ], b.prototype, "radius", 2);
2472
- y([
2618
+ ], y.prototype, "radius", 2);
2619
+ w([
2473
2620
  g({ type: String })
2474
- ], b.prototype, "primary", 2);
2475
- y([
2621
+ ], y.prototype, "primary", 2);
2622
+ w([
2476
2623
  g({ type: String, attribute: "primary-foreground" })
2477
- ], b.prototype, "primaryForeground", 2);
2478
- y([
2624
+ ], y.prototype, "primaryForeground", 2);
2625
+ w([
2479
2626
  g({ type: String, attribute: "terms-url" })
2480
- ], b.prototype, "termsUrl", 2);
2481
- y([
2627
+ ], y.prototype, "termsUrl", 2);
2628
+ w([
2482
2629
  g({ type: String, attribute: "privacy-url" })
2483
- ], b.prototype, "privacyUrl", 2);
2484
- y([
2630
+ ], y.prototype, "privacyUrl", 2);
2631
+ w([
2485
2632
  g({ type: String })
2486
- ], b.prototype, "preview", 2);
2487
- b = y([
2488
- R("authui-config")
2489
- ], b);
2490
- var qt = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, Z = (e, t, i, s) => {
2633
+ ], y.prototype, "preview", 2);
2634
+ y = w([
2635
+ T("authui-config")
2636
+ ], y);
2637
+ var qt = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, X = (e, t, i, s) => {
2491
2638
  for (var a = s > 1 ? void 0 : s ? Nt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
2492
2639
  (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
2493
2640
  return s && a && qt(t, i, a), a;
@@ -2513,43 +2660,43 @@ function Bt() {
2513
2660
  }
2514
2661
  Bt();
2515
2662
  const Ht = ["loading", "signed-out", "signed-in", "mfa-required"];
2516
- function Q(e) {
2663
+ function J(e) {
2517
2664
  return e ? e.split(/[\s,]+/).map((t) => t.trim()).filter((t) => Ht.includes(t)) : [];
2518
2665
  }
2519
- let B = class extends rt {
2666
+ let N = class extends rt {
2520
2667
  constructor() {
2521
- super(...arguments), this.when = "", this.unless = "", this.status = n.getState().status, this.unsubscribe = null;
2668
+ super(...arguments), this.when = "", this.unless = "", this.status = o.getState().status, this.unsubscribe = null;
2522
2669
  }
2523
2670
  connectedCallback() {
2524
- super.connectedCallback(), this.status = n.getState().status, this.unsubscribe = n.on("change", (e) => this.status = e.status);
2671
+ super.connectedCallback(), this.status = o.getState().status, this.unsubscribe = o.on("change", (e) => this.status = e.status);
2525
2672
  }
2526
2673
  disconnectedCallback() {
2527
2674
  super.disconnectedCallback(), this.unsubscribe?.(), this.unsubscribe = null;
2528
2675
  }
2529
2676
  /** Whether the current status satisfies `when` and `unless`. */
2530
2677
  get visible() {
2531
- const e = Q(this.when), t = Q(this.unless);
2678
+ const e = J(this.when), t = J(this.unless);
2532
2679
  return !(this.status === "loading" && !e.includes("loading") || e.length > 0 && !e.includes(this.status) || t.includes(this.status));
2533
2680
  }
2534
2681
  updated() {
2535
- (this.status !== "loading" || Q(this.when).includes("loading")) && (this.setAttribute("ready", ""), this.style.display = "contents");
2682
+ (this.status !== "loading" || J(this.when).includes("loading")) && (this.setAttribute("ready", ""), this.style.display = "contents");
2536
2683
  }
2537
2684
  render() {
2538
- return this.visible ? r`<slot></slot>` : o;
2685
+ return this.visible ? r`<slot></slot>` : n;
2539
2686
  }
2540
2687
  };
2541
- Z([
2688
+ X([
2542
2689
  g({ type: String })
2543
- ], B.prototype, "when", 2);
2544
- Z([
2690
+ ], N.prototype, "when", 2);
2691
+ X([
2545
2692
  g({ type: String })
2546
- ], B.prototype, "unless", 2);
2547
- Z([
2693
+ ], N.prototype, "unless", 2);
2694
+ X([
2548
2695
  d()
2549
- ], B.prototype, "status", 2);
2550
- B = Z([
2551
- R("authui-show")
2552
- ], B);
2696
+ ], N.prototype, "status", 2);
2697
+ N = X([
2698
+ T("authui-show")
2699
+ ], N);
2553
2700
  const jt = O`
2554
2701
  :host {
2555
2702
  display: block;
@@ -2697,70 +2844,70 @@ const jt = O`
2697
2844
  qr: v(
2698
2845
  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"/>`
2699
2846
  )
2700
- }, w = (e, t = "0 0 24 24") => r`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${t} aria-hidden="true">${e}</svg>`, Wt = {
2701
- google: w(
2847
+ }, x = (e, t = "0 0 24 24") => r`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${t} aria-hidden="true">${e}</svg>`, Wt = {
2848
+ google: x(
2702
2849
  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"/>`
2703
2850
  ),
2704
- github: w(
2851
+ github: x(
2705
2852
  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"/>`
2706
2853
  ),
2707
- apple: w(
2854
+ apple: x(
2708
2855
  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"/>`
2709
2856
  ),
2710
- facebook: w(
2857
+ facebook: x(
2711
2858
  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"/>`
2712
2859
  ),
2713
- x: w(
2860
+ x: x(
2714
2861
  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"/>`
2715
2862
  ),
2716
- microsoft: w(
2863
+ microsoft: x(
2717
2864
  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"/>`
2718
2865
  ),
2719
- discord: w(
2866
+ discord: x(
2720
2867
  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"/>`
2721
2868
  ),
2722
- gitlab: w(
2869
+ gitlab: x(
2723
2870
  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"/>`
2724
2871
  ),
2725
- linkedin: w(
2872
+ linkedin: x(
2726
2873
  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"/>`
2727
2874
  ),
2728
- slack: w(
2875
+ slack: x(
2729
2876
  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"/>`
2730
2877
  ),
2731
- twitch: w(
2878
+ twitch: x(
2732
2879
  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"/>`
2733
2880
  ),
2734
- spotify: w(
2881
+ spotify: x(
2735
2882
  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"/>`
2736
2883
  ),
2737
- notion: w(
2884
+ notion: x(
2738
2885
  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"/>`
2739
2886
  ),
2740
- dropbox: w(
2887
+ dropbox: x(
2741
2888
  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"/>`
2742
2889
  ),
2743
- figma: w(
2890
+ figma: x(
2744
2891
  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"/>`
2745
2892
  ),
2746
- bitbucket: w(
2893
+ bitbucket: x(
2747
2894
  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"/>`
2748
2895
  ),
2749
- amazon: w(
2896
+ amazon: x(
2750
2897
  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"/>`
2751
2898
  ),
2752
- paypal: w(
2899
+ paypal: x(
2753
2900
  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"/>`
2754
2901
  )
2755
2902
  };
2756
- function et(e) {
2903
+ function Y(e) {
2757
2904
  return Wt[e] ?? l.globe;
2758
2905
  }
2759
2906
  function nt(e) {
2760
2907
  const t = (e.trim()[0] ?? "?").toUpperCase();
2761
2908
  return /[A-Z0-9]/i.test(t) ? t : l.user;
2762
2909
  }
2763
- function Y(e) {
2910
+ function Z(e) {
2764
2911
  typeof document > "u" || (document.querySelector("authui-modal") || document.body.appendChild(document.createElement("authui-modal")), queueMicrotask(() => {
2765
2912
  window.dispatchEvent(new CustomEvent("authui:open", { detail: { view: e } }));
2766
2913
  }));
@@ -2791,21 +2938,21 @@ var Kt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, C = (e, t,
2791
2938
  };
2792
2939
  let k = class extends E {
2793
2940
  constructor() {
2794
- 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.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.onSignIn = (e) => {
2941
+ 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.onSignIn = (e) => {
2795
2942
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
2796
- await n.signInWithEmailPassword(this.email, this.password), this.password = "", V("email-password"), this.fire("authui-success", { method: "email-password" });
2943
+ await o.signInWithEmailPassword(this.email, this.password), this.password = "", V("email-password"), this.fire("authui-success", { method: "email-password" });
2797
2944
  });
2798
2945
  }, this.onSignUp = (e) => {
2799
2946
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
2800
- await n.signUp(this.email, this.password, this.name), this.password = "", V("email-password"), this.fire("authui-success", { method: "sign-up" });
2947
+ await o.signUp(this.email, this.password, this.name), this.password = "", V("email-password"), this.fire("authui-success", { method: "sign-up" });
2801
2948
  });
2802
2949
  }, this.onGuest = () => {
2803
2950
  this.run(async () => {
2804
- await n.signInAnonymously(), V("anonymous"), this.fire("authui-success", { method: "anonymous" });
2951
+ await o.signInAnonymously(), V("anonymous"), this.fire("authui-success", { method: "anonymous" });
2805
2952
  });
2806
2953
  }, this.onOAuth = (e) => {
2807
2954
  this.run(async () => {
2808
- if (Ot(e), await n.signInWithOAuth(e), n.isPreview) {
2955
+ if (Ot(e), await o.signInWithOAuth(e), o.isPreview) {
2809
2956
  wt(), this.fire("authui-success", { method: "oauth" });
2810
2957
  return;
2811
2958
  }
@@ -2813,7 +2960,7 @@ let k = class extends E {
2813
2960
  });
2814
2961
  }, this.onForgot = (e) => {
2815
2962
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
2816
- await n.sendPasswordRecovery(this.email), this.notice = { tone: "success", message: this.t("resetLinkSent", { email: this.email }) };
2963
+ await o.sendPasswordRecovery(this.email), this.notice = { tone: "success", message: this.t("resetLinkSent", { email: this.email }) };
2817
2964
  });
2818
2965
  }, this.onReset = (e) => {
2819
2966
  if (e.preventDefault(), !this.requireValid(e)) return;
@@ -2823,11 +2970,11 @@ let k = class extends E {
2823
2970
  }
2824
2971
  const t = this.recovery;
2825
2972
  t && this.run(async () => {
2826
- await n.completePasswordRecovery(t.userId, t.secret, this.password), this.password = "", this.passwordConfirm = "", this.recovery = null, this.auth.pending?.type === "reset-password" && n.setPending(null), this.go("sign-in"), this.notice = { tone: "success", message: this.t("passwordUpdated") };
2973
+ await o.completePasswordRecovery(t.userId, t.secret, this.password), this.password = "", this.passwordConfirm = "", this.recovery = null, this.auth.pending?.type === "reset-password" && o.setPending(null), this.go("sign-in"), this.notice = { tone: "success", message: this.t("passwordUpdated") };
2827
2974
  });
2828
2975
  }, this.onMagicUrl = (e) => {
2829
2976
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
2830
- const t = await n.sendMagicUrl(this.email);
2977
+ const t = await o.sendMagicUrl(this.email);
2831
2978
  this.token = {
2832
2979
  userId: t.userId,
2833
2980
  kind: "magic-url",
@@ -2837,7 +2984,7 @@ let k = class extends E {
2837
2984
  });
2838
2985
  }, this.onEmailOtp = (e) => {
2839
2986
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
2840
- const t = await n.sendEmailOtp(this.email);
2987
+ const t = await o.sendEmailOtp(this.email);
2841
2988
  this.token = {
2842
2989
  userId: t.userId,
2843
2990
  kind: "email-otp",
@@ -2847,37 +2994,37 @@ let k = class extends E {
2847
2994
  });
2848
2995
  }, this.onPhoneOtp = (e) => {
2849
2996
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
2850
- const t = await n.sendPhoneOtp(this.phone);
2997
+ const t = await o.sendPhoneOtp(this.phone);
2851
2998
  this.token = { userId: t.userId, kind: "phone", target: this.phone }, this.code = "";
2852
2999
  });
2853
3000
  }, this.onVerifyCode = (e) => {
2854
3001
  if (e.preventDefault(), !this.requireValid(e)) return;
2855
3002
  const t = this.token;
2856
3003
  t && this.run(async () => {
2857
- await n.signInWithToken(t.userId, this.code), this.code = "", this.token = null, V(t.kind), this.fire("authui-success", { method: t.kind });
3004
+ await o.signInWithToken(t.userId, this.code), this.code = "", this.token = null, V(t.kind), this.fire("authui-success", { method: t.kind });
2858
3005
  }, "code");
2859
3006
  }, this.onChooseFactor = (e) => {
2860
3007
  this.run(async () => {
2861
- const t = await n.createMfaChallenge(e);
3008
+ const t = await o.createMfaChallenge(e);
2862
3009
  this.challenge = { id: t.$id, factor: e }, this.code = "";
2863
3010
  });
2864
3011
  }, this.onVerifyFactor = (e) => {
2865
3012
  if (e.preventDefault(), !this.requireValid(e)) return;
2866
3013
  const t = this.challenge;
2867
3014
  t && this.run(async () => {
2868
- await n.completeMfaChallenge(t.id, this.code), this.code = "", this.challenge = null, this.go("sign-in"), this.fire("authui-success", { method: "mfa" });
3015
+ await o.completeMfaChallenge(t.id, this.code), this.code = "", this.challenge = null, this.go("sign-in"), this.fire("authui-success", { method: "mfa" });
2869
3016
  }, "code");
2870
3017
  }, this.onCancelMfa = () => {
2871
3018
  this.run(async () => {
2872
3019
  try {
2873
- await n.signOut();
3020
+ await o.signOut();
2874
3021
  } catch (e) {
2875
- if (!N(e, f.sessionNotFound)) throw e;
3022
+ if (!q(e, f.sessionNotFound)) throw e;
2876
3023
  }
2877
3024
  this.go("sign-in");
2878
3025
  });
2879
3026
  }, this.onSignOut = () => {
2880
- this.run(() => n.signOut());
3027
+ this.run(() => o.signOut());
2881
3028
  };
2882
3029
  }
2883
3030
  connectedCallback() {
@@ -2901,7 +3048,7 @@ let k = class extends E {
2901
3048
  }
2902
3049
  /** Navigate between screens and reset transient state. */
2903
3050
  dismissNotice() {
2904
- this.notice = null, this.auth.pending?.type === "notice" && n.setPending(null);
3051
+ this.notice = null, this.auth.pending?.type === "notice" && o.setPending(null);
2905
3052
  }
2906
3053
  go(e) {
2907
3054
  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 = "", e !== "mfa" && (this.challenge = null), e !== "email-otp" && e !== "phone" && e !== "magic-url" && (this.token = null), this.fire("authui-view", { view: e });
@@ -2945,7 +3092,7 @@ let k = class extends E {
2945
3092
  >
2946
3093
  ${l.x}
2947
3094
  </button>
2948
- </div>` : o}
3095
+ </div>` : n}
2949
3096
  ${e}
2950
3097
  </div>
2951
3098
  `;
@@ -2987,10 +3134,10 @@ let k = class extends E {
2987
3134
  @error=${(a) => {
2988
3135
  a.target.hidden = !0;
2989
3136
  }}
2990
- />` : o}
2991
- ${n.isPreview ? r`<span class="badge badge-info preview">${this.t("preview")}</span>` : o}
3137
+ />` : n}
3138
+ ${o.isPreview ? r`<span class="badge badge-info preview">${this.t("preview")}</span>` : n}
2992
3139
  <h2 class="title" id="authui-title">${i}</h2>
2993
- ${s ? r`<p class="description">${s}</p>` : o}
3140
+ ${s ? r`<p class="description">${s}</p>` : n}
2994
3141
  </div>
2995
3142
  `;
2996
3143
  }
@@ -2998,27 +3145,27 @@ let k = class extends E {
2998
3145
  return this.error ? r`<div class="alert alert-error" role="alert">
2999
3146
  ${l.alert}
3000
3147
  <div class="alert-body">${this.error}</div>
3001
- </div>` : o;
3148
+ </div>` : n;
3002
3149
  }
3003
3150
  submitButton(e, t = "btn-primary") {
3004
3151
  return r`<button class="btn ${t} btn-block" type="submit" ?disabled=${this.busy}>
3005
- ${this.busy ? r`<span class="spinner" aria-hidden="true"></span>` : o} ${e}
3152
+ ${this.busy ? r`<span class="spinner" aria-hidden="true"></span>` : n} ${e}
3006
3153
  </button>`;
3007
3154
  }
3008
3155
  passwordField(e) {
3009
3156
  const t = this[e.field], i = e.meter ? it(t) : null;
3010
3157
  return r`
3011
3158
  <div class="field">
3012
- <label class="label" for=${e.id}>
3013
- ${e.label}
3159
+ <div class="field-header">
3160
+ <label class="label" for=${e.id}>${e.label}</label>
3014
3161
  ${e.forgot ? r`<button
3015
3162
  type="button"
3016
3163
  class="btn btn-link small"
3017
3164
  @click=${() => this.go("forgot-password")}
3018
3165
  >
3019
3166
  ${this.t("forgotPassword")}
3020
- </button>` : o}
3021
- </label>
3167
+ </button>` : n}
3168
+ </div>
3022
3169
  <div class="input-wrap">
3023
3170
  <input
3024
3171
  class="input"
@@ -3035,7 +3182,6 @@ let k = class extends E {
3035
3182
  class="btn btn-ghost btn-icon"
3036
3183
  @click=${() => this.showPassword = !this.showPassword}
3037
3184
  aria-label=${this.showPassword ? this.t("hidePassword") : this.t("showPassword")}
3038
- tabindex="-1"
3039
3185
  >
3040
3186
  ${this.showPassword ? l.eyeOff : l.eye}
3041
3187
  </button>
@@ -3054,7 +3200,7 @@ let k = class extends E {
3054
3200
  <span></span><span></span><span></span><span></span>
3055
3201
  </div>
3056
3202
  <p class="strength-label">${this.t(i.labelKey)}</p>
3057
- </div>` : e.hint ? r`<p class="hint">${e.hint}</p>` : o}
3203
+ </div>` : e.hint ? r`<p class="hint">${e.hint}</p>` : n}
3058
3204
  </div>
3059
3205
  `;
3060
3206
  }
@@ -3096,11 +3242,11 @@ let k = class extends E {
3096
3242
  }
3097
3243
  legal() {
3098
3244
  const e = this.config?.legal;
3099
- return !e?.termsUrl && !e?.privacyUrl ? o : r`<p class="legal">
3245
+ return !e?.termsUrl && !e?.privacyUrl ? n : r`<p class="legal">
3100
3246
  ${this.t("agreeTo")}
3101
- ${e.termsUrl ? r`<a href=${e.termsUrl} target="_blank" rel="noopener">${this.t("terms")}</a>` : o}
3102
- ${e.termsUrl && e.privacyUrl ? r` ${this.t("and")} ` : o}
3103
- ${e.privacyUrl ? r`<a href=${e.privacyUrl} target="_blank" rel="noopener">${this.t("privacy")}</a>` : o}.
3247
+ ${e.termsUrl ? r`<a href=${e.termsUrl} target="_blank" rel="noopener">${this.t("terms")}</a>` : n}
3248
+ ${e.termsUrl && e.privacyUrl ? r` ${this.t("and")} ` : n}
3249
+ ${e.privacyUrl ? r`<a href=${e.privacyUrl} target="_blank" rel="noopener">${this.t("privacy")}</a>` : n}.
3104
3250
  </p>`;
3105
3251
  }
3106
3252
  backLink(e = "sign-in") {
@@ -3152,7 +3298,7 @@ let k = class extends E {
3152
3298
  <span class="avatar">${nt(t)}</span>
3153
3299
  <div class="row-main">
3154
3300
  <span class="row-title" title=${t}>${t}</span>
3155
- ${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : o}
3301
+ ${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : n}
3156
3302
  </div>
3157
3303
  </div>
3158
3304
  </div>
@@ -3160,11 +3306,11 @@ let k = class extends E {
3160
3306
  <div class="stack-sm">
3161
3307
  ${this.config?.successUrl ? r`<a class="btn btn-primary btn-block" href=${this.config.successUrl}
3162
3308
  >${this.t("continue")}</a
3163
- >` : o}
3309
+ >` : n}
3164
3310
  <button
3165
3311
  class="btn btn-outline btn-block"
3166
3312
  @click=${() => {
3167
- this.embedded ? this.fire("authui-open", { view: "account" }) : Y("account");
3313
+ this.embedded ? this.fire("authui-open", { view: "account" }) : Z("account");
3168
3314
  }}
3169
3315
  >
3170
3316
  ${l.settings} ${this.t("manageAccount")}
@@ -3178,30 +3324,68 @@ let k = class extends E {
3178
3324
  }
3179
3325
  renderProviders() {
3180
3326
  const e = [...this.config?.methods?.oauth ?? []];
3181
- if (e.length === 0) return o;
3182
- const t = D();
3183
- e.sort((s, a) => {
3184
- const c = t === `oauth:${s}` ? 0 : 1, u = t === `oauth:${a}` ? 0 : 1;
3185
- return c - u;
3186
- });
3187
- const i = e.length > 2;
3327
+ if (e.length === 0) return n;
3328
+ const t = z(), i = e.find((a) => t === `oauth:${a}`) ?? null;
3329
+ if (e.length <= 2) {
3330
+ const a = [...e].sort((c, u) => {
3331
+ const b = t === `oauth:${c}` ? 0 : 1, $ = t === `oauth:${u}` ? 0 : 1;
3332
+ return b - $;
3333
+ });
3334
+ return r`
3335
+ <div class="providers">
3336
+ ${a.map((c) => {
3337
+ const u = t === `oauth:${c}`, b = this.t("continueWith", { provider: W(c) });
3338
+ return r`<button
3339
+ type="button"
3340
+ class="btn btn-outline ${u ? "last-used" : ""}"
3341
+ @click=${() => this.onOAuth(c)}
3342
+ ?disabled=${this.busy}
3343
+ aria-label=${u ? `${b}. ${this.t("lastUsed")}` : b}
3344
+ >
3345
+ ${Y(c)}
3346
+ <span>${b}</span>
3347
+ ${u ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : n}
3348
+ </button>`;
3349
+ })}
3350
+ </div>
3351
+ `;
3352
+ }
3353
+ const s = this.expandedOAuth && e.includes(this.expandedOAuth) ? this.expandedOAuth : i ?? e[0];
3188
3354
  return r`
3189
- <div class="providers ${i ? "two" : ""}">
3190
- ${e.map((s) => {
3191
- const a = t === `oauth:${s}`;
3192
- return r`<button
3193
- type="button"
3194
- class="btn btn-outline ${a ? "last-used" : ""}"
3195
- @click=${() => this.onOAuth(s)}
3196
- ?disabled=${this.busy}
3197
- aria-label=${this.t("continueWith", { provider: q(s) })}
3355
+ <div
3356
+ class="providers accordion"
3357
+ @mouseleave=${() => {
3358
+ this.expandedOAuth = i ?? e[0];
3359
+ }}
3360
+ >
3361
+ ${e.map((a) => {
3362
+ const c = t === `oauth:${a}`, u = s === a, b = this.t("continueWith", { provider: W(a) });
3363
+ return r`<div
3364
+ class="provider-slot ${u ? "is-expanded" : ""}"
3365
+ @mouseenter=${() => {
3366
+ this.expandedOAuth = a;
3367
+ }}
3198
3368
  >
3199
- ${et(s)}
3200
- <span
3201
- >${i ? q(s) : this.t("continueWith", { provider: q(s) })}</span
3369
+ <button
3370
+ type="button"
3371
+ class="btn btn-outline"
3372
+ @click=${() => this.onOAuth(a)}
3373
+ @focus=${() => {
3374
+ this.expandedOAuth = a;
3375
+ }}
3376
+ ?disabled=${this.busy}
3377
+ aria-label=${c ? `${b}. ${this.t("lastUsed")}` : b}
3202
3378
  >
3203
- ${a ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : o}
3204
- </button>`;
3379
+ ${Y(a)}
3380
+ <span class="provider-label"
3381
+ ><span><span class="provider-label-text">${b}</span></span></span
3382
+ >
3383
+ ${c ? r`<span class="oauth-last-used" data-last-used=${a} aria-hidden="true">
3384
+ <span class="oauth-last-used-dot"></span>
3385
+ <span class="oauth-last-used-pill">${this.t("lastUsed")}</span>
3386
+ </span>` : n}
3387
+ </button>
3388
+ </div>`;
3205
3389
  })}
3206
3390
  </div>
3207
3391
  `;
@@ -3215,47 +3399,47 @@ let k = class extends E {
3215
3399
  return r`
3216
3400
  <div class="stack">
3217
3401
  ${this.renderProviders()}
3218
- ${i && (t || s.length > 0) ? r`<div class="separator-text">${this.t("or")}</div>` : o}
3402
+ ${i && (t || s.length > 0) ? r`<div class="separator-text">${this.t("or")}</div>` : n}
3219
3403
  ${t ? r`<form
3220
- class="form ${D() === "email-password" ? "last-used-form" : ""}"
3404
+ class="form ${z() === "email-password" ? "last-used-form" : ""}"
3221
3405
  @submit=${this.onSignIn}
3222
3406
  novalidate
3223
3407
  >
3224
- ${D() === "email-password" ? r`<p class="hint">
3408
+ ${z() === "email-password" ? r`<p class="hint">
3225
3409
  <span class="last-used-badge">${this.t("lastUsed")}</span>
3226
- </p>` : o}
3410
+ </p>` : n}
3227
3411
  ${this.emailField()}
3228
3412
  ${this.passwordField({ label: this.t("password"), autocomplete: "current-password", id: "authui-password", field: "password", forgot: !0 })}
3229
3413
  ${this.renderError()} ${this.submitButton(this.t("signIn"))}
3230
3414
  </form>` : this.renderError()}
3231
3415
  ${s.length > 0 ? r`<div class="stack-sm">
3232
3416
  ${s.map((a) => {
3233
- const c = D() === a.step;
3417
+ const c = z() === a.step;
3234
3418
  return r`<button
3235
3419
  type="button"
3236
3420
  class="btn btn-secondary btn-block ${c ? "last-used" : ""}"
3237
3421
  @click=${() => this.go(a.step)}
3238
3422
  >
3239
3423
  ${a.icon} ${a.label}
3240
- ${c ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : o}
3424
+ ${c ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : n}
3241
3425
  </button>`;
3242
3426
  })}
3243
- </div>` : o}
3427
+ </div>` : n}
3244
3428
  ${e.anonymous ? r`<button
3245
3429
  type="button"
3246
- class="btn btn-ghost btn-block ${D() === "anonymous" ? "last-used" : ""}"
3430
+ class="btn btn-ghost btn-block ${z() === "anonymous" ? "last-used" : ""}"
3247
3431
  @click=${this.onGuest}
3248
3432
  ?disabled=${this.busy}
3249
3433
  >
3250
3434
  ${l.ghost} ${this.t("continueAsGuest")}
3251
- ${D() === "anonymous" ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : o}
3252
- </button>` : o}
3435
+ ${z() === "anonymous" ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : n}
3436
+ </button>` : n}
3253
3437
  ${t && this.config?.signUp !== !1 ? r`<div class="links">
3254
3438
  <span>${this.t("noAccount")}</span>
3255
3439
  <button type="button" class="btn btn-link" @click=${() => this.go("sign-up")}>
3256
3440
  ${this.t("signUp")}
3257
3441
  </button>
3258
- </div>` : o}
3442
+ </div>` : n}
3259
3443
  ${this.legal()}
3260
3444
  </div>
3261
3445
  `;
@@ -3264,7 +3448,7 @@ let k = class extends E {
3264
3448
  return r`
3265
3449
  <div class="stack">
3266
3450
  ${this.renderProviders()}
3267
- ${(this.config?.methods?.oauth?.length ?? 0) > 0 ? r`<div class="separator-text">${this.t("or")}</div>` : o}
3451
+ ${(this.config?.methods?.oauth?.length ?? 0) > 0 ? r`<div class="separator-text">${this.t("or")}</div>` : n}
3268
3452
  <form class="form" @submit=${this.onSignUp} novalidate>
3269
3453
  ${this.config?.requireName !== !1 ? r`<div class="field">
3270
3454
  <label class="label" for="authui-name">${this.t("name")}</label>
@@ -3277,7 +3461,7 @@ let k = class extends E {
3277
3461
  .value=${this.name}
3278
3462
  @input=${this.bind("name")}
3279
3463
  />
3280
- </div>` : o}
3464
+ </div>` : n}
3281
3465
  ${this.emailField()}
3282
3466
  ${this.passwordField({ label: this.t("password"), autocomplete: "new-password", id: "authui-password", field: "password", hint: this.t("passwordHint"), meter: !0 })}
3283
3467
  ${this.renderError()} ${this.submitButton(this.t("createAccount"))}
@@ -3347,7 +3531,7 @@ let k = class extends E {
3347
3531
  ${this.t("securityPhrase")}: <span class="code">${e}</span>
3348
3532
  </div>
3349
3533
  <div class="alert-body">${this.t("securityPhraseHint")}</div>
3350
- </div>` : o;
3534
+ </div>` : n;
3351
3535
  }
3352
3536
  renderMagicUrl() {
3353
3537
  return this.token ? r`<div class="stack">
@@ -3369,10 +3553,10 @@ let k = class extends E {
3369
3553
  const e = this.token;
3370
3554
  !e || Date.now() < this.resendCooldownUntil || (this.error = "", await this.run(async () => {
3371
3555
  if (e.kind === "phone") {
3372
- const t = await n.sendPhoneOtp(e.target);
3556
+ const t = await o.sendPhoneOtp(e.target);
3373
3557
  this.token = { userId: t.userId, kind: "phone", target: e.target };
3374
3558
  } else {
3375
- const t = await n.sendEmailOtp(e.target);
3559
+ const t = await o.sendEmailOtp(e.target);
3376
3560
  this.token = {
3377
3561
  userId: t.userId,
3378
3562
  kind: "email-otp",
@@ -3556,6 +3740,9 @@ C([
3556
3740
  C([
3557
3741
  d()
3558
3742
  ], k.prototype, "showPassword", 2);
3743
+ C([
3744
+ d()
3745
+ ], k.prototype, "expandedOAuth", 2);
3559
3746
  C([
3560
3747
  d()
3561
3748
  ], k.prototype, "token", 2);
@@ -3572,7 +3759,7 @@ C([
3572
3759
  st("form input:not([type=hidden])")
3573
3760
  ], k.prototype, "firstInput", 2);
3574
3761
  k = C([
3575
- R("authui-sign-in")
3762
+ T("authui-sign-in")
3576
3763
  ], k);
3577
3764
  var Yt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, m = (e, t, i, s) => {
3578
3765
  for (var a = s > 1 ? void 0 : s ? Zt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
@@ -3596,12 +3783,12 @@ let p = class extends E {
3596
3783
  const a = t[s].id.replace("authui-tab-", "");
3597
3784
  this.select(a), requestAnimationFrame(() => t[s]?.focus());
3598
3785
  }, this.noticeTimer = null, this.factorsLoading = !1, this.onUpdateName = (e) => {
3599
- e.preventDefault(), this.requireValid(e) && this.run("name", () => n.updateName(this.nameInput), this.t("nameUpdated"));
3786
+ e.preventDefault(), this.requireValid(e) && this.run("name", () => o.updateName(this.nameInput), this.t("nameUpdated"));
3600
3787
  }, this.onUpdateEmail = (e) => {
3601
3788
  e.preventDefault(), this.requireValid(e) && this.run(
3602
3789
  "email",
3603
3790
  async () => {
3604
- await n.updateEmail(this.emailInput, this.emailPassword), this.emailPassword = "";
3791
+ await o.updateEmail(this.emailInput, this.emailPassword), this.emailPassword = "";
3605
3792
  },
3606
3793
  this.t("emailUpdated")
3607
3794
  );
@@ -3609,7 +3796,7 @@ let p = class extends E {
3609
3796
  e.preventDefault(), this.requireValid(e) && this.run(
3610
3797
  "phone",
3611
3798
  async () => {
3612
- await n.updatePhone(this.phoneInput, this.phonePassword), this.phonePassword = "";
3799
+ await o.updatePhone(this.phoneInput, this.phonePassword), this.phonePassword = "";
3613
3800
  },
3614
3801
  this.t("phoneUpdated")
3615
3802
  );
@@ -3617,7 +3804,7 @@ let p = class extends E {
3617
3804
  e.preventDefault(), this.requireValid(e) && this.run(
3618
3805
  "guest",
3619
3806
  async () => {
3620
- await n.convertGuest(this.emailInput, this.emailPassword, this.guestName), this.emailPassword = "";
3807
+ await o.convertGuest(this.emailInput, this.emailPassword, this.guestName), this.emailPassword = "";
3621
3808
  },
3622
3809
  this.t("accountConverted")
3623
3810
  );
@@ -3625,19 +3812,19 @@ let p = class extends E {
3625
3812
  Date.now() < this.verifyEmailCooldownUntil || this.run(
3626
3813
  "verify",
3627
3814
  async () => {
3628
- await n.sendEmailVerification(), this.startVerifyEmailCooldown();
3815
+ await o.sendEmailVerification(), this.startVerifyEmailCooldown();
3629
3816
  },
3630
3817
  this.t("verificationSent")
3631
3818
  );
3632
3819
  }, this.onSendPhoneVerification = () => {
3633
3820
  this.run("verify-phone", async () => {
3634
- await n.sendPhoneVerification(), this.phoneCodeSent = !0;
3821
+ await o.sendPhoneVerification(), this.phoneCodeSent = !0;
3635
3822
  });
3636
3823
  }, this.onConfirmPhoneVerification = (e) => {
3637
3824
  e.preventDefault(), this.requireValid(e) && this.run(
3638
3825
  "verify-phone-code",
3639
3826
  async () => {
3640
- await n.confirmPhoneVerification(this.phoneCode), this.phoneCode = "", this.phoneCodeSent = !1;
3827
+ await o.confirmPhoneVerification(this.phoneCode), this.phoneCode = "", this.phoneCodeSent = !1;
3641
3828
  },
3642
3829
  this.t("phoneVerified")
3643
3830
  );
@@ -3650,7 +3837,7 @@ let p = class extends E {
3650
3837
  this.run(
3651
3838
  "password",
3652
3839
  async () => {
3653
- await n.updatePassword(this.newPassword, this.oldPassword), this.oldPassword = this.newPassword = this.newPasswordConfirm = "";
3840
+ await o.updatePassword(this.newPassword, this.oldPassword), this.oldPassword = this.newPassword = this.newPasswordConfirm = "";
3654
3841
  },
3655
3842
  this.t("passwordChanged")
3656
3843
  );
@@ -3658,17 +3845,17 @@ let p = class extends E {
3658
3845
  }, this.onToggleMfa = () => {
3659
3846
  const e = !this.user?.mfa;
3660
3847
  this.run("mfa", async () => {
3661
- await n.setMfaEnabled(e), await this.loadFactors();
3848
+ await o.setMfaEnabled(e), await this.loadFactors();
3662
3849
  });
3663
3850
  }, this.onAddAuthenticator = () => {
3664
3851
  this.run("authenticator", async () => {
3665
- this.authenticator = await n.addAuthenticator(), this.authenticatorCode = "";
3852
+ this.authenticator = await o.addAuthenticator(), this.authenticatorCode = "";
3666
3853
  });
3667
3854
  }, this.onVerifyAuthenticator = (e) => {
3668
3855
  e.preventDefault(), this.requireValid(e) && this.run(
3669
3856
  "authenticator-code",
3670
3857
  async () => {
3671
- await n.verifyAuthenticator(this.authenticatorCode), this.authenticator = null, this.authenticatorCode = "", await this.loadFactors();
3858
+ await o.verifyAuthenticator(this.authenticatorCode), this.authenticator = null, this.authenticatorCode = "", await this.loadFactors();
3672
3859
  },
3673
3860
  this.t("authenticatorAdded")
3674
3861
  );
@@ -3678,15 +3865,15 @@ let p = class extends E {
3678
3865
  return;
3679
3866
  }
3680
3867
  this.confirmRemoveAuthenticator = !1, this.run("remove-authenticator", async () => {
3681
- await n.removeAuthenticator(), await this.loadFactors();
3868
+ await o.removeAuthenticator(), await this.loadFactors();
3682
3869
  });
3683
3870
  }, this.onRecoveryCodes = () => {
3684
3871
  this.run("recovery", async () => {
3685
3872
  try {
3686
- this.recoveryCodes = await n.createRecoveryCodes();
3873
+ this.recoveryCodes = await o.createRecoveryCodes();
3687
3874
  } catch (e) {
3688
- if (!N(e, f.recoveryCodesExist)) throw e;
3689
- this.recoveryCodes = await n.getRecoveryCodes();
3875
+ if (!q(e, f.recoveryCodesExist)) throw e;
3876
+ this.recoveryCodes = await o.getRecoveryCodes();
3690
3877
  }
3691
3878
  await this.loadFactors();
3692
3879
  });
@@ -3696,7 +3883,7 @@ let p = class extends E {
3696
3883
  return;
3697
3884
  }
3698
3885
  this.confirmRegenerate = !1, this.run("recovery", async () => {
3699
- this.recoveryCodes = await n.regenerateRecoveryCodes();
3886
+ this.recoveryCodes = await o.regenerateRecoveryCodes();
3700
3887
  });
3701
3888
  }, this.onCopyCodes = async () => {
3702
3889
  if (this.recoveryCodes)
@@ -3716,7 +3903,7 @@ let p = class extends E {
3716
3903
  }
3717
3904
  }, this.onStepUpFactor = (e) => {
3718
3905
  this.run("stepup", async () => {
3719
- const t = await n.createMfaChallenge(e);
3906
+ const t = await o.createMfaChallenge(e);
3720
3907
  this.stepUp = { ...this.stepUp, challenge: { id: t.$id, factor: e } }, this.stepUpCode = "";
3721
3908
  });
3722
3909
  }, this.onStepUpVerify = (e) => {
@@ -3725,33 +3912,33 @@ let p = class extends E {
3725
3912
  t?.challenge && (async () => {
3726
3913
  let i = !1;
3727
3914
  await this.run("stepup-code", async () => {
3728
- await n.completeMfaChallenge(t.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", i = !0;
3915
+ await o.completeMfaChallenge(t.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", i = !0;
3729
3916
  }), i && await t.retry();
3730
3917
  })();
3731
3918
  }, this.onDeleteSession = (e) => {
3732
3919
  this.run(`session-${e}`, async () => {
3733
3920
  if ((this.sessions ?? []).some((i) => i.$id === e && i.current)) {
3734
- await n.signOut(), this.sessions = [];
3921
+ await o.signOut(), this.sessions = [];
3735
3922
  return;
3736
3923
  }
3737
- await n.signOut(e), this.sessions = (this.sessions ?? []).filter((i) => i.$id !== e);
3924
+ await o.signOut(e), this.sessions = (this.sessions ?? []).filter((i) => i.$id !== e);
3738
3925
  });
3739
3926
  }, this.onSignOutAll = () => {
3740
3927
  if (!this.confirmSignOutAll) {
3741
3928
  this.confirmSignOutAll = !0;
3742
3929
  return;
3743
3930
  }
3744
- this.confirmSignOutAll = !1, this.run("sessions-all", () => n.signOutEverywhere());
3931
+ this.confirmSignOutAll = !1, this.run("sessions-all", () => o.signOutEverywhere());
3745
3932
  }, this.onDeleteIdentity = (e) => {
3746
3933
  if (this.confirmDisconnectId !== e) {
3747
3934
  this.confirmDisconnectId = e;
3748
3935
  return;
3749
3936
  }
3750
3937
  this.confirmDisconnectId = null, this.run(`identity-${e}`, async () => {
3751
- await n.deleteIdentity(e), this.identities = (this.identities ?? []).filter((t) => t.$id !== e);
3938
+ await o.deleteIdentity(e), this.identities = (this.identities ?? []).filter((t) => t.$id !== e);
3752
3939
  });
3753
3940
  }, this.onDeleteAccount = () => {
3754
- this.run("delete", () => n.deleteAccount());
3941
+ this.run("delete", () => o.deleteAccount());
3755
3942
  };
3756
3943
  }
3757
3944
  connectedCallback() {
@@ -3783,10 +3970,14 @@ let p = class extends E {
3783
3970
  }
3784
3971
  updated(e) {
3785
3972
  e.has("active") && requestAnimationFrame(() => {
3786
- const t = this.renderRoot.querySelector(
3973
+ const i = this.renderRoot.querySelector(
3787
3974
  '.tab[aria-selected="true"]'
3788
3975
  );
3789
- t && typeof t.scrollIntoView == "function" && t.scrollIntoView({ inline: "nearest", block: "nearest", behavior: "smooth" });
3976
+ i && typeof i.scrollIntoView == "function" && i.scrollIntoView({ inline: "nearest", block: "nearest", behavior: "smooth" });
3977
+ }), (e.has("confirmDelete") && this.confirmDelete || e.has("confirmSignOutAll") && this.confirmSignOutAll || e.has("confirmDisconnectId") && this.confirmDisconnectId !== null) && requestAnimationFrame(() => {
3978
+ this.renderRoot.querySelector(
3979
+ ".card-footer [autofocus], .row-actions [autofocus], .inline [autofocus], .card-footer .btn-outline, .row-actions .btn-outline, .inline .btn-outline"
3980
+ )?.focus({ preventScroll: !0 });
3790
3981
  });
3791
3982
  }
3792
3983
  setNotice(e, t) {
@@ -3804,7 +3995,7 @@ let p = class extends E {
3804
3995
  try {
3805
3996
  await t(), i && this.setNotice("success", i);
3806
3997
  } catch (s) {
3807
- N(s, f.challengeRequired) ? this.stepUp = { retry: () => this.run(e, t, i) } : this.errors = {
3998
+ q(s, f.challengeRequired) ? this.stepUp = { retry: () => this.run(e, t, i) } : this.errors = {
3808
3999
  ...this.errors,
3809
4000
  [e]: K(
3810
4001
  s,
@@ -3820,12 +4011,12 @@ let p = class extends E {
3820
4011
  // ─────────────────────────── loaders ───────────────────────────
3821
4012
  async loadSessions() {
3822
4013
  await this.run("sessions", async () => {
3823
- this.sessions = await n.listSessions();
4014
+ this.sessions = await o.listSessions();
3824
4015
  });
3825
4016
  }
3826
4017
  async loadIdentities() {
3827
4018
  await this.run("identities", async () => {
3828
- this.identities = await n.listIdentities();
4019
+ this.identities = await o.listIdentities();
3829
4020
  });
3830
4021
  }
3831
4022
  /** Probe once so Activity is never shown on servers without /account/logs. */
@@ -3833,7 +4024,7 @@ let p = class extends E {
3833
4024
  if (!this.logsProbeStarted) {
3834
4025
  this.logsProbeStarted = !0;
3835
4026
  try {
3836
- this.logs = await n.listLogs(), this.logsSupported = !0;
4027
+ this.logs = await o.listLogs(), this.logsSupported = !0;
3837
4028
  } catch {
3838
4029
  this.logsSupported = !1, this.logs = [], this.active === "activity" && (this.active = "profile");
3839
4030
  }
@@ -3846,7 +4037,7 @@ let p = class extends E {
3846
4037
  }
3847
4038
  this.busy = "logs";
3848
4039
  try {
3849
- this.logs = await n.listLogs();
4040
+ this.logs = await o.listLogs();
3850
4041
  } catch {
3851
4042
  this.logsSupported = !1, this.logs = [], this.active === "activity" && (this.active = "profile");
3852
4043
  } finally {
@@ -3857,7 +4048,7 @@ let p = class extends E {
3857
4048
  if (!this.factorsLoading) {
3858
4049
  this.factorsLoading = !0;
3859
4050
  try {
3860
- this.factors = await n.listMfaFactors();
4051
+ this.factors = await o.listMfaFactors();
3861
4052
  } catch {
3862
4053
  this.factors = {
3863
4054
  totp: !1,
@@ -3936,7 +4127,7 @@ let p = class extends E {
3936
4127
  >
3937
4128
  ${l.x}
3938
4129
  </button>
3939
- </div>` : o}
4130
+ </div>` : n}
3940
4131
  ${this.stepUp ? this.renderStepUp() : r`<div
3941
4132
  class="tabpanel"
3942
4133
  role="tabpanel"
@@ -3957,13 +4148,13 @@ let p = class extends E {
3957
4148
  <div class="row-main">
3958
4149
  <span class="row-title" title=${t}>
3959
4150
  ${t}
3960
- ${e.mfa ? r`<span class="badge badge-success">${l.shieldCheck} ${this.t("mfaBadge")}</span>` : o}
3961
- ${n.isPreview ? r`<span class="badge badge-info">${this.t("preview")}</span>` : o}
4151
+ ${e.mfa ? r`<span class="badge badge-success">${l.shieldCheck} ${this.t("mfaBadge")}</span>` : n}
4152
+ ${o.isPreview ? r`<span class="badge badge-info">${this.t("preview")}</span>` : n}
3962
4153
  </span>
3963
- ${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : o}
4154
+ ${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : n}
3964
4155
  </div>
3965
4156
  </div>
3966
- <button class="btn btn-outline btn-sm" @click=${() => n.signOut()}>
4157
+ <button class="btn btn-outline btn-sm" @click=${() => o.signOut()}>
3967
4158
  ${l.logOut} ${this.t("signOut")}
3968
4159
  </button>
3969
4160
  </div>
@@ -3988,21 +4179,50 @@ let p = class extends E {
3988
4179
  return t ? r`<div class="alert alert-error" role="alert">
3989
4180
  ${l.alert}
3990
4181
  <div class="alert-body">${t}</div>
3991
- </div>` : o;
4182
+ </div>` : n;
3992
4183
  }
3993
4184
  spinner(e) {
3994
- return this.busy === e ? r`<span class="spinner" aria-hidden="true"></span>` : o;
4185
+ return this.busy === e ? r`<span class="spinner" aria-hidden="true"></span>` : n;
3995
4186
  }
3996
4187
  card(e, t, i, s, a = !1) {
3997
4188
  return r`<section class="card ${a ? "card-danger" : ""}">
3998
4189
  <div class="card-header">
3999
4190
  <h3 class="card-title">${e}</h3>
4000
- ${t ? r`<p class="card-description">${t}</p>` : o}
4191
+ ${t ? r`<p class="card-description">${t}</p>` : n}
4001
4192
  </div>
4002
- <div class="card-body">${i}</div>
4003
- ${s ? r`<div class="card-footer">${s}</div>` : o}
4193
+ ${i !== n ? r`<div class="card-body">${i}</div>` : n}
4194
+ ${s ? r`<div class="card-footer">${s}</div>` : n}
4004
4195
  </section>`;
4005
4196
  }
4197
+ /** Vibes-style confirm footer: Cancel first (autofocus), destructive only on confirm. */
4198
+ confirmFooter(e, t, i, s) {
4199
+ return r`
4200
+ <button
4201
+ type="button"
4202
+ class="btn btn-outline btn-sm"
4203
+ autofocus
4204
+ ?disabled=${!!this.busy}
4205
+ @click=${e}
4206
+ >
4207
+ ${this.t("cancel")}
4208
+ </button>
4209
+ <button
4210
+ type="button"
4211
+ class="btn btn-destructive btn-sm"
4212
+ ?disabled=${!!this.busy}
4213
+ @click=${t}
4214
+ >
4215
+ ${s ? this.spinner(s) : n} ${i}
4216
+ </button>
4217
+ `;
4218
+ }
4219
+ emptyState(e, t, i) {
4220
+ return r`<div class="empty empty-well">
4221
+ <div class="empty-icon" aria-hidden="true">${e}</div>
4222
+ <p class="empty-title">${t}</p>
4223
+ <p class="empty-desc">${i}</p>
4224
+ </div>`;
4225
+ }
4006
4226
  verifiedBadge(e) {
4007
4227
  return e ? r`<span class="badge badge-success">${l.check} ${this.t("verified")}</span>` : r`<span class="badge badge-warning">${this.t("unverified")}</span>`;
4008
4228
  }
@@ -4112,7 +4332,7 @@ let p = class extends E {
4112
4332
  <div class="field">
4113
4333
  <label class="label" for="acc-email"
4114
4334
  >${this.t("email")}
4115
- ${e.email ? this.verifiedBadge(e.emailVerification) : o}</label
4335
+ ${e.email ? this.verifiedBadge(e.emailVerification) : n}</label
4116
4336
  >
4117
4337
  <input
4118
4338
  class="input"
@@ -4137,8 +4357,8 @@ let p = class extends E {
4137
4357
  autocomplete=${e.passwordUpdate ? "current-password" : "new-password"}
4138
4358
  required
4139
4359
  />
4140
- ${e.passwordUpdate ? o : r`<p class="hint">${this.t("createPasswordHint")}</p>`}
4141
- </div>` : o}
4360
+ ${e.passwordUpdate ? n : r`<p class="hint">${this.t("createPasswordHint")}</p>`}
4361
+ </div>` : n}
4142
4362
  ${this.error("email")} ${this.error("verify")}
4143
4363
  </form>`,
4144
4364
  r`
@@ -4155,7 +4375,7 @@ let p = class extends E {
4155
4375
  Math.ceil((this.verifyEmailCooldownUntil - Date.now()) / 1e3)
4156
4376
  )
4157
4377
  }) : this.t("verifyEmail")}
4158
- </button>` : o}
4378
+ </button>` : n}
4159
4379
  <button
4160
4380
  class="btn btn-primary btn-sm"
4161
4381
  type="submit"
@@ -4173,7 +4393,7 @@ let p = class extends E {
4173
4393
  <div class="field">
4174
4394
  <label class="label" for="acc-phone"
4175
4395
  >${this.t("phone")}
4176
- ${e.phone ? this.verifiedBadge(e.phoneVerification) : o}</label
4396
+ ${e.phone ? this.verifiedBadge(e.phoneVerification) : n}</label
4177
4397
  >
4178
4398
  <input
4179
4399
  class="input"
@@ -4198,8 +4418,8 @@ let p = class extends E {
4198
4418
  autocomplete=${e.passwordUpdate ? "current-password" : "new-password"}
4199
4419
  required
4200
4420
  />
4201
- ${e.passwordUpdate ? o : r`<p class="hint">${this.t("createPasswordHint")}</p>`}
4202
- </div>` : o}
4421
+ ${e.passwordUpdate ? n : r`<p class="hint">${this.t("createPasswordHint")}</p>`}
4422
+ </div>` : n}
4203
4423
  ${this.phoneCodeSent ? r`<div class="field">
4204
4424
  <label class="label" for="acc-phone-code">${this.t("code")}</label>
4205
4425
  <input
@@ -4216,7 +4436,7 @@ let p = class extends E {
4216
4436
  t.key === "Enter" && (t.preventDefault(), this.onConfirmPhoneVerification(t));
4217
4437
  }}
4218
4438
  />
4219
- </div>` : o}
4439
+ </div>` : n}
4220
4440
  ${this.error("phone")} ${this.error("verify-phone")} ${this.error("verify-phone-code")}
4221
4441
  </form>`,
4222
4442
  r`
@@ -4227,7 +4447,7 @@ let p = class extends E {
4227
4447
  ?disabled=${!!this.busy}
4228
4448
  >
4229
4449
  ${this.spinner("verify-phone")} ${this.t("sendCode")}
4230
- </button>` : o}
4450
+ </button>` : n}
4231
4451
  ${this.phoneCodeSent ? r`<button
4232
4452
  class="btn btn-outline btn-sm"
4233
4453
  type="button"
@@ -4235,7 +4455,7 @@ let p = class extends E {
4235
4455
  ?disabled=${!!this.busy}
4236
4456
  >
4237
4457
  ${this.spinner("verify-phone-code")} ${this.t("verifyCode")}
4238
- </button>` : o}
4458
+ </button>` : n}
4239
4459
  <button
4240
4460
  class="btn btn-primary btn-sm"
4241
4461
  type="submit"
@@ -4253,25 +4473,20 @@ let p = class extends E {
4253
4473
  return this.card(
4254
4474
  this.t("deleteAccount"),
4255
4475
  this.t("deleteAccountDescription"),
4256
- r`${this.error("delete")}
4257
- ${this.confirmDelete ? r`<div class="inline">
4258
- <button
4259
- class="btn btn-outline btn-sm warn"
4260
- @click=${this.onDeleteAccount}
4261
- ?disabled=${!!this.busy}
4262
- >
4263
- ${this.spinner("delete")} ${this.t("deleteAccountConfirm")}
4264
- </button>
4265
- <button class="btn btn-ghost btn-sm" @click=${() => this.confirmDelete = !1}>
4266
- ${this.t("cancel")}
4267
- </button>
4268
- </div>` : r`<button
4269
- class="btn btn-outline btn-sm warn"
4270
- @click=${() => this.confirmDelete = !0}
4271
- >
4476
+ this.confirmDelete ? this.error("delete") : r`${this.error("delete")}
4477
+ <button class="btn btn-outline btn-sm warn" @click=${() => this.confirmDelete = !0}>
4272
4478
  ${l.userX} ${this.t("deleteAccount")}
4273
- </button>`}`,
4274
- void 0,
4479
+ </button>`,
4480
+ this.confirmDelete ? this.confirmFooter(
4481
+ () => {
4482
+ this.confirmDelete = !1;
4483
+ },
4484
+ () => {
4485
+ this.onDeleteAccount();
4486
+ },
4487
+ this.t("deleteAccountConfirm"),
4488
+ "delete"
4489
+ ) : void 0,
4275
4490
  !0
4276
4491
  );
4277
4492
  }
@@ -4279,7 +4494,7 @@ let p = class extends E {
4279
4494
  renderSecurity() {
4280
4495
  const e = this.user, t = this.config?.mfa !== !1;
4281
4496
  return r`<div class="section">
4282
- ${this.isGuest ? o : this.card(
4497
+ ${this.isGuest ? n : this.card(
4283
4498
  this.t("changePassword"),
4284
4499
  void 0,
4285
4500
  r`<form
@@ -4301,7 +4516,7 @@ let p = class extends E {
4301
4516
  autocomplete="current-password"
4302
4517
  required
4303
4518
  />
4304
- </div>` : o}
4519
+ </div>` : n}
4305
4520
  <div class="field">
4306
4521
  <label class="label" for="acc-new-password">${this.t("newPassword")}</label>
4307
4522
  <input
@@ -4359,12 +4574,12 @@ let p = class extends E {
4359
4574
  ${this.spinner("password")} ${this.t("update")}
4360
4575
  </button>`
4361
4576
  )}
4362
- ${t ? this.renderMfaCard() : o}
4363
- ${t ? this.renderRecoveryCard() : o}
4577
+ ${t ? this.renderMfaCard() : n}
4578
+ ${t ? this.renderRecoveryCard() : n}
4364
4579
  </div>`;
4365
4580
  }
4366
4581
  renderMfaCard() {
4367
- const e = this.user, t = this.factors?.totp ?? !1, i = this.authenticator ? n.isPreview ? Et(this.authenticator.uri) : new kt(n.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
4582
+ const e = this.user, t = this.factors?.totp ?? !1, i = this.authenticator ? o.isPreview ? Et(this.authenticator.uri) : new kt(o.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
4368
4583
  return this.card(
4369
4584
  this.t("twoFactor"),
4370
4585
  this.t("twoFactorDescription"),
@@ -4387,7 +4602,7 @@ let p = class extends E {
4387
4602
  ${l.alert}
4388
4603
  <div class="alert-body">
4389
4604
  ${this.t("mfaNoFactorWarning")}
4390
- ${this.factors?.totp ? o : r`<div class="links">
4605
+ ${this.factors?.totp ? n : r`<div class="links">
4391
4606
  <button
4392
4607
  type="button"
4393
4608
  class="btn btn-link"
@@ -4398,14 +4613,14 @@ let p = class extends E {
4398
4613
  </button>
4399
4614
  </div>`}
4400
4615
  </div>
4401
- </div>` : o}
4616
+ </div>` : n}
4402
4617
  ${this.error("mfa")}
4403
4618
  <div class="separator"></div>
4404
4619
  <div class="toggle-row">
4405
4620
  <div class="row-main">
4406
4621
  <span class="row-title"
4407
4622
  >${l.smartphone} ${this.t("authenticatorApp")}
4408
- ${t ? this.verifiedBadge(!0) : o}</span
4623
+ ${t ? this.verifiedBadge(!0) : n}</span
4409
4624
  >
4410
4625
  </div>
4411
4626
  ${t ? this.confirmRemoveAuthenticator ? r`<div class="inline">
@@ -4428,7 +4643,7 @@ let p = class extends E {
4428
4643
  ?disabled=${!!this.busy}
4429
4644
  >
4430
4645
  ${this.spinner("remove-authenticator")} ${this.t("remove")}
4431
- </button>` : this.authenticator ? o : r`<button
4646
+ </button>` : this.authenticator ? n : r`<button
4432
4647
  class="btn btn-outline btn-sm"
4433
4648
  @click=${this.onAddAuthenticator}
4434
4649
  ?disabled=${!!this.busy}
@@ -4483,7 +4698,7 @@ let p = class extends E {
4483
4698
  ${this.t("cancel")}
4484
4699
  </button>
4485
4700
  </div>
4486
- </form>` : o}
4701
+ </form>` : n}
4487
4702
  </div>`
4488
4703
  );
4489
4704
  }
@@ -4537,7 +4752,7 @@ let p = class extends E {
4537
4752
  ?disabled=${!!this.busy}
4538
4753
  >
4539
4754
  ${l.refresh} ${this.t("regenerateRecoveryCodes")}
4540
- </button>` : o}
4755
+ </button>` : n}
4541
4756
  </div>`}
4542
4757
  ${this.error("recovery")}
4543
4758
  </div>`
@@ -4626,15 +4841,19 @@ let p = class extends E {
4626
4841
  this.t("sessions"),
4627
4842
  void 0,
4628
4843
  r`${this.error("sessions")}
4629
- ${e === null ? r`<div class="empty"><span class="spinner"></span></div>` : e.length === 0 ? r`<div class="empty">${this.t("noSessions")}</div>` : e.map(
4844
+ ${e === null ? r`<div class="empty"><span class="spinner"></span></div>` : e.length === 0 ? this.emptyState(
4845
+ l.monitor,
4846
+ this.t("noSessions"),
4847
+ this.t("noSessionsDescription")
4848
+ ) : e.map(
4630
4849
  (t) => r`<div class="row">
4631
4850
  <div class="inline">
4632
4851
  <span class="device">${this.deviceIcon(t)}</span>
4633
4852
  <div class="row-main">
4634
4853
  <span class="row-title">
4635
4854
  ${t.clientName || t.provider}
4636
- ${t.clientVersion ? r`<span class="muted small">${t.clientVersion}</span>` : o}
4637
- ${t.current ? r`<span class="badge badge-info">${this.t("currentSession")}</span>` : o}
4855
+ ${t.clientVersion ? r`<span class="muted small">${t.clientVersion}</span>` : n}
4856
+ ${t.current ? r`<span class="badge badge-info">${this.t("currentSession")}</span>` : n}
4638
4857
  </span>
4639
4858
  <span class="row-sub"
4640
4859
  >${[t.osName, t.countryName || t.countryCode, t.ip].filter(Boolean).join(" · ")}</span
@@ -4642,7 +4861,7 @@ let p = class extends E {
4642
4861
  </div>
4643
4862
  </div>
4644
4863
  <div class="row-actions">
4645
- ${this.busy === `session-${t.$id}` ? r`<span class="spinner"></span>` : o}
4864
+ ${this.busy === `session-${t.$id}` ? r`<span class="spinner"></span>` : n}
4646
4865
  <button
4647
4866
  class="btn btn-ghost btn-sm"
4648
4867
  @click=${() => this.onDeleteSession(t.$id)}
@@ -4658,29 +4877,24 @@ let p = class extends E {
4658
4877
  ${this.card(
4659
4878
  this.t("signOutAllSessions"),
4660
4879
  this.t("signOutAllSessionsDescription"),
4661
- r`${this.error("sessions-all")}
4662
- ${this.confirmSignOutAll ? r`<div class="inline">
4663
- <button
4664
- class="btn btn-outline btn-sm warn"
4665
- @click=${this.onSignOutAll}
4666
- ?disabled=${!!this.busy}
4667
- >
4668
- ${this.spinner("sessions-all")} ${l.logOut} ${this.t("signOutAllSessions")}
4669
- </button>
4670
- <button
4671
- class="btn btn-ghost btn-sm"
4672
- @click=${() => this.confirmSignOutAll = !1}
4673
- >
4674
- ${this.t("cancel")}
4675
- </button>
4676
- </div>` : r`<button
4880
+ this.confirmSignOutAll ? this.error("sessions-all") : r`${this.error("sessions-all")}
4881
+ <button
4677
4882
  class="btn btn-outline btn-sm warn"
4678
4883
  @click=${this.onSignOutAll}
4679
4884
  ?disabled=${!!this.busy}
4680
4885
  >
4681
4886
  ${this.spinner("sessions-all")} ${l.logOut} ${this.t("signOutAllSessions")}
4682
- </button>`}`,
4683
- void 0,
4887
+ </button>`,
4888
+ this.confirmSignOutAll ? this.confirmFooter(
4889
+ () => {
4890
+ this.confirmSignOutAll = !1;
4891
+ },
4892
+ () => {
4893
+ this.onSignOutAll();
4894
+ },
4895
+ this.t("signOutAllSessions"),
4896
+ "sessions-all"
4897
+ ) : void 0,
4684
4898
  !0
4685
4899
  )}
4686
4900
  </div>`;
@@ -4693,37 +4907,45 @@ let p = class extends E {
4693
4907
  this.t("connections"),
4694
4908
  void 0,
4695
4909
  r`${this.error("identities")}
4696
- ${e === null ? r`<div class="empty"><span class="spinner"></span></div>` : e.length === 0 ? r`<div class="empty">${this.t("noConnections")}</div>` : e.map(
4910
+ ${e === null ? r`<div class="empty"><span class="spinner"></span></div>` : e.length === 0 ? this.emptyState(
4911
+ l.link,
4912
+ this.t("noConnections"),
4913
+ this.t("noConnectionsDescription")
4914
+ ) : e.map(
4697
4915
  (i) => r`<div class="row">
4698
4916
  <div class="inline">
4699
- <span class="device">${et(i.provider)}</span>
4917
+ <span class="device">${Y(i.provider)}</span>
4700
4918
  <div class="row-main">
4701
- <span class="row-title">${q(i.provider)}</span>
4919
+ <span class="row-title">${W(i.provider)}</span>
4702
4920
  <span class="row-sub">${i.providerEmail || i.providerUid}</span>
4703
4921
  </div>
4704
4922
  </div>
4705
4923
  <div class="row-actions">
4706
4924
  ${this.confirmDisconnectId === i.$id ? r`<div class="inline">
4707
4925
  <button
4708
- class="btn btn-outline btn-sm warn"
4709
- @click=${() => this.onDeleteIdentity(i.$id)}
4926
+ type="button"
4927
+ class="btn btn-outline btn-sm"
4928
+ autofocus
4710
4929
  ?disabled=${!!this.busy}
4930
+ @click=${() => this.confirmDisconnectId = null}
4711
4931
  >
4712
- ${this.busy === `identity-${i.$id}` ? r`<span class="spinner"></span>` : o}
4713
- ${this.t("disconnect")}
4932
+ ${this.t("cancel")}
4714
4933
  </button>
4715
4934
  <button
4716
- class="btn btn-ghost btn-sm"
4717
- @click=${() => this.confirmDisconnectId = null}
4935
+ type="button"
4936
+ class="btn btn-destructive btn-sm"
4937
+ @click=${() => this.onDeleteIdentity(i.$id)}
4938
+ ?disabled=${!!this.busy}
4718
4939
  >
4719
- ${this.t("cancel")}
4940
+ ${this.busy === `identity-${i.$id}` ? r`<span class="spinner"></span>` : n}
4941
+ ${this.t("disconnect")}
4720
4942
  </button>
4721
4943
  </div>` : r`<button
4722
4944
  class="btn btn-ghost btn-sm"
4723
4945
  @click=${() => this.onDeleteIdentity(i.$id)}
4724
4946
  ?disabled=${!!this.busy}
4725
4947
  >
4726
- ${this.busy === `identity-${i.$id}` ? r`<span class="spinner"></span>` : o}
4948
+ ${this.busy === `identity-${i.$id}` ? r`<span class="spinner"></span>` : n}
4727
4949
  ${this.t("disconnect")}
4728
4950
  </button>`}
4729
4951
  </div>
@@ -4733,12 +4955,12 @@ let p = class extends E {
4733
4955
  (i) => r`<button
4734
4956
  class="btn btn-outline btn-sm"
4735
4957
  @click=${() => {
4736
- this.run(`connect-${i}`, () => n.signInWithOAuth(i));
4958
+ this.run(`connect-${i}`, () => o.signInWithOAuth(i));
4737
4959
  }}
4738
4960
  ?disabled=${!!this.busy}
4739
4961
  >
4740
- ${this.spinner(`connect-${i}`)} ${et(i)}
4741
- ${this.t("connectProvider", { provider: q(i) })}
4962
+ ${this.spinner(`connect-${i}`)} ${Y(i)}
4963
+ ${this.t("connectProvider", { provider: W(i) })}
4742
4964
  </button>`
4743
4965
  )}` : void 0
4744
4966
  )}
@@ -4751,7 +4973,11 @@ let p = class extends E {
4751
4973
  ${this.card(
4752
4974
  this.t("activity"),
4753
4975
  void 0,
4754
- r`${e === null ? r`<div class="empty"><span class="spinner"></span></div>` : e.length === 0 ? r`<div class="empty">${this.t("noActivity")}</div>` : e.map(
4976
+ r`${e === null ? r`<div class="empty"><span class="spinner"></span></div>` : e.length === 0 ? this.emptyState(
4977
+ l.activity,
4978
+ this.t("noActivity"),
4979
+ this.t("noActivityDescription")
4980
+ ) : e.map(
4755
4981
  (t) => r`<div class="row">
4756
4982
  <div class="row-main">
4757
4983
  <span class="row-title">${t.event}</span>
@@ -4967,7 +5193,7 @@ m([
4967
5193
  d()
4968
5194
  ], p.prototype, "verifyEmailCooldownUntil", 2);
4969
5195
  p = m([
4970
- R("authui-account")
5196
+ T("authui-account")
4971
5197
  ], p);
4972
5198
  var Xt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, F = (e, t, i, s) => {
4973
5199
  for (var a = s > 1 ? void 0 : s ? Qt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
@@ -5062,7 +5288,7 @@ let P = class extends E {
5062
5288
  ${this.open ? t ? r`<authui-account embedded></authui-account>` : r`<authui-sign-in
5063
5289
  embedded
5064
5290
  .view=${this.view === "account" ? "sign-in" : this.view}
5065
- ></authui-sign-in>` : o}
5291
+ ></authui-sign-in>` : n}
5066
5292
  </div>
5067
5293
  <div class="scroll-fade ${this.scrollCue ? "show" : ""}" aria-hidden="true"></div>
5068
5294
  </div>
@@ -5182,9 +5408,9 @@ F([
5182
5408
  st(".body")
5183
5409
  ], P.prototype, "bodyEl", 2);
5184
5410
  P = F([
5185
- R("authui-modal")
5411
+ T("authui-modal")
5186
5412
  ], P);
5187
- var Jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, X = (e, t, i, s) => {
5413
+ var Jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, Q = (e, t, i, s) => {
5188
5414
  for (var a = s > 1 ? void 0 : s ? te(t, i) : t, c = e.length - 1, u; c >= 0; c--)
5189
5415
  (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
5190
5416
  return s && a && Jt(t, i, a), a;
@@ -5197,7 +5423,7 @@ let L = class extends E {
5197
5423
  const e = this.size === "md" ? "" : `btn-${this.size}`;
5198
5424
  return r`<button
5199
5425
  class="btn btn-${this.variant} ${e}"
5200
- @click=${() => Y(this.view)}
5426
+ @click=${() => Z(this.view)}
5201
5427
  part="button"
5202
5428
  >
5203
5429
  <slot
@@ -5217,19 +5443,19 @@ L.styles = [
5217
5443
  }
5218
5444
  `
5219
5445
  ];
5220
- X([
5446
+ Q([
5221
5447
  g({ type: String })
5222
5448
  ], L.prototype, "view", 2);
5223
- X([
5449
+ Q([
5224
5450
  g({ type: String })
5225
5451
  ], L.prototype, "variant", 2);
5226
- X([
5452
+ Q([
5227
5453
  g({ type: String })
5228
5454
  ], L.prototype, "size", 2);
5229
- L = X([
5230
- R("authui-button")
5455
+ L = Q([
5456
+ T("authui-button")
5231
5457
  ], L);
5232
- var ee = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, T = (e, t, i, s) => {
5458
+ var ee = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, R = (e, t, i, s) => {
5233
5459
  for (var a = s > 1 ? void 0 : s ? ie(t, i) : t, c = e.length - 1, u; c >= 0; c--)
5234
5460
  (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
5235
5461
  return s && a && ee(t, i, a), a;
@@ -5258,7 +5484,7 @@ let I = class extends E {
5258
5484
  }, this.toggleMenu = () => {
5259
5485
  this.menuOpen = !this.menuOpen, this.menuOpen && this.showTeams && this.loadTeams();
5260
5486
  }, this.selectTeam = (e) => {
5261
- n.setActiveTeam({ $id: e.$id, name: e.name }), this.activeTeamId = e.$id, this.dispatchEvent(
5487
+ o.setActiveTeam({ $id: e.$id, name: e.name }), this.activeTeamId = e.$id, this.dispatchEvent(
5262
5488
  new CustomEvent("authui-active-team", {
5263
5489
  detail: { teamId: e.$id, team: e },
5264
5490
  bubbles: !0,
@@ -5279,9 +5505,9 @@ let I = class extends E {
5279
5505
  if (!e || !t) return;
5280
5506
  const i = e.getBoundingClientRect(), s = 6, a = 8;
5281
5507
  t.style.maxHeight = "";
5282
- const c = t.offsetHeight + s, u = window.innerHeight - i.bottom, $ = i.top, x = u < c && $ > u;
5283
- x !== this.menuAbove && (this.menuAbove = x);
5284
- const ot = Math.max(80, (x ? $ : u) - s - a);
5508
+ const c = t.offsetHeight + s, u = window.innerHeight - i.bottom, b = i.top, $ = u < c && b > u;
5509
+ $ !== this.menuAbove && (this.menuAbove = $);
5510
+ const ot = Math.max(80, ($ ? b : u) - s - a);
5285
5511
  t.style.maxHeight = `${ot}px`;
5286
5512
  }
5287
5513
  focusMenuItem(e) {
@@ -5295,9 +5521,9 @@ let I = class extends E {
5295
5521
  })) : this.menuAbove = !1), this.menuOpen && (e.has("teams") || e.has("teamsLoading")) && requestAnimationFrame(() => this.placeMenu());
5296
5522
  }
5297
5523
  async loadTeams() {
5298
- this.teamsLoading = !0, this.activeTeamId = n.getActiveTeamId();
5524
+ this.teamsLoading = !0, this.activeTeamId = o.getActiveTeamId();
5299
5525
  try {
5300
- this.teams = await n.listTeams(), this.activeTeamId && !this.teams.some((e) => e.$id === this.activeTeamId) && (this.activeTeamId = null, n.setActiveTeam(null));
5526
+ this.teams = await o.listTeams(), this.activeTeamId && !this.teams.some((e) => e.$id === this.activeTeamId) && (this.activeTeamId = null, o.setActiveTeam(null));
5301
5527
  } catch {
5302
5528
  this.teams = [];
5303
5529
  } finally {
@@ -5309,7 +5535,7 @@ let I = class extends E {
5309
5535
  if (e === "loading" && i)
5310
5536
  return r`<span class="avatar"><span class="spinner"></span></span>`;
5311
5537
  if (e !== "signed-in" || !t)
5312
- return r`<button class="btn btn-primary btn-sm" @click=${() => Y("sign-in")}>
5538
+ return r`<button class="btn btn-primary btn-sm" @click=${() => Z("sign-in")}>
5313
5539
  <slot>${this.t("signIn")}</slot>
5314
5540
  </button>`;
5315
5541
  const s = t.name || t.email || t.phone || this.t("guestAccount");
@@ -5328,7 +5554,7 @@ let I = class extends E {
5328
5554
  ${this.menuOpen ? r`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
5329
5555
  <div class="menu-header">
5330
5556
  <span class="row-title" title=${s}>${s}</span>
5331
- ${t.email && t.name ? r`<span class="row-sub" title=${t.email}>${t.email}</span>` : o}
5557
+ ${t.email && t.name ? r`<span class="row-sub" title=${t.email}>${t.email}</span>` : n}
5332
5558
  </div>
5333
5559
  ${this.showTeams ? r`<div class="menu-section">
5334
5560
  <div class="menu-section-label">${this.t("teamsLabel")}</div>
@@ -5343,15 +5569,15 @@ let I = class extends E {
5343
5569
  >
5344
5570
  ${l.users}
5345
5571
  <span title=${a.name}>${a.name}</span>
5346
- ${a.$id === this.activeTeamId ? r`<span class="check">${l.check}</span>` : o}
5572
+ ${a.$id === this.activeTeamId ? r`<span class="check">${l.check}</span>` : n}
5347
5573
  </button>`
5348
5574
  )}
5349
- </div>` : o}
5575
+ </div>` : n}
5350
5576
  <button
5351
5577
  class="menu-item"
5352
5578
  role="menuitem"
5353
5579
  @click=${() => {
5354
- this.menuOpen = !1, Y("account");
5580
+ this.menuOpen = !1, Z("account");
5355
5581
  }}
5356
5582
  >
5357
5583
  ${l.settings} ${this.t("manageAccount")}
@@ -5360,12 +5586,12 @@ let I = class extends E {
5360
5586
  class="menu-item"
5361
5587
  role="menuitem"
5362
5588
  @click=${() => {
5363
- this.menuOpen = !1, n.signOut();
5589
+ this.menuOpen = !1, o.signOut();
5364
5590
  }}
5365
5591
  >
5366
5592
  ${l.logOut} ${this.t("signOut")}
5367
5593
  </button>
5368
- </div>` : o}
5594
+ </div>` : n}
5369
5595
  `;
5370
5596
  }
5371
5597
  };
@@ -5487,29 +5713,29 @@ I.styles = [
5487
5713
  }
5488
5714
  `
5489
5715
  ];
5490
- T([
5716
+ R([
5491
5717
  g({ type: Boolean, attribute: "show-teams" })
5492
5718
  ], I.prototype, "showTeams", 2);
5493
- T([
5719
+ R([
5494
5720
  g({ type: String })
5495
5721
  ], I.prototype, "src", 2);
5496
- T([
5722
+ R([
5497
5723
  d()
5498
5724
  ], I.prototype, "menuOpen", 2);
5499
- T([
5725
+ R([
5500
5726
  d()
5501
5727
  ], I.prototype, "menuAbove", 2);
5502
- T([
5728
+ R([
5503
5729
  d()
5504
5730
  ], I.prototype, "teams", 2);
5505
- T([
5731
+ R([
5506
5732
  d()
5507
5733
  ], I.prototype, "teamsLoading", 2);
5508
- T([
5734
+ R([
5509
5735
  d()
5510
5736
  ], I.prototype, "activeTeamId", 2);
5511
- I = T([
5512
- R("authui-user-button")
5737
+ I = R([
5738
+ T("authui-user-button")
5513
5739
  ], I);
5514
5740
  export {
5515
5741
  Ft as A,
@@ -5517,29 +5743,29 @@ export {
5517
5743
  f as E,
5518
5744
  bt as F,
5519
5745
  It as P,
5520
- n as a,
5746
+ o as a,
5521
5747
  p as b,
5522
5748
  le as c,
5523
5749
  L as d,
5524
- b as e,
5750
+ y as e,
5525
5751
  E as f,
5526
5752
  P as g,
5527
- B as h,
5753
+ N as h,
5528
5754
  k as i,
5529
5755
  I as j,
5530
5756
  ne as k,
5531
5757
  pt as l,
5532
5758
  Ct as m,
5533
5759
  K as n,
5534
- Y as o,
5535
- D as p,
5760
+ Z as o,
5761
+ z as p,
5536
5762
  ut as q,
5537
5763
  Ut as r,
5538
- q as s,
5764
+ W as s,
5539
5765
  V as t,
5540
5766
  wt as u,
5541
5767
  it as v,
5542
5768
  Mt as w,
5543
5769
  Ot as x,
5544
- z as y
5770
+ _ as y
5545
5771
  };