@mx-cartographer/experiences 7.4.5 → 7.4.6-alpha.mm0

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 (60) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/dist/{Account-01wOyrH1.mjs → Account-BQE_ANvF.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-COMjOzwr.mjs → AccountDetailsContent-C6LkHJuy.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-Cbi5G6fJ.mjs → AccountDetailsHeader-CCkHHK_n.mjs} +4 -4
  5. package/dist/{AccountFields-Cd_nOWmf.mjs → AccountFields-DdOw6d6w.mjs} +2 -2
  6. package/dist/{AccountListItem-DxY4cCF1.mjs → AccountListItem-CZhCiU7q.mjs} +4 -4
  7. package/dist/{AccountStore-C1zMBzHq.mjs → AccountStore-kxFbaz-K.mjs} +2 -2
  8. package/dist/{Accounts-D7QljYas.mjs → Accounts-D_768tYo.mjs} +1 -1
  9. package/dist/{BudgetUtil-Df2nII9u.mjs → BudgetUtil-C5fTz_GJ.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-DqJK_rrL.mjs → CategorySelectorDrawer-l3tOyiqD.mjs} +1 -1
  11. package/dist/{ConnectDrawer-CuUj16NH.mjs → ConnectDrawer-g2IXvoSS.mjs} +1 -1
  12. package/dist/{ConnectionsDrawer-Bz4uwdFE.mjs → ConnectionsDrawer-vSEOHrUC.mjs} +6 -6
  13. package/dist/{CurrencyInput-BFKcs-_K.mjs → CurrencyInput-BnaVaZBU.mjs} +6 -6
  14. package/dist/{DebtsStore-Bu8rRRSL.mjs → DebtsStore-CFk9t-Ky.mjs} +1 -1
  15. package/dist/{ExportCsvAction-DzTrtPzk.mjs → ExportCsvAction-DSi2a4NQ.mjs} +3 -3
  16. package/dist/{GoalStore-CrNhjvNc.mjs → GoalStore-DxFUJRd4.mjs} +2 -2
  17. package/dist/{Help-BnPXM_N2.mjs → Help-D1I72J-F.mjs} +1 -1
  18. package/dist/{LineChart-bc1D9xBE.mjs → LineChart-B7MftxPX.mjs} +1 -1
  19. package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-Dob72eoG.mjs} +10 -10
  20. package/dist/{ManageIncome-A69EUO5u.mjs → ManageIncome-DlAUFShc.mjs} +4 -4
  21. package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-4zS7jJrn.mjs} +1 -1
  22. package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-Csioy5P7.mjs} +1 -1
  23. package/dist/{NetWorthStore-CpL_kqvx.mjs → NetWorthStore-B6sG1eiD.mjs} +2 -2
  24. package/dist/{NotificationSettings-CNmJWVeI.mjs → NotificationSettings-ByORHzRI.mjs} +3 -3
  25. package/dist/{OriginalBalanceAction-DK8_LkPz.mjs → OriginalBalanceAction-BmSYWwSx.mjs} +3 -3
  26. package/dist/{RecurringSettings-B0uObPlD.mjs → RecurringSettings-CZvd4Wuv.mjs} +12 -12
  27. package/dist/{SpendingLegend-BbrZWbFX.mjs → SpendingLegend-CbNAMdPH.mjs} +2 -2
  28. package/dist/{TransactionDetails-COH0OKNG.mjs → TransactionDetails-DnLXfvDL.mjs} +5 -5
  29. package/dist/{TransactionStore-Dz-G8Wd0.mjs → TransactionStore-BOiv_pDO.mjs} +2 -2
  30. package/dist/{User-wXzDI4M8.mjs → User-BmdvAL7I.mjs} +1 -1
  31. package/dist/{WidgetContainer-6dsjtOVg.mjs → WidgetContainer-DR_iRKNU.mjs} +2 -2
  32. package/dist/accounts/index.es.js +121 -119
  33. package/dist/analytics/index.es.js +2 -2
  34. package/dist/budgets/index.es.js +10 -10
  35. package/dist/cashflow/index.es.js +7 -7
  36. package/dist/categories/index.es.js +1 -1
  37. package/dist/common/hooks/index.d.ts +1 -0
  38. package/dist/common/hooks/useWidgetLoadTimer.d.ts +24 -0
  39. package/dist/common/index.es.js +35 -33
  40. package/dist/dashboard/index.es.js +90 -88
  41. package/dist/debts/index.es.js +9 -9
  42. package/dist/{exportTransactionsToCSV-Cz2t0lmA.mjs → exportTransactionsToCSV-DoKUltKJ.mjs} +1 -1
  43. package/dist/finstrong/index.es.js +10 -10
  44. package/dist/goals/index.es.js +249 -251
  45. package/dist/help/index.es.js +5 -5
  46. package/dist/{hooks-C41HAxM5.mjs → hooks-DtrRa6Lb.mjs} +10 -10
  47. package/dist/investments/index.es.js +3 -3
  48. package/dist/merchants/index.es.js +1 -1
  49. package/dist/networth/index.es.js +173 -173
  50. package/dist/notifications/index.es.js +2 -2
  51. package/dist/recurringtransactions/index.es.js +8 -8
  52. package/dist/settings/index.es.js +6 -6
  53. package/dist/spending/index.es.js +6 -6
  54. package/dist/transactions/index.es.js +13 -13
  55. package/dist/trends/index.es.js +9 -9
  56. package/dist/useAccountDisplayName-BUtYhbqe.mjs +15 -0
  57. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-v_GGt72p.mjs} +1 -1
  58. package/dist/useWidgetLoadTimer-C4tYP28Y.mjs +28 -0
  59. package/package.json +1 -1
  60. package/dist/useAccountDisplayName-CMMlIOXF.mjs +0 -15
@@ -1,5 +1,5 @@
1
- import { g as _e, T as u, G as ue, a as Pe, M as q, C as Te, b as Ve } from "../GoalStore-CrNhjvNc.mjs";
2
- import { c as qn, d as Jn } from "../GoalStore-CrNhjvNc.mjs";
1
+ import { g as _e, T as m, G as ue, a as Pe, M as q, C as Ae, b as Ve } from "../GoalStore-DxFUJRd4.mjs";
2
+ import { c as qn, d as Jn } from "../GoalStore-DxFUJRd4.mjs";
3
3
  import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
4
4
  import y from "react";
5
5
  import { observer as D } from "mobx-react-lite";
@@ -10,21 +10,21 @@ import ce from "@mui/material/Tab";
10
10
  import ze from "@mui/material/Tabs";
11
11
  import { Text as A, H2 as pe, P, H3 as He, Icon as $e, InstitutionLogo as oe } from "@mxenabled/mxui";
12
12
  import he from "@mui/material/Button";
13
- import Ce from "@mui/material/Card";
14
- import Se from "@mui/material/CardActionArea";
15
- import Re from "@mui/material/CardContent";
16
- import fe from "@mui/material/Unstable_Grid2";
13
+ import Te from "@mui/material/Card";
14
+ import Ce from "@mui/material/CardActionArea";
15
+ import Se from "@mui/material/CardContent";
16
+ import be from "@mui/material/Unstable_Grid2";
17
17
  import ae from "@mui/material/Avatar";
18
18
  import Xe from "@mui/material/CardHeader";
19
- import { Payments as Ee, NoteStack as xe, Person as ve, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as ye, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
20
- import { u as C, l as I, b as ge, a as Ge, d as j, p as Ne, g as ke, n as Qe } from "../hooks-C41HAxM5.mjs";
21
- import { u as be } from "../useScreenSize-B6JyS_Lj.mjs";
19
+ import { Payments as Re, NoteStack as Ee, Person as xe, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as fe, ExpandLess as Ze, ExpandMore as qe, AddBox as ve, Trophy as Je } from "@mxenabled/mx-icons";
20
+ import { a as C, l as I, b as Ie, e as j, p as Ge, u as Ne, o as Qe, c as ke } from "../hooks-DtrRa6Lb.mjs";
21
+ import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { f as x } from "../NumberFormatting-DjTD0t3W.mjs";
23
23
  import { S as et } from "../StatusBar-BK_uYHAB.mjs";
24
24
  import E from "@mui/material/Divider";
25
25
  import B from "@mui/material/List";
26
- import { L as Q } from "../ListItemAction-uobBrm_a.mjs";
27
- import { C as we } from "../CurrencyInput-BFKcs-_K.mjs";
26
+ import { L as Q } from "../ListItemAction-Dob72eoG.mjs";
27
+ import { C as we } from "../CurrencyInput-BnaVaZBU.mjs";
28
28
  import { fromUnixTime as J } from "date-fns/fromUnixTime";
29
29
  import N from "@mui/material/ListItem";
30
30
  import k from "@mui/material/ListItemButton";
@@ -34,28 +34,28 @@ import { D as F } from "../Drawer-BEtCk82g.mjs";
34
34
  import { b as L } from "../Localization-2MODESHW.mjs";
35
35
  import { f as re, a as ie, D as nt } from "../Dialog-BPTr3qHE.mjs";
36
36
  import V from "@mui/material/ListItemAvatar";
37
- import { g as De, A as Ae } from "../ConnectDrawer-CuUj16NH.mjs";
37
+ import { g as De, A as ye } from "../ConnectDrawer-g2IXvoSS.mjs";
38
38
  import ot from "@mui/material/Collapse";
39
39
  import at from "@mui/material/ListItemIcon";
40
40
  import rt from "@mui/material/Checkbox";
41
- import { u as it, A as st } from "../AccountDetailsHeader-Cbi5G6fJ.mjs";
42
- import { A as lt } from "../AccountDetailsContent-COMjOzwr.mjs";
43
- import { u as ct } from "../useAccountDisplayName-CMMlIOXF.mjs";
41
+ import { u as it, A as st } from "../AccountDetailsHeader-CCkHHK_n.mjs";
42
+ import { A as lt } from "../AccountDetailsContent-C6LkHJuy.mjs";
43
+ import { u as ct } from "../useAccountDisplayName-BUtYhbqe.mjs";
44
44
  import Ke from "@mui/material/TextField";
45
- import { M as dt, I as mt, O as ut } from "../OriginalBalanceAction-DK8_LkPz.mjs";
45
+ import { M as dt, I as mt, O as ut } from "../OriginalBalanceAction-BmSYWwSx.mjs";
46
46
  import { getUnixTime as _t } from "date-fns/getUnixTime";
47
47
  import { isValid as pt } from "date-fns/isValid";
48
48
  import { AdapterDateFns as ht } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
49
  import { DatePicker as gt } from "@mui/x-date-pickers";
50
50
  import { LocalizationProvider as bt } from "@mui/x-date-pickers/LocalizationProvider";
51
- import { A as Y, W as ft } from "../WidgetContainer-6dsjtOVg.mjs";
51
+ import { A as Y, W as ft } from "../WidgetContainer-DR_iRKNU.mjs";
52
52
  import { L as Me } from "../Loader-DUaFpDGv.mjs";
53
53
  import { E as yt } from "../EmptyState-DoxNUae-.mjs";
54
54
  import At from "@mui/material/Stack/Stack";
55
55
  import Tt from "@mui/material/Box";
56
56
  import Ct from "@mui/material/styles/useTheme";
57
57
  import { S as St } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
- import { M as Rt } from "../MicroWidgetContainer-DEiRnYVa.mjs";
58
+ import { M as Rt } from "../MicroWidgetContainer-4zS7jJrn.mjs";
59
59
  function de({ title: t, subtitle: n }) {
60
60
  return /* @__PURE__ */ i(b, { children: [
61
61
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t }),
@@ -67,54 +67,54 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
67
67
  "$1$2$3"
68
68
  ) : x(t, "0,0.00"), Le = D(
69
69
  ({ goal: t, isInDrawer: n = !1, onClick: s }) => {
70
- const { goals: c } = C(), { isMobile: p, isTablet: a } = be(), _ = p || a, {
70
+ const { goals: l } = C(), { isMobile: p, isTablet: a } = ge(), u = p || a, {
71
71
  backgroundColor: h,
72
72
  color: g,
73
73
  percentage: r,
74
- percentageText: m,
75
- projectedText: o
76
- } = _e(c, t), d = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, l = [
74
+ percentageText: o,
75
+ projectedText: _
76
+ } = _e(l, t), d = t.track_type === m.DEBT_TRACK ? t.initial_amount : t.amount, c = [
77
77
  {
78
78
  color: h,
79
79
  percentage: `${r}`
80
80
  }
81
81
  ];
82
- let f = /* @__PURE__ */ e(Ee, {});
83
- return t.track_type === u.DEBT_TRACK ? f = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ i(Se, { disabled: !s, onClick: s, children: [
82
+ let f = /* @__PURE__ */ e(Re, {});
83
+ return t.track_type === m.DEBT_TRACK ? f = /* @__PURE__ */ e(Ee, {}) : t.track_type === m.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ i(Ce, { disabled: !s, onClick: s, children: [
84
84
  /* @__PURE__ */ e(
85
85
  Xe,
86
86
  {
87
87
  avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: h, color: g, height: 48, width: 48 }, variant: "rounded", children: f }),
88
- subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Et(
88
+ subheader: /* @__PURE__ */ e(A, { variant: n || u ? "H3" : "H2", children: `${x(t.current_amount, u ? "0,0" : "0,0.00")} / ${Et(
89
89
  d,
90
- _
90
+ u
91
91
  )}` }),
92
92
  title: /* @__PURE__ */ e(pe, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
93
93
  }
94
94
  ),
95
- /* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ i(b, { gap: 6, children: [
96
- /* @__PURE__ */ e(et, { data: l, height: 24 }),
95
+ /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ i(b, { gap: 6, children: [
96
+ /* @__PURE__ */ e(et, { data: c, height: 24 }),
97
97
  /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
98
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: m }),
99
- t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o })
98
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o }),
99
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
100
100
  ] })
101
101
  ] }) })
102
102
  ] }) });
103
103
  }
104
104
  ), xt = D(({ trackType: t }) => {
105
- const { goals: n } = C(), { setAlert: s, monthlyCashFlowProfile: c, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
105
+ const { goals: n } = C(), { setAlert: s, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
106
106
  let r = 0;
107
- return t === u.SAVINGS_TRACK ? r = c?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? r = c?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (r = c?.amount_allocated_for_retirement_goals || 0), r;
108
- }, [c]), [_, h] = y.useState(a), g = async () => {
109
- if (c) {
110
- const r = { ...c };
111
- t === u.SAVINGS_TRACK ? r.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? r.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (r.amount_allocated_for_retirement_goals = _), await p(r), s(n.alert_contribution_updated);
107
+ return t === m.SAVINGS_TRACK ? r = l?.amount_allocated_for_savings_goals || 0 : t === m.DEBT_TRACK ? r = l?.amount_allocated_for_debt_goals || 0 : t === m.RETIREMENT_TRACK && (r = l?.amount_allocated_for_retirement_goals || 0), r;
108
+ }, [l]), [u, h] = y.useState(a), g = async () => {
109
+ if (l) {
110
+ const r = { ...l };
111
+ t === m.SAVINGS_TRACK ? r.amount_allocated_for_savings_goals = u : t === m.DEBT_TRACK ? r.amount_allocated_for_debt_goals = u : t === m.RETIREMENT_TRACK && (r.amount_allocated_for_retirement_goals = u), await p(r), s(n.alert_contribution_updated);
112
112
  }
113
113
  };
114
114
  return /* @__PURE__ */ e(b, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
115
115
  Q,
116
116
  {
117
- isSaveDisabled: !_ || isNaN(_),
117
+ isSaveDisabled: !u || isNaN(u),
118
118
  label: n.contribution_label,
119
119
  onCancel: () => h(a),
120
120
  onSave: g,
@@ -123,28 +123,28 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
123
123
  children: /* @__PURE__ */ e(
124
124
  we,
125
125
  {
126
- amount: _,
126
+ amount: u,
127
127
  autoFocus: !0,
128
- error: !_ || isNaN(_),
128
+ error: !u || isNaN(u),
129
129
  fullWidth: !0,
130
130
  minAmount: 0,
131
- setAmount: (r) => h(isNaN(Number(r)) ? _ : Number(r)),
131
+ setAmount: (r) => h(isNaN(Number(r)) ? u : Number(r)),
132
132
  sx: { ".MuiTypography-Body": { p: 0 } }
133
133
  }
134
134
  )
135
135
  }
136
136
  ) });
137
137
  }), vt = ({ goals: t }) => {
138
- const { goals: n, common: s } = C(), { reorderGoals: c, setAlert: p } = I(), [a, _] = y.useState(!1), [h, g] = y.useState(t.map((l) => ({ ...l })));
138
+ const { goals: n, common: s } = C(), { reorderGoals: l, setAlert: p } = I(), [a, u] = y.useState(!1), [h, g] = y.useState(t.map((c) => ({ ...c })));
139
139
  y.useEffect(() => {
140
- a && g(t.map((l) => ({ ...l })));
140
+ a && g(t.map((c) => ({ ...c })));
141
141
  }, [a]);
142
142
  const r = [
143
143
  {
144
144
  field: "name",
145
145
  flex: 1,
146
- renderCell: (l) => {
147
- const f = l.row;
146
+ renderCell: (c) => {
147
+ const f = c.row;
148
148
  return /* @__PURE__ */ i(b, { children: [
149
149
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: f.name }),
150
150
  /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
@@ -162,28 +162,28 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
162
162
  align: "right",
163
163
  field: "amount",
164
164
  minWidth: 140,
165
- renderCell: (l) => {
166
- const f = l.row;
165
+ renderCell: (c) => {
166
+ const f = c.row;
167
167
  return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(f.amount, "0,0.00") });
168
168
  },
169
169
  sortable: !1
170
170
  }
171
- ], m = h.map((l) => ({
172
- id: l.guid,
171
+ ], o = h.map((c) => ({
172
+ id: c.guid,
173
173
  isHovering: !1,
174
- __reorder__: l.name,
175
- ...l
176
- })), o = ({ oldIndex: l, targetIndex: f }) => {
174
+ __reorder__: c.name,
175
+ ...c
176
+ })), _ = ({ oldIndex: c, targetIndex: f }) => {
177
177
  const T = [...h];
178
- T.splice(f, 0, T.splice(l, 1)[0]);
178
+ T.splice(f, 0, T.splice(c, 1)[0]);
179
179
  for (let S = 0; S < T.length; S += 1)
180
180
  T[S].position = S + 1;
181
181
  g(T);
182
182
  }, d = async () => {
183
- await c(h), p(n.alert_goals_reordered), _(!1);
183
+ await l(h), p(n.alert_goals_reordered), u(!1);
184
184
  };
185
185
  return /* @__PURE__ */ i(b, { children: [
186
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
186
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => u(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
187
187
  b,
188
188
  {
189
189
  alignItems: "center",
@@ -201,7 +201,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
201
201
  {
202
202
  ariaLabelClose: s.close_aria,
203
203
  isOpen: a,
204
- onClose: () => _(!1),
204
+ onClose: () => u(!1),
205
205
  onPrimaryAction: d,
206
206
  title: n.reorder_goals_title,
207
207
  children: /* @__PURE__ */ i(b, { children: [
@@ -214,9 +214,9 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
214
214
  disableColumnFilter: !0,
215
215
  disableColumnMenu: !0,
216
216
  hideFooter: !0,
217
- onRowOrderChange: o,
217
+ onRowOrderChange: _,
218
218
  rowReordering: !0,
219
- rows: m,
219
+ rows: o,
220
220
  slots: {
221
221
  rowReorderIcon: () => /* @__PURE__ */ e(Ue, { sx: { ml: 12 } })
222
222
  //TODO: Add to mx-icons
@@ -233,9 +233,9 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
233
233
  )
234
234
  ] });
235
235
  }, It = ({ goal: t, index: n }) => {
236
- const { goals: s } = C(), { percentage: c } = _e(s, t), p = t.goal_type === ue.KEEP_BALANCE_BELOW || t.has_been_spent ? s.goal_completed : L(s.goal_percentage_reached, `${c * 100}`);
236
+ const { goals: s } = C(), { percentage: l } = _e(s, t), p = t.goal_type === ue.KEEP_BALANCE_BELOW || t.has_been_spent ? s.goal_completed : L(s.goal_percentage_reached, `${l * 100}`);
237
237
  return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
238
- t.track_type !== u.RETIREMENT_TRACK && /* @__PURE__ */ e(
238
+ t.track_type !== m.RETIREMENT_TRACK && /* @__PURE__ */ e(
239
239
  V,
240
240
  {
241
241
  sx: {
@@ -280,13 +280,13 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
280
280
  ] }) })
281
281
  ] }) }, t.guid);
282
282
  }, Nt = ({ trackType: t }) => {
283
- const { goals: n, common: s } = C(), { orderedGoals: c } = I(), p = c.filter((l) => l.track_type === t), a = p.filter(
284
- (l) => l.track_type === u.SAVINGS_TRACK && !l.has_been_spent || l.track_type !== u.SAVINGS_TRACK && !l.is_complete
285
- ), _ = p.filter(
286
- (l) => l.track_type === u.SAVINGS_TRACK && l.has_been_spent || l.track_type !== u.SAVINGS_TRACK && l.is_complete
283
+ const { goals: n, common: s } = C(), { orderedGoals: l } = I(), p = l.filter((c) => c.track_type === t), a = p.filter(
284
+ (c) => c.track_type === m.SAVINGS_TRACK && !c.has_been_spent || c.track_type !== m.SAVINGS_TRACK && !c.is_complete
285
+ ), u = p.filter(
286
+ (c) => c.track_type === m.SAVINGS_TRACK && c.has_been_spent || c.track_type !== m.SAVINGS_TRACK && c.is_complete
287
287
  ), [h, g] = y.useState(!1);
288
- let r = n.manage_saving_goals, m = n.manage_saving_drawer_title, o = n.manage_saving_title, d = n.manage_saving_description;
289
- return t === u.DEBT_TRACK ? (r = n.manage_debt_goals, m = n.manage_debt_drawer_title, o = n.manage_debt_title, d = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (r = n.manage_retirement_goals, m = n.manage_retirement_drawer_title, o = n.manage_retirement_title, d = n.manage_retirement_description), /* @__PURE__ */ i(b, { children: [
288
+ let r = n.manage_saving_goals, o = n.manage_saving_drawer_title, _ = n.manage_saving_title, d = n.manage_saving_description;
289
+ return t === m.DEBT_TRACK ? (r = n.manage_debt_goals, o = n.manage_debt_drawer_title, _ = n.manage_debt_title, d = n.manage_debt_description) : t === m.RETIREMENT_TRACK && (r = n.manage_retirement_goals, o = n.manage_retirement_drawer_title, _ = n.manage_retirement_title, d = n.manage_retirement_description), /* @__PURE__ */ i(b, { children: [
290
290
  /* @__PURE__ */ e(he, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => g(!0), children: r }),
291
291
  /* @__PURE__ */ e(
292
292
  F,
@@ -294,40 +294,40 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
294
294
  ariaLabelClose: s.close_aria,
295
295
  isOpen: h,
296
296
  onClose: () => g(!1),
297
- title: m,
297
+ title: o,
298
298
  children: /* @__PURE__ */ i(b, { children: [
299
299
  /* @__PURE__ */ i(b, { m: 24, children: [
300
- /* @__PURE__ */ e(He, { children: o }),
300
+ /* @__PURE__ */ e(He, { children: _ }),
301
301
  /* @__PURE__ */ e(P, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: d })
302
302
  ] }),
303
303
  /* @__PURE__ */ e(xt, { trackType: t }),
304
304
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
305
305
  /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
306
- a.map((l, f) => {
306
+ a.map((c, f) => {
307
307
  const T = f >= a.length - 1;
308
308
  return /* @__PURE__ */ i(b, { children: [
309
- /* @__PURE__ */ e(It, { goal: l, index: f }),
309
+ /* @__PURE__ */ e(It, { goal: c, index: f }),
310
310
  /* @__PURE__ */ e(
311
311
  E,
312
312
  {
313
- variant: T && t === u.RETIREMENT_TRACK ? "fullWidth" : "inset"
313
+ variant: T && t === m.RETIREMENT_TRACK ? "fullWidth" : "inset"
314
314
  }
315
315
  )
316
- ] }, `ongoing-${l.guid}`);
316
+ ] }, `ongoing-${c.guid}`);
317
317
  }),
318
- t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { children: [
318
+ t !== m.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { children: [
319
319
  /* @__PURE__ */ e(vt, { goals: a }),
320
320
  /* @__PURE__ */ e(E, {})
321
321
  ] })
322
322
  ] }),
323
- t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ i(b, { children: [
323
+ t !== m.RETIREMENT_TRACK && u.length > 0 && /* @__PURE__ */ i(b, { children: [
324
324
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
325
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: _.map((l, f) => {
325
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: u.map((c, f) => {
326
326
  const T = f > a.length - 1;
327
327
  return /* @__PURE__ */ i(b, { children: [
328
- /* @__PURE__ */ e(Gt, { goal: l }),
328
+ /* @__PURE__ */ e(Gt, { goal: c }),
329
329
  /* @__PURE__ */ e(E, { variant: T ? "fullWidth" : "inset" })
330
- ] }, `complete-${l.guid}`);
330
+ ] }, `complete-${c.guid}`);
331
331
  }) })
332
332
  ] })
333
333
  ] })
@@ -335,21 +335,19 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
335
335
  )
336
336
  ] });
337
337
  }, me = D(({ trackType: t, onAddGoals: n }) => {
338
- const { isMobile: s } = be(), { goals: c } = C(), { selectedAccountGuids: p } = ge(), { orderedGoals: a, setSelectedGoal: _ } = I(), h = a.filter(
339
- (o) => o.track_type === t && p.includes(o.account_guid)
340
- ), g = h.filter(
341
- (o) => o.track_type === u.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && !o.is_complete
342
- ), r = h.filter(
343
- (o) => o.track_type === u.SAVINGS_TRACK && o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && o.is_complete
344
- ), m = t === u.DEBT_TRACK ? c.zero_state_complete_debt : c.zero_state_complete_savings;
338
+ const { isMobile: s } = ge(), { goals: l } = C(), { orderedGoals: p, setSelectedGoal: a } = I(), u = p.filter((o) => o.track_type === t), h = u.filter(
339
+ (o) => o.track_type === m.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== m.SAVINGS_TRACK && !o.is_complete
340
+ ), g = u.filter(
341
+ (o) => o.track_type === m.SAVINGS_TRACK && o.has_been_spent || o.track_type !== m.SAVINGS_TRACK && o.is_complete
342
+ ), r = t === m.DEBT_TRACK ? l.zero_state_complete_debt : l.zero_state_complete_savings;
345
343
  return /* @__PURE__ */ i(b, { mt: 16, mx: s ? 24 : 0, children: [
346
344
  /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
347
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: c.ongoing_title }),
345
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: l.ongoing_title }),
348
346
  /* @__PURE__ */ e(Nt, { trackType: t })
349
347
  ] }),
350
- g.length > 0 ? /* @__PURE__ */ e(fe, { container: !0, spacing: 24, children: g.map((o, d, l) => (
348
+ h.length > 0 ? /* @__PURE__ */ e(be, { container: !0, spacing: 24, children: h.map((o, _, d) => (
351
349
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
352
- /* @__PURE__ */ e(fe, { xs: s || d === 0 && l.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid) }, d)
350
+ /* @__PURE__ */ e(be, { xs: s || _ === 0 && d.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => a(o) }, o.guid) }, _)
353
351
  )) }) : /* @__PURE__ */ i(
354
352
  b,
355
353
  {
@@ -371,16 +369,16 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
371
369
  width: { sm: 381 }
372
370
  }),
373
371
  variant: "Small",
374
- children: Pe(t, c)
372
+ children: Pe(t, l)
375
373
  }
376
374
  ),
377
- /* @__PURE__ */ e(he, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: c.add_goals_button })
375
+ /* @__PURE__ */ e(he, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: l.add_goals_button })
378
376
  ]
379
377
  }
380
378
  ),
381
- t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { gap: 16, mt: 48, children: [
382
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: c.complete_title }),
383
- r.length === 0 && /* @__PURE__ */ e(b, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
379
+ t !== m.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { gap: 16, mt: 48, children: [
380
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: l.complete_title }),
381
+ g.length === 0 && /* @__PURE__ */ e(b, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
384
382
  P,
385
383
  {
386
384
  sx: (o) => ({
@@ -391,10 +389,10 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
391
389
  }
392
390
  }),
393
391
  variant: "Small",
394
- children: m
392
+ children: r
395
393
  }
396
394
  ) }),
397
- r.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Se, { onClick: () => _(o), children: /* @__PURE__ */ e(Re, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
395
+ g.map((o) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => a(o), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
398
396
  /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", gap: 6, children: [
399
397
  /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
400
398
  /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
@@ -404,27 +402,27 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
404
402
  ] })
405
403
  ] });
406
404
  }), kt = ({ goalType: t, onClick: n }) => {
407
- const { goals: s } = C(), { bgcolor: c, icon: p, label: a, description: _, subTypes: h, type: g } = t, [r, m] = y.useState(!1), o = h.length > 0;
405
+ const { goals: s } = C(), { bgcolor: l, icon: p, label: a, description: u, subTypes: h, type: g } = t, [r, o] = y.useState(!1), _ = h.length > 0;
408
406
  return /* @__PURE__ */ e(b, { children: /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
409
407
  /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(
410
408
  k,
411
409
  {
412
- onClick: o ? () => m(!r) : () => n(
413
- g === u.RETIREMENT_TRACK ? s.retirement : "",
414
- g === u.RETIREMENT_TRACK ? q.RETIREMENT : q.OTHER,
410
+ onClick: _ ? () => o(!r) : () => n(
411
+ g === m.RETIREMENT_TRACK ? s.retirement : "",
412
+ g === m.RETIREMENT_TRACK ? q.RETIREMENT : q.OTHER,
415
413
  g
416
414
  ),
417
415
  children: [
418
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: c }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: p, sx: { color: "grey.900" } }) }) }),
419
- /* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
420
- !o && /* @__PURE__ */ e(M, {}),
421
- o && (r ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
416
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: p, sx: { color: "grey.900" } }) }) }),
417
+ /* @__PURE__ */ e(w, { primary: a, secondary: u, sx: { mr: 24 } }),
418
+ !_ && /* @__PURE__ */ e(M, {}),
419
+ _ && (r ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
422
420
  ]
423
421
  }
424
422
  ) }),
425
423
  /* @__PURE__ */ e(E, { variant: "inset" }),
426
- o && /* @__PURE__ */ e(ot, { in: r, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: h.map((d, l) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ i(k, { onClick: () => n(d.label, d.metaType, g), children: [
427
- /* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: d.icon }) }),
424
+ _ && /* @__PURE__ */ e(ot, { in: r, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: h.map((d, c) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ i(k, { onClick: () => n(d.label, d.metaType, g), children: [
425
+ /* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: d.icon }) }),
428
426
  /* @__PURE__ */ e(
429
427
  w,
430
428
  {
@@ -433,56 +431,56 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
433
431
  }
434
432
  ),
435
433
  /* @__PURE__ */ e(M, {})
436
- ] }) }, l)) }) })
434
+ ] }) }, c)) }) })
437
435
  ] }) });
438
436
  }, Be = ({
439
437
  accounts: t,
440
438
  isOpen: n,
441
439
  onClose: s,
442
- onSave: c,
440
+ onSave: l,
443
441
  title: p
444
442
  }) => {
445
- const { goals: a, common: _ } = C(), { config: h } = Ge(), [g, r] = y.useState([]), m = (o) => {
446
- const d = g.findIndex((f) => f.guid === o.guid), l = [...g];
447
- d >= 0 ? l.splice(d, 1) : l.push(o), r(l);
443
+ const { goals: a, common: u } = C(), { config: h } = Ie(), [g, r] = y.useState([]), o = (_) => {
444
+ const d = g.findIndex((f) => f.guid === _.guid), c = [...g];
445
+ d >= 0 ? c.splice(d, 1) : c.push(_), r(c);
448
446
  };
449
447
  return /* @__PURE__ */ i(
450
448
  F,
451
449
  {
452
- ariaLabelClose: _.close_aria,
450
+ ariaLabelClose: u.close_aria,
453
451
  isOpen: n,
454
452
  onClose: s,
455
- onPrimaryAction: () => c(g),
453
+ onPrimaryAction: () => l(g),
456
454
  title: p,
457
455
  children: [
458
456
  /* @__PURE__ */ e(P, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
459
457
  /* @__PURE__ */ i(B, { sx: { bgcolor: "background.white" }, children: [
460
458
  /* @__PURE__ */ e(E, { variant: "fullWidth" }),
461
- t.map((o, d) => /* @__PURE__ */ i(y.Fragment, { children: [
462
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => m(o), children: [
459
+ t.map((_, d) => /* @__PURE__ */ i(y.Fragment, { children: [
460
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(_), children: [
463
461
  /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
464
462
  oe,
465
463
  {
466
- alt: o?.name || "",
467
- institutionGuid: o?.institution_guid || ""
464
+ alt: _?.name || "",
465
+ institutionGuid: _?.institution_guid || ""
468
466
  }
469
467
  ) }),
470
468
  /* @__PURE__ */ e(
471
469
  w,
472
470
  {
473
- primary: De(o, {
471
+ primary: De(_, {
474
472
  allowNickname: h?.show_account_nicknames_in_master
475
473
  }),
476
- secondary: x(o.balance || 0, "0,0.00")
474
+ secondary: x(_.balance || 0, "0,0.00")
477
475
  }
478
476
  ),
479
- /* @__PURE__ */ e(rt, { checked: g.some((l) => l.guid === o.guid) })
477
+ /* @__PURE__ */ e(rt, { checked: g.some((c) => c.guid === _.guid) })
480
478
  ] }) }),
481
479
  /* @__PURE__ */ e(E, { variant: d < t.length - 1 ? "inset" : "fullWidth" })
482
- ] }, o.guid))
480
+ ] }, _.guid))
483
481
  ] }),
484
482
  /* @__PURE__ */ e(
485
- Te,
483
+ Ae,
486
484
  {
487
485
  description: a.connect_description,
488
486
  label: a.connect_button,
@@ -493,20 +491,20 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
493
491
  }
494
492
  );
495
493
  }, wt = ({ onClose: t }) => {
496
- const { goals: n } = C(), { addGoal: s, debtGoals: c, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ge(), { visibleDebtAccounts: h } = j(), [g, r] = y.useState(!1), m = Ve(n), o = (l, f, T) => {
497
- T === u.DEBT_TRACK ? r(!0) : a({
494
+ const { goals: n } = C(), { addGoal: s, debtGoals: l, setAlert: p, setSelectedGoal: a } = I(), { config: u } = Ie(), { visibleDebtAccounts: h } = j(), [g, r] = y.useState(!1), o = Ve(n), _ = (c, f, T) => {
495
+ T === m.DEBT_TRACK ? r(!0) : a({
498
496
  amount: 0,
499
497
  current_amount: 0,
500
498
  goal_type: ue.SAVE_AMOUNT,
501
499
  initial_amount: 0,
502
500
  meta_type: f,
503
- name: l,
501
+ name: c,
504
502
  track_type: T
505
503
  });
506
- }, d = async (l) => {
507
- for (const f of l) {
504
+ }, d = async (c) => {
505
+ for (const f of c) {
508
506
  let T = q.CREDIT_CARD;
509
- f.account_type === Ae.LOAN ? T = q.LOANS : f.account_type === Ae.LINE_OF_CREDIT && (T = q.LINE_OF_CREDIT), await s({
507
+ f.account_type === ye.LOAN ? T = q.LOANS : f.account_type === ye.LINE_OF_CREDIT && (T = q.LINE_OF_CREDIT), await s({
510
508
  account_guid: f.guid,
511
509
  amount: 0,
512
510
  current_amount: 0,
@@ -516,19 +514,19 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
516
514
  meta_type: T,
517
515
  monthly_payment: f.minimum_payment || 0,
518
516
  name: De(f, {
519
- allowNickname: _?.show_account_nicknames_in_master
517
+ allowNickname: u?.show_account_nicknames_in_master
520
518
  }),
521
- track_type: u.DEBT_TRACK
519
+ track_type: m.DEBT_TRACK
522
520
  }), p(n.alert_goal_added);
523
521
  }
524
- r(!1), t?.(u.DEBT_TRACK);
522
+ r(!1), t?.(m.DEBT_TRACK);
525
523
  };
526
524
  return /* @__PURE__ */ i(b, { children: [
527
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: m.map((l, f) => /* @__PURE__ */ e(kt, { goalType: l, onClick: o }, f)) }),
525
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: o.map((c, f) => /* @__PURE__ */ e(kt, { goalType: c, onClick: _ }, f)) }),
528
526
  /* @__PURE__ */ e(
529
527
  Be,
530
528
  {
531
- accounts: h.filter((l) => !c.find((f) => f.account_guid === l.guid)),
529
+ accounts: h.filter((c) => !l.find((f) => f.account_guid === c.guid)),
532
530
  isOpen: g,
533
531
  onClose: () => r(!1),
534
532
  onSave: d,
@@ -537,10 +535,10 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
537
535
  )
538
536
  ] });
539
537
  }, Oe = ({ account: t }) => {
540
- const { accounts: n } = C(), s = ct(t), { setSelectedAccount: c } = it(), [p, a] = y.useState(!1);
538
+ const { accounts: n } = C(), s = ct(t), { setSelectedAccount: l } = it(), [p, a] = y.useState(!1);
541
539
  return /* @__PURE__ */ i(N, { sx: { bgcolor: "background.paper" }, children: [
542
540
  /* @__PURE__ */ i(k, { onClick: () => {
543
- c(t), a(!0);
541
+ l(t), a(!0);
544
542
  }, children: [
545
543
  /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
546
544
  oe,
@@ -564,12 +562,12 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
564
562
  ] }) })
565
563
  ] });
566
564
  }, Dt = D(({ goal: t }) => {
567
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.amount), h = !t.guid, g = a < 0 || a > 9999999999e-2, r = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, m = async () => {
565
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, u] = y.useState(t.amount), h = !t.guid, g = a < 0 || a > 9999999999e-2, r = t.track_type === m.SAVINGS_TRACK && t.has_been_spent || t.track_type !== m.SAVINGS_TRACK && t.is_complete, o = async () => {
568
566
  const d = { ...t, amount: a };
569
- t.amount = a, h ? c(d) : (await p(d), s(n.alert_goal_updated_amount));
570
- }, o = () => {
567
+ t.amount = a, h ? l(d) : (await p(d), s(n.alert_goal_updated_amount));
568
+ }, _ = () => {
571
569
  setTimeout(() => {
572
- _(t.amount);
570
+ u(t.amount);
573
571
  }, 250);
574
572
  };
575
573
  return /* @__PURE__ */ e(
@@ -578,8 +576,8 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
578
576
  isDisabled: r,
579
577
  isSaveDisabled: g,
580
578
  label: n.details_amount_to_save,
581
- onCancel: o,
582
- onSave: m,
579
+ onCancel: _,
580
+ onSave: o,
583
581
  primaryText: n.details_amount_to_save,
584
582
  secondaryText: x(t.amount, "0,0"),
585
583
  zeroStateText: h && t.amount === 0 ? n.add_amount : void 0,
@@ -591,26 +589,26 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
591
589
  error: g,
592
590
  fullWidth: !0,
593
591
  minAmount: 0,
594
- setAmount: (d) => _(isNaN(Number(d)) ? a : Number(d)),
592
+ setAmount: (d) => u(isNaN(Number(d)) ? a : Number(d)),
595
593
  sx: { ".MuiTypography-Body": { p: 0 } }
596
594
  }
597
595
  )
598
596
  }
599
597
  );
600
598
  }), Kt = ({ goal: t }) => {
601
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: s } = j(), { accounts: c, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: h } = I(), g = !t.guid, [r, m] = y.useState(!1), o = async ({ balance: d, guid: l }) => {
602
- const f = { ...t, account_guid: l, current_amount: d || 0 };
603
- g ? _(f) : (await h(f), a(p.alert_account_changed)), m(!1);
599
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: s } = j(), { accounts: l, goals: p } = C(), { setAlert: a, setSelectedGoal: u, updateGoal: h } = I(), g = !t.guid, [r, o] = y.useState(!1), _ = async ({ balance: d, guid: c }) => {
600
+ const f = { ...t, account_guid: c, current_amount: d || 0 };
601
+ g ? u(f) : (await h(f), a(p.alert_account_changed)), o(!1);
604
602
  };
605
603
  return /* @__PURE__ */ i(b, { children: [
606
- g && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => m(!0), children: [
604
+ g && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => o(!0), children: [
607
605
  /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
608
- /* @__PURE__ */ e(Ie, { filled: !0 }),
606
+ /* @__PURE__ */ e(ve, { filled: !0 }),
609
607
  p.details_add_account
610
608
  ] }) }),
611
609
  /* @__PURE__ */ e(M, { color: "primary" })
612
610
  ] }) }) : /* @__PURE__ */ i(b, { sx: { gap: 8, my: 24, mx: 24 }, children: [
613
- /* @__PURE__ */ e(he, { onClick: () => m(!0), variant: "text", children: p.details_change_account }),
611
+ /* @__PURE__ */ e(he, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
614
612
  /* @__PURE__ */ e(
615
613
  A,
616
614
  {
@@ -621,9 +619,9 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
621
619
  }
622
620
  )
623
621
  ] }),
624
- /* @__PURE__ */ e(F, { isOpen: r, onClose: () => m(!1), title: p.details_change_account, children: /* @__PURE__ */ i(b, { children: [
625
- n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[1] }),
626
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
622
+ /* @__PURE__ */ e(F, { isOpen: r, onClose: () => o(!1), title: p.details_change_account, children: /* @__PURE__ */ i(b, { children: [
623
+ n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: l.account_types[1] }),
624
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => _(d), children: [
627
625
  /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
628
626
  oe,
629
627
  {
@@ -640,8 +638,8 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
640
638
  ),
641
639
  /* @__PURE__ */ e(M, {})
642
640
  ] }) }, d.guid)) }),
643
- s.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[2] }),
644
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: s.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
641
+ s.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: l.account_types[2] }),
642
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: s.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => _(d), children: [
645
643
  /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
646
644
  oe,
647
645
  {
@@ -659,7 +657,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
659
657
  /* @__PURE__ */ e(M, {})
660
658
  ] }) }, d.guid)) }),
661
659
  /* @__PURE__ */ e(
662
- Te,
660
+ Ae,
663
661
  {
664
662
  description: p.connect_description,
665
663
  label: p.connect_button,
@@ -669,12 +667,12 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
669
667
  ] }) })
670
668
  ] });
671
669
  }, Mt = D(({ goal: t }) => {
672
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.name), h = !t.guid, g = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, r = async () => {
673
- const o = { ...t, name: a };
674
- t.name = a, h ? c(o) : (await p(o), s(n.alert_goal_updated_name));
675
- }, m = () => {
670
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, u] = y.useState(t.name), h = !t.guid, g = t.track_type === m.SAVINGS_TRACK && t.has_been_spent || t.track_type !== m.SAVINGS_TRACK && t.is_complete, r = async () => {
671
+ const _ = { ...t, name: a };
672
+ t.name = a, h ? l(_) : (await p(_), s(n.alert_goal_updated_name));
673
+ }, o = () => {
676
674
  setTimeout(() => {
677
- _(t.name);
675
+ u(t.name);
678
676
  }, 250);
679
677
  };
680
678
  return /* @__PURE__ */ e(
@@ -683,7 +681,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
683
681
  isDisabled: g,
684
682
  isSaveDisabled: !a,
685
683
  label: n.details_goal_name,
686
- onCancel: m,
684
+ onCancel: o,
687
685
  onSave: r,
688
686
  primaryText: n.details_goal_name,
689
687
  secondaryText: t.name,
@@ -693,28 +691,28 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
693
691
  error: !a,
694
692
  fullWidth: !0,
695
693
  label: n.details_goal_name,
696
- onChange: (o) => _(o.target.value),
694
+ onChange: (_) => u(_.target.value),
697
695
  value: a
698
696
  }
699
697
  )
700
698
  }
701
699
  );
702
700
  }), Lt = ({ goal: t }) => {
703
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), h = !t.guid, g = async () => {
701
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, u] = y.useState(t.retirement_age || 65), h = !t.guid, g = async () => {
704
702
  if (!isNaN(a)) {
705
- const o = { ...t, retirement_age: a };
706
- t.retirement_age = a, h ? c(o) : (await p(o), s(n.alert_goal_updated_retirement_age));
703
+ const _ = { ...t, retirement_age: a };
704
+ t.retirement_age = a, h ? l(_) : (await p(_), s(n.alert_goal_updated_retirement_age));
707
705
  }
708
706
  }, r = () => {
709
707
  setTimeout(() => {
710
- _(t.retirement_age || 65);
708
+ u(t.retirement_age || 65);
711
709
  }, 250);
712
- }, m = !a || isNaN(a) || a < 20 || a >= 100;
710
+ }, o = !a || isNaN(a) || a < 20 || a >= 100;
713
711
  return /* @__PURE__ */ e(
714
712
  Q,
715
713
  {
716
714
  isDisabled: t.is_complete,
717
- isSaveDisabled: m,
715
+ isSaveDisabled: o,
718
716
  label: n.details_retirement_age,
719
717
  onCancel: r,
720
718
  onSave: g,
@@ -724,18 +722,18 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
724
722
  children: /* @__PURE__ */ e(
725
723
  Ke,
726
724
  {
727
- error: m,
725
+ error: o,
728
726
  fullWidth: !0,
729
727
  label: n.details_retirement_age,
730
- onChange: (o) => _(Number(o.target.value)),
728
+ onChange: (_) => u(Number(_.target.value)),
731
729
  value: isNaN(a) ? "" : a
732
730
  }
733
731
  )
734
732
  }
735
733
  );
736
734
  }, Bt = D(({ goal: t }) => {
737
- const { goals: n } = C(), { user: s, updateUser: c } = Ne(), { setAlert: p } = I(), [a, _] = y.useState(J(s.birthday ?? 0)), [h, g] = y.useState(null), r = t.is_complete, m = async () => {
738
- a && pt(a) && (await c({ ...s, birthday: _t(a) }), p(n.alert_goal_updated_birthday));
735
+ const { goals: n } = C(), { user: s, updateUser: l } = Ge(), { setAlert: p } = I(), [a, u] = y.useState(J(s.birthday ?? 0)), [h, g] = y.useState(null), r = t.is_complete, o = async () => {
736
+ a && pt(a) && (await l({ ...s, birthday: _t(a) }), p(n.alert_goal_updated_birthday));
739
737
  };
740
738
  return /* @__PURE__ */ e(
741
739
  Q,
@@ -743,7 +741,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
743
741
  isDisabled: r,
744
742
  isSaveDisabled: !!h,
745
743
  label: n.details_birthday,
746
- onSave: m,
744
+ onSave: o,
747
745
  primaryText: n.details_birthday,
748
746
  secondaryText: `${re(J(s.birthday ?? 0), ie.MONTH_DAY_YEAR)}`,
749
747
  zeroStateText: !t.guid && !s.birthday ? n.add_birthday : void 0,
@@ -751,8 +749,8 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
751
749
  gt,
752
750
  {
753
751
  label: n.details_birthday,
754
- onChange: _,
755
- onError: (o) => g(o),
752
+ onChange: u,
753
+ onError: (_) => g(_),
756
754
  sx: { width: "100%" },
757
755
  value: a
758
756
  }
@@ -761,14 +759,14 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
761
759
  );
762
760
  }), Ot = ({ goal: t }) => {
763
761
  const { goals: n } = C(), { visibleRetirementAccounts: s } = j(), {
764
- addRetirementGoalAccount: c,
762
+ addRetirementGoalAccount: l,
765
763
  newRetirementGoalAccounts: p,
766
764
  retirementGoalAccounts: a,
767
- selectedGoal: _,
765
+ selectedGoal: u,
768
766
  setAlert: h,
769
767
  setNewRetirementGoalAccounts: g,
770
768
  setSelectedGoal: r
771
- } = I(), [m, o] = y.useState(!1), d = !t.guid, l = s.filter(
769
+ } = I(), [o, _] = y.useState(!1), d = !t.guid, c = s.filter(
772
770
  (S) => d ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
773
771
  ), f = s.filter(
774
772
  (S) => !a.find((R) => R.account_guid === S.guid)
@@ -781,20 +779,20 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
781
779
  g(R);
782
780
  else
783
781
  for (const v of R)
784
- await c(v), h(n.alert_account_added);
782
+ await l(v), h(n.alert_account_added);
785
783
  r({
786
- ..._,
784
+ ...u,
787
785
  current_amount: S.reduce((v, K) => v + (K.balance || 0), 0)
788
- }), o(!1);
786
+ }), _(!1);
789
787
  };
790
788
  return /* @__PURE__ */ i(b, { children: [
791
- l.map((S) => /* @__PURE__ */ i(b, { children: [
789
+ c.map((S) => /* @__PURE__ */ i(b, { children: [
792
790
  /* @__PURE__ */ e(Oe, { account: S }),
793
791
  /* @__PURE__ */ e(E, {})
794
792
  ] }, S.guid)),
795
- /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => o(!0), children: [
793
+ /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => _(!0), children: [
796
794
  /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
797
- /* @__PURE__ */ e(Ie, { filled: !0 }),
795
+ /* @__PURE__ */ e(ve, { filled: !0 }),
798
796
  n.details_add_account
799
797
  ] }) }),
800
798
  /* @__PURE__ */ e(M, { color: "primary" })
@@ -803,20 +801,20 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
803
801
  Be,
804
802
  {
805
803
  accounts: f,
806
- isOpen: m,
807
- onClose: () => o(!1),
804
+ isOpen: o,
805
+ onClose: () => _(!1),
808
806
  onSave: T,
809
807
  title: n.add_select_accounts
810
808
  }
811
809
  )
812
810
  ] });
813
811
  }, Wt = D(({ goal: t }) => {
814
- const { goals: n } = C(), { visibleAccounts: s } = j(), c = y.useMemo(
815
- () => s.find((_) => _.guid === t.account_guid),
812
+ const { goals: n } = C(), { visibleAccounts: s } = j(), l = y.useMemo(
813
+ () => s.find((u) => u.guid === t.account_guid),
816
814
  [s, t]
817
815
  ), p = t.track_type;
818
816
  let a = n.details_save_title;
819
- return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ i(b, { children: [
817
+ return t.track_type === m.DEBT_TRACK ? a = n.details_debt_title : t.track_type === m.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ i(b, { children: [
820
818
  /* @__PURE__ */ i(b, { mx: 24, children: [
821
819
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
822
820
  /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
@@ -825,11 +823,11 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
825
823
  /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
826
824
  /* @__PURE__ */ e(Mt, { goal: t }),
827
825
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
828
- (p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ i(U, { children: [
826
+ (p === m.SAVINGS_TRACK || p === m.RETIREMENT_TRACK) && /* @__PURE__ */ i(U, { children: [
829
827
  /* @__PURE__ */ e(Dt, { goal: t }),
830
- /* @__PURE__ */ e(E, { sx: { ml: p === u.RETIREMENT_TRACK ? 24 : 0 } })
828
+ /* @__PURE__ */ e(E, { sx: { ml: p === m.RETIREMENT_TRACK ? 24 : 0 } })
831
829
  ] }),
832
- t.track_type === u.DEBT_TRACK && /* @__PURE__ */ i(U, { children: [
830
+ t.track_type === m.DEBT_TRACK && /* @__PURE__ */ i(U, { children: [
833
831
  /* @__PURE__ */ e(dt, { goal: t }),
834
832
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
835
833
  /* @__PURE__ */ e(mt, { goal: t }),
@@ -837,68 +835,68 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
837
835
  /* @__PURE__ */ e(ut, { goal: t }),
838
836
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
839
837
  ] }),
840
- t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
838
+ t.track_type === m.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
841
839
  /* @__PURE__ */ e(Lt, { goal: t }),
842
840
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
843
841
  /* @__PURE__ */ e(Bt, { goal: t }),
844
842
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
845
843
  ] })
846
844
  ] }),
847
- /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === u.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
848
- t.track_type !== u.RETIREMENT_TRACK && c && /* @__PURE__ */ i(U, { children: [
849
- /* @__PURE__ */ e(Oe, { account: c }),
845
+ /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === m.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
846
+ t.track_type !== m.RETIREMENT_TRACK && l && /* @__PURE__ */ i(U, { children: [
847
+ /* @__PURE__ */ e(Oe, { account: l }),
850
848
  /* @__PURE__ */ e(E, {})
851
849
  ] }),
852
- t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
850
+ t.track_type === m.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
853
851
  /* @__PURE__ */ e(Ot, { goal: t }),
854
852
  /* @__PURE__ */ e(E, {})
855
853
  ] }),
856
- t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Kt, { goal: t })
854
+ t.track_type === m.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Kt, { goal: t })
857
855
  ] });
858
856
  }), Pt = D(({ onClose: t }) => {
859
- const { visibleRetirementAccounts: n } = j(), { goals: s, common: c } = C(), {
857
+ const { visibleRetirementAccounts: n } = j(), { goals: s, common: l } = C(), {
860
858
  addGoal: p,
861
859
  addRetirementGoal: a,
862
- deleteGoal: _,
860
+ deleteGoal: u,
863
861
  deleteRetirementGoal: h,
864
862
  newRetirementGoalAccounts: g,
865
863
  retirementGoalAccounts: r,
866
- selectedGoal: m,
867
- setAlert: o,
864
+ selectedGoal: o,
865
+ setAlert: _,
868
866
  setSelectedGoal: d,
869
- updateGoal: l
870
- } = I(), { user: f } = Ne(), [T, S] = y.useState(!1), R = !m?.guid, v = m?.track_type === u.SAVINGS_TRACK && m.is_complete && !m.has_been_spent, K = y.useMemo(() => {
867
+ updateGoal: c
868
+ } = I(), { user: f } = Ge(), [T, S] = y.useState(!1), R = !o?.guid, v = o?.track_type === m.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, K = y.useMemo(() => {
871
869
  const G = R ? g : r;
872
870
  return n.filter((H) => G.some(($) => $.account_guid === H.guid));
873
871
  }, [R, n, g, r]), se = y.useMemo(() => {
874
- if (!m) return !1;
872
+ if (!o) return !1;
875
873
  if (!R && !v) return !0;
876
- const { account_guid: G, track_type: H, name: $, amount: O, retirement_age: ne } = m;
877
- return H === u.SAVINGS_TRACK ? G ? !!$ && !!O : !1 : H === u.RETIREMENT_TRACK ? K.length ? !!$ && !!O && !!ne && !!f.birthday : !1 : !0;
878
- }, [m, K, f.birthday]);
879
- let W = c.delete_button, z = () => S(!0);
880
- R ? (z = () => ee(), W = c.save_button) : v && (z = () => le(), W = s.mark_as_complete_button);
874
+ const { account_guid: G, track_type: H, name: $, amount: O, retirement_age: ne } = o;
875
+ return H === m.SAVINGS_TRACK ? G ? !!$ && !!O : !1 : H === m.RETIREMENT_TRACK ? K.length ? !!$ && !!O && !!ne && !!f.birthday : !1 : !0;
876
+ }, [o, K, f.birthday]);
877
+ let W = l.delete_button, z = () => S(!0);
878
+ R ? (z = () => ee(), W = l.save_button) : v && (z = () => le(), W = s.mark_as_complete_button);
881
879
  const ee = async () => {
882
- if (m) {
883
- const G = m.track_type;
884
- G !== u.RETIREMENT_TRACK ? await p(m) : G === u.RETIREMENT_TRACK && await a({ ...m, target_amount: m.amount }), o(s.alert_goal_added), d(void 0), G && t?.(G);
880
+ if (o) {
881
+ const G = o.track_type;
882
+ G !== m.RETIREMENT_TRACK ? await p(o) : G === m.RETIREMENT_TRACK && await a({ ...o, target_amount: o.amount }), _(s.alert_goal_added), d(void 0), G && t?.(G);
885
883
  }
886
884
  }, te = async () => {
887
- m && (m.track_type !== u.RETIREMENT_TRACK ? await _(m.guid) : m.track_type === u.RETIREMENT_TRACK && await h(m), o(s.alert_goal_deleted), d(void 0));
885
+ o && (o.track_type !== m.RETIREMENT_TRACK ? await u(o.guid) : o.track_type === m.RETIREMENT_TRACK && await h(o), _(s.alert_goal_deleted), d(void 0));
888
886
  }, le = async () => {
889
887
  const G = {
890
- ...m,
888
+ ...o,
891
889
  has_been_spent: !0
892
890
  };
893
- await l(G), o(s.alert_goal_completed), d(void 0);
891
+ await c(G), _(s.alert_goal_completed), d(void 0);
894
892
  };
895
893
  return /* @__PURE__ */ i(b, { children: [
896
894
  /* @__PURE__ */ e(
897
895
  F,
898
896
  {
899
- ariaLabelClose: c.close_aria,
897
+ ariaLabelClose: l.close_aria,
900
898
  hasSecondaryAction: R,
901
- isOpen: !!m,
899
+ isOpen: !!o,
902
900
  isPrimaryDisabled: !se,
903
901
  onClose: () => d(void 0),
904
902
  onPrimaryAction: z,
@@ -906,39 +904,39 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
906
904
  primaryText: W,
907
905
  secondaryColor: "primary",
908
906
  title: s.goal_details,
909
- children: m && /* @__PURE__ */ e(Wt, { goal: m })
907
+ children: o && /* @__PURE__ */ e(Wt, { goal: o })
910
908
  }
911
909
  ),
912
910
  /* @__PURE__ */ e(
913
911
  nt,
914
912
  {
915
- copy: { close_aria: c.close_aria, title: s.delete_goal },
913
+ copy: { close_aria: l.close_aria, title: s.delete_goal },
916
914
  isOpen: T,
917
915
  maxWidth: "xs",
918
916
  onClose: () => S(!1),
919
917
  onPrimaryAction: te,
920
918
  primaryColor: "error",
921
- primaryText: c.delete_button,
922
- children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(s.delete_description, m?.name || "") })
919
+ primaryText: l.delete_button,
920
+ children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(s.delete_description, o?.name || "") })
923
921
  }
924
922
  )
925
923
  ] });
926
924
  }), Xn = D(({ onBackClick: t, sx: n }) => {
927
- const { onEvent: s } = ke(), { onLoad: c } = Qe(), { isMobile: p } = be(), { visibleAccounts: a } = j(), { isCopyLoaded: _, isInitialized: h, setSelectedAccounts: g } = ge(), { goals: r, common: m } = C(), { alert: o, goals: d, goalsLoaded: l, loadGoals: f, monthlyCashFlowProfile: T, setAlert: S, retirmentGoals: R } = I(), [v, K] = y.useState(0), [se, W] = y.useState(!1), z = T?.amount_allocated_for_savings_goals || 0, ee = T?.amount_allocated_for_debt_goals || 0, te = T?.amount_allocated_for_retirement_goals || 0, le = _ ? L(
925
+ const { onEvent: s } = Ne(), { onLoad: l } = Qe(), { isMobile: p } = ge(), { visibleAccounts: a } = j(), { isCopyLoaded: u, isInitialized: h, setSelectedAccounts: g } = ke(), { goals: r, common: o } = C(), { alert: _, goals: d, goalsLoaded: c, loadGoals: f, monthlyCashFlowProfile: T, setAlert: S, retirmentGoals: R } = I(), [v, K] = y.useState(0), [se, W] = y.useState(!1), z = T?.amount_allocated_for_savings_goals || 0, ee = T?.amount_allocated_for_debt_goals || 0, te = T?.amount_allocated_for_retirement_goals || 0, le = u ? L(
928
926
  p ? r.tab_subtitle_mobile : r.tab_subtitle,
929
927
  x(z, "0,0")
930
- ) : "", G = _ ? L(
928
+ ) : "", G = u ? L(
931
929
  p ? r.tab_subtitle_mobile : r.tab_subtitle,
932
930
  x(ee, "0,0")
933
- ) : "", H = _ ? L(
931
+ ) : "", H = u ? L(
934
932
  p ? r.tab_subtitle_mobile : r.tab_subtitle,
935
933
  x(te, "0,0")
936
934
  ) : "";
937
935
  y.useEffect(() => {
938
936
  g(a), s(Y.GOALS_VIEW);
939
- }, [a]), y.useEffect(() => {
937
+ }, []), y.useEffect(() => {
940
938
  h && f().finally(() => {
941
- c?.("GoalsWidget");
939
+ l?.("GoalsWidget");
942
940
  });
943
941
  }, [h, z, ee, te]);
944
942
  const $ = () => {
@@ -946,12 +944,12 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
946
944
  }, O = () => {
947
945
  W(!0), s(Y.GOALS_CLICK_ADD);
948
946
  }, ne = (X) => {
949
- W(!1), X === u.SAVINGS_TRACK ? K(0) : X === u.DEBT_TRACK ? K(1) : X === u.RETIREMENT_TRACK && K(2);
947
+ W(!1), X === m.SAVINGS_TRACK ? K(0) : X === m.DEBT_TRACK ? K(1) : X === m.RETIREMENT_TRACK && K(2);
950
948
  }, Z = y.useMemo(
951
- () => l && (d.length === 0 || d.every(({ track_type: X }) => !X) && R.length === 0),
952
- [d, l, R]
949
+ () => c && (d.length === 0 || d.every(({ track_type: X }) => !X) && R.length === 0),
950
+ [d, c, R]
953
951
  );
954
- return !l || !_ || !h ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ i(
952
+ return !c || !u || !h ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ i(
955
953
  ft,
956
954
  {
957
955
  accountOptions: a,
@@ -1017,39 +1015,39 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1017
1015
  }
1018
1016
  }
1019
1017
  ) : /* @__PURE__ */ i(U, { children: [
1020
- v === 0 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.SAVINGS_TRACK }),
1021
- v === 1 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.DEBT_TRACK }),
1022
- v === 2 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.RETIREMENT_TRACK })
1018
+ v === 0 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: m.SAVINGS_TRACK }),
1019
+ v === 1 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: m.DEBT_TRACK }),
1020
+ v === 2 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: m.RETIREMENT_TRACK })
1023
1021
  ] })
1024
1022
  ] }),
1025
1023
  /* @__PURE__ */ e(Pt, { onClose: ne }),
1026
1024
  /* @__PURE__ */ e(
1027
1025
  F,
1028
1026
  {
1029
- ariaLabelClose: m.close_aria,
1027
+ ariaLabelClose: o.close_aria,
1030
1028
  isOpen: se,
1031
1029
  onClose: () => W(!1),
1032
1030
  title: r.add_goal_title,
1033
1031
  children: /* @__PURE__ */ e(wt, { onClose: ne })
1034
1032
  }
1035
1033
  ),
1036
- /* @__PURE__ */ e(Fe, { onClose: () => S(""), open: !!o, children: /* @__PURE__ */ e(je, { onClose: () => S(""), severity: "success", variant: "filled", children: o }) })
1034
+ /* @__PURE__ */ e(Fe, { onClose: () => S(""), open: !!_, children: /* @__PURE__ */ e(je, { onClose: () => S(""), severity: "success", variant: "filled", children: _ }) })
1037
1035
  ]
1038
1036
  }
1039
1037
  );
1040
1038
  }), Vt = D(({ goal: t }) => {
1041
1039
  const { goals: n } = C(), s = Ct(), {
1042
- backgroundColor: c,
1040
+ backgroundColor: l,
1043
1041
  color: p,
1044
1042
  percentage: a,
1045
- projectedText: _
1043
+ projectedText: u
1046
1044
  } = _e(n, t), h = Math.round(a * 100);
1047
- let g = /* @__PURE__ */ e(Ee, {});
1048
- return t.track_type === u.DEBT_TRACK ? g = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (g = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1049
- /* @__PURE__ */ e(ae, { sx: { bgcolor: c, color: p, height: 32, width: 32 }, variant: "rounded", children: g }),
1045
+ let g = /* @__PURE__ */ e(Re, {});
1046
+ return t.track_type === m.DEBT_TRACK ? g = /* @__PURE__ */ e(Ee, {}) : t.track_type === m.RETIREMENT_TRACK && (g = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1047
+ /* @__PURE__ */ e(ae, { sx: { bgcolor: l, color: p, height: 32, width: 32 }, variant: "rounded", children: g }),
1050
1048
  /* @__PURE__ */ i(Tt, { sx: { width: "100%" }, children: [
1051
1049
  /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1052
- t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
1050
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: u })
1053
1051
  ] }),
1054
1052
  /* @__PURE__ */ e(
1055
1053
  St,
@@ -1087,7 +1085,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1087
1085
  ]
1088
1086
  }
1089
1087
  ), Un = D(({ onCTAClick: t }) => {
1090
- const { visibleAccounts: n } = j(), { onEvent: s } = ke(), { goals: c } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = ge(), { ongoingGoalsForMicroWidget: h, loadGoals: g, goalsLoaded: r } = I();
1088
+ const { visibleAccounts: n } = j(), { onEvent: s } = Ne(), { goals: l } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: u } = ke(), { ongoingGoalsForMicroWidget: h, loadGoals: g, goalsLoaded: r } = I();
1091
1089
  y.useEffect(() => {
1092
1090
  a(n);
1093
1091
  }, []), y.useEffect(() => {
@@ -1095,30 +1093,30 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1095
1093
  state: n?.length ? "default" : "zeroState"
1096
1094
  }));
1097
1095
  }, [p]);
1098
- const m = y.useMemo(
1096
+ const o = y.useMemo(
1099
1097
  () => r && h.length === 0,
1100
1098
  [h, r]
1101
- ), o = () => {
1099
+ ), _ = () => {
1102
1100
  s(
1103
- m ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1101
+ o ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1104
1102
  ), t();
1105
1103
  };
1106
- return !r || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1104
+ return !r || !u || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1107
1105
  Rt,
1108
1106
  {
1109
1107
  className: "mx-goals-microwidget",
1110
- ctaLabel: m ? c.get_started : c.view_details,
1111
- onCTAClick: o,
1112
- title: c.title,
1113
- children: m ? /* @__PURE__ */ e(
1108
+ ctaLabel: o ? l.get_started : l.view_details,
1109
+ onCTAClick: _,
1110
+ title: l.title,
1111
+ children: o ? /* @__PURE__ */ e(
1114
1112
  jt,
1115
1113
  {
1116
- header: c.create_goals_header,
1117
- subText: c.micro_zero_state_description
1114
+ header: l.create_goals_header,
1115
+ subText: l.micro_zero_state_description
1118
1116
  }
1119
- ) : /* @__PURE__ */ e(At, { sx: { justifyContent: "space-between" }, children: h.map((d, l) => /* @__PURE__ */ i(y.Fragment, { children: [
1117
+ ) : /* @__PURE__ */ e(At, { sx: { justifyContent: "space-between" }, children: h.map((d, c) => /* @__PURE__ */ i(y.Fragment, { children: [
1120
1118
  /* @__PURE__ */ e(Vt, { goal: d }),
1121
- l !== h.length - 1 && /* @__PURE__ */ e(E, {})
1119
+ c !== h.length - 1 && /* @__PURE__ */ e(E, {})
1122
1120
  ] }, d.guid)) })
1123
1121
  }
1124
1122
  );