@mx-cartographer/experiences 7.2.13 → 7.2.14-alpha.san2

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