@burdenoff/fe-libs 2026.1119.6 → 2026.1119.7

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,415 +1,498 @@
1
1
  import { useAssistantControl as e } from "../../shared/assistant/appControls/useAssistantControl.js";
2
2
  import { useShellLabel as t, useShellNumberFormat as n } from "../../shared/providers/shell/useShellLabel.js";
3
- import { cn as r } from "../../shared-utils.js";
4
- import { Button as i } from "../../ui/button.js";
5
- import { DropdownMenu as a, DropdownMenuContent as o, DropdownMenuGroup as s, DropdownMenuItem as c, DropdownMenuRadioGroup as l, DropdownMenuRadioItem as u, DropdownMenuSeparator as ee, DropdownMenuShortcut as d, DropdownMenuSub as f, DropdownMenuSubContent as p, DropdownMenuSubTrigger as m, DropdownMenuTrigger as te } from "../../ui/dropdown-menu.js";
6
- import { Sheet as ne, SheetContent as re, SheetTitle as ie, SheetTrigger as ae } from "../../ui/sheet.js";
7
- import { hasProfileHelpContent as oe, profileHelpBody as h, useProfileHelp as se } from "./profileHelpMenu.js";
8
- import { ICON as g, MENU_ROW as _, MENU_SURFACE as ce, SHEET_ROW as v, SUB_SURFACE as y, VALUE as le } from "./profileMenuClasses.js";
9
- import { createContext as ue, useContext as b, useEffect as de, useId as fe, useMemo as pe, useRef as me, useState as he } from "react";
10
- import { Check as ge, ChevronRight as x, Gem as _e, Keyboard as ve, Languages as ye, LifeBuoy as be, LogOut as xe, Monitor as Se, Moon as S, Plus as Ce, Settings as we, Sun as C, UserRound as Te, X as Ee } from "lucide-react";
11
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
3
+ import { useSafePersonaSurface as r } from "../../shared/providers/shell/PersonaSurfaceProvider.js";
4
+ import { cn as i } from "../../shared-utils.js";
5
+ import { Button as a } from "../../ui/button.js";
6
+ import { DropdownMenu as o, DropdownMenuContent as s, DropdownMenuGroup as c, DropdownMenuItem as l, DropdownMenuRadioGroup as u, DropdownMenuRadioItem as d, DropdownMenuSeparator as f, DropdownMenuShortcut as p, DropdownMenuSub as m, DropdownMenuSubContent as h, DropdownMenuSubTrigger as g, DropdownMenuTrigger as ee } from "../../ui/dropdown-menu.js";
7
+ import { Sheet as te, SheetContent as ne, SheetTitle as re, SheetTrigger as ie } from "../../ui/sheet.js";
8
+ import { PersonaViewsList as ae } from "../PersonaViewsList.js";
9
+ import { hasProfileHelpContent as oe, profileHelpBody as se, useProfileHelp as ce } from "./profileHelpMenu.js";
10
+ import { ICON as _, MENU_ROW as v, MENU_SURFACE as le, SECTION_LABEL as ue, SHEET_ROW as y, SUB_SURFACE as b, VALUE as de } from "./profileMenuClasses.js";
11
+ import { createContext as fe, useContext as x, useEffect as S, useId as pe, useMemo as me, useRef as he, useState as C } from "react";
12
+ import { Check as ge, ChevronRight as w, Eye as _e, Gem as ve, Keyboard as ye, Languages as be, LifeBuoy as xe, LogOut as Se, Monitor as Ce, Moon as T, Palette as we, Plus as Te, Settings as Ee, Sun as E, UserRound as De, X as Oe } from "lucide-react";
13
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
12
14
  // src/chrome/shell/SidebarProfileMenu.tsx
13
- var D = {
14
- dark: S,
15
- light: C,
16
- system: Se
15
+ var ke = {
16
+ dark: T,
17
+ light: E,
18
+ system: Ce
17
19
  };
18
- function O(e) {
20
+ function A(e) {
19
21
  let t = e.trim().split(/\s+/).filter(Boolean);
20
22
  return `${t[0]?.charAt(0) ?? ""}${t.length > 1 ? t[t.length - 1]?.charAt(0) ?? "" : ""}`.toUpperCase() || "?";
21
23
  }
22
- var k = {
24
+ var j = {
23
25
  sm: "size-6",
24
26
  md: "size-8",
25
27
  lg: "size-10"
26
28
  };
27
- function A(e, t, n) {
28
- return /* @__PURE__ */ T("span", {
29
+ function M(e, t, n) {
30
+ return /* @__PURE__ */ O("span", {
29
31
  "aria-hidden": "true",
30
- className: `${k[n]} flex flex-shrink-0 items-center justify-center overflow-hidden rounded-full bg-linear-to-br from-brand-primary to-brand-secondary`,
31
- children: t ? /* @__PURE__ */ T("img", {
32
+ className: `${j[n]} flex flex-shrink-0 items-center justify-center overflow-hidden rounded-full bg-linear-to-br from-brand-primary to-brand-secondary`,
33
+ children: t ? /* @__PURE__ */ O("img", {
32
34
  src: t,
33
35
  alt: "",
34
36
  className: "h-full w-full object-cover"
35
- }) : /* @__PURE__ */ T("span", {
37
+ }) : /* @__PURE__ */ O("span", {
36
38
  className: `${n === "lg" ? "text-body-sm" : "text-caption"} font-semibold text-action-primary-text`,
37
- children: O(e)
39
+ children: A(e)
38
40
  })
39
41
  });
40
42
  }
41
- var De = ue(!1);
42
- function j({ planName: e, onManage: r, used: a, limit: o, caption: s }) {
43
- let l = t(), u = n(), ee = b(De), d = l("shell.plan.manage", "Manage"), f = typeof a == "number" && typeof o == "number" && o > 0, p = f ? Math.min(100, Math.max(0, Math.round(a / o * 100))) : 0, m = s ?? (f ? l("shell.plan.usage", "{{used}} of {{limit}} used", {
44
- used: u(a),
43
+ var Ae = fe(!1);
44
+ function N({ planName: e, onManage: r, used: i, limit: o, caption: s }) {
45
+ let c = t(), u = n(), d = x(Ae), f = c("shell.plan.manage", "Manage"), p = typeof i == "number" && typeof o == "number" && o > 0, m = p ? Math.min(100, Math.max(0, Math.round(i / o * 100))) : 0, h = s ?? (p ? c("shell.plan.usage", "{{used}} of {{limit}} used", {
46
+ used: u(i),
45
47
  limit: u(o)
46
48
  }) : void 0);
47
- return /* @__PURE__ */ E("div", {
49
+ return /* @__PURE__ */ k("div", {
48
50
  className: "rounded-button border border-border-subtle bg-bg-surface p-3",
49
51
  "data-testid": "shell-plan-card",
50
52
  children: [
51
- /* @__PURE__ */ E("div", {
53
+ /* @__PURE__ */ k("div", {
52
54
  className: "flex items-center gap-2",
53
55
  children: [
54
- /* @__PURE__ */ T(_e, {
56
+ /* @__PURE__ */ O(ve, {
55
57
  className: "size-4 flex-shrink-0 text-text-primary",
56
58
  "aria-hidden": "true"
57
59
  }),
58
- /* @__PURE__ */ T("span", {
60
+ /* @__PURE__ */ O("span", {
59
61
  className: "min-w-0 flex-1 truncate text-body-sm font-semibold text-text-primary",
60
62
  children: e
61
63
  }),
62
- ee ? /* @__PURE__ */ T(c, {
64
+ d ? /* @__PURE__ */ O(l, {
63
65
  onSelect: () => r(),
64
66
  "data-testid": "shell-plan-manage",
65
67
  className: "h-7 flex-shrink-0 rounded-button border border-border-default px-2.5 font-medium focus:bg-bg-sunken",
66
- children: /* @__PURE__ */ T("span", {
68
+ children: /* @__PURE__ */ O("span", {
67
69
  className: "text-xs",
68
- children: d
70
+ children: f
69
71
  })
70
- }) : /* @__PURE__ */ T(i, {
72
+ }) : /* @__PURE__ */ O(a, {
71
73
  type: "button",
72
74
  variant: "outline",
73
75
  size: "sm",
74
76
  onClick: r,
75
77
  "data-testid": "shell-plan-manage",
76
78
  className: "h-7 px-2.5",
77
- children: /* @__PURE__ */ T("span", {
79
+ children: /* @__PURE__ */ O("span", {
78
80
  className: "text-xs",
79
- children: d
81
+ children: f
80
82
  })
81
83
  })
82
84
  ]
83
85
  }),
84
- f && /* @__PURE__ */ T("div", {
86
+ p && /* @__PURE__ */ O("div", {
85
87
  role: "progressbar",
86
88
  "aria-valuemin": 0,
87
89
  "aria-valuemax": o,
88
- "aria-valuenow": a,
89
- "aria-label": m ?? e,
90
+ "aria-valuenow": i,
91
+ "aria-label": h ?? e,
90
92
  className: "mt-3 h-1 w-full overflow-hidden rounded-pill bg-bg-sunken",
91
- children: /* @__PURE__ */ T("div", {
93
+ children: /* @__PURE__ */ O("div", {
92
94
  className: "h-full rounded-pill bg-linear-to-r from-action-primary-bg to-brand-secondary",
93
- style: { width: `${p}%` }
95
+ style: { width: `${m}%` }
94
96
  })
95
97
  }),
96
- m && /* @__PURE__ */ T("p", {
98
+ h && /* @__PURE__ */ O("p", {
97
99
  className: "mt-2 truncate text-xs text-text-muted",
98
- children: m
100
+ children: h
99
101
  })
100
102
  ]
101
103
  });
102
104
  }
103
- function M({ user: n, roleLabel: i, orgName: ue, planChip: b, accounts: _e = [], activeAccountId: Se, onSwitchAccount: S, onAddAccount: C, onRemoveAccount: O, onViewProfile: k, onLogout: j, planCard: M, doors: Oe = [], extraItems: N = [], onOpenSettings: ke, settingsShortcut: P, theme: F, language: I, helpItems: L = [], help: R, onKeyboardShortcuts: Ae, collapsed: z = !1, variant: je = "popover", open: B, onOpenChange: Me, trigger: Ne }) {
104
- let V = t(), Pe = se(), Fe = fe(), [Ie, Le] = he(!1), [H, Re] = he(null), ze = B ?? Ie, U = (e) => {
105
- B === void 0 && Le(e), e || Re(null), Me?.(e);
106
- }, Be = me(j);
107
- de(() => {
108
- Be.current = j;
109
- }, [j]);
110
- let Ve = pe(() => ({ run: () => (Be.current(), { status: "done" }) }), []);
111
- e("account.logout", Ve);
112
- let W = me(I);
113
- de(() => {
114
- W.current = I;
115
- }, [I]);
116
- let He = pe(() => ({
117
- languages: () => W.current.options.map((e) => ({
105
+ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [], activeAccountId: Ce, onSwitchAccount: T, onAddAccount: E, onRemoveAccount: A, onViewProfile: j, onLogout: N, planCard: P, doors: je = [], extraItems: F = [], onOpenSettings: Me, settingsShortcut: I, theme: L, language: R, helpItems: z = [], help: B, personaViews: V, onKeyboardShortcuts: Ne, collapsed: H = !1, variant: Pe = "popover", open: U, onOpenChange: Fe, trigger: Ie }) {
106
+ let W = t(), Le = ce(), Re = pe(), [ze, Be] = C(!1), [G, Ve] = C(null), K = r(), [He, q] = C(""), Ue = K?.canSimulate ?? !1, We = K?.loadSimulatableRoles;
107
+ S(() => {
108
+ G === "views" && Ue && We?.();
109
+ }, [
110
+ G,
111
+ Ue,
112
+ We
113
+ ]);
114
+ let Ge = U ?? ze, J = (e) => {
115
+ U === void 0 && Be(e), e || Ve(null), Fe?.(e);
116
+ }, Ke = he(N);
117
+ S(() => {
118
+ Ke.current = N;
119
+ }, [N]);
120
+ let qe = me(() => ({ run: () => (Ke.current(), { status: "done" }) }), []);
121
+ e("account.logout", qe);
122
+ let Y = he(R);
123
+ S(() => {
124
+ Y.current = R;
125
+ }, [R]);
126
+ let Je = me(() => ({
127
+ languages: () => Y.current.options.map((e) => ({
118
128
  code: e.code,
119
129
  label: e.label
120
130
  })),
121
- current: () => W.current.current,
131
+ current: () => Y.current.current,
122
132
  set: (e) => {
123
- let t = W.current, n = e.toLowerCase(), r = t.options.find((e) => e.code.toLowerCase() === n);
133
+ let t = Y.current, n = e.toLowerCase(), r = t.options.find((e) => e.code.toLowerCase() === n);
124
134
  return r ? r.code === t.current ? { status: "already" } : (t.onChange(r.code), { status: "done" }) : { status: "failed" };
125
135
  }
126
136
  }), []);
127
- if (e("language", He), !n) return null;
128
- let Ue = je === "sheet", G = V("appShell.userMenu", "User menu"), We = V("auth.security.switchAccount", "Switch Account"), K = _e.filter((e) => e.id !== Se), q = !!S && K.length > 0, Ge = !!k || q || !!C, Ke = [i, ue].filter(Boolean).join(" · "), qe = [n.email, i].filter(Boolean).join(" · "), J = {
129
- dark: V("shell.profile.themeDark", "Dark"),
130
- light: V("shell.profile.themeLight", "Light"),
131
- system: V("shell.profile.themeSystem", "Match my device")
132
- }, Je = J[F.value], Y = D[F.value], Ye = I.options.find((e) => e.code === I.current)?.label ?? I.current, X = [
133
- "dark",
134
- "light",
135
- "system"
136
- ], Xe = R ? oe(R) : L.length > 0, Z = {
137
- viewProfile: V("userMenu.viewProfile", "View Profile"),
138
- addAccount: V("auth.profileMenu.addAccount", "Add account"),
139
- settings: V("common.actions.settings", "Settings"),
140
- appearance: V("shell.profile.appearance", "Appearance"),
141
- language: V("shell.profile.language", "Language"),
142
- help: V("shell.profile.helpSupport", "Help & support"),
143
- shortcuts: V("appShell.keyboardShortcuts", "Keyboard shortcuts"),
144
- signOut: V("auth.security.signOutDialogConfirm", "Sign out")
145
- }, Ze = (e) => V("userMenu.removeNamedAccount", "Remove {{name}}", { name: e.name || e.email }), Q = /* @__PURE__ */ E(w, { children: [A(n.name, n.avatarUrl, "lg"), /* @__PURE__ */ E("span", {
137
+ if (e("language", Je), !n) return null;
138
+ let Ye = Pe === "sheet", X = W("appShell.userMenu", "User menu"), Xe = W("auth.security.switchAccount", "Switch Account"), Ze = ve.filter((e) => e.id !== Ce), Qe = !!T && Ze.length > 0, $e = !!j || Qe || !!E, et = [a, fe].filter(Boolean).join(" · "), tt = [n.email, a].filter(Boolean).join(" · "), nt = [
139
+ {
140
+ value: "dark",
141
+ label: W("shell.profile.themeDark", "Dark")
142
+ },
143
+ {
144
+ value: "light",
145
+ label: W("shell.profile.themeLight", "Light")
146
+ },
147
+ {
148
+ value: "system",
149
+ label: W("shell.profile.themeSystem", "Match my device")
150
+ }
151
+ ], Z = L.options ?? nt, rt = Z.find((e) => e.value === L.value)?.label ?? L.value, it = ke[L.value] ?? we, at = R.options.find((e) => e.code === R.current)?.label ?? R.current, ot = B ? oe(B) : z.length > 0, Q = {
152
+ viewProfile: W("userMenu.viewProfile", "View Profile"),
153
+ addAccount: W("auth.profileMenu.addAccount", "Add account"),
154
+ settings: W("common.actions.settings", "Settings"),
155
+ appearance: W("shell.profile.appearance", "Appearance"),
156
+ language: W("shell.profile.language", "Language"),
157
+ help: W("shell.profile.helpSupport", "Help & support"),
158
+ shortcuts: W("appShell.keyboardShortcuts", "Keyboard shortcuts"),
159
+ signOut: W("auth.security.signOutDialogConfirm", "Sign out")
160
+ }, st = (e) => W("userMenu.removeNamedAccount", "Remove {{name}}", { name: e.name || e.email }), $ = /* @__PURE__ */ k(D, { children: [M(n.name, n.avatarUrl, "lg"), /* @__PURE__ */ k("span", {
146
161
  className: "min-w-0 flex-1",
147
- children: [/* @__PURE__ */ T("span", {
162
+ children: [/* @__PURE__ */ O("span", {
148
163
  className: "block truncate text-body-sm font-bold text-text-primary",
149
164
  children: n.name
150
- }), qe && /* @__PURE__ */ T("span", {
165
+ }), tt && /* @__PURE__ */ O("span", {
151
166
  className: "block truncate text-xs text-text-muted",
152
- children: qe
167
+ children: tt
153
168
  })]
154
- })] }), Qe = (e) => {
169
+ })] }), ct = (e) => {
155
170
  let t = e.icon;
156
- return /* @__PURE__ */ E(w, { children: [
157
- /* @__PURE__ */ T("span", {
171
+ return /* @__PURE__ */ k(D, { children: [
172
+ /* @__PURE__ */ O("span", {
158
173
  className: "flex size-7 items-center justify-center rounded-button bg-accent-soft text-accent-primary",
159
- children: /* @__PURE__ */ T(t, { className: "size-4" })
174
+ children: /* @__PURE__ */ O(t, { className: "size-4" })
160
175
  }),
161
- /* @__PURE__ */ E("span", {
176
+ /* @__PURE__ */ k("span", {
162
177
  className: "flex w-full items-start gap-1 text-body-sm font-semibold text-text-primary",
163
- children: [/* @__PURE__ */ T("span", {
178
+ children: [/* @__PURE__ */ O("span", {
164
179
  className: "min-w-0 flex-1",
165
180
  children: e.title
166
- }), /* @__PURE__ */ T(x, {
181
+ }), /* @__PURE__ */ O(w, {
167
182
  className: "mt-0.5 size-4 flex-shrink-0 text-text-muted rtl:rotate-180",
168
183
  "aria-hidden": "true"
169
184
  })]
170
185
  }),
171
- /* @__PURE__ */ T("span", {
186
+ /* @__PURE__ */ O("span", {
172
187
  className: "text-xs text-text-muted",
173
188
  children: e.description
174
189
  })
175
190
  ] });
176
- }, $e = (e) => Oe.length > 0 ? /* @__PURE__ */ T("div", {
191
+ }, lt = (e) => je.length > 0 ? /* @__PURE__ */ O("div", {
177
192
  className: "grid grid-cols-2 gap-2 py-1.5",
178
193
  "data-testid": "sidebar-profile-doors",
179
- children: Oe.map(e)
180
- }) : null, $ = M ? /* @__PURE__ */ T("div", {
194
+ children: je.map(e)
195
+ }) : null, ut = P ? /* @__PURE__ */ O("div", {
181
196
  className: "py-1",
182
- children: M
197
+ children: P
198
+ }) : null, dt = !!V && !!K, ft = () => {
199
+ q(""), J(!1);
200
+ }, pt = () => K?.setCustomizeOpen(!0), mt = dt && V && K ? /* @__PURE__ */ k(m, {
201
+ onOpenChange: (e) => {
202
+ e && K.canSimulate && K.loadSimulatableRoles(), e || q("");
203
+ },
204
+ children: [/* @__PURE__ */ k(g, {
205
+ className: i(v, "mt-1"),
206
+ "data-testid": "sidebar-profile-views",
207
+ children: [/* @__PURE__ */ O(_e, {
208
+ className: _,
209
+ "aria-hidden": "true"
210
+ }), /* @__PURE__ */ O("span", {
211
+ className: "min-w-0 flex-1 truncate",
212
+ children: V.label
213
+ })]
214
+ }), /* @__PURE__ */ O(h, {
215
+ sideOffset: 8,
216
+ "data-testid": "sidebar-profile-views-menu",
217
+ className: i(le, "flex max-h-80 w-[300px] flex-col overflow-hidden p-0"),
218
+ children: /* @__PURE__ */ O(ae, {
219
+ persona: K,
220
+ everythingLabel: W("nav.everything", "Everything"),
221
+ query: He,
222
+ onQueryChange: q,
223
+ close: ft,
224
+ onOpenCustomize: pt,
225
+ onSearchKeyDown: (e) => {
226
+ e.key !== "Escape" && e.stopPropagation();
227
+ },
228
+ sectionClass: ue,
229
+ renderRow: ({ testId: e, onSelect: t, tone: n, children: r }) => /* @__PURE__ */ O(l, {
230
+ className: i(v, "hover:bg-bg-sunken", n === "muted" && "text-text-secondary", n === "warning" && "text-status-warning-text"),
231
+ onPointerMove: (e) => e.preventDefault(),
232
+ onPointerLeave: (e) => e.preventDefault(),
233
+ onSelect: () => t(),
234
+ "data-testid": `sidebar-profile-${e}`,
235
+ children: r
236
+ }, e)
237
+ })
238
+ })]
183
239
  }) : null;
184
- if (Ue) {
240
+ if (Ye) {
185
241
  let e = (e) => {
186
- U(!1), e();
187
- }, t = (e) => Re((t) => t === e ? null : e), r = (e, n, r, i) => /* @__PURE__ */ E("button", {
242
+ J(!1), e();
243
+ }, t = (e) => Ve((t) => t === e ? null : e), r = (e, n, r, i) => /* @__PURE__ */ k("button", {
188
244
  type: "button",
189
- className: v,
190
- "aria-expanded": H === e,
245
+ className: y,
246
+ "aria-expanded": G === e,
191
247
  onClick: () => t(e),
192
248
  "data-testid": `sidebar-profile-${e}`,
193
249
  children: [
194
- /* @__PURE__ */ T(n, {
195
- className: g,
250
+ /* @__PURE__ */ O(n, {
251
+ className: _,
196
252
  "aria-hidden": "true"
197
253
  }),
198
- /* @__PURE__ */ T("span", {
254
+ /* @__PURE__ */ O("span", {
199
255
  className: "min-w-0 flex-1 truncate",
200
256
  children: r
201
257
  }),
202
- i && /* @__PURE__ */ T("span", {
258
+ i && /* @__PURE__ */ O("span", {
203
259
  className: "truncate text-xs text-text-muted",
204
260
  children: i
205
261
  }),
206
- /* @__PURE__ */ T(x, {
207
- className: `size-4 flex-shrink-0 text-text-muted transition-transform ${H === e ? "rotate-90 rtl:-rotate-90" : "rtl:rotate-180"}`,
262
+ /* @__PURE__ */ O(w, {
263
+ className: `size-4 flex-shrink-0 text-text-muted transition-transform ${G === e ? "rotate-90 rtl:-rotate-90" : "rtl:rotate-180"}`,
208
264
  "aria-hidden": "true"
209
265
  })
210
266
  ]
211
- }), i = {
212
- accounts: G,
213
- appearance: Z.appearance,
214
- language: Z.language,
215
- help: Z.help
216
- }, a = (t, n) => H === t ? /* @__PURE__ */ T("div", {
267
+ }), a = {
268
+ accounts: X,
269
+ appearance: Q.appearance,
270
+ language: Q.language,
271
+ help: Q.help,
272
+ views: V?.label ?? ""
273
+ }, o = (t, n) => G === t ? /* @__PURE__ */ O("div", {
217
274
  role: "group",
218
- "aria-label": i[t],
275
+ "aria-label": a[t],
219
276
  className: "mb-1 ms-6 border-s border-border-subtle ps-2",
220
277
  "data-testid": `sidebar-profile-${t}-list`,
221
278
  children: n.map((n) => {
222
- let r = /* @__PURE__ */ E("button", {
279
+ let r = /* @__PURE__ */ k("button", {
223
280
  type: "button",
224
- className: v,
281
+ className: y,
225
282
  "aria-pressed": n.selected,
226
283
  onClick: () => e(n.onSelect),
227
284
  "data-testid": `sidebar-profile-${t}-${n.id}`,
228
- children: [/* @__PURE__ */ T("span", {
285
+ children: [/* @__PURE__ */ O("span", {
229
286
  className: "min-w-0 flex-1 truncate",
230
287
  children: n.label
231
- }), n.selected && /* @__PURE__ */ T(ge, {
288
+ }), n.selected && /* @__PURE__ */ O(ge, {
232
289
  className: "size-4 flex-shrink-0 text-accent-primary",
233
290
  "aria-hidden": "true"
234
291
  })]
235
292
  }, n.id), i = n.remove;
236
- return i ? /* @__PURE__ */ E("div", {
293
+ return i ? /* @__PURE__ */ k("div", {
237
294
  className: "flex items-center gap-1",
238
- children: [/* @__PURE__ */ T("div", {
295
+ children: [/* @__PURE__ */ O("div", {
239
296
  className: "min-w-0 flex-1",
240
297
  children: r
241
- }), /* @__PURE__ */ T("button", {
298
+ }), /* @__PURE__ */ O("button", {
242
299
  type: "button",
243
300
  "aria-label": i.label,
244
301
  onClick: () => e(i.onSelect),
245
302
  "data-testid": `sidebar-profile-${t}-${n.id}-remove`,
246
303
  className: "flex size-9 flex-shrink-0 items-center justify-center rounded-button text-text-muted outline-none hover:bg-bg-sunken hover:text-text-primary focus-visible:ring-2 focus-visible:ring-focus-ring",
247
- children: /* @__PURE__ */ T(Ee, {
304
+ children: /* @__PURE__ */ O(Oe, {
248
305
  className: "size-4",
249
306
  "aria-hidden": "true"
250
307
  })
251
308
  })]
252
309
  }, n.id) : r;
253
310
  })
254
- }) : null, o = [
255
- ...k ? [{
311
+ }) : null, s = ({ testId: e, onSelect: t, tone: n, children: r }) => /* @__PURE__ */ O("button", {
312
+ type: "button",
313
+ className: i(y, n === "muted" && "text-text-secondary", n === "warning" && "text-status-warning-text"),
314
+ onClick: t,
315
+ "data-testid": `sidebar-profile-${e}`,
316
+ children: r
317
+ }, e), c = [
318
+ ...j ? [{
256
319
  id: "view-profile",
257
- label: Z.viewProfile,
258
- onSelect: k
320
+ label: Q.viewProfile,
321
+ onSelect: j
259
322
  }] : [],
260
- ...q ? K.map((e) => ({
323
+ ...Qe ? Ze.map((e) => ({
261
324
  id: `account-${e.id}`,
262
325
  label: e.name || e.email,
263
- onSelect: () => S?.(e.id),
264
- remove: O ? {
265
- label: Ze(e),
266
- onSelect: () => O(e.id)
326
+ onSelect: () => T?.(e.id),
327
+ remove: A ? {
328
+ label: st(e),
329
+ onSelect: () => A(e.id)
267
330
  } : void 0
268
331
  })) : [],
269
- ...C ? [{
332
+ ...E ? [{
270
333
  id: "add-account",
271
- label: Z.addAccount,
272
- onSelect: C
334
+ label: Q.addAccount,
335
+ onSelect: E
273
336
  }] : []
274
- ], s = B === void 0 ? /* @__PURE__ */ T("button", {
337
+ ], l = U === void 0 ? /* @__PURE__ */ O("button", {
275
338
  type: "button",
276
- "aria-label": G,
339
+ "aria-label": X,
277
340
  "data-testid": "sidebar-profile-trigger",
278
341
  className: "flex items-center justify-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-focus-ring",
279
- children: A(n.name, n.avatarUrl, "md")
280
- }) : null, c = Ne ?? s;
281
- return /* @__PURE__ */ E(ne, {
282
- open: ze,
283
- onOpenChange: U,
284
- children: [c && /* @__PURE__ */ T(ae, {
342
+ children: M(n.name, n.avatarUrl, "md")
343
+ }) : null, u = Ie ?? l;
344
+ return /* @__PURE__ */ k(te, {
345
+ open: Ge,
346
+ onOpenChange: J,
347
+ children: [u && /* @__PURE__ */ O(ie, {
285
348
  asChild: !0,
286
- children: c
287
- }), /* @__PURE__ */ E(re, {
349
+ children: u
350
+ }), /* @__PURE__ */ k(ne, {
288
351
  side: "bottom",
289
352
  "aria-describedby": void 0,
290
353
  "data-testid": "sidebar-profile-sheet",
291
354
  className: "max-h-[85dvh] gap-0 overflow-y-auto rounded-t-card bg-popover px-3 pb-6 pt-2",
292
355
  children: [
293
- /* @__PURE__ */ T("div", {
356
+ /* @__PURE__ */ O("div", {
294
357
  "aria-hidden": "true",
295
358
  className: "mx-auto mb-3 h-1 w-10 flex-shrink-0 rounded-pill bg-border-strong",
296
359
  "data-testid": "sidebar-profile-grab-handle"
297
360
  }),
298
- /* @__PURE__ */ T(ie, {
361
+ /* @__PURE__ */ O(re, {
299
362
  className: "sr-only",
300
- children: V("appShell.userMenuSheetTitle", "Account")
363
+ children: W("appShell.userMenuSheetTitle", "Account")
301
364
  }),
302
- Ge ? /* @__PURE__ */ E("button", {
365
+ $e ? /* @__PURE__ */ k("button", {
303
366
  type: "button",
304
367
  className: "flex w-full items-center gap-3 rounded-button px-1 py-2 text-start outline-none hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring",
305
- "aria-expanded": H === "accounts",
368
+ "aria-expanded": G === "accounts",
306
369
  onClick: () => t("accounts"),
307
370
  "data-testid": "sidebar-profile-identity",
308
- children: [Q, /* @__PURE__ */ T(x, {
309
- className: `size-4 flex-shrink-0 text-text-muted transition-transform ${H === "accounts" ? "rotate-90 rtl:-rotate-90" : "rtl:rotate-180"}`,
371
+ children: [$, /* @__PURE__ */ O(w, {
372
+ className: `size-4 flex-shrink-0 text-text-muted transition-transform ${G === "accounts" ? "rotate-90 rtl:-rotate-90" : "rtl:rotate-180"}`,
310
373
  "aria-hidden": "true"
311
374
  })]
312
- }) : /* @__PURE__ */ T("div", {
375
+ }) : /* @__PURE__ */ O("div", {
313
376
  className: "flex items-center gap-3 px-1 py-2",
314
377
  "data-testid": "sidebar-profile-identity",
315
- children: Q
378
+ children: $
316
379
  }),
317
- a("accounts", o),
318
- $,
319
- $e((t) => /* @__PURE__ */ T("button", {
380
+ o("accounts", c),
381
+ ut,
382
+ lt((t) => /* @__PURE__ */ O("button", {
320
383
  type: "button",
321
384
  onClick: () => e(t.onSelect),
322
385
  "data-testid": `sidebar-profile-door-${t.id}`,
323
386
  className: "flex flex-col items-start gap-1.5 rounded-card border border-border-default p-3 text-start outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring",
324
- children: Qe(t)
387
+ children: ct(t)
325
388
  }, t.id)),
326
- /* @__PURE__ */ E("div", {
389
+ /* @__PURE__ */ k("div", {
327
390
  className: "pt-1.5",
328
391
  children: [
329
- N.length > 0 && /* @__PURE__ */ T("div", {
392
+ F.length > 0 && /* @__PURE__ */ O("div", {
330
393
  role: "group",
331
394
  "data-testid": "sidebar-profile-extra",
332
- children: N.map((t) => {
395
+ children: F.map((t) => {
333
396
  let n = t.icon;
334
- return /* @__PURE__ */ E("button", {
397
+ return /* @__PURE__ */ k("button", {
335
398
  type: "button",
336
399
  className: "flex h-control-sm w-full items-center gap-3 rounded-button px-2.5 text-start text-body-sm text-text-primary transition-colors hover:bg-bg-sunken outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:opacity-50",
337
400
  disabled: t.disabled,
338
401
  onClick: () => e(t.onSelect),
339
402
  "data-testid": `sidebar-profile-extra-${t.id}`,
340
- children: [n && /* @__PURE__ */ T(n, { className: "size-4 flex-shrink-0 text-text-secondary" }), /* @__PURE__ */ T("span", {
403
+ children: [n && /* @__PURE__ */ O(n, { className: "size-4 flex-shrink-0 text-text-secondary" }), /* @__PURE__ */ O("span", {
341
404
  className: "min-w-0 flex-1 truncate",
342
405
  children: t.label
343
406
  })]
344
407
  }, t.id);
345
408
  })
346
409
  }),
347
- /* @__PURE__ */ E("button", {
410
+ dt && V && K && /* @__PURE__ */ k(D, { children: [r("views", _e, V.label, void 0), G === "views" && /* @__PURE__ */ O("div", {
411
+ role: "group",
412
+ "aria-label": V.label,
413
+ className: "mb-1 ms-6 border-s border-border-subtle ps-2",
414
+ "data-testid": "sidebar-profile-views-list",
415
+ children: /* @__PURE__ */ O(ae, {
416
+ persona: K,
417
+ everythingLabel: W("nav.everything", "Everything"),
418
+ query: He,
419
+ onQueryChange: q,
420
+ close: ft,
421
+ onOpenCustomize: pt,
422
+ sectionClass: "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted",
423
+ renderRow: s
424
+ })
425
+ })] }),
426
+ /* @__PURE__ */ k("button", {
348
427
  type: "button",
349
- className: v,
350
- onClick: () => e(ke),
428
+ className: y,
429
+ onClick: () => e(Me),
351
430
  "data-testid": "sidebar-profile-settings",
352
431
  children: [
353
- /* @__PURE__ */ T(we, {
354
- className: g,
432
+ /* @__PURE__ */ O(Ee, {
433
+ className: _,
355
434
  "aria-hidden": "true"
356
435
  }),
357
- /* @__PURE__ */ T("span", {
436
+ /* @__PURE__ */ O("span", {
358
437
  className: "min-w-0 flex-1 truncate",
359
- children: Z.settings
438
+ children: Q.settings
360
439
  }),
361
- P && /* @__PURE__ */ T("span", {
440
+ I && /* @__PURE__ */ O("span", {
362
441
  className: "text-xs text-text-muted",
363
- children: P
442
+ children: I
364
443
  })
365
444
  ]
366
445
  }),
367
- r("appearance", Y, Z.appearance, Je),
368
- a("appearance", X.map((e) => ({
446
+ r("appearance", it, Q.appearance, rt),
447
+ o("appearance", [...Z.map(({ value: e, label: t }) => ({
369
448
  id: e,
370
- label: J[e],
371
- selected: e === F.value,
372
- onSelect: () => F.onChange(e)
373
- }))),
374
- r("language", ye, Z.language, Ye),
375
- a("language", I.options.map((e) => ({
449
+ label: t,
450
+ selected: e === L.value,
451
+ onSelect: () => L.onChange(e)
452
+ })), ...L.more ? [{
453
+ id: "more",
454
+ label: L.more.label,
455
+ onSelect: L.more.onSelect
456
+ }] : []]),
457
+ r("language", be, Q.language, at),
458
+ o("language", R.options.map((e) => ({
376
459
  id: e.code,
377
460
  label: e.label,
378
- selected: e.code === I.current,
379
- onSelect: () => I.onChange(e.code)
461
+ selected: e.code === R.current,
462
+ onSelect: () => R.onChange(e.code)
380
463
  }))),
381
- Xe && /* @__PURE__ */ E(w, { children: [r("help", be, Z.help, void 0), R ? H === "help" && /* @__PURE__ */ T("div", {
464
+ ot && /* @__PURE__ */ k(D, { children: [r("help", xe, Q.help, void 0), B ? G === "help" && /* @__PURE__ */ O("div", {
382
465
  role: "group",
383
- "aria-label": Z.help,
466
+ "aria-label": Q.help,
384
467
  className: "mb-1 ms-6 border-s border-border-subtle ps-2",
385
468
  "data-testid": "sidebar-profile-help-list",
386
- children: h({
387
- help: R,
469
+ children: se({
470
+ help: B,
388
471
  variant: "sheet",
389
- state: Pe,
390
- close: () => U(!1),
391
- idBase: Fe
472
+ state: Le,
473
+ close: () => J(!1),
474
+ idBase: Re
392
475
  })
393
- }) : a("help", L.map((e) => ({
476
+ }) : o("help", z.map((e) => ({
394
477
  id: e.id,
395
478
  label: e.label,
396
479
  onSelect: e.onSelect
397
480
  })))] })
398
481
  ]
399
482
  }),
400
- /* @__PURE__ */ T("div", {
483
+ /* @__PURE__ */ O("div", {
401
484
  className: "mt-2 border-t border-border-subtle pt-2",
402
- children: /* @__PURE__ */ E("button", {
485
+ children: /* @__PURE__ */ k("button", {
403
486
  type: "button",
404
- className: v,
405
- onClick: () => e(j),
487
+ className: y,
488
+ onClick: () => e(N),
406
489
  "data-testid": "sidebar-profile-logout",
407
- children: [/* @__PURE__ */ T(xe, {
408
- className: g,
490
+ children: [/* @__PURE__ */ O(Se, {
491
+ className: _,
409
492
  "aria-hidden": "true"
410
- }), /* @__PURE__ */ T("span", {
493
+ }), /* @__PURE__ */ O("span", {
411
494
  className: "truncate",
412
- children: Z.signOut
495
+ children: Q.signOut
413
496
  })]
414
497
  })
415
498
  })
@@ -417,141 +500,141 @@ function M({ user: n, roleLabel: i, orgName: ue, planChip: b, accounts: _e = [],
417
500
  })]
418
501
  });
419
502
  }
420
- let et = /* @__PURE__ */ E("button", {
503
+ let ht = /* @__PURE__ */ k("button", {
421
504
  type: "button",
422
- "aria-label": z ? G : void 0,
423
- title: z ? n.name : void 0,
505
+ "aria-label": H ? X : void 0,
506
+ title: H ? n.name : void 0,
424
507
  "data-testid": "sidebar-profile-trigger",
425
- className: `flex w-full min-w-0 items-center gap-2.5 rounded-button p-1.5 text-start outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:bg-bg-elevated ${z ? "justify-center" : ""}`,
426
- children: [A(n.name, n.avatarUrl, "md"), !z && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("span", {
508
+ className: `flex w-full min-w-0 items-center gap-2.5 rounded-button p-1.5 text-start outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:bg-bg-elevated ${H ? "justify-center" : ""}`,
509
+ children: [M(n.name, n.avatarUrl, "md"), !H && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ k("span", {
427
510
  className: "min-w-0 flex-1",
428
- children: [/* @__PURE__ */ T("span", {
511
+ children: [/* @__PURE__ */ O("span", {
429
512
  className: "block truncate text-body-sm font-semibold text-text-primary",
430
513
  children: n.name
431
- }), Ke && /* @__PURE__ */ T("span", {
514
+ }), et && /* @__PURE__ */ O("span", {
432
515
  className: "block truncate text-xs text-text-muted",
433
- children: Ke
516
+ children: et
434
517
  })]
435
- }), b && /* @__PURE__ */ T("span", {
518
+ }), x && /* @__PURE__ */ O("span", {
436
519
  className: "flex-shrink-0 rounded-pill bg-accent-soft px-2 py-0.5 text-caption font-semibold text-accent-primary",
437
520
  "data-testid": "sidebar-profile-plan-chip",
438
- children: b
521
+ children: x
439
522
  })] })]
440
523
  });
441
- return /* @__PURE__ */ E(a, {
442
- open: ze,
443
- onOpenChange: U,
524
+ return /* @__PURE__ */ k(o, {
525
+ open: Ge,
526
+ onOpenChange: J,
444
527
  modal: !1,
445
- children: [/* @__PURE__ */ T(te, {
528
+ children: [/* @__PURE__ */ O(ee, {
446
529
  asChild: !0,
447
- children: Ne ?? et
448
- }), /* @__PURE__ */ E(o, {
530
+ children: Ie ?? ht
531
+ }), /* @__PURE__ */ k(s, {
449
532
  side: "top",
450
533
  align: "start",
451
534
  sideOffset: 8,
452
535
  collisionPadding: 8,
453
- "aria-label": G,
536
+ "aria-label": X,
454
537
  "data-testid": "sidebar-profile-menu",
455
- className: r(ce, "max-h-[calc(100dvh-5rem)] w-[315px] overflow-y-auto"),
538
+ className: i(le, "max-h-[calc(100dvh-5rem)] w-[315px] overflow-y-auto"),
456
539
  children: [
457
- Ge ? /* @__PURE__ */ E(f, { children: [/* @__PURE__ */ T(m, {
540
+ $e ? /* @__PURE__ */ k(m, { children: [/* @__PURE__ */ O(g, {
458
541
  className: "gap-3 rounded-button px-1.5 py-2 focus:bg-bg-sunken",
459
542
  "data-testid": "sidebar-profile-identity",
460
- children: Q
461
- }), /* @__PURE__ */ E(p, {
543
+ children: $
544
+ }), /* @__PURE__ */ k(h, {
462
545
  sideOffset: 8,
463
546
  "data-testid": "sidebar-profile-accounts",
464
- className: r(y, "w-72"),
547
+ className: i(b, "w-72"),
465
548
  children: [
466
- k && /* @__PURE__ */ E(c, {
549
+ j && /* @__PURE__ */ k(l, {
467
550
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
468
- onSelect: () => k(),
551
+ onSelect: () => j(),
469
552
  "data-testid": "sidebar-profile-view-profile",
470
- children: [/* @__PURE__ */ T(Te, {
553
+ children: [/* @__PURE__ */ O(De, {
471
554
  className: "size-4 flex-shrink-0 text-text-secondary",
472
555
  "aria-hidden": "true"
473
- }), /* @__PURE__ */ T("span", {
556
+ }), /* @__PURE__ */ O("span", {
474
557
  className: "truncate",
475
- children: Z.viewProfile
558
+ children: Q.viewProfile
476
559
  })]
477
560
  }),
478
- q && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
561
+ Qe && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
479
562
  role: "presentation",
480
563
  className: "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted",
481
- children: We
482
- }), K.map((e) => /* @__PURE__ */ E("div", {
564
+ children: Xe
565
+ }), Ze.map((e) => /* @__PURE__ */ k("div", {
483
566
  role: "none",
484
567
  className: "flex items-center gap-1",
485
- children: [/* @__PURE__ */ E(c, {
568
+ children: [/* @__PURE__ */ k(l, {
486
569
  className: "min-w-0 flex-1 gap-3 rounded-button px-2.5 py-1.5 focus:bg-bg-sunken",
487
- onSelect: () => S?.(e.id),
570
+ onSelect: () => T?.(e.id),
488
571
  "data-testid": `sidebar-profile-account-${e.id}`,
489
- children: [A(e.name || e.email, e.avatar, "sm"), /* @__PURE__ */ E("span", {
572
+ children: [M(e.name || e.email, e.avatar, "sm"), /* @__PURE__ */ k("span", {
490
573
  className: "min-w-0 flex-1",
491
- children: [/* @__PURE__ */ T("span", {
574
+ children: [/* @__PURE__ */ O("span", {
492
575
  className: "block truncate font-medium",
493
576
  children: e.name || e.email
494
- }), e.name && /* @__PURE__ */ T("span", {
577
+ }), e.name && /* @__PURE__ */ O("span", {
495
578
  className: "block truncate text-xs text-text-muted",
496
579
  children: e.email
497
580
  })]
498
581
  })]
499
- }), O && /* @__PURE__ */ T(c, {
500
- "aria-label": Ze(e),
582
+ }), A && /* @__PURE__ */ O(l, {
583
+ "aria-label": st(e),
501
584
  className: "size-8 flex-shrink-0 justify-center rounded-button p-0 text-text-muted focus:bg-bg-sunken",
502
- onSelect: () => O(e.id),
585
+ onSelect: () => A(e.id),
503
586
  "data-testid": `sidebar-profile-remove-${e.id}`,
504
- children: /* @__PURE__ */ T(Ee, {
587
+ children: /* @__PURE__ */ O(Oe, {
505
588
  className: "size-4",
506
589
  "aria-hidden": "true"
507
590
  })
508
591
  })]
509
592
  }, e.id))] }),
510
- C && /* @__PURE__ */ E(c, {
593
+ E && /* @__PURE__ */ k(l, {
511
594
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
512
- onSelect: () => C(),
595
+ onSelect: () => E(),
513
596
  "data-testid": "sidebar-profile-add-account",
514
- children: [/* @__PURE__ */ T(Ce, {
597
+ children: [/* @__PURE__ */ O(Te, {
515
598
  className: "size-4 flex-shrink-0 text-text-secondary",
516
599
  "aria-hidden": "true"
517
- }), /* @__PURE__ */ T("span", {
600
+ }), /* @__PURE__ */ O("span", {
518
601
  className: "truncate",
519
- children: Z.addAccount
602
+ children: Q.addAccount
520
603
  })]
521
604
  })
522
605
  ]
523
- })] }) : /* @__PURE__ */ T("div", {
606
+ })] }) : /* @__PURE__ */ O("div", {
524
607
  className: "flex items-center gap-3 px-1.5 py-2",
525
608
  "data-testid": "sidebar-profile-identity",
526
- children: Q
609
+ children: $
527
610
  }),
528
- $ && /* @__PURE__ */ T(De.Provider, {
611
+ ut && /* @__PURE__ */ O(Ae.Provider, {
529
612
  value: !0,
530
- children: $
613
+ children: ut
531
614
  }),
532
- $e((e) => /* @__PURE__ */ T(c, {
615
+ lt((e) => /* @__PURE__ */ O(l, {
533
616
  onSelect: () => e.onSelect(),
534
617
  "data-testid": `sidebar-profile-door-${e.id}`,
535
618
  className: "flex-col items-start gap-1.5 rounded-card border border-border-default p-3 focus:bg-bg-sunken",
536
- children: Qe(e)
619
+ children: ct(e)
537
620
  }, e.id)),
538
- N.length > 0 && /* @__PURE__ */ T(s, {
621
+ F.length > 0 && /* @__PURE__ */ O(c, {
539
622
  className: "mt-1",
540
623
  "data-testid": "sidebar-profile-extra",
541
- children: N.map((e) => {
624
+ children: F.map((e) => {
542
625
  let t = e.icon;
543
- return /* @__PURE__ */ E(c, {
626
+ return /* @__PURE__ */ k(l, {
544
627
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
545
628
  disabled: e.disabled,
546
629
  onSelect: () => e.onSelect(),
547
630
  "data-testid": `sidebar-profile-extra-${e.id}`,
548
631
  children: [
549
- t && /* @__PURE__ */ T(t, { className: "size-4 flex-shrink-0 text-text-secondary" }),
550
- /* @__PURE__ */ T("span", {
632
+ t && /* @__PURE__ */ O(t, { className: "size-4 flex-shrink-0 text-text-secondary" }),
633
+ /* @__PURE__ */ O("span", {
551
634
  className: "min-w-0 flex-1 truncate",
552
635
  children: e.label
553
636
  }),
554
- e.shortcut && /* @__PURE__ */ T(d, {
637
+ e.shortcut && /* @__PURE__ */ O(p, {
555
638
  className: "tracking-normal",
556
639
  children: e.shortcut
557
640
  })
@@ -559,144 +642,153 @@ function M({ user: n, roleLabel: i, orgName: ue, planChip: b, accounts: _e = [],
559
642
  }, e.id);
560
643
  })
561
644
  }),
562
- /* @__PURE__ */ E(c, {
563
- className: r(_, N.length > 0 ? void 0 : "mt-1"),
564
- onSelect: () => ke(),
645
+ mt,
646
+ /* @__PURE__ */ k(l, {
647
+ className: i(v, F.length > 0 || mt ? void 0 : "mt-1"),
648
+ onSelect: () => Me(),
565
649
  "data-testid": "sidebar-profile-settings",
566
650
  children: [
567
- /* @__PURE__ */ T(we, {
568
- className: g,
651
+ /* @__PURE__ */ O(Ee, {
652
+ className: _,
569
653
  "aria-hidden": "true"
570
654
  }),
571
- /* @__PURE__ */ T("span", {
655
+ /* @__PURE__ */ O("span", {
572
656
  className: "min-w-0 flex-1 truncate",
573
- children: Z.settings
657
+ children: Q.settings
574
658
  }),
575
- P && /* @__PURE__ */ T(d, {
659
+ I && /* @__PURE__ */ O(p, {
576
660
  className: "tracking-normal",
577
- children: P
661
+ children: I
578
662
  })
579
663
  ]
580
664
  }),
581
- /* @__PURE__ */ E(f, { children: [/* @__PURE__ */ E(m, {
582
- className: _,
665
+ /* @__PURE__ */ k(m, { children: [/* @__PURE__ */ k(g, {
666
+ className: v,
583
667
  "data-testid": "sidebar-profile-appearance",
584
668
  children: [
585
- /* @__PURE__ */ T(Y, {
586
- className: g,
669
+ /* @__PURE__ */ O(it, {
670
+ className: _,
587
671
  "aria-hidden": "true"
588
672
  }),
589
- /* @__PURE__ */ T("span", {
673
+ /* @__PURE__ */ O("span", {
590
674
  className: "flex-shrink-0",
591
- children: Z.appearance
675
+ children: Q.appearance
592
676
  }),
593
- /* @__PURE__ */ T("span", {
594
- className: le,
595
- children: Je
677
+ /* @__PURE__ */ O("span", {
678
+ className: de,
679
+ children: rt
596
680
  })
597
681
  ]
598
- }), /* @__PURE__ */ T(p, {
682
+ }), /* @__PURE__ */ k(h, {
599
683
  sideOffset: 8,
600
684
  "data-testid": "sidebar-profile-appearance-menu",
601
- className: r(y, "w-56"),
602
- children: /* @__PURE__ */ T(l, {
603
- value: F.value,
685
+ className: i(b, "w-56"),
686
+ children: [/* @__PURE__ */ O(u, {
687
+ value: L.value,
604
688
  onValueChange: (e) => {
605
- let t = X.find((t) => t === e);
606
- t && F.onChange(t);
689
+ let t = Z.find((t) => t.value === e);
690
+ t && L.onChange(t.value);
607
691
  },
608
- children: X.map((e) => {
609
- let t = D[e];
610
- return /* @__PURE__ */ E(u, {
692
+ children: Z.map(({ value: e, label: t }) => {
693
+ let n = ke[e] ?? we;
694
+ return /* @__PURE__ */ k(d, {
611
695
  value: e,
612
696
  className: "h-control-sm gap-2.5 rounded-button focus:bg-bg-sunken",
613
697
  "data-testid": `sidebar-profile-appearance-${e}`,
614
- children: [/* @__PURE__ */ T(t, {
615
- className: g,
698
+ children: [/* @__PURE__ */ O(n, {
699
+ className: _,
616
700
  "aria-hidden": "true"
617
- }), /* @__PURE__ */ T("span", {
701
+ }), /* @__PURE__ */ O("span", {
618
702
  className: "truncate",
619
- children: J[e]
703
+ children: t
620
704
  })]
621
705
  }, e);
622
706
  })
623
- })
707
+ }), L.more && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(f, {}), /* @__PURE__ */ O(l, {
708
+ className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
709
+ onSelect: () => L.more?.onSelect(),
710
+ "data-testid": "sidebar-profile-appearance-more",
711
+ children: /* @__PURE__ */ O("span", {
712
+ className: "min-w-0 flex-1 truncate",
713
+ children: L.more.label
714
+ })
715
+ })] })]
624
716
  })] }),
625
- /* @__PURE__ */ E(f, { children: [/* @__PURE__ */ E(m, {
626
- className: _,
717
+ /* @__PURE__ */ k(m, { children: [/* @__PURE__ */ k(g, {
718
+ className: v,
627
719
  "data-testid": "sidebar-profile-language",
628
720
  children: [
629
- /* @__PURE__ */ T(ye, {
630
- className: g,
721
+ /* @__PURE__ */ O(be, {
722
+ className: _,
631
723
  "aria-hidden": "true"
632
724
  }),
633
- /* @__PURE__ */ T("span", {
725
+ /* @__PURE__ */ O("span", {
634
726
  className: "flex-shrink-0",
635
- children: Z.language
727
+ children: Q.language
636
728
  }),
637
- /* @__PURE__ */ T("span", {
638
- className: le,
639
- children: Ye
729
+ /* @__PURE__ */ O("span", {
730
+ className: de,
731
+ children: at
640
732
  })
641
733
  ]
642
- }), /* @__PURE__ */ T(p, {
734
+ }), /* @__PURE__ */ O(h, {
643
735
  sideOffset: 8,
644
736
  "data-testid": "sidebar-profile-language-menu",
645
- className: r(y, "w-56"),
646
- children: /* @__PURE__ */ T(l, {
647
- value: I.current,
648
- onValueChange: (e) => I.onChange(e),
649
- children: I.options.map((e) => /* @__PURE__ */ T(u, {
737
+ className: i(b, "w-56"),
738
+ children: /* @__PURE__ */ O(u, {
739
+ value: R.current,
740
+ onValueChange: (e) => R.onChange(e),
741
+ children: R.options.map((e) => /* @__PURE__ */ O(d, {
650
742
  value: e.code,
651
743
  className: "h-control-sm rounded-button focus:bg-bg-sunken",
652
744
  "data-testid": `sidebar-profile-language-${e.code}`,
653
- children: /* @__PURE__ */ T("span", {
745
+ children: /* @__PURE__ */ O("span", {
654
746
  className: "truncate",
655
747
  children: e.label
656
748
  })
657
749
  }, e.code))
658
750
  })
659
751
  })] }),
660
- Xe && /* @__PURE__ */ E(f, { children: [/* @__PURE__ */ E(m, {
752
+ ot && /* @__PURE__ */ k(m, { children: [/* @__PURE__ */ k(g, {
661
753
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
662
754
  "data-testid": "sidebar-profile-help",
663
- children: [/* @__PURE__ */ T(be, {
755
+ children: [/* @__PURE__ */ O(xe, {
664
756
  className: "size-4 flex-shrink-0 text-text-secondary",
665
757
  "aria-hidden": "true"
666
- }), /* @__PURE__ */ T("span", {
758
+ }), /* @__PURE__ */ O("span", {
667
759
  className: "min-w-0 flex-1 truncate",
668
- children: Z.help
760
+ children: Q.help
669
761
  })]
670
- }), R ? /* @__PURE__ */ T(p, {
762
+ }), B ? /* @__PURE__ */ O(h, {
671
763
  sideOffset: 8,
672
764
  collisionPadding: 8,
673
765
  "data-testid": "sidebar-profile-help-menu",
674
- className: r("rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", "w-[340px] max-w-[calc(100vw-1rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overscroll-contain data-[state=open]:animate-none data-[state=closed]:animate-none motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out"),
675
- children: h({
676
- help: R,
766
+ className: i("rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", "w-[340px] max-w-[calc(100vw-1rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overscroll-contain data-[state=open]:animate-none data-[state=closed]:animate-none motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out"),
767
+ children: se({
768
+ help: B,
677
769
  variant: "popover",
678
- state: Pe,
679
- close: () => U(!1),
680
- idBase: Fe
770
+ state: Le,
771
+ close: () => J(!1),
772
+ idBase: Re
681
773
  })
682
- }) : /* @__PURE__ */ T(p, {
774
+ }) : /* @__PURE__ */ O(h, {
683
775
  sideOffset: 8,
684
776
  "data-testid": "sidebar-profile-help-menu",
685
- className: r("max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", "w-60"),
686
- children: L.map((e) => {
777
+ className: i("max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", "w-60"),
778
+ children: z.map((e) => {
687
779
  let t = e.icon;
688
- return /* @__PURE__ */ E(c, {
780
+ return /* @__PURE__ */ k(l, {
689
781
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
690
782
  disabled: e.disabled,
691
783
  onSelect: () => e.onSelect(),
692
784
  "data-testid": `sidebar-profile-help-${e.id}`,
693
785
  children: [
694
- t && /* @__PURE__ */ T(t, { className: "size-4 flex-shrink-0 text-text-secondary" }),
695
- /* @__PURE__ */ T("span", {
786
+ t && /* @__PURE__ */ O(t, { className: "size-4 flex-shrink-0 text-text-secondary" }),
787
+ /* @__PURE__ */ O("span", {
696
788
  className: "min-w-0 flex-1 truncate",
697
789
  children: e.label
698
790
  }),
699
- e.shortcut && /* @__PURE__ */ T(d, {
791
+ e.shortcut && /* @__PURE__ */ O(p, {
700
792
  className: "tracking-normal",
701
793
  children: e.shortcut
702
794
  })
@@ -704,40 +796,40 @@ function M({ user: n, roleLabel: i, orgName: ue, planChip: b, accounts: _e = [],
704
796
  }, e.id);
705
797
  })
706
798
  })] }),
707
- Ae && /* @__PURE__ */ E(c, {
799
+ Ne && /* @__PURE__ */ k(l, {
708
800
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
709
- onSelect: () => Ae(),
801
+ onSelect: () => Ne(),
710
802
  "data-testid": "sidebar-profile-shortcuts",
711
803
  children: [
712
- /* @__PURE__ */ T(ve, {
804
+ /* @__PURE__ */ O(ye, {
713
805
  className: "size-4 flex-shrink-0 text-text-secondary",
714
806
  "aria-hidden": "true"
715
807
  }),
716
- /* @__PURE__ */ T("span", {
808
+ /* @__PURE__ */ O("span", {
717
809
  className: "min-w-0 flex-1 truncate",
718
- children: Z.shortcuts
810
+ children: Q.shortcuts
719
811
  }),
720
- /* @__PURE__ */ T(d, {
812
+ /* @__PURE__ */ O(p, {
721
813
  className: "tracking-normal",
722
814
  children: "?"
723
815
  })
724
816
  ]
725
817
  }),
726
- /* @__PURE__ */ T(ee, { className: "my-1.5" }),
727
- /* @__PURE__ */ E(c, {
728
- className: _,
729
- onSelect: () => j(),
818
+ /* @__PURE__ */ O(f, { className: "my-1.5" }),
819
+ /* @__PURE__ */ k(l, {
820
+ className: v,
821
+ onSelect: () => N(),
730
822
  "data-testid": "sidebar-profile-logout",
731
- children: [/* @__PURE__ */ T(xe, {
732
- className: g,
823
+ children: [/* @__PURE__ */ O(Se, {
824
+ className: _,
733
825
  "aria-hidden": "true"
734
- }), /* @__PURE__ */ T("span", {
826
+ }), /* @__PURE__ */ O("span", {
735
827
  className: "truncate",
736
- children: Z.signOut
828
+ children: Q.signOut
737
829
  })]
738
830
  })
739
831
  ]
740
832
  })]
741
833
  });
742
834
  }
743
- export { j as PlanUsageCard, M as SidebarProfileMenu };
835
+ export { N as PlanUsageCard, P as SidebarProfileMenu };