@mx-cartographer/experiences 7.4.15 → 7.4.17-alpha.mega1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/LineChart-Ck3RRxi_.mjs +580 -0
- package/dist/accounts/index.es.js +1 -1
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/debts/index.es.js +195 -198
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +2 -3
- package/dist/finstrong/index.es.js +547 -540
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +2 -2
- package/dist/trends/index.es.js +476 -473
- package/package.json +2 -2
- package/dist/LineChart-BQRxZF3p.mjs +0 -581
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as
|
|
1
|
+
import { jsxs as a, Fragment as E, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import k from "@mui/material/Box";
|
|
3
3
|
import p from "@mui/material/Stack";
|
|
4
|
-
import { useTheme as
|
|
5
|
-
import { PieChart as
|
|
4
|
+
import { useTheme as G, alpha as fe } from "@mui/material/styles";
|
|
5
|
+
import { PieChart as on } from "@mui/x-charts/PieChart";
|
|
6
|
+
import { P as M, H3 as K, Text as I, InstitutionLogo as lt, H2 as Le, MerchantLogo as rn, Icon as an } from "@mxenabled/mxui";
|
|
6
7
|
import { TrendingUp as dt, ArrowRightAlt as sn, TrendingDown as cn, AccountBalance as pt, ChevronRight as J, MultilineChart as _t, CreditCard as He, CheckCircle as ln, Cancel as dn, Savings as pn, ContentCopy as _n, Add as ht, Cardiology as hn, Payments as un, CalendarMonth as mn, ExpandMore as gn } from "@mxenabled/mx-icons";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { y as Si, F as Ci } from "../FinstrongStore-BIrX0Xg2.mjs";
|
|
8
|
+
import { g as yn, a as bn, r as et, b as fn, c as Ne, d as ut, C as we, e as ke, f as xn, h as Sn, i as Cn, j as mt, k as tt, l as vn, m as nt, n as wn, o as gt, p as kn, q as yt, s as Oe, t as bt, u as Mn, v as ft, w as Dn, A as ne, x as In, P as An } from "../FinstrongStore-BIrX0Xg2.mjs";
|
|
9
|
+
import { y as fi, F as xi } from "../FinstrongStore-BIrX0Xg2.mjs";
|
|
10
10
|
import * as ot from "d3";
|
|
11
11
|
import { observer as v } from "mobx-react-lite";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as S, b as q, a as je, o as ee, z as F, p as Tn, d as Se, m as Ke, f as On, j as Ve, h as Rn, i as Fn } from "../hooks-ZMp65DFz.mjs";
|
|
13
13
|
import { L as te } from "../Loader-DUaFpDGv.mjs";
|
|
14
14
|
import m from "react";
|
|
15
|
-
import
|
|
15
|
+
import P from "@mui/material/Button";
|
|
16
16
|
import V from "@mui/material/Card";
|
|
17
|
-
import { L as Ye } from "../LineChart-
|
|
18
|
-
import { C as
|
|
19
|
-
import { l as re, g as
|
|
17
|
+
import { L as Ye } from "../LineChart-Ck3RRxi_.mjs";
|
|
18
|
+
import { C as xt } from "../ConnectionsDrawer-VmuVFHbL.mjs";
|
|
19
|
+
import { l as re, g as St, A as Ee } from "../ConnectDrawer-BkvlItWx.mjs";
|
|
20
20
|
import se from "@mui/material/Tab";
|
|
21
21
|
import Xe from "@mui/material/Tabs";
|
|
22
|
-
import
|
|
22
|
+
import Re from "@mui/material/TextField";
|
|
23
23
|
import { u as qe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
24
|
-
import { D as
|
|
25
|
-
import { u as
|
|
26
|
-
import
|
|
24
|
+
import { D as Ln, f as Bn, a as Pn } from "../Dialog-BPTr3qHE.mjs";
|
|
25
|
+
import { u as Ct } from "../useDimensions-27p2evRx.mjs";
|
|
26
|
+
import Wn from "@mui/material/Chip";
|
|
27
27
|
import { D as oe } from "../Drawer-By9V-B5L.mjs";
|
|
28
28
|
import le from "@mui/material/Divider";
|
|
29
29
|
import ye from "@mui/material/ListItem";
|
|
30
|
-
import
|
|
30
|
+
import vt from "@mui/material/ListItemAvatar";
|
|
31
31
|
import be from "@mui/material/ListItemText";
|
|
32
|
-
import { g as
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
32
|
+
import { g as wt } from "../AccountFields-zCMqet85.mjs";
|
|
33
|
+
import Ge from "@mui/material/List";
|
|
34
|
+
import $n from "@mui/material/ListItemButton";
|
|
35
|
+
import zn from "@mui/material/ListSubheader";
|
|
36
36
|
import { f as W } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
37
37
|
import { b as j } from "../Localization-2MODESHW.mjs";
|
|
38
|
-
import { S as rt, F as
|
|
39
|
-
import { S as
|
|
40
|
-
import { h as
|
|
41
|
-
import { T as
|
|
38
|
+
import { S as rt, F as kt, e as En, R as Mt } from "../RecurringTransactions-BqijW_8S.mjs";
|
|
39
|
+
import { S as Gn } from "../StatusBar-BK_uYHAB.mjs";
|
|
40
|
+
import { h as Dt } from "../DateUtil-CBdcsyuk.mjs";
|
|
41
|
+
import { T as Hn, s as Nn, h as jn, S as Kn, c as Vn } from "../TransactionDetails-m5PddMQn.mjs";
|
|
42
42
|
import { T as ce } from "../TabContentContainer-j01JYR_7.mjs";
|
|
43
|
-
import { E as
|
|
44
|
-
import
|
|
43
|
+
import { E as Fe } from "../EmptyState-DoxNUae-.mjs";
|
|
44
|
+
import Yn from "@mui/material/useMediaQuery";
|
|
45
|
+
import { BarPlot as Xn } from "@mui/x-charts/BarChart";
|
|
46
|
+
import { ChartContainer as qn } from "@mui/x-charts/ChartContainer";
|
|
45
47
|
import { ChartsXAxis as Un } from "@mui/x-charts/ChartsXAxis";
|
|
46
48
|
import { ChartsYAxis as Qn } from "@mui/x-charts/ChartsYAxis";
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import
|
|
61
|
-
import {
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import fo from "@mui/lab/
|
|
65
|
-
import xo from "@mui/lab/
|
|
66
|
-
import So from "@mui/
|
|
67
|
-
import Co from "@mui/
|
|
68
|
-
import vo from "@mui/material/
|
|
69
|
-
import wo from "@mui/material/
|
|
70
|
-
import ko from "
|
|
71
|
-
import Mo from "
|
|
72
|
-
|
|
73
|
-
import { W as Io } from "../WidgetContainer-CoFDmQRE.mjs";
|
|
74
|
-
const Ao = ({
|
|
49
|
+
import { startOfMonth as It } from "date-fns/startOfMonth";
|
|
50
|
+
import { endOfMonth as At } from "date-fns/endOfMonth";
|
|
51
|
+
import { g as Zn, S as Jn, b as eo } from "../SpendingLegend-CDO060GT.mjs";
|
|
52
|
+
import { formatISO as to } from "date-fns/formatISO";
|
|
53
|
+
import { fromUnixTime as no } from "date-fns/fromUnixTime";
|
|
54
|
+
import { startOfToday as at } from "date-fns/startOfToday";
|
|
55
|
+
import { subDays as oo } from "date-fns/subDays";
|
|
56
|
+
import { c as ro, d as it, S as ao, i as io } from "../ManageIncome-CaoQl609.mjs";
|
|
57
|
+
import { LocalizationProvider as so, DatePicker as co, StaticDatePicker as lo } from "@mui/x-date-pickers";
|
|
58
|
+
import { AdapterDateFns as Tt } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
59
|
+
import { R as po } from "../RecurringSettings-B4ybrS0B.mjs";
|
|
60
|
+
import { LocalizationProvider as _o } from "@mui/x-date-pickers/LocalizationProvider";
|
|
61
|
+
import { format as ho } from "date-fns/format";
|
|
62
|
+
import uo from "@mui/lab/Timeline";
|
|
63
|
+
import mo, { timelineItemClasses as go } from "@mui/lab/TimelineItem";
|
|
64
|
+
import yo from "@mui/lab/TimelineConnector";
|
|
65
|
+
import bo from "@mui/lab/TimelineContent";
|
|
66
|
+
import fo from "@mui/lab/TimelineDot";
|
|
67
|
+
import xo from "@mui/lab/TimelineSeparator";
|
|
68
|
+
import So from "@mui/material/Accordion";
|
|
69
|
+
import Co from "@mui/material/AccordionDetails";
|
|
70
|
+
import vo from "@mui/material/AccordionSummary";
|
|
71
|
+
import wo from "@mui/material/CardHeader";
|
|
72
|
+
import { u as ko } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
73
|
+
import { W as Mo } from "../WidgetContainer-CoFDmQRE.mjs";
|
|
74
|
+
const Do = ({
|
|
75
75
|
dialScoreData: t,
|
|
76
76
|
dataIndex: o,
|
|
77
77
|
arcColor: n,
|
|
@@ -82,28 +82,28 @@ const Ao = ({
|
|
|
82
82
|
arcRadius: l,
|
|
83
83
|
innerArcRadius: _,
|
|
84
84
|
outterArcRadius: d,
|
|
85
|
-
progressEndAngle:
|
|
86
|
-
unitsPerSegment:
|
|
85
|
+
progressEndAngle: h,
|
|
86
|
+
unitsPerSegment: u,
|
|
87
87
|
isFinacialStrengthGraph: y
|
|
88
88
|
}) => {
|
|
89
|
-
const f =
|
|
89
|
+
const f = G(), w = [
|
|
90
90
|
{ offset: "13.62%", color: f.palette.chartMono.chartMono2 },
|
|
91
91
|
{ offset: "36.67%", color: f.palette.chartMono.chartMono3 },
|
|
92
92
|
{ offset: "59.72%", color: f.palette.chartMono.chartMono4 },
|
|
93
93
|
{ offset: "83.46%", color: f.palette.chartMono.chartMono5 }
|
|
94
|
-
], [
|
|
94
|
+
], [x, D] = yn(
|
|
95
95
|
t,
|
|
96
96
|
s,
|
|
97
97
|
r,
|
|
98
98
|
o
|
|
99
|
-
), [C, g] =
|
|
100
|
-
|
|
99
|
+
), [C, g] = bn(
|
|
100
|
+
x,
|
|
101
101
|
D,
|
|
102
102
|
o,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
), b = ot.arc().innerRadius(_).outerRadius(d).startAngle(
|
|
106
|
-
return /* @__PURE__ */ a(
|
|
103
|
+
u,
|
|
104
|
+
h
|
|
105
|
+
), b = ot.arc().innerRadius(_).outerRadius(d).startAngle(x).endAngle(D).padAngle(0.02).cornerRadius(8), L = ot.arc().innerRadius(_).outerRadius(d).startAngle(C).endAngle(g).padAngle(0.02).cornerRadius(8);
|
|
106
|
+
return /* @__PURE__ */ a(E, { children: [
|
|
107
107
|
/* @__PURE__ */ e(
|
|
108
108
|
"path",
|
|
109
109
|
{
|
|
@@ -111,7 +111,7 @@ const Ao = ({
|
|
|
111
111
|
fill: y ? f.palette.divider : n
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
|
-
y && /* @__PURE__ */ e("path", { d:
|
|
114
|
+
y && /* @__PURE__ */ e("path", { d: L({}), fill: "url(#arcGradient)" }),
|
|
115
115
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
|
|
116
116
|
"linearGradient",
|
|
117
117
|
{
|
|
@@ -122,11 +122,11 @@ const Ao = ({
|
|
|
122
122
|
x2: i - l * 0.8 * Math.cos(Math.PI / 1.35),
|
|
123
123
|
y1: c + l * 0.8 * Math.sin(Math.PI / 1.35),
|
|
124
124
|
y2: c - l * 0.8 * Math.sin(Math.PI / 1.35),
|
|
125
|
-
children: w.map((
|
|
125
|
+
children: w.map((B, U) => /* @__PURE__ */ e("stop", { offset: B.offset, stopColor: B.color }, U))
|
|
126
126
|
}
|
|
127
127
|
) })
|
|
128
128
|
] });
|
|
129
|
-
},
|
|
129
|
+
}, Ot = ({
|
|
130
130
|
arcRadius: t = 100,
|
|
131
131
|
healthScore: o,
|
|
132
132
|
size: n = "L",
|
|
@@ -137,11 +137,11 @@ const Ao = ({
|
|
|
137
137
|
markerColor: l,
|
|
138
138
|
healthScoreStatus: _,
|
|
139
139
|
footerCenterContent: d,
|
|
140
|
-
footerLeftContent:
|
|
141
|
-
footerRightContent:
|
|
140
|
+
footerLeftContent: h,
|
|
141
|
+
footerRightContent: u,
|
|
142
142
|
isFinacialStrengthGraph: y = !1
|
|
143
143
|
}) => {
|
|
144
|
-
const f =
|
|
144
|
+
const f = G(), w = -Math.PI / 1.35, x = Math.PI / 1.35, D = x - w, C = D / (i - s), g = (o - s) * C, b = w + g + 0.02, L = n !== "SM" ? 0.1 : 0.12, B = t, U = t * (1 - L), T = B * 2, $ = T / 2, z = T / 2, pe = (U + B) / 2, ve = o !== 25 && o !== 50 && o !== 75 && o !== 100 ? 0 : 0.12, [Q, Y] = fn(pe, b, ve), _e = o / 25, H = {
|
|
145
145
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
|
146
146
|
M: { markerSize: 8, healthScoreFontSize: 48 },
|
|
147
147
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
|
@@ -164,28 +164,26 @@ const Ao = ({
|
|
|
164
164
|
},
|
|
165
165
|
children: [
|
|
166
166
|
/* @__PURE__ */ e(
|
|
167
|
-
|
|
167
|
+
on,
|
|
168
168
|
{
|
|
169
169
|
height: n === "SM" ? T - 7 : T,
|
|
170
|
+
hideLegend: !0,
|
|
170
171
|
margin: he,
|
|
171
172
|
series: [
|
|
172
173
|
{
|
|
173
174
|
data: r,
|
|
174
175
|
innerRadius: U,
|
|
175
|
-
outerRadius:
|
|
176
|
+
outerRadius: B,
|
|
176
177
|
startAngle: Math.round(et(w)),
|
|
177
178
|
// Use Math.degrees to convert
|
|
178
|
-
endAngle: Math.round(et(
|
|
179
|
+
endAngle: Math.round(et(x))
|
|
179
180
|
// Use Math.degrees to convert
|
|
180
181
|
}
|
|
181
182
|
],
|
|
182
183
|
skipAnimation: !0,
|
|
183
|
-
slotProps: {
|
|
184
|
-
legend: { hidden: !0 }
|
|
185
|
-
},
|
|
186
184
|
slots: {
|
|
187
185
|
pieArc: (X) => /* @__PURE__ */ e(
|
|
188
|
-
|
|
186
|
+
Do,
|
|
189
187
|
{
|
|
190
188
|
arcColor: X.color,
|
|
191
189
|
arcRadius: t,
|
|
@@ -196,7 +194,7 @@ const Ao = ({
|
|
|
196
194
|
dialScoreData: r,
|
|
197
195
|
innerArcRadius: U,
|
|
198
196
|
isFinacialStrengthGraph: y,
|
|
199
|
-
outterArcRadius:
|
|
197
|
+
outterArcRadius: B,
|
|
200
198
|
progressEndAngle: b,
|
|
201
199
|
totalAngularSpan: D,
|
|
202
200
|
unitsPerSegment: _e
|
|
@@ -306,7 +304,7 @@ const Ao = ({
|
|
|
306
304
|
) : /* @__PURE__ */ e(M, { sx: { color: "text.secondary" }, variant: "subtitle2", children: d })
|
|
307
305
|
}
|
|
308
306
|
),
|
|
309
|
-
|
|
307
|
+
h !== void 0 && /* @__PURE__ */ e(
|
|
310
308
|
k,
|
|
311
309
|
{
|
|
312
310
|
sx: {
|
|
@@ -317,10 +315,10 @@ const Ao = ({
|
|
|
317
315
|
transform: "translate(-50%, -50%)",
|
|
318
316
|
textAlign: "left"
|
|
319
317
|
},
|
|
320
|
-
children: /* @__PURE__ */ e(M, { variant: "body1", children:
|
|
318
|
+
children: /* @__PURE__ */ e(M, { variant: "body1", children: h })
|
|
321
319
|
}
|
|
322
320
|
),
|
|
323
|
-
|
|
321
|
+
u !== void 0 && /* @__PURE__ */ e(
|
|
324
322
|
k,
|
|
325
323
|
{
|
|
326
324
|
sx: {
|
|
@@ -330,7 +328,7 @@ const Ao = ({
|
|
|
330
328
|
transform: "translate(-50%, -50%)",
|
|
331
329
|
textAlign: "right"
|
|
332
330
|
},
|
|
333
|
-
children: /* @__PURE__ */ e(M, { variant: "body1", children:
|
|
331
|
+
children: /* @__PURE__ */ e(M, { variant: "body1", children: u })
|
|
334
332
|
}
|
|
335
333
|
)
|
|
336
334
|
]
|
|
@@ -349,9 +347,9 @@ const Ao = ({
|
|
|
349
347
|
{ id: 2, label: "Group B", value: 25 },
|
|
350
348
|
{ id: 3, label: "Group C", value: 25 },
|
|
351
349
|
{ id: 4, label: "Group D", value: 25 }
|
|
352
|
-
], { finstrong: c } =
|
|
350
|
+
], { finstrong: c } = S(), l = Ne(n, c);
|
|
353
351
|
return /* @__PURE__ */ e(
|
|
354
|
-
|
|
352
|
+
Ot,
|
|
355
353
|
{
|
|
356
354
|
arcRadius: t,
|
|
357
355
|
dialScoreData: i,
|
|
@@ -364,7 +362,7 @@ const Ao = ({
|
|
|
364
362
|
}
|
|
365
363
|
);
|
|
366
364
|
}
|
|
367
|
-
),
|
|
365
|
+
), Io = v(
|
|
368
366
|
({
|
|
369
367
|
arcRadius: t,
|
|
370
368
|
size: o = "L",
|
|
@@ -373,7 +371,7 @@ const Ao = ({
|
|
|
373
371
|
minValue: s = 300,
|
|
374
372
|
footerCenterContent: i
|
|
375
373
|
}) => {
|
|
376
|
-
const l =
|
|
374
|
+
const l = G().palette.mode === "dark", _ = [
|
|
377
375
|
{
|
|
378
376
|
id: 1,
|
|
379
377
|
label: "Poor",
|
|
@@ -404,15 +402,15 @@ const Ao = ({
|
|
|
404
402
|
value: 12,
|
|
405
403
|
color: l ? we.EXCEPTIONAL : ke.EXCEPTIONAL
|
|
406
404
|
}
|
|
407
|
-
], { finstrong: d } =
|
|
408
|
-
if (!
|
|
409
|
-
const { status:
|
|
405
|
+
], { finstrong: d } = S(), { isCopyLoaded: h } = q();
|
|
406
|
+
if (!h) return /* @__PURE__ */ e(te, {});
|
|
407
|
+
const { status: u, color: y = "none" } = ut(
|
|
410
408
|
n,
|
|
411
409
|
l,
|
|
412
410
|
d.credit_score_status
|
|
413
411
|
);
|
|
414
412
|
return /* @__PURE__ */ e(
|
|
415
|
-
|
|
413
|
+
Ot,
|
|
416
414
|
{
|
|
417
415
|
arcRadius: t,
|
|
418
416
|
dialScoreData: _,
|
|
@@ -420,7 +418,7 @@ const Ao = ({
|
|
|
420
418
|
footerLeftContent: s,
|
|
421
419
|
footerRightContent: r,
|
|
422
420
|
healthScore: n,
|
|
423
|
-
healthScoreStatus:
|
|
421
|
+
healthScoreStatus: u,
|
|
424
422
|
markerColor: y,
|
|
425
423
|
maxValue: r,
|
|
426
424
|
minValue: s,
|
|
@@ -428,7 +426,7 @@ const Ao = ({
|
|
|
428
426
|
}
|
|
429
427
|
);
|
|
430
428
|
}
|
|
431
|
-
),
|
|
429
|
+
), Be = ({
|
|
432
430
|
drawerType: t,
|
|
433
431
|
isDashboard: o = !1,
|
|
434
432
|
hasIcon: n = !0,
|
|
@@ -438,7 +436,7 @@ const Ao = ({
|
|
|
438
436
|
description: c,
|
|
439
437
|
sx: l
|
|
440
438
|
}) => {
|
|
441
|
-
const [_, d] = m.useState(!1), { connect:
|
|
439
|
+
const [_, d] = m.useState(!1), { connect: h, finstrong: u } = S(), { config: y } = je();
|
|
442
440
|
return t && y.show_connections_widget_in_master ? /* @__PURE__ */ a(
|
|
443
441
|
V,
|
|
444
442
|
{
|
|
@@ -459,7 +457,7 @@ const Ao = ({
|
|
|
459
457
|
},
|
|
460
458
|
children: [
|
|
461
459
|
n && /* @__PURE__ */ e(pt, { sx: { height: 20, width: 20 } }),
|
|
462
|
-
/* @__PURE__ */ e(K, { className: "connect-more-accounts-title", sx: { ...o && { fontSize: 15 } }, children: s ||
|
|
460
|
+
/* @__PURE__ */ e(K, { className: "connect-more-accounts-title", sx: { ...o && { fontSize: 15 } }, children: s || u.connect_more_accounts_title })
|
|
463
461
|
]
|
|
464
462
|
}
|
|
465
463
|
),
|
|
@@ -469,17 +467,17 @@ const Ao = ({
|
|
|
469
467
|
className: "connect-more-accounts-description",
|
|
470
468
|
sx: { color: "text.secondary", mt: 8 },
|
|
471
469
|
variant: "subtitle1",
|
|
472
|
-
children: c ||
|
|
470
|
+
children: c || u.connect_more_accounts_description
|
|
473
471
|
}
|
|
474
472
|
),
|
|
475
473
|
/* @__PURE__ */ e(
|
|
476
|
-
|
|
474
|
+
P,
|
|
477
475
|
{
|
|
478
476
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
479
477
|
onClick: () => d(!0),
|
|
480
478
|
size: "small",
|
|
481
479
|
sx: { p: 0, mt: 8, "&:hover": { backgroundColor: "transparent" } },
|
|
482
|
-
children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: r ||
|
|
480
|
+
children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: r || u.connect_more_accounts_button })
|
|
483
481
|
}
|
|
484
482
|
),
|
|
485
483
|
t === "connectDrawer" && /* @__PURE__ */ e(
|
|
@@ -487,15 +485,15 @@ const Ao = ({
|
|
|
487
485
|
{
|
|
488
486
|
onClose: () => d(!1),
|
|
489
487
|
showConnectWidget: _,
|
|
490
|
-
title: i ||
|
|
488
|
+
title: i || h.mini_title
|
|
491
489
|
}
|
|
492
490
|
),
|
|
493
491
|
t === "connectionsDrawer" && /* @__PURE__ */ e(
|
|
494
|
-
|
|
492
|
+
xt,
|
|
495
493
|
{
|
|
496
494
|
onClose: () => d(!1),
|
|
497
495
|
showConnectionsWidget: _,
|
|
498
|
-
title: i ||
|
|
496
|
+
title: i || h.mini_title
|
|
499
497
|
}
|
|
500
498
|
)
|
|
501
499
|
]
|
|
@@ -503,21 +501,21 @@ const Ao = ({
|
|
|
503
501
|
) : null;
|
|
504
502
|
};
|
|
505
503
|
var de = /* @__PURE__ */ ((t) => (t.SpendLessThanYouMake = "spendLessThanYouMake", t.PayBillsOnTime = "payBillsOnTime", t.SaveEnoughToLiveOn = "saveEnoughToLiveOn", t.MaintainEmergencySavings = "maintainEmergencySavings", t.HaveManageableDebt = "haveManageableDebt", t.HaveAGoodCreditScore = "haveAGoodCreditScore", t))(de || {});
|
|
506
|
-
const
|
|
507
|
-
const { common: n, finstrong: r } =
|
|
504
|
+
const Ao = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_animation_final.gif", To = ({ isOpen: t, onClose: o }) => {
|
|
505
|
+
const { common: n, finstrong: r } = S(), { isMobile: s } = qe(), { updateUser: i, user: c } = ee(), [l, _] = m.useState(c.credit_score || 0), d = !isNaN(l), h = () => {
|
|
508
506
|
o(), setTimeout(() => _(c.credit_score || 0), 300);
|
|
509
|
-
},
|
|
507
|
+
}, u = () => {
|
|
510
508
|
!l || l === c.credit_score || i({ ...c, credit_score: l });
|
|
511
509
|
};
|
|
512
510
|
return /* @__PURE__ */ e(
|
|
513
|
-
|
|
511
|
+
Ln,
|
|
514
512
|
{
|
|
515
513
|
copy: { close_aria: n.close_aria, title: r.edit_credit_score },
|
|
516
514
|
disablePrimaryButton: !l || !d,
|
|
517
515
|
isOpen: t,
|
|
518
516
|
maxWidth: "xs",
|
|
519
|
-
onClose:
|
|
520
|
-
onPrimaryAction:
|
|
517
|
+
onClose: h,
|
|
518
|
+
onPrimaryAction: u,
|
|
521
519
|
primaryColor: "primary",
|
|
522
520
|
primaryText: n.save_button,
|
|
523
521
|
sx: {
|
|
@@ -529,10 +527,10 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
529
527
|
"form",
|
|
530
528
|
{
|
|
531
529
|
onSubmit: (y) => {
|
|
532
|
-
y.preventDefault(),
|
|
530
|
+
y.preventDefault(), u(), h();
|
|
533
531
|
},
|
|
534
532
|
children: /* @__PURE__ */ e(
|
|
535
|
-
|
|
533
|
+
Re,
|
|
536
534
|
{
|
|
537
535
|
error: !d,
|
|
538
536
|
fullWidth: !0,
|
|
@@ -549,11 +547,11 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
549
547
|
)
|
|
550
548
|
}
|
|
551
549
|
);
|
|
552
|
-
},
|
|
550
|
+
}, Ft = v(To), ze = {
|
|
553
551
|
credit_over_time_title: "Your Credit Over Time",
|
|
554
552
|
credit_over_time_zero_state_desc: "Add your credit score to start building a full picture of your credit health."
|
|
555
|
-
},
|
|
556
|
-
const o =
|
|
553
|
+
}, Oo = ({ chartFor: t }) => {
|
|
554
|
+
const o = G(), n = o.palette.mode === "dark", { monthlySummaries: r } = F(), { user: s } = ee(), { finstrong: i } = S(), [c, { width: l }] = Ct(), _ = {
|
|
557
555
|
savingsOverTime: {
|
|
558
556
|
icon: /* @__PURE__ */ e(dt, { size: 48, sx: { marginBottom: 8 } }),
|
|
559
557
|
title: i.key_indicators_save.zero_state_title,
|
|
@@ -569,7 +567,7 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
569
567
|
title: ze.credit_over_time_title,
|
|
570
568
|
description: ze.credit_over_time_zero_state_desc
|
|
571
569
|
}
|
|
572
|
-
}[t],
|
|
570
|
+
}[t], h = {
|
|
573
571
|
savingsOverTime: {
|
|
574
572
|
title: i.key_indicators_save.savings_over_time,
|
|
575
573
|
valueKey: "available_cash"
|
|
@@ -582,41 +580,41 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
582
580
|
title: ze.credit_over_time_title,
|
|
583
581
|
valueKey: "credit_score"
|
|
584
582
|
}
|
|
585
|
-
}[t],
|
|
586
|
-
let
|
|
583
|
+
}[t], u = xn(r, h.valueKey), y = r.map((B) => B[h.valueKey]), f = Math.max(...y), w = Math.min(...y), x = () => f >= 1e6 ? { formatter: "0.000a", leftMargin: -5 } : f >= 1e3 ? { formatter: "0a", leftMargin: -25 } : { formatter: "0a", leftMargin: -30 }, { formatter: D, leftMargin: C } = x(), g = h.title, b = t === "creditOverTime";
|
|
584
|
+
let L;
|
|
587
585
|
if (b) {
|
|
588
|
-
const { color:
|
|
586
|
+
const { color: B } = ut(
|
|
589
587
|
s?.credit_score ?? 0,
|
|
590
588
|
n,
|
|
591
589
|
i.credit_score_status
|
|
592
590
|
);
|
|
593
|
-
|
|
591
|
+
L = B;
|
|
594
592
|
}
|
|
595
|
-
return /* @__PURE__ */ e(V, { ref: c, sx: { backgroundColor: "background.paper" }, children:
|
|
593
|
+
return /* @__PURE__ */ e(V, { ref: c, sx: { backgroundColor: "background.paper" }, children: u.length >= 1 ? /* @__PURE__ */ a(p, { gap: 8, sx: { pl: 18 }, children: [
|
|
596
594
|
/* @__PURE__ */ e(M, { sx: { pb: 8, pt: 16 }, variant: "h3", children: g }),
|
|
597
595
|
/* @__PURE__ */ e(
|
|
598
596
|
Ye,
|
|
599
597
|
{
|
|
600
|
-
areaColor:
|
|
598
|
+
areaColor: L,
|
|
601
599
|
axisColor: o.palette.divider,
|
|
602
600
|
baseline: "min",
|
|
603
601
|
chartFor: t,
|
|
604
602
|
colors: [o.palette.primary.main],
|
|
605
603
|
curveType: b ? "linear" : "natural",
|
|
606
|
-
datasets:
|
|
604
|
+
datasets: u ? [u] : [],
|
|
607
605
|
height: 244,
|
|
608
606
|
labelFontColor: b ? "text.primary" : "",
|
|
609
607
|
labelFontSize: b ? 13 : void 0,
|
|
610
608
|
labels: [i.key_indicators_label],
|
|
611
609
|
margin: { left: C, top: b ? 25 : 15, right: 20 },
|
|
612
|
-
markStyles: (
|
|
610
|
+
markStyles: (B) => b ? {
|
|
613
611
|
markLabelStyles: {
|
|
614
612
|
marginLeft: 16,
|
|
615
|
-
transform:
|
|
613
|
+
transform: B === u.length - 1 ? "translateX(-16px)" : "translateX(16px)",
|
|
616
614
|
fontWeight: 600,
|
|
617
615
|
fill: o.palette.text.primary
|
|
618
616
|
},
|
|
619
|
-
stroke:
|
|
617
|
+
stroke: L
|
|
620
618
|
} : {},
|
|
621
619
|
maxRange: b ? 850 : void 0,
|
|
622
620
|
minRange: (() => {
|
|
@@ -640,12 +638,12 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
640
638
|
/* @__PURE__ */ e(M, { fontWeight: 600, variant: "body1", children: _.title }),
|
|
641
639
|
/* @__PURE__ */ e(M, { align: "center", variant: "subtitle1", children: _.description })
|
|
642
640
|
] }) });
|
|
643
|
-
}, Ue = v(
|
|
644
|
-
const { healthScoreChange: t } =
|
|
641
|
+
}, Ue = v(Oo), Ro = () => {
|
|
642
|
+
const { healthScoreChange: t } = F(), { finstrong: o } = S(), { user: n } = ee(), { availableWidth: r } = Tn(), { isSmallMobile: s } = qe(r), [i, c] = m.useState(!1);
|
|
645
643
|
return /* @__PURE__ */ a(k, { children: [
|
|
646
644
|
/* @__PURE__ */ a(p, { sx: { gap: 28 }, children: [
|
|
647
645
|
/* @__PURE__ */ e(
|
|
648
|
-
|
|
646
|
+
Io,
|
|
649
647
|
{
|
|
650
648
|
arcRadius: s ? 124 : 154,
|
|
651
649
|
footerCenterContent: t,
|
|
@@ -653,20 +651,20 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
653
651
|
size: s ? "M" : "L"
|
|
654
652
|
}
|
|
655
653
|
),
|
|
656
|
-
/* @__PURE__ */ e(
|
|
654
|
+
/* @__PURE__ */ e(P, { onClick: () => c(!0), variant: "contained", children: o.credit_score_updated_score }),
|
|
657
655
|
/* @__PURE__ */ e(Ue, { chartFor: "creditOverTime" })
|
|
658
656
|
] }),
|
|
659
|
-
/* @__PURE__ */ e(
|
|
657
|
+
/* @__PURE__ */ e(Ft, { isOpen: i, onClose: () => c(!1) })
|
|
660
658
|
] });
|
|
661
|
-
},
|
|
662
|
-
const { finstrong: o } =
|
|
659
|
+
}, Fo = v(Ro), Pe = ({ status: t }) => {
|
|
660
|
+
const { finstrong: o } = S(), n = Sn(Cn[t]), r = {
|
|
663
661
|
GOOD: o.key_indicators_good,
|
|
664
662
|
FAIR: o.key_indicators_fair,
|
|
665
663
|
OFF_TRACK: o.key_indicators_off_track,
|
|
666
664
|
MISSING: o.key_indicators_missing
|
|
667
665
|
}[t];
|
|
668
666
|
return /* @__PURE__ */ e(
|
|
669
|
-
|
|
667
|
+
Wn,
|
|
670
668
|
{
|
|
671
669
|
label: /* @__PURE__ */ e(
|
|
672
670
|
M,
|
|
@@ -686,13 +684,13 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
686
684
|
variant: "filled"
|
|
687
685
|
}
|
|
688
686
|
);
|
|
689
|
-
},
|
|
690
|
-
const { finstrong: t } =
|
|
687
|
+
}, Lo = () => {
|
|
688
|
+
const { finstrong: t } = S(), { user: o } = ee(), n = mt(o.credit_score ?? null);
|
|
691
689
|
return /* @__PURE__ */ a(p, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
692
690
|
/* @__PURE__ */ e(K, { children: t.credit_score_keep_strong_credit_score }),
|
|
693
|
-
/* @__PURE__ */ e(
|
|
691
|
+
/* @__PURE__ */ e(Pe, { status: n })
|
|
694
692
|
] });
|
|
695
|
-
},
|
|
693
|
+
}, Bo = v(Lo), Po = ({
|
|
696
694
|
additionalContent: t,
|
|
697
695
|
connectTitle: o,
|
|
698
696
|
connectDescription: n,
|
|
@@ -703,12 +701,12 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
703
701
|
loadConnectAccountsCard: l = !0,
|
|
704
702
|
onClose: _,
|
|
705
703
|
stickyComponent: d,
|
|
706
|
-
title:
|
|
707
|
-
drawerType:
|
|
704
|
+
title: h,
|
|
705
|
+
drawerType: u
|
|
708
706
|
}) => {
|
|
709
|
-
const { finstrong: y } =
|
|
707
|
+
const { finstrong: y } = S(), { isCopyLoaded: f } = q();
|
|
710
708
|
return f ? /* @__PURE__ */ e(oe, { isOpen: c, onClose: _, title: i || y.key_indicators, children: /* @__PURE__ */ a(p, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
711
|
-
(
|
|
709
|
+
(h || s) && /* @__PURE__ */ a(
|
|
712
710
|
p,
|
|
713
711
|
{
|
|
714
712
|
sx: {
|
|
@@ -717,7 +715,7 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
717
715
|
p: 24
|
|
718
716
|
},
|
|
719
717
|
children: [
|
|
720
|
-
|
|
718
|
+
h && typeof h == "string" ? /* @__PURE__ */ e(K, { children: h }) : h,
|
|
721
719
|
s && /* @__PURE__ */ e(M, { sx: { lineHeight: "24px" }, children: s })
|
|
722
720
|
]
|
|
723
721
|
}
|
|
@@ -737,10 +735,10 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
737
735
|
/* @__PURE__ */ a(p, { sx: { bgcolor: "background.default", gap: 24, p: 24 }, children: [
|
|
738
736
|
r,
|
|
739
737
|
l && /* @__PURE__ */ e(
|
|
740
|
-
|
|
738
|
+
Be,
|
|
741
739
|
{
|
|
742
740
|
description: n,
|
|
743
|
-
drawerType:
|
|
741
|
+
drawerType: u,
|
|
744
742
|
isDashboard: !0,
|
|
745
743
|
sx: { backgroundColor: "background.paper" },
|
|
746
744
|
title: o
|
|
@@ -748,12 +746,12 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
748
746
|
)
|
|
749
747
|
] })
|
|
750
748
|
] }) }) : /* @__PURE__ */ e(te, {});
|
|
751
|
-
},
|
|
749
|
+
}, Lt = v(Po), Wo = ({
|
|
752
750
|
onClick: t,
|
|
753
751
|
shouldShowBalance: o = !0,
|
|
754
752
|
loadAccounts: n
|
|
755
753
|
}) => {
|
|
756
|
-
const { config: r } = je(), { accounts: s } =
|
|
754
|
+
const { config: r } = je(), { accounts: s } = S(), { selectedAccounts: i } = q(), c = m.useCallback(
|
|
757
755
|
(_) => {
|
|
758
756
|
t?.(_);
|
|
759
757
|
},
|
|
@@ -765,37 +763,37 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
765
763
|
[i, n]
|
|
766
764
|
);
|
|
767
765
|
return i.length ? /* @__PURE__ */ e(m.Fragment, { children: l.map((_) => {
|
|
768
|
-
const { accountsForType: d, totalBalanceForType:
|
|
769
|
-
(
|
|
766
|
+
const { accountsForType: d, totalBalanceForType: h } = i.reduce(
|
|
767
|
+
(u, y) => (y.account_type === _ && (u.accountsForType.push(y), u.totalBalanceForType += y.balance || 0), u),
|
|
770
768
|
{ accountsForType: [], totalBalanceForType: 0 }
|
|
771
769
|
);
|
|
772
770
|
return /* @__PURE__ */ a(
|
|
773
|
-
|
|
771
|
+
Ge,
|
|
774
772
|
{
|
|
775
|
-
subheader: /* @__PURE__ */ e(
|
|
773
|
+
subheader: /* @__PURE__ */ e(zn, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */ a(p, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
776
774
|
/* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: s.account_types[_] }),
|
|
777
|
-
o && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: W(
|
|
775
|
+
o && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: W(h, "0,0.00") })
|
|
778
776
|
] }) }),
|
|
779
777
|
sx: { bgcolor: "background.paper" },
|
|
780
778
|
children: [
|
|
781
|
-
d.map((
|
|
782
|
-
const { firstValue: f } =
|
|
779
|
+
d.map((u, y) => {
|
|
780
|
+
const { firstValue: f } = wt(u, s), w = St(u, {
|
|
783
781
|
allowNickname: r?.show_account_nicknames_in_master
|
|
784
|
-
}),
|
|
785
|
-
/* @__PURE__ */ e(
|
|
782
|
+
}), x = /* @__PURE__ */ a(E, { children: [
|
|
783
|
+
/* @__PURE__ */ e(vt, { children: /* @__PURE__ */ e(lt, { alt: "MX", institutionGuid: u.institution_guid ?? "" }) }),
|
|
786
784
|
/* @__PURE__ */ e(
|
|
787
785
|
be,
|
|
788
786
|
{
|
|
789
|
-
primary: `${w}${
|
|
787
|
+
primary: `${w}${u.account_number ? ` *${u.account_number}` : ""}`,
|
|
790
788
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
791
789
|
}
|
|
792
790
|
),
|
|
793
791
|
o && /* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: W(f ?? 0, "0,0.00") })
|
|
794
792
|
] });
|
|
795
793
|
return /* @__PURE__ */ a(m.Fragment, { children: [
|
|
796
|
-
/* @__PURE__ */ e(ye, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(
|
|
794
|
+
/* @__PURE__ */ e(ye, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e($n, { onClick: () => c(u), children: x }) : x }),
|
|
797
795
|
y !== d.length - 1 && /* @__PURE__ */ e(le, { variant: "inset" })
|
|
798
|
-
] },
|
|
796
|
+
] }, u.guid);
|
|
799
797
|
}),
|
|
800
798
|
/* @__PURE__ */ e(le, {})
|
|
801
799
|
]
|
|
@@ -803,37 +801,37 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
803
801
|
_
|
|
804
802
|
);
|
|
805
803
|
}) }) : null;
|
|
806
|
-
}, Bt = v(
|
|
807
|
-
const n =
|
|
804
|
+
}, Bt = v(Wo), $o = ({ loadAccounts: t, loadMoreLabel: o }) => {
|
|
805
|
+
const n = G(), { config: r } = je(), { connect: s, finstrong: i } = S(), { accounts: c } = S(), { selectedAccounts: l } = q(), [_, d] = m.useState(!1), [h, u] = m.useState(!1), y = m.useMemo(
|
|
808
806
|
() => l.filter(
|
|
809
|
-
(
|
|
807
|
+
(x) => t ? t.includes(x.account_type) : !0
|
|
810
808
|
),
|
|
811
809
|
[l, t]
|
|
812
|
-
), f = m.useMemo(() => y.slice(0, 3), [y]), w = (
|
|
813
|
-
const { firstValue: D } =
|
|
810
|
+
), f = m.useMemo(() => y.slice(0, 3), [y]), w = (x) => {
|
|
811
|
+
const { firstValue: D } = wt(x, c);
|
|
814
812
|
return D;
|
|
815
813
|
};
|
|
816
|
-
return y.length >= 1 ? /* @__PURE__ */ a(
|
|
817
|
-
/* @__PURE__ */ e(k, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: f.map((
|
|
814
|
+
return y.length >= 1 ? /* @__PURE__ */ a(E, { children: [
|
|
815
|
+
/* @__PURE__ */ e(k, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: f.map((x, D) => /* @__PURE__ */ a(m.Fragment, { children: [
|
|
818
816
|
/* @__PURE__ */ a(ye, { sx: { px: 24 }, children: [
|
|
819
|
-
/* @__PURE__ */ e(
|
|
817
|
+
/* @__PURE__ */ e(vt, { children: /* @__PURE__ */ e(lt, { alt: "MX", institutionGuid: x.institution_guid ?? "" }) }),
|
|
820
818
|
/* @__PURE__ */ e(
|
|
821
819
|
be,
|
|
822
820
|
{
|
|
823
|
-
primary: `${
|
|
821
|
+
primary: `${St(x, {
|
|
824
822
|
allowNickname: r?.show_account_nicknames_in_master
|
|
825
823
|
})}
|
|
826
|
-
${
|
|
824
|
+
${x.account_number ? ` *${x.account_number}` : ""}`,
|
|
827
825
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
828
826
|
}
|
|
829
827
|
),
|
|
830
|
-
/* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: W(w(
|
|
828
|
+
/* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: W(w(x), "0,0.00") })
|
|
831
829
|
] }),
|
|
832
830
|
D < f.length - 1 && /* @__PURE__ */ e(le, { variant: "inset" })
|
|
833
|
-
] },
|
|
834
|
-
y.length > 3 && /* @__PURE__ */ a(
|
|
831
|
+
] }, x.guid)) }),
|
|
832
|
+
y.length > 3 && /* @__PURE__ */ a(E, { children: [
|
|
835
833
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
836
|
-
|
|
834
|
+
P,
|
|
837
835
|
{
|
|
838
836
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
839
837
|
onClick: () => d(!0),
|
|
@@ -848,11 +846,11 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
848
846
|
) }),
|
|
849
847
|
/* @__PURE__ */ e(oe, { isOpen: _, onClose: () => d(!1), title: i.accounts, children: /* @__PURE__ */ e(Bt, { loadAccounts: t }) })
|
|
850
848
|
] })
|
|
851
|
-
] }) : /* @__PURE__ */ a(
|
|
849
|
+
] }) : /* @__PURE__ */ a(E, { children: [
|
|
852
850
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
853
|
-
|
|
851
|
+
P,
|
|
854
852
|
{
|
|
855
|
-
onClick: () =>
|
|
853
|
+
onClick: () => u(!0),
|
|
856
854
|
size: "small",
|
|
857
855
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
858
856
|
variant: "contained",
|
|
@@ -862,13 +860,13 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
862
860
|
/* @__PURE__ */ e(
|
|
863
861
|
re,
|
|
864
862
|
{
|
|
865
|
-
onClose: () =>
|
|
866
|
-
showConnectWidget:
|
|
863
|
+
onClose: () => u(!1),
|
|
864
|
+
showConnectWidget: h,
|
|
867
865
|
title: s.mini_title
|
|
868
866
|
}
|
|
869
867
|
)
|
|
870
868
|
] });
|
|
871
|
-
},
|
|
869
|
+
}, Pt = v($o), Ce = ({ balance: t, title: o, sx: n }) => /* @__PURE__ */ a(
|
|
872
870
|
p,
|
|
873
871
|
{
|
|
874
872
|
sx: {
|
|
@@ -887,8 +885,8 @@ const Oo = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
887
885
|
}
|
|
888
886
|
);
|
|
889
887
|
var O = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(O || {}), Me = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(Me || {}), Z = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(Z || {});
|
|
890
|
-
const
|
|
891
|
-
const { finstrong: o } =
|
|
888
|
+
const zo = ({ total: t }) => {
|
|
889
|
+
const { finstrong: o } = S(), n = [
|
|
892
890
|
{ id: Z.Monthly, label: o.maintain_emergency_savings_monthly },
|
|
893
891
|
{ id: Z.BiWeekly, label: o.maintain_emergency_savings_bi_weekly },
|
|
894
892
|
{ id: Z.Weekly, label: o.maintain_emergency_savings_weekly },
|
|
@@ -902,30 +900,30 @@ const Eo = ({ total: t }) => {
|
|
|
902
900
|
{ id: Me.Months, label: o.maintain_emergency_savings_months },
|
|
903
901
|
{ id: Me.Years, label: o.maintain_emergency_savings_years },
|
|
904
902
|
{ id: Me.Days, label: o.maintain_emergency_savings_days }
|
|
905
|
-
], i = Math.ceil((t + 1) / 1e3) * 1e3, [c, l] = m.useState(0), [_, d] = m.useState(tt(t)), [
|
|
903
|
+
], i = Math.ceil((t + 1) / 1e3) * 1e3, [c, l] = m.useState(0), [_, d] = m.useState(tt(t)), [h, u] = m.useState(
|
|
906
904
|
tt(t)
|
|
907
|
-
), [y, f] = m.useState(i), [w,
|
|
905
|
+
), [y, f] = m.useState(i), [w, x] = m.useState(vn(t)), [D, C] = m.useState(Me.Months);
|
|
908
906
|
m.useEffect(() => {
|
|
909
907
|
l(
|
|
910
908
|
nt({
|
|
911
|
-
contribution:
|
|
909
|
+
contribution: h,
|
|
912
910
|
goalAmount: y,
|
|
913
911
|
goalPeriod: w,
|
|
914
912
|
targetPeriod: D,
|
|
915
913
|
totalSaved: t
|
|
916
914
|
})
|
|
917
|
-
), d(
|
|
915
|
+
), d(h);
|
|
918
916
|
}, []);
|
|
919
917
|
const g = (b) => {
|
|
920
918
|
b.preventDefault(), l(
|
|
921
919
|
nt({
|
|
922
|
-
contribution:
|
|
920
|
+
contribution: h,
|
|
923
921
|
goalAmount: y,
|
|
924
922
|
goalPeriod: w,
|
|
925
923
|
targetPeriod: D,
|
|
926
924
|
totalSaved: t
|
|
927
925
|
})
|
|
928
|
-
), d(
|
|
926
|
+
), d(h);
|
|
929
927
|
};
|
|
930
928
|
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e("form", { onSubmit: g, children: /* @__PURE__ */ a(p, { sx: { gap: 24, pb: 24, pt: 16, px: 16 }, children: [
|
|
931
929
|
/* @__PURE__ */ e(
|
|
@@ -942,7 +940,7 @@ const Eo = ({ total: t }) => {
|
|
|
942
940
|
}
|
|
943
941
|
),
|
|
944
942
|
/* @__PURE__ */ e(
|
|
945
|
-
|
|
943
|
+
Re,
|
|
946
944
|
{
|
|
947
945
|
"aria-label": o.maintain_emergency_savings_savings_goal,
|
|
948
946
|
helperText: j(
|
|
@@ -964,15 +962,15 @@ const Eo = ({ total: t }) => {
|
|
|
964
962
|
rt,
|
|
965
963
|
{
|
|
966
964
|
label: o.maintain_emergency_savings_how_often_contribute,
|
|
967
|
-
onChange:
|
|
965
|
+
onChange: u,
|
|
968
966
|
options: n,
|
|
969
967
|
required: !0,
|
|
970
|
-
value:
|
|
968
|
+
value: h
|
|
971
969
|
}
|
|
972
970
|
),
|
|
973
971
|
/* @__PURE__ */ a(p, { sx: { flexDirection: "row" }, children: [
|
|
974
972
|
/* @__PURE__ */ e(
|
|
975
|
-
|
|
973
|
+
Re,
|
|
976
974
|
{
|
|
977
975
|
"aria-label": o.maintain_emergency_savings_meet_your_goal_within,
|
|
978
976
|
fullWidth: !0,
|
|
@@ -982,7 +980,7 @@ const Eo = ({ total: t }) => {
|
|
|
982
980
|
},
|
|
983
981
|
label: o.maintain_emergency_savings_meet_your_goal_within,
|
|
984
982
|
onChange: (b) => {
|
|
985
|
-
isNaN(Number(b.target.value)) ||
|
|
983
|
+
isNaN(Number(b.target.value)) || x(Number(b.target.value));
|
|
986
984
|
},
|
|
987
985
|
sx: {
|
|
988
986
|
"& .MuiInputBase-root": {
|
|
@@ -1012,10 +1010,10 @@ const Eo = ({ total: t }) => {
|
|
|
1012
1010
|
}
|
|
1013
1011
|
)
|
|
1014
1012
|
] }),
|
|
1015
|
-
/* @__PURE__ */ e(
|
|
1013
|
+
/* @__PURE__ */ e(P, { fullWidth: !0, onClick: g, type: "submit", variant: "contained", children: o.maintain_emergency_savings_calculate })
|
|
1016
1014
|
] }) }) });
|
|
1017
|
-
},
|
|
1018
|
-
const { savingsAccounts: t } = Se(), { finstrong: o } =
|
|
1015
|
+
}, Eo = v(zo), Go = () => {
|
|
1016
|
+
const { savingsAccounts: t } = Se(), { finstrong: o } = S(), [n, r] = m.useState(!1), s = m.useMemo(
|
|
1019
1017
|
() => t.reduce((i, c) => i + (c.balance ?? 0), 0),
|
|
1020
1018
|
[t]
|
|
1021
1019
|
);
|
|
@@ -1023,14 +1021,14 @@ const Eo = ({ total: t }) => {
|
|
|
1023
1021
|
/* @__PURE__ */ e(V, { sx: { bgcolor: "background.paper", p: 16 }, children: /* @__PURE__ */ a(p, { sx: { gap: 16 }, children: [
|
|
1024
1022
|
/* @__PURE__ */ e(Ce, { balance: s, title: o.maintain_emergency_savings_your_savings }),
|
|
1025
1023
|
t.length ? /* @__PURE__ */ e(
|
|
1026
|
-
|
|
1024
|
+
Pt,
|
|
1027
1025
|
{
|
|
1028
|
-
loadAccounts: [
|
|
1026
|
+
loadAccounts: [Ee.SAVINGS],
|
|
1029
1027
|
loadMoreLabel: o.connect_more_accounts_button
|
|
1030
1028
|
}
|
|
1031
|
-
) : /* @__PURE__ */ e(
|
|
1029
|
+
) : /* @__PURE__ */ e(P, { onClick: () => r(!0), variant: "contained", children: o.connect_more_accounts_button })
|
|
1032
1030
|
] }) }),
|
|
1033
|
-
/* @__PURE__ */ e(
|
|
1031
|
+
/* @__PURE__ */ e(Eo, { total: s }),
|
|
1034
1032
|
/* @__PURE__ */ e(
|
|
1035
1033
|
re,
|
|
1036
1034
|
{
|
|
@@ -1040,7 +1038,7 @@ const Eo = ({ total: t }) => {
|
|
|
1040
1038
|
}
|
|
1041
1039
|
)
|
|
1042
1040
|
] });
|
|
1043
|
-
},
|
|
1041
|
+
}, Ho = v(Go), We = v(
|
|
1044
1042
|
({ label: t, value: o, status: n, bottomComponent: r, statusBarData: s = [] }) => {
|
|
1045
1043
|
const i = {
|
|
1046
1044
|
GOOD: {
|
|
@@ -1087,27 +1085,27 @@ const Eo = ({ total: t }) => {
|
|
|
1087
1085
|
},
|
|
1088
1086
|
children: [
|
|
1089
1087
|
/* @__PURE__ */ e(Le, { children: o }),
|
|
1090
|
-
/* @__PURE__ */ e(
|
|
1088
|
+
/* @__PURE__ */ e(Pe, { status: n })
|
|
1091
1089
|
]
|
|
1092
1090
|
}
|
|
1093
1091
|
)
|
|
1094
1092
|
] }),
|
|
1095
1093
|
/* @__PURE__ */ a(p, { children: [
|
|
1096
|
-
/* @__PURE__ */ e(
|
|
1094
|
+
/* @__PURE__ */ e(Gn, { data: c, height: 16 }),
|
|
1097
1095
|
r
|
|
1098
1096
|
] })
|
|
1099
1097
|
]
|
|
1100
1098
|
}
|
|
1101
1099
|
);
|
|
1102
1100
|
}
|
|
1103
|
-
),
|
|
1101
|
+
), No = {
|
|
1104
1102
|
sticky_label: "You have saved"
|
|
1105
|
-
},
|
|
1106
|
-
const { healthScore: t } =
|
|
1103
|
+
}, jo = ["$0", "$250", "$500", "$750", "$1k"], Ko = () => {
|
|
1104
|
+
const { healthScore: t } = F(), o = Math.round(t.emergency_savings_on_hand ?? NaN) || null, n = wn(o), r = gt(o);
|
|
1107
1105
|
return /* @__PURE__ */ e(
|
|
1108
1106
|
We,
|
|
1109
1107
|
{
|
|
1110
|
-
bottomComponent: /* @__PURE__ */ e(p, { sx: { flexDirection: "row", justifyContent: "space-between" }, children:
|
|
1108
|
+
bottomComponent: /* @__PURE__ */ e(p, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: jo.map((s) => /* @__PURE__ */ a(p, { sx: { alignItems: "center", height: 24, width: 30 }, children: [
|
|
1111
1109
|
/* @__PURE__ */ e(
|
|
1112
1110
|
le,
|
|
1113
1111
|
{
|
|
@@ -1121,7 +1119,7 @@ const Eo = ({ total: t }) => {
|
|
|
1121
1119
|
),
|
|
1122
1120
|
/* @__PURE__ */ e(I, { variant: "caption", children: s })
|
|
1123
1121
|
] }, s)) }),
|
|
1124
|
-
label:
|
|
1122
|
+
label: No.sticky_label,
|
|
1125
1123
|
status: r,
|
|
1126
1124
|
statusBarData: [
|
|
1127
1125
|
{
|
|
@@ -1131,24 +1129,24 @@ const Eo = ({ total: t }) => {
|
|
|
1131
1129
|
value: W(o ?? 0, "0,0.00")
|
|
1132
1130
|
}
|
|
1133
1131
|
);
|
|
1134
|
-
},
|
|
1132
|
+
}, Vo = v(Ko), $e = ({
|
|
1135
1133
|
transactions: t = [],
|
|
1136
1134
|
amountColor: o = "success.main",
|
|
1137
1135
|
amountPosition: n = "center",
|
|
1138
|
-
formatDate: r =
|
|
1136
|
+
formatDate: r = Dt,
|
|
1139
1137
|
secondaryIcon: s
|
|
1140
1138
|
}) => {
|
|
1141
|
-
const i =
|
|
1139
|
+
const i = G(), { connect: c, finstrong: l, categories: _ } = S(), [d, h] = m.useState(!1), [u, y] = m.useState(!1), { getCategoryName: f } = Ke(), w = 3, x = t.length > w, D = t.length - w;
|
|
1142
1140
|
let C = t;
|
|
1143
|
-
return
|
|
1141
|
+
return x && (C = t.map((g) => ({
|
|
1144
1142
|
...g,
|
|
1145
1143
|
category: _.default_categories[g.top_level_category_guid]?.replace(
|
|
1146
1144
|
/&/g,
|
|
1147
1145
|
"&"
|
|
1148
1146
|
) ?? f(g.top_level_category_guid)
|
|
1149
|
-
})).sort((g, b) => b.date - g.date)), !t || t.length === 0 ? /* @__PURE__ */ a(
|
|
1147
|
+
})).sort((g, b) => b.date - g.date)), !t || t.length === 0 ? /* @__PURE__ */ a(E, { children: [
|
|
1150
1148
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
1151
|
-
|
|
1149
|
+
P,
|
|
1152
1150
|
{
|
|
1153
1151
|
onClick: () => y(!0),
|
|
1154
1152
|
size: "small",
|
|
@@ -1161,7 +1159,7 @@ const Eo = ({ total: t }) => {
|
|
|
1161
1159
|
re,
|
|
1162
1160
|
{
|
|
1163
1161
|
onClose: () => y(!1),
|
|
1164
|
-
showConnectWidget:
|
|
1162
|
+
showConnectWidget: u,
|
|
1165
1163
|
title: c.mini_title
|
|
1166
1164
|
}
|
|
1167
1165
|
)
|
|
@@ -1178,7 +1176,7 @@ const Eo = ({ total: t }) => {
|
|
|
1178
1176
|
},
|
|
1179
1177
|
children: [
|
|
1180
1178
|
/* @__PURE__ */ e(p, { sx: { pb: 14 }, children: /* @__PURE__ */ e(
|
|
1181
|
-
|
|
1179
|
+
rn,
|
|
1182
1180
|
{
|
|
1183
1181
|
categoryGuid: g.top_level_category_guid || "",
|
|
1184
1182
|
merchantGuid: g.merchant_guid || "",
|
|
@@ -1217,12 +1215,12 @@ const Eo = ({ total: t }) => {
|
|
|
1217
1215
|
},
|
|
1218
1216
|
b
|
|
1219
1217
|
)) }),
|
|
1220
|
-
|
|
1218
|
+
x && /* @__PURE__ */ a(E, { children: [
|
|
1221
1219
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
1222
|
-
|
|
1220
|
+
P,
|
|
1223
1221
|
{
|
|
1224
1222
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
1225
|
-
onClick: () =>
|
|
1223
|
+
onClick: () => h(!0),
|
|
1226
1224
|
size: "small",
|
|
1227
1225
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1228
1226
|
children: /* @__PURE__ */ a(I, { bold: !0, variant: "body1", children: [
|
|
@@ -1236,22 +1234,22 @@ const Eo = ({ total: t }) => {
|
|
|
1236
1234
|
oe,
|
|
1237
1235
|
{
|
|
1238
1236
|
isOpen: d,
|
|
1239
|
-
onClose: () =>
|
|
1237
|
+
onClose: () => h(!1),
|
|
1240
1238
|
title: l.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_transactions,
|
|
1241
|
-
children: /* @__PURE__ */ e(
|
|
1239
|
+
children: /* @__PURE__ */ e(Hn, { transaction: C })
|
|
1242
1240
|
}
|
|
1243
1241
|
)
|
|
1244
1242
|
] })
|
|
1245
1243
|
] });
|
|
1246
|
-
},
|
|
1244
|
+
}, Yo = () => {
|
|
1247
1245
|
const {
|
|
1248
1246
|
finstrong: {
|
|
1249
1247
|
key_indicators_spend: { pay_bills_on_time_drawer: t }
|
|
1250
1248
|
}
|
|
1251
|
-
} =
|
|
1249
|
+
} = S(), { getSpendingFeeTransactions: o, allTransactions: n } = F();
|
|
1252
1250
|
return m.useEffect(() => {
|
|
1253
1251
|
o().finally();
|
|
1254
|
-
}, []), /* @__PURE__ */ e(
|
|
1252
|
+
}, []), /* @__PURE__ */ e(E, { children: n.spendingFee.length === 0 ? /* @__PURE__ */ a(
|
|
1255
1253
|
V,
|
|
1256
1254
|
{
|
|
1257
1255
|
sx: {
|
|
@@ -1285,7 +1283,7 @@ const Eo = ({ total: t }) => {
|
|
|
1285
1283
|
{
|
|
1286
1284
|
amountColor: "text.primary",
|
|
1287
1285
|
amountPosition: "flex-start",
|
|
1288
|
-
formatDate: (r) =>
|
|
1286
|
+
formatDate: (r) => Bn(new Date(r * 1e3), Pn.MONTH_DAY),
|
|
1289
1287
|
secondaryIcon: /* @__PURE__ */ e(dn, { color: "error", filled: !0, size: 12 }),
|
|
1290
1288
|
transactions: n.spendingFee
|
|
1291
1289
|
}
|
|
@@ -1293,8 +1291,8 @@ const Eo = ({ total: t }) => {
|
|
|
1293
1291
|
]
|
|
1294
1292
|
}
|
|
1295
1293
|
) });
|
|
1296
|
-
},
|
|
1297
|
-
const { healthScore: t } =
|
|
1294
|
+
}, Xo = v(Yo), qo = () => {
|
|
1295
|
+
const { healthScore: t } = F(), { finstrong: o } = S(), { key_indicators_spend: n } = o, { pay_bills_on_time_drawer: r } = n, s = kn(t.spending_fee_transaction_count);
|
|
1298
1296
|
return /* @__PURE__ */ a(
|
|
1299
1297
|
p,
|
|
1300
1298
|
{
|
|
@@ -1313,13 +1311,13 @@ const Eo = ({ total: t }) => {
|
|
|
1313
1311
|
" ",
|
|
1314
1312
|
r.pay_bills_on_time_sticky_fee_count
|
|
1315
1313
|
] }),
|
|
1316
|
-
/* @__PURE__ */ e(
|
|
1314
|
+
/* @__PURE__ */ e(Pe, { status: s })
|
|
1317
1315
|
] })
|
|
1318
1316
|
]
|
|
1319
1317
|
}
|
|
1320
1318
|
);
|
|
1321
|
-
},
|
|
1322
|
-
const { savingsAndCheckingAccountsBalance: t } = Se(), { finstrong: o } =
|
|
1319
|
+
}, Uo = v(qo), Qo = () => {
|
|
1320
|
+
const { savingsAndCheckingAccountsBalance: t } = Se(), { finstrong: o } = S();
|
|
1323
1321
|
return /* @__PURE__ */ a(p, { gap: 16, sx: { p: 16 }, children: [
|
|
1324
1322
|
/* @__PURE__ */ e(
|
|
1325
1323
|
Ce,
|
|
@@ -1329,21 +1327,21 @@ const Eo = ({ total: t }) => {
|
|
|
1329
1327
|
}
|
|
1330
1328
|
),
|
|
1331
1329
|
/* @__PURE__ */ e(
|
|
1332
|
-
|
|
1330
|
+
Pt,
|
|
1333
1331
|
{
|
|
1334
|
-
loadAccounts: [
|
|
1332
|
+
loadAccounts: [Ee.SAVINGS, Ee.CHECKING],
|
|
1335
1333
|
loadMoreLabel: o.more_accounts
|
|
1336
1334
|
}
|
|
1337
1335
|
)
|
|
1338
1336
|
] });
|
|
1339
|
-
},
|
|
1340
|
-
const { finstrong: t } =
|
|
1337
|
+
}, Zo = v(Qo), Jo = () => {
|
|
1338
|
+
const { finstrong: t } = S(), {
|
|
1341
1339
|
isSpendingInitialized: o,
|
|
1342
1340
|
healthScore: n,
|
|
1343
1341
|
allTransactions: r,
|
|
1344
1342
|
loadSpendTransactions: s,
|
|
1345
1343
|
loadDebtSpend: i
|
|
1346
|
-
} =
|
|
1344
|
+
} = F();
|
|
1347
1345
|
m.useEffect(() => {
|
|
1348
1346
|
o || (s().finally(), i().finally());
|
|
1349
1347
|
}, [o]);
|
|
@@ -1361,9 +1359,9 @@ const Eo = ({ total: t }) => {
|
|
|
1361
1359
|
),
|
|
1362
1360
|
/* @__PURE__ */ e($e, { amountColor: "text.primary", transactions: c })
|
|
1363
1361
|
] }) : /* @__PURE__ */ e(te, {});
|
|
1364
|
-
},
|
|
1365
|
-
const [t, o] = m.useState(0), { finstrong: n } =
|
|
1366
|
-
return /* @__PURE__ */ a(
|
|
1362
|
+
}, er = v(Jo), tr = () => {
|
|
1363
|
+
const [t, o] = m.useState(0), { finstrong: n } = S();
|
|
1364
|
+
return /* @__PURE__ */ a(E, { children: [
|
|
1367
1365
|
/* @__PURE__ */ a(V, { children: [
|
|
1368
1366
|
/* @__PURE__ */ a(
|
|
1369
1367
|
Xe,
|
|
@@ -1395,13 +1393,13 @@ const Eo = ({ total: t }) => {
|
|
|
1395
1393
|
]
|
|
1396
1394
|
}
|
|
1397
1395
|
),
|
|
1398
|
-
/* @__PURE__ */ e(ce, { index: 0, name: "available-details", value: t, children: /* @__PURE__ */ e(
|
|
1399
|
-
/* @__PURE__ */ e(ce, { index: 1, name: "spending-details", value: t, children: /* @__PURE__ */ e(
|
|
1396
|
+
/* @__PURE__ */ e(ce, { index: 0, name: "available-details", value: t, children: /* @__PURE__ */ e(Zo, {}) }),
|
|
1397
|
+
/* @__PURE__ */ e(ce, { index: 1, name: "spending-details", value: t, children: /* @__PURE__ */ e(er, {}) })
|
|
1400
1398
|
] }),
|
|
1401
1399
|
/* @__PURE__ */ e(Ue, { chartFor: "savingsOverTime" })
|
|
1402
1400
|
] });
|
|
1403
|
-
},
|
|
1404
|
-
const { finstrong: t } =
|
|
1401
|
+
}, nr = v(tr), or = () => {
|
|
1402
|
+
const { finstrong: t } = S(), { healthScore: o } = F(), n = o.months_of_cash_on_hand, r = yt(n ? n * 30 : null), s = 183 / 6, i = Math.floor(n), c = Math.round((n - i) * s), l = n / 6 * 100;
|
|
1405
1403
|
return /* @__PURE__ */ e(
|
|
1406
1404
|
We,
|
|
1407
1405
|
{
|
|
@@ -1450,8 +1448,8 @@ const Eo = ({ total: t }) => {
|
|
|
1450
1448
|
value: j(t.key_indicators_save.drawer_progress_bar_value, i, c)
|
|
1451
1449
|
}
|
|
1452
1450
|
);
|
|
1453
|
-
},
|
|
1454
|
-
const { healthScore: t } =
|
|
1451
|
+
}, rr = v(or), ar = () => {
|
|
1452
|
+
const { healthScore: t } = F(), { finstrong: o } = S(), n = Oe(t.debt_to_income_ratio), r = bt(n);
|
|
1455
1453
|
return /* @__PURE__ */ e(
|
|
1456
1454
|
We,
|
|
1457
1455
|
{
|
|
@@ -1530,8 +1528,8 @@ const Eo = ({ total: t }) => {
|
|
|
1530
1528
|
value: W(t.ninety_day_debt_spend, "0,0.00")
|
|
1531
1529
|
}
|
|
1532
1530
|
);
|
|
1533
|
-
},
|
|
1534
|
-
const { healthScore: t, allTransactions: o } =
|
|
1531
|
+
}, ir = v(ar), sr = () => {
|
|
1532
|
+
const { healthScore: t, allTransactions: o } = F(), { connect: n, finstrong: r } = S(), [s, i] = m.useState(!1);
|
|
1535
1533
|
return /* @__PURE__ */ a(p, { gap: 16, sx: { p: 16 }, children: [
|
|
1536
1534
|
/* @__PURE__ */ e(
|
|
1537
1535
|
Ce,
|
|
@@ -1545,7 +1543,7 @@ const Eo = ({ total: t }) => {
|
|
|
1545
1543
|
// TODO: Need to add More Transactions functionality
|
|
1546
1544
|
/* @__PURE__ */ e($e, { transactions: o.income.map((c) => c.transaction) })
|
|
1547
1545
|
) : /* @__PURE__ */ e(
|
|
1548
|
-
|
|
1546
|
+
P,
|
|
1549
1547
|
{
|
|
1550
1548
|
onClick: () => {
|
|
1551
1549
|
i(!0);
|
|
@@ -1563,8 +1561,8 @@ const Eo = ({ total: t }) => {
|
|
|
1563
1561
|
}
|
|
1564
1562
|
)
|
|
1565
1563
|
] });
|
|
1566
|
-
},
|
|
1567
|
-
const { allTransactions: t, healthScore: o } =
|
|
1564
|
+
}, cr = v(sr), lr = () => {
|
|
1565
|
+
const { allTransactions: t, healthScore: o } = F(), { connect: n, finstrong: r } = S(), [s, i] = m.useState(!1);
|
|
1568
1566
|
return /* @__PURE__ */ a(p, { gap: 16, sx: { p: 16 }, children: [
|
|
1569
1567
|
/* @__PURE__ */ e(
|
|
1570
1568
|
Ce,
|
|
@@ -1584,7 +1582,7 @@ const Eo = ({ total: t }) => {
|
|
|
1584
1582
|
}
|
|
1585
1583
|
)
|
|
1586
1584
|
) : /* @__PURE__ */ e(
|
|
1587
|
-
|
|
1585
|
+
P,
|
|
1588
1586
|
{
|
|
1589
1587
|
onClick: () => {
|
|
1590
1588
|
i(!0);
|
|
@@ -1602,50 +1600,55 @@ const Eo = ({ total: t }) => {
|
|
|
1602
1600
|
}
|
|
1603
1601
|
)
|
|
1604
1602
|
] });
|
|
1605
|
-
},
|
|
1603
|
+
}, dr = v(lr), pr = ({
|
|
1606
1604
|
color: t,
|
|
1607
1605
|
data: o,
|
|
1608
1606
|
series: n,
|
|
1609
1607
|
style: r,
|
|
1610
1608
|
...s
|
|
1611
1609
|
}) => {
|
|
1612
|
-
const i =
|
|
1613
|
-
width: r.width
|
|
1614
|
-
});
|
|
1610
|
+
const i = G(), c = m.useRef(null), l = m.useRef(null), [_, d] = m.useState(r.width || 0);
|
|
1615
1611
|
m.useLayoutEffect(() => {
|
|
1616
|
-
|
|
1612
|
+
d(r.width || 0);
|
|
1613
|
+
}, [r.width]), m.useLayoutEffect(() => {
|
|
1614
|
+
const x = new ResizeObserver(() => {
|
|
1617
1615
|
window.requestAnimationFrame(() => {
|
|
1618
1616
|
if (c.current) {
|
|
1619
|
-
const { width:
|
|
1620
|
-
|
|
1617
|
+
const { width: D } = c.current.getBoundingClientRect(), C = D / 2, g = c.current.querySelector("text");
|
|
1618
|
+
g && g.setAttribute("transform", `translate(${C}, -8)`);
|
|
1621
1619
|
}
|
|
1622
1620
|
});
|
|
1623
1621
|
});
|
|
1624
|
-
return c.current &&
|
|
1625
|
-
c.current &&
|
|
1622
|
+
return c.current && x.observe(c.current), () => {
|
|
1623
|
+
c.current && x.unobserve(c.current);
|
|
1626
1624
|
};
|
|
1627
1625
|
}, []);
|
|
1628
|
-
const { formattedComparison:
|
|
1626
|
+
const { formattedComparison: h, formattedMain: u } = o[n.index], y = n.type === 0 ? u : h, f = {
|
|
1627
|
+
...r,
|
|
1628
|
+
transition: "all 0.3s ease-in-out"
|
|
1629
|
+
}, w = `translate(${_ / 2}, -5)`;
|
|
1629
1630
|
return /* @__PURE__ */ a("g", { children: [
|
|
1630
|
-
/* @__PURE__ */ e(
|
|
1631
|
+
/* @__PURE__ */ e("rect", { ...s, fill: t, ref: c, rx: 2, style: f }),
|
|
1631
1632
|
/* @__PURE__ */ e(
|
|
1632
|
-
|
|
1633
|
+
"text",
|
|
1633
1634
|
{
|
|
1634
1635
|
fill: i.palette.text.secondary,
|
|
1635
1636
|
fontSize: 9,
|
|
1636
1637
|
fontWeight: 400,
|
|
1638
|
+
ref: l,
|
|
1639
|
+
style: { transition: "transform 0.3s ease-in-out" },
|
|
1637
1640
|
textAnchor: "middle",
|
|
1638
|
-
transform:
|
|
1641
|
+
transform: w,
|
|
1639
1642
|
x: r.x,
|
|
1640
1643
|
y: r.y,
|
|
1641
|
-
children:
|
|
1644
|
+
children: y
|
|
1642
1645
|
}
|
|
1643
1646
|
)
|
|
1644
1647
|
] });
|
|
1645
1648
|
}, Te = (t, o = 1e3) => {
|
|
1646
1649
|
const n = Math.abs(t) >= o ? "0.[0]a" : "0";
|
|
1647
1650
|
return W(t, n);
|
|
1648
|
-
},
|
|
1651
|
+
}, Wt = ({
|
|
1649
1652
|
chartFor: t,
|
|
1650
1653
|
data: o,
|
|
1651
1654
|
title: n,
|
|
@@ -1656,9 +1659,9 @@ const Eo = ({ total: t }) => {
|
|
|
1656
1659
|
totalComparison: l,
|
|
1657
1660
|
totalMain: _
|
|
1658
1661
|
}) => {
|
|
1659
|
-
const d =
|
|
1662
|
+
const d = G(), h = Yn(d.breakpoints.down("xs")), u = m.useMemo(
|
|
1660
1663
|
() => o.sort((g, b) => g.month - b.month).map((g) => {
|
|
1661
|
-
const b =
|
|
1664
|
+
const b = Mn(g.month), L = {
|
|
1662
1665
|
spending_vs_income: {
|
|
1663
1666
|
main: g.standard_spend,
|
|
1664
1667
|
comparison: g.income,
|
|
@@ -1674,17 +1677,17 @@ const Eo = ({ total: t }) => {
|
|
|
1674
1677
|
};
|
|
1675
1678
|
return {
|
|
1676
1679
|
label: b,
|
|
1677
|
-
...
|
|
1680
|
+
...L[t]
|
|
1678
1681
|
};
|
|
1679
1682
|
}),
|
|
1680
1683
|
[o, t]
|
|
1681
1684
|
), y = {
|
|
1682
1685
|
dataKey: "label",
|
|
1683
1686
|
scaleType: "band"
|
|
1684
|
-
}, f = Math.max(...
|
|
1687
|
+
}, f = Math.max(...u.map((g) => Math.max(g.main, g.comparison))), x = Math.min(...u.map((g) => Math.min(g.main, g.comparison))) === 0 && f === 0 ? 100 : Math.ceil(f * 1.2 / 1e3) * 1e3, D = x / 3, C = {
|
|
1685
1688
|
scaleType: "linear",
|
|
1686
1689
|
min: 0,
|
|
1687
|
-
max:
|
|
1690
|
+
max: x,
|
|
1688
1691
|
tickNumber: 4,
|
|
1689
1692
|
tickMinStep: D,
|
|
1690
1693
|
valueFormatter: (g) => g === 0 ? "$0" : W(g, "0.[0]a")
|
|
@@ -1710,7 +1713,7 @@ const Eo = ({ total: t }) => {
|
|
|
1710
1713
|
children: [
|
|
1711
1714
|
/* @__PURE__ */ e(K, { children: n }),
|
|
1712
1715
|
r && /* @__PURE__ */ e(
|
|
1713
|
-
|
|
1716
|
+
P,
|
|
1714
1717
|
{
|
|
1715
1718
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
1716
1719
|
onClick: s,
|
|
@@ -1744,7 +1747,7 @@ const Eo = ({ total: t }) => {
|
|
|
1744
1747
|
i,
|
|
1745
1748
|
" "
|
|
1746
1749
|
] }),
|
|
1747
|
-
!
|
|
1750
|
+
!h && _ && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: _ })
|
|
1748
1751
|
] })
|
|
1749
1752
|
] }),
|
|
1750
1753
|
/* @__PURE__ */ a(p, { alignItems: "center", direction: "row", spacing: 8, children: [
|
|
@@ -1764,17 +1767,17 @@ const Eo = ({ total: t }) => {
|
|
|
1764
1767
|
c,
|
|
1765
1768
|
" "
|
|
1766
1769
|
] }),
|
|
1767
|
-
!
|
|
1770
|
+
!h && l && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: l })
|
|
1768
1771
|
] })
|
|
1769
1772
|
] })
|
|
1770
1773
|
] }),
|
|
1771
1774
|
/* @__PURE__ */ a(
|
|
1772
|
-
|
|
1775
|
+
qn,
|
|
1773
1776
|
{
|
|
1774
1777
|
colors: [`${d.palette.chartMono.chartMono3}`, `${d.palette.chartMono.chartMono5}`],
|
|
1775
|
-
dataset:
|
|
1778
|
+
dataset: u,
|
|
1776
1779
|
height: 240,
|
|
1777
|
-
margin: { top:
|
|
1780
|
+
margin: { top: 14, bottom: 10, right: 2, left: -2 },
|
|
1778
1781
|
series: [
|
|
1779
1782
|
{ dataKey: "main", type: "bar" },
|
|
1780
1783
|
{ dataKey: "comparison", type: "bar" }
|
|
@@ -1783,22 +1786,26 @@ const Eo = ({ total: t }) => {
|
|
|
1783
1786
|
yAxis: [C],
|
|
1784
1787
|
children: [
|
|
1785
1788
|
/* @__PURE__ */ e(
|
|
1786
|
-
|
|
1789
|
+
Xn,
|
|
1787
1790
|
{
|
|
1788
1791
|
slots: {
|
|
1789
1792
|
bar: (g) => {
|
|
1790
|
-
const { ownerState: b,
|
|
1793
|
+
const { ownerState: b, ...L } = g;
|
|
1791
1794
|
return /* @__PURE__ */ e(
|
|
1792
|
-
|
|
1795
|
+
pr,
|
|
1793
1796
|
{
|
|
1794
|
-
...
|
|
1797
|
+
...L,
|
|
1795
1798
|
color: b.color,
|
|
1796
|
-
data:
|
|
1799
|
+
data: u,
|
|
1797
1800
|
series: {
|
|
1798
1801
|
index: b.dataIndex,
|
|
1799
1802
|
type: Number(b.id.toString().split("-").pop())
|
|
1800
1803
|
},
|
|
1801
|
-
style:
|
|
1804
|
+
style: {
|
|
1805
|
+
x: g.x,
|
|
1806
|
+
y: g.y,
|
|
1807
|
+
width: g.width
|
|
1808
|
+
}
|
|
1802
1809
|
}
|
|
1803
1810
|
);
|
|
1804
1811
|
}
|
|
@@ -1851,11 +1858,11 @@ const Eo = ({ total: t }) => {
|
|
|
1851
1858
|
]
|
|
1852
1859
|
}
|
|
1853
1860
|
);
|
|
1854
|
-
},
|
|
1855
|
-
const { isIncomeInitialized: t, loadDebtSpend: o, loadIncome: n, monthlySummaries: r } =
|
|
1861
|
+
}, _r = () => {
|
|
1862
|
+
const { isIncomeInitialized: t, loadDebtSpend: o, loadIncome: n, monthlySummaries: r } = F(), [s, i] = m.useState(0), { finstrong: c } = S();
|
|
1856
1863
|
return m.useEffect(() => {
|
|
1857
1864
|
t || (o().finally(), n().finally());
|
|
1858
|
-
}, [t]), t ? /* @__PURE__ */ a(
|
|
1865
|
+
}, [t]), t ? /* @__PURE__ */ a(E, { children: [
|
|
1859
1866
|
/* @__PURE__ */ a(V, { children: [
|
|
1860
1867
|
/* @__PURE__ */ a(
|
|
1861
1868
|
Xe,
|
|
@@ -1896,7 +1903,7 @@ const Eo = ({ total: t }) => {
|
|
|
1896
1903
|
index: 0,
|
|
1897
1904
|
name: "income-details",
|
|
1898
1905
|
value: s,
|
|
1899
|
-
children: /* @__PURE__ */ e(
|
|
1906
|
+
children: /* @__PURE__ */ e(cr, {})
|
|
1900
1907
|
}
|
|
1901
1908
|
),
|
|
1902
1909
|
/* @__PURE__ */ e(
|
|
@@ -1906,13 +1913,13 @@ const Eo = ({ total: t }) => {
|
|
|
1906
1913
|
index: 1,
|
|
1907
1914
|
name: "debt-payment-details",
|
|
1908
1915
|
value: s,
|
|
1909
|
-
children: /* @__PURE__ */ e(
|
|
1916
|
+
children: /* @__PURE__ */ e(dr, {})
|
|
1910
1917
|
}
|
|
1911
1918
|
)
|
|
1912
1919
|
] }),
|
|
1913
|
-
r.length ? /* @__PURE__ */ a(
|
|
1920
|
+
r.length ? /* @__PURE__ */ a(E, { children: [
|
|
1914
1921
|
/* @__PURE__ */ e(
|
|
1915
|
-
|
|
1922
|
+
Wt,
|
|
1916
1923
|
{
|
|
1917
1924
|
chartFor: "debt_payment_vs_income",
|
|
1918
1925
|
data: r,
|
|
@@ -1922,9 +1929,9 @@ const Eo = ({ total: t }) => {
|
|
|
1922
1929
|
}
|
|
1923
1930
|
),
|
|
1924
1931
|
/* @__PURE__ */ e(Ue, { chartFor: "debtOverTime" })
|
|
1925
|
-
] }) : /* @__PURE__ */ a(
|
|
1932
|
+
] }) : /* @__PURE__ */ a(E, { children: [
|
|
1926
1933
|
/* @__PURE__ */ e(
|
|
1927
|
-
|
|
1934
|
+
Fe,
|
|
1928
1935
|
{
|
|
1929
1936
|
header: c.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_double_bar_chart_empty_state_header,
|
|
1930
1937
|
icon: "multiline_chart",
|
|
@@ -1940,7 +1947,7 @@ const Eo = ({ total: t }) => {
|
|
|
1940
1947
|
}
|
|
1941
1948
|
),
|
|
1942
1949
|
/* @__PURE__ */ e(
|
|
1943
|
-
|
|
1950
|
+
Fe,
|
|
1944
1951
|
{
|
|
1945
1952
|
header: c.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_line_chart_empty_state_header,
|
|
1946
1953
|
icon: "multiline_chart",
|
|
@@ -1957,8 +1964,8 @@ const Eo = ({ total: t }) => {
|
|
|
1957
1964
|
)
|
|
1958
1965
|
] })
|
|
1959
1966
|
] }) : /* @__PURE__ */ e(te, {});
|
|
1960
|
-
},
|
|
1961
|
-
const { healthScore: t } =
|
|
1967
|
+
}, hr = v(_r), ur = () => {
|
|
1968
|
+
const { healthScore: t } = F(), { finstrong: o } = S(), n = Oe(t.spend_to_income_ratio), r = n ?? 0, s = Object.keys(t).length === 0, i = ft(n), c = {
|
|
1962
1969
|
GOOD: [{ percentage: `${r}%` }],
|
|
1963
1970
|
FAIR: [{ percentage: "100%" }, { percentage: `${r - 100}%` }],
|
|
1964
1971
|
OFF_TRACK: [{ percentage: "100%" }, { percentage: `${r - 100}%` }],
|
|
@@ -1996,21 +2003,21 @@ const Eo = ({ total: t }) => {
|
|
|
1996
2003
|
value: s ? "$0" : W(t.ninety_day_spend, "0,0.00")
|
|
1997
2004
|
}
|
|
1998
2005
|
);
|
|
1999
|
-
},
|
|
2000
|
-
const { accounts: t } = Se(), { categories: o, dateRangeCategoryTotals: n, loadDateRangeCategoryTotals: r } = Ke(), { monthlySummaries: s, handleFinstrongWidgetPrimaryCtaClick: i } =
|
|
2006
|
+
}, mr = v(ur), gr = () => {
|
|
2007
|
+
const { accounts: t } = Se(), { categories: o, dateRangeCategoryTotals: n, loadDateRangeCategoryTotals: r } = Ke(), { monthlySummaries: s, handleFinstrongWidgetPrimaryCtaClick: i } = F(), { appDataStore: c } = On(), { finstrong: l, goals: _, spending: d } = S(), h = G(), [u, y] = m.useState("");
|
|
2001
2008
|
m.useEffect(() => {
|
|
2002
2009
|
r(
|
|
2003
2010
|
t,
|
|
2004
|
-
|
|
2005
|
-
|
|
2011
|
+
It(/* @__PURE__ */ new Date()),
|
|
2012
|
+
At(/* @__PURE__ */ new Date())
|
|
2006
2013
|
).finally();
|
|
2007
2014
|
}, [t]);
|
|
2008
2015
|
const f = m.useMemo(
|
|
2009
|
-
() =>
|
|
2016
|
+
() => Zn(o, _, h, n),
|
|
2010
2017
|
[o, n]
|
|
2011
2018
|
), w = (C) => {
|
|
2012
|
-
y(
|
|
2013
|
-
}, { totalSpending:
|
|
2019
|
+
y(u === C ? "" : C);
|
|
2020
|
+
}, { totalSpending: x, totalIncome: D } = m.useMemo(() => s?.reduce(
|
|
2014
2021
|
(C, { standard_spend: g = 0, income: b = 0 }) => ({
|
|
2015
2022
|
totalSpending: C.totalSpending + g,
|
|
2016
2023
|
totalIncome: C.totalIncome + b
|
|
@@ -2019,7 +2026,7 @@ const Eo = ({ total: t }) => {
|
|
|
2019
2026
|
), [s]);
|
|
2020
2027
|
return /* @__PURE__ */ a(p, { sx: { gap: 24 }, children: [
|
|
2021
2028
|
s.length ? /* @__PURE__ */ e(
|
|
2022
|
-
|
|
2029
|
+
Wt,
|
|
2023
2030
|
{
|
|
2024
2031
|
...c.appData.client_profile?.allow_trends_widget && {
|
|
2025
2032
|
buttonLabel: l.key_indicators_spend.spend_less_than_you_make_drawer.view_more
|
|
@@ -2031,10 +2038,10 @@ const Eo = ({ total: t }) => {
|
|
|
2031
2038
|
onClick: () => i("trends")(),
|
|
2032
2039
|
title: l.key_indicators_spend.spend_less_than_you_make_drawer.trends,
|
|
2033
2040
|
totalComparison: W(D, "0,0.00"),
|
|
2034
|
-
totalMain: W(
|
|
2041
|
+
totalMain: W(x, "0,0.00")
|
|
2035
2042
|
}
|
|
2036
2043
|
) : /* @__PURE__ */ e(
|
|
2037
|
-
|
|
2044
|
+
Fe,
|
|
2038
2045
|
{
|
|
2039
2046
|
header: l.key_indicators_spend.spend_less_than_you_make_drawer.trends_zero_state_title,
|
|
2040
2047
|
icon: "multiline_chart",
|
|
@@ -2075,7 +2082,7 @@ const Eo = ({ total: t }) => {
|
|
|
2075
2082
|
children: [
|
|
2076
2083
|
/* @__PURE__ */ e(K, { children: l.key_indicators_spend.spend_less_than_you_make_drawer.spending }),
|
|
2077
2084
|
c.appData.client_profile?.allow_spending_widget && /* @__PURE__ */ e(
|
|
2078
|
-
|
|
2085
|
+
P,
|
|
2079
2086
|
{
|
|
2080
2087
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
2081
2088
|
onClick: () => i("spending")(),
|
|
@@ -2093,27 +2100,27 @@ const Eo = ({ total: t }) => {
|
|
|
2093
2100
|
),
|
|
2094
2101
|
/* @__PURE__ */ a(p, { sx: { gap: 12, py: 16, flexDirection: "row", justifyContent: "center" }, children: [
|
|
2095
2102
|
/* @__PURE__ */ e(
|
|
2096
|
-
|
|
2103
|
+
Jn,
|
|
2097
2104
|
{
|
|
2098
2105
|
data: f,
|
|
2099
2106
|
onSelected: w,
|
|
2100
|
-
selectedId:
|
|
2107
|
+
selectedId: u,
|
|
2101
2108
|
totalLabel: d.total_spending
|
|
2102
2109
|
}
|
|
2103
2110
|
),
|
|
2104
2111
|
/* @__PURE__ */ e(
|
|
2105
|
-
|
|
2112
|
+
eo,
|
|
2106
2113
|
{
|
|
2107
2114
|
data: f,
|
|
2108
2115
|
onSelected: w,
|
|
2109
|
-
selectedId:
|
|
2116
|
+
selectedId: u
|
|
2110
2117
|
}
|
|
2111
2118
|
)
|
|
2112
2119
|
] })
|
|
2113
2120
|
]
|
|
2114
2121
|
}
|
|
2115
2122
|
) : /* @__PURE__ */ e(
|
|
2116
|
-
|
|
2123
|
+
Fe,
|
|
2117
2124
|
{
|
|
2118
2125
|
header: l.key_indicators_spend.spend_less_than_you_make_drawer.spending_zero_state_title,
|
|
2119
2126
|
icon: "donut_small",
|
|
@@ -2134,17 +2141,17 @@ const Eo = ({ total: t }) => {
|
|
|
2134
2141
|
}
|
|
2135
2142
|
)
|
|
2136
2143
|
] });
|
|
2137
|
-
},
|
|
2144
|
+
}, yr = v(gr), br = ({
|
|
2138
2145
|
drawerFor: t,
|
|
2139
2146
|
isOpen: o,
|
|
2140
2147
|
onClose: n
|
|
2141
2148
|
}) => {
|
|
2142
|
-
const { finstrong: r } =
|
|
2149
|
+
const { finstrong: r } = S(), i = {
|
|
2143
2150
|
spendLessThanYouMake: {
|
|
2144
2151
|
title: r.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_title,
|
|
2145
2152
|
description: r.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_description,
|
|
2146
|
-
stickyComponent: /* @__PURE__ */ e(
|
|
2147
|
-
content: /* @__PURE__ */ e(
|
|
2153
|
+
stickyComponent: /* @__PURE__ */ e(mr, {}),
|
|
2154
|
+
content: /* @__PURE__ */ e(yr, {}),
|
|
2148
2155
|
drawerType: "connectDrawer",
|
|
2149
2156
|
connectTitle: r.connect_your_accounts,
|
|
2150
2157
|
connectDescription: r.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
|
|
@@ -2152,16 +2159,16 @@ const Eo = ({ total: t }) => {
|
|
|
2152
2159
|
payBillsOnTime: {
|
|
2153
2160
|
title: r.key_indicators_spend.pay_bills_on_time_drawer.pay_bills_on_time_title,
|
|
2154
2161
|
description: r.key_indicators_spend.pay_bills_on_time_drawer.pay_bills_on_time_description,
|
|
2155
|
-
stickyComponent: /* @__PURE__ */ e(
|
|
2156
|
-
content: /* @__PURE__ */ e(
|
|
2162
|
+
stickyComponent: /* @__PURE__ */ e(Uo, {}),
|
|
2163
|
+
content: /* @__PURE__ */ e(Xo, {}),
|
|
2157
2164
|
drawerType: "connectDrawer",
|
|
2158
2165
|
connectTitle: r.connect_your_accounts,
|
|
2159
2166
|
connectDescription: r.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
|
|
2160
2167
|
},
|
|
2161
2168
|
maintainEmergencySavings: {
|
|
2162
|
-
content: /* @__PURE__ */ e(
|
|
2169
|
+
content: /* @__PURE__ */ e(Ho, {}),
|
|
2163
2170
|
description: r.maintain_emergency_savings_description,
|
|
2164
|
-
stickyComponent: /* @__PURE__ */ e(
|
|
2171
|
+
stickyComponent: /* @__PURE__ */ e(Vo, {}),
|
|
2165
2172
|
title: r.maintain_emergency_savings_title,
|
|
2166
2173
|
drawerType: "connectDrawer",
|
|
2167
2174
|
connectTitle: r.connect_your_accounts,
|
|
@@ -2170,30 +2177,30 @@ const Eo = ({ total: t }) => {
|
|
|
2170
2177
|
haveManageableDebt: {
|
|
2171
2178
|
title: r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_title,
|
|
2172
2179
|
description: r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_description,
|
|
2173
|
-
stickyComponent: /* @__PURE__ */ e(
|
|
2174
|
-
content: /* @__PURE__ */ e(
|
|
2180
|
+
stickyComponent: /* @__PURE__ */ e(ir, {}),
|
|
2181
|
+
content: /* @__PURE__ */ e(hr, {}),
|
|
2175
2182
|
drawerType: "connectDrawer",
|
|
2176
2183
|
connectTitle: r.dont_see_all_your_accounts,
|
|
2177
2184
|
connectDescription: r.connect_more_accounts_to_view_more_accurate_financial_picture
|
|
2178
2185
|
},
|
|
2179
2186
|
haveAGoodCreditScore: {
|
|
2180
|
-
title: /* @__PURE__ */ e(
|
|
2187
|
+
title: /* @__PURE__ */ e(Bo, {}),
|
|
2181
2188
|
description: r.credit_score_description,
|
|
2182
2189
|
stickyComponent: null,
|
|
2183
|
-
content: /* @__PURE__ */ e(
|
|
2190
|
+
content: /* @__PURE__ */ e(Fo, {})
|
|
2184
2191
|
},
|
|
2185
2192
|
saveEnoughToLiveOn: {
|
|
2186
2193
|
title: r.key_indicators_save.drawer_title,
|
|
2187
2194
|
description: r.key_indicators_save.drawer_description,
|
|
2188
|
-
stickyComponent: /* @__PURE__ */ e(
|
|
2189
|
-
content: /* @__PURE__ */ e(
|
|
2195
|
+
stickyComponent: /* @__PURE__ */ e(rr, {}),
|
|
2196
|
+
content: /* @__PURE__ */ e(nr, {}),
|
|
2190
2197
|
drawerType: "connectDrawer",
|
|
2191
2198
|
connectTitle: r.dont_see_all_your_accounts,
|
|
2192
2199
|
connectDescription: r.connect_more_accounts_to_view_more_accurate_financial_picture
|
|
2193
2200
|
}
|
|
2194
2201
|
}[t];
|
|
2195
2202
|
return /* @__PURE__ */ e(
|
|
2196
|
-
|
|
2203
|
+
Lt,
|
|
2197
2204
|
{
|
|
2198
2205
|
connectDescription: i?.connectDescription,
|
|
2199
2206
|
connectTitle: i?.connectTitle,
|
|
@@ -2208,16 +2215,16 @@ const Eo = ({ total: t }) => {
|
|
|
2208
2215
|
children: /* @__PURE__ */ e(p, { sx: { gap: 16 }, children: i.content })
|
|
2209
2216
|
}
|
|
2210
2217
|
);
|
|
2211
|
-
},
|
|
2218
|
+
}, fr = v(br), xe = ({
|
|
2212
2219
|
drawerFor: t,
|
|
2213
2220
|
title: o,
|
|
2214
2221
|
description: n,
|
|
2215
2222
|
cardState: r = "MISSING"
|
|
2216
2223
|
}) => {
|
|
2217
|
-
const { finstrong: s } =
|
|
2224
|
+
const { finstrong: s } = S(), [i, c] = m.useState(!1), l = (_) => {
|
|
2218
2225
|
(_.key === "Enter" || _.key === " ") && (_.preventDefault(), c(!0));
|
|
2219
2226
|
};
|
|
2220
|
-
return /* @__PURE__ */ a(
|
|
2227
|
+
return /* @__PURE__ */ a(E, { children: [
|
|
2221
2228
|
/* @__PURE__ */ a(
|
|
2222
2229
|
p,
|
|
2223
2230
|
{
|
|
@@ -2241,7 +2248,7 @@ const Eo = ({ total: t }) => {
|
|
|
2241
2248
|
/* @__PURE__ */ a(p, { sx: { gap: 8, minWidth: 0 }, children: [
|
|
2242
2249
|
/* @__PURE__ */ a(p, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
2243
2250
|
/* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body1", children: o }),
|
|
2244
|
-
/* @__PURE__ */ e(
|
|
2251
|
+
/* @__PURE__ */ e(Pe, { status: r })
|
|
2245
2252
|
] }),
|
|
2246
2253
|
/* @__PURE__ */ e(M, { color: "secondary", variant: "subtitle2", children: n })
|
|
2247
2254
|
] }),
|
|
@@ -2250,7 +2257,7 @@ const Eo = ({ total: t }) => {
|
|
|
2250
2257
|
}
|
|
2251
2258
|
),
|
|
2252
2259
|
/* @__PURE__ */ e(
|
|
2253
|
-
|
|
2260
|
+
fr,
|
|
2254
2261
|
{
|
|
2255
2262
|
drawerFor: t,
|
|
2256
2263
|
isOpen: i,
|
|
@@ -2258,9 +2265,9 @@ const Eo = ({ total: t }) => {
|
|
|
2258
2265
|
}
|
|
2259
2266
|
)
|
|
2260
2267
|
] });
|
|
2261
|
-
},
|
|
2262
|
-
const { finstrong: t } =
|
|
2263
|
-
const l =
|
|
2268
|
+
}, xr = () => {
|
|
2269
|
+
const { finstrong: t } = S(), { key_indicators_spend: o } = t, { healthScore: n } = F(), r = (c) => {
|
|
2270
|
+
const l = ft(c), _ = {
|
|
2264
2271
|
GOOD: o.ratio_good_description,
|
|
2265
2272
|
FAIR: o.ratio_fair_description,
|
|
2266
2273
|
OFF_TRACK: o.ratio_off_track_description,
|
|
@@ -2272,7 +2279,7 @@ const Eo = ({ total: t }) => {
|
|
|
2272
2279
|
title: o.ratio_card_title
|
|
2273
2280
|
};
|
|
2274
2281
|
}, { spendToIncomeRatio: s, spendFeeCount: i } = m.useMemo(() => {
|
|
2275
|
-
const c = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, l = r(c), _ =
|
|
2282
|
+
const c = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, l = r(c), _ = Dn(
|
|
2276
2283
|
n.spending_fee_transaction_count,
|
|
2277
2284
|
o
|
|
2278
2285
|
);
|
|
@@ -2303,38 +2310,38 @@ const Eo = ({ total: t }) => {
|
|
|
2303
2310
|
}
|
|
2304
2311
|
)
|
|
2305
2312
|
] });
|
|
2306
|
-
},
|
|
2307
|
-
const { healthScore: t } =
|
|
2308
|
-
const _ =
|
|
2313
|
+
}, Sr = v(xr), Cr = () => {
|
|
2314
|
+
const { healthScore: t } = F(), { finstrong: o } = S(), { key_indicators_save: n } = o, r = (l) => {
|
|
2315
|
+
const _ = yt(l), d = {
|
|
2309
2316
|
GOOD: n.days_of_cash_good_description,
|
|
2310
2317
|
FAIR: n.days_of_cash_fair_description,
|
|
2311
2318
|
OFF_TRACK: n.days_of_cash_off_track_description,
|
|
2312
2319
|
MISSING: n.days_of_cash_missing_description
|
|
2313
|
-
},
|
|
2320
|
+
}, h = _ === "MISSING" ? d[_] : j(d[_], l);
|
|
2314
2321
|
return {
|
|
2315
2322
|
cardState: _,
|
|
2316
|
-
description:
|
|
2323
|
+
description: h,
|
|
2317
2324
|
title: n.days_of_cash_title
|
|
2318
2325
|
};
|
|
2319
2326
|
}, s = (l) => {
|
|
2320
|
-
const _ =
|
|
2327
|
+
const _ = gt(l), d = {
|
|
2321
2328
|
GOOD: n.emergency_savings_good_description,
|
|
2322
2329
|
FAIR: n.emergency_savings_fair_description,
|
|
2323
2330
|
OFF_TRACK: n.emergency_savings_off_track_description,
|
|
2324
2331
|
MISSING: n.emergency_savings_missing_description
|
|
2325
2332
|
};
|
|
2326
|
-
let
|
|
2327
|
-
return _ === "FAIR" && l !== null ?
|
|
2333
|
+
let h;
|
|
2334
|
+
return _ === "FAIR" && l !== null ? h = j(
|
|
2328
2335
|
d[_],
|
|
2329
2336
|
W(l, "0,0.00")
|
|
2330
|
-
) :
|
|
2337
|
+
) : h = d[_], {
|
|
2331
2338
|
cardState: _,
|
|
2332
|
-
description:
|
|
2339
|
+
description: h,
|
|
2333
2340
|
title: n.emergency_savings_title
|
|
2334
2341
|
};
|
|
2335
2342
|
}, { daysOfCashOnHand: i, emergencySavings: c } = m.useMemo(() => {
|
|
2336
|
-
const l = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null, _ = r(l), d = t.emergency_savings_on_hand !== null ? Math.round(t.emergency_savings_on_hand) : null,
|
|
2337
|
-
return { daysOfCashOnHand: _, emergencySavings:
|
|
2343
|
+
const l = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null, _ = r(l), d = t.emergency_savings_on_hand !== null ? Math.round(t.emergency_savings_on_hand) : null, h = s(d);
|
|
2344
|
+
return { daysOfCashOnHand: _, emergencySavings: h };
|
|
2338
2345
|
}, [
|
|
2339
2346
|
t.months_of_cash_on_hand,
|
|
2340
2347
|
t.emergency_savings_on_hand,
|
|
@@ -2361,36 +2368,36 @@ const Eo = ({ total: t }) => {
|
|
|
2361
2368
|
}
|
|
2362
2369
|
)
|
|
2363
2370
|
] });
|
|
2364
|
-
},
|
|
2365
|
-
const { healthScore: t } =
|
|
2366
|
-
const d =
|
|
2371
|
+
}, vr = v(Cr), wr = () => {
|
|
2372
|
+
const { healthScore: t } = F(), { finstrong: o } = S(), { key_indicators_borrow: n } = o, { user: r } = ee(), s = (_) => {
|
|
2373
|
+
const d = bt(_), h = {
|
|
2367
2374
|
GOOD: n.manage_debit_good_description,
|
|
2368
2375
|
FAIR: n.manage_debit_fair_description,
|
|
2369
2376
|
OFF_TRACK: n.manage_debit_off_track_description,
|
|
2370
2377
|
MISSING: n.manage_debit_missing_description
|
|
2371
|
-
},
|
|
2378
|
+
}, u = d === "FAIR" || d === "OFF_TRACK" ? j(h[d], _) : h[d];
|
|
2372
2379
|
return {
|
|
2373
2380
|
cardState: d,
|
|
2374
|
-
description:
|
|
2381
|
+
description: u,
|
|
2375
2382
|
title: n.manage_debit_title
|
|
2376
2383
|
};
|
|
2377
2384
|
}, i = (_) => {
|
|
2378
|
-
const d =
|
|
2385
|
+
const d = mt(_), h = {
|
|
2379
2386
|
GOOD: n.credit_score_good_description,
|
|
2380
2387
|
FAIR: n.credit_score_fair_description,
|
|
2381
2388
|
OFF_TRACK: n.credit_score_off_track_description,
|
|
2382
2389
|
MISSING: n.credit_score_missing_description
|
|
2383
|
-
},
|
|
2390
|
+
}, u = d === "MISSING" ? h[d] : j(h[d], _);
|
|
2384
2391
|
return {
|
|
2385
2392
|
cardState: d,
|
|
2386
|
-
description:
|
|
2393
|
+
description: u,
|
|
2387
2394
|
title: n.credit_score_title
|
|
2388
2395
|
};
|
|
2389
2396
|
}, { manageDebtStatus: c, creditScoreStatus: l } = m.useMemo(() => {
|
|
2390
|
-
const _ = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, d = s(_),
|
|
2397
|
+
const _ = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, d = s(_), h = i(r.credit_score || null);
|
|
2391
2398
|
return {
|
|
2392
2399
|
manageDebtStatus: d,
|
|
2393
|
-
creditScoreStatus:
|
|
2400
|
+
creditScoreStatus: h
|
|
2394
2401
|
};
|
|
2395
2402
|
}, [t.debt_to_income_ratio, r.credit_score, n, o]);
|
|
2396
2403
|
return /* @__PURE__ */ a(p, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
@@ -2413,9 +2420,9 @@ const Eo = ({ total: t }) => {
|
|
|
2413
2420
|
}
|
|
2414
2421
|
)
|
|
2415
2422
|
] });
|
|
2416
|
-
},
|
|
2417
|
-
const [t, o] = m.useState(0), { finstrong: n } =
|
|
2418
|
-
return /* @__PURE__ */ a(
|
|
2423
|
+
}, kr = v(wr), Mr = () => {
|
|
2424
|
+
const [t, o] = m.useState(0), { finstrong: n } = S();
|
|
2425
|
+
return /* @__PURE__ */ a(E, { children: [
|
|
2419
2426
|
/* @__PURE__ */ a(
|
|
2420
2427
|
Xe,
|
|
2421
2428
|
{
|
|
@@ -2469,12 +2476,12 @@ const Eo = ({ total: t }) => {
|
|
|
2469
2476
|
]
|
|
2470
2477
|
}
|
|
2471
2478
|
),
|
|
2472
|
-
/* @__PURE__ */ e(ce, { index: 0, name: "spend-details", value: t, children: /* @__PURE__ */ e(
|
|
2473
|
-
/* @__PURE__ */ e(ce, { index: 1, name: "save-details", value: t, children: /* @__PURE__ */ e(
|
|
2474
|
-
/* @__PURE__ */ e(ce, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(
|
|
2479
|
+
/* @__PURE__ */ e(ce, { index: 0, name: "spend-details", value: t, children: /* @__PURE__ */ e(Sr, {}) }),
|
|
2480
|
+
/* @__PURE__ */ e(ce, { index: 1, name: "save-details", value: t, children: /* @__PURE__ */ e(vr, {}) }),
|
|
2481
|
+
/* @__PURE__ */ e(ce, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(kr, {}) })
|
|
2475
2482
|
] });
|
|
2476
|
-
},
|
|
2477
|
-
const { finstrong: o } =
|
|
2483
|
+
}, Dr = v(Mr), Ir = ({ onClick: t }) => {
|
|
2484
|
+
const { finstrong: o } = S(), { isCopyLoaded: n } = q();
|
|
2478
2485
|
return n ? /* @__PURE__ */ a(p, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
|
|
2479
2486
|
/* @__PURE__ */ e(_t, { size: 48 }),
|
|
2480
2487
|
/* @__PURE__ */ a(p, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
|
|
@@ -2482,7 +2489,7 @@ const Eo = ({ total: t }) => {
|
|
|
2482
2489
|
/* @__PURE__ */ e(M, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: o.missing_data_description })
|
|
2483
2490
|
] }),
|
|
2484
2491
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
2485
|
-
|
|
2492
|
+
P,
|
|
2486
2493
|
{
|
|
2487
2494
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
2488
2495
|
onClick: t,
|
|
@@ -2498,7 +2505,7 @@ const Eo = ({ total: t }) => {
|
|
|
2498
2505
|
}
|
|
2499
2506
|
) })
|
|
2500
2507
|
] }) : /* @__PURE__ */ e(te, {});
|
|
2501
|
-
},
|
|
2508
|
+
}, Ar = v(Ir), Tr = ({
|
|
2502
2509
|
firstDay: t,
|
|
2503
2510
|
frequency: o,
|
|
2504
2511
|
secondDay: n,
|
|
@@ -2509,22 +2516,22 @@ const Eo = ({ total: t }) => {
|
|
|
2509
2516
|
setSecondDay: l,
|
|
2510
2517
|
transaction: _
|
|
2511
2518
|
}) => {
|
|
2512
|
-
const { finstrong: d } =
|
|
2519
|
+
const { finstrong: d } = S();
|
|
2513
2520
|
return /* @__PURE__ */ a(m.Fragment, { children: [
|
|
2514
2521
|
/* @__PURE__ */ a(p, { children: [
|
|
2515
|
-
!!r.length && /* @__PURE__ */ e(k, { sx: { pb: 24 }, children: r.reduce((
|
|
2516
|
-
if (
|
|
2517
|
-
const f =
|
|
2518
|
-
return
|
|
2522
|
+
!!r.length && /* @__PURE__ */ e(k, { sx: { pb: 24 }, children: r.reduce((h, u, y) => {
|
|
2523
|
+
if (u.guid === _.guid) return h;
|
|
2524
|
+
const f = Nn(y, r), w = jn(y, r);
|
|
2525
|
+
return h.push(
|
|
2519
2526
|
/* @__PURE__ */ a(m.Fragment, { children: [
|
|
2520
|
-
f && /* @__PURE__ */ e(
|
|
2521
|
-
/* @__PURE__ */ e(
|
|
2527
|
+
f && /* @__PURE__ */ e(Kn, { children: Dt(u.date) }),
|
|
2528
|
+
/* @__PURE__ */ e(Vn, { transaction: u }),
|
|
2522
2529
|
/* @__PURE__ */ e(le, { sx: { ml: w ? 44 : 0 } })
|
|
2523
|
-
] },
|
|
2524
|
-
),
|
|
2530
|
+
] }, u.guid)
|
|
2531
|
+
), h;
|
|
2525
2532
|
}, []) }),
|
|
2526
2533
|
/* @__PURE__ */ e(
|
|
2527
|
-
|
|
2534
|
+
ro,
|
|
2528
2535
|
{
|
|
2529
2536
|
firstDay: t,
|
|
2530
2537
|
frequency: o,
|
|
@@ -2537,7 +2544,7 @@ const Eo = ({ total: t }) => {
|
|
|
2537
2544
|
)
|
|
2538
2545
|
] }),
|
|
2539
2546
|
/* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
|
|
2540
|
-
|
|
2547
|
+
P,
|
|
2541
2548
|
{
|
|
2542
2549
|
fullWidth: !0,
|
|
2543
2550
|
onClick: () => s({ step: O.MonthlyIncome, type: "main" }),
|
|
@@ -2546,12 +2553,12 @@ const Eo = ({ total: t }) => {
|
|
|
2546
2553
|
}
|
|
2547
2554
|
) })
|
|
2548
2555
|
] });
|
|
2549
|
-
},
|
|
2550
|
-
const { finstrong: n } =
|
|
2556
|
+
}, Or = v(Tr), Rr = ({ selectedDate: t, setSelectedDate: o }) => {
|
|
2557
|
+
const { finstrong: n } = S(), r = G(), s = (i) => {
|
|
2551
2558
|
o(Math.floor(new Date(i).getTime() / 1e3));
|
|
2552
2559
|
};
|
|
2553
|
-
return /* @__PURE__ */ e(k, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
2554
|
-
|
|
2560
|
+
return /* @__PURE__ */ e(k, { sx: { p: 24 }, children: /* @__PURE__ */ e(so, { dateAdapter: Tt, children: /* @__PURE__ */ e(
|
|
2561
|
+
co,
|
|
2555
2562
|
{
|
|
2556
2563
|
disableFuture: !0,
|
|
2557
2564
|
label: n.onboarding_select_date,
|
|
@@ -2580,10 +2587,10 @@ const Eo = ({ total: t }) => {
|
|
|
2580
2587
|
value: t ? new Date(t * 1e3) : null
|
|
2581
2588
|
}
|
|
2582
2589
|
) }) });
|
|
2583
|
-
},
|
|
2584
|
-
const { finstrong: n } =
|
|
2590
|
+
}, Fr = v(Rr), Lr = ({ creditScore: t, setCreditScore: o }) => {
|
|
2591
|
+
const { finstrong: n } = S(), r = !isNaN(t);
|
|
2585
2592
|
return /* @__PURE__ */ e(k, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
2586
|
-
|
|
2593
|
+
Re,
|
|
2587
2594
|
{
|
|
2588
2595
|
error: !r,
|
|
2589
2596
|
fullWidth: !0,
|
|
@@ -2597,7 +2604,7 @@ const Eo = ({ total: t }) => {
|
|
|
2597
2604
|
value: r ? t : ""
|
|
2598
2605
|
}
|
|
2599
2606
|
) });
|
|
2600
|
-
},
|
|
2607
|
+
}, Br = v(Lr), $t = ({ value: t, completeCopy: o }) => /* @__PURE__ */ a(p, { sx: { gap: 8 }, children: [
|
|
2601
2608
|
/* @__PURE__ */ e(p, { sx: { flexDirection: "row", gap: 4 }, children: Array.from({ length: 4 }).map((n, r) => /* @__PURE__ */ e(
|
|
2602
2609
|
k,
|
|
2603
2610
|
{
|
|
@@ -2615,7 +2622,7 @@ const Eo = ({ total: t }) => {
|
|
|
2615
2622
|
"% ",
|
|
2616
2623
|
o
|
|
2617
2624
|
] })
|
|
2618
|
-
] }),
|
|
2625
|
+
] }), Pr = ({
|
|
2619
2626
|
completeCopy: t,
|
|
2620
2627
|
primaryText: o,
|
|
2621
2628
|
secondaryText: n,
|
|
@@ -2625,44 +2632,44 @@ const Eo = ({ total: t }) => {
|
|
|
2625
2632
|
/* @__PURE__ */ e(K, { children: o }),
|
|
2626
2633
|
/* @__PURE__ */ e(M, { variant: "subtitle1", children: n })
|
|
2627
2634
|
] }),
|
|
2628
|
-
/* @__PURE__ */ e(
|
|
2629
|
-
] }),
|
|
2635
|
+
/* @__PURE__ */ e($t, { completeCopy: t, value: r })
|
|
2636
|
+
] }), st = {
|
|
2630
2637
|
step: O.ConnectAccounts,
|
|
2631
2638
|
type: "main"
|
|
2632
|
-
},
|
|
2633
|
-
const { visibleAccounts: n } = Se(), { calculateHealthScore: r } =
|
|
2634
|
-
|
|
2635
|
-
), [b,
|
|
2639
|
+
}, Wr = ({ isOpen: t, onClose: o }) => {
|
|
2640
|
+
const { visibleAccounts: n } = Se(), { calculateHealthScore: r } = F(), { finstrong: s } = S(), { setSelectedAccounts: i } = q(), { addRepeatingTransaction: c, setDateRange: l } = Ve(), { filter: _, setFilter: d, transactions: h } = Rn(), { user: u, userProfile: y, updateUser: f, updateUserProfile: w } = ee(), [x, D] = m.useState(u.credit_score || 0), [C, g] = m.useState(
|
|
2641
|
+
st
|
|
2642
|
+
), [b, L] = m.useState(1), [B, U] = m.useState(kt.EveryMonth), [T, $] = m.useState([]), [z, pe] = m.useState(!1), [ve, Q] = m.useState(!1), [Y, _e] = m.useState(u.birthday), [H, he] = m.useState(15), [N, ae] = m.useState("");
|
|
2636
2643
|
m.useEffect(() => {
|
|
2637
|
-
l({ start:
|
|
2644
|
+
l({ start: It(at()), end: At(at()) });
|
|
2638
2645
|
}, []), m.useEffect(() => {
|
|
2639
2646
|
d({
|
|
2640
2647
|
accounts: n.map((A) => A.guid),
|
|
2641
2648
|
dateRange: {
|
|
2642
|
-
start:
|
|
2649
|
+
start: oo(/* @__PURE__ */ new Date(), 90),
|
|
2643
2650
|
end: /* @__PURE__ */ new Date()
|
|
2644
2651
|
},
|
|
2645
|
-
custom:
|
|
2652
|
+
custom: it
|
|
2646
2653
|
}), i(n);
|
|
2647
2654
|
}, [n]);
|
|
2648
2655
|
const De = m.useMemo(
|
|
2649
|
-
() =>
|
|
2650
|
-
[N,
|
|
2656
|
+
() => h.find((A) => A.guid === N),
|
|
2657
|
+
[N, h]
|
|
2651
2658
|
), ue = m.useMemo(() => ({
|
|
2652
2659
|
[O.ConnectAccounts]: !0,
|
|
2653
2660
|
[O.MonthlyIncome]: !!N,
|
|
2654
|
-
[O.Birthday]: !!
|
|
2655
|
-
[O.CreditScore]: !!
|
|
2656
|
-
})[C.step], [
|
|
2661
|
+
[O.Birthday]: !!u.birthday || !!Y,
|
|
2662
|
+
[O.CreditScore]: !!u.credit_score || !!x
|
|
2663
|
+
})[C.step], [x, C, Y, N, u]), X = n.length > 0, zt = m.useMemo(() => {
|
|
2657
2664
|
const { step: A } = C;
|
|
2658
2665
|
let R = 0;
|
|
2659
|
-
return A >= O.MonthlyIncome && X && R++, A >= O.Birthday && T.length && R++, A >= O.CreditScore && (
|
|
2660
|
-
}, [C.step, X, T.length,
|
|
2666
|
+
return A >= O.MonthlyIncome && X && R++, A >= O.Birthday && T.length && R++, A >= O.CreditScore && (u.birthday || u.credit_score) && R++, R;
|
|
2667
|
+
}, [C.step, X, T.length, u.birthday, u.credit_score]), Et = (A) => {
|
|
2661
2668
|
d({
|
|
2662
2669
|
..._,
|
|
2663
|
-
custom: (R) => A ?
|
|
2670
|
+
custom: (R) => A ? io(R, A) : it(R)
|
|
2664
2671
|
});
|
|
2665
|
-
},
|
|
2672
|
+
}, Gt = {
|
|
2666
2673
|
[O.ConnectAccounts]: {
|
|
2667
2674
|
main: X ? /* @__PURE__ */ e(Bt, { shouldShowBalance: !1 }) : null,
|
|
2668
2675
|
mainActionContent: X ? s.onboarding_next : s.onboarding_add_accounts,
|
|
@@ -2671,20 +2678,20 @@ const Eo = ({ total: t }) => {
|
|
|
2671
2678
|
},
|
|
2672
2679
|
[O.MonthlyIncome]: {
|
|
2673
2680
|
detail: /* @__PURE__ */ e(
|
|
2674
|
-
|
|
2681
|
+
Or,
|
|
2675
2682
|
{
|
|
2676
2683
|
firstDay: b,
|
|
2677
|
-
frequency:
|
|
2684
|
+
frequency: B,
|
|
2678
2685
|
incomeTransactions: T,
|
|
2679
2686
|
secondDay: H,
|
|
2680
2687
|
setCurrentStep: (A) => {
|
|
2681
2688
|
g(A), $((R) => {
|
|
2682
2689
|
if (R.some((ie) => ie.guid === N)) return R.filter((ie) => ie.guid !== N);
|
|
2683
|
-
const Ae =
|
|
2684
|
-
return Ae ? [...R, { ...Ae, firstDay: b, frequency:
|
|
2690
|
+
const Ae = h.find((ie) => ie.guid === N);
|
|
2691
|
+
return Ae ? [...R, { ...Ae, firstDay: b, frequency: B, secondDay: H }] : R;
|
|
2685
2692
|
});
|
|
2686
2693
|
},
|
|
2687
|
-
setFirstDay:
|
|
2694
|
+
setFirstDay: L,
|
|
2688
2695
|
setFrequency: U,
|
|
2689
2696
|
setSecondDay: he,
|
|
2690
2697
|
transaction: De
|
|
@@ -2692,7 +2699,7 @@ const Eo = ({ total: t }) => {
|
|
|
2692
2699
|
),
|
|
2693
2700
|
detailActionContent: s.onboarding_confirm_income,
|
|
2694
2701
|
main: /* @__PURE__ */ e(
|
|
2695
|
-
|
|
2702
|
+
ao,
|
|
2696
2703
|
{
|
|
2697
2704
|
onSearch: Et,
|
|
2698
2705
|
onSelected: (A) => {
|
|
@@ -2705,40 +2712,40 @@ const Eo = ({ total: t }) => {
|
|
|
2705
2712
|
secondaryText: s.onboarding_add_income_secondary
|
|
2706
2713
|
},
|
|
2707
2714
|
[O.Birthday]: {
|
|
2708
|
-
main: /* @__PURE__ */ e(
|
|
2715
|
+
main: /* @__PURE__ */ e(Fr, { selectedDate: Y, setSelectedDate: _e }),
|
|
2709
2716
|
mainActionContent: s.onboarding_next,
|
|
2710
2717
|
primaryText: s.onboarding_birthday_primary,
|
|
2711
2718
|
secondaryText: s.onboarding_birthday_secondary
|
|
2712
2719
|
},
|
|
2713
2720
|
[O.CreditScore]: {
|
|
2714
|
-
main: /* @__PURE__ */ e(
|
|
2721
|
+
main: /* @__PURE__ */ e(Br, { creditScore: x, setCreditScore: D }),
|
|
2715
2722
|
mainActionContent: s.onboarding_next,
|
|
2716
2723
|
primaryText: s.onboarding_credit_score_primary,
|
|
2717
2724
|
secondaryText: s.onboarding_credit_score_secondary
|
|
2718
2725
|
}
|
|
2719
2726
|
}, Qe = () => {
|
|
2720
|
-
g(
|
|
2727
|
+
g(st), pe(!1), ae(""), o();
|
|
2721
2728
|
}, Ze = async () => {
|
|
2722
|
-
pe(!0), await
|
|
2723
|
-
},
|
|
2729
|
+
pe(!0), await Kt(T), await r(), await w({ ...y, has_completed_finstrong_onboarding: !0 }), Qe();
|
|
2730
|
+
}, Ht = () => {
|
|
2724
2731
|
if (C.step === O.CreditScore) {
|
|
2725
2732
|
Ze();
|
|
2726
2733
|
return;
|
|
2727
2734
|
}
|
|
2728
2735
|
g({ step: C.step + 1, type: "main" });
|
|
2729
|
-
},
|
|
2736
|
+
}, Nt = () => {
|
|
2730
2737
|
const { step: A } = C, R = A + 1;
|
|
2731
2738
|
switch (A) {
|
|
2732
2739
|
case O.Birthday:
|
|
2733
|
-
Y && Y !==
|
|
2740
|
+
Y && Y !== u.birthday && f({ ...u, birthday: Y });
|
|
2734
2741
|
break;
|
|
2735
2742
|
case O.CreditScore:
|
|
2736
|
-
|
|
2743
|
+
x && x !== u.credit_score && f({ ...u, credit_score: x }), Ze();
|
|
2737
2744
|
return;
|
|
2738
2745
|
case O.MonthlyIncome:
|
|
2739
2746
|
N && T.findIndex(({ guid: ge }) => ge === N) === -1 && $((ge) => [
|
|
2740
2747
|
...ge,
|
|
2741
|
-
{ ...De, firstDay: b, frequency:
|
|
2748
|
+
{ ...De, firstDay: b, frequency: B, secondDay: H }
|
|
2742
2749
|
]);
|
|
2743
2750
|
break;
|
|
2744
2751
|
case O.ConnectAccounts:
|
|
@@ -2749,7 +2756,7 @@ const Eo = ({ total: t }) => {
|
|
|
2749
2756
|
break;
|
|
2750
2757
|
}
|
|
2751
2758
|
R in O && g({ step: R, type: "main" });
|
|
2752
|
-
},
|
|
2759
|
+
}, jt = () => {
|
|
2753
2760
|
const { step: A, type: R } = C;
|
|
2754
2761
|
if (R === "detail") {
|
|
2755
2762
|
g({ step: A, type: "main" });
|
|
@@ -2760,40 +2767,40 @@ const Eo = ({ total: t }) => {
|
|
|
2760
2767
|
return;
|
|
2761
2768
|
}
|
|
2762
2769
|
A > O.ConnectAccounts && g({ step: A - 1, type: "main" });
|
|
2763
|
-
},
|
|
2770
|
+
}, Kt = async (A) => {
|
|
2764
2771
|
for (const R of A) {
|
|
2765
2772
|
const {
|
|
2766
2773
|
account_guid: ge,
|
|
2767
2774
|
amount: Ae,
|
|
2768
2775
|
date: ie,
|
|
2769
|
-
description:
|
|
2770
|
-
feed_description:
|
|
2771
|
-
firstDay:
|
|
2776
|
+
description: Xt,
|
|
2777
|
+
feed_description: qt,
|
|
2778
|
+
firstDay: Ut,
|
|
2772
2779
|
frequency: Je,
|
|
2773
|
-
secondDay:
|
|
2774
|
-
merchant_guid:
|
|
2775
|
-
payee:
|
|
2776
|
-
transaction_type:
|
|
2777
|
-
} = R,
|
|
2780
|
+
secondDay: Qt,
|
|
2781
|
+
merchant_guid: Zt,
|
|
2782
|
+
payee: Jt,
|
|
2783
|
+
transaction_type: en
|
|
2784
|
+
} = R, tn = En(Je, no(ie)), nn = {
|
|
2778
2785
|
account_guid: ge,
|
|
2779
2786
|
amount: Ae,
|
|
2780
2787
|
created_by: 0,
|
|
2781
|
-
description:
|
|
2782
|
-
merchant_guid:
|
|
2783
|
-
predicted_occurs_on:
|
|
2784
|
-
recurrence_day:
|
|
2788
|
+
description: Jt || Xt || qt,
|
|
2789
|
+
merchant_guid: Zt,
|
|
2790
|
+
predicted_occurs_on: to(tn, { representation: "date" }),
|
|
2791
|
+
recurrence_day: Ut,
|
|
2785
2792
|
recurrence_type: Je,
|
|
2786
|
-
repeating_transaction_type:
|
|
2787
|
-
second_recurrence_day:
|
|
2788
|
-
transaction_type:
|
|
2789
|
-
user_guid:
|
|
2793
|
+
repeating_transaction_type: Mt.Income,
|
|
2794
|
+
second_recurrence_day: Qt,
|
|
2795
|
+
transaction_type: en,
|
|
2796
|
+
user_guid: u.guid
|
|
2790
2797
|
};
|
|
2791
|
-
await c(
|
|
2798
|
+
await c(nn, R);
|
|
2792
2799
|
}
|
|
2793
|
-
}, me =
|
|
2800
|
+
}, me = Gt[C.step], Ie = C.step === O.ConnectAccounts, Vt = {
|
|
2794
2801
|
fullWidth: !0,
|
|
2795
2802
|
...Ie && !X && { startIcon: /* @__PURE__ */ e(ht, {}) }
|
|
2796
|
-
},
|
|
2803
|
+
}, Yt = !Ie || Ie && !X;
|
|
2797
2804
|
return /* @__PURE__ */ a(m.Fragment, { children: [
|
|
2798
2805
|
/* @__PURE__ */ e(
|
|
2799
2806
|
oe,
|
|
@@ -2803,32 +2810,32 @@ const Eo = ({ total: t }) => {
|
|
|
2803
2810
|
isOpen: t,
|
|
2804
2811
|
isPrimaryDisabled: !ue,
|
|
2805
2812
|
onClose: Qe,
|
|
2806
|
-
onSecondaryAction:
|
|
2807
|
-
primaryButtonProps:
|
|
2813
|
+
onSecondaryAction: jt,
|
|
2814
|
+
primaryButtonProps: Vt,
|
|
2808
2815
|
primaryText: me?.mainActionContent,
|
|
2809
2816
|
secondaryColor: "primary",
|
|
2810
2817
|
secondaryText: s.onboarding_back,
|
|
2811
2818
|
title: s.title,
|
|
2812
|
-
...!z && { onPrimaryAction:
|
|
2819
|
+
...!z && { onPrimaryAction: Nt },
|
|
2813
2820
|
children: /* @__PURE__ */ a(p, { sx: { bgcolor: "background.default", height: "100%" }, children: [
|
|
2814
2821
|
z && /* @__PURE__ */ a(p, { sx: { alignItems: "center", gap: 24, position: "relative", px: 16, top: 126 }, children: [
|
|
2815
|
-
/* @__PURE__ */ e("img", { alt: "", src:
|
|
2822
|
+
/* @__PURE__ */ e("img", { alt: "", src: Ao, style: { minHeight: 100, width: 211 } }),
|
|
2816
2823
|
/* @__PURE__ */ e(Le, { children: s.onboarding_calculate_primary }),
|
|
2817
2824
|
/* @__PURE__ */ e(M, { sx: { textAlign: "center" }, variant: "subtitle1", children: s.onboarding_calculate_secondary })
|
|
2818
2825
|
] }),
|
|
2819
2826
|
me && !z && /* @__PURE__ */ a(m.Fragment, { children: [
|
|
2820
2827
|
/* @__PURE__ */ e(
|
|
2821
|
-
|
|
2828
|
+
Pr,
|
|
2822
2829
|
{
|
|
2823
2830
|
completeCopy: s.complete,
|
|
2824
2831
|
primaryText: me.primaryText,
|
|
2825
2832
|
secondaryText: me.secondaryText,
|
|
2826
|
-
value:
|
|
2833
|
+
value: zt
|
|
2827
2834
|
}
|
|
2828
2835
|
),
|
|
2829
2836
|
C.type === "main" && /* @__PURE__ */ a(k, { sx: { bgcolor: "background.default" }, children: [
|
|
2830
2837
|
me.main,
|
|
2831
|
-
|
|
2838
|
+
Yt && /* @__PURE__ */ e(p, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e(P, { fullWidth: !0, onClick: Ht, children: s.onboarding_do_it_later }) })
|
|
2832
2839
|
] }),
|
|
2833
2840
|
C.type === "detail" && me.detail
|
|
2834
2841
|
] })
|
|
@@ -2844,8 +2851,8 @@ const Eo = ({ total: t }) => {
|
|
|
2844
2851
|
}
|
|
2845
2852
|
)
|
|
2846
2853
|
] });
|
|
2847
|
-
},
|
|
2848
|
-
const { finstrong: t } =
|
|
2854
|
+
}, $r = v(Wr), zr = () => {
|
|
2855
|
+
const { finstrong: t } = S(), [o, n] = m.useState(!1);
|
|
2849
2856
|
return /* @__PURE__ */ a(m.Fragment, { children: [
|
|
2850
2857
|
/* @__PURE__ */ a(
|
|
2851
2858
|
p,
|
|
@@ -2865,15 +2872,15 @@ const Eo = ({ total: t }) => {
|
|
|
2865
2872
|
/* @__PURE__ */ e(M, { sx: { color: "text.secondary" }, variant: "subtitle1", children: t.onboarding_subtitle })
|
|
2866
2873
|
] })
|
|
2867
2874
|
] }),
|
|
2868
|
-
/* @__PURE__ */ e(
|
|
2875
|
+
/* @__PURE__ */ e(P, { onClick: () => n(!0), variant: "contained", children: t.onboarding_get_started })
|
|
2869
2876
|
]
|
|
2870
2877
|
}
|
|
2871
2878
|
),
|
|
2872
|
-
/* @__PURE__ */ e(
|
|
2879
|
+
/* @__PURE__ */ e($r, { isOpen: o, onClose: () => n(!1) })
|
|
2873
2880
|
] });
|
|
2874
|
-
},
|
|
2875
|
-
const { finstrong: n } =
|
|
2876
|
-
l(Math.floor(new Date(
|
|
2881
|
+
}, Er = ({ isOpen: t, onClose: o }) => {
|
|
2882
|
+
const { finstrong: n } = S(), r = G(), { updateUser: s, user: i } = ee(), [c, l] = m.useState(i.birthday), _ = (h) => {
|
|
2883
|
+
l(Math.floor(new Date(h).getTime() / 1e3));
|
|
2877
2884
|
};
|
|
2878
2885
|
return /* @__PURE__ */ e(
|
|
2879
2886
|
oe,
|
|
@@ -2885,8 +2892,8 @@ const Eo = ({ total: t }) => {
|
|
|
2885
2892
|
},
|
|
2886
2893
|
onSecondaryAction: o,
|
|
2887
2894
|
title: n.date_of_birth,
|
|
2888
|
-
children: /* @__PURE__ */ e(p, { sx: { bgcolor: "background.default", height: "100%" }, children: /* @__PURE__ */ e(
|
|
2889
|
-
|
|
2895
|
+
children: /* @__PURE__ */ e(p, { sx: { bgcolor: "background.default", height: "100%" }, children: /* @__PURE__ */ e(_o, { dateAdapter: Tt, children: /* @__PURE__ */ e(
|
|
2896
|
+
lo,
|
|
2890
2897
|
{
|
|
2891
2898
|
disableFuture: !0,
|
|
2892
2899
|
onChange: _,
|
|
@@ -2920,15 +2927,15 @@ const Eo = ({ total: t }) => {
|
|
|
2920
2927
|
) }) })
|
|
2921
2928
|
}
|
|
2922
2929
|
);
|
|
2923
|
-
},
|
|
2930
|
+
}, Gr = v(Er), Hr = ({ isOpen: t, onClose: o }) => {
|
|
2924
2931
|
const { visibleFinstrongAccounts: n } = Se(), {
|
|
2925
2932
|
accounts: r,
|
|
2926
2933
|
common: s,
|
|
2927
2934
|
finstrong: i
|
|
2928
|
-
} =
|
|
2929
|
-
const { repeating_transaction_type:
|
|
2930
|
-
return
|
|
2931
|
-
}, 0), [d,
|
|
2935
|
+
} = S(), { repeatingTransactions: c } = Ve(), { user: l } = ee(), _ = c.reduce((f, w) => {
|
|
2936
|
+
const { repeating_transaction_type: x, transactions: D, recurrence_type: C, amount: g } = w;
|
|
2937
|
+
return x === Mt.Income && (D.length > 0 || C === kt.EveryYear) ? f + g : f;
|
|
2938
|
+
}, 0), [d, h] = m.useState(null), y = [
|
|
2932
2939
|
{
|
|
2933
2940
|
dynamicCopy: i.add_profile_item,
|
|
2934
2941
|
fallbackLabel: i.monthly_income,
|
|
@@ -2964,7 +2971,7 @@ const Eo = ({ total: t }) => {
|
|
|
2964
2971
|
n.length > 1 ? i.accounts : i.account
|
|
2965
2972
|
) : void 0
|
|
2966
2973
|
}
|
|
2967
|
-
].map((f) =>
|
|
2974
|
+
].map((f) => In(f));
|
|
2968
2975
|
return /* @__PURE__ */ a(oe, { isOpen: t, onClose: o, title: i.financial_profile, children: [
|
|
2969
2976
|
/* @__PURE__ */ a(p, { sx: { bgcolor: "background.default", height: "100%" }, children: [
|
|
2970
2977
|
/* @__PURE__ */ a(p, { sx: { gap: 20, p: 24 }, children: [
|
|
@@ -2973,16 +2980,16 @@ const Eo = ({ total: t }) => {
|
|
|
2973
2980
|
/* @__PURE__ */ e(M, { children: i.financial_profile_description })
|
|
2974
2981
|
] }),
|
|
2975
2982
|
/* @__PURE__ */ e(
|
|
2976
|
-
|
|
2983
|
+
$t,
|
|
2977
2984
|
{
|
|
2978
2985
|
completeCopy: i.complete,
|
|
2979
2986
|
value: y.reduce((f, w) => f + (w.isComplete ? 1 : 0), 0)
|
|
2980
2987
|
}
|
|
2981
2988
|
)
|
|
2982
2989
|
] }),
|
|
2983
|
-
/* @__PURE__ */ e(
|
|
2990
|
+
/* @__PURE__ */ e(An, { list: y, onClickItem: h }),
|
|
2984
2991
|
/* @__PURE__ */ e(k, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
2985
|
-
|
|
2992
|
+
Be,
|
|
2986
2993
|
{
|
|
2987
2994
|
description: i.connect_more_accounts_to_view_more_accurate_financial_picture,
|
|
2988
2995
|
drawerType: "connectDrawer",
|
|
@@ -2996,33 +3003,33 @@ const Eo = ({ total: t }) => {
|
|
|
2996
3003
|
oe,
|
|
2997
3004
|
{
|
|
2998
3005
|
isOpen: d === ne.MonthlyIncome,
|
|
2999
|
-
onClose: () =>
|
|
3006
|
+
onClose: () => h(null),
|
|
3000
3007
|
title: s.settings,
|
|
3001
|
-
children: /* @__PURE__ */ e(
|
|
3008
|
+
children: /* @__PURE__ */ e(po, {})
|
|
3002
3009
|
}
|
|
3003
3010
|
),
|
|
3004
|
-
/* @__PURE__ */ e(
|
|
3005
|
-
/* @__PURE__ */ e(
|
|
3011
|
+
/* @__PURE__ */ e(Gr, { isOpen: d === ne.DateOfBirth, onClose: () => h(null) }),
|
|
3012
|
+
/* @__PURE__ */ e(Ft, { isOpen: d === ne.CreditScore, onClose: () => h(null) }),
|
|
3006
3013
|
/* @__PURE__ */ e(
|
|
3007
|
-
|
|
3014
|
+
xt,
|
|
3008
3015
|
{
|
|
3009
|
-
onClose: () =>
|
|
3016
|
+
onClose: () => h(null),
|
|
3010
3017
|
showConnectionsWidget: d === ne.Connections,
|
|
3011
3018
|
title: r.manage_connections
|
|
3012
3019
|
}
|
|
3013
3020
|
)
|
|
3014
3021
|
] });
|
|
3015
|
-
},
|
|
3022
|
+
}, Nr = v(Hr), ct = ({
|
|
3016
3023
|
content: t,
|
|
3017
3024
|
islast: o = !1
|
|
3018
|
-
}) => /* @__PURE__ */ a(
|
|
3019
|
-
/* @__PURE__ */ a(
|
|
3020
|
-
/* @__PURE__ */ e(
|
|
3021
|
-
!o && /* @__PURE__ */ e(
|
|
3025
|
+
}) => /* @__PURE__ */ a(mo, { sx: { minHeight: 0 }, children: [
|
|
3026
|
+
/* @__PURE__ */ a(xo, { children: [
|
|
3027
|
+
/* @__PURE__ */ e(fo, { sx: { bgcolor: "divider", borderWidth: 1, p: 3 } }),
|
|
3028
|
+
!o && /* @__PURE__ */ e(yo, { sx: { bgcolor: "divider", width: 0.1 } })
|
|
3022
3029
|
] }),
|
|
3023
|
-
/* @__PURE__ */ e(
|
|
3024
|
-
] }),
|
|
3025
|
-
const { finstrong: o } =
|
|
3030
|
+
/* @__PURE__ */ e(bo, { sx: { pb: 16, pl: 12, pr: 0, pt: 5 }, children: /* @__PURE__ */ e(M, { fontSize: 13, fontWeight: 400, variant: "subtitle2", children: t }) })
|
|
3031
|
+
] }), jr = ({ report: t }) => {
|
|
3032
|
+
const { finstrong: o } = S(), { score_history_drawer_timeline: n } = o, {
|
|
3026
3033
|
health_score_point_difference: r,
|
|
3027
3034
|
newer_credit_score: s,
|
|
3028
3035
|
older_credit_score: i,
|
|
@@ -3030,13 +3037,13 @@ const Eo = ({ total: t }) => {
|
|
|
3030
3037
|
newer_spend_to_income_ratio: l,
|
|
3031
3038
|
older_health_score: _,
|
|
3032
3039
|
newer_health_score: d,
|
|
3033
|
-
newer_score_calculated_at:
|
|
3034
|
-
} = t,
|
|
3040
|
+
newer_score_calculated_at: h
|
|
3041
|
+
} = t, u = ho(new Date(h), "MMM d"), y = () => r === 0 ? "info.lighter" : r > 0 ? "success.lighter" : "error.lighter", f = () => r === 0 ? j(n.stayed_at, _) : r > 0 ? n.less_spending : n.more_spending, w = () => {
|
|
3035
3042
|
if (r === 0) return null;
|
|
3036
|
-
const
|
|
3037
|
-
return /* @__PURE__ */ a(
|
|
3043
|
+
const x = r > 0 ? n.up_from : n.down_from, D = j(x, _, d);
|
|
3044
|
+
return /* @__PURE__ */ a(E, { children: [
|
|
3038
3045
|
/* @__PURE__ */ e(
|
|
3039
|
-
|
|
3046
|
+
an,
|
|
3040
3047
|
{
|
|
3041
3048
|
fill: !0,
|
|
3042
3049
|
name: "circle",
|
|
@@ -3079,7 +3086,7 @@ const Eo = ({ total: t }) => {
|
|
|
3079
3086
|
/* @__PURE__ */ a(p, { sx: { gap: 2, width: "80%" }, children: [
|
|
3080
3087
|
/* @__PURE__ */ e(I, { fontWeight: 600, variant: "Body", children: f() }),
|
|
3081
3088
|
/* @__PURE__ */ a(I, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
|
|
3082
|
-
|
|
3089
|
+
u,
|
|
3083
3090
|
" ",
|
|
3084
3091
|
w()
|
|
3085
3092
|
] })
|
|
@@ -3090,10 +3097,10 @@ const Eo = ({ total: t }) => {
|
|
|
3090
3097
|
}
|
|
3091
3098
|
),
|
|
3092
3099
|
r !== 0 && /* @__PURE__ */ e(k, { sx: { color: "text.secondary", pb: 8, pl: 32, pr: 16, pt: 12 }, children: /* @__PURE__ */ a(
|
|
3093
|
-
|
|
3100
|
+
uo,
|
|
3094
3101
|
{
|
|
3095
3102
|
sx: {
|
|
3096
|
-
[`& .${
|
|
3103
|
+
[`& .${go.root}:before`]: {
|
|
3097
3104
|
flex: 0,
|
|
3098
3105
|
padding: 0
|
|
3099
3106
|
},
|
|
@@ -3102,7 +3109,7 @@ const Eo = ({ total: t }) => {
|
|
|
3102
3109
|
},
|
|
3103
3110
|
children: [
|
|
3104
3111
|
/* @__PURE__ */ e(
|
|
3105
|
-
|
|
3112
|
+
ct,
|
|
3106
3113
|
{
|
|
3107
3114
|
content: j(
|
|
3108
3115
|
n.spend_to_income_description,
|
|
@@ -3112,7 +3119,7 @@ const Eo = ({ total: t }) => {
|
|
|
3112
3119
|
}
|
|
3113
3120
|
),
|
|
3114
3121
|
/* @__PURE__ */ e(
|
|
3115
|
-
|
|
3122
|
+
ct,
|
|
3116
3123
|
{
|
|
3117
3124
|
content: j(
|
|
3118
3125
|
n.credit_score_description,
|
|
@@ -3126,12 +3133,12 @@ const Eo = ({ total: t }) => {
|
|
|
3126
3133
|
}
|
|
3127
3134
|
) })
|
|
3128
3135
|
] });
|
|
3129
|
-
},
|
|
3130
|
-
const n =
|
|
3136
|
+
}, Kr = v(jr), Vr = ({ isOpen: t, onClose: o }) => {
|
|
3137
|
+
const n = G(), { finstrong: r } = S(), { isCopyLoaded: s, isInitialized: i } = q(), { augmentedChartData: c, healthScore: l, healthScoreChangeReports: _, peerScore: d } = F();
|
|
3131
3138
|
if (!s || !i) return /* @__PURE__ */ e(te, {});
|
|
3132
|
-
const
|
|
3139
|
+
const h = Ne(l.health_score || 0, r), u = _.slice().reverse();
|
|
3133
3140
|
return /* @__PURE__ */ e(
|
|
3134
|
-
|
|
3141
|
+
Lt,
|
|
3135
3142
|
{
|
|
3136
3143
|
additionalContent: /* @__PURE__ */ e(p, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(
|
|
3137
3144
|
Ye,
|
|
@@ -3144,7 +3151,7 @@ const Eo = ({ total: t }) => {
|
|
|
3144
3151
|
height: 160,
|
|
3145
3152
|
isGraphClippingXAxis: !0,
|
|
3146
3153
|
labels: [r.key_indicators_label],
|
|
3147
|
-
margin: { top: 24, bottom:
|
|
3154
|
+
margin: { top: 24, bottom: 6, right: 24, left: -15 },
|
|
3148
3155
|
peerAverage: Math.round(d?.average_health_score?.average_health_score || 0),
|
|
3149
3156
|
showArea: !0,
|
|
3150
3157
|
showAverage: !0,
|
|
@@ -3178,17 +3185,17 @@ const Eo = ({ total: t }) => {
|
|
|
3178
3185
|
}
|
|
3179
3186
|
),
|
|
3180
3187
|
/* @__PURE__ */ a(p, { sx: { gap: 4 }, children: [
|
|
3181
|
-
/* @__PURE__ */ e(M, { variant: "h3", children:
|
|
3182
|
-
/* @__PURE__ */ e(M, { variant: "XSmall", children:
|
|
3188
|
+
/* @__PURE__ */ e(M, { variant: "h3", children: h.status }),
|
|
3189
|
+
/* @__PURE__ */ e(M, { variant: "XSmall", children: h.description })
|
|
3183
3190
|
] })
|
|
3184
3191
|
] })
|
|
3185
3192
|
}
|
|
3186
3193
|
),
|
|
3187
|
-
children: /* @__PURE__ */ e(p, { sx: { gap: 16 }, children:
|
|
3194
|
+
children: /* @__PURE__ */ e(p, { sx: { gap: 16 }, children: u.map((y, f) => /* @__PURE__ */ e(Kr, { report: y }, f)) })
|
|
3188
3195
|
}
|
|
3189
3196
|
);
|
|
3190
|
-
},
|
|
3191
|
-
const o =
|
|
3197
|
+
}, Yr = v(Vr), Xr = ({ copy: t }) => {
|
|
3198
|
+
const o = G(), n = [
|
|
3192
3199
|
o.palette.chartMono.chartMono5,
|
|
3193
3200
|
o.palette.chartMono.chartMono4,
|
|
3194
3201
|
o.palette.chartMono.chartMono3,
|
|
@@ -3247,20 +3254,20 @@ const Eo = ({ total: t }) => {
|
|
|
3247
3254
|
)) })
|
|
3248
3255
|
] })
|
|
3249
3256
|
] });
|
|
3250
|
-
},
|
|
3251
|
-
const { finstrong: n } =
|
|
3257
|
+
}, qr = ({ isOpen: t, onClose: o }) => {
|
|
3258
|
+
const { finstrong: n } = S(), { isCopyLoaded: r } = q();
|
|
3252
3259
|
return r ? /* @__PURE__ */ e(oe, { isOpen: t, onClose: o, title: n.score_rubric, children: /* @__PURE__ */ a(p, { sx: { bgcolor: "background.default", gap: 36, height: "100%", p: 24 }, children: [
|
|
3253
3260
|
/* @__PURE__ */ a(p, { sx: { gap: 20 }, children: [
|
|
3254
3261
|
/* @__PURE__ */ a(p, { sx: { gap: 8 }, children: [
|
|
3255
3262
|
/* @__PURE__ */ e(K, { sx: { textWrap: "wrap" }, children: n.your_path_to_financial_freedom }),
|
|
3256
3263
|
/* @__PURE__ */ e(M, { variant: "subtitle1", children: n.finstrong_freedom_description })
|
|
3257
3264
|
] }),
|
|
3258
|
-
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
3265
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(Xr, { copy: n }) })
|
|
3259
3266
|
] }),
|
|
3260
3267
|
/* @__PURE__ */ a(p, { sx: { gap: 12 }, children: [
|
|
3261
3268
|
/* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body1", children: n.how_do_we_do_this }),
|
|
3262
3269
|
/* @__PURE__ */ a(
|
|
3263
|
-
|
|
3270
|
+
Ge,
|
|
3264
3271
|
{
|
|
3265
3272
|
component: "ol",
|
|
3266
3273
|
sx: {
|
|
@@ -3300,7 +3307,7 @@ const Eo = ({ total: t }) => {
|
|
|
3300
3307
|
/* @__PURE__ */ a(p, { sx: { gap: 4 }, children: [
|
|
3301
3308
|
/* @__PURE__ */ e(I, { sx: { fontWeight: 600, pb: 4 }, variant: "body1", children: n.we_ask_questions }),
|
|
3302
3309
|
/* @__PURE__ */ a(
|
|
3303
|
-
|
|
3310
|
+
Ge,
|
|
3304
3311
|
{
|
|
3305
3312
|
component: "ol",
|
|
3306
3313
|
sx: {
|
|
@@ -3327,14 +3334,14 @@ const Eo = ({ total: t }) => {
|
|
|
3327
3334
|
)
|
|
3328
3335
|
] })
|
|
3329
3336
|
] }) }) : /* @__PURE__ */ e(te, {});
|
|
3330
|
-
},
|
|
3331
|
-
const [t, o] = m.useState(!1), n =
|
|
3337
|
+
}, Ur = v(qr), Qr = v(() => {
|
|
3338
|
+
const [t, o] = m.useState(!1), n = G(), [r, { width: s }] = Ct(), { finstrong: i } = S(), { isCopyLoaded: c, isInitialized: l } = q(), { healthScore: _, healthScoreChange: d } = F(), h = n.palette.mode === "dark", u = Ne(_?.health_score, i);
|
|
3332
3339
|
return !c || !l ? /* @__PURE__ */ e(te, {}) : /* @__PURE__ */ a(V, { ref: r, sx: { p: 16, display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
3333
3340
|
/* @__PURE__ */ e(
|
|
3334
|
-
|
|
3341
|
+
wo,
|
|
3335
3342
|
{
|
|
3336
3343
|
action: /* @__PURE__ */ e(
|
|
3337
|
-
|
|
3344
|
+
P,
|
|
3338
3345
|
{
|
|
3339
3346
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
3340
3347
|
onClick: () => o(!0),
|
|
@@ -3367,11 +3374,11 @@ const Eo = ({ total: t }) => {
|
|
|
3367
3374
|
}
|
|
3368
3375
|
) }),
|
|
3369
3376
|
_?.health_score ? /* @__PURE__ */ a(
|
|
3370
|
-
|
|
3377
|
+
So,
|
|
3371
3378
|
{
|
|
3372
3379
|
sx: {
|
|
3373
3380
|
px: 16,
|
|
3374
|
-
backgroundColor:
|
|
3381
|
+
backgroundColor: h ? "grey.800" : "grey.50",
|
|
3375
3382
|
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3376
3383
|
"&.Mui-expanded": {
|
|
3377
3384
|
m: 0
|
|
@@ -3382,7 +3389,7 @@ const Eo = ({ total: t }) => {
|
|
|
3382
3389
|
},
|
|
3383
3390
|
children: [
|
|
3384
3391
|
/* @__PURE__ */ e(
|
|
3385
|
-
|
|
3392
|
+
vo,
|
|
3386
3393
|
{
|
|
3387
3394
|
expandIcon: /* @__PURE__ */ e(gn, { size: 20 }),
|
|
3388
3395
|
sx: {
|
|
@@ -3395,11 +3402,11 @@ const Eo = ({ total: t }) => {
|
|
|
3395
3402
|
children: /* @__PURE__ */ e(M, { sx: { fontWeight: 600 }, variant: "body1", children: i.accordion_title_text })
|
|
3396
3403
|
}
|
|
3397
3404
|
),
|
|
3398
|
-
/* @__PURE__ */ e(
|
|
3405
|
+
/* @__PURE__ */ e(Co, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(M, { variant: "subtitle1", children: u.scoreContent }) })
|
|
3399
3406
|
]
|
|
3400
3407
|
}
|
|
3401
3408
|
) : /* @__PURE__ */ e(
|
|
3402
|
-
|
|
3409
|
+
Be,
|
|
3403
3410
|
{
|
|
3404
3411
|
buttonText: i.connect_more_accounts_title,
|
|
3405
3412
|
description: i.health_score_zero_description,
|
|
@@ -3407,7 +3414,7 @@ const Eo = ({ total: t }) => {
|
|
|
3407
3414
|
hasIcon: !1,
|
|
3408
3415
|
isDashboard: !0,
|
|
3409
3416
|
sx: {
|
|
3410
|
-
backgroundColor:
|
|
3417
|
+
backgroundColor: h ? "grey.800" : "grey.50",
|
|
3411
3418
|
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3412
3419
|
".connect-more-accounts-title": {
|
|
3413
3420
|
fontWeight: 600,
|
|
@@ -3420,24 +3427,24 @@ const Eo = ({ total: t }) => {
|
|
|
3420
3427
|
}
|
|
3421
3428
|
),
|
|
3422
3429
|
/* @__PURE__ */ e(
|
|
3423
|
-
|
|
3430
|
+
Ur,
|
|
3424
3431
|
{
|
|
3425
3432
|
isOpen: t,
|
|
3426
3433
|
onClose: () => o(!1)
|
|
3427
3434
|
}
|
|
3428
3435
|
)
|
|
3429
3436
|
] });
|
|
3430
|
-
}),
|
|
3431
|
-
const { visibleAccounts: r } = Se(), { dateRange: s, isDataLoaded: i, loadBudgetData: c, setTheme: l } =
|
|
3432
|
-
augmentedChartData:
|
|
3433
|
-
calculateHealthScore:
|
|
3437
|
+
}), Zr = ({ onBackClick: t, sx: o, onPrimaryCtaClick: n }) => {
|
|
3438
|
+
const { visibleAccounts: r } = Se(), { dateRange: s, isDataLoaded: i, loadBudgetData: c, setTheme: l } = Fn(), { reloadCategoryTotals: _ } = Ke(), d = F(), {
|
|
3439
|
+
augmentedChartData: h,
|
|
3440
|
+
calculateHealthScore: u,
|
|
3434
3441
|
healthScore: y,
|
|
3435
3442
|
loadAugmentedChartData: f,
|
|
3436
3443
|
loadMonthlySummaries: w,
|
|
3437
|
-
loadPeerScore:
|
|
3444
|
+
loadPeerScore: x,
|
|
3438
3445
|
peerScore: D
|
|
3439
|
-
} = d, { finstrong: C, connect: g } =
|
|
3440
|
-
if (
|
|
3446
|
+
} = d, { finstrong: C, connect: g } = S(), { isCopyLoaded: b, isInitialized: L } = q(), { loadRepeatingTransactions: B } = Ve(), { isMobile: U } = qe(), T = G(), { userProfile: $ } = ee(), [z, pe] = m.useState(!1), [ve, Q] = m.useState(!1), [Y, _e] = m.useState(!1), [H, he] = m.useState(!1);
|
|
3447
|
+
if (ko({
|
|
3441
3448
|
widgetName: "FinstrongWidget",
|
|
3442
3449
|
isLoaded: z
|
|
3443
3450
|
}), m.useEffect(() => {
|
|
@@ -3445,15 +3452,15 @@ const Eo = ({ total: t }) => {
|
|
|
3445
3452
|
}, []), m.useEffect(() => {
|
|
3446
3453
|
n && (d.handleFinstrongWidgetPrimaryCtaClick = n);
|
|
3447
3454
|
}, [n, d]), m.useEffect(() => {
|
|
3448
|
-
|
|
3449
|
-
}, [
|
|
3450
|
-
|
|
3455
|
+
L && (w().finally(), x().finally(), u().finally(), f().finally());
|
|
3456
|
+
}, [L]), m.useEffect(() => {
|
|
3457
|
+
L && (_(r, s.start, s.end).finally(() => {
|
|
3451
3458
|
pe(!0);
|
|
3452
|
-
}), i || (c(),
|
|
3453
|
-
}, [s, i,
|
|
3459
|
+
}), i || (c(), B().finally()));
|
|
3460
|
+
}, [s, i, L, r]), !b || !L || !z) return /* @__PURE__ */ e(te, {});
|
|
3454
3461
|
const N = () => Q(!0), ae = Math.round(D?.average_health_score?.average_health_score || 0);
|
|
3455
3462
|
return /* @__PURE__ */ a(
|
|
3456
|
-
|
|
3463
|
+
Mo,
|
|
3457
3464
|
{
|
|
3458
3465
|
actions: [
|
|
3459
3466
|
{
|
|
@@ -3480,9 +3487,9 @@ const Eo = ({ total: t }) => {
|
|
|
3480
3487
|
},
|
|
3481
3488
|
children: [
|
|
3482
3489
|
/* @__PURE__ */ a(p, { sx: { gap: 24, width: { md: 432 }, height: "100%" }, children: [
|
|
3483
|
-
/* @__PURE__ */ e(
|
|
3490
|
+
/* @__PURE__ */ e(Qr, {}),
|
|
3484
3491
|
/* @__PURE__ */ e(
|
|
3485
|
-
|
|
3492
|
+
Be,
|
|
3486
3493
|
{
|
|
3487
3494
|
description: C.connect_more_accounts_description,
|
|
3488
3495
|
drawerType: "connectDrawer",
|
|
@@ -3494,7 +3501,7 @@ const Eo = ({ total: t }) => {
|
|
|
3494
3501
|
/* @__PURE__ */ a(p, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
|
3495
3502
|
/* @__PURE__ */ e(K, { children: C.key_indicators }),
|
|
3496
3503
|
/* @__PURE__ */ e(
|
|
3497
|
-
|
|
3504
|
+
P,
|
|
3498
3505
|
{
|
|
3499
3506
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
3500
3507
|
onClick: () => _e(!0),
|
|
@@ -3506,7 +3513,7 @@ const Eo = ({ total: t }) => {
|
|
|
3506
3513
|
}
|
|
3507
3514
|
)
|
|
3508
3515
|
] }),
|
|
3509
|
-
|
|
3516
|
+
h.length ? /* @__PURE__ */ e(
|
|
3510
3517
|
Ye,
|
|
3511
3518
|
{
|
|
3512
3519
|
axisColor: T.palette.divider,
|
|
@@ -3516,14 +3523,14 @@ const Eo = ({ total: t }) => {
|
|
|
3516
3523
|
customLegendBoxSx: { borderRadius: "2px" },
|
|
3517
3524
|
customLegendSx: { left: 0 },
|
|
3518
3525
|
customLegendVariant: "XSmall",
|
|
3519
|
-
datasets: [
|
|
3526
|
+
datasets: [h],
|
|
3520
3527
|
height: 300,
|
|
3521
3528
|
isGraphClippingXAxis: !0,
|
|
3522
3529
|
labelBackgroundColor: T.palette.border.dark,
|
|
3523
3530
|
labelFontColor: T.palette.common.white,
|
|
3524
3531
|
labelFontSize: typeof T.typography.XSmall?.fontSize == "string" ? parseFloat(T.typography.XSmall.fontSize) : T.typography.XSmall?.fontSize,
|
|
3525
3532
|
labels: [C.key_indicators_label],
|
|
3526
|
-
margin: { right: 0, left:
|
|
3533
|
+
margin: { right: 0, left: -35 },
|
|
3527
3534
|
peerAverage: ae,
|
|
3528
3535
|
showArea: !0,
|
|
3529
3536
|
showAverage: !0,
|
|
@@ -3534,13 +3541,13 @@ const Eo = ({ total: t }) => {
|
|
|
3534
3541
|
useCustomMark: !0,
|
|
3535
3542
|
xAxisScaleType: "band"
|
|
3536
3543
|
}
|
|
3537
|
-
) : /* @__PURE__ */ e(
|
|
3538
|
-
y.health_score !== null && /* @__PURE__ */ e(
|
|
3544
|
+
) : /* @__PURE__ */ e(Ar, { onClick: () => he(!0) }),
|
|
3545
|
+
y.health_score !== null && /* @__PURE__ */ e(Dr, {})
|
|
3539
3546
|
] }) })
|
|
3540
3547
|
]
|
|
3541
3548
|
}
|
|
3542
|
-
) : /* @__PURE__ */ e(
|
|
3543
|
-
/* @__PURE__ */ e(
|
|
3549
|
+
) : /* @__PURE__ */ e(zr, {}),
|
|
3550
|
+
/* @__PURE__ */ e(Nr, { isOpen: ve, onClose: () => Q(!1) }),
|
|
3544
3551
|
/* @__PURE__ */ e(
|
|
3545
3552
|
re,
|
|
3546
3553
|
{
|
|
@@ -3550,7 +3557,7 @@ const Eo = ({ total: t }) => {
|
|
|
3550
3557
|
}
|
|
3551
3558
|
),
|
|
3552
3559
|
/* @__PURE__ */ e(
|
|
3553
|
-
|
|
3560
|
+
Yr,
|
|
3554
3561
|
{
|
|
3555
3562
|
isOpen: Y,
|
|
3556
3563
|
onClose: () => _e(!1)
|
|
@@ -3559,12 +3566,12 @@ const Eo = ({ total: t }) => {
|
|
|
3559
3566
|
]
|
|
3560
3567
|
}
|
|
3561
3568
|
);
|
|
3562
|
-
},
|
|
3569
|
+
}, gi = v(Zr);
|
|
3563
3570
|
export {
|
|
3564
|
-
|
|
3565
|
-
|
|
3571
|
+
Io as CreditScoreGraph,
|
|
3572
|
+
Ot as DialScoreCard,
|
|
3566
3573
|
Rt as FinancialStrengthGraph,
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3574
|
+
fi as FinstrongApi,
|
|
3575
|
+
xi as FinstrongStore,
|
|
3576
|
+
gi as FinstrongWidget
|
|
3570
3577
|
};
|