@burdenoff/microfe-auth 2026.512.1 → 2026.514.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.
Files changed (53) hide show
  1. package/dist/auth/AuthRoutes.d.ts.map +1 -1
  2. package/dist/auth/AuthRoutes.js +94 -58
  3. package/dist/auth/AuthRoutes.js.map +1 -1
  4. package/dist/auth/components/AuthLayout.js +1 -1
  5. package/dist/auth/components/AuthLayout.js.map +1 -1
  6. package/dist/auth/hooks/useApiKeyOperations.d.ts +5 -1
  7. package/dist/auth/hooks/useApiKeyOperations.d.ts.map +1 -1
  8. package/dist/auth/hooks/useAppOperations.d.ts +5 -1
  9. package/dist/auth/hooks/useAppOperations.d.ts.map +1 -1
  10. package/dist/auth/hooks/useDelegationOperations.d.ts +10 -2
  11. package/dist/auth/hooks/useDelegationOperations.d.ts.map +1 -1
  12. package/dist/auth/hooks/useSessionOperations.js +1 -1
  13. package/dist/auth/hooks/useSessionOperations.js.map +1 -1
  14. package/dist/auth/pages/AuditLogPage.d.ts +8 -1
  15. package/dist/auth/pages/AuditLogPage.d.ts.map +1 -1
  16. package/dist/auth/pages/AuditLogPage.js +189 -104
  17. package/dist/auth/pages/AuditLogPage.js.map +1 -1
  18. package/dist/auth/pages/MfaSetupPage.d.ts.map +1 -1
  19. package/dist/auth/pages/MfaSetupPage.js +5 -5
  20. package/dist/auth/pages/MfaSetupPage.js.map +1 -1
  21. package/dist/auth/pages/SecurityPage.d.ts.map +1 -1
  22. package/dist/auth/pages/SecurityPage.js +335 -267
  23. package/dist/auth/pages/SecurityPage.js.map +1 -1
  24. package/dist/auth/pages/SessionsPage.d.ts +6 -0
  25. package/dist/auth/pages/SessionsPage.d.ts.map +1 -1
  26. package/dist/auth/pages/SessionsPage.js +255 -143
  27. package/dist/auth/pages/SessionsPage.js.map +1 -1
  28. package/dist/auth/pages/UserDetailsPage.d.ts.map +1 -1
  29. package/dist/auth/pages/UserDetailsPage.js +1 -1
  30. package/dist/auth/pages/UserDetailsPage.js.map +1 -1
  31. package/dist/auth/pages/UsersPage.d.ts.map +1 -1
  32. package/dist/auth/pages/UsersPage.js +501 -378
  33. package/dist/auth/pages/UsersPage.js.map +1 -1
  34. package/dist/generated/global-operations.d.ts +219 -103
  35. package/dist/generated/global-operations.d.ts.map +1 -1
  36. package/dist/generated/global-operations.js +237 -166
  37. package/dist/generated/global-operations.js.map +1 -1
  38. package/dist/generated/global-types.d.ts +2544 -270
  39. package/dist/generated/global-types.d.ts.map +1 -1
  40. package/dist/generated/wspace-operations.d.ts +41 -1
  41. package/dist/generated/wspace-operations.d.ts.map +1 -1
  42. package/dist/generated/wspace-operations.js +26 -0
  43. package/dist/generated/wspace-operations.js.map +1 -0
  44. package/dist/generated/wspace-types.d.ts +2974 -337
  45. package/dist/generated/wspace-types.d.ts.map +1 -1
  46. package/dist/microfe-auth.css +1 -1
  47. package/dist/translations/en.d.ts +249 -0
  48. package/dist/translations/en.d.ts.map +1 -0
  49. package/package.json +1 -1
  50. package/dist/auth/pages/ApiKeysPage.d.ts +0 -5
  51. package/dist/auth/pages/ApiKeysPage.d.ts.map +0 -1
  52. package/dist/auth/pages/DelegationsPage.d.ts +0 -5
  53. package/dist/auth/pages/DelegationsPage.d.ts.map +0 -1
@@ -2,576 +2,644 @@ import { useAuthStore as e } from "../store/authStore.js";
2
2
  import { useAuthOperations as t } from "../hooks/useAuthOperations.js";
3
3
  import { useAccountOperations as n } from "../hooks/useAccountOperations.js";
4
4
  import "../hooks/index.js";
5
- import { formatDate as r } from "../utils/formatters.js";
6
- import { ConfirmActionDialog as i } from "../components/ConfirmActionDialog.js";
7
- import { nativeImpact as a, nativeNotify as o } from "../../utils/nativeBridge.js";
8
- import { useState as s } from "react";
9
- import { useNavigate as c } from "react-router-dom";
10
- import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell";
11
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { formatDate as ee } from "../utils/formatters.js";
6
+ import { ConfirmActionDialog as r } from "../components/ConfirmActionDialog.js";
7
+ import { nativeImpact as i, nativeNotify as a } from "../../utils/nativeBridge.js";
8
+ import { useEffect as o, useId as s, useRef as c, useState as l } from "react";
9
+ import { useNavigate as u } from "react-router-dom";
10
+ import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
12
12
  //#region src/auth/pages/SecurityPage.tsx
13
- var f = ({ className: e }) => /* @__PURE__ */ u("svg", {
13
+ var m = ({ className: e }) => /* @__PURE__ */ f("svg", {
14
14
  className: e,
15
15
  fill: "none",
16
16
  viewBox: "0 0 24 24",
17
17
  stroke: "currentColor",
18
- children: /* @__PURE__ */ u("path", {
18
+ "aria-hidden": "true",
19
+ children: /* @__PURE__ */ f("path", {
19
20
  strokeLinecap: "round",
20
21
  strokeLinejoin: "round",
21
22
  strokeWidth: 1.5,
22
23
  d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
23
24
  })
24
- }), p = ({ className: e }) => /* @__PURE__ */ u("svg", {
25
+ }), te = ({ className: e }) => /* @__PURE__ */ f("svg", {
25
26
  className: e,
26
27
  fill: "none",
27
28
  viewBox: "0 0 24 24",
28
29
  stroke: "currentColor",
29
- children: /* @__PURE__ */ u("path", {
30
+ "aria-hidden": "true",
31
+ children: /* @__PURE__ */ f("path", {
30
32
  strokeLinecap: "round",
31
33
  strokeLinejoin: "round",
32
34
  strokeWidth: 1.5,
33
35
  d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"
34
36
  })
35
- }), m = ({ className: e }) => /* @__PURE__ */ u("svg", {
37
+ }), ne = ({ className: e }) => /* @__PURE__ */ f("svg", {
36
38
  className: e,
37
39
  fill: "none",
38
40
  viewBox: "0 0 24 24",
39
41
  stroke: "currentColor",
40
- children: /* @__PURE__ */ u("path", {
42
+ "aria-hidden": "true",
43
+ children: /* @__PURE__ */ f("path", {
41
44
  strokeLinecap: "round",
42
45
  strokeLinejoin: "round",
43
46
  strokeWidth: 1.5,
44
47
  d: "M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"
45
48
  })
46
- }), h = ({ className: e }) => /* @__PURE__ */ u("svg", {
49
+ }), re = ({ className: e }) => /* @__PURE__ */ f("svg", {
47
50
  className: e,
48
51
  fill: "none",
49
52
  viewBox: "0 0 24 24",
50
53
  stroke: "currentColor",
51
- children: /* @__PURE__ */ u("path", {
54
+ "aria-hidden": "true",
55
+ children: /* @__PURE__ */ f("path", {
52
56
  strokeLinecap: "round",
53
57
  strokeLinejoin: "round",
54
58
  strokeWidth: 1.5,
55
59
  d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
56
60
  })
57
- }), g = ({ className: e }) => /* @__PURE__ */ u("svg", {
61
+ }), ie = ({ className: e }) => /* @__PURE__ */ f("svg", {
58
62
  className: e,
59
63
  fill: "none",
60
64
  viewBox: "0 0 24 24",
61
65
  stroke: "currentColor",
62
- children: /* @__PURE__ */ u("path", {
66
+ "aria-hidden": "true",
67
+ children: /* @__PURE__ */ f("path", {
63
68
  strokeLinecap: "round",
64
69
  strokeLinejoin: "round",
65
70
  strokeWidth: 1.5,
66
71
  d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
67
72
  })
68
- }), ee = ({ className: e }) => /* @__PURE__ */ u("svg", {
73
+ }), h = ({ className: e }) => /* @__PURE__ */ f("svg", {
69
74
  className: e,
70
75
  fill: "none",
71
76
  viewBox: "0 0 24 24",
72
77
  stroke: "currentColor",
73
- children: /* @__PURE__ */ u("path", {
78
+ "aria-hidden": "true",
79
+ children: /* @__PURE__ */ f("path", {
74
80
  strokeLinecap: "round",
75
81
  strokeLinejoin: "round",
76
82
  strokeWidth: 1.5,
77
83
  d: "M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"
78
84
  })
79
- }), _ = ({ className: e }) => /* @__PURE__ */ u("svg", {
85
+ }), g = ({ className: e }) => /* @__PURE__ */ f("svg", {
80
86
  className: e,
81
87
  fill: "none",
82
88
  viewBox: "0 0 24 24",
83
89
  stroke: "currentColor",
84
- children: /* @__PURE__ */ u("path", {
90
+ "aria-hidden": "true",
91
+ children: /* @__PURE__ */ f("path", {
85
92
  strokeLinecap: "round",
86
93
  strokeLinejoin: "round",
87
94
  strokeWidth: 2,
88
95
  d: "M9 5l7 7-7 7"
89
96
  })
90
- }), v = ({ className: e }) => /* @__PURE__ */ u("svg", {
97
+ }), _ = ({ className: e }) => /* @__PURE__ */ f("svg", {
91
98
  className: e,
92
99
  fill: "currentColor",
93
100
  viewBox: "0 0 20 20",
94
- children: /* @__PURE__ */ u("path", {
101
+ "aria-hidden": "true",
102
+ children: /* @__PURE__ */ f("path", {
95
103
  fillRule: "evenodd",
96
104
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
97
105
  clipRule: "evenodd"
98
106
  })
99
- }), y = ({ className: e }) => /* @__PURE__ */ u("svg", {
107
+ }), ae = ({ className: e }) => /* @__PURE__ */ f("svg", {
100
108
  className: e,
101
109
  fill: "currentColor",
102
110
  viewBox: "0 0 20 20",
103
- children: /* @__PURE__ */ u("path", {
111
+ "aria-hidden": "true",
112
+ children: /* @__PURE__ */ f("path", {
104
113
  fillRule: "evenodd",
105
114
  d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
106
115
  clipRule: "evenodd"
107
116
  })
108
- }), b = ({ className: e }) => /* @__PURE__ */ d("svg", {
117
+ }), v = ({ className: e }) => /* @__PURE__ */ p("svg", {
109
118
  className: e,
110
119
  fill: "none",
111
120
  viewBox: "0 0 24 24",
112
- children: [/* @__PURE__ */ u("circle", {
121
+ "aria-hidden": "true",
122
+ children: [/* @__PURE__ */ f("circle", {
113
123
  className: "opacity-25",
114
124
  cx: "12",
115
125
  cy: "12",
116
126
  r: "10",
117
127
  stroke: "currentColor",
118
128
  strokeWidth: "4"
119
- }), /* @__PURE__ */ u("path", {
129
+ }), /* @__PURE__ */ f("path", {
120
130
  className: "opacity-75",
121
131
  fill: "currentColor",
122
132
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
123
133
  })]
124
- }), x = "DELETE MY ACCOUNT";
125
- function S() {
126
- let { t: S } = l(), C = (e, t) => {
127
- let n = S(e);
134
+ }), y = "DELETE MY ACCOUNT";
135
+ function b() {
136
+ let { t: b } = d(), x = (e, t) => {
137
+ let n = b(e);
128
138
  return n === e ? t : n;
129
- }, w = c(), T = e((e) => e.user), { signOut: E } = t({ disableCurrentUserQuery: !0 }), { deactivateAccount: D, deleteAccount: O, isDeactivating: k, isDeleting: A } = n(), [j, M] = s(!1), [N, P] = s(!1), F = [
139
+ }, S = u(), C = e((e) => e.user), { signOut: oe } = t({ disableCurrentUserQuery: !0 }), { deactivateAccount: se, deleteAccount: ce, isDeactivating: w, isDeleting: T } = n(), [E, D] = l(!1), [le, O] = l(!1), ue = [
130
140
  {
131
- name: C("auth.security.navProfile", "User Profile"),
132
- description: C("auth.security.navProfileDesc", "View and edit your profile information"),
141
+ name: x("auth.security.navProfile", "User Profile"),
142
+ description: x("auth.security.navProfileDesc", "View and edit your profile information"),
133
143
  path: "/auth/profile",
134
- icon: h,
144
+ icon: re,
135
145
  color: "text-accent-teal",
136
146
  bgColor: "bg-accent-teal-subtle"
137
147
  },
138
148
  {
139
- name: C("auth.security.navMfa", "Two-Factor Authentication"),
140
- description: C("auth.security.navMfaDesc", "Secure your account with TOTP"),
149
+ name: x("auth.security.navMfa", "Two-Factor Authentication"),
150
+ description: x("auth.security.navMfaDesc", "Secure your account with TOTP"),
141
151
  path: "/auth/mfa",
142
- icon: p,
152
+ icon: te,
143
153
  color: "text-accent-purple",
144
154
  bgColor: "bg-accent-purple-subtle"
145
155
  },
146
156
  {
147
- name: C("auth.security.navUsers", "Users"),
148
- description: C("auth.security.navUsersDesc", "Manage system users"),
157
+ name: x("auth.security.navUsers", "Users"),
158
+ description: x("auth.security.navUsersDesc", "Manage system users"),
149
159
  path: "/auth/users",
150
- icon: m,
160
+ icon: ne,
151
161
  color: "text-accent-indigo",
152
162
  bgColor: "bg-accent-indigo-subtle",
153
163
  adminOnly: !0
154
164
  }
155
- ], I = [{
156
- name: C("auth.security.navMagicLink", "Magic Link Login"),
157
- description: C("auth.security.navMagicLinkDesc", "Passwordless authentication"),
165
+ ], de = [{
166
+ name: x("auth.security.navMagicLink", "Magic Link Login"),
167
+ description: x("auth.security.navMagicLinkDesc", "Passwordless authentication"),
158
168
  path: "/auth/magic-link",
159
- icon: ee,
169
+ icon: h,
160
170
  color: "text-accent-pink",
161
171
  bgColor: "bg-accent-pink-subtle"
162
172
  }, {
163
- name: C("auth.security.navSso", "SSO Configuration"),
164
- description: C("auth.security.navSsoDesc", "Enterprise single sign-on"),
173
+ name: x("auth.security.navSso", "SSO Configuration"),
174
+ description: x("auth.security.navSsoDesc", "Enterprise single sign-on"),
165
175
  path: "/auth/sso",
166
- icon: g,
176
+ icon: ie,
167
177
  color: "text-accent-cyan",
168
178
  bgColor: "bg-accent-cyan-subtle",
169
179
  adminOnly: !0
170
- }], [L, R] = s(!1), [z, B] = s(!1), [V, H] = s(""), [U, W] = s(""), [G, K] = s(null), [q, J] = s(null), Y = async () => {
171
- M(!0);
180
+ }], [k, A] = l(!1), [j, M] = l(!1), [N, P] = l(""), [F, I] = l(""), [L, R] = l(null), [z, B] = l(null), V = s(), H = s(), U = s(), W = s(), G = s(), K = s(), q = s(), J = c(null), Y = c(null), X = c(null), Z = c(null);
181
+ o(() => {
182
+ k ? X.current?.focus() : J.current?.focus();
183
+ }, [k]), o(() => {
184
+ j ? Z.current?.focus() : Y.current?.focus();
185
+ }, [j]);
186
+ let fe = async () => {
187
+ D(!0);
172
188
  try {
173
- await E(), w("/auth/login"), P(!1);
189
+ await oe(), S("/auth/login"), O(!1);
174
190
  } catch (e) {
175
- console.error("Logout failed:", e), M(!1);
191
+ console.error("Logout failed:", e), D(!1);
176
192
  }
177
- }, X = async () => {
178
- K(null);
193
+ }, pe = async () => {
194
+ R(null);
179
195
  try {
180
- let e = await D(V);
181
- e.success ? w("/auth/login", { replace: !0 }) : K(e.message || C("auth.security.deactivateFailed", "Failed to deactivate account"));
196
+ let e = await se(N);
197
+ e.success ? S("/auth/login", { replace: !0 }) : R(e.message || x("auth.security.deactivateFailed", "Failed to deactivate account"));
182
198
  } catch (e) {
183
- K(e instanceof Error ? e.message : C("auth.security.deactivateFailed", "Failed to deactivate account"));
199
+ R(e instanceof Error ? e.message : x("auth.security.deactivateFailed", "Failed to deactivate account"));
184
200
  }
185
- }, Z = async () => {
186
- if (K(null), U !== x) {
187
- K(C("auth.security.deleteConfirmMismatch", "Please type \"DELETE MY ACCOUNT\" to confirm"));
201
+ }, me = async () => {
202
+ if (R(null), F !== y) {
203
+ R(x("auth.security.deleteConfirmMismatch", "Please type \"DELETE MY ACCOUNT\" to confirm"));
188
204
  return;
189
205
  }
190
- a("medium");
206
+ i("medium");
191
207
  try {
192
- let e = await O(V, U);
193
- e.success ? (o("success"), w("/auth/login", { replace: !0 })) : (o("error"), K(e.message || C("auth.security.deleteFailed", "Failed to delete account")));
208
+ let e = await ce(N, F);
209
+ e.success ? (a("success"), S("/auth/login", { replace: !0 })) : (a("error"), R(e.message || x("auth.security.deleteFailed", "Failed to delete account")));
194
210
  } catch (e) {
195
- o("error"), K(e instanceof Error ? e.message : C("auth.security.deleteFailed", "Failed to delete account"));
211
+ a("error"), R(e instanceof Error ? e.message : x("auth.security.deleteFailed", "Failed to delete account"));
196
212
  }
197
213
  }, Q = () => {
198
- R(!1), B(!1), H(""), W(""), K(null), J(null);
199
- }, $ = T?.role === "SUPER_ADMIN" || T?.role === "TENANT_ADMIN" || T?.role === "ORG_ADMIN", te = F.filter((e) => !e.adminOnly || $), ne = I.filter((e) => !e.adminOnly || $);
200
- return /* @__PURE__ */ d("div", {
201
- className: "bg-[var(--color-bg-canvas)] p-6",
202
- children: [/* @__PURE__ */ u(i, {
203
- open: N,
204
- onOpenChange: P,
205
- title: C("auth.security.signOutDialogTitle", "Sign out now?"),
206
- description: C("auth.security.signOutDialogDescription", "You will be signed out of this device and returned to the login screen."),
207
- confirmText: C("auth.security.signOutDialogConfirm", "Sign out"),
214
+ A(!1), M(!1), P(""), I(""), R(null), B(null);
215
+ }, $ = C?.role === "SUPER_ADMIN" || C?.role === "TENANT_ADMIN" || C?.role === "ORG_ADMIN", he = ue.filter((e) => !e.adminOnly || $), ge = de.filter((e) => !e.adminOnly || $);
216
+ return /* @__PURE__ */ p("div", {
217
+ className: "bg-bg-canvas p-6",
218
+ children: [/* @__PURE__ */ f(r, {
219
+ open: le,
220
+ onOpenChange: O,
221
+ title: x("auth.security.signOutDialogTitle", "Sign out now?"),
222
+ description: x("auth.security.signOutDialogDescription", "You will be signed out of this device and returned to the login screen."),
223
+ confirmText: x("auth.security.signOutDialogConfirm", "Sign out"),
208
224
  variant: "warning",
209
- isPending: j,
210
- onConfirm: Y
211
- }), /* @__PURE__ */ d("main", {
225
+ isPending: E,
226
+ onConfirm: fe
227
+ }), /* @__PURE__ */ p("main", {
212
228
  className: "max-w-7xl mx-auto space-y-8",
213
229
  children: [
214
- /* @__PURE__ */ d("div", {
230
+ /* @__PURE__ */ p("div", {
215
231
  className: "flex items-center gap-3",
216
- children: [/* @__PURE__ */ u("div", {
232
+ children: [/* @__PURE__ */ f("div", {
217
233
  className: "auth-brand-badge flex h-10 w-10 items-center justify-center rounded-xl",
218
- children: /* @__PURE__ */ u(f, { className: "w-6 h-6 text-white" })
219
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
234
+ children: /* @__PURE__ */ f(m, { className: "w-6 h-6 text-white" })
235
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
220
236
  className: "text-lg font-bold text-text-primary",
221
- children: C("auth.security.title", "Security Center")
222
- }), /* @__PURE__ */ u("p", {
237
+ children: x("auth.security.title", "Security Center")
238
+ }), /* @__PURE__ */ f("p", {
223
239
  className: "text-xs text-text-secondary ",
224
- children: C("auth.security.subtitle", "Account & Authentication")
240
+ children: x("auth.security.subtitle", "Account & Authentication")
225
241
  })] })]
226
242
  }),
227
- /* @__PURE__ */ u("div", {
243
+ /* @__PURE__ */ f("div", {
228
244
  className: "auth-hero-card rounded-2xl p-6",
229
- children: /* @__PURE__ */ d("div", {
245
+ children: /* @__PURE__ */ p("div", {
230
246
  className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4",
231
- children: [/* @__PURE__ */ d("div", {
247
+ children: [/* @__PURE__ */ p("div", {
232
248
  className: "flex items-center gap-4",
233
- children: [/* @__PURE__ */ u("div", {
249
+ children: [/* @__PURE__ */ f("div", {
234
250
  className: "w-14 h-14 rounded-2xl bg-bg-surface/20 backdrop-blur flex items-center justify-center",
235
- children: /* @__PURE__ */ u(f, { className: "w-8 h-8 text-white" })
236
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h2", {
251
+ children: /* @__PURE__ */ f(m, { className: "w-8 h-8 text-white" })
252
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h2", {
237
253
  className: "text-xl font-bold",
238
- children: C("auth.security.securityStatus", "Security Status")
239
- }), /* @__PURE__ */ u("p", {
254
+ children: x("auth.security.securityStatus", "Security Status")
255
+ }), /* @__PURE__ */ f("p", {
240
256
  className: "opacity-80",
241
- children: T?.mfaEnabled ? C("auth.security.wellProtected", "Your account is well protected") : C("auth.security.enableMfaSuggestion", "Enable MFA for better security")
257
+ children: C?.mfaEnabled ? x("auth.security.wellProtected", "Your account is well protected") : x("auth.security.enableMfaSuggestion", "Enable MFA for better security")
242
258
  })] })]
243
- }), /* @__PURE__ */ u("div", {
259
+ }), /* @__PURE__ */ f("div", {
244
260
  className: "flex items-center gap-3",
245
- children: T?.mfaEnabled ? /* @__PURE__ */ d("span", {
261
+ children: C?.mfaEnabled ? /* @__PURE__ */ p("span", {
246
262
  className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-bg-surface/20 backdrop-blur text-white font-medium",
247
- children: [/* @__PURE__ */ u(v, { className: "w-5 h-5 text-status-success-text" }), C("auth.security.mfaEnabled", "MFA Enabled")]
248
- }) : /* @__PURE__ */ d("button", {
249
- onClick: () => w("/auth/mfa"),
263
+ children: [/* @__PURE__ */ f(_, { className: "w-5 h-5 text-status-success-text" }), x("auth.security.mfaEnabled", "MFA Enabled")]
264
+ }) : /* @__PURE__ */ p("button", {
265
+ type: "button",
266
+ onClick: () => S("/auth/mfa"),
250
267
  className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-bg-surface text-text-link font-semibold hover:bg-status-info-bg-subtle transition-colors shadow-lg",
251
- children: [/* @__PURE__ */ u(y, { className: "w-5 h-5 text-status-warning-text" }), C("auth.security.enableMfaNow", "Enable MFA Now")]
268
+ children: [/* @__PURE__ */ f(ae, { className: "w-5 h-5 text-status-warning-text" }), x("auth.security.enableMfaNow", "Enable MFA Now")]
252
269
  })
253
270
  })]
254
271
  })
255
272
  }),
256
- /* @__PURE__ */ d("div", {
273
+ /* @__PURE__ */ p("div", {
257
274
  className: "mb-8 p-6 rounded-2xl bg-bg-surface border border-border-subtle shadow-sm",
258
- children: [/* @__PURE__ */ u("h3", {
275
+ children: [/* @__PURE__ */ f("h3", {
259
276
  className: "text-lg font-semibold text-text-primary mb-4",
260
- children: C("auth.security.accountInfo", "Account Information")
261
- }), /* @__PURE__ */ d("div", {
277
+ children: x("auth.security.accountInfo", "Account Information")
278
+ }), /* @__PURE__ */ p("dl", {
262
279
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",
263
280
  children: [
264
- /* @__PURE__ */ d("div", {
281
+ /* @__PURE__ */ p("div", {
265
282
  className: "sm:col-span-2 lg:col-span-1",
266
- children: [/* @__PURE__ */ u("dt", {
283
+ children: [/* @__PURE__ */ f("dt", {
267
284
  className: "text-sm font-medium text-text-secondary",
268
- children: C("auth.security.email", "Email")
269
- }), /* @__PURE__ */ d("dd", {
285
+ children: x("auth.security.email", "Email")
286
+ }), /* @__PURE__ */ p("dd", {
270
287
  className: "mt-1 text-text-primary",
271
- children: [/* @__PURE__ */ u("span", {
288
+ children: [/* @__PURE__ */ f("span", {
272
289
  className: "block truncate",
273
- title: T?.email,
274
- children: T?.email
275
- }), T?.emailVerified && /* @__PURE__ */ d("span", {
290
+ title: C?.email,
291
+ children: C?.email
292
+ }), C?.emailVerified && /* @__PURE__ */ p("span", {
276
293
  className: "mt-1 inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-status-success-bg-subtle text-status-success-text text-xs font-medium",
277
- children: [/* @__PURE__ */ u(v, { className: "w-3 h-3" }), C("auth.security.verified", "Verified")]
294
+ children: [/* @__PURE__ */ f(_, { className: "w-3 h-3" }), x("auth.security.verified", "Verified")]
278
295
  })]
279
296
  })]
280
297
  }),
281
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
298
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
282
299
  className: "text-sm font-medium text-text-secondary",
283
- children: C("auth.security.username", "Username")
284
- }), /* @__PURE__ */ u("dd", {
300
+ children: x("auth.security.username", "Username")
301
+ }), /* @__PURE__ */ f("dd", {
285
302
  className: "mt-1 text-text-primary truncate",
286
- title: T?.username ?? void 0,
287
- children: T?.username || "-"
303
+ title: C?.username ?? void 0,
304
+ children: C?.username || "-"
288
305
  })] }),
289
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
306
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
290
307
  className: "text-sm font-medium text-text-secondary",
291
- children: C("auth.security.role", "Role")
292
- }), /* @__PURE__ */ u("dd", {
308
+ children: x("auth.security.role", "Role")
309
+ }), /* @__PURE__ */ f("dd", {
293
310
  className: "mt-1",
294
- children: /* @__PURE__ */ u("span", {
311
+ children: /* @__PURE__ */ f("span", {
295
312
  className: "inline-flex px-2.5 py-0.5 rounded-full bg-accent-indigo-subtle text-accent-indigo text-xs font-medium",
296
- children: T?.role || "USER"
313
+ children: C?.role || "USER"
297
314
  })
298
315
  })] }),
299
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
316
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
300
317
  className: "text-sm font-medium text-text-secondary",
301
- children: C("auth.security.memberSince", "Member Since")
302
- }), /* @__PURE__ */ u("dd", {
318
+ children: x("auth.security.memberSince", "Member Since")
319
+ }), /* @__PURE__ */ f("dd", {
303
320
  className: "mt-1 text-text-primary",
304
- children: T?.createdAt ? r(T.createdAt) : "-"
321
+ children: C?.createdAt ? ee(C.createdAt) : "-"
305
322
  })] })
306
323
  ]
307
324
  })]
308
325
  }),
309
- /* @__PURE__ */ d("div", {
326
+ /* @__PURE__ */ p("div", {
310
327
  className: "mb-8",
311
- children: [/* @__PURE__ */ u("h3", {
328
+ children: [/* @__PURE__ */ f("h3", {
312
329
  className: "text-lg font-semibold text-text-primary mb-4",
313
- children: C("auth.security.securityAuth", "Security & Authentication")
314
- }), /* @__PURE__ */ u("div", {
330
+ children: x("auth.security.securityAuth", "Security & Authentication")
331
+ }), /* @__PURE__ */ f("div", {
315
332
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
316
- children: te.map((e) => /* @__PURE__ */ u("button", {
317
- onClick: () => w(e.path),
333
+ children: he.map((e) => /* @__PURE__ */ f("button", {
334
+ type: "button",
335
+ onClick: () => S(e.path),
336
+ "aria-label": e.name,
318
337
  className: "group relative p-5 rounded-2xl bg-bg-surface border border-border-subtle hover:border-border-default hover:shadow-lg transition-all duration-200 text-left",
319
- children: /* @__PURE__ */ d("div", {
338
+ children: /* @__PURE__ */ p("div", {
320
339
  className: "flex items-start gap-4",
321
340
  children: [
322
- /* @__PURE__ */ u("div", {
341
+ /* @__PURE__ */ f("div", {
323
342
  className: `w-12 h-12 rounded-xl ${e.bgColor} flex items-center justify-center flex-shrink-0 transition-transform group-hover:scale-110`,
324
- children: /* @__PURE__ */ u(e.icon, { className: `w-6 h-6 ${e.color}` })
343
+ children: /* @__PURE__ */ f(e.icon, { className: `w-6 h-6 ${e.color}` })
325
344
  }),
326
- /* @__PURE__ */ d("div", {
345
+ /* @__PURE__ */ p("div", {
327
346
  className: "flex-1 min-w-0",
328
- children: [/* @__PURE__ */ u("h4", {
347
+ children: [/* @__PURE__ */ f("h4", {
329
348
  className: "text-base font-semibold text-text-primary group-hover:text-accent-indigo transition-colors",
330
349
  children: e.name
331
- }), /* @__PURE__ */ u("p", {
350
+ }), /* @__PURE__ */ f("p", {
332
351
  className: "mt-1 text-sm text-text-secondary ",
333
352
  children: e.description
334
353
  })]
335
354
  }),
336
- /* @__PURE__ */ u(_, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
355
+ /* @__PURE__ */ f(g, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
337
356
  ]
338
357
  })
339
358
  }, e.path))
340
359
  })]
341
360
  }),
342
- /* @__PURE__ */ d("div", {
361
+ /* @__PURE__ */ p("div", {
343
362
  className: "mb-8",
344
- children: [/* @__PURE__ */ u("h3", {
363
+ children: [/* @__PURE__ */ f("h3", {
345
364
  className: "text-lg font-semibold text-text-primary mb-4",
346
- children: C("auth.security.quickActions", "Quick Actions")
347
- }), /* @__PURE__ */ u("div", {
365
+ children: x("auth.security.quickActions", "Quick Actions")
366
+ }), /* @__PURE__ */ f("div", {
348
367
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
349
- children: ne.map((e) => /* @__PURE__ */ u("button", {
350
- onClick: () => w(e.path),
368
+ children: ge.map((e) => /* @__PURE__ */ f("button", {
369
+ type: "button",
370
+ onClick: () => S(e.path),
371
+ "aria-label": e.name,
351
372
  className: "group relative p-5 rounded-2xl bg-bg-surface border border-border-subtle hover:border-border-default hover:shadow-lg transition-all duration-200 text-left",
352
- children: /* @__PURE__ */ d("div", {
373
+ children: /* @__PURE__ */ p("div", {
353
374
  className: "flex items-start gap-4",
354
375
  children: [
355
- /* @__PURE__ */ u("div", {
376
+ /* @__PURE__ */ f("div", {
356
377
  className: `w-12 h-12 rounded-xl ${e.bgColor} flex items-center justify-center flex-shrink-0 transition-transform group-hover:scale-110`,
357
- children: /* @__PURE__ */ u(e.icon, { className: `w-6 h-6 ${e.color}` })
378
+ children: /* @__PURE__ */ f(e.icon, { className: `w-6 h-6 ${e.color}` })
358
379
  }),
359
- /* @__PURE__ */ d("div", {
380
+ /* @__PURE__ */ p("div", {
360
381
  className: "flex-1 min-w-0",
361
- children: [/* @__PURE__ */ u("h4", {
382
+ children: [/* @__PURE__ */ f("h4", {
362
383
  className: "text-base font-semibold text-text-primary group-hover:text-accent-indigo transition-colors",
363
384
  children: e.name
364
- }), /* @__PURE__ */ u("p", {
385
+ }), /* @__PURE__ */ f("p", {
365
386
  className: "mt-1 text-sm text-text-secondary ",
366
387
  children: e.description
367
388
  })]
368
389
  }),
369
- /* @__PURE__ */ u(_, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
390
+ /* @__PURE__ */ f(g, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
370
391
  ]
371
392
  })
372
393
  }, e.path))
373
394
  })]
374
395
  }),
375
- /* @__PURE__ */ d("div", {
396
+ /* @__PURE__ */ p("div", {
376
397
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
377
- children: [/* @__PURE__ */ d("div", {
398
+ children: [/* @__PURE__ */ p("div", {
378
399
  className: "p-6 rounded-2xl bg-bg-surface border border-border-subtle ",
379
- children: [/* @__PURE__ */ u("div", {
400
+ children: [/* @__PURE__ */ f("div", {
380
401
  className: "flex items-start justify-between",
381
- children: /* @__PURE__ */ d("div", { children: [
382
- /* @__PURE__ */ u("h3", {
402
+ children: /* @__PURE__ */ p("div", { children: [
403
+ /* @__PURE__ */ f("h3", {
383
404
  className: "text-lg font-semibold text-text-primary",
384
- children: C("auth.security.password", "Password")
405
+ children: x("auth.security.password", "Password")
385
406
  }),
386
- /* @__PURE__ */ u("p", {
407
+ /* @__PURE__ */ f("p", {
387
408
  className: "mt-1 text-sm text-text-secondary ",
388
- children: C("auth.security.updatePassword", "Update your password to keep your account secure")
409
+ children: x("auth.security.updatePassword", "Update your password to keep your account secure")
389
410
  }),
390
- /* @__PURE__ */ u("p", {
411
+ /* @__PURE__ */ f("p", {
391
412
  className: "mt-2 text-xs text-text-tertiary ",
392
- children: C("auth.security.lastChanged", "Last changed: Never")
413
+ children: x("auth.security.lastChanged", "Last changed: Never")
393
414
  })
394
415
  ] })
395
- }), /* @__PURE__ */ u("button", {
396
- onClick: () => w("/auth/reset-password"),
416
+ }), /* @__PURE__ */ f("button", {
417
+ type: "button",
418
+ onClick: () => S("/auth/reset-password"),
397
419
  className: "auth-primary-button mt-4 w-full px-5 py-2.5 font-semibold sm:w-auto",
398
- children: C("auth.security.changePassword", "Change Password")
420
+ children: x("auth.security.changePassword", "Change Password")
399
421
  })]
400
- }), /* @__PURE__ */ d("div", {
422
+ }), /* @__PURE__ */ p("div", {
401
423
  className: "p-6 rounded-2xl bg-status-error-bg-subtle border border-status-error-border",
402
424
  children: [
403
- /* @__PURE__ */ u("h3", {
425
+ /* @__PURE__ */ f("h3", {
404
426
  className: "text-lg font-semibold text-status-error-text",
405
- children: C("auth.security.dangerZone", "Danger Zone")
427
+ children: x("auth.security.dangerZone", "Danger Zone")
406
428
  }),
407
- /* @__PURE__ */ u("p", {
429
+ /* @__PURE__ */ f("p", {
408
430
  className: "mt-1 text-sm text-status-error-text/80",
409
- children: C("auth.security.dangerWarning", "These actions affect your account. Proceed with caution.")
431
+ children: x("auth.security.dangerWarning", "These actions affect your account. Proceed with caution.")
410
432
  }),
411
- /* @__PURE__ */ d("div", {
433
+ /* @__PURE__ */ p("div", {
412
434
  className: "mt-4 flex flex-wrap gap-3",
413
- children: [/* @__PURE__ */ u("button", {
414
- onClick: () => R(!0),
435
+ children: [/* @__PURE__ */ f("button", {
436
+ ref: J,
437
+ type: "button",
438
+ onClick: () => A(!0),
415
439
  className: "px-5 py-2.5 rounded-xl border-2 border-status-warning-border text-status-warning-text font-semibold hover:bg-status-warning-bg-subtle transition-all duration-200",
416
- children: C("auth.security.deactivateAccount", "Deactivate Account")
417
- }), /* @__PURE__ */ u("button", {
418
- onClick: () => B(!0),
440
+ children: x("auth.security.deactivateAccount", "Deactivate Account")
441
+ }), /* @__PURE__ */ f("button", {
442
+ ref: Y,
443
+ type: "button",
444
+ onClick: () => M(!0),
419
445
  className: "px-5 py-2.5 rounded-xl border-2 border-status-error-border text-status-error-text font-semibold hover:bg-status-error-bg-subtle transition-all duration-200",
420
- children: C("auth.security.deleteAccount", "Delete Account")
446
+ children: x("auth.security.deleteAccount", "Delete Account")
421
447
  })]
422
448
  })
423
449
  ]
424
450
  })]
425
451
  }),
426
- L && /* @__PURE__ */ u("div", {
452
+ k && /* @__PURE__ */ f("div", {
427
453
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
428
- children: /* @__PURE__ */ d("div", {
429
- className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6",
454
+ role: "presentation",
455
+ onClick: (e) => {
456
+ e.target === e.currentTarget && Q();
457
+ },
458
+ children: /* @__PURE__ */ p("div", {
459
+ ref: X,
460
+ role: "dialog",
461
+ "aria-modal": "true",
462
+ "aria-labelledby": V,
463
+ tabIndex: -1,
464
+ className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6 outline-none",
430
465
  children: [
431
- /* @__PURE__ */ u("h3", {
466
+ /* @__PURE__ */ f("h3", {
467
+ id: V,
432
468
  className: "text-xl font-bold text-text-primary mb-2",
433
- children: C("auth.security.deactivateTitle", "Deactivate Account")
469
+ children: x("auth.security.deactivateTitle", "Deactivate Account")
434
470
  }),
435
- /* @__PURE__ */ u("p", {
436
- className: "text-sm text-text-secondary mb-4",
437
- children: C("auth.security.deactivateDesc", "Your account will be temporarily disabled. You can reactivate it by signing in again with your credentials.")
471
+ /* @__PURE__ */ f("p", {
472
+ className: "text-sm text-text-secondary mb-4",
473
+ children: x("auth.security.deactivateDesc", "Your account will be temporarily disabled. You can reactivate it by signing in again with your credentials.")
438
474
  }),
439
- G && /* @__PURE__ */ u("div", {
475
+ L && /* @__PURE__ */ f("div", {
476
+ id: U,
477
+ role: "alert",
440
478
  className: "mb-4 p-3 rounded-lg bg-status-error-bg-subtle text-status-error-text text-sm",
441
- children: G
479
+ children: L
442
480
  }),
443
- q && /* @__PURE__ */ u("div", {
481
+ z && /* @__PURE__ */ f("div", {
482
+ role: "status",
444
483
  className: "mb-4 p-3 rounded-lg bg-status-success-bg-subtle text-status-success-text text-sm",
445
- children: q
484
+ children: z
446
485
  }),
447
- /* @__PURE__ */ d("div", {
486
+ /* @__PURE__ */ p("div", {
448
487
  className: "mb-4",
449
- children: [/* @__PURE__ */ u("label", {
450
- className: "block text-sm font-medium text-text-primary mb-1",
451
- children: C("auth.security.enterPasswordConfirm", "Enter your password to confirm")
452
- }), /* @__PURE__ */ u("input", {
488
+ children: [/* @__PURE__ */ f("label", {
489
+ htmlFor: H,
490
+ className: "block text-sm font-medium text-text-primary mb-1",
491
+ children: x("auth.security.enterPasswordConfirm", "Enter your password to confirm")
492
+ }), /* @__PURE__ */ f("input", {
493
+ id: H,
453
494
  type: "password",
454
- value: V,
455
- onChange: (e) => H(e.target.value),
456
- className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-warning-bg focus:border-transparent",
457
- placeholder: C("auth.security.yourPassword", "Your password")
495
+ value: N,
496
+ onChange: (e) => P(e.target.value),
497
+ "aria-describedby": L ? U : void 0,
498
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-warning-bg focus:border-transparent",
499
+ placeholder: x("auth.security.yourPassword", "Your password")
458
500
  })]
459
501
  }),
460
- /* @__PURE__ */ d("div", {
502
+ /* @__PURE__ */ p("div", {
461
503
  className: "flex gap-3",
462
- children: [/* @__PURE__ */ u("button", {
504
+ children: [/* @__PURE__ */ f("button", {
505
+ type: "button",
463
506
  onClick: Q,
464
- className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
465
- children: C("auth.security.cancel", "Cancel")
466
- }), /* @__PURE__ */ d("button", {
467
- onClick: X,
468
- disabled: !V || k,
507
+ className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
508
+ children: x("auth.security.cancel", "Cancel")
509
+ }), /* @__PURE__ */ p("button", {
510
+ type: "button",
511
+ onClick: () => void pe(),
512
+ disabled: !N || w,
469
513
  className: "flex-1 px-4 py-2 rounded-lg bg-status-warning-bg text-white font-medium hover:bg-status-warning-bg-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",
470
- children: [k && /* @__PURE__ */ u(b, { className: "w-4 h-4 animate-spin" }), C("auth.security.deactivateBtn", "Deactivate")]
514
+ children: [w && /* @__PURE__ */ f(v, { className: "w-4 h-4 animate-spin" }), x("auth.security.deactivateBtn", "Deactivate")]
471
515
  })]
472
516
  })
473
517
  ]
474
518
  })
475
519
  }),
476
- z && /* @__PURE__ */ u("div", {
520
+ j && /* @__PURE__ */ f("div", {
477
521
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
478
- children: /* @__PURE__ */ d("div", {
479
- className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6",
522
+ role: "presentation",
523
+ onClick: (e) => {
524
+ e.target === e.currentTarget && Q();
525
+ },
526
+ children: /* @__PURE__ */ p("div", {
527
+ ref: Z,
528
+ role: "dialog",
529
+ "aria-modal": "true",
530
+ "aria-labelledby": W,
531
+ tabIndex: -1,
532
+ className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6 outline-none",
480
533
  children: [
481
- /* @__PURE__ */ u("h3", {
534
+ /* @__PURE__ */ f("h3", {
535
+ id: W,
482
536
  className: "text-xl font-bold text-status-error-text mb-2",
483
- children: C("auth.security.deleteTitle", "Delete Account Permanently")
537
+ children: x("auth.security.deleteTitle", "Delete Account Permanently")
484
538
  }),
485
- /* @__PURE__ */ u("p", {
486
- className: "text-sm text-text-secondary mb-4",
487
- children: C("auth.security.deleteDesc", "This action is irreversible. All your data will be permanently deleted and cannot be recovered.")
539
+ /* @__PURE__ */ f("p", {
540
+ className: "text-sm text-text-secondary mb-4",
541
+ children: x("auth.security.deleteDesc", "This action is irreversible. All your data will be permanently deleted and cannot be recovered.")
488
542
  }),
489
- G && /* @__PURE__ */ u("div", {
543
+ L && /* @__PURE__ */ f("div", {
544
+ id: q,
545
+ role: "alert",
490
546
  className: "mb-4 p-3 rounded-lg bg-status-error-bg-subtle text-status-error-text text-sm",
491
- children: G
547
+ children: L
492
548
  }),
493
- q && /* @__PURE__ */ u("div", {
549
+ z && /* @__PURE__ */ f("div", {
550
+ role: "status",
494
551
  className: "mb-4 p-3 rounded-lg bg-status-success-bg-subtle text-status-success-text text-sm",
495
- children: q
552
+ children: z
496
553
  }),
497
- /* @__PURE__ */ d("div", {
554
+ /* @__PURE__ */ p("div", {
498
555
  className: "mb-4",
499
- children: [/* @__PURE__ */ u("label", {
500
- className: "block text-sm font-medium text-text-primary mb-1",
501
- children: C("auth.security.enterPasswordDelete", "Enter your password")
502
- }), /* @__PURE__ */ u("input", {
556
+ children: [/* @__PURE__ */ f("label", {
557
+ htmlFor: G,
558
+ className: "block text-sm font-medium text-text-primary mb-1",
559
+ children: x("auth.security.enterPasswordDelete", "Enter your password")
560
+ }), /* @__PURE__ */ f("input", {
561
+ id: G,
503
562
  type: "password",
504
- value: V,
505
- onChange: (e) => H(e.target.value),
506
- className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent",
507
- placeholder: C("auth.security.yourPassword", "Your password")
563
+ value: N,
564
+ onChange: (e) => P(e.target.value),
565
+ "aria-describedby": L ? q : void 0,
566
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent",
567
+ placeholder: x("auth.security.yourPassword", "Your password")
508
568
  })]
509
569
  }),
510
- /* @__PURE__ */ d("div", {
570
+ /* @__PURE__ */ p("div", {
511
571
  className: "mb-4",
512
- children: [/* @__PURE__ */ d("label", {
513
- className: "block text-sm font-medium text-text-primary mb-1",
572
+ children: [/* @__PURE__ */ p("label", {
573
+ htmlFor: K,
574
+ className: "block text-sm font-medium text-text-primary mb-1",
514
575
  children: [
515
- C("auth.security.type", "Type"),
576
+ x("auth.security.type", "Type"),
516
577
  " ",
517
- /* @__PURE__ */ u("code", {
518
- className: "px-1 py-0.5 rounded bg-bg-sunken text-status-error-text font-mono text-sm",
519
- children: x
578
+ /* @__PURE__ */ f("code", {
579
+ className: "px-1 py-0.5 rounded bg-bg-sunken text-status-error-text font-mono text-sm",
580
+ children: y
520
581
  }),
521
582
  " ",
522
- C("auth.security.toConfirm", "to confirm")
583
+ x("auth.security.toConfirm", "to confirm")
523
584
  ]
524
- }), /* @__PURE__ */ u("input", {
585
+ }), /* @__PURE__ */ f("input", {
586
+ id: K,
525
587
  type: "text",
526
- value: U,
527
- onChange: (e) => W(e.target.value),
528
- className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent font-mono",
529
- placeholder: C("auth.security.deleteConfirmPlaceholder", "DELETE MY ACCOUNT")
588
+ value: F,
589
+ onChange: (e) => I(e.target.value),
590
+ "aria-describedby": L ? q : void 0,
591
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent font-mono",
592
+ placeholder: x("auth.security.deleteConfirmPlaceholder", "DELETE MY ACCOUNT")
530
593
  })]
531
594
  }),
532
- /* @__PURE__ */ d("div", {
595
+ /* @__PURE__ */ p("div", {
533
596
  className: "flex gap-3",
534
- children: [/* @__PURE__ */ u("button", {
597
+ children: [/* @__PURE__ */ f("button", {
598
+ type: "button",
535
599
  onClick: Q,
536
- className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
537
- children: C("auth.security.cancel", "Cancel")
538
- }), /* @__PURE__ */ d("button", {
539
- onClick: Z,
540
- disabled: !V || U !== x || A,
600
+ className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
601
+ children: x("auth.security.cancel", "Cancel")
602
+ }), /* @__PURE__ */ p("button", {
603
+ type: "button",
604
+ onClick: () => void me(),
605
+ disabled: !N || F !== y || T,
541
606
  className: "flex-1 px-4 py-2 rounded-lg bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",
542
- children: [A && /* @__PURE__ */ u(b, { className: "w-4 h-4 animate-spin" }), C("auth.security.deleteForever", "Delete Forever")]
607
+ children: [T && /* @__PURE__ */ f(v, { className: "w-4 h-4 animate-spin" }), x("auth.security.deleteForever", "Delete Forever")]
543
608
  })]
544
609
  })
545
610
  ]
546
611
  })
547
612
  }),
548
- /* @__PURE__ */ u("footer", {
613
+ /* @__PURE__ */ f("footer", {
549
614
  className: "mt-12 pt-6 border-t border-border-subtle ",
550
- children: /* @__PURE__ */ d("div", {
615
+ children: /* @__PURE__ */ p("div", {
551
616
  className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 text-sm text-text-secondary ",
552
- children: [/* @__PURE__ */ d("p", { children: [
553
- C("auth.security.signedInAs", "Signed in as"),
617
+ children: [/* @__PURE__ */ p("p", { children: [
618
+ x("auth.security.signedInAs", "Signed in as"),
554
619
  " ",
555
- /* @__PURE__ */ u("span", {
620
+ /* @__PURE__ */ f("span", {
556
621
  className: "font-medium text-text-primary ",
557
- children: T?.email
622
+ children: C?.email
558
623
  })
559
- ] }), /* @__PURE__ */ d("div", {
624
+ ] }), /* @__PURE__ */ p("div", {
560
625
  className: "flex items-center gap-4",
561
626
  children: [
562
- /* @__PURE__ */ u("button", {
563
- onClick: () => w("/auth/login"),
564
- className: "hover:text-text-primary transition-colors",
565
- children: C("auth.security.switchAccount", "Switch Account")
627
+ /* @__PURE__ */ f("button", {
628
+ type: "button",
629
+ onClick: () => S("/auth/login"),
630
+ className: "hover:text-text-primary transition-colors",
631
+ children: x("auth.security.switchAccount", "Switch Account")
566
632
  }),
567
- /* @__PURE__ */ u("span", {
568
- className: "text-text-muted ",
633
+ /* @__PURE__ */ f("span", {
634
+ className: "text-text-muted",
635
+ "aria-hidden": "true",
569
636
  children: "|"
570
637
  }),
571
- /* @__PURE__ */ u("button", {
572
- onClick: () => P(!0),
573
- className: "hover:text-status-error-text transition-colors",
574
- children: C("auth.security.signOut", "Sign Out")
638
+ /* @__PURE__ */ f("button", {
639
+ type: "button",
640
+ onClick: () => O(!0),
641
+ className: "hover:text-status-error-text transition-colors",
642
+ children: x("auth.security.signOut", "Sign Out")
575
643
  })
576
644
  ]
577
645
  })]
@@ -582,6 +650,6 @@ function S() {
582
650
  });
583
651
  }
584
652
  //#endregion
585
- export { S as SecurityPage };
653
+ export { b as SecurityPage };
586
654
 
587
655
  //# sourceMappingURL=SecurityPage.js.map