@mx-cartographer/experiences 7.0.8 → 7.0.9

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