@mx-cartographer/experiences 7.12.16 → 7.13.0

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 (54) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{AccountDetailsHeader-DkBNsLsI.mjs → AccountDetailsHeader-D9gbTbUt.mjs} +31 -31
  3. package/dist/{AccountFields-DeZSQOuM.mjs → AccountFields-CxqONzjY.mjs} +7 -7
  4. package/dist/AccountListItem-LcJVJysf.mjs +90 -0
  5. package/dist/{AccountStore-Brc0MNSF.mjs → AccountStore-BNlTuxWN.mjs} +12 -6
  6. package/dist/Accounts-o7ohkngR.mjs +27 -0
  7. package/dist/{BudgetUtil--_QXyszn.mjs → BudgetUtil-CLhRnCoX.mjs} +75 -75
  8. package/dist/{CashflowStore-DEdQJU5i.mjs → CashflowStore-D3MKniVM.mjs} +11 -11
  9. package/dist/{CategorySelectorDrawer-wfUTIbLR.mjs → CategorySelectorDrawer-DYHNBd2v.mjs} +31 -31
  10. package/dist/{ConnectDrawer-CioFo6Wy.mjs → ConnectDrawer-C0wjwcJt.mjs} +1 -1
  11. package/dist/{ConnectionsDrawer-DqhSaMrJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +1 -1
  12. package/dist/{Drawer-DV4NTsFg.mjs → Drawer-Bbe4AMB1.mjs} +5 -5
  13. package/dist/{GoalStore-0bd-Upkc.mjs → GoalStore-DB58sKTC.mjs} +8 -8
  14. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  15. package/dist/{Help-CDu1Fvrc.mjs → Help-CpLfyvPv.mjs} +24 -24
  16. package/dist/{LineChart-B1qbKR8q.mjs → LineChart-DBSlRSEm.mjs} +102 -102
  17. package/dist/{ManageIncome-BnWWjP2g.mjs → ManageIncome-QvqN555q.mjs} +62 -62
  18. package/dist/{MiniWidgetContainer-Cu72GNsE.mjs → MiniWidgetContainer-xLWSV6Wz.mjs} +13 -13
  19. package/dist/{NetWorthStore-DP78lgZ0.mjs → NetWorthStore-BqZ44-4M.mjs} +1 -1
  20. package/dist/{NotificationSettings-BH2yOwTB.mjs → NotificationSettings-DU3vJh5J.mjs} +139 -139
  21. package/dist/{OriginalBalanceAction-BM6rT_Cn.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +6 -6
  22. package/dist/{RecurringSettings-BmXtfHtK.mjs → RecurringSettings-DdOcok2e.mjs} +2 -2
  23. package/dist/{RecurringTransactions-CYNpe_RS.mjs → RecurringTransactions-BOzBqfdg.mjs} +11 -11
  24. package/dist/{RecurringTransactionsStore-BD-OfVZ-.mjs → RecurringTransactionsStore-CcfPS0d3.mjs} +1 -1
  25. package/dist/{SpendingLegend-Bq6aXMNh.mjs → SpendingLegend-CJjjTGBw.mjs} +76 -76
  26. package/dist/{StatusIndicator-BV3oFzxo.mjs → StatusIndicator-CIKUOoN_.mjs} +53 -53
  27. package/dist/{TransactionDetails-DYlTwSDt.mjs → TransactionDetails-BpcWeXNU.mjs} +350 -350
  28. package/dist/{WidgetContainer-B0ncgABX.mjs → WidgetContainer-D_iaToWJ.mjs} +12 -12
  29. package/dist/accounts/index.es.js +107 -107
  30. package/dist/accounts/utils/Accounts.d.ts +1 -1
  31. package/dist/analytics/index.es.js +18 -18
  32. package/dist/budgets/index.es.js +182 -182
  33. package/dist/cashflow/index.es.js +223 -223
  34. package/dist/categories/index.es.js +1 -1
  35. package/dist/common/index.es.js +54 -64
  36. package/dist/dashboard/index.es.js +9 -9
  37. package/dist/debts/index.es.js +469 -469
  38. package/dist/finstrong/index.es.js +68 -68
  39. package/dist/goals/index.es.js +437 -437
  40. package/dist/help/index.es.js +2 -2
  41. package/dist/insights/index.es.js +159 -159
  42. package/dist/investments/index.es.js +292 -292
  43. package/dist/merchants/index.es.js +12 -12
  44. package/dist/networth/index.es.js +175 -168
  45. package/dist/notifications/index.es.js +13 -13
  46. package/dist/recurringtransactions/index.es.js +69 -69
  47. package/dist/settings/index.es.js +187 -187
  48. package/dist/spending/index.es.js +58 -58
  49. package/dist/transactions/index.es.js +70 -70
  50. package/dist/trends/index.es.js +15 -15
  51. package/package.json +1 -1
  52. package/dist/AccountListItem-BIVhda6q.mjs +0 -90
  53. package/dist/Accounts-M-LTzStv.mjs +0 -27
  54. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
@@ -1,88 +1,88 @@
1
- import { g as de, T as i, G as le, a as Ve, M as Y, C as Ae, b as Pe } from "../GoalStore-0bd-Upkc.mjs";
2
- import { c as Hn, d as Un } from "../GoalStore-0bd-Upkc.mjs";
3
- import { jsxs as l, jsx as e, Fragment as $ } from "react/jsx-runtime";
1
+ import { g as de, T as r, G as ce, a as Ve, M as Z, C as Ae, b as ze } from "../GoalStore-DB58sKTC.mjs";
2
+ import { c as Un, d as Yn } from "../GoalStore-DB58sKTC.mjs";
3
+ import { jsxs as c, jsx as e, Fragment as $ } from "react/jsx-runtime";
4
4
  import T from "react";
5
5
  import { observer as D } from "mobx-react-lite";
6
- import ze from "@mui/material/Alert";
6
+ import Pe from "@mui/material/Alert";
7
7
  import je from "@mui/material/Snackbar";
8
8
  import f from "@mui/material/Stack";
9
- import re from "@mui/material/Tab";
9
+ import ie from "@mui/material/Tab";
10
10
  import Fe from "@mui/material/Tabs";
11
- import { Text as C, H3 as ce, P as Z, Icon as $e, InstitutionLogo as te, H2 as Te } from "@mxenabled/mxui";
11
+ import { Text as C, H3 as le, P as q, Icon as $e, InstitutionLogo as te, H2 as Te } from "@mxenabled/mxui";
12
12
  import me from "@mui/material/Button";
13
13
  import Ce from "@mui/material/Card";
14
- import Se from "@mui/material/CardActionArea";
15
- import Re from "@mui/material/CardContent";
16
- import ge from "@mui/material/Unstable_Grid2";
17
- import ae from "@mui/material/Avatar";
18
- import Xe from "@mui/material/CardHeader";
19
- import { Payments as xe, NoteStack as Ee, Person as ve, ArrowUpwardAlt as He, CheckCircle as Ue, ChevronRight as V, Icon as fe, ExpandLess as Ye, ExpandMore as Ze, AddBox as Ie, Trophy as qe } from "@mxenabled/mx-icons";
20
- import { u as S, k as G, b as _e, a as ue, d as z, o as Ge, g as Ne } from "../hooks-BxkfR-Ff.mjs";
14
+ import Re from "@mui/material/CardActionArea";
15
+ import xe from "@mui/material/CardContent";
16
+ import ye from "@mui/material/Unstable_Grid2";
17
+ import oe from "@mui/material/Avatar";
18
+ import He from "@mui/material/CardHeader";
19
+ import { Payments as Se, NoteStack as Ee, Person as ve, ArrowUpwardAlt as Ue, CheckCircle as Ye, ChevronRight as V, Icon as fe, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
20
+ import { u as R, k as G, b as ue, a as _e, d as P, o as Ge, g as Ne } from "../hooks-BxkfR-Ff.mjs";
21
21
  import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { f as I } from "../NumberFormatting-QCaNwbjv.mjs";
23
- import { S as Je } from "../StatusBar-BK_uYHAB.mjs";
23
+ import { S as Qe } from "../StatusBar-BK_uYHAB.mjs";
24
24
  import v from "@mui/material/Divider";
25
25
  import L from "@mui/material/List";
26
- import { L as q } from "../ListItemAction-4KB7P75M.mjs";
26
+ import { L as J } from "../ListItemAction-4KB7P75M.mjs";
27
27
  import { C as ke } from "../CurrencyInput-DuMktPu3.mjs";
28
28
  import { fromUnixTime as ne } from "date-fns/fromUnixTime";
29
- import Qe from "@mui/material/IconButton";
29
+ import Xe from "@mui/material/IconButton";
30
30
  import k from "@mui/material/ListItem";
31
- import P from "@mui/material/ListItemAvatar";
31
+ import z from "@mui/material/ListItemAvatar";
32
32
  import M from "@mui/material/ListItemButton";
33
33
  import w from "@mui/material/ListItemText";
34
- import { b as O } from "../Localization-CPkpIwIx.mjs";
34
+ import { b as B } from "../Localization-CPkpIwIx.mjs";
35
35
  import { f as he, D as be } from "../DateFormats-BMpMrZpW.mjs";
36
- import { D as J } from "../Drawer-DV4NTsFg.mjs";
36
+ import { D as Q } from "../Drawer-Bbe4AMB1.mjs";
37
37
  import { g as we } from "../AccountDisplayName-CO7z3v99.mjs";
38
38
  import et from "@mui/material/Collapse";
39
39
  import tt from "@mui/material/ListItemIcon";
40
40
  import nt from "@mui/material/Checkbox";
41
- import { A as ye } from "../Account-BiB1F8lL.mjs";
42
- import { u as at } from "../useAccountDisplayName-DKwT1mWv.mjs";
41
+ import { A as ge } from "../Account-BiB1F8lL.mjs";
42
+ import { u as ot } from "../useAccountDisplayName-DKwT1mWv.mjs";
43
43
  import De from "@mui/material/TextField";
44
- import { M as ot, I as rt, O as it } from "../OriginalBalanceAction-BM6rT_Cn.mjs";
44
+ import { M as at, I as it, O as rt } from "../OriginalBalanceAction-DjpvVVFz.mjs";
45
45
  import { getUnixTime as st } from "date-fns/getUnixTime";
46
- import { isValid as lt } from "date-fns/isValid";
47
- import { AdapterDateFns as ct } from "@mui/x-date-pickers/AdapterDateFnsV3";
46
+ import { isValid as ct } from "date-fns/isValid";
47
+ import { AdapterDateFns as lt } from "@mui/x-date-pickers/AdapterDateFnsV3";
48
48
  import { DatePicker as dt } from "@mui/x-date-pickers";
49
49
  import { LocalizationProvider as mt } from "@mui/x-date-pickers/LocalizationProvider";
50
- import { D as _t } from "../Dialog-Ck34yr-d.mjs";
50
+ import { D as ut } from "../Dialog-Ck34yr-d.mjs";
51
51
  import { u as Ke } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
52
- import { A as X } from "../Analytics-BYItVAe-.mjs";
52
+ import { A as H } from "../Analytics-BYItVAe-.mjs";
53
53
  import { L as Me } from "../Loader-D3rjKx72.mjs";
54
- import { W as ut } from "../WidgetContainer-B0ncgABX.mjs";
54
+ import { W as _t } from "../WidgetContainer-D_iaToWJ.mjs";
55
55
  import { E as pt } from "../EmptyState-DHAkGsjk.mjs";
56
56
  import ht from "@mui/material/Stack/Stack";
57
57
  import bt from "@mui/material/Box";
58
- import gt from "@mui/material/styles/useTheme";
58
+ import yt from "@mui/material/styles/useTheme";
59
59
  import { S as ft } from "../SingleSegmentDonut-BgbLgwHi.mjs";
60
- import { M as yt } from "../MicroWidgetContainer-B_EnfvCq.mjs";
61
- function ie({ title: t, subtitle: n }) {
62
- return /* @__PURE__ */ l(f, { children: [
63
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t }),
64
- /* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "Body", children: n })
60
+ import { M as gt } from "../MicroWidgetContainer-B_EnfvCq.mjs";
61
+ function re({ title: t, subtitle: n }) {
62
+ return /* @__PURE__ */ c(f, { children: [
63
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t }),
64
+ /* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "body1", children: n })
65
65
  ] });
66
66
  }
67
67
  const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
68
68
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
69
69
  "$1$2$3"
70
70
  ) : I(t, "0,0.00"), Le = D(
71
- ({ goal: t, isInDrawer: n = !1, onClick: _ }) => {
72
- const { goals: c } = S(), { isMobile: u, isTablet: r } = pe(), d = u || r, {
71
+ ({ goal: t, isInDrawer: n = !1, onClick: u }) => {
72
+ const { goals: l } = R(), { isMobile: _, isTablet: i } = pe(), d = _ || i, {
73
73
  backgroundColor: s,
74
74
  color: p,
75
75
  percentage: h,
76
- percentageText: o,
77
- projectedText: a
78
- } = de(c, t), b = t.track_type === i.DEBT_TRACK ? t.initial_amount : t.amount, m = [
76
+ percentageText: a,
77
+ projectedText: o
78
+ } = de(l, t), b = t.track_type === r.DEBT_TRACK ? t.initial_amount : t.amount, m = [
79
79
  {
80
80
  color: s,
81
81
  percentage: `${h}`
82
82
  }
83
83
  ];
84
- let y = /* @__PURE__ */ e(xe, {});
85
- return t.track_type === i.DEBT_TRACK ? y = /* @__PURE__ */ e(Ee, {}) : t.track_type === i.RETIREMENT_TRACK && (y = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(
84
+ let g = /* @__PURE__ */ e(Se, {});
85
+ return t.track_type === r.DEBT_TRACK ? g = /* @__PURE__ */ e(Ee, {}) : t.track_type === r.RETIREMENT_TRACK && (g = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(
86
86
  Ce,
87
87
  {
88
88
  elevation: 2,
@@ -92,11 +92,11 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
92
92
  outlineColor: "primary.main"
93
93
  }
94
94
  },
95
- children: /* @__PURE__ */ l(Se, { disabled: !_, onClick: _, children: [
95
+ children: /* @__PURE__ */ c(Re, { disabled: !u, onClick: u, children: [
96
96
  /* @__PURE__ */ e(
97
- Xe,
97
+ He,
98
98
  {
99
- avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: s, color: p, height: 48, width: 48 }, variant: "rounded", children: y }),
99
+ avatar: /* @__PURE__ */ e(oe, { sx: { bgcolor: s, color: p, height: 48, width: 48 }, variant: "rounded", children: g }),
100
100
  subheader: /* @__PURE__ */ e(
101
101
  C,
102
102
  {
@@ -123,11 +123,11 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
123
123
  )
124
124
  }
125
125
  ),
126
- /* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ l(f, { gap: 6, children: [
127
- /* @__PURE__ */ e(Je, { data: m, height: 24 }),
128
- /* @__PURE__ */ l(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
129
- /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: o }),
130
- t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: a })
126
+ /* @__PURE__ */ e(xe, { sx: { pt: 0 }, children: /* @__PURE__ */ c(f, { gap: 6, children: [
127
+ /* @__PURE__ */ e(Qe, { data: m, height: 24 }),
128
+ /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
129
+ /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: a }),
130
+ t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: o })
131
131
  ] })
132
132
  ] }) })
133
133
  ] })
@@ -135,28 +135,28 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
135
135
  );
136
136
  }
137
137
  ), Tt = D(({ trackType: t }) => {
138
- const { goals: n } = S(), { setAlert: _, monthlyCashFlowProfile: c, updateMonthlyCashFlowProfile: u } = G(), r = T.useMemo(() => {
139
- let o = 0;
140
- return t === i.SAVINGS_TRACK ? o = c?.amount_allocated_for_savings_goals || 0 : t === i.DEBT_TRACK ? o = c?.amount_allocated_for_debt_goals || 0 : t === i.RETIREMENT_TRACK && (o = c?.amount_allocated_for_retirement_goals || 0), o;
141
- }, [c]);
138
+ const { goals: n } = R(), { setAlert: u, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: _ } = G(), i = T.useMemo(() => {
139
+ let a = 0;
140
+ return t === r.SAVINGS_TRACK ? a = l?.amount_allocated_for_savings_goals || 0 : t === r.DEBT_TRACK ? a = l?.amount_allocated_for_debt_goals || 0 : t === r.RETIREMENT_TRACK && (a = l?.amount_allocated_for_retirement_goals || 0), a;
141
+ }, [l]);
142
142
  T.useEffect(() => {
143
- s(r);
144
- }, [r]);
145
- const [d, s] = T.useState(r), p = d < 0 || d > 99999999, h = async () => {
146
- if (c) {
147
- const o = { ...c };
148
- t === i.SAVINGS_TRACK ? o.amount_allocated_for_savings_goals = d : t === i.DEBT_TRACK ? o.amount_allocated_for_debt_goals = d : t === i.RETIREMENT_TRACK && (o.amount_allocated_for_retirement_goals = d), await u(o), _(n.alert_contribution_updated);
143
+ s(i);
144
+ }, [i]);
145
+ const [d, s] = T.useState(i), p = d < 0 || d > 99999999, h = async () => {
146
+ if (l) {
147
+ const a = { ...l };
148
+ t === r.SAVINGS_TRACK ? a.amount_allocated_for_savings_goals = d : t === r.DEBT_TRACK ? a.amount_allocated_for_debt_goals = d : t === r.RETIREMENT_TRACK && (a.amount_allocated_for_retirement_goals = d), await _(a), u(n.alert_contribution_updated);
149
149
  }
150
150
  };
151
151
  return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
152
- q,
152
+ J,
153
153
  {
154
154
  isSaveDisabled: !d || isNaN(d),
155
155
  label: n.contribution_label,
156
- onCancel: () => s(r),
156
+ onCancel: () => s(i),
157
157
  onSave: h,
158
158
  primaryText: n.contribution_label,
159
- secondaryText: I(r, "0,0.00"),
159
+ secondaryText: I(i, "0,0.00"),
160
160
  children: /* @__PURE__ */ e(
161
161
  ke,
162
162
  {
@@ -165,22 +165,22 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
165
165
  error: p,
166
166
  fullWidth: !0,
167
167
  minAmount: 0,
168
- setAmount: (o) => s(isNaN(Number(o)) ? d : Number(o)),
169
- sx: { ".MuiTypography-Body": { p: 0 } }
168
+ setAmount: (a) => s(isNaN(Number(a)) ? d : Number(a)),
169
+ sx: { ".MuiTypography-body1": { p: 0 } }
170
170
  }
171
171
  )
172
172
  }
173
173
  ) });
174
- }), Ct = ({ goal: t, index: n, onUpClick: _ }) => {
175
- const { goals: c } = S(), { percentage: u } = de(c, t), r = t.goal_type === le.KEEP_BALANCE_BELOW || t.has_been_spent ? c.goal_completed : O(c.goal_percentage_reached, `${u * 100}`);
176
- return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
174
+ }), Ct = ({ goal: t, index: n, onUpClick: u }) => {
175
+ const { goals: l } = R(), { percentage: _ } = de(l, t), i = t.goal_type === ce.KEEP_BALANCE_BELOW || t.has_been_spent ? l.goal_completed : B(l.goal_percentage_reached, `${_ * 100}`);
176
+ return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
177
177
  M,
178
178
  {
179
179
  disableRipple: !0,
180
180
  sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
181
181
  children: [
182
- t.track_type !== i.RETIREMENT_TRACK && /* @__PURE__ */ e(
183
- P,
182
+ t.track_type !== r.RETIREMENT_TRACK && /* @__PURE__ */ e(
183
+ z,
184
184
  {
185
185
  sx: {
186
186
  alignItems: "center",
@@ -188,38 +188,38 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
188
188
  justifyContent: "center",
189
189
  ".MuiAvatar-root": { height: "16px", width: "16px" }
190
190
  },
191
- children: t.track_type === i.SAVINGS_TRACK ? /* @__PURE__ */ e(Qe, { onClick: () => _?.(t), children: /* @__PURE__ */ e(He, { color: "primary", size: 24 }) }) : /* @__PURE__ */ e(ae, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "XSmall", children: n + 1 }) })
191
+ children: t.track_type === r.SAVINGS_TRACK ? /* @__PURE__ */ e(Xe, { onClick: () => u?.(t), children: /* @__PURE__ */ e(Ue, { color: "primary", size: 24 }) }) : /* @__PURE__ */ e(oe, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: n + 1 }) })
192
192
  }
193
193
  ),
194
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
195
- /* @__PURE__ */ l(f, { sx: { maxWidth: "70%" }, children: [
196
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.name }),
197
- /* @__PURE__ */ e(C, { variant: "XSmall", children: t.is_complete ? r : O(
198
- c.goal_projection,
194
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
195
+ /* @__PURE__ */ c(f, { sx: { maxWidth: "70%" }, children: [
196
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
197
+ /* @__PURE__ */ e(C, { variant: "caption", children: t.is_complete ? i : B(
198
+ l.goal_projection,
199
199
  he(
200
200
  ne(t.projected_to_complete_at || 0),
201
201
  be.MONTH_SHORT_YEAR
202
202
  )
203
203
  ) })
204
204
  ] }),
205
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(t.amount, "0,0.00") })
205
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: I(t.amount, "0,0.00") })
206
206
  ] }) })
207
207
  ]
208
208
  }
209
209
  ) });
210
- }, St = ({ goal: t }) => {
211
- const { goals: n } = S();
212
- return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
210
+ }, Rt = ({ goal: t }) => {
211
+ const { goals: n } = R();
212
+ return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
213
213
  M,
214
214
  {
215
215
  disableRipple: !0,
216
216
  sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
217
217
  children: [
218
- /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
219
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
220
- /* @__PURE__ */ l(f, { children: [
221
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.name }),
222
- /* @__PURE__ */ e(C, { variant: "XSmall", children: O(
218
+ /* @__PURE__ */ e(z, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
219
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
220
+ /* @__PURE__ */ c(f, { children: [
221
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
222
+ /* @__PURE__ */ e(C, { variant: "caption", children: B(
223
223
  n.completed_label,
224
224
  he(
225
225
  ne(t.completed_at || 0),
@@ -227,58 +227,58 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
227
227
  )
228
228
  ) })
229
229
  ] }),
230
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(t.amount, "0,0.00") })
230
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: I(t.amount, "0,0.00") })
231
231
  ] }) })
232
232
  ]
233
233
  }
234
234
  ) }, t.guid);
235
- }, Rt = ({ trackType: t }) => {
236
- const { goals: n, common: _ } = S(), { loadGoals: c, orderedGoals: u, reorderGoals: r } = G(), d = u.filter((g) => g.track_type === t), s = d.filter(
237
- (g) => g.track_type === i.SAVINGS_TRACK && !g.has_been_spent || g.track_type !== i.SAVINGS_TRACK && !g.is_complete
235
+ }, xt = ({ trackType: t }) => {
236
+ const { goals: n, common: u } = R(), { loadGoals: l, orderedGoals: _, reorderGoals: i } = G(), d = _.filter((y) => y.track_type === t), s = d.filter(
237
+ (y) => y.track_type === r.SAVINGS_TRACK && !y.has_been_spent || y.track_type !== r.SAVINGS_TRACK && !y.is_complete
238
238
  ), p = d.filter(
239
- (g) => g.track_type === i.SAVINGS_TRACK && g.has_been_spent || g.track_type !== i.SAVINGS_TRACK && g.is_complete
240
- ), [h, o] = T.useState(!1);
241
- let a = n.manage_saving_goals, b = n.manage_saving_drawer_title, m = n.manage_saving_title, y = n.manage_saving_description;
242
- t === i.DEBT_TRACK ? (a = n.manage_debt_goals, b = n.manage_debt_drawer_title, m = n.manage_debt_title, y = n.manage_debt_description) : t === i.RETIREMENT_TRACK && (a = n.manage_retirement_goals, b = n.manage_retirement_drawer_title, m = n.manage_retirement_title, y = n.manage_retirement_description);
243
- const R = async (g) => {
244
- const A = [...s], x = A.findIndex((K) => K.guid === g.guid);
245
- let N = x - 1;
246
- N < 0 && (N = A.length - 1), A.splice(N, 0, A.splice(x, 1)[0]);
239
+ (y) => y.track_type === r.SAVINGS_TRACK && y.has_been_spent || y.track_type !== r.SAVINGS_TRACK && y.is_complete
240
+ ), [h, a] = T.useState(!1);
241
+ let o = n.manage_saving_goals, b = n.manage_saving_drawer_title, m = n.manage_saving_title, g = n.manage_saving_description;
242
+ t === r.DEBT_TRACK ? (o = n.manage_debt_goals, b = n.manage_debt_drawer_title, m = n.manage_debt_title, g = n.manage_debt_description) : t === r.RETIREMENT_TRACK && (o = n.manage_retirement_goals, b = n.manage_retirement_drawer_title, m = n.manage_retirement_title, g = n.manage_retirement_description);
243
+ const x = async (y) => {
244
+ const A = [...s], S = A.findIndex((K) => K.guid === y.guid);
245
+ let N = S - 1;
246
+ N < 0 && (N = A.length - 1), A.splice(N, 0, A.splice(S, 1)[0]);
247
247
  for (let K = 0; K < A.length; K++)
248
248
  A[K].position = K + 1;
249
- await r(A), await c();
249
+ await i(A), await l();
250
250
  };
251
- return /* @__PURE__ */ l(f, { children: [
252
- /* @__PURE__ */ e(me, { endIcon: /* @__PURE__ */ e(V, {}), onClick: () => o(!0), children: a }),
251
+ return /* @__PURE__ */ c(f, { children: [
252
+ /* @__PURE__ */ e(me, { endIcon: /* @__PURE__ */ e(V, {}), onClick: () => a(!0), children: o }),
253
253
  /* @__PURE__ */ e(
254
- J,
254
+ Q,
255
255
  {
256
- ariaLabelClose: _.close_aria,
256
+ ariaLabelClose: u.close_aria,
257
257
  isOpen: h,
258
- onClose: () => o(!1),
258
+ onClose: () => a(!1),
259
259
  title: b,
260
- children: /* @__PURE__ */ l(f, { children: [
261
- /* @__PURE__ */ l(f, { m: 24, children: [
262
- /* @__PURE__ */ e(ce, { children: m }),
263
- /* @__PURE__ */ e(Z, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: y })
260
+ children: /* @__PURE__ */ c(f, { children: [
261
+ /* @__PURE__ */ c(f, { m: 24, children: [
262
+ /* @__PURE__ */ e(le, { children: m }),
263
+ /* @__PURE__ */ e(q, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "subtitle2", children: g })
264
264
  ] }),
265
265
  /* @__PURE__ */ e(Tt, { trackType: t }),
266
- /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
267
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((g, A) => {
268
- const x = A >= s.length - 1;
269
- return /* @__PURE__ */ l(f, { children: [
270
- /* @__PURE__ */ e(Ct, { goal: g, index: A, onUpClick: R }),
271
- /* @__PURE__ */ e(v, { variant: x ? "fullWidth" : "inset" })
272
- ] }, `ongoing-${g.guid}`);
266
+ /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.goal_priority }),
267
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((y, A) => {
268
+ const S = A >= s.length - 1;
269
+ return /* @__PURE__ */ c(f, { children: [
270
+ /* @__PURE__ */ e(Ct, { goal: y, index: A, onUpClick: x }),
271
+ /* @__PURE__ */ e(v, { variant: S ? "fullWidth" : "inset" })
272
+ ] }, `ongoing-${y.guid}`);
273
273
  }) }),
274
- t !== i.RETIREMENT_TRACK && p.length > 0 && /* @__PURE__ */ l(f, { children: [
275
- /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
276
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: p.map((g, A) => {
277
- const x = A > s.length - 1;
278
- return /* @__PURE__ */ l(f, { children: [
279
- /* @__PURE__ */ e(St, { goal: g }),
280
- /* @__PURE__ */ e(v, { variant: x ? "fullWidth" : "inset" })
281
- ] }, `complete-${g.guid}`);
274
+ t !== r.RETIREMENT_TRACK && p.length > 0 && /* @__PURE__ */ c(f, { children: [
275
+ /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.complete_title }),
276
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: p.map((y, A) => {
277
+ const S = A > s.length - 1;
278
+ return /* @__PURE__ */ c(f, { children: [
279
+ /* @__PURE__ */ e(Rt, { goal: y }),
280
+ /* @__PURE__ */ e(v, { variant: S ? "fullWidth" : "inset" })
281
+ ] }, `complete-${y.guid}`);
282
282
  }) })
283
283
  ] })
284
284
  ] })
@@ -286,22 +286,22 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
286
286
  )
287
287
  ] });
288
288
  }, se = D(({ trackType: t, onAddGoals: n }) => {
289
- const { isMobile: _ } = pe(), { goals: c } = S(), { selectedAccountGuids: u } = _e(), { orderedGoals: r, setSelectedGoal: d } = G(), s = r.filter(
290
- (a) => a.track_type === t && (a.track_type !== i.RETIREMENT_TRACK && u.includes(a.account_guid) || a.track_type === i.RETIREMENT_TRACK)
289
+ const { isMobile: u } = pe(), { goals: l } = R(), { selectedAccountGuids: _ } = ue(), { orderedGoals: i, setSelectedGoal: d } = G(), s = i.filter(
290
+ (o) => o.track_type === t && (o.track_type !== r.RETIREMENT_TRACK && _.includes(o.account_guid) || o.track_type === r.RETIREMENT_TRACK)
291
291
  ), p = s.filter(
292
- (a) => a.track_type === i.SAVINGS_TRACK && !a.has_been_spent || a.track_type !== i.SAVINGS_TRACK && !a.is_complete
292
+ (o) => o.track_type === r.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== r.SAVINGS_TRACK && !o.is_complete
293
293
  ), h = s.filter(
294
- (a) => a.track_type === i.SAVINGS_TRACK && a.has_been_spent || a.track_type !== i.SAVINGS_TRACK && a.is_complete
295
- ), o = t === i.DEBT_TRACK ? c.zero_state_complete_debt : c.zero_state_complete_savings;
296
- return /* @__PURE__ */ l(f, { mt: 16, mx: _ ? 24 : 0, children: [
297
- /* @__PURE__ */ l(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
298
- /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "Small", children: c.ongoing_title }),
299
- /* @__PURE__ */ e(Rt, { trackType: t })
294
+ (o) => o.track_type === r.SAVINGS_TRACK && o.has_been_spent || o.track_type !== r.SAVINGS_TRACK && o.is_complete
295
+ ), a = t === r.DEBT_TRACK ? l.zero_state_complete_debt : l.zero_state_complete_savings;
296
+ return /* @__PURE__ */ c(f, { mt: 16, mx: u ? 24 : 0, children: [
297
+ /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
298
+ /* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: l.ongoing_title }),
299
+ /* @__PURE__ */ e(xt, { trackType: t })
300
300
  ] }),
301
- p.length > 0 ? /* @__PURE__ */ e(ge, { container: !0, spacing: 24, children: p.map((a, b, m) => (
301
+ p.length > 0 ? /* @__PURE__ */ e(ye, { container: !0, spacing: 24, children: p.map((o, b, m) => (
302
302
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
303
- /* @__PURE__ */ e(ge, { xs: _ || b === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: a, onClick: () => d(a) }, a.guid) }, b)
304
- )) }) : /* @__PURE__ */ l(
303
+ /* @__PURE__ */ e(ye, { xs: u || b === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => d(o) }, o.guid) }, b)
304
+ )) }) : /* @__PURE__ */ c(
305
305
  f,
306
306
  {
307
307
  alignItems: "center",
@@ -312,173 +312,173 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
312
312
  py: 18,
313
313
  children: [
314
314
  /* @__PURE__ */ e(
315
- Z,
315
+ q,
316
316
  {
317
- sx: (a) => ({
317
+ sx: (o) => ({
318
318
  color: "text.secondary",
319
- [a.breakpoints.down("sm")]: {
319
+ [o.breakpoints.down("sm")]: {
320
320
  px: 10
321
321
  },
322
322
  width: { sm: 381 }
323
323
  }),
324
- variant: "Small",
325
- children: Ve(t, c)
324
+ variant: "body2",
325
+ children: Ve(t, l)
326
326
  }
327
327
  ),
328
- /* @__PURE__ */ e(me, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: c.add_goals_button })
328
+ /* @__PURE__ */ e(me, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: l.add_goals_button })
329
329
  ]
330
330
  }
331
331
  ),
332
- t !== i.RETIREMENT_TRACK && /* @__PURE__ */ l(f, { gap: 16, mt: 48, children: [
333
- /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "Small", children: c.complete_title }),
332
+ t !== r.RETIREMENT_TRACK && /* @__PURE__ */ c(f, { gap: 16, mt: 48, children: [
333
+ /* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: l.complete_title }),
334
334
  h.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
335
- Z,
335
+ q,
336
336
  {
337
- sx: (a) => ({
337
+ sx: (o) => ({
338
338
  color: "text.secondary",
339
339
  width: { sm: 393 },
340
- [a.breakpoints.down("sm")]: {
340
+ [o.breakpoints.down("sm")]: {
341
341
  px: 10
342
342
  }
343
343
  }),
344
- variant: "Small",
345
- children: o
344
+ variant: "body2",
345
+ children: a
346
346
  }
347
347
  ) }),
348
- h.map((a) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Se, { onClick: () => d(a), children: /* @__PURE__ */ e(Re, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ l(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
349
- /* @__PURE__ */ l(f, { alignItems: "center", direction: "row", gap: 6, children: [
348
+ h.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Re, { onClick: () => d(o), children: /* @__PURE__ */ e(xe, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
349
+ /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", gap: 6, children: [
350
350
  /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
351
- /* @__PURE__ */ e(C, { color: "text.secondary", variant: "Body", children: a.name })
351
+ /* @__PURE__ */ e(C, { color: "text.secondary", variant: "body1", children: o.name })
352
352
  ] }),
353
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(a.amount, "0,0.00") })
354
- ] }) }) }) }, a.guid))
353
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: I(o.amount, "0,0.00") })
354
+ ] }) }) }) }, o.guid))
355
355
  ] })
356
356
  ] });
357
- }), xt = ({ goalType: t, onClick: n }) => {
358
- const { goals: _ } = S(), { bgcolor: c, icon: u, label: r, description: d, subTypes: s, type: p } = t, [h, o] = T.useState(!1), a = s.length > 0;
359
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ l(L, { sx: { bgcolor: "background.paper" }, children: [
360
- /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
357
+ }), St = ({ goalType: t, onClick: n }) => {
358
+ const { goals: u } = R(), { bgcolor: l, icon: _, label: i, description: d, subTypes: s, type: p } = t, [h, a] = T.useState(!1), o = s.length > 0;
359
+ return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ c(L, { sx: { bgcolor: "background.paper" }, children: [
360
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
361
361
  M,
362
362
  {
363
- onClick: a ? () => o(!h) : () => n(
364
- p === i.RETIREMENT_TRACK ? _.retirement : "",
365
- p === i.RETIREMENT_TRACK ? Y.RETIREMENT : Y.OTHER,
363
+ onClick: o ? () => a(!h) : () => n(
364
+ p === r.RETIREMENT_TRACK ? u.retirement : "",
365
+ p === r.RETIREMENT_TRACK ? Z.RETIREMENT : Z.OTHER,
366
366
  p
367
367
  ),
368
368
  children: [
369
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: c }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: u, sx: { color: "grey.900" } }) }) }),
370
- /* @__PURE__ */ e(w, { primary: r, secondary: d, sx: { mr: 24 } }),
371
- !a && /* @__PURE__ */ e(V, {}),
372
- a && (h ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ e(Ze, {}))
369
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: _, sx: { color: "grey.900" } }) }) }),
370
+ /* @__PURE__ */ e(w, { primary: i, secondary: d, sx: { mr: 24 } }),
371
+ !o && /* @__PURE__ */ e(V, {}),
372
+ o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
373
373
  ]
374
374
  }
375
375
  ) }),
376
376
  /* @__PURE__ */ e(v, { variant: "inset" }),
377
- a && /* @__PURE__ */ e(et, { in: h, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: s.map((b, m) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ l(M, { onClick: () => n(b.label, b.metaType, p), children: [
377
+ o && /* @__PURE__ */ e(et, { in: h, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: s.map((b, m) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ c(M, { onClick: () => n(b.label, b.metaType, p), children: [
378
378
  /* @__PURE__ */ e(tt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: b.icon }) }),
379
379
  /* @__PURE__ */ e(
380
380
  w,
381
381
  {
382
382
  primary: b.label,
383
- primaryTypographyProps: { variant: "Body" }
383
+ primaryTypographyProps: { variant: "body1" }
384
384
  }
385
385
  ),
386
386
  /* @__PURE__ */ e(V, {})
387
387
  ] }) }, m)) }) })
388
388
  ] }) });
389
- }, Be = ({
389
+ }, Oe = ({
390
390
  accounts: t,
391
391
  isOpen: n,
392
- onClose: _,
393
- onSave: c,
394
- title: u
392
+ onClose: u,
393
+ onSave: l,
394
+ title: _
395
395
  }) => {
396
- const { goals: r, common: d } = S(), { config: s } = ue(), [p, h] = T.useState([]), o = (a) => {
397
- const b = p.findIndex((y) => y.guid === a.guid), m = [...p];
398
- b >= 0 ? m.splice(b, 1) : m.push(a), h(m);
396
+ const { goals: i, common: d } = R(), { config: s } = _e(), [p, h] = T.useState([]), a = (o) => {
397
+ const b = p.findIndex((g) => g.guid === o.guid), m = [...p];
398
+ b >= 0 ? m.splice(b, 1) : m.push(o), h(m);
399
399
  };
400
- return /* @__PURE__ */ l(
401
- J,
400
+ return /* @__PURE__ */ c(
401
+ Q,
402
402
  {
403
403
  ariaLabelClose: d.close_aria,
404
404
  isOpen: n,
405
- onClose: _,
406
- onPrimaryAction: () => c(p),
407
- title: u,
405
+ onClose: u,
406
+ onPrimaryAction: () => l(p),
407
+ title: _,
408
408
  children: [
409
- /* @__PURE__ */ l(L, { sx: { bgcolor: "background.white" }, children: [
409
+ /* @__PURE__ */ c(L, { sx: { bgcolor: "background.white" }, children: [
410
410
  /* @__PURE__ */ e(v, { variant: "fullWidth" }),
411
- t.map((a, b) => /* @__PURE__ */ l(T.Fragment, { children: [
412
- /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => o(a), children: [
413
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
411
+ t.map((o, b) => /* @__PURE__ */ c(T.Fragment, { children: [
412
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(M, { onClick: () => a(o), children: [
413
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
414
414
  te,
415
415
  {
416
- alt: a?.name || "",
417
- institutionGuid: a?.institution_guid || ""
416
+ alt: o?.name || "",
417
+ institutionGuid: o?.institution_guid || ""
418
418
  }
419
419
  ) }),
420
420
  /* @__PURE__ */ e(
421
421
  w,
422
422
  {
423
- primary: we(a, {
423
+ primary: we(o, {
424
424
  allowNickname: s?.show_account_nicknames_in_master
425
425
  }),
426
- secondary: I(a.balance || 0, "0,0.00")
426
+ secondary: I(o.balance || 0, "0,0.00")
427
427
  }
428
428
  ),
429
- /* @__PURE__ */ e(nt, { checked: p.some((m) => m.guid === a.guid) })
429
+ /* @__PURE__ */ e(nt, { checked: p.some((m) => m.guid === o.guid) })
430
430
  ] }) }),
431
431
  /* @__PURE__ */ e(v, { variant: b < t.length - 1 ? "inset" : "fullWidth" })
432
- ] }, a.guid))
432
+ ] }, o.guid))
433
433
  ] }),
434
434
  s.show_connections_widget_in_master && /* @__PURE__ */ e(
435
435
  Ae,
436
436
  {
437
- description: r.connect_description,
438
- label: r.connect_button,
439
- title: r.connect_title
437
+ description: i.connect_description,
438
+ label: i.connect_button,
439
+ title: i.connect_title
440
440
  }
441
441
  )
442
442
  ]
443
443
  }
444
444
  );
445
445
  }, Et = ({ onClose: t }) => {
446
- const { goals: n } = S(), { addGoal: _, debtGoals: c, setAlert: u, setSelectedGoal: r } = G(), { config: d } = ue(), { visibleDebtAccounts: s } = z(), [p, h] = T.useState(!1), o = Pe(n), a = (m, y, R) => {
447
- R === i.DEBT_TRACK ? h(!0) : r({
446
+ const { goals: n } = R(), { addGoal: u, debtGoals: l, setAlert: _, setSelectedGoal: i } = G(), { config: d } = _e(), { visibleDebtAccounts: s } = P(), [p, h] = T.useState(!1), a = ze(n), o = (m, g, x) => {
447
+ x === r.DEBT_TRACK ? h(!0) : i({
448
448
  amount: 0,
449
449
  current_amount: 0,
450
- goal_type: le.SAVE_AMOUNT,
450
+ goal_type: ce.SAVE_AMOUNT,
451
451
  initial_amount: 0,
452
- meta_type: y,
452
+ meta_type: g,
453
453
  name: m,
454
- track_type: R
454
+ track_type: x
455
455
  });
456
456
  }, b = async (m) => {
457
- for (const y of m) {
458
- let R = Y.CREDIT_CARD;
459
- y.account_type === ye.LOAN ? R = Y.LOANS : y.account_type === ye.LINE_OF_CREDIT && (R = Y.LINE_OF_CREDIT), await _({
460
- account_guid: y.guid,
457
+ for (const g of m) {
458
+ let x = Z.CREDIT_CARD;
459
+ g.account_type === ge.LOAN ? x = Z.LOANS : g.account_type === ge.LINE_OF_CREDIT && (x = Z.LINE_OF_CREDIT), await u({
460
+ account_guid: g.guid,
461
461
  amount: 0,
462
462
  current_amount: 0,
463
- goal_type: le.KEEP_BALANCE_BELOW,
464
- initial_amount: y.balance || 0,
465
- interest_rate: y.interest_rate || 0,
466
- meta_type: R,
467
- monthly_payment: y.minimum_payment || 0,
468
- name: we(y, {
463
+ goal_type: ce.KEEP_BALANCE_BELOW,
464
+ initial_amount: g.balance || 0,
465
+ interest_rate: g.interest_rate || 0,
466
+ meta_type: x,
467
+ monthly_payment: g.minimum_payment || 0,
468
+ name: we(g, {
469
469
  allowNickname: d?.show_account_nicknames_in_master
470
470
  }),
471
- track_type: i.DEBT_TRACK
472
- }), u(n.alert_goal_added);
471
+ track_type: r.DEBT_TRACK
472
+ }), _(n.alert_goal_added);
473
473
  }
474
- h(!1), t?.(i.DEBT_TRACK);
474
+ h(!1), t?.(r.DEBT_TRACK);
475
475
  };
476
- return /* @__PURE__ */ l(f, { children: [
477
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((m, y) => /* @__PURE__ */ e(xt, { goalType: m, onClick: a }, y)) }),
476
+ return /* @__PURE__ */ c(f, { children: [
477
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: a.map((m, g) => /* @__PURE__ */ e(St, { goalType: m, onClick: o }, g)) }),
478
478
  /* @__PURE__ */ e(
479
- Be,
479
+ Oe,
480
480
  {
481
- accounts: s.filter((m) => !c.find((y) => y.account_guid === m.guid)),
481
+ accounts: s.filter((m) => !l.find((g) => g.account_guid === m.guid)),
482
482
  isOpen: p,
483
483
  onClose: () => h(!1),
484
484
  onSave: b,
@@ -486,10 +486,10 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
486
486
  }
487
487
  )
488
488
  ] });
489
- }, Oe = ({ account: t }) => {
490
- const n = at(t);
491
- return /* @__PURE__ */ l(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
492
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
489
+ }, Be = ({ account: t }) => {
490
+ const n = ot(t);
491
+ return /* @__PURE__ */ c(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
492
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
493
493
  te,
494
494
  {
495
495
  alt: t.name || "",
@@ -505,22 +505,22 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
505
505
  )
506
506
  ] });
507
507
  }, vt = D(({ goal: t }) => {
508
- const { goals: n } = S(), { setAlert: _, setSelectedGoal: c, updateGoal: u, updateRetirementGoal: r } = G(), [d, s] = T.useState(t.amount), p = !t.guid, h = d < 0 || d > 9999999999e-2, o = t.track_type === i.SAVINGS_TRACK && t.has_been_spent || t.track_type !== i.SAVINGS_TRACK && t.is_complete, a = async () => {
508
+ const { goals: n } = R(), { setAlert: u, setSelectedGoal: l, updateGoal: _, updateRetirementGoal: i } = G(), [d, s] = T.useState(t.amount), p = !t.guid, h = d < 0 || d > 9999999999e-2, a = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, o = async () => {
509
509
  const m = { ...t, amount: d };
510
- t.amount = d, p ? c(m) : (t.track_type !== i.RETIREMENT_TRACK ? await u(m) : await r(m), _(n.alert_goal_updated_amount));
510
+ t.amount = d, p ? l(m) : (t.track_type !== r.RETIREMENT_TRACK ? await _(m) : await i(m), u(n.alert_goal_updated_amount));
511
511
  }, b = () => {
512
512
  setTimeout(() => {
513
513
  s(t.amount);
514
514
  }, 250);
515
515
  };
516
516
  return /* @__PURE__ */ e(
517
- q,
517
+ J,
518
518
  {
519
- isDisabled: o,
519
+ isDisabled: a,
520
520
  isSaveDisabled: h,
521
521
  label: n.details_amount_to_save,
522
522
  onCancel: b,
523
- onSave: a,
523
+ onSave: o,
524
524
  primaryText: n.details_amount_to_save,
525
525
  secondaryText: I(t.amount, "0,0"),
526
526
  zeroStateText: p && t.amount === 0 ? n.add_amount : void 0,
@@ -533,39 +533,39 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
533
533
  fullWidth: !0,
534
534
  minAmount: 0,
535
535
  setAmount: (m) => s(isNaN(Number(m)) ? d : Number(m)),
536
- sx: { ".MuiTypography-Body": { p: 0 } }
536
+ sx: { ".MuiTypography-body1": { p: 0 } }
537
537
  }
538
538
  )
539
539
  }
540
540
  );
541
541
  }), It = ({ goal: t }) => {
542
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: _ } = z(), { accounts: c, goals: u } = S(), { config: r } = ue(), { setAlert: d, setSelectedGoal: s, updateGoal: p } = G(), h = !t.guid, [o, a] = T.useState(!1), b = async ({ balance: m, guid: y }) => {
543
- const R = { ...t, account_guid: y, current_amount: m || 0 };
544
- h ? s(R) : (await p(R), d(u.alert_account_changed)), a(!1);
542
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = P(), { accounts: l, goals: _ } = R(), { config: i } = _e(), { setAlert: d, setSelectedGoal: s, updateGoal: p } = G(), h = !t.guid, [a, o] = T.useState(!1), b = async ({ balance: m, guid: g }) => {
543
+ const x = { ...t, account_guid: g, current_amount: m || 0 };
544
+ h ? s(x) : (await p(x), d(_.alert_account_changed)), o(!1);
545
545
  };
546
- return /* @__PURE__ */ l(f, { children: [
547
- h && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(M, { onClick: () => a(!0), children: [
548
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
546
+ return /* @__PURE__ */ c(f, { children: [
547
+ h && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(M, { onClick: () => o(!0), children: [
548
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
549
549
  /* @__PURE__ */ e(Ie, { filled: !0 }),
550
- u.details_add_account
550
+ _.details_add_account
551
551
  ] }) }),
552
552
  /* @__PURE__ */ e(V, { color: "primary" })
553
- ] }) }) : /* @__PURE__ */ l(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
554
- /* @__PURE__ */ e(me, { onClick: () => a(!0), variant: "text", children: u.details_change_account }),
553
+ ] }) }) : /* @__PURE__ */ c(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
554
+ /* @__PURE__ */ e(me, { onClick: () => o(!0), variant: "text", children: _.details_change_account }),
555
555
  /* @__PURE__ */ e(
556
556
  C,
557
557
  {
558
558
  color: "text.secondary",
559
559
  sx: { textAlign: "center", whiteSpace: "wrap" },
560
- variant: "Paragraph",
561
- children: O(u.details_change_account_description, t.name)
560
+ variant: "subtitle1",
561
+ children: B(_.details_change_account_description, t.name)
562
562
  }
563
563
  )
564
564
  ] }),
565
- /* @__PURE__ */ e(J, { isOpen: o, onClose: () => a(!1), title: u.details_change_account, children: /* @__PURE__ */ l(f, { children: [
566
- n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[1] }),
567
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((m) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => b(m), children: [
568
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
565
+ /* @__PURE__ */ e(Q, { isOpen: a, onClose: () => o(!1), title: _.details_change_account, children: /* @__PURE__ */ c(f, { children: [
566
+ n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: l.account_types[1] }),
567
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((m) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(M, { onClick: () => b(m), children: [
568
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
569
569
  te,
570
570
  {
571
571
  alt: m?.name || "",
@@ -581,9 +581,9 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
581
581
  ),
582
582
  /* @__PURE__ */ e(V, {})
583
583
  ] }) }, m.guid)) }),
584
- _.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[2] }),
585
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((m) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => b(m), children: [
586
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
584
+ u.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: l.account_types[2] }),
585
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: u.map((m) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(M, { onClick: () => b(m), children: [
586
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
587
587
  te,
588
588
  {
589
589
  alt: m?.name || "",
@@ -599,63 +599,63 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
599
599
  ),
600
600
  /* @__PURE__ */ e(V, {})
601
601
  ] }) }, m.guid)) }),
602
- r.show_connections_widget_in_master && /* @__PURE__ */ e(
602
+ i.show_connections_widget_in_master && /* @__PURE__ */ e(
603
603
  Ae,
604
604
  {
605
- description: u.connect_description,
606
- label: u.connect_button,
607
- title: u.connect_title
605
+ description: _.connect_description,
606
+ label: _.connect_button,
607
+ title: _.connect_title
608
608
  }
609
609
  )
610
610
  ] }) })
611
611
  ] });
612
612
  }, Gt = D(({ goal: t }) => {
613
- const { goals: n } = S(), { setAlert: _, setSelectedGoal: c, updateGoal: u } = G(), [r, d] = T.useState(t.name), s = !t.guid, p = t.track_type === i.SAVINGS_TRACK && t.has_been_spent || t.track_type !== i.SAVINGS_TRACK && t.is_complete, h = async () => {
614
- const a = { ...t, name: r };
615
- t.name = r, s ? c(a) : (await u(a), _(n.alert_goal_updated_name));
616
- }, o = () => {
613
+ const { goals: n } = R(), { setAlert: u, setSelectedGoal: l, updateGoal: _ } = G(), [i, d] = T.useState(t.name), s = !t.guid, p = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, h = async () => {
614
+ const o = { ...t, name: i };
615
+ t.name = i, s ? l(o) : (await _(o), u(n.alert_goal_updated_name));
616
+ }, a = () => {
617
617
  setTimeout(() => {
618
618
  d(t.name);
619
619
  }, 250);
620
620
  };
621
621
  return /* @__PURE__ */ e(
622
- q,
622
+ J,
623
623
  {
624
624
  isDisabled: p,
625
- isSaveDisabled: !r,
625
+ isSaveDisabled: !i,
626
626
  label: n.details_goal_name,
627
- onCancel: o,
627
+ onCancel: a,
628
628
  onSave: h,
629
629
  primaryText: n.details_goal_name,
630
630
  secondaryText: t.name,
631
631
  children: /* @__PURE__ */ e(
632
632
  De,
633
633
  {
634
- error: !r,
634
+ error: !i,
635
635
  fullWidth: !0,
636
636
  label: n.details_goal_name,
637
- onChange: (a) => d(a.target.value),
638
- value: r
637
+ onChange: (o) => d(o.target.value),
638
+ value: i
639
639
  }
640
640
  )
641
641
  }
642
642
  );
643
643
  }), Nt = ({ goal: t }) => {
644
- const { goals: n } = S(), { setAlert: _, setSelectedGoal: c, updateRetirementGoal: u } = G(), [r, d] = T.useState(t.retirement_age || 65), s = !t.guid, p = async () => {
645
- if (!isNaN(r)) {
646
- const a = { ...t, retirement_age: r };
647
- t.retirement_age = r, s ? c(a) : (await u(a), _(n.alert_goal_updated_retirement_age));
644
+ const { goals: n } = R(), { setAlert: u, setSelectedGoal: l, updateRetirementGoal: _ } = G(), [i, d] = T.useState(t.retirement_age || 65), s = !t.guid, p = async () => {
645
+ if (!isNaN(i)) {
646
+ const o = { ...t, retirement_age: i };
647
+ t.retirement_age = i, s ? l(o) : (await _(o), u(n.alert_goal_updated_retirement_age));
648
648
  }
649
649
  }, h = () => {
650
650
  setTimeout(() => {
651
651
  d(t.retirement_age || 65);
652
652
  }, 250);
653
- }, o = !r || isNaN(r) || r < 20 || r >= 100;
653
+ }, a = !i || isNaN(i) || i < 20 || i >= 100;
654
654
  return /* @__PURE__ */ e(
655
- q,
655
+ J,
656
656
  {
657
657
  isDisabled: t.is_complete,
658
- isSaveDisabled: o,
658
+ isSaveDisabled: a,
659
659
  label: n.details_retirement_age,
660
660
  onCancel: h,
661
661
  onSave: p,
@@ -665,109 +665,109 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
665
665
  children: /* @__PURE__ */ e(
666
666
  De,
667
667
  {
668
- error: o,
668
+ error: a,
669
669
  fullWidth: !0,
670
670
  label: n.details_retirement_age,
671
- onChange: (a) => d(Number(a.target.value)),
672
- value: isNaN(r) ? "" : r
671
+ onChange: (o) => d(Number(o.target.value)),
672
+ value: isNaN(i) ? "" : i
673
673
  }
674
674
  )
675
675
  }
676
676
  );
677
677
  }, kt = D(({ goal: t }) => {
678
- const { goals: n } = S(), { user: _, updateUser: c } = Ge(), { setAlert: u } = G(), [r, d] = T.useState(ne(_.birthday ?? 0)), [s, p] = T.useState(null), h = t.is_complete, o = async () => {
679
- r && lt(r) && (await c({ ..._, birthday: st(r) }), u(n.alert_goal_updated_birthday));
678
+ const { goals: n } = R(), { user: u, updateUser: l } = Ge(), { setAlert: _ } = G(), [i, d] = T.useState(ne(u.birthday ?? 0)), [s, p] = T.useState(null), h = t.is_complete, a = async () => {
679
+ i && ct(i) && (await l({ ...u, birthday: st(i) }), _(n.alert_goal_updated_birthday));
680
680
  };
681
681
  return /* @__PURE__ */ e(
682
- q,
682
+ J,
683
683
  {
684
684
  isDisabled: h,
685
685
  isSaveDisabled: !!s,
686
686
  label: n.details_birthday,
687
- onSave: o,
687
+ onSave: a,
688
688
  primaryText: n.details_birthday,
689
- secondaryText: `${he(ne(_.birthday ?? 0), be.MONTH_DAY_YEAR)}`,
690
- zeroStateText: !t.guid && !_.birthday ? n.add_birthday : void 0,
691
- children: /* @__PURE__ */ e(mt, { dateAdapter: ct, children: /* @__PURE__ */ e(
689
+ secondaryText: `${he(ne(u.birthday ?? 0), be.MONTH_DAY_YEAR)}`,
690
+ zeroStateText: !t.guid && !u.birthday ? n.add_birthday : void 0,
691
+ children: /* @__PURE__ */ e(mt, { dateAdapter: lt, children: /* @__PURE__ */ e(
692
692
  dt,
693
693
  {
694
694
  label: n.details_birthday,
695
695
  onChange: d,
696
- onError: (a) => p(a),
696
+ onError: (o) => p(o),
697
697
  sx: { width: "100%" },
698
- value: r
698
+ value: i
699
699
  }
700
700
  ) })
701
701
  }
702
702
  );
703
703
  }), wt = ({ goal: t }) => {
704
- const { goals: n } = S(), { visibleRetirementAccounts: _ } = z(), {
705
- addRetirementGoalAccount: c,
706
- newRetirementGoalAccounts: u,
707
- retirementGoalAccounts: r,
704
+ const { goals: n } = R(), { visibleRetirementAccounts: u } = P(), {
705
+ addRetirementGoalAccount: l,
706
+ newRetirementGoalAccounts: _,
707
+ retirementGoalAccounts: i,
708
708
  selectedGoal: d,
709
709
  setAlert: s,
710
710
  setNewRetirementGoalAccounts: p,
711
711
  setSelectedGoal: h
712
- } = G(), [o, a] = T.useState(!1), b = !t.guid, m = _.filter(
713
- (g) => b ? u.find((A) => A.account_guid === g.guid) : r.find((A) => A.account_guid === g.guid)
714
- ), y = _.filter(
715
- (g) => !r.find((A) => A.account_guid === g.guid)
716
- ), R = async (g) => {
717
- const A = g.map((x) => ({
718
- account_guid: x.guid,
712
+ } = G(), [a, o] = T.useState(!1), b = !t.guid, m = u.filter(
713
+ (y) => b ? _.find((A) => A.account_guid === y.guid) : i.find((A) => A.account_guid === y.guid)
714
+ ), g = u.filter(
715
+ (y) => !i.find((A) => A.account_guid === y.guid)
716
+ ), x = async (y) => {
717
+ const A = y.map((S) => ({
718
+ account_guid: S.guid,
719
719
  retirement_goal_guid: t.guid
720
720
  }));
721
721
  if (b)
722
722
  p(A);
723
723
  else
724
- for (const x of A)
725
- await c(x), s(n.alert_account_added);
724
+ for (const S of A)
725
+ await l(S), s(n.alert_account_added);
726
726
  h({
727
727
  ...d,
728
- current_amount: g.reduce((x, N) => x + (N.balance || 0), 0)
729
- }), a(!1);
728
+ current_amount: y.reduce((S, N) => S + (N.balance || 0), 0)
729
+ }), o(!1);
730
730
  };
731
- return /* @__PURE__ */ l(f, { children: [
732
- m.map((g) => /* @__PURE__ */ l(f, { children: [
733
- /* @__PURE__ */ e(Oe, { account: g }),
731
+ return /* @__PURE__ */ c(f, { children: [
732
+ m.map((y) => /* @__PURE__ */ c(f, { children: [
733
+ /* @__PURE__ */ e(Be, { account: y }),
734
734
  /* @__PURE__ */ e(v, {})
735
- ] }, g.guid)),
736
- /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(M, { onClick: () => a(!0), children: [
737
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
735
+ ] }, y.guid)),
736
+ /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(M, { onClick: () => o(!0), children: [
737
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
738
738
  /* @__PURE__ */ e(Ie, { filled: !0 }),
739
739
  n.details_add_account
740
740
  ] }) }),
741
741
  /* @__PURE__ */ e(V, { color: "primary" })
742
742
  ] }) }),
743
743
  /* @__PURE__ */ e(
744
- Be,
744
+ Oe,
745
745
  {
746
- accounts: y,
747
- isOpen: o,
748
- onClose: () => a(!1),
749
- onSave: R,
746
+ accounts: g,
747
+ isOpen: a,
748
+ onClose: () => o(!1),
749
+ onSave: x,
750
750
  title: n.add_select_accounts
751
751
  }
752
752
  )
753
753
  ] });
754
754
  }, Dt = D(({ goal: t }) => {
755
- const { goals: n } = S(), { visibleAccounts: _ } = z(), c = T.useMemo(
756
- () => _.find((d) => d.guid === t.account_guid),
757
- [_, t]
758
- ), u = t.track_type;
759
- let r = n.details_save_title;
760
- return t.track_type === i.DEBT_TRACK ? r = n.details_debt_title : t.track_type === i.RETIREMENT_TRACK && (r = n.details_retirement_title), /* @__PURE__ */ l(f, { children: [
761
- /* @__PURE__ */ l(f, { mx: 24, children: [
762
- /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: r }),
755
+ const { goals: n } = R(), { visibleAccounts: u } = P(), l = T.useMemo(
756
+ () => u.find((d) => d.guid === t.account_guid),
757
+ [u, t]
758
+ ), _ = t.track_type;
759
+ let i = n.details_save_title;
760
+ return t.track_type === r.DEBT_TRACK ? i = n.details_debt_title : t.track_type === r.RETIREMENT_TRACK && (i = n.details_retirement_title), /* @__PURE__ */ c(f, { children: [
761
+ /* @__PURE__ */ c(f, { mx: 24, children: [
762
+ /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: i }),
763
763
  /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
764
- /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
764
+ /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: n.details_title })
765
765
  ] }),
766
- /* @__PURE__ */ l(L, { sx: { bgcolor: "background.paper" }, children: [
767
- u !== i.RETIREMENT_TRACK ? /* @__PURE__ */ e(Gt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
766
+ /* @__PURE__ */ c(L, { sx: { bgcolor: "background.paper" }, children: [
767
+ _ !== r.RETIREMENT_TRACK ? /* @__PURE__ */ e(Gt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
768
768
  w,
769
769
  {
770
- primary: /* @__PURE__ */ l(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
770
+ primary: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
771
771
  /* @__PURE__ */ e(C, { variant: "body1", children: n.details_goal_name }),
772
772
  /* @__PURE__ */ e(C, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
773
773
  ] }),
@@ -775,146 +775,146 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
775
775
  }
776
776
  ) }),
777
777
  /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
778
- (u === i.SAVINGS_TRACK || u === i.RETIREMENT_TRACK) && /* @__PURE__ */ l($, { children: [
778
+ (_ === r.SAVINGS_TRACK || _ === r.RETIREMENT_TRACK) && /* @__PURE__ */ c($, { children: [
779
779
  /* @__PURE__ */ e(vt, { goal: t }),
780
- /* @__PURE__ */ e(v, { sx: { ml: u === i.RETIREMENT_TRACK ? 24 : 0 } })
780
+ /* @__PURE__ */ e(v, { sx: { ml: _ === r.RETIREMENT_TRACK ? 24 : 0 } })
781
781
  ] }),
782
- t.track_type === i.DEBT_TRACK && /* @__PURE__ */ l($, { children: [
783
- /* @__PURE__ */ e(ot, { goal: t }),
784
- /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
785
- /* @__PURE__ */ e(rt, { goal: t }),
782
+ t.track_type === r.DEBT_TRACK && /* @__PURE__ */ c($, { children: [
783
+ /* @__PURE__ */ e(at, { goal: t }),
786
784
  /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
787
785
  /* @__PURE__ */ e(it, { goal: t }),
786
+ /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
787
+ /* @__PURE__ */ e(rt, { goal: t }),
788
788
  /* @__PURE__ */ e(v, { variant: "fullWidth" })
789
789
  ] }),
790
- t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ l($, { children: [
790
+ t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c($, { children: [
791
791
  /* @__PURE__ */ e(Nt, { goal: t }),
792
792
  /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
793
793
  /* @__PURE__ */ e(kt, { goal: t }),
794
794
  /* @__PURE__ */ e(v, { variant: "fullWidth" })
795
795
  ] })
796
796
  ] }),
797
- /* @__PURE__ */ e(C, { 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 }),
798
- t.track_type !== i.RETIREMENT_TRACK && c && /* @__PURE__ */ l($, { children: [
799
- /* @__PURE__ */ e(Oe, { account: c }),
797
+ /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: t.track_type === r.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
798
+ t.track_type !== r.RETIREMENT_TRACK && l && /* @__PURE__ */ c($, { children: [
799
+ /* @__PURE__ */ e(Be, { account: l }),
800
800
  /* @__PURE__ */ e(v, {})
801
801
  ] }),
802
- t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ l($, { children: [
802
+ t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c($, { children: [
803
803
  /* @__PURE__ */ e(wt, { goal: t }),
804
804
  /* @__PURE__ */ e(v, {})
805
805
  ] }),
806
- t.track_type === i.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(It, { goal: t })
806
+ t.track_type === r.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(It, { goal: t })
807
807
  ] });
808
808
  }), Kt = D(({ onClose: t }) => {
809
- const { visibleRetirementAccounts: n } = z(), { goals: _, common: c } = S(), {
810
- addGoal: u,
811
- addRetirementGoal: r,
809
+ const { visibleRetirementAccounts: n } = P(), { goals: u, common: l } = R(), {
810
+ addGoal: _,
811
+ addRetirementGoal: i,
812
812
  deleteGoal: d,
813
813
  deleteRetirementGoal: s,
814
814
  newRetirementGoalAccounts: p,
815
815
  retirementGoalAccounts: h,
816
- selectedGoal: o,
817
- setAlert: a,
816
+ selectedGoal: a,
817
+ setAlert: o,
818
818
  setSelectedGoal: b,
819
819
  updateGoal: m
820
- } = G(), { user: y } = Ge(), [R, g] = T.useState(!1), A = !o?.guid, x = o?.track_type === i.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, N = T.useMemo(() => {
820
+ } = G(), { user: g } = Ge(), [x, y] = T.useState(!1), A = !a?.guid, S = a?.track_type === r.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, N = T.useMemo(() => {
821
821
  const E = A ? p : h;
822
822
  return n.filter((j) => E.some((F) => F.account_guid === j.guid));
823
823
  }, [A, n, p, h]), K = T.useMemo(() => {
824
- if (!o) return !1;
825
- if (!A && !x) return !0;
826
- const { account_guid: E, track_type: j, name: F, amount: ee, retirement_age: B } = o;
827
- return j === i.SAVINGS_TRACK ? E ? !!F && !!ee : !1 : j === i.RETIREMENT_TRACK ? N.length ? !!F && !!ee && !!B && !!y.birthday : !1 : !0;
828
- }, [o, N, y.birthday]);
829
- let H = c.delete_button, U = () => g(!0);
830
- A ? (U = () => oe(), H = c.save_button) : x && (U = () => Q(), H = _.mark_as_complete_button);
831
- const oe = async () => {
832
- if (o) {
833
- const E = o.track_type;
834
- E !== i.RETIREMENT_TRACK ? await u(o) : E === i.RETIREMENT_TRACK && await r({ ...o, target_amount: o.amount }), a(_.alert_goal_added), b(void 0), E && t?.(E);
824
+ if (!a) return !1;
825
+ if (!A && !S) return !0;
826
+ const { account_guid: E, track_type: j, name: F, amount: ee, retirement_age: O } = a;
827
+ return j === r.SAVINGS_TRACK ? E ? !!F && !!ee : !1 : j === r.RETIREMENT_TRACK ? N.length ? !!F && !!ee && !!O && !!g.birthday : !1 : !0;
828
+ }, [a, N, g.birthday]);
829
+ let U = l.delete_button, Y = () => y(!0);
830
+ A ? (Y = () => ae(), U = l.save_button) : S && (Y = () => X(), U = u.mark_as_complete_button);
831
+ const ae = async () => {
832
+ if (a) {
833
+ const E = a.track_type;
834
+ E !== r.RETIREMENT_TRACK ? await _(a) : E === r.RETIREMENT_TRACK && await i({ ...a, target_amount: a.amount }), o(u.alert_goal_added), b(void 0), E && t?.(E);
835
835
  }
836
836
  }, W = async () => {
837
- o && (o.track_type !== i.RETIREMENT_TRACK ? await d(o.guid) : o.track_type === i.RETIREMENT_TRACK && await s(o), a(_.alert_goal_deleted), b(void 0));
838
- }, Q = async () => {
837
+ a && (a.track_type !== r.RETIREMENT_TRACK ? await d(a.guid) : a.track_type === r.RETIREMENT_TRACK && await s(a), o(u.alert_goal_deleted), b(void 0));
838
+ }, X = async () => {
839
839
  const E = {
840
- ...o,
840
+ ...a,
841
841
  has_been_spent: !0
842
842
  };
843
- await m(E), a(_.alert_goal_completed), b(void 0);
843
+ await m(E), o(u.alert_goal_completed), b(void 0);
844
844
  };
845
- return /* @__PURE__ */ l(f, { children: [
845
+ return /* @__PURE__ */ c(f, { children: [
846
846
  /* @__PURE__ */ e(
847
- J,
847
+ Q,
848
848
  {
849
- ariaLabelClose: c.close_aria,
849
+ ariaLabelClose: l.close_aria,
850
850
  hasSecondaryAction: A,
851
- isOpen: !!o,
851
+ isOpen: !!a,
852
852
  isPrimaryDisabled: !K,
853
853
  onClose: () => b(void 0),
854
- onPrimaryAction: U,
855
- primaryColor: A || x ? "primary" : "error",
856
- primaryText: H,
854
+ onPrimaryAction: Y,
855
+ primaryColor: A || S ? "primary" : "error",
856
+ primaryText: U,
857
857
  secondaryColor: "primary",
858
- title: _.goal_details,
859
- children: o && /* @__PURE__ */ e(Dt, { goal: o })
858
+ title: u.goal_details,
859
+ children: a && /* @__PURE__ */ e(Dt, { goal: a })
860
860
  }
861
861
  ),
862
862
  /* @__PURE__ */ e(
863
- _t,
863
+ ut,
864
864
  {
865
- copy: { close_aria: c.close_aria, title: _.delete_goal },
866
- isOpen: R,
865
+ copy: { close_aria: l.close_aria, title: u.delete_goal },
866
+ isOpen: x,
867
867
  maxWidth: "xs",
868
- onClose: () => g(!1),
868
+ onClose: () => y(!1),
869
869
  onPrimaryAction: W,
870
870
  primaryColor: "error",
871
- primaryText: c.delete_button,
872
- children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: O(_.delete_description, o?.name || "") })
871
+ primaryText: l.delete_button,
872
+ children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "subtitle1", children: B(u.delete_description, a?.name || "") })
873
873
  }
874
874
  )
875
875
  ] });
876
876
  }), jn = D(({ onBackClick: t, sx: n }) => {
877
- const { onEvent: _ } = Ne(), { isMobile: c } = pe(), { isAccountDataLoaded: u, loadAccountData: r } = z(), { isInitialized: d } = _e(), { goals: s, common: p } = S(), {
877
+ const { onEvent: u } = Ne(), { isMobile: l } = pe(), { isAccountDataLoaded: _, loadAccountData: i } = P(), { isInitialized: d } = ue(), { goals: s, common: p } = R(), {
878
878
  alert: h,
879
- goals: o,
880
- isAllGoalDataLoaded: a,
879
+ goals: a,
880
+ isAllGoalDataLoaded: o,
881
881
  loadGoalData: b,
882
882
  monthlyCashFlowProfile: m,
883
- setAlert: y,
884
- retirmentGoals: R
885
- } = G(), [g, A] = T.useState(0), [x, N] = T.useState(!1), K = m?.amount_allocated_for_savings_goals || 0, H = m?.amount_allocated_for_debt_goals || 0, U = m?.amount_allocated_for_retirement_goals || 0;
883
+ setAlert: g,
884
+ retirmentGoals: x
885
+ } = G(), [y, A] = T.useState(0), [S, N] = T.useState(!1), K = m?.amount_allocated_for_savings_goals || 0, U = m?.amount_allocated_for_debt_goals || 0, Y = m?.amount_allocated_for_retirement_goals || 0;
886
886
  Ke({
887
887
  widgetName: "GoalsWidget",
888
- isLoaded: a
888
+ isLoaded: o
889
889
  }), T.useEffect(() => {
890
- u || r().finally(), _(X.GOALS_VIEW);
890
+ _ || i().finally(), u(H.GOALS_VIEW);
891
891
  }, []), T.useEffect(() => {
892
892
  d && b().finally();
893
893
  }, [d]);
894
- const oe = () => {
895
- _(X.GOALS_CLICK_FILTER);
894
+ const ae = () => {
895
+ u(H.GOALS_CLICK_FILTER);
896
896
  }, W = () => {
897
- N(!0), _(X.GOALS_CLICK_ADD);
898
- }, Q = (B) => {
899
- N(!1), B === i.SAVINGS_TRACK ? A(0) : B === i.DEBT_TRACK ? A(1) : B === i.RETIREMENT_TRACK && A(2);
897
+ N(!0), u(H.GOALS_CLICK_ADD);
898
+ }, X = (O) => {
899
+ N(!1), O === r.SAVINGS_TRACK ? A(0) : O === r.DEBT_TRACK ? A(1) : O === r.RETIREMENT_TRACK && A(2);
900
900
  }, E = T.useMemo(
901
- () => a && (o.length === 0 || o.every(({ track_type: B }) => !B) && R.length === 0),
902
- [o, a, R]
901
+ () => o && (a.length === 0 || a.every(({ track_type: O }) => !O) && x.length === 0),
902
+ [a, o, x]
903
903
  );
904
- if (!d || !a)
904
+ if (!d || !o)
905
905
  return /* @__PURE__ */ e(Me, {});
906
- const j = O(
907
- c ? s.tab_subtitle_mobile : s.tab_subtitle,
906
+ const j = B(
907
+ l ? s.tab_subtitle_mobile : s.tab_subtitle,
908
908
  I(K, "0,0")
909
- ), F = O(
910
- c ? s.tab_subtitle_mobile : s.tab_subtitle,
911
- I(H, "0,0")
912
- ), ee = O(
913
- c ? s.tab_subtitle_mobile : s.tab_subtitle,
909
+ ), F = B(
910
+ l ? s.tab_subtitle_mobile : s.tab_subtitle,
914
911
  I(U, "0,0")
912
+ ), ee = B(
913
+ l ? s.tab_subtitle_mobile : s.tab_subtitle,
914
+ I(Y, "0,0")
915
915
  );
916
- return /* @__PURE__ */ l(
917
- ut,
916
+ return /* @__PURE__ */ c(
917
+ _t,
918
918
  {
919
919
  actions: [
920
920
  {
@@ -923,40 +923,40 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
923
923
  onClick: W
924
924
  }
925
925
  ],
926
- onAccountsFilterClick: oe,
926
+ onAccountsFilterClick: ae,
927
927
  onBackClick: t,
928
928
  sx: n,
929
929
  title: s.title,
930
930
  children: [
931
- /* @__PURE__ */ l(f, { mx: c ? 0 : 48, my: 24, children: [
932
- /* @__PURE__ */ l(
931
+ /* @__PURE__ */ c(f, { mx: l ? 0 : 48, my: 24, children: [
932
+ /* @__PURE__ */ c(
933
933
  Fe,
934
934
  {
935
- onChange: (B, We) => A(We),
935
+ onChange: (O, We) => A(We),
936
936
  sx: { bgcolor: "background.paper" },
937
937
  textColor: "primary",
938
- value: E ? !1 : g,
938
+ value: E ? !1 : y,
939
939
  variant: "fullWidth",
940
940
  children: [
941
941
  /* @__PURE__ */ e(
942
- re,
942
+ ie,
943
943
  {
944
944
  disabled: E,
945
- label: /* @__PURE__ */ e(ie, { subtitle: j, title: s.tab_saving_title })
945
+ label: /* @__PURE__ */ e(re, { subtitle: j, title: s.tab_saving_title })
946
946
  }
947
947
  ),
948
948
  /* @__PURE__ */ e(
949
- re,
949
+ ie,
950
950
  {
951
951
  disabled: E,
952
- label: /* @__PURE__ */ e(ie, { subtitle: F, title: s.tab_debt_title })
952
+ label: /* @__PURE__ */ e(re, { subtitle: F, title: s.tab_debt_title })
953
953
  }
954
954
  ),
955
955
  /* @__PURE__ */ e(
956
- re,
956
+ ie,
957
957
  {
958
958
  disabled: E,
959
- label: /* @__PURE__ */ e(ie, { subtitle: ee, title: s.tab_retirement_title })
959
+ label: /* @__PURE__ */ e(re, { subtitle: ee, title: s.tab_retirement_title })
960
960
  }
961
961
  )
962
962
  ]
@@ -977,67 +977,67 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
977
977
  }
978
978
  }
979
979
  }
980
- ) : /* @__PURE__ */ l($, { children: [
981
- g === 0 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.SAVINGS_TRACK }),
982
- g === 1 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.DEBT_TRACK }),
983
- g === 2 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.RETIREMENT_TRACK })
980
+ ) : /* @__PURE__ */ c($, { children: [
981
+ y === 0 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: r.SAVINGS_TRACK }),
982
+ y === 1 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: r.DEBT_TRACK }),
983
+ y === 2 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: r.RETIREMENT_TRACK })
984
984
  ] })
985
985
  ] }),
986
- /* @__PURE__ */ e(Kt, { onClose: Q }),
986
+ /* @__PURE__ */ e(Kt, { onClose: X }),
987
987
  /* @__PURE__ */ e(
988
- J,
988
+ Q,
989
989
  {
990
990
  ariaLabelClose: p.close_aria,
991
- isOpen: x,
991
+ isOpen: S,
992
992
  onClose: () => N(!1),
993
993
  title: s.add_goal_title,
994
- children: /* @__PURE__ */ e(Et, { onClose: Q })
994
+ children: /* @__PURE__ */ e(Et, { onClose: X })
995
995
  }
996
996
  ),
997
- /* @__PURE__ */ e(je, { onClose: () => y(""), open: !!h, children: /* @__PURE__ */ e(ze, { onClose: () => y(""), severity: "success", variant: "filled", children: h }) })
997
+ /* @__PURE__ */ e(je, { onClose: () => g(""), open: !!h, children: /* @__PURE__ */ e(Pe, { onClose: () => g(""), severity: "success", variant: "filled", children: h }) })
998
998
  ]
999
999
  }
1000
1000
  );
1001
1001
  }), Mt = D(({ goal: t }) => {
1002
- const { goals: n } = S(), _ = gt(), {
1003
- backgroundColor: c,
1004
- color: u,
1005
- percentage: r,
1002
+ const { goals: n } = R(), u = yt(), {
1003
+ backgroundColor: l,
1004
+ color: _,
1005
+ percentage: i,
1006
1006
  projectedText: d
1007
- } = de(n, t), s = Math.round(r * 100);
1008
- let p = /* @__PURE__ */ e(xe, {});
1009
- return t.track_type === i.DEBT_TRACK ? p = /* @__PURE__ */ e(Ee, {}) : t.track_type === i.RETIREMENT_TRACK && (p = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ l(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1010
- /* @__PURE__ */ e(ae, { sx: { bgcolor: c, color: u, height: 32, width: 32 }, variant: "rounded", children: p }),
1011
- /* @__PURE__ */ l(bt, { sx: { width: "100%" }, children: [
1007
+ } = de(n, t), s = Math.round(i * 100);
1008
+ let p = /* @__PURE__ */ e(Se, {});
1009
+ return t.track_type === r.DEBT_TRACK ? p = /* @__PURE__ */ e(Ee, {}) : t.track_type === r.RETIREMENT_TRACK && (p = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1010
+ /* @__PURE__ */ e(oe, { sx: { bgcolor: l, color: _, height: 32, width: 32 }, variant: "rounded", children: p }),
1011
+ /* @__PURE__ */ c(bt, { sx: { width: "100%" }, children: [
1012
1012
  /* @__PURE__ */ e(Te, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1013
- t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: d })
1013
+ t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: d })
1014
1014
  ] }),
1015
1015
  /* @__PURE__ */ e(
1016
1016
  ft,
1017
1017
  {
1018
- backgroundStrokeColor: _.palette.border.lighter,
1019
- color: _.palette.primary.main,
1018
+ backgroundStrokeColor: u.palette.border.lighter,
1019
+ color: u.palette.primary.main,
1020
1020
  percent: s,
1021
1021
  size: 40,
1022
1022
  strokeWidth: 3,
1023
- children: /* @__PURE__ */ e(Z, { fontWeight: 700, variant: "caption", children: `${s}%` })
1023
+ children: /* @__PURE__ */ e(q, { fontWeight: 700, variant: "caption", children: `${s}%` })
1024
1024
  }
1025
1025
  )
1026
1026
  ] });
1027
- }), Lt = ({ header: t, subText: n, sx: _ }) => /* @__PURE__ */ l(
1027
+ }), Lt = ({ header: t, subText: n, sx: u }) => /* @__PURE__ */ c(
1028
1028
  f,
1029
1029
  {
1030
1030
  sx: {
1031
1031
  alignItems: "center",
1032
1032
  alignSelf: "center",
1033
1033
  px: 24,
1034
- ..._
1034
+ ...u
1035
1035
  },
1036
1036
  children: [
1037
- /* @__PURE__ */ e(qe, { size: 32 }),
1037
+ /* @__PURE__ */ e(Je, { size: 32 }),
1038
1038
  /* @__PURE__ */ e(Te, { fontSize: 15, fontWeight: 600, children: t }),
1039
1039
  /* @__PURE__ */ e(
1040
- Z,
1040
+ q,
1041
1041
  {
1042
1042
  color: "text.secondary",
1043
1043
  sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
@@ -1048,39 +1048,39 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
1048
1048
  ]
1049
1049
  }
1050
1050
  ), Fn = D(({ onCTAClick: t }) => {
1051
- const { isAccountDataLoaded: n, loadAccountData: _, visibleAccounts: c } = z(), { onEvent: u } = Ne(), { goals: r } = S(), { isInitialized: d } = _e(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: p, loadGoalData: h } = G();
1051
+ const { isAccountDataLoaded: n, loadAccountData: u, visibleAccounts: l } = P(), { onEvent: _ } = Ne(), { goals: i } = R(), { isInitialized: d } = ue(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: p, loadGoalData: h } = G();
1052
1052
  Ke({
1053
1053
  widgetName: "GoalsMicroWidget",
1054
1054
  isLoaded: p
1055
1055
  }), T.useEffect(() => {
1056
- n || _().finally();
1056
+ n || u().finally();
1057
1057
  }, []), T.useEffect(() => {
1058
- d && (h().finally(), u(X.GOALS_LOAD_WIDGET, {
1059
- state: c?.length ? "default" : "zeroState"
1058
+ d && (h().finally(), _(H.GOALS_LOAD_WIDGET, {
1059
+ state: l?.length ? "default" : "zeroState"
1060
1060
  }));
1061
1061
  }, [d]);
1062
- const o = T.useMemo(
1062
+ const a = T.useMemo(
1063
1063
  () => p && s.length === 0,
1064
1064
  [s, p]
1065
- ), a = () => {
1066
- u(
1067
- o ? X.GOALS_CLICK_GET_STARTED : X.GOALS_CLICK_VIEW_DETAILS
1065
+ ), o = () => {
1066
+ _(
1067
+ a ? H.GOALS_CLICK_GET_STARTED : H.GOALS_CLICK_VIEW_DETAILS
1068
1068
  ), t();
1069
1069
  };
1070
1070
  return !d || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1071
- yt,
1071
+ gt,
1072
1072
  {
1073
1073
  className: "mx-goals-microwidget",
1074
- ctaLabel: o ? r.get_started : r.view_details,
1075
- onCTAClick: a,
1076
- title: r.title,
1077
- children: o ? /* @__PURE__ */ e(
1074
+ ctaLabel: a ? i.get_started : i.view_details,
1075
+ onCTAClick: o,
1076
+ title: i.title,
1077
+ children: a ? /* @__PURE__ */ e(
1078
1078
  Lt,
1079
1079
  {
1080
- header: r.create_goals_header,
1081
- subText: r.micro_zero_state_description
1080
+ header: i.create_goals_header,
1081
+ subText: i.micro_zero_state_description
1082
1082
  }
1083
- ) : /* @__PURE__ */ e(ht, { sx: { justifyContent: "space-between" }, children: s.map((b, m) => /* @__PURE__ */ l(T.Fragment, { children: [
1083
+ ) : /* @__PURE__ */ e(ht, { sx: { justifyContent: "space-between" }, children: s.map((b, m) => /* @__PURE__ */ c(T.Fragment, { children: [
1084
1084
  /* @__PURE__ */ e(Mt, { goal: b }),
1085
1085
  m !== s.length - 1 && /* @__PURE__ */ e(v, {})
1086
1086
  ] }, b.guid)) })
@@ -1088,8 +1088,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
1088
1088
  );
1089
1089
  });
1090
1090
  export {
1091
- Hn as GoalApi,
1092
- Un as GoalStore,
1091
+ Un as GoalApi,
1092
+ Yn as GoalStore,
1093
1093
  Fn as GoalsMicroWidget,
1094
1094
  jn as GoalsWidget
1095
1095
  };