@burdenoff/microfe-brainyrich 2026.827.1 → 2026.828.2

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 (43) hide show
  1. package/dist/brainyrich/BrainyRichRoot.d.ts.map +1 -1
  2. package/dist/brainyrich/BrainyRichRoot.js +59 -59
  3. package/dist/brainyrich/BrainyRichRoot.js.map +1 -1
  4. package/dist/brainyrich/components/viz.d.ts.map +1 -1
  5. package/dist/brainyrich/components/viz.js +1 -1
  6. package/dist/brainyrich/components/viz.js.map +1 -1
  7. package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +3 -1
  8. package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -1
  9. package/dist/brainyrich/hooks/useBrainyRichApi.js +6 -2
  10. package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
  11. package/dist/brainyrich/pages/AccountsPage.d.ts.map +1 -1
  12. package/dist/brainyrich/pages/AccountsPage.js +159 -148
  13. package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
  14. package/dist/brainyrich/pages/AiAssistantPage.js +192 -192
  15. package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
  16. package/dist/brainyrich/pages/AnalyticsPage.js +9 -9
  17. package/dist/brainyrich/pages/AnalyticsPage.js.map +1 -1
  18. package/dist/brainyrich/pages/DashboardPage.js +115 -115
  19. package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
  20. package/dist/brainyrich/pages/FamilyPage.js +59 -59
  21. package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
  22. package/dist/brainyrich/pages/GoalsPage.js +285 -285
  23. package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
  24. package/dist/brainyrich/pages/InvestmentsPage.js +18 -18
  25. package/dist/brainyrich/pages/InvestmentsPage.js.map +1 -1
  26. package/dist/brainyrich/pages/PortfoliosPage.d.ts.map +1 -1
  27. package/dist/brainyrich/pages/PortfoliosPage.js +322 -322
  28. package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
  29. package/dist/brainyrich/pages/ReportsPage.js +17 -17
  30. package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
  31. package/dist/brainyrich/pages/RiskPage.js +16 -16
  32. package/dist/brainyrich/pages/RiskPage.js.map +1 -1
  33. package/dist/brainyrich/pages/TaxPage.d.ts.map +1 -1
  34. package/dist/brainyrich/pages/TaxPage.js +14 -14
  35. package/dist/brainyrich/pages/TaxPage.js.map +1 -1
  36. package/dist/brainyrich/types/bra.d.ts.map +1 -1
  37. package/dist/generated/global-operations.d.ts +31 -1
  38. package/dist/generated/global-operations.d.ts.map +1 -1
  39. package/dist/generated/wspace-operations.d.ts +31 -1
  40. package/dist/generated/wspace-operations.d.ts.map +1 -1
  41. package/dist/test/setup.d.ts +1 -0
  42. package/dist/test/setup.d.ts.map +1 -0
  43. package/package.json +11 -2
@@ -4,15 +4,15 @@ import { LoadMore as te } from "../components/LoadMore.js";
4
4
  import { ConfirmDialog as ne } from "../components/ConfirmDialog.js";
5
5
  import { FadeIn as d, GlassCard as re, MiniAreaChart as ie, ProgressRing as ae, StatTile as f } from "../components/viz.js";
6
6
  import "../components/index.js";
7
- import { EmptyState as oe, ErrorState as se, LoadingState as ce, SectionShell as p, formatCompact as le, formatDate as m, formatMoney as h, formatPct as ue, statusBadgeVariant as de } from "./_shared.js";
7
+ import { EmptyState as oe, ErrorState as se, LoadingState as ce, SectionShell as p, formatCompact as le, formatDate as ue, formatMoney as m, formatPct as h, statusBadgeVariant as de } from "./_shared.js";
8
8
  import { hapticSuccess as g, showToast as _ } from "../utils/nativeControls.js";
9
9
  import { useTrackBrainyRichPageView as v } from "../hooks/useBrainyRichAnalytics.js";
10
10
  import { TagField as y } from "../components/reuse/TagField.js";
11
11
  import { useMemo as b, useState as x } from "react";
12
- import { AlertTriangle as S, CalendarClock as fe, Coins as pe, LineChart as me, Link2 as he, MoreHorizontal as C, PiggyBank as ge, Plus as w, RefreshCw as _e, Target as T, Trash2 as ve, TrendingDown as E, TrendingUp as D, Unlink as O, Wallet as k } from "lucide-react";
13
- import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
- import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
15
- import { Badge as ye, Button as P, Card as be, CardContent as xe, CardDescription as F, CardHeader as I, CardTitle as L, Dialog as R, DialogContent as z, DialogDescription as B, DialogFooter as V, DialogHeader as H, DialogTitle as U, DropdownMenu as Se, DropdownMenuContent as Ce, DropdownMenuItem as we, DropdownMenuSeparator as Te, DropdownMenuTrigger as Ee, Input as W, Label as G, Select as K, SelectContent as q, SelectItem as J, SelectTrigger as Y, SelectValue as X, Sheet as De, SheetContent as Oe, SheetDescription as ke, SheetHeader as Ae, SheetTitle as je, Table as Me, TableBody as Ne, TableCell as Z, TableHead as Q, TableHeader as Pe, TableRow as Fe, Textarea as Ie } from "@burdenoff/fe-libs/ui";
12
+ import { AlertTriangle as S, CalendarClock as fe, Coins as pe, LineChart as me, Link2 as he, MoreHorizontal as C, PiggyBank as ge, Plus as w, RefreshCw as _e, Target as T, Trash2 as ve, TrendingDown as E, TrendingUp as ye, Unlink as D, Wallet as O } from "lucide-react";
13
+ import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
15
+ import { Badge as N, Button as P, Card as be, CardContent as xe, CardDescription as F, CardHeader as I, CardTitle as L, DropdownMenu as Se, DropdownMenuContent as Ce, DropdownMenuItem as R, DropdownMenuSeparator as we, DropdownMenuTrigger as Te, Input as z, Label as B, ResponsiveDialog as V, ResponsiveDialogContent as H, ResponsiveDialogDescription as U, ResponsiveDialogFooter as W, ResponsiveDialogHeader as G, ResponsiveDialogTitle as Ee, Select as K, SelectContent as q, SelectItem as J, SelectTrigger as Y, SelectValue as X, Sheet as De, SheetContent as Oe, SheetDescription as ke, SheetHeader as Ae, SheetTitle as je, Table as Me, TableBody as Ne, TableCell as Z, TableHead as Q, TableHeader as Pe, TableRow as Fe, Textarea as Ie } from "@burdenoff/fe-libs/ui";
16
16
  //#region src/brainyrich/pages/GoalsPage.tsx
17
17
  var Le = [
18
18
  "RETIREMENT",
@@ -32,7 +32,7 @@ function ze(e) {
32
32
  switch (e) {
33
33
  case "AHEAD":
34
34
  case "ON_TRACK": return {
35
- icon: D,
35
+ icon: ye,
36
36
  tone: "text-status-success-text"
37
37
  };
38
38
  case "BEHIND": return {
@@ -117,9 +117,9 @@ function Ke(e) {
117
117
  }
118
118
  var qe = "__none__";
119
119
  function Je() {
120
- let { t } = A(), i = (n, r, i) => e(t, n, r, i);
120
+ let { t } = k(), i = (n, r, i) => e(t, n, r, i);
121
121
  v("brainyrich.goals.viewed");
122
- let { items: a, hasMore: s, loadMore: l, isFetchingNextPage: u, isLoading: re, isError: ie, refetch: le } = c(), { data: ue } = o(), y = r(), me = ee(), E = n(), [D, O] = x(!1), [k, R] = x(null), [z, B] = x(null), [V, H] = x(null), [U, W] = x(Ge), G = (e, t) => W((n) => ({
122
+ let { items: a, hasMore: s, loadMore: l, isFetchingNextPage: u, isLoading: re, isError: ie, refetch: le } = c(), { data: h } = o(), y = r(), me = ee(), E = n(), [ye, D] = x(!1), [O, z] = x(null), [B, V] = x(null), [H, U] = x(null), [W, G] = x(Ge), Ee = (e, t) => G((n) => ({
123
123
  ...n,
124
124
  [e]: t
125
125
  })), K = b(() => ({
@@ -127,47 +127,47 @@ function Je() {
127
127
  totalMonthly: a.reduce((e, t) => e + t.monthlyContribution, 0),
128
128
  atRisk: a.filter((e) => e.projection === "AT_RISK" || e.projection === "BEHIND").length
129
129
  }), [a]), q = a[0]?.currency ?? "USD", J = () => {
130
- W(Ge()), O(!0);
130
+ G(Ge()), D(!0);
131
131
  }, Y = (e) => {
132
- W(Ke(e)), R(e);
133
- }, X = U.name.trim().length > 0 && Number(U.targetAmount) > 0 && U.targetDate.length > 0;
134
- return /* @__PURE__ */ N("div", {
132
+ G(Ke(e)), z(e);
133
+ }, X = W.name.trim().length > 0 && Number(W.targetAmount) > 0 && W.targetDate.length > 0;
134
+ return /* @__PURE__ */ M("div", {
135
135
  "data-tour": "brainyrich-page-goals",
136
136
  className: "contents",
137
137
  children: [
138
- /* @__PURE__ */ M(p, {
138
+ /* @__PURE__ */ j(p, {
139
139
  title: i("brainyrich.goals.title", "Financial Goals"),
140
140
  description: i("brainyrich.goals.description", "Track progress toward your wealth milestones and life objectives"),
141
141
  actionLabel: i("brainyrich.goals.actions.createGoal", "New goal"),
142
142
  onAction: J,
143
- children: re ? /* @__PURE__ */ M(ce, { rows: 4 }) : ie ? /* @__PURE__ */ M(se, {
143
+ children: re ? /* @__PURE__ */ j(ce, { rows: 4 }) : ie ? /* @__PURE__ */ j(se, {
144
144
  title: i("brainyrich.goals.error.title", "Could not load goals"),
145
145
  description: i("brainyrich.goals.error.description", "We could not reach the goals service. Please try again."),
146
146
  onRetry: () => le()
147
- }) : a.length === 0 ? /* @__PURE__ */ M(oe, {
148
- icon: /* @__PURE__ */ M(T, {
147
+ }) : a.length === 0 ? /* @__PURE__ */ j(oe, {
148
+ icon: /* @__PURE__ */ j(T, {
149
149
  className: "size-6",
150
150
  "aria-hidden": "true"
151
151
  }),
152
152
  title: i("brainyrich.goals.empty.title", "No financial goals yet"),
153
153
  description: i("brainyrich.goals.empty.description", "Create your first goal to start tracking progress toward a milestone."),
154
- action: /* @__PURE__ */ N(P, {
154
+ action: /* @__PURE__ */ M(P, {
155
155
  size: "sm",
156
156
  onClick: J,
157
- children: [/* @__PURE__ */ M(w, {
157
+ children: [/* @__PURE__ */ j(w, {
158
158
  className: "size-4",
159
159
  "aria-hidden": "true"
160
160
  }), i("brainyrich.goals.actions.createGoal", "New goal")]
161
161
  })
162
- }) : /* @__PURE__ */ N(j, { children: [
163
- /* @__PURE__ */ N("div", {
162
+ }) : /* @__PURE__ */ M(A, { children: [
163
+ /* @__PURE__ */ M("div", {
164
164
  className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-4",
165
165
  children: [
166
- /* @__PURE__ */ M(d, {
166
+ /* @__PURE__ */ j(d, {
167
167
  index: 0,
168
- children: /* @__PURE__ */ M(f, {
168
+ children: /* @__PURE__ */ j(f, {
169
169
  glow: !0,
170
- icon: /* @__PURE__ */ M(T, {
170
+ icon: /* @__PURE__ */ j(T, {
171
171
  className: "size-4",
172
172
  "aria-hidden": "true"
173
173
  }),
@@ -175,32 +175,32 @@ function Je() {
175
175
  value: String(a.length)
176
176
  })
177
177
  }),
178
- /* @__PURE__ */ M(d, {
178
+ /* @__PURE__ */ j(d, {
179
179
  index: 1,
180
- children: /* @__PURE__ */ M(f, {
181
- icon: /* @__PURE__ */ M(ge, {
180
+ children: /* @__PURE__ */ j(f, {
181
+ icon: /* @__PURE__ */ j(ge, {
182
182
  className: "size-4",
183
183
  "aria-hidden": "true"
184
184
  }),
185
185
  label: i("brainyrich.goals.metrics.totalTarget", "Total target"),
186
- value: h(K.totalTarget, q)
186
+ value: m(K.totalTarget, q)
187
187
  })
188
188
  }),
189
- /* @__PURE__ */ M(d, {
189
+ /* @__PURE__ */ j(d, {
190
190
  index: 2,
191
- children: /* @__PURE__ */ M(f, {
192
- icon: /* @__PURE__ */ M(pe, {
191
+ children: /* @__PURE__ */ j(f, {
192
+ icon: /* @__PURE__ */ j(pe, {
193
193
  className: "size-4",
194
194
  "aria-hidden": "true"
195
195
  }),
196
196
  label: i("brainyrich.goals.metrics.monthly", "Monthly contributions"),
197
- value: h(K.totalMonthly, q)
197
+ value: m(K.totalMonthly, q)
198
198
  })
199
199
  }),
200
- /* @__PURE__ */ M(d, {
200
+ /* @__PURE__ */ j(d, {
201
201
  index: 3,
202
- children: /* @__PURE__ */ M(f, {
203
- icon: /* @__PURE__ */ M(S, {
202
+ children: /* @__PURE__ */ j(f, {
203
+ icon: /* @__PURE__ */ j(S, {
204
204
  className: "size-4",
205
205
  "aria-hidden": "true"
206
206
  }),
@@ -211,72 +211,72 @@ function Je() {
211
211
  })
212
212
  ]
213
213
  }),
214
- /* @__PURE__ */ M("div", {
214
+ /* @__PURE__ */ j("div", {
215
215
  className: "grid gap-4 md:grid-cols-2 xl:grid-cols-3",
216
216
  children: a.map((e, t) => {
217
217
  let n = ze(e.projection), r = n.icon, a = He(e.status, e.projection), o = Ve(e);
218
- return /* @__PURE__ */ M(d, {
218
+ return /* @__PURE__ */ j(d, {
219
219
  index: t,
220
- children: /* @__PURE__ */ N(be, {
220
+ children: /* @__PURE__ */ M(be, {
221
221
  className: `group flex h-full flex-col transition-shadow motion-safe:hover:shadow-[var(--shadow-pop-hover,var(--shadow-elevation-2))] ${e.status === "ACHIEVED" ? "ring-1 ring-status-success-text/30" : ""}`,
222
- children: [/* @__PURE__ */ M(I, {
222
+ children: [/* @__PURE__ */ j(I, {
223
223
  className: "pb-3",
224
- children: /* @__PURE__ */ N("div", {
224
+ children: /* @__PURE__ */ M("div", {
225
225
  className: "flex items-start justify-between gap-2",
226
- children: [/* @__PURE__ */ N("div", {
226
+ children: [/* @__PURE__ */ M("div", {
227
227
  className: "min-w-0",
228
- children: [/* @__PURE__ */ N(L, {
228
+ children: [/* @__PURE__ */ M(L, {
229
229
  className: "flex items-center gap-2 text-base",
230
- children: [/* @__PURE__ */ M(T, {
230
+ children: [/* @__PURE__ */ j(T, {
231
231
  className: "size-4 shrink-0 text-text-secondary",
232
232
  "aria-hidden": "true"
233
- }), /* @__PURE__ */ M("span", {
233
+ }), /* @__PURE__ */ j("span", {
234
234
  className: "truncate",
235
235
  children: e.name
236
236
  })]
237
- }), /* @__PURE__ */ N(F, {
237
+ }), /* @__PURE__ */ M(F, {
238
238
  className: "mt-1 flex flex-wrap items-center gap-2",
239
- children: [/* @__PURE__ */ M(ye, {
239
+ children: [/* @__PURE__ */ j(N, {
240
240
  variant: "outline",
241
241
  children: $(e.type)
242
- }), /* @__PURE__ */ M(ye, {
242
+ }), /* @__PURE__ */ j(N, {
243
243
  variant: de(e.status),
244
244
  children: $(e.status)
245
245
  })]
246
246
  })]
247
- }), /* @__PURE__ */ N(Se, { children: [/* @__PURE__ */ M(Ee, {
247
+ }), /* @__PURE__ */ M(Se, { children: [/* @__PURE__ */ j(Te, {
248
248
  asChild: !0,
249
- children: /* @__PURE__ */ M(P, {
249
+ children: /* @__PURE__ */ j(P, {
250
250
  variant: "ghost",
251
251
  size: "icon",
252
252
  "aria-label": i("brainyrich.goals.actions.menu", "Goal actions"),
253
- children: /* @__PURE__ */ M(C, {
253
+ children: /* @__PURE__ */ j(C, {
254
254
  className: "size-4",
255
255
  "aria-hidden": "true"
256
256
  })
257
257
  })
258
- }), /* @__PURE__ */ N(Ce, {
258
+ }), /* @__PURE__ */ M(Ce, {
259
259
  align: "end",
260
260
  children: [
261
- /* @__PURE__ */ N(we, {
262
- onSelect: () => B(e.id),
263
- children: [/* @__PURE__ */ M(he, {
261
+ /* @__PURE__ */ M(R, {
262
+ onSelect: () => V(e.id),
263
+ children: [/* @__PURE__ */ j(he, {
264
264
  className: "size-4",
265
265
  "aria-hidden": "true"
266
266
  }), i("brainyrich.goals.actions.manageFunding", "Manage funding")]
267
267
  }),
268
- /* @__PURE__ */ N(we, {
268
+ /* @__PURE__ */ M(R, {
269
269
  onSelect: () => Y(e),
270
- children: [/* @__PURE__ */ M(_e, {
270
+ children: [/* @__PURE__ */ j(_e, {
271
271
  className: "size-4",
272
272
  "aria-hidden": "true"
273
273
  }), i("brainyrich.goals.actions.editGoal", "Edit goal")]
274
274
  }),
275
- /* @__PURE__ */ M(Te, {}),
276
- /* @__PURE__ */ N(we, {
275
+ /* @__PURE__ */ j(we, {}),
276
+ /* @__PURE__ */ M(R, {
277
277
  className: "text-status-error-text focus:text-status-error-text",
278
- onSelect: () => H(e),
279
- children: [/* @__PURE__ */ M(ve, {
278
+ onSelect: () => U(e),
279
+ children: [/* @__PURE__ */ j(ve, {
280
280
  className: "size-4",
281
281
  "aria-hidden": "true"
282
282
  }), i("brainyrich.goals.actions.archive", "Archive goal")]
@@ -284,31 +284,31 @@ function Je() {
284
284
  ]
285
285
  })] })]
286
286
  })
287
- }), /* @__PURE__ */ N(xe, {
287
+ }), /* @__PURE__ */ M(xe, {
288
288
  className: "flex flex-1 flex-col gap-4",
289
289
  children: [
290
- /* @__PURE__ */ N("div", {
290
+ /* @__PURE__ */ M("div", {
291
291
  className: "flex items-center gap-4",
292
- children: [/* @__PURE__ */ M(ae, {
292
+ children: [/* @__PURE__ */ j(ae, {
293
293
  value: o,
294
294
  tone: a,
295
295
  size: 92,
296
296
  strokeWidth: 9,
297
297
  label: i("brainyrich.goals.card.funded", "funded")
298
- }), /* @__PURE__ */ N("div", {
298
+ }), /* @__PURE__ */ M("div", {
299
299
  className: "min-w-0 flex-1",
300
300
  children: [
301
- /* @__PURE__ */ M("p", {
301
+ /* @__PURE__ */ j("p", {
302
302
  className: "text-xs text-text-secondary",
303
303
  children: i("brainyrich.goals.card.target", "Target amount")
304
304
  }),
305
- /* @__PURE__ */ M("p", {
305
+ /* @__PURE__ */ j("p", {
306
306
  className: "truncate text-2xl font-semibold text-text-primary",
307
- children: h(e.targetAmount, e.currency)
307
+ children: m(e.targetAmount, e.currency)
308
308
  }),
309
- /* @__PURE__ */ N("span", {
309
+ /* @__PURE__ */ M("span", {
310
310
  className: `mt-1 inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium ${n.tone}`,
311
- children: [/* @__PURE__ */ M(r, {
311
+ children: [/* @__PURE__ */ j(r, {
312
312
  className: "size-3.5",
313
313
  "aria-hidden": "true"
314
314
  }), $(e.projection)]
@@ -316,49 +316,49 @@ function Je() {
316
316
  ]
317
317
  })]
318
318
  }),
319
- /* @__PURE__ */ N("dl", {
319
+ /* @__PURE__ */ M("dl", {
320
320
  className: "grid grid-cols-2 gap-3 rounded-lg bg-bg-sunken p-3 text-sm",
321
321
  children: [
322
- /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("dt", {
322
+ /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", {
323
323
  className: "text-xs text-text-secondary",
324
324
  children: i("brainyrich.goals.card.targetDate", "Target date")
325
- }), /* @__PURE__ */ N("dd", {
325
+ }), /* @__PURE__ */ M("dd", {
326
326
  className: "flex items-center gap-1 font-medium text-text-primary",
327
- children: [/* @__PURE__ */ M(fe, {
327
+ children: [/* @__PURE__ */ j(fe, {
328
328
  className: "size-3.5 text-text-secondary",
329
329
  "aria-hidden": "true"
330
- }), m(e.targetDate)]
330
+ }), ue(e.targetDate)]
331
331
  })] }),
332
- /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("dt", {
332
+ /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", {
333
333
  className: "text-xs text-text-secondary",
334
334
  children: i("brainyrich.goals.card.monthly", "Monthly")
335
- }), /* @__PURE__ */ M("dd", {
335
+ }), /* @__PURE__ */ j("dd", {
336
336
  className: "font-medium text-text-primary",
337
- children: h(e.monthlyContribution, e.currency)
337
+ children: m(e.monthlyContribution, e.currency)
338
338
  })] }),
339
- /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("dt", {
339
+ /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", {
340
340
  className: "text-xs text-text-secondary",
341
341
  children: i("brainyrich.goals.card.priority", "Priority")
342
- }), /* @__PURE__ */ M("dd", {
342
+ }), /* @__PURE__ */ j("dd", {
343
343
  className: "font-medium text-text-primary",
344
344
  children: e.priority
345
345
  })] }),
346
- /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("dt", {
346
+ /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", {
347
347
  className: "text-xs text-text-secondary",
348
348
  children: i("brainyrich.goals.card.fundings", "Funding links")
349
- }), /* @__PURE__ */ M("dd", {
349
+ }), /* @__PURE__ */ j("dd", {
350
350
  className: "font-medium text-text-primary",
351
351
  children: e.fundings.length
352
352
  })] })
353
353
  ]
354
354
  }),
355
- /* @__PURE__ */ M("div", {
355
+ /* @__PURE__ */ j("div", {
356
356
  className: "mt-auto",
357
- children: /* @__PURE__ */ M(P, {
357
+ children: /* @__PURE__ */ j(P, {
358
358
  variant: "outline",
359
359
  size: "sm",
360
360
  className: "w-full",
361
- onClick: () => B(e.id),
361
+ onClick: () => V(e.id),
362
362
  children: i("brainyrich.goals.actions.viewDetails", "View details & funding")
363
363
  })
364
364
  })
@@ -368,7 +368,7 @@ function Je() {
368
368
  }, e.id);
369
369
  })
370
370
  }),
371
- /* @__PURE__ */ M(te, {
371
+ /* @__PURE__ */ j(te, {
372
372
  hasMore: s,
373
373
  loading: u,
374
374
  onClick: l,
@@ -377,12 +377,12 @@ function Je() {
377
377
  })
378
378
  ] })
379
379
  }),
380
- /* @__PURE__ */ M(Ye, {
381
- open: D,
380
+ /* @__PURE__ */ j(Ye, {
381
+ open: ye,
382
382
  mode: "create",
383
- form: U,
384
- setField: G,
385
- households: ue.map((e) => ({
383
+ form: W,
384
+ setField: Ee,
385
+ households: h.map((e) => ({
386
386
  id: e.id,
387
387
  name: e.name
388
388
  })),
@@ -391,81 +391,81 @@ function Je() {
391
391
  onSubmit: () => {
392
392
  if (!X) return;
393
393
  let e = {
394
- name: U.name.trim(),
395
- type: U.type,
396
- targetAmount: Number(U.targetAmount),
397
- targetDate: new Date(U.targetDate).toISOString(),
398
- monthlyContribution: Number(U.monthlyContribution) || 0,
399
- priority: Number(U.priority) || 1,
400
- currency: U.currency.trim() || "USD",
401
- notes: U.notes.trim() || null,
394
+ name: W.name.trim(),
395
+ type: W.type,
396
+ targetAmount: Number(W.targetAmount),
397
+ targetDate: new Date(W.targetDate).toISOString(),
398
+ monthlyContribution: Number(W.monthlyContribution) || 0,
399
+ priority: Number(W.priority) || 1,
400
+ currency: W.currency.trim() || "USD",
401
+ notes: W.notes.trim() || null,
402
402
  tags: [],
403
- ...U.householdId ? { householdId: U.householdId } : {}
403
+ ...W.householdId ? { householdId: W.householdId } : {}
404
404
  };
405
405
  y.mutate(e, { onSuccess: () => {
406
- g(), _(i("brainyrich.goals.created", "Goal created")), O(!1);
406
+ g(), _(i("brainyrich.goals.created", "Goal created")), D(!1);
407
407
  } });
408
408
  },
409
- onOpenChange: (e) => O(e),
409
+ onOpenChange: (e) => D(e),
410
410
  translate: i
411
411
  }),
412
- /* @__PURE__ */ M(Ye, {
413
- open: !!k,
412
+ /* @__PURE__ */ j(Ye, {
413
+ open: !!O,
414
414
  mode: "edit",
415
- goalId: k?.id,
416
- form: U,
417
- setField: G,
418
- households: ue.map((e) => ({
415
+ goalId: O?.id,
416
+ form: W,
417
+ setField: Ee,
418
+ households: h.map((e) => ({
419
419
  id: e.id,
420
420
  name: e.name
421
421
  })),
422
422
  valid: X,
423
423
  pending: me.isPending,
424
424
  onSubmit: () => {
425
- if (!k || !X) return;
425
+ if (!O || !X) return;
426
426
  let e = {
427
- name: U.name.trim(),
428
- type: U.type,
429
- status: U.status,
430
- targetAmount: Number(U.targetAmount),
431
- targetDate: new Date(U.targetDate).toISOString(),
432
- monthlyContribution: Number(U.monthlyContribution) || 0,
433
- priority: Number(U.priority) || 1,
434
- currency: U.currency.trim() || "USD",
435
- notes: U.notes.trim() || null,
436
- tags: k.tags
427
+ name: W.name.trim(),
428
+ type: W.type,
429
+ status: W.status,
430
+ targetAmount: Number(W.targetAmount),
431
+ targetDate: new Date(W.targetDate).toISOString(),
432
+ monthlyContribution: Number(W.monthlyContribution) || 0,
433
+ priority: Number(W.priority) || 1,
434
+ currency: W.currency.trim() || "USD",
435
+ notes: W.notes.trim() || null,
436
+ tags: O.tags
437
437
  };
438
438
  me.mutate({
439
- id: k.id,
439
+ id: O.id,
440
440
  input: e
441
441
  }, { onSuccess: () => {
442
- g(), _(i("brainyrich.goals.saved", "Goal saved")), R(null);
442
+ g(), _(i("brainyrich.goals.saved", "Goal saved")), z(null);
443
443
  } });
444
444
  },
445
445
  onOpenChange: (e) => {
446
- e || R(null);
446
+ e || z(null);
447
447
  },
448
448
  translate: i
449
449
  }),
450
- /* @__PURE__ */ M(Xe, {
451
- goalId: z,
452
- onClose: () => B(null),
450
+ /* @__PURE__ */ j(Xe, {
451
+ goalId: B,
452
+ onClose: () => V(null),
453
453
  translate: i
454
454
  }),
455
- /* @__PURE__ */ M(ne, {
456
- open: !!V,
455
+ /* @__PURE__ */ j(ne, {
456
+ open: !!H,
457
457
  onOpenChange: (e) => {
458
- e || H(null);
458
+ e || U(null);
459
459
  },
460
460
  title: i("brainyrich.goals.archive.title", "Archive goal?"),
461
- description: i("brainyrich.goals.archive.description", "This removes “{name}” from your active goals. You can no longer track its progress.", { name: V?.name ?? "" }),
461
+ description: i("brainyrich.goals.archive.description", "This removes “{name}” from your active goals. You can no longer track its progress.", { name: H?.name ?? "" }),
462
462
  confirmLabel: i("brainyrich.goals.archive.confirm", "Archive goal"),
463
463
  pendingLabel: i("brainyrich.goals.archive.pending", "Archiving…"),
464
464
  destructive: !0,
465
465
  pending: E.isPending,
466
466
  onConfirm: () => {
467
- V && E.mutate(V.id, { onSuccess: () => {
468
- g(), _(i("brainyrich.goals.archived", "Goal archived", { name: V.name })), H(null);
467
+ H && E.mutate(H.id, { onSuccess: () => {
468
+ g(), _(i("brainyrich.goals.archived", "Goal archived", { name: H.name })), U(null);
469
469
  } });
470
470
  }
471
471
  })
@@ -473,23 +473,23 @@ function Je() {
473
473
  });
474
474
  }
475
475
  function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a, valid: o, pending: s, onSubmit: c, onOpenChange: l, translate: u }) {
476
- return /* @__PURE__ */ M(R, {
476
+ return /* @__PURE__ */ j(V, {
477
477
  open: e,
478
478
  onOpenChange: l,
479
- children: /* @__PURE__ */ N(z, {
479
+ children: /* @__PURE__ */ M(H, {
480
480
  className: "max-h-[90vh] overflow-y-auto sm:max-w-lg",
481
- children: [/* @__PURE__ */ N(H, { children: [/* @__PURE__ */ M(U, { children: t === "create" ? u("brainyrich.goals.form.createTitle", "New goal") : u("brainyrich.goals.form.editTitle", "Edit goal") }), /* @__PURE__ */ M(B, { children: u("brainyrich.goals.form.subtitle", "Define the milestone, target and contribution plan.") })] }), /* @__PURE__ */ N("form", {
481
+ children: [/* @__PURE__ */ M(G, { children: [/* @__PURE__ */ j(Ee, { children: t === "create" ? u("brainyrich.goals.form.createTitle", "New goal") : u("brainyrich.goals.form.editTitle", "Edit goal") }), /* @__PURE__ */ j(U, { children: u("brainyrich.goals.form.subtitle", "Define the milestone, target and contribution plan.") })] }), /* @__PURE__ */ M("form", {
482
482
  className: "space-y-4",
483
483
  onSubmit: (e) => {
484
484
  e.preventDefault(), c();
485
485
  },
486
486
  children: [
487
- /* @__PURE__ */ N("div", {
487
+ /* @__PURE__ */ M("div", {
488
488
  className: "space-y-1.5",
489
- children: [/* @__PURE__ */ M(G, {
489
+ children: [/* @__PURE__ */ j(B, {
490
490
  htmlFor: "goal-name",
491
491
  children: u("brainyrich.goals.form.name", "Name")
492
- }), /* @__PURE__ */ M(W, {
492
+ }), /* @__PURE__ */ j(z, {
493
493
  id: "goal-name",
494
494
  value: r.name,
495
495
  onChange: (e) => i("name", e.target.value),
@@ -497,46 +497,46 @@ function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a,
497
497
  required: !0
498
498
  })]
499
499
  }),
500
- /* @__PURE__ */ N("div", {
500
+ /* @__PURE__ */ M("div", {
501
501
  className: "grid grid-cols-2 gap-3",
502
- children: [/* @__PURE__ */ N("div", {
502
+ children: [/* @__PURE__ */ M("div", {
503
503
  className: "space-y-1.5",
504
- children: [/* @__PURE__ */ M(G, {
504
+ children: [/* @__PURE__ */ j(B, {
505
505
  htmlFor: "goal-type",
506
506
  children: u("brainyrich.goals.form.type", "Type")
507
- }), /* @__PURE__ */ N(K, {
507
+ }), /* @__PURE__ */ M(K, {
508
508
  value: r.type,
509
509
  onValueChange: (e) => i("type", e),
510
- children: [/* @__PURE__ */ M(Y, {
510
+ children: [/* @__PURE__ */ j(Y, {
511
511
  id: "goal-type",
512
- children: /* @__PURE__ */ M(X, {})
513
- }), /* @__PURE__ */ M(q, { children: Le.map((e) => /* @__PURE__ */ M(J, {
512
+ children: /* @__PURE__ */ j(X, {})
513
+ }), /* @__PURE__ */ j(q, { children: Le.map((e) => /* @__PURE__ */ j(J, {
514
514
  value: e,
515
515
  children: $(e)
516
516
  }, e)) })]
517
517
  })]
518
- }), t === "edit" ? /* @__PURE__ */ N("div", {
518
+ }), t === "edit" ? /* @__PURE__ */ M("div", {
519
519
  className: "space-y-1.5",
520
- children: [/* @__PURE__ */ M(G, {
520
+ children: [/* @__PURE__ */ j(B, {
521
521
  htmlFor: "goal-status",
522
522
  children: u("brainyrich.goals.form.status", "Status")
523
- }), /* @__PURE__ */ N(K, {
523
+ }), /* @__PURE__ */ M(K, {
524
524
  value: r.status,
525
525
  onValueChange: (e) => i("status", e),
526
- children: [/* @__PURE__ */ M(Y, {
526
+ children: [/* @__PURE__ */ j(Y, {
527
527
  id: "goal-status",
528
- children: /* @__PURE__ */ M(X, {})
529
- }), /* @__PURE__ */ M(q, { children: Re.map((e) => /* @__PURE__ */ M(J, {
528
+ children: /* @__PURE__ */ j(X, {})
529
+ }), /* @__PURE__ */ j(q, { children: Re.map((e) => /* @__PURE__ */ j(J, {
530
530
  value: e,
531
531
  children: $(e)
532
532
  }, e)) })]
533
533
  })]
534
- }) : /* @__PURE__ */ N("div", {
534
+ }) : /* @__PURE__ */ M("div", {
535
535
  className: "space-y-1.5",
536
- children: [/* @__PURE__ */ M(G, {
536
+ children: [/* @__PURE__ */ j(B, {
537
537
  htmlFor: "goal-priority",
538
538
  children: u("brainyrich.goals.form.priority", "Priority")
539
- }), /* @__PURE__ */ M(W, {
539
+ }), /* @__PURE__ */ j(z, {
540
540
  id: "goal-priority",
541
541
  type: "number",
542
542
  min: 1,
@@ -545,14 +545,14 @@ function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a,
545
545
  })]
546
546
  })]
547
547
  }),
548
- /* @__PURE__ */ N("div", {
548
+ /* @__PURE__ */ M("div", {
549
549
  className: "grid grid-cols-2 gap-3",
550
- children: [/* @__PURE__ */ N("div", {
550
+ children: [/* @__PURE__ */ M("div", {
551
551
  className: "space-y-1.5",
552
- children: [/* @__PURE__ */ M(G, {
552
+ children: [/* @__PURE__ */ j(B, {
553
553
  htmlFor: "goal-target",
554
554
  children: u("brainyrich.goals.form.targetAmount", "Target amount")
555
- }), /* @__PURE__ */ M(W, {
555
+ }), /* @__PURE__ */ j(z, {
556
556
  id: "goal-target",
557
557
  type: "number",
558
558
  min: 0,
@@ -561,12 +561,12 @@ function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a,
561
561
  onChange: (e) => i("targetAmount", e.target.value),
562
562
  required: !0
563
563
  })]
564
- }), /* @__PURE__ */ N("div", {
564
+ }), /* @__PURE__ */ M("div", {
565
565
  className: "space-y-1.5",
566
- children: [/* @__PURE__ */ M(G, {
566
+ children: [/* @__PURE__ */ j(B, {
567
567
  htmlFor: "goal-date",
568
568
  children: u("brainyrich.goals.form.targetDate", "Target date")
569
- }), /* @__PURE__ */ M(W, {
569
+ }), /* @__PURE__ */ j(z, {
570
570
  id: "goal-date",
571
571
  type: "date",
572
572
  value: r.targetDate,
@@ -575,14 +575,14 @@ function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a,
575
575
  })]
576
576
  })]
577
577
  }),
578
- /* @__PURE__ */ N("div", {
578
+ /* @__PURE__ */ M("div", {
579
579
  className: "grid grid-cols-2 gap-3",
580
- children: [/* @__PURE__ */ N("div", {
580
+ children: [/* @__PURE__ */ M("div", {
581
581
  className: "space-y-1.5",
582
- children: [/* @__PURE__ */ M(G, {
582
+ children: [/* @__PURE__ */ j(B, {
583
583
  htmlFor: "goal-monthly",
584
584
  children: u("brainyrich.goals.form.monthly", "Monthly contribution")
585
- }), /* @__PURE__ */ M(W, {
585
+ }), /* @__PURE__ */ j(z, {
586
586
  id: "goal-monthly",
587
587
  type: "number",
588
588
  min: 0,
@@ -590,12 +590,12 @@ function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a,
590
590
  value: r.monthlyContribution,
591
591
  onChange: (e) => i("monthlyContribution", e.target.value)
592
592
  })]
593
- }), /* @__PURE__ */ N("div", {
593
+ }), /* @__PURE__ */ M("div", {
594
594
  className: "space-y-1.5",
595
- children: [/* @__PURE__ */ M(G, {
595
+ children: [/* @__PURE__ */ j(B, {
596
596
  htmlFor: "goal-currency",
597
597
  children: u("brainyrich.goals.form.currency", "Currency")
598
- }), /* @__PURE__ */ M(W, {
598
+ }), /* @__PURE__ */ j(z, {
599
599
  id: "goal-currency",
600
600
  value: r.currency,
601
601
  onChange: (e) => i("currency", e.target.value.toUpperCase()),
@@ -603,12 +603,12 @@ function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a,
603
603
  })]
604
604
  })]
605
605
  }),
606
- t === "edit" ? /* @__PURE__ */ N("div", {
606
+ t === "edit" ? /* @__PURE__ */ M("div", {
607
607
  className: "space-y-1.5",
608
- children: [/* @__PURE__ */ M(G, {
608
+ children: [/* @__PURE__ */ j(B, {
609
609
  htmlFor: "goal-priority-edit",
610
610
  children: u("brainyrich.goals.form.priority", "Priority")
611
- }), /* @__PURE__ */ M(W, {
611
+ }), /* @__PURE__ */ j(z, {
612
612
  id: "goal-priority-edit",
613
613
  type: "number",
614
614
  min: 1,
@@ -616,56 +616,56 @@ function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a,
616
616
  onChange: (e) => i("priority", e.target.value)
617
617
  })]
618
618
  }) : null,
619
- /* @__PURE__ */ N("div", {
619
+ /* @__PURE__ */ M("div", {
620
620
  className: "space-y-1.5",
621
- children: [/* @__PURE__ */ M(G, {
621
+ children: [/* @__PURE__ */ j(B, {
622
622
  htmlFor: "goal-household",
623
623
  children: u("brainyrich.goals.form.household", "Household (optional)")
624
- }), /* @__PURE__ */ N(K, {
624
+ }), /* @__PURE__ */ M(K, {
625
625
  value: r.householdId || qe,
626
626
  onValueChange: (e) => i("householdId", e === qe ? "" : e),
627
- children: [/* @__PURE__ */ M(Y, {
627
+ children: [/* @__PURE__ */ j(Y, {
628
628
  id: "goal-household",
629
- children: /* @__PURE__ */ M(X, { placeholder: u("brainyrich.goals.form.householdNone", "None") })
630
- }), /* @__PURE__ */ N(q, { children: [/* @__PURE__ */ M(J, {
629
+ children: /* @__PURE__ */ j(X, { placeholder: u("brainyrich.goals.form.householdNone", "None") })
630
+ }), /* @__PURE__ */ M(q, { children: [/* @__PURE__ */ j(J, {
631
631
  value: qe,
632
632
  children: u("brainyrich.goals.form.householdNone", "None")
633
- }), a.map((e) => /* @__PURE__ */ M(J, {
633
+ }), a.map((e) => /* @__PURE__ */ j(J, {
634
634
  value: e.id,
635
635
  children: e.name
636
636
  }, e.id))] })]
637
637
  })]
638
638
  }),
639
- t === "edit" && n ? /* @__PURE__ */ M(y, {
639
+ t === "edit" && n ? /* @__PURE__ */ j(y, {
640
640
  entityType: "brainyrich-goal",
641
641
  entityId: n,
642
642
  label: u("brainyrich.goals.form.tags", "Tags")
643
- }) : /* @__PURE__ */ N("div", {
643
+ }) : /* @__PURE__ */ M("div", {
644
644
  className: "space-y-1.5",
645
- children: [/* @__PURE__ */ M(G, { children: u("brainyrich.goals.form.tags", "Tags") }), /* @__PURE__ */ M("p", {
645
+ children: [/* @__PURE__ */ j(B, { children: u("brainyrich.goals.form.tags", "Tags") }), /* @__PURE__ */ j("p", {
646
646
  className: "text-sm text-text-secondary",
647
647
  children: u("brainyrich.goals.form.tagsAfterCreate", "You can add tags after creating the goal.")
648
648
  })]
649
649
  }),
650
- /* @__PURE__ */ N("div", {
650
+ /* @__PURE__ */ M("div", {
651
651
  className: "space-y-1.5",
652
- children: [/* @__PURE__ */ M(G, {
652
+ children: [/* @__PURE__ */ j(B, {
653
653
  htmlFor: "goal-notes",
654
654
  children: u("brainyrich.goals.form.notes", "Notes")
655
- }), /* @__PURE__ */ M(Ie, {
655
+ }), /* @__PURE__ */ j(Ie, {
656
656
  id: "goal-notes",
657
657
  value: r.notes,
658
658
  onChange: (e) => i("notes", e.target.value),
659
659
  rows: 3
660
660
  })]
661
661
  }),
662
- /* @__PURE__ */ N(V, { children: [/* @__PURE__ */ M(P, {
662
+ /* @__PURE__ */ M(W, { children: [/* @__PURE__ */ j(P, {
663
663
  type: "button",
664
664
  variant: "outline",
665
665
  onClick: () => l(!1),
666
666
  disabled: s,
667
667
  children: u("brainyrich.goals.form.cancel", "Cancel")
668
- }), /* @__PURE__ */ M(P, {
668
+ }), /* @__PURE__ */ j(P, {
669
669
  type: "submit",
670
670
  disabled: !o || s,
671
671
  children: s ? u("brainyrich.goals.form.saving", "Saving…") : t === "create" ? u("brainyrich.goals.form.create", "Create goal") : u("brainyrich.goals.form.save", "Save changes")
@@ -676,7 +676,7 @@ function Ye({ open: e, mode: t, goalId: n, form: r, setField: i, households: a,
676
676
  });
677
677
  }
678
678
  function Xe({ goalId: e, onClose: n, translate: r }) {
679
- let { data: o, isLoading: c, isError: ee, refetch: te } = i(e ?? void 0), { data: d } = a(e ?? void 0), { data: p } = t(), g = s(), _ = u(), v = l(), [b, S] = x(""), [C, ge] = x("PERCENT"), [w, ve] = x(""), [E, D] = x(""), [A, F] = x(null), I = d.reduce((e, t) => e + (t.fixedAmount ?? 0), 0), L = o?.currency ?? "USD", R = o ? Ve(o) : 0, z = o ? He(o.status, o.projection) : "brand", B = o ? Ue(I, o.monthlyContribution, o.targetDate) : [], V = (e) => p.find((t) => t.id === e)?.name ?? e, H = () => {
679
+ let { data: o, isLoading: c, isError: ee, refetch: te } = i(e ?? void 0), { data: d } = a(e ?? void 0), { data: p } = t(), g = s(), _ = u(), v = l(), [b, S] = x(""), [C, ge] = x("PERCENT"), [w, ve] = x(""), [E, ye] = x(""), [k, F] = x(null), I = d.reduce((e, t) => e + (t.fixedAmount ?? 0), 0), L = o?.currency ?? "USD", Se = o ? Ve(o) : 0, Ce = o ? He(o.status, o.projection) : "brand", R = o ? Ue(I, o.monthlyContribution, o.targetDate) : [], we = (e) => p.find((t) => t.id === e)?.name ?? e, Te = () => {
680
680
  if (!e || !b) return;
681
681
  let t = Number(w);
682
682
  !Number.isFinite(t) || t <= 0 || g.mutate({
@@ -686,162 +686,162 @@ function Xe({ goalId: e, onClose: n, translate: r }) {
686
686
  }, { onSuccess: () => {
687
687
  S(""), ve("");
688
688
  } });
689
- }, U = () => {
689
+ }, V = () => {
690
690
  if (!e) return;
691
691
  let t = E === "" ? I : Number(E);
692
692
  Number.isFinite(t) && v.mutate({
693
693
  id: e,
694
694
  fundedAmount: t
695
695
  });
696
- }, Se = !!b && Number(w) > 0, Ce = A ? A.fixedAmount == null ? V(A.accountId) : h(A.fixedAmount, L) : "";
697
- return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(De, {
696
+ }, H = !!b && Number(w) > 0, U = k ? k.fixedAmount == null ? we(k.accountId) : m(k.fixedAmount, L) : "";
697
+ return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(De, {
698
698
  open: !!e,
699
699
  onOpenChange: (e) => {
700
700
  e || n();
701
701
  },
702
- children: /* @__PURE__ */ N(Oe, {
702
+ children: /* @__PURE__ */ M(Oe, {
703
703
  className: "flex w-full flex-col gap-0 overflow-y-auto sm:max-w-xl",
704
- children: [/* @__PURE__ */ N(Ae, { children: [/* @__PURE__ */ M(je, { children: o?.name ?? r("brainyrich.goals.detail.title", "Goal") }), /* @__PURE__ */ M(ke, { children: r("brainyrich.goals.detail.subtitle", "Manage funding links and projection.") })] }), /* @__PURE__ */ M("div", {
704
+ children: [/* @__PURE__ */ M(Ae, { children: [/* @__PURE__ */ j(je, { children: o?.name ?? r("brainyrich.goals.detail.title", "Goal") }), /* @__PURE__ */ j(ke, { children: r("brainyrich.goals.detail.subtitle", "Manage funding links and projection.") })] }), /* @__PURE__ */ j("div", {
705
705
  className: "space-y-6 p-4",
706
- children: c ? /* @__PURE__ */ M(ce, { rows: 3 }) : ee ? /* @__PURE__ */ M(se, {
706
+ children: c ? /* @__PURE__ */ j(ce, { rows: 3 }) : ee ? /* @__PURE__ */ j(se, {
707
707
  title: r("brainyrich.goals.detail.error", "Could not load goal"),
708
708
  onRetry: () => te()
709
- }) : o ? /* @__PURE__ */ N(j, { children: [
710
- /* @__PURE__ */ N(re, {
709
+ }) : o ? /* @__PURE__ */ M(A, { children: [
710
+ /* @__PURE__ */ M(re, {
711
711
  glow: !0,
712
712
  className: "flex items-center gap-5",
713
- children: [/* @__PURE__ */ M(ae, {
714
- value: R,
715
- tone: z,
713
+ children: [/* @__PURE__ */ j(ae, {
714
+ value: Se,
715
+ tone: Ce,
716
716
  size: 116,
717
717
  strokeWidth: 11,
718
718
  label: r("brainyrich.goals.detail.funded", "funded")
719
- }), /* @__PURE__ */ N("div", {
719
+ }), /* @__PURE__ */ M("div", {
720
720
  className: "min-w-0 flex-1 space-y-1",
721
721
  children: [
722
- /* @__PURE__ */ M(ye, {
722
+ /* @__PURE__ */ j(N, {
723
723
  variant: de(o.projection),
724
724
  children: $(o.projection)
725
725
  }),
726
- /* @__PURE__ */ M("p", {
726
+ /* @__PURE__ */ j("p", {
727
727
  className: "text-2xl font-semibold text-text-primary",
728
- children: h(I, L)
728
+ children: m(I, L)
729
729
  }),
730
- /* @__PURE__ */ M("p", {
730
+ /* @__PURE__ */ j("p", {
731
731
  className: "text-xs text-text-secondary",
732
732
  children: r("brainyrich.goals.detail.ofTarget", "of {target} target", { target: le(o.targetAmount, L) })
733
733
  })
734
734
  ]
735
735
  })]
736
736
  }),
737
- /* @__PURE__ */ N("div", {
737
+ /* @__PURE__ */ M("div", {
738
738
  className: "grid grid-cols-2 gap-3",
739
739
  children: [
740
- /* @__PURE__ */ M(f, {
741
- icon: /* @__PURE__ */ M(T, {
740
+ /* @__PURE__ */ j(f, {
741
+ icon: /* @__PURE__ */ j(T, {
742
742
  className: "size-4",
743
743
  "aria-hidden": "true"
744
744
  }),
745
745
  label: r("brainyrich.goals.detail.target", "Target"),
746
- value: h(o.targetAmount, L)
746
+ value: m(o.targetAmount, L)
747
747
  }),
748
- /* @__PURE__ */ M(f, {
749
- icon: /* @__PURE__ */ M(k, {
748
+ /* @__PURE__ */ j(f, {
749
+ icon: /* @__PURE__ */ j(O, {
750
750
  className: "size-4",
751
751
  "aria-hidden": "true"
752
752
  }),
753
753
  label: r("brainyrich.goals.detail.funded", "Funded (fixed)"),
754
- value: h(I, L)
754
+ value: m(I, L)
755
755
  }),
756
- /* @__PURE__ */ M(f, {
757
- icon: /* @__PURE__ */ M(pe, {
756
+ /* @__PURE__ */ j(f, {
757
+ icon: /* @__PURE__ */ j(pe, {
758
758
  className: "size-4",
759
759
  "aria-hidden": "true"
760
760
  }),
761
761
  label: r("brainyrich.goals.detail.monthly", "Monthly"),
762
- value: h(o.monthlyContribution, L)
762
+ value: m(o.monthlyContribution, L)
763
763
  }),
764
- /* @__PURE__ */ M(f, {
765
- icon: /* @__PURE__ */ M(fe, {
764
+ /* @__PURE__ */ j(f, {
765
+ icon: /* @__PURE__ */ j(fe, {
766
766
  className: "size-4",
767
767
  "aria-hidden": "true"
768
768
  }),
769
769
  label: r("brainyrich.goals.detail.targetDate", "Target date"),
770
- value: m(o.targetDate)
770
+ value: ue(o.targetDate)
771
771
  })
772
772
  ]
773
773
  }),
774
- B.length >= 2 ? /* @__PURE__ */ N("section", {
774
+ R.length >= 2 ? /* @__PURE__ */ M("section", {
775
775
  className: "space-y-3 rounded-lg border border-border-subtle bg-bg-surface p-4",
776
776
  children: [
777
- /* @__PURE__ */ N("div", {
777
+ /* @__PURE__ */ M("div", {
778
778
  className: "flex items-center gap-2",
779
- children: [/* @__PURE__ */ M(me, {
779
+ children: [/* @__PURE__ */ j(me, {
780
780
  className: "size-4 text-text-secondary",
781
781
  "aria-hidden": "true"
782
- }), /* @__PURE__ */ M("h3", {
782
+ }), /* @__PURE__ */ j("h3", {
783
783
  className: "text-sm font-semibold text-text-primary",
784
784
  children: r("brainyrich.goals.detail.projectionChart", "Contribution projection")
785
785
  })]
786
786
  }),
787
- /* @__PURE__ */ M(ie, {
788
- data: B,
787
+ /* @__PURE__ */ j(ie, {
788
+ data: R,
789
789
  target: o.targetAmount,
790
- tone: z,
790
+ tone: Ce,
791
791
  height: 180,
792
792
  valueFormatter: (e) => le(e, L)
793
793
  }),
794
- /* @__PURE__ */ M("p", {
794
+ /* @__PURE__ */ j("p", {
795
795
  className: "text-xs text-text-secondary",
796
796
  children: r("brainyrich.goals.detail.projectionHint", "Starting balance plus {monthly}/mo through {date}.", {
797
- monthly: h(o.monthlyContribution, L),
798
- date: m(o.targetDate)
797
+ monthly: m(o.monthlyContribution, L),
798
+ date: ue(o.targetDate)
799
799
  })
800
800
  })
801
801
  ]
802
802
  }) : null,
803
- /* @__PURE__ */ N("section", {
803
+ /* @__PURE__ */ M("section", {
804
804
  className: "space-y-3",
805
- children: [/* @__PURE__ */ M("h3", {
805
+ children: [/* @__PURE__ */ j("h3", {
806
806
  className: "text-sm font-semibold text-text-primary",
807
807
  children: r("brainyrich.goals.detail.fundingLinks", "Funding sources")
808
- }), d.length === 0 ? /* @__PURE__ */ M("p", {
808
+ }), d.length === 0 ? /* @__PURE__ */ j("p", {
809
809
  className: "rounded-lg border border-dashed border-border-subtle bg-bg-surface px-4 py-6 text-center text-sm text-text-secondary",
810
810
  children: r("brainyrich.goals.detail.noFundings", "No accounts linked to fund this goal yet.")
811
- }) : /* @__PURE__ */ M("div", {
811
+ }) : /* @__PURE__ */ j("div", {
812
812
  className: "overflow-x-auto rounded-lg border border-border-subtle",
813
- children: /* @__PURE__ */ N(Me, { children: [/* @__PURE__ */ M(Pe, { children: /* @__PURE__ */ N(Fe, { children: [
814
- /* @__PURE__ */ M(Q, { children: r("brainyrich.goals.detail.account", "Account") }),
815
- /* @__PURE__ */ M(Q, {
813
+ children: /* @__PURE__ */ M(Me, { children: [/* @__PURE__ */ j(Pe, { children: /* @__PURE__ */ M(Fe, { children: [
814
+ /* @__PURE__ */ j(Q, { children: r("brainyrich.goals.detail.account", "Account") }),
815
+ /* @__PURE__ */ j(Q, {
816
816
  className: "text-right",
817
817
  children: r("brainyrich.goals.detail.allocation", "Allocation")
818
818
  }),
819
- /* @__PURE__ */ M(Q, {
819
+ /* @__PURE__ */ j(Q, {
820
820
  className: "text-right",
821
821
  children: r("brainyrich.goals.detail.fixedAmount", "Fixed amount")
822
822
  }),
823
- /* @__PURE__ */ M(Q, { className: "w-10" })
824
- ] }) }), /* @__PURE__ */ M(Ne, { children: d.map((e) => /* @__PURE__ */ N(Fe, { children: [
825
- /* @__PURE__ */ M(Z, {
823
+ /* @__PURE__ */ j(Q, { className: "w-10" })
824
+ ] }) }), /* @__PURE__ */ j(Ne, { children: d.map((e) => /* @__PURE__ */ M(Fe, { children: [
825
+ /* @__PURE__ */ j(Z, {
826
826
  className: "font-medium text-text-primary",
827
- children: V(e.accountId)
827
+ children: we(e.accountId)
828
828
  }),
829
- /* @__PURE__ */ M(Z, {
829
+ /* @__PURE__ */ j(Z, {
830
830
  className: "text-right tabular-nums text-text-secondary",
831
- children: e.fixedAmount == null ? ue(e.allocationPct) : "—"
831
+ children: e.fixedAmount == null ? h(e.allocationPct) : "—"
832
832
  }),
833
- /* @__PURE__ */ M(Z, {
833
+ /* @__PURE__ */ j(Z, {
834
834
  className: "text-right tabular-nums text-text-secondary",
835
- children: e.fixedAmount == null ? "—" : h(e.fixedAmount, L)
835
+ children: e.fixedAmount == null ? "—" : m(e.fixedAmount, L)
836
836
  }),
837
- /* @__PURE__ */ M(Z, {
837
+ /* @__PURE__ */ j(Z, {
838
838
  className: "text-right",
839
- children: /* @__PURE__ */ M(P, {
839
+ children: /* @__PURE__ */ j(P, {
840
840
  variant: "ghost",
841
841
  size: "icon",
842
842
  "aria-label": r("brainyrich.goals.detail.unlink", "Unlink funding"),
843
843
  onClick: () => F(e),
844
- children: /* @__PURE__ */ M(O, {
844
+ children: /* @__PURE__ */ j(D, {
845
845
  className: "size-4",
846
846
  "aria-hidden": "true"
847
847
  })
@@ -850,59 +850,59 @@ function Xe({ goalId: e, onClose: n, translate: r }) {
850
850
  ] }, e.id)) })] })
851
851
  })]
852
852
  }),
853
- /* @__PURE__ */ N("section", {
853
+ /* @__PURE__ */ M("section", {
854
854
  className: "space-y-3 rounded-lg border border-border-subtle bg-bg-surface p-4",
855
- children: [/* @__PURE__ */ M("h3", {
855
+ children: [/* @__PURE__ */ j("h3", {
856
856
  className: "text-sm font-semibold text-text-primary",
857
857
  children: r("brainyrich.goals.detail.linkTitle", "Link an account")
858
- }), p.length === 0 ? /* @__PURE__ */ M("p", {
858
+ }), p.length === 0 ? /* @__PURE__ */ j("p", {
859
859
  className: "text-sm text-text-secondary",
860
860
  children: r("brainyrich.goals.detail.noAccounts", "No accounts available to link.")
861
- }) : /* @__PURE__ */ N(j, { children: [
862
- /* @__PURE__ */ N("div", {
861
+ }) : /* @__PURE__ */ M(A, { children: [
862
+ /* @__PURE__ */ M("div", {
863
863
  className: "space-y-1.5",
864
- children: [/* @__PURE__ */ M(G, {
864
+ children: [/* @__PURE__ */ j(B, {
865
865
  htmlFor: "funding-account",
866
866
  children: r("brainyrich.goals.detail.account", "Account")
867
- }), /* @__PURE__ */ N(K, {
867
+ }), /* @__PURE__ */ M(K, {
868
868
  value: b,
869
869
  onValueChange: S,
870
- children: [/* @__PURE__ */ M(Y, {
870
+ children: [/* @__PURE__ */ j(Y, {
871
871
  id: "funding-account",
872
- children: /* @__PURE__ */ M(X, { placeholder: r("brainyrich.goals.detail.selectAccount", "Select account") })
873
- }), /* @__PURE__ */ M(q, { children: p.map((e) => /* @__PURE__ */ M(J, {
872
+ children: /* @__PURE__ */ j(X, { placeholder: r("brainyrich.goals.detail.selectAccount", "Select account") })
873
+ }), /* @__PURE__ */ j(q, { children: p.map((e) => /* @__PURE__ */ j(J, {
874
874
  value: e.id,
875
875
  children: e.name
876
876
  }, e.id)) })]
877
877
  })]
878
878
  }),
879
- /* @__PURE__ */ N("div", {
879
+ /* @__PURE__ */ M("div", {
880
880
  className: "grid grid-cols-2 gap-3",
881
- children: [/* @__PURE__ */ N("div", {
881
+ children: [/* @__PURE__ */ M("div", {
882
882
  className: "space-y-1.5",
883
- children: [/* @__PURE__ */ M(G, {
883
+ children: [/* @__PURE__ */ j(B, {
884
884
  htmlFor: "funding-mode",
885
885
  children: r("brainyrich.goals.detail.mode", "Method")
886
- }), /* @__PURE__ */ N(K, {
886
+ }), /* @__PURE__ */ M(K, {
887
887
  value: C,
888
888
  onValueChange: (e) => ge(e),
889
- children: [/* @__PURE__ */ M(Y, {
889
+ children: [/* @__PURE__ */ j(Y, {
890
890
  id: "funding-mode",
891
- children: /* @__PURE__ */ M(X, {})
892
- }), /* @__PURE__ */ N(q, { children: [/* @__PURE__ */ M(J, {
891
+ children: /* @__PURE__ */ j(X, {})
892
+ }), /* @__PURE__ */ M(q, { children: [/* @__PURE__ */ j(J, {
893
893
  value: "PERCENT",
894
894
  children: r("brainyrich.goals.detail.percent", "Percentage")
895
- }), /* @__PURE__ */ M(J, {
895
+ }), /* @__PURE__ */ j(J, {
896
896
  value: "FIXED",
897
897
  children: r("brainyrich.goals.detail.fixed", "Fixed amount")
898
898
  })] })]
899
899
  })]
900
- }), /* @__PURE__ */ N("div", {
900
+ }), /* @__PURE__ */ M("div", {
901
901
  className: "space-y-1.5",
902
- children: [/* @__PURE__ */ M(G, {
902
+ children: [/* @__PURE__ */ j(B, {
903
903
  htmlFor: "funding-value",
904
904
  children: C === "PERCENT" ? r("brainyrich.goals.detail.pct", "Percent") : r("brainyrich.goals.detail.amount", "Amount")
905
- }), /* @__PURE__ */ M(W, {
905
+ }), /* @__PURE__ */ j(z, {
906
906
  id: "funding-value",
907
907
  type: "number",
908
908
  min: 0,
@@ -912,70 +912,70 @@ function Xe({ goalId: e, onClose: n, translate: r }) {
912
912
  })]
913
913
  })]
914
914
  }),
915
- /* @__PURE__ */ N(P, {
915
+ /* @__PURE__ */ M(P, {
916
916
  size: "sm",
917
917
  className: "w-full",
918
- disabled: !Se || g.isPending,
919
- onClick: H,
920
- children: [/* @__PURE__ */ M(he, {
918
+ disabled: !H || g.isPending,
919
+ onClick: Te,
920
+ children: [/* @__PURE__ */ j(he, {
921
921
  className: "size-4",
922
922
  "aria-hidden": "true"
923
923
  }), g.isPending ? r("brainyrich.goals.detail.linking", "Linking…") : r("brainyrich.goals.detail.link", "Link funding")]
924
924
  })
925
925
  ] })]
926
926
  }),
927
- /* @__PURE__ */ M(be, { children: /* @__PURE__ */ M(xe, {
927
+ /* @__PURE__ */ j(be, { children: /* @__PURE__ */ j(xe, {
928
928
  className: "p-4",
929
- children: /* @__PURE__ */ M(y, {
929
+ children: /* @__PURE__ */ j(y, {
930
930
  entityType: "brainyrich-goal",
931
931
  entityId: o.id,
932
932
  label: r("brainyrich.goals.detail.tags", "Tags")
933
933
  })
934
934
  }) }),
935
- /* @__PURE__ */ N("section", {
935
+ /* @__PURE__ */ M("section", {
936
936
  className: "space-y-3 rounded-lg border border-border-subtle bg-bg-surface p-4",
937
937
  children: [
938
- /* @__PURE__ */ M("h3", {
938
+ /* @__PURE__ */ j("h3", {
939
939
  className: "text-sm font-semibold text-text-primary",
940
940
  children: r("brainyrich.goals.detail.recalcTitle", "Recalculate projection")
941
941
  }),
942
- /* @__PURE__ */ N("div", {
942
+ /* @__PURE__ */ M("div", {
943
943
  className: "space-y-1.5",
944
944
  children: [
945
- /* @__PURE__ */ M(G, {
945
+ /* @__PURE__ */ j(B, {
946
946
  htmlFor: "recalc-funded",
947
947
  children: r("brainyrich.goals.detail.fundedAmount", "Funded amount")
948
948
  }),
949
- /* @__PURE__ */ M(W, {
949
+ /* @__PURE__ */ j(z, {
950
950
  id: "recalc-funded",
951
951
  type: "number",
952
952
  min: 0,
953
953
  step: "0.01",
954
954
  value: E,
955
955
  placeholder: String(I),
956
- onChange: (e) => D(e.target.value)
956
+ onChange: (e) => ye(e.target.value)
957
957
  }),
958
- /* @__PURE__ */ M("p", {
958
+ /* @__PURE__ */ j("p", {
959
959
  className: "text-xs text-text-secondary",
960
960
  children: r("brainyrich.goals.detail.recalcHint", "Defaults to the sum of fixed fundings when left blank.")
961
961
  })
962
962
  ]
963
963
  }),
964
- /* @__PURE__ */ N(P, {
964
+ /* @__PURE__ */ M(P, {
965
965
  size: "sm",
966
966
  variant: "outline",
967
967
  className: "w-full",
968
968
  disabled: v.isPending,
969
- onClick: U,
970
- children: [/* @__PURE__ */ M(_e, {
969
+ onClick: V,
970
+ children: [/* @__PURE__ */ j(_e, {
971
971
  className: "size-4",
972
972
  "aria-hidden": "true"
973
973
  }), v.isPending ? r("brainyrich.goals.detail.recalculating", "Recalculating…") : r("brainyrich.goals.detail.recalc", "Recalculate")]
974
974
  })
975
975
  ]
976
976
  })
977
- ] }) : /* @__PURE__ */ M(oe, {
978
- icon: /* @__PURE__ */ M(T, {
977
+ ] }) : /* @__PURE__ */ j(oe, {
978
+ icon: /* @__PURE__ */ j(T, {
979
979
  className: "size-6",
980
980
  "aria-hidden": "true"
981
981
  }),
@@ -983,19 +983,19 @@ function Xe({ goalId: e, onClose: n, translate: r }) {
983
983
  })
984
984
  })]
985
985
  })
986
- }), /* @__PURE__ */ M(ne, {
987
- open: !!A,
986
+ }), /* @__PURE__ */ j(ne, {
987
+ open: !!k,
988
988
  onOpenChange: (e) => {
989
989
  e || F(null);
990
990
  },
991
991
  title: r("brainyrich.goals.detail.unlinkTitle", "Unlink funding?"),
992
- description: r("brainyrich.goals.detail.unlinkConfirm", "This removes the “{name}” funding link from this goal.", { name: Ce }),
992
+ description: r("brainyrich.goals.detail.unlinkConfirm", "This removes the “{name}” funding link from this goal.", { name: U }),
993
993
  confirmLabel: r("brainyrich.goals.detail.unlink", "Unlink funding"),
994
994
  pendingLabel: r("brainyrich.goals.detail.unlinking", "Unlinking…"),
995
995
  destructive: !0,
996
996
  pending: _.isPending,
997
997
  onConfirm: () => {
998
- A && _.mutate(A.id, { onSuccess: () => F(null) });
998
+ k && _.mutate(k.id, { onSuccess: () => F(null) });
999
999
  }
1000
1000
  })] });
1001
1001
  }