@mx-cartographer/experiences 7.9.3 → 7.9.4

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.
@@ -1,6 +1,6 @@
1
- import { g as de, T as i, G as le, a as Ve, M as Z, C as Ae, b as Pe } from "../GoalStore-B4LVt_kH.mjs";
2
- import { c as $n, d as Xn } from "../GoalStore-B4LVt_kH.mjs";
3
- import { jsxs as l, jsx as e, Fragment as $ } from "react/jsx-runtime";
1
+ import { g as de, T as i, G as ce, a as Ve, M as Z, C as Te, b as Pe } from "../GoalStore-qiNsUwJa.mjs";
2
+ import { c as $n, d as Xn } from "../GoalStore-qiNsUwJa.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
6
  import ze from "@mui/material/Alert";
@@ -8,20 +8,20 @@ import je from "@mui/material/Snackbar";
8
8
  import g from "@mui/material/Stack";
9
9
  import re from "@mui/material/Tab";
10
10
  import Fe from "@mui/material/Tabs";
11
- import { Text as C, H2 as me, H3 as ce, P as H, Icon as $e, InstitutionLogo as te } from "@mxenabled/mxui";
12
- import ue from "@mui/material/Button";
13
- import Te from "@mui/material/Card";
14
- import Ce from "@mui/material/CardActionArea";
15
- import Se from "@mui/material/CardContent";
16
- import ye from "@mui/material/Unstable_Grid2";
11
+ import { Text as C, H2 as me, H3 as le, P as H, Icon as $e, InstitutionLogo as te } from "@mxenabled/mxui";
12
+ import _e from "@mui/material/Button";
13
+ import Ce from "@mui/material/Card";
14
+ import Se from "@mui/material/CardActionArea";
15
+ import Re from "@mui/material/CardContent";
16
+ import ge from "@mui/material/Unstable_Grid2";
17
17
  import ae from "@mui/material/Avatar";
18
18
  import Xe from "@mui/material/CardHeader";
19
- import { Payments as Re, NoteStack as Ee, Person as xe, ArrowUpwardAlt as He, CheckCircle as Ue, ChevronRight as V, Icon as ge, ExpandLess as Ye, ExpandMore as Ze, AddBox as ve, Trophy as qe } from "@mxenabled/mx-icons";
20
- import { u as S, l as G, b as _e, a as Ie, d as z, o as Ge, g as Ne } from "../hooks-ZMp65DFz.mjs";
21
- import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
19
+ import { Payments as Ee, NoteStack as xe, 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, l as G, b as ue, a as pe, d as z, o as Ge, g as Ne } from "../hooks-ZMp65DFz.mjs";
21
+ import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { f as I } from "../NumberFormatting-DjTD0t3W.mjs";
23
23
  import { S as Je } from "../StatusBar-BK_uYHAB.mjs";
24
- import x from "@mui/material/Divider";
24
+ import v from "@mui/material/Divider";
25
25
  import L from "@mui/material/List";
26
26
  import { L as q } from "../ListItemAction-CU42h39I.mjs";
27
27
  import { C as ke } from "../CurrencyInput-itK0R3wV.mjs";
@@ -32,23 +32,23 @@ import P from "@mui/material/ListItemAvatar";
32
32
  import M from "@mui/material/ListItemButton";
33
33
  import w from "@mui/material/ListItemText";
34
34
  import { b as O } from "../Localization-2MODESHW.mjs";
35
- import { f as he, D as be, a as et } from "../Dialog-B4PI-_bL.mjs";
35
+ import { f as be, D as ye, a as et } from "../Dialog-B4PI-_bL.mjs";
36
36
  import { D as J } from "../Drawer-DV4NTsFg.mjs";
37
37
  import { g as we } from "../AccountDisplayName-CO7z3v99.mjs";
38
38
  import tt from "@mui/material/Collapse";
39
39
  import nt from "@mui/material/ListItemIcon";
40
40
  import at from "@mui/material/Checkbox";
41
- import { A as fe } from "../Account-BiB1F8lL.mjs";
41
+ import { A as Ae } from "../Account-BiB1F8lL.mjs";
42
42
  import { u as ot } from "../useAccountDisplayName-Bot2tb4n.mjs";
43
43
  import De from "@mui/material/TextField";
44
44
  import { M as rt, I as it, O as st } from "../OriginalBalanceAction-ChGGq5AH.mjs";
45
- import { getUnixTime as lt } from "date-fns/getUnixTime";
46
- import { isValid as ct } from "date-fns/isValid";
45
+ import { getUnixTime as ct } from "date-fns/getUnixTime";
46
+ import { isValid as lt } from "date-fns/isValid";
47
47
  import { AdapterDateFns as dt } from "@mui/x-date-pickers/AdapterDateFnsV3";
48
48
  import { DatePicker as mt } from "@mui/x-date-pickers";
49
- import { LocalizationProvider as ut } from "@mui/x-date-pickers/LocalizationProvider";
49
+ import { LocalizationProvider as _t } from "@mui/x-date-pickers/LocalizationProvider";
50
50
  import { u as Ke } from "../useWidgetLoadTimer-hIOioiKx.mjs";
51
- import { A as X, W as _t } from "../WidgetContainer-BbPS3Yxz.mjs";
51
+ import { A as X, W as ut } from "../WidgetContainer-BbPS3Yxz.mjs";
52
52
  import { L as Me } from "../Loader-DUaFpDGv.mjs";
53
53
  import { E as pt } from "../EmptyState-DoxNUae-.mjs";
54
54
  import ht from "@mui/material/Stack/Stack";
@@ -57,7 +57,7 @@ import yt from "@mui/material/styles/useTheme";
57
57
  import { S as gt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
58
  import { M as ft } from "../MicroWidgetContainer-B2hO9rOG.mjs";
59
59
  function ie({ title: t, subtitle: n }) {
60
- return /* @__PURE__ */ l(g, { children: [
60
+ return /* @__PURE__ */ c(g, { children: [
61
61
  /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t }),
62
62
  /* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "Body", children: n })
63
63
  ] });
@@ -66,22 +66,22 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
66
66
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
67
67
  "$1$2$3"
68
68
  ) : I(t, "0,0.00"), Le = D(
69
- ({ goal: t, isInDrawer: n = !1, onClick: m }) => {
70
- const { goals: c } = S(), { isMobile: p, isTablet: r } = pe(), d = p || r, {
69
+ ({ goal: t, isInDrawer: n = !1, onClick: _ }) => {
70
+ const { goals: l } = S(), { isMobile: u, isTablet: r } = he(), d = u || r, {
71
71
  backgroundColor: s,
72
- color: _,
73
- percentage: b,
72
+ color: p,
73
+ percentage: h,
74
74
  percentageText: o,
75
75
  projectedText: a
76
- } = de(c, t), u = t.track_type === i.DEBT_TRACK ? t.initial_amount : t.amount, h = [
76
+ } = de(l, t), b = t.track_type === i.DEBT_TRACK ? t.initial_amount : t.amount, m = [
77
77
  {
78
78
  color: s,
79
- percentage: `${b}`
79
+ percentage: `${h}`
80
80
  }
81
81
  ];
82
- let f = /* @__PURE__ */ e(Re, {});
83
- return t.track_type === i.DEBT_TRACK ? f = /* @__PURE__ */ e(Ee, {}) : t.track_type === i.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(
84
- Te,
82
+ let f = /* @__PURE__ */ e(Ee, {});
83
+ return t.track_type === i.DEBT_TRACK ? f = /* @__PURE__ */ e(xe, {}) : t.track_type === i.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(
84
+ Ce,
85
85
  {
86
86
  elevation: 2,
87
87
  sx: {
@@ -90,21 +90,21 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
90
90
  outlineColor: "primary.main"
91
91
  }
92
92
  },
93
- children: /* @__PURE__ */ l(Ce, { disabled: !m, onClick: m, children: [
93
+ children: /* @__PURE__ */ c(Se, { disabled: !_, onClick: _, children: [
94
94
  /* @__PURE__ */ e(
95
95
  Xe,
96
96
  {
97
- avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: s, color: _, height: 48, width: 48 }, variant: "rounded", children: f }),
97
+ avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: s, color: p, height: 48, width: 48 }, variant: "rounded", children: f }),
98
98
  subheader: /* @__PURE__ */ e(C, { variant: n || d ? "H3" : "H2", children: `${I(t.current_amount, d ? "0,0" : "0,0.00")} / ${At(
99
- u,
99
+ b,
100
100
  d
101
101
  )}` }),
102
102
  title: /* @__PURE__ */ e(me, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
103
103
  }
104
104
  ),
105
- /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ l(g, { gap: 6, children: [
106
- /* @__PURE__ */ e(Je, { data: h, height: 24 }),
107
- /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
105
+ /* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ c(g, { gap: 6, children: [
106
+ /* @__PURE__ */ e(Je, { data: m, height: 24 }),
107
+ /* @__PURE__ */ c(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
108
108
  /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: o }),
109
109
  t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: a })
110
110
  ] })
@@ -114,17 +114,17 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
114
114
  );
115
115
  }
116
116
  ), Tt = D(({ trackType: t }) => {
117
- const { goals: n } = S(), { setAlert: m, monthlyCashFlowProfile: c, updateMonthlyCashFlowProfile: p } = G(), r = T.useMemo(() => {
117
+ const { goals: n } = S(), { setAlert: _, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: u } = G(), r = T.useMemo(() => {
118
118
  let o = 0;
119
- 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;
120
- }, [c]);
119
+ return t === i.SAVINGS_TRACK ? o = l?.amount_allocated_for_savings_goals || 0 : t === i.DEBT_TRACK ? o = l?.amount_allocated_for_debt_goals || 0 : t === i.RETIREMENT_TRACK && (o = l?.amount_allocated_for_retirement_goals || 0), o;
120
+ }, [l]);
121
121
  T.useEffect(() => {
122
122
  s(r);
123
123
  }, [r]);
124
- const [d, s] = T.useState(r), _ = d < 0 || d > 99999999, b = async () => {
125
- if (c) {
126
- const o = { ...c };
127
- 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 p(o), m(n.alert_contribution_updated);
124
+ const [d, s] = T.useState(r), p = d < 0 || d > 99999999, h = async () => {
125
+ if (l) {
126
+ const o = { ...l };
127
+ 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);
128
128
  }
129
129
  };
130
130
  return /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
@@ -133,7 +133,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
133
133
  isSaveDisabled: !d || isNaN(d),
134
134
  label: n.contribution_label,
135
135
  onCancel: () => s(r),
136
- onSave: b,
136
+ onSave: h,
137
137
  primaryText: n.contribution_label,
138
138
  secondaryText: I(r, "0,0.00"),
139
139
  children: /* @__PURE__ */ e(
@@ -141,7 +141,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
141
141
  {
142
142
  amount: d,
143
143
  autoFocus: !0,
144
- error: _,
144
+ error: p,
145
145
  fullWidth: !0,
146
146
  minAmount: 0,
147
147
  setAmount: (o) => s(isNaN(Number(o)) ? d : Number(o)),
@@ -150,9 +150,9 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
150
150
  )
151
151
  }
152
152
  ) });
153
- }), Ct = ({ goal: t, index: n, onUpClick: m }) => {
154
- const { goals: c } = S(), { percentage: p } = de(c, t), r = t.goal_type === le.KEEP_BALANCE_BELOW || t.has_been_spent ? c.goal_completed : O(c.goal_percentage_reached, `${p * 100}`);
155
- return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
153
+ }), Ct = ({ goal: t, index: n, onUpClick: _ }) => {
154
+ const { goals: l } = S(), { percentage: u } = de(l, t), r = t.goal_type === ce.KEEP_BALANCE_BELOW || t.has_been_spent ? l.goal_completed : O(l.goal_percentage_reached, `${u * 100}`);
155
+ return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
156
156
  M,
157
157
  {
158
158
  disableRipple: !0,
@@ -167,17 +167,17 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
167
167
  justifyContent: "center",
168
168
  ".MuiAvatar-root": { height: "16px", width: "16px" }
169
169
  },
170
- children: t.track_type === i.SAVINGS_TRACK ? /* @__PURE__ */ e(Qe, { onClick: () => m?.(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 }) })
170
+ 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 }) })
171
171
  }
172
172
  ),
173
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
174
- /* @__PURE__ */ l(g, { sx: { maxWidth: "70%" }, children: [
173
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ c(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
174
+ /* @__PURE__ */ c(g, { sx: { maxWidth: "70%" }, children: [
175
175
  /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.name }),
176
176
  /* @__PURE__ */ e(C, { variant: "XSmall", children: t.is_complete ? r : O(
177
- c.goal_projection,
178
- he(
177
+ l.goal_projection,
178
+ be(
179
179
  ne(t.projected_to_complete_at || 0),
180
- be.MONTH_SHORT_YEAR
180
+ ye.MONTH_SHORT_YEAR
181
181
  )
182
182
  ) })
183
183
  ] }),
@@ -188,21 +188,21 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
188
188
  ) });
189
189
  }, St = ({ goal: t }) => {
190
190
  const { goals: n } = S();
191
- return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
191
+ return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
192
192
  M,
193
193
  {
194
194
  disableRipple: !0,
195
195
  sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
196
196
  children: [
197
197
  /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
198
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
199
- /* @__PURE__ */ l(g, { children: [
198
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ c(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
199
+ /* @__PURE__ */ c(g, { children: [
200
200
  /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.name }),
201
201
  /* @__PURE__ */ e(C, { variant: "XSmall", children: O(
202
202
  n.completed_label,
203
- he(
203
+ be(
204
204
  ne(t.completed_at || 0),
205
- be.MONTH_SHORT_YEAR
205
+ ye.MONTH_SHORT_YEAR
206
206
  )
207
207
  ) })
208
208
  ] }),
@@ -212,51 +212,51 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
212
212
  }
213
213
  ) }, t.guid);
214
214
  }, Rt = ({ trackType: t }) => {
215
- const { goals: n, common: m } = S(), { loadGoals: c, orderedGoals: p, reorderGoals: r } = G(), d = p.filter((y) => y.track_type === t), s = d.filter(
215
+ const { goals: n, common: _ } = S(), { loadGoals: l, orderedGoals: u, reorderGoals: r } = G(), d = u.filter((y) => y.track_type === t), s = d.filter(
216
216
  (y) => y.track_type === i.SAVINGS_TRACK && !y.has_been_spent || y.track_type !== i.SAVINGS_TRACK && !y.is_complete
217
- ), _ = d.filter(
217
+ ), p = d.filter(
218
218
  (y) => y.track_type === i.SAVINGS_TRACK && y.has_been_spent || y.track_type !== i.SAVINGS_TRACK && y.is_complete
219
- ), [b, o] = T.useState(!1);
220
- let a = n.manage_saving_goals, u = n.manage_saving_drawer_title, h = n.manage_saving_title, f = n.manage_saving_description;
221
- t === i.DEBT_TRACK ? (a = n.manage_debt_goals, u = n.manage_debt_drawer_title, h = n.manage_debt_title, f = n.manage_debt_description) : t === i.RETIREMENT_TRACK && (a = n.manage_retirement_goals, u = n.manage_retirement_drawer_title, h = n.manage_retirement_title, f = n.manage_retirement_description);
222
- const v = async (y) => {
223
- const A = [...s], R = A.findIndex((K) => K.guid === y.guid);
224
- let N = R - 1;
225
- N < 0 && (N = A.length - 1), A.splice(N, 0, A.splice(R, 1)[0]);
219
+ ), [h, o] = T.useState(!1);
220
+ let a = n.manage_saving_goals, b = n.manage_saving_drawer_title, m = n.manage_saving_title, f = n.manage_saving_description;
221
+ t === i.DEBT_TRACK ? (a = n.manage_debt_goals, b = n.manage_debt_drawer_title, m = n.manage_debt_title, f = n.manage_debt_description) : t === i.RETIREMENT_TRACK && (a = n.manage_retirement_goals, b = n.manage_retirement_drawer_title, m = n.manage_retirement_title, f = n.manage_retirement_description);
222
+ const R = async (y) => {
223
+ const A = [...s], E = A.findIndex((K) => K.guid === y.guid);
224
+ let N = E - 1;
225
+ N < 0 && (N = A.length - 1), A.splice(N, 0, A.splice(E, 1)[0]);
226
226
  for (let K = 0; K < A.length; K++)
227
227
  A[K].position = K + 1;
228
- await r(A), await c();
228
+ await r(A), await l();
229
229
  };
230
- return /* @__PURE__ */ l(g, { children: [
231
- /* @__PURE__ */ e(ue, { endIcon: /* @__PURE__ */ e(V, {}), onClick: () => o(!0), children: a }),
230
+ return /* @__PURE__ */ c(g, { children: [
231
+ /* @__PURE__ */ e(_e, { endIcon: /* @__PURE__ */ e(V, {}), onClick: () => o(!0), children: a }),
232
232
  /* @__PURE__ */ e(
233
233
  J,
234
234
  {
235
- ariaLabelClose: m.close_aria,
236
- isOpen: b,
235
+ ariaLabelClose: _.close_aria,
236
+ isOpen: h,
237
237
  onClose: () => o(!1),
238
- title: u,
239
- children: /* @__PURE__ */ l(g, { children: [
240
- /* @__PURE__ */ l(g, { m: 24, children: [
241
- /* @__PURE__ */ e(ce, { children: h }),
238
+ title: b,
239
+ children: /* @__PURE__ */ c(g, { children: [
240
+ /* @__PURE__ */ c(g, { m: 24, children: [
241
+ /* @__PURE__ */ e(le, { children: m }),
242
242
  /* @__PURE__ */ e(H, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: f })
243
243
  ] }),
244
244
  /* @__PURE__ */ e(Tt, { trackType: t }),
245
245
  /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
246
246
  /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((y, A) => {
247
- const R = A >= s.length - 1;
248
- return /* @__PURE__ */ l(g, { children: [
249
- /* @__PURE__ */ e(Ct, { goal: y, index: A, onUpClick: v }),
250
- /* @__PURE__ */ e(x, { variant: R ? "fullWidth" : "inset" })
247
+ const E = A >= s.length - 1;
248
+ return /* @__PURE__ */ c(g, { children: [
249
+ /* @__PURE__ */ e(Ct, { goal: y, index: A, onUpClick: R }),
250
+ /* @__PURE__ */ e(v, { variant: E ? "fullWidth" : "inset" })
251
251
  ] }, `ongoing-${y.guid}`);
252
252
  }) }),
253
- t !== i.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ l(g, { children: [
253
+ t !== i.RETIREMENT_TRACK && p.length > 0 && /* @__PURE__ */ c(g, { children: [
254
254
  /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
255
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((y, A) => {
256
- const R = A > s.length - 1;
257
- return /* @__PURE__ */ l(g, { children: [
255
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: p.map((y, A) => {
256
+ const E = A > s.length - 1;
257
+ return /* @__PURE__ */ c(g, { children: [
258
258
  /* @__PURE__ */ e(St, { goal: y }),
259
- /* @__PURE__ */ e(x, { variant: R ? "fullWidth" : "inset" })
259
+ /* @__PURE__ */ e(v, { variant: E ? "fullWidth" : "inset" })
260
260
  ] }, `complete-${y.guid}`);
261
261
  }) })
262
262
  ] })
@@ -265,22 +265,22 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
265
265
  )
266
266
  ] });
267
267
  }, se = D(({ trackType: t, onAddGoals: n }) => {
268
- const { isMobile: m } = pe(), { goals: c } = S(), { selectedAccountGuids: p } = _e(), { orderedGoals: r, setSelectedGoal: d } = G(), s = r.filter(
269
- (a) => a.track_type === t && (a.track_type !== i.RETIREMENT_TRACK && p.includes(a.account_guid) || a.track_type === i.RETIREMENT_TRACK)
270
- ), _ = s.filter(
268
+ const { isMobile: _ } = he(), { goals: l } = S(), { selectedAccountGuids: u } = ue(), { orderedGoals: r, setSelectedGoal: d } = G(), s = r.filter(
269
+ (a) => a.track_type === t && (a.track_type !== i.RETIREMENT_TRACK && u.includes(a.account_guid) || a.track_type === i.RETIREMENT_TRACK)
270
+ ), p = s.filter(
271
271
  (a) => a.track_type === i.SAVINGS_TRACK && !a.has_been_spent || a.track_type !== i.SAVINGS_TRACK && !a.is_complete
272
- ), b = s.filter(
272
+ ), h = s.filter(
273
273
  (a) => a.track_type === i.SAVINGS_TRACK && a.has_been_spent || a.track_type !== i.SAVINGS_TRACK && a.is_complete
274
- ), o = t === i.DEBT_TRACK ? c.zero_state_complete_debt : c.zero_state_complete_savings;
275
- return /* @__PURE__ */ l(g, { mt: 16, mx: m ? 24 : 0, children: [
276
- /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
277
- /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "Small", children: c.ongoing_title }),
274
+ ), o = t === i.DEBT_TRACK ? l.zero_state_complete_debt : l.zero_state_complete_savings;
275
+ return /* @__PURE__ */ c(g, { mt: 16, mx: _ ? 24 : 0, children: [
276
+ /* @__PURE__ */ c(g, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
277
+ /* @__PURE__ */ e(le, { color: "text.secondary", variant: "Small", children: l.ongoing_title }),
278
278
  /* @__PURE__ */ e(Rt, { trackType: t })
279
279
  ] }),
280
- _.length > 0 ? /* @__PURE__ */ e(ye, { container: !0, spacing: 24, children: _.map((a, u, h) => (
280
+ p.length > 0 ? /* @__PURE__ */ e(ge, { container: !0, spacing: 24, children: p.map((a, b, m) => (
281
281
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
282
- /* @__PURE__ */ e(ye, { xs: m || u === 0 && h.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: a, onClick: () => d(a) }, a.guid) }, u)
283
- )) }) : /* @__PURE__ */ l(
282
+ /* @__PURE__ */ e(ge, { xs: _ || b === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: a, onClick: () => d(a) }, a.guid) }, b)
283
+ )) }) : /* @__PURE__ */ c(
284
284
  g,
285
285
  {
286
286
  alignItems: "center",
@@ -301,16 +301,16 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
301
301
  width: { sm: 381 }
302
302
  }),
303
303
  variant: "Small",
304
- children: Ve(t, c)
304
+ children: Ve(t, l)
305
305
  }
306
306
  ),
307
- /* @__PURE__ */ e(ue, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: c.add_goals_button })
307
+ /* @__PURE__ */ e(_e, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: l.add_goals_button })
308
308
  ]
309
309
  }
310
310
  ),
311
- t !== i.RETIREMENT_TRACK && /* @__PURE__ */ l(g, { gap: 16, mt: 48, children: [
312
- /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "Small", children: c.complete_title }),
313
- b.length === 0 && /* @__PURE__ */ e(g, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
311
+ t !== i.RETIREMENT_TRACK && /* @__PURE__ */ c(g, { gap: 16, mt: 48, children: [
312
+ /* @__PURE__ */ e(le, { color: "text.secondary", variant: "Small", children: l.complete_title }),
313
+ h.length === 0 && /* @__PURE__ */ e(g, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
314
314
  H,
315
315
  {
316
316
  sx: (a) => ({
@@ -324,8 +324,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
324
324
  children: o
325
325
  }
326
326
  ) }),
327
- b.map((a) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => d(a), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
328
- /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", gap: 6, children: [
327
+ 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__ */ c(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
328
+ /* @__PURE__ */ c(g, { alignItems: "center", direction: "row", gap: 6, children: [
329
329
  /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
330
330
  /* @__PURE__ */ e(C, { color: "text.secondary", variant: "Body", children: a.name })
331
331
  ] }),
@@ -334,62 +334,62 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
334
334
  ] })
335
335
  ] });
336
336
  }), Et = ({ goalType: t, onClick: n }) => {
337
- const { goals: m } = S(), { bgcolor: c, icon: p, label: r, description: d, subTypes: s, type: _ } = t, [b, o] = T.useState(!1), a = s.length > 0;
338
- return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ l(L, { sx: { bgcolor: "background.paper" }, children: [
339
- /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
337
+ const { goals: _ } = S(), { bgcolor: l, icon: u, label: r, description: d, subTypes: s, type: p } = t, [h, o] = T.useState(!1), a = s.length > 0;
338
+ return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ c(L, { sx: { bgcolor: "background.paper" }, children: [
339
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
340
340
  M,
341
341
  {
342
- onClick: a ? () => o(!b) : () => n(
343
- _ === i.RETIREMENT_TRACK ? m.retirement : "",
344
- _ === i.RETIREMENT_TRACK ? Z.RETIREMENT : Z.OTHER,
345
- _
342
+ onClick: a ? () => o(!h) : () => n(
343
+ p === i.RETIREMENT_TRACK ? _.retirement : "",
344
+ p === i.RETIREMENT_TRACK ? Z.RETIREMENT : Z.OTHER,
345
+ p
346
346
  ),
347
347
  children: [
348
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: c }, variant: "rounded", children: /* @__PURE__ */ e(ge, { name: p, sx: { color: "grey.900" } }) }) }),
348
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: u, sx: { color: "grey.900" } }) }) }),
349
349
  /* @__PURE__ */ e(w, { primary: r, secondary: d, sx: { mr: 24 } }),
350
350
  !a && /* @__PURE__ */ e(V, {}),
351
- a && (b ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ e(Ze, {}))
351
+ a && (h ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ e(Ze, {}))
352
352
  ]
353
353
  }
354
354
  ) }),
355
- /* @__PURE__ */ e(x, { variant: "inset" }),
356
- a && /* @__PURE__ */ e(tt, { in: b, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: s.map((u, h) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ l(M, { onClick: () => n(u.label, u.metaType, _), children: [
357
- /* @__PURE__ */ e(nt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ge, { name: u.icon }) }),
355
+ /* @__PURE__ */ e(v, { variant: "inset" }),
356
+ a && /* @__PURE__ */ e(tt, { 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: [
357
+ /* @__PURE__ */ e(nt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: b.icon }) }),
358
358
  /* @__PURE__ */ e(
359
359
  w,
360
360
  {
361
- primary: u.label,
361
+ primary: b.label,
362
362
  primaryTypographyProps: { variant: "Body" }
363
363
  }
364
364
  ),
365
365
  /* @__PURE__ */ e(V, {})
366
- ] }) }, h)) }) })
366
+ ] }) }, m)) }) })
367
367
  ] }) });
368
368
  }, Be = ({
369
369
  accounts: t,
370
370
  isOpen: n,
371
- onClose: m,
372
- onSave: c,
373
- title: p
371
+ onClose: _,
372
+ onSave: l,
373
+ title: u
374
374
  }) => {
375
- const { goals: r, common: d } = S(), { config: s } = Ie(), [_, b] = T.useState([]), o = (a) => {
376
- const u = _.findIndex((f) => f.guid === a.guid), h = [..._];
377
- u >= 0 ? h.splice(u, 1) : h.push(a), b(h);
375
+ const { goals: r, common: d } = S(), { config: s } = pe(), [p, h] = T.useState([]), o = (a) => {
376
+ const b = p.findIndex((f) => f.guid === a.guid), m = [...p];
377
+ b >= 0 ? m.splice(b, 1) : m.push(a), h(m);
378
378
  };
379
- return /* @__PURE__ */ l(
379
+ return /* @__PURE__ */ c(
380
380
  J,
381
381
  {
382
382
  ariaLabelClose: d.close_aria,
383
383
  isOpen: n,
384
- onClose: m,
385
- onPrimaryAction: () => c(_),
386
- title: p,
384
+ onClose: _,
385
+ onPrimaryAction: () => l(p),
386
+ title: u,
387
387
  children: [
388
388
  /* @__PURE__ */ e(H, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: r.select_debt_accounts_description }),
389
- /* @__PURE__ */ l(L, { sx: { bgcolor: "background.white" }, children: [
390
- /* @__PURE__ */ e(x, { variant: "fullWidth" }),
391
- t.map((a, u) => /* @__PURE__ */ l(T.Fragment, { children: [
392
- /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => o(a), children: [
389
+ /* @__PURE__ */ c(L, { sx: { bgcolor: "background.white" }, children: [
390
+ /* @__PURE__ */ e(v, { variant: "fullWidth" }),
391
+ t.map((a, b) => /* @__PURE__ */ c(T.Fragment, { children: [
392
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(M, { onClick: () => o(a), children: [
393
393
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
394
394
  te,
395
395
  {
@@ -406,13 +406,13 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
406
406
  secondary: I(a.balance || 0, "0,0.00")
407
407
  }
408
408
  ),
409
- /* @__PURE__ */ e(at, { checked: _.some((h) => h.guid === a.guid) })
409
+ /* @__PURE__ */ e(at, { checked: p.some((m) => m.guid === a.guid) })
410
410
  ] }) }),
411
- /* @__PURE__ */ e(x, { variant: u < t.length - 1 ? "inset" : "fullWidth" })
411
+ /* @__PURE__ */ e(v, { variant: b < t.length - 1 ? "inset" : "fullWidth" })
412
412
  ] }, a.guid))
413
413
  ] }),
414
- /* @__PURE__ */ e(
415
- Ae,
414
+ s.show_connections_widget_in_master && /* @__PURE__ */ e(
415
+ Te,
416
416
  {
417
417
  description: r.connect_description,
418
418
  label: r.connect_button,
@@ -423,52 +423,52 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
423
423
  }
424
424
  );
425
425
  }, xt = ({ onClose: t }) => {
426
- const { goals: n } = S(), { addGoal: m, debtGoals: c, setAlert: p, setSelectedGoal: r } = G(), { config: d } = Ie(), { visibleDebtAccounts: s } = z(), [_, b] = T.useState(!1), o = Pe(n), a = (h, f, v) => {
427
- v === i.DEBT_TRACK ? b(!0) : r({
426
+ const { goals: n } = S(), { addGoal: _, debtGoals: l, setAlert: u, setSelectedGoal: r } = G(), { config: d } = pe(), { visibleDebtAccounts: s } = z(), [p, h] = T.useState(!1), o = Pe(n), a = (m, f, R) => {
427
+ R === i.DEBT_TRACK ? h(!0) : r({
428
428
  amount: 0,
429
429
  current_amount: 0,
430
- goal_type: le.SAVE_AMOUNT,
430
+ goal_type: ce.SAVE_AMOUNT,
431
431
  initial_amount: 0,
432
432
  meta_type: f,
433
- name: h,
434
- track_type: v
433
+ name: m,
434
+ track_type: R
435
435
  });
436
- }, u = async (h) => {
437
- for (const f of h) {
438
- let v = Z.CREDIT_CARD;
439
- f.account_type === fe.LOAN ? v = Z.LOANS : f.account_type === fe.LINE_OF_CREDIT && (v = Z.LINE_OF_CREDIT), await m({
436
+ }, b = async (m) => {
437
+ for (const f of m) {
438
+ let R = Z.CREDIT_CARD;
439
+ f.account_type === Ae.LOAN ? R = Z.LOANS : f.account_type === Ae.LINE_OF_CREDIT && (R = Z.LINE_OF_CREDIT), await _({
440
440
  account_guid: f.guid,
441
441
  amount: 0,
442
442
  current_amount: 0,
443
- goal_type: le.KEEP_BALANCE_BELOW,
443
+ goal_type: ce.KEEP_BALANCE_BELOW,
444
444
  initial_amount: f.balance || 0,
445
445
  interest_rate: f.interest_rate || 0,
446
- meta_type: v,
446
+ meta_type: R,
447
447
  monthly_payment: f.minimum_payment || 0,
448
448
  name: we(f, {
449
449
  allowNickname: d?.show_account_nicknames_in_master
450
450
  }),
451
451
  track_type: i.DEBT_TRACK
452
- }), p(n.alert_goal_added);
452
+ }), u(n.alert_goal_added);
453
453
  }
454
- b(!1), t?.(i.DEBT_TRACK);
454
+ h(!1), t?.(i.DEBT_TRACK);
455
455
  };
456
- return /* @__PURE__ */ l(g, { children: [
457
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((h, f) => /* @__PURE__ */ e(Et, { goalType: h, onClick: a }, f)) }),
456
+ return /* @__PURE__ */ c(g, { children: [
457
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((m, f) => /* @__PURE__ */ e(Et, { goalType: m, onClick: a }, f)) }),
458
458
  /* @__PURE__ */ e(
459
459
  Be,
460
460
  {
461
- accounts: s.filter((h) => !c.find((f) => f.account_guid === h.guid)),
462
- isOpen: _,
463
- onClose: () => b(!1),
464
- onSave: u,
461
+ accounts: s.filter((m) => !l.find((f) => f.account_guid === m.guid)),
462
+ isOpen: p,
463
+ onClose: () => h(!1),
464
+ onSave: b,
465
465
  title: n.select_debt_accounts_title
466
466
  }
467
467
  )
468
468
  ] });
469
469
  }, Oe = ({ account: t }) => {
470
470
  const n = ot(t);
471
- return /* @__PURE__ */ l(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
471
+ return /* @__PURE__ */ c(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
472
472
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
473
473
  te,
474
474
  {
@@ -485,10 +485,10 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
485
485
  )
486
486
  ] });
487
487
  }, vt = D(({ goal: t }) => {
488
- const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateGoal: p, updateRetirementGoal: r } = G(), [d, s] = T.useState(t.amount), _ = !t.guid, b = 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 () => {
489
- const h = { ...t, amount: d };
490
- t.amount = d, _ ? c(h) : (t.track_type !== i.RETIREMENT_TRACK ? await p(h) : await r(h), m(n.alert_goal_updated_amount));
491
- }, u = () => {
488
+ const { goals: n } = S(), { setAlert: _, setSelectedGoal: l, 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 () => {
489
+ const m = { ...t, amount: d };
490
+ t.amount = d, p ? l(m) : (t.track_type !== i.RETIREMENT_TRACK ? await u(m) : await r(m), _(n.alert_goal_updated_amount));
491
+ }, b = () => {
492
492
  setTimeout(() => {
493
493
  s(t.amount);
494
494
  }, 250);
@@ -497,102 +497,102 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
497
497
  q,
498
498
  {
499
499
  isDisabled: o,
500
- isSaveDisabled: b,
500
+ isSaveDisabled: h,
501
501
  label: n.details_amount_to_save,
502
- onCancel: u,
502
+ onCancel: b,
503
503
  onSave: a,
504
504
  primaryText: n.details_amount_to_save,
505
505
  secondaryText: I(t.amount, "0,0"),
506
- zeroStateText: _ && t.amount === 0 ? n.add_amount : void 0,
506
+ zeroStateText: p && t.amount === 0 ? n.add_amount : void 0,
507
507
  children: /* @__PURE__ */ e(
508
508
  ke,
509
509
  {
510
510
  amount: d,
511
511
  autoFocus: !0,
512
- error: b,
512
+ error: h,
513
513
  fullWidth: !0,
514
514
  minAmount: 0,
515
- setAmount: (h) => s(isNaN(Number(h)) ? d : Number(h)),
515
+ setAmount: (m) => s(isNaN(Number(m)) ? d : Number(m)),
516
516
  sx: { ".MuiTypography-Body": { p: 0 } }
517
517
  }
518
518
  )
519
519
  }
520
520
  );
521
521
  }), It = ({ goal: t }) => {
522
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: m } = z(), { accounts: c, goals: p } = S(), { setAlert: r, setSelectedGoal: d, updateGoal: s } = G(), _ = !t.guid, [b, o] = T.useState(!1), a = async ({ balance: u, guid: h }) => {
523
- const f = { ...t, account_guid: h, current_amount: u || 0 };
524
- _ ? d(f) : (await s(f), r(p.alert_account_changed)), o(!1);
522
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: _ } = z(), { accounts: l, goals: u } = S(), { config: r } = pe(), { setAlert: d, setSelectedGoal: s, updateGoal: p } = G(), h = !t.guid, [o, a] = T.useState(!1), b = async ({ balance: m, guid: f }) => {
523
+ const R = { ...t, account_guid: f, current_amount: m || 0 };
524
+ h ? s(R) : (await p(R), d(u.alert_account_changed)), a(!1);
525
525
  };
526
- return /* @__PURE__ */ l(g, { children: [
527
- _ && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(M, { onClick: () => o(!0), children: [
528
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
529
- /* @__PURE__ */ e(ve, { filled: !0 }),
530
- p.details_add_account
526
+ return /* @__PURE__ */ c(g, { children: [
527
+ h && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(M, { onClick: () => a(!0), children: [
528
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
529
+ /* @__PURE__ */ e(Ie, { filled: !0 }),
530
+ u.details_add_account
531
531
  ] }) }),
532
532
  /* @__PURE__ */ e(V, { color: "primary" })
533
- ] }) }) : /* @__PURE__ */ l(g, { sx: { gap: 8, my: 24, mx: 24 }, children: [
534
- /* @__PURE__ */ e(ue, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
533
+ ] }) }) : /* @__PURE__ */ c(g, { sx: { gap: 8, my: 24, mx: 24 }, children: [
534
+ /* @__PURE__ */ e(_e, { onClick: () => a(!0), variant: "text", children: u.details_change_account }),
535
535
  /* @__PURE__ */ e(
536
536
  C,
537
537
  {
538
538
  color: "text.secondary",
539
539
  sx: { textAlign: "center", whiteSpace: "wrap" },
540
540
  variant: "Paragraph",
541
- children: O(p.details_change_account_description, t.name)
541
+ children: O(u.details_change_account_description, t.name)
542
542
  }
543
543
  )
544
544
  ] }),
545
- /* @__PURE__ */ e(J, { isOpen: b, onClose: () => o(!1), title: p.details_change_account, children: /* @__PURE__ */ l(g, { children: [
546
- n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[1] }),
547
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((u) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => a(u), children: [
545
+ /* @__PURE__ */ e(J, { isOpen: o, onClose: () => a(!1), title: u.details_change_account, children: /* @__PURE__ */ c(g, { children: [
546
+ n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: l.account_types[1] }),
547
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((m) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(M, { onClick: () => b(m), children: [
548
548
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
549
549
  te,
550
550
  {
551
- alt: u?.name || "",
552
- institutionGuid: u?.institution_guid || ""
551
+ alt: m?.name || "",
552
+ institutionGuid: m?.institution_guid || ""
553
553
  }
554
554
  ) }),
555
555
  /* @__PURE__ */ e(
556
556
  w,
557
557
  {
558
- primary: u?.name || u?.feed_name,
559
- secondary: I(u?.balance || 0, "0,0.00")
558
+ primary: m?.name || m?.feed_name,
559
+ secondary: I(m?.balance || 0, "0,0.00")
560
560
  }
561
561
  ),
562
562
  /* @__PURE__ */ e(V, {})
563
- ] }) }, u.guid)) }),
564
- m.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[2] }),
565
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: m.map((u) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => a(u), children: [
563
+ ] }) }, m.guid)) }),
564
+ _.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: l.account_types[2] }),
565
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((m) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(M, { onClick: () => b(m), children: [
566
566
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
567
567
  te,
568
568
  {
569
- alt: u?.name || "",
570
- institutionGuid: u?.institution_guid || ""
569
+ alt: m?.name || "",
570
+ institutionGuid: m?.institution_guid || ""
571
571
  }
572
572
  ) }),
573
573
  /* @__PURE__ */ e(
574
574
  w,
575
575
  {
576
- primary: u?.name || u?.feed_name,
577
- secondary: I(u?.balance || 0, "0,0.00")
576
+ primary: m?.name || m?.feed_name,
577
+ secondary: I(m?.balance || 0, "0,0.00")
578
578
  }
579
579
  ),
580
580
  /* @__PURE__ */ e(V, {})
581
- ] }) }, u.guid)) }),
582
- /* @__PURE__ */ e(
583
- Ae,
581
+ ] }) }, m.guid)) }),
582
+ r.show_connections_widget_in_master && /* @__PURE__ */ e(
583
+ Te,
584
584
  {
585
- description: p.connect_description,
586
- label: p.connect_button,
587
- title: p.connect_title
585
+ description: u.connect_description,
586
+ label: u.connect_button,
587
+ title: u.connect_title
588
588
  }
589
589
  )
590
590
  ] }) })
591
591
  ] });
592
592
  }, Gt = D(({ goal: t }) => {
593
- const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateGoal: p } = G(), [r, d] = T.useState(t.name), s = !t.guid, _ = t.track_type === i.SAVINGS_TRACK && t.has_been_spent || t.track_type !== i.SAVINGS_TRACK && t.is_complete, b = async () => {
593
+ const { goals: n } = S(), { setAlert: _, setSelectedGoal: l, 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 () => {
594
594
  const a = { ...t, name: r };
595
- t.name = r, s ? c(a) : (await p(a), m(n.alert_goal_updated_name));
595
+ t.name = r, s ? l(a) : (await u(a), _(n.alert_goal_updated_name));
596
596
  }, o = () => {
597
597
  setTimeout(() => {
598
598
  d(t.name);
@@ -601,11 +601,11 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
601
601
  return /* @__PURE__ */ e(
602
602
  q,
603
603
  {
604
- isDisabled: _,
604
+ isDisabled: p,
605
605
  isSaveDisabled: !r,
606
606
  label: n.details_goal_name,
607
607
  onCancel: o,
608
- onSave: b,
608
+ onSave: h,
609
609
  primaryText: n.details_goal_name,
610
610
  secondaryText: t.name,
611
611
  children: /* @__PURE__ */ e(
@@ -621,12 +621,12 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
621
621
  }
622
622
  );
623
623
  }), Nt = ({ goal: t }) => {
624
- const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateRetirementGoal: p } = G(), [r, d] = T.useState(t.retirement_age || 65), s = !t.guid, _ = async () => {
624
+ const { goals: n } = S(), { setAlert: _, setSelectedGoal: l, updateRetirementGoal: u } = G(), [r, d] = T.useState(t.retirement_age || 65), s = !t.guid, p = async () => {
625
625
  if (!isNaN(r)) {
626
626
  const a = { ...t, retirement_age: r };
627
- t.retirement_age = r, s ? c(a) : (await p(a), m(n.alert_goal_updated_retirement_age));
627
+ t.retirement_age = r, s ? l(a) : (await u(a), _(n.alert_goal_updated_retirement_age));
628
628
  }
629
- }, b = () => {
629
+ }, h = () => {
630
630
  setTimeout(() => {
631
631
  d(t.retirement_age || 65);
632
632
  }, 250);
@@ -637,8 +637,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
637
637
  isDisabled: t.is_complete,
638
638
  isSaveDisabled: o,
639
639
  label: n.details_retirement_age,
640
- onCancel: b,
641
- onSave: _,
640
+ onCancel: h,
641
+ onSave: p,
642
642
  primaryText: n.details_retirement_age,
643
643
  secondaryText: `${t.retirement_age}`,
644
644
  zeroStateText: s && !t.retirement_age ? n.add_age : void 0,
@@ -655,25 +655,25 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
655
655
  }
656
656
  );
657
657
  }, kt = D(({ goal: t }) => {
658
- const { goals: n } = S(), { user: m, updateUser: c } = Ge(), { setAlert: p } = G(), [r, d] = T.useState(ne(m.birthday ?? 0)), [s, _] = T.useState(null), b = t.is_complete, o = async () => {
659
- r && ct(r) && (await c({ ...m, birthday: lt(r) }), p(n.alert_goal_updated_birthday));
658
+ const { goals: n } = S(), { user: _, updateUser: l } = Ge(), { setAlert: u } = G(), [r, d] = T.useState(ne(_.birthday ?? 0)), [s, p] = T.useState(null), h = t.is_complete, o = async () => {
659
+ r && lt(r) && (await l({ ..._, birthday: ct(r) }), u(n.alert_goal_updated_birthday));
660
660
  };
661
661
  return /* @__PURE__ */ e(
662
662
  q,
663
663
  {
664
- isDisabled: b,
664
+ isDisabled: h,
665
665
  isSaveDisabled: !!s,
666
666
  label: n.details_birthday,
667
667
  onSave: o,
668
668
  primaryText: n.details_birthday,
669
- secondaryText: `${he(ne(m.birthday ?? 0), be.MONTH_DAY_YEAR)}`,
670
- zeroStateText: !t.guid && !m.birthday ? n.add_birthday : void 0,
671
- children: /* @__PURE__ */ e(ut, { dateAdapter: dt, children: /* @__PURE__ */ e(
669
+ secondaryText: `${be(ne(_.birthday ?? 0), ye.MONTH_DAY_YEAR)}`,
670
+ zeroStateText: !t.guid && !_.birthday ? n.add_birthday : void 0,
671
+ children: /* @__PURE__ */ e(_t, { dateAdapter: dt, children: /* @__PURE__ */ e(
672
672
  mt,
673
673
  {
674
674
  label: n.details_birthday,
675
675
  onChange: d,
676
- onError: (a) => _(a),
676
+ onError: (a) => p(a),
677
677
  sx: { width: "100%" },
678
678
  value: r
679
679
  }
@@ -681,41 +681,41 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
681
681
  }
682
682
  );
683
683
  }), wt = ({ goal: t }) => {
684
- const { goals: n } = S(), { visibleRetirementAccounts: m } = z(), {
685
- addRetirementGoalAccount: c,
686
- newRetirementGoalAccounts: p,
684
+ const { goals: n } = S(), { visibleRetirementAccounts: _ } = z(), {
685
+ addRetirementGoalAccount: l,
686
+ newRetirementGoalAccounts: u,
687
687
  retirementGoalAccounts: r,
688
688
  selectedGoal: d,
689
689
  setAlert: s,
690
- setNewRetirementGoalAccounts: _,
691
- setSelectedGoal: b
692
- } = G(), [o, a] = T.useState(!1), u = !t.guid, h = m.filter(
693
- (y) => u ? p.find((A) => A.account_guid === y.guid) : r.find((A) => A.account_guid === y.guid)
694
- ), f = m.filter(
690
+ setNewRetirementGoalAccounts: p,
691
+ setSelectedGoal: h
692
+ } = G(), [o, a] = T.useState(!1), b = !t.guid, m = _.filter(
693
+ (y) => b ? u.find((A) => A.account_guid === y.guid) : r.find((A) => A.account_guid === y.guid)
694
+ ), f = _.filter(
695
695
  (y) => !r.find((A) => A.account_guid === y.guid)
696
- ), v = async (y) => {
697
- const A = y.map((R) => ({
698
- account_guid: R.guid,
696
+ ), R = async (y) => {
697
+ const A = y.map((E) => ({
698
+ account_guid: E.guid,
699
699
  retirement_goal_guid: t.guid
700
700
  }));
701
- if (u)
702
- _(A);
701
+ if (b)
702
+ p(A);
703
703
  else
704
- for (const R of A)
705
- await c(R), s(n.alert_account_added);
706
- b({
704
+ for (const E of A)
705
+ await l(E), s(n.alert_account_added);
706
+ h({
707
707
  ...d,
708
- current_amount: y.reduce((R, N) => R + (N.balance || 0), 0)
708
+ current_amount: y.reduce((E, N) => E + (N.balance || 0), 0)
709
709
  }), a(!1);
710
710
  };
711
- return /* @__PURE__ */ l(g, { children: [
712
- h.map((y) => /* @__PURE__ */ l(g, { children: [
711
+ return /* @__PURE__ */ c(g, { children: [
712
+ m.map((y) => /* @__PURE__ */ c(g, { children: [
713
713
  /* @__PURE__ */ e(Oe, { account: y }),
714
- /* @__PURE__ */ e(x, {})
714
+ /* @__PURE__ */ e(v, {})
715
715
  ] }, y.guid)),
716
- /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(M, { onClick: () => a(!0), children: [
717
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
718
- /* @__PURE__ */ e(ve, { filled: !0 }),
716
+ /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(M, { onClick: () => a(!0), children: [
717
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
718
+ /* @__PURE__ */ e(Ie, { filled: !0 }),
719
719
  n.details_add_account
720
720
  ] }) }),
721
721
  /* @__PURE__ */ e(V, { color: "primary" })
@@ -726,175 +726,175 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
726
726
  accounts: f,
727
727
  isOpen: o,
728
728
  onClose: () => a(!1),
729
- onSave: v,
729
+ onSave: R,
730
730
  title: n.add_select_accounts
731
731
  }
732
732
  )
733
733
  ] });
734
734
  }, Dt = D(({ goal: t }) => {
735
- const { goals: n } = S(), { visibleAccounts: m } = z(), c = T.useMemo(
736
- () => m.find((d) => d.guid === t.account_guid),
737
- [m, t]
738
- ), p = t.track_type;
735
+ const { goals: n } = S(), { visibleAccounts: _ } = z(), l = T.useMemo(
736
+ () => _.find((d) => d.guid === t.account_guid),
737
+ [_, t]
738
+ ), u = t.track_type;
739
739
  let r = n.details_save_title;
740
- 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(g, { children: [
741
- /* @__PURE__ */ l(g, { mx: 24, children: [
740
+ return t.track_type === i.DEBT_TRACK ? r = n.details_debt_title : t.track_type === i.RETIREMENT_TRACK && (r = n.details_retirement_title), /* @__PURE__ */ c(g, { children: [
741
+ /* @__PURE__ */ c(g, { mx: 24, children: [
742
742
  /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: r }),
743
743
  /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
744
744
  /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
745
745
  ] }),
746
- /* @__PURE__ */ l(L, { sx: { bgcolor: "background.paper" }, children: [
747
- p !== i.RETIREMENT_TRACK ? /* @__PURE__ */ e(Gt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
746
+ /* @__PURE__ */ c(L, { sx: { bgcolor: "background.paper" }, children: [
747
+ u !== i.RETIREMENT_TRACK ? /* @__PURE__ */ e(Gt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
748
748
  w,
749
749
  {
750
- primary: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
750
+ primary: /* @__PURE__ */ c(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
751
751
  /* @__PURE__ */ e(C, { variant: "body1", children: n.details_goal_name }),
752
752
  /* @__PURE__ */ e(C, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
753
753
  ] }),
754
754
  primaryTypographyProps: { variant: "body1" }
755
755
  }
756
756
  ) }),
757
- /* @__PURE__ */ e(x, { sx: { ml: 24 } }),
758
- (p === i.SAVINGS_TRACK || p === i.RETIREMENT_TRACK) && /* @__PURE__ */ l($, { children: [
757
+ /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
758
+ (u === i.SAVINGS_TRACK || u === i.RETIREMENT_TRACK) && /* @__PURE__ */ c($, { children: [
759
759
  /* @__PURE__ */ e(vt, { goal: t }),
760
- /* @__PURE__ */ e(x, { sx: { ml: p === i.RETIREMENT_TRACK ? 24 : 0 } })
760
+ /* @__PURE__ */ e(v, { sx: { ml: u === i.RETIREMENT_TRACK ? 24 : 0 } })
761
761
  ] }),
762
- t.track_type === i.DEBT_TRACK && /* @__PURE__ */ l($, { children: [
762
+ t.track_type === i.DEBT_TRACK && /* @__PURE__ */ c($, { children: [
763
763
  /* @__PURE__ */ e(rt, { goal: t }),
764
- /* @__PURE__ */ e(x, { sx: { ml: 24 } }),
764
+ /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
765
765
  /* @__PURE__ */ e(it, { goal: t }),
766
- /* @__PURE__ */ e(x, { sx: { ml: 24 } }),
766
+ /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
767
767
  /* @__PURE__ */ e(st, { goal: t }),
768
- /* @__PURE__ */ e(x, { variant: "fullWidth" })
768
+ /* @__PURE__ */ e(v, { variant: "fullWidth" })
769
769
  ] }),
770
- t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ l($, { children: [
770
+ t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ c($, { children: [
771
771
  /* @__PURE__ */ e(Nt, { goal: t }),
772
- /* @__PURE__ */ e(x, { sx: { ml: 24 } }),
772
+ /* @__PURE__ */ e(v, { sx: { ml: 24 } }),
773
773
  /* @__PURE__ */ e(kt, { goal: t }),
774
- /* @__PURE__ */ e(x, { variant: "fullWidth" })
774
+ /* @__PURE__ */ e(v, { variant: "fullWidth" })
775
775
  ] })
776
776
  ] }),
777
777
  /* @__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 }),
778
- t.track_type !== i.RETIREMENT_TRACK && c && /* @__PURE__ */ l($, { children: [
779
- /* @__PURE__ */ e(Oe, { account: c }),
780
- /* @__PURE__ */ e(x, {})
778
+ t.track_type !== i.RETIREMENT_TRACK && l && /* @__PURE__ */ c($, { children: [
779
+ /* @__PURE__ */ e(Oe, { account: l }),
780
+ /* @__PURE__ */ e(v, {})
781
781
  ] }),
782
- t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ l($, { children: [
782
+ t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ c($, { children: [
783
783
  /* @__PURE__ */ e(wt, { goal: t }),
784
- /* @__PURE__ */ e(x, {})
784
+ /* @__PURE__ */ e(v, {})
785
785
  ] }),
786
786
  t.track_type === i.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(It, { goal: t })
787
787
  ] });
788
788
  }), Kt = D(({ onClose: t }) => {
789
- const { visibleRetirementAccounts: n } = z(), { goals: m, common: c } = S(), {
790
- addGoal: p,
789
+ const { visibleRetirementAccounts: n } = z(), { goals: _, common: l } = S(), {
790
+ addGoal: u,
791
791
  addRetirementGoal: r,
792
792
  deleteGoal: d,
793
793
  deleteRetirementGoal: s,
794
- newRetirementGoalAccounts: _,
795
- retirementGoalAccounts: b,
794
+ newRetirementGoalAccounts: p,
795
+ retirementGoalAccounts: h,
796
796
  selectedGoal: o,
797
797
  setAlert: a,
798
- setSelectedGoal: u,
799
- updateGoal: h
800
- } = G(), { user: f } = Ge(), [v, y] = T.useState(!1), A = !o?.guid, R = o?.track_type === i.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, N = T.useMemo(() => {
801
- const E = A ? _ : b;
802
- return n.filter((j) => E.some((F) => F.account_guid === j.guid));
803
- }, [A, n, _, b]), K = T.useMemo(() => {
798
+ setSelectedGoal: b,
799
+ updateGoal: m
800
+ } = G(), { user: f } = Ge(), [R, y] = T.useState(!1), A = !o?.guid, E = o?.track_type === i.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, N = T.useMemo(() => {
801
+ const x = A ? p : h;
802
+ return n.filter((j) => x.some((F) => F.account_guid === j.guid));
803
+ }, [A, n, p, h]), K = T.useMemo(() => {
804
804
  if (!o) return !1;
805
- if (!A && !R) return !0;
806
- const { account_guid: E, track_type: j, name: F, amount: ee, retirement_age: B } = o;
807
- return j === i.SAVINGS_TRACK ? E ? !!F && !!ee : !1 : j === i.RETIREMENT_TRACK ? N.length ? !!F && !!ee && !!B && !!f.birthday : !1 : !0;
805
+ if (!A && !E) return !0;
806
+ const { account_guid: x, track_type: j, name: F, amount: ee, retirement_age: B } = o;
807
+ return j === i.SAVINGS_TRACK ? x ? !!F && !!ee : !1 : j === i.RETIREMENT_TRACK ? N.length ? !!F && !!ee && !!B && !!f.birthday : !1 : !0;
808
808
  }, [o, N, f.birthday]);
809
- let U = c.delete_button, Y = () => y(!0);
810
- A ? (Y = () => oe(), U = c.save_button) : R && (Y = () => Q(), U = m.mark_as_complete_button);
809
+ let U = l.delete_button, Y = () => y(!0);
810
+ A ? (Y = () => oe(), U = l.save_button) : E && (Y = () => Q(), U = _.mark_as_complete_button);
811
811
  const oe = async () => {
812
812
  if (o) {
813
- const E = o.track_type;
814
- E !== i.RETIREMENT_TRACK ? await p(o) : E === i.RETIREMENT_TRACK && await r({ ...o, target_amount: o.amount }), a(m.alert_goal_added), u(void 0), E && t?.(E);
813
+ const x = o.track_type;
814
+ x !== i.RETIREMENT_TRACK ? await u(o) : x === i.RETIREMENT_TRACK && await r({ ...o, target_amount: o.amount }), a(_.alert_goal_added), b(void 0), x && t?.(x);
815
815
  }
816
816
  }, W = async () => {
817
- o && (o.track_type !== i.RETIREMENT_TRACK ? await d(o.guid) : o.track_type === i.RETIREMENT_TRACK && await s(o), a(m.alert_goal_deleted), u(void 0));
817
+ 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));
818
818
  }, Q = async () => {
819
- const E = {
819
+ const x = {
820
820
  ...o,
821
821
  has_been_spent: !0
822
822
  };
823
- await h(E), a(m.alert_goal_completed), u(void 0);
823
+ await m(x), a(_.alert_goal_completed), b(void 0);
824
824
  };
825
- return /* @__PURE__ */ l(g, { children: [
825
+ return /* @__PURE__ */ c(g, { children: [
826
826
  /* @__PURE__ */ e(
827
827
  J,
828
828
  {
829
- ariaLabelClose: c.close_aria,
829
+ ariaLabelClose: l.close_aria,
830
830
  hasSecondaryAction: A,
831
831
  isOpen: !!o,
832
832
  isPrimaryDisabled: !K,
833
- onClose: () => u(void 0),
833
+ onClose: () => b(void 0),
834
834
  onPrimaryAction: Y,
835
- primaryColor: A || R ? "primary" : "error",
835
+ primaryColor: A || E ? "primary" : "error",
836
836
  primaryText: U,
837
837
  secondaryColor: "primary",
838
- title: m.goal_details,
838
+ title: _.goal_details,
839
839
  children: o && /* @__PURE__ */ e(Dt, { goal: o })
840
840
  }
841
841
  ),
842
842
  /* @__PURE__ */ e(
843
843
  et,
844
844
  {
845
- copy: { close_aria: c.close_aria, title: m.delete_goal },
846
- isOpen: v,
845
+ copy: { close_aria: l.close_aria, title: _.delete_goal },
846
+ isOpen: R,
847
847
  maxWidth: "xs",
848
848
  onClose: () => y(!1),
849
849
  onPrimaryAction: W,
850
850
  primaryColor: "error",
851
- primaryText: c.delete_button,
852
- children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: O(m.delete_description, o?.name || "") })
851
+ primaryText: l.delete_button,
852
+ children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: O(_.delete_description, o?.name || "") })
853
853
  }
854
854
  )
855
855
  ] });
856
856
  }), Pn = D(({ onBackClick: t, sx: n }) => {
857
- const { onEvent: m } = Ne(), { isMobile: c } = pe(), { isAccountDataLoaded: p, loadAccountData: r } = z(), { isInitialized: d } = _e(), { goals: s, common: _ } = S(), {
858
- alert: b,
857
+ const { onEvent: _ } = Ne(), { isMobile: l } = he(), { isAccountDataLoaded: u, loadAccountData: r } = z(), { isInitialized: d } = ue(), { goals: s, common: p } = S(), {
858
+ alert: h,
859
859
  goals: o,
860
860
  isAllGoalDataLoaded: a,
861
- loadGoalData: u,
862
- monthlyCashFlowProfile: h,
861
+ loadGoalData: b,
862
+ monthlyCashFlowProfile: m,
863
863
  setAlert: f,
864
- retirmentGoals: v
865
- } = G(), [y, A] = T.useState(0), [R, N] = T.useState(!1), K = h?.amount_allocated_for_savings_goals || 0, U = h?.amount_allocated_for_debt_goals || 0, Y = h?.amount_allocated_for_retirement_goals || 0;
864
+ retirmentGoals: R
865
+ } = G(), [y, A] = T.useState(0), [E, 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;
866
866
  Ke({
867
867
  widgetName: "GoalsWidget",
868
868
  isLoaded: a
869
869
  }), T.useEffect(() => {
870
- p || r().finally(), m(X.GOALS_VIEW);
870
+ u || r().finally(), _(X.GOALS_VIEW);
871
871
  }, []), T.useEffect(() => {
872
- d && u().finally();
872
+ d && b().finally();
873
873
  }, [d]);
874
874
  const oe = () => {
875
- m(X.GOALS_CLICK_FILTER);
875
+ _(X.GOALS_CLICK_FILTER);
876
876
  }, W = () => {
877
- N(!0), m(X.GOALS_CLICK_ADD);
877
+ N(!0), _(X.GOALS_CLICK_ADD);
878
878
  }, Q = (B) => {
879
879
  N(!1), B === i.SAVINGS_TRACK ? A(0) : B === i.DEBT_TRACK ? A(1) : B === i.RETIREMENT_TRACK && A(2);
880
- }, E = T.useMemo(
881
- () => a && (o.length === 0 || o.every(({ track_type: B }) => !B) && v.length === 0),
882
- [o, a, v]
880
+ }, x = T.useMemo(
881
+ () => a && (o.length === 0 || o.every(({ track_type: B }) => !B) && R.length === 0),
882
+ [o, a, R]
883
883
  );
884
884
  if (!d || !a)
885
885
  return /* @__PURE__ */ e(Me, {});
886
886
  const j = O(
887
- c ? s.tab_subtitle_mobile : s.tab_subtitle,
887
+ l ? s.tab_subtitle_mobile : s.tab_subtitle,
888
888
  I(K, "0,0")
889
889
  ), F = O(
890
- c ? s.tab_subtitle_mobile : s.tab_subtitle,
890
+ l ? s.tab_subtitle_mobile : s.tab_subtitle,
891
891
  I(U, "0,0")
892
892
  ), ee = O(
893
- c ? s.tab_subtitle_mobile : s.tab_subtitle,
893
+ l ? s.tab_subtitle_mobile : s.tab_subtitle,
894
894
  I(Y, "0,0")
895
895
  );
896
- return /* @__PURE__ */ l(
897
- _t,
896
+ return /* @__PURE__ */ c(
897
+ ut,
898
898
  {
899
899
  actions: [
900
900
  {
@@ -908,41 +908,41 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
908
908
  sx: n,
909
909
  title: s.title,
910
910
  children: [
911
- /* @__PURE__ */ l(g, { mx: c ? 0 : 48, my: 24, children: [
912
- /* @__PURE__ */ l(
911
+ /* @__PURE__ */ c(g, { mx: l ? 0 : 48, my: 24, children: [
912
+ /* @__PURE__ */ c(
913
913
  Fe,
914
914
  {
915
915
  onChange: (B, We) => A(We),
916
916
  sx: { bgcolor: "background.paper" },
917
917
  textColor: "primary",
918
- value: E ? !1 : y,
918
+ value: x ? !1 : y,
919
919
  variant: "fullWidth",
920
920
  children: [
921
921
  /* @__PURE__ */ e(
922
922
  re,
923
923
  {
924
- disabled: E,
924
+ disabled: x,
925
925
  label: /* @__PURE__ */ e(ie, { subtitle: j, title: s.tab_saving_title })
926
926
  }
927
927
  ),
928
928
  /* @__PURE__ */ e(
929
929
  re,
930
930
  {
931
- disabled: E,
931
+ disabled: x,
932
932
  label: /* @__PURE__ */ e(ie, { subtitle: F, title: s.tab_debt_title })
933
933
  }
934
934
  ),
935
935
  /* @__PURE__ */ e(
936
936
  re,
937
937
  {
938
- disabled: E,
938
+ disabled: x,
939
939
  label: /* @__PURE__ */ e(ie, { subtitle: ee, title: s.tab_retirement_title })
940
940
  }
941
941
  )
942
942
  ]
943
943
  }
944
944
  ),
945
- E ? /* @__PURE__ */ e(
945
+ x ? /* @__PURE__ */ e(
946
946
  pt,
947
947
  {
948
948
  header: s.create_goals_header,
@@ -957,7 +957,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
957
957
  }
958
958
  }
959
959
  }
960
- ) : /* @__PURE__ */ l($, { children: [
960
+ ) : /* @__PURE__ */ c($, { children: [
961
961
  y === 0 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.SAVINGS_TRACK }),
962
962
  y === 1 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.DEBT_TRACK }),
963
963
  y === 2 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.RETIREMENT_TRACK })
@@ -967,36 +967,36 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
967
967
  /* @__PURE__ */ e(
968
968
  J,
969
969
  {
970
- ariaLabelClose: _.close_aria,
971
- isOpen: R,
970
+ ariaLabelClose: p.close_aria,
971
+ isOpen: E,
972
972
  onClose: () => N(!1),
973
973
  title: s.add_goal_title,
974
974
  children: /* @__PURE__ */ e(xt, { onClose: Q })
975
975
  }
976
976
  ),
977
- /* @__PURE__ */ e(je, { onClose: () => f(""), open: !!b, children: /* @__PURE__ */ e(ze, { onClose: () => f(""), severity: "success", variant: "filled", children: b }) })
977
+ /* @__PURE__ */ e(je, { onClose: () => f(""), open: !!h, children: /* @__PURE__ */ e(ze, { onClose: () => f(""), severity: "success", variant: "filled", children: h }) })
978
978
  ]
979
979
  }
980
980
  );
981
981
  }), Mt = D(({ goal: t }) => {
982
- const { goals: n } = S(), m = yt(), {
983
- backgroundColor: c,
984
- color: p,
982
+ const { goals: n } = S(), _ = yt(), {
983
+ backgroundColor: l,
984
+ color: u,
985
985
  percentage: r,
986
986
  projectedText: d
987
987
  } = de(n, t), s = Math.round(r * 100);
988
- let _ = /* @__PURE__ */ e(Re, {});
989
- return t.track_type === i.DEBT_TRACK ? _ = /* @__PURE__ */ e(Ee, {}) : t.track_type === i.RETIREMENT_TRACK && (_ = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
990
- /* @__PURE__ */ e(ae, { sx: { bgcolor: c, color: p, height: 32, width: 32 }, variant: "rounded", children: _ }),
991
- /* @__PURE__ */ l(bt, { sx: { width: "100%" }, children: [
988
+ let p = /* @__PURE__ */ e(Ee, {});
989
+ return t.track_type === i.DEBT_TRACK ? p = /* @__PURE__ */ e(xe, {}) : t.track_type === i.RETIREMENT_TRACK && (p = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ c(g, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
990
+ /* @__PURE__ */ e(ae, { sx: { bgcolor: l, color: u, height: 32, width: 32 }, variant: "rounded", children: p }),
991
+ /* @__PURE__ */ c(bt, { sx: { width: "100%" }, children: [
992
992
  /* @__PURE__ */ e(me, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
993
993
  t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: d })
994
994
  ] }),
995
995
  /* @__PURE__ */ e(
996
996
  gt,
997
997
  {
998
- backgroundStrokeColor: m.palette.border.lighter,
999
- color: m.palette.primary.main,
998
+ backgroundStrokeColor: _.palette.border.lighter,
999
+ color: _.palette.primary.main,
1000
1000
  percent: s,
1001
1001
  size: 40,
1002
1002
  strokeWidth: 3,
@@ -1004,14 +1004,14 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
1004
1004
  }
1005
1005
  )
1006
1006
  ] });
1007
- }), Lt = ({ header: t, subText: n, sx: m }) => /* @__PURE__ */ l(
1007
+ }), Lt = ({ header: t, subText: n, sx: _ }) => /* @__PURE__ */ c(
1008
1008
  g,
1009
1009
  {
1010
1010
  sx: {
1011
1011
  alignItems: "center",
1012
1012
  alignSelf: "center",
1013
1013
  px: 24,
1014
- ...m
1014
+ ..._
1015
1015
  },
1016
1016
  children: [
1017
1017
  /* @__PURE__ */ e(qe, { size: 32 }),
@@ -1028,26 +1028,26 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
1028
1028
  ]
1029
1029
  }
1030
1030
  ), zn = D(({ onCTAClick: t }) => {
1031
- const { isAccountDataLoaded: n, loadAccountData: m, visibleAccounts: c } = z(), { onEvent: p } = Ne(), { goals: r } = S(), { isInitialized: d } = _e(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: _, loadGoalData: b } = G();
1031
+ const { isAccountDataLoaded: n, loadAccountData: _, visibleAccounts: l } = z(), { onEvent: u } = Ne(), { goals: r } = S(), { isInitialized: d } = ue(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: p, loadGoalData: h } = G();
1032
1032
  Ke({
1033
1033
  widgetName: "GoalsMicroWidget",
1034
- isLoaded: _
1034
+ isLoaded: p
1035
1035
  }), T.useEffect(() => {
1036
- n || m().finally();
1036
+ n || _().finally();
1037
1037
  }, []), T.useEffect(() => {
1038
- d && (b().finally(), p(X.GOALS_LOAD_WIDGET, {
1039
- state: c?.length ? "default" : "zeroState"
1038
+ d && (h().finally(), u(X.GOALS_LOAD_WIDGET, {
1039
+ state: l?.length ? "default" : "zeroState"
1040
1040
  }));
1041
1041
  }, [d]);
1042
1042
  const o = T.useMemo(
1043
- () => _ && s.length === 0,
1044
- [s, _]
1043
+ () => p && s.length === 0,
1044
+ [s, p]
1045
1045
  ), a = () => {
1046
- p(
1046
+ u(
1047
1047
  o ? X.GOALS_CLICK_GET_STARTED : X.GOALS_CLICK_VIEW_DETAILS
1048
1048
  ), t();
1049
1049
  };
1050
- return !d || !_ ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1050
+ return !d || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1051
1051
  ft,
1052
1052
  {
1053
1053
  className: "mx-goals-microwidget",
@@ -1060,10 +1060,10 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
1060
1060
  header: r.create_goals_header,
1061
1061
  subText: r.micro_zero_state_description
1062
1062
  }
1063
- ) : /* @__PURE__ */ e(ht, { sx: { justifyContent: "space-between" }, children: s.map((u, h) => /* @__PURE__ */ l(T.Fragment, { children: [
1064
- /* @__PURE__ */ e(Mt, { goal: u }),
1065
- h !== s.length - 1 && /* @__PURE__ */ e(x, {})
1066
- ] }, u.guid)) })
1063
+ ) : /* @__PURE__ */ e(ht, { sx: { justifyContent: "space-between" }, children: s.map((b, m) => /* @__PURE__ */ c(T.Fragment, { children: [
1064
+ /* @__PURE__ */ e(Mt, { goal: b }),
1065
+ m !== s.length - 1 && /* @__PURE__ */ e(v, {})
1066
+ ] }, b.guid)) })
1067
1067
  }
1068
1068
  );
1069
1069
  });