@mx-cartographer/experiences 7.2.16-alpha.mm0 → 7.3.0-alpha.sms1

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 (62) hide show
  1. package/dist/{Account-vp_TAbGt.mjs → Account-Bxw0_4FU.mjs} +1 -1
  2. package/dist/{AccountDetailsContent-CsH1w_GZ.mjs → AccountDetailsContent-CAM9y39M.mjs} +6 -6
  3. package/dist/{AccountDetailsHeader-Df1JkzYi.mjs → AccountDetailsHeader-JtSX6Uf9.mjs} +4 -4
  4. package/dist/{AccountFields-DUToRRqW.mjs → AccountFields-C9FlatNb.mjs} +2 -2
  5. package/dist/{AccountListItem-CeY_WIpj.mjs → AccountListItem-JFMZROh7.mjs} +7 -7
  6. package/dist/{AccountStore-BkoLK9Tq.mjs → AccountStore-BgNOyMdp.mjs} +74 -100
  7. package/dist/Accounts-BRf_YeTf.mjs +27 -0
  8. package/dist/CategoryStore-yHI0hWmK.mjs +174 -0
  9. package/dist/CategoryUtil-pZRIYOgN.mjs +80 -0
  10. package/dist/{ConnectDrawer-Bw5s6Dw1.mjs → ConnectDrawer-BQNs-hjk.mjs} +9 -9
  11. package/dist/{ConnectionsDrawer-BDvVuJQf.mjs → ConnectionsDrawer-ByGQE7D5.mjs} +3 -3
  12. package/dist/{DebtsStore-BD_XwsI7.mjs → DebtsStore-C9bblOgW.mjs} +1 -1
  13. package/dist/{GoalStore-DZ_Jvsa_.mjs → GoalStore-D-aB35SY.mjs} +151 -111
  14. package/dist/{ManageIncome-CV-bGuR-.mjs → ManageIncome-1s_q5W4X.mjs} +3 -3
  15. package/dist/{NetWorthStore-D1NiDUcc.mjs → NetWorthStore-DCsTZpuS.mjs} +2 -2
  16. package/dist/{NotificationSettings-5i3IywCi.mjs → NotificationSettings-DqrkNMod.mjs} +236 -238
  17. package/dist/{NotificationStore-C6PH6MKm.mjs → NotificationStore-BxP_P2dA.mjs} +23 -15
  18. package/dist/{RecurringSettings-G6_BbsIF.mjs → RecurringSettings-A_rAGCTP.mjs} +3 -3
  19. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-DK8dWldr.mjs} +3 -3
  20. package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4YOD7_D.mjs} +29 -26
  21. package/dist/{TransactionDetails-CDtya0KS.mjs → TransactionDetails-oP1eSuiS.mjs} +1 -1
  22. package/dist/TransactionStore-ai3uII_r.mjs +690 -0
  23. package/dist/{WidgetContainer-EbrN1oIo.mjs → WidgetContainer-BHWANqT4.mjs} +1 -1
  24. package/dist/accounts/index.es.js +125 -127
  25. package/dist/accounts/stores/AccountStore.d.ts +25 -22
  26. package/dist/accounts/utils/Accounts.d.ts +2 -1
  27. package/dist/budgets/index.es.js +499 -501
  28. package/dist/budgets/store/BudgetsStore.d.ts +1 -0
  29. package/dist/cashflow/index.es.js +382 -384
  30. package/dist/categories/index.es.js +1 -1
  31. package/dist/categories/stores/CategoryStore.d.ts +5 -1
  32. package/dist/categories/util/CategoryUtil.d.ts +3 -2
  33. package/dist/common/index.es.js +206 -214
  34. package/dist/common/stores/AppDataStore.d.ts +3 -1
  35. package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
  36. package/dist/common/stores/GlobalStore.d.ts +3 -3
  37. package/dist/common/stores/UserStore.d.ts +3 -2
  38. package/dist/common/types/Account.d.ts +9 -6
  39. package/dist/dashboard/index.es.js +1 -1
  40. package/dist/debts/index.es.js +375 -377
  41. package/dist/finstrong/index.es.js +415 -417
  42. package/dist/goals/index.es.js +557 -559
  43. package/dist/goals/stores/GoalStore.d.ts +17 -4
  44. package/dist/help/index.es.js +1 -1
  45. package/dist/investments/index.es.js +435 -437
  46. package/dist/investments/stores/HoldingStore.d.ts +1 -0
  47. package/dist/networth/index.es.js +172 -174
  48. package/dist/notifications/index.es.js +3 -3
  49. package/dist/notifications/stores/NotificationStore.d.ts +3 -1
  50. package/dist/recurringtransactions/index.es.js +173 -175
  51. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +3 -2
  52. package/dist/settings/index.es.js +279 -285
  53. package/dist/spending/index.es.js +281 -283
  54. package/dist/transactions/index.es.js +6 -6
  55. package/dist/transactions/stores/TransactionStore.d.ts +21 -77
  56. package/dist/trends/index.es.js +4 -4
  57. package/dist/{useAccountDisplayName-jS05A6-6.mjs → useAccountDisplayName-BUAApBIb.mjs} +1 -1
  58. package/package.json +4 -4
  59. package/dist/Accounts-C1QxUB-e.mjs +0 -9
  60. package/dist/CategoryStore-BCcpI3oJ.mjs +0 -183
  61. package/dist/CategoryUtil-BR3H5i6n.mjs +0 -78
  62. package/dist/TransactionStore-DxPLdF3B.mjs +0 -677
@@ -1,157 +1,157 @@
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-DZ_Jvsa_.mjs";
2
- import { c as qn, d as Jn } from "../GoalStore-DZ_Jvsa_.mjs";
3
- import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
1
+ import { g as ue, T as d, G as me, a as We, M as J, C as ye, b as Pe } from "../GoalStore-D-aB35SY.mjs";
2
+ import { c as Yn, d as Zn } from "../GoalStore-D-aB35SY.mjs";
3
+ import { jsxs as r, 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";
6
- import je from "@mui/material/Alert";
7
- import Fe from "@mui/material/Snackbar";
8
- import b from "@mui/material/Stack";
9
- import ce from "@mui/material/Tab";
10
- import ze from "@mui/material/Tabs";
11
- import { Text as A, H2 as pe, P, H3 as He, Icon as $e, InstitutionLogo as oe } from "@mxenabled/mxui";
12
- import he from "@mui/material/Button";
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
- import ae from "@mui/material/Avatar";
18
- import Xe from "@mui/material/CardHeader";
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 { u as C, l as I, a as Ie, d as j, p as Ge, g as Ne, n as Qe, b as ke } from "../hooks-D6XlXHf4.mjs";
21
- import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
6
+ import Ve from "@mui/material/Alert";
7
+ import je from "@mui/material/Snackbar";
8
+ import f from "@mui/material/Stack";
9
+ import le from "@mui/material/Tab";
10
+ import Fe from "@mui/material/Tabs";
11
+ import { Text as A, H2 as _e, P as W, H3 as ze, Icon as He, InstitutionLogo as ne } from "@mxenabled/mxui";
12
+ import pe from "@mui/material/Button";
13
+ import Ae from "@mui/material/Card";
14
+ import Te from "@mui/material/CardActionArea";
15
+ import Ce from "@mui/material/CardContent";
16
+ import ge from "@mui/material/Unstable_Grid2";
17
+ import oe from "@mui/material/Avatar";
18
+ import $e from "@mui/material/CardHeader";
19
+ import { Payments as Se, NoteStack as Re, Person as Ee, ChevronRight as M, DragHandle as Xe, CheckCircle as Ue, Icon as be, ExpandLess as Ye, ExpandMore as Ze, AddBox as xe, Trophy as qe } from "@mxenabled/mx-icons";
20
+ import { u as C, l as I, a as ve, d as V, p as Ie, g as Ge, b as Ne } from "../hooks-D6XlXHf4.mjs";
21
+ import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { f as x } from "../NumberFormatting-Buh7u8Oi.mjs";
23
- import { S as et } from "../StatusBar-BK_uYHAB.mjs";
23
+ import { S as Je } from "../StatusBar-BK_uYHAB.mjs";
24
24
  import E from "@mui/material/Divider";
25
- import B from "@mui/material/List";
26
- import { L as Q } from "../ListItemAction-DHa3KJPs.mjs";
27
- import { C as we } from "../CurrencyInput-DUsQbkXb.mjs";
28
- import { fromUnixTime as J } from "date-fns/fromUnixTime";
25
+ import L from "@mui/material/List";
26
+ import { L as ee } from "../ListItemAction-DHa3KJPs.mjs";
27
+ import { C as ke } from "../CurrencyInput-DUsQbkXb.mjs";
28
+ import { fromUnixTime as Q } from "date-fns/fromUnixTime";
29
29
  import N from "@mui/material/ListItem";
30
30
  import k from "@mui/material/ListItemButton";
31
31
  import w from "@mui/material/ListItemText";
32
- import { DataGridPro as tt } from "@mui/x-data-grid-pro";
33
- import { D as F } from "../Drawer-kEE73B87.mjs";
34
- import { b as L } from "../Localization-2MODESHW.mjs";
35
- import { f as re, D as ie, a as nt } from "../Dialog-CWW597AF.mjs";
36
- import V from "@mui/material/ListItemAvatar";
37
- import { g as De, A as ye } from "../ConnectDrawer-Bw5s6Dw1.mjs";
38
- import ot from "@mui/material/Collapse";
39
- import at from "@mui/material/ListItemIcon";
40
- import rt from "@mui/material/Checkbox";
41
- import { u as it, A as st } from "../AccountDetailsHeader-Df1JkzYi.mjs";
42
- import { A as lt } from "../AccountDetailsContent-CsH1w_GZ.mjs";
43
- import { u as ct } from "../useAccountDisplayName-jS05A6-6.mjs";
44
- import Ke from "@mui/material/TextField";
45
- import { M as dt, I as mt, O as ut } from "../OriginalBalanceAction-CWuVvRq9.mjs";
46
- import { getUnixTime as _t } from "date-fns/getUnixTime";
47
- import { isValid as pt } from "date-fns/isValid";
48
- import { AdapterDateFns as ht } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
- import { DatePicker as gt } from "@mui/x-date-pickers";
50
- import { LocalizationProvider as bt } from "@mui/x-date-pickers/LocalizationProvider";
51
- import { A as Y, W as ft } from "../WidgetContainer-EbrN1oIo.mjs";
52
- import { L as Me } from "../Loader-DUaFpDGv.mjs";
53
- import { E as yt } from "../EmptyState-DA_lfRBv.mjs";
54
- import At from "@mui/material/Stack/Stack";
55
- import Tt from "@mui/material/Box";
56
- import Ct from "@mui/material/styles/useTheme";
57
- import { S as St } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
- import { M as Rt } from "../MicroWidgetContainer-DpeqN9n3.mjs";
59
- function de({ title: t, subtitle: n }) {
60
- return /* @__PURE__ */ i(b, { children: [
32
+ import { DataGridPro as Qe } from "@mui/x-data-grid-pro";
33
+ import { D as j } from "../Drawer-kEE73B87.mjs";
34
+ import { b as B } from "../Localization-2MODESHW.mjs";
35
+ import { f as ae, D as re, a as et } from "../Dialog-CWW597AF.mjs";
36
+ import P from "@mui/material/ListItemAvatar";
37
+ import { g as we, A as fe } from "../ConnectDrawer-BQNs-hjk.mjs";
38
+ import tt from "@mui/material/Collapse";
39
+ import nt from "@mui/material/ListItemIcon";
40
+ import ot from "@mui/material/Checkbox";
41
+ import { u as at, A as rt } from "../AccountDetailsHeader-JtSX6Uf9.mjs";
42
+ import { A as it } from "../AccountDetailsContent-CAM9y39M.mjs";
43
+ import { u as st } from "../useAccountDisplayName-BUAApBIb.mjs";
44
+ import De from "@mui/material/TextField";
45
+ import { M as lt, I as ct, O as dt } from "../OriginalBalanceAction-CWuVvRq9.mjs";
46
+ import { getUnixTime as mt } from "date-fns/getUnixTime";
47
+ import { isValid as ut } from "date-fns/isValid";
48
+ import { AdapterDateFns as _t } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
+ import { DatePicker as pt } from "@mui/x-date-pickers";
50
+ import { LocalizationProvider as ht } from "@mui/x-date-pickers/LocalizationProvider";
51
+ import { A as Y, W as gt } from "../WidgetContainer-BHWANqT4.mjs";
52
+ import { L as Ke } from "../Loader-DUaFpDGv.mjs";
53
+ import { E as bt } from "../EmptyState-DA_lfRBv.mjs";
54
+ import ft from "@mui/material/Stack/Stack";
55
+ import yt from "@mui/material/Box";
56
+ import At from "@mui/material/styles/useTheme";
57
+ import { S as Tt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
+ import { M as Ct } from "../MicroWidgetContainer-DpeqN9n3.mjs";
59
+ function ce({ title: t, subtitle: n }) {
60
+ return /* @__PURE__ */ r(f, { children: [
61
61
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t }),
62
62
  /* @__PURE__ */ e(A, { sx: { fontWeight: 400 }, variant: "Body", children: n })
63
63
  ] });
64
64
  }
65
- const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
65
+ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
66
66
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
67
67
  "$1$2$3"
68
- ) : x(t, "0,0.00"), Le = D(
69
- ({ goal: t, isInDrawer: n = !1, onClick: s }) => {
70
- const { goals: l } = C(), { isMobile: p, isTablet: a } = ge(), u = p || a, {
71
- backgroundColor: h,
72
- color: g,
73
- percentage: r,
68
+ ) : x(t, "0,0.00"), Me = D(
69
+ ({ goal: t, isInDrawer: n = !1, onClick: i }) => {
70
+ const { goals: s } = C(), { isMobile: p, isTablet: a } = he(), _ = p || a, {
71
+ backgroundColor: g,
72
+ color: l,
73
+ percentage: h,
74
74
  percentageText: o,
75
- projectedText: _
76
- } = _e(l, t), d = t.track_type === m.DEBT_TRACK ? t.initial_amount : t.amount, c = [
75
+ projectedText: m
76
+ } = ue(s, t), c = t.track_type === d.DEBT_TRACK ? t.initial_amount : t.amount, u = [
77
77
  {
78
- color: h,
79
- percentage: `${r}`
78
+ color: g,
79
+ percentage: `${h}`
80
80
  }
81
81
  ];
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: [
82
+ let b = /* @__PURE__ */ e(Se, {});
83
+ return t.track_type === d.DEBT_TRACK ? b = /* @__PURE__ */ e(Re, {}) : t.track_type === d.RETIREMENT_TRACK && (b = /* @__PURE__ */ e(Ee, {})), /* @__PURE__ */ e(Ae, { elevation: 2, children: /* @__PURE__ */ r(Te, { disabled: !i, onClick: i, children: [
84
84
  /* @__PURE__ */ e(
85
- Xe,
85
+ $e,
86
86
  {
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 || u ? "H3" : "H2", children: `${x(t.current_amount, u ? "0,0" : "0,0.00")} / ${Et(
89
- d,
90
- u
87
+ avatar: /* @__PURE__ */ e(oe, { sx: { bgcolor: g, color: l, height: 48, width: 48 }, variant: "rounded", children: b }),
88
+ subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${St(
89
+ c,
90
+ _
91
91
  )}` }),
92
- title: /* @__PURE__ */ e(pe, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
92
+ title: /* @__PURE__ */ e(_e, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
93
93
  }
94
94
  ),
95
- /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ i(b, { gap: 6, children: [
96
- /* @__PURE__ */ e(et, { data: c, height: 24 }),
97
- /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
95
+ /* @__PURE__ */ e(Ce, { sx: { pt: 0 }, children: /* @__PURE__ */ r(f, { gap: 6, children: [
96
+ /* @__PURE__ */ e(Je, { data: u, height: 24 }),
97
+ /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
98
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: _ })
99
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: m })
100
100
  ] })
101
101
  ] }) })
102
102
  ] }) });
103
103
  }
104
- ), xt = D(({ trackType: t }) => {
105
- const { goals: n } = C(), { setAlert: s, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
106
- let r = 0;
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);
104
+ ), Rt = D(({ trackType: t }) => {
105
+ const { goals: n } = C(), { setAlert: i, monthlyCashFlowProfile: s, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
106
+ let h = 0;
107
+ return t === d.SAVINGS_TRACK ? h = s?.amount_allocated_for_savings_goals || 0 : t === d.DEBT_TRACK ? h = s?.amount_allocated_for_debt_goals || 0 : t === d.RETIREMENT_TRACK && (h = s?.amount_allocated_for_retirement_goals || 0), h;
108
+ }, [s]), [_, g] = y.useState(a), l = async () => {
109
+ if (s) {
110
+ const h = { ...s };
111
+ t === d.SAVINGS_TRACK ? h.amount_allocated_for_savings_goals = _ : t === d.DEBT_TRACK ? h.amount_allocated_for_debt_goals = _ : t === d.RETIREMENT_TRACK && (h.amount_allocated_for_retirement_goals = _), await p(h), i(n.alert_contribution_updated);
112
112
  }
113
113
  };
114
- return /* @__PURE__ */ e(b, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
115
- Q,
114
+ return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
115
+ ee,
116
116
  {
117
- isSaveDisabled: !u || isNaN(u),
117
+ isSaveDisabled: !_ || isNaN(_),
118
118
  label: n.contribution_label,
119
- onCancel: () => h(a),
120
- onSave: g,
119
+ onCancel: () => g(a),
120
+ onSave: l,
121
121
  primaryText: n.contribution_label,
122
122
  secondaryText: x(a, "0,0.00"),
123
123
  children: /* @__PURE__ */ e(
124
- we,
124
+ ke,
125
125
  {
126
- amount: u,
126
+ amount: _,
127
127
  autoFocus: !0,
128
- error: !u || isNaN(u),
128
+ error: !_ || isNaN(_),
129
129
  fullWidth: !0,
130
130
  minAmount: 0,
131
- setAmount: (r) => h(isNaN(Number(r)) ? u : Number(r)),
131
+ setAmount: (h) => g(isNaN(Number(h)) ? _ : Number(h)),
132
132
  sx: { ".MuiTypography-Body": { p: 0 } }
133
133
  }
134
134
  )
135
135
  }
136
136
  ) });
137
- }), vt = ({ goals: t }) => {
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 })));
137
+ }), Et = ({ goals: t }) => {
138
+ const { goals: n, common: i } = C(), { reorderGoals: s, setAlert: p } = I(), [a, _] = y.useState(!1), [g, l] = y.useState(t.map((u) => ({ ...u })));
139
139
  y.useEffect(() => {
140
- a && g(t.map((c) => ({ ...c })));
140
+ a && l(t.map((u) => ({ ...u })));
141
141
  }, [a]);
142
- const r = [
142
+ const h = [
143
143
  {
144
144
  field: "name",
145
145
  flex: 1,
146
- renderCell: (c) => {
147
- const f = c.row;
148
- return /* @__PURE__ */ i(b, { children: [
149
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: f.name }),
150
- /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
146
+ renderCell: (u) => {
147
+ const b = u.row;
148
+ return /* @__PURE__ */ r(f, { children: [
149
+ /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: b.name }),
150
+ /* @__PURE__ */ e(A, { variant: "XSmall", children: B(
151
151
  n.goal_projection,
152
- re(
153
- J(f.projected_to_complete_at || 0),
154
- ie.MONTH_SHORT_YEAR
152
+ ae(
153
+ Q(b.projected_to_complete_at || 0),
154
+ re.MONTH_SHORT_YEAR
155
155
  )
156
156
  ) })
157
157
  ] });
@@ -162,29 +162,29 @@ 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: (c) => {
166
- const f = c.row;
167
- return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(f.amount, "0,0.00") });
165
+ renderCell: (u) => {
166
+ const b = u.row;
167
+ return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(b.amount, "0,0.00") });
168
168
  },
169
169
  sortable: !1
170
170
  }
171
- ], o = h.map((c) => ({
172
- id: c.guid,
171
+ ], o = g.map((u) => ({
172
+ id: u.guid,
173
173
  isHovering: !1,
174
- __reorder__: c.name,
175
- ...c
176
- })), _ = ({ oldIndex: c, targetIndex: f }) => {
177
- const T = [...h];
178
- T.splice(f, 0, T.splice(c, 1)[0]);
174
+ __reorder__: u.name,
175
+ ...u
176
+ })), m = ({ oldIndex: u, targetIndex: b }) => {
177
+ const T = [...g];
178
+ T.splice(b, 0, T.splice(u, 1)[0]);
179
179
  for (let S = 0; S < T.length; S += 1)
180
180
  T[S].position = S + 1;
181
- g(T);
182
- }, d = async () => {
183
- await l(h), p(n.alert_goals_reordered), u(!1);
181
+ l(T);
182
+ }, c = async () => {
183
+ await s(g), p(n.alert_goals_reordered), _(!1);
184
184
  };
185
- return /* @__PURE__ */ i(b, { children: [
186
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => u(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
187
- b,
185
+ return /* @__PURE__ */ r(f, { children: [
186
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(
187
+ f,
188
188
  {
189
189
  alignItems: "center",
190
190
  color: "action.active",
@@ -197,28 +197,28 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
197
197
  }
198
198
  ) }) }) }),
199
199
  /* @__PURE__ */ e(
200
- F,
200
+ j,
201
201
  {
202
- ariaLabelClose: s.close_aria,
202
+ ariaLabelClose: i.close_aria,
203
203
  isOpen: a,
204
- onClose: () => u(!1),
205
- onPrimaryAction: d,
204
+ onClose: () => _(!1),
205
+ onPrimaryAction: c,
206
206
  title: n.reorder_goals_title,
207
- children: /* @__PURE__ */ i(b, { children: [
208
- /* @__PURE__ */ e(P, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
207
+ children: /* @__PURE__ */ r(f, { children: [
208
+ /* @__PURE__ */ e(W, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
209
209
  /* @__PURE__ */ e(
210
- tt,
210
+ Qe,
211
211
  {
212
212
  columnHeaderHeight: 0,
213
- columns: r,
213
+ columns: h,
214
214
  disableColumnFilter: !0,
215
215
  disableColumnMenu: !0,
216
216
  hideFooter: !0,
217
- onRowOrderChange: _,
217
+ onRowOrderChange: m,
218
218
  rowReordering: !0,
219
219
  rows: o,
220
220
  slots: {
221
- rowReorderIcon: () => /* @__PURE__ */ e(Ue, { sx: { ml: 12 } })
221
+ rowReorderIcon: () => /* @__PURE__ */ e(Xe, { sx: { ml: 12 } })
222
222
  //TODO: Add to mx-icons
223
223
  },
224
224
  sx: {
@@ -232,11 +232,11 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
232
232
  }
233
233
  )
234
234
  ] });
235
- }, It = ({ goal: t, index: n }) => {
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
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
238
- t.track_type !== m.RETIREMENT_TRACK && /* @__PURE__ */ e(
239
- V,
235
+ }, xt = ({ goal: t, index: n }) => {
236
+ const { goals: i } = C(), { percentage: s } = ue(i, t), p = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? i.goal_completed : B(i.goal_percentage_reached, `${s * 100}`);
237
+ return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
238
+ t.track_type !== d.RETIREMENT_TRACK && /* @__PURE__ */ e(
239
+ P,
240
240
  {
241
241
  sx: {
242
242
  alignItems: "center",
@@ -244,112 +244,112 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
244
244
  justifyContent: "center",
245
245
  ".MuiAvatar-root": { height: "16px", width: "16px" }
246
246
  },
247
- children: /* @__PURE__ */ e(ae, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "XSmall", children: n + 1 }) })
247
+ children: /* @__PURE__ */ e(oe, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "XSmall", children: n + 1 }) })
248
248
  }
249
249
  ),
250
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
251
- /* @__PURE__ */ i(b, { children: [
250
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
251
+ /* @__PURE__ */ r(f, { children: [
252
252
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
253
- /* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p : L(
254
- s.goal_projection,
255
- re(
256
- J(t.projected_to_complete_at || 0),
257
- ie.MONTH_SHORT_YEAR
253
+ /* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p : B(
254
+ i.goal_projection,
255
+ ae(
256
+ Q(t.projected_to_complete_at || 0),
257
+ re.MONTH_SHORT_YEAR
258
258
  )
259
259
  ) })
260
260
  ] }),
261
261
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
262
262
  ] }) })
263
263
  ] }) });
264
- }, Gt = ({ goal: t }) => {
264
+ }, vt = ({ goal: t }) => {
265
265
  const { goals: n } = C();
266
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
267
- /* @__PURE__ */ e(V, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
268
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
269
- /* @__PURE__ */ i(b, { children: [
266
+ return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
267
+ /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
268
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
269
+ /* @__PURE__ */ r(f, { children: [
270
270
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
271
- /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
271
+ /* @__PURE__ */ e(A, { variant: "XSmall", children: B(
272
272
  n.completed_label,
273
- re(
274
- J(t.completed_at || 0),
275
- ie.MONTH_SHORT_YEAR
273
+ ae(
274
+ Q(t.completed_at || 0),
275
+ re.MONTH_SHORT_YEAR
276
276
  )
277
277
  ) })
278
278
  ] }),
279
279
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
280
280
  ] }) })
281
281
  ] }) }, t.guid);
282
- }, Nt = ({ trackType: t }) => {
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
- ), [h, g] = y.useState(!1);
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
- /* @__PURE__ */ e(he, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => g(!0), children: r }),
282
+ }, It = ({ trackType: t }) => {
283
+ const { goals: n, common: i } = C(), { orderedGoals: s } = I(), p = s.filter((u) => u.track_type === t), a = p.filter(
284
+ (u) => u.track_type === d.SAVINGS_TRACK && !u.has_been_spent || u.track_type !== d.SAVINGS_TRACK && !u.is_complete
285
+ ), _ = p.filter(
286
+ (u) => u.track_type === d.SAVINGS_TRACK && u.has_been_spent || u.track_type !== d.SAVINGS_TRACK && u.is_complete
287
+ ), [g, l] = y.useState(!1);
288
+ let h = n.manage_saving_goals, o = n.manage_saving_drawer_title, m = n.manage_saving_title, c = n.manage_saving_description;
289
+ return t === d.DEBT_TRACK ? (h = n.manage_debt_goals, o = n.manage_debt_drawer_title, m = n.manage_debt_title, c = n.manage_debt_description) : t === d.RETIREMENT_TRACK && (h = n.manage_retirement_goals, o = n.manage_retirement_drawer_title, m = n.manage_retirement_title, c = n.manage_retirement_description), /* @__PURE__ */ r(f, { children: [
290
+ /* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => l(!0), children: h }),
291
291
  /* @__PURE__ */ e(
292
- F,
292
+ j,
293
293
  {
294
- ariaLabelClose: s.close_aria,
295
- isOpen: h,
296
- onClose: () => g(!1),
294
+ ariaLabelClose: i.close_aria,
295
+ isOpen: g,
296
+ onClose: () => l(!1),
297
297
  title: o,
298
- children: /* @__PURE__ */ i(b, { children: [
299
- /* @__PURE__ */ i(b, { m: 24, children: [
300
- /* @__PURE__ */ e(He, { children: _ }),
301
- /* @__PURE__ */ e(P, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: d })
298
+ children: /* @__PURE__ */ r(f, { children: [
299
+ /* @__PURE__ */ r(f, { m: 24, children: [
300
+ /* @__PURE__ */ e(ze, { children: m }),
301
+ /* @__PURE__ */ e(W, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: c })
302
302
  ] }),
303
- /* @__PURE__ */ e(xt, { trackType: t }),
303
+ /* @__PURE__ */ e(Rt, { trackType: t }),
304
304
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
305
- /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
306
- a.map((c, f) => {
307
- const T = f >= a.length - 1;
308
- return /* @__PURE__ */ i(b, { children: [
309
- /* @__PURE__ */ e(It, { goal: c, index: f }),
305
+ /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
306
+ a.map((u, b) => {
307
+ const T = b >= a.length - 1;
308
+ return /* @__PURE__ */ r(f, { children: [
309
+ /* @__PURE__ */ e(xt, { goal: u, index: b }),
310
310
  /* @__PURE__ */ e(
311
311
  E,
312
312
  {
313
- variant: T && t === m.RETIREMENT_TRACK ? "fullWidth" : "inset"
313
+ variant: T && t === d.RETIREMENT_TRACK ? "fullWidth" : "inset"
314
314
  }
315
315
  )
316
- ] }, `ongoing-${c.guid}`);
316
+ ] }, `ongoing-${u.guid}`);
317
317
  }),
318
- t !== m.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { children: [
319
- /* @__PURE__ */ e(vt, { goals: a }),
318
+ t !== d.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { children: [
319
+ /* @__PURE__ */ e(Et, { goals: a }),
320
320
  /* @__PURE__ */ e(E, {})
321
321
  ] })
322
322
  ] }),
323
- t !== m.RETIREMENT_TRACK && u.length > 0 && /* @__PURE__ */ i(b, { children: [
323
+ t !== d.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ r(f, { 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: u.map((c, f) => {
326
- const T = f > a.length - 1;
327
- return /* @__PURE__ */ i(b, { children: [
328
- /* @__PURE__ */ e(Gt, { goal: c }),
325
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((u, b) => {
326
+ const T = b > a.length - 1;
327
+ return /* @__PURE__ */ r(f, { children: [
328
+ /* @__PURE__ */ e(vt, { goal: u }),
329
329
  /* @__PURE__ */ e(E, { variant: T ? "fullWidth" : "inset" })
330
- ] }, `complete-${c.guid}`);
330
+ ] }, `complete-${u.guid}`);
331
331
  }) })
332
332
  ] })
333
333
  ] })
334
334
  }
335
335
  )
336
336
  ] });
337
- }, me = D(({ trackType: t, onAddGoals: n }) => {
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;
343
- return /* @__PURE__ */ i(b, { mt: 16, mx: s ? 24 : 0, children: [
344
- /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
345
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: l.ongoing_title }),
346
- /* @__PURE__ */ e(Nt, { trackType: t })
337
+ }, de = D(({ trackType: t, onAddGoals: n }) => {
338
+ const { isMobile: i } = he(), { goals: s } = C(), { orderedGoals: p, setSelectedGoal: a } = I(), _ = p.filter((o) => o.track_type === t), g = _.filter(
339
+ (o) => o.track_type === d.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== d.SAVINGS_TRACK && !o.is_complete
340
+ ), l = _.filter(
341
+ (o) => o.track_type === d.SAVINGS_TRACK && o.has_been_spent || o.track_type !== d.SAVINGS_TRACK && o.is_complete
342
+ ), h = t === d.DEBT_TRACK ? s.zero_state_complete_debt : s.zero_state_complete_savings;
343
+ return /* @__PURE__ */ r(f, { mt: 16, mx: i ? 24 : 0, children: [
344
+ /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
345
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.ongoing_title }),
346
+ /* @__PURE__ */ e(It, { trackType: t })
347
347
  ] }),
348
- h.length > 0 ? /* @__PURE__ */ e(be, { container: !0, spacing: 24, children: h.map((o, _, d) => (
348
+ g.length > 0 ? /* @__PURE__ */ e(ge, { container: !0, spacing: 24, children: g.map((o, m, c) => (
349
349
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
350
- /* @__PURE__ */ e(be, { xs: s || _ === 0 && d.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => a(o) }, o.guid) }, _)
351
- )) }) : /* @__PURE__ */ i(
352
- b,
350
+ /* @__PURE__ */ e(ge, { xs: i || m === 0 && c.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Me, { goal: o, onClick: () => a(o) }, o.guid) }, m)
351
+ )) }) : /* @__PURE__ */ r(
352
+ f,
353
353
  {
354
354
  alignItems: "center",
355
355
  bgcolor: "background.default",
@@ -359,7 +359,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
359
359
  py: 18,
360
360
  children: [
361
361
  /* @__PURE__ */ e(
362
- P,
362
+ W,
363
363
  {
364
364
  sx: (o) => ({
365
365
  color: "text.secondary",
@@ -369,17 +369,17 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
369
369
  width: { sm: 381 }
370
370
  }),
371
371
  variant: "Small",
372
- children: Pe(t, l)
372
+ children: We(t, s)
373
373
  }
374
374
  ),
375
- /* @__PURE__ */ e(he, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: l.add_goals_button })
375
+ /* @__PURE__ */ e(pe, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: s.add_goals_button })
376
376
  ]
377
377
  }
378
378
  ),
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(
382
- P,
379
+ t !== d.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { gap: 16, mt: 48, children: [
380
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.complete_title }),
381
+ l.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
382
+ W,
383
383
  {
384
384
  sx: (o) => ({
385
385
  color: "text.secondary",
@@ -389,98 +389,98 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
389
389
  }
390
390
  }),
391
391
  variant: "Small",
392
- children: r
392
+ children: h
393
393
  }
394
394
  ) }),
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: [
396
- /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", gap: 6, children: [
397
- /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
395
+ l.map((o) => /* @__PURE__ */ e(Ae, { elevation: 2, children: /* @__PURE__ */ e(Te, { onClick: () => a(o), children: /* @__PURE__ */ e(Ce, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
396
+ /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", gap: 6, children: [
397
+ /* @__PURE__ */ e(He, { color: "success", fill: !0, name: "check_circle", size: 20 }),
398
398
  /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
399
399
  ] }),
400
400
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(o.amount, "0,0.00") })
401
401
  ] }) }) }) }, o.guid))
402
402
  ] })
403
403
  ] });
404
- }), kt = ({ goalType: t, onClick: n }) => {
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;
406
- return /* @__PURE__ */ e(b, { children: /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
407
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(
404
+ }), Gt = ({ goalType: t, onClick: n }) => {
405
+ const { goals: i } = C(), { bgcolor: s, icon: p, label: a, description: _, subTypes: g, type: l } = t, [h, o] = y.useState(!1), m = g.length > 0;
406
+ return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
407
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(
408
408
  k,
409
409
  {
410
- onClick: _ ? () => o(!r) : () => n(
411
- g === m.RETIREMENT_TRACK ? s.retirement : "",
412
- g === m.RETIREMENT_TRACK ? q.RETIREMENT : q.OTHER,
413
- g
410
+ onClick: m ? () => o(!h) : () => n(
411
+ l === d.RETIREMENT_TRACK ? i.retirement : "",
412
+ l === d.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
413
+ l
414
414
  ),
415
415
  children: [
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, {}))
416
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: s }, variant: "rounded", children: /* @__PURE__ */ e(be, { name: p, sx: { color: "grey.900" } }) }) }),
417
+ /* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
418
+ !m && /* @__PURE__ */ e(M, {}),
419
+ m && (h ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ e(Ze, {}))
420
420
  ]
421
421
  }
422
422
  ) }),
423
423
  /* @__PURE__ */ e(E, { variant: "inset" }),
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 }) }),
424
+ m && /* @__PURE__ */ e(tt, { in: h, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: g.map((c, u) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ r(k, { onClick: () => n(c.label, c.metaType, l), children: [
425
+ /* @__PURE__ */ e(nt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(be, { name: c.icon }) }),
426
426
  /* @__PURE__ */ e(
427
427
  w,
428
428
  {
429
- primary: d.label,
429
+ primary: c.label,
430
430
  primaryTypographyProps: { variant: "Body" }
431
431
  }
432
432
  ),
433
433
  /* @__PURE__ */ e(M, {})
434
- ] }) }, c)) }) })
434
+ ] }) }, u)) }) })
435
435
  ] }) });
436
436
  }, Be = ({
437
437
  accounts: t,
438
438
  isOpen: n,
439
- onClose: s,
440
- onSave: l,
439
+ onClose: i,
440
+ onSave: s,
441
441
  title: p
442
442
  }) => {
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);
443
+ const { goals: a, common: _ } = C(), { config: g } = ve(), [l, h] = y.useState([]), o = (m) => {
444
+ const c = l.findIndex((b) => b.guid === m.guid), u = [...l];
445
+ c >= 0 ? u.splice(c, 1) : u.push(m), h(u);
446
446
  };
447
- return /* @__PURE__ */ i(
448
- F,
447
+ return /* @__PURE__ */ r(
448
+ j,
449
449
  {
450
- ariaLabelClose: u.close_aria,
450
+ ariaLabelClose: _.close_aria,
451
451
  isOpen: n,
452
- onClose: s,
453
- onPrimaryAction: () => l(g),
452
+ onClose: i,
453
+ onPrimaryAction: () => s(l),
454
454
  title: p,
455
455
  children: [
456
- /* @__PURE__ */ e(P, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
457
- /* @__PURE__ */ i(B, { sx: { bgcolor: "background.white" }, children: [
456
+ /* @__PURE__ */ e(W, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
457
+ /* @__PURE__ */ r(L, { sx: { bgcolor: "background.white" }, children: [
458
458
  /* @__PURE__ */ e(E, { variant: "fullWidth" }),
459
- t.map((_, d) => /* @__PURE__ */ i(y.Fragment, { children: [
460
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(_), children: [
461
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
462
- oe,
459
+ t.map((m, c) => /* @__PURE__ */ r(y.Fragment, { children: [
460
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(m), children: [
461
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
462
+ ne,
463
463
  {
464
- alt: _?.name || "",
465
- institutionGuid: _?.institution_guid || ""
464
+ alt: m?.name || "",
465
+ institutionGuid: m?.institution_guid || ""
466
466
  }
467
467
  ) }),
468
468
  /* @__PURE__ */ e(
469
469
  w,
470
470
  {
471
- primary: De(_, {
472
- allowNickname: h?.show_account_nicknames_in_master
471
+ primary: we(m, {
472
+ allowNickname: g?.show_account_nicknames_in_master
473
473
  }),
474
- secondary: x(_.balance || 0, "0,0.00")
474
+ secondary: x(m.balance || 0, "0,0.00")
475
475
  }
476
476
  ),
477
- /* @__PURE__ */ e(rt, { checked: g.some((c) => c.guid === _.guid) })
477
+ /* @__PURE__ */ e(ot, { checked: l.some((u) => u.guid === m.guid) })
478
478
  ] }) }),
479
- /* @__PURE__ */ e(E, { variant: d < t.length - 1 ? "inset" : "fullWidth" })
480
- ] }, _.guid))
479
+ /* @__PURE__ */ e(E, { variant: c < t.length - 1 ? "inset" : "fullWidth" })
480
+ ] }, m.guid))
481
481
  ] }),
482
482
  /* @__PURE__ */ e(
483
- Ae,
483
+ ye,
484
484
  {
485
485
  description: a.connect_description,
486
486
  label: a.connect_button,
@@ -490,58 +490,58 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
490
490
  ]
491
491
  }
492
492
  );
493
- }, wt = ({ onClose: t }) => {
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({
493
+ }, Nt = ({ onClose: t }) => {
494
+ const { goals: n } = C(), { addGoal: i, debtGoals: s, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = ve(), { visibleDebtAccounts: g } = V(), [l, h] = y.useState(!1), o = Pe(n), m = (u, b, T) => {
495
+ T === d.DEBT_TRACK ? h(!0) : a({
496
496
  amount: 0,
497
497
  current_amount: 0,
498
- goal_type: ue.SAVE_AMOUNT,
498
+ goal_type: me.SAVE_AMOUNT,
499
499
  initial_amount: 0,
500
- meta_type: f,
501
- name: c,
500
+ meta_type: b,
501
+ name: u,
502
502
  track_type: T
503
503
  });
504
- }, d = async (c) => {
505
- for (const f of c) {
506
- let T = q.CREDIT_CARD;
507
- f.account_type === ye.LOAN ? T = q.LOANS : f.account_type === ye.LINE_OF_CREDIT && (T = q.LINE_OF_CREDIT), await s({
508
- account_guid: f.guid,
504
+ }, c = async (u) => {
505
+ for (const b of u) {
506
+ let T = J.CREDIT_CARD;
507
+ b.account_type === fe.LOAN ? T = J.LOANS : b.account_type === fe.LINE_OF_CREDIT && (T = J.LINE_OF_CREDIT), await i({
508
+ account_guid: b.guid,
509
509
  amount: 0,
510
510
  current_amount: 0,
511
- goal_type: ue.KEEP_BALANCE_BELOW,
512
- initial_amount: f.balance || 0,
513
- interest_rate: f.interest_rate || 0,
511
+ goal_type: me.KEEP_BALANCE_BELOW,
512
+ initial_amount: b.balance || 0,
513
+ interest_rate: b.interest_rate || 0,
514
514
  meta_type: T,
515
- monthly_payment: f.minimum_payment || 0,
516
- name: De(f, {
517
- allowNickname: u?.show_account_nicknames_in_master
515
+ monthly_payment: b.minimum_payment || 0,
516
+ name: we(b, {
517
+ allowNickname: _?.show_account_nicknames_in_master
518
518
  }),
519
- track_type: m.DEBT_TRACK
519
+ track_type: d.DEBT_TRACK
520
520
  }), p(n.alert_goal_added);
521
521
  }
522
- r(!1), t?.(m.DEBT_TRACK);
522
+ h(!1), t?.(d.DEBT_TRACK);
523
523
  };
524
- return /* @__PURE__ */ i(b, { children: [
525
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: o.map((c, f) => /* @__PURE__ */ e(kt, { goalType: c, onClick: _ }, f)) }),
524
+ return /* @__PURE__ */ r(f, { children: [
525
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((u, b) => /* @__PURE__ */ e(Gt, { goalType: u, onClick: m }, b)) }),
526
526
  /* @__PURE__ */ e(
527
527
  Be,
528
528
  {
529
- accounts: h.filter((c) => !l.find((f) => f.account_guid === c.guid)),
530
- isOpen: g,
531
- onClose: () => r(!1),
532
- onSave: d,
529
+ accounts: g.filter((u) => !s.find((b) => b.account_guid === u.guid)),
530
+ isOpen: l,
531
+ onClose: () => h(!1),
532
+ onSave: c,
533
533
  title: n.select_debt_accounts_title
534
534
  }
535
535
  )
536
536
  ] });
537
- }, Oe = ({ account: t }) => {
538
- const { accounts: n } = C(), s = ct(t), { setSelectedAccount: l } = it(), [p, a] = y.useState(!1);
539
- return /* @__PURE__ */ i(N, { sx: { bgcolor: "background.paper" }, children: [
540
- /* @__PURE__ */ i(k, { onClick: () => {
541
- l(t), a(!0);
537
+ }, Le = ({ account: t }) => {
538
+ const { accounts: n } = C(), i = st(t), { setSelectedAccount: s } = at(), [p, a] = y.useState(!1);
539
+ return /* @__PURE__ */ r(N, { sx: { bgcolor: "background.paper" }, children: [
540
+ /* @__PURE__ */ r(k, { onClick: () => {
541
+ s(t), a(!0);
542
542
  }, children: [
543
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
544
- oe,
543
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
544
+ ne,
545
545
  {
546
546
  alt: t.name || "",
547
547
  institutionGuid: t.institution_guid || ""
@@ -550,114 +550,114 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
550
550
  /* @__PURE__ */ e(
551
551
  w,
552
552
  {
553
- primary: s,
553
+ primary: i,
554
554
  secondary: x(t.balance || 0, "0,0.00")
555
555
  }
556
556
  ),
557
557
  /* @__PURE__ */ e(M, {})
558
558
  ] }),
559
- /* @__PURE__ */ e(F, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ i(b, { children: [
560
- /* @__PURE__ */ e(st, {}),
561
- /* @__PURE__ */ e(lt, {})
559
+ /* @__PURE__ */ e(j, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ r(f, { children: [
560
+ /* @__PURE__ */ e(rt, {}),
561
+ /* @__PURE__ */ e(it, {})
562
562
  ] }) })
563
563
  ] });
564
- }, Dt = D(({ goal: t }) => {
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 () => {
566
- const d = { ...t, amount: a };
567
- t.amount = a, h ? l(d) : (await p(d), s(n.alert_goal_updated_amount));
568
- }, _ = () => {
564
+ }, kt = D(({ goal: t }) => {
565
+ const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.amount), g = !t.guid, l = a < 0 || a > 9999999999e-2, h = t.track_type === d.SAVINGS_TRACK && t.has_been_spent || t.track_type !== d.SAVINGS_TRACK && t.is_complete, o = async () => {
566
+ const c = { ...t, amount: a };
567
+ t.amount = a, g ? s(c) : (await p(c), i(n.alert_goal_updated_amount));
568
+ }, m = () => {
569
569
  setTimeout(() => {
570
- u(t.amount);
570
+ _(t.amount);
571
571
  }, 250);
572
572
  };
573
573
  return /* @__PURE__ */ e(
574
- Q,
574
+ ee,
575
575
  {
576
- isDisabled: r,
577
- isSaveDisabled: g,
576
+ isDisabled: h,
577
+ isSaveDisabled: l,
578
578
  label: n.details_amount_to_save,
579
- onCancel: _,
579
+ onCancel: m,
580
580
  onSave: o,
581
581
  primaryText: n.details_amount_to_save,
582
582
  secondaryText: x(t.amount, "0,0"),
583
- zeroStateText: h && t.amount === 0 ? n.add_amount : void 0,
583
+ zeroStateText: g && t.amount === 0 ? n.add_amount : void 0,
584
584
  children: /* @__PURE__ */ e(
585
- we,
585
+ ke,
586
586
  {
587
587
  amount: a,
588
588
  autoFocus: !0,
589
- error: g,
589
+ error: l,
590
590
  fullWidth: !0,
591
591
  minAmount: 0,
592
- setAmount: (d) => u(isNaN(Number(d)) ? a : Number(d)),
592
+ setAmount: (c) => _(isNaN(Number(c)) ? a : Number(c)),
593
593
  sx: { ".MuiTypography-Body": { p: 0 } }
594
594
  }
595
595
  )
596
596
  }
597
597
  );
598
- }), Kt = ({ goal: t }) => {
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);
598
+ }), wt = ({ goal: t }) => {
599
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = V(), { accounts: s, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: g } = I(), l = !t.guid, [h, o] = y.useState(!1), m = async ({ balance: c, guid: u }) => {
600
+ const b = { ...t, account_guid: u, current_amount: c || 0 };
601
+ l ? _(b) : (await g(b), a(p.alert_account_changed)), o(!1);
602
602
  };
603
- return /* @__PURE__ */ i(b, { 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: [
605
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
606
- /* @__PURE__ */ e(ve, { filled: !0 }),
603
+ return /* @__PURE__ */ r(f, { children: [
604
+ l && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => o(!0), children: [
605
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
606
+ /* @__PURE__ */ e(xe, { filled: !0 }),
607
607
  p.details_add_account
608
608
  ] }) }),
609
609
  /* @__PURE__ */ e(M, { color: "primary" })
610
- ] }) }) : /* @__PURE__ */ i(b, { sx: { gap: 8, my: 24, mx: 24 }, children: [
611
- /* @__PURE__ */ e(he, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
610
+ ] }) }) : /* @__PURE__ */ r(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
611
+ /* @__PURE__ */ e(pe, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
612
612
  /* @__PURE__ */ e(
613
613
  A,
614
614
  {
615
615
  color: "text.secondary",
616
616
  sx: { textAlign: "center", whiteSpace: "wrap" },
617
617
  variant: "Paragraph",
618
- children: L(p.details_change_account_description, t.name)
618
+ children: B(p.details_change_account_description, t.name)
619
619
  }
620
620
  )
621
621
  ] }),
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: [
625
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
626
- oe,
622
+ /* @__PURE__ */ e(j, { isOpen: h, onClose: () => o(!1), title: p.details_change_account, children: /* @__PURE__ */ r(f, { children: [
623
+ n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[1] }),
624
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => m(c), children: [
625
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
626
+ ne,
627
627
  {
628
- alt: d?.name || "",
629
- institutionGuid: d?.institution_guid || ""
628
+ alt: c?.name || "",
629
+ institutionGuid: c?.institution_guid || ""
630
630
  }
631
631
  ) }),
632
632
  /* @__PURE__ */ e(
633
633
  w,
634
634
  {
635
- primary: d?.name || d?.feed_name,
636
- secondary: x(d?.balance || 0, "0,0.00")
635
+ primary: c?.name || c?.feed_name,
636
+ secondary: x(c?.balance || 0, "0,0.00")
637
637
  }
638
638
  ),
639
639
  /* @__PURE__ */ e(M, {})
640
- ] }) }, d.guid)) }),
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: [
643
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
644
- oe,
640
+ ] }) }, c.guid)) }),
641
+ i.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[2] }),
642
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: i.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => m(c), children: [
643
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
644
+ ne,
645
645
  {
646
- alt: d?.name || "",
647
- institutionGuid: d?.institution_guid || ""
646
+ alt: c?.name || "",
647
+ institutionGuid: c?.institution_guid || ""
648
648
  }
649
649
  ) }),
650
650
  /* @__PURE__ */ e(
651
651
  w,
652
652
  {
653
- primary: d?.name || d?.feed_name,
654
- secondary: x(d?.balance || 0, "0,0.00")
653
+ primary: c?.name || c?.feed_name,
654
+ secondary: x(c?.balance || 0, "0,0.00")
655
655
  }
656
656
  ),
657
657
  /* @__PURE__ */ e(M, {})
658
- ] }) }, d.guid)) }),
658
+ ] }) }, c.guid)) }),
659
659
  /* @__PURE__ */ e(
660
- Ae,
660
+ ye,
661
661
  {
662
662
  description: p.connect_description,
663
663
  label: p.connect_button,
@@ -666,133 +666,133 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
666
666
  )
667
667
  ] }) })
668
668
  ] });
669
- }, Mt = D(({ goal: t }) => {
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));
669
+ }, Dt = D(({ goal: t }) => {
670
+ const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.name), g = !t.guid, l = t.track_type === d.SAVINGS_TRACK && t.has_been_spent || t.track_type !== d.SAVINGS_TRACK && t.is_complete, h = async () => {
671
+ const m = { ...t, name: a };
672
+ t.name = a, g ? s(m) : (await p(m), i(n.alert_goal_updated_name));
673
673
  }, o = () => {
674
674
  setTimeout(() => {
675
- u(t.name);
675
+ _(t.name);
676
676
  }, 250);
677
677
  };
678
678
  return /* @__PURE__ */ e(
679
- Q,
679
+ ee,
680
680
  {
681
- isDisabled: g,
681
+ isDisabled: l,
682
682
  isSaveDisabled: !a,
683
683
  label: n.details_goal_name,
684
684
  onCancel: o,
685
- onSave: r,
685
+ onSave: h,
686
686
  primaryText: n.details_goal_name,
687
687
  secondaryText: t.name,
688
688
  children: /* @__PURE__ */ e(
689
- Ke,
689
+ De,
690
690
  {
691
691
  error: !a,
692
692
  fullWidth: !0,
693
693
  label: n.details_goal_name,
694
- onChange: (_) => u(_.target.value),
694
+ onChange: (m) => _(m.target.value),
695
695
  value: a
696
696
  }
697
697
  )
698
698
  }
699
699
  );
700
- }), Lt = ({ goal: t }) => {
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 () => {
700
+ }), Kt = ({ goal: t }) => {
701
+ const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), g = !t.guid, l = async () => {
702
702
  if (!isNaN(a)) {
703
- const _ = { ...t, retirement_age: a };
704
- t.retirement_age = a, h ? l(_) : (await p(_), s(n.alert_goal_updated_retirement_age));
703
+ const m = { ...t, retirement_age: a };
704
+ t.retirement_age = a, g ? s(m) : (await p(m), i(n.alert_goal_updated_retirement_age));
705
705
  }
706
- }, r = () => {
706
+ }, h = () => {
707
707
  setTimeout(() => {
708
- u(t.retirement_age || 65);
708
+ _(t.retirement_age || 65);
709
709
  }, 250);
710
710
  }, o = !a || isNaN(a) || a < 20 || a >= 100;
711
711
  return /* @__PURE__ */ e(
712
- Q,
712
+ ee,
713
713
  {
714
714
  isDisabled: t.is_complete,
715
715
  isSaveDisabled: o,
716
716
  label: n.details_retirement_age,
717
- onCancel: r,
718
- onSave: g,
717
+ onCancel: h,
718
+ onSave: l,
719
719
  primaryText: n.details_retirement_age,
720
720
  secondaryText: `${t.retirement_age}`,
721
- zeroStateText: h && !t.retirement_age ? n.add_age : void 0,
721
+ zeroStateText: g && !t.retirement_age ? n.add_age : void 0,
722
722
  children: /* @__PURE__ */ e(
723
- Ke,
723
+ De,
724
724
  {
725
725
  error: o,
726
726
  fullWidth: !0,
727
727
  label: n.details_retirement_age,
728
- onChange: (_) => u(Number(_.target.value)),
728
+ onChange: (m) => _(Number(m.target.value)),
729
729
  value: isNaN(a) ? "" : a
730
730
  }
731
731
  )
732
732
  }
733
733
  );
734
- }, Bt = D(({ goal: t }) => {
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));
734
+ }, Mt = D(({ goal: t }) => {
735
+ const { goals: n } = C(), { user: i, updateUser: s } = Ie(), { setAlert: p } = I(), [a, _] = y.useState(Q(i.birthday ?? 0)), [g, l] = y.useState(null), h = t.is_complete, o = async () => {
736
+ a && ut(a) && (await s({ ...i, birthday: mt(a) }), p(n.alert_goal_updated_birthday));
737
737
  };
738
738
  return /* @__PURE__ */ e(
739
- Q,
739
+ ee,
740
740
  {
741
- isDisabled: r,
742
- isSaveDisabled: !!h,
741
+ isDisabled: h,
742
+ isSaveDisabled: !!g,
743
743
  label: n.details_birthday,
744
744
  onSave: o,
745
745
  primaryText: n.details_birthday,
746
- secondaryText: `${re(J(s.birthday ?? 0), ie.MONTH_DAY_YEAR)}`,
747
- zeroStateText: !t.guid && !s.birthday ? n.add_birthday : void 0,
748
- children: /* @__PURE__ */ e(bt, { dateAdapter: ht, children: /* @__PURE__ */ e(
749
- gt,
746
+ secondaryText: `${ae(Q(i.birthday ?? 0), re.MONTH_DAY_YEAR)}`,
747
+ zeroStateText: !t.guid && !i.birthday ? n.add_birthday : void 0,
748
+ children: /* @__PURE__ */ e(ht, { dateAdapter: _t, children: /* @__PURE__ */ e(
749
+ pt,
750
750
  {
751
751
  label: n.details_birthday,
752
- onChange: u,
753
- onError: (_) => g(_),
752
+ onChange: _,
753
+ onError: (m) => l(m),
754
754
  sx: { width: "100%" },
755
755
  value: a
756
756
  }
757
757
  ) })
758
758
  }
759
759
  );
760
- }), Ot = ({ goal: t }) => {
761
- const { goals: n } = C(), { visibleRetirementAccounts: s } = j(), {
762
- addRetirementGoalAccount: l,
760
+ }), Bt = ({ goal: t }) => {
761
+ const { goals: n } = C(), { visibleRetirementAccounts: i } = V(), {
762
+ addRetirementGoalAccount: s,
763
763
  newRetirementGoalAccounts: p,
764
764
  retirementGoalAccounts: a,
765
- selectedGoal: u,
766
- setAlert: h,
767
- setNewRetirementGoalAccounts: g,
768
- setSelectedGoal: r
769
- } = I(), [o, _] = y.useState(!1), d = !t.guid, c = s.filter(
770
- (S) => d ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
771
- ), f = s.filter(
765
+ selectedGoal: _,
766
+ setAlert: g,
767
+ setNewRetirementGoalAccounts: l,
768
+ setSelectedGoal: h
769
+ } = I(), [o, m] = y.useState(!1), c = !t.guid, u = i.filter(
770
+ (S) => c ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
771
+ ), b = i.filter(
772
772
  (S) => !a.find((R) => R.account_guid === S.guid)
773
773
  ), T = async (S) => {
774
774
  const R = S.map((v) => ({
775
775
  account_guid: v.guid,
776
776
  retirement_goal_guid: t.guid
777
777
  }));
778
- if (d)
779
- g(R);
778
+ if (c)
779
+ l(R);
780
780
  else
781
781
  for (const v of R)
782
- await l(v), h(n.alert_account_added);
783
- r({
784
- ...u,
785
- current_amount: S.reduce((v, K) => v + (K.balance || 0), 0)
786
- }), _(!1);
782
+ await s(v), g(n.alert_account_added);
783
+ h({
784
+ ..._,
785
+ current_amount: S.reduce((v, F) => v + (F.balance || 0), 0)
786
+ }), m(!1);
787
787
  };
788
- return /* @__PURE__ */ i(b, { children: [
789
- c.map((S) => /* @__PURE__ */ i(b, { children: [
790
- /* @__PURE__ */ e(Oe, { account: S }),
788
+ return /* @__PURE__ */ r(f, { children: [
789
+ u.map((S) => /* @__PURE__ */ r(f, { children: [
790
+ /* @__PURE__ */ e(Le, { account: S }),
791
791
  /* @__PURE__ */ e(E, {})
792
792
  ] }, S.guid)),
793
- /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => _(!0), children: [
794
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
795
- /* @__PURE__ */ e(ve, { filled: !0 }),
793
+ /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => m(!0), children: [
794
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
795
+ /* @__PURE__ */ e(xe, { filled: !0 }),
796
796
  n.details_add_account
797
797
  ] }) }),
798
798
  /* @__PURE__ */ e(M, { color: "primary" })
@@ -800,213 +800,211 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
800
800
  /* @__PURE__ */ e(
801
801
  Be,
802
802
  {
803
- accounts: f,
803
+ accounts: b,
804
804
  isOpen: o,
805
- onClose: () => _(!1),
805
+ onClose: () => m(!1),
806
806
  onSave: T,
807
807
  title: n.add_select_accounts
808
808
  }
809
809
  )
810
810
  ] });
811
- }, Wt = D(({ goal: t }) => {
812
- const { goals: n } = C(), { visibleAccounts: s } = j(), l = y.useMemo(
813
- () => s.find((u) => u.guid === t.account_guid),
814
- [s, t]
811
+ }, Lt = D(({ goal: t }) => {
812
+ const { goals: n } = C(), { visibleAccounts: i } = V(), s = y.useMemo(
813
+ () => i.find((_) => _.guid === t.account_guid),
814
+ [i, t]
815
815
  ), p = t.track_type;
816
816
  let a = n.details_save_title;
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: [
818
- /* @__PURE__ */ i(b, { mx: 24, children: [
817
+ return t.track_type === d.DEBT_TRACK ? a = n.details_debt_title : t.track_type === d.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ r(f, { children: [
818
+ /* @__PURE__ */ r(f, { mx: 24, children: [
819
819
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
820
- /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
820
+ /* @__PURE__ */ e(Me, { goal: t, isInDrawer: !0 }),
821
821
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
822
822
  ] }),
823
- /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
824
- /* @__PURE__ */ e(Mt, { goal: t }),
823
+ /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
824
+ /* @__PURE__ */ e(Dt, { goal: t }),
825
825
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
826
- (p === m.SAVINGS_TRACK || p === m.RETIREMENT_TRACK) && /* @__PURE__ */ i(U, { children: [
827
- /* @__PURE__ */ e(Dt, { goal: t }),
828
- /* @__PURE__ */ e(E, { sx: { ml: p === m.RETIREMENT_TRACK ? 24 : 0 } })
826
+ (p === d.SAVINGS_TRACK || p === d.RETIREMENT_TRACK) && /* @__PURE__ */ r(U, { children: [
827
+ /* @__PURE__ */ e(kt, { goal: t }),
828
+ /* @__PURE__ */ e(E, { sx: { ml: p === d.RETIREMENT_TRACK ? 24 : 0 } })
829
829
  ] }),
830
- t.track_type === m.DEBT_TRACK && /* @__PURE__ */ i(U, { children: [
831
- /* @__PURE__ */ e(dt, { goal: t }),
830
+ t.track_type === d.DEBT_TRACK && /* @__PURE__ */ r(U, { children: [
831
+ /* @__PURE__ */ e(lt, { goal: t }),
832
832
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
833
- /* @__PURE__ */ e(mt, { goal: t }),
833
+ /* @__PURE__ */ e(ct, { goal: t }),
834
834
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
835
- /* @__PURE__ */ e(ut, { goal: t }),
835
+ /* @__PURE__ */ e(dt, { goal: t }),
836
836
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
837
837
  ] }),
838
- t.track_type === m.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
839
- /* @__PURE__ */ e(Lt, { goal: t }),
838
+ t.track_type === d.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
839
+ /* @__PURE__ */ e(Kt, { goal: t }),
840
840
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
841
- /* @__PURE__ */ e(Bt, { goal: t }),
841
+ /* @__PURE__ */ e(Mt, { goal: t }),
842
842
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
843
843
  ] })
844
844
  ] }),
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 }),
845
+ /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === d.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
846
+ t.track_type !== d.RETIREMENT_TRACK && s && /* @__PURE__ */ r(U, { children: [
847
+ /* @__PURE__ */ e(Le, { account: s }),
848
848
  /* @__PURE__ */ e(E, {})
849
849
  ] }),
850
- t.track_type === m.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
851
- /* @__PURE__ */ e(Ot, { goal: t }),
850
+ t.track_type === d.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
851
+ /* @__PURE__ */ e(Bt, { goal: t }),
852
852
  /* @__PURE__ */ e(E, {})
853
853
  ] }),
854
- t.track_type === m.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Kt, { goal: t })
854
+ t.track_type === d.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(wt, { goal: t })
855
855
  ] });
856
- }), Pt = D(({ onClose: t }) => {
857
- const { visibleRetirementAccounts: n } = j(), { goals: s, common: l } = C(), {
856
+ }), Ot = D(({ onClose: t }) => {
857
+ const { visibleRetirementAccounts: n } = V(), { goals: i, common: s } = C(), {
858
858
  addGoal: p,
859
859
  addRetirementGoal: a,
860
- deleteGoal: u,
861
- deleteRetirementGoal: h,
862
- newRetirementGoalAccounts: g,
863
- retirementGoalAccounts: r,
860
+ deleteGoal: _,
861
+ deleteRetirementGoal: g,
862
+ newRetirementGoalAccounts: l,
863
+ retirementGoalAccounts: h,
864
864
  selectedGoal: o,
865
- setAlert: _,
866
- setSelectedGoal: d,
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(() => {
869
- const G = R ? g : r;
870
- return n.filter((H) => G.some(($) => $.account_guid === H.guid));
871
- }, [R, n, g, r]), se = y.useMemo(() => {
865
+ setAlert: m,
866
+ setSelectedGoal: c,
867
+ updateGoal: u
868
+ } = I(), { user: b } = Ie(), [T, S] = y.useState(!1), R = !o?.guid, v = o?.track_type === d.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, F = y.useMemo(() => {
869
+ const G = R ? l : h;
870
+ return n.filter(($) => G.some((K) => K.account_guid === $.guid));
871
+ }, [R, n, l, h]), Z = y.useMemo(() => {
872
872
  if (!o) return !1;
873
873
  if (!R && !v) return !0;
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);
879
- const ee = async () => {
874
+ const { account_guid: G, track_type: $, name: K, amount: q, retirement_age: O } = o;
875
+ return $ === d.SAVINGS_TRACK ? G ? !!K && !!q : !1 : $ === d.RETIREMENT_TRACK ? F.length ? !!K && !!q && !!O && !!b.birthday : !1 : !0;
876
+ }, [o, F, b.birthday]);
877
+ let z = s.delete_button, H = () => S(!0);
878
+ R ? (H = () => te(), z = s.save_button) : v && (H = () => se(), z = i.mark_as_complete_button);
879
+ const te = async () => {
880
880
  if (o) {
881
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);
882
+ G !== d.RETIREMENT_TRACK ? await p(o) : G === d.RETIREMENT_TRACK && await a({ ...o, target_amount: o.amount }), m(i.alert_goal_added), c(void 0), G && t?.(G);
883
883
  }
884
- }, te = async () => {
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));
886
- }, le = async () => {
884
+ }, ie = async () => {
885
+ o && (o.track_type !== d.RETIREMENT_TRACK ? await _(o.guid) : o.track_type === d.RETIREMENT_TRACK && await g(o), m(i.alert_goal_deleted), c(void 0));
886
+ }, se = async () => {
887
887
  const G = {
888
888
  ...o,
889
889
  has_been_spent: !0
890
890
  };
891
- await c(G), _(s.alert_goal_completed), d(void 0);
891
+ await u(G), m(i.alert_goal_completed), c(void 0);
892
892
  };
893
- return /* @__PURE__ */ i(b, { children: [
893
+ return /* @__PURE__ */ r(f, { children: [
894
894
  /* @__PURE__ */ e(
895
- F,
895
+ j,
896
896
  {
897
- ariaLabelClose: l.close_aria,
897
+ ariaLabelClose: s.close_aria,
898
898
  hasSecondaryAction: R,
899
899
  isOpen: !!o,
900
- isPrimaryDisabled: !se,
901
- onClose: () => d(void 0),
902
- onPrimaryAction: z,
900
+ isPrimaryDisabled: !Z,
901
+ onClose: () => c(void 0),
902
+ onPrimaryAction: H,
903
903
  primaryColor: R || v ? "primary" : "error",
904
- primaryText: W,
904
+ primaryText: z,
905
905
  secondaryColor: "primary",
906
- title: s.goal_details,
907
- children: o && /* @__PURE__ */ e(Wt, { goal: o })
906
+ title: i.goal_details,
907
+ children: o && /* @__PURE__ */ e(Lt, { goal: o })
908
908
  }
909
909
  ),
910
910
  /* @__PURE__ */ e(
911
- nt,
911
+ et,
912
912
  {
913
- copy: { close_aria: l.close_aria, title: s.delete_goal },
913
+ copy: { close_aria: s.close_aria, title: i.delete_goal },
914
914
  isOpen: T,
915
915
  maxWidth: "xs",
916
916
  onClose: () => S(!1),
917
- onPrimaryAction: te,
917
+ onPrimaryAction: ie,
918
918
  primaryColor: "error",
919
- primaryText: l.delete_button,
920
- children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(s.delete_description, o?.name || "") })
919
+ primaryText: s.delete_button,
920
+ children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: B(i.delete_description, o?.name || "") })
921
921
  }
922
922
  )
923
923
  ] });
924
- }), Xn = D(({ onBackClick: t, sx: n }) => {
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(
926
- p ? r.tab_subtitle_mobile : r.tab_subtitle,
924
+ }), Hn = D(({ onBackClick: t, sx: n }) => {
925
+ const { onEvent: i } = Ge(), { isMobile: s } = he(), { visibleAccounts: p } = V(), { isCopyLoaded: a, isInitialized: _, setSelectedAccounts: g } = Ne(), { goals: l, common: h } = C(), { alert: o, goals: m, goalsLoaded: c, loadGoals: u, monthlyCashFlowProfile: b, setAlert: T, retirmentGoals: S } = I(), [R, v] = y.useState(0), [F, Z] = y.useState(!1), z = b?.amount_allocated_for_savings_goals || 0, H = b?.amount_allocated_for_debt_goals || 0, te = b?.amount_allocated_for_retirement_goals || 0, ie = a ? B(
926
+ s ? l.tab_subtitle_mobile : l.tab_subtitle,
927
927
  x(z, "0,0")
928
- ) : "", G = u ? L(
929
- p ? r.tab_subtitle_mobile : r.tab_subtitle,
930
- x(ee, "0,0")
931
- ) : "", H = u ? L(
932
- p ? r.tab_subtitle_mobile : r.tab_subtitle,
928
+ ) : "", se = a ? B(
929
+ s ? l.tab_subtitle_mobile : l.tab_subtitle,
930
+ x(H, "0,0")
931
+ ) : "", G = a ? B(
932
+ s ? l.tab_subtitle_mobile : l.tab_subtitle,
933
933
  x(te, "0,0")
934
934
  ) : "";
935
935
  y.useEffect(() => {
936
- g(a), s(Y.GOALS_VIEW);
936
+ g(p), i(Y.GOALS_VIEW);
937
937
  }, []), y.useEffect(() => {
938
- h && f().finally(() => {
939
- l?.("GoalsWidget");
940
- });
941
- }, [h, z, ee, te]);
938
+ _ && u().finally();
939
+ }, [_, z, H, te]);
942
940
  const $ = () => {
943
- s(Y.GOALS_CLICK_FILTER);
944
- }, O = () => {
945
- W(!0), s(Y.GOALS_CLICK_ADD);
946
- }, ne = (X) => {
947
- W(!1), X === m.SAVINGS_TRACK ? K(0) : X === m.DEBT_TRACK ? K(1) : X === m.RETIREMENT_TRACK && K(2);
948
- }, Z = y.useMemo(
949
- () => c && (d.length === 0 || d.every(({ track_type: X }) => !X) && R.length === 0),
950
- [d, c, R]
941
+ i(Y.GOALS_CLICK_FILTER);
942
+ }, K = () => {
943
+ Z(!0), i(Y.GOALS_CLICK_ADD);
944
+ }, q = (X) => {
945
+ Z(!1), X === d.SAVINGS_TRACK ? v(0) : X === d.DEBT_TRACK ? v(1) : X === d.RETIREMENT_TRACK && v(2);
946
+ }, O = y.useMemo(
947
+ () => c && (m.length === 0 || m.every(({ track_type: X }) => !X) && S.length === 0),
948
+ [m, c, S]
951
949
  );
952
- return !c || !u || !h ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ i(
953
- ft,
950
+ return !c || !a || !_ ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ r(
951
+ gt,
954
952
  {
955
- accountOptions: a,
953
+ accountOptions: p,
956
954
  actions: [
957
955
  {
958
956
  iconName: "add",
959
- label: r.add_title,
960
- onClick: O
957
+ label: l.add_title,
958
+ onClick: K
961
959
  }
962
960
  ],
963
961
  onAccountsFilterClick: $,
964
962
  onBackClick: t,
965
963
  sx: n,
966
- title: r.title,
964
+ title: l.title,
967
965
  children: [
968
- /* @__PURE__ */ i(b, { mx: p ? 0 : 48, my: 24, children: [
969
- /* @__PURE__ */ i(
970
- ze,
966
+ /* @__PURE__ */ r(f, { mx: s ? 0 : 48, my: 24, children: [
967
+ /* @__PURE__ */ r(
968
+ Fe,
971
969
  {
972
- onChange: (X, We) => K(We),
970
+ onChange: (X, Oe) => v(Oe),
973
971
  sx: { bgcolor: "background.paper" },
974
972
  textColor: "primary",
975
- value: Z ? !1 : v,
973
+ value: O ? !1 : R,
976
974
  variant: "fullWidth",
977
975
  children: [
978
976
  /* @__PURE__ */ e(
979
- ce,
977
+ le,
980
978
  {
981
- disabled: Z,
982
- label: /* @__PURE__ */ e(de, { subtitle: le, title: r.tab_saving_title })
979
+ disabled: O,
980
+ label: /* @__PURE__ */ e(ce, { subtitle: ie, title: l.tab_saving_title })
983
981
  }
984
982
  ),
985
983
  /* @__PURE__ */ e(
986
- ce,
984
+ le,
987
985
  {
988
- disabled: Z,
989
- label: /* @__PURE__ */ e(de, { subtitle: G, title: r.tab_debt_title })
986
+ disabled: O,
987
+ label: /* @__PURE__ */ e(ce, { subtitle: se, title: l.tab_debt_title })
990
988
  }
991
989
  ),
992
990
  /* @__PURE__ */ e(
993
- ce,
991
+ le,
994
992
  {
995
- disabled: Z,
996
- label: /* @__PURE__ */ e(de, { subtitle: H, title: r.tab_retirement_title })
993
+ disabled: O,
994
+ label: /* @__PURE__ */ e(ce, { subtitle: G, title: l.tab_retirement_title })
997
995
  }
998
996
  )
999
997
  ]
1000
998
  }
1001
999
  ),
1002
- Z ? /* @__PURE__ */ e(
1003
- yt,
1000
+ O ? /* @__PURE__ */ e(
1001
+ bt,
1004
1002
  {
1005
- header: r.create_goals_header,
1003
+ header: l.create_goals_header,
1006
1004
  icon: "trophy",
1007
- onClick: O,
1008
- primaryButton: r.add_goals_button,
1009
- subText: r.empty_state_subheader,
1005
+ onClick: K,
1006
+ primaryButton: l.add_goals_button,
1007
+ subText: l.empty_state_subheader,
1010
1008
  sx: {
1011
1009
  width: { sm: 432 },
1012
1010
  ".buttons-footer": {
@@ -1014,67 +1012,67 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1014
1012
  }
1015
1013
  }
1016
1014
  }
1017
- ) : /* @__PURE__ */ i(U, { children: [
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 })
1015
+ ) : /* @__PURE__ */ r(U, { children: [
1016
+ R === 0 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.SAVINGS_TRACK }),
1017
+ R === 1 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.DEBT_TRACK }),
1018
+ R === 2 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.RETIREMENT_TRACK })
1021
1019
  ] })
1022
1020
  ] }),
1023
- /* @__PURE__ */ e(Pt, { onClose: ne }),
1021
+ /* @__PURE__ */ e(Ot, { onClose: q }),
1024
1022
  /* @__PURE__ */ e(
1025
- F,
1023
+ j,
1026
1024
  {
1027
- ariaLabelClose: o.close_aria,
1028
- isOpen: se,
1029
- onClose: () => W(!1),
1030
- title: r.add_goal_title,
1031
- children: /* @__PURE__ */ e(wt, { onClose: ne })
1025
+ ariaLabelClose: h.close_aria,
1026
+ isOpen: F,
1027
+ onClose: () => Z(!1),
1028
+ title: l.add_goal_title,
1029
+ children: /* @__PURE__ */ e(Nt, { onClose: q })
1032
1030
  }
1033
1031
  ),
1034
- /* @__PURE__ */ e(Fe, { onClose: () => S(""), open: !!_, children: /* @__PURE__ */ e(je, { onClose: () => S(""), severity: "success", variant: "filled", children: _ }) })
1032
+ /* @__PURE__ */ e(je, { onClose: () => T(""), open: !!o, children: /* @__PURE__ */ e(Ve, { onClose: () => T(""), severity: "success", variant: "filled", children: o }) })
1035
1033
  ]
1036
1034
  }
1037
1035
  );
1038
- }), Vt = D(({ goal: t }) => {
1039
- const { goals: n } = C(), s = Ct(), {
1040
- backgroundColor: l,
1036
+ }), Wt = D(({ goal: t }) => {
1037
+ const { goals: n } = C(), i = At(), {
1038
+ backgroundColor: s,
1041
1039
  color: p,
1042
1040
  percentage: a,
1043
- projectedText: u
1044
- } = _e(n, t), h = Math.round(a * 100);
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 }),
1048
- /* @__PURE__ */ i(Tt, { sx: { width: "100%" }, children: [
1049
- /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1050
- t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: u })
1041
+ projectedText: _
1042
+ } = ue(n, t), g = Math.round(a * 100);
1043
+ let l = /* @__PURE__ */ e(Se, {});
1044
+ return t.track_type === d.DEBT_TRACK ? l = /* @__PURE__ */ e(Re, {}) : t.track_type === d.RETIREMENT_TRACK && (l = /* @__PURE__ */ e(Ee, {})), /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1045
+ /* @__PURE__ */ e(oe, { sx: { bgcolor: s, color: p, height: 32, width: 32 }, variant: "rounded", children: l }),
1046
+ /* @__PURE__ */ r(yt, { sx: { width: "100%" }, children: [
1047
+ /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1048
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
1051
1049
  ] }),
1052
1050
  /* @__PURE__ */ e(
1053
- St,
1051
+ Tt,
1054
1052
  {
1055
- backgroundStrokeColor: s.palette.border.lighter,
1056
- color: s.palette.primary.main,
1057
- percent: h,
1053
+ backgroundStrokeColor: i.palette.border.lighter,
1054
+ color: i.palette.primary.main,
1055
+ percent: g,
1058
1056
  size: 40,
1059
1057
  strokeWidth: 3,
1060
- children: /* @__PURE__ */ e(P, { fontWeight: 700, variant: "caption", children: `${h}%` })
1058
+ children: /* @__PURE__ */ e(W, { fontWeight: 700, variant: "caption", children: `${g}%` })
1061
1059
  }
1062
1060
  )
1063
1061
  ] });
1064
- }), jt = ({ header: t, subText: n, sx: s }) => /* @__PURE__ */ i(
1065
- b,
1062
+ }), Pt = ({ header: t, subText: n, sx: i }) => /* @__PURE__ */ r(
1063
+ f,
1066
1064
  {
1067
1065
  sx: {
1068
1066
  alignItems: "center",
1069
1067
  alignSelf: "center",
1070
1068
  px: 24,
1071
- ...s
1069
+ ...i
1072
1070
  },
1073
1071
  children: [
1074
- /* @__PURE__ */ e(Je, { size: 32 }),
1075
- /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, children: t }),
1072
+ /* @__PURE__ */ e(qe, { size: 32 }),
1073
+ /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, children: t }),
1076
1074
  /* @__PURE__ */ e(
1077
- P,
1075
+ W,
1078
1076
  {
1079
1077
  color: "text.secondary",
1080
1078
  sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
@@ -1084,46 +1082,46 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1084
1082
  )
1085
1083
  ]
1086
1084
  }
1087
- ), Un = D(({ onCTAClick: t }) => {
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();
1085
+ ), $n = D(({ onCTAClick: t }) => {
1086
+ const { visibleAccounts: n } = V(), { onEvent: i } = Ge(), { goals: s } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = Ne(), { ongoingGoalsForMicroWidget: g, loadGoals: l, goalsLoaded: h } = I();
1089
1087
  y.useEffect(() => {
1090
1088
  a(n);
1091
1089
  }, []), y.useEffect(() => {
1092
- p && (g().finally(), s(Y.GOALS_LOAD_WIDGET, {
1090
+ p && (l().finally(), i(Y.GOALS_LOAD_WIDGET, {
1093
1091
  state: n?.length ? "default" : "zeroState"
1094
1092
  }));
1095
1093
  }, [p]);
1096
1094
  const o = y.useMemo(
1097
- () => r && h.length === 0,
1098
- [h, r]
1099
- ), _ = () => {
1100
- s(
1095
+ () => h && g.length === 0,
1096
+ [g, h]
1097
+ ), m = () => {
1098
+ i(
1101
1099
  o ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1102
1100
  ), t();
1103
1101
  };
1104
- return !r || !u || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1105
- Rt,
1102
+ return !h || !_ || !p ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ e(
1103
+ Ct,
1106
1104
  {
1107
1105
  className: "mx-goals-microwidget",
1108
- ctaLabel: o ? l.get_started : l.view_details,
1109
- onCTAClick: _,
1110
- title: l.title,
1106
+ ctaLabel: o ? s.get_started : s.view_details,
1107
+ onCTAClick: m,
1108
+ title: s.title,
1111
1109
  children: o ? /* @__PURE__ */ e(
1112
- jt,
1110
+ Pt,
1113
1111
  {
1114
- header: l.create_goals_header,
1115
- subText: l.micro_zero_state_description
1112
+ header: s.create_goals_header,
1113
+ subText: s.micro_zero_state_description
1116
1114
  }
1117
- ) : /* @__PURE__ */ e(At, { sx: { justifyContent: "space-between" }, children: h.map((d, c) => /* @__PURE__ */ i(y.Fragment, { children: [
1118
- /* @__PURE__ */ e(Vt, { goal: d }),
1119
- c !== h.length - 1 && /* @__PURE__ */ e(E, {})
1120
- ] }, d.guid)) })
1115
+ ) : /* @__PURE__ */ e(ft, { sx: { justifyContent: "space-between" }, children: g.map((c, u) => /* @__PURE__ */ r(y.Fragment, { children: [
1116
+ /* @__PURE__ */ e(Wt, { goal: c }),
1117
+ u !== g.length - 1 && /* @__PURE__ */ e(E, {})
1118
+ ] }, c.guid)) })
1121
1119
  }
1122
1120
  );
1123
1121
  });
1124
1122
  export {
1125
- qn as GoalApi,
1126
- Jn as GoalStore,
1127
- Un as GoalsMicroWidget,
1128
- Xn as GoalsWidget
1123
+ Yn as GoalApi,
1124
+ Zn as GoalStore,
1125
+ $n as GoalsMicroWidget,
1126
+ Hn as GoalsWidget
1129
1127
  };