@mx-cartographer/experiences 7.0.13 → 7.0.14-alpha-debts-missing-sorting-option-ram1

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 (41) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{AccountDetailsContent-Tm7IjJIc.mjs → AccountDetailsContent-BzD6CDIm.mjs} +3 -3
  3. package/dist/{AccountDetailsHeader-sum_Bgdy.mjs → AccountDetailsHeader-Eb3WvBGm.mjs} +1 -1
  4. package/dist/{CategorySelectorDrawer-BPvjZ-Xo.mjs → CategorySelectorDrawer-BJ9jlCyt.mjs} +1 -1
  5. package/dist/{DebtsStore-Dp-CraCD.mjs → DebtsStore-VkyMADzd.mjs} +18 -15
  6. package/dist/{Help-B3oENhkG.mjs → Help-KAAMEubC.mjs} +1 -1
  7. package/dist/Loader-DUaFpDGv.mjs +24 -0
  8. package/dist/{ManageIncome-Bef4VWt7.mjs → ManageIncome-DcKHpJ9V.mjs} +2 -2
  9. package/dist/{NotificationSettings-uXVwpIa1.mjs → NotificationSettings-aZFVTc8B.mjs} +1 -1
  10. package/dist/{RecurringSettings-1EOh67IT.mjs → RecurringSettings-C9r4s1Cz.mjs} +2 -2
  11. package/dist/{TransactionDetails-DYF-P762.mjs → TransactionDetails-bja6hKJk.mjs} +3 -3
  12. package/dist/{ViewMoreMicroCard-BZI5VMNW.mjs → ViewMoreMicroCard-BPEzFZRG.mjs} +1 -1
  13. package/dist/{WidgetContainer-C2NBfpDg.mjs → WidgetContainer-CdBs9WOZ.mjs} +1 -1
  14. package/dist/accounts/index.es.js +5 -5
  15. package/dist/analytics/index.es.js +1 -1
  16. package/dist/budgets/index.es.js +5 -5
  17. package/dist/cashflow/index.es.js +5 -5
  18. package/dist/categories/index.es.js +1 -1
  19. package/dist/common/index.es.js +3 -3
  20. package/dist/common/types/localization/DebtsCopy.d.ts +1 -0
  21. package/dist/debts/constants/index.d.ts +7 -4
  22. package/dist/debts/index.es.js +544 -482
  23. package/dist/debts/store/DebtsUiStore.d.ts +3 -3
  24. package/dist/debts/utils/DebtsWidget.d.ts +2 -2
  25. package/dist/debts/utils/SnowballCard.d.ts +2 -2
  26. package/dist/debts/utils/shared.d.ts +11 -2
  27. package/dist/finstrong/index.es.js +3 -3
  28. package/dist/goals/index.es.js +4 -4
  29. package/dist/help/index.es.js +3 -3
  30. package/dist/investments/index.es.js +2 -2
  31. package/dist/merchants/index.es.js +1 -1
  32. package/dist/microinsights/index.es.js +1 -1
  33. package/dist/networth/index.es.js +2 -2
  34. package/dist/notifications/index.es.js +2 -2
  35. package/dist/recurringtransactions/index.es.js +6 -6
  36. package/dist/settings/index.es.js +6 -6
  37. package/dist/spending/index.es.js +3 -3
  38. package/dist/transactions/index.es.js +5 -5
  39. package/dist/trends/index.es.js +4 -4
  40. package/package.json +1 -1
  41. package/dist/Loader-Dp1P2gNw.mjs +0 -14
@@ -1,111 +1,168 @@
1
1
  import { jsx as e, jsxs as s, Fragment as L } from "react/jsx-runtime";
2
- import y from "react";
2
+ import x from "react";
3
3
  import { observer as S } from "mobx-react-lite";
4
- import f from "@mui/material/Stack";
5
- import { useTheme as j, Card as me, Stack as _, Box as O } from "@mui/material";
6
- import { Text as i, H3 as we, InstitutionLogo as Ce, Icon as ee } from "@mxenabled/mxui";
7
- import { intervalToDuration as Se, formatDuration as De } from "date-fns";
8
- import { D as $ } from "../DebtsStore-Dp-CraCD.mjs";
9
- import { a as Sr } from "../DebtsStore-Dp-CraCD.mjs";
10
- import { f as B, a as ve } from "../NumberFormatting-CtWHhyBX.mjs";
4
+ import g from "@mui/material/Stack";
5
+ import { useTheme as j, Card as be, Stack as _, Box as O } from "@mui/material";
6
+ import { Text as l, H3 as ve, InstitutionLogo as De, Icon as ee } from "@mxenabled/mxui";
7
+ import { getUnixTime as le, addMonths as se, fromUnixTime as ce, intervalToDuration as Te, formatDuration as Ae } from "date-fns";
8
+ import { D as M, M as Ee, I as Ie } from "../DebtsStore-VkyMADzd.mjs";
9
+ import { a as Pr } from "../DebtsStore-VkyMADzd.mjs";
10
+ import { f as P, a as Be } from "../NumberFormatting-CtWHhyBX.mjs";
11
11
  import { f as K, D as U } from "../Dialog-CWW597AF.mjs";
12
- import { G as Te, x as q, u as C, j as z, e as M, c as Z, a as Ae } from "../hooks-DkUqN6JE.mjs";
12
+ import { G as Me, x as q, u as C, j as z, e as k, c as Z, a as Pe } from "../hooks-DkUqN6JE.mjs";
13
13
  import { u as X } from "../useScreenSize-B6JyS_Lj.mjs";
14
14
  import { D as te } from "../Drawer-kEE73B87.mjs";
15
- import { b as T } from "../Localization-2MODESHW.mjs";
16
- import { A as Ee, u as Ie } from "../AccountDetailsHeader-sum_Bgdy.mjs";
17
- import Be from "@mui/material/Card";
18
- import Me from "@mui/material/CardContent";
19
- import ke from "@mui/material/CardHeader";
20
- import { LineChart as Pe } from "@mui/x-charts";
15
+ import { b as A } from "../Localization-2MODESHW.mjs";
16
+ import { A as ke, u as Fe } from "../AccountDetailsHeader-Eb3WvBGm.mjs";
17
+ import Ne from "@mui/material/Card";
18
+ import Re from "@mui/material/CardContent";
19
+ import Le from "@mui/material/CardHeader";
20
+ import { LineChart as $e } from "@mui/x-charts";
21
21
  import re from "@mui/material/Box";
22
- import { useTheme as Ne } from "@mui/material/styles";
23
- import { A as v, W as Re } from "../WidgetContainer-C2NBfpDg.mjs";
24
- import le from "@mui/material/Tab";
25
- import $e from "@mui/material/Tabs";
26
- import he from "@mui/material/List";
22
+ import { useTheme as He } from "@mui/material/styles";
23
+ import { A as T, W as Oe } from "../WidgetContainer-CdBs9WOZ.mjs";
24
+ import de from "@mui/material/Tab";
25
+ import We from "@mui/material/Tabs";
26
+ import _e from "@mui/material/List";
27
27
  import W from "@mui/material/Divider";
28
- import { M as Le, I as He, O as Fe } from "../OriginalBalanceAction-DepsKiJz.mjs";
29
- import Oe from "@mui/material/TextField";
28
+ import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-DepsKiJz.mjs";
29
+ import Xe from "@mui/material/TextField";
30
30
  import { L as J } from "../ListItemAction-DNZZ5fSa.mjs";
31
31
  import { C as ae } from "../CurrencyInput-bEx2Mbd0.mjs";
32
- import se from "@mui/material/Alert";
33
- import ce from "@mui/material/AlertTitle";
34
- import de from "@mui/material/Paper";
35
- import { Error as We, CheckCircle as ue } from "@mxenabled/mx-icons";
36
- import { T as pe } from "../TabContentContainer-j01JYR_7.mjs";
37
- import { DataGridPro as Ge } from "@mui/x-data-grid-pro";
32
+ import pe from "@mui/material/Alert";
33
+ import me from "@mui/material/AlertTitle";
34
+ import he from "@mui/material/Paper";
35
+ import { Error as Ve, CheckCircle as ye } from "@mxenabled/mx-icons";
36
+ import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
37
+ import { DataGridPro as Ye } from "@mui/x-data-grid-pro";
38
38
  import { H as G } from "../HeaderCell-DjuifqHJ.mjs";
39
- import { f as je } from "../ConnectDrawer-phFH6OHt.mjs";
40
- import be from "@mui/material/Button";
41
- import ze from "@mui/material/IconButton";
42
- import Xe from "@mui/material/ListItem";
43
- import Ve from "@mui/material/Popover";
44
- import { L as Ye } from "../Loader-Dp1P2gNw.mjs";
45
- const _e = (a, o) => {
46
- const n = a.filter((t) => !t.is_paid_off && !t.is_impossible), r = a.filter((t) => t.is_paid_off || t.is_impossible);
47
- switch (o) {
48
- case $.HIGHEST_INTEREST:
49
- n.sort((t, l) => (l.interest_rate ?? 0) - (t.interest_rate ?? 0));
39
+ import { f as Ke } from "../ConnectDrawer-phFH6OHt.mjs";
40
+ import fe from "@mui/material/Button";
41
+ import Ue from "@mui/material/IconButton";
42
+ import qe from "@mui/material/ListItem";
43
+ import Ze from "@mui/material/Popover";
44
+ import { L as Je } from "../Loader-DUaFpDGv.mjs";
45
+ const Qe = (a, n = 0, o = 0) => {
46
+ const r = n / (Ee * Ie);
47
+ return o === 0 ? 0 : Math.ceil(
48
+ r === 0 ? a / o : -Math.log(1 - r * a / o) / Math.log(1 + r)
49
+ );
50
+ }, et = (a, n, o, r, t) => {
51
+ const i = [];
52
+ if (o === 0) {
53
+ for (let d = 0; d < a; d++) {
54
+ const c = n - r * (d + 1), h = n - r * d, m = c >= 0 ? r : h;
55
+ i.push({
56
+ balance: c >= 0 ? c : 0,
57
+ interest: o,
58
+ payment: m,
59
+ principal: m,
60
+ timestamp: le(
61
+ se(
62
+ ce(t),
63
+ // convert seconds → Date
64
+ d + 1
65
+ // add (index + 1) months
66
+ )
67
+ )
68
+ });
69
+ }
70
+ return i;
71
+ }
72
+ const p = o / 1200;
73
+ for (let d = 0; d < a; d++) {
74
+ const c = le(se(ce(t), d + 1)), h = Math.pow(1 + p, d), m = n * h - r * ((h - 1) / p), y = Math.pow(1 + p, d + 1), f = n * y - r * ((y - 1) / p), v = r + Math.min(f, 0), E = m * p;
75
+ i.push({
76
+ balance: Math.max(0, f),
77
+ interest: E,
78
+ payment: v,
79
+ principal: v - E,
80
+ timestamp: c
81
+ });
82
+ }
83
+ return i;
84
+ }, tt = (a) => (a[a.length - 1] || {}).timestamp, rt = (a) => a.map((n) => {
85
+ const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: i } = n, p = Qe(t, r ?? 0, o ?? 0), d = et(
86
+ p,
87
+ t,
88
+ r ?? 0,
89
+ o ?? 0,
90
+ i
91
+ ), c = tt(d);
92
+ return {
93
+ ...n,
94
+ minimumFinalPayment: c,
95
+ minimumPayments: d
96
+ };
97
+ }), xe = (a, n) => {
98
+ const o = rt(
99
+ a.filter((t) => !t.is_paid_off && !t.is_impossible)
100
+ ), r = a.filter((t) => t.is_paid_off || t.is_impossible).map((t) => ({ ...t, minimumPayments: [] }));
101
+ switch (n) {
102
+ case M.FASTEST_PAYOFF_FIRST:
103
+ o.sort((t, i) => (t.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
104
+ break;
105
+ case M.HIGHEST_INTEREST:
106
+ o.sort((t, i) => (i.interest_rate ?? 0) - (t.interest_rate ?? 0));
50
107
  break;
51
- case $.LOWEST_BALANCE:
52
- n.sort((t, l) => t.balance - l.balance);
108
+ case M.LOWEST_BALANCE:
109
+ o.sort((t, i) => t.balance - i.balance);
53
110
  break;
54
- case $.HIGHEST_BALANCE:
55
- n.sort((t, l) => l.balance - t.balance);
111
+ case M.HIGHEST_BALANCE:
112
+ o.sort((t, i) => i.balance - t.balance);
56
113
  break;
57
114
  default:
58
- n.sort((t, l) => t.balance - l.balance);
115
+ o.sort((t, i) => t.balance - i.balance);
59
116
  }
60
- a.splice(0, a.length, ...n, ...r);
117
+ a.splice(0, a.length, ...o, ...r);
61
118
  };
62
- function Ke(a, o, n = 0) {
63
- const r = a.map((p) => ({ ...p })).filter(
64
- (p) => p.interest_rate !== void 0 && p.monthly_payment !== void 0 && !p.is_paid_off
119
+ function at(a, n, o = 0) {
120
+ const r = a.map((m) => ({ ...m })).filter(
121
+ (m) => m.interest_rate !== void 0 && m.monthly_payment !== void 0 && !m.is_paid_off
65
122
  );
66
- _e(r, o);
67
- let t = 0, l = 0;
68
- const d = /* @__PURE__ */ new Date(), m = /* @__PURE__ */ new Date();
69
- for (; r.some((p) => p.balance >= 0.01 && !p.is_impossible); ) {
70
- let p = !1;
71
- for (const [g, x] of r.entries()) {
72
- if (x.balance <= 0.01 || x.is_impossible) continue;
73
- const k = (x.interest_rate ?? 0) / 100 / 12, D = x.balance * k;
74
- let u = x.monthly_payment ?? 0;
75
- g === 0 && n && (u += n), x.balance += D;
76
- const A = Math.min(x.balance, u + l);
77
- if (A <= D) {
78
- x.is_impossible = !0;
123
+ xe(r, n);
124
+ let t = 0, i = 0;
125
+ const p = /* @__PURE__ */ new Date(), d = /* @__PURE__ */ new Date();
126
+ for (; r.some((m) => m.balance >= 0.01 && !m.is_impossible); ) {
127
+ let m = !1;
128
+ for (const [y, f] of r.entries()) {
129
+ if (f.balance <= 0.01 || f.is_impossible) continue;
130
+ const E = (f.interest_rate ?? 0) / 100 / 12, D = f.balance * E;
131
+ let u = f.monthly_payment ?? 0;
132
+ y === 0 && o && (u += o), f.balance += D;
133
+ const I = Math.min(f.balance, u + i);
134
+ if (I <= D) {
135
+ f.is_impossible = !0;
79
136
  continue;
80
137
  }
81
- x.balance -= A, x.balance = x.balance < 0.01 ? 0 : x.balance, t += D, x.balance <= 0 && (l += u), A > 0 && (p = !0);
138
+ f.balance -= I, f.balance = f.balance < 0.01 ? 0 : f.balance, t += D, f.balance <= 0 && (i += u), I > 0 && (m = !0);
82
139
  }
83
- p && m.setMonth(m.getMonth() + 1);
140
+ m && d.setMonth(d.getMonth() + 1);
84
141
  }
85
- const c = r.some((p) => p.is_impossible && p.balance > 0), h = Se({ start: d, end: m });
142
+ const c = r.some((m) => m.is_impossible && m.balance > 0), h = Te({ start: p, end: d });
86
143
  return {
87
- payoffSavings: c ? "N/A" : B(t, "0,0.00"),
88
- payoffDate: c ? "Never" : K(m, U.MONTH_YEAR),
89
- payoffDuration: c ? "Stagnant" : De(h, { format: ["years", "months"] }) || "0 months"
144
+ payoffSavings: c ? "N/A" : P(t, "0,0.00"),
145
+ payoffDate: c ? "Never" : K(d, U.MONTH_YEAR),
146
+ payoffDuration: c ? "Stagnant" : Ae(h, { format: ["years", "months"] }) || "0 months"
90
147
  };
91
148
  }
92
149
  const R = () => {
93
- if (!y.useContext(Te))
150
+ if (!x.useContext(Me))
94
151
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
95
152
  return q().uiStore;
96
- }, Ue = ({ debts: a, onClickCta: o, sx: n }) => {
97
- const r = j(), { isMobile: t } = X(), { debts: l } = C(), { selectedDebtPriority: d } = R(), { monthlyCashFlowProfile: m } = z(), { payoffDate: c, payoffSavings: h, payoffDuration: p } = y.useMemo(() => {
98
- const g = m?.extra_payment ?? 0;
99
- return Ke(a, d, g);
100
- }, [a, d, m]);
153
+ }, nt = ({ debts: a, onClickCta: n, sx: o }) => {
154
+ const r = j(), { isMobile: t } = X(), { debts: i } = C(), { selectedDebtPriority: p } = R(), { monthlyCashFlowProfile: d } = z(), { payoffDate: c, payoffSavings: h, payoffDuration: m } = x.useMemo(() => {
155
+ const y = d?.extra_payment ?? 0;
156
+ return at(a, p, y);
157
+ }, [a, p, d]);
101
158
  return /* @__PURE__ */ e(
102
- me,
159
+ be,
103
160
  {
104
161
  sx: {
105
162
  boxShadow: r.shadows[2],
106
163
  width: t ? "100%" : "186px",
107
164
  minWidth: "186px",
108
- ...n
165
+ ...o
109
166
  },
110
167
  children: /* @__PURE__ */ s(_, { sx: { gap: "12px", p: "16px" }, children: [
111
168
  /* @__PURE__ */ s(
@@ -118,79 +175,79 @@ const R = () => {
118
175
  pb: "8px"
119
176
  },
120
177
  children: [
121
- /* @__PURE__ */ e(i, { variant: "XSmall", children: l.snowball_card_date_description }),
122
- /* @__PURE__ */ e(i, { bold: !0, color: r.palette.primary.main, variant: "Small", children: c })
178
+ /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_date_description }),
179
+ /* @__PURE__ */ e(l, { bold: !0, color: r.palette.primary.main, variant: "Small", children: c })
123
180
  ]
124
181
  }
125
182
  ),
126
183
  /* @__PURE__ */ s(_, { gap: t ? "4px" : "0", children: [
127
- /* @__PURE__ */ e(i, { bold: !0, variant: "Small", children: h }),
128
- /* @__PURE__ */ e(i, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: l.snowball_card_amount_description })
184
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: h }),
185
+ /* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: i.snowball_card_amount_description })
129
186
  ] }),
130
187
  /* @__PURE__ */ s(_, { gap: t ? "4px" : "0", children: [
131
- /* @__PURE__ */ e(i, { bold: !0, variant: "Small", children: p }),
132
- /* @__PURE__ */ e(i, { variant: "XSmall", children: l.snowball_card_duration_description })
188
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: m }),
189
+ /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_duration_description })
133
190
  ] }),
134
191
  /* @__PURE__ */ e(
135
- i,
192
+ l,
136
193
  {
137
194
  bold: !0,
138
195
  color: r.palette.primary.main,
139
- onClick: o,
196
+ onClick: n,
140
197
  sx: { cursor: "pointer" },
141
198
  variant: "Small",
142
- children: l.snowball_card_cta
199
+ children: i.snowball_card_cta
143
200
  }
144
201
  )
145
202
  ] })
146
203
  }
147
204
  );
148
- }, qe = S(Ue), Ze = ({ isOpen: a, onClose: o, sx: n }) => {
149
- const r = j(), { debts: t } = C(), [l, d] = y.useState(!1);
205
+ }, ot = S(nt), it = ({ isOpen: a, onClose: n, sx: o }) => {
206
+ const r = j(), { debts: t } = C(), [i, p] = x.useState(!1);
150
207
  return /* @__PURE__ */ e(
151
208
  te,
152
209
  {
153
210
  ariaLabelClose: "",
154
211
  isOpen: a,
155
- onClose: o,
156
- sx: { ...n },
212
+ onClose: n,
213
+ sx: { ...o },
157
214
  title: t.snowball_drawer_title,
158
215
  children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
159
216
  /* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
160
217
  /* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
161
- /* @__PURE__ */ e(i, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
162
- /* @__PURE__ */ e(i, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
163
- /* @__PURE__ */ e(i, { variant: "H1", children: t.snowball_drawer_savings }),
164
- /* @__PURE__ */ e(i, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
218
+ /* @__PURE__ */ e(l, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
219
+ /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
220
+ /* @__PURE__ */ e(l, { variant: "H1", children: t.snowball_drawer_savings }),
221
+ /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
165
222
  ] }),
166
- /* @__PURE__ */ s(me, { sx: { display: "grid", py: 16, px: 24 }, children: [
167
- /* @__PURE__ */ e(i, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
223
+ /* @__PURE__ */ s(be, { sx: { display: "grid", py: 16, px: 24 }, children: [
224
+ /* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
168
225
  /* @__PURE__ */ e(
169
- i,
226
+ l,
170
227
  {
171
228
  color: r.palette.secondary.main,
172
229
  mb: 8,
173
- sx: { whiteSpace: l ? "normal" : "nowrap" },
230
+ sx: { whiteSpace: i ? "normal" : "nowrap" },
174
231
  variant: "ParagraphSmall",
175
232
  children: t.snowball_drawer_answer
176
233
  }
177
234
  ),
178
235
  /* @__PURE__ */ e(
179
- i,
236
+ l,
180
237
  {
181
238
  bold: !0,
182
239
  color: r.palette.primary.main,
183
- onClick: () => d(!l),
240
+ onClick: () => p(!i),
184
241
  sx: { cursor: "pointer" },
185
242
  variant: "Small",
186
- children: l ? t.snowball_drawer_less : t.snowball_drawer_more
243
+ children: i ? t.snowball_drawer_less : t.snowball_drawer_more
187
244
  }
188
245
  )
189
246
  ] })
190
247
  ] }),
191
248
  /* @__PURE__ */ s(_, { children: [
192
249
  /* @__PURE__ */ e(
193
- i,
250
+ l,
194
251
  {
195
252
  color: r.palette.secondary.main,
196
253
  px: 24,
@@ -200,8 +257,8 @@ const R = () => {
200
257
  }
201
258
  ),
202
259
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
203
- /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: T(t.snowball_drawer_month_header, 1) }),
204
- /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
260
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 1) }),
261
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
205
262
  ] }),
206
263
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
207
264
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -218,7 +275,7 @@ const R = () => {
218
275
  backgroundColor: r.palette.success.main,
219
276
  marginRight: 12
220
277
  },
221
- children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
278
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
222
279
  }
223
280
  ),
224
281
  /* @__PURE__ */ s(
@@ -233,20 +290,20 @@ const R = () => {
233
290
  },
234
291
  children: [
235
292
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
236
- /* @__PURE__ */ e(i, { variant: "Body", children: T(t.snowball_drawer_debt_label, "A") }),
237
- /* @__PURE__ */ s(i, { color: r.palette.secondary.main, variant: "XSmall", children: [
238
- T(
293
+ /* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "A") }),
294
+ /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
295
+ A(
239
296
  t.snowball_drawer_rollover_explainer_pt1,
240
297
  "$100"
241
298
  ),
242
- /* @__PURE__ */ e("strong", { children: T(t.snowball_drawer_debt_label, "B") }),
299
+ /* @__PURE__ */ e("strong", { children: A(t.snowball_drawer_debt_label, "B") }),
243
300
  t.snowball_drawer_rollover_explainer_pt2
244
301
  ] })
245
302
  ] }),
246
303
  /* @__PURE__ */ s(_, { children: [
247
- /* @__PURE__ */ e(i, { variant: "Body", children: "$100.00" }),
304
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$100.00" }),
248
305
  /* @__PURE__ */ e(
249
- i,
306
+ l,
250
307
  {
251
308
  bold: !0,
252
309
  color: r.palette.success.main,
@@ -284,8 +341,8 @@ const R = () => {
284
341
  pr: 24
285
342
  },
286
343
  children: [
287
- /* @__PURE__ */ e(i, { flexGrow: 1, variant: "Body", children: T(t.snowball_drawer_debt_label, "B") }),
288
- /* @__PURE__ */ e(i, { variant: "Body", children: "$400.00" })
344
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "B") }),
345
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$400.00" })
289
346
  ]
290
347
  }
291
348
  )
@@ -304,8 +361,8 @@ const R = () => {
304
361
  }
305
362
  ),
306
363
  /* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
307
- /* @__PURE__ */ e(i, { flexGrow: 1, variant: "Body", children: T(t.snowball_drawer_debt_label, "C") }),
308
- /* @__PURE__ */ e(i, { variant: "Body", children: "$1,000.00" })
364
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }),
365
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
309
366
  ] })
310
367
  ] }),
311
368
  /* @__PURE__ */ s(
@@ -320,15 +377,15 @@ const R = () => {
320
377
  borderBottom: `1px solid ${r.palette.border.light}`
321
378
  },
322
379
  children: [
323
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
324
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: "$1,500.00" })
380
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
381
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
325
382
  ]
326
383
  }
327
384
  )
328
385
  ] }),
329
386
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
330
- /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: T(t.snowball_drawer_month_header, 2) }),
331
- /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
387
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 2) }),
388
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
332
389
  ] }),
333
390
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
334
391
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -345,7 +402,7 @@ const R = () => {
345
402
  backgroundColor: r.palette.success.main,
346
403
  marginRight: 12
347
404
  },
348
- children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
405
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
349
406
  }
350
407
  ),
351
408
  /* @__PURE__ */ s(
@@ -360,20 +417,20 @@ const R = () => {
360
417
  },
361
418
  children: [
362
419
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
363
- /* @__PURE__ */ e(i, { variant: "Body", children: T(t.snowball_drawer_debt_label, "B") }),
364
- /* @__PURE__ */ s(i, { color: r.palette.secondary.main, variant: "XSmall", children: [
365
- T(
420
+ /* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "B") }),
421
+ /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
422
+ A(
366
423
  t.snowball_drawer_rollover_explainer_pt1,
367
424
  "$500"
368
425
  ),
369
- /* @__PURE__ */ e("strong", { children: T(t.snowball_drawer_debt_label, "C") }),
426
+ /* @__PURE__ */ e("strong", { children: A(t.snowball_drawer_debt_label, "C") }),
370
427
  t.snowball_drawer_rollover_explainer_pt2
371
428
  ] })
372
429
  ] }),
373
430
  /* @__PURE__ */ s(_, { children: [
374
- /* @__PURE__ */ e(i, { variant: "Body", children: "$500.00" }),
431
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$500.00" }),
375
432
  /* @__PURE__ */ e(
376
- i,
433
+ l,
377
434
  {
378
435
  bold: !0,
379
436
  color: r.palette.success.main,
@@ -410,8 +467,8 @@ const R = () => {
410
467
  pr: 24
411
468
  },
412
469
  children: [
413
- /* @__PURE__ */ e(i, { flexGrow: 1, variant: "Body", children: T(t.snowball_drawer_debt_label, "C") }),
414
- /* @__PURE__ */ e(i, { variant: "Body", children: "$1,000.00" })
470
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }),
471
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
415
472
  ]
416
473
  }
417
474
  )
@@ -428,15 +485,15 @@ const R = () => {
428
485
  borderBottom: `1px solid ${r.palette.border.light}`
429
486
  },
430
487
  children: [
431
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
432
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: "$1,500.00" })
488
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
489
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
433
490
  ]
434
491
  }
435
492
  )
436
493
  ] }),
437
494
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
438
- /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: T(t.snowball_drawer_month_header, 3) }),
439
- /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
495
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 3) }),
496
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
440
497
  ] }),
441
498
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
442
499
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -453,7 +510,7 @@ const R = () => {
453
510
  backgroundColor: r.palette.success.main,
454
511
  marginRight: 12
455
512
  },
456
- children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
513
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
457
514
  }
458
515
  ),
459
516
  /* @__PURE__ */ s(
@@ -467,11 +524,11 @@ const R = () => {
467
524
  pr: 24
468
525
  },
469
526
  children: [
470
- /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(i, { variant: "Body", children: T(t.snowball_drawer_debt_label, "C") }) }),
527
+ /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }) }),
471
528
  /* @__PURE__ */ s(_, { children: [
472
- /* @__PURE__ */ e(i, { variant: "Body", children: "$1,500.00" }),
529
+ /* @__PURE__ */ e(l, { variant: "Body", children: "$1,500.00" }),
473
530
  /* @__PURE__ */ e(
474
- i,
531
+ l,
475
532
  {
476
533
  bold: !0,
477
534
  color: r.palette.success.main,
@@ -497,8 +554,8 @@ const R = () => {
497
554
  borderBottom: `1px solid ${r.palette.border.light}`
498
555
  },
499
556
  children: [
500
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
501
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: "$1,500.00" })
557
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
558
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
502
559
  ]
503
560
  }
504
561
  )
@@ -507,50 +564,50 @@ const R = () => {
507
564
  ] })
508
565
  }
509
566
  );
510
- }, Je = S(Ze), Qe = "#FF7B08";
511
- function et(a, o) {
512
- const [n, r, t] = a.replace(/^#/, "").match(/.{1,2}/g).map((d) => parseInt(d, 16)), l = [
513
- Math.max(0, Math.min(255, Math.round(n * o))),
514
- Math.max(0, Math.min(255, Math.round(r * o))),
515
- Math.max(0, Math.min(255, Math.round(t * o)))
567
+ }, lt = S(it), st = "#FF7B08";
568
+ function ct(a, n) {
569
+ const [o, r, t] = a.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), i = [
570
+ Math.max(0, Math.min(255, Math.round(o * n))),
571
+ Math.max(0, Math.min(255, Math.round(r * n))),
572
+ Math.max(0, Math.min(255, Math.round(t * n)))
516
573
  ];
517
- return `rgb(${l[0]}, ${l[1]}, ${l[2]})`;
574
+ return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
518
575
  }
519
- const ye = ({
576
+ const ge = ({
520
577
  sx: a,
521
- height: o = 500,
522
- width: n,
578
+ height: n = 500,
579
+ width: o,
523
580
  debts: r,
524
581
  hoveredDebtGuid: t,
525
- onClickArea: l,
526
- onHoverArea: d
582
+ onClickArea: i,
583
+ onHoverArea: p
527
584
  }) => {
528
- const m = Ne(), { onEvent: c } = M(), h = r.filter((b) => !b.is_impossible), p = [
585
+ const d = He(), { onEvent: c } = k(), h = r.filter((b) => !b.is_impossible), m = [
529
586
  ...new Set(
530
587
  h.flatMap((b) => b.dataset.map((w) => new Date(w.x).getTime()))
531
588
  )
532
- ].sort((b, w) => b - w).map((b) => new Date(b)), g = h.map((b) => {
589
+ ].sort((b, w) => b - w).map((b) => new Date(b)), y = h.map((b) => {
533
590
  const w = new Map(b.dataset.map((N) => [new Date(N.x).getTime(), N.y]));
534
- let I = w.get(p[0].getTime()) ?? 0;
535
- const P = p.map((N) => {
536
- const H = w.get(N.getTime()) ?? I;
537
- return I = H, { x: N, y: H };
591
+ let B = w.get(m[0].getTime()) ?? 0;
592
+ const F = m.map((N) => {
593
+ const $ = w.get(N.getTime()) ?? B;
594
+ return B = $, { x: N, y: $ };
538
595
  });
539
- return { ...b, dataset: P };
540
- }), x = g.reduce(
596
+ return { ...b, dataset: F };
597
+ }), f = y.reduce(
541
598
  (b, w) => b + (w.dataset[0]?.y ?? 0),
542
599
  0
543
- ), E = p.map((b, w) => {
544
- const I = w / (p.length - 1), P = x * (1 - I);
545
- return { x: b, y: P };
546
- }), k = Math.ceil(x / 100) * 100, D = p, u = g.map((b, w) => {
547
- const I = 1 - w / g.length * 0.5, P = et(Qe, I);
600
+ ), v = m.map((b, w) => {
601
+ const B = w / (m.length - 1), F = f * (1 - B);
602
+ return { x: b, y: F };
603
+ }), E = Math.ceil(f / 100) * 100, D = m, u = y.map((b, w) => {
604
+ const B = 1 - w / y.length * 0.5, F = ct(st, B);
548
605
  return {
549
606
  id: `debt-${w}`,
550
607
  guid: b.guid,
551
608
  label: b.name,
552
609
  data: b.dataset.map((N) => N.y),
553
- color: P,
610
+ color: F,
554
611
  curve: "linear",
555
612
  type: "line",
556
613
  area: !0,
@@ -561,15 +618,15 @@ const ye = ({
561
618
  u.push({
562
619
  id: "payoff-line",
563
620
  label: "Payoff Line",
564
- data: E.map((b) => b.y),
565
- color: m.palette.grey[700],
621
+ data: v.map((b) => b.y),
622
+ color: d.palette.grey[700],
566
623
  curve: "linear",
567
624
  type: "line",
568
625
  stack: void 0,
569
626
  showMark: !1,
570
627
  disableHighlight: !0
571
628
  });
572
- const A = (b) => u.findIndex((w) => w?.guid === b);
629
+ const I = (b) => u.findIndex((w) => w?.guid === b);
573
630
  return /* @__PURE__ */ e(
574
631
  re,
575
632
  {
@@ -586,19 +643,19 @@ const ye = ({
586
643
  }
587
644
  },
588
645
  children: /* @__PURE__ */ e(
589
- Pe,
646
+ $e,
590
647
  {
591
648
  axisHighlight: { x: "none" },
592
649
  disableLineItemHighlight: !0,
593
- height: o,
650
+ height: n,
594
651
  onAreaClick: (b, w) => {
595
- l?.();
596
- const I = u.find((P) => P.id === w.seriesId);
597
- c(v.DEBTS_CLICK_CHART_AREA, { account_guid: I?.guid });
652
+ i?.();
653
+ const B = u.find((F) => F.id === w.seriesId);
654
+ c(T.DEBTS_CLICK_CHART_AREA, { account_guid: B?.guid });
598
655
  },
599
656
  onHighlightChange: (b) => {
600
- const w = u.find((I) => I.id === b?.seriesId)?.guid;
601
- d?.(w ?? "");
657
+ const w = u.find((B) => B.id === b?.seriesId)?.guid;
658
+ p?.(w ?? "");
602
659
  },
603
660
  series: u,
604
661
  skipAnimation: !0,
@@ -624,21 +681,21 @@ const ye = ({
624
681
  strokeDasharray: "10 5",
625
682
  strokeWidth: 1
626
683
  },
627
- [`& .MuiLineElement-series-debt-${A(t ?? "0")}`]: {
684
+ [`& .MuiLineElement-series-debt-${I(t ?? "0")}`]: {
628
685
  opacity: 1
629
686
  },
630
- [`& .MuiAreaElement-series-debt-${A(t ?? "0")}`]: {
687
+ [`& .MuiAreaElement-series-debt-${I(t ?? "0")}`]: {
631
688
  opacity: 1
632
689
  },
633
690
  ...a
634
691
  },
635
692
  tooltip: { trigger: "none" },
636
- width: n,
693
+ width: o,
637
694
  xAxis: [
638
695
  {
639
696
  data: D,
640
697
  scaleType: "time",
641
- min: p[0],
698
+ min: m[0],
642
699
  disableTicks: !0,
643
700
  valueFormatter: (b) => K(b, U.MONTH_SHORT_YEAR)
644
701
  }
@@ -646,20 +703,20 @@ const ye = ({
646
703
  yAxis: [
647
704
  {
648
705
  min: 0,
649
- max: k,
706
+ max: E,
650
707
  disableTicks: !0,
651
- valueFormatter: (b) => B(b, "0a")
708
+ valueFormatter: (b) => P(b, "0a")
652
709
  }
653
710
  ]
654
711
  }
655
712
  )
656
713
  }
657
714
  );
658
- }, tt = () => {
659
- const a = j(), { debts: o } = C(), { selectedDebtChartData: n } = R();
715
+ }, dt = () => {
716
+ const a = j(), { debts: n } = C(), { selectedDebtChartData: o } = R();
660
717
  return /* @__PURE__ */ s(L, { children: [
661
718
  /* @__PURE__ */ s(
662
- Be,
719
+ Ne,
663
720
  {
664
721
  sx: {
665
722
  "& .MuiCardContent-root:last-child": {
@@ -667,39 +724,39 @@ const ye = ({
667
724
  }
668
725
  },
669
726
  children: [
670
- /* @__PURE__ */ e(ke, { sx: { pb: 0 }, title: /* @__PURE__ */ e(we, { sx: { pb: 4 }, children: o.details_chart_title }) }),
671
- /* @__PURE__ */ e(Me, { sx: { p: 0 }, children: /* @__PURE__ */ e(ye, { debts: [n], height: 250 }) })
727
+ /* @__PURE__ */ e(Le, { sx: { pb: 0 }, title: /* @__PURE__ */ e(ve, { sx: { pb: 4 }, children: n.details_chart_title }) }),
728
+ /* @__PURE__ */ e(Re, { sx: { p: 0 }, children: /* @__PURE__ */ e(ge, { debts: [o], height: 250 }) })
672
729
  ]
673
730
  }
674
731
  ),
675
732
  /* @__PURE__ */ e(
676
- i,
733
+ l,
677
734
  {
678
735
  color: a.palette.text.secondary,
679
736
  sx: { whiteSpace: "normal", textAlign: "center", px: 8, py: 12 },
680
737
  variant: "Small",
681
- children: o.details_chart_description
738
+ children: n.details_chart_description
682
739
  }
683
740
  )
684
741
  ] });
685
- }, rt = S(tt), at = () => {
686
- const a = j(), { onEvent: o } = M(), { debts: n } = C(), { selectedDebtChartData: r, showCompleted: t, showError: l } = R();
687
- return y.useEffect(() => o(v.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(he, { children: l || t ? /* @__PURE__ */ e(
688
- i,
742
+ }, pt = S(dt), mt = () => {
743
+ const a = j(), { onEvent: n } = k(), { debts: o } = C(), { selectedDebtChartData: r, showCompleted: t, showError: i } = R();
744
+ return x.useEffect(() => n(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(_e, { children: i || t ? /* @__PURE__ */ e(
745
+ l,
689
746
  {
690
747
  color: a.palette.secondary.main,
691
748
  component: "div",
692
749
  sx: { p: 32, textAlign: "center", whiteSpace: "normal" },
693
750
  variant: "Small",
694
- children: l ? n.schedule_error_message : n.schedule_complete_message
751
+ children: i ? o.schedule_error_message : o.schedule_complete_message
695
752
  }
696
753
  ) : /* @__PURE__ */ s(L, { children: [
697
- /* @__PURE__ */ s(f, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
698
- /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: n.schedule_month_heading }),
699
- /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: n.schedule_amount_heading })
754
+ /* @__PURE__ */ s(g, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
755
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: o.schedule_month_heading }),
756
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: o.schedule_amount_heading })
700
757
  ] }),
701
- r.dataset.slice(1).map(({ x: d, y: m, payment: c }) => /* @__PURE__ */ e(f, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(f, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
702
- f,
758
+ r.dataset.slice(1).map(({ x: p, y: d, payment: c }) => /* @__PURE__ */ e(g, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(g, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
759
+ g,
703
760
  {
704
761
  sx: {
705
762
  borderBottom: `1px solid ${a.palette.border.light}`,
@@ -709,28 +766,28 @@ const ye = ({
709
766
  pr: 24
710
767
  },
711
768
  children: [
712
- /* @__PURE__ */ s(f, { flexGrow: 1, children: [
713
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: K(d, U.MONTH_YEAR) }),
714
- /* @__PURE__ */ e(i, { color: a.palette.secondary.main, variant: "XSmall", children: n.schedule_month_label })
769
+ /* @__PURE__ */ s(g, { flexGrow: 1, children: [
770
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: K(p, U.MONTH_YEAR) }),
771
+ /* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: o.schedule_month_label })
715
772
  ] }),
716
- /* @__PURE__ */ s(f, { children: [
717
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: B(m, "0,0.00") }),
773
+ /* @__PURE__ */ s(g, { children: [
774
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: P(d, "0,0.00") }),
718
775
  /* @__PURE__ */ e(
719
- i,
776
+ l,
720
777
  {
721
778
  bold: !0,
722
779
  color: a.palette.success.main,
723
780
  textAlign: "end",
724
781
  variant: "Tiny",
725
- children: `+${B(c, "0,0")}`
782
+ children: `+${P(c, "0,0")}`
726
783
  }
727
784
  )
728
785
  ] })
729
786
  ]
730
787
  }
731
- ) }) }, String(d))),
732
- /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
733
- f,
788
+ ) }) }, String(p))),
789
+ /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
790
+ g,
734
791
  {
735
792
  sx: {
736
793
  alignItems: "center",
@@ -740,135 +797,135 @@ const ye = ({
740
797
  px: 24
741
798
  },
742
799
  children: [
743
- /* @__PURE__ */ e(i, { flexGrow: 1, variant: "Body", children: n.schedule_payoff_label }),
744
- /* @__PURE__ */ e(i, { variant: "Body", children: "-" })
800
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: o.schedule_payoff_label }),
801
+ /* @__PURE__ */ e(l, { variant: "Body", children: "-" })
745
802
  ]
746
803
  }
747
804
  ) })
748
805
  ] }) });
749
- }, ot = S(at), nt = S(({ debt: a }) => {
750
- const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = M(), [t, l] = y.useState(a.interest_rate ?? 0), d = t < 0, m = async () => {
751
- await n({ ...a.account, interest_rate: t }), a.interest_rate = t, r(v.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
806
+ }, ht = S(mt), ut = S(({ debt: a }) => {
807
+ const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.interest_rate ?? 0), p = t < 0, d = async () => {
808
+ await o({ ...a.account, interest_rate: t }), a.interest_rate = t, r(T.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
752
809
  }, c = () => {
753
810
  setTimeout(() => {
754
- l(a.interest_rate ?? 0);
811
+ i(a.interest_rate ?? 0);
755
812
  }, 250);
756
813
  };
757
814
  return /* @__PURE__ */ e(
758
815
  J,
759
816
  {
760
- isSaveDisabled: d,
761
- label: `${o.details_interest_rate} (%)`,
817
+ isSaveDisabled: p,
818
+ label: `${n.details_interest_rate} (%)`,
762
819
  onCancel: c,
763
- onSave: m,
764
- primaryText: o.details_interest_rate,
765
- secondaryText: ve(Number(a.interest_rate) / 100),
766
- zeroStateText: a.interest_rate ? void 0 : o.add_interest_rate,
820
+ onSave: d,
821
+ primaryText: n.details_interest_rate,
822
+ secondaryText: Be(Number(a.interest_rate) / 100),
823
+ zeroStateText: a.interest_rate ? void 0 : n.add_interest_rate,
767
824
  children: /* @__PURE__ */ e(
768
- Oe,
825
+ Xe,
769
826
  {
770
- error: d,
827
+ error: p,
771
828
  fullWidth: !0,
772
- onChange: (h) => l(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
829
+ onChange: (h) => i(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
773
830
  type: "number",
774
831
  value: t
775
832
  }
776
833
  )
777
834
  }
778
835
  );
779
- }), it = S(({ debt: a }) => {
780
- const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = M(), [t, l] = y.useState(a.monthly_payment ?? 0), d = t < 0 || t > 9999999999e-2, m = async () => {
781
- await n({ ...a.account, minimum_payment: t }), a.monthly_payment = t, r(v.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
836
+ }), bt = S(({ debt: a }) => {
837
+ const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.monthly_payment ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
838
+ await o({ ...a.account, minimum_payment: t }), a.monthly_payment = t, r(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
782
839
  }, c = () => {
783
840
  setTimeout(() => {
784
- l(a.monthly_payment ?? 0);
841
+ i(a.monthly_payment ?? 0);
785
842
  }, 250);
786
843
  };
787
844
  return /* @__PURE__ */ e(
788
845
  J,
789
846
  {
790
- isSaveDisabled: d,
791
- label: o.details_monthly_payment,
847
+ isSaveDisabled: p,
848
+ label: n.details_monthly_payment,
792
849
  onCancel: c,
793
- onSave: m,
794
- primaryText: o.details_monthly_payment,
795
- secondaryText: B(a.monthly_payment, "0,0"),
796
- zeroStateText: a.monthly_payment ? void 0 : o.add_monthly_payment,
850
+ onSave: d,
851
+ primaryText: n.details_monthly_payment,
852
+ secondaryText: P(a.monthly_payment, "0,0"),
853
+ zeroStateText: a.monthly_payment ? void 0 : n.add_monthly_payment,
797
854
  children: /* @__PURE__ */ e(
798
855
  ae,
799
856
  {
800
857
  amount: t,
801
858
  autoFocus: !0,
802
- error: d,
859
+ error: p,
803
860
  fullWidth: !0,
804
861
  minAmount: 0,
805
- setAmount: (h) => l(isNaN(Number(h)) ? t : Number(h)),
862
+ setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
806
863
  sx: { ".MuiTypography-Body": { p: 0 } }
807
864
  }
808
865
  )
809
866
  }
810
867
  );
811
- }), lt = S(({ debt: a }) => {
812
- const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = M(), [t, l] = y.useState(a.original_balance ?? 0), d = t < 0 || t > 9999999999e-2, m = async () => {
813
- await n({ ...a.account, original_balance: t }), a.original_balance = t, r(v.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
868
+ }), _t = S(({ debt: a }) => {
869
+ const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.original_balance ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
870
+ await o({ ...a.account, original_balance: t }), a.original_balance = t, r(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
814
871
  }, c = () => {
815
872
  setTimeout(() => {
816
- l(a.original_balance ?? 0);
873
+ i(a.original_balance ?? 0);
817
874
  }, 250);
818
875
  };
819
876
  return /* @__PURE__ */ e(
820
877
  J,
821
878
  {
822
- isSaveDisabled: d,
823
- label: o.details_original_balance,
879
+ isSaveDisabled: p,
880
+ label: n.details_original_balance,
824
881
  onCancel: c,
825
- onSave: m,
826
- primaryText: o.details_original_balance,
827
- secondaryText: B(a.original_balance, "0,0"),
828
- zeroStateText: a.original_balance ? void 0 : o.add_original_balance,
882
+ onSave: d,
883
+ primaryText: n.details_original_balance,
884
+ secondaryText: P(a.original_balance, "0,0"),
885
+ zeroStateText: a.original_balance ? void 0 : n.add_original_balance,
829
886
  children: /* @__PURE__ */ e(
830
887
  ae,
831
888
  {
832
889
  amount: t,
833
890
  autoFocus: !0,
834
- error: d,
891
+ error: p,
835
892
  fullWidth: !0,
836
893
  minAmount: 0,
837
- setAmount: (h) => l(isNaN(Number(h)) ? t : Number(h)),
894
+ setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
838
895
  sx: { ".MuiTypography-Body": { p: 0 } }
839
896
  }
840
897
  )
841
898
  }
842
899
  );
843
- }), st = () => {
844
- const { onEvent: a } = M(), { selectedDebtChartData: o } = R();
845
- return y.useEffect(() => a(v.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(f, { bgcolor: "background.paper", children: [
846
- o?.goal && /* @__PURE__ */ s(L, { children: [
847
- /* @__PURE__ */ e(Le, { goal: o.goal }),
900
+ }), yt = () => {
901
+ const { onEvent: a } = k(), { selectedDebtChartData: n } = R();
902
+ return x.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(g, { bgcolor: "background.paper", children: [
903
+ n?.goal && /* @__PURE__ */ s(L, { children: [
904
+ /* @__PURE__ */ e(Ge, { goal: n.goal }),
848
905
  /* @__PURE__ */ e(W, {}),
849
- /* @__PURE__ */ e(He, { goal: o.goal }),
906
+ /* @__PURE__ */ e(je, { goal: n.goal }),
850
907
  /* @__PURE__ */ e(W, {}),
851
- /* @__PURE__ */ e(Fe, { goal: o.goal }),
908
+ /* @__PURE__ */ e(ze, { goal: n.goal }),
852
909
  /* @__PURE__ */ e(W, {})
853
910
  ] }),
854
- !o?.goal && o?.account && /* @__PURE__ */ s(L, { children: [
855
- /* @__PURE__ */ e(it, { debt: o }),
911
+ !n?.goal && n?.account && /* @__PURE__ */ s(L, { children: [
912
+ /* @__PURE__ */ e(bt, { debt: n }),
856
913
  /* @__PURE__ */ e(W, {}),
857
- /* @__PURE__ */ e(nt, { debt: o }),
914
+ /* @__PURE__ */ e(ut, { debt: n }),
858
915
  /* @__PURE__ */ e(W, {}),
859
- /* @__PURE__ */ e(lt, { debt: o }),
916
+ /* @__PURE__ */ e(_t, { debt: n }),
860
917
  /* @__PURE__ */ e(W, {})
861
918
  ] })
862
919
  ] });
863
- }, ct = S(st), dt = ({ setTabValue: a, sx: o }) => {
864
- const { debts: n } = C(), { showError: r, showCompleted: t } = R();
865
- return y.useEffect(() => {
920
+ }, ft = S(yt), xt = ({ setTabValue: a, sx: n }) => {
921
+ const { debts: o } = C(), { showError: r, showCompleted: t } = R();
922
+ return x.useEffect(() => {
866
923
  r && a(1);
867
- }, [r]), !r && !t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ s(f, { gap: 16, children: [
868
- /* @__PURE__ */ e(de, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
869
- se,
924
+ }, [r]), !r && !t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ s(g, { gap: 16, children: [
925
+ /* @__PURE__ */ e(he, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ s(
926
+ pe,
870
927
  {
871
- icon: r ? /* @__PURE__ */ e(We, { filled: !0 }) : /* @__PURE__ */ e(ue, { color: "success", filled: !0 }),
928
+ icon: r ? /* @__PURE__ */ e(Ve, { filled: !0 }) : /* @__PURE__ */ e(ye, { color: "success", filled: !0 }),
872
929
  severity: "error",
873
930
  sx: {
874
931
  alignItems: "start",
@@ -881,13 +938,13 @@ const ye = ({
881
938
  }
882
939
  },
883
940
  children: [
884
- /* @__PURE__ */ e(ce, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r ? n.status_error_title : n.status_complete_title }),
885
- /* @__PURE__ */ e(i, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r ? n.status_error_description : n.status_complete_description })
941
+ /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r ? o.status_error_title : o.status_complete_title }),
942
+ /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r ? o.status_error_description : o.status_complete_description })
886
943
  ]
887
944
  }
888
945
  ) }),
889
- r && /* @__PURE__ */ e(de, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
890
- se,
946
+ r && /* @__PURE__ */ e(he, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ s(
947
+ pe,
891
948
  {
892
949
  icon: /* @__PURE__ */ e(L, {}),
893
950
  severity: "error",
@@ -899,28 +956,28 @@ const ye = ({
899
956
  }
900
957
  },
901
958
  children: [
902
- /* @__PURE__ */ e(ce, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: n.status_info_title }),
903
- /* @__PURE__ */ e(i, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: n.status_info_description })
959
+ /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: o.status_info_title }),
960
+ /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: o.status_info_description })
904
961
  ]
905
962
  }
906
963
  ) })
907
964
  ] });
908
- }, pt = S(dt), mt = () => {
909
- const { debts: a } = C(), { showError: o, showCompleted: n } = R(), [r, t] = y.useState(0);
965
+ }, gt = S(xt), wt = () => {
966
+ const { debts: a } = C(), { showError: n, showCompleted: o } = R(), [r, t] = x.useState(0);
910
967
  return /* @__PURE__ */ s(L, { children: [
911
- (o || n) && /* @__PURE__ */ e(pt, { setTabValue: t, sx: { mt: -24 } }),
968
+ (n || o) && /* @__PURE__ */ e(gt, { setTabValue: t, sx: { mt: -24 } }),
912
969
  /* @__PURE__ */ s(
913
- $e,
970
+ We,
914
971
  {
915
972
  "aria-label": a.details_tabs_aria_label,
916
973
  centered: !0,
917
- onChange: (l, d) => t(d),
974
+ onChange: (i, p) => t(p),
918
975
  textColor: "primary",
919
976
  value: r,
920
977
  variant: "fullWidth",
921
978
  children: [
922
979
  /* @__PURE__ */ e(
923
- le,
980
+ de,
924
981
  {
925
982
  "aria-controls": "debt-schedule-tabpanel-0",
926
983
  id: "debt-schedule-tab-0",
@@ -928,7 +985,7 @@ const ye = ({
928
985
  }
929
986
  ),
930
987
  /* @__PURE__ */ e(
931
- le,
988
+ de,
932
989
  {
933
990
  "aria-controls": "debt-details-tabpanel-1",
934
991
  id: "debt-details-tab-1",
@@ -938,112 +995,112 @@ const ye = ({
938
995
  ]
939
996
  }
940
997
  ),
941
- /* @__PURE__ */ e(pe, { index: 0, name: "debt-schedule", value: r, children: /* @__PURE__ */ e(ot, {}) }),
942
- /* @__PURE__ */ e(pe, { index: 1, name: "debt-details", value: r, children: /* @__PURE__ */ e(ct, {}) })
998
+ /* @__PURE__ */ e(ue, { index: 0, name: "debt-schedule", value: r, children: /* @__PURE__ */ e(ht, {}) }),
999
+ /* @__PURE__ */ e(ue, { index: 1, name: "debt-details", value: r, children: /* @__PURE__ */ e(ft, {}) })
943
1000
  ] });
944
- }, ht = S(mt), ut = ({ isOpen: a, onClose: o, sx: n }) => {
945
- const { debts: r } = C(), { showError: t, showCompleted: l } = R(), d = t || l ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(rt, {});
1001
+ }, Ct = S(wt), St = ({ isOpen: a, onClose: n, sx: o }) => {
1002
+ const { debts: r } = C(), { showError: t, showCompleted: i } = R(), p = t || i ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(pt, {});
946
1003
  return /* @__PURE__ */ e(
947
1004
  te,
948
1005
  {
949
1006
  ariaLabelClose: r.details_close_aria,
950
1007
  isOpen: a,
951
- onClose: o,
952
- sx: { ...n },
1008
+ onClose: n,
1009
+ sx: { ...o },
953
1010
  title: r.details_title,
954
- children: /* @__PURE__ */ s(f, { bgcolor: "background.default", children: [
955
- /* @__PURE__ */ e(Ee, { customDetailsChart: d }),
956
- /* @__PURE__ */ e(ht, {})
1011
+ children: /* @__PURE__ */ s(g, { bgcolor: "background.default", children: [
1012
+ /* @__PURE__ */ e(ke, { customDetailsChart: p }),
1013
+ /* @__PURE__ */ e(Ct, {})
957
1014
  ] })
958
1015
  }
959
1016
  );
960
- }, bt = S(() => {
961
- const { debts: a } = C(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: n } = z(), { onEvent: r } = M(), [t, l] = y.useState(o?.extra_payment ?? 0), d = t < 0 || t > 9999999999e-2, m = async () => {
962
- o && (await n({ ...o, extra_payment: t }), o.extra_payment = t, r(v.DEBTS_SAVE_PAYDOWN_ACTION, {
963
- user_guid: o?.user_guid
1017
+ }, vt = S(() => {
1018
+ const { debts: a } = C(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: o } = z(), { onEvent: r } = k(), [t, i] = x.useState(n?.extra_payment ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
1019
+ n && (await o({ ...n, extra_payment: t }), n.extra_payment = t, r(T.DEBTS_SAVE_PAYDOWN_ACTION, {
1020
+ user_guid: n?.user_guid
964
1021
  }));
965
1022
  }, c = () => {
966
1023
  setTimeout(() => {
967
- l(o?.extra_payment ?? 0);
1024
+ i(n?.extra_payment ?? 0);
968
1025
  }, 250);
969
1026
  };
970
1027
  return /* @__PURE__ */ e(
971
1028
  J,
972
1029
  {
973
- isSaveDisabled: d,
1030
+ isSaveDisabled: p,
974
1031
  label: a.paydown_drawer_extra_payment,
975
1032
  onCancel: c,
976
- onSave: m,
1033
+ onSave: d,
977
1034
  primaryText: a.paydown_drawer_extra_payment,
978
- secondaryText: B(o?.extra_payment, "0,0"),
979
- zeroStateText: o?.extra_payment ? void 0 : a.add_extra_payment,
1035
+ secondaryText: P(n?.extra_payment, "0,0"),
1036
+ zeroStateText: n?.extra_payment ? void 0 : a.add_extra_payment,
980
1037
  children: /* @__PURE__ */ e(
981
1038
  ae,
982
1039
  {
983
1040
  amount: t,
984
1041
  autoFocus: !0,
985
- error: d,
1042
+ error: p,
986
1043
  fullWidth: !0,
987
1044
  minAmount: 0,
988
- setAmount: (h) => l(isNaN(Number(h)) ? t : Number(h)),
1045
+ setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
989
1046
  sx: { ".MuiTypography-Body": { p: 0 } }
990
1047
  }
991
1048
  )
992
1049
  }
993
1050
  );
994
- }), _t = () => {
995
- const { debts: a } = C(), { totalMonthlyPayments: o } = q(), { monthlyCashFlowProfile: n } = z(), r = o + Number(n?.extra_payment);
996
- return /* @__PURE__ */ s(f, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
997
- /* @__PURE__ */ s(f, { p: 24, children: [
998
- /* @__PURE__ */ s(f, { alignItems: "center", gap: 4, mb: 24, children: [
999
- /* @__PURE__ */ e(i, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
1000
- /* @__PURE__ */ e(i, { bold: !0, variant: "H1", children: B(o, "0,0") }),
1001
- /* @__PURE__ */ e(i, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
1051
+ }), Dt = () => {
1052
+ const { debts: a } = C(), { totalMonthlyPayments: n } = q(), { monthlyCashFlowProfile: o } = z(), r = n + Number(o?.extra_payment);
1053
+ return /* @__PURE__ */ s(g, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1054
+ /* @__PURE__ */ s(g, { p: 24, children: [
1055
+ /* @__PURE__ */ s(g, { alignItems: "center", gap: 4, mb: 24, children: [
1056
+ /* @__PURE__ */ e(l, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
1057
+ /* @__PURE__ */ e(l, { bold: !0, variant: "H1", children: P(n, "0,0") }),
1058
+ /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
1002
1059
  ] }),
1003
- /* @__PURE__ */ s(f, { children: [
1004
- /* @__PURE__ */ e(i, { variant: "H3", children: a.paydown_drawer_subtitle }),
1005
- /* @__PURE__ */ e(i, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
1060
+ /* @__PURE__ */ s(g, { children: [
1061
+ /* @__PURE__ */ e(l, { variant: "H3", children: a.paydown_drawer_subtitle }),
1062
+ /* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
1006
1063
  ] })
1007
1064
  ] }),
1008
- /* @__PURE__ */ e(f, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(bt, {}) }),
1009
- /* @__PURE__ */ e(f, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(f, { gap: 4, children: [
1010
- /* @__PURE__ */ e(i, { variant: "Small", children: a.paydown_drawer_total_payment }),
1011
- /* @__PURE__ */ e(i, { bold: !0, textAlign: "right", variant: "Body", children: B(r, "0,0") })
1065
+ /* @__PURE__ */ e(g, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(vt, {}) }),
1066
+ /* @__PURE__ */ e(g, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(g, { gap: 4, children: [
1067
+ /* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
1068
+ /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: P(r, "0,0") })
1012
1069
  ] }) })
1013
1070
  ] });
1014
- }, yt = S(_t), ft = ({ isOpen: a, onClose: o, sx: n }) => {
1071
+ }, Tt = S(Dt), At = ({ isOpen: a, onClose: n, sx: o }) => {
1015
1072
  const { debts: r } = C();
1016
1073
  return /* @__PURE__ */ e(
1017
1074
  te,
1018
1075
  {
1019
1076
  ariaLabelClose: r.paydown_drawer_close_aria,
1020
1077
  isOpen: a,
1021
- onClose: o,
1022
- sx: { ...n },
1078
+ onClose: n,
1079
+ sx: { ...o },
1023
1080
  title: r.paydown_drawer_title,
1024
- children: /* @__PURE__ */ e(yt, {})
1081
+ children: /* @__PURE__ */ e(Tt, {})
1025
1082
  }
1026
1083
  );
1027
1084
  };
1028
- function gt(a, o) {
1029
- const n = (r) => {
1085
+ function Et(a, n) {
1086
+ const o = (r) => {
1030
1087
  if (typeof r == "number") return r;
1031
1088
  if (r === "!" || r === "✓") return 1 / 0;
1032
1089
  throw new Error("Unsupported value");
1033
1090
  };
1034
- return n(a) - n(o);
1091
+ return o(a) - o(n);
1035
1092
  }
1036
- function xt(a) {
1093
+ function It(a) {
1037
1094
  return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
1038
1095
  }
1039
- const wt = (a) => {
1040
- const o = {
1096
+ const Bt = (a) => {
1097
+ const n = {
1041
1098
  text: "#121417",
1042
1099
  background: "#FFB252"
1043
1100
  };
1044
- return a === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), a === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
1045
- }, Ct = (a) => {
1046
- const o = String(a.formattedValue), n = wt(o);
1101
+ return a === "!" && (n.text = "#FFFFFF", n.background = "#DF320C"), a === "✓" && (n.text = "#FFFFFF", n.background = "#09A57F"), n;
1102
+ }, Mt = (a) => {
1103
+ const n = String(a.formattedValue), o = Bt(n);
1047
1104
  return /* @__PURE__ */ e(
1048
1105
  re,
1049
1106
  {
@@ -1055,75 +1112,75 @@ const wt = (a) => {
1055
1112
  // Adjust the size as needed
1056
1113
  height: 20,
1057
1114
  borderRadius: "50%",
1058
- backgroundColor: n.background,
1115
+ backgroundColor: o.background,
1059
1116
  marginLeft: "10px"
1060
1117
  },
1061
- children: /* @__PURE__ */ e(i, { color: n.text, fontWeight: 700, variant: "Small", children: o })
1118
+ children: /* @__PURE__ */ e(l, { color: o.text, fontWeight: 700, variant: "Small", children: n })
1062
1119
  }
1063
1120
  );
1064
- }, St = (a) => {
1065
- const o = a.row.account, n = je[o.account_type];
1066
- return /* @__PURE__ */ s(f, { alignItems: "center", flexDirection: "row", children: [
1121
+ }, Pt = (a) => {
1122
+ const n = a.row.account, o = Ke[n.account_type];
1123
+ return /* @__PURE__ */ s(g, { alignItems: "center", flexDirection: "row", children: [
1067
1124
  /* @__PURE__ */ e(
1068
- Ce,
1125
+ De,
1069
1126
  {
1070
- alt: `${o.institutionName}`,
1071
- institutionGuid: o.institution_guid || ""
1127
+ alt: `${n.institutionName}`,
1128
+ institutionGuid: n.institution_guid || ""
1072
1129
  }
1073
1130
  ),
1074
- /* @__PURE__ */ s(f, { ml: 12, children: [
1075
- /* @__PURE__ */ e(i, { variant: "Small", children: o.name }),
1076
- /* @__PURE__ */ e(i, { variant: "XSmall", children: n })
1131
+ /* @__PURE__ */ s(g, { ml: 12, children: [
1132
+ /* @__PURE__ */ e(l, { variant: "Small", children: n.name }),
1133
+ /* @__PURE__ */ e(l, { variant: "XSmall", children: o })
1077
1134
  ] })
1078
1135
  ] });
1079
- }, Dt = ({
1136
+ }, kt = ({
1080
1137
  sx: a = {},
1081
- debts: o,
1082
- hoveredDebtGuid: n,
1138
+ debts: n,
1139
+ hoveredDebtGuid: o,
1083
1140
  onHoverRow: r,
1084
1141
  onClickRow: t
1085
1142
  }) => {
1086
- const l = j(), { onEvent: d } = M(), { isMobile: m } = X(), { debts: c } = C(), [h, p] = y.useState([
1143
+ const i = j(), { onEvent: p } = k(), { isMobile: d } = X(), { debts: c } = C(), [h, m] = x.useState([
1087
1144
  { field: "priority", sort: "asc" }
1088
- ]), g = [
1145
+ ]), y = [
1089
1146
  {
1090
1147
  field: "priority",
1091
1148
  headerName: c.table_column_priority,
1092
1149
  renderHeader: G,
1093
- renderCell: Ct,
1094
- sortComparator: gt,
1150
+ renderCell: Mt,
1151
+ sortComparator: Et,
1095
1152
  sortable: !0,
1096
1153
  hideSortIcons: !0,
1097
1154
  type: "custom",
1098
1155
  align: "left",
1099
1156
  headerAlign: "left",
1100
- minWidth: m ? 67 : 72,
1101
- flex: m ? 0.2 : 0.4
1157
+ minWidth: d ? 67 : 72,
1158
+ flex: d ? 0.2 : 0.4
1102
1159
  },
1103
1160
  {
1104
1161
  field: "account",
1105
1162
  headerName: c.table_column_account,
1106
1163
  renderHeader: G,
1107
- renderCell: St,
1164
+ renderCell: Pt,
1108
1165
  sortable: !1,
1109
1166
  type: "custom",
1110
1167
  align: "left",
1111
1168
  headerAlign: "left",
1112
- minWidth: m ? 180 : 225,
1169
+ minWidth: d ? 180 : 225,
1113
1170
  flex: 1
1114
1171
  },
1115
1172
  {
1116
1173
  field: "balance",
1117
1174
  headerName: c.table_column_balance,
1118
1175
  renderHeader: G,
1119
- valueFormatter: (u) => B(u, "0,0"),
1176
+ valueFormatter: (u) => P(u, "0,0"),
1120
1177
  sortable: !0,
1121
- hideSortIcons: m,
1178
+ hideSortIcons: d,
1122
1179
  type: "number",
1123
- align: m ? "right" : "left",
1124
- headerAlign: m ? "right" : "left",
1125
- minWidth: m ? 70 : 122,
1126
- flex: m ? 0.4 : 0.6
1180
+ align: d ? "right" : "left",
1181
+ headerAlign: d ? "right" : "left",
1182
+ minWidth: d ? 70 : 122,
1183
+ flex: d ? 0.4 : 0.6
1127
1184
  },
1128
1185
  {
1129
1186
  field: "interest_rate",
@@ -1131,7 +1188,7 @@ const wt = (a) => {
1131
1188
  renderHeader: G,
1132
1189
  valueFormatter: (u) => isNaN(u) ? "---" : `${Number(u).toFixed(2)}%`,
1133
1190
  sortable: !0,
1134
- hideSortIcons: m,
1191
+ hideSortIcons: d,
1135
1192
  type: "number",
1136
1193
  align: "left",
1137
1194
  headerAlign: "left",
@@ -1144,7 +1201,7 @@ const wt = (a) => {
1144
1201
  renderHeader: G,
1145
1202
  valueFormatter: (u) => u ? K(u, U.MONTH_SHORT_YEAR) : "---",
1146
1203
  sortable: !0,
1147
- hideSortIcons: m,
1204
+ hideSortIcons: d,
1148
1205
  type: "number",
1149
1206
  align: "left",
1150
1207
  headerAlign: "left",
@@ -1155,17 +1212,17 @@ const wt = (a) => {
1155
1212
  field: "monthly_payment",
1156
1213
  headerName: c.table_column_amount_due,
1157
1214
  renderHeader: G,
1158
- valueFormatter: (u) => typeof u == "number" ? B(u, "0,0") : "---",
1215
+ valueFormatter: (u) => typeof u == "number" ? P(u, "0,0") : "---",
1159
1216
  sortable: !0,
1160
- hideSortIcons: m,
1217
+ hideSortIcons: d,
1161
1218
  type: "number",
1162
1219
  align: "left",
1163
1220
  headerAlign: "left",
1164
1221
  minWidth: 122,
1165
1222
  flex: 0.6
1166
1223
  }
1167
- ], x = [
1168
- ...g.slice(0, 3),
1224
+ ], f = [
1225
+ ...y.slice(0, 3),
1169
1226
  {
1170
1227
  field: "chevron",
1171
1228
  headerName: "",
@@ -1178,14 +1235,14 @@ const wt = (a) => {
1178
1235
  headerAlign: "right",
1179
1236
  width: 20
1180
1237
  }
1181
- ], E = y.useMemo(() => o.map((u, A) => ({
1238
+ ], v = x.useMemo(() => n.map((u, I) => ({
1182
1239
  ...u,
1183
- id: A,
1184
- priority: xt(u)
1185
- })), [o]), k = (u) => {
1186
- const Y = u.target.closest("[data-id]")?.getAttribute("data-id"), b = o[Number(Y)];
1240
+ id: I,
1241
+ priority: It(u)
1242
+ })), [n]), E = (u) => {
1243
+ const Y = u.target.closest("[data-id]")?.getAttribute("data-id"), b = n[Number(Y)];
1187
1244
  r?.(b?.guid ?? "");
1188
- }, D = (u) => E.find((A) => A.guid === u)?.id;
1245
+ }, D = (u) => v.find((I) => I.guid === u)?.id;
1189
1246
  return /* @__PURE__ */ e(
1190
1247
  re,
1191
1248
  {
@@ -1198,32 +1255,32 @@ const wt = (a) => {
1198
1255
  ...a
1199
1256
  },
1200
1257
  children: /* @__PURE__ */ e(
1201
- Ge,
1258
+ Ye,
1202
1259
  {
1203
- columns: m ? x : g,
1260
+ columns: d ? f : y,
1204
1261
  disableColumnFilter: !0,
1205
1262
  disableColumnMenu: !0,
1206
1263
  hideFooter: !0,
1207
1264
  initialState: { sorting: { sortModel: h } },
1208
1265
  onRowClick: (u) => {
1209
- t(), d(v.DEBTS_CLICK_TABLE_ROW, { account_guid: u.row.guid });
1266
+ t(), p(T.DEBTS_CLICK_TABLE_ROW, { account_guid: u.row.guid });
1210
1267
  },
1211
1268
  onSortModelChange: (u) => {
1212
- p(u), d(v.DEBTS_CLICK_TABLE_SORT);
1269
+ m(u), p(T.DEBTS_CLICK_TABLE_SORT);
1213
1270
  },
1214
- rows: E,
1271
+ rows: v,
1215
1272
  slotProps: {
1216
1273
  baseIconButton: { color: "secondary", sx: { ml: 8 } },
1217
1274
  row: {
1218
- onMouseEnter: k,
1275
+ onMouseEnter: E,
1219
1276
  onMouseLeave: () => r?.("")
1220
1277
  }
1221
1278
  },
1222
1279
  sortModel: h,
1223
1280
  sortingOrder: ["asc", "desc"],
1224
1281
  sx: {
1225
- [`& .MuiDataGrid-row[data-id="${D(n)}"]`]: {
1226
- backgroundColor: l.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1282
+ [`& .MuiDataGrid-row[data-id="${D(o)}"]`]: {
1283
+ backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1227
1284
  filter: "brightness(98%)"
1228
1285
  }
1229
1286
  }
@@ -1231,50 +1288,54 @@ const wt = (a) => {
1231
1288
  )
1232
1289
  }
1233
1290
  );
1234
- }, vt = ({ buttonText: a, isOpen: o, onClick: n }) => {
1235
- const { isDesktop: r, isTablet: t } = X(), l = o ? "unfold_less" : "unfold_more";
1291
+ }, Ft = ({ buttonText: a, isOpen: n, onClick: o }) => {
1292
+ const { isDesktop: r, isTablet: t } = X(), i = n ? "unfold_less" : "unfold_more";
1236
1293
  return r || t ? /* @__PURE__ */ e(
1237
- be,
1294
+ fe,
1238
1295
  {
1239
1296
  "aria-controls": "prioritize-debts",
1240
1297
  "aria-describedby": "prioritize-debts",
1241
1298
  "aria-haspopup": !0,
1242
1299
  "aria-label": "prioritize-debts",
1243
- onClick: n,
1244
- startIcon: /* @__PURE__ */ e(ee, { name: l }),
1300
+ onClick: o,
1301
+ startIcon: /* @__PURE__ */ e(ee, { name: i }),
1245
1302
  sx: { justifyContent: "start", minWidth: 214, mx: 4 },
1246
1303
  children: a
1247
1304
  }
1248
1305
  ) : /* @__PURE__ */ e(
1249
- ze,
1306
+ Ue,
1250
1307
  {
1251
1308
  "aria-controls": "prioritize-debts",
1252
1309
  "aria-describedby": "prioritize-debts",
1253
1310
  "aria-haspopup": !0,
1254
1311
  "aria-label": "prioritize-debts",
1255
- onClick: n,
1256
- children: /* @__PURE__ */ e(ee, { name: l })
1312
+ onClick: o,
1313
+ children: /* @__PURE__ */ e(ee, { name: i })
1257
1314
  }
1258
1315
  );
1259
- }, Tt = S(({ buttonEl: a, onClose: o }) => {
1260
- const { onEvent: n } = M(), { debts: r } = C(), { selectedDebtPriority: t, setSelectedDebtPriority: l } = R(), d = !!a, m = [
1316
+ }, Nt = S(({ buttonEl: a, onClose: n }) => {
1317
+ const { onEvent: o } = k(), { debts: r } = C(), { selectedDebtPriority: t, setSelectedDebtPriority: i } = R(), p = !!a, d = [
1261
1318
  {
1262
- priority: $.HIGHEST_INTEREST,
1319
+ priority: M.FASTEST_PAYOFF_FIRST,
1320
+ text: r.priority_sort_fastest_payoff
1321
+ },
1322
+ {
1323
+ priority: M.HIGHEST_INTEREST,
1263
1324
  text: r.priority_sort_highest_interest
1264
1325
  },
1265
1326
  {
1266
- priority: $.LOWEST_BALANCE,
1327
+ priority: M.LOWEST_BALANCE,
1267
1328
  text: r.priority_sort_lowest_balance
1268
1329
  },
1269
1330
  {
1270
- priority: $.HIGHEST_BALANCE,
1331
+ priority: M.HIGHEST_BALANCE,
1271
1332
  text: r.priority_sort_highest_balance
1272
1333
  }
1273
1334
  ], c = (h) => {
1274
- l(h), n(v.DEBTS_CLICK_PRIORITY, { debts_priority: h });
1335
+ i(h), o(T.DEBTS_CLICK_PRIORITY, { debts_priority: h });
1275
1336
  };
1276
1337
  return /* @__PURE__ */ e(
1277
- Ve,
1338
+ Ze,
1278
1339
  {
1279
1340
  anchorEl: a,
1280
1341
  anchorOrigin: {
@@ -1282,14 +1343,14 @@ const wt = (a) => {
1282
1343
  horizontal: "left"
1283
1344
  },
1284
1345
  id: "prioritize-debts",
1285
- onClose: o,
1286
- open: d,
1346
+ onClose: n,
1347
+ open: p,
1287
1348
  transformOrigin: {
1288
1349
  vertical: "top",
1289
1350
  horizontal: "left"
1290
1351
  },
1291
- children: /* @__PURE__ */ e(he, { children: m.map(({ priority: h, text: p }) => /* @__PURE__ */ s(
1292
- Xe,
1352
+ children: /* @__PURE__ */ e(_e, { children: d.map(({ priority: h, text: m }) => /* @__PURE__ */ s(
1353
+ qe,
1293
1354
  {
1294
1355
  onClick: () => c(h),
1295
1356
  sx: {
@@ -1307,69 +1368,70 @@ const wt = (a) => {
1307
1368
  }
1308
1369
  },
1309
1370
  children: [
1310
- /* @__PURE__ */ e(i, { color: "inherit", variant: "Small", children: p }),
1311
- t === h && /* @__PURE__ */ e(ue, { color: "inherit", filled: !0, fontSize: "small" })
1371
+ /* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: m }),
1372
+ t === h && /* @__PURE__ */ e(ye, { color: "inherit", filled: !0, fontSize: "small" })
1312
1373
  ]
1313
1374
  },
1314
1375
  h
1315
1376
  )) })
1316
1377
  }
1317
1378
  );
1318
- }), At = S(() => {
1319
- const { onEvent: a } = M(), { debts: o } = C(), { selectedDebtPriority: n } = R(), [r, t] = y.useState(null), l = (h) => {
1320
- t(h.currentTarget), a(v.DEBTS_CLICK_PRIORITIZE);
1321
- }, d = () => {
1379
+ }), Rt = S(() => {
1380
+ const { onEvent: a } = k(), { debts: n } = C(), { selectedDebtPriority: o } = R(), [r, t] = x.useState(null), i = (h) => {
1381
+ t(h.currentTarget), a(T.DEBTS_CLICK_PRIORITIZE);
1382
+ }, p = () => {
1322
1383
  t(null);
1323
- }, m = !!r, c = y.useMemo(() => ({
1324
- [$.HIGHEST_INTEREST]: o.priority_sort_highest_interest,
1325
- [$.HIGHEST_BALANCE]: o.priority_sort_highest_balance,
1326
- [$.LOWEST_BALANCE]: o.priority_sort_lowest_balance
1327
- })[n] ?? o.priority_sort_lowest_balance, [n]);
1384
+ }, d = !!r, c = x.useMemo(() => ({
1385
+ [M.FASTEST_PAYOFF_FIRST]: n.priority_sort_fastest_payoff,
1386
+ [M.HIGHEST_INTEREST]: n.priority_sort_highest_interest,
1387
+ [M.HIGHEST_BALANCE]: n.priority_sort_highest_balance,
1388
+ [M.LOWEST_BALANCE]: n.priority_sort_lowest_balance
1389
+ })[o] ?? n.priority_sort_lowest_balance, [o]);
1328
1390
  return /* @__PURE__ */ s(_, { children: [
1329
- /* @__PURE__ */ e(vt, { buttonText: c, isOpen: m, onClick: l }),
1330
- /* @__PURE__ */ e(Tt, { buttonEl: r, onClose: d })
1391
+ /* @__PURE__ */ e(Ft, { buttonText: c, isOpen: d, onClick: i }),
1392
+ /* @__PURE__ */ e(Nt, { buttonEl: r, onClose: p })
1331
1393
  ] });
1332
- }), Et = (a, o, n = 0) => {
1394
+ }), Lt = (a, n, o = 0) => {
1333
1395
  const r = a.map((c) => ({ ...c }));
1334
- _e(r, o);
1335
- const t = /* @__PURE__ */ new Date(), l = [];
1336
- let d = 0, m = 1;
1396
+ xe(r, n);
1397
+ const t = /* @__PURE__ */ new Date(), i = [];
1398
+ let p = 0, d = 1;
1337
1399
  for (const c of r)
1338
- l.push({
1400
+ i.push({
1339
1401
  ...c,
1340
1402
  // Start with the initial balance
1341
1403
  dataset: [{ x: new Date(t), y: c.balance }]
1342
1404
  });
1343
1405
  for (; r.some((c) => c.balance >= 0.01 && !c.is_impossible); ) {
1344
1406
  let c = !1;
1345
- for (const [h, p] of r.entries()) {
1346
- if (p.balance <= 0.01) continue;
1347
- const g = l[h].dataset, E = (p.interest_rate ?? 0) / 100 / 12, k = p.balance * E;
1348
- let D = p.monthly_payment ?? 0;
1349
- h === 0 && (D += n), p.balance += k;
1350
- const u = Math.min(p.balance, D + d);
1351
- if (u <= k) {
1352
- p.is_impossible = !0, l[h].is_impossible = !0, l[h].priority = void 0, g.push({ x: new Date(t), y: p.balance });
1407
+ for (const [h, m] of r.entries()) {
1408
+ if (m.balance <= 0.01) continue;
1409
+ const y = i[h].dataset, v = (m.interest_rate ?? 0) / 100 / 12, E = m.balance * v;
1410
+ let D = m.monthly_payment ?? 0;
1411
+ h === 0 && (D += o), m.balance += E;
1412
+ const u = Math.min(m.balance, D + p);
1413
+ if (u <= E) {
1414
+ m.is_impossible = !0, i[h].is_impossible = !0, i[h].priority = void 0, y.push({ x: new Date(t), y: m.balance });
1353
1415
  continue;
1354
1416
  }
1355
- p.balance -= u, p.balance = p.balance < 0.01 ? 0 : p.balance, g.push({
1417
+ m.balance -= u, m.balance = m.balance < 0.01 ? 0 : m.balance, y.push({
1356
1418
  x: new Date(t),
1357
- y: Math.max(0, p.balance),
1419
+ y: Math.max(0, m.balance),
1358
1420
  payment: u,
1359
- extra: d
1360
- }), p.balance <= 0 && (d += D, l[h].projected_payoff_date = new Date(t)), u > 0 && (c = !0);
1421
+ extra: p
1422
+ }), m.balance <= 0 && (p += D, i[h].projected_payoff_date = new Date(t)), u > 0 && (c = !0);
1361
1423
  }
1362
1424
  c && t.setMonth(t.getMonth() + 1);
1363
1425
  }
1364
- return l.forEach((c) => {
1426
+ return i.forEach((c) => {
1365
1427
  (c.interest_rate === void 0 || c.interest_rate === void 0) && (c.projected_payoff_date = void 0);
1366
- }), l.forEach((c) => {
1367
- c.priority = !c.is_paid_off && !c.is_impossible ? m++ : void 0;
1368
- }), l;
1369
- }, It = S(({ onClick: a }) => {
1370
- const { debts: o } = C(), { isDesktop: n } = X(), { totalMonthlyPayments: r } = q(), { monthlyCashFlowProfile: t } = z(), l = r + Number(t?.extra_payment), d = n ? o.paydown_button_long : o.paydown_button_short;
1428
+ }), i.forEach((c) => {
1429
+ c.priority = !c.is_paid_off && !c.is_impossible ? d++ : void 0;
1430
+ }), i;
1431
+ }, $t = S(({ onClick: a }) => {
1432
+ const { debts: n } = C(), { isDesktop: o } = X(), { totalMonthlyPayments: r } = q(), { monthlyCashFlowProfile: t } = z(), i = r + Number(t?.extra_payment), p = o ? n.paydown_button_long : n.paydown_button_short;
1371
1433
  return /* @__PURE__ */ e(
1372
- be,
1434
+ fe,
1373
1435
  {
1374
1436
  "aria-controls": "extra-paydown",
1375
1437
  "aria-describedby": "extra-paydown",
@@ -1377,100 +1439,100 @@ const wt = (a) => {
1377
1439
  "aria-label": "extra-paydown",
1378
1440
  onClick: a,
1379
1441
  sx: { justifyContent: "start", minWidth: 100, mx: 4 },
1380
- children: T(d, B(l, "0,0"))
1442
+ children: A(p, P(i, "0,0"))
1381
1443
  }
1382
1444
  );
1383
- }), Bt = ({ onBackClick: a, sx: o }) => {
1384
- const [n, r] = y.useState(!1), [t, l] = y.useState(!1), [d, m] = y.useState(!1), [c, h] = y.useState(""), { isDesktop: p, isMobile: g } = X(), { debts: x } = C(), { onEvent: E } = M(), { isCopyLoaded: k, isInitialized: D, setSelectedAccounts: u } = Ae(), { setSelectedAccount: A } = Ie(), { selectedDebtPriority: V, setSelectedDebtChartData: Y } = R(), { visibleDebtAccounts: b } = Z(), { goalsLoaded: w, loadGoals: I, monthlyCashFlowProfile: P } = z(), { debts: N } = q(), H = y.useMemo(() => {
1385
- const F = P?.extra_payment ?? 0;
1386
- return Et(N, V, F);
1387
- }, [N, V, P]);
1388
- y.useEffect(() => {
1389
- u(b), E(v.DEBTS_VIEW);
1390
- }, []), y.useEffect(() => {
1445
+ }), Ht = ({ onBackClick: a, sx: n }) => {
1446
+ const [o, r] = x.useState(!1), [t, i] = x.useState(!1), [p, d] = x.useState(!1), [c, h] = x.useState(""), { isDesktop: m, isMobile: y } = X(), { debts: f } = C(), { onEvent: v } = k(), { isCopyLoaded: E, isInitialized: D, setSelectedAccounts: u } = Pe(), { setSelectedAccount: I } = Fe(), { selectedDebtPriority: V, setSelectedDebtChartData: Y } = R(), { visibleDebtAccounts: b } = Z(), { goalsLoaded: w, loadGoals: B, monthlyCashFlowProfile: F } = z(), { debts: N } = q(), $ = x.useMemo(() => {
1447
+ const H = F?.extra_payment ?? 0;
1448
+ return Lt(N, V, H);
1449
+ }, [N, V, F]);
1450
+ x.useEffect(() => {
1451
+ u(b), v(T.DEBTS_VIEW);
1452
+ }, []), x.useEffect(() => {
1391
1453
  u(b);
1392
- }, [b]), y.useEffect(() => {
1393
- D && I().finally();
1454
+ }, [b]), x.useEffect(() => {
1455
+ D && B().finally();
1394
1456
  }, [D]);
1395
- const oe = (F) => h(F), ne = () => {
1396
- const F = b.find((Q) => Q.guid === c), ie = H.find((Q) => Q.guid === c);
1397
- F && A(F), ie && Y(ie), r(!0);
1398
- }, fe = () => E(v.DEBTS_CLICK_FILTER), ge = () => {
1399
- m(!0), E(v.DEBTS_CLICK_SNOWBALL_CTA);
1400
- }, xe = () => {
1401
- l(!0), E(v.DEBTS_CLICK_PAYDOWN);
1457
+ const ne = (H) => h(H), oe = () => {
1458
+ const H = b.find((Q) => Q.guid === c), ie = $.find((Q) => Q.guid === c);
1459
+ H && I(H), ie && Y(ie), r(!0);
1460
+ }, we = () => v(T.DEBTS_CLICK_FILTER), Ce = () => {
1461
+ d(!0), v(T.DEBTS_CLICK_SNOWBALL_CTA);
1462
+ }, Se = () => {
1463
+ i(!0), v(T.DEBTS_CLICK_PAYDOWN);
1402
1464
  };
1403
- return !w || !k || !D ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ s(
1404
- Re,
1465
+ return !w || !E || !D ? /* @__PURE__ */ e(Je, {}) : /* @__PURE__ */ s(
1466
+ Oe,
1405
1467
  {
1406
1468
  accountOptions: b,
1407
1469
  actions: [
1408
- /* @__PURE__ */ e(At, {}, "prioritize-debts"),
1409
- /* @__PURE__ */ e(It, { onClick: xe }, "extra-paydown")
1470
+ /* @__PURE__ */ e(Rt, {}, "prioritize-debts"),
1471
+ /* @__PURE__ */ e($t, { onClick: Se }, "extra-paydown")
1410
1472
  ],
1411
- onAccountsFilterClick: fe,
1473
+ onAccountsFilterClick: we,
1412
1474
  onBackClick: a,
1413
- sx: o,
1414
- title: x.title,
1475
+ sx: n,
1476
+ title: f.title,
1415
1477
  children: [
1416
- /* @__PURE__ */ s(f, { sx: { px: p ? "48px" : "24px" }, children: [
1478
+ /* @__PURE__ */ s(g, { sx: { px: m ? "48px" : "24px" }, children: [
1417
1479
  /* @__PURE__ */ s(
1418
- f,
1480
+ g,
1419
1481
  {
1420
1482
  sx: {
1421
- alignItems: g ? "flex-start" : "flex-end",
1422
- flexDirection: g ? "column" : "row",
1423
- mx: g ? "-12px" : 0
1483
+ alignItems: y ? "flex-start" : "flex-end",
1484
+ flexDirection: y ? "column" : "row",
1485
+ mx: y ? "-12px" : 0
1424
1486
  },
1425
1487
  children: [
1426
1488
  /* @__PURE__ */ e(
1427
- ye,
1489
+ ge,
1428
1490
  {
1429
- debts: H,
1430
- height: g ? 250 : void 0,
1491
+ debts: $,
1492
+ height: y ? 250 : void 0,
1431
1493
  hoveredDebtGuid: c,
1432
- onClickArea: ne,
1433
- onHoverArea: oe,
1434
- sx: { mr: g ? "4px" : "-48px" }
1494
+ onClickArea: oe,
1495
+ onHoverArea: ne,
1496
+ sx: { mr: y ? "4px" : "-48px" }
1435
1497
  }
1436
1498
  ),
1437
1499
  /* @__PURE__ */ e(
1438
- qe,
1500
+ ot,
1439
1501
  {
1440
- debts: H,
1441
- onClickCta: ge,
1442
- sx: { mb: g ? "0px" : "64px" }
1502
+ debts: $,
1503
+ onClickCta: Ce,
1504
+ sx: { mb: y ? "0px" : "64px" }
1443
1505
  }
1444
1506
  )
1445
1507
  ]
1446
1508
  }
1447
1509
  ),
1448
- /* @__PURE__ */ e(f, { sx: { mx: g ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1449
- Dt,
1510
+ /* @__PURE__ */ e(g, { sx: { mx: y ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1511
+ kt,
1450
1512
  {
1451
- debts: H,
1513
+ debts: $,
1452
1514
  hoveredDebtGuid: c,
1453
- onClickRow: ne,
1454
- onHoverRow: oe
1515
+ onClickRow: oe,
1516
+ onHoverRow: ne
1455
1517
  }
1456
1518
  ) })
1457
1519
  ] }),
1458
1520
  /* @__PURE__ */ e(
1459
- Je,
1521
+ lt,
1460
1522
  {
1461
- isOpen: d,
1462
- onClose: () => m(!1)
1523
+ isOpen: p,
1524
+ onClose: () => d(!1)
1463
1525
  }
1464
1526
  ),
1465
- /* @__PURE__ */ e(ut, { isOpen: n, onClose: () => r(!1) }),
1466
- /* @__PURE__ */ e(ft, { isOpen: t, onClose: () => l(!1) })
1527
+ /* @__PURE__ */ e(St, { isOpen: o, onClose: () => r(!1) }),
1528
+ /* @__PURE__ */ e(At, { isOpen: t, onClose: () => i(!1) })
1467
1529
  ]
1468
1530
  }
1469
1531
  );
1470
- }, xr = S(Bt);
1532
+ }, Ir = S(Ht);
1471
1533
  export {
1472
- ye as DebtsChart,
1473
- Sr as DebtsStore,
1474
- Dt as DebtsTable,
1475
- xr as DebtsWidget
1534
+ ge as DebtsChart,
1535
+ Pr as DebtsStore,
1536
+ kt as DebtsTable,
1537
+ Ir as DebtsWidget
1476
1538
  };