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