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