@mx-cartographer/experiences 7.2.14 → 7.2.15-alpha-ram2-finstromg-testing
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/CHANGELOG.md +4 -0
- package/dist/{Account-vp_TAbGt.mjs → Account-01wOyrH1.mjs} +1 -1
- package/dist/{AccountDetailsContent-CsH1w_GZ.mjs → AccountDetailsContent-C_ZRryuO.mjs} +10 -10
- package/dist/{AccountDetailsHeader-Df1JkzYi.mjs → AccountDetailsHeader-D5h5tdeG.mjs} +8 -8
- package/dist/{AccountFields-DUToRRqW.mjs → AccountFields-CPkGZ3SD.mjs} +5 -5
- package/dist/{AccountListItem-CeY_WIpj.mjs → AccountListItem-D4uG9yC-.mjs} +4 -4
- package/dist/{AccountStore-BkoLK9Tq.mjs → AccountStore-DYwH7yC9.mjs} +40 -29
- package/dist/{Accounts-C1QxUB-e.mjs → Accounts-D7QljYas.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-wjoNuj7B.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-ZO9N26Kx.mjs} +3 -3
- package/dist/{CategoryStore-BCcpI3oJ.mjs → CategoryStore-C1IfDPCE.mjs} +1 -1
- package/dist/{CategoryUtil-BR3H5i6n.mjs → CategoryUtil-DUM8NuGO.mjs} +1 -1
- package/dist/{ConnectDrawer-Bw5s6Dw1.mjs → ConnectDrawer-CuUj16NH.mjs} +2 -2
- package/dist/{ConnectionsDrawer-BDvVuJQf.mjs → ConnectionsDrawer-Bz4uwdFE.mjs} +3 -3
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-xH-hqry9.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
- package/dist/{DebtsStore-BD_XwsI7.mjs → DebtsStore-Bu8rRRSL.mjs} +1 -1
- package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
- package/dist/Drawer-BEtCk82g.mjs +163 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DlGZfm4y.mjs} +3 -3
- package/dist/FinstrongStore-BbnA6Crl.mjs +434 -0
- package/dist/{GoalStore-DZ_Jvsa_.mjs → GoalStore-Dcnj5pii.mjs} +3 -3
- package/dist/{Help-B6dIcujh.mjs → Help-BnPXM_N2.mjs} +2 -2
- package/dist/{LineChart-D4GI7nVh.mjs → LineChart-Ct9DNmhS.mjs} +209 -181
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
- package/dist/{ManageIncome-CV-bGuR-.mjs → ManageIncome-n6qSYGHO.mjs} +152 -149
- package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
- package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
- package/dist/{NetWorthStore-D1NiDUcc.mjs → NetWorthStore-CpL_kqvx.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-BKKuULAd.mjs} +5 -5
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-CCmnsd7y.mjs} +3 -3
- package/dist/{RecurringSettings-G6_BbsIF.mjs → RecurringSettings-BwnDPthJ.mjs} +4 -4
- package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
- package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4RVULF8.mjs} +1 -1
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
- package/dist/SpendingLegend-CW8mIzqd.mjs +196 -0
- package/dist/{TransactionDetails-CDtya0KS.mjs → TransactionDetails-CaJruWq3.mjs} +11 -8
- package/dist/{TransactionStore-DxPLdF3B.mjs → TransactionStore-DvOEbOzL.mjs} +3 -3
- package/dist/{TrendsStore-DCYbpXPO.mjs → TrendsStore-BVNxGsE4.mjs} +14 -14
- package/dist/{User-BQUxBeZV.mjs → User-wXzDI4M8.mjs} +2 -2
- package/dist/{WidgetContainer-EbrN1oIo.mjs → WidgetContainer-6dsjtOVg.mjs} +4 -4
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/index.es.js +14 -14
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +13 -13
- package/dist/cashflow/index.es.js +45 -45
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/charts/LineChart.d.ts +8 -2
- package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/index.es.js +34 -34
- package/dist/common/types/Finstrong.d.ts +50 -0
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +58 -1
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +11 -11
- package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-hrNpJ77n.mjs} +2 -2
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
- package/dist/finstrong/components/ProgressBar.d.ts +15 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
- package/dist/finstrong/components/StatusChip.d.ts +5 -0
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
- package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
- package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
- package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
- package/dist/finstrong/components/shared/TransactionList.d.ts +15 -0
- package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +8 -0
- package/dist/finstrong/index.es.js +3179 -1054
- package/dist/finstrong/stores/FinstrongStore.d.ts +10 -1
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +15 -15
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/investments/index.es.js +5 -5
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +35 -35
- package/dist/notifications/index.es.js +4 -4
- package/dist/recurringtransactions/index.es.js +13 -13
- package/dist/settings/index.es.js +8 -8
- package/dist/spending/index.es.js +238 -415
- package/dist/transactions/index.es.js +15 -15
- package/dist/trends/index.es.js +95 -95
- package/dist/{useAccountDisplayName-jS05A6-6.mjs → useAccountDisplayName-CMMlIOXF.mjs} +2 -2
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/package.json +1 -1
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
|
@@ -1,280 +1,174 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useTheme as
|
|
5
|
-
import { PieChart as
|
|
6
|
-
import {
|
|
7
|
-
import { Text as
|
|
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
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import {
|
|
44
|
-
import { T as
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
primary: /* @__PURE__ */ e(W, { sx: { color: "text.secondary" }, variant: "caption", children: t.primaryText }),
|
|
84
|
-
secondary: /* @__PURE__ */ e(W, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: t.secondaryText })
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
] }) }),
|
|
88
|
-
i < n.length - 1 && /* @__PURE__ */ e(ge, { sx: { color: "divider", ml: 68 } })
|
|
89
|
-
] }, t.key))
|
|
90
|
-
}
|
|
91
|
-
) }), ht = ut, le = (n) => n * (180 / Math.PI), ie = (n, o) => [
|
|
92
|
-
{
|
|
93
|
-
description: o.vulnerable_description,
|
|
94
|
-
max: 25,
|
|
95
|
-
scoreContent: o.accordion_details_text.vulnerable,
|
|
96
|
-
status: o.vulnerable
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
description: o.building_description,
|
|
100
|
-
max: 50,
|
|
101
|
-
scoreContent: o.accordion_details_text.building,
|
|
102
|
-
status: o.building
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
description: o.stable_description,
|
|
106
|
-
max: 75,
|
|
107
|
-
scoreContent: o.accordion_details_text.stable,
|
|
108
|
-
status: o.stable
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
description: o.strong_description,
|
|
112
|
-
max: 100,
|
|
113
|
-
scoreContent: o.accordion_details_text.strong,
|
|
114
|
-
status: o.strong
|
|
115
|
-
}
|
|
116
|
-
].find((d) => n > 0 && n <= d.max) || { status: o.insufficient_data, description: "", scoreContent: "" }, D = {
|
|
117
|
-
POOR: "#8C0E0E",
|
|
118
|
-
FAIR: "#E32727",
|
|
119
|
-
GOOD: "#FFB70D",
|
|
120
|
-
VERY_GOOD: "#0EA26C",
|
|
121
|
-
EXCEPTIONAL: "#005C3D"
|
|
122
|
-
}, M = {
|
|
123
|
-
POOR: "#B21C1C",
|
|
124
|
-
FAIR: "#FF3232",
|
|
125
|
-
GOOD: "#FFC02C",
|
|
126
|
-
VERY_GOOD: "#29C76B",
|
|
127
|
-
EXCEPTIONAL: "#008A5A"
|
|
128
|
-
}, _t = (n, o, t) => n >= 300 && n < 580 ? {
|
|
129
|
-
status: t.poor,
|
|
130
|
-
color: o ? M.POOR : D.POOR
|
|
131
|
-
} : n >= 580 && n < 670 ? {
|
|
132
|
-
status: t.fair,
|
|
133
|
-
color: o ? M.FAIR : D.FAIR
|
|
134
|
-
} : n >= 670 && n < 740 ? {
|
|
135
|
-
status: t.good,
|
|
136
|
-
color: o ? M.GOOD : D.GOOD
|
|
137
|
-
} : n >= 740 && n < 800 ? {
|
|
138
|
-
status: t.very_good,
|
|
139
|
-
color: o ? M.VERY_GOOD : D.VERY_GOOD
|
|
140
|
-
} : n >= 800 && n <= 850 ? {
|
|
141
|
-
status: t.exceptional,
|
|
142
|
-
color: o ? M.EXCEPTIONAL : D.EXCEPTIONAL
|
|
143
|
-
} : { status: t.missing_data }, gt = (n, o, t, i) => {
|
|
144
|
-
const d = n.reduce((r, a) => r + a.value, 0);
|
|
145
|
-
let l = 0;
|
|
146
|
-
const s = n.map((r) => {
|
|
147
|
-
const a = r.value / d * o, c = t + l, p = c + a;
|
|
148
|
-
return l += a, {
|
|
149
|
-
...r,
|
|
150
|
-
startAngle: c,
|
|
151
|
-
endAngle: p
|
|
152
|
-
};
|
|
153
|
-
});
|
|
154
|
-
return [s[i].startAngle, s[i].endAngle];
|
|
155
|
-
}, ft = (n, o, t, i, d) => {
|
|
156
|
-
let l = 0, s = 0;
|
|
157
|
-
const r = Math.floor(i), a = i - r;
|
|
158
|
-
return r > t ? (l = n, s = o) : r === t && a > 0 && (l = n, s = d), [l, s];
|
|
159
|
-
}, yt = (n, o, t = 0) => {
|
|
160
|
-
const i = n * Math.sin(o - t), d = -n * Math.cos(o - t);
|
|
161
|
-
return [i, d];
|
|
162
|
-
}, bt = ({
|
|
163
|
-
dynamicCopy: n,
|
|
164
|
-
fallbackLabel: o,
|
|
165
|
-
icon: t,
|
|
166
|
-
key: i,
|
|
167
|
-
label: d,
|
|
168
|
-
value: l
|
|
169
|
-
}) => {
|
|
170
|
-
const s = !!l, r = s ? xt(i, l) : n && b(n, o) || o;
|
|
171
|
-
return {
|
|
172
|
-
icon: s ? /* @__PURE__ */ e(De, {}) : t,
|
|
173
|
-
isComplete: s,
|
|
174
|
-
key: i,
|
|
175
|
-
primaryText: d,
|
|
176
|
-
secondaryText: r
|
|
177
|
-
};
|
|
178
|
-
}, xt = (n, o) => ({
|
|
179
|
-
[A.DateOfBirth]: (i) => _e(new Date(Number(i) * 1e3), "MMM d, yyyy"),
|
|
180
|
-
[A.MonthlyIncome]: (i) => `$${i}`
|
|
181
|
-
})[n]?.(o) ?? String(o), de = (n) => n !== null ? Math.round(n * 100) : null, Ct = ({
|
|
182
|
-
dialScoreData: n,
|
|
183
|
-
dataIndex: o,
|
|
184
|
-
arcColor: t,
|
|
185
|
-
arcStartAngle: i,
|
|
186
|
-
totalAngularSpan: d,
|
|
187
|
-
centerX: l,
|
|
1
|
+
import { jsxs as i, Fragment as z, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import C from "@mui/material/Box";
|
|
3
|
+
import u from "@mui/material/Stack";
|
|
4
|
+
import { useTheme as E, alpha as fe } from "@mui/material/styles";
|
|
5
|
+
import { PieChart as _n, BarPlot as hn } from "@mui/x-charts";
|
|
6
|
+
import { TrendingUp as gt, ArrowRightAlt as mn, TrendingDown as gn, AccountBalance as yt, ChevronRight as Z, MultilineChart as bt, CreditCard as Ke, CheckCircle as yn, Cancel as bn, Savings as fn, ContentCopy as xn, Add as ft, Cardiology as Sn, Payments as Cn, CalendarMonth as vn, ExpandMore as wn } from "@mxenabled/mx-icons";
|
|
7
|
+
import { P as k, H3 as N, Text as I, InstitutionLogo as xt, H2 as Pe, MerchantLogo as kn, Icon as Mn } from "@mxenabled/mxui";
|
|
8
|
+
import { g as Dn, a as In, r as rt, b as An, c as je, d as St, C as ve, e as we, f as Tn, h as On, i as Rn, j as Ct, k as at, l as Fn, m as it, n as Pn, o as vt, p as Bn, q as wt, s as Te, t as Ln, u as Wn, v as $n, w as zn, A as ee, x as En, P as Gn } from "../FinstrongStore-BbnA6Crl.mjs";
|
|
9
|
+
import { y as Gi, F as Hi } from "../FinstrongStore-BbnA6Crl.mjs";
|
|
10
|
+
import * as st from "d3";
|
|
11
|
+
import { observer as S } from "mobx-react-lite";
|
|
12
|
+
import { u as v, b as j, p as Q, z as F, q as Hn, a as kt, d as Me, m as Ye, g as Nn, f as Kn, j as Ve, h as jn, i as Yn } from "../hooks-C41HAxM5.mjs";
|
|
13
|
+
import { L as J } from "../Loader-DUaFpDGv.mjs";
|
|
14
|
+
import m from "react";
|
|
15
|
+
import $ from "@mui/material/Button";
|
|
16
|
+
import K from "@mui/material/Card";
|
|
17
|
+
import { L as Xe } from "../LineChart-Ct9DNmhS.mjs";
|
|
18
|
+
import { C as Mt } from "../ConnectionsDrawer-Bz4uwdFE.mjs";
|
|
19
|
+
import { l as oe, g as Dt, A as He } from "../ConnectDrawer-CuUj16NH.mjs";
|
|
20
|
+
import pe from "@mui/material/Tab";
|
|
21
|
+
import qe from "@mui/material/Tabs";
|
|
22
|
+
import Oe from "@mui/material/TextField";
|
|
23
|
+
import { u as Ue } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
24
|
+
import { D as Vn, f as Xn, a as qn } from "../Dialog-BPTr3qHE.mjs";
|
|
25
|
+
import { u as It } from "../useDimensions-27p2evRx.mjs";
|
|
26
|
+
import Un from "@mui/material/Chip";
|
|
27
|
+
import { D as te } from "../Drawer-BEtCk82g.mjs";
|
|
28
|
+
import ne from "@mui/material/Divider";
|
|
29
|
+
import ye from "@mui/material/ListItem";
|
|
30
|
+
import At from "@mui/material/ListItemAvatar";
|
|
31
|
+
import be from "@mui/material/ListItemText";
|
|
32
|
+
import { g as Tt } from "../AccountFields-CPkGZ3SD.mjs";
|
|
33
|
+
import Re from "@mui/material/List";
|
|
34
|
+
import Zn from "@mui/material/ListItemButton";
|
|
35
|
+
import Qn from "@mui/material/ListSubheader";
|
|
36
|
+
import { f as L } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
37
|
+
import { S as ct, F as Ot, e as Jn, R as Rt } from "../RecurringTransactions-CngsRZ3K.mjs";
|
|
38
|
+
import { Button as eo } from "@mui/material";
|
|
39
|
+
import { S as to } from "../StatusBar-BK_uYHAB.mjs";
|
|
40
|
+
import { h as Ze } from "../DateUtil-CBdcsyuk.mjs";
|
|
41
|
+
import { useVirtualizer as no } from "@tanstack/react-virtual";
|
|
42
|
+
import { u as oo, s as Ne, h as Ft, S as Pt, b as Bt, Z as ro } from "../TransactionDetails-CaJruWq3.mjs";
|
|
43
|
+
import { A as ao, W as io } from "../WidgetContainer-6dsjtOVg.mjs";
|
|
44
|
+
import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
|
|
45
|
+
import { b as Y } from "../Localization-2MODESHW.mjs";
|
|
46
|
+
import { E as Fe } from "../EmptyState-DoxNUae-.mjs";
|
|
47
|
+
import so from "@mui/material/useMediaQuery";
|
|
48
|
+
import { ChartsXAxis as co } from "@mui/x-charts/ChartsXAxis";
|
|
49
|
+
import { ChartsYAxis as lo } from "@mui/x-charts/ChartsYAxis";
|
|
50
|
+
import { ResponsiveChartContainer as po } from "@mui/x-charts/ResponsiveChartContainer";
|
|
51
|
+
import { useSpring as uo, animated as lt } from "@react-spring/web";
|
|
52
|
+
import { startOfMonth as Lt } from "date-fns/startOfMonth";
|
|
53
|
+
import { endOfMonth as Wt } from "date-fns/endOfMonth";
|
|
54
|
+
import { g as _o, S as ho, b as mo } from "../SpendingLegend-CW8mIzqd.mjs";
|
|
55
|
+
import { formatISO as go } from "date-fns/formatISO";
|
|
56
|
+
import { fromUnixTime as yo } from "date-fns/fromUnixTime";
|
|
57
|
+
import { startOfToday as dt } from "date-fns/startOfToday";
|
|
58
|
+
import { subDays as bo } from "date-fns/subDays";
|
|
59
|
+
import { c as fo, d as pt, S as xo, i as So } from "../ManageIncome-n6qSYGHO.mjs";
|
|
60
|
+
import { LocalizationProvider as Co, DatePicker as vo, StaticDatePicker as wo } from "@mui/x-date-pickers";
|
|
61
|
+
import { AdapterDateFns as $t } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
62
|
+
import { R as ko } from "../RecurringSettings-BwnDPthJ.mjs";
|
|
63
|
+
import { LocalizationProvider as Mo } from "@mui/x-date-pickers/LocalizationProvider";
|
|
64
|
+
import { format as Do } from "date-fns/format";
|
|
65
|
+
import Io from "@mui/lab/Timeline";
|
|
66
|
+
import Ao, { timelineItemClasses as To } from "@mui/lab/TimelineItem";
|
|
67
|
+
import Oo from "@mui/lab/TimelineConnector";
|
|
68
|
+
import Ro from "@mui/lab/TimelineContent";
|
|
69
|
+
import Fo from "@mui/lab/TimelineDot";
|
|
70
|
+
import Po from "@mui/lab/TimelineSeparator";
|
|
71
|
+
import Bo from "@mui/material/Accordion";
|
|
72
|
+
import Lo from "@mui/material/AccordionDetails";
|
|
73
|
+
import Wo from "@mui/material/AccordionSummary";
|
|
74
|
+
import $o from "@mui/material/CardHeader";
|
|
75
|
+
const zo = ({
|
|
76
|
+
dialScoreData: t,
|
|
77
|
+
dataIndex: r,
|
|
78
|
+
arcColor: n,
|
|
79
|
+
arcStartAngle: o,
|
|
80
|
+
totalAngularSpan: c,
|
|
81
|
+
centerX: a,
|
|
188
82
|
centerY: s,
|
|
189
|
-
arcRadius:
|
|
190
|
-
innerArcRadius:
|
|
191
|
-
outterArcRadius:
|
|
192
|
-
progressEndAngle:
|
|
193
|
-
unitsPerSegment:
|
|
194
|
-
isFinacialStrengthGraph:
|
|
83
|
+
arcRadius: d,
|
|
84
|
+
innerArcRadius: l,
|
|
85
|
+
outterArcRadius: p,
|
|
86
|
+
progressEndAngle: h,
|
|
87
|
+
unitsPerSegment: _,
|
|
88
|
+
isFinacialStrengthGraph: b
|
|
195
89
|
}) => {
|
|
196
|
-
const
|
|
197
|
-
{ offset: "13.62%", color:
|
|
198
|
-
{ offset: "36.67%", color:
|
|
199
|
-
{ offset: "59.72%", color:
|
|
200
|
-
{ offset: "83.46%", color:
|
|
201
|
-
], [
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
i,
|
|
205
|
-
o
|
|
206
|
-
), [L, E] = ft(
|
|
207
|
-
T,
|
|
208
|
-
v,
|
|
90
|
+
const f = E(), w = [
|
|
91
|
+
{ offset: "13.62%", color: f.palette.chartMono.chartMono2 },
|
|
92
|
+
{ offset: "36.67%", color: f.palette.chartMono.chartMono3 },
|
|
93
|
+
{ offset: "59.72%", color: f.palette.chartMono.chartMono4 },
|
|
94
|
+
{ offset: "83.46%", color: f.palette.chartMono.chartMono5 }
|
|
95
|
+
], [y, D] = Dn(
|
|
96
|
+
t,
|
|
97
|
+
c,
|
|
209
98
|
o,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
99
|
+
r
|
|
100
|
+
), [g, x] = In(
|
|
101
|
+
y,
|
|
102
|
+
D,
|
|
103
|
+
r,
|
|
104
|
+
_,
|
|
105
|
+
h
|
|
106
|
+
), M = st.arc().innerRadius(l).outerRadius(p).startAngle(y).endAngle(D).padAngle(0.02).cornerRadius(8), W = st.arc().innerRadius(l).outerRadius(p).startAngle(g).endAngle(x).padAngle(0.02).cornerRadius(8);
|
|
107
|
+
return /* @__PURE__ */ i(z, { children: [
|
|
214
108
|
/* @__PURE__ */ e(
|
|
215
109
|
"path",
|
|
216
110
|
{
|
|
217
|
-
d:
|
|
218
|
-
fill:
|
|
111
|
+
d: M({}),
|
|
112
|
+
fill: b ? f.palette.divider : n
|
|
219
113
|
}
|
|
220
114
|
),
|
|
221
|
-
|
|
115
|
+
b && /* @__PURE__ */ e("path", { d: W({}), fill: "url(#arcGradient)" }),
|
|
222
116
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
|
|
223
117
|
"linearGradient",
|
|
224
118
|
{
|
|
225
|
-
gradientTransform: `rotate(5, ${
|
|
119
|
+
gradientTransform: `rotate(5, ${a}, ${s})`,
|
|
226
120
|
gradientUnits: "userSpaceOnUse",
|
|
227
121
|
id: "arcGradient",
|
|
228
|
-
x1:
|
|
229
|
-
x2:
|
|
230
|
-
y1: s +
|
|
231
|
-
y2: s -
|
|
232
|
-
children:
|
|
122
|
+
x1: a + d * 0.8 * Math.cos(Math.PI / 1.35),
|
|
123
|
+
x2: a - d * 0.8 * Math.cos(Math.PI / 1.35),
|
|
124
|
+
y1: s + d * 0.8 * Math.sin(Math.PI / 1.35),
|
|
125
|
+
y2: s - d * 0.8 * Math.sin(Math.PI / 1.35),
|
|
126
|
+
children: w.map((G, H) => /* @__PURE__ */ e("stop", { offset: G.offset, stopColor: G.color }, H))
|
|
233
127
|
}
|
|
234
128
|
) })
|
|
235
129
|
] });
|
|
236
|
-
},
|
|
237
|
-
arcRadius:
|
|
238
|
-
healthScore:
|
|
239
|
-
size:
|
|
240
|
-
dialScoreData:
|
|
241
|
-
minValue:
|
|
242
|
-
maxValue:
|
|
130
|
+
}, zt = ({
|
|
131
|
+
arcRadius: t = 100,
|
|
132
|
+
healthScore: r,
|
|
133
|
+
size: n = "L",
|
|
134
|
+
dialScoreData: o,
|
|
135
|
+
minValue: c = 0,
|
|
136
|
+
maxValue: a = 100,
|
|
243
137
|
markerColor: s,
|
|
244
|
-
healthScoreStatus:
|
|
245
|
-
footerCenterContent:
|
|
246
|
-
footerLeftContent:
|
|
247
|
-
footerRightContent:
|
|
248
|
-
isFinacialStrengthGraph:
|
|
138
|
+
healthScoreStatus: d,
|
|
139
|
+
footerCenterContent: l,
|
|
140
|
+
footerLeftContent: p,
|
|
141
|
+
footerRightContent: h,
|
|
142
|
+
isFinacialStrengthGraph: _ = !1
|
|
249
143
|
}) => {
|
|
250
|
-
const
|
|
144
|
+
const b = E(), f = -Math.PI / 1.35, w = Math.PI / 1.35, y = w - f, D = y / (a - c), g = (r - c) * D, x = f + g + 0.02, M = n !== "SM" ? 0.1 : 0.12, W = t, G = t * (1 - M), H = W * 2.5, T = H / 2, V = H / 2, re = (G + W) / 2, ae = r !== 25 && r !== 50 && r !== 75 && r !== 100 ? 0 : 0.12, [Ce, ie] = An(re, x, ae), X = r / 25, se = {
|
|
251
145
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
|
252
146
|
M: { markerSize: 10, healthScoreFontSize: 48 },
|
|
253
147
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
|
254
|
-
},
|
|
255
|
-
return /* @__PURE__ */
|
|
256
|
-
|
|
148
|
+
}, ce = l === 0 ? mn : gn;
|
|
149
|
+
return /* @__PURE__ */ i(
|
|
150
|
+
u,
|
|
257
151
|
{
|
|
258
152
|
sx: {
|
|
259
|
-
width:
|
|
260
|
-
height:
|
|
153
|
+
width: H,
|
|
154
|
+
height: H,
|
|
261
155
|
position: "relative",
|
|
262
156
|
alignSelf: "center"
|
|
263
157
|
},
|
|
264
158
|
children: [
|
|
265
159
|
/* @__PURE__ */ e(
|
|
266
|
-
|
|
160
|
+
_n,
|
|
267
161
|
{
|
|
268
|
-
height:
|
|
162
|
+
height: H,
|
|
269
163
|
margin: { top: 0, right: 0, bottom: 0, left: 0 },
|
|
270
164
|
series: [
|
|
271
165
|
{
|
|
272
|
-
data:
|
|
273
|
-
innerRadius:
|
|
274
|
-
outerRadius:
|
|
275
|
-
startAngle: Math.round(
|
|
166
|
+
data: o,
|
|
167
|
+
innerRadius: G,
|
|
168
|
+
outerRadius: W,
|
|
169
|
+
startAngle: Math.round(rt(f)),
|
|
276
170
|
// Use Math.degrees to convert
|
|
277
|
-
endAngle: Math.round(
|
|
171
|
+
endAngle: Math.round(rt(w))
|
|
278
172
|
// Use Math.degrees to convert
|
|
279
173
|
}
|
|
280
174
|
],
|
|
@@ -283,22 +177,22 @@ const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor
|
|
|
283
177
|
legend: { hidden: !0 }
|
|
284
178
|
},
|
|
285
179
|
slots: {
|
|
286
|
-
pieArc: (
|
|
287
|
-
|
|
180
|
+
pieArc: (he) => /* @__PURE__ */ e(
|
|
181
|
+
zo,
|
|
288
182
|
{
|
|
289
|
-
arcColor:
|
|
290
|
-
arcRadius:
|
|
291
|
-
arcStartAngle:
|
|
292
|
-
centerX:
|
|
293
|
-
centerY:
|
|
294
|
-
dataIndex:
|
|
295
|
-
dialScoreData:
|
|
296
|
-
innerArcRadius:
|
|
297
|
-
isFinacialStrengthGraph:
|
|
298
|
-
outterArcRadius:
|
|
299
|
-
progressEndAngle:
|
|
300
|
-
totalAngularSpan:
|
|
301
|
-
unitsPerSegment:
|
|
183
|
+
arcColor: he.color,
|
|
184
|
+
arcRadius: t,
|
|
185
|
+
arcStartAngle: f,
|
|
186
|
+
centerX: T,
|
|
187
|
+
centerY: V,
|
|
188
|
+
dataIndex: he.dataIndex,
|
|
189
|
+
dialScoreData: o,
|
|
190
|
+
innerArcRadius: G,
|
|
191
|
+
isFinacialStrengthGraph: _,
|
|
192
|
+
outterArcRadius: W,
|
|
193
|
+
progressEndAngle: x,
|
|
194
|
+
totalAngularSpan: y,
|
|
195
|
+
unitsPerSegment: X
|
|
302
196
|
}
|
|
303
197
|
)
|
|
304
198
|
},
|
|
@@ -307,923 +201,2932 @@ const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor
|
|
|
307
201
|
stroke: "none"
|
|
308
202
|
}
|
|
309
203
|
},
|
|
310
|
-
width:
|
|
311
|
-
children:
|
|
204
|
+
width: H,
|
|
205
|
+
children: r >= c && r <= a && /* @__PURE__ */ e(
|
|
312
206
|
"circle",
|
|
313
207
|
{
|
|
314
|
-
cx:
|
|
315
|
-
cy:
|
|
316
|
-
fill:
|
|
317
|
-
r: se[
|
|
318
|
-
stroke:
|
|
319
|
-
strokeWidth:
|
|
208
|
+
cx: T + Ce,
|
|
209
|
+
cy: V + ie,
|
|
210
|
+
fill: b.palette.common.white,
|
|
211
|
+
r: se[n].markerSize,
|
|
212
|
+
stroke: _ ? "url(#arcGradient)" : s,
|
|
213
|
+
strokeWidth: n !== "SM" ? 3 : 1
|
|
320
214
|
}
|
|
321
215
|
)
|
|
322
216
|
}
|
|
323
217
|
),
|
|
324
218
|
/* @__PURE__ */ e(
|
|
325
|
-
|
|
219
|
+
C,
|
|
326
220
|
{
|
|
327
221
|
sx: {
|
|
328
222
|
position: "absolute",
|
|
329
|
-
top: `${
|
|
330
|
-
left: `${
|
|
223
|
+
top: `${V}px`,
|
|
224
|
+
left: `${T}px`,
|
|
331
225
|
transform: "translate(-50%, -50%)",
|
|
332
226
|
textAlign: "center"
|
|
333
227
|
},
|
|
334
|
-
children: /* @__PURE__ */
|
|
335
|
-
|
|
228
|
+
children: /* @__PURE__ */ i(
|
|
229
|
+
u,
|
|
336
230
|
{
|
|
337
231
|
spacing: 1,
|
|
338
|
-
sx: { alignItems: "center", justifyContent: "center", gap:
|
|
232
|
+
sx: { alignItems: "center", justifyContent: "center", gap: n !== "M" ? 10 : 3 },
|
|
339
233
|
children: [
|
|
340
234
|
/* @__PURE__ */ e(
|
|
341
|
-
|
|
235
|
+
k,
|
|
342
236
|
{
|
|
343
237
|
sx: {
|
|
344
|
-
fontSize: se[
|
|
345
|
-
lineHeight:
|
|
238
|
+
fontSize: se[n].healthScoreFontSize,
|
|
239
|
+
lineHeight: n !== "SM" ? "48px" : "100%"
|
|
346
240
|
},
|
|
347
241
|
variant: "H1",
|
|
348
|
-
children:
|
|
242
|
+
children: r
|
|
349
243
|
}
|
|
350
244
|
),
|
|
351
|
-
|
|
245
|
+
n !== "SM" && /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: n === "L" ? "body1" : "body2", children: d })
|
|
352
246
|
]
|
|
353
247
|
}
|
|
354
248
|
)
|
|
355
249
|
}
|
|
356
250
|
),
|
|
357
|
-
|
|
358
|
-
|
|
251
|
+
l !== void 0 && /* @__PURE__ */ e(
|
|
252
|
+
C,
|
|
359
253
|
{
|
|
360
254
|
sx: {
|
|
361
255
|
position: "absolute",
|
|
362
|
-
top: `${
|
|
363
|
-
left: `${
|
|
256
|
+
top: `${V * 2 * 0.83}px`,
|
|
257
|
+
left: `${T}px`,
|
|
364
258
|
transform: "translate(-50%, -50%)",
|
|
365
259
|
textAlign: "center"
|
|
366
260
|
},
|
|
367
|
-
children: typeof
|
|
368
|
-
|
|
261
|
+
children: typeof l == "number" ? /* @__PURE__ */ i(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
262
|
+
l > 0 ? /* @__PURE__ */ e(gt, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(ce, { size: 16, sx: { color: "text.secondary" } }),
|
|
369
263
|
/* @__PURE__ */ e(
|
|
370
|
-
|
|
264
|
+
k,
|
|
371
265
|
{
|
|
372
266
|
sx: {
|
|
373
267
|
fontWeight: 600,
|
|
374
|
-
color:
|
|
268
|
+
color: l > 0 ? "success.main" : "text.secondary"
|
|
375
269
|
},
|
|
376
270
|
variant: "body1",
|
|
377
|
-
children:
|
|
271
|
+
children: l
|
|
378
272
|
}
|
|
379
273
|
)
|
|
380
|
-
] }) : /* @__PURE__ */ e(
|
|
274
|
+
] }) : /* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle2", children: l })
|
|
381
275
|
}
|
|
382
276
|
),
|
|
383
|
-
|
|
384
|
-
|
|
277
|
+
p !== void 0 && /* @__PURE__ */ e(
|
|
278
|
+
C,
|
|
385
279
|
{
|
|
386
280
|
sx: {
|
|
387
281
|
position: "absolute",
|
|
388
|
-
top: `${
|
|
389
|
-
left: `${
|
|
282
|
+
top: `${V * 2 * 0.83}px`,
|
|
283
|
+
left: `${T - T / 2}px`,
|
|
390
284
|
// shift left from center
|
|
391
285
|
transform: "translate(-50%, -50%)",
|
|
392
286
|
textAlign: "left"
|
|
393
287
|
},
|
|
394
|
-
children: /* @__PURE__ */ e(
|
|
288
|
+
children: /* @__PURE__ */ e(k, { variant: "body1", children: p })
|
|
395
289
|
}
|
|
396
290
|
),
|
|
397
|
-
|
|
398
|
-
|
|
291
|
+
h !== void 0 && /* @__PURE__ */ e(
|
|
292
|
+
C,
|
|
399
293
|
{
|
|
400
294
|
sx: {
|
|
401
295
|
position: "absolute",
|
|
402
|
-
top: `${
|
|
403
|
-
left: `${
|
|
296
|
+
top: `${V * 2 * 0.83}px`,
|
|
297
|
+
left: `${T + T / 2}px`,
|
|
404
298
|
transform: "translate(-50%, -50%)",
|
|
405
299
|
textAlign: "right"
|
|
406
300
|
},
|
|
407
|
-
children: /* @__PURE__ */ e(
|
|
301
|
+
children: /* @__PURE__ */ e(k, { variant: "body1", children: h })
|
|
408
302
|
}
|
|
409
303
|
)
|
|
410
304
|
]
|
|
411
305
|
}
|
|
412
306
|
);
|
|
413
|
-
},
|
|
414
|
-
({ arcRadius:
|
|
415
|
-
const
|
|
307
|
+
}, Et = S(
|
|
308
|
+
({ arcRadius: t, size: r = "L", healthScore: n, footerCenterContent: o }) => {
|
|
309
|
+
const c = [
|
|
416
310
|
{ id: 1, label: "Group A", value: 25 },
|
|
417
311
|
{ id: 2, label: "Group B", value: 25 },
|
|
418
312
|
{ id: 3, label: "Group C", value: 25 },
|
|
419
313
|
{ id: 4, label: "Group D", value: 25 }
|
|
420
|
-
], { finstrong:
|
|
314
|
+
], { finstrong: a } = v(), s = je(n, a);
|
|
421
315
|
return /* @__PURE__ */ e(
|
|
422
|
-
|
|
316
|
+
zt,
|
|
423
317
|
{
|
|
424
|
-
arcRadius:
|
|
425
|
-
dialScoreData:
|
|
426
|
-
footerCenterContent:
|
|
427
|
-
healthScore:
|
|
318
|
+
arcRadius: t,
|
|
319
|
+
dialScoreData: c,
|
|
320
|
+
footerCenterContent: r === "L" ? a.footer_center_content_updated_just_now : o,
|
|
321
|
+
healthScore: n,
|
|
428
322
|
healthScoreStatus: s.status,
|
|
429
323
|
isFinacialStrengthGraph: !0,
|
|
430
|
-
size:
|
|
324
|
+
size: r
|
|
431
325
|
}
|
|
432
326
|
);
|
|
433
327
|
}
|
|
434
|
-
),
|
|
328
|
+
), Eo = S(
|
|
435
329
|
({
|
|
436
|
-
arcRadius:
|
|
437
|
-
size:
|
|
438
|
-
healthScore:
|
|
439
|
-
maxValue:
|
|
440
|
-
minValue:
|
|
441
|
-
footerCenterContent:
|
|
330
|
+
arcRadius: t,
|
|
331
|
+
size: r = "L",
|
|
332
|
+
healthScore: n,
|
|
333
|
+
maxValue: o = 850,
|
|
334
|
+
minValue: c = 300,
|
|
335
|
+
footerCenterContent: a
|
|
442
336
|
}) => {
|
|
443
|
-
const
|
|
337
|
+
const d = E().palette.mode === "dark", l = [
|
|
444
338
|
{
|
|
445
339
|
id: 1,
|
|
446
340
|
label: "Poor",
|
|
447
|
-
value:
|
|
448
|
-
color:
|
|
341
|
+
value: 29,
|
|
342
|
+
color: d ? ve.POOR : we.POOR
|
|
449
343
|
},
|
|
450
344
|
{
|
|
451
345
|
id: 2,
|
|
452
346
|
label: "Fair",
|
|
453
|
-
value:
|
|
454
|
-
color:
|
|
347
|
+
value: 25,
|
|
348
|
+
color: d ? ve.FAIR : we.FAIR
|
|
455
349
|
},
|
|
456
350
|
{
|
|
457
351
|
id: 3,
|
|
458
352
|
label: "Good",
|
|
459
|
-
value:
|
|
460
|
-
color:
|
|
353
|
+
value: 17,
|
|
354
|
+
color: d ? ve.GOOD : we.GOOD
|
|
461
355
|
},
|
|
462
356
|
{
|
|
463
357
|
id: 4,
|
|
464
358
|
label: "Very Good",
|
|
465
|
-
value:
|
|
466
|
-
color:
|
|
359
|
+
value: 17,
|
|
360
|
+
color: d ? ve.VERY_GOOD : we.VERY_GOOD
|
|
467
361
|
},
|
|
468
362
|
{
|
|
469
363
|
id: 5,
|
|
470
364
|
label: "Exceptional",
|
|
471
|
-
value:
|
|
472
|
-
color:
|
|
365
|
+
value: 12,
|
|
366
|
+
color: d ? ve.EXCEPTIONAL : we.EXCEPTIONAL
|
|
473
367
|
}
|
|
474
|
-
], { finstrong:
|
|
475
|
-
if (!
|
|
476
|
-
const { status:
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
368
|
+
], { finstrong: p } = v(), { isCopyLoaded: h } = j();
|
|
369
|
+
if (!h) return /* @__PURE__ */ e(J, {});
|
|
370
|
+
const { status: _, color: b = "none" } = St(
|
|
371
|
+
n,
|
|
372
|
+
d,
|
|
373
|
+
p.credit_score_status
|
|
480
374
|
);
|
|
481
375
|
return /* @__PURE__ */ e(
|
|
482
|
-
|
|
376
|
+
zt,
|
|
483
377
|
{
|
|
484
|
-
arcRadius:
|
|
485
|
-
dialScoreData:
|
|
486
|
-
footerCenterContent:
|
|
487
|
-
footerLeftContent:
|
|
488
|
-
footerRightContent:
|
|
489
|
-
healthScore:
|
|
490
|
-
healthScoreStatus:
|
|
491
|
-
markerColor:
|
|
492
|
-
maxValue:
|
|
493
|
-
minValue:
|
|
494
|
-
size:
|
|
378
|
+
arcRadius: t,
|
|
379
|
+
dialScoreData: l,
|
|
380
|
+
footerCenterContent: a,
|
|
381
|
+
footerLeftContent: c,
|
|
382
|
+
footerRightContent: o,
|
|
383
|
+
healthScore: n,
|
|
384
|
+
healthScoreStatus: _,
|
|
385
|
+
markerColor: b,
|
|
386
|
+
maxValue: o,
|
|
387
|
+
minValue: c,
|
|
388
|
+
size: r
|
|
495
389
|
}
|
|
496
390
|
);
|
|
497
391
|
}
|
|
498
|
-
),
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
392
|
+
), Be = ({
|
|
393
|
+
drawerType: t,
|
|
394
|
+
isDashboard: r = !1,
|
|
395
|
+
hasIcon: n = !0,
|
|
396
|
+
buttonText: o,
|
|
397
|
+
title: c,
|
|
398
|
+
titleDrawer: a,
|
|
399
|
+
description: s,
|
|
400
|
+
sx: d
|
|
505
401
|
}) => {
|
|
506
|
-
const [
|
|
507
|
-
return /* @__PURE__ */
|
|
508
|
-
|
|
402
|
+
const [l, p] = m.useState(!1), { connect: h, finstrong: _ } = v();
|
|
403
|
+
return t ? /* @__PURE__ */ i(
|
|
404
|
+
K,
|
|
509
405
|
{
|
|
510
406
|
sx: {
|
|
511
407
|
pb: 24,
|
|
512
408
|
pt: 18,
|
|
513
409
|
px: 24,
|
|
514
410
|
width: "100%",
|
|
515
|
-
...
|
|
411
|
+
...d
|
|
516
412
|
},
|
|
517
413
|
children: [
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
|
|
414
|
+
/* @__PURE__ */ i(
|
|
415
|
+
u,
|
|
520
416
|
{
|
|
521
417
|
sx: {
|
|
522
418
|
gap: 8,
|
|
523
|
-
...
|
|
419
|
+
...r && { flexDirection: "row", alignItems: "center" }
|
|
524
420
|
},
|
|
525
421
|
children: [
|
|
526
|
-
|
|
527
|
-
/* @__PURE__ */ e(
|
|
422
|
+
n && /* @__PURE__ */ e(yt, { sx: { height: 20, width: 20 } }),
|
|
423
|
+
/* @__PURE__ */ e(N, { className: "connect-more-accounts-title", sx: { ...r && { fontSize: 15 } }, children: c || _.connect_more_accounts_title })
|
|
528
424
|
]
|
|
529
425
|
}
|
|
530
426
|
),
|
|
531
427
|
/* @__PURE__ */ e(
|
|
532
|
-
|
|
428
|
+
k,
|
|
533
429
|
{
|
|
534
430
|
className: "connect-more-accounts-description",
|
|
535
431
|
sx: { color: "text.secondary", mt: 8 },
|
|
536
432
|
variant: "subtitle1",
|
|
537
|
-
children:
|
|
433
|
+
children: s || _.connect_more_accounts_description
|
|
538
434
|
}
|
|
539
435
|
),
|
|
540
436
|
/* @__PURE__ */ e(
|
|
541
|
-
|
|
437
|
+
$,
|
|
542
438
|
{
|
|
543
|
-
endIcon: /* @__PURE__ */ e(
|
|
544
|
-
onClick: () =>
|
|
439
|
+
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
440
|
+
onClick: () => p(!0),
|
|
545
441
|
size: "small",
|
|
546
442
|
sx: { p: 0, mt: 8, "&:hover": { backgroundColor: "transparent" } },
|
|
547
|
-
children: /* @__PURE__ */ e(
|
|
443
|
+
children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: o || _.connect_more_accounts_button })
|
|
548
444
|
}
|
|
549
445
|
),
|
|
550
|
-
/* @__PURE__ */ e(
|
|
551
|
-
|
|
446
|
+
t === "connectDrawer" && /* @__PURE__ */ e(
|
|
447
|
+
oe,
|
|
552
448
|
{
|
|
553
|
-
onClose: () =>
|
|
554
|
-
showConnectWidget:
|
|
555
|
-
title: a.mini_title
|
|
449
|
+
onClose: () => p(!1),
|
|
450
|
+
showConnectWidget: l,
|
|
451
|
+
title: a || h.mini_title
|
|
452
|
+
}
|
|
453
|
+
),
|
|
454
|
+
t === "connectionsDrawer" && /* @__PURE__ */ e(
|
|
455
|
+
Mt,
|
|
456
|
+
{
|
|
457
|
+
onClose: () => p(!1),
|
|
458
|
+
showConnectionsWidget: l,
|
|
459
|
+
title: a || h.mini_title
|
|
556
460
|
}
|
|
557
461
|
)
|
|
558
462
|
]
|
|
559
463
|
}
|
|
560
|
-
);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
q,
|
|
569
|
-
{
|
|
570
|
-
endIcon: /* @__PURE__ */ e(j, {}),
|
|
571
|
-
sx: {
|
|
572
|
-
fontSize: 13,
|
|
573
|
-
lineHeight: "16px",
|
|
574
|
-
fontWeight: 600,
|
|
575
|
-
color: "primary.main"
|
|
576
|
-
},
|
|
577
|
-
variant: "text",
|
|
578
|
-
children: i.financial_strength_header_action
|
|
579
|
-
}
|
|
580
|
-
),
|
|
581
|
-
subheader: /* @__PURE__ */ e(H, { color: "text.primary", children: i.financial_strength_header }),
|
|
582
|
-
sx: {
|
|
583
|
-
p: 0,
|
|
584
|
-
"& .MuiCardHeader-content": {
|
|
585
|
-
overflow: "hidden"
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
),
|
|
590
|
-
/* @__PURE__ */ e(g, { sx: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(
|
|
591
|
-
ve,
|
|
592
|
-
{
|
|
593
|
-
arcRadius: t <= 323 ? 73 : 154,
|
|
594
|
-
footerCenterContent: r,
|
|
595
|
-
healthScore: s?.health_score || 0,
|
|
596
|
-
size: t <= 323 ? "M" : "L"
|
|
597
|
-
}
|
|
598
|
-
) }),
|
|
599
|
-
s?.health_score ? /* @__PURE__ */ u(
|
|
600
|
-
Xe,
|
|
601
|
-
{
|
|
602
|
-
sx: {
|
|
603
|
-
px: 16,
|
|
604
|
-
backgroundColor: a ? "grey.800" : "grey.50",
|
|
605
|
-
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
606
|
-
"&.Mui-expanded": {
|
|
607
|
-
m: 0
|
|
608
|
-
},
|
|
609
|
-
"&::before": {
|
|
610
|
-
display: "none"
|
|
611
|
-
}
|
|
612
|
-
},
|
|
613
|
-
children: [
|
|
614
|
-
/* @__PURE__ */ e(
|
|
615
|
-
Ue,
|
|
616
|
-
{
|
|
617
|
-
expandIcon: /* @__PURE__ */ e(Re, { size: 20 }),
|
|
618
|
-
sx: {
|
|
619
|
-
height: 52,
|
|
620
|
-
p: 0,
|
|
621
|
-
"&.Mui-expanded": {
|
|
622
|
-
minHeight: 0
|
|
623
|
-
}
|
|
624
|
-
},
|
|
625
|
-
children: /* @__PURE__ */ e(y, { sx: { fontWeight: 600 }, variant: "body1", children: i.accordion_title_text })
|
|
626
|
-
}
|
|
627
|
-
),
|
|
628
|
-
/* @__PURE__ */ e(je, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(y, { variant: "subtitle1", children: c.scoreContent }) })
|
|
629
|
-
]
|
|
630
|
-
}
|
|
631
|
-
) : /* @__PURE__ */ e(
|
|
632
|
-
Q,
|
|
633
|
-
{
|
|
634
|
-
buttonText: i.connect_more_accounts_title,
|
|
635
|
-
description: i.health_score_zero_description,
|
|
636
|
-
hasIcon: !1,
|
|
637
|
-
isDashboard: !0,
|
|
638
|
-
sx: {
|
|
639
|
-
backgroundColor: a ? "grey.800" : "grey.50",
|
|
640
|
-
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
641
|
-
".connect-more-accounts-title": {
|
|
642
|
-
fontWeight: 600,
|
|
643
|
-
lineHeight: "20px",
|
|
644
|
-
color: "text.primary"
|
|
645
|
-
},
|
|
646
|
-
".connect-more-accounts-description": { color: "text.primary" }
|
|
647
|
-
},
|
|
648
|
-
title: i.health_score_zero_title
|
|
649
|
-
}
|
|
650
|
-
)
|
|
651
|
-
] });
|
|
652
|
-
}), vt = ({ isOpen: n, onClose: o }) => {
|
|
653
|
-
const { common: t, finstrong: i } = S(), { isMobile: d } = Ce(), { updateUser: l, user: s } = Y(), [r, a] = C.useState(s.credit_score || 0), c = !isNaN(r), p = () => {
|
|
654
|
-
o(), setTimeout(() => a(s.credit_score || 0), 300);
|
|
655
|
-
}, h = () => {
|
|
656
|
-
!r || r === s.credit_score || l({ ...s, credit_score: r });
|
|
464
|
+
) : null;
|
|
465
|
+
};
|
|
466
|
+
var _e = /* @__PURE__ */ ((t) => (t.SpendLessThanYouMake = "spendLessThanYouMake", t.PayBillsOnTime = "payBillsOnTime", t.SaveEnoughToLiveOn = "saveEnoughToLiveOn", t.MaintainEmergencySavings = "maintainEmergencySavings", t.HaveManageableDebt = "haveManageableDebt", t.HaveAGoodCreditScore = "haveAGoodCreditScore", t))(_e || {});
|
|
467
|
+
const Go = ({ isOpen: t, onClose: r }) => {
|
|
468
|
+
const { common: n, finstrong: o } = v(), { isMobile: c } = Ue(), { updateUser: a, user: s } = Q(), [d, l] = m.useState(s.credit_score || 0), p = !isNaN(d), h = () => {
|
|
469
|
+
r(), setTimeout(() => l(s.credit_score || 0), 300);
|
|
470
|
+
}, _ = () => {
|
|
471
|
+
!d || d === s.credit_score || a({ ...s, credit_score: d });
|
|
657
472
|
};
|
|
658
473
|
return /* @__PURE__ */ e(
|
|
659
|
-
|
|
474
|
+
Vn,
|
|
660
475
|
{
|
|
661
|
-
copy: { close_aria:
|
|
662
|
-
disablePrimaryButton: !
|
|
663
|
-
isOpen:
|
|
476
|
+
copy: { close_aria: n.close_aria, title: o.edit_credit_score },
|
|
477
|
+
disablePrimaryButton: !d || !p,
|
|
478
|
+
isOpen: t,
|
|
664
479
|
maxWidth: "xs",
|
|
665
|
-
onClose:
|
|
666
|
-
onPrimaryAction:
|
|
480
|
+
onClose: h,
|
|
481
|
+
onPrimaryAction: _,
|
|
667
482
|
primaryColor: "primary",
|
|
668
|
-
primaryText:
|
|
483
|
+
primaryText: n.save_button,
|
|
669
484
|
sx: {
|
|
670
485
|
"& .MuiDialog-paper": {
|
|
671
|
-
minWidth:
|
|
486
|
+
minWidth: c ? "100%" : 400
|
|
672
487
|
}
|
|
673
488
|
},
|
|
674
489
|
children: /* @__PURE__ */ e(
|
|
675
|
-
|
|
676
|
-
{
|
|
677
|
-
error: !c,
|
|
678
|
-
fullWidth: !0,
|
|
679
|
-
inputMode: "numeric",
|
|
680
|
-
inputProps: {
|
|
681
|
-
noValidate: !0,
|
|
682
|
-
pattern: "[0-9]*"
|
|
683
|
-
},
|
|
684
|
-
onChange: (m) => a(Number(m.target.value)),
|
|
685
|
-
value: c ? r : ""
|
|
686
|
-
}
|
|
687
|
-
)
|
|
688
|
-
}
|
|
689
|
-
);
|
|
690
|
-
}, kt = I(vt), At = ({ isOpen: n, onClose: o }) => {
|
|
691
|
-
const { finstrong: t } = S(), i = G(), { updateUser: d, user: l } = Y(), [s, r] = C.useState(l.birthday), a = (p) => {
|
|
692
|
-
r(Math.floor(new Date(p).getTime() / 1e3));
|
|
693
|
-
};
|
|
694
|
-
return /* @__PURE__ */ e(
|
|
695
|
-
V,
|
|
696
|
-
{
|
|
697
|
-
isOpen: n,
|
|
698
|
-
onClose: o,
|
|
699
|
-
onPrimaryAction: () => {
|
|
700
|
-
!s || s === l.birthday || (d({ ...l, birthday: s }), o());
|
|
701
|
-
},
|
|
702
|
-
onSecondaryAction: o,
|
|
703
|
-
title: t.date_of_birth,
|
|
704
|
-
children: /* @__PURE__ */ e(ot, { dateAdapter: et, children: /* @__PURE__ */ e(
|
|
705
|
-
tt,
|
|
490
|
+
"form",
|
|
706
491
|
{
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
slotProps: {
|
|
710
|
-
nextIconButton: {
|
|
711
|
-
sx: {
|
|
712
|
-
color: "primary.main",
|
|
713
|
-
"&:hover": { bgcolor: te(i.palette.primary.light, 0.1) }
|
|
714
|
-
}
|
|
715
|
-
},
|
|
716
|
-
previousIconButton: {
|
|
717
|
-
sx: {
|
|
718
|
-
color: "primary.main",
|
|
719
|
-
"&:hover": { bgcolor: te(i.palette.primary.light, 0.1) }
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
},
|
|
723
|
-
slots: {
|
|
724
|
-
actionBar: () => null,
|
|
725
|
-
toolbar: () => null
|
|
492
|
+
onSubmit: (b) => {
|
|
493
|
+
b.preventDefault(), _(), h();
|
|
726
494
|
},
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
495
|
+
children: /* @__PURE__ */ e(
|
|
496
|
+
Oe,
|
|
497
|
+
{
|
|
498
|
+
error: !p,
|
|
499
|
+
fullWidth: !0,
|
|
500
|
+
inputMode: "numeric",
|
|
501
|
+
inputProps: {
|
|
502
|
+
noValidate: !0,
|
|
503
|
+
pattern: "[0-9]*"
|
|
504
|
+
},
|
|
505
|
+
onChange: (b) => l(Number(b.target.value)),
|
|
506
|
+
value: p ? d : ""
|
|
732
507
|
}
|
|
733
|
-
|
|
734
|
-
value: s ? new Date(s * 1e3) : /* @__PURE__ */ new Date()
|
|
508
|
+
)
|
|
735
509
|
}
|
|
736
|
-
)
|
|
510
|
+
)
|
|
737
511
|
}
|
|
738
512
|
);
|
|
739
|
-
},
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}
|
|
513
|
+
}, Gt = S(Go), ze = {
|
|
514
|
+
credit_over_time_title: "Your Credit Over Time",
|
|
515
|
+
credit_over_time_zero_state_desc: "Add your credit score to start building a full picture of your credit health."
|
|
516
|
+
}, Ho = ({ chartFor: t }) => {
|
|
517
|
+
const r = E(), n = r.palette.mode === "dark", { monthlySummaries: o } = F(), { user: c } = Q(), { finstrong: a } = v(), [s, { width: d }] = It(), l = {
|
|
518
|
+
savingsOverTime: {
|
|
519
|
+
icon: /* @__PURE__ */ e(gt, { size: 48, sx: { marginBottom: 8 } }),
|
|
520
|
+
title: a.key_indicators_save.zero_state_title,
|
|
521
|
+
description: a.key_indicators_save.zero_state_description
|
|
749
522
|
},
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
"% ",
|
|
755
|
-
o
|
|
756
|
-
] })
|
|
757
|
-
] }), Dt = ({ isOpen: n, onClose: o }) => {
|
|
758
|
-
const { visibleFinstrongAccounts: t } = fe(), { incomeBudget: i } = ye(), {
|
|
759
|
-
accounts: d,
|
|
760
|
-
common: l,
|
|
761
|
-
finstrong: s
|
|
762
|
-
} = S(), { user: r } = Y(), [a, c] = C.useState(null), h = [
|
|
763
|
-
{
|
|
764
|
-
dynamicCopy: s.add_profile_item,
|
|
765
|
-
fallbackLabel: s.monthly_income,
|
|
766
|
-
icon: /* @__PURE__ */ e(Fe, {}),
|
|
767
|
-
key: A.MonthlyIncome,
|
|
768
|
-
label: s.monthly_income,
|
|
769
|
-
value: i
|
|
523
|
+
debtOverTime: {
|
|
524
|
+
icon: /* @__PURE__ */ e(bt, { size: 48, sx: { marginBottom: 8 } }),
|
|
525
|
+
title: "",
|
|
526
|
+
description: ""
|
|
770
527
|
},
|
|
771
|
-
{
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
528
|
+
creditOverTime: {
|
|
529
|
+
icon: /* @__PURE__ */ e(Ke, { size: 48, sx: { marginBottom: 8 } }),
|
|
530
|
+
title: ze.credit_over_time_title,
|
|
531
|
+
description: ze.credit_over_time_zero_state_desc
|
|
532
|
+
}
|
|
533
|
+
}[t], h = {
|
|
534
|
+
savingsOverTime: {
|
|
535
|
+
title: a.key_indicators_save.savings_over_time,
|
|
536
|
+
valueKey: "available_cash"
|
|
778
537
|
},
|
|
779
|
-
{
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
icon: /* @__PURE__ */ e(ue, {}),
|
|
783
|
-
key: A.CreditScore,
|
|
784
|
-
label: s.credit_score,
|
|
785
|
-
value: r.credit_score
|
|
538
|
+
debtOverTime: {
|
|
539
|
+
title: a.key_indicators_borrow.have_manageable_debt_drawer.debt_over_time,
|
|
540
|
+
valueKey: "debt_balance"
|
|
786
541
|
},
|
|
787
|
-
{
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
key: A.Connections,
|
|
791
|
-
label: s.connections,
|
|
792
|
-
value: t.length > 0 ? b(
|
|
793
|
-
s.connected_account,
|
|
794
|
-
String(t.length),
|
|
795
|
-
t.length > 1 ? s.accounts : s.account
|
|
796
|
-
) : void 0
|
|
542
|
+
creditOverTime: {
|
|
543
|
+
title: ze.credit_over_time_title,
|
|
544
|
+
valueKey: "credit_score"
|
|
797
545
|
}
|
|
798
|
-
].map((
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}
|
|
811
|
-
)
|
|
812
|
-
] }),
|
|
813
|
-
/* @__PURE__ */ e(ht, { list: h, onClickItem: c }),
|
|
814
|
-
/* @__PURE__ */ e(x, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
815
|
-
Q,
|
|
816
|
-
{
|
|
817
|
-
description: s.connect_more_accounts_to_view_more_accurate_financial_picture,
|
|
818
|
-
isDashboard: !0,
|
|
819
|
-
title: s.dont_see_all_your_accounts
|
|
820
|
-
}
|
|
821
|
-
) }),
|
|
546
|
+
}[t], _ = Tn(o, h.valueKey), b = Math.max(...o.map((M) => M[h.valueKey])), f = () => b >= 1e6 ? { formatter: "0.000a", leftMargin: 55 } : b >= 1e3 ? { formatter: "0a", leftMargin: 35 } : { formatter: "0a", leftMargin: 30 }, { formatter: w, leftMargin: y } = f(), D = h.title, g = t === "creditOverTime";
|
|
547
|
+
let x;
|
|
548
|
+
if (g) {
|
|
549
|
+
const { color: M } = St(
|
|
550
|
+
c?.credit_score ?? 0,
|
|
551
|
+
n,
|
|
552
|
+
a.credit_score_status
|
|
553
|
+
);
|
|
554
|
+
x = M;
|
|
555
|
+
}
|
|
556
|
+
return /* @__PURE__ */ e(K, { ref: s, sx: { backgroundColor: "background.paper" }, children: _.length >= 1 ? /* @__PURE__ */ i(u, { gap: 8, sx: { pl: 18 }, children: [
|
|
557
|
+
/* @__PURE__ */ e(k, { sx: { pb: 8, pt: 16 }, variant: "h3", children: D }),
|
|
822
558
|
/* @__PURE__ */ e(
|
|
823
|
-
|
|
559
|
+
Xe,
|
|
824
560
|
{
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
561
|
+
areaColor: x,
|
|
562
|
+
axisColor: r.palette.divider,
|
|
563
|
+
baseline: "min",
|
|
564
|
+
chartFor: t,
|
|
565
|
+
colors: [r.palette.primary.main],
|
|
566
|
+
curveType: g ? "linear" : "natural",
|
|
567
|
+
datasets: _ ? [_] : [],
|
|
568
|
+
height: 244,
|
|
569
|
+
labelFontColor: g ? "text.primary" : "",
|
|
570
|
+
labelFontSize: g ? 13 : void 0,
|
|
571
|
+
labels: [a.key_indicators_label],
|
|
572
|
+
margin: { left: y, top: g ? 25 : 15, right: 20 },
|
|
573
|
+
markStyles: (M) => g ? {
|
|
574
|
+
markLabelStyles: {
|
|
575
|
+
marginLeft: 16,
|
|
576
|
+
transform: M === _.length - 1 ? "translateX(-16px)" : "translateX(16px)",
|
|
577
|
+
fontWeight: 600
|
|
578
|
+
}
|
|
579
|
+
} : {},
|
|
580
|
+
maxRange: g ? 850 : void 0,
|
|
581
|
+
minRange: g ? 300 : void 0,
|
|
582
|
+
showArea: !0,
|
|
583
|
+
showAverage: !g,
|
|
584
|
+
showMark: !g,
|
|
585
|
+
showMarkLabel: g,
|
|
586
|
+
showXAxis: !0,
|
|
587
|
+
showYAxis: g,
|
|
588
|
+
showYAxisTicks: g,
|
|
589
|
+
useCustomMark: !0,
|
|
590
|
+
valueFormatterString: g ? void 0 : w,
|
|
591
|
+
width: d < 342 ? d - 48 : 342
|
|
829
592
|
}
|
|
830
|
-
)
|
|
831
|
-
|
|
832
|
-
|
|
593
|
+
)
|
|
594
|
+
] }) : /* @__PURE__ */ i(u, { gap: 8, sx: { alignItems: "center", p: 24, pb: 48 }, children: [
|
|
595
|
+
l.icon,
|
|
596
|
+
/* @__PURE__ */ e(k, { fontWeight: 600, variant: "body1", children: l.title }),
|
|
597
|
+
/* @__PURE__ */ e(k, { align: "center", variant: "subtitle1", children: l.description })
|
|
598
|
+
] }) });
|
|
599
|
+
}, Qe = S(Ho), No = {
|
|
600
|
+
updated_score: "Updated Score"
|
|
601
|
+
}, Ko = () => {
|
|
602
|
+
const { healthScoreChange: t } = F(), { user: r } = Q(), { availableWidth: n } = Hn(), { isSmallMobile: o } = Ue(n), [c, a] = m.useState(!1);
|
|
603
|
+
return /* @__PURE__ */ i(u, { sx: { gap: 28 }, children: [
|
|
833
604
|
/* @__PURE__ */ e(
|
|
834
|
-
|
|
605
|
+
Eo,
|
|
835
606
|
{
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
607
|
+
arcRadius: o ? 124 : 154,
|
|
608
|
+
footerCenterContent: t,
|
|
609
|
+
healthScore: r.credit_score ?? 0,
|
|
610
|
+
size: o ? "M" : "L"
|
|
839
611
|
}
|
|
840
|
-
)
|
|
612
|
+
),
|
|
613
|
+
/* @__PURE__ */ e($, { onClick: () => a(!0), variant: "contained", children: No.updated_score }),
|
|
614
|
+
/* @__PURE__ */ e(Gt, { isOpen: c, onClose: () => a(!1) }),
|
|
615
|
+
/* @__PURE__ */ e(Qe, { chartFor: "creditOverTime" })
|
|
841
616
|
] });
|
|
842
|
-
},
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
poor: 30,
|
|
849
|
-
good: 90
|
|
850
|
-
},
|
|
851
|
-
debtToIncomeRatio: {
|
|
852
|
-
poor: 40,
|
|
853
|
-
good: 30
|
|
854
|
-
},
|
|
855
|
-
emergencySavings: {
|
|
856
|
-
poor: 750,
|
|
857
|
-
good: 1e3
|
|
858
|
-
},
|
|
859
|
-
spendToIncomeRatio: {
|
|
860
|
-
poor: 110,
|
|
861
|
-
good: 100
|
|
862
|
-
}
|
|
863
|
-
}, f = {
|
|
864
|
-
GOOD: "Good",
|
|
865
|
-
FAIR: "Fair",
|
|
866
|
-
OFF_TRACK: "Off Track",
|
|
867
|
-
MISSING: "Missing"
|
|
868
|
-
}, B = ({
|
|
869
|
-
title: n,
|
|
870
|
-
description: o,
|
|
871
|
-
cardState: t = f.MISSING,
|
|
872
|
-
stateTitle: i
|
|
873
|
-
}) => {
|
|
874
|
-
const d = {
|
|
875
|
-
[f.GOOD]: { backgroundColor: "success.lighter", color: "success.main" },
|
|
876
|
-
[f.FAIR]: { backgroundColor: "warning.lighter", color: "warning.main" },
|
|
877
|
-
[f.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.main" },
|
|
878
|
-
[f.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
|
|
617
|
+
}, jo = S(Ko), Le = ({ status: t }) => {
|
|
618
|
+
const { finstrong: r } = v(), n = On(Rn[t]), o = {
|
|
619
|
+
GOOD: r.key_indicators_good,
|
|
620
|
+
FAIR: r.key_indicators_fair,
|
|
621
|
+
OFF_TRACK: r.key_indicators_off_track,
|
|
622
|
+
MISSING: r.key_indicators_missing
|
|
879
623
|
}[t];
|
|
880
|
-
return /* @__PURE__ */
|
|
881
|
-
|
|
624
|
+
return /* @__PURE__ */ e(
|
|
625
|
+
Un,
|
|
882
626
|
{
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
627
|
+
label: /* @__PURE__ */ e(
|
|
628
|
+
k,
|
|
629
|
+
{
|
|
630
|
+
fontWeight: 700,
|
|
631
|
+
sx: { color: n.color, minHeight: 12 },
|
|
632
|
+
uppercase: !0,
|
|
633
|
+
variant: "tiny",
|
|
634
|
+
children: o
|
|
635
|
+
}
|
|
636
|
+
),
|
|
637
|
+
size: "small",
|
|
887
638
|
sx: {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
borderColor: "divider",
|
|
891
|
-
borderRadius: 2
|
|
639
|
+
bgcolor: n.backgroundColor,
|
|
640
|
+
height: 16
|
|
892
641
|
},
|
|
893
|
-
|
|
894
|
-
/* @__PURE__ */ u(x, { sx: { minHeight: 48 }, children: [
|
|
895
|
-
/* @__PURE__ */ u(g, { flexDirection: "row", gap: 4, children: [
|
|
896
|
-
/* @__PURE__ */ e(y, { fontWeight: 600, sx: { mb: 8 }, truncate: !0, variant: "body1", children: n }),
|
|
897
|
-
/* @__PURE__ */ e(
|
|
898
|
-
x,
|
|
899
|
-
{
|
|
900
|
-
sx: {
|
|
901
|
-
borderRadius: 3,
|
|
902
|
-
backgroundColor: d.backgroundColor,
|
|
903
|
-
px: 8,
|
|
904
|
-
py: 2,
|
|
905
|
-
height: 16
|
|
906
|
-
},
|
|
907
|
-
children: /* @__PURE__ */ e(y, { fontWeight: 700, sx: { minHeight: 12 }, uppercase: !0, variant: "tiny", children: i })
|
|
908
|
-
}
|
|
909
|
-
)
|
|
910
|
-
] }),
|
|
911
|
-
/* @__PURE__ */ e(y, { color: "secondary", variant: "subtitle2", children: o })
|
|
912
|
-
] }),
|
|
913
|
-
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(he, { color: "secondary", name: "chevron_right", size: 24 }) })
|
|
914
|
-
]
|
|
642
|
+
variant: "filled"
|
|
915
643
|
}
|
|
916
644
|
);
|
|
917
|
-
},
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
]);
|
|
944
|
-
return /* @__PURE__ */ u(g, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
945
|
-
/* @__PURE__ */ e(
|
|
946
|
-
B,
|
|
645
|
+
}, Yo = {
|
|
646
|
+
keep_strong_credit_score: "Keep a Strong Credit Score"
|
|
647
|
+
}, Vo = () => {
|
|
648
|
+
const { user: t } = Q(), r = Ct(t.credit_score ?? null);
|
|
649
|
+
return /* @__PURE__ */ i(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
650
|
+
/* @__PURE__ */ e(N, { children: Yo.keep_strong_credit_score }),
|
|
651
|
+
/* @__PURE__ */ e(Le, { status: r })
|
|
652
|
+
] });
|
|
653
|
+
}, Xo = S(Vo), qo = ({
|
|
654
|
+
additionalContent: t,
|
|
655
|
+
connectTitle: r,
|
|
656
|
+
connectDescription: n,
|
|
657
|
+
children: o,
|
|
658
|
+
description: c,
|
|
659
|
+
drawerTitle: a,
|
|
660
|
+
isOpen: s,
|
|
661
|
+
loadConnectAccountsCard: d = !0,
|
|
662
|
+
onClose: l,
|
|
663
|
+
stickyComponent: p,
|
|
664
|
+
title: h,
|
|
665
|
+
drawerType: _
|
|
666
|
+
}) => {
|
|
667
|
+
const { finstrong: b } = v(), { isCopyLoaded: f } = j();
|
|
668
|
+
return f ? /* @__PURE__ */ i(te, { isOpen: s, onClose: l, title: a || b.key_indicators, children: [
|
|
669
|
+
(h || c) && /* @__PURE__ */ i(
|
|
670
|
+
u,
|
|
947
671
|
{
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
672
|
+
sx: {
|
|
673
|
+
backgroundColor: "background.paper",
|
|
674
|
+
gap: 8,
|
|
675
|
+
p: 24
|
|
676
|
+
},
|
|
677
|
+
children: [
|
|
678
|
+
h && typeof h == "string" ? /* @__PURE__ */ e(N, { children: h }) : h,
|
|
679
|
+
c && /* @__PURE__ */ e(k, { sx: { lineHeight: "24px" }, children: c })
|
|
680
|
+
]
|
|
952
681
|
}
|
|
953
682
|
),
|
|
954
|
-
/* @__PURE__ */ e(
|
|
955
|
-
|
|
956
|
-
{
|
|
957
|
-
cardState: s.cardState,
|
|
958
|
-
description: s.description,
|
|
959
|
-
stateTitle: s.stateTitle,
|
|
960
|
-
title: s.title
|
|
961
|
-
}
|
|
962
|
-
)
|
|
963
|
-
] });
|
|
964
|
-
}, wt = () => {
|
|
965
|
-
const { healthScore: n } = $(), { finstrong: o } = S(), { key_indicators_save: t } = o, i = (r) => {
|
|
966
|
-
const { good: a, poor: c } = X.daysOfCashOnHand;
|
|
967
|
-
let p = f.MISSING, h = t.days_of_cash_missing_description, m = o.key_indicators_missing;
|
|
968
|
-
return r !== null && (r >= a ? (p = f.GOOD, h = b(t.days_of_cash_good_description, r), m = o.key_indicators_good) : r < a && r >= c ? (p = f.FAIR, h = b(t.days_of_cash_fair_description, r), m = o.key_indicators_fair) : r < c && (p = f.OFF_TRACK, h = b(t.days_of_cash_off_track_description, r), m = o.key_indicators_off_track)), {
|
|
969
|
-
cardState: p,
|
|
970
|
-
description: h,
|
|
971
|
-
title: t.days_of_cash_title,
|
|
972
|
-
stateTitle: m
|
|
973
|
-
};
|
|
974
|
-
}, d = (r) => {
|
|
975
|
-
const { good: a, poor: c } = X.emergencySavings;
|
|
976
|
-
let p = f.MISSING, h = t.emergency_savings_missing_description, m = o.key_indicators_missing;
|
|
977
|
-
return r !== null && (r >= a ? (p = f.GOOD, h = t.emergency_savings_good_description, m = o.key_indicators_good) : r < a && r >= c ? (p = f.FAIR, h = b(
|
|
978
|
-
t.emergency_savings_fair_description,
|
|
979
|
-
rt(r, "0,0.00")
|
|
980
|
-
), m = o.key_indicators_fair) : r < c && (p = f.OFF_TRACK, h = t.emergency_savings_off_track_description, m = o.key_indicators_off_track)), {
|
|
981
|
-
cardState: p,
|
|
982
|
-
description: h,
|
|
983
|
-
title: t.emergency_savings_title,
|
|
984
|
-
stateTitle: m
|
|
985
|
-
};
|
|
986
|
-
}, { daysOfCashOnHand: l, emergencySavings: s } = C.useMemo(() => {
|
|
987
|
-
const r = n.months_of_cash_on_hand !== null ? Math.round(n.months_of_cash_on_hand * 30) : null, a = i(r), c = n.emergency_savings_on_hand !== null ? Math.round(n.emergency_savings_on_hand) : null, p = d(c);
|
|
988
|
-
return { daysOfCashOnHand: a, emergencySavings: p };
|
|
989
|
-
}, [
|
|
990
|
-
n.months_of_cash_on_hand,
|
|
991
|
-
n.emergency_savings_on_hand,
|
|
992
|
-
t,
|
|
993
|
-
o
|
|
994
|
-
]);
|
|
995
|
-
return /* @__PURE__ */ u(g, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
996
|
-
/* @__PURE__ */ e(
|
|
997
|
-
B,
|
|
683
|
+
p && /* @__PURE__ */ e(
|
|
684
|
+
C,
|
|
998
685
|
{
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
686
|
+
sx: {
|
|
687
|
+
position: "sticky",
|
|
688
|
+
top: 0,
|
|
689
|
+
zIndex: 1
|
|
690
|
+
},
|
|
691
|
+
children: p
|
|
1003
692
|
}
|
|
1004
693
|
),
|
|
1005
|
-
/* @__PURE__ */ e(
|
|
1006
|
-
|
|
694
|
+
t && /* @__PURE__ */ e(C, { children: t }),
|
|
695
|
+
/* @__PURE__ */ i(u, { sx: { p: 24, gap: 24 }, children: [
|
|
696
|
+
o,
|
|
697
|
+
d && /* @__PURE__ */ e(
|
|
698
|
+
Be,
|
|
699
|
+
{
|
|
700
|
+
description: n,
|
|
701
|
+
drawerType: _,
|
|
702
|
+
isDashboard: !0,
|
|
703
|
+
sx: { backgroundColor: "background.paper" },
|
|
704
|
+
title: r
|
|
705
|
+
}
|
|
706
|
+
)
|
|
707
|
+
] })
|
|
708
|
+
] }) : /* @__PURE__ */ e(J, {});
|
|
709
|
+
}, Ht = S(qo), Uo = ({
|
|
710
|
+
onClick: t,
|
|
711
|
+
shouldShowBalance: r = !0,
|
|
712
|
+
loadAccounts: n
|
|
713
|
+
}) => {
|
|
714
|
+
const { config: o } = kt(), { accounts: c } = v(), { selectedAccounts: a } = j(), s = m.useCallback(
|
|
715
|
+
(l) => {
|
|
716
|
+
t?.(l);
|
|
717
|
+
},
|
|
718
|
+
[t]
|
|
719
|
+
), d = m.useMemo(
|
|
720
|
+
() => Array.from(new Set(a.map((l) => l.account_type))).filter(
|
|
721
|
+
(l) => n ? n.includes(l) : !0
|
|
722
|
+
),
|
|
723
|
+
[a, n]
|
|
724
|
+
);
|
|
725
|
+
return a.length ? /* @__PURE__ */ e(m.Fragment, { children: d.map((l) => {
|
|
726
|
+
const { accountsForType: p, totalBalanceForType: h } = a.reduce(
|
|
727
|
+
(_, b) => (b.account_type === l && (_.accountsForType.push(b), _.totalBalanceForType += b.balance || 0), _),
|
|
728
|
+
{ accountsForType: [], totalBalanceForType: 0 }
|
|
729
|
+
);
|
|
730
|
+
return /* @__PURE__ */ i(
|
|
731
|
+
Re,
|
|
1007
732
|
{
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
733
|
+
subheader: /* @__PURE__ */ e(Qn, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */ i(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
734
|
+
/* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: c.account_types[l] }),
|
|
735
|
+
r && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: L(h, "0,0.00") })
|
|
736
|
+
] }) }),
|
|
737
|
+
sx: { bgcolor: "background.paper" },
|
|
738
|
+
children: [
|
|
739
|
+
p.map((_, b) => {
|
|
740
|
+
const { firstValue: f } = Tt(_, c), w = Dt(_, {
|
|
741
|
+
allowNickname: o?.show_account_nicknames_in_master
|
|
742
|
+
}), y = /* @__PURE__ */ i(z, { children: [
|
|
743
|
+
/* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: _.institution_guid ?? "" }) }),
|
|
744
|
+
/* @__PURE__ */ e(
|
|
745
|
+
be,
|
|
746
|
+
{
|
|
747
|
+
primary: `${w}${_.account_number ? ` *${_.account_number}` : ""}`,
|
|
748
|
+
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
749
|
+
}
|
|
750
|
+
),
|
|
751
|
+
r && /* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: L(f ?? 0, "0,0.00") })
|
|
752
|
+
] });
|
|
753
|
+
return /* @__PURE__ */ i(m.Fragment, { children: [
|
|
754
|
+
/* @__PURE__ */ e(ye, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Zn, { onClick: () => s(_), children: y }) : y }),
|
|
755
|
+
b !== p.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
|
|
756
|
+
] }, _.guid);
|
|
757
|
+
}),
|
|
758
|
+
/* @__PURE__ */ e(ne, {})
|
|
759
|
+
]
|
|
760
|
+
},
|
|
761
|
+
l
|
|
762
|
+
);
|
|
763
|
+
}) }) : null;
|
|
764
|
+
}, Nt = S(Uo), Zo = ({ loadAccounts: t, loadMoreLabel: r }) => {
|
|
765
|
+
const n = E(), { config: o } = kt(), { connect: c, finstrong: a } = v(), { accounts: s } = v(), { selectedAccounts: d } = j(), [l, p] = m.useState(!1), [h, _] = m.useState(!1), b = m.useMemo(
|
|
766
|
+
() => d.filter(
|
|
767
|
+
(y) => t ? t.includes(y.account_type) : !0
|
|
768
|
+
),
|
|
769
|
+
[d, t]
|
|
770
|
+
), f = m.useMemo(() => b.slice(0, 3), [b]), w = (y) => {
|
|
771
|
+
const { firstValue: D } = Tt(y, s);
|
|
772
|
+
return D;
|
|
773
|
+
};
|
|
774
|
+
return b.length >= 1 ? /* @__PURE__ */ i(z, { children: [
|
|
775
|
+
/* @__PURE__ */ e(C, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: f.map((y, D) => /* @__PURE__ */ i(m.Fragment, { children: [
|
|
776
|
+
/* @__PURE__ */ i(ye, { sx: { px: 24 }, children: [
|
|
777
|
+
/* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: y.institution_guid ?? "" }) }),
|
|
778
|
+
/* @__PURE__ */ e(
|
|
779
|
+
be,
|
|
780
|
+
{
|
|
781
|
+
primary: `${Dt(y, {
|
|
782
|
+
allowNickname: o?.show_account_nicknames_in_master
|
|
783
|
+
})}
|
|
784
|
+
${y.account_number ? ` *${y.account_number}` : ""}`,
|
|
785
|
+
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
786
|
+
}
|
|
787
|
+
),
|
|
788
|
+
/* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: L(w(y), "0,0.00") })
|
|
789
|
+
] }),
|
|
790
|
+
D < f.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
|
|
791
|
+
] }, y.guid)) }),
|
|
792
|
+
b.length > 3 && /* @__PURE__ */ i(z, { children: [
|
|
793
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
794
|
+
$,
|
|
795
|
+
{
|
|
796
|
+
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
797
|
+
onClick: () => p(!0),
|
|
798
|
+
size: "small",
|
|
799
|
+
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
800
|
+
children: /* @__PURE__ */ i(I, { bold: !0, variant: "body1", children: [
|
|
801
|
+
b.length - 3,
|
|
802
|
+
" ",
|
|
803
|
+
r
|
|
804
|
+
] })
|
|
805
|
+
}
|
|
806
|
+
) }),
|
|
807
|
+
/* @__PURE__ */ e(te, { isOpen: l, onClose: () => p(!1), title: a.accounts, children: /* @__PURE__ */ e(Nt, { loadAccounts: t }) })
|
|
808
|
+
] })
|
|
809
|
+
] }) : /* @__PURE__ */ i(z, { children: [
|
|
810
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
811
|
+
$,
|
|
812
|
+
{
|
|
813
|
+
onClick: () => _(!0),
|
|
814
|
+
size: "small",
|
|
815
|
+
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
816
|
+
variant: "contained",
|
|
817
|
+
children: /* @__PURE__ */ e(I, { bold: !0, variant: "body1", children: a.connect_more_accounts_button })
|
|
818
|
+
}
|
|
819
|
+
) }),
|
|
820
|
+
/* @__PURE__ */ e(
|
|
821
|
+
oe,
|
|
822
|
+
{
|
|
823
|
+
onClose: () => _(!1),
|
|
824
|
+
showConnectWidget: h,
|
|
825
|
+
title: c.mini_title
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
] });
|
|
829
|
+
}, Kt = S(Zo), Se = ({ balance: t, title: r, sx: n }) => /* @__PURE__ */ i(
|
|
830
|
+
u,
|
|
831
|
+
{
|
|
832
|
+
sx: {
|
|
833
|
+
alignItems: "center",
|
|
834
|
+
backgroundColor: "background.default",
|
|
835
|
+
borderRadius: 2,
|
|
836
|
+
height: 72,
|
|
837
|
+
justifyContent: "center",
|
|
838
|
+
p: 12,
|
|
839
|
+
...n
|
|
840
|
+
},
|
|
841
|
+
children: [
|
|
842
|
+
typeof t == "number" ? /* @__PURE__ */ e(k, { variant: "h2", children: L(t, "0,0.00") }) : t,
|
|
843
|
+
/* @__PURE__ */ e(k, { color: "text.secondary", fontWeight: "400", variant: "subtitle2", children: r })
|
|
844
|
+
]
|
|
845
|
+
}
|
|
846
|
+
);
|
|
847
|
+
var O = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(O || {}), ke = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(ke || {}), U = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(U || {});
|
|
848
|
+
const B = {
|
|
849
|
+
bi_weekly: "Bi-Weekly",
|
|
850
|
+
calculate: "Calculate",
|
|
851
|
+
daily: "Daily",
|
|
852
|
+
day: "day",
|
|
853
|
+
days: "Days",
|
|
854
|
+
estimated_contribution: "Estimated Contribution",
|
|
855
|
+
estimated_period_bi_weekly: "bi-weekly",
|
|
856
|
+
estimated_period_daily: "day",
|
|
857
|
+
estimated_period_monthly: "month",
|
|
858
|
+
estimated_period_weekly: "week",
|
|
859
|
+
how_often_contribute: "How often will you contribute?",
|
|
860
|
+
meet_your_goal_within: "Meet your goal within",
|
|
861
|
+
months: "Months",
|
|
862
|
+
monthly: "Monthly",
|
|
863
|
+
savings_goal: "Savings Goal",
|
|
864
|
+
suggested_goal: "Suggested Goal: $25,000",
|
|
865
|
+
weekly: "Weekly",
|
|
866
|
+
years: "Years"
|
|
867
|
+
}, Qo = [
|
|
868
|
+
{ id: U.Monthly, label: B.monthly },
|
|
869
|
+
{ id: U.BiWeekly, label: B.bi_weekly },
|
|
870
|
+
{ id: U.Weekly, label: B.weekly },
|
|
871
|
+
{ id: U.Daily, label: B.daily }
|
|
872
|
+
], Jo = {
|
|
873
|
+
[U.Monthly]: B.estimated_period_monthly,
|
|
874
|
+
[U.BiWeekly]: B.estimated_period_bi_weekly,
|
|
875
|
+
[U.Weekly]: B.estimated_period_weekly,
|
|
876
|
+
[U.Daily]: B.estimated_period_daily
|
|
877
|
+
}, er = [
|
|
878
|
+
{ id: ke.Months, label: B.months },
|
|
879
|
+
{ id: ke.Years, label: B.years },
|
|
880
|
+
{ id: ke.Days, label: B.days }
|
|
881
|
+
], tr = ({ total: t }) => {
|
|
882
|
+
const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = m.useState(0), [c, a] = m.useState(at(t)), [s, d] = m.useState(
|
|
883
|
+
at(t)
|
|
884
|
+
), [l, p] = m.useState(r), [h, _] = m.useState(Fn(t)), [b, f] = m.useState(ke.Months);
|
|
885
|
+
m.useEffect(() => {
|
|
886
|
+
o(
|
|
887
|
+
it({
|
|
888
|
+
contribution: s,
|
|
889
|
+
goalAmount: l,
|
|
890
|
+
goalPeriod: h,
|
|
891
|
+
targetPeriod: b,
|
|
892
|
+
totalSaved: t
|
|
893
|
+
})
|
|
894
|
+
), a(s);
|
|
895
|
+
}, []);
|
|
896
|
+
const w = (y) => {
|
|
897
|
+
y.preventDefault(), o(
|
|
898
|
+
it({
|
|
899
|
+
contribution: s,
|
|
900
|
+
goalAmount: l,
|
|
901
|
+
goalPeriod: h,
|
|
902
|
+
targetPeriod: b,
|
|
903
|
+
totalSaved: t
|
|
904
|
+
})
|
|
905
|
+
), a(s);
|
|
906
|
+
};
|
|
907
|
+
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("form", { onSubmit: w, children: /* @__PURE__ */ i(u, { sx: { gap: 24, pb: 24, pt: 16, px: 16 }, children: [
|
|
908
|
+
/* @__PURE__ */ e(
|
|
909
|
+
Se,
|
|
910
|
+
{
|
|
911
|
+
balance: /* @__PURE__ */ i(u, { sx: { flexDirection: "row", height: 32 }, children: [
|
|
912
|
+
/* @__PURE__ */ e(I, { variant: "h2", children: L(n, "0,0") }),
|
|
913
|
+
/* @__PURE__ */ i(I, { sx: { alignSelf: "end", height: 24 }, variant: "subtitle2", children: [
|
|
914
|
+
"/",
|
|
915
|
+
Jo[c]
|
|
916
|
+
] })
|
|
917
|
+
] }),
|
|
918
|
+
title: B.estimated_contribution
|
|
919
|
+
}
|
|
920
|
+
),
|
|
921
|
+
/* @__PURE__ */ e(
|
|
922
|
+
Oe,
|
|
923
|
+
{
|
|
924
|
+
"aria-label": B.savings_goal,
|
|
925
|
+
helperText: B.suggested_goal,
|
|
926
|
+
inputProps: {
|
|
927
|
+
noValidate: !0,
|
|
928
|
+
pattern: "[0-9]*"
|
|
929
|
+
},
|
|
930
|
+
label: B.savings_goal,
|
|
931
|
+
onChange: (y) => {
|
|
932
|
+
y.target.value && p(Number(y.target.value.replace(/[^0-9]/g, "")));
|
|
933
|
+
},
|
|
934
|
+
value: l ? L(l, "0,0") : ""
|
|
935
|
+
}
|
|
936
|
+
),
|
|
937
|
+
/* @__PURE__ */ e(
|
|
938
|
+
ct,
|
|
939
|
+
{
|
|
940
|
+
label: B.how_often_contribute,
|
|
941
|
+
onChange: d,
|
|
942
|
+
options: Qo,
|
|
943
|
+
required: !0,
|
|
944
|
+
value: s
|
|
945
|
+
}
|
|
946
|
+
),
|
|
947
|
+
/* @__PURE__ */ i(u, { sx: { flexDirection: "row" }, children: [
|
|
948
|
+
/* @__PURE__ */ e(
|
|
949
|
+
Oe,
|
|
950
|
+
{
|
|
951
|
+
"aria-label": B.meet_your_goal_within,
|
|
952
|
+
fullWidth: !0,
|
|
953
|
+
inputProps: {
|
|
954
|
+
noValidate: !0,
|
|
955
|
+
pattern: "[0-9]*"
|
|
956
|
+
},
|
|
957
|
+
label: B.meet_your_goal_within,
|
|
958
|
+
onChange: (y) => _(Number(y.target.value)),
|
|
959
|
+
sx: {
|
|
960
|
+
"& .MuiInputBase-root": {
|
|
961
|
+
borderBottomRightRadius: 0,
|
|
962
|
+
borderTopRightRadius: 0,
|
|
963
|
+
fieldset: {
|
|
964
|
+
borderRightWidth: 0.5
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
value: h
|
|
969
|
+
}
|
|
970
|
+
),
|
|
971
|
+
/* @__PURE__ */ e(
|
|
972
|
+
C,
|
|
973
|
+
{
|
|
974
|
+
sx: {
|
|
975
|
+
"& .MuiInputBase-root": {
|
|
976
|
+
borderBottomLeftRadius: 0,
|
|
977
|
+
borderTopLeftRadius: 0,
|
|
978
|
+
fieldset: {
|
|
979
|
+
borderLeftWidth: 0.5
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
children: /* @__PURE__ */ e(ct, { label: "", onChange: f, options: er, value: b })
|
|
984
|
+
}
|
|
985
|
+
)
|
|
986
|
+
] }),
|
|
987
|
+
/* @__PURE__ */ e($, { fullWidth: !0, onClick: w, type: "submit", variant: "contained", children: B.calculate })
|
|
988
|
+
] }) }) });
|
|
989
|
+
}, nr = S(tr), Ae = {
|
|
990
|
+
connect_accounts: "Connect Accounts",
|
|
991
|
+
more_accounts: "More Accounts",
|
|
992
|
+
your_savings: "Your Savings"
|
|
993
|
+
}, or = () => {
|
|
994
|
+
const { savingsAccounts: t } = Me(), [r, n] = m.useState(!1), o = m.useMemo(
|
|
995
|
+
() => t.reduce((c, a) => c + (a.balance ?? 0), 0),
|
|
996
|
+
[t]
|
|
997
|
+
);
|
|
998
|
+
return /* @__PURE__ */ i(u, { sx: { gap: 24 }, children: [
|
|
999
|
+
/* @__PURE__ */ e(K, { sx: { bgcolor: "background.paper", p: 16 }, children: /* @__PURE__ */ i(u, { sx: { gap: 16 }, children: [
|
|
1000
|
+
/* @__PURE__ */ e(Se, { balance: o, title: Ae.your_savings }),
|
|
1001
|
+
t.length ? /* @__PURE__ */ e(Kt, { loadAccounts: [He.SAVINGS], loadMoreLabel: Ae.connect_accounts }) : /* @__PURE__ */ e(eo, { onClick: () => n(!0), variant: "contained", children: Ae.connect_accounts })
|
|
1002
|
+
] }) }),
|
|
1003
|
+
/* @__PURE__ */ e(nr, { total: o }),
|
|
1004
|
+
/* @__PURE__ */ e(
|
|
1005
|
+
oe,
|
|
1006
|
+
{
|
|
1007
|
+
onClose: () => n(!1),
|
|
1008
|
+
showConnectWidget: r,
|
|
1009
|
+
title: Ae.connect_accounts
|
|
1010
|
+
}
|
|
1011
|
+
)
|
|
1012
|
+
] });
|
|
1013
|
+
}, rr = S(or), We = S(
|
|
1014
|
+
({ label: t, value: r, status: n, bottomComponent: o, statusBarData: c = [] }) => {
|
|
1015
|
+
const a = {
|
|
1016
|
+
GOOD: {
|
|
1017
|
+
progressBarColor: "primary.main"
|
|
1018
|
+
},
|
|
1019
|
+
FAIR: {
|
|
1020
|
+
progressBarColor: "warning.main"
|
|
1021
|
+
},
|
|
1022
|
+
OFF_TRACK: {
|
|
1023
|
+
progressBarColor: "error.main"
|
|
1024
|
+
},
|
|
1025
|
+
MISSING: {
|
|
1026
|
+
progressBarColor: "text.secondary"
|
|
1027
|
+
}
|
|
1028
|
+
}[n], s = c.map((d, l) => c.length === 2 ? {
|
|
1029
|
+
color: l === 0 ? "primary.main" : d.color || a?.progressBarColor,
|
|
1030
|
+
percentage: d.percentage
|
|
1031
|
+
} : {
|
|
1032
|
+
color: d.color || a?.progressBarColor,
|
|
1033
|
+
percentage: d.percentage
|
|
1034
|
+
});
|
|
1035
|
+
return /* @__PURE__ */ i(
|
|
1036
|
+
u,
|
|
1037
|
+
{
|
|
1038
|
+
sx: {
|
|
1039
|
+
backgroundColor: "background.paper",
|
|
1040
|
+
gap: 8,
|
|
1041
|
+
p: 24,
|
|
1042
|
+
pt: 0,
|
|
1043
|
+
borderBottom: "1px solid",
|
|
1044
|
+
borderColor: "divider"
|
|
1045
|
+
},
|
|
1046
|
+
children: [
|
|
1047
|
+
/* @__PURE__ */ i(u, { sx: { gap: 2 }, children: [
|
|
1048
|
+
/* @__PURE__ */ e(I, { variant: "body2", children: t }),
|
|
1049
|
+
/* @__PURE__ */ i(
|
|
1050
|
+
u,
|
|
1051
|
+
{
|
|
1052
|
+
sx: {
|
|
1053
|
+
alignItems: "center",
|
|
1054
|
+
flexDirection: "row",
|
|
1055
|
+
gap: 12,
|
|
1056
|
+
justifyContent: "space-between"
|
|
1057
|
+
},
|
|
1058
|
+
children: [
|
|
1059
|
+
/* @__PURE__ */ e(Pe, { children: r }),
|
|
1060
|
+
/* @__PURE__ */ e(Le, { status: n })
|
|
1061
|
+
]
|
|
1062
|
+
}
|
|
1063
|
+
)
|
|
1064
|
+
] }),
|
|
1065
|
+
/* @__PURE__ */ i(u, { children: [
|
|
1066
|
+
/* @__PURE__ */ e(to, { data: s, height: 16 }),
|
|
1067
|
+
o
|
|
1068
|
+
] })
|
|
1069
|
+
]
|
|
1070
|
+
}
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
), ar = {
|
|
1074
|
+
sticky_label: "You have saved"
|
|
1075
|
+
}, ir = ["$0", "$250", "$500", "$750", "$1k"], sr = () => {
|
|
1076
|
+
const { healthScore: t } = F(), r = Math.round(t.emergency_savings_on_hand ?? NaN) || null, n = Pn(r), o = vt(r);
|
|
1077
|
+
return /* @__PURE__ */ e(
|
|
1078
|
+
We,
|
|
1079
|
+
{
|
|
1080
|
+
bottomComponent: /* @__PURE__ */ e(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: ir.map((c) => /* @__PURE__ */ i(u, { sx: { alignItems: "center", height: 24, width: 30 }, children: [
|
|
1081
|
+
/* @__PURE__ */ e(
|
|
1082
|
+
ne,
|
|
1083
|
+
{
|
|
1084
|
+
orientation: "vertical",
|
|
1085
|
+
sx: {
|
|
1086
|
+
borderWidth: 0.5,
|
|
1087
|
+
height: 8,
|
|
1088
|
+
mt: 2
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
),
|
|
1092
|
+
/* @__PURE__ */ e(I, { variant: "caption", children: c })
|
|
1093
|
+
] }, c)) }),
|
|
1094
|
+
label: ar.sticky_label,
|
|
1095
|
+
status: o,
|
|
1096
|
+
statusBarData: [
|
|
1097
|
+
{
|
|
1098
|
+
percentage: n
|
|
1099
|
+
}
|
|
1100
|
+
],
|
|
1101
|
+
value: L(r ?? 0, "0,0.00")
|
|
1102
|
+
}
|
|
1103
|
+
);
|
|
1104
|
+
}, cr = S(sr), ut = 65, _t = 34, lr = ({
|
|
1105
|
+
transactions: t,
|
|
1106
|
+
bgcolor: r,
|
|
1107
|
+
height: n = "calc(100dvh - 36px)",
|
|
1108
|
+
loader: o = /* @__PURE__ */ e(J, { label: "Loading", size: 40 }),
|
|
1109
|
+
onClick: c,
|
|
1110
|
+
showInsights: a = !1,
|
|
1111
|
+
showLoader: s = !1,
|
|
1112
|
+
width: d = "100%",
|
|
1113
|
+
zeroState: l = /* @__PURE__ */ e(ro, {})
|
|
1114
|
+
}) => {
|
|
1115
|
+
const { getCategoryName: p } = Ye(), { onEvent: h } = Nn(), { categories: _ } = v(), { clearExpandedSplits: b, setShowInsights: f, toggleSplit: w } = oo(), y = (x) => {
|
|
1116
|
+
const M = t.find((W) => W.guid === x);
|
|
1117
|
+
if (M?.has_been_split) {
|
|
1118
|
+
w(M.guid);
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1121
|
+
h(ao.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
1122
|
+
account_guid: M?.account_guid,
|
|
1123
|
+
transaction_guid: x
|
|
1124
|
+
}), c?.(x);
|
|
1125
|
+
}, D = m.useRef(null), g = no({
|
|
1126
|
+
count: t.length,
|
|
1127
|
+
getScrollElement: () => D.current,
|
|
1128
|
+
estimateSize: (x) => ut + (Ne(x, t) ? _t : 0),
|
|
1129
|
+
overscan: 5
|
|
1130
|
+
});
|
|
1131
|
+
return m.useEffect(() => g.measure(), [t]), m.useEffect(() => f(a), [a]), m.useEffect(() => () => b(), []), /* @__PURE__ */ e(Re, { sx: { width: d }, children: /* @__PURE__ */ e(C, { height: n, overflow: "auto", ref: D, width: d, children: /* @__PURE__ */ i(
|
|
1132
|
+
C,
|
|
1133
|
+
{
|
|
1134
|
+
height: (
|
|
1135
|
+
// set the height to auto when there are no transactions so the zero state isn't set to 0
|
|
1136
|
+
g.getVirtualItems().length === 0 ? "auto" : g.getTotalSize()
|
|
1137
|
+
),
|
|
1138
|
+
position: "relative",
|
|
1139
|
+
width: "100%",
|
|
1140
|
+
children: [
|
|
1141
|
+
s && o,
|
|
1142
|
+
!s && g.getVirtualItems().length === 0 && l,
|
|
1143
|
+
!s && g.getVirtualItems().length > 0 && g.getVirtualItems().map((x) => {
|
|
1144
|
+
const M = t[x.index], W = Ne(x.index, t), G = Ft(x.index, t), H = ut + (W ? _t : 0);
|
|
1145
|
+
return /* @__PURE__ */ i(
|
|
1146
|
+
C,
|
|
1147
|
+
{
|
|
1148
|
+
sx: {
|
|
1149
|
+
height: H,
|
|
1150
|
+
position: "absolute",
|
|
1151
|
+
transform: `translateY(${x.start}px)`,
|
|
1152
|
+
width: "100%"
|
|
1153
|
+
},
|
|
1154
|
+
children: [
|
|
1155
|
+
W && /* @__PURE__ */ e(Pt, { bgcolor: r, children: Ze(M.date) }),
|
|
1156
|
+
/* @__PURE__ */ e(
|
|
1157
|
+
Bt,
|
|
1158
|
+
{
|
|
1159
|
+
...c && { onClick: y },
|
|
1160
|
+
transaction: {
|
|
1161
|
+
...M,
|
|
1162
|
+
category: _.default_categories[M.top_level_category_guid]?.replace(
|
|
1163
|
+
/&/g,
|
|
1164
|
+
"&"
|
|
1165
|
+
) ?? p(M.top_level_category_guid)
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
),
|
|
1169
|
+
/* @__PURE__ */ e(ne, { sx: { ml: G ? 24 : 0 } })
|
|
1170
|
+
]
|
|
1171
|
+
},
|
|
1172
|
+
M.guid
|
|
1173
|
+
);
|
|
1174
|
+
})
|
|
1175
|
+
]
|
|
1176
|
+
}
|
|
1177
|
+
) }) });
|
|
1178
|
+
}, dr = S(lr), $e = ({
|
|
1179
|
+
transactions: t = [],
|
|
1180
|
+
amountColor: r = "success.main",
|
|
1181
|
+
amountPosition: n = "center",
|
|
1182
|
+
formatDate: o = Ze,
|
|
1183
|
+
secondaryIcon: c
|
|
1184
|
+
}) => {
|
|
1185
|
+
const a = E(), { connect: s, finstrong: d } = v(), [l, p] = m.useState(!1), [h, _] = m.useState(!1), b = 3, f = t.length > b, w = t.length - b;
|
|
1186
|
+
return !t || t.length === 0 ? /* @__PURE__ */ i(z, { children: [
|
|
1187
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
1188
|
+
$,
|
|
1189
|
+
{
|
|
1190
|
+
onClick: () => _(!0),
|
|
1191
|
+
size: "small",
|
|
1192
|
+
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1193
|
+
variant: "contained",
|
|
1194
|
+
children: /* @__PURE__ */ e(I, { bold: !0, variant: "body1", children: d.connect_more_accounts_button })
|
|
1195
|
+
}
|
|
1196
|
+
) }),
|
|
1197
|
+
/* @__PURE__ */ e(
|
|
1198
|
+
oe,
|
|
1199
|
+
{
|
|
1200
|
+
onClose: () => _(!1),
|
|
1201
|
+
showConnectWidget: h,
|
|
1202
|
+
title: s.mini_title
|
|
1203
|
+
}
|
|
1204
|
+
)
|
|
1205
|
+
] }) : /* @__PURE__ */ i(u, { sx: { gap: 16 }, children: [
|
|
1206
|
+
/* @__PURE__ */ e(C, { sx: { border: `1px solid ${a.palette.divider}`, borderRadius: 2 }, children: t.slice(0, b).map((y, D) => /* @__PURE__ */ i(
|
|
1207
|
+
u,
|
|
1208
|
+
{
|
|
1209
|
+
sx: {
|
|
1210
|
+
alignItems: "center",
|
|
1211
|
+
flexDirection: "row",
|
|
1212
|
+
gap: 16,
|
|
1213
|
+
pl: 24,
|
|
1214
|
+
pt: 14
|
|
1215
|
+
},
|
|
1216
|
+
children: [
|
|
1217
|
+
/* @__PURE__ */ e(u, { sx: { pb: 14 }, children: /* @__PURE__ */ e(
|
|
1218
|
+
kn,
|
|
1219
|
+
{
|
|
1220
|
+
categoryGuid: y.top_level_category_guid || "",
|
|
1221
|
+
merchantGuid: y.merchant_guid || "",
|
|
1222
|
+
size: 32
|
|
1223
|
+
}
|
|
1224
|
+
) }),
|
|
1225
|
+
/* @__PURE__ */ i(
|
|
1226
|
+
u,
|
|
1227
|
+
{
|
|
1228
|
+
sx: {
|
|
1229
|
+
alignItems: n,
|
|
1230
|
+
flexDirection: "row",
|
|
1231
|
+
gap: 12,
|
|
1232
|
+
justifyContent: "space-between",
|
|
1233
|
+
...D < Math.min(t.length, b) - 1 && {
|
|
1234
|
+
borderBottom: `1px solid ${a.palette.divider}`
|
|
1235
|
+
},
|
|
1236
|
+
pb: 14,
|
|
1237
|
+
pr: 24,
|
|
1238
|
+
width: "100%"
|
|
1239
|
+
},
|
|
1240
|
+
children: [
|
|
1241
|
+
/* @__PURE__ */ i(u, { sx: { gap: 4 }, children: [
|
|
1242
|
+
/* @__PURE__ */ e(k, { bold: !0, variant: "body1", children: y.description }),
|
|
1243
|
+
/* @__PURE__ */ i(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
1244
|
+
!!c && c,
|
|
1245
|
+
/* @__PURE__ */ e(I, { variant: "caption", children: o(y.date) })
|
|
1246
|
+
] })
|
|
1247
|
+
] }),
|
|
1248
|
+
/* @__PURE__ */ e(k, { bold: !0, sx: { color: r, flexShrink: 0 }, variant: "body1", children: L(y.amount, "0,0.00") })
|
|
1249
|
+
]
|
|
1250
|
+
},
|
|
1251
|
+
y.guid || D
|
|
1252
|
+
)
|
|
1253
|
+
]
|
|
1254
|
+
},
|
|
1255
|
+
D
|
|
1256
|
+
)) }),
|
|
1257
|
+
f && /* @__PURE__ */ i(z, { children: [
|
|
1258
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
1259
|
+
$,
|
|
1260
|
+
{
|
|
1261
|
+
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
1262
|
+
onClick: () => p(!0),
|
|
1263
|
+
size: "small",
|
|
1264
|
+
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1265
|
+
children: /* @__PURE__ */ i(I, { bold: !0, variant: "body1", children: [
|
|
1266
|
+
w,
|
|
1267
|
+
" ",
|
|
1268
|
+
d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_more_transactions
|
|
1269
|
+
] })
|
|
1270
|
+
}
|
|
1271
|
+
) }),
|
|
1272
|
+
/* @__PURE__ */ e(
|
|
1273
|
+
te,
|
|
1274
|
+
{
|
|
1275
|
+
isOpen: l,
|
|
1276
|
+
onClose: () => p(!1),
|
|
1277
|
+
title: d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_transactions,
|
|
1278
|
+
children: /* @__PURE__ */ e(dr, { transactions: t })
|
|
1279
|
+
}
|
|
1280
|
+
)
|
|
1281
|
+
] })
|
|
1282
|
+
] });
|
|
1283
|
+
}, pr = () => {
|
|
1284
|
+
const {
|
|
1285
|
+
finstrong: {
|
|
1286
|
+
key_indicators_spend: { pay_bills_on_time_drawer: t }
|
|
1287
|
+
}
|
|
1288
|
+
} = v(), { getSpendingFeeTransactions: r, allTransactions: n } = F();
|
|
1289
|
+
return m.useEffect(() => {
|
|
1290
|
+
r().finally();
|
|
1291
|
+
}, []), /* @__PURE__ */ e(z, { children: n.spendingFee.length === 0 ? /* @__PURE__ */ i(
|
|
1292
|
+
K,
|
|
1293
|
+
{
|
|
1294
|
+
sx: {
|
|
1295
|
+
backgroundColor: "background.paper",
|
|
1296
|
+
pb: 48,
|
|
1297
|
+
pt: 32,
|
|
1298
|
+
px: 24,
|
|
1299
|
+
textAlign: "center",
|
|
1300
|
+
width: "100%"
|
|
1301
|
+
},
|
|
1302
|
+
children: [
|
|
1303
|
+
/* @__PURE__ */ e(yn, { filled: !0, size: 48, sx: { color: "success.main" } }),
|
|
1304
|
+
/* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 4, pt: 24 }, children: [
|
|
1305
|
+
/* @__PURE__ */ e(N, { children: t.pay_bills_on_time_zero_fees_title }),
|
|
1306
|
+
/* @__PURE__ */ e(k, { variant: "subtitle1", children: t.pay_bills_on_time_zero_fees_description })
|
|
1307
|
+
] })
|
|
1308
|
+
]
|
|
1309
|
+
}
|
|
1310
|
+
) : /* @__PURE__ */ i(
|
|
1311
|
+
K,
|
|
1312
|
+
{
|
|
1313
|
+
sx: {
|
|
1314
|
+
p: 16,
|
|
1315
|
+
width: "100%",
|
|
1316
|
+
backgroundColor: "background.paper"
|
|
1317
|
+
},
|
|
1318
|
+
children: [
|
|
1319
|
+
/* @__PURE__ */ e(N, { sx: { textAlign: "left", pb: 8 }, children: t.pay_bills_on_time_sticky_fee_count }),
|
|
1320
|
+
/* @__PURE__ */ e(
|
|
1321
|
+
$e,
|
|
1322
|
+
{
|
|
1323
|
+
amountColor: "text.primary",
|
|
1324
|
+
amountPosition: "flex-start",
|
|
1325
|
+
formatDate: (o) => Xn(new Date(o * 1e3), qn.MONTH_DAY),
|
|
1326
|
+
secondaryIcon: /* @__PURE__ */ e(bn, { color: "error", filled: !0, size: 12 }),
|
|
1327
|
+
transactions: n.spendingFee
|
|
1328
|
+
}
|
|
1329
|
+
)
|
|
1330
|
+
]
|
|
1331
|
+
}
|
|
1332
|
+
) });
|
|
1333
|
+
}, ur = S(pr), _r = () => {
|
|
1334
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_spend: n } = r, { pay_bills_on_time_drawer: o } = n, c = Bn(t.spending_fee_transaction_count);
|
|
1335
|
+
return /* @__PURE__ */ i(
|
|
1336
|
+
u,
|
|
1337
|
+
{
|
|
1338
|
+
sx: {
|
|
1339
|
+
p: 24,
|
|
1340
|
+
backgroundColor: "background.paper",
|
|
1341
|
+
borderBottom: "1px solid",
|
|
1342
|
+
borderColor: "divider"
|
|
1343
|
+
},
|
|
1344
|
+
children: [
|
|
1345
|
+
/* @__PURE__ */ e(k, { variant: "body2", children: o.pay_bills_on_time_sticky_description }),
|
|
1346
|
+
/* @__PURE__ */ i(u, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
|
1347
|
+
/* @__PURE__ */ i(Pe, { children: [
|
|
1348
|
+
t.spending_fee_transaction_count,
|
|
1349
|
+
" ",
|
|
1350
|
+
o.pay_bills_on_time_sticky_fee_count
|
|
1351
|
+
] }),
|
|
1352
|
+
/* @__PURE__ */ e(Le, { status: c })
|
|
1353
|
+
] })
|
|
1354
|
+
]
|
|
1355
|
+
}
|
|
1356
|
+
);
|
|
1357
|
+
}, hr = S(_r), mr = () => {
|
|
1358
|
+
const { savingsAndCheckingAccountsBalance: t } = Me(), { finstrong: r } = v();
|
|
1359
|
+
return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1360
|
+
/* @__PURE__ */ e(
|
|
1361
|
+
Se,
|
|
1362
|
+
{
|
|
1363
|
+
balance: t,
|
|
1364
|
+
title: r.key_indicators_save.drawer_available_balance
|
|
1365
|
+
}
|
|
1366
|
+
),
|
|
1367
|
+
/* @__PURE__ */ e(
|
|
1368
|
+
Kt,
|
|
1369
|
+
{
|
|
1370
|
+
loadAccounts: [He.SAVINGS, He.CHECKING],
|
|
1371
|
+
loadMoreLabel: r.more_accounts
|
|
1372
|
+
}
|
|
1373
|
+
)
|
|
1374
|
+
] });
|
|
1375
|
+
}, gr = S(mr), yr = () => {
|
|
1376
|
+
const { finstrong: t } = v(), { healthScore: r, allTransactions: n, loadSpendTransactions: o, loadDebtSpend: c } = F(), { isInitialized: a } = j();
|
|
1377
|
+
m.useEffect(() => {
|
|
1378
|
+
a && (o().finally(), c().finally());
|
|
1379
|
+
}, [a]);
|
|
1380
|
+
const s = m.useMemo(() => {
|
|
1381
|
+
const d = n.spend.map((p) => p.transaction), l = n.debtSpend.map((p) => p.transaction);
|
|
1382
|
+
return [...d, ...l];
|
|
1383
|
+
}, [n.spend, n.debtSpend]);
|
|
1384
|
+
return a ? /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1385
|
+
/* @__PURE__ */ e(
|
|
1386
|
+
Se,
|
|
1387
|
+
{
|
|
1388
|
+
balance: r.ninety_day_spend / 90,
|
|
1389
|
+
title: t.key_indicators_save.drawer_daily_spend
|
|
1390
|
+
}
|
|
1391
|
+
),
|
|
1392
|
+
/* @__PURE__ */ e($e, { amountColor: "text.primary", transactions: s })
|
|
1393
|
+
] }) : /* @__PURE__ */ e(J, {});
|
|
1394
|
+
}, br = S(yr), fr = () => {
|
|
1395
|
+
const [t, r] = m.useState(0), { finstrong: n } = v();
|
|
1396
|
+
return /* @__PURE__ */ i(z, { children: [
|
|
1397
|
+
/* @__PURE__ */ i(K, { children: [
|
|
1398
|
+
/* @__PURE__ */ i(
|
|
1399
|
+
qe,
|
|
1400
|
+
{
|
|
1401
|
+
"aria-label": n.key_indicators_save.drawer_title,
|
|
1402
|
+
centered: !0,
|
|
1403
|
+
onChange: (o, c) => r(c),
|
|
1404
|
+
sx: { mb: 0 },
|
|
1405
|
+
value: t,
|
|
1406
|
+
variant: "fullWidth",
|
|
1407
|
+
children: [
|
|
1408
|
+
/* @__PURE__ */ e(
|
|
1409
|
+
pe,
|
|
1410
|
+
{
|
|
1411
|
+
"aria-controls": "available-details-tabpanel-0",
|
|
1412
|
+
label: n.key_indicators_save.drawer_available,
|
|
1413
|
+
sx: { minHeight: 44 }
|
|
1414
|
+
}
|
|
1415
|
+
),
|
|
1416
|
+
/* @__PURE__ */ e(
|
|
1417
|
+
pe,
|
|
1418
|
+
{
|
|
1419
|
+
"aria-controls": "spending-details-tabpanel-1",
|
|
1420
|
+
label: n.key_indicators_save.drawer_spending,
|
|
1421
|
+
sx: { minHeight: 44 }
|
|
1422
|
+
}
|
|
1423
|
+
)
|
|
1424
|
+
]
|
|
1425
|
+
}
|
|
1426
|
+
),
|
|
1427
|
+
/* @__PURE__ */ e(ue, { index: 0, name: "available-details", value: t, children: /* @__PURE__ */ e(gr, {}) }),
|
|
1428
|
+
/* @__PURE__ */ e(ue, { index: 1, name: "spending-details", value: t, children: /* @__PURE__ */ e(br, {}) })
|
|
1429
|
+
] }),
|
|
1430
|
+
/* @__PURE__ */ e(Qe, { chartFor: "savingsOverTime" })
|
|
1431
|
+
] });
|
|
1432
|
+
}, xr = S(fr), Sr = () => {
|
|
1433
|
+
const { finstrong: t } = v(), { healthScore: r } = F(), n = r.months_of_cash_on_hand, o = wt(n ? n * 30 : null), c = 183 / 6, a = Math.floor(n), s = Math.round((n - a) * c), d = n / 6 * 100;
|
|
1434
|
+
return /* @__PURE__ */ e(
|
|
1435
|
+
We,
|
|
1436
|
+
{
|
|
1437
|
+
bottomComponent: /* @__PURE__ */ e(
|
|
1438
|
+
u,
|
|
1439
|
+
{
|
|
1440
|
+
sx: {
|
|
1441
|
+
flexDirection: "row",
|
|
1442
|
+
height: 24,
|
|
1443
|
+
justifyContent: "space-between",
|
|
1444
|
+
mt: 2,
|
|
1445
|
+
px: 1
|
|
1446
|
+
},
|
|
1447
|
+
children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((p) => /* @__PURE__ */ i(
|
|
1448
|
+
u,
|
|
1449
|
+
{
|
|
1450
|
+
sx: {
|
|
1451
|
+
alignItems: "center",
|
|
1452
|
+
height: 24
|
|
1453
|
+
},
|
|
1454
|
+
children: [
|
|
1455
|
+
/* @__PURE__ */ e(
|
|
1456
|
+
ne,
|
|
1457
|
+
{
|
|
1458
|
+
orientation: "vertical",
|
|
1459
|
+
sx: {
|
|
1460
|
+
borderWidth: 1,
|
|
1461
|
+
height: 8
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
),
|
|
1465
|
+
/* @__PURE__ */ e(I, { variant: "XSmall", children: p })
|
|
1466
|
+
]
|
|
1467
|
+
},
|
|
1468
|
+
p
|
|
1469
|
+
))
|
|
1470
|
+
}
|
|
1471
|
+
),
|
|
1472
|
+
label: t.key_indicators_save.drawer_progress_bar_label,
|
|
1473
|
+
status: o,
|
|
1474
|
+
statusBarData: [
|
|
1475
|
+
{
|
|
1476
|
+
percentage: `${d}%`
|
|
1477
|
+
}
|
|
1478
|
+
],
|
|
1479
|
+
value: Y(t.key_indicators_save.drawer_progress_bar_value, a, s)
|
|
1480
|
+
}
|
|
1481
|
+
);
|
|
1482
|
+
}, Cr = S(Sr), vr = () => {
|
|
1483
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), n = Te(t.debt_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, a = ((s) => o ? "MISSING" : s <= 30 ? "GOOD" : s >= 31 && s <= 39 ? "FAIR" : s >= 40 ? "OFF_TRACK" : "MISSING")(n);
|
|
1484
|
+
return /* @__PURE__ */ e(
|
|
1485
|
+
We,
|
|
1486
|
+
{
|
|
1487
|
+
bottomComponent: /* @__PURE__ */ i(
|
|
1488
|
+
u,
|
|
1489
|
+
{
|
|
1490
|
+
sx: {
|
|
1491
|
+
alignItems: "flex-end",
|
|
1492
|
+
flexDirection: "row",
|
|
1493
|
+
height: 24,
|
|
1494
|
+
justifyContent: "space-between",
|
|
1495
|
+
mt: 2,
|
|
1496
|
+
position: "relative"
|
|
1497
|
+
},
|
|
1498
|
+
children: [
|
|
1499
|
+
/* @__PURE__ */ e(
|
|
1500
|
+
C,
|
|
1501
|
+
{
|
|
1502
|
+
sx: {
|
|
1503
|
+
left: "30%",
|
|
1504
|
+
position: "absolute",
|
|
1505
|
+
transform: "translateX(-50%)"
|
|
1506
|
+
},
|
|
1507
|
+
children: /* @__PURE__ */ i(
|
|
1508
|
+
u,
|
|
1509
|
+
{
|
|
1510
|
+
sx: {
|
|
1511
|
+
alignItems: "center",
|
|
1512
|
+
flexDirection: "column",
|
|
1513
|
+
height: 24,
|
|
1514
|
+
justifyContent: "flex-end"
|
|
1515
|
+
},
|
|
1516
|
+
children: [
|
|
1517
|
+
/* @__PURE__ */ e(
|
|
1518
|
+
ne,
|
|
1519
|
+
{
|
|
1520
|
+
orientation: "vertical",
|
|
1521
|
+
sx: {
|
|
1522
|
+
borderWidth: 1,
|
|
1523
|
+
height: 8
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
),
|
|
1527
|
+
/* @__PURE__ */ e(I, { sx: { color: "text.primary" }, variant: "XSmall", children: "30%" })
|
|
1528
|
+
]
|
|
1529
|
+
}
|
|
1530
|
+
)
|
|
1531
|
+
}
|
|
1532
|
+
),
|
|
1533
|
+
/* @__PURE__ */ e(
|
|
1534
|
+
C,
|
|
1535
|
+
{
|
|
1536
|
+
sx: {
|
|
1537
|
+
display: "flex",
|
|
1538
|
+
flexDirection: "column",
|
|
1539
|
+
height: 24,
|
|
1540
|
+
justifyContent: "center",
|
|
1541
|
+
marginLeft: "auto"
|
|
1542
|
+
},
|
|
1543
|
+
children: /* @__PURE__ */ e(I, { variant: "Small", children: Y(
|
|
1544
|
+
r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_sticky_description,
|
|
1545
|
+
n
|
|
1546
|
+
) })
|
|
1547
|
+
}
|
|
1548
|
+
)
|
|
1549
|
+
]
|
|
1550
|
+
}
|
|
1551
|
+
),
|
|
1552
|
+
label: r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_sticky_title,
|
|
1553
|
+
status: a,
|
|
1554
|
+
statusBarData: [
|
|
1555
|
+
{
|
|
1556
|
+
percentage: `${n}%`
|
|
1557
|
+
}
|
|
1558
|
+
],
|
|
1559
|
+
value: L(t.ninety_day_debt_spend, "0,0.00")
|
|
1560
|
+
}
|
|
1561
|
+
);
|
|
1562
|
+
}, wr = S(vr), kr = () => {
|
|
1563
|
+
const { healthScore: t, allTransactions: r } = F(), { connect: n, finstrong: o } = v(), [c, a] = m.useState(!1);
|
|
1564
|
+
return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1565
|
+
/* @__PURE__ */ e(
|
|
1566
|
+
Se,
|
|
1567
|
+
{
|
|
1568
|
+
balance: t.ninety_day_income,
|
|
1569
|
+
sx: { flexDirection: "column-reverse" },
|
|
1570
|
+
title: o.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_income
|
|
1571
|
+
}
|
|
1572
|
+
),
|
|
1573
|
+
r.income.length ? (
|
|
1574
|
+
// TODO: Need to add More Transactions functionality
|
|
1575
|
+
/* @__PURE__ */ e($e, { transactions: r.income.map((s) => s.transaction) })
|
|
1576
|
+
) : /* @__PURE__ */ e(
|
|
1577
|
+
$,
|
|
1578
|
+
{
|
|
1579
|
+
onClick: () => {
|
|
1580
|
+
a(!0);
|
|
1581
|
+
},
|
|
1582
|
+
variant: "contained",
|
|
1583
|
+
children: o.connect_more_accounts_button
|
|
1584
|
+
}
|
|
1585
|
+
),
|
|
1586
|
+
/* @__PURE__ */ e(
|
|
1587
|
+
oe,
|
|
1588
|
+
{
|
|
1589
|
+
onClose: () => a(!1),
|
|
1590
|
+
showConnectWidget: c,
|
|
1591
|
+
title: n.mini_title
|
|
1592
|
+
}
|
|
1593
|
+
)
|
|
1594
|
+
] });
|
|
1595
|
+
}, Mr = S(kr), Dr = () => {
|
|
1596
|
+
const { allTransactions: t, healthScore: r } = F(), { connect: n, finstrong: o } = v(), [c, a] = m.useState(!1);
|
|
1597
|
+
return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1598
|
+
/* @__PURE__ */ e(
|
|
1599
|
+
Se,
|
|
1600
|
+
{
|
|
1601
|
+
balance: r.ninety_day_debt_spend,
|
|
1602
|
+
sx: { flexDirection: "column-reverse" },
|
|
1603
|
+
title: o.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_payments
|
|
1604
|
+
}
|
|
1605
|
+
),
|
|
1606
|
+
t.debtSpend.length ? (
|
|
1607
|
+
//TODO: Need to add More Transactions functionality
|
|
1608
|
+
/* @__PURE__ */ e(
|
|
1609
|
+
$e,
|
|
1610
|
+
{
|
|
1611
|
+
amountColor: "text.primary",
|
|
1612
|
+
transactions: t.debtSpend.map((s) => s.transaction)
|
|
1613
|
+
}
|
|
1614
|
+
)
|
|
1615
|
+
) : /* @__PURE__ */ e(
|
|
1616
|
+
$,
|
|
1617
|
+
{
|
|
1618
|
+
onClick: () => {
|
|
1619
|
+
a(!0);
|
|
1620
|
+
},
|
|
1621
|
+
variant: "contained",
|
|
1622
|
+
children: o.connect_more_accounts_button
|
|
1623
|
+
}
|
|
1624
|
+
),
|
|
1625
|
+
/* @__PURE__ */ e(
|
|
1626
|
+
oe,
|
|
1627
|
+
{
|
|
1628
|
+
onClose: () => a(!1),
|
|
1629
|
+
showConnectWidget: c,
|
|
1630
|
+
title: n.mini_title
|
|
1631
|
+
}
|
|
1632
|
+
)
|
|
1633
|
+
] });
|
|
1634
|
+
}, Ir = S(Dr), Ar = ({
|
|
1635
|
+
color: t,
|
|
1636
|
+
data: r,
|
|
1637
|
+
series: n,
|
|
1638
|
+
style: o,
|
|
1639
|
+
...c
|
|
1640
|
+
}) => {
|
|
1641
|
+
const a = E(), s = m.useRef(null), { width: d } = uo({
|
|
1642
|
+
width: o.width
|
|
1643
|
+
});
|
|
1644
|
+
m.useLayoutEffect(() => {
|
|
1645
|
+
const _ = new ResizeObserver(() => {
|
|
1646
|
+
window.requestAnimationFrame(() => {
|
|
1647
|
+
if (s.current) {
|
|
1648
|
+
const { width: b } = s.current.getBoundingClientRect(), f = b / 2, w = s.current.querySelector("text");
|
|
1649
|
+
w && w.setAttribute("transform", `translate(${f}, -8)`);
|
|
1650
|
+
}
|
|
1651
|
+
});
|
|
1652
|
+
});
|
|
1653
|
+
return s.current && _.observe(s.current), () => {
|
|
1654
|
+
s.current && _.unobserve(s.current);
|
|
1655
|
+
};
|
|
1656
|
+
}, []);
|
|
1657
|
+
const { formattedComparison: l, formattedMain: p } = r[n.index], h = n.type === 0 ? p : l;
|
|
1658
|
+
return /* @__PURE__ */ i("g", { children: [
|
|
1659
|
+
/* @__PURE__ */ e(lt.rect, { ...c, fill: t, ref: s, rx: 2, style: o }),
|
|
1660
|
+
/* @__PURE__ */ e(
|
|
1661
|
+
lt.text,
|
|
1662
|
+
{
|
|
1663
|
+
fill: a.palette.text.secondary,
|
|
1664
|
+
fontSize: 9,
|
|
1665
|
+
fontWeight: 400,
|
|
1666
|
+
textAnchor: "middle",
|
|
1667
|
+
transform: d.to((_) => `translate(${_ / 2}, -5)`),
|
|
1668
|
+
x: o.x,
|
|
1669
|
+
y: o.y,
|
|
1670
|
+
children: h
|
|
1671
|
+
}
|
|
1672
|
+
)
|
|
1673
|
+
] });
|
|
1674
|
+
}, jt = ({
|
|
1675
|
+
chartFor: t,
|
|
1676
|
+
data: r,
|
|
1677
|
+
title: n,
|
|
1678
|
+
buttonLabel: o,
|
|
1679
|
+
onClick: c,
|
|
1680
|
+
legendLabelMain: a,
|
|
1681
|
+
legendLabelComparison: s,
|
|
1682
|
+
totalComparison: d,
|
|
1683
|
+
totalMain: l
|
|
1684
|
+
}) => {
|
|
1685
|
+
const p = E(), h = so(p.breakpoints.down("xs")), _ = m.useMemo(
|
|
1686
|
+
() => r.sort((g, x) => g.month - x.month).map((g) => {
|
|
1687
|
+
const x = Ln(g.month), M = {
|
|
1688
|
+
spending_vs_income: {
|
|
1689
|
+
main: g.standard_spend,
|
|
1690
|
+
comparison: g.income,
|
|
1691
|
+
formattedMain: L(g.standard_spend, "0.0a"),
|
|
1692
|
+
formattedComparison: L(g.income, "0.0a")
|
|
1693
|
+
},
|
|
1694
|
+
debt_payment_vs_income: {
|
|
1695
|
+
main: g.income,
|
|
1696
|
+
comparison: g.debt_spend,
|
|
1697
|
+
formattedMain: L(g.income, "0.0a"),
|
|
1698
|
+
formattedComparison: L(g.debt_spend, "0.0a")
|
|
1699
|
+
}
|
|
1700
|
+
};
|
|
1701
|
+
return {
|
|
1702
|
+
label: x,
|
|
1703
|
+
...M[t]
|
|
1704
|
+
};
|
|
1705
|
+
}),
|
|
1706
|
+
[r, t]
|
|
1707
|
+
), b = {
|
|
1708
|
+
dataKey: "label",
|
|
1709
|
+
scaleType: "band"
|
|
1710
|
+
}, f = Math.max(..._.map((g) => Math.max(g.main, g.comparison))), w = Math.ceil(f * 1.2 / 1e3) * 1e3, y = w / 3, D = {
|
|
1711
|
+
scaleType: "linear",
|
|
1712
|
+
min: 0,
|
|
1713
|
+
max: w,
|
|
1714
|
+
tickNumber: 4,
|
|
1715
|
+
tickMinStep: y,
|
|
1716
|
+
valueFormatter: (g) => g === 0 ? "$0" : `$${(g / 1e3).toFixed(0)}K`
|
|
1717
|
+
};
|
|
1718
|
+
return /* @__PURE__ */ i(
|
|
1719
|
+
K,
|
|
1720
|
+
{
|
|
1721
|
+
sx: {
|
|
1722
|
+
px: 16,
|
|
1723
|
+
py: 24
|
|
1724
|
+
},
|
|
1725
|
+
children: [
|
|
1726
|
+
/* @__PURE__ */ i(
|
|
1727
|
+
u,
|
|
1728
|
+
{
|
|
1729
|
+
sx: {
|
|
1730
|
+
alignItems: "center",
|
|
1731
|
+
flexDirection: "row",
|
|
1732
|
+
justifyContent: "space-between",
|
|
1733
|
+
gap: 12,
|
|
1734
|
+
pb: 8
|
|
1735
|
+
},
|
|
1736
|
+
children: [
|
|
1737
|
+
/* @__PURE__ */ e(N, { children: n }),
|
|
1738
|
+
o && /* @__PURE__ */ e(
|
|
1739
|
+
$,
|
|
1740
|
+
{
|
|
1741
|
+
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
1742
|
+
onClick: c,
|
|
1743
|
+
size: "small",
|
|
1744
|
+
sx: {
|
|
1745
|
+
pl: 8,
|
|
1746
|
+
height: 24
|
|
1747
|
+
},
|
|
1748
|
+
variant: "text",
|
|
1749
|
+
children: o
|
|
1750
|
+
}
|
|
1751
|
+
)
|
|
1752
|
+
]
|
|
1753
|
+
}
|
|
1754
|
+
),
|
|
1755
|
+
/* @__PURE__ */ i(u, { sx: { alignItems: "center", flexDirection: "row", gap: 24, py: 4 }, children: [
|
|
1756
|
+
/* @__PURE__ */ i(u, { sx: { gap: 8, alignItems: "center", flexDirection: "row" }, children: [
|
|
1757
|
+
/* @__PURE__ */ e(
|
|
1758
|
+
C,
|
|
1759
|
+
{
|
|
1760
|
+
sx: {
|
|
1761
|
+
width: 10,
|
|
1762
|
+
height: 10,
|
|
1763
|
+
backgroundColor: "chartMono.chartMono3",
|
|
1764
|
+
borderRadius: "2px"
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
),
|
|
1768
|
+
/* @__PURE__ */ i(u, { sx: { alignItems: "center", flexDirection: "row" }, children: [
|
|
1769
|
+
/* @__PURE__ */ i(I, { variant: "subtitle2", children: [
|
|
1770
|
+
a,
|
|
1771
|
+
" "
|
|
1772
|
+
] }),
|
|
1773
|
+
!h && l && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: l })
|
|
1774
|
+
] })
|
|
1775
|
+
] }),
|
|
1776
|
+
/* @__PURE__ */ i(u, { alignItems: "center", direction: "row", spacing: 8, children: [
|
|
1777
|
+
/* @__PURE__ */ e(
|
|
1778
|
+
C,
|
|
1779
|
+
{
|
|
1780
|
+
sx: {
|
|
1781
|
+
width: 10,
|
|
1782
|
+
height: 10,
|
|
1783
|
+
backgroundColor: "chartMono.chartMono5",
|
|
1784
|
+
borderRadius: "2px"
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
),
|
|
1788
|
+
/* @__PURE__ */ i(u, { sx: { alignItems: "center", flexDirection: "row" }, children: [
|
|
1789
|
+
/* @__PURE__ */ i(I, { variant: "subtitle2", children: [
|
|
1790
|
+
s,
|
|
1791
|
+
" "
|
|
1792
|
+
] }),
|
|
1793
|
+
!h && d && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: d })
|
|
1794
|
+
] })
|
|
1795
|
+
] })
|
|
1796
|
+
] }),
|
|
1797
|
+
/* @__PURE__ */ i(
|
|
1798
|
+
po,
|
|
1799
|
+
{
|
|
1800
|
+
colors: [`${p.palette.chartMono.chartMono3}`, `${p.palette.chartMono.chartMono5}`],
|
|
1801
|
+
dataset: _,
|
|
1802
|
+
height: 240,
|
|
1803
|
+
margin: { top: 20, bottom: 30, right: 10, left: 42 },
|
|
1804
|
+
series: [
|
|
1805
|
+
{ dataKey: "main", type: "bar" },
|
|
1806
|
+
{ dataKey: "comparison", type: "bar" }
|
|
1807
|
+
],
|
|
1808
|
+
xAxis: [b],
|
|
1809
|
+
yAxis: [D],
|
|
1810
|
+
children: [
|
|
1811
|
+
/* @__PURE__ */ e(
|
|
1812
|
+
hn,
|
|
1813
|
+
{
|
|
1814
|
+
slots: {
|
|
1815
|
+
bar: (g) => {
|
|
1816
|
+
const { ownerState: x, style: M, ...W } = g;
|
|
1817
|
+
return /* @__PURE__ */ e(
|
|
1818
|
+
Ar,
|
|
1819
|
+
{
|
|
1820
|
+
...W,
|
|
1821
|
+
color: x.color,
|
|
1822
|
+
data: _,
|
|
1823
|
+
series: {
|
|
1824
|
+
index: x.dataIndex,
|
|
1825
|
+
type: Number(x.id.toString().split("-").pop())
|
|
1826
|
+
},
|
|
1827
|
+
style: M
|
|
1828
|
+
}
|
|
1829
|
+
);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
),
|
|
1834
|
+
/* @__PURE__ */ e(
|
|
1835
|
+
co,
|
|
1836
|
+
{
|
|
1837
|
+
sx: () => ({
|
|
1838
|
+
".MuiChartsAxis-line": {
|
|
1839
|
+
stroke: p.palette.divider
|
|
1840
|
+
},
|
|
1841
|
+
".MuiChartsAxis-tick": {
|
|
1842
|
+
stroke: p.palette.divider
|
|
1843
|
+
},
|
|
1844
|
+
".MuiChartsAxis-tickLabel": {
|
|
1845
|
+
transform: "translateY(10px)"
|
|
1846
|
+
}
|
|
1847
|
+
}),
|
|
1848
|
+
tickLabelStyle: {
|
|
1849
|
+
fontSize: 11,
|
|
1850
|
+
fill: "text.secondary"
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
),
|
|
1854
|
+
/* @__PURE__ */ e(
|
|
1855
|
+
lo,
|
|
1856
|
+
{
|
|
1857
|
+
sx: () => ({
|
|
1858
|
+
".MuiChartsAxis-line": {
|
|
1859
|
+
stroke: p.palette.divider
|
|
1860
|
+
},
|
|
1861
|
+
".MuiChartsAxis-tick": {
|
|
1862
|
+
stroke: p.palette.divider
|
|
1863
|
+
},
|
|
1864
|
+
".MuiChartsAxis-tickLabel": {
|
|
1865
|
+
transform: "translateX(-8px)"
|
|
1866
|
+
}
|
|
1867
|
+
}),
|
|
1868
|
+
tickLabelStyle: {
|
|
1869
|
+
fontSize: 11,
|
|
1870
|
+
fill: "text.secondary"
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
)
|
|
1874
|
+
]
|
|
1875
|
+
}
|
|
1876
|
+
)
|
|
1877
|
+
]
|
|
1878
|
+
}
|
|
1879
|
+
);
|
|
1880
|
+
}, Tr = () => {
|
|
1881
|
+
const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } = F(), { isInitialized: o } = j(), [c, a] = m.useState(0), { finstrong: s } = v();
|
|
1882
|
+
return m.useEffect(() => {
|
|
1883
|
+
o && (t().finally(), r().finally());
|
|
1884
|
+
}, [o]), /* @__PURE__ */ i(z, { children: [
|
|
1885
|
+
/* @__PURE__ */ i(K, { children: [
|
|
1886
|
+
/* @__PURE__ */ i(
|
|
1887
|
+
qe,
|
|
1888
|
+
{
|
|
1889
|
+
"aria-label": s.key_indicators_save.drawer_title,
|
|
1890
|
+
centered: !0,
|
|
1891
|
+
onChange: (d, l) => a(l),
|
|
1892
|
+
sx: { mb: 0 },
|
|
1893
|
+
value: c,
|
|
1894
|
+
variant: "fullWidth",
|
|
1895
|
+
children: [
|
|
1896
|
+
/* @__PURE__ */ e(
|
|
1897
|
+
pe,
|
|
1898
|
+
{
|
|
1899
|
+
"aria-controls": "income-details-tabpanel-0",
|
|
1900
|
+
id: "income-details-tab-0",
|
|
1901
|
+
label: s.key_indicators_borrow.have_manageable_debt_drawer.income,
|
|
1902
|
+
sx: { minHeight: 44 }
|
|
1903
|
+
}
|
|
1904
|
+
),
|
|
1905
|
+
/* @__PURE__ */ e(
|
|
1906
|
+
pe,
|
|
1907
|
+
{
|
|
1908
|
+
"aria-controls": "debt-payment-details-tabpanel-1",
|
|
1909
|
+
id: "debt-payment-details-tab-1",
|
|
1910
|
+
label: s.key_indicators_borrow.have_manageable_debt_drawer.debt_payment,
|
|
1911
|
+
sx: { minHeight: 44 }
|
|
1912
|
+
}
|
|
1913
|
+
)
|
|
1914
|
+
]
|
|
1915
|
+
}
|
|
1916
|
+
),
|
|
1917
|
+
/* @__PURE__ */ e(
|
|
1918
|
+
ue,
|
|
1919
|
+
{
|
|
1920
|
+
"aria-labelledby": "income-details-tab-0",
|
|
1921
|
+
index: 0,
|
|
1922
|
+
name: "income-details",
|
|
1923
|
+
value: c,
|
|
1924
|
+
children: /* @__PURE__ */ e(Mr, {})
|
|
1925
|
+
}
|
|
1926
|
+
),
|
|
1927
|
+
/* @__PURE__ */ e(
|
|
1928
|
+
ue,
|
|
1929
|
+
{
|
|
1930
|
+
"aria-labelledby": "debt-payment-details-tab-1",
|
|
1931
|
+
index: 1,
|
|
1932
|
+
name: "debt-payment-details",
|
|
1933
|
+
value: c,
|
|
1934
|
+
children: /* @__PURE__ */ e(Ir, {})
|
|
1935
|
+
}
|
|
1936
|
+
)
|
|
1937
|
+
] }),
|
|
1938
|
+
n.length ? /* @__PURE__ */ i(z, { children: [
|
|
1939
|
+
/* @__PURE__ */ e(
|
|
1940
|
+
jt,
|
|
1941
|
+
{
|
|
1942
|
+
chartFor: "debt_payment_vs_income",
|
|
1943
|
+
data: n,
|
|
1944
|
+
legendLabelComparison: s.key_indicators_borrow.have_manageable_debt_drawer.debt_payment,
|
|
1945
|
+
legendLabelMain: s.key_indicators_borrow.have_manageable_debt_drawer.income,
|
|
1946
|
+
title: s.key_indicators_borrow.have_manageable_debt_drawer.debt_payment
|
|
1947
|
+
}
|
|
1948
|
+
),
|
|
1949
|
+
/* @__PURE__ */ e(Qe, { chartFor: "debtOverTime" })
|
|
1950
|
+
] }) : /* @__PURE__ */ i(z, { children: [
|
|
1951
|
+
/* @__PURE__ */ e(
|
|
1952
|
+
Fe,
|
|
1953
|
+
{
|
|
1954
|
+
header: s.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_double_bar_chart_empty_state_header,
|
|
1955
|
+
icon: "multiline_chart",
|
|
1956
|
+
subText: s.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_double_bar_chart_empty_state_description,
|
|
1957
|
+
sx: {
|
|
1958
|
+
backgroundColor: "background.paper",
|
|
1959
|
+
borderRadius: "8px",
|
|
1960
|
+
boxShadow: 1,
|
|
1961
|
+
p: 24,
|
|
1962
|
+
pb: 48
|
|
1963
|
+
},
|
|
1964
|
+
variant: "no-buttons"
|
|
1965
|
+
}
|
|
1966
|
+
),
|
|
1967
|
+
/* @__PURE__ */ e(
|
|
1968
|
+
Fe,
|
|
1969
|
+
{
|
|
1970
|
+
header: s.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_line_chart_empty_state_header,
|
|
1971
|
+
icon: "multiline_chart",
|
|
1972
|
+
subText: s.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_line_chart_empty_state_description,
|
|
1973
|
+
sx: {
|
|
1974
|
+
backgroundColor: "background.paper",
|
|
1975
|
+
borderRadius: "8px",
|
|
1976
|
+
boxShadow: 1,
|
|
1977
|
+
p: 24,
|
|
1978
|
+
pb: 48
|
|
1979
|
+
},
|
|
1980
|
+
variant: "no-buttons"
|
|
1981
|
+
}
|
|
1982
|
+
)
|
|
1983
|
+
] })
|
|
1984
|
+
] });
|
|
1985
|
+
}, Or = S(Tr), Rr = () => {
|
|
1986
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), n = Te(t.spend_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, a = ((d) => o ? "MISSING" : d < 100 ? "GOOD" : d >= 100 && d <= 109 ? "FAIR" : d >= 110 ? "OFF_TRACK" : "MISSING")(n), s = {
|
|
1987
|
+
GOOD: [{ percentage: `${n}%` }],
|
|
1988
|
+
FAIR: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
|
|
1989
|
+
OFF_TRACK: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
|
|
1990
|
+
MISSING: [{ percentage: "0%" }]
|
|
1991
|
+
}[a];
|
|
1992
|
+
return /* @__PURE__ */ e(
|
|
1993
|
+
We,
|
|
1994
|
+
{
|
|
1995
|
+
bottomComponent: /* @__PURE__ */ i(
|
|
1996
|
+
u,
|
|
1997
|
+
{
|
|
1998
|
+
sx: {
|
|
1999
|
+
flexDirection: "row",
|
|
2000
|
+
justifyContent: "space-between",
|
|
2001
|
+
alignItems: "center",
|
|
2002
|
+
mt: 8
|
|
2003
|
+
},
|
|
2004
|
+
children: [
|
|
2005
|
+
/* @__PURE__ */ i(I, { variant: "body2", children: [
|
|
2006
|
+
o ? "-" : L(t.ninety_day_income, "0,0.00"),
|
|
2007
|
+
" ",
|
|
2008
|
+
r?.key_indicators_spend.spend_less_than_you_make_drawer.income
|
|
2009
|
+
] }),
|
|
2010
|
+
/* @__PURE__ */ i(I, { variant: "body2", children: [
|
|
2011
|
+
o ? "-%" : `${n}%`,
|
|
2012
|
+
" ",
|
|
2013
|
+
r?.key_indicators_spend.spend_less_than_you_make_drawer.spent
|
|
2014
|
+
] })
|
|
2015
|
+
]
|
|
2016
|
+
}
|
|
2017
|
+
),
|
|
2018
|
+
label: r?.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_sticky_description,
|
|
2019
|
+
status: a,
|
|
2020
|
+
statusBarData: s,
|
|
2021
|
+
value: o ? "$0" : L(t.ninety_day_spend, "0,0.00")
|
|
2022
|
+
}
|
|
2023
|
+
);
|
|
2024
|
+
}, Fr = S(Rr), Pr = () => {
|
|
2025
|
+
const t = E(), { monthlySummaries: r, handleFinstrongWidgetPrimaryCtaClick: n } = F(), { finstrong: o, goals: c, spending: a } = v(), { selectedAccounts: s } = j(), { categories: d, dateRangeCategoryTotals: l, loadDateRangeCategoryTotals: p } = Ye(), { appDataStore: h } = Kn(), [_, b] = m.useState("");
|
|
2026
|
+
m.useEffect(() => {
|
|
2027
|
+
p(
|
|
2028
|
+
s,
|
|
2029
|
+
Lt(/* @__PURE__ */ new Date()),
|
|
2030
|
+
Wt(/* @__PURE__ */ new Date())
|
|
2031
|
+
).finally();
|
|
2032
|
+
}, [s]);
|
|
2033
|
+
const f = m.useMemo(
|
|
2034
|
+
() => _o(d, c, t, l),
|
|
2035
|
+
[d, l]
|
|
2036
|
+
), w = (g) => {
|
|
2037
|
+
b(_ === g ? "" : g);
|
|
2038
|
+
}, { totalSpending: y, totalIncome: D } = m.useMemo(() => r?.reduce(
|
|
2039
|
+
(g, { standard_spend: x = 0, income: M = 0 }) => ({
|
|
2040
|
+
totalSpending: g.totalSpending + x,
|
|
2041
|
+
totalIncome: g.totalIncome + M
|
|
2042
|
+
}),
|
|
2043
|
+
{ totalSpending: 0, totalIncome: 0 }
|
|
2044
|
+
), [r]);
|
|
2045
|
+
return /* @__PURE__ */ i(u, { sx: { gap: 24 }, children: [
|
|
2046
|
+
r.length ? /* @__PURE__ */ e(
|
|
2047
|
+
jt,
|
|
2048
|
+
{
|
|
2049
|
+
...h.appData.client_profile?.allow_trends_widget && {
|
|
2050
|
+
buttonLabel: o.key_indicators_spend.spend_less_than_you_make_drawer.view_more
|
|
2051
|
+
},
|
|
2052
|
+
chartFor: "spending_vs_income",
|
|
2053
|
+
data: r,
|
|
2054
|
+
legendLabelComparison: o.key_indicators_spend.spend_less_than_you_make_drawer.income,
|
|
2055
|
+
legendLabelMain: o.key_indicators_spend.spend_less_than_you_make_drawer.spending,
|
|
2056
|
+
onClick: () => n("trends")(),
|
|
2057
|
+
title: o.key_indicators_spend.spend_less_than_you_make_drawer.trends,
|
|
2058
|
+
totalComparison: L(D, "0,0.00"),
|
|
2059
|
+
totalMain: L(y, "0,0.00")
|
|
2060
|
+
}
|
|
2061
|
+
) : /* @__PURE__ */ e(
|
|
2062
|
+
Fe,
|
|
2063
|
+
{
|
|
2064
|
+
header: o.key_indicators_spend.spend_less_than_you_make_drawer.trends_zero_state_title,
|
|
2065
|
+
icon: "multiline_chart",
|
|
2066
|
+
subText: o.key_indicators_spend.spend_less_than_you_make_drawer.trends_zero_state_description,
|
|
2067
|
+
sx: {
|
|
2068
|
+
backgroundColor: "background.paper",
|
|
2069
|
+
borderRadius: "8px",
|
|
2070
|
+
boxShadow: 1,
|
|
2071
|
+
p: 24,
|
|
2072
|
+
pb: 48,
|
|
2073
|
+
".empty-state-subtext": {
|
|
2074
|
+
fontSize: 15,
|
|
2075
|
+
lineHeight: "24px",
|
|
2076
|
+
mt: 8
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
variant: "no-buttons"
|
|
2080
|
+
}
|
|
2081
|
+
),
|
|
2082
|
+
f ? /* @__PURE__ */ i(
|
|
2083
|
+
K,
|
|
2084
|
+
{
|
|
2085
|
+
sx: {
|
|
2086
|
+
px: 16,
|
|
2087
|
+
py: 24
|
|
2088
|
+
},
|
|
2089
|
+
children: [
|
|
2090
|
+
/* @__PURE__ */ i(
|
|
2091
|
+
u,
|
|
2092
|
+
{
|
|
2093
|
+
sx: {
|
|
2094
|
+
alignItems: "center",
|
|
2095
|
+
flexDirection: "row",
|
|
2096
|
+
justifyContent: "space-between",
|
|
2097
|
+
gap: 12,
|
|
2098
|
+
pb: 8
|
|
2099
|
+
},
|
|
2100
|
+
children: [
|
|
2101
|
+
/* @__PURE__ */ e(N, { children: o.key_indicators_spend.spend_less_than_you_make_drawer.spending }),
|
|
2102
|
+
h.appData.client_profile?.allow_spending_widget && /* @__PURE__ */ e(
|
|
2103
|
+
$,
|
|
2104
|
+
{
|
|
2105
|
+
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
2106
|
+
onClick: () => n("spending")(),
|
|
2107
|
+
size: "small",
|
|
2108
|
+
sx: {
|
|
2109
|
+
pl: 8,
|
|
2110
|
+
height: 24
|
|
2111
|
+
},
|
|
2112
|
+
variant: "text",
|
|
2113
|
+
children: o.key_indicators_spend.spend_less_than_you_make_drawer.view_more
|
|
2114
|
+
}
|
|
2115
|
+
)
|
|
2116
|
+
]
|
|
2117
|
+
}
|
|
2118
|
+
),
|
|
2119
|
+
/* @__PURE__ */ i(u, { sx: { gap: 12, py: 16, flexDirection: "row", justifyContent: "center" }, children: [
|
|
2120
|
+
/* @__PURE__ */ e(
|
|
2121
|
+
ho,
|
|
2122
|
+
{
|
|
2123
|
+
data: f,
|
|
2124
|
+
onSelected: w,
|
|
2125
|
+
selectedId: _,
|
|
2126
|
+
totalLabel: a.total_spending
|
|
2127
|
+
}
|
|
2128
|
+
),
|
|
2129
|
+
/* @__PURE__ */ e(
|
|
2130
|
+
mo,
|
|
2131
|
+
{
|
|
2132
|
+
data: f,
|
|
2133
|
+
onSelected: w,
|
|
2134
|
+
selectedId: _
|
|
2135
|
+
}
|
|
2136
|
+
)
|
|
2137
|
+
] })
|
|
2138
|
+
]
|
|
2139
|
+
}
|
|
2140
|
+
) : /* @__PURE__ */ e(
|
|
2141
|
+
Fe,
|
|
2142
|
+
{
|
|
2143
|
+
header: o.key_indicators_spend.spend_less_than_you_make_drawer.spending_zero_state_title,
|
|
2144
|
+
icon: "donut_small",
|
|
2145
|
+
subText: o.key_indicators_spend.spend_less_than_you_make_drawer.spending_zero_state_description,
|
|
2146
|
+
sx: {
|
|
2147
|
+
backgroundColor: "background.paper",
|
|
2148
|
+
borderRadius: "8px",
|
|
2149
|
+
boxShadow: 1,
|
|
2150
|
+
p: 24,
|
|
2151
|
+
pb: 48,
|
|
2152
|
+
".empty-state-subtext": {
|
|
2153
|
+
fontSize: 15,
|
|
2154
|
+
lineHeight: "24px",
|
|
2155
|
+
mt: 8
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2158
|
+
variant: "no-buttons"
|
|
2159
|
+
}
|
|
2160
|
+
)
|
|
2161
|
+
] });
|
|
2162
|
+
}, Br = S(Pr), Ee = {
|
|
2163
|
+
credit_score_description: "Credit scores usually go from 300 to 850. Think of 700+ as good, 800+ as awesome, and below 600 as needing work. You can often check yours for free with your bank or credit card company.",
|
|
2164
|
+
maintain_emergency_savings_description: "With at least $1,000 saved, you're ready for surprises, freeing you to save for major goals.",
|
|
2165
|
+
maintain_emergency_savings_title: "Maintain Emergency Savings"
|
|
2166
|
+
}, Lr = ({
|
|
2167
|
+
drawerFor: t,
|
|
2168
|
+
isOpen: r,
|
|
2169
|
+
onClose: n
|
|
2170
|
+
}) => {
|
|
2171
|
+
const { finstrong: o } = v(), a = {
|
|
2172
|
+
spendLessThanYouMake: {
|
|
2173
|
+
title: o.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_title,
|
|
2174
|
+
description: o.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_description,
|
|
2175
|
+
stickyComponent: /* @__PURE__ */ e(Fr, {}),
|
|
2176
|
+
content: /* @__PURE__ */ e(Br, {}),
|
|
2177
|
+
drawerType: "connectDrawer",
|
|
2178
|
+
connectTitle: o.connect_your_accounts,
|
|
2179
|
+
connectDescription: o.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
|
|
2180
|
+
},
|
|
2181
|
+
payBillsOnTime: {
|
|
2182
|
+
title: o.key_indicators_spend.pay_bills_on_time_drawer.pay_bills_on_time_title,
|
|
2183
|
+
description: o.key_indicators_spend.pay_bills_on_time_drawer.pay_bills_on_time_description,
|
|
2184
|
+
stickyComponent: /* @__PURE__ */ e(hr, {}),
|
|
2185
|
+
content: /* @__PURE__ */ e(ur, {}),
|
|
2186
|
+
drawerType: "connectDrawer",
|
|
2187
|
+
connectTitle: o.connect_your_accounts,
|
|
2188
|
+
connectDescription: o.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
|
|
2189
|
+
},
|
|
2190
|
+
maintainEmergencySavings: {
|
|
2191
|
+
content: /* @__PURE__ */ e(rr, {}),
|
|
2192
|
+
description: Ee.maintain_emergency_savings_description,
|
|
2193
|
+
stickyComponent: /* @__PURE__ */ e(cr, {}),
|
|
2194
|
+
title: Ee.maintain_emergency_savings_title,
|
|
2195
|
+
drawerType: "connectDrawer",
|
|
2196
|
+
connectTitle: o.connect_your_accounts,
|
|
2197
|
+
connectDescription: o.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
|
|
2198
|
+
},
|
|
2199
|
+
haveManageableDebt: {
|
|
2200
|
+
title: o.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_title,
|
|
2201
|
+
description: o.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_description,
|
|
2202
|
+
stickyComponent: /* @__PURE__ */ e(wr, {}),
|
|
2203
|
+
content: /* @__PURE__ */ e(Or, {}),
|
|
2204
|
+
drawerType: "connectDrawer",
|
|
2205
|
+
connectTitle: o.dont_see_all_your_accounts,
|
|
2206
|
+
connectDescription: o.connect_more_accounts_to_view_more_accurate_financial_picture
|
|
2207
|
+
},
|
|
2208
|
+
haveAGoodCreditScore: {
|
|
2209
|
+
title: /* @__PURE__ */ e(Xo, {}),
|
|
2210
|
+
description: Ee.credit_score_description,
|
|
2211
|
+
stickyComponent: null,
|
|
2212
|
+
content: /* @__PURE__ */ e(jo, {})
|
|
2213
|
+
},
|
|
2214
|
+
saveEnoughToLiveOn: {
|
|
2215
|
+
title: o.key_indicators_save.drawer_title,
|
|
2216
|
+
description: o.key_indicators_save.drawer_description,
|
|
2217
|
+
stickyComponent: /* @__PURE__ */ e(Cr, {}),
|
|
2218
|
+
content: /* @__PURE__ */ e(xr, {}),
|
|
2219
|
+
drawerType: "connectDrawer",
|
|
2220
|
+
connectTitle: o.dont_see_all_your_accounts,
|
|
2221
|
+
connectDescription: o.connect_more_accounts_to_view_more_accurate_financial_picture
|
|
2222
|
+
}
|
|
2223
|
+
}[t];
|
|
2224
|
+
return /* @__PURE__ */ e(
|
|
2225
|
+
Ht,
|
|
2226
|
+
{
|
|
2227
|
+
connectDescription: a?.connectDescription,
|
|
2228
|
+
connectTitle: a?.connectTitle,
|
|
2229
|
+
description: a?.description,
|
|
2230
|
+
drawerTitle: o.key_indicators,
|
|
2231
|
+
drawerType: a.drawerType,
|
|
2232
|
+
isOpen: r,
|
|
2233
|
+
loadConnectAccountsCard: !0,
|
|
2234
|
+
onClose: n,
|
|
2235
|
+
stickyComponent: a.stickyComponent,
|
|
2236
|
+
title: a.title,
|
|
2237
|
+
children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: a.content })
|
|
2238
|
+
}
|
|
2239
|
+
);
|
|
2240
|
+
}, Wr = S(Lr), xe = ({
|
|
2241
|
+
drawerFor: t,
|
|
2242
|
+
title: r,
|
|
2243
|
+
description: n,
|
|
2244
|
+
cardState: o = "MISSING"
|
|
2245
|
+
}) => {
|
|
2246
|
+
const [c, a] = m.useState(!1);
|
|
2247
|
+
return /* @__PURE__ */ i(z, { children: [
|
|
2248
|
+
/* @__PURE__ */ i(
|
|
2249
|
+
u,
|
|
2250
|
+
{
|
|
2251
|
+
onClick: () => a(!0),
|
|
2252
|
+
sx: {
|
|
2253
|
+
alignItems: "center",
|
|
2254
|
+
flexDirection: "row",
|
|
2255
|
+
justifyContent: "space-between",
|
|
2256
|
+
gap: 12,
|
|
2257
|
+
p: 16,
|
|
2258
|
+
border: "1px solid",
|
|
2259
|
+
borderColor: "divider",
|
|
2260
|
+
borderRadius: 2,
|
|
2261
|
+
cursor: "pointer"
|
|
2262
|
+
},
|
|
2263
|
+
children: [
|
|
2264
|
+
/* @__PURE__ */ i(u, { sx: { gap: 4 }, children: [
|
|
2265
|
+
/* @__PURE__ */ i(u, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
2266
|
+
/* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: "body1", children: r }),
|
|
2267
|
+
/* @__PURE__ */ e(Le, { status: o })
|
|
2268
|
+
] }),
|
|
2269
|
+
/* @__PURE__ */ e(k, { color: "secondary", variant: "subtitle2", children: n })
|
|
2270
|
+
] }),
|
|
2271
|
+
/* @__PURE__ */ e(Z, { color: "secondary", size: 24 })
|
|
2272
|
+
]
|
|
2273
|
+
}
|
|
2274
|
+
),
|
|
2275
|
+
/* @__PURE__ */ e(
|
|
2276
|
+
Wr,
|
|
2277
|
+
{
|
|
2278
|
+
drawerFor: t,
|
|
2279
|
+
isOpen: c,
|
|
2280
|
+
onClose: () => a(!1)
|
|
2281
|
+
}
|
|
2282
|
+
)
|
|
2283
|
+
] });
|
|
2284
|
+
}, $r = () => {
|
|
2285
|
+
const { finstrong: t } = v(), { key_indicators_spend: r } = t, { healthScore: n } = F(), o = (s) => {
|
|
2286
|
+
const d = $n(s), l = {
|
|
2287
|
+
GOOD: r.ratio_good_description,
|
|
2288
|
+
FAIR: r.ratio_fair_description,
|
|
2289
|
+
OFF_TRACK: r.ratio_off_track_description,
|
|
2290
|
+
MISSING: r.ratio_missing_description
|
|
2291
|
+
}, p = d === "MISSING" ? l[d] : Y(l[d], s);
|
|
2292
|
+
return {
|
|
2293
|
+
cardState: d,
|
|
2294
|
+
description: p,
|
|
2295
|
+
title: r.ratio_card_title
|
|
2296
|
+
};
|
|
2297
|
+
}, { spendToIncomeRatio: c, spendFeeCount: a } = m.useMemo(() => {
|
|
2298
|
+
const s = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, d = o(s), l = Wn(
|
|
2299
|
+
n.spending_fee_transaction_count,
|
|
2300
|
+
r
|
|
2301
|
+
);
|
|
2302
|
+
return { spendToIncomeRatio: d, spendFeeCount: l };
|
|
2303
|
+
}, [
|
|
2304
|
+
n.spend_to_income_ratio,
|
|
2305
|
+
n.spending_fee_transaction_count,
|
|
2306
|
+
r,
|
|
2307
|
+
t
|
|
2308
|
+
]);
|
|
2309
|
+
return /* @__PURE__ */ i(u, { sx: { gap: 24, p: 8, pt: 24 }, children: [
|
|
2310
|
+
/* @__PURE__ */ e(
|
|
2311
|
+
xe,
|
|
2312
|
+
{
|
|
2313
|
+
cardState: c.cardState,
|
|
2314
|
+
description: c.description,
|
|
2315
|
+
drawerFor: _e.SpendLessThanYouMake,
|
|
2316
|
+
title: c.title
|
|
2317
|
+
}
|
|
2318
|
+
),
|
|
2319
|
+
/* @__PURE__ */ e(
|
|
2320
|
+
xe,
|
|
2321
|
+
{
|
|
2322
|
+
cardState: a.cardState,
|
|
2323
|
+
description: a.description,
|
|
2324
|
+
drawerFor: _e.PayBillsOnTime,
|
|
2325
|
+
title: a.title
|
|
2326
|
+
}
|
|
2327
|
+
)
|
|
2328
|
+
] });
|
|
2329
|
+
}, zr = S($r), Er = () => {
|
|
2330
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_save: n } = r, o = (d) => {
|
|
2331
|
+
const l = wt(d), p = {
|
|
2332
|
+
GOOD: n.days_of_cash_good_description,
|
|
2333
|
+
FAIR: n.days_of_cash_fair_description,
|
|
2334
|
+
OFF_TRACK: n.days_of_cash_off_track_description,
|
|
2335
|
+
MISSING: n.days_of_cash_missing_description
|
|
2336
|
+
}, h = l === "MISSING" ? p[l] : Y(p[l], d);
|
|
2337
|
+
return {
|
|
2338
|
+
cardState: l,
|
|
2339
|
+
description: h,
|
|
2340
|
+
title: n.days_of_cash_title
|
|
2341
|
+
};
|
|
2342
|
+
}, c = (d) => {
|
|
2343
|
+
const l = vt(d), p = {
|
|
2344
|
+
GOOD: n.emergency_savings_good_description,
|
|
2345
|
+
FAIR: n.emergency_savings_fair_description,
|
|
2346
|
+
OFF_TRACK: n.emergency_savings_off_track_description,
|
|
2347
|
+
MISSING: n.emergency_savings_missing_description
|
|
2348
|
+
};
|
|
2349
|
+
let h;
|
|
2350
|
+
return l === "FAIR" && d !== null ? h = Y(
|
|
2351
|
+
p[l],
|
|
2352
|
+
L(d, "0,0.00")
|
|
2353
|
+
) : h = p[l], {
|
|
2354
|
+
cardState: l,
|
|
2355
|
+
description: h,
|
|
2356
|
+
title: n.emergency_savings_title
|
|
2357
|
+
};
|
|
2358
|
+
}, { daysOfCashOnHand: a, emergencySavings: s } = m.useMemo(() => {
|
|
2359
|
+
const d = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null, l = o(d), p = t.emergency_savings_on_hand !== null ? Math.round(t.emergency_savings_on_hand) : null, h = c(p);
|
|
2360
|
+
return { daysOfCashOnHand: l, emergencySavings: h };
|
|
2361
|
+
}, [
|
|
2362
|
+
t.months_of_cash_on_hand,
|
|
2363
|
+
t.emergency_savings_on_hand,
|
|
2364
|
+
n,
|
|
2365
|
+
r
|
|
2366
|
+
]);
|
|
2367
|
+
return /* @__PURE__ */ i(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
2368
|
+
/* @__PURE__ */ e(
|
|
2369
|
+
xe,
|
|
2370
|
+
{
|
|
2371
|
+
cardState: a.cardState,
|
|
2372
|
+
description: a.description,
|
|
2373
|
+
drawerFor: _e.SaveEnoughToLiveOn,
|
|
2374
|
+
title: a.title
|
|
2375
|
+
}
|
|
2376
|
+
),
|
|
2377
|
+
/* @__PURE__ */ e(
|
|
2378
|
+
xe,
|
|
2379
|
+
{
|
|
2380
|
+
cardState: s.cardState,
|
|
2381
|
+
description: s.description,
|
|
2382
|
+
drawerFor: _e.MaintainEmergencySavings,
|
|
2383
|
+
title: s.title
|
|
1012
2384
|
}
|
|
1013
2385
|
)
|
|
1014
2386
|
] });
|
|
1015
|
-
},
|
|
1016
|
-
const { healthScore:
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
2387
|
+
}, Gr = S(Er), Hr = () => {
|
|
2388
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_borrow: n } = r, { user: o } = Q(), c = (l) => {
|
|
2389
|
+
const p = zn(l), h = {
|
|
2390
|
+
GOOD: n.manage_debit_good_description,
|
|
2391
|
+
FAIR: n.manage_debit_fair_description,
|
|
2392
|
+
OFF_TRACK: n.manage_debit_off_track_description,
|
|
2393
|
+
MISSING: n.manage_debit_missing_description
|
|
2394
|
+
}, _ = p === "FAIR" || p === "OFF_TRACK" ? Y(h[p], l) : h[p];
|
|
2395
|
+
return {
|
|
2396
|
+
cardState: p,
|
|
2397
|
+
description: _,
|
|
2398
|
+
title: n.manage_debit_title
|
|
1027
2399
|
};
|
|
1028
|
-
},
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
2400
|
+
}, a = (l) => {
|
|
2401
|
+
const p = Ct(l), h = {
|
|
2402
|
+
GOOD: n.credit_score_good_description,
|
|
2403
|
+
FAIR: n.credit_score_fair_description,
|
|
2404
|
+
OFF_TRACK: n.credit_score_off_track_description,
|
|
2405
|
+
MISSING: n.credit_score_missing_description
|
|
2406
|
+
}, _ = p === "MISSING" ? h[p] : Y(h[p], l);
|
|
2407
|
+
return {
|
|
2408
|
+
cardState: p,
|
|
2409
|
+
description: _,
|
|
2410
|
+
title: n.credit_score_title
|
|
1039
2411
|
};
|
|
1040
|
-
}, { manageDebtStatus: s, creditScoreStatus:
|
|
1041
|
-
const
|
|
2412
|
+
}, { manageDebtStatus: s, creditScoreStatus: d } = m.useMemo(() => {
|
|
2413
|
+
const l = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, p = c(l), h = a(o.credit_score || null);
|
|
1042
2414
|
return {
|
|
1043
|
-
manageDebtStatus:
|
|
1044
|
-
creditScoreStatus:
|
|
2415
|
+
manageDebtStatus: p,
|
|
2416
|
+
creditScoreStatus: h
|
|
1045
2417
|
};
|
|
1046
|
-
}, [
|
|
1047
|
-
return /* @__PURE__ */ u
|
|
2418
|
+
}, [t.debt_to_income_ratio, o.credit_score, n, r]);
|
|
2419
|
+
return /* @__PURE__ */ i(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
2420
|
+
/* @__PURE__ */ e(
|
|
2421
|
+
xe,
|
|
2422
|
+
{
|
|
2423
|
+
cardState: s.cardState,
|
|
2424
|
+
description: s.description,
|
|
2425
|
+
drawerFor: _e.HaveManageableDebt,
|
|
2426
|
+
title: s.title
|
|
2427
|
+
}
|
|
2428
|
+
),
|
|
2429
|
+
/* @__PURE__ */ e(
|
|
2430
|
+
xe,
|
|
2431
|
+
{
|
|
2432
|
+
cardState: d.cardState,
|
|
2433
|
+
description: d.description,
|
|
2434
|
+
drawerFor: _e.HaveAGoodCreditScore,
|
|
2435
|
+
title: d.title
|
|
2436
|
+
}
|
|
2437
|
+
)
|
|
2438
|
+
] });
|
|
2439
|
+
}, Nr = S(Hr), Kr = () => {
|
|
2440
|
+
const [t, r] = m.useState(0), { finstrong: n } = v();
|
|
2441
|
+
return /* @__PURE__ */ i(z, { children: [
|
|
2442
|
+
/* @__PURE__ */ i(
|
|
2443
|
+
qe,
|
|
2444
|
+
{
|
|
2445
|
+
"aria-label": "Key Indicators",
|
|
2446
|
+
centered: !0,
|
|
2447
|
+
onChange: (o, c) => r(c),
|
|
2448
|
+
sx: {
|
|
2449
|
+
mb: 0,
|
|
2450
|
+
"& .MuiTab-root": {
|
|
2451
|
+
minWidth: 0
|
|
2452
|
+
}
|
|
2453
|
+
},
|
|
2454
|
+
textColor: "primary",
|
|
2455
|
+
value: t,
|
|
2456
|
+
variant: "fullWidth",
|
|
2457
|
+
children: [
|
|
2458
|
+
/* @__PURE__ */ e(
|
|
2459
|
+
pe,
|
|
2460
|
+
{
|
|
2461
|
+
"aria-controls": "spend-details-tabpanel-0",
|
|
2462
|
+
icon: /* @__PURE__ */ e(Ke, { sx: { mr: 8 } }),
|
|
2463
|
+
iconPosition: "start",
|
|
2464
|
+
id: "spend-details-tab-0",
|
|
2465
|
+
label: n.key_indicators_spend.title,
|
|
2466
|
+
sx: { minHeight: 44 }
|
|
2467
|
+
}
|
|
2468
|
+
),
|
|
2469
|
+
/* @__PURE__ */ e(
|
|
2470
|
+
pe,
|
|
2471
|
+
{
|
|
2472
|
+
"aria-controls": "save-details-tabpanel-1",
|
|
2473
|
+
icon: /* @__PURE__ */ e(fn, { sx: { mr: 8 } }),
|
|
2474
|
+
iconPosition: "start",
|
|
2475
|
+
id: "save-details-tab-1",
|
|
2476
|
+
label: n.key_indicators_save.title,
|
|
2477
|
+
sx: { minHeight: 44 }
|
|
2478
|
+
}
|
|
2479
|
+
),
|
|
2480
|
+
/* @__PURE__ */ e(
|
|
2481
|
+
pe,
|
|
2482
|
+
{
|
|
2483
|
+
"aria-controls": "borrow-details-tabpanel-2",
|
|
2484
|
+
icon: /* @__PURE__ */ e(xn, { sx: { mr: 8 } }),
|
|
2485
|
+
iconPosition: "start",
|
|
2486
|
+
id: "borrow-details-tab-2",
|
|
2487
|
+
label: n.key_indicators_borrow.title,
|
|
2488
|
+
sx: { minHeight: 44 }
|
|
2489
|
+
}
|
|
2490
|
+
)
|
|
2491
|
+
]
|
|
2492
|
+
}
|
|
2493
|
+
),
|
|
2494
|
+
/* @__PURE__ */ e(ue, { index: 0, name: "spend-details", value: t, children: /* @__PURE__ */ e(zr, {}) }),
|
|
2495
|
+
/* @__PURE__ */ e(ue, { index: 1, name: "save-details", value: t, children: /* @__PURE__ */ e(Gr, {}) }),
|
|
2496
|
+
/* @__PURE__ */ e(ue, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(Nr, {}) })
|
|
2497
|
+
] });
|
|
2498
|
+
}, jr = S(Kr), Yr = ({ onClick: t }) => {
|
|
2499
|
+
const { finstrong: r } = v(), { isCopyLoaded: n } = j();
|
|
2500
|
+
return n ? /* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
|
|
2501
|
+
/* @__PURE__ */ e(bt, { size: 48 }),
|
|
2502
|
+
/* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
|
|
2503
|
+
/* @__PURE__ */ e(N, { children: r.missing_data_title }),
|
|
2504
|
+
/* @__PURE__ */ e(k, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: r.missing_data_description })
|
|
2505
|
+
] }),
|
|
2506
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
2507
|
+
$,
|
|
2508
|
+
{
|
|
2509
|
+
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
2510
|
+
onClick: t,
|
|
2511
|
+
size: "small",
|
|
2512
|
+
sx: {
|
|
2513
|
+
fontSize: 13,
|
|
2514
|
+
":hover": {
|
|
2515
|
+
bgcolor: "transparent"
|
|
2516
|
+
}
|
|
2517
|
+
},
|
|
2518
|
+
variant: "text",
|
|
2519
|
+
children: r.connect_more_accounts_button
|
|
2520
|
+
}
|
|
2521
|
+
) })
|
|
2522
|
+
] }) : /* @__PURE__ */ e(J, {});
|
|
2523
|
+
}, Vr = S(Yr), Xr = {
|
|
2524
|
+
add_more_income: "Add More Income"
|
|
2525
|
+
}, qr = ({
|
|
2526
|
+
firstDay: t,
|
|
2527
|
+
frequency: r,
|
|
2528
|
+
secondDay: n,
|
|
2529
|
+
incomeTransactions: o,
|
|
2530
|
+
setCurrentStep: c,
|
|
2531
|
+
setFirstDay: a,
|
|
2532
|
+
setFrequency: s,
|
|
2533
|
+
setSecondDay: d,
|
|
2534
|
+
transaction: l
|
|
2535
|
+
}) => /* @__PURE__ */ i(m.Fragment, { children: [
|
|
2536
|
+
/* @__PURE__ */ i(u, { children: [
|
|
2537
|
+
!!o.length && /* @__PURE__ */ e(C, { sx: { pb: 24 }, children: o.reduce((p, h, _) => {
|
|
2538
|
+
if (h.guid === l.guid) return p;
|
|
2539
|
+
const b = Ne(_, o), f = Ft(_, o);
|
|
2540
|
+
return p.push(
|
|
2541
|
+
/* @__PURE__ */ i(m.Fragment, { children: [
|
|
2542
|
+
b && /* @__PURE__ */ e(Pt, { children: Ze(h.date) }),
|
|
2543
|
+
/* @__PURE__ */ e(Bt, { transaction: h }),
|
|
2544
|
+
/* @__PURE__ */ e(ne, { sx: { ml: f ? 44 : 0 } })
|
|
2545
|
+
] }, h.guid)
|
|
2546
|
+
), p;
|
|
2547
|
+
}, []) }),
|
|
1048
2548
|
/* @__PURE__ */ e(
|
|
1049
|
-
|
|
2549
|
+
fo,
|
|
2550
|
+
{
|
|
2551
|
+
firstDay: t,
|
|
2552
|
+
frequency: r,
|
|
2553
|
+
onFirstDayChange: a,
|
|
2554
|
+
onFrequencyChange: s,
|
|
2555
|
+
onSecondDayChange: d,
|
|
2556
|
+
secondDay: n,
|
|
2557
|
+
transaction: l
|
|
2558
|
+
}
|
|
2559
|
+
)
|
|
2560
|
+
] }),
|
|
2561
|
+
/* @__PURE__ */ e(C, { sx: { px: 24 }, children: /* @__PURE__ */ e(
|
|
2562
|
+
$,
|
|
2563
|
+
{
|
|
2564
|
+
fullWidth: !0,
|
|
2565
|
+
onClick: () => c({ step: O.MonthlyIncome, type: "main" }),
|
|
2566
|
+
startIcon: /* @__PURE__ */ e(ft, {}),
|
|
2567
|
+
children: Xr.add_more_income
|
|
2568
|
+
}
|
|
2569
|
+
) })
|
|
2570
|
+
] }), Ur = S(qr), Zr = {
|
|
2571
|
+
select_date: "Select Date"
|
|
2572
|
+
}, Qr = ({ selectedDate: t, setSelectedDate: r }) => {
|
|
2573
|
+
const n = E(), o = (c) => {
|
|
2574
|
+
r(Math.floor(new Date(c).getTime() / 1e3));
|
|
2575
|
+
};
|
|
2576
|
+
return /* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(Co, { dateAdapter: $t, children: /* @__PURE__ */ e(
|
|
2577
|
+
vo,
|
|
2578
|
+
{
|
|
2579
|
+
disableFuture: !0,
|
|
2580
|
+
label: Zr.select_date,
|
|
2581
|
+
onChange: o,
|
|
2582
|
+
slotProps: {
|
|
2583
|
+
nextIconButton: {
|
|
2584
|
+
sx: {
|
|
2585
|
+
color: "primary.main",
|
|
2586
|
+
"&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
|
|
2587
|
+
}
|
|
2588
|
+
},
|
|
2589
|
+
previousIconButton: {
|
|
2590
|
+
sx: {
|
|
2591
|
+
color: "primary.main",
|
|
2592
|
+
"&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
},
|
|
2596
|
+
sx: {
|
|
2597
|
+
width: "100%",
|
|
2598
|
+
"& .MuiIconButton-edgeEnd": {
|
|
2599
|
+
color: "primary.main",
|
|
2600
|
+
"&:hover": { bgcolor: fe(n.palette.primary.light, 0.1) }
|
|
2601
|
+
}
|
|
2602
|
+
},
|
|
2603
|
+
value: t ? new Date(t * 1e3) : null
|
|
2604
|
+
}
|
|
2605
|
+
) }) });
|
|
2606
|
+
}, Jr = S(Qr), ea = {
|
|
2607
|
+
credit_score: "Credit Score"
|
|
2608
|
+
}, ta = ({ creditScore: t, setCreditScore: r }) => {
|
|
2609
|
+
const n = !isNaN(t);
|
|
2610
|
+
return /* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
2611
|
+
Oe,
|
|
2612
|
+
{
|
|
2613
|
+
error: !n,
|
|
2614
|
+
fullWidth: !0,
|
|
2615
|
+
inputMode: "numeric",
|
|
2616
|
+
inputProps: {
|
|
2617
|
+
noValidate: !0,
|
|
2618
|
+
pattern: "[0-9]*"
|
|
2619
|
+
},
|
|
2620
|
+
label: ea.credit_score,
|
|
2621
|
+
onChange: (o) => r(Number(o.target.value)),
|
|
2622
|
+
value: n ? t : ""
|
|
2623
|
+
}
|
|
2624
|
+
) });
|
|
2625
|
+
}, na = S(ta), Yt = ({ value: t, completeCopy: r }) => /* @__PURE__ */ i(u, { sx: { gap: 8 }, children: [
|
|
2626
|
+
/* @__PURE__ */ e(u, { sx: { flexDirection: "row", gap: 4 }, children: Array.from({ length: 4 }).map((n, o) => /* @__PURE__ */ e(
|
|
2627
|
+
C,
|
|
2628
|
+
{
|
|
2629
|
+
sx: {
|
|
2630
|
+
bgcolor: o < t ? "primary.main" : "neutral.light",
|
|
2631
|
+
borderRadius: "24px",
|
|
2632
|
+
height: 4,
|
|
2633
|
+
width: "100%"
|
|
2634
|
+
}
|
|
2635
|
+
},
|
|
2636
|
+
o
|
|
2637
|
+
)) }),
|
|
2638
|
+
/* @__PURE__ */ i(I, { sx: { color: "text.secondary" }, variant: "body2", children: [
|
|
2639
|
+
t / 4 * 100,
|
|
2640
|
+
"% ",
|
|
2641
|
+
r
|
|
2642
|
+
] })
|
|
2643
|
+
] }), oa = ({
|
|
2644
|
+
completeCopy: t,
|
|
2645
|
+
primaryText: r,
|
|
2646
|
+
secondaryText: n,
|
|
2647
|
+
value: o
|
|
2648
|
+
}) => /* @__PURE__ */ i(u, { sx: { gap: 20, p: 24 }, children: [
|
|
2649
|
+
/* @__PURE__ */ i(u, { sx: { gap: 8 }, children: [
|
|
2650
|
+
/* @__PURE__ */ e(N, { children: r }),
|
|
2651
|
+
/* @__PURE__ */ e(k, { variant: "subtitle1", children: n })
|
|
2652
|
+
] }),
|
|
2653
|
+
/* @__PURE__ */ e(Yt, { completeCopy: t, value: o })
|
|
2654
|
+
] }), ht = {
|
|
2655
|
+
step: O.ConnectAccounts,
|
|
2656
|
+
type: "main"
|
|
2657
|
+
}, P = {
|
|
2658
|
+
add_accounts: "Add Accounts",
|
|
2659
|
+
add_income_primary: "What is your monthly income?",
|
|
2660
|
+
add_income_secondary: "Add your income so that we can accurately measure your financial strength.",
|
|
2661
|
+
add_more_income: "Add More Income",
|
|
2662
|
+
back: "Back",
|
|
2663
|
+
birthday_primary: "When is your birthday?",
|
|
2664
|
+
birthday_secondary: "Get the most helpful tips and see how you’re doing compared to others your age.",
|
|
2665
|
+
calculate_primary: "Calculating now ...",
|
|
2666
|
+
calculate_secondary: "We’re analyzing your financial data to calculate your FinStrong score. Hold tight!",
|
|
2667
|
+
confirm_income: "Confirm Income",
|
|
2668
|
+
connect_accounts: "Connect Accounts",
|
|
2669
|
+
connect_your_accounts_primary: "Connect Your Accounts",
|
|
2670
|
+
connect_your_accounts_secondary: "Connect all of your accounts to get the most accurate FinStrong score.",
|
|
2671
|
+
credit_score_primary: "What is your credit score?",
|
|
2672
|
+
credit_score_secondary: "Your ability to borrow money is a key part of your financial strength score.",
|
|
2673
|
+
do_it_later: "Do It Later",
|
|
2674
|
+
next: "Next"
|
|
2675
|
+
}, ra = ({ isOpen: t, onClose: r }) => {
|
|
2676
|
+
const { visibleAccounts: n } = Me(), { calculateHealthScore: o } = F(), { finstrong: c } = v(), { setSelectedAccounts: a } = j(), { addRepeatingTransaction: s, setDateRange: d } = Ve(), { filter: l, setFilter: p, transactions: h } = jn(), { user: _, userProfile: b, updateUser: f, updateUserProfile: w } = Q(), [y, D] = m.useState(_.credit_score || 0), [g, x] = m.useState(
|
|
2677
|
+
ht
|
|
2678
|
+
), [M, W] = m.useState(1), [G, H] = m.useState(Ot.EveryMonth), [T, V] = m.useState([]), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(_.birthday), [ce, he] = m.useState(15), [q, Je] = m.useState("");
|
|
2679
|
+
m.useEffect(() => {
|
|
2680
|
+
d({ start: Lt(dt()), end: Wt(dt()) });
|
|
2681
|
+
}, []), m.useEffect(() => {
|
|
2682
|
+
p({
|
|
2683
|
+
accounts: n.map((A) => A.guid),
|
|
2684
|
+
dateRange: {
|
|
2685
|
+
start: bo(/* @__PURE__ */ new Date(), 90),
|
|
2686
|
+
end: /* @__PURE__ */ new Date()
|
|
2687
|
+
},
|
|
2688
|
+
custom: pt
|
|
2689
|
+
}), a(n);
|
|
2690
|
+
}, [n]);
|
|
2691
|
+
const et = m.useMemo(
|
|
2692
|
+
() => h.find((A) => A.guid === q),
|
|
2693
|
+
[q, h]
|
|
2694
|
+
), Vt = m.useMemo(() => ({
|
|
2695
|
+
[O.ConnectAccounts]: !0,
|
|
2696
|
+
[O.MonthlyIncome]: !!q,
|
|
2697
|
+
[O.Birthday]: !!_.birthday || !!X,
|
|
2698
|
+
[O.CreditScore]: !!_.credit_score || !!y
|
|
2699
|
+
})[g.step], [y, g, X, q, _]), le = n.length > 0, Xt = m.useMemo(() => {
|
|
2700
|
+
const { step: A } = g;
|
|
2701
|
+
let R = 0;
|
|
2702
|
+
return A >= O.MonthlyIncome && le && R++, A >= O.Birthday && T.length && R++, A >= O.CreditScore && (_.birthday || _.credit_score) && R++, R;
|
|
2703
|
+
}, [g.step, le, T.length, _.birthday, _.credit_score]), qt = (A) => {
|
|
2704
|
+
p({
|
|
2705
|
+
...l,
|
|
2706
|
+
custom: (R) => A ? So(R, A) : pt(R)
|
|
2707
|
+
});
|
|
2708
|
+
}, Ut = {
|
|
2709
|
+
[O.ConnectAccounts]: {
|
|
2710
|
+
main: le ? /* @__PURE__ */ e(Nt, { shouldShowBalance: !1 }) : null,
|
|
2711
|
+
mainActionContent: le ? P.next : P.add_accounts,
|
|
2712
|
+
primaryText: P.connect_your_accounts_primary,
|
|
2713
|
+
secondaryText: P.connect_your_accounts_secondary
|
|
2714
|
+
},
|
|
2715
|
+
[O.MonthlyIncome]: {
|
|
2716
|
+
detail: /* @__PURE__ */ e(
|
|
2717
|
+
Ur,
|
|
2718
|
+
{
|
|
2719
|
+
firstDay: M,
|
|
2720
|
+
frequency: G,
|
|
2721
|
+
incomeTransactions: T,
|
|
2722
|
+
secondDay: ce,
|
|
2723
|
+
setCurrentStep: (A) => {
|
|
2724
|
+
x(A), V((R) => {
|
|
2725
|
+
if (R.some((de) => de.guid === q)) return R.filter((de) => de.guid !== q);
|
|
2726
|
+
const Ie = h.find((de) => de.guid === q);
|
|
2727
|
+
return Ie ? [...R, { ...Ie, firstDay: M, frequency: G, secondDay: ce }] : R;
|
|
2728
|
+
});
|
|
2729
|
+
},
|
|
2730
|
+
setFirstDay: W,
|
|
2731
|
+
setFrequency: H,
|
|
2732
|
+
setSecondDay: he,
|
|
2733
|
+
transaction: et
|
|
2734
|
+
}
|
|
2735
|
+
),
|
|
2736
|
+
detailActionContent: P.confirm_income,
|
|
2737
|
+
main: /* @__PURE__ */ e(
|
|
2738
|
+
xo,
|
|
2739
|
+
{
|
|
2740
|
+
onSearch: qt,
|
|
2741
|
+
onSelected: (A) => {
|
|
2742
|
+
x({ step: O.MonthlyIncome, type: "detail" }), Je(A);
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
),
|
|
2746
|
+
mainActionContent: P.confirm_income,
|
|
2747
|
+
primaryText: P.add_income_primary,
|
|
2748
|
+
secondaryText: P.add_income_secondary
|
|
2749
|
+
},
|
|
2750
|
+
[O.Birthday]: {
|
|
2751
|
+
main: /* @__PURE__ */ e(Jr, { selectedDate: X, setSelectedDate: se }),
|
|
2752
|
+
mainActionContent: P.next,
|
|
2753
|
+
primaryText: P.birthday_primary,
|
|
2754
|
+
secondaryText: P.birthday_secondary
|
|
2755
|
+
},
|
|
2756
|
+
[O.CreditScore]: {
|
|
2757
|
+
main: /* @__PURE__ */ e(na, { creditScore: y, setCreditScore: D }),
|
|
2758
|
+
mainActionContent: P.next,
|
|
2759
|
+
primaryText: P.credit_score_primary,
|
|
2760
|
+
secondaryText: P.credit_score_secondary
|
|
2761
|
+
}
|
|
2762
|
+
}, tt = () => {
|
|
2763
|
+
x(ht), ae(!1), Je(""), r();
|
|
2764
|
+
}, nt = async () => {
|
|
2765
|
+
ae(!0), await en(T), await o(), await w({ ...b, has_completed_finstrong_onboarding: !0 }), tt();
|
|
2766
|
+
}, Zt = () => {
|
|
2767
|
+
if (g.step === O.CreditScore) {
|
|
2768
|
+
nt();
|
|
2769
|
+
return;
|
|
2770
|
+
}
|
|
2771
|
+
x({ step: g.step + 1, type: "main" });
|
|
2772
|
+
}, Qt = () => {
|
|
2773
|
+
const { step: A } = g, R = A + 1;
|
|
2774
|
+
switch (A) {
|
|
2775
|
+
case O.Birthday:
|
|
2776
|
+
X && X !== _.birthday && f({ ..._, birthday: X });
|
|
2777
|
+
break;
|
|
2778
|
+
case O.CreditScore:
|
|
2779
|
+
y && y !== _.credit_score && f({ ..._, credit_score: y }), nt();
|
|
2780
|
+
return;
|
|
2781
|
+
case O.MonthlyIncome:
|
|
2782
|
+
q && T.findIndex(({ guid: ge }) => ge === q) === -1 && V((ge) => [
|
|
2783
|
+
...ge,
|
|
2784
|
+
{ ...et, firstDay: M, frequency: G, secondDay: ce }
|
|
2785
|
+
]);
|
|
2786
|
+
break;
|
|
2787
|
+
case O.ConnectAccounts:
|
|
2788
|
+
if (!le) {
|
|
2789
|
+
ie(!0);
|
|
2790
|
+
return;
|
|
2791
|
+
}
|
|
2792
|
+
break;
|
|
2793
|
+
}
|
|
2794
|
+
R in O && x({ step: R, type: "main" });
|
|
2795
|
+
}, Jt = () => {
|
|
2796
|
+
const { step: A, type: R } = g;
|
|
2797
|
+
if (R === "detail") {
|
|
2798
|
+
x({ step: A, type: "main" });
|
|
2799
|
+
return;
|
|
2800
|
+
}
|
|
2801
|
+
if (A === O.Birthday && T.length) {
|
|
2802
|
+
x({ step: A - 1, type: "detail" });
|
|
2803
|
+
return;
|
|
2804
|
+
}
|
|
2805
|
+
A > O.ConnectAccounts && x({ step: A - 1, type: "main" });
|
|
2806
|
+
}, en = async (A) => {
|
|
2807
|
+
for (const R of A) {
|
|
2808
|
+
const {
|
|
2809
|
+
account_guid: ge,
|
|
2810
|
+
amount: Ie,
|
|
2811
|
+
date: de,
|
|
2812
|
+
description: on,
|
|
2813
|
+
feed_description: rn,
|
|
2814
|
+
firstDay: an,
|
|
2815
|
+
frequency: ot,
|
|
2816
|
+
secondDay: sn,
|
|
2817
|
+
merchant_guid: cn,
|
|
2818
|
+
payee: ln,
|
|
2819
|
+
transaction_type: dn
|
|
2820
|
+
} = R, pn = Jn(ot, yo(de)), un = {
|
|
2821
|
+
account_guid: ge,
|
|
2822
|
+
amount: Ie,
|
|
2823
|
+
created_by: 0,
|
|
2824
|
+
description: ln || on || rn,
|
|
2825
|
+
merchant_guid: cn,
|
|
2826
|
+
predicted_occurs_on: go(pn, { representation: "date" }),
|
|
2827
|
+
recurrence_day: an,
|
|
2828
|
+
recurrence_type: ot,
|
|
2829
|
+
repeating_transaction_type: Rt.Income,
|
|
2830
|
+
second_recurrence_day: sn,
|
|
2831
|
+
transaction_type: dn,
|
|
2832
|
+
user_guid: _.guid
|
|
2833
|
+
};
|
|
2834
|
+
await s(un, R);
|
|
2835
|
+
}
|
|
2836
|
+
}, me = Ut[g.step], De = g.step === O.ConnectAccounts, tn = {
|
|
2837
|
+
fullWidth: !0,
|
|
2838
|
+
...De && !le && { startIcon: /* @__PURE__ */ e(ft, {}) }
|
|
2839
|
+
}, nn = !De || De && !le;
|
|
2840
|
+
return /* @__PURE__ */ i(m.Fragment, { children: [
|
|
2841
|
+
/* @__PURE__ */ i(
|
|
2842
|
+
te,
|
|
1050
2843
|
{
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
2844
|
+
footerStyles: { px: 24, py: 16 },
|
|
2845
|
+
hasSecondaryAction: !De,
|
|
2846
|
+
isOpen: t,
|
|
2847
|
+
isPrimaryDisabled: !Vt,
|
|
2848
|
+
onClose: tt,
|
|
2849
|
+
onSecondaryAction: Jt,
|
|
2850
|
+
primaryButtonProps: tn,
|
|
2851
|
+
primaryText: me?.mainActionContent,
|
|
2852
|
+
secondaryColor: "primary",
|
|
2853
|
+
secondaryText: P.back,
|
|
2854
|
+
title: c.title,
|
|
2855
|
+
...!re && { onPrimaryAction: Qt },
|
|
2856
|
+
children: [
|
|
2857
|
+
re && /* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 24, position: "relative", px: 16, top: 126 }, children: [
|
|
2858
|
+
/* @__PURE__ */ e(Pe, { children: P.calculate_primary }),
|
|
2859
|
+
/* @__PURE__ */ e(k, { sx: { textAlign: "center" }, variant: "subtitle1", children: P.calculate_secondary })
|
|
2860
|
+
] }),
|
|
2861
|
+
me && !re && /* @__PURE__ */ i(m.Fragment, { children: [
|
|
2862
|
+
/* @__PURE__ */ e(
|
|
2863
|
+
oa,
|
|
2864
|
+
{
|
|
2865
|
+
completeCopy: c.complete,
|
|
2866
|
+
primaryText: me.primaryText,
|
|
2867
|
+
secondaryText: me.secondaryText,
|
|
2868
|
+
value: Xt
|
|
2869
|
+
}
|
|
2870
|
+
),
|
|
2871
|
+
g.type === "main" && /* @__PURE__ */ i(C, { children: [
|
|
2872
|
+
me.main,
|
|
2873
|
+
nn && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e($, { fullWidth: !0, onClick: Zt, children: P.do_it_later }) })
|
|
2874
|
+
] }),
|
|
2875
|
+
g.type === "detail" && me.detail
|
|
2876
|
+
] })
|
|
2877
|
+
]
|
|
1055
2878
|
}
|
|
1056
2879
|
),
|
|
1057
2880
|
/* @__PURE__ */ e(
|
|
1058
|
-
|
|
2881
|
+
oe,
|
|
1059
2882
|
{
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
title: r.title
|
|
2883
|
+
onClose: () => ie(!1),
|
|
2884
|
+
showConnectWidget: Ce,
|
|
2885
|
+
title: P.connect_accounts
|
|
1064
2886
|
}
|
|
1065
2887
|
)
|
|
1066
2888
|
] });
|
|
1067
|
-
},
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
2889
|
+
}, aa = S(ra), Ge = {
|
|
2890
|
+
onboarding_title: "Financial Strength Starts Here",
|
|
2891
|
+
onboarding_subtitle: "By analyzing your spending and saving, FinStrong provides a score and guidance to help you improve your financial habits.",
|
|
2892
|
+
get_started: "Get Started"
|
|
2893
|
+
}, ia = () => {
|
|
2894
|
+
const [t, r] = m.useState(!1);
|
|
2895
|
+
return /* @__PURE__ */ i(m.Fragment, { children: [
|
|
2896
|
+
/* @__PURE__ */ i(
|
|
2897
|
+
u,
|
|
1072
2898
|
{
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
2899
|
+
sx: {
|
|
2900
|
+
alignItems: "center",
|
|
2901
|
+
gap: 48,
|
|
2902
|
+
pb: 24,
|
|
2903
|
+
pt: 72,
|
|
2904
|
+
px: 16
|
|
2905
|
+
},
|
|
1080
2906
|
children: [
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
|
|
1083
|
-
{
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
sx: { minHeight: 44 }
|
|
1090
|
-
}
|
|
1091
|
-
),
|
|
1092
|
-
/* @__PURE__ */ e(
|
|
1093
|
-
oe,
|
|
1094
|
-
{
|
|
1095
|
-
"aria-controls": "save-details-tabpanel-1",
|
|
1096
|
-
icon: /* @__PURE__ */ e(Ge, { sx: { mr: 8 } }),
|
|
1097
|
-
iconPosition: "start",
|
|
1098
|
-
id: "save-details-tab-1",
|
|
1099
|
-
label: t.key_indicators_save.title,
|
|
1100
|
-
sx: { minHeight: 44 }
|
|
1101
|
-
}
|
|
1102
|
-
),
|
|
1103
|
-
/* @__PURE__ */ e(
|
|
1104
|
-
oe,
|
|
1105
|
-
{
|
|
1106
|
-
"aria-controls": "borrow-details-tabpanel-2",
|
|
1107
|
-
icon: /* @__PURE__ */ e(Le, { sx: { mr: 8 } }),
|
|
1108
|
-
iconPosition: "start",
|
|
1109
|
-
id: "borrow-details-tab-2",
|
|
1110
|
-
label: t.key_indicators_borrow.title,
|
|
1111
|
-
sx: { minHeight: 44 }
|
|
1112
|
-
}
|
|
1113
|
-
)
|
|
2907
|
+
/* @__PURE__ */ i(u, { sx: { alignItems: { sm: "center" }, gap: 24, width: "100%" }, children: [
|
|
2908
|
+
/* @__PURE__ */ e(C, { sx: { textAlign: "center" }, children: /* @__PURE__ */ e(Sn, { size: 72 }) }),
|
|
2909
|
+
/* @__PURE__ */ i(u, { sx: { gap: 4, textAlign: "center", width: { sm: 400 } }, children: [
|
|
2910
|
+
/* @__PURE__ */ e(Pe, { children: Ge.onboarding_title }),
|
|
2911
|
+
/* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle1", children: Ge.onboarding_subtitle })
|
|
2912
|
+
] })
|
|
2913
|
+
] }),
|
|
2914
|
+
/* @__PURE__ */ e($, { onClick: () => r(!0), variant: "contained", children: Ge.get_started })
|
|
1114
2915
|
]
|
|
1115
2916
|
}
|
|
1116
2917
|
),
|
|
1117
|
-
/* @__PURE__ */ e(
|
|
1118
|
-
/* @__PURE__ */ e(ne, { index: 1, name: "save-details", value: n, children: /* @__PURE__ */ e(wt, {}) }),
|
|
1119
|
-
/* @__PURE__ */ e(ne, { index: 2, name: "borrow-details", value: n, children: /* @__PURE__ */ e(Rt, {}) })
|
|
2918
|
+
/* @__PURE__ */ e(aa, { isOpen: t, onClose: () => r(!1) })
|
|
1120
2919
|
] });
|
|
1121
|
-
},
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
})
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
2920
|
+
}, sa = ({ isOpen: t, onClose: r }) => {
|
|
2921
|
+
const { finstrong: n } = v(), o = E(), { updateUser: c, user: a } = Q(), [s, d] = m.useState(a.birthday), l = (h) => {
|
|
2922
|
+
d(Math.floor(new Date(h).getTime() / 1e3));
|
|
2923
|
+
};
|
|
2924
|
+
return /* @__PURE__ */ e(
|
|
2925
|
+
te,
|
|
2926
|
+
{
|
|
2927
|
+
isOpen: t,
|
|
2928
|
+
onClose: r,
|
|
2929
|
+
onPrimaryAction: () => {
|
|
2930
|
+
!s || s === a.birthday || (c({ ...a, birthday: s }), r());
|
|
2931
|
+
},
|
|
2932
|
+
onSecondaryAction: r,
|
|
2933
|
+
title: n.date_of_birth,
|
|
2934
|
+
children: /* @__PURE__ */ e(Mo, { dateAdapter: $t, children: /* @__PURE__ */ e(
|
|
2935
|
+
wo,
|
|
2936
|
+
{
|
|
2937
|
+
disableFuture: !0,
|
|
2938
|
+
onChange: l,
|
|
2939
|
+
slotProps: {
|
|
2940
|
+
nextIconButton: {
|
|
2941
|
+
sx: {
|
|
2942
|
+
color: "primary.main",
|
|
2943
|
+
"&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
|
|
2944
|
+
}
|
|
2945
|
+
},
|
|
2946
|
+
previousIconButton: {
|
|
2947
|
+
sx: {
|
|
2948
|
+
color: "primary.main",
|
|
2949
|
+
"&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
},
|
|
2953
|
+
slots: {
|
|
2954
|
+
actionBar: () => null,
|
|
2955
|
+
toolbar: () => null
|
|
2956
|
+
},
|
|
2957
|
+
sx: {
|
|
2958
|
+
width: "100%",
|
|
2959
|
+
"& .MuiIconButton-edgeEnd": {
|
|
2960
|
+
color: "primary.main",
|
|
2961
|
+
"&:hover": { bgcolor: fe(o.palette.primary.light, 0.1) }
|
|
2962
|
+
}
|
|
2963
|
+
},
|
|
2964
|
+
value: s ? new Date(s * 1e3) : /* @__PURE__ */ new Date()
|
|
2965
|
+
}
|
|
2966
|
+
) })
|
|
2967
|
+
}
|
|
2968
|
+
);
|
|
2969
|
+
}, ca = S(sa), la = ({ isOpen: t, onClose: r }) => {
|
|
2970
|
+
const { visibleFinstrongAccounts: n } = Me(), {
|
|
2971
|
+
accounts: o,
|
|
2972
|
+
common: c,
|
|
2973
|
+
finstrong: a
|
|
2974
|
+
} = v(), { repeatingTransactions: s } = Ve(), { user: d } = Q(), l = s.reduce((f, w) => {
|
|
2975
|
+
const { repeating_transaction_type: y, transactions: D, recurrence_type: g, amount: x } = w;
|
|
2976
|
+
return y === Rt.Income && (D.length > 0 || g === Ot.EveryYear) ? f + x : f;
|
|
2977
|
+
}, 0), [p, h] = m.useState(null), b = [
|
|
2978
|
+
{
|
|
2979
|
+
dynamicCopy: a.add_profile_item,
|
|
2980
|
+
fallbackLabel: a.monthly_income,
|
|
2981
|
+
icon: /* @__PURE__ */ e(Cn, {}),
|
|
2982
|
+
key: ee.MonthlyIncome,
|
|
2983
|
+
label: a.monthly_income,
|
|
2984
|
+
value: l
|
|
2985
|
+
},
|
|
2986
|
+
{
|
|
2987
|
+
dynamicCopy: a.add_profile_item,
|
|
2988
|
+
fallbackLabel: a.date_of_birth,
|
|
2989
|
+
icon: /* @__PURE__ */ e(vn, {}),
|
|
2990
|
+
key: ee.DateOfBirth,
|
|
2991
|
+
label: a.date_of_birth,
|
|
2992
|
+
value: d.birthday
|
|
2993
|
+
},
|
|
2994
|
+
{
|
|
2995
|
+
dynamicCopy: a.add_profile_item,
|
|
2996
|
+
fallbackLabel: a.credit_score,
|
|
2997
|
+
icon: /* @__PURE__ */ e(Ke, {}),
|
|
2998
|
+
key: ee.CreditScore,
|
|
2999
|
+
label: a.credit_score,
|
|
3000
|
+
value: d.credit_score
|
|
3001
|
+
},
|
|
3002
|
+
{
|
|
3003
|
+
fallbackLabel: a.connect_your_accounts,
|
|
3004
|
+
icon: /* @__PURE__ */ e(yt, {}),
|
|
3005
|
+
key: ee.Connections,
|
|
3006
|
+
label: a.connections,
|
|
3007
|
+
value: n.length > 0 ? Y(
|
|
3008
|
+
a.connected_account,
|
|
3009
|
+
String(n.length),
|
|
3010
|
+
n.length > 1 ? a.accounts : a.account
|
|
3011
|
+
) : void 0
|
|
3012
|
+
}
|
|
3013
|
+
].map((f) => En(f));
|
|
3014
|
+
return /* @__PURE__ */ i(te, { isOpen: t, onClose: r, title: a.financial_profile, children: [
|
|
3015
|
+
/* @__PURE__ */ i(u, { sx: { gap: 20, p: 24 }, children: [
|
|
3016
|
+
/* @__PURE__ */ i(u, { sx: { gap: 8 }, children: [
|
|
3017
|
+
/* @__PURE__ */ e(N, { children: a.your_financial_profile }),
|
|
3018
|
+
/* @__PURE__ */ e(k, { children: a.financial_profile_description })
|
|
3019
|
+
] }),
|
|
3020
|
+
/* @__PURE__ */ e(
|
|
3021
|
+
Yt,
|
|
3022
|
+
{
|
|
3023
|
+
completeCopy: a.complete,
|
|
3024
|
+
value: b.reduce((f, w) => f + (w.isComplete ? 1 : 0), 0)
|
|
3025
|
+
}
|
|
3026
|
+
)
|
|
1137
3027
|
] }),
|
|
1138
|
-
|
|
1139
|
-
|
|
3028
|
+
/* @__PURE__ */ e(Gn, { list: b, onClickItem: h }),
|
|
3029
|
+
/* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
3030
|
+
Be,
|
|
1140
3031
|
{
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
3032
|
+
description: a.connect_more_accounts_to_view_more_accurate_financial_picture,
|
|
3033
|
+
drawerType: "connectDrawer",
|
|
3034
|
+
isDashboard: !0,
|
|
3035
|
+
title: a.dont_see_all_your_accounts,
|
|
3036
|
+
titleDrawer: c.add_accounts
|
|
3037
|
+
}
|
|
3038
|
+
) }),
|
|
3039
|
+
/* @__PURE__ */ e(
|
|
3040
|
+
te,
|
|
3041
|
+
{
|
|
3042
|
+
isOpen: p === ee.MonthlyIncome,
|
|
3043
|
+
onClose: () => h(null),
|
|
3044
|
+
title: c.settings,
|
|
3045
|
+
children: /* @__PURE__ */ e(ko, {})
|
|
1147
3046
|
}
|
|
1148
3047
|
),
|
|
1149
|
-
|
|
1150
|
-
/* @__PURE__ */ e(
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
})
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
3048
|
+
/* @__PURE__ */ e(ca, { isOpen: p === ee.DateOfBirth, onClose: () => h(null) }),
|
|
3049
|
+
/* @__PURE__ */ e(Gt, { isOpen: p === ee.CreditScore, onClose: () => h(null) }),
|
|
3050
|
+
/* @__PURE__ */ e(
|
|
3051
|
+
Mt,
|
|
3052
|
+
{
|
|
3053
|
+
onClose: () => h(null),
|
|
3054
|
+
showConnectionsWidget: p === ee.Connections,
|
|
3055
|
+
title: o.manage_connections
|
|
3056
|
+
}
|
|
3057
|
+
)
|
|
3058
|
+
] });
|
|
3059
|
+
}, da = S(la), mt = ({
|
|
3060
|
+
content: t,
|
|
3061
|
+
islast: r = !1
|
|
3062
|
+
}) => /* @__PURE__ */ i(Ao, { sx: { minHeight: 0 }, children: [
|
|
3063
|
+
/* @__PURE__ */ i(Po, { children: [
|
|
3064
|
+
/* @__PURE__ */ e(Fo, { sx: { bgcolor: "divider", borderWidth: 1, p: 3 } }),
|
|
3065
|
+
!r && /* @__PURE__ */ e(Oo, { sx: { bgcolor: "divider", width: 0.1 } })
|
|
1163
3066
|
] }),
|
|
1164
|
-
/* @__PURE__ */ e(
|
|
1165
|
-
] }),
|
|
1166
|
-
const { finstrong:
|
|
1167
|
-
health_score_point_difference:
|
|
1168
|
-
newer_credit_score:
|
|
1169
|
-
older_credit_score:
|
|
3067
|
+
/* @__PURE__ */ e(Ro, { sx: { pb: 16, pl: 12, pr: 0, pt: 5 }, children: /* @__PURE__ */ e(k, { fontSize: 13, fontWeight: 400, variant: "subtitle2", children: t }) })
|
|
3068
|
+
] }), pa = ({ report: t }) => {
|
|
3069
|
+
const { finstrong: r } = v(), { score_history_drawer_timeline: n } = r, {
|
|
3070
|
+
health_score_point_difference: o,
|
|
3071
|
+
newer_credit_score: c,
|
|
3072
|
+
older_credit_score: a,
|
|
1170
3073
|
older_spend_to_income_ratio: s,
|
|
1171
|
-
newer_spend_to_income_ratio:
|
|
1172
|
-
older_health_score:
|
|
1173
|
-
newer_health_score:
|
|
1174
|
-
newer_score_calculated_at:
|
|
1175
|
-
} =
|
|
1176
|
-
if (
|
|
1177
|
-
const
|
|
1178
|
-
return /* @__PURE__ */
|
|
3074
|
+
newer_spend_to_income_ratio: d,
|
|
3075
|
+
older_health_score: l,
|
|
3076
|
+
newer_health_score: p,
|
|
3077
|
+
newer_score_calculated_at: h
|
|
3078
|
+
} = t, _ = Do(new Date(h), "MMM d"), b = () => o === 0 ? "info.lighter" : o > 0 ? "success.lighter" : "error.lighter", f = () => o === 0 ? Y(n.stayed_at, l) : o > 0 ? n.less_spending : n.more_spending, w = () => {
|
|
3079
|
+
if (o === 0) return null;
|
|
3080
|
+
const y = o > 0 ? n.up_from : n.down_from, D = Y(y, l, p);
|
|
3081
|
+
return /* @__PURE__ */ i(z, { children: [
|
|
1179
3082
|
/* @__PURE__ */ e(
|
|
1180
|
-
|
|
3083
|
+
Mn,
|
|
1181
3084
|
{
|
|
1182
3085
|
fill: !0,
|
|
1183
3086
|
name: "circle",
|
|
1184
3087
|
sx: { color: "text.secondary", fontSize: 8, mx: 4, p: 1 }
|
|
1185
3088
|
}
|
|
1186
3089
|
),
|
|
1187
|
-
|
|
3090
|
+
D
|
|
1188
3091
|
] });
|
|
1189
3092
|
};
|
|
1190
|
-
return /* @__PURE__ */ e(
|
|
1191
|
-
/* @__PURE__ */ e(
|
|
1192
|
-
|
|
3093
|
+
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ i(u, { sx: { backgroundColor: "background.paper" }, children: [
|
|
3094
|
+
/* @__PURE__ */ e(C, { sx: { borderBottom: "1px solid", borderBottomColor: "divider", p: 16 }, children: /* @__PURE__ */ i(
|
|
3095
|
+
u,
|
|
1193
3096
|
{
|
|
1194
3097
|
flexDirection: "row",
|
|
1195
3098
|
sx: { alignItems: "center", gap: 16, height: 48, width: "100%" },
|
|
1196
3099
|
children: [
|
|
1197
3100
|
/* @__PURE__ */ e(
|
|
1198
|
-
|
|
3101
|
+
u,
|
|
1199
3102
|
{
|
|
1200
3103
|
sx: {
|
|
1201
3104
|
alignItems: "center",
|
|
1202
|
-
backgroundColor:
|
|
3105
|
+
backgroundColor: b(),
|
|
1203
3106
|
borderRadius: 999,
|
|
1204
3107
|
height: 48,
|
|
1205
3108
|
justifyContent: "center",
|
|
1206
3109
|
minWidth: 48
|
|
1207
3110
|
},
|
|
1208
|
-
children: /* @__PURE__ */ e(
|
|
3111
|
+
children: /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: "Body", children: o > 0 ? `+${o}` : o })
|
|
1209
3112
|
}
|
|
1210
3113
|
),
|
|
1211
|
-
/* @__PURE__ */ u
|
|
1212
|
-
/* @__PURE__ */ e(
|
|
1213
|
-
/* @__PURE__ */
|
|
1214
|
-
|
|
3114
|
+
/* @__PURE__ */ i(u, { sx: { gap: 2, width: "80%" }, children: [
|
|
3115
|
+
/* @__PURE__ */ e(I, { fontWeight: 600, variant: "Body", children: f() }),
|
|
3116
|
+
/* @__PURE__ */ i(I, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
|
|
3117
|
+
_,
|
|
1215
3118
|
" ",
|
|
1216
|
-
|
|
3119
|
+
w()
|
|
1217
3120
|
] })
|
|
1218
3121
|
] })
|
|
1219
3122
|
]
|
|
1220
3123
|
}
|
|
1221
3124
|
) }),
|
|
1222
|
-
|
|
1223
|
-
|
|
3125
|
+
o !== 0 && /* @__PURE__ */ e(C, { sx: { color: "text.secondary", pb: 8, pl: 32, pr: 16, pt: 12 }, children: /* @__PURE__ */ i(
|
|
3126
|
+
Io,
|
|
1224
3127
|
{
|
|
1225
3128
|
sx: {
|
|
1226
|
-
[`& .${
|
|
3129
|
+
[`& .${To.root}:before`]: {
|
|
1227
3130
|
flex: 0,
|
|
1228
3131
|
padding: 0
|
|
1229
3132
|
},
|
|
@@ -1232,22 +3135,22 @@ const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor
|
|
|
1232
3135
|
},
|
|
1233
3136
|
children: [
|
|
1234
3137
|
/* @__PURE__ */ e(
|
|
1235
|
-
|
|
3138
|
+
mt,
|
|
1236
3139
|
{
|
|
1237
|
-
content:
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
3140
|
+
content: Y(
|
|
3141
|
+
n.spend_to_income_description,
|
|
3142
|
+
Te(s),
|
|
3143
|
+
Te(d)
|
|
1241
3144
|
)
|
|
1242
3145
|
}
|
|
1243
3146
|
),
|
|
1244
3147
|
/* @__PURE__ */ e(
|
|
1245
|
-
|
|
3148
|
+
mt,
|
|
1246
3149
|
{
|
|
1247
|
-
content:
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
3150
|
+
content: Y(
|
|
3151
|
+
n.credit_score_description,
|
|
3152
|
+
a,
|
|
3153
|
+
c
|
|
1251
3154
|
),
|
|
1252
3155
|
islast: !0
|
|
1253
3156
|
}
|
|
@@ -1256,205 +3159,427 @@ const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor
|
|
|
1256
3159
|
}
|
|
1257
3160
|
) })
|
|
1258
3161
|
] }) });
|
|
1259
|
-
},
|
|
1260
|
-
const
|
|
1261
|
-
if (!
|
|
1262
|
-
const
|
|
3162
|
+
}, ua = S(pa), _a = ({ isOpen: t, onClose: r }) => {
|
|
3163
|
+
const n = E(), { finstrong: o } = v(), { isCopyLoaded: c, isInitialized: a } = j(), { healthScore: s, healthScoreChangeReports: d, augmentedChartData: l } = F();
|
|
3164
|
+
if (!c || !a) return /* @__PURE__ */ e(J, {});
|
|
3165
|
+
const p = je(s.health_score || 0, o), h = d.slice().reverse();
|
|
1263
3166
|
return /* @__PURE__ */ e(
|
|
1264
|
-
|
|
3167
|
+
Ht,
|
|
1265
3168
|
{
|
|
1266
|
-
additionalContent: /* @__PURE__ */ e(
|
|
1267
|
-
|
|
3169
|
+
additionalContent: /* @__PURE__ */ e(u, { sx: { pl: 18, backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(
|
|
3170
|
+
Xe,
|
|
1268
3171
|
{
|
|
1269
|
-
axisColor:
|
|
3172
|
+
axisColor: n.palette.divider,
|
|
1270
3173
|
baseline: "min",
|
|
1271
|
-
colors: [
|
|
3174
|
+
colors: [n.palette.primary.main],
|
|
1272
3175
|
curveType: "natural",
|
|
1273
|
-
datasets: [
|
|
3176
|
+
datasets: [l],
|
|
1274
3177
|
height: 160,
|
|
1275
|
-
labels: [
|
|
3178
|
+
labels: [o.key_indicators_label],
|
|
1276
3179
|
margin: { top: 12, left: 24 },
|
|
1277
3180
|
showArea: !0,
|
|
1278
3181
|
showAverage: !0,
|
|
1279
|
-
title:
|
|
3182
|
+
title: o.peer_average,
|
|
1280
3183
|
useCustomMark: !0
|
|
1281
3184
|
}
|
|
1282
3185
|
) }),
|
|
1283
|
-
drawerTitle:
|
|
1284
|
-
isOpen:
|
|
3186
|
+
drawerTitle: o.score_history,
|
|
3187
|
+
isOpen: t,
|
|
1285
3188
|
loadConnectAccountsCard: !1,
|
|
1286
|
-
onClose:
|
|
1287
|
-
stickyComponent: /* @__PURE__ */
|
|
1288
|
-
|
|
3189
|
+
onClose: r,
|
|
3190
|
+
stickyComponent: /* @__PURE__ */ i(
|
|
3191
|
+
u,
|
|
1289
3192
|
{
|
|
1290
3193
|
direction: "row",
|
|
1291
3194
|
sx: { backgroundColor: "background.paper", gap: 16, pb: 12, pt: 8, px: 24 },
|
|
1292
3195
|
children: [
|
|
1293
|
-
/* @__PURE__ */ e(
|
|
1294
|
-
|
|
3196
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
3197
|
+
Et,
|
|
1295
3198
|
{
|
|
1296
3199
|
arcRadius: 20,
|
|
1297
3200
|
healthScore: s?.health_score,
|
|
1298
3201
|
size: "SM"
|
|
1299
3202
|
}
|
|
1300
3203
|
) }),
|
|
1301
|
-
/* @__PURE__ */
|
|
1302
|
-
/* @__PURE__ */ e(
|
|
1303
|
-
/* @__PURE__ */ e(
|
|
3204
|
+
/* @__PURE__ */ i(C, { children: [
|
|
3205
|
+
/* @__PURE__ */ e(k, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children: p.status }),
|
|
3206
|
+
/* @__PURE__ */ e(k, { variant: "caption", children: p.description })
|
|
1304
3207
|
] })
|
|
1305
3208
|
]
|
|
1306
3209
|
}
|
|
1307
3210
|
),
|
|
1308
|
-
children: /* @__PURE__ */ e(
|
|
3211
|
+
children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: h.map((_, b) => /* @__PURE__ */ e(ua, { report: _ }, b)) })
|
|
1309
3212
|
}
|
|
1310
3213
|
);
|
|
1311
|
-
},
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
3214
|
+
}, ha = S(_a), ma = ({ copy: t }) => {
|
|
3215
|
+
const r = E(), n = [
|
|
3216
|
+
r.palette.chartMono.chartMono5,
|
|
3217
|
+
r.palette.chartMono.chartMono4,
|
|
3218
|
+
r.palette.chartMono.chartMono3,
|
|
3219
|
+
r.palette.chartMono.chartMono2
|
|
3220
|
+
];
|
|
3221
|
+
return /* @__PURE__ */ i(u, { sx: { gap: 8 }, children: [
|
|
3222
|
+
/* @__PURE__ */ e(u, { sx: { flexDirection: "row", gap: 8, px: 2 }, children: [
|
|
3223
|
+
{ color: "chartMono.chartMono2", text: t.vulnerable, value: "0-25" },
|
|
3224
|
+
{ color: "chartMono.chartMono3", text: t.building, value: "26-50" },
|
|
3225
|
+
{ color: "chartMono.chartMono4", text: t.stable, value: "51-75" },
|
|
3226
|
+
{ color: "chartMono.chartMono5", text: t.strong, value: "76-100" }
|
|
3227
|
+
].map(({ color: o, text: c, value: a }) => /* @__PURE__ */ i(u, { sx: { gap: 4, textAlign: "center", width: "100%" }, children: [
|
|
3228
|
+
/* @__PURE__ */ i(C, { children: [
|
|
3229
|
+
/* @__PURE__ */ e(k, { sx: { fontWeight: 700, textTransform: "uppercase" }, variant: "caption", children: c }),
|
|
3230
|
+
/* @__PURE__ */ i(I, { sx: { color: "text.secondary" }, variant: "caption", children: [
|
|
3231
|
+
"(",
|
|
3232
|
+
a,
|
|
3233
|
+
")"
|
|
3234
|
+
] })
|
|
3235
|
+
] }),
|
|
3236
|
+
/* @__PURE__ */ e(C, { sx: { border: "2px solid", borderColor: o, borderRadius: "3px" } })
|
|
3237
|
+
] }, c)) }),
|
|
3238
|
+
/* @__PURE__ */ i(C, { children: [
|
|
3239
|
+
/* @__PURE__ */ e(
|
|
3240
|
+
C,
|
|
3241
|
+
{
|
|
3242
|
+
sx: {
|
|
3243
|
+
background: `linear-gradient(to left, ${n.join(", ")})`,
|
|
3244
|
+
borderRadius: "4px",
|
|
3245
|
+
height: 16
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
),
|
|
3249
|
+
/* @__PURE__ */ e(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100].map((o) => /* @__PURE__ */ i(
|
|
3250
|
+
u,
|
|
3251
|
+
{
|
|
3252
|
+
sx: { alignItems: "center", height: 20, justifyContent: "space-between", width: 24 },
|
|
3253
|
+
children: [
|
|
3254
|
+
/* @__PURE__ */ e(
|
|
3255
|
+
C,
|
|
3256
|
+
{
|
|
3257
|
+
sx: {
|
|
3258
|
+
borderBottom: "1px solid",
|
|
3259
|
+
borderColor: "divider",
|
|
3260
|
+
position: "relative",
|
|
3261
|
+
rotate: "90deg",
|
|
3262
|
+
top: 3.5,
|
|
3263
|
+
width: 8
|
|
3264
|
+
}
|
|
3265
|
+
}
|
|
3266
|
+
),
|
|
3267
|
+
/* @__PURE__ */ e(I, { sx: { color: "text.secondary" }, variant: "tiny", children: o })
|
|
3268
|
+
]
|
|
3269
|
+
},
|
|
3270
|
+
o
|
|
3271
|
+
)) })
|
|
3272
|
+
] })
|
|
3273
|
+
] });
|
|
3274
|
+
}, ga = ({ isOpen: t, onClose: r }) => {
|
|
3275
|
+
const { finstrong: n } = v(), { isCopyLoaded: o } = j();
|
|
3276
|
+
return o ? /* @__PURE__ */ e(te, { isOpen: t, onClose: r, title: n.score_rubric, children: /* @__PURE__ */ i(u, { sx: { gap: 36, p: 24 }, children: [
|
|
3277
|
+
/* @__PURE__ */ i(u, { sx: { gap: 20 }, children: [
|
|
3278
|
+
/* @__PURE__ */ i(u, { sx: { gap: 8 }, children: [
|
|
3279
|
+
/* @__PURE__ */ e(N, { sx: { textWrap: "wrap" }, children: n.your_path_to_financial_freedom }),
|
|
3280
|
+
/* @__PURE__ */ e(k, { variant: "subtitle1", children: n.finstrong_freedom_description })
|
|
3281
|
+
] }),
|
|
3282
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(ma, { copy: n }) })
|
|
3283
|
+
] }),
|
|
3284
|
+
/* @__PURE__ */ i(u, { sx: { gap: 12 }, children: [
|
|
3285
|
+
/* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body1", children: n.how_do_we_do_this }),
|
|
3286
|
+
/* @__PURE__ */ i(
|
|
3287
|
+
Re,
|
|
3288
|
+
{
|
|
3289
|
+
component: "ol",
|
|
3290
|
+
sx: {
|
|
3291
|
+
listStyleType: "decimal",
|
|
3292
|
+
pl: 20,
|
|
3293
|
+
pr: 16,
|
|
3294
|
+
"& li": {
|
|
3295
|
+
"::marker": {
|
|
3296
|
+
fontWeight: 600
|
|
3297
|
+
}
|
|
3298
|
+
},
|
|
3299
|
+
"& .MuiListItemText-secondary": {
|
|
3300
|
+
fontSize: 15,
|
|
3301
|
+
lineHeight: "24px",
|
|
3302
|
+
pt: 4
|
|
3303
|
+
}
|
|
3304
|
+
},
|
|
3305
|
+
children: [
|
|
3306
|
+
/* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(
|
|
3307
|
+
be,
|
|
3308
|
+
{
|
|
3309
|
+
primary: n.understand_your_habits,
|
|
3310
|
+
secondary: n.understand_your_habits_description
|
|
3311
|
+
}
|
|
3312
|
+
) }),
|
|
3313
|
+
/* @__PURE__ */ e(ye, { sx: { display: "list-item", pt: 16 }, children: /* @__PURE__ */ e(
|
|
3314
|
+
be,
|
|
3315
|
+
{
|
|
3316
|
+
primary: n.see_whats_possible,
|
|
3317
|
+
secondary: n.see_whats_possible_description
|
|
3318
|
+
}
|
|
3319
|
+
) })
|
|
3320
|
+
]
|
|
3321
|
+
}
|
|
3322
|
+
)
|
|
1318
3323
|
] }),
|
|
1319
|
-
/* @__PURE__ */
|
|
1320
|
-
|
|
3324
|
+
/* @__PURE__ */ i(u, { sx: { gap: 4 }, children: [
|
|
3325
|
+
/* @__PURE__ */ e(I, { sx: { fontWeight: 600, pb: 4 }, variant: "body1", children: n.we_ask_questions }),
|
|
3326
|
+
/* @__PURE__ */ i(
|
|
3327
|
+
Re,
|
|
3328
|
+
{
|
|
3329
|
+
component: "ol",
|
|
3330
|
+
sx: {
|
|
3331
|
+
listStyleType: "initial",
|
|
3332
|
+
pl: 20,
|
|
3333
|
+
pr: 16,
|
|
3334
|
+
"& li": {
|
|
3335
|
+
minHeight: "max-content",
|
|
3336
|
+
"::marker": {
|
|
3337
|
+
color: "text.secondary",
|
|
3338
|
+
fontWeight: 600
|
|
3339
|
+
}
|
|
3340
|
+
},
|
|
3341
|
+
"& .MuiListItemText-secondary": {
|
|
3342
|
+
fontSize: 15,
|
|
3343
|
+
lineHeight: "24px"
|
|
3344
|
+
}
|
|
3345
|
+
},
|
|
3346
|
+
children: [
|
|
3347
|
+
/* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(be, { secondary: n.we_ask_questions_description_1 }) }),
|
|
3348
|
+
/* @__PURE__ */ e(ye, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(be, { secondary: n.we_ask_questions_description_2 }) })
|
|
3349
|
+
]
|
|
3350
|
+
}
|
|
3351
|
+
)
|
|
3352
|
+
] })
|
|
3353
|
+
] }) }) : /* @__PURE__ */ e(J, {});
|
|
3354
|
+
}, ya = S(ga), ba = S(() => {
|
|
3355
|
+
const [t, r] = m.useState(!1), n = E(), [o, { width: c }] = It(), { finstrong: a } = v(), { isCopyLoaded: s, isInitialized: d } = j(), { healthScore: l, healthScoreChange: p } = F(), h = n.palette.mode === "dark", _ = je(l?.health_score, a);
|
|
3356
|
+
return !s || !d ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ i(K, { ref: o, sx: { p: 16 }, children: [
|
|
3357
|
+
/* @__PURE__ */ e(
|
|
3358
|
+
$o,
|
|
1321
3359
|
{
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
3360
|
+
action: /* @__PURE__ */ e(
|
|
3361
|
+
$,
|
|
3362
|
+
{
|
|
3363
|
+
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
3364
|
+
onClick: () => r(!0),
|
|
3365
|
+
sx: {
|
|
3366
|
+
fontSize: 13,
|
|
3367
|
+
lineHeight: "16px",
|
|
3368
|
+
fontWeight: 600,
|
|
3369
|
+
color: "primary.main"
|
|
3370
|
+
},
|
|
3371
|
+
variant: "text",
|
|
3372
|
+
children: a.financial_strength_header_action
|
|
3373
|
+
}
|
|
3374
|
+
),
|
|
3375
|
+
subheader: /* @__PURE__ */ e(N, { color: "text.primary", children: a.financial_strength_header }),
|
|
1325
3376
|
sx: {
|
|
1326
|
-
|
|
1327
|
-
"
|
|
1328
|
-
|
|
3377
|
+
p: 0,
|
|
3378
|
+
"& .MuiCardHeader-content": {
|
|
3379
|
+
overflow: "hidden"
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
),
|
|
3384
|
+
/* @__PURE__ */ e(u, { sx: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(
|
|
3385
|
+
Et,
|
|
3386
|
+
{
|
|
3387
|
+
arcRadius: c <= 323 ? 73 : 154,
|
|
3388
|
+
footerCenterContent: p,
|
|
3389
|
+
healthScore: l?.health_score || 0,
|
|
3390
|
+
size: c <= 323 ? "M" : "L"
|
|
3391
|
+
}
|
|
3392
|
+
) }),
|
|
3393
|
+
l?.health_score ? /* @__PURE__ */ i(
|
|
3394
|
+
Bo,
|
|
3395
|
+
{
|
|
3396
|
+
sx: {
|
|
3397
|
+
px: 16,
|
|
3398
|
+
backgroundColor: h ? "grey.800" : "grey.50",
|
|
3399
|
+
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3400
|
+
"&.Mui-expanded": {
|
|
3401
|
+
m: 0
|
|
3402
|
+
},
|
|
3403
|
+
"&::before": {
|
|
3404
|
+
display: "none"
|
|
1329
3405
|
}
|
|
1330
3406
|
},
|
|
1331
|
-
|
|
1332
|
-
|
|
3407
|
+
children: [
|
|
3408
|
+
/* @__PURE__ */ e(
|
|
3409
|
+
Wo,
|
|
3410
|
+
{
|
|
3411
|
+
expandIcon: /* @__PURE__ */ e(wn, { size: 20 }),
|
|
3412
|
+
sx: {
|
|
3413
|
+
height: 52,
|
|
3414
|
+
p: 0,
|
|
3415
|
+
"&.Mui-expanded": {
|
|
3416
|
+
minHeight: 0
|
|
3417
|
+
}
|
|
3418
|
+
},
|
|
3419
|
+
children: /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: "body1", children: a.accordion_title_text })
|
|
3420
|
+
}
|
|
3421
|
+
),
|
|
3422
|
+
/* @__PURE__ */ e(Lo, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(k, { variant: "subtitle1", children: _.scoreContent }) })
|
|
3423
|
+
]
|
|
1333
3424
|
}
|
|
1334
|
-
)
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
3425
|
+
) : /* @__PURE__ */ e(
|
|
3426
|
+
Be,
|
|
3427
|
+
{
|
|
3428
|
+
buttonText: a.connect_more_accounts_title,
|
|
3429
|
+
description: a.health_score_zero_description,
|
|
3430
|
+
drawerType: "connectDrawer",
|
|
3431
|
+
hasIcon: !1,
|
|
3432
|
+
isDashboard: !0,
|
|
3433
|
+
sx: {
|
|
3434
|
+
backgroundColor: h ? "grey.800" : "grey.50",
|
|
3435
|
+
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3436
|
+
".connect-more-accounts-title": {
|
|
3437
|
+
fontWeight: 600,
|
|
3438
|
+
lineHeight: "20px",
|
|
3439
|
+
color: "text.primary"
|
|
3440
|
+
},
|
|
3441
|
+
".connect-more-accounts-description": { color: "text.primary" }
|
|
3442
|
+
},
|
|
3443
|
+
title: a.health_score_zero_title
|
|
3444
|
+
}
|
|
3445
|
+
),
|
|
3446
|
+
/* @__PURE__ */ e(
|
|
3447
|
+
ya,
|
|
3448
|
+
{
|
|
3449
|
+
isOpen: t,
|
|
3450
|
+
onClose: () => r(!1)
|
|
3451
|
+
}
|
|
3452
|
+
)
|
|
3453
|
+
] });
|
|
3454
|
+
}), fa = ({ onBackClick: t, sx: r, onPrimaryCtaClick: n }) => {
|
|
3455
|
+
const { visibleAccounts: o } = Me(), { dateRange: c, isDataLoaded: a, loadBudgetData: s, setTheme: d } = Yn(), { reloadCategoryTotals: l } = Ye(), p = F(), {
|
|
3456
|
+
augmentedChartData: h,
|
|
3457
|
+
calculateHealthScore: _,
|
|
3458
|
+
healthScore: b,
|
|
3459
|
+
loadAugmentedChartData: f,
|
|
3460
|
+
loadMonthlySummaries: w
|
|
3461
|
+
} = p, { finstrong: y, connect: D } = v(), { isCopyLoaded: g, isInitialized: x, selectedAccounts: M, setSelectedAccounts: W } = j(), { loadRepeatingTransactions: G } = Ve(), { isMobile: H } = Ue(), T = E(), { userProfile: V } = Q(), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(!1);
|
|
3462
|
+
if (m.useEffect(() => {
|
|
3463
|
+
d(T);
|
|
3464
|
+
}, []), m.useEffect(() => {
|
|
3465
|
+
n && (p.handleFinstrongWidgetPrimaryCtaClick = n);
|
|
3466
|
+
}, [n, p]), m.useEffect(() => W(o), [o]), m.useEffect(() => {
|
|
3467
|
+
x && (_().finally(), f().finally(), w().finally());
|
|
3468
|
+
}, [x]), m.useEffect(() => {
|
|
3469
|
+
x && (l(M, c.start, c.end), a || (s(), G().finally()));
|
|
3470
|
+
}, [c, a, x, M]), !g || !x) return /* @__PURE__ */ e(J, {});
|
|
3471
|
+
const ce = () => {
|
|
3472
|
+
}, he = () => ae(!0);
|
|
3473
|
+
return /* @__PURE__ */ i(
|
|
3474
|
+
io,
|
|
1351
3475
|
{
|
|
1352
|
-
accountOptions:
|
|
3476
|
+
accountOptions: o,
|
|
1353
3477
|
actions: [
|
|
1354
3478
|
{
|
|
1355
3479
|
iconName: "person",
|
|
1356
|
-
label:
|
|
1357
|
-
onClick:
|
|
3480
|
+
label: y.profile,
|
|
3481
|
+
onClick: he
|
|
1358
3482
|
}
|
|
1359
3483
|
],
|
|
1360
3484
|
hasDivider: !0,
|
|
1361
|
-
onAccountsFilterClick:
|
|
1362
|
-
onBackClick:
|
|
1363
|
-
sx:
|
|
1364
|
-
title:
|
|
3485
|
+
onAccountsFilterClick: ce,
|
|
3486
|
+
onBackClick: t,
|
|
3487
|
+
sx: r,
|
|
3488
|
+
title: y.title,
|
|
1365
3489
|
children: [
|
|
1366
|
-
/* @__PURE__ */
|
|
1367
|
-
|
|
3490
|
+
V.has_completed_finstrong_onboarding ? /* @__PURE__ */ i(
|
|
3491
|
+
u,
|
|
1368
3492
|
{
|
|
1369
3493
|
sx: {
|
|
1370
3494
|
flexDirection: { md: "row" },
|
|
1371
3495
|
gap: 24,
|
|
1372
3496
|
justifyContent: "center",
|
|
1373
|
-
pt:
|
|
3497
|
+
pt: H ? 24 : 16,
|
|
1374
3498
|
px: 24
|
|
1375
3499
|
},
|
|
1376
3500
|
children: [
|
|
1377
|
-
/* @__PURE__ */ u
|
|
1378
|
-
/* @__PURE__ */ e(
|
|
3501
|
+
/* @__PURE__ */ i(u, { sx: { gap: 24, width: { md: 432 } }, children: [
|
|
3502
|
+
/* @__PURE__ */ e(ba, {}),
|
|
1379
3503
|
/* @__PURE__ */ e(
|
|
1380
|
-
|
|
3504
|
+
Be,
|
|
1381
3505
|
{
|
|
1382
|
-
description:
|
|
1383
|
-
|
|
3506
|
+
description: y.connect_more_accounts_description,
|
|
3507
|
+
drawerType: "connectDrawer",
|
|
3508
|
+
title: y.connect_more_accounts_title
|
|
1384
3509
|
}
|
|
1385
3510
|
)
|
|
1386
3511
|
] }),
|
|
1387
|
-
/* @__PURE__ */ e(
|
|
1388
|
-
/* @__PURE__ */ u
|
|
1389
|
-
/* @__PURE__ */ e(
|
|
3512
|
+
/* @__PURE__ */ e(u, { sx: { maxWidth: 848, minWidth: 288, width: { md: 720 } }, children: /* @__PURE__ */ i(K, { sx: { background: T.palette.background.paper, p: 16 }, children: [
|
|
3513
|
+
/* @__PURE__ */ i(u, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
|
3514
|
+
/* @__PURE__ */ e(N, { children: y.key_indicators }),
|
|
1390
3515
|
/* @__PURE__ */ e(
|
|
1391
|
-
|
|
3516
|
+
$,
|
|
1392
3517
|
{
|
|
1393
|
-
endIcon: /* @__PURE__ */ e(
|
|
1394
|
-
onClick: () =>
|
|
3518
|
+
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
3519
|
+
onClick: () => ie(!0),
|
|
1395
3520
|
sx: {
|
|
1396
3521
|
fontSize: 13
|
|
1397
3522
|
},
|
|
1398
3523
|
variant: "text",
|
|
1399
|
-
children:
|
|
3524
|
+
children: y.whats_changed
|
|
1400
3525
|
}
|
|
1401
3526
|
)
|
|
1402
3527
|
] }),
|
|
1403
|
-
|
|
1404
|
-
|
|
3528
|
+
h.length ? /* @__PURE__ */ e(
|
|
3529
|
+
Xe,
|
|
1405
3530
|
{
|
|
1406
|
-
axisColor:
|
|
3531
|
+
axisColor: T.palette.divider,
|
|
1407
3532
|
baseline: "min",
|
|
1408
|
-
colors: [
|
|
3533
|
+
colors: [T.palette.primary.main],
|
|
1409
3534
|
curveType: "natural",
|
|
1410
3535
|
customLegendVariant: "XSmall",
|
|
1411
|
-
datasets: [
|
|
3536
|
+
datasets: [h],
|
|
1412
3537
|
height: 300,
|
|
1413
3538
|
isGraphClippingXAxis: !0,
|
|
1414
|
-
labelBackgroundColor:
|
|
1415
|
-
labelFontColor:
|
|
1416
|
-
labelFontSize: typeof
|
|
1417
|
-
labels: [
|
|
3539
|
+
labelBackgroundColor: T.palette.border.dark,
|
|
3540
|
+
labelFontColor: T.palette.common.white,
|
|
3541
|
+
labelFontSize: typeof T.typography.XSmall?.fontSize == "string" ? parseFloat(T.typography.XSmall.fontSize) : T.typography.XSmall?.fontSize,
|
|
3542
|
+
labels: [y.key_indicators_label],
|
|
1418
3543
|
margin: { right: 20, left: 25 },
|
|
1419
3544
|
showArea: !0,
|
|
1420
3545
|
showAverage: !0,
|
|
1421
3546
|
showLegend: !0,
|
|
1422
3547
|
showMarkLabel: !0,
|
|
1423
3548
|
showXAxis: !0,
|
|
1424
|
-
title:
|
|
3549
|
+
title: y.peer_average,
|
|
1425
3550
|
useCustomMark: !0
|
|
1426
3551
|
}
|
|
1427
|
-
) : /* @__PURE__ */ e(
|
|
1428
|
-
|
|
3552
|
+
) : /* @__PURE__ */ e(Vr, { onClick: () => se(!0) }),
|
|
3553
|
+
b.health_score !== null && /* @__PURE__ */ e(jr, {})
|
|
1429
3554
|
] }) })
|
|
1430
3555
|
]
|
|
1431
3556
|
}
|
|
1432
|
-
),
|
|
1433
|
-
/* @__PURE__ */ e(
|
|
3557
|
+
) : /* @__PURE__ */ e(ia, {}),
|
|
3558
|
+
/* @__PURE__ */ e(da, { isOpen: re, onClose: () => ae(!1) }),
|
|
1434
3559
|
/* @__PURE__ */ e(
|
|
1435
|
-
|
|
3560
|
+
oe,
|
|
1436
3561
|
{
|
|
1437
|
-
onClose: () =>
|
|
1438
|
-
showConnectWidget:
|
|
1439
|
-
title:
|
|
3562
|
+
onClose: () => se(!1),
|
|
3563
|
+
showConnectWidget: X,
|
|
3564
|
+
title: D.mini_title
|
|
1440
3565
|
}
|
|
1441
3566
|
),
|
|
1442
3567
|
/* @__PURE__ */ e(
|
|
1443
|
-
|
|
3568
|
+
ha,
|
|
1444
3569
|
{
|
|
1445
|
-
isOpen:
|
|
1446
|
-
onClose: () =>
|
|
3570
|
+
isOpen: Ce,
|
|
3571
|
+
onClose: () => ie(!1)
|
|
1447
3572
|
}
|
|
1448
3573
|
)
|
|
1449
3574
|
]
|
|
1450
3575
|
}
|
|
1451
3576
|
);
|
|
1452
|
-
},
|
|
3577
|
+
}, $i = S(fa);
|
|
1453
3578
|
export {
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
3579
|
+
Eo as CreditScoreGraph,
|
|
3580
|
+
zt as DialScoreCard,
|
|
3581
|
+
Et as FinancialStrengthGraph,
|
|
3582
|
+
Gi as FinstrongApi,
|
|
3583
|
+
Hi as FinstrongStore,
|
|
3584
|
+
$i as FinstrongWidget
|
|
1460
3585
|
};
|