@burdenoff/microfe-auth 2026.1102.1 → 2026.1107.1

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.
@@ -6,22 +6,23 @@ import { hostFragmentContinuation as i, sameOriginFragmentPath as a, sanitizePos
6
6
  import { useAuthStore as s } from "../store/authStore.js";
7
7
  import { useAuth as c } from "../providers/AuthProvider.js";
8
8
  import { AuthLayout as l } from "../components/AuthLayout.js";
9
- import { AlertIcon as u, EmailIcon as ee, EyeIcon as te, EyeOffIcon as ne, GoogleIcon as re, LockIcon as ie, MicrosoftIcon as d, SpinnerIcon as f } from "../components/AuthIcons.js";
10
- import { useCaptchaV3 as ae } from "../hooks/useCaptchaV3.js";
11
- import { MFA_REDIRECT as oe } from "../constants/sessionKeys.js";
12
- import { useCallback as se, useEffect as p, useRef as ce, useState as m } from "react";
13
- import { SSORedirectSpinner as le, getSSORedirectUrl as ue } from "@burdenoff/fe-libs/shared/components";
14
- import { useLocation as de, useNavigate as fe, useSearchParams as pe } from "react-router";
15
- import { useActiveContext as me } from "@burdenoff/fe-libs/shared/providers/shell";
16
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
17
- import { beginSsoNavigation as he, buildSsoDepositUrl as ge, isSsoNavigationPending as _e, markSsoDepositPending as ve, mintSsoSessionTokens as ye } from "@burdenoff/fe-libs/shared/utils";
18
- import { resolveAuthBridgeConfig as be } from "@burdenoff/fe-libs/shared/config";
19
- import { resolveGatewayUrls as xe } from "@burdenoff/fe-libs/shared/config/gatewayUrls";
20
- import { Button as Se } from "@burdenoff/fe-libs/button";
21
- import { Checkbox as Ce, PagePurpose as we } from "@burdenoff/fe-libs/ui";
22
- import { getProfileTokens as v, getProfileUser as y, getProfileWorkspaceToken as Te, getProfiles as b, resolveActiveProfileId as Ee } from "@burdenoff/fe-libs/shared/providers/shell/ProfileStorageManager";
9
+ import { AlertIcon as u, EmailIcon as ee, EyeIcon as te, EyeOffIcon as ne, GoogleIcon as d, LockIcon as re, MicrosoftIcon as ie, SpinnerIcon as ae } from "../components/AuthIcons.js";
10
+ import { useCaptchaV3 as oe } from "../hooks/useCaptchaV3.js";
11
+ import { MFA_REDIRECT as se } from "../constants/sessionKeys.js";
12
+ import { authPathWithReturnTo as ce, sanitizeReturnPath as le } from "../utils/pendingReturnTo.js";
13
+ import { useCallback as ue, useEffect as f, useRef as de, useState as p } from "react";
14
+ import { SSORedirectSpinner as fe, getSSORedirectUrl as pe } from "@burdenoff/fe-libs/shared/components";
15
+ import { useLocation as me, useNavigate as he, useSearchParams as ge } from "react-router";
16
+ import { useActiveContext as _e } from "@burdenoff/fe-libs/shared/providers/shell";
17
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
18
+ import { beginSsoNavigation as ve, buildSsoDepositUrl as ye, isSsoNavigationPending as be, markSsoDepositPending as xe, mintSsoSessionTokens as Se } from "@burdenoff/fe-libs/shared/utils";
19
+ import { resolveAuthBridgeConfig as Ce } from "@burdenoff/fe-libs/shared/config";
20
+ import { resolveGatewayUrls as we } from "@burdenoff/fe-libs/shared/config/gatewayUrls";
21
+ import { Button as Te } from "@burdenoff/fe-libs/button";
22
+ import { Checkbox as Ee, PagePurpose as De } from "@burdenoff/fe-libs/ui";
23
+ import { getProfileTokens as Oe, getProfileUser as ke, getProfileWorkspaceToken as Ae, getProfiles as _, resolveActiveProfileId as v } from "@burdenoff/fe-libs/shared/providers/shell/ProfileStorageManager";
23
24
  // src/auth/pages/LoginPage.tsx
24
- function De() {
25
+ function y() {
25
26
  if (typeof window > "u") return !1;
26
27
  let e = window;
27
28
  if (typeof e.Capacitor?.isNativePlatform == "function") try {
@@ -29,7 +30,7 @@ function De() {
29
30
  } catch {}
30
31
  return !!(typeof navigator < "u" && /Electron/i.test(navigator.userAgent || ""));
31
32
  }
32
- function Oe(e) {
33
+ function je(e) {
33
34
  if (typeof window > "u") return e;
34
35
  try {
35
36
  let t = new URL(e, window.location.origin);
@@ -38,7 +39,7 @@ function Oe(e) {
38
39
  return e;
39
40
  }
40
41
  }
41
- function ke(e) {
42
+ function Me(e) {
42
43
  try {
43
44
  let t = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "="), r = JSON.parse(atob(n));
44
45
  return typeof r.exp == "number" && r.exp > Date.now() / 1e3;
@@ -46,16 +47,16 @@ function ke(e) {
46
47
  return !1;
47
48
  }
48
49
  }
49
- function Ae(e) {
50
+ function Ne(e) {
50
51
  if (!e) return null;
51
52
  try {
52
53
  let t = new URL(decodeURIComponent(e), window.location.origin);
53
- return t.origin === window.location.origin ? x(t, { includeOrigin: !1 }) : null;
54
+ return t.origin === window.location.origin ? b(t, { includeOrigin: !1 }) : null;
54
55
  } catch {
55
56
  return null;
56
57
  }
57
58
  }
58
- function x(e, t) {
59
+ function b(e, t) {
59
60
  for (let t of [
60
61
  "sso_failed",
61
62
  "sso-failed",
@@ -65,45 +66,45 @@ function x(e, t) {
65
66
  let n = e.searchParams.toString();
66
67
  return `${e.pathname}${n ? `?${n}` : ""}${e.hash}`;
67
68
  }
68
- function je(e) {
69
+ function x(e) {
69
70
  try {
70
71
  let t = new URL(decodeURIComponent(e), window.location.origin);
71
- return x(t, { includeOrigin: t.origin !== window.location.origin });
72
+ return b(t, { includeOrigin: t.origin !== window.location.origin });
72
73
  } catch {
73
74
  return e;
74
75
  }
75
76
  }
76
77
  function S() {
77
- let x = e(), S = fe(), Me = de(), [C] = pe(), { signIn: Ne, isLoading: Pe, error: w, errorCode: Fe, resendVerification: Ie } = t(), { completeAuthFlow: Le } = n(), { setWorkspace: Re, setOrganization: ze } = me(), { defaultPostLoginPath: T, navigate: Be } = c(), { initiateGoogleOAuth: Ve, initiateMicrosoftOAuth: He, isProviderConfigured: E } = r(), Ue = s((e) => e.mfaRequired), { executeRecaptcha: We } = ae(), [D, O] = m(!1), [Ge, Ke] = m(!1), k = se(async (e) => {
78
- if (typeof window > "u" || De()) return e;
78
+ let b = e(), S = he(), C = me(), [w] = ge(), { signIn: Pe, isLoading: T, error: E, errorCode: Fe, resendVerification: Ie } = t(), { completeAuthFlow: Le } = n(), { setWorkspace: Re, setOrganization: ze } = _e(), { defaultPostLoginPath: D, navigate: Be } = c(), { initiateGoogleOAuth: Ve, initiateMicrosoftOAuth: He, isProviderConfigured: O } = r(), Ue = s((e) => e.mfaRequired), { executeRecaptcha: We } = oe(), [k, Ge] = p(!1), [Ke, qe] = p(!1), A = ue(async (e) => {
79
+ if (typeof window > "u" || y()) return e;
79
80
  try {
80
- let t = be(), n = new URL(t.url), r = window.location.origin;
81
+ let t = Ce(), n = new URL(t.url), r = window.location.origin;
81
82
  if (n.origin === r) return e;
82
- let i = new URL(e, r).href, a = Ee();
83
+ let i = new URL(e, r).href, a = v();
83
84
  if (!a) return e;
84
- let o = v(a), s = y(a);
85
+ let o = Oe(a), s = ke(a);
85
86
  if (!o || !s) return e;
86
- let c = Te(a), l = {
87
+ let c = Ae(a), l = {
87
88
  ...o,
88
89
  workspaceToken: c
89
90
  };
90
91
  if (o.refreshToken) {
91
- let { globalBaseUrl: e } = xe(), { tokens: t } = await ye(`${e}/global/graphql`, o.refreshToken);
92
+ let { globalBaseUrl: e } = we(), { tokens: t } = await Se(`${e}/global/graphql`, o.refreshToken);
92
93
  t && (l = {
93
94
  ...t,
94
95
  workspaceToken: c
95
96
  });
96
97
  }
97
- return ve(a), ge(n.origin, i, {
98
+ return xe(a), ye(n.origin, i, {
98
99
  profileId: a,
99
100
  tokens: JSON.stringify(l),
100
101
  user: JSON.stringify(s),
101
- profiles: JSON.stringify(b())
102
+ profiles: JSON.stringify(_())
102
103
  });
103
104
  } catch {
104
105
  return e;
105
106
  }
106
- }, []), A = ce(!1), j = se((e) => {
107
+ }, []), j = de(!1), M = ue((e) => {
107
108
  let t = o(e);
108
109
  if (typeof window > "u") {
109
110
  S(t);
@@ -115,12 +116,12 @@ function S() {
115
116
  try {
116
117
  sessionStorage.setItem("bf-post-login-return-to", t);
117
118
  } catch {}
118
- De() ? S(Oe(t)) : (A.current = !0, (async () => {
119
- let e = await Promise.race([k(t), new Promise((e) => {
119
+ y() ? S(je(t)) : (j.current = !0, (async () => {
120
+ let e = await Promise.race([A(t), new Promise((e) => {
120
121
  window.setTimeout(() => e(t), 3e3);
121
122
  })]);
122
- e.includes("/auth/sso-deposit") ? (he(), window.location.assign(e), window.setTimeout(() => {
123
- he(), window.location.replace(e);
123
+ e.includes("/auth/sso-deposit") ? (ve(), window.location.assign(e), window.setTimeout(() => {
124
+ ve(), window.location.replace(e);
124
125
  }, 2500)) : window.location.assign(e), window.setTimeout(() => {
125
126
  typeof window < "u" && window.location.pathname === "/auth/login" && S("/dashboard");
126
127
  }, 3500);
@@ -129,40 +130,40 @@ function S() {
129
130
  }, [
130
131
  S,
131
132
  Be,
132
- k
133
- ]), [M, qe] = m(!1), [N, P] = m(!1), [Je, F] = m(!1), [Ye, I] = m(!1), [L, R] = m(!1), [z, B] = m(!1), [Xe, Ze] = m(!1), [Qe, V] = m(!1), [$e, H] = m(null), [et, U] = m(null), [W, G] = m({
133
+ A
134
+ ]), [N, Je] = p(!1), [P, F] = p(!1), [Ye, I] = p(!1), [Xe, L] = p(!1), [R, z] = p(!1), [B, V] = p(!1), [Ze, Qe] = p(!1), [$e, H] = p(!1), [et, U] = p(null), [tt, W] = p(null), [G, K] = p({
134
135
  email: "",
135
136
  password: "",
136
137
  rememberMe: !1
137
- }), [K, q] = m(null), [tt, J] = m(!1), Y = C.get("mode") === "add-account", X = C.get("returnTo"), Z = ce(X), Q = C.get("reason");
138
- p(() => {
139
- Q === "session-expired" ? U(x("auth.login.sessionExpired", "Your session has expired. Please sign in again.")) : Q === "logout" && U(x("auth.login.signedOut", "You have been signed out."));
140
- }, [Q, x]), p(() => {
141
- !Z.current && X && (Z.current = X);
142
- }, [X]), p(() => {
143
- if (Y || D || A.current || _e()) return;
144
- let e = Ee();
138
+ }), [q, J] = p(null), [nt, Y] = p(!1), X = w.get("mode") === "add-account", Z = w.get("returnTo"), Q = de(Z), $ = w.get("reason");
139
+ f(() => {
140
+ $ === "session-expired" ? W(b("auth.login.sessionExpired", "Your session has expired. Please sign in again.")) : $ === "logout" && W(b("auth.login.signedOut", "You have been signed out."));
141
+ }, [$, b]), f(() => {
142
+ !Q.current && Z && (Q.current = Z);
143
+ }, [Z]), f(() => {
144
+ if (X || k || j.current || be()) return;
145
+ let e = v();
145
146
  if (e) {
146
- let t = v(e), n = y(e);
147
- if (t?.accessToken && n && ke(t.accessToken)) {
148
- s.getState().loadFromProfile(e), j(Ae(X) ?? T ?? "/");
147
+ let t = Oe(e), n = ke(e);
148
+ if (t?.accessToken && n && Me(t.accessToken)) {
149
+ s.getState().loadFromProfile(e), M(Ne(Z) ?? D ?? "/");
149
150
  return;
150
151
  }
151
152
  }
152
- if (a(T ?? "", window.location.origin)) return;
153
- let t = ue();
154
- t && (Ke(!0), window.location.replace(t));
153
+ if (a(D ?? "", window.location.origin)) return;
154
+ let t = pe();
155
+ t && (qe(!0), window.location.replace(t));
155
156
  }, [
156
- Y,
157
- D,
158
- j,
159
157
  X,
160
- T
161
- ]), p(() => {
158
+ k,
159
+ M,
160
+ Z,
161
+ D
162
+ ]), f(() => {
162
163
  try {
163
164
  localStorage.removeItem("remembered_password");
164
165
  let e = localStorage.getItem("remembered_email");
165
- e && G((t) => ({
166
+ e && K((t) => ({
166
167
  ...t,
167
168
  email: e,
168
169
  rememberMe: !0
@@ -170,14 +171,14 @@ function S() {
170
171
  } catch (e) {
171
172
  console.warn("[LoginPage] Failed to load remembered email:", e);
172
173
  }
173
- }, []), p(() => {
174
- let e = Me.state;
175
- e?.message && U(e.message), e?.email && G((t) => ({
174
+ }, []), f(() => {
175
+ let e = C.state;
176
+ e?.message && W(e.message), e?.email && K((t) => ({
176
177
  ...t,
177
178
  email: e.email
178
179
  })), e && window.history.replaceState({}, document.title);
179
- }, [Me.state]);
180
- let nt = (e, t) => {
180
+ }, [C.state]);
181
+ let rt = (e, t) => {
181
182
  if (t) switch (t) {
182
183
  case "ACCOUNT_DELETED": return "DELETED";
183
184
  case "ACCOUNT_SUSPENDED": return "SUSPENDED";
@@ -189,39 +190,39 @@ function S() {
189
190
  let n = e.toLowerCase();
190
191
  return n.includes("deleted") || n.includes("permanently deleted") ? "DELETED" : n.includes("suspended") ? "SUSPENDED" : n.includes("oauth provider") || n.includes("oauth-only") || n.includes("oauth only") ? "OAUTH_ONLY" : n.includes("inactive") || n.includes("deactivated") || n.includes("not active") ? "INACTIVE" : n.includes("verify your email") || n.includes("email not verified") || n.includes("email_not_verified") ? "EMAIL_NOT_VERIFIED" : null;
191
192
  };
192
- p(() => {
193
- let e = C.get("email");
194
- if (e && G((t) => ({
193
+ f(() => {
194
+ let e = w.get("email");
195
+ if (e && K((t) => ({
195
196
  ...t,
196
197
  email: e
197
- })), C.get("expired") === "true") {
198
- U(x("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
198
+ })), w.get("expired") === "true") {
199
+ W(b("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
199
200
  let e = window.location.pathname;
200
201
  window.history.replaceState({}, document.title, e);
201
202
  }
202
- }, [C, x]), p(() => {
203
+ }, [w, b]), f(() => {
203
204
  Ue && S("/auth/mfa-verify");
204
205
  }, [Ue, S]);
205
- let rt = async (e) => {
206
- e.preventDefault(), P(!1), F(!1), I(!1), R(!1), B(!1), J(!1), V(!1), q(null);
207
- let t = (W.email ?? "").trim();
208
- if (!t) q(x("auth.login.enterEmailOrUsername", "Please enter your email or username"));
209
- else if (t.includes("@") && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)) q(x("auth.login.invalidEmail", "Please enter a valid email address"));
210
- else if (!W.password || W.password.length < 1) q(x("auth.login.enterPassword", "Please enter your password"));
211
- else if (Y && b().some((e) => e.email.toLowerCase() === t.toLowerCase())) J(!0), q(null);
206
+ let it = async (e) => {
207
+ e.preventDefault(), F(!1), I(!1), L(!1), z(!1), V(!1), Y(!1), H(!1), J(null);
208
+ let t = (G.email ?? "").trim();
209
+ if (!t) J(b("auth.login.enterEmailOrUsername", "Please enter your email or username"));
210
+ else if (t.includes("@") && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)) J(b("auth.login.invalidEmail", "Please enter a valid email address"));
211
+ else if (!G.password || G.password.length < 1) J(b("auth.login.enterPassword", "Please enter your password"));
212
+ else if (X && _().some((e) => e.email.toLowerCase() === t.toLowerCase())) Y(!0), J(null);
212
213
  else {
213
- J(!1);
214
+ Y(!1);
214
215
  try {
215
- let e = await We("login"), n = await Ne({
216
+ let e = await We("login"), n = await Pe({
216
217
  email: t,
217
- password: W.password,
218
- rememberMe: W.rememberMe,
218
+ password: G.password,
219
+ rememberMe: G.rememberMe,
219
220
  ...e ? { recaptchaToken: e } : {}
220
221
  });
221
222
  if (n.requiresMFA) {
222
- let e = je(Z.current || X || (T ?? "/dashboard"));
223
+ let e = x(Q.current || Z || (D ?? "/dashboard"));
223
224
  try {
224
- sessionStorage.setItem(oe, e);
225
+ sessionStorage.setItem(se, e);
225
226
  } catch {}
226
227
  return;
227
228
  }
@@ -237,12 +238,12 @@ function S() {
237
238
  }
238
239
  } catch {}
239
240
  try {
240
- W.rememberMe ? localStorage.setItem("remembered_email", t) : localStorage.removeItem("remembered_email");
241
+ G.rememberMe ? localStorage.setItem("remembered_email", t) : localStorage.removeItem("remembered_email");
241
242
  } catch (e) {
242
243
  console.warn("[LoginPage] Failed to save/clear remembered email:", e);
243
244
  }
244
- O(!0);
245
- let e = je(Z.current || X || (T ?? "/dashboard"));
245
+ Ge(!0);
246
+ let e = x(Q.current || Z || (D ?? "/dashboard"));
246
247
  try {
247
248
  let t = await Promise.race([Le(n.token), new Promise((e) => {
248
249
  window.setTimeout(() => {
@@ -252,279 +253,279 @@ function S() {
252
253
  });
253
254
  }, 5e3);
254
255
  })]);
255
- t.success ? (t.workspace && (Re(t.workspace.id), t.workspace.organizationId && ze(t.workspace.organizationId)), j(e)) : t.error?.includes("No workspaces found") ? i(e, T, window.location.origin) ? j(e) : S("/onboarding/create-workspace") : (t.workspace && (Re(t.workspace.id), t.workspace.organizationId && ze(t.workspace.organizationId)), console.warn("Auth flow warning:", t.error), j(e));
256
+ t.success ? (t.workspace && (Re(t.workspace.id), t.workspace.organizationId && ze(t.workspace.organizationId)), M(e)) : t.error?.includes("No workspaces found") ? i(e, D, window.location.origin) ? M(e) : S("/onboarding/create-workspace") : (t.workspace && (Re(t.workspace.id), t.workspace.organizationId && ze(t.workspace.organizationId)), console.warn("Auth flow warning:", t.error), M(e));
256
257
  } catch (t) {
257
- console.error("Auth flow error (login succeeded):", t), j(e);
258
+ console.error("Auth flow error (login succeeded):", t), M(e);
258
259
  } finally {
259
- A.current || O(!1);
260
+ j.current || Ge(!1);
260
261
  }
261
262
  }
262
263
  } catch (e) {
263
264
  let t = e instanceof Error ? e.message : String(e);
264
- t.includes("reCAPTCHA") && q(t);
265
- let n = s.getState().errorCode, r = nt(t, n);
266
- r === "DELETED" ? F(!0) : r === "SUSPENDED" ? I(!0) : r === "OAUTH_ONLY" ? R(!0) : r === "INACTIVE" ? P(!0) : r === "EMAIL_NOT_VERIFIED" && B(!0);
265
+ t.includes("reCAPTCHA") && J(t);
266
+ let n = s.getState().errorCode, r = rt(t, n);
267
+ r === "DELETED" ? I(!0) : r === "SUSPENDED" ? L(!0) : r === "OAUTH_ONLY" ? z(!0) : r === "INACTIVE" ? F(!0) : r === "EMAIL_NOT_VERIFIED" && V(!0);
267
268
  }
268
269
  }
269
270
  };
270
- p(() => {
271
- if (w) {
272
- let e = nt(w, Fe);
273
- e === "DELETED" ? F(!0) : e === "SUSPENDED" ? I(!0) : e === "OAUTH_ONLY" ? R(!0) : e === "INACTIVE" ? P(!0) : e === "EMAIL_NOT_VERIFIED" && B(!0);
271
+ f(() => {
272
+ if (E) {
273
+ let e = rt(E, Fe);
274
+ e === "DELETED" ? I(!0) : e === "SUSPENDED" ? L(!0) : e === "OAUTH_ONLY" ? z(!0) : e === "INACTIVE" ? F(!0) : e === "EMAIL_NOT_VERIFIED" && V(!0);
274
275
  }
275
- }, [w, Fe]);
276
- let it = () => {
277
- H(null);
276
+ }, [E, Fe]);
277
+ let at = () => {
278
+ U(null);
278
279
  try {
279
280
  Ve();
280
281
  } catch (e) {
281
- H(e instanceof Error ? e.message : x("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
282
+ U(e instanceof Error ? e.message : b("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
282
283
  }
283
- }, at = () => {
284
- H(null);
284
+ }, ot = () => {
285
+ U(null);
285
286
  try {
286
287
  He();
287
288
  } catch (e) {
288
- H(e instanceof Error ? e.message : x("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
289
+ U(e instanceof Error ? e.message : b("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
289
290
  }
290
- }, ot = async () => {
291
- Ze(!0), V(!1);
291
+ }, st = async () => {
292
+ Qe(!0), H(!1);
292
293
  try {
293
- let e = (W.email ?? "").trim();
294
- (await Ie(e)).success ? V(!0) : q(x("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
294
+ let e = (G.email ?? "").trim();
295
+ (await Ie(e)).success ? H(!0) : J(b("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
295
296
  } catch (e) {
296
- console.error("Failed to resend verification email:", e), q(e instanceof Error ? e.message : x("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
297
+ console.error("Failed to resend verification email:", e), J(e instanceof Error ? e.message : b("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
297
298
  } finally {
298
- Ze(!1);
299
+ Qe(!1);
299
300
  }
300
- }, st = E("google"), $ = E("microsoft"), ct = [{
301
+ }, ct = O("google"), lt = O("microsoft"), ut = [{
301
302
  name: "Google",
302
- icon: re,
303
- onClick: it,
304
- disabled: !st,
305
- tooltip: st ? void 0 : x("auth.login.googleNotConfigured", "Google sign in is not configured")
306
- }, {
307
- name: "Microsoft",
308
303
  icon: d,
309
304
  onClick: at,
310
- disabled: !$,
311
- tooltip: $ ? void 0 : x("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
305
+ disabled: !ct,
306
+ tooltip: ct ? void 0 : b("auth.login.googleNotConfigured", "Google sign in is not configured")
307
+ }, {
308
+ name: "Microsoft",
309
+ icon: ie,
310
+ onClick: ot,
311
+ disabled: !lt,
312
+ tooltip: lt ? void 0 : b("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
312
313
  }];
313
- return Ge ? /* @__PURE__ */ g(le, {}) : /* @__PURE__ */ _(l, {
314
- title: x("auth.login.welcomeBack", "Welcome back"),
315
- subtitle: x("auth.login.enterCredentials", "Enter your credentials to continue"),
314
+ return Ke ? /* @__PURE__ */ h(fe, {}) : /* @__PURE__ */ g(l, {
315
+ title: b("auth.login.welcomeBack", "Welcome back"),
316
+ subtitle: b("auth.login.enterCredentials", "Enter your credentials to continue"),
316
317
  children: [
317
- /* @__PURE__ */ g(we, {
318
+ /* @__PURE__ */ h(De, {
318
319
  className: "mb-5",
319
- children: x("auth.login.purpose", "Sign in to reach your workspaces, agents, and settings. Use your email and password, a social provider, or a passwordless magic link.")
320
+ children: b("auth.login.purpose", "Sign in to reach your workspaces, agents, and settings. Use your email and password, a social provider, or a passwordless magic link.")
320
321
  }),
321
- /* @__PURE__ */ _("form", {
322
- onSubmit: rt,
322
+ /* @__PURE__ */ g("form", {
323
+ onSubmit: it,
323
324
  className: "space-y-5",
324
325
  children: [
325
- et && /* @__PURE__ */ _("div", {
326
+ tt && /* @__PURE__ */ g("div", {
326
327
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-info-bg-subtle border-status-info-border",
327
- children: [/* @__PURE__ */ g("svg", {
328
+ children: [/* @__PURE__ */ h("svg", {
328
329
  className: "size-5 flex-shrink-0 mt-0.5 text-text-link",
329
330
  fill: "none",
330
331
  viewBox: "0 0 24 24",
331
332
  stroke: "currentColor",
332
- children: /* @__PURE__ */ g("path", {
333
+ children: /* @__PURE__ */ h("path", {
333
334
  strokeLinecap: "round",
334
335
  strokeLinejoin: "round",
335
336
  strokeWidth: 2,
336
337
  d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
337
338
  })
338
- }), /* @__PURE__ */ g("p", {
339
+ }), /* @__PURE__ */ h("p", {
339
340
  className: "text-sm text-status-info-text",
340
- children: et
341
+ children: tt
341
342
  })]
342
343
  }),
343
- K && /* @__PURE__ */ _("div", {
344
+ q && /* @__PURE__ */ g("div", {
344
345
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
345
- children: [/* @__PURE__ */ g(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ g("p", {
346
+ children: [/* @__PURE__ */ h(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ h("p", {
346
347
  className: "text-sm text-status-warning-text",
347
- children: K
348
+ children: q
348
349
  })]
349
350
  }),
350
- tt && /* @__PURE__ */ _("div", {
351
+ nt && /* @__PURE__ */ g("div", {
351
352
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
352
- children: [/* @__PURE__ */ g(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ _("div", {
353
+ children: [/* @__PURE__ */ h(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ g("div", {
353
354
  className: "flex-1",
354
355
  children: [
355
- /* @__PURE__ */ g("p", {
356
+ /* @__PURE__ */ h("p", {
356
357
  className: "text-sm font-medium text-status-warning-text",
357
- children: x("auth.login.duplicateAccount", "This account is already signed in.")
358
+ children: b("auth.login.duplicateAccount", "This account is already signed in.")
358
359
  }),
359
- /* @__PURE__ */ g("p", {
360
+ /* @__PURE__ */ h("p", {
360
361
  className: "mt-1 text-sm text-status-warning-text/80",
361
- children: x("auth.login.duplicateAccountHint", "Please use a different account, or go back and switch to this account from the profile menu.")
362
+ children: b("auth.login.duplicateAccountHint", "Please use a different account, or go back and switch to this account from the profile menu.")
362
363
  }),
363
- (Z.current || X) && /* @__PURE__ */ _("button", {
364
+ (Q.current || Z) && /* @__PURE__ */ g("button", {
364
365
  type: "button",
365
- onClick: () => S(decodeURIComponent(Z.current || X || "/dashboard")),
366
+ onClick: () => S(decodeURIComponent(Q.current || Z || "/dashboard")),
366
367
  className: "mt-3 inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm",
367
- children: [/* @__PURE__ */ g("svg", {
368
+ children: [/* @__PURE__ */ h("svg", {
368
369
  className: "size-4",
369
370
  fill: "none",
370
371
  viewBox: "0 0 24 24",
371
372
  stroke: "currentColor",
372
- children: /* @__PURE__ */ g("path", {
373
+ children: /* @__PURE__ */ h("path", {
373
374
  strokeLinecap: "round",
374
375
  strokeLinejoin: "round",
375
376
  strokeWidth: 2,
376
377
  d: "M10 19l-7-7m0 0l7-7m-7 7h18"
377
378
  })
378
- }), x("auth.login.goBackSwitchAccount", "Go back and switch account")]
379
+ }), b("auth.login.goBackSwitchAccount", "Go back and switch account")]
379
380
  })
380
381
  ]
381
382
  })]
382
383
  }),
383
- w && !K && !tt && /* @__PURE__ */ _("div", {
384
- className: `flex items-start gap-3 p-4 rounded-xl border ${N || L || z ? "bg-status-warning-bg-subtle border-status-warning-border" : "bg-status-error-bg-subtle border-status-error-border"}`,
385
- children: [/* @__PURE__ */ g(u, { className: `size-5 flex-shrink-0 mt-0.5 ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ _("div", {
384
+ E && !q && !nt && /* @__PURE__ */ g("div", {
385
+ className: `flex items-start gap-3 p-4 rounded-xl border ${P || R || B ? "bg-status-warning-bg-subtle border-status-warning-border" : "bg-status-error-bg-subtle border-status-error-border"}`,
386
+ children: [/* @__PURE__ */ h(u, { className: `size-5 flex-shrink-0 mt-0.5 ${P || R || B ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ g("div", {
386
387
  className: "flex-1",
387
388
  children: [
388
- /* @__PURE__ */ g("p", {
389
- className: `text-sm ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}`,
390
- children: Je ? x("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Ye ? x("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : N ? x("auth.login.accountDeactivated", "Your account has been deactivated.") : L ? x("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : z ? x("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : w
389
+ /* @__PURE__ */ h("p", {
390
+ className: `text-sm ${P || R || B ? "text-status-warning-text" : "text-status-error-text"}`,
391
+ children: Ye ? b("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Xe ? b("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : P ? b("auth.login.accountDeactivated", "Your account has been deactivated.") : R ? b("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : B ? b("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : E
391
392
  }),
392
- N && /* @__PURE__ */ g("button", {
393
+ P && /* @__PURE__ */ h("button", {
393
394
  type: "button",
394
- onClick: () => S("/auth/reactivate", { state: { email: W.email } }),
395
+ onClick: () => S("/auth/reactivate", { state: { email: G.email } }),
395
396
  className: "mt-2 text-sm font-semibold text-status-warning-text hover:text-status-warning-text underline underline-offset-2",
396
- children: x("auth.login.clickReactivate", "Click here to reactivate your account")
397
+ children: b("auth.login.clickReactivate", "Click here to reactivate your account")
397
398
  }),
398
- z && /* @__PURE__ */ g("div", {
399
+ B && /* @__PURE__ */ h("div", {
399
400
  className: "mt-3",
400
- children: Qe ? /* @__PURE__ */ _("div", {
401
+ children: $e ? /* @__PURE__ */ g("div", {
401
402
  className: "flex items-center gap-2 text-sm text-status-success-text",
402
- children: [/* @__PURE__ */ g("svg", {
403
+ children: [/* @__PURE__ */ h("svg", {
403
404
  className: "size-4",
404
405
  fill: "none",
405
406
  viewBox: "0 0 24 24",
406
407
  stroke: "currentColor",
407
- children: /* @__PURE__ */ g("path", {
408
+ children: /* @__PURE__ */ h("path", {
408
409
  strokeLinecap: "round",
409
410
  strokeLinejoin: "round",
410
411
  strokeWidth: 2,
411
412
  d: "M5 13l4 4L19 7"
412
413
  })
413
- }), x("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
414
- }) : /* @__PURE__ */ g("button", {
414
+ }), b("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
415
+ }) : /* @__PURE__ */ h("button", {
415
416
  type: "button",
416
- onClick: ot,
417
- disabled: Xe,
417
+ onClick: st,
418
+ disabled: Ze,
418
419
  className: "inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
419
- children: Xe ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(f, { className: "size-4 animate-spin" }), x("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("svg", {
420
+ children: Ze ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(ae, { className: "size-4 animate-spin" }), b("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("svg", {
420
421
  className: "size-4",
421
422
  fill: "none",
422
423
  viewBox: "0 0 24 24",
423
424
  stroke: "currentColor",
424
- children: /* @__PURE__ */ g("path", {
425
+ children: /* @__PURE__ */ h("path", {
425
426
  strokeLinecap: "round",
426
427
  strokeLinejoin: "round",
427
428
  strokeWidth: 2,
428
429
  d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
429
430
  })
430
- }), x("auth.login.resendVerification", "Resend verification email")] })
431
+ }), b("auth.login.resendVerification", "Resend verification email")] })
431
432
  })
432
433
  }),
433
- L && /* @__PURE__ */ _("div", {
434
+ R && /* @__PURE__ */ g("div", {
434
435
  className: "mt-3 flex flex-col gap-2",
435
- children: [E("google") && /* @__PURE__ */ _("button", {
436
+ children: [O("google") && /* @__PURE__ */ g("button", {
436
437
  type: "button",
437
- onClick: it,
438
+ onClick: at,
438
439
  className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
439
- children: [/* @__PURE__ */ g(re, { className: "size-5" }), x("auth.login.signInWithGoogle", "Sign in with Google")]
440
- }), E("microsoft") && /* @__PURE__ */ _("button", {
440
+ children: [/* @__PURE__ */ h(d, { className: "size-5" }), b("auth.login.signInWithGoogle", "Sign in with Google")]
441
+ }), O("microsoft") && /* @__PURE__ */ g("button", {
441
442
  type: "button",
442
- onClick: at,
443
+ onClick: ot,
443
444
  className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
444
- children: [/* @__PURE__ */ g(d, { className: "size-5" }), x("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
445
+ children: [/* @__PURE__ */ h(ie, { className: "size-5" }), b("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
445
446
  })]
446
447
  })
447
448
  ]
448
449
  })]
449
450
  }),
450
- /* @__PURE__ */ _("div", {
451
+ /* @__PURE__ */ g("div", {
451
452
  className: "space-y-2",
452
- children: [/* @__PURE__ */ g("label", {
453
+ children: [/* @__PURE__ */ h("label", {
453
454
  htmlFor: "email",
454
455
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
455
- children: x("auth.login.emailLabel", "Email")
456
- }), /* @__PURE__ */ _("div", {
456
+ children: b("auth.login.emailLabel", "Email")
457
+ }), /* @__PURE__ */ g("div", {
457
458
  className: "relative",
458
- children: [/* @__PURE__ */ g("div", {
459
+ children: [/* @__PURE__ */ h("div", {
459
460
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
460
- children: /* @__PURE__ */ g(ee, { className: "size-5 text-[var(--color-text-tertiary)]" })
461
- }), /* @__PURE__ */ g("input", {
461
+ children: /* @__PURE__ */ h(ee, { className: "size-5 text-[var(--color-text-tertiary)]" })
462
+ }), /* @__PURE__ */ h("input", {
462
463
  id: "email",
463
464
  type: "email",
464
465
  autoComplete: "email",
465
466
  required: !0,
466
467
  "aria-required": "true",
467
- "aria-label": x("auth.login.emailLabel", "Email"),
468
- value: W.email,
469
- onChange: (e) => G({
470
- ...W,
468
+ "aria-label": b("auth.login.emailLabel", "Email"),
469
+ value: G.email,
470
+ onChange: (e) => K({
471
+ ...G,
471
472
  email: e.target.value
472
473
  }),
473
474
  className: "block w-full pl-[3.5rem] pr-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
474
- placeholder: x("auth.login.emailPlaceholder", "you@example.com")
475
+ placeholder: b("auth.login.emailPlaceholder", "you@example.com")
475
476
  })]
476
477
  })]
477
478
  }),
478
- /* @__PURE__ */ _("div", {
479
+ /* @__PURE__ */ g("div", {
479
480
  className: "space-y-2",
480
- children: [/* @__PURE__ */ g("label", {
481
+ children: [/* @__PURE__ */ h("label", {
481
482
  htmlFor: "password",
482
483
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
483
- children: x("auth.login.passwordLabel", "Password")
484
- }), /* @__PURE__ */ _("div", {
484
+ children: b("auth.login.passwordLabel", "Password")
485
+ }), /* @__PURE__ */ g("div", {
485
486
  className: "relative",
486
487
  children: [
487
- /* @__PURE__ */ g("div", {
488
+ /* @__PURE__ */ h("div", {
488
489
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
489
- children: /* @__PURE__ */ g(ie, { className: "size-5 text-[var(--color-text-tertiary)]" })
490
+ children: /* @__PURE__ */ h(re, { className: "size-5 text-[var(--color-text-tertiary)]" })
490
491
  }),
491
- /* @__PURE__ */ g("input", {
492
+ /* @__PURE__ */ h("input", {
492
493
  id: "password",
493
- type: M ? "text" : "password",
494
+ type: N ? "text" : "password",
494
495
  autoComplete: "current-password",
495
496
  required: !0,
496
497
  "aria-required": "true",
497
- "aria-label": x("auth.login.passwordLabel", "Password"),
498
- value: W.password,
499
- onChange: (e) => G({
500
- ...W,
498
+ "aria-label": b("auth.login.passwordLabel", "Password"),
499
+ value: G.password,
500
+ onChange: (e) => K({
501
+ ...G,
501
502
  password: e.target.value
502
503
  }),
503
504
  className: "block w-full pl-[3.5rem] pr-12 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
504
- placeholder: x("auth.login.passwordPlaceholder", "Enter your password")
505
+ placeholder: b("auth.login.passwordPlaceholder", "Enter your password")
505
506
  }),
506
- /* @__PURE__ */ g("button", {
507
+ /* @__PURE__ */ h("button", {
507
508
  type: "button",
508
- onClick: () => qe(!M),
509
- "aria-label": M ? x("auth.login.hidePassword", "Hide password") : x("auth.login.showPassword", "Show password"),
509
+ onClick: () => Je(!N),
510
+ "aria-label": N ? b("auth.login.hidePassword", "Hide password") : b("auth.login.showPassword", "Show password"),
510
511
  className: "absolute inset-y-0 right-0 pr-3.5 flex items-center text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)] transition-colors",
511
- children: g(M ? ne : te, { className: "size-5" })
512
+ children: h(N ? ne : te, { className: "size-5" })
512
513
  })
513
514
  ]
514
515
  })]
515
516
  }),
516
- /* @__PURE__ */ _("div", {
517
+ /* @__PURE__ */ g("div", {
517
518
  className: "flex items-center justify-between",
518
- children: [/* @__PURE__ */ _("label", {
519
+ children: [/* @__PURE__ */ g("label", {
519
520
  htmlFor: "remember-me",
520
521
  className: "flex items-center gap-2 cursor-pointer group",
521
- children: [/* @__PURE__ */ g(Ce, {
522
+ children: [/* @__PURE__ */ h(Ee, {
522
523
  id: "remember-me",
523
- checked: W.rememberMe,
524
+ checked: G.rememberMe,
524
525
  onCheckedChange: (e) => {
525
526
  let t = e === !0;
526
- if (G({
527
- ...W,
527
+ if (K({
528
+ ...G,
528
529
  rememberMe: t
529
530
  }), !t) try {
530
531
  localStorage.removeItem("remembered_email");
@@ -532,89 +533,89 @@ function S() {
532
533
  console.warn("[LoginPage] Failed to clear remembered email:", e);
533
534
  }
534
535
  },
535
- "aria-label": x("auth.login.rememberMe", "Remember me")
536
- }), /* @__PURE__ */ g("span", {
536
+ "aria-label": b("auth.login.rememberMe", "Remember me")
537
+ }), /* @__PURE__ */ h("span", {
537
538
  className: "text-sm text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)] transition-colors",
538
- children: x("auth.login.rememberMe", "Remember me")
539
+ children: b("auth.login.rememberMe", "Remember me")
539
540
  })]
540
- }), /* @__PURE__ */ g("button", {
541
+ }), /* @__PURE__ */ h("button", {
541
542
  type: "button",
542
543
  onClick: () => S("/auth/reset-password"),
543
544
  className: "text-sm font-medium text-text-link hover:text-text-linkHover transition-colors",
544
- children: x("auth.login.forgotPassword", "Forgot password?")
545
+ children: b("auth.login.forgotPassword", "Forgot password?")
545
546
  })]
546
547
  }),
547
- /* @__PURE__ */ g(Se, {
548
+ /* @__PURE__ */ h(Te, {
548
549
  type: "submit",
549
- disabled: Pe || D,
550
+ disabled: T || k,
550
551
  variant: "default",
551
552
  size: "lg",
552
553
  className: "w-full font-semibold",
553
- children: Pe || D ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(f, { className: "size-5 animate-spin" }), /* @__PURE__ */ g("span", { children: D ? x("auth.login.settingUpWorkspace", "Setting up workspace...") : x("auth.login.signingIn", "Signing in...") })] }) : x("auth.login.signIn", "Sign in")
554
+ children: T || k ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(ae, { className: "size-5 animate-spin" }), /* @__PURE__ */ h("span", { children: k ? b("auth.login.settingUpWorkspace", "Setting up workspace...") : b("auth.login.signingIn", "Signing in...") })] }) : b("auth.login.signIn", "Sign in")
554
555
  })
555
556
  ]
556
557
  }),
557
- /* @__PURE__ */ _("div", {
558
+ /* @__PURE__ */ g("div", {
558
559
  className: "relative my-8",
559
- children: [/* @__PURE__ */ g("div", {
560
+ children: [/* @__PURE__ */ h("div", {
560
561
  className: "absolute inset-0 flex items-center",
561
- children: /* @__PURE__ */ g("div", { className: "w-full border-t border-[var(--color-border-default)]" })
562
- }), /* @__PURE__ */ g("div", {
562
+ children: /* @__PURE__ */ h("div", { className: "w-full border-t border-[var(--color-border-default)]" })
563
+ }), /* @__PURE__ */ h("div", {
563
564
  className: "relative flex justify-center",
564
- children: /* @__PURE__ */ g("span", {
565
+ children: /* @__PURE__ */ h("span", {
565
566
  className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
566
- children: x("auth.login.orContinueWith", "or continue with")
567
+ children: b("auth.login.orContinueWith", "or continue with")
567
568
  })
568
569
  })]
569
570
  }),
570
- $e && /* @__PURE__ */ _("div", {
571
+ et && /* @__PURE__ */ g("div", {
571
572
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
572
- children: [/* @__PURE__ */ g(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ g("p", {
573
+ children: [/* @__PURE__ */ h(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ h("p", {
573
574
  className: "text-sm text-status-error-text",
574
- children: $e
575
+ children: et
575
576
  })]
576
577
  }),
577
- /* @__PURE__ */ g("div", {
578
+ /* @__PURE__ */ h("div", {
578
579
  className: "grid grid-cols-3 gap-3",
579
- children: ct.map((e) => /* @__PURE__ */ _("button", {
580
+ children: ut.map((e) => /* @__PURE__ */ g("button", {
580
581
  type: "button",
581
582
  onClick: e.onClick,
582
583
  disabled: e.disabled,
583
584
  title: e.tooltip,
584
585
  "aria-label": e.name,
585
586
  className: `flex items-center justify-center gap-2 px-4 py-3 rounded-xl border transition-all duration-200 group ${e.disabled ? "border-[var(--color-border-subtle)] bg-[var(--color-bg-disabled)] cursor-not-allowed opacity-50" : "border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:bg-[var(--color-bg-sunken)] hover:border-[var(--color-border-strong)]"}`,
586
- children: [/* @__PURE__ */ g(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ g("span", {
587
+ children: [/* @__PURE__ */ h(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ h("span", {
587
588
  className: `sr-only sm:not-sr-only text-sm font-medium transition-colors ${e.disabled ? "text-[var(--color-text-disabled)]" : "text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)]"}`,
588
589
  children: e.name
589
590
  })]
590
591
  }, e.name))
591
592
  }),
592
- /* @__PURE__ */ g("div", {
593
+ /* @__PURE__ */ h("div", {
593
594
  className: "mt-4 text-center",
594
- children: /* @__PURE__ */ _("button", {
595
+ children: /* @__PURE__ */ g("button", {
595
596
  type: "button",
596
597
  onClick: () => S("/auth/magic-link"),
597
598
  className: "text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
598
599
  children: [
599
- x("auth.login.preferPasswordless", "Prefer passwordless login?"),
600
+ b("auth.login.preferPasswordless", "Prefer passwordless login?"),
600
601
  " ",
601
- /* @__PURE__ */ g("span", {
602
+ /* @__PURE__ */ h("span", {
602
603
  className: "font-semibold text-text-link hover:text-text-linkHover",
603
- children: x("auth.login.signInMagicLink", "Sign in with Magic Link")
604
+ children: b("auth.login.signInMagicLink", "Sign in with Magic Link")
604
605
  })
605
606
  ]
606
607
  })
607
608
  }),
608
- /* @__PURE__ */ _("p", {
609
+ /* @__PURE__ */ g("p", {
609
610
  className: "mt-6 text-center text-sm text-[var(--color-text-secondary)]",
610
611
  children: [
611
- x("auth.login.dontHaveAccount", "Don't have an account?"),
612
+ b("auth.login.dontHaveAccount", "Don't have an account?"),
612
613
  " ",
613
- /* @__PURE__ */ g("button", {
614
+ /* @__PURE__ */ h("button", {
614
615
  type: "button",
615
- onClick: () => S("/auth/register"),
616
+ onClick: () => S(ce("/auth/register", le(Z))),
616
617
  className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
617
- children: x("auth.login.signUp", "Sign up")
618
+ children: b("auth.login.signUp", "Sign up")
618
619
  })
619
620
  ]
620
621
  })