@mx-cartographer/experiences 6.3.11-alpha.sms1 → 6.3.11-alpha.sms10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsx as t, jsxs as l, Fragment as
|
1
|
+
import { jsx as t, jsxs as l, Fragment as q } from "react/jsx-runtime";
|
2
2
|
import g, { useMemo as Sl, useRef as Is, useEffect as Yn, useState as Tt } from "react";
|
3
3
|
import { observer as A } from "mobx-react-lite";
|
4
4
|
import L from "@mui/material/Box";
|
@@ -1335,7 +1335,7 @@ const Ka = (e, n) => e.reduce((i, a) => (i[a.guid] = n?.includes(a.guid), i), {}
|
|
1335
1335
|
) }),
|
1336
1336
|
sx: { overflow: "auto", width: "100%" },
|
1337
1337
|
children: S.map((N) => {
|
1338
|
-
const
|
1338
|
+
const I = d[N.guid], R = `${N.name}${h && N.accountNumber ? ` *${N.accountNumber.slice(-4)}` : ""}`;
|
1339
1339
|
return /* @__PURE__ */ t(
|
1340
1340
|
Y,
|
1341
1341
|
{
|
@@ -1348,8 +1348,8 @@ const Ka = (e, n) => e.reduce((i, a) => (i[a.guid] = n?.includes(a.guid), i), {}
|
|
1348
1348
|
control: /* @__PURE__ */ t(
|
1349
1349
|
aa,
|
1350
1350
|
{
|
1351
|
-
checked:
|
1352
|
-
"data-ui-test": `checked-${
|
1351
|
+
checked: I,
|
1352
|
+
"data-ui-test": `checked-${I}`,
|
1353
1353
|
disableRipple: !0,
|
1354
1354
|
id: N.guid,
|
1355
1355
|
onChange: () => {
|
@@ -1409,20 +1409,37 @@ const bu = (e, n) => {
|
|
1409
1409
|
i ? s(r, i) : s(r);
|
1410
1410
|
});
|
1411
1411
|
}, [e, i]);
|
1412
|
-
}, ye = () =>
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1412
|
+
}, ye = (e) => {
|
1413
|
+
const n = me(), { xs: i, sm: a, md: o, lg: r, xl: s } = n.breakpoints.values;
|
1414
|
+
let c = {
|
1415
|
+
// Larger than 1536
|
1416
|
+
isLargeDesktop: yn(n.breakpoints.up("xl")),
|
1417
|
+
// Larger than 1200
|
1418
|
+
isDesktop: yn(n.breakpoints.up("lg")),
|
1419
|
+
// Smaller than 600
|
1420
|
+
isMobile: yn(n.breakpoints.down("sm")),
|
1421
|
+
// Smaller than 444
|
1422
|
+
isSmallMobile: yn(n.breakpoints.down("xs")),
|
1423
|
+
// Between 600 and 900
|
1424
|
+
isSmallTablet: yn(n.breakpoints.between("sm", "md")),
|
1425
|
+
// Between 600 and 1200
|
1426
|
+
isTablet: yn(n.breakpoints.between("sm", "lg"))
|
1427
|
+
};
|
1428
|
+
return e && (c = {
|
1429
|
+
// Larger than 1536
|
1430
|
+
isLargeDesktop: e > s,
|
1431
|
+
// Larger than 1200
|
1432
|
+
isDesktop: e > r && e <= s,
|
1433
|
+
// Smaller than 600
|
1434
|
+
isMobile: e < a && e > i,
|
1435
|
+
// Smaller than 444
|
1436
|
+
isSmallMobile: e <= i,
|
1437
|
+
// Between 600 and 900
|
1438
|
+
isSmallTablet: e >= a && e <= o,
|
1439
|
+
// Between 600 and 1200
|
1440
|
+
isTablet: e > a && e <= r
|
1441
|
+
}), c;
|
1442
|
+
}, j2 = (e) => {
|
1426
1443
|
const n = Is();
|
1427
1444
|
return Yn(() => {
|
1428
1445
|
n.current = e;
|
@@ -1707,11 +1724,11 @@ const bu = (e, n) => {
|
|
1707
1724
|
selectedIndex: d,
|
1708
1725
|
valueFormatter: _ = (u) => `${u}`
|
1709
1726
|
}) => {
|
1710
|
-
const u = Et(), h = Nu(u), m = a.reduce(vu, []), C = e !== void 0 ? e : m.reduce(Iu, 0) / m.length, f = Math.max(...m), b = Math.min(...m), E = m.reduce(xu, 0), S = f >= 0, v = b < 0, N = Sr(S, v, o),
|
1727
|
+
const u = Et(), h = Nu(u), m = a.reduce(vu, []), C = e !== void 0 ? e : m.reduce(Iu, 0) / m.length, f = Math.max(...m), b = Math.min(...m), E = m.reduce(xu, 0), S = f >= 0, v = b < 0, N = Sr(S, v, o), I = Sr(v, S, o), R = wu(C, f, b, N || I), D = (O) => d === void 0 || O === d ? i : `${i}80`, H = () => /* @__PURE__ */ t(
|
1711
1728
|
Er,
|
1712
1729
|
{
|
1713
1730
|
averageLineHeight: R,
|
1714
|
-
bottomHeight:
|
1731
|
+
bottomHeight: I,
|
1715
1732
|
color: "",
|
1716
1733
|
range: E,
|
1717
1734
|
topHeight: N,
|
@@ -1728,7 +1745,7 @@ const bu = (e, n) => {
|
|
1728
1745
|
{
|
1729
1746
|
ariaLabel: O.ariaLabel,
|
1730
1747
|
averageLineHeight: R,
|
1731
|
-
bottomHeight:
|
1748
|
+
bottomHeight: I,
|
1732
1749
|
color: D(M),
|
1733
1750
|
index: M,
|
1734
1751
|
onClick: c,
|
@@ -1874,14 +1891,14 @@ const ku = ({
|
|
1874
1891
|
h(n), C(i), n && _(n);
|
1875
1892
|
}, [n, i]);
|
1876
1893
|
const f = g.useMemo(() => {
|
1877
|
-
const N = Gl({ start: Ve(d), end: qe(d) }),
|
1894
|
+
const N = Gl({ start: Ve(d), end: qe(d) }), I = [];
|
1878
1895
|
for (let R = 0; R < N.length; R++) {
|
1879
1896
|
const D = N[R], H = kl({ start: D, end: Gt(D, 6) }), O = [];
|
1880
1897
|
for (let M = 0; M < H.length; M++)
|
1881
1898
|
O.push(H[M]);
|
1882
|
-
|
1899
|
+
I.push(O);
|
1883
1900
|
}
|
1884
|
-
return
|
1901
|
+
return I;
|
1885
1902
|
}, [d]), b = (N) => {
|
1886
1903
|
if (r !== "None") {
|
1887
1904
|
if (r === "Single") {
|
@@ -1908,8 +1925,8 @@ const ku = ({
|
|
1908
1925
|
onPreviousClick: v
|
1909
1926
|
}
|
1910
1927
|
),
|
1911
|
-
/* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-row", children: f[0].map((N,
|
1912
|
-
f.map((N,
|
1928
|
+
/* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-row", children: f[0].map((N, I) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ t(p, { bold: !0, variant: "Small", children: Dt(N, "EEEEE") }) }, I)) }),
|
1929
|
+
f.map((N, I) => /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-week", children: N.map((R, D) => /* @__PURE__ */ t(
|
1913
1930
|
Ou,
|
1914
1931
|
{
|
1915
1932
|
beginDate: u,
|
@@ -1919,7 +1936,7 @@ const ku = ({
|
|
1919
1936
|
onClick: b
|
1920
1937
|
},
|
1921
1938
|
D
|
1922
|
-
)) }, `w-${
|
1939
|
+
)) }, `w-${I}`)),
|
1923
1940
|
/* @__PURE__ */ t("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ t(te, { onClick: E, size: "small", variant: "text", children: e.today }) })
|
1924
1941
|
] }) });
|
1925
1942
|
}, Gu = (e) => tn({
|
@@ -2014,7 +2031,7 @@ const ku = ({
|
|
2014
2031
|
] });
|
2015
2032
|
}, $u = (e) => {
|
2016
2033
|
const n = it(), i = e.showLabel, a = e.style, o = Number(e.x), r = Number(e.y), s = e.handlers?.onMarkClick, c = e.handlers?.onMouseEnter, d = e.handlers?.onMouseLeave;
|
2017
|
-
return /* @__PURE__ */ l(
|
2034
|
+
return /* @__PURE__ */ l(q, { children: [
|
2018
2035
|
i && /* @__PURE__ */ t(
|
2019
2036
|
"text",
|
2020
2037
|
{
|
@@ -2052,7 +2069,7 @@ const ku = ({
|
|
2052
2069
|
}
|
2053
2070
|
)
|
2054
2071
|
] });
|
2055
|
-
}, Fu = (e) => /* @__PURE__ */ l(
|
2072
|
+
}, Fu = (e) => /* @__PURE__ */ l(q, { children: [
|
2056
2073
|
/* @__PURE__ */ t("clipPath", { id: e.id, children: /* @__PURE__ */ t("rect", { height: e.height, width: e.width, x: "0", y: "0" }) }),
|
2057
2074
|
/* @__PURE__ */ t("g", { children: /* @__PURE__ */ t(
|
2058
2075
|
"path",
|
@@ -2074,7 +2091,7 @@ const ku = ({
|
|
2074
2091
|
average: n,
|
2075
2092
|
style: i
|
2076
2093
|
}) => {
|
2077
|
-
const { common: a } =
|
2094
|
+
const { common: a } = x();
|
2078
2095
|
return /* @__PURE__ */ l(be, { style: { flexDirection: "row", gap: 25, ...i }, children: [
|
2079
2096
|
e.map((o, r) => /* @__PURE__ */ l(be, { style: { alignItems: "center", flexDirection: "row" }, children: [
|
2080
2097
|
/* @__PURE__ */ t(
|
@@ -2116,7 +2133,7 @@ const ku = ({
|
|
2116
2133
|
valueFormatterString: C = "0,0",
|
2117
2134
|
width: f
|
2118
2135
|
}) => {
|
2119
|
-
const b = it(), E = i.flat().map((D) => D.x), S = i.flat().map((D) => D.y), v = Math.round(S.reduce((D, H) => H + D, 0) / S.length), N = Math.floor(Math.min(...S) / 100) * 100,
|
2136
|
+
const b = it(), E = i.flat().map((D) => D.x), S = i.flat().map((D) => D.y), v = Math.round(S.reduce((D, H) => H + D, 0) / S.length), N = Math.floor(Math.min(...S) / 100) * 100, I = Math.ceil(Math.max(...S) / 100) * 100, R = i.map((D, H) => ({
|
2120
2137
|
type: d ? "bar" : "line",
|
2121
2138
|
curve: "linear",
|
2122
2139
|
color: d ? b.palette.chart?.chart6 : n[H] ?? b.palette.primary.main,
|
@@ -2149,11 +2166,11 @@ const ku = ({
|
|
2149
2166
|
yAxis: [
|
2150
2167
|
{
|
2151
2168
|
min: N,
|
2152
|
-
max:
|
2169
|
+
max: I || 100,
|
2153
2170
|
colorMap: _ ? {
|
2154
2171
|
type: "continuous",
|
2155
2172
|
min: N,
|
2156
|
-
max:
|
2173
|
+
max: I,
|
2157
2174
|
color: [b.palette.background.paper, n[0] ?? b.palette.primary.main]
|
2158
2175
|
} : void 0,
|
2159
2176
|
valueFormatter: (D) => B(D, C)
|
@@ -2262,13 +2279,13 @@ const ku = ({
|
|
2262
2279
|
if (!n)
|
2263
2280
|
throw new Error(`${e}() must be used within the GlobalDataContext`);
|
2264
2281
|
return n;
|
2265
|
-
}, ve = () => Je("useAccountStore").globalStore.accountStore, Vi = () => Je("useAppConfig").globalStore.appDataStore.appConfig, vo = () => Je("useAnalyticsStore").globalStore.analyticsStore, ht = () => Je("useBudgetsStore").globalStore.budgetsStore, wo = () => Je("useCashflowStore").globalStore.cashflowStore, ze = () => Je("useCategoryStore").globalStore.categoryStore, ac = () => Je("useConnectStore").globalStore.connectStore, va = () => Je("useDebtsStore").globalStore.debtsStore, wa = () => Je("useGlobalStore").globalStore, ue = () => Je("useGlobalUiStore").globalStore.globalUiStore,
|
2282
|
+
}, ve = () => Je("useAccountStore").globalStore.accountStore, Vi = () => Je("useAppConfig").globalStore.appDataStore.appConfig, vo = () => Je("useAnalyticsStore").globalStore.analyticsStore, ht = () => Je("useBudgetsStore").globalStore.budgetsStore, wo = () => Je("useCashflowStore").globalStore.cashflowStore, ze = () => Je("useCategoryStore").globalStore.categoryStore, ac = () => Je("useConnectStore").globalStore.connectStore, va = () => Je("useDebtsStore").globalStore.debtsStore, wa = () => Je("useGlobalStore").globalStore, ue = () => Je("useGlobalUiStore").globalStore.globalUiStore, x = () => Je("globalCopyStore").globalStore.copyStore.copy, lt = () => Je("useGoalStore").globalStore.goalStore, No = () => Je("useHelpStore").globalStore.helpStore, Ri = () => Je("useHoldingStore").globalStore.holdingStore, Vu = () => Je("useMerchantStore").globalStore.merchantStore, Ku = () => Je("useNetWorthStore").globalStore.netWorthStore, oc = () => Je("useNotificationStore").globalStore.notificationStore, at = () => Je("useRecurringActivityStore").globalStore.recurringActivityStore, $t = () => Je("useRecurringTransactionsStore").globalStore.recurringTransactionsStore, Ft = () => Je("useSettingsStore").globalStore.settingsStore, Te = () => Je("useTransactionStore").globalStore.transactionStore, an = () => Je("useUserStore").globalStore.userStore, K = () => ({ onEvent: Je().onEvent }), Z2 = () => ({ onPageView: Je().onPageView }), zu = (e = "useWidgetContainerContext") => {
|
2266
2283
|
const n = g.useContext(nc);
|
2267
2284
|
if (!n)
|
2268
2285
|
throw new Error(`${e}() must be used within the WidgetContainerContext`);
|
2269
2286
|
return n;
|
2270
2287
|
}, Vn = () => zu(), rc = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
2271
|
-
const { categories: i } =
|
2288
|
+
const { categories: i } = x(), { getCategoryName: a } = ze(), o = a(e);
|
2272
2289
|
return /* @__PURE__ */ l(y, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
2273
2290
|
/* @__PURE__ */ t(
|
2274
2291
|
L,
|
@@ -2420,11 +2437,11 @@ const ku = ({
|
|
2420
2437
|
hoveredAreaData: null,
|
2421
2438
|
isAreaHovered: !1,
|
2422
2439
|
cursorPos: { x: 0, y: 0 }
|
2423
|
-
}), { hoveredSeriesId: b, hoveredAreaData: E, isAreaHovered: S, cursorPos: v } = C, N = S && b && E,
|
2440
|
+
}), { hoveredSeriesId: b, hoveredAreaData: E, isAreaHovered: S, cursorPos: v } = C, N = S && b && E, I = !N, R = [...o, ...r], D = R[0]?.dataset.length ?? 0, H = R.flatMap((ce) => ce.dataset.map((Pe) => Pe.x)), O = R.flatMap((ce) => ce.dataset.map((Pe) => Pe.y)), M = o[0]?.dataset?.map(
|
2424
2441
|
(ce, Pe) => o.reduce((le, Xe) => le + Xe.dataset[Pe]?.y || 0, 0)
|
2425
|
-
) ?? [0],
|
2442
|
+
) ?? [0], j = Math.max(...M), U = Math.max(
|
2426
2443
|
...r.flatMap((ce) => ce.dataset.map((Pe) => Pe.y))
|
2427
|
-
), W = Math.floor(Math.min(...O) / 100) * 100, Ee = Math.ceil(Math.max(
|
2444
|
+
), W = Math.floor(Math.min(...O) / 100) * 100, Ee = Math.ceil(Math.max(j, U) / 100) * 100, J = o.map((ce, Pe) => ({
|
2428
2445
|
id: `stacked-${Pe}`,
|
2429
2446
|
guid: ce.category_guid,
|
2430
2447
|
top_level_guid: ce.top_level_category_guid,
|
@@ -2549,7 +2566,7 @@ const ku = ({
|
|
2549
2566
|
}
|
2550
2567
|
},
|
2551
2568
|
slots: {
|
2552
|
-
itemContent: (ce) =>
|
2569
|
+
itemContent: (ce) => I && b ? /* @__PURE__ */ t(
|
2553
2570
|
Xu,
|
2554
2571
|
{
|
2555
2572
|
categoryGuids: Le(b),
|
@@ -2560,7 +2577,7 @@ const ku = ({
|
|
2560
2577
|
},
|
2561
2578
|
sx: Ye,
|
2562
2579
|
tooltip: {
|
2563
|
-
trigger:
|
2580
|
+
trigger: I ? "item" : "none"
|
2564
2581
|
},
|
2565
2582
|
width: c,
|
2566
2583
|
xAxis: [
|
@@ -2800,7 +2817,7 @@ const ku = ({
|
|
2800
2817
|
toolTipContent: r = "",
|
2801
2818
|
variant: s = "outlined"
|
2802
2819
|
}) => {
|
2803
|
-
const c = me(), d = c.palette.mode === "dark", { isMobile: _ } = ye(), [u, h] = g.useState(a), [m, C] = g.useState(i.dateRangePickerCopy.dateRangeThisMonth), [f, b] = g.useState(u), [E, S] = g.useState(!1), [v, N] = g.useState(!0), [
|
2820
|
+
const c = me(), d = c.palette.mode === "dark", { isMobile: _ } = ye(), [u, h] = g.useState(a), [m, C] = g.useState(i.dateRangePickerCopy.dateRangeThisMonth), [f, b] = g.useState(u), [E, S] = g.useState(!1), [v, N] = g.useState(!0), [I, R] = g.useState(6), D = {
|
2804
2821
|
buttons: [
|
2805
2822
|
{ label: "3M", value: 3 },
|
2806
2823
|
{ label: "6M", value: 6 },
|
@@ -2818,10 +2835,10 @@ const ku = ({
|
|
2818
2835
|
b(a);
|
2819
2836
|
}, [a]), g.useEffect(() => {
|
2820
2837
|
(s === "timeframebuttons" || s === "timeframetabs") && e.onRangeChanged(H());
|
2821
|
-
}, [
|
2838
|
+
}, [I]);
|
2822
2839
|
const H = () => {
|
2823
2840
|
const U = qe(gn());
|
2824
|
-
return [qe(qt(U,
|
2841
|
+
return [qe(qt(U, I)), U];
|
2825
2842
|
}, O = (U) => {
|
2826
2843
|
const W = [...u], Ee = u[0], J = u[1], pe = U === "previous";
|
2827
2844
|
if (m === i.dateRangePickerCopy.dateRangeThisMonth)
|
@@ -2837,7 +2854,7 @@ const ku = ({
|
|
2837
2854
|
h(f), N(
|
2838
2855
|
m === i.dateRangePickerCopy.dateRangeThisMonth || m === i.dateRangePickerCopy.dateRangeLastMonth
|
2839
2856
|
), e.onRangeChanged(f);
|
2840
|
-
},
|
2857
|
+
}, j = (U) => {
|
2841
2858
|
R(U);
|
2842
2859
|
};
|
2843
2860
|
return /* @__PURE__ */ l(L, { className: "mx-cmn-date-range-selector", m: 4, children: [
|
@@ -2938,11 +2955,11 @@ const ku = ({
|
|
2938
2955
|
color: n,
|
2939
2956
|
exclusive: !0,
|
2940
2957
|
orientation: "horizontal",
|
2941
|
-
value:
|
2958
|
+
value: I,
|
2942
2959
|
children: D.buttons.map((U) => /* @__PURE__ */ t(
|
2943
2960
|
di,
|
2944
2961
|
{
|
2945
|
-
onClick: () =>
|
2962
|
+
onClick: () => j(U.value),
|
2946
2963
|
sx: {
|
2947
2964
|
fontSize: 15,
|
2948
2965
|
fontWeight: 600,
|
@@ -2977,9 +2994,9 @@ const ku = ({
|
|
2977
2994
|
kt,
|
2978
2995
|
{
|
2979
2996
|
indicatorColor: "primary",
|
2980
|
-
onChange: (U, W) =>
|
2997
|
+
onChange: (U, W) => j(W),
|
2981
2998
|
textColor: "primary",
|
2982
|
-
value:
|
2999
|
+
value: I,
|
2983
3000
|
variant: "fullWidth",
|
2984
3001
|
children: D.tabs.map((U) => /* @__PURE__ */ t(
|
2985
3002
|
Ke,
|
@@ -3249,7 +3266,7 @@ const Rn = ({
|
|
3249
3266
|
sx: h = {},
|
3250
3267
|
title: m = ""
|
3251
3268
|
}) => {
|
3252
|
-
const [C, { height: f, width: b }] = cc(), { onEvent: E } = K(), { isDesktop: S, isLargeDesktop: v, isMobile: N, isTablet:
|
3269
|
+
const [C, { height: f, width: b }] = cc(), { onEvent: E } = K(), { isDesktop: S, isLargeDesktop: v, isMobile: N, isTablet: I } = ye(), { displayedDateRange: R, isCopyLoaded: D, selectedAccountGuids: H, setSelectedAccountGuids: O } = ue(), { common: M } = x(), j = () => {
|
3253
3270
|
d && (d(), E($.WIDGET_BACK_CLICK));
|
3254
3271
|
};
|
3255
3272
|
if (!D)
|
@@ -3297,7 +3314,7 @@ const Rn = ({
|
|
3297
3314
|
px: 4
|
3298
3315
|
},
|
3299
3316
|
"& .mx-cmn-date-range-selector": {
|
3300
|
-
...(N ||
|
3317
|
+
...(N || I) && {
|
3301
3318
|
textAlign: "center"
|
3302
3319
|
}
|
3303
3320
|
},
|
@@ -3343,7 +3360,7 @@ const Rn = ({
|
|
3343
3360
|
children: ke
|
3344
3361
|
},
|
3345
3362
|
Q
|
3346
|
-
) : /* @__PURE__ */ t(Ue, { "aria-label": ke, color: "primary", onClick: Le, children: /* @__PURE__ */ t(P, { name: Q }) }, Q) : S ||
|
3363
|
+
) : /* @__PURE__ */ t(Ue, { "aria-label": ke, color: "primary", onClick: Le, children: /* @__PURE__ */ t(P, { name: Q }) }, Q) : S || I ? /* @__PURE__ */ t(
|
3347
3364
|
te,
|
3348
3365
|
{
|
3349
3366
|
onClick: Le,
|
@@ -3358,7 +3375,7 @@ const Rn = ({
|
|
3358
3375
|
sx: {
|
3359
3376
|
"& .MuiCardHeader-action": {
|
3360
3377
|
...i && S && { flexGrow: 1 },
|
3361
|
-
...(N ||
|
3378
|
+
...(N || I) && {
|
3362
3379
|
alignSelf: "center"
|
3363
3380
|
},
|
3364
3381
|
mr: 0
|
@@ -3366,12 +3383,12 @@ const Rn = ({
|
|
3366
3383
|
p: S ? 48 : 24,
|
3367
3384
|
pb: 0
|
3368
3385
|
},
|
3369
|
-
title: S ||
|
3386
|
+
title: S || I ? /* @__PURE__ */ t(en, { children: m }) : /* @__PURE__ */ l(y, { alignItems: "center", flexDirection: "row", children: [
|
3370
3387
|
N && d && /* @__PURE__ */ t(
|
3371
3388
|
Ue,
|
3372
3389
|
{
|
3373
3390
|
"aria-label": M.back_to_dashboard,
|
3374
|
-
onClick:
|
3391
|
+
onClick: j,
|
3375
3392
|
sx: { p: 12, mr: 4 },
|
3376
3393
|
children: /* @__PURE__ */ t(P, { name: "arrow_back", size: 24 })
|
3377
3394
|
}
|
@@ -3381,7 +3398,7 @@ const Rn = ({
|
|
3381
3398
|
}
|
3382
3399
|
),
|
3383
3400
|
c && /* @__PURE__ */ t(k, { sx: { mt: S ? 48 : 24 } }),
|
3384
|
-
i && (N ||
|
3401
|
+
i && (N || I) && /* @__PURE__ */ l(y, { gap: 24, justifyContent: "center", sx: { mt: N ? 0 : 16 }, children: [
|
3385
3402
|
u && /* @__PURE__ */ t(k, {}),
|
3386
3403
|
/* @__PURE__ */ t(
|
3387
3404
|
Tr,
|
@@ -3399,7 +3416,7 @@ const Rn = ({
|
|
3399
3416
|
}
|
3400
3417
|
);
|
3401
3418
|
}, Mt = A(t_), n_ = ({ status: e = Pn.Loading }) => {
|
3402
|
-
const { connect: n } =
|
3419
|
+
const { connect: n } = x();
|
3403
3420
|
return /* @__PURE__ */ t(
|
3404
3421
|
L,
|
3405
3422
|
{
|
@@ -3432,7 +3449,7 @@ const Ar = "connect_widget", Ir = "connections_widget", i_ = ({
|
|
3432
3449
|
title: a
|
3433
3450
|
}) => {
|
3434
3451
|
let o;
|
3435
|
-
const { refreshAccounts: r } = ve(), { loadWidget: s } = ac(), { connect: c } =
|
3452
|
+
const { refreshAccounts: r } = ve(), { loadWidget: s } = ac(), { connect: c } = x(), [d, _] = g.useState(!1), [u, h] = g.useState(!1), {
|
3436
3453
|
palette: { mode: m }
|
3437
3454
|
} = me();
|
3438
3455
|
return g.useEffect(() => (i ? (_(!0), s({ mode: m, ...e }).then((C) => {
|
@@ -3483,7 +3500,7 @@ const Ar = "connect_widget", Ir = "connections_widget", i_ = ({
|
|
3483
3500
|
setHasValidInput: u,
|
3484
3501
|
...h
|
3485
3502
|
}) => {
|
3486
|
-
const [m, C] = g.useState(""), { common: f } =
|
3503
|
+
const [m, C] = g.useState(""), { common: f } = x(), b = o || f.currency_input, E = Et(), S = a_(E), v = /^[0-9]*$/, N = /^(\d)*(\,)?([0-9]{1,2})?$/, I = /^(\d)*(\.)?([0-9]{1,2})?$/;
|
3487
3504
|
let R;
|
3488
3505
|
const D = g.useRef(fd());
|
3489
3506
|
if (e)
|
@@ -3492,7 +3509,7 @@ const Ar = "connect_widget", Ir = "connections_widget", i_ = ({
|
|
3492
3509
|
R = N;
|
3493
3510
|
break;
|
3494
3511
|
default:
|
3495
|
-
R =
|
3512
|
+
R = I;
|
3496
3513
|
break;
|
3497
3514
|
}
|
3498
3515
|
else
|
@@ -3694,7 +3711,7 @@ const Ar = "connect_widget", Ir = "connections_widget", i_ = ({
|
|
3694
3711
|
]
|
3695
3712
|
}
|
3696
3713
|
), Fn = ({ iconName: e, label: n, onClick: i, value: a }) => {
|
3697
|
-
const o = /* @__PURE__ */ l(
|
3714
|
+
const o = /* @__PURE__ */ l(q, { children: [
|
3698
3715
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(nn, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ t(P, { name: e, sx: { color: "text.primary" }, weight: St.Dark }) }) }),
|
3699
3716
|
/* @__PURE__ */ t(
|
3700
3717
|
se,
|
@@ -3841,7 +3858,7 @@ const Ar = "connect_widget", Ir = "connections_widget", i_ = ({
|
|
3841
3858
|
secondaryText: c,
|
3842
3859
|
zeroStateText: d
|
3843
3860
|
}) => {
|
3844
|
-
const { common: _ } =
|
3861
|
+
const { common: _ } = x(), [u, h] = g.useState(!1), m = () => {
|
3845
3862
|
h(!1), o?.();
|
3846
3863
|
}, C = () => {
|
3847
3864
|
h(!1), r();
|
@@ -4315,8 +4332,8 @@ const gi = () => {
|
|
4315
4332
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
4316
4333
|
return wo().uiStore;
|
4317
4334
|
}, p_ = ({ remaining: e }) => {
|
4318
|
-
const { cashflow: n } =
|
4319
|
-
return /* @__PURE__ */ l(
|
4335
|
+
const { cashflow: n } = x();
|
4336
|
+
return /* @__PURE__ */ l(q, { children: [
|
4320
4337
|
/* @__PURE__ */ t(
|
4321
4338
|
L,
|
4322
4339
|
{
|
@@ -4332,7 +4349,7 @@ const gi = () => {
|
|
4332
4349
|
/* @__PURE__ */ t(je, { amount: e, bold: !0, sx: { fontSize: 12 } })
|
4333
4350
|
] });
|
4334
4351
|
}, Do = A(p_), C_ = ({ onAddIncomeClick: e }) => {
|
4335
|
-
const n = me(), { availableWidth: i } = Vn(), { isMobile: a } = ye(), { visibleCashAccounts: o, visibleCashBalance: r } = ve(), { selectedAccountGuids: s } = ue(), { cashflow: c } =
|
4352
|
+
const n = me(), { availableWidth: i } = Vn(), { isMobile: a } = ye(), { visibleCashAccounts: o, visibleCashBalance: r } = ve(), { selectedAccountGuids: s } = ue(), { cashflow: c } = x(), { userProfile: d } = an(), {
|
4336
4353
|
daysUntilNextIncome: _,
|
4337
4354
|
expensesTilNextIncome: u,
|
4338
4355
|
selectedCashAccounts: h,
|
@@ -4353,7 +4370,7 @@ const gi = () => {
|
|
4353
4370
|
), N = g.useMemo(
|
4354
4371
|
() => u.filter((D) => s.includes(D.accountGuid || "")).reduce((D, H) => D + H.amount, 0),
|
4355
4372
|
[s, u]
|
4356
|
-
),
|
4373
|
+
), I = g.useMemo(
|
4357
4374
|
() => v - N,
|
4358
4375
|
[v, N]
|
4359
4376
|
), R = d?.has_completed_cash_flow_onboarding && !!e;
|
@@ -4380,13 +4397,13 @@ const gi = () => {
|
|
4380
4397
|
] }),
|
4381
4398
|
/* @__PURE__ */ t(y, { pt: 18, children: /* @__PURE__ */ t(P, { name: "equals" }) }),
|
4382
4399
|
/* @__PURE__ */ l(y, { pb: 14, pr: 24, pt: 12, children: [
|
4383
|
-
/* @__PURE__ */ t(je, { amount:
|
4400
|
+
/* @__PURE__ */ t(je, { amount: I, variant: "H2" }),
|
4384
4401
|
/* @__PURE__ */ l(y, { alignItems: "center", direction: "row", gap: 8, children: [
|
4385
4402
|
/* @__PURE__ */ t(Oe, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
|
4386
4403
|
/* @__PURE__ */ t(ua, { body: c.tooltip_body, title: c.tooltip_title })
|
4387
4404
|
] })
|
4388
4405
|
] }),
|
4389
|
-
/* @__PURE__ */ t(y, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: R ? /* @__PURE__ */ l(
|
4406
|
+
/* @__PURE__ */ t(y, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: R ? /* @__PURE__ */ l(q, { children: [
|
4390
4407
|
/* @__PURE__ */ t(p, { variant: "H2", children: T(c.days, _) }),
|
4391
4408
|
/* @__PURE__ */ t(Oe, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
|
4392
4409
|
] }) : /* @__PURE__ */ t(
|
@@ -4425,7 +4442,7 @@ const gi = () => {
|
|
4425
4442
|
justifyContent: "space-between",
|
4426
4443
|
px: 16,
|
4427
4444
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
4428
|
-
children: /* @__PURE__ */ t(Do, { remaining:
|
4445
|
+
children: /* @__PURE__ */ t(Do, { remaining: I })
|
4429
4446
|
}
|
4430
4447
|
),
|
4431
4448
|
/* @__PURE__ */ t(k, {}),
|
@@ -4457,7 +4474,7 @@ const gi = () => {
|
|
4457
4474
|
)
|
4458
4475
|
] }) }) : /* @__PURE__ */ t(ge, { height: a ? 210 : 120 });
|
4459
4476
|
}, f_ = A(C_), b_ = ({ onPrimaryCtaClick: e, sx: n = {} }) => {
|
4460
|
-
const { cashflow: i } =
|
4477
|
+
const { cashflow: i } = x(), { isCopyLoaded: a, isInitialized: o } = ue(), { loadActivity: r } = at();
|
4461
4478
|
return g.useEffect(() => {
|
4462
4479
|
o && r();
|
4463
4480
|
}, [o]), a ? /* @__PURE__ */ t(
|
@@ -4567,7 +4584,7 @@ const y_ = [
|
|
4567
4584
|
1,
|
4568
4585
|
2
|
4569
4586
|
/* MerchantLogo */
|
4570
|
-
],
|
4587
|
+
], X = {
|
4571
4588
|
ON_TRANSACTION_CATEGORY_CLICK: "onTransactionCategoryClick",
|
4572
4589
|
ON_TRANSACTION_CATEGORY_CHANGED: "onTransactionCategoryChanged",
|
4573
4590
|
ON_TRANSACTION_MANUAL_ADD_CLICK: "onTransactionManualAddClick",
|
@@ -4691,214 +4708,214 @@ const y_ = [
|
|
4691
4708
|
UNHIDE_TRANSACTION: "Unhide Transaction"
|
4692
4709
|
}, Dr = {
|
4693
4710
|
// splits
|
4694
|
-
[
|
4711
|
+
[X.ON_TRANSACTION_SPLIT_CLICK]: {
|
4695
4712
|
action: Ae.SELECT,
|
4696
4713
|
category: Ie.TRANSACTION_DETAILS,
|
4697
4714
|
label: xe.SPLITS
|
4698
4715
|
},
|
4699
|
-
[
|
4716
|
+
[X.ON_TRANSACTION_SPLIT_CATEGORY_CLICK]: {
|
4700
4717
|
action: Ae.ADD_CATEGORY,
|
4701
4718
|
category: Ie.TRANSACTION_DETAILS,
|
4702
4719
|
label: xe.SPLITS
|
4703
4720
|
},
|
4704
|
-
[
|
4721
|
+
[X.ON_TRANSACTION_SPLIT_DELETE_CLICK]: {
|
4705
4722
|
action: Ae.DELETE,
|
4706
4723
|
category: Ie.TRANSACTION_DETAILS,
|
4707
4724
|
label: xe.SPLITS
|
4708
4725
|
},
|
4709
|
-
[
|
4726
|
+
[X.ON_TRANSACTION_SPLIT_SAVE_CLICK]: {
|
4710
4727
|
action: Ae.SPLIT,
|
4711
4728
|
category: Ie.TRANSACTION_DETAILS,
|
4712
4729
|
label: xe.SPLITS
|
4713
4730
|
},
|
4714
|
-
[
|
4731
|
+
[X.ON_TRANSACTION_UNSPLIT]: {
|
4715
4732
|
action: Ae.UNSPLIT,
|
4716
4733
|
category: Ie.TRANSACTION_DETAILS,
|
4717
4734
|
label: xe.SPLITS
|
4718
4735
|
},
|
4719
4736
|
// category
|
4720
|
-
[
|
4737
|
+
[X.ON_TRANSACTION_CATEGORY_CLICK]: {
|
4721
4738
|
action: Ae.SELECT,
|
4722
4739
|
category: Ie.TRANSACTIONS_LIST,
|
4723
4740
|
label: xe.CATEGORY
|
4724
4741
|
},
|
4725
|
-
[
|
4742
|
+
[X.ON_TRANSACTION_CATEGORY_CHANGED]: {
|
4726
4743
|
action: Ae.CHANGE_CATEGORY,
|
4727
4744
|
category: Ie.TRANSACTION_DETAILS,
|
4728
4745
|
label: xe.CATEGORY
|
4729
4746
|
},
|
4730
4747
|
// date
|
4731
|
-
[
|
4748
|
+
[X.ON_TRANSACTION_DATE_CHANGED]: {
|
4732
4749
|
action: Ae.SAVE,
|
4733
4750
|
category: Ie.TRANSACTION_DETAILS,
|
4734
4751
|
label: xe.DATE
|
4735
4752
|
},
|
4736
|
-
[
|
4753
|
+
[X.ON_TRANSACTION_DATE_CLICK]: {
|
4737
4754
|
action: Ae.SELECT,
|
4738
4755
|
category: Ie.TRANSACTION_DETAILS,
|
4739
4756
|
label: xe.DATE
|
4740
4757
|
},
|
4741
4758
|
// merchant logo
|
4742
|
-
[
|
4759
|
+
[X.ON_TRANSACTION_DELETE_LOGO_CANCEL]: {
|
4743
4760
|
action: Ae.CLOSE,
|
4744
4761
|
category: Ie.TRANSACTION_DETAILS,
|
4745
4762
|
label: xe.DELETE_MERCHANT_LOGO
|
4746
4763
|
},
|
4747
|
-
[
|
4764
|
+
[X.ON_TRANSACTION_DELETE_LOGO_CLICK]: {
|
4748
4765
|
action: Ae.SELECT,
|
4749
4766
|
category: Ie.TRANSACTION_DETAILS,
|
4750
4767
|
label: xe.DELETE_MERCHANT_LOGO
|
4751
4768
|
},
|
4752
|
-
[
|
4769
|
+
[X.ON_TRANSACTION_DELETE_LOGO_DELETED]: {
|
4753
4770
|
action: Ae.DELETE,
|
4754
4771
|
category: Ie.TRANSACTION_DETAILS,
|
4755
4772
|
label: xe.DELETE_MERCHANT_LOGO
|
4756
4773
|
},
|
4757
4774
|
// description
|
4758
|
-
[
|
4775
|
+
[X.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK]: {
|
4759
4776
|
action: Ae.EDIT,
|
4760
4777
|
category: Ie.TRANSACTION_DETAILS,
|
4761
4778
|
label: xe.DESCRIPTION
|
4762
4779
|
},
|
4763
|
-
[
|
4780
|
+
[X.ON_TRANSACTION_DESCRIPTION_SAVE_CLICK]: {
|
4764
4781
|
action: Ae.SAVE,
|
4765
4782
|
category: Ie.TRANSACTION_DETAILS,
|
4766
4783
|
label: xe.DESCRIPTION
|
4767
4784
|
},
|
4768
4785
|
// hide transactions
|
4769
|
-
[
|
4786
|
+
[X.ON_TRANSACTION_HIDDEN]: {
|
4770
4787
|
action: Ae.SAVE,
|
4771
4788
|
category: Ie.TRANSACTION_DETAILS,
|
4772
4789
|
label: xe.HIDE_TRANSACTION
|
4773
4790
|
},
|
4774
|
-
[
|
4791
|
+
[X.ON_TRANSACTION_HIDE_CLICK]: {
|
4775
4792
|
action: Ae.SELECT,
|
4776
4793
|
category: Ie.TRANSACTION_DETAILS,
|
4777
4794
|
label: xe.HIDE_TRANSACTION
|
4778
4795
|
},
|
4779
|
-
[
|
4796
|
+
[X.ON_TRANSACTION_HIDE_CANCEL_CLICK]: {
|
4780
4797
|
action: Ae.CLOSE,
|
4781
4798
|
category: Ie.TRANSACTION_DETAILS,
|
4782
4799
|
label: xe.HIDE_TRANSACTION
|
4783
4800
|
},
|
4784
4801
|
// transaction list
|
4785
|
-
[
|
4802
|
+
[X.ON_TRANSACTION_LIST_ITEM_CLICK]: {
|
4786
4803
|
action: Ae.SELECT,
|
4787
4804
|
category: Ie.TRANSACTIONS_LIST,
|
4788
4805
|
label: xe.TRANSACTION
|
4789
4806
|
},
|
4790
4807
|
// memo
|
4791
|
-
[
|
4808
|
+
[X.ON_TRANSACTION_MEMO_CHANGED]: {
|
4792
4809
|
action: Ae.SAVE,
|
4793
4810
|
category: Ie.TRANSACTION_DETAILS,
|
4794
4811
|
label: xe.MEMO
|
4795
4812
|
},
|
4796
|
-
[
|
4813
|
+
[X.ON_TRANSACTION_MEMO_CLICK]: {
|
4797
4814
|
action: Ae.SELECT,
|
4798
4815
|
category: Ie.TRANSACTION_DETAILS,
|
4799
4816
|
label: xe.MEMO
|
4800
4817
|
},
|
4801
4818
|
// tags
|
4802
|
-
[
|
4819
|
+
[X.ON_TRANSACTION_TAGS_CHANGED]: {
|
4803
4820
|
action: Ae.SAVE,
|
4804
4821
|
category: Ie.TRANSACTION_DETAILS,
|
4805
4822
|
label: xe.TAGS
|
4806
4823
|
},
|
4807
|
-
[
|
4824
|
+
[X.ON_TRANSACTION_TAGS_CLICK]: {
|
4808
4825
|
action: Ae.SELECT,
|
4809
4826
|
category: Ie.TRANSACTION_DETAILS,
|
4810
4827
|
label: xe.TAGS
|
4811
4828
|
},
|
4812
|
-
[
|
4829
|
+
[X.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK]: {
|
4813
4830
|
action: Ae.CLOSE,
|
4814
4831
|
category: Ie.TRANSACTION_DETAILS,
|
4815
4832
|
label: xe.TAGS
|
4816
4833
|
},
|
4817
|
-
[
|
4834
|
+
[X.ON_TRANSACTION_TAGS_TAG_ADD_CLICK]: {
|
4818
4835
|
action: Ae.ADD,
|
4819
4836
|
category: Ie.TRANSACTION_DETAILS,
|
4820
4837
|
label: xe.TAG_ADD
|
4821
4838
|
},
|
4822
|
-
[
|
4839
|
+
[X.ON_TRANSACTION_TAGS_TAG_ADDED]: {
|
4823
4840
|
action: Ae.SAVE,
|
4824
4841
|
category: Ie.TRANSACTION_DETAILS,
|
4825
4842
|
label: xe.TAG_ADD
|
4826
4843
|
},
|
4827
|
-
[
|
4844
|
+
[X.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK]: {
|
4828
4845
|
action: Ae.SELECT,
|
4829
4846
|
category: Ie.TRANSACTION_DETAILS,
|
4830
4847
|
label: xe.TAG_DELETE
|
4831
4848
|
},
|
4832
|
-
[
|
4849
|
+
[X.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK]: {
|
4833
4850
|
action: Ae.CLOSE,
|
4834
4851
|
category: Ie.TRANSACTION_DETAILS,
|
4835
4852
|
label: xe.TAG_DELETE
|
4836
4853
|
},
|
4837
|
-
[
|
4854
|
+
[X.ON_TRANSACTION_TAGS_TAG_DELETED]: {
|
4838
4855
|
action: Ae.SAVE,
|
4839
4856
|
category: Ie.TRANSACTION_DETAILS,
|
4840
4857
|
label: xe.TAG_DELETE
|
4841
4858
|
},
|
4842
|
-
[
|
4859
|
+
[X.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK]: {
|
4843
4860
|
action: Ae.EDIT,
|
4844
4861
|
category: Ie.TRANSACTION_DETAILS,
|
4845
4862
|
label: xe.TAG_EDIT
|
4846
4863
|
},
|
4847
|
-
[
|
4864
|
+
[X.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED]: {
|
4848
4865
|
action: Ae.SAVE,
|
4849
4866
|
category: Ie.TRANSACTION_DETAILS,
|
4850
4867
|
label: xe.TAG_EDIT
|
4851
4868
|
},
|
4852
4869
|
// flag
|
4853
|
-
[
|
4870
|
+
[X.ON_TRANSACTION_TOGGLE_FLAG_CLICK]: {
|
4854
4871
|
action: Ae.SELECT,
|
4855
4872
|
category: Ie.TRANSACTION_DETAILS,
|
4856
4873
|
label: xe.FLAG
|
4857
4874
|
},
|
4858
4875
|
// hide
|
4859
|
-
[
|
4876
|
+
[X.ON_TRANSACTION_UNHIDDEN]: {
|
4860
4877
|
action: Ae.SAVE,
|
4861
4878
|
category: Ie.TRANSACTION_DETAILS,
|
4862
4879
|
label: xe.UNHIDE_TRANSACTION
|
4863
4880
|
},
|
4864
|
-
[
|
4881
|
+
[X.ON_TRANSACTION_UNHIDE_CLICK]: {
|
4865
4882
|
action: Ae.SELECT,
|
4866
4883
|
category: Ie.TRANSACTION_DETAILS,
|
4867
4884
|
label: xe.UNHIDE_TRANSACTION
|
4868
4885
|
},
|
4869
|
-
[
|
4886
|
+
[X.ON_TRANSACTION_UNHIDE_CANCEL_CLICK]: {
|
4870
4887
|
action: Ae.CLOSE,
|
4871
4888
|
category: Ie.TRANSACTION_DETAILS,
|
4872
4889
|
label: xe.UNHIDE_TRANSACTION
|
4873
4890
|
},
|
4874
4891
|
// export CSV
|
4875
|
-
[
|
4892
|
+
[X.ON_TRANSACTION_EXPORT_CSV_CLICK]: {
|
4876
4893
|
action: Ae.SELECT,
|
4877
4894
|
category: Ie.TRANSACTIONS_WIDGET,
|
4878
4895
|
label: xe.EXPORT_CSV
|
4879
4896
|
},
|
4880
4897
|
// add transaction
|
4881
|
-
[
|
4898
|
+
[X.ON_TRANSACTION_MANUAL_ADD_CLICK]: {
|
4882
4899
|
action: Ae.SELECT,
|
4883
4900
|
category: Ie.TRANSACTIONS_WIDGET,
|
4884
4901
|
label: xe.ADD_TRANSACTION
|
4885
4902
|
},
|
4886
|
-
[
|
4903
|
+
[X.ON_TRANSACTION_MANUAL_ADD_ADDED]: {
|
4887
4904
|
action: Ae.ADD,
|
4888
4905
|
category: Ie.TRANSACTIONS_WIDGET,
|
4889
4906
|
label: xe.ADD_TRANSACTION
|
4890
4907
|
},
|
4891
|
-
[
|
4908
|
+
[X.ON_TRANSACTION_DELETE_CLICK]: {
|
4892
4909
|
action: Ae.SELECT,
|
4893
4910
|
category: Ie.TRANSACTIONS_WIDGET,
|
4894
4911
|
label: xe.DELETE_TRANSACTION
|
4895
4912
|
},
|
4896
|
-
[
|
4913
|
+
[X.ON_TRANSACTION_DELETE_CANCEL]: {
|
4897
4914
|
action: Ae.CLOSE,
|
4898
4915
|
category: Ie.TRANSACTIONS_WIDGET,
|
4899
4916
|
label: xe.DELETE_TRANSACTION
|
4900
4917
|
},
|
4901
|
-
[
|
4918
|
+
[X.ON_TRANSACTION_DELETE_DELETED]: {
|
4902
4919
|
action: Ae.DELETE,
|
4903
4920
|
category: Ie.TRANSACTIONS_WIDGET,
|
4904
4921
|
label: xe.DELETE_TRANSACTION
|
@@ -5236,11 +5253,11 @@ const vt = () => {
|
|
5236
5253
|
let n = e.parent_guid ? "Split: " : "";
|
5237
5254
|
return n += e.is_hidden ? "(Excluded) " : "", n += e.description, n;
|
5238
5255
|
}, B_ = (e, n) => e.tags.map((i) => n.filter((o) => o.guid === i)[0]?.name ?? "").join(" "), P_ = ({ transaction: e, onClick: n }) => {
|
5239
|
-
const { associatedBeats: i } = Te(), { transactions: a } =
|
5256
|
+
const { associatedBeats: i } = Te(), { transactions: a } = x(), { showInsights: o } = vt(), r = e.transaction_type === At.CREDIT, s = g.useMemo(() => i.find((c) => c.associated_transaction_guid === e.guid), [i, e]);
|
5240
5257
|
return /* @__PURE__ */ l(
|
5241
5258
|
r_,
|
5242
5259
|
{
|
5243
|
-
clickEventName:
|
5260
|
+
clickEventName: X.ON_TRANSACTION_LIST_ITEM_CLICK,
|
5244
5261
|
onClick: n ? () => n(e.guid) : void 0,
|
5245
5262
|
children: [
|
5246
5263
|
/* @__PURE__ */ t(He, { children: e.parent_guid ? /* @__PURE__ */ t(g.Fragment, {}) : /* @__PURE__ */ t(
|
@@ -5291,7 +5308,7 @@ const vt = () => {
|
|
5291
5308
|
bgcolor: e = "background.default",
|
5292
5309
|
children: n
|
5293
5310
|
}) => /* @__PURE__ */ t(L, { display: "inline-block", pb: 4, pl: 24, pt: 4, sx: { bgcolor: e, width: "100%" }, children: /* @__PURE__ */ t(p, { bold: !0, variant: "XSmall", children: n }) }), H_ = ({ showIcon: e = !0, showSubtitle: n = !0 }) => {
|
5294
|
-
const i = Et(), { transactions: a } =
|
5311
|
+
const i = Et(), { transactions: a } = x();
|
5295
5312
|
return /* @__PURE__ */ l(y, { alignItems: "center", gap: i.Spacing.Small, height: "auto", mt: i.Spacing.Large, children: [
|
5296
5313
|
e && /* @__PURE__ */ t(Pd, { color: "secondary", sx: { fontSize: 32 } }),
|
5297
5314
|
/* @__PURE__ */ t(p, { bold: !0, color: "secondary", variant: "Small", children: a.zero_state_no_transactions }),
|
@@ -5315,7 +5332,7 @@ const vt = () => {
|
|
5315
5332
|
zeroState: d = /* @__PURE__ */ t($_, {})
|
5316
5333
|
}) => {
|
5317
5334
|
const { isLoading: _, sortedTransactions: u } = Te(), h = g.useMemo(() => s ? u : u.filter((v) => !v.is_hidden), [u, s]), { setShowInsights: m, toggleSplit: C } = vt(), { onEvent: f } = K(), b = (v) => {
|
5318
|
-
const N = h.find((
|
5335
|
+
const N = h.find((I) => I.guid === v);
|
5319
5336
|
if (N?.has_been_split) {
|
5320
5337
|
C(N.guid);
|
5321
5338
|
return;
|
@@ -5343,7 +5360,7 @@ const vt = () => {
|
|
5343
5360
|
(_ || r) && i,
|
5344
5361
|
!_ && !r && S.getVirtualItems().length === 0 && d,
|
5345
5362
|
!_ && !r && S.getVirtualItems().length > 0 && S.getVirtualItems().map((v) => {
|
5346
|
-
const N = h[v.index],
|
5363
|
+
const N = h[v.index], I = Rr(v.index, h), R = F_(v.index, h), D = Or + (I ? Lr : 0);
|
5347
5364
|
return /* @__PURE__ */ l(
|
5348
5365
|
L,
|
5349
5366
|
{
|
@@ -5354,7 +5371,7 @@ const vt = () => {
|
|
5354
5371
|
width: "100%"
|
5355
5372
|
},
|
5356
5373
|
children: [
|
5357
|
-
|
5374
|
+
I && /* @__PURE__ */ t(Da, { bgcolor: e, children: Wi(N.date) }),
|
5358
5375
|
/* @__PURE__ */ t(Na, { onClick: b, transaction: N }),
|
5359
5376
|
/* @__PURE__ */ t(k, { sx: { ml: R ? 24 : 0 } })
|
5360
5377
|
]
|
@@ -5378,7 +5395,7 @@ const vt = () => {
|
|
5378
5395
|
r && i && /* @__PURE__ */ t(p, { bold: !0, color: "primary.light", variant: "XSmall", children: r.short_title })
|
5379
5396
|
] });
|
5380
5397
|
}, K_ = (e) => {
|
5381
|
-
const { transactions: n } =
|
5398
|
+
const { transactions: n } = x(), [i, a] = g.useState(!1);
|
5382
5399
|
return /* @__PURE__ */ l(
|
5383
5400
|
y,
|
5384
5401
|
{
|
@@ -5397,7 +5414,7 @@ const vt = () => {
|
|
5397
5414
|
}
|
5398
5415
|
);
|
5399
5416
|
}, z_ = A(K_), Y_ = (e) => /* @__PURE__ */ t(p, { tabIndex: e.tabIndex, variant: "Small", children: re(Ge(e.row.date), ae.MONTH_DAY) }), j_ = (e) => {
|
5400
|
-
const n = it(), { transactions: i } =
|
5417
|
+
const n = it(), { transactions: i } = x(), { is_flagged: a, is_hidden: o, has_been_viewed: r, parent_guid: s } = e.row, d = !r && !!!s;
|
5401
5418
|
return /* @__PURE__ */ l(
|
5402
5419
|
L,
|
5403
5420
|
{
|
@@ -5438,7 +5455,7 @@ const vt = () => {
|
|
5438
5455
|
onCategoryClick: n,
|
5439
5456
|
onRowClick: i
|
5440
5457
|
}) => {
|
5441
|
-
const { isLoading: a, sortedTransactions: o } = Te(), { transactions: r } =
|
5458
|
+
const { isLoading: a, sortedTransactions: o } = Te(), { transactions: r } = x(), { isCopyLoaded: s } = ue(), c = g.useMemo(
|
5442
5459
|
() => o.map((u) => ({
|
5443
5460
|
id: u.guid,
|
5444
5461
|
isHovering: !1,
|
@@ -5543,7 +5560,7 @@ const J_ = ({
|
|
5543
5560
|
isOpen: a,
|
5544
5561
|
type: o
|
5545
5562
|
}) => {
|
5546
|
-
const [r, s] = g.useState(e), { categories: c } =
|
5563
|
+
const [r, s] = g.useState(e), { categories: c } = x(), { setShouldDisableDrawerScroll: d } = Cn();
|
5547
5564
|
let _ = "", u = [];
|
5548
5565
|
const h = o === "delete";
|
5549
5566
|
switch (o) {
|
@@ -5588,7 +5605,7 @@ const J_ = ({
|
|
5588
5605
|
}
|
5589
5606
|
);
|
5590
5607
|
}, Oo = A(J_), eh = ({ parentCategory: e }) => {
|
5591
|
-
const [n, i] = g.useState(!1), { addCategory: a } = ze(), { categories: o } =
|
5608
|
+
const [n, i] = g.useState(!1), { addCategory: a } = ze(), { categories: o } = x(), { onEvent: r } = K(), { setShouldDisableDrawerScroll: s } = Cn(), c = async (u) => {
|
5592
5609
|
await a(u.trim(), e.guid), r(Qt.ON_SUBCATEGORY_ADDED), i(!1);
|
5593
5610
|
}, d = async () => {
|
5594
5611
|
r(Qt.ON_SUBCATEGORY_ADD_CLICK), s(!0), i(!0);
|
@@ -5663,7 +5680,7 @@ const J_ = ({
|
|
5663
5680
|
showSelected: s,
|
5664
5681
|
unselectable: c,
|
5665
5682
|
unselectableText: d
|
5666
|
-
} = Cn(), { categories: _ } =
|
5683
|
+
} = Cn(), { categories: _ } = x(), { onEvent: u } = K(), [h, m] = g.useState(!1), [C, f] = g.useState(!1), b = !!n.revision, E = n.guid === a, S = !c.some((N) => N === n.guid);
|
5667
5684
|
return /* @__PURE__ */ l(
|
5668
5685
|
Y,
|
5669
5686
|
{
|
@@ -5795,7 +5812,7 @@ const J_ = ({
|
|
5795
5812
|
/* @__PURE__ */ t(lh, { categories: n, parentCategory: e })
|
5796
5813
|
] });
|
5797
5814
|
}, hc = A(dh), uh = () => {
|
5798
|
-
const { categories: e } = ze(), { searchValue: n } = Cn(), { categories: i } =
|
5815
|
+
const { categories: e } = ze(), { searchValue: n } = Cn(), { categories: i } = x(), o = ((r, s = "") => r.reduce((c, d) => {
|
5799
5816
|
if (d.parent_guid === null) {
|
5800
5817
|
const u = [
|
5801
5818
|
{
|
@@ -5827,7 +5844,7 @@ const J_ = ({
|
|
5827
5844
|
unselectable: a = [],
|
5828
5845
|
unselectableText: o = "Unselectable"
|
5829
5846
|
}) => {
|
5830
|
-
const { categories: r, loadCategories: s } = ze(), { common: c } =
|
5847
|
+
const { categories: r, loadCategories: s } = ze(), { common: c } = x(), { isCopyLoaded: d } = ue(), {
|
5831
5848
|
searchValue: _,
|
5832
5849
|
setOnSelect: u,
|
5833
5850
|
setSearchValue: h,
|
@@ -5862,7 +5879,7 @@ const J_ = ({
|
|
5862
5879
|
showDrawer: a,
|
5863
5880
|
...o
|
5864
5881
|
}) => {
|
5865
|
-
const { common: r } =
|
5882
|
+
const { common: r } = x(), { isCopyLoaded: s } = ue();
|
5866
5883
|
return s ? /* @__PURE__ */ t(
|
5867
5884
|
oe,
|
5868
5885
|
{
|
@@ -6071,7 +6088,7 @@ class bh {
|
|
6071
6088
|
getCategoryName = (n) => this.categories.find((a) => a.guid === n)?.name ?? Ia[n];
|
6072
6089
|
}
|
6073
6090
|
const mc = ({ transaction: e }) => {
|
6074
|
-
const { addOrUpdateTransactionRule: n, updateTransaction: i } = Te(), { categories: a } = ze(), { onEvent: o } = K(), { setShouldDisableDrawerScroll: r, updateManualTransaction: s } = vt(), { transactions: c } =
|
6091
|
+
const { addOrUpdateTransactionRule: n, updateTransaction: i } = Te(), { categories: a } = ze(), { onEvent: o } = K(), { setShouldDisableDrawerScroll: r, updateManualTransaction: s } = vt(), { transactions: c } = x(), [d, _] = g.useState(!1), [u, h] = g.useState(""), m = async (E) => {
|
6075
6092
|
await i({ ...e, category_guid: u }), E && await n(u, e), h(""), o($.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
6076
6093
|
transaction_guid: e.guid
|
6077
6094
|
});
|
@@ -6098,7 +6115,7 @@ const mc = ({ transaction: e }) => {
|
|
6098
6115
|
he,
|
6099
6116
|
{
|
6100
6117
|
onClick: () => {
|
6101
|
-
o(
|
6118
|
+
o(X.ON_TRANSACTION_CATEGORY_CLICK), _(!0);
|
6102
6119
|
},
|
6103
6120
|
children: [
|
6104
6121
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(nn, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ t(
|
@@ -6156,7 +6173,7 @@ const mc = ({ transaction: e }) => {
|
|
6156
6173
|
)
|
6157
6174
|
] });
|
6158
6175
|
}, pc = ({ transaction: e }) => {
|
6159
|
-
const n = Et(), { onEvent: i } = K(), { updateTransaction: a } = Te(), { updateManualTransaction: o } = vt(), { common: r, transactions: s } =
|
6176
|
+
const n = Et(), { onEvent: i } = K(), { updateTransaction: a } = Te(), { updateManualTransaction: o } = vt(), { common: r, transactions: s } = x(), [c, d] = g.useState(!1), [_, u] = g.useState(e.date), h = (C) => {
|
6160
6177
|
u(Me(C));
|
6161
6178
|
}, m = async () => {
|
6162
6179
|
if (e.is_manual && !e.guid) {
|
@@ -6170,7 +6187,7 @@ const mc = ({ transaction: e }) => {
|
|
6170
6187
|
he,
|
6171
6188
|
{
|
6172
6189
|
onClick: () => {
|
6173
|
-
i(
|
6190
|
+
i(X.ON_TRANSACTION_DATE_CLICK), d(!0);
|
6174
6191
|
},
|
6175
6192
|
children: [
|
6176
6193
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(nn, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ t(P, { name: "calendar_month", sx: { color: "text.primary" }, weight: St.Dark }) }) }),
|
@@ -6213,15 +6230,15 @@ const mc = ({ transaction: e }) => {
|
|
6213
6230
|
)
|
6214
6231
|
] });
|
6215
6232
|
}, yh = ({ transaction: e }) => {
|
6216
|
-
const { onEvent: n } = K(), { removeTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = vt(), { common: o, transactions: r } =
|
6217
|
-
await i(e.guid), n(
|
6233
|
+
const { onEvent: n } = K(), { removeTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = vt(), { common: o, transactions: r } = x(), [s, c] = g.useState(!1), d = async () => {
|
6234
|
+
await i(e.guid), n(X.ON_TRANSACTION_DELETE_DELETED);
|
6218
6235
|
};
|
6219
6236
|
return /* @__PURE__ */ l(L, { className: "mx-txn-delete", children: [
|
6220
6237
|
e && /* @__PURE__ */ t(Y, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
6221
6238
|
he,
|
6222
6239
|
{
|
6223
6240
|
onClick: () => {
|
6224
|
-
n(
|
6241
|
+
n(X.ON_TRANSACTION_DELETE_CLICK), a(!0), c(!0);
|
6225
6242
|
},
|
6226
6243
|
children: [
|
6227
6244
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(nn, { variant: "rounded", children: /* @__PURE__ */ t(Di, { color: "secondary", fontSize: "small" }) }) }),
|
@@ -6245,7 +6262,7 @@ const mc = ({ transaction: e }) => {
|
|
6245
6262
|
a(!1), c(!1);
|
6246
6263
|
},
|
6247
6264
|
onPrimaryAction: d,
|
6248
|
-
onSecondaryAction: () => n(
|
6265
|
+
onSecondaryAction: () => n(X.ON_TRANSACTION_DELETE_CANCEL),
|
6249
6266
|
primaryText: o.delete_button,
|
6250
6267
|
secondaryText: o.cancel_button,
|
6251
6268
|
children: /* @__PURE__ */ t(p, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: r.manual_transaction_delete_description })
|
@@ -6253,7 +6270,7 @@ const mc = ({ transaction: e }) => {
|
|
6253
6270
|
)
|
6254
6271
|
] });
|
6255
6272
|
}, Eh = A(yh), Sh = ({ transaction: e }) => {
|
6256
|
-
const { onEvent: n } = K(), { updateTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = vt(), { common: o, transactions: r } =
|
6273
|
+
const { onEvent: n } = K(), { updateTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = vt(), { common: o, transactions: r } = x(), [s, c] = g.useState(!1), d = async () => {
|
6257
6274
|
await i({ ...e, merchant_guid: "" }), n($.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
6258
6275
|
transaction_guid: e.guid
|
6259
6276
|
});
|
@@ -6263,7 +6280,7 @@ const mc = ({ transaction: e }) => {
|
|
6263
6280
|
he,
|
6264
6281
|
{
|
6265
6282
|
onClick: () => {
|
6266
|
-
n(
|
6283
|
+
n(X.ON_TRANSACTION_DELETE_LOGO_CLICK), c(!0);
|
6267
6284
|
},
|
6268
6285
|
children: [
|
6269
6286
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(nn, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ t(P, { name: "delete", sx: { color: "text.primary" }, weight: St.Dark }) }) }),
|
@@ -6281,7 +6298,7 @@ const mc = ({ transaction: e }) => {
|
|
6281
6298
|
a(!1), c(!1);
|
6282
6299
|
},
|
6283
6300
|
onPrimaryAction: d,
|
6284
|
-
onSecondaryAction: () => n(
|
6301
|
+
onSecondaryAction: () => n(X.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
6285
6302
|
primaryText: o.delete_button,
|
6286
6303
|
secondaryText: o.cancel_button,
|
6287
6304
|
title: r.merchant_logo_modal_title,
|
@@ -6293,9 +6310,9 @@ const mc = ({ transaction: e }) => {
|
|
6293
6310
|
)
|
6294
6311
|
] });
|
6295
6312
|
}, Th = A(Sh), Ah = ({ transaction: e }) => {
|
6296
|
-
const { onEvent: n } = K(), { updateTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = vt(), { common: o, transactions: r } =
|
6313
|
+
const { onEvent: n } = K(), { updateTransaction: i } = Te(), { setShouldDisableDrawerScroll: a } = vt(), { common: o, transactions: r } = x(), [s, c] = g.useState(!1), d = e.is_hidden, _ = async () => {
|
6297
6314
|
await i({ ...e, is_hidden: !e.is_hidden }), n(
|
6298
|
-
d ?
|
6315
|
+
d ? X.ON_TRANSACTION_UNHIDDEN : X.ON_TRANSACTION_HIDDEN
|
6299
6316
|
);
|
6300
6317
|
};
|
6301
6318
|
return /* @__PURE__ */ l(L, { className: "mx-txn-hide-transaction", children: [
|
@@ -6305,7 +6322,7 @@ const mc = ({ transaction: e }) => {
|
|
6305
6322
|
"aria-checked": d,
|
6306
6323
|
onClick: () => {
|
6307
6324
|
n(
|
6308
|
-
d ?
|
6325
|
+
d ? X.ON_TRANSACTION_UNHIDE_CLICK : X.ON_TRANSACTION_HIDE_CLICK
|
6309
6326
|
), n(
|
6310
6327
|
d ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
|
6311
6328
|
{
|
@@ -6354,7 +6371,7 @@ const mc = ({ transaction: e }) => {
|
|
6354
6371
|
},
|
6355
6372
|
onPrimaryAction: _,
|
6356
6373
|
onSecondaryAction: () => n(
|
6357
|
-
d ?
|
6374
|
+
d ? X.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : X.ON_TRANSACTION_HIDE_CANCEL_CLICK
|
6358
6375
|
),
|
6359
6376
|
primaryText: d ? o.unhide_button : o.hide_button,
|
6360
6377
|
secondaryText: o.cancel_button,
|
@@ -6382,7 +6399,7 @@ const mc = ({ transaction: e }) => {
|
|
6382
6399
|
] })
|
6383
6400
|
] });
|
6384
6401
|
}, xh = ({ transaction: e }) => {
|
6385
|
-
const { onEvent: n } = K(), { updateTransaction: i } = Te(), { updateManualTransaction: a } = vt(), { common: o, transactions: r } =
|
6402
|
+
const { onEvent: n } = K(), { updateTransaction: i } = Te(), { updateManualTransaction: a } = vt(), { common: o, transactions: r } = x(), [s, c] = g.useState(!1), [d, _] = g.useState("");
|
6386
6403
|
g.useEffect(() => {
|
6387
6404
|
s && _(e.memo ? e.memo : "");
|
6388
6405
|
}, [s]);
|
@@ -6398,7 +6415,7 @@ const mc = ({ transaction: e }) => {
|
|
6398
6415
|
he,
|
6399
6416
|
{
|
6400
6417
|
onClick: () => {
|
6401
|
-
n(
|
6418
|
+
n(X.ON_TRANSACTION_MEMO_CLICK), c(!0);
|
6402
6419
|
},
|
6403
6420
|
children: [
|
6404
6421
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(nn, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ t(P, { name: "article", sx: { color: "text.primary" }, weight: St.Dark }) }) }),
|
@@ -6458,7 +6475,7 @@ const mc = ({ transaction: e }) => {
|
|
6458
6475
|
onUpdateAmount: a,
|
6459
6476
|
split: o
|
6460
6477
|
}) => {
|
6461
|
-
const r = Et(), { onEvent: s } = K(), { transactions: c } =
|
6478
|
+
const r = Et(), { onEvent: s } = K(), { transactions: c } = x(), [d, _] = g.useState(`${o.amount}`), [u, h] = g.useState(!1), m = e === 0, C = (f) => {
|
6462
6479
|
isNaN(Number(f)) || (_(f), a(e, Number(f)));
|
6463
6480
|
};
|
6464
6481
|
return /* @__PURE__ */ l(
|
@@ -6515,7 +6532,7 @@ const mc = ({ transaction: e }) => {
|
|
6515
6532
|
"aria-label": c.split_transaction_delete_split_btn,
|
6516
6533
|
color: "secondary",
|
6517
6534
|
onClick: () => {
|
6518
|
-
s(
|
6535
|
+
s(X.ON_TRANSACTION_SPLIT_DELETE_CLICK), n(e);
|
6519
6536
|
},
|
6520
6537
|
sx: { w: 44, h: 44 },
|
6521
6538
|
children: /* @__PURE__ */ t(Di, {})
|
@@ -6560,7 +6577,7 @@ const mc = ({ transaction: e }) => {
|
|
6560
6577
|
splits: o,
|
6561
6578
|
transaction: r
|
6562
6579
|
}) => {
|
6563
|
-
const s = Et(), { transactions: c } =
|
6580
|
+
const s = Et(), { transactions: c } = x(), { onEvent: d } = K(), [_, u] = g.useState("");
|
6564
6581
|
return g.useEffect(() => {
|
6565
6582
|
u(o.length <= 1 ? c.split_transaction_errors_min_splits : ""), u(
|
6566
6583
|
o[0].amount < 0 ? T(
|
@@ -6598,14 +6615,14 @@ const mc = ({ transaction: e }) => {
|
|
6598
6615
|
{
|
6599
6616
|
"aria-label": c.split_transaction_add_split_btn,
|
6600
6617
|
onClick: () => {
|
6601
|
-
d(
|
6618
|
+
d(X.ON_TRANSACTION_SPLIT_ADD_CLICK), e();
|
6602
6619
|
},
|
6603
6620
|
children: c.split_transaction_add_split_btn
|
6604
6621
|
}
|
6605
6622
|
) })
|
6606
6623
|
] });
|
6607
6624
|
}, Dh = A(Nh), Rh = ({ transaction: e }) => {
|
6608
|
-
const { onEvent: n } = K(), { splitTransaction: i, unSplitTransaction: a } = Te(), { common: o, transactions: r } =
|
6625
|
+
const { onEvent: n } = K(), { splitTransaction: i, unSplitTransaction: a } = Te(), { common: o, transactions: r } = x(), { setShouldDisableDrawerScroll: s } = vt(), { categories: c } = ze(), d = {
|
6609
6626
|
...e,
|
6610
6627
|
amount: e.amount - 1,
|
6611
6628
|
guid: "",
|
@@ -6625,24 +6642,24 @@ const mc = ({ transaction: e }) => {
|
|
6625
6642
|
M.push({ ..._ }), M[0].amount -= 1, b(M);
|
6626
6643
|
}, S = (M) => {
|
6627
6644
|
if (M > 0) {
|
6628
|
-
const
|
6629
|
-
U.splice(M, 1), U[0].amount +=
|
6645
|
+
const j = f[M], U = [...f];
|
6646
|
+
U.splice(M, 1), U[0].amount += j.amount, b(U);
|
6630
6647
|
}
|
6631
|
-
}, v = (M,
|
6648
|
+
}, v = (M, j) => {
|
6632
6649
|
const U = [...f];
|
6633
|
-
U[M].amount =
|
6650
|
+
U[M].amount = j, U[0].amount = e.amount - U.reduce(
|
6634
6651
|
(W, Ee, J) => W + (J !== 0 ? Ee.amount : 0),
|
6635
6652
|
0
|
6636
6653
|
), b(U);
|
6637
|
-
}, N = (M,
|
6638
|
-
const U = [...f], W = c.find((Ee) => Ee.guid ===
|
6654
|
+
}, N = (M, j) => {
|
6655
|
+
const U = [...f], W = c.find((Ee) => Ee.guid === j);
|
6639
6656
|
W && (U[M] = {
|
6640
6657
|
...U[M],
|
6641
|
-
category_guid:
|
6658
|
+
category_guid: j,
|
6642
6659
|
category: W.name,
|
6643
|
-
top_level_category_guid: W.parent_guid ||
|
6660
|
+
top_level_category_guid: W.parent_guid || j
|
6644
6661
|
}, b(U));
|
6645
|
-
},
|
6662
|
+
}, I = () => {
|
6646
6663
|
if (e.parent_guid || e.has_been_split) {
|
6647
6664
|
C(!0);
|
6648
6665
|
return;
|
@@ -6651,9 +6668,9 @@ const mc = ({ transaction: e }) => {
|
|
6651
6668
|
transaction_guid: e.guid
|
6652
6669
|
}), h(!0);
|
6653
6670
|
}, R = async () => {
|
6654
|
-
n(
|
6671
|
+
n(X.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...e, has_been_split: !0 }, f), h(!1);
|
6655
6672
|
}, D = async () => {
|
6656
|
-
n(
|
6673
|
+
n(X.ON_TRANSACTION_SPLIT_CANCEL_CLICK), b([{ ...d }, { ..._ }]), h(!1);
|
6657
6674
|
}, H = async () => {
|
6658
6675
|
n($.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
6659
6676
|
transaction_guid: e.guid
|
@@ -6661,11 +6678,11 @@ const mc = ({ transaction: e }) => {
|
|
6661
6678
|
const M = e.parent_guid ?? e.guid;
|
6662
6679
|
await a(M);
|
6663
6680
|
}, O = g.useMemo(() => {
|
6664
|
-
const M = f.some((U) => !U.category_guid),
|
6665
|
-
return M ||
|
6681
|
+
const M = f.some((U) => !U.category_guid), j = f.some((U) => U.amount <= 0);
|
6682
|
+
return M || j;
|
6666
6683
|
}, [f]);
|
6667
6684
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
6668
|
-
e && /* @__PURE__ */ t(Y, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(he, { onClick:
|
6685
|
+
e && /* @__PURE__ */ t(Y, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(he, { onClick: I, children: [
|
6669
6686
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(nn, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ t(P, { name: "call_split", sx: { color: "text.primary" }, weight: St.Dark }) }) }),
|
6670
6687
|
/* @__PURE__ */ t(
|
6671
6688
|
se,
|
@@ -6713,7 +6730,7 @@ const mc = ({ transaction: e }) => {
|
|
6713
6730
|
},
|
6714
6731
|
onPrimaryAction: H,
|
6715
6732
|
onSecondaryAction: () => {
|
6716
|
-
n(
|
6733
|
+
n(X.ON_TRANSACTION_UNSPLIT_CANCEL);
|
6717
6734
|
},
|
6718
6735
|
primaryText: o.delete_button,
|
6719
6736
|
secondaryText: o.cancel_button,
|
@@ -6725,16 +6742,16 @@ const mc = ({ transaction: e }) => {
|
|
6725
6742
|
)
|
6726
6743
|
] });
|
6727
6744
|
}, Oh = A(Rh), Lh = () => {
|
6728
|
-
const e = me(), { onEvent: n } = K(), { addTag: i } = Te(), { transactions: a } =
|
6745
|
+
const e = me(), { onEvent: n } = K(), { addTag: i } = Te(), { transactions: a } = x(), [o, r] = g.useState(!1), [s, c] = g.useState(""), [d, _] = g.useState(""), u = g.useRef(null);
|
6729
6746
|
g.useEffect(() => {
|
6730
6747
|
o && u?.current?.focus();
|
6731
6748
|
}, [o]);
|
6732
6749
|
const h = () => {
|
6733
6750
|
n(
|
6734
|
-
o ?
|
6751
|
+
o ? X.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : X.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
6735
6752
|
), o || c(""), r(!o);
|
6736
6753
|
}, m = async () => {
|
6737
|
-
n(
|
6754
|
+
n(X.ON_TRANSACTION_TAGS_TAG_ADDED), await i(s), r(!1);
|
6738
6755
|
};
|
6739
6756
|
return g.useEffect(() => {
|
6740
6757
|
_(s.length > 40 ? a.tags_error_name_must_be_40_chars : "");
|
@@ -6788,7 +6805,7 @@ const mc = ({ transaction: e }) => {
|
|
6788
6805
|
)
|
6789
6806
|
] });
|
6790
6807
|
}, Mh = A(Lh), kh = ({ onSearchValueChanged: e, searchValue: n }) => {
|
6791
|
-
const { common: i, transactions: a } =
|
6808
|
+
const { common: i, transactions: a } = x(), o = Et(), r = /* @__PURE__ */ t(
|
6792
6809
|
Ue,
|
6793
6810
|
{
|
6794
6811
|
"aria-label": a.tags_cancel_search || "Search",
|
@@ -6812,18 +6829,18 @@ const mc = ({ transaction: e }) => {
|
|
6812
6829
|
}
|
6813
6830
|
) });
|
6814
6831
|
}, Gh = A(kh), Bh = ({ onTagChecked: e, selectedTags: n, tag: i }) => {
|
6815
|
-
const { onEvent: a } = K(), { removeTag: o, updateTag: r } = Te(), { common: s, transactions: c } =
|
6816
|
-
a(
|
6832
|
+
const { onEvent: a } = K(), { removeTag: o, updateTag: r } = Te(), { common: s, transactions: c } = x(), [d, _] = g.useState(!1), [u, h] = g.useState(!1), [m, C] = g.useState(""), [f, b] = g.useState(""), E = async () => {
|
6833
|
+
a(X.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await r({ ...i, name: m }), _(!1);
|
6817
6834
|
}, S = async () => {
|
6818
|
-
a(
|
6835
|
+
a(X.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), h(!1);
|
6819
6836
|
};
|
6820
6837
|
g.useEffect(() => {
|
6821
6838
|
b(m.length > 40 ? c.tags_error_name_must_be_40_chars : "");
|
6822
6839
|
}, [m]);
|
6823
6840
|
const v = () => {
|
6824
|
-
a(
|
6841
|
+
a(X.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), C(i.name), _(!0);
|
6825
6842
|
}, N = () => {
|
6826
|
-
a(
|
6843
|
+
a(X.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), h(!0);
|
6827
6844
|
};
|
6828
6845
|
return /* @__PURE__ */ l(
|
6829
6846
|
Y,
|
@@ -6879,7 +6896,7 @@ const mc = ({ transaction: e }) => {
|
|
6879
6896
|
"aria-describedby": f ? "update-tag-error" : void 0,
|
6880
6897
|
"aria-label": c.tags_update_the_tag_name,
|
6881
6898
|
name: "update-tag",
|
6882
|
-
onChange: (
|
6899
|
+
onChange: (I) => C(I.target.value),
|
6883
6900
|
placeholder: "Tag name",
|
6884
6901
|
sx: { width: "100%" },
|
6885
6902
|
value: m
|
@@ -6896,7 +6913,7 @@ const mc = ({ transaction: e }) => {
|
|
6896
6913
|
isOpen: u,
|
6897
6914
|
onClose: () => h(!1),
|
6898
6915
|
onPrimaryAction: S,
|
6899
|
-
onSecondaryAction: () => a(
|
6916
|
+
onSecondaryAction: () => a(X.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
6900
6917
|
primaryText: s.delete_button,
|
6901
6918
|
secondaryText: s.cancel_button,
|
6902
6919
|
children: /* @__PURE__ */ t(p, { truncate: !1, children: c.tags_deleting_this_tag_will_remove_it })
|
@@ -6924,7 +6941,7 @@ const mc = ({ transaction: e }) => {
|
|
6924
6941
|
] }, s.guid)) }) })
|
6925
6942
|
] });
|
6926
6943
|
}, $h = A(Hh), Fh = ({ transaction: e }) => {
|
6927
|
-
const { onEvent: n } = K(), { tags: i, updateTaggings: a, updateTransaction: o } = Te(), { common: r, transactions: s } =
|
6944
|
+
const { onEvent: n } = K(), { tags: i, updateTaggings: a, updateTransaction: o } = Te(), { common: r, transactions: s } = x(), { updateManualTransaction: c } = vt(), [d, _] = g.useState(!1), [u, h] = g.useState(e.tags);
|
6928
6945
|
g.useEffect(() => {
|
6929
6946
|
h(e.tags);
|
6930
6947
|
}, [d, e]);
|
@@ -6948,7 +6965,7 @@ const mc = ({ transaction: e }) => {
|
|
6948
6965
|
he,
|
6949
6966
|
{
|
6950
6967
|
onClick: () => {
|
6951
|
-
n(
|
6968
|
+
n(X.ON_TRANSACTION_TAGS_CLICK), _(!0);
|
6952
6969
|
},
|
6953
6970
|
children: [
|
6954
6971
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(nn, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ t(P, { name: "local_offer", sx: { color: "text.primary" }, weight: St.Dark }) }) }),
|
@@ -6979,7 +6996,7 @@ const mc = ({ transaction: e }) => {
|
|
6979
6996
|
)
|
6980
6997
|
] });
|
6981
6998
|
}, bc = A(Fh), Wh = ({ transaction: e }) => {
|
6982
|
-
const { updateTransaction: n } = Te(), { common: i, transactions: a } =
|
6999
|
+
const { updateTransaction: n } = Te(), { common: i, transactions: a } = x(), { onEvent: o } = K(), [r, s] = g.useState(!1), [c, d] = g.useState(""), _ = g.useRef(null);
|
6983
7000
|
g.useEffect(() => {
|
6984
7001
|
r && (d(e.description), _?.current?.focus());
|
6985
7002
|
}, [r]);
|
@@ -7022,7 +7039,7 @@ const mc = ({ transaction: e }) => {
|
|
7022
7039
|
{
|
7023
7040
|
"aria-label": a.description_edit_transaction_name,
|
7024
7041
|
onClick: () => {
|
7025
|
-
s(!0), o(
|
7042
|
+
s(!0), o(X.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK);
|
7026
7043
|
},
|
7027
7044
|
sx: { color: "action.active" },
|
7028
7045
|
children: /* @__PURE__ */ t(P, { name: "create", size: 22 })
|
@@ -7030,7 +7047,7 @@ const mc = ({ transaction: e }) => {
|
|
7030
7047
|
)
|
7031
7048
|
] }) });
|
7032
7049
|
}, Uh = A(Wh), Vh = ({ transaction: e }) => {
|
7033
|
-
const { updateTransaction: n } = Te(), { transactions: i } =
|
7050
|
+
const { updateTransaction: n } = Te(), { transactions: i } = x(), { onEvent: a } = K(), o = me(), r = async () => {
|
7034
7051
|
a($.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: e.guid }), await n({ ...e, is_flagged: !e.is_flagged });
|
7035
7052
|
};
|
7036
7053
|
return /* @__PURE__ */ t("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ t(
|
@@ -7113,7 +7130,7 @@ const mc = ({ transaction: e }) => {
|
|
7113
7130
|
] }) })
|
7114
7131
|
] }) }) : /* @__PURE__ */ t(ge, {});
|
7115
7132
|
}, Zn = A(zh), Yh = ({ copy: e, isOpen: n, onClose: i, onPrimaryAction: a }) => {
|
7116
|
-
const { common: o, transactions: r } =
|
7133
|
+
const { common: o, transactions: r } = x(), { isCopyLoaded: s } = ue();
|
7117
7134
|
return s ? /* @__PURE__ */ l(
|
7118
7135
|
Be,
|
7119
7136
|
{
|
@@ -7132,7 +7149,7 @@ const mc = ({ transaction: e }) => {
|
|
7132
7149
|
}
|
7133
7150
|
) : /* @__PURE__ */ t(ge, {});
|
7134
7151
|
}, jh = A(Yh), Xh = () => {
|
7135
|
-
const { selectedAccounts: e } = ue(), { common: n, transactions: i } =
|
7152
|
+
const { selectedAccounts: e } = ue(), { common: n, transactions: i } = x(), { manualTransaction: a, setIsAmountValid: o, updateManualTransaction: r } = vt(), [s, c] = g.useState(""), [d, _] = g.useState(""), u = g.useMemo(
|
7136
7153
|
() => e.filter((E) => E.is_manual),
|
7137
7154
|
[e]
|
7138
7155
|
).map((E) => ({
|
@@ -7230,7 +7247,7 @@ const mc = ({ transaction: e }) => {
|
|
7230
7247
|
] })
|
7231
7248
|
] });
|
7232
7249
|
}, qh = A(Xh), Zh = ({ onClose: e, transaction: n }) => {
|
7233
|
-
const { addOrUpdateTransactionRule: i, updateTransaction: a } = Te(), { transactions: o } =
|
7250
|
+
const { addOrUpdateTransactionRule: i, updateTransaction: a } = Te(), { transactions: o } = x(), { categories: r } = ze(), [s, c] = g.useState(""), d = g.useMemo(
|
7234
7251
|
() => r.find((u) => u.guid === s),
|
7235
7252
|
[s]
|
7236
7253
|
), _ = async (u) => {
|
@@ -7290,10 +7307,10 @@ const mc = ({ transaction: e }) => {
|
|
7290
7307
|
setFilter: S,
|
7291
7308
|
tags: v,
|
7292
7309
|
transactions: N,
|
7293
|
-
updateTransaction:
|
7294
|
-
} = Te(), { common: R, transactions: D } =
|
7310
|
+
updateTransaction: I
|
7311
|
+
} = Te(), { common: R, transactions: D } = x(), { userProfile: H } = an(), { onEvent: O } = K(), {
|
7295
7312
|
displayedDateRange: M,
|
7296
|
-
isCopyLoaded:
|
7313
|
+
isCopyLoaded: j,
|
7297
7314
|
isInitialized: U,
|
7298
7315
|
selectedAccountGuids: W,
|
7299
7316
|
selectedAccounts: Ee,
|
@@ -7346,9 +7363,9 @@ const mc = ({ transaction: e }) => {
|
|
7346
7363
|
}, yl = async () => {
|
7347
7364
|
ot(!1), await r();
|
7348
7365
|
}, El = async () => {
|
7349
|
-
le && !le.has_been_viewed && await
|
7366
|
+
le && !le.has_been_viewed && await I({ ...le, has_been_viewed: !0 }), Q("");
|
7350
7367
|
};
|
7351
|
-
return !
|
7368
|
+
return !j || !U || !Ye ? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ l(
|
7352
7369
|
Mt,
|
7353
7370
|
{
|
7354
7371
|
accountOptions: o,
|
@@ -7515,7 +7532,7 @@ const mc = ({ transaction: e }) => {
|
|
7515
7532
|
occurs_on: ui(e.expectedDate, { representation: "date" }),
|
7516
7533
|
recurrence_type: e.recurrenceType
|
7517
7534
|
}), eg = ({ activity: e }) => {
|
7518
|
-
const { recurring: n } =
|
7535
|
+
const { recurring: n } = x(), { cashflowSequences: i, scheduledPayments: a, updateCashflowSequence: o, updateScheduledPayment: r } = at(), { onEvent: s } = K(), [c, d] = g.useState(!1), _ = e.activityType === et.Income, u = [
|
7519
7536
|
{ id: ee.EveryWeek, label: n.frequency_every_week },
|
7520
7537
|
{ id: ee.EveryOtherWeek, label: n.frequency_every_other_week },
|
7521
7538
|
{ id: ee.EveryMonth, label: n.frequency_every_month },
|
@@ -7541,7 +7558,7 @@ const mc = ({ transaction: e }) => {
|
|
7541
7558
|
}
|
7542
7559
|
);
|
7543
7560
|
}, C = u.find((f) => f.id === e.recurrenceType);
|
7544
|
-
return /* @__PURE__ */ l(
|
7561
|
+
return /* @__PURE__ */ l(q, { children: [
|
7545
7562
|
/* @__PURE__ */ t(
|
7546
7563
|
Fn,
|
7547
7564
|
{
|
@@ -7581,7 +7598,7 @@ const mc = ({ transaction: e }) => {
|
|
7581
7598
|
)
|
7582
7599
|
] });
|
7583
7600
|
}, tg = A(eg), ng = ({ activity: e }) => {
|
7584
|
-
const { recurring: n } =
|
7601
|
+
const { recurring: n } = x(), { cashflowSequences: i, scheduledPayments: a, updateCashflowSequence: o, updateScheduledPayment: r } = at(), { onEvent: s } = K(), [c, d] = g.useState(!1), [_, u] = g.useState(e.expectedDate), h = e.activityType === et.Income, m = () => {
|
7585
7602
|
u(e.expectedDate), d(!0), s(
|
7586
7603
|
h ? "recurring_transactions_widget_income_details_click_next_payment_due" : "recurring_transactions_widget_expense_details_click_next_payment_due",
|
7587
7604
|
{
|
@@ -7599,7 +7616,7 @@ const mc = ({ transaction: e }) => {
|
|
7599
7616
|
}
|
7600
7617
|
d(!1);
|
7601
7618
|
};
|
7602
|
-
return /* @__PURE__ */ l(
|
7619
|
+
return /* @__PURE__ */ l(q, { children: [
|
7603
7620
|
/* @__PURE__ */ t(
|
7604
7621
|
Fn,
|
7605
7622
|
{
|
@@ -7640,7 +7657,7 @@ const mc = ({ transaction: e }) => {
|
|
7640
7657
|
)
|
7641
7658
|
] });
|
7642
7659
|
}, ig = A(ng), ag = ({ activity: e, onDeleted: n }) => {
|
7643
|
-
const { recurring: i } =
|
7660
|
+
const { recurring: i } = x(), { categories: a } = ze(), { deleteCashflowSequence: o, deleteScheduledPayment: r, paidActivities: s } = at(), { filter: c, setFilter: d, transactions: _ } = Te(), { selectedAccountGuids: u } = ue(), { onEvent: h } = K(), [m, C] = g.useState(!1), [f, b] = g.useState(""), E = a.find((R) => R.guid === e.categoryGuid), S = e.activityType === et.Income, v = g.useMemo(
|
7644
7661
|
() => _.find((R) => R.guid === f),
|
7645
7662
|
[f]
|
7646
7663
|
);
|
@@ -7663,7 +7680,7 @@ const mc = ({ transaction: e }) => {
|
|
7663
7680
|
}, [e]);
|
7664
7681
|
const N = async () => {
|
7665
7682
|
S && e.sequenceGuid ? await o(e.sequenceGuid) : e.scheduledPaymentGuid && await r(e.scheduledPaymentGuid), n();
|
7666
|
-
},
|
7683
|
+
}, I = () => {
|
7667
7684
|
C(!0), h(
|
7668
7685
|
S ? "recurring_transactions_widget_income_details_click_delete" : "recurring_transactions_widget_expense_details_click_delete",
|
7669
7686
|
{
|
@@ -7688,7 +7705,7 @@ const mc = ({ transaction: e }) => {
|
|
7688
7705
|
] })
|
7689
7706
|
] }),
|
7690
7707
|
/* @__PURE__ */ l(ie, { sx: { bgcolor: "background.paper" }, children: [
|
7691
|
-
e.institution && /* @__PURE__ */ l(
|
7708
|
+
e.institution && /* @__PURE__ */ l(q, { children: [
|
7692
7709
|
/* @__PURE__ */ t(
|
7693
7710
|
Fn,
|
7694
7711
|
{
|
@@ -7699,7 +7716,7 @@ const mc = ({ transaction: e }) => {
|
|
7699
7716
|
),
|
7700
7717
|
/* @__PURE__ */ t(k, { color: "secondary", variant: "inset" })
|
7701
7718
|
] }),
|
7702
|
-
E && /* @__PURE__ */ l(
|
7719
|
+
E && /* @__PURE__ */ l(q, { children: [
|
7703
7720
|
/* @__PURE__ */ t(
|
7704
7721
|
Fn,
|
7705
7722
|
{
|
@@ -7719,7 +7736,7 @@ const mc = ({ transaction: e }) => {
|
|
7719
7736
|
te,
|
7720
7737
|
{
|
7721
7738
|
color: "error",
|
7722
|
-
onClick:
|
7739
|
+
onClick: I,
|
7723
7740
|
startIcon: /* @__PURE__ */ t(P, { name: "delete" }),
|
7724
7741
|
sx: { mx: 24, my: 16 },
|
7725
7742
|
variant: "text",
|
@@ -7817,7 +7834,7 @@ const mc = ({ transaction: e }) => {
|
|
7817
7834
|
},
|
7818
7835
|
showOrdinal: a = !1
|
7819
7836
|
}) => {
|
7820
|
-
const { recurring: o } =
|
7837
|
+
const { recurring: o } = x(), [r, s] = g.useState(""), c = e.activityType === et.Income, d = e.activityStatus === nt.Paid, _ = e.activityStatus === nt.Missed, u = e.activityStatus === nt.Upcoming;
|
7821
7838
|
let h = o.paid?.toLowerCase();
|
7822
7839
|
return _ ? h = o.missed?.toLowerCase() : u && (h = Pr(a ? {
|
7823
7840
|
copy: o,
|
@@ -7850,7 +7867,7 @@ const mc = ({ transaction: e }) => {
|
|
7850
7867
|
/* @__PURE__ */ t(y, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ l(y, { direction: "row", gap: 4, children: [
|
7851
7868
|
sg(e),
|
7852
7869
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: rg(e, o) })
|
7853
|
-
] }) : /* @__PURE__ */ l(
|
7870
|
+
] }) : /* @__PURE__ */ l(q, { children: [
|
7854
7871
|
e.institutionGuid && /* @__PURE__ */ t(
|
7855
7872
|
bt,
|
7856
7873
|
{
|
@@ -7984,7 +8001,7 @@ const mc = ({ transaction: e }) => {
|
|
7984
8001
|
onSearch: i,
|
7985
8002
|
onSelected: a
|
7986
8003
|
}) => {
|
7987
|
-
const { recurring: o } =
|
8004
|
+
const { recurring: o } = x(), { searchValue: r, setSearchValue: s } = vt();
|
7988
8005
|
return /* @__PURE__ */ l(y, { sx: { bgcolor: e, gap: 16, pt: 8 }, children: [
|
7989
8006
|
n && /* @__PURE__ */ t(Oe, { sx: { mx: 24 }, children: n }),
|
7990
8007
|
/* @__PURE__ */ t(
|
@@ -8010,7 +8027,7 @@ const mc = ({ transaction: e }) => {
|
|
8010
8027
|
onNextDateChange: r,
|
8011
8028
|
transaction: s
|
8012
8029
|
}) => {
|
8013
|
-
const { recurring: c } =
|
8030
|
+
const { recurring: c } = x(), d = [
|
8014
8031
|
{ id: ee.EveryWeek, label: c.frequency_every_week },
|
8015
8032
|
{ id: ee.EveryOtherWeek, label: c.frequency_every_other_week },
|
8016
8033
|
{ id: ee.EveryMonth, label: c.frequency_every_month },
|
@@ -8089,12 +8106,12 @@ const mc = ({ transaction: e }) => {
|
|
8089
8106
|
label: n,
|
8090
8107
|
onAddActivity: i = () => null
|
8091
8108
|
}) => {
|
8092
|
-
const { recurring: a } =
|
8109
|
+
const { recurring: a } = x(), { addCashflowEvent: o, addCashflowSequence: r, addScheduledPayment: s } = at(), { filter: c, setFilter: d, transactions: _ } = Te(), [u, h] = g.useState(!1), [m, C] = g.useState(""), [f, b] = g.useState(ee.EveryMonth), [E, S] = g.useState(null), v = g.useMemo(
|
8093
8110
|
() => _.find((D) => D.guid === m),
|
8094
8111
|
[m]
|
8095
8112
|
), N = () => {
|
8096
8113
|
h(!0), d(e ? { ...c, custom: jn } : { ...c, custom: Oi });
|
8097
|
-
},
|
8114
|
+
}, I = async () => {
|
8098
8115
|
if (i(), !v || !E) {
|
8099
8116
|
R();
|
8100
8117
|
return;
|
@@ -8150,7 +8167,7 @@ const mc = ({ transaction: e }) => {
|
|
8150
8167
|
ariaLabelClose: a.close_drawer_aria,
|
8151
8168
|
isOpen: !!m,
|
8152
8169
|
onClose: () => C(""),
|
8153
|
-
onPrimaryAction:
|
8170
|
+
onPrimaryAction: I,
|
8154
8171
|
title: e ? a.income_details : a.expense_details,
|
8155
8172
|
children: v && /* @__PURE__ */ t(
|
8156
8173
|
Ic,
|
@@ -8183,7 +8200,7 @@ const mc = ({ transaction: e }) => {
|
|
8183
8200
|
scheduledPaymentGuid: a.guid
|
8184
8201
|
};
|
8185
8202
|
}), gg = () => {
|
8186
|
-
const { recurring: e } =
|
8203
|
+
const { recurring: e } = x(), { scheduledPayments: n } = at(), { transactions: i } = Te(), { selectedAccounts: a } = ue(), { onEvent: o } = K(), r = hg(a, n, i), s = (d) => {
|
8187
8204
|
o($.RECURRING_ACTIVITY_CLICK_EXPENSE, {
|
8188
8205
|
transaction_guid: d.transactionGuid
|
8189
8206
|
});
|
@@ -8378,7 +8395,7 @@ const mc = ({ transaction: e }) => {
|
|
8378
8395
|
sequenceGuid: r.guid
|
8379
8396
|
};
|
8380
8397
|
}), bg = () => {
|
8381
|
-
const { recurring: e } =
|
8398
|
+
const { recurring: e } = x(), { selectedAccounts: n } = ue(), { cashflowEvents: i, cashflowSequences: a, projectedEvents: o } = at(), { transactions: r } = Te(), { onEvent: s } = K(), c = fg(
|
8382
8399
|
n,
|
8383
8400
|
i,
|
8384
8401
|
o,
|
@@ -8399,7 +8416,7 @@ const mc = ({ transaction: e }) => {
|
|
8399
8416
|
/* @__PURE__ */ t(vc, { isIncome: !0, label: e.add_income, onAddActivity: _ })
|
8400
8417
|
] });
|
8401
8418
|
}, Po = A(bg), yg = () => {
|
8402
|
-
const [e, n] = g.useState(0), { onEvent: i } = K(), { recurring: a } =
|
8419
|
+
const [e, n] = g.useState(0), { onEvent: i } = K(), { recurring: a } = x();
|
8403
8420
|
return /* @__PURE__ */ l(L, { bgcolor: "background.default", height: "100%", children: [
|
8404
8421
|
/* @__PURE__ */ l(
|
8405
8422
|
kt,
|
@@ -8446,7 +8463,7 @@ const mc = ({ transaction: e }) => {
|
|
8446
8463
|
start: Ve(/* @__PURE__ */ new Date()),
|
8447
8464
|
end: Gt(_e(), 30)
|
8448
8465
|
}), Eg = ({ day: e, outsideCurrentMonth: n, ...i }) => {
|
8449
|
-
const { recurring: a } =
|
8466
|
+
const { recurring: a } = x(), { selectedAccountGuids: o } = ue(), { activities: r, setSelectedDay: s } = at(), d = g.useMemo(
|
8450
8467
|
() => r.filter((f) => o.includes(f.accountGuid || "")),
|
8451
8468
|
[o, r]
|
8452
8469
|
).filter(
|
@@ -8461,7 +8478,7 @@ const mc = ({ transaction: e }) => {
|
|
8461
8478
|
return /* @__PURE__ */ t(
|
8462
8479
|
bo,
|
8463
8480
|
{
|
8464
|
-
badgeContent: d.length > 0 && /* @__PURE__ */ l(
|
8481
|
+
badgeContent: d.length > 0 && /* @__PURE__ */ l(q, { children: [
|
8465
8482
|
u && /* @__PURE__ */ t(ko, { isOffset: !0 }),
|
8466
8483
|
h && /* @__PURE__ */ t(Go, { isOffset: !0 }),
|
8467
8484
|
_ && /* @__PURE__ */ t(Lo, { isOffset: !0 }),
|
@@ -8502,7 +8519,7 @@ const mc = ({ transaction: e }) => {
|
|
8502
8519
|
/* @__PURE__ */ t(e, {}),
|
8503
8520
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: n })
|
8504
8521
|
] }), Tg = () => {
|
8505
|
-
const { recurring: e } =
|
8522
|
+
const { recurring: e } = x();
|
8506
8523
|
return /* @__PURE__ */ l(
|
8507
8524
|
y,
|
8508
8525
|
{
|
@@ -8602,7 +8619,7 @@ const mc = ({ transaction: e }) => {
|
|
8602
8619
|
sx: o = {},
|
8603
8620
|
title: r
|
8604
8621
|
}) => {
|
8605
|
-
const { recurring: s } =
|
8622
|
+
const { recurring: s } = x(), c = xg(e);
|
8606
8623
|
return /* @__PURE__ */ l(y, { gap: 8, mt: 4, sx: o, children: [
|
8607
8624
|
r && /* @__PURE__ */ l(y, { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24, children: [
|
8608
8625
|
/* @__PURE__ */ t(p, { bold: !0, variant: "Body", children: r }),
|
@@ -8653,7 +8670,7 @@ const mc = ({ transaction: e }) => {
|
|
8653
8670
|
total: o,
|
8654
8671
|
onNewClick: r
|
8655
8672
|
}) => {
|
8656
|
-
const { recurring: s } =
|
8673
|
+
const { recurring: s } = x(), c = me(), d = g.useMemo(() => {
|
8657
8674
|
const _ = [{ color: c.palette.success.main, percentage: `${i / n}` }];
|
8658
8675
|
return a && _.push({ color: c.palette.error.main, percentage: `${a / n}` }), _;
|
8659
8676
|
}, [i, n, a]);
|
@@ -8664,7 +8681,7 @@ const mc = ({ transaction: e }) => {
|
|
8664
8681
|
/* @__PURE__ */ l(y, { direction: "row", gap: 2, mb: 8, children: [
|
8665
8682
|
/* @__PURE__ */ t(p, { bold: !0, variant: "XSmall", children: B(i, "0,0.00") }),
|
8666
8683
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: s.paid?.toLowerCase() }),
|
8667
|
-
a !== void 0 && /* @__PURE__ */ l(
|
8684
|
+
a !== void 0 && /* @__PURE__ */ l(q, { children: [
|
8668
8685
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: "/" }),
|
8669
8686
|
/* @__PURE__ */ t(p, { bold: !0, variant: "XSmall", children: B(a, "0,0.00") }),
|
8670
8687
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: s.missed?.toLowerCase() })
|
@@ -8679,7 +8696,7 @@ const mc = ({ transaction: e }) => {
|
|
8679
8696
|
/* @__PURE__ */ t(ci, { data: d })
|
8680
8697
|
] });
|
8681
8698
|
}, $r = A(wg), Ng = () => {
|
8682
|
-
const { recurring: e } =
|
8699
|
+
const { recurring: e } = x(), { isMobile: n, isSmallTablet: i } = ye(), {
|
8683
8700
|
activities: a,
|
8684
8701
|
missedActivities: o,
|
8685
8702
|
paidActivities: r,
|
@@ -8687,15 +8704,15 @@ const mc = ({ transaction: e }) => {
|
|
8687
8704
|
selectedDayActivities: c,
|
8688
8705
|
setSelectedDay: d,
|
8689
8706
|
upcomingActivities: _
|
8690
|
-
} = at(), [u, h] = g.useState(0), { onEvent: m } = K(), C = a.filter(Ya), f = r.filter(Ya), b = o.filter(Ya), E = C.filter(qi).reduce(fi, 0), S = f.filter(qi).reduce(fi, 0), v = b.filter(qi).reduce(fi, 0), N = C.filter(qi).length,
|
8707
|
+
} = at(), [u, h] = g.useState(0), { onEvent: m } = K(), C = a.filter(Ya), f = r.filter(Ya), b = o.filter(Ya), E = C.filter(qi).reduce(fi, 0), S = f.filter(qi).reduce(fi, 0), v = b.filter(qi).reduce(fi, 0), N = C.filter(qi).length, I = C.filter(za).reduce(fi, 0), R = f.filter(za).reduce(fi, 0), D = C.filter(za).length, H = (j, U) => {
|
8691
8708
|
h(U);
|
8692
|
-
}, O = (
|
8709
|
+
}, O = (j) => {
|
8693
8710
|
m($.RECURRING_ACTIVITY_CLICK_UPCOMING, {
|
8694
|
-
transaction_guid:
|
8711
|
+
transaction_guid: j.transactionGuid
|
8695
8712
|
});
|
8696
|
-
}, M = (
|
8713
|
+
}, M = (j) => {
|
8697
8714
|
m($.RECURRING_ACTIVITY_CLICK_PAID, {
|
8698
|
-
transaction_guid:
|
8715
|
+
transaction_guid: j.transactionGuid
|
8699
8716
|
});
|
8700
8717
|
};
|
8701
8718
|
return /* @__PURE__ */ l(jt, { container: !0, pt: 16, px: 24, spacing: 24, children: [
|
@@ -8713,7 +8730,7 @@ const mc = ({ transaction: e }) => {
|
|
8713
8730
|
/* @__PURE__ */ t(
|
8714
8731
|
$r,
|
8715
8732
|
{
|
8716
|
-
expected:
|
8733
|
+
expected: I,
|
8717
8734
|
paid: R,
|
8718
8735
|
title: e.deposits,
|
8719
8736
|
total: D
|
@@ -8769,7 +8786,7 @@ const mc = ({ transaction: e }) => {
|
|
8769
8786
|
] }) })
|
8770
8787
|
] });
|
8771
8788
|
}, Dg = A(Ng), Rg = ({ onBackClick: e, sx: n = {} }) => {
|
8772
|
-
const { visibleAccounts: i } = ve(), { recurring: a } =
|
8789
|
+
const { visibleAccounts: i } = ve(), { recurring: a } = x(), { isCopyLoaded: o, isInitialized: r, selectedAccountGuids: s, setSelectedAccounts: c } = ue(), { setFilter: d } = Te(), { isDataLoaded: _, loadActivity: u } = at(), { onEvent: h } = K();
|
8773
8790
|
g.useEffect(() => {
|
8774
8791
|
u();
|
8775
8792
|
}, []), g.useEffect(() => {
|
@@ -8819,7 +8836,7 @@ const mc = ({ transaction: e }) => {
|
|
8819
8836
|
}
|
8820
8837
|
) : /* @__PURE__ */ t(ge, {});
|
8821
8838
|
}, a4 = A(Rg), Og = () => {
|
8822
|
-
const { recurring: e } =
|
8839
|
+
const { recurring: e } = x(), {
|
8823
8840
|
isDataLoaded: n,
|
8824
8841
|
loadActivity: i,
|
8825
8842
|
selectedDay: a,
|
@@ -8849,7 +8866,7 @@ const mc = ({ transaction: e }) => {
|
|
8849
8866
|
)
|
8850
8867
|
] }) : /* @__PURE__ */ t(ge, {});
|
8851
8868
|
}, Lg = A(Og), Mg = ({ onPrimaryCtaClick: e, sx: n }) => {
|
8852
|
-
const { accounts: i } = ve(), { recurring: a } =
|
8869
|
+
const { accounts: i } = ve(), { recurring: a } = x(), { isCopyLoaded: o, isInitialized: r, setSelectedAccounts: s, selectedAccountGuids: c } = ue(), { setFilter: d } = Te();
|
8853
8870
|
return g.useEffect(() => {
|
8854
8871
|
r && s(i);
|
8855
8872
|
}, [r]), g.useEffect(() => {
|
@@ -9201,13 +9218,13 @@ const Gg = {
|
|
9201
9218
|
listItemProps: i,
|
9202
9219
|
shouldShowConnectionStatus: a = !1
|
9203
9220
|
}) => {
|
9204
|
-
const o = me(), { accounts: r } =
|
9221
|
+
const o = me(), { accounts: r } = x(), { firstSubtitle: s, firstValue: c, secondSubtitle: d, secondValue: _ } = Dc(
|
9205
9222
|
e,
|
9206
9223
|
r
|
9207
9224
|
);
|
9208
9225
|
let u;
|
9209
9226
|
(e.connectionStatus === zn.Error || e.connectionStatus === zn.RequiresMfa) && (u = /* @__PURE__ */ t(Bg, { size: 16 }));
|
9210
|
-
const h = /* @__PURE__ */ l(
|
9227
|
+
const h = /* @__PURE__ */ l(q, { children: [
|
9211
9228
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(
|
9212
9229
|
bo,
|
9213
9230
|
{
|
@@ -9239,7 +9256,7 @@ const Gg = {
|
|
9239
9256
|
]
|
9240
9257
|
}
|
9241
9258
|
),
|
9242
|
-
secondary: /* @__PURE__ */ l(
|
9259
|
+
secondary: /* @__PURE__ */ l(q, { children: [
|
9243
9260
|
/* @__PURE__ */ l(L, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
9244
9261
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: s }),
|
9245
9262
|
/* @__PURE__ */ t(p, { bold: !0, variant: "Small", children: B(c, "0,0.00") })
|
@@ -9277,7 +9294,7 @@ const Gg = {
|
|
9277
9294
|
}
|
9278
9295
|
);
|
9279
9296
|
var Mi = /* @__PURE__ */ ((e) => (e.EXPENSE = "expense", e.INCOME = "income", e))(Mi || {});
|
9280
|
-
const Kg = ({ activity: e }) => /* @__PURE__ */ l(
|
9297
|
+
const Kg = ({ activity: e }) => /* @__PURE__ */ l(q, { children: [
|
9281
9298
|
/* @__PURE__ */ l(Y, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
9282
9299
|
/* @__PURE__ */ l(y, { alignItems: "center", height: 32, width: 32, children: [
|
9283
9300
|
/* @__PURE__ */ t(p, { bold: !0, sx: { fontSize: 11 }, children: re(e.expectedDate, ae.MONTH) }),
|
@@ -9295,8 +9312,8 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9295
9312
|
] }),
|
9296
9313
|
/* @__PURE__ */ t(k, {})
|
9297
9314
|
] }), Fr = A(Kg), zg = ({ total: e, type: n }) => {
|
9298
|
-
const { cashflow: i } =
|
9299
|
-
return /* @__PURE__ */ l(
|
9315
|
+
const { cashflow: i } = x();
|
9316
|
+
return /* @__PURE__ */ l(q, { children: [
|
9300
9317
|
/* @__PURE__ */ l(
|
9301
9318
|
Lt,
|
9302
9319
|
{
|
@@ -9321,7 +9338,7 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9321
9338
|
/* @__PURE__ */ t(k, {})
|
9322
9339
|
] });
|
9323
9340
|
}, Wr = A(zg), Ur = (e, n) => (i) => i.accountGuid === e.guid && (yo(i.expectedDate) || Jt(i.expectedDate, n.start)) && we(i.expectedDate, n.end), Yg = () => {
|
9324
|
-
const { availableWidth: e } = Vn(), { cashflow: n } =
|
9341
|
+
const { availableWidth: e } = Vn(), { cashflow: n } = x(), { upcomingExpenses: i, upcomingIncome: a } = at(), { dateRange: o, selectedCashAccounts: r } = gi();
|
9325
9342
|
return /* @__PURE__ */ l(y, { children: [
|
9326
9343
|
/* @__PURE__ */ l(y, { direction: e < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
9327
9344
|
/* @__PURE__ */ t(p, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
@@ -9393,7 +9410,7 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9393
9410
|
}) })
|
9394
9411
|
] });
|
9395
9412
|
}, jg = A(Yg), Xg = () => {
|
9396
|
-
const { availableWidth: e } = Vn(), n = me(), { cashflow: i } =
|
9413
|
+
const { availableWidth: e } = Vn(), n = me(), { cashflow: i } = x(), { upcomingExpenses: a, upcomingIncome: o } = at(), { dateRange: r, selectedCashAccounts: s } = gi(), c = [
|
9397
9414
|
{
|
9398
9415
|
field: "account",
|
9399
9416
|
flex: 1.5,
|
@@ -9622,7 +9639,7 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9622
9639
|
}
|
9623
9640
|
);
|
9624
9641
|
}, qg = A(Xg), Zg = () => {
|
9625
|
-
const { cashflow: e } =
|
9642
|
+
const { cashflow: e } = x(), { isDesktop: n } = ye(), { onEvent: i } = K(), [a, o] = g.useState(0), r = (s, c) => {
|
9626
9643
|
o(c);
|
9627
9644
|
};
|
9628
9645
|
return g.useEffect(() => {
|
@@ -9687,7 +9704,7 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9687
9704
|
]
|
9688
9705
|
}
|
9689
9706
|
), Vr = (e, n) => (i) => i.accountGuid && e.includes(i.accountGuid) && (yo(i.expectedDate) || Jt(i.expectedDate, n.start)) && we(i.expectedDate, n.end), Jg = () => {
|
9690
|
-
const [e, n] = g.useState(!1), { availableWidth: i } = Vn(), { cashflow: a } =
|
9707
|
+
const [e, n] = g.useState(!1), { availableWidth: i } = Vn(), { cashflow: a } = x(), { upcomingExpenses: o, upcomingIncome: r } = at(), { selectedAccountGuids: s } = ue(), { dateRange: c, selectedCashAccounts: d } = gi(), { userProfile: _ } = an(), u = g.useMemo(
|
9691
9708
|
() => o.filter(Vr(s, c)),
|
9692
9709
|
[c, s, o]
|
9693
9710
|
), h = g.useMemo(
|
@@ -9752,9 +9769,9 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9752
9769
|
)
|
9753
9770
|
}
|
9754
9771
|
)
|
9755
|
-
] }) : /* @__PURE__ */ l(
|
9772
|
+
] }) : /* @__PURE__ */ l(q, { children: [
|
9756
9773
|
/* @__PURE__ */ t(On, { amount: m, label: a.cash_and_bank }),
|
9757
|
-
E ? /* @__PURE__ */ l(
|
9774
|
+
E ? /* @__PURE__ */ l(q, { children: [
|
9758
9775
|
/* @__PURE__ */ t(p, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
9759
9776
|
/* @__PURE__ */ t(
|
9760
9777
|
On,
|
@@ -9803,7 +9820,7 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9803
9820
|
)
|
9804
9821
|
] });
|
9805
9822
|
}, em = A(Jg), tm = ({ handleNextStep: e }) => {
|
9806
|
-
const { completeOnboarding: n } = wo(), { cashflow: i } =
|
9823
|
+
const { completeOnboarding: n } = wo(), { cashflow: i } = x(), a = me();
|
9807
9824
|
return /* @__PURE__ */ l(y, { children: [
|
9808
9825
|
/* @__PURE__ */ t(en, { pb: 12, children: i.welcome_title }),
|
9809
9826
|
/* @__PURE__ */ t(
|
@@ -9876,7 +9893,7 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9876
9893
|
CASHFLOW_ONBOARDING: `${Kr}/cashflow-onboarding.png`,
|
9877
9894
|
CASHFLOW_LOADING_ANIMATION: `${Kr}/loading-animation.gif`
|
9878
9895
|
}, im = () => {
|
9879
|
-
const { cashflow: e } =
|
9896
|
+
const { cashflow: e } = x();
|
9880
9897
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
9881
9898
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("img", { alt: "Loading", src: Rc.CASHFLOW_LOADING_ANIMATION }) }),
|
9882
9899
|
/* @__PURE__ */ t(en, { pb: 12, children: e.loading_title }),
|
@@ -9890,9 +9907,9 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9890
9907
|
transform: rotate(360deg);
|
9891
9908
|
}
|
9892
9909
|
`, rm = () => {
|
9893
|
-
const { addCashflowEvent: e, addCashflowSequence: n, cashflowSequences: i } = at(), { cashflow: a, common: o } =
|
9894
|
-
() => m.find((Q) => Q.guid ===
|
9895
|
-
[
|
9910
|
+
const { addCashflowEvent: e, addCashflowSequence: n, cashflowSequences: i } = at(), { cashflow: a, common: o } = x(), { completeOnboarding: r } = wo(), { isDirty: s } = gi(), { isMobile: c } = ye(), { isCopyLoaded: d, setDisplayedDate: _ } = ue(), { filter: u, setFilter: h, transactions: m } = Te(), C = me(), [f, b] = Tt(!0), [E, S] = g.useState(ee.EveryMonth), [v, N] = Tt(!1), [I, R] = g.useState(null), [D, H] = Tt(1), [O, M] = Tt([]), [j, U] = Tt(""), W = g.useMemo(
|
9911
|
+
() => m.find((Q) => Q.guid === j),
|
9912
|
+
[j]
|
9896
9913
|
), Ee = !!i.length, J = async () => {
|
9897
9914
|
H(2), _(
|
9898
9915
|
// Beginning of the month, 90 days before today
|
@@ -9957,7 +9974,7 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9957
9974
|
children: [
|
9958
9975
|
/* @__PURE__ */ t(en, { pb: 12, children: a.add_income_title }),
|
9959
9976
|
/* @__PURE__ */ t(Oe, { mb: 24, children: a.add_income_description }),
|
9960
|
-
O.length > 0 && !W && /* @__PURE__ */ l(
|
9977
|
+
O.length > 0 && !W && /* @__PURE__ */ l(q, { children: [
|
9961
9978
|
/* @__PURE__ */ t(ie, { children: O.map((Q, Le) => /* @__PURE__ */ l(g.Fragment, { children: [
|
9962
9979
|
/* @__PURE__ */ t(Da, { bgcolor: "background.paper", children: Wi(
|
9963
9980
|
Me(Q.nextDate || Q.date)
|
@@ -9991,14 +10008,14 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
9991
10008
|
}
|
9992
10009
|
),
|
9993
10010
|
!Ee && s && /* @__PURE__ */ t(Oe, { color: "error", mt: 16, children: a.confirm_error }),
|
9994
|
-
W && /* @__PURE__ */ l(
|
10011
|
+
W && /* @__PURE__ */ l(q, { children: [
|
9995
10012
|
/* @__PURE__ */ t(
|
9996
10013
|
Ic,
|
9997
10014
|
{
|
9998
10015
|
bgcolor: "background.paper",
|
9999
10016
|
frequency: E,
|
10000
10017
|
isIncome: !0,
|
10001
|
-
nextDate:
|
10018
|
+
nextDate: I,
|
10002
10019
|
onFrequencyChange: S,
|
10003
10020
|
onNextDateChange: R,
|
10004
10021
|
transaction: W
|
@@ -10008,10 +10025,10 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
10008
10025
|
/* @__PURE__ */ t(
|
10009
10026
|
te,
|
10010
10027
|
{
|
10011
|
-
"aria-disabled": !W || !
|
10028
|
+
"aria-disabled": !W || !I,
|
10012
10029
|
onClick: () => {
|
10013
10030
|
const Q = [...O];
|
10014
|
-
Q.push({ ...W, nextDate:
|
10031
|
+
Q.push({ ...W, nextDate: I, frequency: E }), M(Q), U("");
|
10015
10032
|
},
|
10016
10033
|
variant: "contained",
|
10017
10034
|
children: o.confirm_button
|
@@ -10063,18 +10080,18 @@ const Kg = ({ activity: e }) => /* @__PURE__ */ l(X, { children: [
|
|
10063
10080
|
setSelectedAccounts: o,
|
10064
10081
|
shouldDisableNextDate: r,
|
10065
10082
|
shouldDisablePrevDate: s
|
10066
|
-
} = ue(), { onEvent: c } = K(), { visibleCashAccounts: d } = ve(), { setFilter: _ } = Te(), { userProfile: u } = an(), { dateRange: h, setSelectedCashAccounts: m } = gi(), { loadActivity: C } = at(), { cashflow: f } =
|
10083
|
+
} = ue(), { onEvent: c } = K(), { visibleCashAccounts: d } = ve(), { setFilter: _ } = Te(), { userProfile: u } = an(), { dateRange: h, setSelectedCashAccounts: m } = gi(), { loadActivity: C } = at(), { cashflow: f } = x(), { isCopyLoaded: b, isInitialized: E } = ue(), [S, v] = g.useState(!1);
|
10067
10084
|
return g.useEffect(() => {
|
10068
10085
|
E && C();
|
10069
10086
|
}, [E]), g.useEffect(() => {
|
10070
10087
|
o(d);
|
10071
10088
|
}, [d]), g.useEffect(() => {
|
10072
|
-
const N = d.map((R) => R.guid),
|
10089
|
+
const N = d.map((R) => R.guid), I = i.filter(
|
10073
10090
|
(R) => a.includes(R.guid) && N.includes(R.guid)
|
10074
10091
|
);
|
10075
|
-
m(
|
10092
|
+
m(I), _({
|
10076
10093
|
dateRange: { start: _t(_e(), 90), end: gn() },
|
10077
|
-
accounts:
|
10094
|
+
accounts: I.map((R) => R.guid)
|
10078
10095
|
});
|
10079
10096
|
}, [d, i]), !b || !E ? /* @__PURE__ */ t(ge, {}) : u?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ l(
|
10080
10097
|
Mt,
|
@@ -10243,7 +10260,7 @@ const fn = () => {
|
|
10243
10260
|
throw new Error("useCateUiStore() must be used within the GlobalDataContext");
|
10244
10261
|
return va().uiStore;
|
10245
10262
|
}, _m = ({ debts: e, onClickCta: n, sx: i }) => {
|
10246
|
-
const a = wn(), { isMobile: o } = ye(), { debts: r } =
|
10263
|
+
const a = wn(), { isMobile: o } = ye(), { debts: r } = x(), { selectedDebtPriority: s } = fn(), { monthlyCashFlowProfile: c } = lt(), { payoffDate: d, payoffSavings: _, payoffDuration: u } = g.useMemo(() => {
|
10247
10264
|
const h = c?.extra_payment ?? 0;
|
10248
10265
|
return um(e, s, h);
|
10249
10266
|
}, [e, s, c]);
|
@@ -10295,7 +10312,7 @@ const fn = () => {
|
|
10295
10312
|
}
|
10296
10313
|
);
|
10297
10314
|
}, hm = A(_m), gm = ({ isOpen: e, onClose: n, sx: i }) => {
|
10298
|
-
const a = wn(), { debts: o } =
|
10315
|
+
const a = wn(), { debts: o } = x(), [r, s] = g.useState(!1);
|
10299
10316
|
return /* @__PURE__ */ t(
|
10300
10317
|
oe,
|
10301
10318
|
{
|
@@ -10709,7 +10726,7 @@ const fn = () => {
|
|
10709
10726
|
}
|
10710
10727
|
return c;
|
10711
10728
|
}, Im = () => {
|
10712
|
-
const e = it(), { selectedAccount: n } = Wt(), { monthlyCategoryTotals: i } = ze(), { trends: a } =
|
10729
|
+
const e = it(), { selectedAccount: n } = Wt(), { monthlyCategoryTotals: i } = ze(), { trends: a } = x(), o = [e.palette.chart?.chart1, e.palette.chart?.chart2], r = Tm(i, n.account_type), s = Am(r, n.account_type, a), c = [de.LOAN, de.MORTGAGE].includes(n.account_type);
|
10713
10730
|
return /* @__PURE__ */ t("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ t(
|
10714
10731
|
xo,
|
10715
10732
|
{
|
@@ -10750,7 +10767,7 @@ const fn = () => {
|
|
10750
10767
|
}
|
10751
10768
|
);
|
10752
10769
|
}, wm = A(vm), Nm = ({ customDetailsChart: e }) => {
|
10753
|
-
const { institutions: n } = ve(), { selectedAccount: i } = Wt(), { accounts: a } =
|
10770
|
+
const { institutions: n } = ve(), { selectedAccount: i } = Wt(), { accounts: a } = x(), { firstSubtitle: o, firstValue: r, hasAvailableBalance: s, secondSubtitle: c, secondValue: d } = Dc(i, a), _ = n.find(
|
10754
10771
|
(h) => h.guid === i?.institution_guid
|
10755
10772
|
), u = [
|
10756
10773
|
...So,
|
@@ -10800,31 +10817,31 @@ const kc = ({
|
|
10800
10817
|
onClickArea: r,
|
10801
10818
|
onHoverArea: s
|
10802
10819
|
}) => {
|
10803
|
-
const c = it(), { onEvent: d } = K(), _ = a.filter((
|
10820
|
+
const c = it(), { onEvent: d } = K(), _ = a.filter((I) => !I.is_impossible), u = [
|
10804
10821
|
...new Set(
|
10805
|
-
_.flatMap((
|
10822
|
+
_.flatMap((I) => I.dataset.map((R) => new Date(R.x).getTime()))
|
10806
10823
|
)
|
10807
|
-
].sort((
|
10808
|
-
const R = new Map(
|
10824
|
+
].sort((I, R) => I - R).map((I) => new Date(I)), h = _.map((I) => {
|
10825
|
+
const R = new Map(I.dataset.map((O) => [new Date(O.x).getTime(), O.y]));
|
10809
10826
|
let D = R.get(u[0].getTime()) ?? 0;
|
10810
10827
|
const H = u.map((O) => {
|
10811
10828
|
const M = R.get(O.getTime()) ?? D;
|
10812
10829
|
return D = M, { x: O, y: M };
|
10813
10830
|
});
|
10814
|
-
return { ...
|
10831
|
+
return { ...I, dataset: H };
|
10815
10832
|
}), m = h.reduce(
|
10816
|
-
(
|
10833
|
+
(I, R) => I + (R.dataset[0]?.y ?? 0),
|
10817
10834
|
0
|
10818
|
-
), C = u.map((
|
10835
|
+
), C = u.map((I, R) => {
|
10819
10836
|
const D = R / (u.length - 1), H = m * (1 - D);
|
10820
|
-
return { x, y: H };
|
10821
|
-
}), f = Math.ceil(m / 100) * 100, b = u, E = h.map((
|
10837
|
+
return { x: I, y: H };
|
10838
|
+
}), f = Math.ceil(m / 100) * 100, b = u, E = h.map((I, R) => {
|
10822
10839
|
const D = 1 - R / h.length * 0.5, H = Rm(Dm, D);
|
10823
10840
|
return {
|
10824
10841
|
id: `debt-${R}`,
|
10825
|
-
guid:
|
10826
|
-
label:
|
10827
|
-
data:
|
10842
|
+
guid: I.guid,
|
10843
|
+
label: I.name,
|
10844
|
+
data: I.dataset.map((O) => O.y),
|
10828
10845
|
color: H,
|
10829
10846
|
curve: "linear",
|
10830
10847
|
type: "line",
|
@@ -10836,7 +10853,7 @@ const kc = ({
|
|
10836
10853
|
E.push({
|
10837
10854
|
id: "payoff-line",
|
10838
10855
|
label: "Payoff Line",
|
10839
|
-
data: C.map((
|
10856
|
+
data: C.map((I) => I.y),
|
10840
10857
|
color: c.palette.grey[700],
|
10841
10858
|
curve: "linear",
|
10842
10859
|
type: "line",
|
@@ -10844,20 +10861,20 @@ const kc = ({
|
|
10844
10861
|
showMark: !1,
|
10845
10862
|
disableHighlight: !0
|
10846
10863
|
});
|
10847
|
-
const S = (
|
10864
|
+
const S = (I) => E.findIndex((R) => R?.guid === I);
|
10848
10865
|
return /* @__PURE__ */ t(
|
10849
10866
|
ws,
|
10850
10867
|
{
|
10851
10868
|
axisHighlight: { x: "none" },
|
10852
10869
|
disableLineItemHighlight: !0,
|
10853
10870
|
height: n,
|
10854
|
-
onAreaClick: (
|
10871
|
+
onAreaClick: (I, R) => {
|
10855
10872
|
r?.();
|
10856
10873
|
const D = E.find((H) => H.id === R.seriesId);
|
10857
10874
|
d($.DEBTS_CLICK_CHART_AREA, { account_guid: D?.guid });
|
10858
10875
|
},
|
10859
|
-
onHighlightChange: (
|
10860
|
-
const R = E.find((D) => D.id ===
|
10876
|
+
onHighlightChange: (I) => {
|
10877
|
+
const R = E.find((D) => D.id === I?.seriesId)?.guid;
|
10861
10878
|
s?.(R ?? "");
|
10862
10879
|
},
|
10863
10880
|
series: E,
|
@@ -10900,7 +10917,7 @@ const kc = ({
|
|
10900
10917
|
scaleType: "time",
|
10901
10918
|
min: u[0],
|
10902
10919
|
disableTicks: !0,
|
10903
|
-
valueFormatter: (
|
10920
|
+
valueFormatter: (I) => re(I, ae.MONTH_SHORT_YEAR)
|
10904
10921
|
}
|
10905
10922
|
],
|
10906
10923
|
yAxis: [
|
@@ -10908,14 +10925,14 @@ const kc = ({
|
|
10908
10925
|
min: 0,
|
10909
10926
|
max: f,
|
10910
10927
|
disableTicks: !0,
|
10911
|
-
valueFormatter: (
|
10928
|
+
valueFormatter: (I) => B(I, "0a")
|
10912
10929
|
}
|
10913
10930
|
]
|
10914
10931
|
}
|
10915
10932
|
);
|
10916
10933
|
}, Om = () => {
|
10917
|
-
const e = wn(), { debts: n } =
|
10918
|
-
return /* @__PURE__ */ l(
|
10934
|
+
const e = wn(), { debts: n } = x(), { selectedDebtChartData: i } = fn();
|
10935
|
+
return /* @__PURE__ */ l(q, { children: [
|
10919
10936
|
/* @__PURE__ */ l(
|
10920
10937
|
Pt,
|
10921
10938
|
{
|
@@ -10942,7 +10959,7 @@ const kc = ({
|
|
10942
10959
|
)
|
10943
10960
|
] });
|
10944
10961
|
}, Lm = A(Om), Mm = () => {
|
10945
|
-
const e = wn(), { onEvent: n } = K(), { debts: i } =
|
10962
|
+
const e = wn(), { onEvent: n } = K(), { debts: i } = x(), { selectedDebtChartData: a, showCompleted: o, showError: r } = fn();
|
10946
10963
|
return g.useEffect(() => n($.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ t(ie, { children: r || o ? /* @__PURE__ */ t(
|
10947
10964
|
p,
|
10948
10965
|
{
|
@@ -10952,7 +10969,7 @@ const kc = ({
|
|
10952
10969
|
variant: "Small",
|
10953
10970
|
children: r ? i.schedule_error_message : i.schedule_complete_message
|
10954
10971
|
}
|
10955
|
-
) : /* @__PURE__ */ l(
|
10972
|
+
) : /* @__PURE__ */ l(q, { children: [
|
10956
10973
|
/* @__PURE__ */ l(y, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
10957
10974
|
/* @__PURE__ */ t(p, { bold: !0, variant: "XSmall", children: i.schedule_month_heading }),
|
10958
10975
|
/* @__PURE__ */ t(p, { bold: !0, variant: "XSmall", children: i.schedule_amount_heading })
|
@@ -11006,7 +11023,7 @@ const kc = ({
|
|
11006
11023
|
) })
|
11007
11024
|
] }) });
|
11008
11025
|
}, km = A(Mm), Gc = A(({ goal: e }) => {
|
11009
|
-
const { goals: n } =
|
11026
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = lt(), [r, s] = g.useState(e.interest_rate ?? 0), c = !e.guid, d = r < 0, _ = async () => {
|
11010
11027
|
const h = { ...e, interest_rate: r };
|
11011
11028
|
e.interest_rate = r, c ? a(h) : (await o(h), i(n.alert_goal_updated_interest_rate));
|
11012
11029
|
}, u = () => {
|
@@ -11039,7 +11056,7 @@ const kc = ({
|
|
11039
11056
|
}
|
11040
11057
|
);
|
11041
11058
|
}), Bc = A(({ goal: e }) => {
|
11042
|
-
const { goals: n } =
|
11059
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = lt(), [r, s] = g.useState(e.monthly_payment ?? 0), c = !e.guid, d = r < 0 || r > 9999999999e-2, _ = async () => {
|
11043
11060
|
const h = { ...e, monthly_payment: r };
|
11044
11061
|
e.monthly_payment = r, c ? a(h) : (await o({ ...e, monthly_payment: r }), i(n.alert_goal_updated_payment));
|
11045
11062
|
}, u = () => {
|
@@ -11073,7 +11090,7 @@ const kc = ({
|
|
11073
11090
|
}
|
11074
11091
|
);
|
11075
11092
|
}), Pc = A(({ goal: e }) => {
|
11076
|
-
const { goals: n } =
|
11093
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = lt(), [r, s] = g.useState(e.initial_amount), c = !e.guid, d = r < 0 || r > 9999999999e-2, _ = async () => {
|
11077
11094
|
const h = { ...e, initial_amount: r };
|
11078
11095
|
e.initial_amount = r, c ? a(h) : (await o({ ...e, initial_amount: r }), i(n.alert_goal_updated_balance));
|
11079
11096
|
}, u = () => {
|
@@ -11107,7 +11124,7 @@ const kc = ({
|
|
11107
11124
|
}
|
11108
11125
|
);
|
11109
11126
|
}), Gm = A(({ debt: e }) => {
|
11110
|
-
const { debts: n } =
|
11127
|
+
const { debts: n } = x(), { updateAccount: i } = ve(), { onEvent: a } = K(), [o, r] = g.useState(e.interest_rate ?? 0), s = o < 0, c = async () => {
|
11111
11128
|
await i({ ...e.account, interest_rate: o }), e.interest_rate = o, a($.DEBTS_SAVE_RATE_ACTION, { account_guid: e.guid });
|
11112
11129
|
}, d = () => {
|
11113
11130
|
setTimeout(() => {
|
@@ -11137,7 +11154,7 @@ const kc = ({
|
|
11137
11154
|
}
|
11138
11155
|
);
|
11139
11156
|
}), Bm = A(({ debt: e }) => {
|
11140
|
-
const { debts: n } =
|
11157
|
+
const { debts: n } = x(), { updateAccount: i } = ve(), { onEvent: a } = K(), [o, r] = g.useState(e.monthly_payment ?? 0), s = o < 0 || o > 9999999999e-2, c = async () => {
|
11141
11158
|
await i({ ...e.account, minimum_payment: o }), e.monthly_payment = o, a($.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: e.guid });
|
11142
11159
|
}, d = () => {
|
11143
11160
|
setTimeout(() => {
|
@@ -11169,7 +11186,7 @@ const kc = ({
|
|
11169
11186
|
}
|
11170
11187
|
);
|
11171
11188
|
}), Pm = A(({ debt: e }) => {
|
11172
|
-
const { debts: n } =
|
11189
|
+
const { debts: n } = x(), { updateAccount: i } = ve(), { onEvent: a } = K(), [o, r] = g.useState(e.original_balance ?? 0), s = o < 0 || o > 9999999999e-2, c = async () => {
|
11173
11190
|
await i({ ...e.account, original_balance: o }), e.original_balance = o, a($.DEBTS_SAVE_BALANCE_ACTION, { account_guid: e.guid });
|
11174
11191
|
}, d = () => {
|
11175
11192
|
setTimeout(() => {
|
@@ -11203,7 +11220,7 @@ const kc = ({
|
|
11203
11220
|
}), Hm = () => {
|
11204
11221
|
const { onEvent: e } = K(), { selectedDebtChartData: n } = fn();
|
11205
11222
|
return g.useEffect(() => e($.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ l(y, { bgcolor: "background.paper", children: [
|
11206
|
-
n?.goal && /* @__PURE__ */ l(
|
11223
|
+
n?.goal && /* @__PURE__ */ l(q, { children: [
|
11207
11224
|
/* @__PURE__ */ t(Bc, { goal: n.goal }),
|
11208
11225
|
/* @__PURE__ */ t(k, {}),
|
11209
11226
|
/* @__PURE__ */ t(Gc, { goal: n.goal }),
|
@@ -11211,7 +11228,7 @@ const kc = ({
|
|
11211
11228
|
/* @__PURE__ */ t(Pc, { goal: n.goal }),
|
11212
11229
|
/* @__PURE__ */ t(k, {})
|
11213
11230
|
] }),
|
11214
|
-
!n?.goal && n?.account && /* @__PURE__ */ l(
|
11231
|
+
!n?.goal && n?.account && /* @__PURE__ */ l(q, { children: [
|
11215
11232
|
/* @__PURE__ */ t(Bm, { debt: n }),
|
11216
11233
|
/* @__PURE__ */ t(k, {}),
|
11217
11234
|
/* @__PURE__ */ t(Gm, { debt: n }),
|
@@ -11221,10 +11238,10 @@ const kc = ({
|
|
11221
11238
|
] })
|
11222
11239
|
] });
|
11223
11240
|
}, $m = A(Hm), Fm = ({ setTabValue: e, sx: n }) => {
|
11224
|
-
const { debts: i } =
|
11241
|
+
const { debts: i } = x(), { showError: a, showCompleted: o } = fn();
|
11225
11242
|
return g.useEffect(() => {
|
11226
11243
|
a && e(1);
|
11227
|
-
}, [a]), !a && !o ? /* @__PURE__ */ t(
|
11244
|
+
}, [a]), !a && !o ? /* @__PURE__ */ t(q, {}) : /* @__PURE__ */ l(be, { gap: 16, children: [
|
11228
11245
|
/* @__PURE__ */ t(It, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ l(
|
11229
11246
|
vn,
|
11230
11247
|
{
|
@@ -11249,7 +11266,7 @@ const kc = ({
|
|
11249
11266
|
a && /* @__PURE__ */ t(It, { sx: { borderRadius: 8, mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ l(
|
11250
11267
|
vn,
|
11251
11268
|
{
|
11252
|
-
icon: /* @__PURE__ */ t(
|
11269
|
+
icon: /* @__PURE__ */ t(q, {}),
|
11253
11270
|
severity: "error",
|
11254
11271
|
sx: {
|
11255
11272
|
borderRadius: 2,
|
@@ -11266,8 +11283,8 @@ const kc = ({
|
|
11266
11283
|
) })
|
11267
11284
|
] });
|
11268
11285
|
}, Wm = A(Fm), Um = () => {
|
11269
|
-
const { debts: e } =
|
11270
|
-
return /* @__PURE__ */ l(
|
11286
|
+
const { debts: e } = x(), { showError: n, showCompleted: i } = fn(), [a, o] = g.useState(0);
|
11287
|
+
return /* @__PURE__ */ l(q, { children: [
|
11271
11288
|
(n || i) && /* @__PURE__ */ t(Wm, { setTabValue: o, sx: { mt: -24 } }),
|
11272
11289
|
/* @__PURE__ */ l(
|
11273
11290
|
kt,
|
@@ -11303,7 +11320,7 @@ const kc = ({
|
|
11303
11320
|
/* @__PURE__ */ t(li, { index: 1, name: "debt-details", value: a, children: /* @__PURE__ */ t($m, {}) })
|
11304
11321
|
] });
|
11305
11322
|
}, Vm = A(Um), Km = ({ isOpen: e, onClose: n, sx: i }) => {
|
11306
|
-
const { debts: a } =
|
11323
|
+
const { debts: a } = x(), { showError: o, showCompleted: r } = fn(), s = o || r ? /* @__PURE__ */ t(q, {}) : /* @__PURE__ */ t(Lm, {});
|
11307
11324
|
return /* @__PURE__ */ t(
|
11308
11325
|
oe,
|
11309
11326
|
{
|
@@ -11319,7 +11336,7 @@ const kc = ({
|
|
11319
11336
|
}
|
11320
11337
|
);
|
11321
11338
|
}, zm = A(() => {
|
11322
|
-
const { debts: e } =
|
11339
|
+
const { debts: e } = x(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: i } = lt(), { onEvent: a } = K(), [o, r] = g.useState(n?.extra_payment ?? 0), s = o < 0 || o > 9999999999e-2, c = async () => {
|
11323
11340
|
n && (await i({ ...n, extra_payment: o }), n.extra_payment = o, a($.DEBTS_SAVE_PAYDOWN_ACTION, {
|
11324
11341
|
user_guid: n?.user_guid
|
11325
11342
|
}));
|
@@ -11353,7 +11370,7 @@ const kc = ({
|
|
11353
11370
|
}
|
11354
11371
|
);
|
11355
11372
|
}), Ym = () => {
|
11356
|
-
const { debts: e } =
|
11373
|
+
const { debts: e } = x(), { totalMonthlyPayments: n } = va(), { monthlyCashFlowProfile: i } = lt(), a = n + Number(i?.extra_payment);
|
11357
11374
|
return /* @__PURE__ */ l(y, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
11358
11375
|
/* @__PURE__ */ l(y, { p: 24, children: [
|
11359
11376
|
/* @__PURE__ */ l(y, { alignItems: "center", gap: 4, mb: 24, children: [
|
@@ -11373,7 +11390,7 @@ const kc = ({
|
|
11373
11390
|
] }) })
|
11374
11391
|
] });
|
11375
11392
|
}, jm = A(Ym), Xm = ({ isOpen: e, onClose: n, sx: i }) => {
|
11376
|
-
const { debts: a } =
|
11393
|
+
const { debts: a } = x();
|
11377
11394
|
return /* @__PURE__ */ t(
|
11378
11395
|
oe,
|
11379
11396
|
{
|
@@ -11444,7 +11461,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11444
11461
|
onHoverRow: a,
|
11445
11462
|
onClickRow: o
|
11446
11463
|
}) => {
|
11447
|
-
const r = wn(), { onEvent: s } = K(), { isMobile: c } = ye(), { debts: d } =
|
11464
|
+
const r = wn(), { onEvent: s } = K(), { isMobile: c } = ye(), { debts: d } = x(), [_, u] = g.useState([
|
11448
11465
|
{ field: "priority", sort: "asc" }
|
11449
11466
|
]), h = [
|
11450
11467
|
{
|
@@ -11544,8 +11561,8 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11544
11561
|
id: S,
|
11545
11562
|
priority: Zm(E)
|
11546
11563
|
})), [n]), f = (E) => {
|
11547
|
-
const N = E.target.closest("[data-id]")?.getAttribute("data-id"),
|
11548
|
-
a?.(
|
11564
|
+
const N = E.target.closest("[data-id]")?.getAttribute("data-id"), I = n[Number(N)];
|
11565
|
+
a?.(I?.guid ?? "");
|
11549
11566
|
}, b = (E) => C.find((S) => S.guid === E)?.id;
|
11550
11567
|
return /* @__PURE__ */ t(
|
11551
11568
|
L,
|
@@ -11618,7 +11635,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11618
11635
|
}
|
11619
11636
|
);
|
11620
11637
|
}, ip = A(({ buttonEl: e, onClose: n }) => {
|
11621
|
-
const { onEvent: i } = K(), { debts: a } =
|
11638
|
+
const { onEvent: i } = K(), { debts: a } = x(), { selectedDebtPriority: o, setSelectedDebtPriority: r } = fn(), s = !!e, c = [
|
11622
11639
|
{
|
11623
11640
|
priority: cn.HIGHEST_INTEREST,
|
11624
11641
|
text: a.priority_sort_highest_interest
|
@@ -11677,7 +11694,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11677
11694
|
}
|
11678
11695
|
);
|
11679
11696
|
}), ap = A(() => {
|
11680
|
-
const { onEvent: e } = K(), { debts: n } =
|
11697
|
+
const { onEvent: e } = K(), { debts: n } = x(), { selectedDebtPriority: i } = fn(), [a, o] = g.useState(null), r = (_) => {
|
11681
11698
|
o(_.currentTarget), e($.DEBTS_CLICK_PRIORITIZE);
|
11682
11699
|
}, s = () => {
|
11683
11700
|
o(null);
|
@@ -11728,7 +11745,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11728
11745
|
d.priority = !d.is_paid_off && !d.is_impossible ? c++ : void 0;
|
11729
11746
|
}), r;
|
11730
11747
|
}, rp = A(({ onClick: e }) => {
|
11731
|
-
const { debts: n } =
|
11748
|
+
const { debts: n } = x(), { isDesktop: i } = ye(), { totalMonthlyPayments: a } = va(), { monthlyCashFlowProfile: o } = lt(), r = a + Number(o?.extra_payment), s = i ? n.paydown_button_long : n.paydown_button_short;
|
11732
11749
|
return /* @__PURE__ */ t(
|
11733
11750
|
te,
|
11734
11751
|
{
|
@@ -11742,19 +11759,19 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11742
11759
|
}
|
11743
11760
|
);
|
11744
11761
|
}), sp = ({ onBackClick: e, sx: n }) => {
|
11745
|
-
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState(!1), [d, _] = g.useState(""), { isDesktop: u, isMobile: h } = ye(), { debts: m } =
|
11762
|
+
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState(!1), [d, _] = g.useState(""), { isDesktop: u, isMobile: h } = ye(), { debts: m } = x(), { onEvent: C } = K(), { isCopyLoaded: f, isInitialized: b, setSelectedAccounts: E } = ue(), { setSelectedAccount: S } = Wt(), { selectedDebtPriority: v, setSelectedDebtChartData: N } = fn(), { visibleDebtAccounts: I } = ve(), { goalsLoaded: R, loadGoals: D, monthlyCashFlowProfile: H } = lt(), { debts: O } = va(), M = g.useMemo(() => {
|
11746
11763
|
const pe = H?.extra_payment ?? 0;
|
11747
11764
|
return op(O, v, pe);
|
11748
11765
|
}, [O, v, H]);
|
11749
11766
|
g.useEffect(() => {
|
11750
|
-
E(
|
11767
|
+
E(I), C($.DEBTS_VIEW);
|
11751
11768
|
}, []), g.useEffect(() => {
|
11752
|
-
E(
|
11753
|
-
}, [
|
11769
|
+
E(I);
|
11770
|
+
}, [I]), g.useEffect(() => {
|
11754
11771
|
b && D().finally();
|
11755
11772
|
}, [b]);
|
11756
|
-
const
|
11757
|
-
const pe =
|
11773
|
+
const j = (pe) => _(pe), U = () => {
|
11774
|
+
const pe = I.find((Q) => Q.guid === d), Z = M.find((Q) => Q.guid === d);
|
11758
11775
|
pe && S(pe), Z && N(Z), a(!0);
|
11759
11776
|
}, W = () => C($.DEBTS_CLICK_FILTER), Ee = () => {
|
11760
11777
|
c(!0), C($.DEBTS_CLICK_SNOWBALL_CTA);
|
@@ -11764,7 +11781,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11764
11781
|
return !R || !f || !b ? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ l(
|
11765
11782
|
Mt,
|
11766
11783
|
{
|
11767
|
-
accountOptions:
|
11784
|
+
accountOptions: I,
|
11768
11785
|
actions: [
|
11769
11786
|
/* @__PURE__ */ t(ap, {}, "prioritize-debts"),
|
11770
11787
|
/* @__PURE__ */ t(rp, { onClick: J }, "extra-paydown")
|
@@ -11791,7 +11808,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11791
11808
|
height: h ? 250 : void 0,
|
11792
11809
|
hoveredDebtGuid: d,
|
11793
11810
|
onClickArea: U,
|
11794
|
-
onHoverArea:
|
11811
|
+
onHoverArea: j,
|
11795
11812
|
sx: { mr: h ? "4px" : "-48px" }
|
11796
11813
|
}
|
11797
11814
|
),
|
@@ -11812,7 +11829,7 @@ const Kt = (e) => /* @__PURE__ */ t(p, { fontWeight: 600, variant: "Small", chil
|
|
11812
11829
|
debts: M,
|
11813
11830
|
hoveredDebtGuid: d,
|
11814
11831
|
onClickRow: U,
|
11815
|
-
onHoverRow:
|
11832
|
+
onHoverRow: j
|
11816
11833
|
}
|
11817
11834
|
) })
|
11818
11835
|
] }),
|
@@ -11999,7 +12016,7 @@ const gp = (e, n) => {
|
|
11999
12016
|
"$1$2$3"
|
12000
12017
|
) : B(e, "0,0.00"), Hc = A(
|
12001
12018
|
({ goal: e, isInDrawer: n = !1, onClick: i }) => {
|
12002
|
-
const { goals: a } =
|
12019
|
+
const { goals: a } = x(), { isMobile: o, isTablet: r } = ye(), s = o || r, {
|
12003
12020
|
backgroundColor: c,
|
12004
12021
|
color: d,
|
12005
12022
|
percentage: _,
|
@@ -12034,7 +12051,7 @@ const gp = (e, n) => {
|
|
12034
12051
|
] }) });
|
12035
12052
|
}
|
12036
12053
|
), pp = A(({ trackType: e }) => {
|
12037
|
-
const { goals: n } =
|
12054
|
+
const { goals: n } = x(), { setAlert: i, monthlyCashFlowProfile: a, updateMonthlyCashFlowProfile: o } = lt(), r = g.useMemo(() => {
|
12038
12055
|
let _ = 0;
|
12039
12056
|
return e === V.SAVINGS_TRACK ? _ = a?.amount_allocated_for_savings_goals || 0 : e === V.DEBT_TRACK ? _ = a?.amount_allocated_for_debt_goals || 0 : e === V.RETIREMENT_TRACK && (_ = a?.amount_allocated_for_retirement_goals || 0), _;
|
12040
12057
|
}, [a]), [s, c] = g.useState(r), d = async () => {
|
@@ -12067,7 +12084,7 @@ const gp = (e, n) => {
|
|
12067
12084
|
}
|
12068
12085
|
) });
|
12069
12086
|
}), Cp = ({ goals: e }) => {
|
12070
|
-
const { goals: n, common: i } =
|
12087
|
+
const { goals: n, common: i } = x(), { reorderGoals: a, setAlert: o } = lt(), [r, s] = g.useState(!1), [c, d] = g.useState(e.map((C) => ({ ...C })));
|
12071
12088
|
g.useEffect(() => {
|
12072
12089
|
r && d(e.map((C) => ({ ...C })));
|
12073
12090
|
}, [r]);
|
@@ -12165,7 +12182,7 @@ const gp = (e, n) => {
|
|
12165
12182
|
)
|
12166
12183
|
] });
|
12167
12184
|
}, fp = ({ goal: e, index: n }) => {
|
12168
|
-
const { goals: i } =
|
12185
|
+
const { goals: i } = x();
|
12169
12186
|
return /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ l(he, { children: [
|
12170
12187
|
e.track_type !== V.RETIREMENT_TRACK && /* @__PURE__ */ t(
|
12171
12188
|
He,
|
@@ -12194,7 +12211,7 @@ const gp = (e, n) => {
|
|
12194
12211
|
] }) })
|
12195
12212
|
] }) });
|
12196
12213
|
}, bp = ({ goal: e }) => {
|
12197
|
-
const { goals: n } =
|
12214
|
+
const { goals: n } = x();
|
12198
12215
|
return /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ l(he, { children: [
|
12199
12216
|
/* @__PURE__ */ t(He, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(Ca, { color: "success", filled: !0, size: 20 }) }),
|
12200
12217
|
/* @__PURE__ */ t(se, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
@@ -12212,7 +12229,7 @@ const gp = (e, n) => {
|
|
12212
12229
|
] }) })
|
12213
12230
|
] }) }, e.guid);
|
12214
12231
|
}, yp = ({ trackType: e }) => {
|
12215
|
-
const { goals: n, common: i } =
|
12232
|
+
const { goals: n, common: i } = x(), { orderedGoals: a } = lt(), o = a.filter((C) => C.track_type === e), r = o.filter(
|
12216
12233
|
(C) => C.track_type === V.SAVINGS_TRACK && !C.has_been_spent || C.track_type !== V.SAVINGS_TRACK && !C.is_complete
|
12217
12234
|
), s = o.filter(
|
12218
12235
|
(C) => C.track_type === V.SAVINGS_TRACK && C.has_been_spent || C.track_type !== V.SAVINGS_TRACK && C.is_complete
|
@@ -12267,7 +12284,7 @@ const gp = (e, n) => {
|
|
12267
12284
|
)
|
12268
12285
|
] });
|
12269
12286
|
}, Xa = A(({ trackType: e, onAddGoals: n }) => {
|
12270
|
-
const { isMobile: i } = ye(), { goals: a } =
|
12287
|
+
const { isMobile: i } = ye(), { goals: a } = x(), { orderedGoals: o, setSelectedGoal: r } = lt(), s = o.filter((u) => u.track_type === e), c = s.filter(
|
12271
12288
|
(u) => u.track_type === V.SAVINGS_TRACK && !u.has_been_spent || u.track_type !== V.SAVINGS_TRACK && !u.is_complete
|
12272
12289
|
), d = s.filter(
|
12273
12290
|
(u) => u.track_type === V.SAVINGS_TRACK && u.has_been_spent || u.track_type !== V.SAVINGS_TRACK && u.is_complete
|
@@ -12334,7 +12351,7 @@ const gp = (e, n) => {
|
|
12334
12351
|
] })
|
12335
12352
|
] });
|
12336
12353
|
}), Ep = ({ goalType: e, onClick: n }) => {
|
12337
|
-
const { goals: i } =
|
12354
|
+
const { goals: i } = x(), { bgcolor: a, icon: o, label: r, description: s, subTypes: c, type: d } = e, [_, u] = g.useState(!1), h = c.length > 0;
|
12338
12355
|
return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ l(ie, { sx: { bgcolor: "background.paper" }, children: [
|
12339
12356
|
/* @__PURE__ */ t(Y, { children: /* @__PURE__ */ l(
|
12340
12357
|
he,
|
@@ -12372,7 +12389,7 @@ const gp = (e, n) => {
|
|
12372
12389
|
onSave: a,
|
12373
12390
|
title: o
|
12374
12391
|
}) => {
|
12375
|
-
const { goals: r, common: s } =
|
12392
|
+
const { goals: r, common: s } = x(), [c, d] = g.useState([]), _ = (u) => {
|
12376
12393
|
const h = c.findIndex((C) => C.guid === u.guid), m = [...c];
|
12377
12394
|
h >= 0 ? m.splice(h, 1) : m.push(u), d(m);
|
12378
12395
|
};
|
@@ -12421,7 +12438,7 @@ const gp = (e, n) => {
|
|
12421
12438
|
}
|
12422
12439
|
);
|
12423
12440
|
}, Sp = ({ onClose: e }) => {
|
12424
|
-
const { goals: n } =
|
12441
|
+
const { goals: n } = x(), { addGoal: i, debtGoals: a, setAlert: o, setSelectedGoal: r } = lt(), { visibleDebtAccounts: s } = ve(), [c, d] = g.useState(!1), _ = hp(n), u = (m, C, f) => {
|
12425
12442
|
f === V.DEBT_TRACK ? d(!0) : r({
|
12426
12443
|
amount: 0,
|
12427
12444
|
current_amount: 0,
|
@@ -12463,7 +12480,7 @@ const gp = (e, n) => {
|
|
12463
12480
|
)
|
12464
12481
|
] });
|
12465
12482
|
}, Fc = ({ account: e }) => {
|
12466
|
-
const { accounts: n } =
|
12483
|
+
const { accounts: n } = x(), { setSelectedAccount: i } = Wt(), [a, o] = g.useState(!1);
|
12467
12484
|
return /* @__PURE__ */ l(Y, { sx: { bgcolor: "background.paper" }, children: [
|
12468
12485
|
/* @__PURE__ */ l(he, { onClick: () => {
|
12469
12486
|
i(e), o(!0);
|
@@ -12490,7 +12507,7 @@ const gp = (e, n) => {
|
|
12490
12507
|
] }) })
|
12491
12508
|
] });
|
12492
12509
|
}, Tp = A(({ goal: e }) => {
|
12493
|
-
const { goals: n } =
|
12510
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = lt(), [r, s] = g.useState(e.amount), c = !e.guid, d = r < 0 || r > 9999999999e-2, _ = e.track_type === V.SAVINGS_TRACK && e.has_been_spent || e.track_type !== V.SAVINGS_TRACK && e.is_complete, u = async () => {
|
12494
12511
|
const m = { ...e, amount: r };
|
12495
12512
|
e.amount = r, c ? a(m) : (await o(m), i(n.alert_goal_updated_amount));
|
12496
12513
|
}, h = () => {
|
@@ -12524,7 +12541,7 @@ const gp = (e, n) => {
|
|
12524
12541
|
}
|
12525
12542
|
);
|
12526
12543
|
}), Ap = ({ goal: e }) => {
|
12527
|
-
const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = ve(), { accounts: a, goals: o } =
|
12544
|
+
const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = ve(), { accounts: a, goals: o } = x(), { setAlert: r, setSelectedGoal: s, updateGoal: c } = lt(), d = !e.guid && !e.account_guid, [_, u] = g.useState(!1), h = async (m) => {
|
12528
12545
|
const C = { ...e, account_guid: m };
|
12529
12546
|
d ? s(C) : (await c(C), r(o.alert_account_changed)), u(!1);
|
12530
12547
|
};
|
@@ -12595,7 +12612,7 @@ const gp = (e, n) => {
|
|
12595
12612
|
] }) })
|
12596
12613
|
] });
|
12597
12614
|
}, Ip = A(({ goal: e }) => {
|
12598
|
-
const { goals: n } =
|
12615
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = lt(), [r, s] = g.useState(e.name), c = !e.guid, d = e.track_type === V.SAVINGS_TRACK && e.has_been_spent || e.track_type !== V.SAVINGS_TRACK && e.is_complete, _ = async () => {
|
12599
12616
|
const h = { ...e, name: r };
|
12600
12617
|
e.name = r, c ? a(h) : (await o(h), i(n.alert_goal_updated_name));
|
12601
12618
|
}, u = () => {
|
@@ -12626,7 +12643,7 @@ const gp = (e, n) => {
|
|
12626
12643
|
}
|
12627
12644
|
);
|
12628
12645
|
}), xp = ({ goal: e }) => {
|
12629
|
-
const { goals: n } =
|
12646
|
+
const { goals: n } = x(), { setAlert: i, setSelectedGoal: a, updateGoal: o } = lt(), [r, s] = g.useState(e.retirement_age || 65), c = !e.guid, d = async () => {
|
12630
12647
|
if (!isNaN(r)) {
|
12631
12648
|
const h = { ...e, retirement_age: r };
|
12632
12649
|
e.retirement_age = r, c ? a(h) : (await o(h), i(n.alert_goal_updated_retirement_age));
|
@@ -12660,7 +12677,7 @@ const gp = (e, n) => {
|
|
12660
12677
|
}
|
12661
12678
|
);
|
12662
12679
|
}, vp = A(({ goal: e }) => {
|
12663
|
-
const { goals: n } =
|
12680
|
+
const { goals: n } = x(), { user: i, updateUser: a } = an(), { setAlert: o } = lt(), [r, s] = g.useState(Ge(i.birthday ?? 0)), [c, d] = g.useState(null), _ = e.is_complete, u = async () => {
|
12664
12681
|
r && fo(r) && (await a({ ...i, birthday: Me(r) }), o(n.alert_goal_updated_birthday));
|
12665
12682
|
};
|
12666
12683
|
return /* @__PURE__ */ t(
|
@@ -12686,7 +12703,7 @@ const gp = (e, n) => {
|
|
12686
12703
|
}
|
12687
12704
|
);
|
12688
12705
|
}), wp = ({ goal: e }) => {
|
12689
|
-
const { goals: n } =
|
12706
|
+
const { goals: n } = x(), { visibleInvestmentAccounts: i } = ve(), {
|
12690
12707
|
addRetirementGoalAccount: a,
|
12691
12708
|
newRetirementGoalAccounts: o,
|
12692
12709
|
retirementGoalAccounts: r,
|
@@ -12732,7 +12749,7 @@ const gp = (e, n) => {
|
|
12732
12749
|
)
|
12733
12750
|
] });
|
12734
12751
|
}, Np = A(({ goal: e }) => {
|
12735
|
-
const { goals: n } =
|
12752
|
+
const { goals: n } = x(), { visibleAccounts: i } = ve(), a = g.useMemo(
|
12736
12753
|
() => i.find((s) => s.guid === e.account_guid),
|
12737
12754
|
[i, e]
|
12738
12755
|
), o = e.track_type;
|
@@ -12746,11 +12763,11 @@ const gp = (e, n) => {
|
|
12746
12763
|
/* @__PURE__ */ l(ie, { sx: { bgcolor: "background.paper" }, children: [
|
12747
12764
|
/* @__PURE__ */ t(Ip, { goal: e }),
|
12748
12765
|
/* @__PURE__ */ t(k, { sx: { ml: 24 } }),
|
12749
|
-
(o === V.SAVINGS_TRACK || o === V.RETIREMENT_TRACK) && /* @__PURE__ */ l(
|
12766
|
+
(o === V.SAVINGS_TRACK || o === V.RETIREMENT_TRACK) && /* @__PURE__ */ l(q, { children: [
|
12750
12767
|
/* @__PURE__ */ t(Tp, { goal: e }),
|
12751
12768
|
/* @__PURE__ */ t(k, { sx: { ml: o === V.RETIREMENT_TRACK ? 24 : 0 } })
|
12752
12769
|
] }),
|
12753
|
-
e.track_type === V.DEBT_TRACK && /* @__PURE__ */ l(
|
12770
|
+
e.track_type === V.DEBT_TRACK && /* @__PURE__ */ l(q, { children: [
|
12754
12771
|
/* @__PURE__ */ t(Bc, { goal: e }),
|
12755
12772
|
/* @__PURE__ */ t(k, { sx: { ml: 24 } }),
|
12756
12773
|
/* @__PURE__ */ t(Gc, { goal: e }),
|
@@ -12758,7 +12775,7 @@ const gp = (e, n) => {
|
|
12758
12775
|
/* @__PURE__ */ t(Pc, { goal: e }),
|
12759
12776
|
/* @__PURE__ */ t(k, { variant: "fullWidth" })
|
12760
12777
|
] }),
|
12761
|
-
e.track_type === V.RETIREMENT_TRACK && /* @__PURE__ */ l(
|
12778
|
+
e.track_type === V.RETIREMENT_TRACK && /* @__PURE__ */ l(q, { children: [
|
12762
12779
|
/* @__PURE__ */ t(xp, { goal: e }),
|
12763
12780
|
/* @__PURE__ */ t(k, { sx: { ml: 24 } }),
|
12764
12781
|
/* @__PURE__ */ t(vp, { goal: e }),
|
@@ -12766,18 +12783,18 @@ const gp = (e, n) => {
|
|
12766
12783
|
] })
|
12767
12784
|
] }),
|
12768
12785
|
/* @__PURE__ */ t(p, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: e.track_type === V.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
|
12769
|
-
e.track_type !== V.RETIREMENT_TRACK && a && /* @__PURE__ */ l(
|
12786
|
+
e.track_type !== V.RETIREMENT_TRACK && a && /* @__PURE__ */ l(q, { children: [
|
12770
12787
|
/* @__PURE__ */ t(Fc, { account: a }),
|
12771
12788
|
/* @__PURE__ */ t(k, {})
|
12772
12789
|
] }),
|
12773
|
-
e.track_type === V.RETIREMENT_TRACK && /* @__PURE__ */ l(
|
12790
|
+
e.track_type === V.RETIREMENT_TRACK && /* @__PURE__ */ l(q, { children: [
|
12774
12791
|
/* @__PURE__ */ t(wp, { goal: e }),
|
12775
12792
|
/* @__PURE__ */ t(k, {})
|
12776
12793
|
] }),
|
12777
12794
|
e.track_type === V.SAVINGS_TRACK && !e.is_complete && /* @__PURE__ */ t(Ap, { goal: e })
|
12778
12795
|
] });
|
12779
12796
|
}), Dp = A(({ onClose: e }) => {
|
12780
|
-
const { goals: n, common: i } =
|
12797
|
+
const { goals: n, common: i } = x(), {
|
12781
12798
|
addGoal: a,
|
12782
12799
|
addRetirementGoal: o,
|
12783
12800
|
deleteGoal: r,
|
@@ -12794,7 +12811,7 @@ const gp = (e, n) => {
|
|
12794
12811
|
const D = c.track_type;
|
12795
12812
|
D !== V.RETIREMENT_TRACK ? await a(c) : D === V.RETIREMENT_TRACK && await o({ ...c, target_amount: c.amount }), d(n.alert_goal_added), _(void 0), D && e?.(D);
|
12796
12813
|
}
|
12797
|
-
},
|
12814
|
+
}, I = async () => {
|
12798
12815
|
c && (c.track_type !== V.RETIREMENT_TRACK ? await r(c.guid) : c.track_type === V.RETIREMENT_TRACK && await s(c), d(n.alert_goal_deleted), _(void 0));
|
12799
12816
|
}, R = async () => {
|
12800
12817
|
const D = {
|
@@ -12827,7 +12844,7 @@ const gp = (e, n) => {
|
|
12827
12844
|
isOpen: m,
|
12828
12845
|
maxWidth: "xs",
|
12829
12846
|
onClose: () => C(!1),
|
12830
|
-
onPrimaryAction:
|
12847
|
+
onPrimaryAction: I,
|
12831
12848
|
primaryColor: "error",
|
12832
12849
|
primaryText: i.delete_button,
|
12833
12850
|
children: /* @__PURE__ */ t(p, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: T(n.delete_description, c?.name || "") })
|
@@ -12835,13 +12852,13 @@ const gp = (e, n) => {
|
|
12835
12852
|
)
|
12836
12853
|
] });
|
12837
12854
|
}), l4 = A(({ onBackClick: e, sx: n }) => {
|
12838
|
-
const { onEvent: i } = K(), { isMobile: a } = ye(), { visibleAccounts: o } = ve(), { isCopyLoaded: r, isInitialized: s, setSelectedAccounts: c } = ue(), { goals: d, common: _ } =
|
12855
|
+
const { onEvent: i } = K(), { isMobile: a } = ye(), { visibleAccounts: o } = ve(), { isCopyLoaded: r, isInitialized: s, setSelectedAccounts: c } = ue(), { goals: d, common: _ } = x(), { alert: u, goals: h, goalsLoaded: m, loadGoals: C, monthlyCashFlowProfile: f, setAlert: b, retirmentGoals: E } = lt(), [S, v] = g.useState(0), [N, I] = g.useState(!1), R = f?.amount_allocated_for_savings_goals || 0, D = f?.amount_allocated_for_debt_goals || 0, H = f?.amount_allocated_for_retirement_goals || 0, O = r ? T(
|
12839
12856
|
a ? d.tab_subtitle_mobile : d.tab_subtitle,
|
12840
12857
|
B(R, "0,0")
|
12841
12858
|
) : "", M = r ? T(
|
12842
12859
|
a ? d.tab_subtitle_mobile : d.tab_subtitle,
|
12843
12860
|
B(D, "0,0")
|
12844
|
-
) : "",
|
12861
|
+
) : "", j = r ? T(
|
12845
12862
|
a ? d.tab_subtitle_mobile : d.tab_subtitle,
|
12846
12863
|
B(H, "0,0")
|
12847
12864
|
) : "";
|
@@ -12853,9 +12870,9 @@ const gp = (e, n) => {
|
|
12853
12870
|
const U = () => {
|
12854
12871
|
i($.GOALS_CLICK_FILTER);
|
12855
12872
|
}, W = () => {
|
12856
|
-
|
12873
|
+
I(!0), i($.GOALS_CLICK_ADD);
|
12857
12874
|
}, Ee = (pe) => {
|
12858
|
-
|
12875
|
+
I(!1), pe === V.SAVINGS_TRACK ? v(0) : pe === V.DEBT_TRACK ? v(1) : pe === V.RETIREMENT_TRACK && v(2);
|
12859
12876
|
}, J = g.useMemo(
|
12860
12877
|
() => m && (h.length === 0 || h.every(({ track_type: pe }) => !pe) && E.length === 0),
|
12861
12878
|
[h, m, E]
|
@@ -12905,7 +12922,7 @@ const gp = (e, n) => {
|
|
12905
12922
|
Ke,
|
12906
12923
|
{
|
12907
12924
|
disabled: J,
|
12908
|
-
label: /* @__PURE__ */ t(ja, { subtitle:
|
12925
|
+
label: /* @__PURE__ */ t(ja, { subtitle: j, title: d.tab_retirement_title }),
|
12909
12926
|
sx: { "&.Mui-selected": { color: "primary.light" } }
|
12910
12927
|
}
|
12911
12928
|
)
|
@@ -12927,7 +12944,7 @@ const gp = (e, n) => {
|
|
12927
12944
|
}
|
12928
12945
|
}
|
12929
12946
|
}
|
12930
|
-
) : /* @__PURE__ */ l(
|
12947
|
+
) : /* @__PURE__ */ l(q, { children: [
|
12931
12948
|
S === 0 && /* @__PURE__ */ t(Xa, { onAddGoals: W, trackType: V.SAVINGS_TRACK }),
|
12932
12949
|
S === 1 && /* @__PURE__ */ t(Xa, { onAddGoals: W, trackType: V.DEBT_TRACK }),
|
12933
12950
|
S === 2 && /* @__PURE__ */ t(Xa, { onAddGoals: W, trackType: V.RETIREMENT_TRACK })
|
@@ -12939,7 +12956,7 @@ const gp = (e, n) => {
|
|
12939
12956
|
{
|
12940
12957
|
ariaLabelClose: _.close_aria,
|
12941
12958
|
isOpen: N,
|
12942
|
-
onClose: () =>
|
12959
|
+
onClose: () => I(!1),
|
12943
12960
|
title: d.add_goal_title,
|
12944
12961
|
children: /* @__PURE__ */ t(Sp, { onClose: Ee })
|
12945
12962
|
}
|
@@ -13573,7 +13590,7 @@ const Yp = /^[ a-zA-ZÀ-ÿ0-9]+$/, jp = 50, Qr = 65, Xp = ({
|
|
13573
13590
|
height: e = "calc(100dvh - 120px)",
|
13574
13591
|
onSelect: n
|
13575
13592
|
}) => {
|
13576
|
-
const { isLoading: i, merchants: a, loadMerchants: o } = Vu(), { common: r } =
|
13593
|
+
const { isLoading: i, merchants: a, loadMerchants: o } = Vu(), { common: r } = x(), { isCopyLoaded: s } = ue(), [c, d] = g.useState("");
|
13577
13594
|
g.useEffect(() => {
|
13578
13595
|
o().finally();
|
13579
13596
|
}, [o]);
|
@@ -13884,7 +13901,7 @@ const o1 = ({
|
|
13884
13901
|
onMouseLeave: r,
|
13885
13902
|
selectedData: s
|
13886
13903
|
}) => {
|
13887
|
-
const { net_worth: c } =
|
13904
|
+
const { net_worth: c } = x(), d = it(), _ = (u) => {
|
13888
13905
|
const h = u.x === n?.x, m = u.x === s?.x, C = {
|
13889
13906
|
backgroundColor: "inherit",
|
13890
13907
|
borderBottom: "inherit",
|
@@ -13943,7 +13960,7 @@ const o1 = ({
|
|
13943
13960
|
/* @__PURE__ */ t(p, { variant: "Small", children: e })
|
13944
13961
|
] });
|
13945
13962
|
}, Ko = A(u1), _1 = ({ hoveredData: e, selectedData: n }) => {
|
13946
|
-
const { net_worth: i } =
|
13963
|
+
const { net_worth: i } = x(), a = it(), o = e || n, r = Ln(Ni(o.x), "MMMM");
|
13947
13964
|
return /* @__PURE__ */ l(y, { alignItems: "center", direction: "column", m: 24, children: [
|
13948
13965
|
/* @__PURE__ */ t(p, { color: a.palette.secondary.main, variant: "Small", children: `${r} ${i.net_worth}` }),
|
13949
13966
|
/* @__PURE__ */ t(je, { amount: o.y, variant: "H2" }),
|
@@ -13955,7 +13972,7 @@ const o1 = ({
|
|
13955
13972
|
title: i
|
13956
13973
|
}) => {
|
13957
13974
|
let a;
|
13958
|
-
const { refreshAccounts: o } = ve(), { loadWidget: r } = ac(), { connect: s } =
|
13975
|
+
const { refreshAccounts: o } = ve(), { loadWidget: r } = ac(), { connect: s } = x(), c = it(), [d, _] = g.useState(!1), [u, h] = g.useState(!1);
|
13959
13976
|
return g.useEffect(() => (n ? (_(!0), r({ widget: "connections_widget", mode: c.palette.mode }).then((m) => {
|
13960
13977
|
a = new Cd({
|
13961
13978
|
container: `#${Ir}`,
|
@@ -13991,7 +14008,7 @@ const o1 = ({
|
|
13991
14008
|
);
|
13992
14009
|
}, Ga = A(g1), m1 = ({ accounts: e, name: n, icon: i }) => {
|
13993
14010
|
const [a, o] = g.useState(!1);
|
13994
|
-
return /* @__PURE__ */ l(
|
14011
|
+
return /* @__PURE__ */ l(q, { children: [
|
13995
14012
|
/* @__PURE__ */ t(Y, { sx: (r) => ({ backgroundColor: r.palette.background.paper }), children: /* @__PURE__ */ l(he, { onClick: () => o(!a), children: [
|
13996
14013
|
i && /* @__PURE__ */ t(yt, { children: /* @__PURE__ */ t(P, { name: i, size: 24, sx: { mr: 12 } }) }),
|
13997
14014
|
/* @__PURE__ */ t(
|
@@ -14017,15 +14034,15 @@ const o1 = ({
|
|
14017
14034
|
s < e.length - 1 ? /* @__PURE__ */ t(k, { variant: "inset" }) : /* @__PURE__ */ t(k, {})
|
14018
14035
|
] }, r.accountName)) })
|
14019
14036
|
] });
|
14020
|
-
}, ns = ({ groupedAccounts: e }) => /* @__PURE__ */ t(
|
14037
|
+
}, ns = ({ groupedAccounts: e }) => /* @__PURE__ */ t(q, { children: e.map(({ accounts: n, icon: i, name: a }) => /* @__PURE__ */ t(m1, { accounts: n, icon: i, name: a }, a)) }), p1 = ({
|
14021
14038
|
netWorth: e,
|
14022
14039
|
assets: n,
|
14023
14040
|
liabilities: i,
|
14024
14041
|
totalAssets: a,
|
14025
14042
|
totalLiabilities: o
|
14026
14043
|
}) => {
|
14027
|
-
const { net_worth: r } =
|
14028
|
-
return /* @__PURE__ */ l(
|
14044
|
+
const { net_worth: r } = x(), s = me();
|
14045
|
+
return /* @__PURE__ */ l(q, { children: [
|
14029
14046
|
/* @__PURE__ */ l(
|
14030
14047
|
L,
|
14031
14048
|
{
|
@@ -14082,8 +14099,8 @@ const o1 = ({
|
|
14082
14099
|
totalGains: a,
|
14083
14100
|
totalLosses: o
|
14084
14101
|
}) => {
|
14085
|
-
const { net_worth: r } =
|
14086
|
-
return /* @__PURE__ */ l(
|
14102
|
+
const { net_worth: r } = x(), s = me();
|
14103
|
+
return /* @__PURE__ */ l(q, { children: [
|
14087
14104
|
/* @__PURE__ */ l(y, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
|
14088
14105
|
/* @__PURE__ */ t(p, { variant: "Small", children: qs(e?.x) }),
|
14089
14106
|
/* @__PURE__ */ t(p, { variant: "Body", children: r.total_change }),
|
@@ -14128,7 +14145,7 @@ const o1 = ({
|
|
14128
14145
|
] })
|
14129
14146
|
}
|
14130
14147
|
) }),
|
14131
|
-
i?.map((c) => /* @__PURE__ */ l(
|
14148
|
+
i?.map((c) => /* @__PURE__ */ l(q, { children: [
|
14132
14149
|
/* @__PURE__ */ t(
|
14133
14150
|
Y,
|
14134
14151
|
{
|
@@ -14151,7 +14168,7 @@ const o1 = ({
|
|
14151
14168
|
] })
|
14152
14169
|
] });
|
14153
14170
|
}, b1 = A(f1), u4 = A(({ onBackClick: e }) => {
|
14154
|
-
const { isCopyLoaded: n, isInitialized: i, selectedAccounts: a, setSelectedAccounts: o } = ue(), { accounts: r, net_worth: s } =
|
14171
|
+
const { isCopyLoaded: n, isInitialized: i, selectedAccounts: a, setSelectedAccounts: o } = ue(), { accounts: r, net_worth: s } = x(), { visibleAccounts: c } = ve(), {
|
14155
14172
|
assetsLiabilities: d,
|
14156
14173
|
gainsLosses: _,
|
14157
14174
|
hoveredData: u,
|
@@ -14161,8 +14178,8 @@ const o1 = ({
|
|
14161
14178
|
selectedData: f,
|
14162
14179
|
setHoveredData: b,
|
14163
14180
|
setSelectedData: E
|
14164
|
-
} = Ku(), { isMobile: S } = ye(), { onEvent: v } = K(), [N,
|
14165
|
-
await m(a), await h(R),
|
14181
|
+
} = Ku(), { isMobile: S } = ye(), { onEvent: v } = K(), [N, I] = g.useState(!1), [R, D] = g.useState(6), [H, O] = g.useState(!1), [M, j] = g.useState(!1), [U, W] = g.useState(!1), Ee = async () => {
|
14182
|
+
await m(a), await h(R), I(!0);
|
14166
14183
|
};
|
14167
14184
|
g.useEffect(() => {
|
14168
14185
|
v($.NET_WORTH_VIEW);
|
@@ -14180,7 +14197,7 @@ const o1 = ({
|
|
14180
14197
|
}, Z = () => {
|
14181
14198
|
b(null);
|
14182
14199
|
}, Q = () => {
|
14183
|
-
v($.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES),
|
14200
|
+
v($.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), j(!0);
|
14184
14201
|
}, Le = async (Ze) => {
|
14185
14202
|
const Re = Ze[0], ot = Ze[1];
|
14186
14203
|
Re && ot && D(xd(ot, Re));
|
@@ -14220,8 +14237,8 @@ const o1 = ({
|
|
14220
14237
|
}
|
14221
14238
|
},
|
14222
14239
|
title: s.net_worth,
|
14223
|
-
children: N ? /* @__PURE__ */ l(
|
14224
|
-
C.length ? /* @__PURE__ */ l(
|
14240
|
+
children: N ? /* @__PURE__ */ l(q, { children: [
|
14241
|
+
C.length ? /* @__PURE__ */ l(q, { children: [
|
14225
14242
|
f && /* @__PURE__ */ t(h1, { hoveredData: u, selectedData: f }),
|
14226
14243
|
/* @__PURE__ */ l(
|
14227
14244
|
y,
|
@@ -14276,7 +14293,7 @@ const o1 = ({
|
|
14276
14293
|
{
|
14277
14294
|
ariaLabelClose: "Close",
|
14278
14295
|
isOpen: M,
|
14279
|
-
onClose: () =>
|
14296
|
+
onClose: () => j(!1),
|
14280
14297
|
shouldShowHeaderBorders: !1,
|
14281
14298
|
shouldShowHeaderShadow: !0,
|
14282
14299
|
title: s.assets_and_liabilities,
|
@@ -14345,7 +14362,7 @@ const S1 = (e, n) => {
|
|
14345
14362
|
const i = Ni(n[e].delivered_at), a = Ni(n[e - 1]?.delivered_at);
|
14346
14363
|
return !vd(i, a);
|
14347
14364
|
}, T1 = ({ date: e }) => /* @__PURE__ */ t(L, { sx: { display: "flex", justifyContent: "center", mt: 12, py: 8 }, children: /* @__PURE__ */ t(p, { bold: !0, variant: "Small", children: Wi(e) }) }), A1 = ({ notification: e }) => {
|
14348
|
-
const { accounts: n } = ve(), { budgets: i } = ht(), { accounts: a } =
|
14365
|
+
const { accounts: n } = ve(), { budgets: i } = ht(), { accounts: a } = x(), o = n.find((d) => d.guid === e.entity_guid), r = i.find((d) => d.guid === e.entity_guid), s = e.entity_guid.includes("GOL"), c = {
|
14349
14366
|
badge: {
|
14350
14367
|
display: "flex",
|
14351
14368
|
alignItems: "center",
|
@@ -14398,7 +14415,7 @@ const S1 = (e, n) => {
|
|
14398
14415
|
] });
|
14399
14416
|
}, v1 = A(
|
14400
14417
|
({ onManageNotifications: e }) => {
|
14401
|
-
const { notifications: n } =
|
14418
|
+
const { notifications: n } = x();
|
14402
14419
|
return /* @__PURE__ */ l(y, { sx: { alignItems: "center", height: "95%", justifyContent: "center" }, children: [
|
14403
14420
|
/* @__PURE__ */ t(pt, { name: "notifications", size: 32 }),
|
14404
14421
|
/* @__PURE__ */ t(p, { sx: { pt: 32 }, variant: "H3", children: n.notification_empty_state.no_new_notifications }),
|
@@ -14420,12 +14437,12 @@ const S1 = (e, n) => {
|
|
14420
14437
|
] });
|
14421
14438
|
}
|
14422
14439
|
), w1 = ({ onClick: e, onManageNotifications: n }) => {
|
14423
|
-
const { isLoading: i, loadNotifications: a, recentNotifications: o, markAllAsViewed: r } = oc(), { notifications: s } =
|
14440
|
+
const { isLoading: i, loadNotifications: a, recentNotifications: o, markAllAsViewed: r } = oc(), { notifications: s } = x(), { isCopyLoaded: c } = ue(), d = (_) => {
|
14424
14441
|
e?.(_);
|
14425
14442
|
};
|
14426
14443
|
return Yn(() => (a().finally(), () => {
|
14427
14444
|
r().finally();
|
14428
|
-
}), []), /* @__PURE__ */ l(
|
14445
|
+
}), []), /* @__PURE__ */ l(q, { children: [
|
14429
14446
|
(!c || i) && /* @__PURE__ */ t(ge, { label: s?.loading, size: 40 }),
|
14430
14447
|
c && !i && o.length === 0 && /* @__PURE__ */ t(v1, { onManageNotifications: n }),
|
14431
14448
|
/* @__PURE__ */ t(ie, { sx: { p: 16 }, children: c && !i && o.slice().sort((_, u) => u.delivered_at - _.delivered_at).map((_, u) => {
|
@@ -14699,7 +14716,7 @@ const k1 = ({
|
|
14699
14716
|
title: o,
|
14700
14717
|
topicTitle: r
|
14701
14718
|
}) => {
|
14702
|
-
const { help: s } =
|
14719
|
+
const { help: s } = x();
|
14703
14720
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
14704
14721
|
/* @__PURE__ */ l(tt, { container: !0, sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
14705
14722
|
/* @__PURE__ */ l(tt, { item: !0, sm: 6, xs: 12, children: [
|
@@ -14826,7 +14843,7 @@ const k1 = ({
|
|
14826
14843
|
content: e,
|
14827
14844
|
hasDivider: n = !0,
|
14828
14845
|
sx: i
|
14829
|
-
}) => /* @__PURE__ */ l(
|
14846
|
+
}) => /* @__PURE__ */ l(q, { children: [
|
14830
14847
|
/* @__PURE__ */ t(L, { sx: { pb: 48, ...i }, children: e }),
|
14831
14848
|
n && /* @__PURE__ */ t(k, {})
|
14832
14849
|
] }), ln = ({
|
@@ -17086,7 +17103,7 @@ const k1 = ({
|
|
17086
17103
|
onRequestSupport: a,
|
17087
17104
|
topicInfo: { category: o, pageTitle: r, topicKey: s, guid: c }
|
17088
17105
|
}) => {
|
17089
|
-
const { help: d } =
|
17106
|
+
const { help: d } = x(), _ = Z1[c] || null;
|
17090
17107
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
17091
17108
|
/* @__PURE__ */ t(
|
17092
17109
|
k1,
|
@@ -17142,9 +17159,9 @@ const k1 = ({
|
|
17142
17159
|
{
|
17143
17160
|
disableGutters: !0,
|
17144
17161
|
expanded: N === c,
|
17145
|
-
onChange: (
|
17146
|
-
sx: (
|
17147
|
-
border: `1px solid ${
|
17162
|
+
onChange: (I, R) => d(R ? N : null),
|
17163
|
+
sx: (I) => ({
|
17164
|
+
border: `1px solid ${I.palette.border?.light}`,
|
17148
17165
|
borderRadius: "8px !important",
|
17149
17166
|
"&:before": {
|
17150
17167
|
opacity: 0
|
@@ -17175,12 +17192,12 @@ const k1 = ({
|
|
17175
17192
|
ml: 56,
|
17176
17193
|
p: 0
|
17177
17194
|
},
|
17178
|
-
children: /* @__PURE__ */ t(ie, { disablePadding: !0, children: E.map(({ label:
|
17195
|
+
children: /* @__PURE__ */ t(ie, { disablePadding: !0, children: E.map(({ label: I, topicKey: R }) => /* @__PURE__ */ t(
|
17179
17196
|
he,
|
17180
17197
|
{
|
17181
|
-
"aria-label":
|
17198
|
+
"aria-label": I,
|
17182
17199
|
divider: !0,
|
17183
|
-
onClick: () => s({ guid: f, category: S, pageTitle:
|
17200
|
+
onClick: () => s({ guid: f, category: S, pageTitle: I, topicKey: R }),
|
17184
17201
|
sx: {
|
17185
17202
|
pl: "6px !important",
|
17186
17203
|
borderColor: "border.light",
|
@@ -17189,7 +17206,7 @@ const k1 = ({
|
|
17189
17206
|
borderBottomRightRadius: 7
|
17190
17207
|
}
|
17191
17208
|
},
|
17192
|
-
children: /* @__PURE__ */ t(p, { color: "secondary", variant: "Small", children:
|
17209
|
+
children: /* @__PURE__ */ t(p, { color: "secondary", variant: "Small", children: I })
|
17193
17210
|
},
|
17194
17211
|
R
|
17195
17212
|
)) })
|
@@ -17509,8 +17526,8 @@ const k1 = ({
|
|
17509
17526
|
const b = {};
|
17510
17527
|
let E = !0;
|
17511
17528
|
h.forEach(({ label: S, name: v, required: N }) => {
|
17512
|
-
const
|
17513
|
-
N && !
|
17529
|
+
const I = _[v];
|
17530
|
+
N && !I && (b[v] = `${S} ${e.request_support_required_message}`, E = !1), (v === "institutionWebsite" || v === "institutionLoginPage") && I && !/(.+)\.(.{2,})/g.test(I) && (b[v] = e.request_support_valid_url_message, E = !1);
|
17514
17531
|
}), d(b), E && (a(_), u(qa));
|
17515
17532
|
},
|
17516
17533
|
secondaryColor: "primary",
|
@@ -17657,7 +17674,7 @@ const k1 = ({
|
|
17657
17674
|
popularTopicsDrawerOnClose: o,
|
17658
17675
|
title: r
|
17659
17676
|
}) => {
|
17660
|
-
const { common: s } =
|
17677
|
+
const { common: s } = x();
|
17661
17678
|
return /* @__PURE__ */ l(oe, { isOpen: i, onClose: a, title: e.request_support, children: [
|
17662
17679
|
/* @__PURE__ */ t(
|
17663
17680
|
zi,
|
@@ -17718,7 +17735,7 @@ const k1 = ({
|
|
17718
17735
|
onBack: a,
|
17719
17736
|
onClose: o
|
17720
17737
|
}) => {
|
17721
|
-
const { common: r } =
|
17738
|
+
const { common: r } = x();
|
17722
17739
|
return /* @__PURE__ */ t(oe, { isOpen: i, onClose: o, title: e.request_support, children: /* @__PURE__ */ l(L, { sx: { px: 24 }, children: [
|
17723
17740
|
/* @__PURE__ */ t(y, { sx: { alignItems: "center", pb: 24, pt: 80 }, children: /* @__PURE__ */ t(P, { color: "success", fill: !0, name: "check_circle", size: 64 }) }),
|
17724
17741
|
/* @__PURE__ */ l(y, { sx: { alignItems: "center", gap: 16, pb: 48 }, children: [
|
@@ -17738,16 +17755,16 @@ const k1 = ({
|
|
17738
17755
|
}), S = eC.map((O) => ({
|
17739
17756
|
...O,
|
17740
17757
|
title: e.help_by_category_list[O.guid].label,
|
17741
|
-
topics: O.topics.map(({ type: M },
|
17758
|
+
topics: O.topics.map(({ type: M }, j) => ({
|
17742
17759
|
type: M,
|
17743
|
-
label: e.help_by_category_list[O.guid].topics[
|
17760
|
+
label: e.help_by_category_list[O.guid].topics[j]
|
17744
17761
|
}))
|
17745
17762
|
})), v = Object.keys(e.popular_topics_list).map((O, M) => ({
|
17746
17763
|
name: e.popular_topics_list[O],
|
17747
17764
|
type: tC[M].type
|
17748
17765
|
})), N = () => {
|
17749
17766
|
u(""), E({ isOpen: !1, topic: "", type: void 0 });
|
17750
|
-
},
|
17767
|
+
}, I = (O) => {
|
17751
17768
|
c.email && o({
|
17752
17769
|
email: c.email,
|
17753
17770
|
message: _ ? `Institution: ${_}, ${O}` : O,
|
@@ -17834,7 +17851,7 @@ const k1 = ({
|
|
17834
17851
|
onClose: () => {
|
17835
17852
|
m(!1), u("");
|
17836
17853
|
},
|
17837
|
-
onSubmit:
|
17854
|
+
onSubmit: I,
|
17838
17855
|
setAlert: s,
|
17839
17856
|
topic: b.topic || e.contact_support
|
17840
17857
|
}
|
@@ -17886,7 +17903,7 @@ const k1 = ({
|
|
17886
17903
|
] }) });
|
17887
17904
|
}
|
17888
17905
|
), gC = ({ sx: e }) => {
|
17889
|
-
const [n, i] = g.useState(!1), [a, o] = g.useState(null), { help: r } =
|
17906
|
+
const [n, i] = g.useState(!1), [a, o] = g.useState(null), { help: r } = x(), { isCopyLoaded: s, isInitialized: c } = ue(), { helpCategories: d } = No(), { isMobile: _ } = ye(), u = window.app?.config, h = () => i(!0), m = (C) => o(C);
|
17890
17907
|
return !s || !c ? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ l(L, { sx: { pt: 24, px: _ ? 24 : 0, ...e }, children: [
|
17891
17908
|
a ? /* @__PURE__ */ t(
|
17892
17909
|
Q1,
|
@@ -17919,7 +17936,7 @@ const k1 = ({
|
|
17919
17936
|
)
|
17920
17937
|
] });
|
17921
17938
|
}, mC = A(gC), pC = A(() => {
|
17922
|
-
const { common: e, settings: n } =
|
17939
|
+
const { common: e, settings: n } = x(), { sendEmailVerification: i } = Ft(), { user: a } = an(), o = me(), [r, s] = g.useState(!1), c = () => {
|
17923
17940
|
s(!1);
|
17924
17941
|
}, d = () => {
|
17925
17942
|
s(!0);
|
@@ -17969,7 +17986,7 @@ const k1 = ({
|
|
17969
17986
|
] });
|
17970
17987
|
}), CC = A(
|
17971
17988
|
({ handleClose: e, handleVerify: n, isOpen: i }) => {
|
17972
|
-
const { common: a, settings: o } =
|
17989
|
+
const { common: a, settings: o } = x(), [r, s] = g.useState("");
|
17973
17990
|
return /* @__PURE__ */ t(
|
17974
17991
|
Be,
|
17975
17992
|
{
|
@@ -17993,7 +18010,7 @@ const k1 = ({
|
|
17993
18010
|
);
|
17994
18011
|
}
|
17995
18012
|
), fC = A(() => {
|
17996
|
-
const { common: e, settings: n } =
|
18013
|
+
const { common: e, settings: n } = x(), { sendPhoneVerification: i, verifyPhoneToken: a } = Ft(), { user: o } = an(), r = me(), [s, c] = g.useState(!1), [d, _] = g.useState(!1), u = () => {
|
17997
18014
|
c(!1);
|
17998
18015
|
}, h = () => {
|
17999
18016
|
c(!0);
|
@@ -18057,110 +18074,110 @@ const k1 = ({
|
|
18057
18074
|
}
|
18058
18075
|
)
|
18059
18076
|
] });
|
18060
|
-
}), bC = () => {
|
18061
|
-
const
|
18077
|
+
}), bC = ({ availableWidth: e }) => {
|
18078
|
+
const n = it(), { common: i, settings: a } = x(), o = ye(e), { config: r } = Vi(), { updateUser: s } = Ft(), { user: c } = an(), [d, _] = g.useState(c.first_name), [u, h] = g.useState(c.last_name), [m, C] = g.useState(c.email), [f, b] = g.useState(c.phone), [E, S] = g.useState(c.postal_code), [v, N] = g.useState(c.credit_score), [I, R] = g.useState(null), D = m && !c.email_is_verified, H = f && !c.phone_is_verified;
|
18062
18079
|
g.useEffect(() => {
|
18063
|
-
if (
|
18064
|
-
const W = new Date(
|
18065
|
-
|
18080
|
+
if (c.birthday) {
|
18081
|
+
const W = new Date(c.birthday * 1e3), Ee = W.getUTCFullYear(), J = W.getUTCMonth(), pe = W.getUTCDate();
|
18082
|
+
R(new Date(Ee, J, pe));
|
18066
18083
|
}
|
18067
|
-
}, [
|
18068
|
-
const
|
18084
|
+
}, [c]);
|
18085
|
+
const O = async () => {
|
18069
18086
|
const W = {
|
18070
|
-
...
|
18071
|
-
first_name:
|
18072
|
-
last_name:
|
18073
|
-
email:
|
18074
|
-
phone:
|
18075
|
-
birthday:
|
18076
|
-
postal_code:
|
18077
|
-
credit_score:
|
18087
|
+
...c,
|
18088
|
+
first_name: d,
|
18089
|
+
last_name: u,
|
18090
|
+
email: m,
|
18091
|
+
phone: f,
|
18092
|
+
birthday: I ? Me(I) : null,
|
18093
|
+
postal_code: E,
|
18094
|
+
credit_score: v
|
18078
18095
|
};
|
18079
|
-
await
|
18080
|
-
}, U =
|
18096
|
+
await s(W);
|
18097
|
+
}, M = o.isSmallMobile || o.isMobile, j = o.isTablet || o.isSmallTablet, U = o.isDesktop || o.isLargeDesktop;
|
18081
18098
|
return /* @__PURE__ */ l(
|
18082
18099
|
L,
|
18083
18100
|
{
|
18084
18101
|
component: "form",
|
18085
18102
|
sx: {
|
18086
18103
|
backgroundColor: "background.paper",
|
18087
|
-
padding:
|
18088
|
-
width:
|
18104
|
+
padding: M ? "24px 24px 48px 24px" : "24px 0px 48px 0px",
|
18105
|
+
width: M ? 320 : j ? 680 : U ? 990 : 400,
|
18089
18106
|
"& .MuiTextField-root": {
|
18090
|
-
width:
|
18107
|
+
width: M ? 272 : j ? 328 : U ? 483 : 352
|
18091
18108
|
}
|
18092
18109
|
},
|
18093
18110
|
children: [
|
18094
|
-
/* @__PURE__ */ t(ft, { children:
|
18095
|
-
/* @__PURE__ */ t(Oe, { variant: "Body", children:
|
18111
|
+
/* @__PURE__ */ t(ft, { children: a.personal_details }),
|
18112
|
+
/* @__PURE__ */ t(Oe, { variant: "Body", children: a.update_information }),
|
18096
18113
|
/* @__PURE__ */ l(
|
18097
18114
|
y,
|
18098
18115
|
{
|
18099
|
-
direction:
|
18100
|
-
spacing:
|
18116
|
+
direction: M ? "column" : "row",
|
18117
|
+
spacing: M ? 44 : 24,
|
18101
18118
|
sx: { mb: 44, pt: 32 },
|
18102
18119
|
children: [
|
18103
18120
|
/* @__PURE__ */ t(
|
18104
18121
|
rt,
|
18105
18122
|
{
|
18106
|
-
defaultValue:
|
18107
|
-
label:
|
18108
|
-
onChange: (W) =>
|
18123
|
+
defaultValue: d,
|
18124
|
+
label: a.first_name,
|
18125
|
+
onChange: (W) => _(W.target.value)
|
18109
18126
|
}
|
18110
18127
|
),
|
18111
18128
|
/* @__PURE__ */ t(
|
18112
18129
|
rt,
|
18113
18130
|
{
|
18114
|
-
defaultValue:
|
18115
|
-
label:
|
18116
|
-
onChange: (W) =>
|
18131
|
+
defaultValue: u,
|
18132
|
+
label: a.last_name,
|
18133
|
+
onChange: (W) => h(W.target.value)
|
18117
18134
|
}
|
18118
18135
|
)
|
18119
18136
|
]
|
18120
18137
|
}
|
18121
18138
|
),
|
18122
|
-
/* @__PURE__ */ l(y, { direction:
|
18123
|
-
|
18139
|
+
/* @__PURE__ */ l(y, { direction: M ? "column" : "row", children: [
|
18140
|
+
r.display_email_edit_field_in_settings && /* @__PURE__ */ l(y, { sx: { mb: D ? 20 : 44, mr: M ? 0 : 24 }, children: [
|
18124
18141
|
/* @__PURE__ */ t(
|
18125
18142
|
rt,
|
18126
18143
|
{
|
18127
|
-
defaultValue:
|
18128
|
-
label:
|
18129
|
-
onChange: (W) =>
|
18144
|
+
defaultValue: m,
|
18145
|
+
label: a.email_address,
|
18146
|
+
onChange: (W) => C(W.target.value)
|
18130
18147
|
}
|
18131
18148
|
),
|
18132
|
-
|
18149
|
+
D && /* @__PURE__ */ t(pC, {})
|
18133
18150
|
] }),
|
18134
|
-
|
18151
|
+
r.display_sms_edit_field_in_settings && /* @__PURE__ */ l(y, { sx: { mb: H ? 20 : 44 }, children: [
|
18135
18152
|
/* @__PURE__ */ t(
|
18136
18153
|
rt,
|
18137
18154
|
{
|
18138
|
-
defaultValue:
|
18139
|
-
label:
|
18140
|
-
onChange: (W) =>
|
18155
|
+
defaultValue: f,
|
18156
|
+
label: a.mobile_number,
|
18157
|
+
onChange: (W) => b(W.target.value),
|
18141
18158
|
type: "tel"
|
18142
18159
|
}
|
18143
18160
|
),
|
18144
|
-
|
18161
|
+
H && /* @__PURE__ */ t(fC, {})
|
18145
18162
|
] })
|
18146
18163
|
] }),
|
18147
|
-
/* @__PURE__ */ l(y, { direction:
|
18164
|
+
/* @__PURE__ */ l(y, { direction: M ? "column" : "row", spacing: M ? 44 : 24, sx: { mb: 44 }, children: [
|
18148
18165
|
/* @__PURE__ */ t(Dn, { dateAdapter: mn, children: /* @__PURE__ */ t(
|
18149
18166
|
Ea,
|
18150
18167
|
{
|
18151
|
-
label:
|
18152
|
-
onChange:
|
18168
|
+
label: a.birthdate,
|
18169
|
+
onChange: R,
|
18153
18170
|
slotProps: {
|
18154
18171
|
nextIconButton: {
|
18155
18172
|
sx: {
|
18156
18173
|
color: "primary.main",
|
18157
|
-
"&:hover": { backgroundColor: In(
|
18174
|
+
"&:hover": { backgroundColor: In(n.palette.primary.light, 0.1) }
|
18158
18175
|
}
|
18159
18176
|
},
|
18160
18177
|
previousIconButton: {
|
18161
18178
|
sx: {
|
18162
18179
|
color: "primary.main",
|
18163
|
-
"&:hover": { backgroundColor: In(
|
18180
|
+
"&:hover": { backgroundColor: In(n.palette.primary.light, 0.1) }
|
18164
18181
|
}
|
18165
18182
|
}
|
18166
18183
|
},
|
@@ -18168,18 +18185,18 @@ const k1 = ({
|
|
18168
18185
|
width: "100%",
|
18169
18186
|
"& .MuiIconButton-edgeEnd": {
|
18170
18187
|
color: "primary.main",
|
18171
|
-
"&:hover": { backgroundColor: In(
|
18188
|
+
"&:hover": { backgroundColor: In(n.palette.primary.light, 0.1) }
|
18172
18189
|
}
|
18173
18190
|
},
|
18174
|
-
value:
|
18191
|
+
value: I
|
18175
18192
|
}
|
18176
18193
|
) }),
|
18177
18194
|
/* @__PURE__ */ t(
|
18178
18195
|
rt,
|
18179
18196
|
{
|
18180
|
-
defaultValue:
|
18181
|
-
label:
|
18182
|
-
onChange: (W) =>
|
18197
|
+
defaultValue: E,
|
18198
|
+
label: a.zip_code,
|
18199
|
+
onChange: (W) => S(W.target.value)
|
18183
18200
|
}
|
18184
18201
|
)
|
18185
18202
|
] }),
|
@@ -18187,13 +18204,13 @@ const k1 = ({
|
|
18187
18204
|
/* @__PURE__ */ t(
|
18188
18205
|
rt,
|
18189
18206
|
{
|
18190
|
-
defaultValue:
|
18191
|
-
label:
|
18192
|
-
onChange: (W) =>
|
18207
|
+
defaultValue: v,
|
18208
|
+
label: a.credit_score,
|
18209
|
+
onChange: (W) => N(Number(W.target.value)),
|
18193
18210
|
sx: { mb: 44 }
|
18194
18211
|
}
|
18195
18212
|
),
|
18196
|
-
/* @__PURE__ */ t(te, { onClick:
|
18213
|
+
/* @__PURE__ */ t(te, { onClick: O, sx: { width: M ? 272 : 124 }, variant: "contained", children: i.save_button })
|
18197
18214
|
] })
|
18198
18215
|
]
|
18199
18216
|
}
|
@@ -18205,7 +18222,7 @@ const EC = ({
|
|
18205
18222
|
onClickDeviceEdit: n,
|
18206
18223
|
onClickDeviceDelete: i
|
18207
18224
|
}) => {
|
18208
|
-
const a = me(), { settings: o } =
|
18225
|
+
const a = me(), { settings: o } = x(), r = [
|
18209
18226
|
{
|
18210
18227
|
field: "name",
|
18211
18228
|
headerName: o.mobile_devices_column_name,
|
@@ -18320,7 +18337,7 @@ const EC = ({
|
|
18320
18337
|
onClickDeviceEdit: n,
|
18321
18338
|
onClickDeviceDelete: i
|
18322
18339
|
}) => {
|
18323
|
-
const a = me(), { settings: o } =
|
18340
|
+
const a = me(), { settings: o } = x(), [r, s] = g.useState(!1), c = (d) => (_, u) => {
|
18324
18341
|
s(u ? d : !1);
|
18325
18342
|
};
|
18326
18343
|
return /* @__PURE__ */ l(y, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
|
@@ -18421,7 +18438,7 @@ const EC = ({
|
|
18421
18438
|
device: a,
|
18422
18439
|
deviceToken: o = ""
|
18423
18440
|
}) => {
|
18424
|
-
const r = me(), { common: s, settings: c } =
|
18441
|
+
const r = me(), { common: s, settings: c } = x(), { updateDevice: d, deleteDevice: _, setAlert: u, loadDevices: h } = Ft(), [m, C] = g.useState("");
|
18425
18442
|
g.useEffect(() => {
|
18426
18443
|
a && C(a.name);
|
18427
18444
|
}, [a, e]);
|
@@ -18529,7 +18546,7 @@ const EC = ({
|
|
18529
18546
|
}
|
18530
18547
|
);
|
18531
18548
|
}, AC = A(TC), IC = A(() => {
|
18532
|
-
const { isMobile: e } = ye(), { settings: n } =
|
18549
|
+
const { isMobile: e } = ye(), { settings: n } = x(), { isCopyLoaded: i, isInitialized: a } = ue(), { setAlert: o, devices: r, loadDevices: s, generateDeviceToken: c } = Ft(), [d, _] = g.useState({ open: !1, type: "" }), [u, h] = g.useState(), [m, C] = g.useState("");
|
18533
18550
|
g.useEffect(() => {
|
18534
18551
|
a && s();
|
18535
18552
|
}, [a]);
|
@@ -18598,7 +18615,7 @@ const EC = ({
|
|
18598
18615
|
] }) });
|
18599
18616
|
}
|
18600
18617
|
), xC = A(() => {
|
18601
|
-
const { settings: e } =
|
18618
|
+
const { settings: e } = x(), { categories: n } = ze(), { selectedRule: i, updateRuleCategory: a } = Ft(), [o, r] = g.useState(!1), s = () => {
|
18602
18619
|
r(!1);
|
18603
18620
|
}, c = () => {
|
18604
18621
|
r(!0);
|
@@ -18626,7 +18643,7 @@ const EC = ({
|
|
18626
18643
|
)
|
18627
18644
|
] });
|
18628
18645
|
}), vC = A(() => {
|
18629
|
-
const { common: e, settings: n } =
|
18646
|
+
const { common: e, settings: n } = x(), { selectedRule: i, updateRulePayee: a } = Ft(), o = me(), [r, s] = g.useState(!1), c = i?.description ? i.description : i?.match_description, [d, _] = g.useState(c || ""), u = () => {
|
18630
18647
|
s(!0);
|
18631
18648
|
}, h = async () => {
|
18632
18649
|
d !== c && i && (i.description = d, await a(i), s(!1));
|
@@ -18666,7 +18683,7 @@ const EC = ({
|
|
18666
18683
|
)
|
18667
18684
|
] });
|
18668
18685
|
}), wC = A(({ onClose: e, onDelete: n, isOpen: i }) => {
|
18669
|
-
const { common: a, settings: o } =
|
18686
|
+
const { common: a, settings: o } = x(), r = me();
|
18670
18687
|
return /* @__PURE__ */ t(
|
18671
18688
|
Be,
|
18672
18689
|
{
|
@@ -18691,7 +18708,7 @@ const EC = ({
|
|
18691
18708
|
);
|
18692
18709
|
}), NC = A(
|
18693
18710
|
({ isOpen: e, onClose: n, onDelete: i }) => {
|
18694
|
-
const { common: a, settings: o } =
|
18711
|
+
const { common: a, settings: o } = x(), r = me(), [s, c] = g.useState(!1);
|
18695
18712
|
return /* @__PURE__ */ l(
|
18696
18713
|
oe,
|
18697
18714
|
{
|
@@ -18747,7 +18764,7 @@ const EC = ({
|
|
18747
18764
|
/* @__PURE__ */ t(NC, { isOpen: c, onClose: _, onDelete: u })
|
18748
18765
|
] });
|
18749
18766
|
}), RC = A(() => {
|
18750
|
-
const { settings: e } =
|
18767
|
+
const { settings: e } = x(), { loadTransactionRules: n, transactionRules: i } = Ft(), { isDesktop: a, isTablet: o } = ye();
|
18751
18768
|
return g.useEffect(() => {
|
18752
18769
|
n();
|
18753
18770
|
}, []), /* @__PURE__ */ l(y, { spacing: 24, sx: { pb: 48, pt: 24 }, children: [
|
@@ -18758,7 +18775,7 @@ const EC = ({
|
|
18758
18775
|
/* @__PURE__ */ t(ie, { children: i.map((r, s) => /* @__PURE__ */ t(DC, { rule: r }, s)) })
|
18759
18776
|
] });
|
18760
18777
|
}), OC = A(({ posthog: e }) => {
|
18761
|
-
const { settings: n } =
|
18778
|
+
const { settings: n } = x(), { clientCommunicationProfile: i, updateUserCommunicationsProfile: a, userCommunicationsProfile: o } = Ft(), { user: r } = an(), s = async (c, d) => {
|
18762
18779
|
const _ = {
|
18763
18780
|
...o,
|
18764
18781
|
[c]: d
|
@@ -18771,7 +18788,7 @@ const EC = ({
|
|
18771
18788
|
};
|
18772
18789
|
return /* @__PURE__ */ l(y, { children: [
|
18773
18790
|
/* @__PURE__ */ t(ft, { sx: { mt: 24 }, children: n.delivery_method_title }),
|
18774
|
-
i.email_notifications_enabled && /* @__PURE__ */ l(
|
18791
|
+
i.email_notifications_enabled && /* @__PURE__ */ l(q, { children: [
|
18775
18792
|
/* @__PURE__ */ t(
|
18776
18793
|
ii,
|
18777
18794
|
{
|
@@ -18786,7 +18803,7 @@ const EC = ({
|
|
18786
18803
|
),
|
18787
18804
|
/* @__PURE__ */ t(k, {})
|
18788
18805
|
] }),
|
18789
|
-
i.sms_notifications_enabled && /* @__PURE__ */ l(
|
18806
|
+
i.sms_notifications_enabled && /* @__PURE__ */ l(q, { children: [
|
18790
18807
|
/* @__PURE__ */ t(
|
18791
18808
|
ii,
|
18792
18809
|
{
|
@@ -18820,7 +18837,7 @@ const EC = ({
|
|
18820
18837
|
] });
|
18821
18838
|
}), LC = A(
|
18822
18839
|
({ onProfileUpdated: e, profile: n }) => {
|
18823
|
-
const { common: i, settings: a } =
|
18840
|
+
const { common: i, settings: a } = x(), { updateAccount: o } = ve(), r = n.notification_type === We.DebtPaymentReminder, [s, c] = g.useState(!1), [d, _] = g.useState(n.threshold || 0), [u, h] = g.useState(
|
18824
18841
|
n.account?.day_payment_is_due || 0
|
18825
18842
|
), m = n.account?.name || n.account?.feed_name || "", C = n.account?.day_payment_is_due ? T(
|
18826
18843
|
a.notification_debt_payment_date,
|
@@ -18889,7 +18906,7 @@ const EC = ({
|
|
18889
18906
|
}
|
18890
18907
|
), MC = A(
|
18891
18908
|
({ onUpdateProfile: e, profile: n }) => {
|
18892
|
-
const { settings: i } =
|
18909
|
+
const { settings: i } = x(), { user: a } = an(), { clientCommunicationProfile: o, userCommunicationsProfile: r } = Ft(), s = n.notification_type > 2, {
|
18893
18910
|
opted_out_of_email_notifications: c,
|
18894
18911
|
opted_out_of_push_notifications: d,
|
18895
18912
|
opted_out_of_sms_notifications: _
|
@@ -18899,7 +18916,7 @@ const EC = ({
|
|
18899
18916
|
sms_notifications_enabled: m
|
18900
18917
|
} = o;
|
18901
18918
|
return /* @__PURE__ */ l(y, { children: [
|
18902
|
-
(u || m || h) && /* @__PURE__ */ l(
|
18919
|
+
(u || m || h) && /* @__PURE__ */ l(q, { children: [
|
18903
18920
|
/* @__PURE__ */ t(p, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: i.delivery_method_title }),
|
18904
18921
|
/* @__PURE__ */ l(ie, { sx: { px: 24, bgcolor: "background.paper" }, children: [
|
18905
18922
|
u && /* @__PURE__ */ t(
|
@@ -18953,7 +18970,7 @@ const EC = ({
|
|
18953
18970
|
var Zc = /* @__PURE__ */ ((e) => (e.Accounts = "accounts", e.Budgets = "budgets", e.Insights = "insights", e.Delivery = "delivery", e))(Zc || {});
|
18954
18971
|
const Qc = A(
|
18955
18972
|
({ notificationTypes: e = Object.values(Zc), posthog: n }) => {
|
18956
|
-
const { common: i, settings: a } =
|
18973
|
+
const { common: i, settings: a } = x(), { isMobile: o } = ye(), {
|
18957
18974
|
accountProfiles: r,
|
18958
18975
|
budgetProfiles: s,
|
18959
18976
|
clientCommunicationProfile: c,
|
@@ -18985,14 +19002,14 @@ const Qc = A(
|
|
18985
19002
|
e.includes(
|
18986
19003
|
"delivery"
|
18987
19004
|
/* Delivery */
|
18988
|
-
) && (c.email_notifications_enabled || c.sms_notifications_enabled || c.push_notifications_enabled) && /* @__PURE__ */ l(
|
19005
|
+
) && (c.email_notifications_enabled || c.sms_notifications_enabled || c.push_notifications_enabled) && /* @__PURE__ */ l(q, { children: [
|
18989
19006
|
/* @__PURE__ */ t(OC, { posthog: n }),
|
18990
19007
|
/* @__PURE__ */ t(k, { sx: { my: 24 } })
|
18991
19008
|
] }),
|
18992
19009
|
e.includes(
|
18993
19010
|
"accounts"
|
18994
19011
|
/* Accounts */
|
18995
|
-
) && /* @__PURE__ */ l(
|
19012
|
+
) && /* @__PURE__ */ l(q, { children: [
|
18996
19013
|
/* @__PURE__ */ t(ft, { mb: 24, children: a.accounts_title }),
|
18997
19014
|
r.map((b) => /* @__PURE__ */ t(
|
18998
19015
|
so,
|
@@ -19011,7 +19028,7 @@ const Qc = A(
|
|
19011
19028
|
e.includes(
|
19012
19029
|
"budgets"
|
19013
19030
|
/* Budgets */
|
19014
|
-
) && /* @__PURE__ */ l(
|
19031
|
+
) && /* @__PURE__ */ l(q, { children: [
|
19015
19032
|
/* @__PURE__ */ t(ft, { mb: 24, children: a.budgets_title }),
|
19016
19033
|
s.map((b) => /* @__PURE__ */ t(
|
19017
19034
|
so,
|
@@ -19040,7 +19057,7 @@ const Qc = A(
|
|
19040
19057
|
}
|
19041
19058
|
), kC = A(({ selectedTab: e }) => {
|
19042
19059
|
const { alert: n, setAlert: i } = Ft();
|
19043
|
-
return /* @__PURE__ */ l(
|
19060
|
+
return /* @__PURE__ */ l(q, { children: [
|
19044
19061
|
e === Jn.Profile && /* @__PURE__ */ t(yC, {}),
|
19045
19062
|
e === Jn.Devices && /* @__PURE__ */ t(IC, {}),
|
19046
19063
|
e === Jn.Notifications && /* @__PURE__ */ t(Qc, {}),
|
@@ -19070,7 +19087,7 @@ const Qc = A(
|
|
19070
19087
|
});
|
19071
19088
|
var Jn = /* @__PURE__ */ ((e) => (e[e.Profile = 0] = "Profile", e[e.Devices = 1] = "Devices", e[e.Notifications = 2] = "Notifications", e[e.TransactionRules = 3] = "TransactionRules", e[e.Help = 4] = "Help", e))(Jn || {});
|
19072
19089
|
const h4 = A(({ onBackClick: e, sx: n }) => {
|
19073
|
-
const { settings: i } =
|
19090
|
+
const { settings: i } = x(), { isCopyLoaded: a, isInitialized: o } = ue(), { config: r } = Vi(), { isMobile: s } = ye(), c = me(), {
|
19074
19091
|
display_user_profile_in_settings: d,
|
19075
19092
|
display_mobile_devices_in_settings: _,
|
19076
19093
|
display_notification_settings_in_settings: u,
|
@@ -19121,7 +19138,7 @@ const h4 = A(({ onBackClick: e, sx: n }) => {
|
|
19121
19138
|
);
|
19122
19139
|
}), g4 = A(
|
19123
19140
|
({ notificationTypes: e, isOpen: n, onClose: i, onNotificationClick: a }) => {
|
19124
|
-
const { notifications: o } =
|
19141
|
+
const { notifications: o } = x(), { isCopyLoaded: r } = ue(), { isMobile: s } = ye(), [c, d] = g.useState(!1);
|
19125
19142
|
return r ? /* @__PURE__ */ l(
|
19126
19143
|
oe,
|
19127
19144
|
{
|
@@ -19777,7 +19794,7 @@ const Qa = ({
|
|
19777
19794
|
onClick: i,
|
19778
19795
|
primaryText: a,
|
19779
19796
|
secondaryText: o
|
19780
|
-
}) => /* @__PURE__ */ l(
|
19797
|
+
}) => /* @__PURE__ */ l(q, { children: [
|
19781
19798
|
/* @__PURE__ */ t(Y, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ l(he, { onClick: i, children: [
|
19782
19799
|
/* @__PURE__ */ t(se, { primary: a, secondary: o }),
|
19783
19800
|
e
|
@@ -19789,7 +19806,7 @@ const Qa = ({
|
|
19789
19806
|
(a) => a.member_guid === i.guid && i.successfully_aggregated_at && a.guid !== n.guid
|
19790
19807
|
);
|
19791
19808
|
}, JC = () => {
|
19792
|
-
const [e, n] = g.useState(!1), [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState({}), { selectedAccount: d } = Wt(), { mergeAccounts: _, updateAccount: u } = ve(), { accounts: h } =
|
19809
|
+
const [e, n] = g.useState(!1), [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState({}), { selectedAccount: d } = Wt(), { mergeAccounts: _, updateAccount: u } = ve(), { accounts: h } = x(), m = QC(), { onEvent: C } = K(), { modifyTransactionByAccountGuid: f } = Te(), b = async (S) => {
|
19793
19810
|
await u({
|
19794
19811
|
...d,
|
19795
19812
|
...S
|
@@ -19799,7 +19816,7 @@ const Qa = ({
|
|
19799
19816
|
() => a(!1)
|
19800
19817
|
);
|
19801
19818
|
};
|
19802
|
-
return /* @__PURE__ */ l(
|
19819
|
+
return /* @__PURE__ */ l(q, { children: [
|
19803
19820
|
/* @__PURE__ */ t(Lt, { sx: { backgroundColor: "transparent", mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(p, { bold: !0, component: "h2", variant: "XSmall", children: h.actions }) }),
|
19804
19821
|
/* @__PURE__ */ t(
|
19805
19822
|
Qa,
|
@@ -20063,7 +20080,7 @@ const Qa = ({
|
|
20063
20080
|
}, tf = () => {
|
20064
20081
|
const [e, n] = g.useState(!1), {
|
20065
20082
|
palette: { mode: i }
|
20066
|
-
} = me(), { selectedMember: a } = Wt(), { accounts: o, connect: r } =
|
20083
|
+
} = me(), { selectedMember: a } = Wt(), { accounts: o, connect: r } = x(), s = Jc(a, r), c = Ws.includes(a.connection_status) ? {
|
20067
20084
|
color: "error.main",
|
20068
20085
|
ctaCopy: s.cta ?? "",
|
20069
20086
|
icon: /* @__PURE__ */ t(Aa, { sx: { ...Ja } }),
|
@@ -20075,7 +20092,7 @@ const Qa = ({
|
|
20075
20092
|
mainMessage: s.statusName,
|
20076
20093
|
secondaryMessage: s.title
|
20077
20094
|
};
|
20078
|
-
return /* @__PURE__ */ l(
|
20095
|
+
return /* @__PURE__ */ l(q, { children: [
|
20079
20096
|
/* @__PURE__ */ t(Lt, { sx: { mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(p, { bold: !0, component: "h2", variant: "XSmall", children: o.connection_status }) }),
|
20080
20097
|
/* @__PURE__ */ t(Y, { sx: { backgroundColor: "background.paper" }, children: a.is_manual || !c.ctaCopy ? /* @__PURE__ */ l(y, { alignItems: "center", direction: "row", px: 24, py: 12, children: [
|
20081
20098
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(Zt, { backingSx: { backgroundColor: c.color, borderRadius: 1 }, size: 32, children: c.icon }) }),
|
@@ -20086,7 +20103,7 @@ const Qa = ({
|
|
20086
20103
|
se,
|
20087
20104
|
{
|
20088
20105
|
primary: c.mainMessage,
|
20089
|
-
secondary: c.secondaryMessage && /* @__PURE__ */ l(
|
20106
|
+
secondary: c.secondaryMessage && /* @__PURE__ */ l(q, { children: [
|
20090
20107
|
c.secondaryMessage,
|
20091
20108
|
" ",
|
20092
20109
|
/* @__PURE__ */ t(p, { bold: !0, sx: { color: "action.active" }, variant: "XSmall", children: c.ctaCopy })
|
@@ -20096,7 +20113,7 @@ const Qa = ({
|
|
20096
20113
|
/* @__PURE__ */ t(P, { name: "chevron_right" })
|
20097
20114
|
] }) }),
|
20098
20115
|
/* @__PURE__ */ t(k, { sx: { ml: a.is_manual || !a.institution_url ? 0 : 24 } }),
|
20099
|
-
!a.is_manual && a.institution_url && /* @__PURE__ */ l(
|
20116
|
+
!a.is_manual && a.institution_url && /* @__PURE__ */ l(q, { children: [
|
20100
20117
|
/* @__PURE__ */ t(Y, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ l(he, { component: "a", href: a.institution_url, target: "_blank", children: [
|
20101
20118
|
/* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(
|
20102
20119
|
Zt,
|
@@ -20133,7 +20150,7 @@ const Qa = ({
|
|
20133
20150
|
)
|
20134
20151
|
] });
|
20135
20152
|
}, nf = A(tf), af = ({ field: e, isOpen: n, onClose: i }) => {
|
20136
|
-
const { updateAccount: a } = ve(), { selectedAccount: o } = Wt(), { accounts: r } =
|
20153
|
+
const { updateAccount: a } = ve(), { selectedAccount: o } = Wt(), { accounts: r } = x(), [s, c] = g.useState(o[e.name]), [d, _] = g.useState(""), [u, h] = g.useState(!0), m = () => {
|
20137
20154
|
c(""), _(""), i();
|
20138
20155
|
}, C = () => {
|
20139
20156
|
switch (e.type) {
|
@@ -20230,10 +20247,10 @@ const Qa = ({
|
|
20230
20247
|
}
|
20231
20248
|
);
|
20232
20249
|
}, of = A(af), rf = () => {
|
20233
|
-
const e = window.app?.config, { onEvent: n } = K(), { selectedAccount: i } = Wt(), { accounts: a } =
|
20250
|
+
const e = window.app?.config, { onEvent: n } = K(), { selectedAccount: i } = Wt(), { accounts: a } = x(), o = Wg(i, a), r = i.member_is_managed_by_user || !i.member_is_managed_by_user && e.enable_renaming_home_accounts, [s, c] = g.useState(!1), [d, _] = g.useState(o[0]), u = o.filter(
|
20234
20251
|
(h) => r || i[h.name] || i[h.name] === 0
|
20235
20252
|
);
|
20236
|
-
return /* @__PURE__ */ l(
|
20253
|
+
return /* @__PURE__ */ l(q, { children: [
|
20237
20254
|
u.map((h) => {
|
20238
20255
|
const m = i[h.name] || i[h.name] === 0, C = u.indexOf(h) === u.length - 1, f = /* @__PURE__ */ t(
|
20239
20256
|
se,
|
@@ -20243,7 +20260,7 @@ const Qa = ({
|
|
20243
20260
|
secondary: /* @__PURE__ */ t(p, { bold: !0, sx: { fontSize: 15 }, children: m ? h.valueFormatter(i[h.name]) : h.placeholder })
|
20244
20261
|
}
|
20245
20262
|
);
|
20246
|
-
return /* @__PURE__ */ t(g.Fragment, { children: r ? /* @__PURE__ */ l(
|
20263
|
+
return /* @__PURE__ */ t(g.Fragment, { children: r ? /* @__PURE__ */ l(q, { children: [
|
20247
20264
|
/* @__PURE__ */ t(Y, { sx: { backgroundColor: "background.paper", px: 0 }, children: /* @__PURE__ */ l(
|
20248
20265
|
he,
|
20249
20266
|
{
|
@@ -20257,7 +20274,7 @@ const Qa = ({
|
|
20257
20274
|
}
|
20258
20275
|
) }),
|
20259
20276
|
/* @__PURE__ */ t(k, { sx: { ml: C ? 0 : 24 } })
|
20260
|
-
] }) : m && /* @__PURE__ */ l(
|
20277
|
+
] }) : m && /* @__PURE__ */ l(q, { children: [
|
20261
20278
|
/* @__PURE__ */ t(Y, { sx: { backgroundColor: "background.paper", px: 24 }, children: f }),
|
20262
20279
|
/* @__PURE__ */ t(k, { sx: { ml: C ? 0 : 24 } })
|
20263
20280
|
] }) }, h.name);
|
@@ -20279,12 +20296,12 @@ const Qa = ({
|
|
20279
20296
|
/* @__PURE__ */ t(ef, {})
|
20280
20297
|
] });
|
20281
20298
|
}, lf = A(cf), df = ({ setTabValue: e }) => {
|
20282
|
-
const [n, i] = g.useState(!1), { selectedMember: a } = Wt(), { accounts: o, connect: r } =
|
20299
|
+
const [n, i] = g.useState(!1), { selectedMember: a } = Wt(), { accounts: o, connect: r } = x(), s = a.connection_status && Ws.includes(a.connection_status);
|
20283
20300
|
if (g.useEffect(() => {
|
20284
20301
|
s && e(1);
|
20285
20302
|
}, [s]), !s) return;
|
20286
20303
|
const c = Jc(a, r);
|
20287
|
-
return /* @__PURE__ */ l(
|
20304
|
+
return /* @__PURE__ */ l(q, { children: [
|
20288
20305
|
/* @__PURE__ */ t(
|
20289
20306
|
It,
|
20290
20307
|
{
|
@@ -20335,13 +20352,13 @@ const Qa = ({
|
|
20335
20352
|
)
|
20336
20353
|
] });
|
20337
20354
|
}, uf = A(df), _f = () => {
|
20338
|
-
const [e, n] = g.useState(""), { onEvent: i } = K(), { selectedAccount: a } = Wt(), { accounts: o } =
|
20355
|
+
const [e, n] = g.useState(""), { onEvent: i } = K(), { selectedAccount: a } = Wt(), { accounts: o } = x(), { setFilter: r, sortedTransactions: s } = Te(), c = g.useMemo(() => s.find((d) => d.guid === e), [e]);
|
20339
20356
|
return g.useEffect(() => {
|
20340
20357
|
r({
|
20341
20358
|
dateRange: { start: wd(Nd(), 90), end: Dd() },
|
20342
20359
|
accounts: [a.guid]
|
20343
20360
|
});
|
20344
|
-
}, [a]), g.useEffect(() => i($.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), []), /* @__PURE__ */ l(
|
20361
|
+
}, [a]), g.useEffect(() => i($.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), []), /* @__PURE__ */ l(q, { children: [
|
20345
20362
|
/* @__PURE__ */ t(pn, { onClick: n }),
|
20346
20363
|
c && /* @__PURE__ */ t(
|
20347
20364
|
oe,
|
@@ -20355,8 +20372,8 @@ const Qa = ({
|
|
20355
20372
|
)
|
20356
20373
|
] });
|
20357
20374
|
}, hf = A(_f), gf = () => {
|
20358
|
-
const [e, n] = g.useState(0), { accounts: i } =
|
20359
|
-
return /* @__PURE__ */ l(
|
20375
|
+
const [e, n] = g.useState(0), { accounts: i } = x();
|
20376
|
+
return /* @__PURE__ */ l(q, { children: [
|
20360
20377
|
/* @__PURE__ */ t(uf, { setTabValue: n }),
|
20361
20378
|
/* @__PURE__ */ l(
|
20362
20379
|
kt,
|
@@ -20392,7 +20409,7 @@ const Qa = ({
|
|
20392
20409
|
/* @__PURE__ */ t(li, { index: 1, name: "account-details", value: e, children: /* @__PURE__ */ t(lf, {}) })
|
20393
20410
|
] });
|
20394
20411
|
}, el = A(gf), mf = () => {
|
20395
|
-
const [e, n] = g.useState(""), { accounts: i } =
|
20412
|
+
const [e, n] = g.useState(""), { accounts: i } = x(), { selectedAccounts: a } = ue(), { setSelectedAccount: o, setSelectedMember: r } = Wt(), { members: s } = ve(), { onEvent: c } = K(), d = [...new Set(a.map((E) => E.account_type))], _ = a.find((E) => e === E.guid), u = g.useMemo(
|
20396
20413
|
() => a.filter((E) => E.is_hidden),
|
20397
20414
|
[a]
|
20398
20415
|
), h = g.useMemo(
|
@@ -20435,14 +20452,14 @@ const Qa = ({
|
|
20435
20452
|
]
|
20436
20453
|
}
|
20437
20454
|
) }),
|
20438
|
-
children: /* @__PURE__ */ t(Se, { children: S.map((
|
20455
|
+
children: /* @__PURE__ */ t(Se, { children: S.map((I, R, D) => {
|
20439
20456
|
const H = R === D.length - 1;
|
20440
20457
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
20441
20458
|
/* @__PURE__ */ t(
|
20442
20459
|
Li,
|
20443
20460
|
{
|
20444
|
-
account:
|
20445
|
-
onRowClick: () => f(
|
20461
|
+
account: I,
|
20462
|
+
onRowClick: () => f(I),
|
20446
20463
|
shouldShowConnectionStatus: !0
|
20447
20464
|
}
|
20448
20465
|
),
|
@@ -20463,7 +20480,7 @@ const Qa = ({
|
|
20463
20480
|
}
|
20464
20481
|
}
|
20465
20482
|
)
|
20466
|
-
] },
|
20483
|
+
] }, I.guid);
|
20467
20484
|
}) })
|
20468
20485
|
}
|
20469
20486
|
) });
|
@@ -20473,7 +20490,7 @@ const Qa = ({
|
|
20473
20490
|
const S = a.filter(
|
20474
20491
|
(N) => N.account_type === E && !N.is_closed && !N.is_hidden
|
20475
20492
|
), v = S.reduce(
|
20476
|
-
(N,
|
20493
|
+
(N, I) => (I.available_balance || I.balance || 0) + N,
|
20477
20494
|
0
|
20478
20495
|
);
|
20479
20496
|
return /* @__PURE__ */ t(
|
@@ -20493,7 +20510,7 @@ const Qa = ({
|
|
20493
20510
|
}
|
20494
20511
|
) }),
|
20495
20512
|
children: /* @__PURE__ */ t(Se, { children: S.map((N) => {
|
20496
|
-
const
|
20513
|
+
const I = a.indexOf(N) === a.length - 1, R = S.indexOf(N) === S.length - 1;
|
20497
20514
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
20498
20515
|
/* @__PURE__ */ t(
|
20499
20516
|
Li,
|
@@ -20503,7 +20520,7 @@ const Qa = ({
|
|
20503
20520
|
shouldShowConnectionStatus: !0
|
20504
20521
|
}
|
20505
20522
|
),
|
20506
|
-
(!
|
20523
|
+
(!I || h.length > 0 || u.length > 0) && /* @__PURE__ */ t(
|
20507
20524
|
k,
|
20508
20525
|
{
|
20509
20526
|
sx: {
|
@@ -20535,7 +20552,7 @@ const Qa = ({
|
|
20535
20552
|
)
|
20536
20553
|
] });
|
20537
20554
|
}, pf = A(mf), Cf = ({ onBackClick: e, sx: n = {} }) => {
|
20538
|
-
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), { config: s } = Vi(), { accounts: c, refreshMembers: d } = ve(), { accounts: _ } =
|
20555
|
+
const [i, a] = g.useState(!1), [o, r] = g.useState(!1), { config: s } = Vi(), { accounts: c, refreshMembers: d } = ve(), { accounts: _ } = x(), { isCopyLoaded: u, isInitialized: h, setSelectedAccounts: m, selectedAccountGuids: C } = ue(), { isDesktop: f } = ye(), { onEvent: b } = K();
|
20539
20556
|
g.useEffect(() => {
|
20540
20557
|
m(c);
|
20541
20558
|
}, [c]);
|
@@ -20566,7 +20583,7 @@ const Qa = ({
|
|
20566
20583
|
onBackClick: e,
|
20567
20584
|
sx: n,
|
20568
20585
|
title: _.title,
|
20569
|
-
children: !h || o ? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ l(
|
20586
|
+
children: !h || o ? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ l(q, { children: [
|
20570
20587
|
/* @__PURE__ */ l(L, { sx: { px: f ? 24 : 12 }, children: [
|
20571
20588
|
C.length < 1 && /* @__PURE__ */ t(p, { display: "flex", justifyContent: "center", my: 24, children: _.no_accounts }),
|
20572
20589
|
/* @__PURE__ */ t(pf, {})
|
@@ -20583,7 +20600,7 @@ const Qa = ({
|
|
20583
20600
|
}
|
20584
20601
|
) : /* @__PURE__ */ t(ge, {});
|
20585
20602
|
}, p4 = A(Cf), ff = ({ onPrimaryCtaClick: e, sx: n }) => {
|
20586
|
-
const { visibleAccounts: i } = ve(), { accounts: a } =
|
20603
|
+
const { visibleAccounts: i } = ve(), { accounts: a } = x(), { isCopyLoaded: o, isInitialized: r, selectedAccounts: s, setSelectedAccounts: c } = ue();
|
20587
20604
|
return g.useEffect(() => {
|
20588
20605
|
c(i);
|
20589
20606
|
}, [i]), o ? /* @__PURE__ */ t(
|
@@ -21053,7 +21070,7 @@ const Qa = ({
|
|
21053
21070
|
]
|
21054
21071
|
}
|
21055
21072
|
), yf = () => {
|
21056
|
-
const { connect: e } =
|
21073
|
+
const { connect: e } = x();
|
21057
21074
|
return /* @__PURE__ */ l(y, { alignItems: "center", direction: "column", m: 24, children: [
|
21058
21075
|
/* @__PURE__ */ t(bf, {}),
|
21059
21076
|
/* @__PURE__ */ t(
|
@@ -21074,7 +21091,7 @@ const Qa = ({
|
|
21074
21091
|
},
|
21075
21092
|
sx: n
|
21076
21093
|
}) => {
|
21077
|
-
const { isCopyLoaded: i } = ue(), { connect: a } =
|
21094
|
+
const { isCopyLoaded: i } = ue(), { connect: a } = x(), [o, r] = g.useState(!1), s = () => {
|
21078
21095
|
r(!0), e();
|
21079
21096
|
};
|
21080
21097
|
return i ? /* @__PURE__ */ l(
|
@@ -21306,7 +21323,7 @@ class Af {
|
|
21306
21323
|
};
|
21307
21324
|
}
|
21308
21325
|
const If = () => {
|
21309
|
-
const { question: e, response: n, setResponse: i } = vo(), { analytics: a } =
|
21326
|
+
const { question: e, response: n, setResponse: i } = vo(), { analytics: a } = x(), o = me(), r = e, s = (c, d) => {
|
21310
21327
|
i(d);
|
21311
21328
|
};
|
21312
21329
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
@@ -21361,7 +21378,7 @@ const If = () => {
|
|
21361
21378
|
)
|
21362
21379
|
] });
|
21363
21380
|
}, xf = A(If), vf = () => {
|
21364
|
-
const { response: e, setResponse: n } = vo(), { analytics: i } =
|
21381
|
+
const { response: e, setResponse: n } = vo(), { analytics: i } = x();
|
21365
21382
|
return /* @__PURE__ */ t(
|
21366
21383
|
xn,
|
21367
21384
|
{
|
@@ -21387,7 +21404,7 @@ const If = () => {
|
|
21387
21404
|
responsePayload: _,
|
21388
21405
|
resetStore: u,
|
21389
21406
|
survey: h
|
21390
|
-
} = vo(), { analytics: m, common: C } =
|
21407
|
+
} = vo(), { analytics: m, common: C } = x(), { isCopyLoaded: f, isInitialized: b } = ue(), [E, S] = g.useState(!1);
|
21391
21408
|
g.useEffect(() => {
|
21392
21409
|
b && s();
|
21393
21410
|
}, [b]), g.useEffect(() => {
|
@@ -21401,7 +21418,7 @@ const If = () => {
|
|
21401
21418
|
}), u(), S(!1);
|
21402
21419
|
}, N = () => {
|
21403
21420
|
r();
|
21404
|
-
},
|
21421
|
+
}, I = () => {
|
21405
21422
|
e("survey sent", _), u(), S(!0);
|
21406
21423
|
};
|
21407
21424
|
return f ? !a && !E ? null : /* @__PURE__ */ l(
|
@@ -21437,7 +21454,7 @@ const If = () => {
|
|
21437
21454
|
te,
|
21438
21455
|
{
|
21439
21456
|
disabled: !o && !d,
|
21440
|
-
onClick: o ?
|
21457
|
+
onClick: o ? I : N,
|
21441
21458
|
sx: {
|
21442
21459
|
borderColor: n.palette.border.light,
|
21443
21460
|
"&:hover": {
|
@@ -21642,7 +21659,7 @@ const Ff = ({
|
|
21642
21659
|
onConnectAccountsClick: n,
|
21643
21660
|
createBudgetOnClick: i
|
21644
21661
|
}) => {
|
21645
|
-
const { recalculateBudgets: a } = ht(), { spendCategories: o } = ze(), { budgets: r } =
|
21662
|
+
const { recalculateBudgets: a } = ht(), { spendCategories: o } = ze(), { budgets: r } = x(), [s, c] = g.useState(!1), [d, _] = g.useState(!1), [u, h] = g.useState(!1), m = g.useMemo(() => [...o.filter((f) => f.totalAverageAmount > 0)], [o]), C = async () => {
|
21646
21663
|
h(!0);
|
21647
21664
|
const { data: f, isSuccess: b } = await a(m);
|
21648
21665
|
h(!1), b ? (f.length === 0 && c(!0), _(!1)) : _(!0);
|
@@ -21666,7 +21683,7 @@ const Ff = ({
|
|
21666
21683
|
}
|
21667
21684
|
}
|
21668
21685
|
}
|
21669
|
-
) : /* @__PURE__ */ t(
|
21686
|
+
) : /* @__PURE__ */ t(q, { children: s ? /* @__PURE__ */ t(
|
21670
21687
|
xi,
|
21671
21688
|
{
|
21672
21689
|
header: r.zero_state_generate_budgets_header,
|
@@ -21721,7 +21738,7 @@ const Ff = ({
|
|
21721
21738
|
shouldShowZeroState: o,
|
21722
21739
|
unavailableWidth: r = 24
|
21723
21740
|
}) => {
|
21724
|
-
const { onEvent: s } = K(), { setSelectedBudget: c } = ht(), { isLoadingCategoryTotals: d } = ze(), { isInitialized: _ } = ue(), { accounts: u } =
|
21741
|
+
const { onEvent: s } = K(), { setSelectedBudget: c } = ht(), { isLoadingCategoryTotals: d } = ze(), { isInitialized: _ } = ue(), { accounts: u } = x(), { availableWidth: h } = Vn(), { isMobile: m } = ye(), [C, f] = g.useState(!1), b = g.useMemo(() => h - r, [h]), E = (v) => {
|
21725
21742
|
c(v), s($.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
21726
21743
|
budget_category: v.category.name,
|
21727
21744
|
click_type: "bubble"
|
@@ -21757,7 +21774,7 @@ const Ff = ({
|
|
21757
21774
|
] });
|
21758
21775
|
}
|
21759
21776
|
), Vf = (e) => {
|
21760
|
-
const n = me(), { accounts: i } = ve(), { budgets: a, isDataLoaded: o, loadBudgetData: r, setTheme: s } = ht(), { budgets: c } =
|
21777
|
+
const n = me(), { accounts: i } = ve(), { budgets: a, isDataLoaded: o, loadBudgetData: r, setTheme: s } = ht(), { budgets: c } = x(), { isCopyLoaded: d, isInitialized: _ } = ue(), { reloadCategoryTotals: u } = ze(), h = __(), m = a.length === 0;
|
21761
21778
|
return g.useEffect(() => {
|
21762
21779
|
s(n);
|
21763
21780
|
}, [n]), g.useEffect(() => {
|
@@ -21787,7 +21804,7 @@ const Ff = ({
|
|
21787
21804
|
}
|
21788
21805
|
) : /* @__PURE__ */ t(ge, {});
|
21789
21806
|
}, y4 = A(Vf), Kf = A(() => {
|
21790
|
-
const { budgets: e } =
|
21807
|
+
const { budgets: e } = x(), { totalBudgeted: n } = ht(), { projectedIncome: i } = at(), a = i - n;
|
21791
21808
|
return /* @__PURE__ */ l(y, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
21792
21809
|
/* @__PURE__ */ l(y, { alignItems: "center", children: [
|
21793
21810
|
/* @__PURE__ */ t(p, { bold: !0, variant: "Body", children: B(i, "0,0") }),
|
@@ -21806,7 +21823,7 @@ const Ff = ({
|
|
21806
21823
|
] });
|
21807
21824
|
}), zf = A(
|
21808
21825
|
({ category: e }) => {
|
21809
|
-
const { budgets: n } =
|
21826
|
+
const { budgets: n } = x(), { budgets: i } = ht(), a = g.useMemo(() => {
|
21810
21827
|
const o = i.find((c) => c.category_guid === e.guid), r = B(e.totalAverageAmount, "0,0"), s = o ? T(n.recalculate_previous_budget, B(o.amount, "0,0")) : n.recalculate_new_budget;
|
21811
21828
|
return `${r} - ${s}`;
|
21812
21829
|
}, [n, i]);
|
@@ -21819,7 +21836,7 @@ const Ff = ({
|
|
21819
21836
|
] }, e.guid);
|
21820
21837
|
}
|
21821
21838
|
), Yf = ({ onRecalculateBudgets: e }) => {
|
21822
|
-
const { budgets: n, common: i } =
|
21839
|
+
const { budgets: n, common: i } = x(), { spendCategories: a } = ze(), { recalculateBudgets: o, setAlert: r } = ht(), [s, c] = g.useState(!1), d = a.filter((u) => u.totalAverageAmount > 0), _ = async () => {
|
21823
21840
|
await o(d), c(!1), r(n.alert_recalculated_budgets), e?.();
|
21824
21841
|
};
|
21825
21842
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
@@ -21848,7 +21865,7 @@ const Ff = ({
|
|
21848
21865
|
categoryName: n,
|
21849
21866
|
onAmountChanged: i
|
21850
21867
|
}) => {
|
21851
|
-
const { budgets: a } =
|
21868
|
+
const { budgets: a } = x(), { totalBudgeted: o } = ht(), { projectedIncome: r } = at(), s = r - o;
|
21852
21869
|
return /* @__PURE__ */ l(y, { gap: 16, children: [
|
21853
21870
|
/* @__PURE__ */ l(y, { children: [
|
21854
21871
|
/* @__PURE__ */ t(p, { children: T(
|
@@ -21870,7 +21887,7 @@ const Ff = ({
|
|
21870
21887
|
)
|
21871
21888
|
] });
|
21872
21889
|
}, jf = A(({ category: e, onAddBudget: n }) => {
|
21873
|
-
const { budgets: i, common: a } =
|
21890
|
+
const { budgets: i, common: a } = x(), [o, r] = g.useState(!1), [s, c] = g.useState(
|
21874
21891
|
`${e.totalAmount === 0 ? "" : e.totalAmount}`
|
21875
21892
|
);
|
21876
21893
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
@@ -21899,7 +21916,7 @@ const Ff = ({
|
|
21899
21916
|
)
|
21900
21917
|
] });
|
21901
21918
|
}), Xf = A(({ onRecalculateBudgets: e }) => {
|
21902
|
-
const { budgets: n } =
|
21919
|
+
const { budgets: n } = x(), { addBudget: i, setAlert: a, unbudgetedCategories: o } = ht(), r = async (s, c) => {
|
21903
21920
|
await i(s, c), a(T(n.alert_budget_created, s.name));
|
21904
21921
|
};
|
21905
21922
|
return /* @__PURE__ */ l(y, { children: [
|
@@ -21935,7 +21952,7 @@ const Ff = ({
|
|
21935
21952
|
/* @__PURE__ */ t(ci, { data: c, height: 10 })
|
21936
21953
|
] }) }) });
|
21937
21954
|
}, qf = A(() => {
|
21938
|
-
const { budgets: e } =
|
21955
|
+
const { budgets: e } = x();
|
21939
21956
|
return /* @__PURE__ */ l(y, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
21940
21957
|
/* @__PURE__ */ t(P, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
|
21941
21958
|
/* @__PURE__ */ t(p, { bold: !0, color: "secondary", variant: "Small", children: e.zero_state_no_sub_budgets }),
|
@@ -21963,7 +21980,7 @@ const Ff = ({
|
|
21963
21980
|
)
|
21964
21981
|
] }) });
|
21965
21982
|
}), Qf = A(({ category: e, parentBudget: n }) => {
|
21966
|
-
const { budgets: i, common: a } =
|
21983
|
+
const { budgets: i, common: a } = x(), { setExpandedGuid: o, setOnSelect: r } = Cn(), { addBudget: s } = ht(), [c, d] = g.useState(!1), [_, u] = g.useState(!1), [h, m] = g.useState(""), [C, f] = g.useState(void 0);
|
21967
21984
|
g.useEffect(() => {
|
21968
21985
|
r((S) => {
|
21969
21986
|
const v = e.subCategories.find((N) => N.guid === S);
|
@@ -22015,11 +22032,11 @@ const Ff = ({
|
|
22015
22032
|
)
|
22016
22033
|
] });
|
22017
22034
|
}), Jf = A(({ budget: e }) => {
|
22018
|
-
const { category: n, subBudgets: i } = e, { budgets: a, common: o } =
|
22035
|
+
const { category: n, subBudgets: i } = e, { budgets: a, common: o } = x(), { deleteBudget: r, selectedSubBudget: s, setSelectedSubBudget: c, updateBudget: d } = ht(), { filter: _, setFilter: u } = Te(), [h, m] = g.useState(!1), [C, f] = g.useState(!1), [b, E] = g.useState("");
|
22019
22036
|
g.useEffect(() => {
|
22020
22037
|
s && (E(`${s.amount}`), u({
|
22021
22038
|
..._,
|
22022
|
-
custom: (
|
22039
|
+
custom: (I) => I.category_guid === s.category_guid
|
22023
22040
|
}));
|
22024
22041
|
}, [s]);
|
22025
22042
|
const S = async () => {
|
@@ -22032,15 +22049,15 @@ const Ff = ({
|
|
22032
22049
|
}, N = () => {
|
22033
22050
|
u({
|
22034
22051
|
..._,
|
22035
|
-
custom: (
|
22052
|
+
custom: (I) => I.category_guid === e.category_guid || I.top_level_category_guid === e.category_guid
|
22036
22053
|
}), c(void 0);
|
22037
22054
|
};
|
22038
22055
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
22039
22056
|
/* @__PURE__ */ l(ie, { sx: { bgcolor: "background.paper" }, children: [
|
22040
|
-
i.length === 0 ? /* @__PURE__ */ t(qf, {}) : i.map((
|
22041
|
-
/* @__PURE__ */ t(Zf, { budget:
|
22057
|
+
i.length === 0 ? /* @__PURE__ */ t(qf, {}) : i.map((I) => /* @__PURE__ */ l(g.Fragment, { children: [
|
22058
|
+
/* @__PURE__ */ t(Zf, { budget: I }),
|
22042
22059
|
/* @__PURE__ */ t(k, {})
|
22043
|
-
] },
|
22060
|
+
] }, I.guid)),
|
22044
22061
|
/* @__PURE__ */ t(Qf, { category: n, parentBudget: e })
|
22045
22062
|
] }),
|
22046
22063
|
/* @__PURE__ */ t(
|
@@ -22096,7 +22113,7 @@ const Ff = ({
|
|
22096
22113
|
] })
|
22097
22114
|
] });
|
22098
22115
|
}), e0 = A(({ budget: e }) => {
|
22099
|
-
const { budgets: n, common: i, transactions: a } =
|
22116
|
+
const { budgets: n, common: i, transactions: a } = x(), { setAlert: o } = ht(), { sortedTransactions: r, tags: s } = Te(), [c, d] = g.useState(0), [_, u] = g.useState(""), h = g.useMemo(
|
22100
22117
|
() => r.find((f) => f.guid === _),
|
22101
22118
|
[_]
|
22102
22119
|
), m = (f, b) => {
|
@@ -22158,7 +22175,7 @@ const Ff = ({
|
|
22158
22175
|
] })
|
22159
22176
|
] });
|
22160
22177
|
}), t0 = A(() => {
|
22161
|
-
const { selectedAccountGuids: e } = ue(), { budgets: n, common: i } =
|
22178
|
+
const { selectedAccountGuids: e } = ue(), { budgets: n, common: i } = x(), {
|
22162
22179
|
dateRange: a,
|
22163
22180
|
deleteBudget: o,
|
22164
22181
|
selectedBudget: r,
|
@@ -22180,7 +22197,7 @@ const Ff = ({
|
|
22180
22197
|
amount: Number(S),
|
22181
22198
|
percentage: r.category.totalAmount / Number(S) * 100
|
22182
22199
|
}), c(T(n.alert_budget_updated, r.category.name)));
|
22183
|
-
},
|
22200
|
+
}, I = async () => {
|
22184
22201
|
r && (await o(r.guid), c(T(n.alert_budget_deleted, r.category.name))), E(!1), R();
|
22185
22202
|
}, R = () => {
|
22186
22203
|
m(!1), setTimeout(() => {
|
@@ -22229,7 +22246,7 @@ const Ff = ({
|
|
22229
22246
|
copy: { close_aria: i.close_aria, title: n.delete_title },
|
22230
22247
|
isOpen: b,
|
22231
22248
|
onClose: () => E(!1),
|
22232
|
-
onPrimaryAction:
|
22249
|
+
onPrimaryAction: I,
|
22233
22250
|
primaryColor: "error",
|
22234
22251
|
primaryText: n.details_delete_button,
|
22235
22252
|
secondaryColor: "secondary",
|
@@ -22267,7 +22284,7 @@ const Ff = ({
|
|
22267
22284
|
)
|
22268
22285
|
] }) });
|
22269
22286
|
}, i0 = A(() => {
|
22270
|
-
const { onEvent: e } = K(), { budgets: n } =
|
22287
|
+
const { onEvent: e } = K(), { budgets: n } = x(), { detailedBudgets: i, setSelectedBudget: a } = ht(), o = (r) => {
|
22271
22288
|
a(r), e($.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
22272
22289
|
budget_category: r.category.name,
|
22273
22290
|
click_type: "list"
|
@@ -22281,16 +22298,16 @@ const Ff = ({
|
|
22281
22298
|
] }, r.guid)) }) })
|
22282
22299
|
] });
|
22283
22300
|
}), a0 = A(() => {
|
22284
|
-
const e = me(), { onEvent: n } = K(), { visibleAccounts: i } = ve(), { budgets: a, common: o, recurring: r } =
|
22301
|
+
const e = me(), { onEvent: n } = K(), { visibleAccounts: i } = ve(), { budgets: a, common: o, recurring: r } = x(), { incomeCategories: s, spendCategories: c } = ze(), { detailedBudgets: d, totalBudgeted: _ } = ht(), { projectedIncome: u } = at(), { setFilter: h } = Te(), [m, C] = g.useState(!1), [f, b] = g.useMemo(() => {
|
22285
22302
|
const N = c.reduce((H, O) => H + O.totalAmount, 0);
|
22286
|
-
let
|
22287
|
-
|
22303
|
+
let I = N / _;
|
22304
|
+
I > 1 && (I = 1);
|
22288
22305
|
let R = e.palette.success.main;
|
22289
|
-
|
22306
|
+
I > 0.8 && I < 1 ? R = e.palette.warning.main : I >= 1 && (R = e.palette.error.main);
|
22290
22307
|
const D = [
|
22291
22308
|
{
|
22292
22309
|
color: R,
|
22293
|
-
percentage: `${
|
22310
|
+
percentage: `${I}`
|
22294
22311
|
}
|
22295
22312
|
];
|
22296
22313
|
return [N, D];
|
@@ -22298,12 +22315,12 @@ const Ff = ({
|
|
22298
22315
|
const N = Math.abs(
|
22299
22316
|
s.reduce((D, H) => D + H.totalAmount, 0)
|
22300
22317
|
);
|
22301
|
-
let
|
22302
|
-
|
22318
|
+
let I = N / u;
|
22319
|
+
I > 1 && (I = 1);
|
22303
22320
|
const R = [
|
22304
22321
|
{
|
22305
22322
|
color: e.palette.secondary.main,
|
22306
|
-
percentage: `${
|
22323
|
+
percentage: `${I}`
|
22307
22324
|
}
|
22308
22325
|
];
|
22309
22326
|
return [N, R];
|
@@ -22364,7 +22381,7 @@ const Ff = ({
|
|
22364
22381
|
)
|
22365
22382
|
] });
|
22366
22383
|
}), hs = 480, E4 = A(({ onBackClick: e, sx: n }) => {
|
22367
|
-
const i = me(), { onEvent: a } = K(), { visibleAccounts: o } = ve(), { budgets: r, common: s } =
|
22384
|
+
const i = me(), { onEvent: a } = K(), { visibleAccounts: o } = ve(), { budgets: r, common: s } = x(), { isCopyLoaded: c, isInitialized: d, selectedAccounts: _, setDisplayedDate: u, setSelectedAccounts: h } = ue(), {
|
22368
22385
|
alert: m,
|
22369
22386
|
dateRange: C,
|
22370
22387
|
isDataLoaded: f,
|
@@ -22373,15 +22390,15 @@ const Ff = ({
|
|
22373
22390
|
setAlert: S,
|
22374
22391
|
setTheme: v,
|
22375
22392
|
budgets: N
|
22376
|
-
} = ht(), { loadActivity:
|
22393
|
+
} = ht(), { loadActivity: I } = at(), { isDesktop: R, isTablet: D } = ye(), { reloadCategoryTotals: H } = ze(), [O, M] = g.useState(!1);
|
22377
22394
|
g.useEffect(() => {
|
22378
22395
|
v(i), h(o), u(C.start, C.end), a($.BUDGETS_VIEW);
|
22379
22396
|
}, []), g.useEffect(() => {
|
22380
22397
|
h(o);
|
22381
22398
|
}, [o]), g.useEffect(() => {
|
22382
|
-
d && (H(_, C.start, C.end).finally(), f || (
|
22399
|
+
d && (H(_, C.start, C.end).finally(), f || (I(), b().finally()));
|
22383
22400
|
}, [d, _, C]);
|
22384
|
-
const
|
22401
|
+
const j = (pe) => {
|
22385
22402
|
E({ start: pe[0] || /* @__PURE__ */ new Date(), end: pe[1] || /* @__PURE__ */ new Date() });
|
22386
22403
|
}, U = () => {
|
22387
22404
|
a($.BUDGETS_CLICK_FILTER);
|
@@ -22401,7 +22418,7 @@ const Ff = ({
|
|
22401
22418
|
onClick: W
|
22402
22419
|
}
|
22403
22420
|
],
|
22404
|
-
calendarActions: { onRangeChanged:
|
22421
|
+
calendarActions: { onRangeChanged: j, shouldDisableNext: J },
|
22405
22422
|
onAccountsFilterClick: U,
|
22406
22423
|
onBackClick: e,
|
22407
22424
|
sx: n,
|
@@ -22518,7 +22535,7 @@ const Ff = ({
|
|
22518
22535
|
}
|
22519
22536
|
) : null;
|
22520
22537
|
}), r0 = () => {
|
22521
|
-
const { common: e, connect: n } =
|
22538
|
+
const { common: e, connect: n } = x(), i = yn("(max-width: 700px)"), [a, o] = g.useState(!1), r = () => {
|
22522
22539
|
o(!0);
|
22523
22540
|
};
|
22524
22541
|
return /* @__PURE__ */ l(g.Fragment, { children: [
|
@@ -22560,7 +22577,7 @@ const Ff = ({
|
|
22560
22577
|
)
|
22561
22578
|
] });
|
22562
22579
|
}, s0 = A(r0), c0 = () => {
|
22563
|
-
const { visibleAccounts: e } = ve(), { selectedAccountGuids: n, setSelectedAccountGuids: i } = ue(), { common: a } =
|
22580
|
+
const { visibleAccounts: e } = ve(), { selectedAccountGuids: n, setSelectedAccountGuids: i } = ue(), { common: a } = x(), { config: o } = Vi(), { isMobile: r } = ye(), s = {
|
22564
22581
|
accountFilterOptionsCopy: {
|
22565
22582
|
accountTypeAccounts: a.account_filter.account_type_accounts,
|
22566
22583
|
cancelButton: a.cancel_button,
|
@@ -22720,7 +22737,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
22720
22737
|
(N) => !!N[f.name]
|
22721
22738
|
);
|
22722
22739
|
let S = E.reduce(
|
22723
|
-
(N,
|
22740
|
+
(N, I) => N + na(I) * I[f.name] / 100,
|
22724
22741
|
0
|
22725
22742
|
);
|
22726
22743
|
const v = g0(
|
@@ -22775,7 +22792,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
22775
22792
|
E !== null && o(E);
|
22776
22793
|
}, { isMobile: s } = ye(), {
|
22777
22794
|
investments: { allocation: c }
|
22778
|
-
} =
|
22795
|
+
} = x(), d = me(), _ = d.palette.mode === "dark", u = _ ? "grey.200" : "grey.700", h = _ ? "common.white" : "primary.main", m = _ ? "primary.light" : "primary.dark", C = _ ? "grey.600" : "grey.400", f = [
|
22779
22796
|
{ label: c.tabs_label_dollar, value: 0 },
|
22780
22797
|
{ label: c.tabs_label_percent, value: 1 }
|
22781
22798
|
];
|
@@ -22899,7 +22916,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
22899
22916
|
[s]
|
22900
22917
|
), {
|
22901
22918
|
investments: { allocation: m }
|
22902
|
-
} =
|
22919
|
+
} = x(), C = g.useMemo(() => e.donutData.length > 0 ? e.donutData : [{ id: "0", color: _.palette.border.light, value: 100 }], [e, _]), f = u ? "#0AC295" : "#09A57F", b = u ? "grey.300" : "grey.700", E = () => h ? m.pie_chart_centered_click_for_details : i ? po(e.totalGainLossPercentage) : vi(e.totalGainLoss), S = e.totalGainLoss >= 0 ? f : b;
|
22903
22920
|
return /* @__PURE__ */ t(
|
22904
22921
|
tc,
|
22905
22922
|
{
|
@@ -22942,7 +22959,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
22942
22959
|
i !== f ? a(f) : (a(""), r(""));
|
22943
22960
|
}, { selectedAccountGuids: c } = ue(), { visibleHoldings: d } = Ri(), { visibleInvestmentAccounts: _ } = ve(), {
|
22944
22961
|
investments: { allocation: u }
|
22945
|
-
} =
|
22962
|
+
} = x(), h = m0(
|
22946
22963
|
_.filter(({ guid: f }) => c.includes(f)),
|
22947
22964
|
u,
|
22948
22965
|
d
|
@@ -23082,7 +23099,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23082
23099
|
), T0 = () => {
|
23083
23100
|
const {
|
23084
23101
|
investments: { analysis: e }
|
23085
|
-
} =
|
23102
|
+
} = x(), { analysisChartData: n, analysisDetails: i, analysisType: a, setAnalysisType: o } = Ri(), r = yn("(min-width:320px) and (max-width:375px)"), { isMobile: s } = ye(), d = it().palette.mode === "dark", { cellDimension: _, columns: u, rows: h, textVariant: m } = g.useMemo(() => {
|
23086
23103
|
const C = a === Hn.Stocks, f = Object.values(C ? e.stock_column_labels : e.bond_column_labels), b = Object.values(C ? e.stock_row_labels : e.bond_row_labels);
|
23087
23104
|
return { cellDimension: s ? 72 : 100, columns: f, rows: b, textVariant: s ? "XSmall" : "Body" };
|
23088
23105
|
}, [e, s, a]);
|
@@ -23159,16 +23176,16 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23159
23176
|
}
|
23160
23177
|
),
|
23161
23178
|
n.map((C, f, b) => /* @__PURE__ */ t(y, { sx: { flexDirection: "row", gap: 4 }, children: C.map((E, S) => {
|
23162
|
-
const v = f === 0, N = f === b.length - 1,
|
23179
|
+
const v = f === 0, N = f === b.length - 1, I = S === 0, R = S === C.length - 1, D = Number(E.replace("%", "")) >= 25;
|
23163
23180
|
let H = "grey.200", O = "grey.900";
|
23164
23181
|
return d ? (H = D ? "grey.200" : "grey.700", O = D ? "grey.900" : "common.white") : (H = D ? "grey.700" : "grey.200", O = D ? "common.white" : "grey.900"), /* @__PURE__ */ t(
|
23165
23182
|
y,
|
23166
23183
|
{
|
23167
23184
|
sx: {
|
23168
23185
|
...{
|
23169
|
-
borderBottomLeftRadius: N &&
|
23186
|
+
borderBottomLeftRadius: N && I ? 4 : 0,
|
23170
23187
|
borderBottomRightRadius: N && R ? 4 : 0,
|
23171
|
-
borderTopLeftRadius: v &&
|
23188
|
+
borderTopLeftRadius: v && I ? 4 : 0,
|
23172
23189
|
borderTopRightRadius: v && R ? 4 : 0
|
23173
23190
|
},
|
23174
23191
|
alignItems: "center",
|
@@ -23228,7 +23245,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23228
23245
|
onClose: n,
|
23229
23246
|
accountHoldingsData: i
|
23230
23247
|
}) => {
|
23231
|
-
const { investments: a } =
|
23248
|
+
const { investments: a } = x(), [o, r] = g.useState({}), s = (c) => (d, _) => {
|
23232
23249
|
r((u) => ({
|
23233
23250
|
...u,
|
23234
23251
|
[c]: _
|
@@ -23463,7 +23480,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23463
23480
|
const { isMobile: e } = ye(), { onEvent: n } = K(), [i, a] = Tt({}), [o, r] = Tt(!1), { selectedAccountGuids: s } = ue(), { visibleHoldings: c, updateHoldings: d, holdingsLoaded: _ } = Ri(), [u, h] = g.useState(!1), [m, C] = Tt({
|
23464
23481
|
accounts: [],
|
23465
23482
|
holdings: []
|
23466
|
-
}), { accounts: f, investments: b } =
|
23483
|
+
}), { accounts: f, investments: b } = x(), S = me().palette.mode === "dark", v = S ? "#0AC295" : "#09A57F", N = S ? "grey.300" : "grey.700", I = (Z, Q = "lesserThan") => Q === "greaterThan" ? Z >= 0 ? v : N : Z <= 0 ? N : v, R = ({ data: Z }) => {
|
23467
23484
|
const { isCopyLoaded: Q } = ue(), [Le, ke] = Tt(null), [Fe, Ze] = Tt("");
|
23468
23485
|
if (!Q || !_)
|
23469
23486
|
return /* @__PURE__ */ t(ge, {});
|
@@ -23563,7 +23580,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23563
23580
|
name: le.value > 0 ? "trending_up" : "trending_down",
|
23564
23581
|
size: 16,
|
23565
23582
|
sx: {
|
23566
|
-
color:
|
23583
|
+
color: I(le.value),
|
23567
23584
|
mr: 1,
|
23568
23585
|
verticalAlign: "middle"
|
23569
23586
|
}
|
@@ -23573,7 +23590,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23573
23590
|
p,
|
23574
23591
|
{
|
23575
23592
|
sx: {
|
23576
|
-
color:
|
23593
|
+
color: I(le.value),
|
23577
23594
|
fontWeight: 700
|
23578
23595
|
},
|
23579
23596
|
variant: "Small",
|
@@ -23585,7 +23602,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23585
23602
|
p,
|
23586
23603
|
{
|
23587
23604
|
sx: {
|
23588
|
-
color:
|
23605
|
+
color: I(le.value),
|
23589
23606
|
fontWeight: 700
|
23590
23607
|
},
|
23591
23608
|
variant: "Small",
|
@@ -23636,9 +23653,9 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23636
23653
|
...ke,
|
23637
23654
|
[Z]: Le
|
23638
23655
|
}));
|
23639
|
-
}, { visibleHoldings: O } = Ri(), { visibleInvestmentAccounts: M } = ve(),
|
23656
|
+
}, { visibleHoldings: O } = Ri(), { visibleInvestmentAccounts: M } = ve(), j = M.filter(
|
23640
23657
|
({ guid: Z }) => s.includes(Z)
|
23641
|
-
), U =
|
23658
|
+
), U = j.reduce((Z, Q) => Z + (Q.balance || 0), 0), W = j.map(({ guid: Z }) => Z), J = O.filter(
|
23642
23659
|
({ account_guid: Z }) => W.includes(Z)
|
23643
23660
|
).reduce((Z, Q) => {
|
23644
23661
|
const Le = Q.market_value ? Q.market_value - (Q.cost_basis || 0) : 0;
|
@@ -23661,13 +23678,13 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23661
23678
|
{
|
23662
23679
|
name: J >= 0 ? "trending_up" : "trending_down",
|
23663
23680
|
size: 20,
|
23664
|
-
sx: { color:
|
23681
|
+
sx: { color: I(J, "greaterThan") }
|
23665
23682
|
}
|
23666
23683
|
),
|
23667
23684
|
/* @__PURE__ */ t(
|
23668
23685
|
p,
|
23669
23686
|
{
|
23670
|
-
sx: { color:
|
23687
|
+
sx: { color: I(J, "greaterThan"), fontWeight: 700 },
|
23671
23688
|
variant: "Small",
|
23672
23689
|
children: J.toLocaleString("en-US", {
|
23673
23690
|
currency: "USD",
|
@@ -23679,7 +23696,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23679
23696
|
)
|
23680
23697
|
] })
|
23681
23698
|
] }),
|
23682
|
-
|
23699
|
+
j.map((Z) => {
|
23683
23700
|
const Q = O.filter((Ye) => Ye.account_guid === Z.guid).map((Ye) => ({
|
23684
23701
|
id: Ye.guid,
|
23685
23702
|
qty: Ye.shares || 0,
|
@@ -23789,14 +23806,14 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23789
23806
|
{
|
23790
23807
|
name: Fe > 0 ? "trending_up" : "trending_down",
|
23791
23808
|
size: 20,
|
23792
|
-
sx: { color:
|
23809
|
+
sx: { color: I(Fe) }
|
23793
23810
|
}
|
23794
23811
|
),
|
23795
23812
|
/* @__PURE__ */ l(
|
23796
23813
|
p,
|
23797
23814
|
{
|
23798
23815
|
sx: {
|
23799
|
-
color:
|
23816
|
+
color: I(Fe),
|
23800
23817
|
fontWeight: 600
|
23801
23818
|
},
|
23802
23819
|
variant: "Body",
|
@@ -23811,7 +23828,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23811
23828
|
p,
|
23812
23829
|
{
|
23813
23830
|
sx: {
|
23814
|
-
color:
|
23831
|
+
color: I(Fe),
|
23815
23832
|
fontWeight: 600
|
23816
23833
|
},
|
23817
23834
|
variant: "Body",
|
@@ -23932,14 +23949,14 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23932
23949
|
{
|
23933
23950
|
name: Fe >= 0 ? "trending_up" : "trending_down",
|
23934
23951
|
size: 20,
|
23935
|
-
sx: { color:
|
23952
|
+
sx: { color: I(Fe) }
|
23936
23953
|
}
|
23937
23954
|
),
|
23938
23955
|
/* @__PURE__ */ l(
|
23939
23956
|
p,
|
23940
23957
|
{
|
23941
23958
|
sx: {
|
23942
|
-
color:
|
23959
|
+
color: I(Fe),
|
23943
23960
|
fontWeight: 600
|
23944
23961
|
},
|
23945
23962
|
variant: "Body",
|
@@ -23954,7 +23971,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
23954
23971
|
p,
|
23955
23972
|
{
|
23956
23973
|
sx: {
|
23957
|
-
color:
|
23974
|
+
color: I(Fe),
|
23958
23975
|
fontWeight: 600
|
23959
23976
|
},
|
23960
23977
|
variant: "Body",
|
@@ -24014,7 +24031,7 @@ const d0 = ({ widgets: e, isLoading: n }) => {
|
|
24014
24031
|
)
|
24015
24032
|
] });
|
24016
24033
|
}, v0 = A(x0), eo = ({ title: e }) => /* @__PURE__ */ t(p, { bold: !0, variant: "Body", children: e }), T4 = A(({ onBackClick: e, sx: n }) => {
|
24017
|
-
const { onEvent: i } = K(), { isMobile: a } = ye(), { visibleInvestmentAccounts: o } = ve(), { investments: r } =
|
24034
|
+
const { onEvent: i } = K(), { isMobile: a } = ye(), { visibleInvestmentAccounts: o } = ve(), { investments: r } = x(), { isCopyLoaded: s, isInitialized: c, setSelectedAccounts: d } = ue(), [_, u] = g.useState(0), { loadHoldings: h } = Ri();
|
24018
24035
|
g.useEffect(() => {
|
24019
24036
|
d(o);
|
24020
24037
|
}, [o]), g.useEffect(() => {
|
@@ -24322,7 +24339,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
24322
24339
|
variant: f,
|
24323
24340
|
widthOverrides: b
|
24324
24341
|
}, E) {
|
24325
|
-
const [S, v] = g.useState(2), [N,
|
24342
|
+
const [S, v] = g.useState(2), [N, I] = g.useState(!1);
|
24326
24343
|
g.useEffect(() => {
|
24327
24344
|
b && b <= 325 && v(3);
|
24328
24345
|
}, [b]);
|
@@ -24365,8 +24382,8 @@ const Yi = g.createContext(null), M0 = ({
|
|
24365
24382
|
"aria-label": i,
|
24366
24383
|
id: "divButton",
|
24367
24384
|
onClick: () => _(),
|
24368
|
-
onKeyDown: () =>
|
24369
|
-
onKeyUp: () =>
|
24385
|
+
onKeyDown: () => I(!1),
|
24386
|
+
onKeyUp: () => I(!0),
|
24370
24387
|
ref: E,
|
24371
24388
|
role: "button",
|
24372
24389
|
style: {
|
@@ -25343,11 +25360,11 @@ const Yi = g.createContext(null), M0 = ({
|
|
25343
25360
|
}, [f]), Yn(() => {
|
25344
25361
|
if (f && i)
|
25345
25362
|
if (i.template === "MarketingOffer") {
|
25346
|
-
const
|
25363
|
+
const I = i;
|
25347
25364
|
_?.capture("viewed_messaging_insight", {
|
25348
25365
|
template: i.template,
|
25349
|
-
campaign_guid:
|
25350
|
-
campaign_name:
|
25366
|
+
campaign_guid: I.campaign_guid,
|
25367
|
+
campaign_name: I.pulse_campaign_name
|
25351
25368
|
});
|
25352
25369
|
} else
|
25353
25370
|
_?.capture("viewed_insight", {
|
@@ -25358,11 +25375,11 @@ const Yi = g.createContext(null), M0 = ({
|
|
25358
25375
|
}, [i, s, f]);
|
25359
25376
|
const N = () => {
|
25360
25377
|
if (d && d(i), E(il(i.template)), i.template === "MarketingOffer") {
|
25361
|
-
const
|
25378
|
+
const I = i;
|
25362
25379
|
_?.capture("clicked_messaging_insight", {
|
25363
25380
|
template: i.template,
|
25364
|
-
campaign_guid:
|
25365
|
-
campaign_name:
|
25381
|
+
campaign_guid: I.campaign_guid,
|
25382
|
+
campaign_name: I.pulse_campaign_name
|
25366
25383
|
});
|
25367
25384
|
} else
|
25368
25385
|
_?.capture("clicked_insight", {
|
@@ -25486,8 +25503,8 @@ const Yi = g.createContext(null), M0 = ({
|
|
25486
25503
|
variant: _,
|
25487
25504
|
widthOverrides: u
|
25488
25505
|
}) => {
|
25489
|
-
const h = q0(a, d, u), m = g.useRef(null), [C, f] = g.useState(0), [b, E] = g.useState(null), [S, v] = g.useState(null), { carouselCopy: N } = Kn(), { onEvent:
|
25490
|
-
|
25506
|
+
const h = q0(a, d, u), m = g.useRef(null), [C, f] = g.useState(0), [b, E] = g.useState(null), [S, v] = g.useState(null), { carouselCopy: N } = Kn(), { onEvent: I } = ji(), R = () => {
|
25507
|
+
I(Yt.ON_CAROUSEL_FORWARD_CLICK), m.current && m.current.scrollTo({
|
25491
25508
|
left: (
|
25492
25509
|
// Adds the flex gap to the carousel ref's width
|
25493
25510
|
(m.current.offsetWidth + 8) * (Math.floor(C / (m.current.offsetWidth + 8)) + 1)
|
@@ -25496,7 +25513,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25496
25513
|
behavior: "smooth"
|
25497
25514
|
});
|
25498
25515
|
}, D = () => {
|
25499
|
-
|
25516
|
+
I(Yt.ON_CAROUSEL_BACK_CLICK), m.current && m.current.scrollTo({
|
25500
25517
|
left: (m.current.offsetWidth + 8) * (Math.floor(C / (m.current.offsetWidth + 8)) - 1),
|
25501
25518
|
top: 0,
|
25502
25519
|
behavior: "smooth"
|
@@ -25505,10 +25522,10 @@ const Yi = g.createContext(null), M0 = ({
|
|
25505
25522
|
m.current && f(m.current.scrollLeft);
|
25506
25523
|
}, O = () => {
|
25507
25524
|
if (!S || !b) return;
|
25508
|
-
S - b > V0 ?
|
25525
|
+
S - b > V0 ? I(Yt.ON_CAROUSEL_FORWARD_SWIPE) : I(Yt.ON_CAROUSEL_BACK_SWIPE);
|
25509
25526
|
}, M = (J) => {
|
25510
25527
|
E(J.targetTouches[0].clientX);
|
25511
|
-
},
|
25528
|
+
}, j = (J) => {
|
25512
25529
|
E(null), v(J.targetTouches[0].clientX);
|
25513
25530
|
}, U = {
|
25514
25531
|
clientColorScheme: n,
|
@@ -25534,7 +25551,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25534
25551
|
onScroll: H,
|
25535
25552
|
onTouchEnd: O,
|
25536
25553
|
onTouchMove: M,
|
25537
|
-
onTouchStart:
|
25554
|
+
onTouchStart: j,
|
25538
25555
|
ref: m,
|
25539
25556
|
children: [
|
25540
25557
|
e.map((J, pe) => {
|
@@ -25831,9 +25848,9 @@ const Yi = g.createContext(null), M0 = ({
|
|
25831
25848
|
useDarkMode: S,
|
25832
25849
|
userHasFullInsightFeedBeats: v,
|
25833
25850
|
variant: N,
|
25834
|
-
widthOverrides:
|
25851
|
+
widthOverrides: I
|
25835
25852
|
}) => {
|
25836
|
-
const R = it(), [D, H] = Tt("STANDARD"), [O, M] = Tt(!1),
|
25853
|
+
const R = it(), [D, H] = Tt("STANDARD"), [O, M] = Tt(!1), j = bu([d], bn), U = yu([_], bn);
|
25837
25854
|
g.useEffect(() => {
|
25838
25855
|
bn.isInitialized || bn.initialize(o, E, s);
|
25839
25856
|
}, [o, E, s, bn.isInitialized]), g.useEffect(() => {
|
@@ -25850,7 +25867,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25850
25867
|
showIcon: f,
|
25851
25868
|
showWithMargin: b,
|
25852
25869
|
useDarkMode: S,
|
25853
|
-
widthOverrides:
|
25870
|
+
widthOverrides: I
|
25854
25871
|
}, Ee = {
|
25855
25872
|
carouselSize: D,
|
25856
25873
|
variant: N,
|
@@ -25860,7 +25877,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25860
25877
|
// The Theme provider must wrap the component so that the styles don't break when imported into other applications.
|
25861
25878
|
/* @__PURE__ */ l(Vl, { theme: R, children: [
|
25862
25879
|
/* @__PURE__ */ t(eu, {}),
|
25863
|
-
/* @__PURE__ */ t(M0, { onEvent:
|
25880
|
+
/* @__PURE__ */ t(M0, { onEvent: j, onPageview: U, store: bn, children: /* @__PURE__ */ l(J0, { heightOverrides: r, widthOverrides: I, children: [
|
25864
25881
|
(e || !bn.isInitialized) && /* @__PURE__ */ t(eb, {}),
|
25865
25882
|
O && C && /* @__PURE__ */ t(
|
25866
25883
|
Q0,
|
@@ -25868,7 +25885,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25868
25885
|
clientColorScheme: i,
|
25869
25886
|
onCardClick: c,
|
25870
25887
|
posthog: u,
|
25871
|
-
widthOverrides:
|
25888
|
+
widthOverrides: I
|
25872
25889
|
}
|
25873
25890
|
),
|
25874
25891
|
O && !!n.length && /* @__PURE__ */ t(
|
@@ -25930,7 +25947,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25930
25947
|
}
|
25931
25948
|
);
|
25932
25949
|
}, ib = A(nb), ab = A(({ repeatingTransaction: e }) => {
|
25933
|
-
const { recurring: n } =
|
25950
|
+
const { recurring: n } = x(), { updateRepeatingTransaction: i } = $t(), { onEvent: a } = K(), [o, r] = g.useState(!1), s = e.repeating_transaction_type === dn.Income, c = [
|
25934
25951
|
{ id: Ne.EveryWeek, label: n.frequency_every_week },
|
25935
25952
|
{ id: Ne.EveryOtherWeek, label: n.frequency_every_other_week },
|
25936
25953
|
{ id: Ne.EveryMonth, label: n.frequency_every_month },
|
@@ -25951,7 +25968,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25951
25968
|
}
|
25952
25969
|
);
|
25953
25970
|
}, u = c.find((h) => h.id === e.recurrence_type);
|
25954
|
-
return /* @__PURE__ */ l(
|
25971
|
+
return /* @__PURE__ */ l(q, { children: [
|
25955
25972
|
/* @__PURE__ */ t(
|
25956
25973
|
Fn,
|
25957
25974
|
{
|
@@ -25985,7 +26002,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25985
26002
|
)
|
25986
26003
|
] });
|
25987
26004
|
}), ob = A(({ repeatingTransaction: e }) => {
|
25988
|
-
const { recurring: n } =
|
26005
|
+
const { recurring: n } = x(), { updateRepeatingTransaction: i } = $t(), { onEvent: a } = K(), o = Bi(e.predicted_occurs_on), [r, s] = g.useState(!1), [c, d] = g.useState(o), _ = e.repeating_transaction_type === dn.Income, u = () => {
|
25989
26006
|
d(o), s(!0), a(
|
25990
26007
|
_ ? "recurring_transactions_widget_income_details_click_next_payment_due" : "recurring_transactions_widget_expense_details_click_next_payment_due",
|
25991
26008
|
{
|
@@ -25998,7 +26015,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
25998
26015
|
predicted_occurs_on: ui(c, { representation: "date" })
|
25999
26016
|
}), s(!1);
|
26000
26017
|
};
|
26001
|
-
return /* @__PURE__ */ l(
|
26018
|
+
return /* @__PURE__ */ l(q, { children: [
|
26002
26019
|
/* @__PURE__ */ t(
|
26003
26020
|
Fn,
|
26004
26021
|
{
|
@@ -26029,7 +26046,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26029
26046
|
] });
|
26030
26047
|
}), hl = A(
|
26031
26048
|
({ onDeleted: e, recurringTransaction: n }) => {
|
26032
|
-
const { recurring: i } =
|
26049
|
+
const { recurring: i } = x(), { selectedAccountGuids: a } = ue(), { onEvent: o } = K(), { deleteRepeatingTransaction: r } = $t(), { setFilter: s } = Te(), { amount: c, description: d, merchant_guid: _ } = n, [u, h] = g.useState(!1), [m, C] = g.useState("");
|
26033
26050
|
g.useEffect(() => {
|
26034
26051
|
s({
|
26035
26052
|
accounts: a,
|
@@ -26067,7 +26084,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26067
26084
|
] })
|
26068
26085
|
] }),
|
26069
26086
|
/* @__PURE__ */ l(ie, { sx: { bgcolor: "background.paper" }, children: [
|
26070
|
-
n.account && /* @__PURE__ */ l(
|
26087
|
+
n.account && /* @__PURE__ */ l(q, { children: [
|
26071
26088
|
/* @__PURE__ */ t(
|
26072
26089
|
Fn,
|
26073
26090
|
{
|
@@ -26078,7 +26095,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26078
26095
|
),
|
26079
26096
|
/* @__PURE__ */ t(k, { color: "secondary", variant: "inset" })
|
26080
26097
|
] }),
|
26081
|
-
f?.category && /* @__PURE__ */ l(
|
26098
|
+
f?.category && /* @__PURE__ */ l(q, { children: [
|
26082
26099
|
/* @__PURE__ */ t(
|
26083
26100
|
Fn,
|
26084
26101
|
{
|
@@ -26135,7 +26152,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26135
26152
|
), gl = A(
|
26136
26153
|
({ onClick: e = () => {
|
26137
26154
|
}, repeatingTransaction: n }) => {
|
26138
|
-
const { recurring: i } =
|
26155
|
+
const { recurring: i } = x(), [a, o] = g.useState(!1), r = g.useMemo(
|
26139
26156
|
() => n.transactions.length === 0 ? "" : n.transactions[0].category_guid || "",
|
26140
26157
|
[n]
|
26141
26158
|
), s = n.account?.institutionName || "", c = n.repeating_transaction_type === dn.Income, d = mo(
|
@@ -26232,7 +26249,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26232
26249
|
onSearch: i,
|
26233
26250
|
onSelected: a
|
26234
26251
|
}) => {
|
26235
|
-
const { recurring: o } =
|
26252
|
+
const { recurring: o } = x(), { searchValue: r, setSearchValue: s } = vt();
|
26236
26253
|
return /* @__PURE__ */ l(y, { sx: { bgcolor: e, gap: 16, pt: 8 }, children: [
|
26237
26254
|
n && /* @__PURE__ */ t(Oe, { sx: { mx: 24 }, children: n }),
|
26238
26255
|
/* @__PURE__ */ t(
|
@@ -26260,7 +26277,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26260
26277
|
onNextDateChange: r,
|
26261
26278
|
transaction: s
|
26262
26279
|
}) => {
|
26263
|
-
const { recurring: c } =
|
26280
|
+
const { recurring: c } = x(), d = [
|
26264
26281
|
{ id: Ne.EveryWeek, label: c.frequency_every_week },
|
26265
26282
|
{ id: Ne.EveryOtherWeek, label: c.frequency_every_other_week },
|
26266
26283
|
{ id: Ne.EveryMonth, label: c.frequency_every_month },
|
@@ -26341,8 +26358,8 @@ const Yi = g.createContext(null), M0 = ({
|
|
26341
26358
|
label: n,
|
26342
26359
|
onAddRecurringTransaction: i = () => null
|
26343
26360
|
}) => {
|
26344
|
-
const { recurring: a } =
|
26345
|
-
() => s.find((
|
26361
|
+
const { recurring: a } = x(), { filter: o, setFilter: r, transactions: s } = Te(), { addRepeatingTransaction: c } = $t(), [d, _] = g.useState(!1), [u, h] = g.useState(""), [m, C] = g.useState(Ne.EveryMonth), [f, b] = g.useState(null), E = g.useMemo(
|
26362
|
+
() => s.find((I) => I.guid === u),
|
26346
26363
|
[u]
|
26347
26364
|
), S = () => {
|
26348
26365
|
_(!0), r(e ? { ...o, custom: jn } : { ...o, custom: Oi });
|
@@ -26352,7 +26369,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26352
26369
|
return;
|
26353
26370
|
}
|
26354
26371
|
i();
|
26355
|
-
const
|
26372
|
+
const I = {
|
26356
26373
|
account_guid: E.account_guid,
|
26357
26374
|
amount: E.amount,
|
26358
26375
|
merchant_guid: E.merchant_guid,
|
@@ -26363,7 +26380,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26363
26380
|
repeating_transaction_type: e ? dn.Income : dn.Bill,
|
26364
26381
|
transaction_type: E.transaction_type
|
26365
26382
|
};
|
26366
|
-
(m === Ne.EveryWeek || m === Ne.EveryOtherWeek) && (
|
26383
|
+
(m === Ne.EveryWeek || m === Ne.EveryOtherWeek) && (I.recurrence_day = oi(f)), await c(I, E), N();
|
26367
26384
|
}, N = () => {
|
26368
26385
|
h(""), _(!1);
|
26369
26386
|
};
|
@@ -26387,13 +26404,13 @@ const Yi = g.createContext(null), M0 = ({
|
|
26387
26404
|
rb,
|
26388
26405
|
{
|
26389
26406
|
description: e ? a.add_income_description : a.add_expense_description,
|
26390
|
-
onSearch: (
|
26407
|
+
onSearch: (I) => {
|
26391
26408
|
r({
|
26392
26409
|
...o,
|
26393
|
-
custom: (R) => e ?
|
26410
|
+
custom: (R) => e ? I ? Bo(R, I) : jn(R) : I ? xc(R, I) : Oi(R)
|
26394
26411
|
});
|
26395
26412
|
},
|
26396
|
-
onSelected: (
|
26413
|
+
onSelected: (I) => h(I)
|
26397
26414
|
}
|
26398
26415
|
)
|
26399
26416
|
}
|
@@ -26422,7 +26439,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26422
26439
|
] });
|
26423
26440
|
}
|
26424
26441
|
), cb = A(() => {
|
26425
|
-
const { recurring: e } =
|
26442
|
+
const { recurring: e } = x(), { repeatingTransactions: n } = $t(), { onEvent: i } = K(), a = (r) => {
|
26426
26443
|
i($.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
26427
26444
|
repeating_transaction_guid: r.guid
|
26428
26445
|
});
|
@@ -26437,7 +26454,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26437
26454
|
/* @__PURE__ */ t(ml, { label: e.add_expense, onAddRecurringTransaction: o })
|
26438
26455
|
] });
|
26439
26456
|
}), lb = A(() => {
|
26440
|
-
const { recurring: e } =
|
26457
|
+
const { recurring: e } = x(), { repeatingTransactions: n } = $t(), { onEvent: i } = K(), a = (r) => {
|
26441
26458
|
i($.RECURRING_TRANSACTIONS_CLICK_INCOME, {
|
26442
26459
|
repeating_transaction_guid: r.guid
|
26443
26460
|
});
|
@@ -26459,7 +26476,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26459
26476
|
)
|
26460
26477
|
] });
|
26461
26478
|
}), db = A(() => {
|
26462
|
-
const [e, n] = g.useState(0), { onEvent: i } = K(), { recurring: a } =
|
26479
|
+
const [e, n] = g.useState(0), { onEvent: i } = K(), { recurring: a } = x();
|
26463
26480
|
return /* @__PURE__ */ l(L, { bgcolor: "background.default", height: "100%", children: [
|
26464
26481
|
/* @__PURE__ */ l(
|
26465
26482
|
kt,
|
@@ -26493,7 +26510,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26493
26510
|
}
|
26494
26511
|
) }), Zo = ({ isOffset: e = !1, size: n = 16 }) => /* @__PURE__ */ t(Zt, { size: n, sx: { ...$a(e) }, children: /* @__PURE__ */ t(Rs, { color: "error", filled: !0, sx: { fontSize: n, ...Ha } }) }), Qo = ({ isOffset: e = !1, size: n = 16 }) => /* @__PURE__ */ t(Zt, { size: n, sx: { ...$a(e) }, children: /* @__PURE__ */ t(Ca, { color: "success", filled: !0, sx: { fontSize: n, ...Ha } }) }), ub = A(
|
26495
26512
|
({ day: e, outsideCurrentMonth: n, ...i }) => {
|
26496
|
-
const { recurring: a } =
|
26513
|
+
const { recurring: a } = x(), { selectedAccountGuids: o } = ue(), { recurrences: r, setSelectedDay: s } = $t(), d = g.useMemo(
|
26497
26514
|
() => r.filter((f) => o.includes(f.accountGuid)),
|
26498
26515
|
[o, r]
|
26499
26516
|
).filter(
|
@@ -26508,7 +26525,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26508
26525
|
return /* @__PURE__ */ t(
|
26509
26526
|
bo,
|
26510
26527
|
{
|
26511
|
-
badgeContent: d.length > 0 && /* @__PURE__ */ l(
|
26528
|
+
badgeContent: d.length > 0 && /* @__PURE__ */ l(q, { children: [
|
26512
26529
|
u && /* @__PURE__ */ t(Zo, { isOffset: !0 }),
|
26513
26530
|
h && /* @__PURE__ */ t(Qo, { isOffset: !0 }),
|
26514
26531
|
_ && /* @__PURE__ */ t(Xo, { isOffset: !0 }),
|
@@ -26550,7 +26567,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26550
26567
|
/* @__PURE__ */ t(e, {}),
|
26551
26568
|
/* @__PURE__ */ t(p, { variant: "XSmall", children: n })
|
26552
26569
|
] }), _b = A(() => {
|
26553
|
-
const { recurring: e } =
|
26570
|
+
const { recurring: e } = x();
|
26554
26571
|
return /* @__PURE__ */ l(
|
26555
26572
|
y,
|
26556
26573
|
{
|
@@ -26665,7 +26682,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26665
26682
|
},
|
26666
26683
|
showOrdinal: a = !1
|
26667
26684
|
}) => {
|
26668
|
-
const { recurring: o } =
|
26685
|
+
const { recurring: o } = x(), { repeatingTransactions: r } = $t(), [s, c] = g.useState(!1), d = g.useMemo(
|
26669
26686
|
() => r.find((b) => b.guid === e.repeatingTransactionGuid),
|
26670
26687
|
[e]
|
26671
26688
|
), _ = e.type === Xt.Income, u = e.status === st.Paid, h = e.status === st.Missed, m = e.status === st.Upcoming;
|
@@ -26693,7 +26710,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26693
26710
|
/* @__PURE__ */ t(y, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ l(y, { direction: "row", gap: 4, children: [
|
26694
26711
|
hb(e),
|
26695
26712
|
/* @__PURE__ */ t(p, { variant: "caption", children: gb(e, o) })
|
26696
|
-
] }) : /* @__PURE__ */ l(
|
26713
|
+
] }) : /* @__PURE__ */ l(q, { children: [
|
26697
26714
|
e.institutionGuid && /* @__PURE__ */ t(
|
26698
26715
|
bt,
|
26699
26716
|
{
|
@@ -26759,7 +26776,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26759
26776
|
sx: o = {},
|
26760
26777
|
title: r
|
26761
26778
|
}) => {
|
26762
|
-
const { recurring: s } =
|
26779
|
+
const { recurring: s } = x(), c = g.useMemo(() => zC(e), [e]);
|
26763
26780
|
return /* @__PURE__ */ l(y, { sx: { gap: 8, mt: 4, ...o }, children: [
|
26764
26781
|
r && /* @__PURE__ */ l(
|
26765
26782
|
y,
|
@@ -26803,7 +26820,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26803
26820
|
}
|
26804
26821
|
), Ss = A(
|
26805
26822
|
({ title: e, expected: n, paid: i, missed: a, total: o, onNewClick: r }) => {
|
26806
|
-
const s = me(), { recurring: c } =
|
26823
|
+
const s = me(), { recurring: c } = x(), d = g.useMemo(() => {
|
26807
26824
|
const _ = [{ color: s.palette.success.main, percentage: `${i / n}` }];
|
26808
26825
|
return a && _.push({ color: s.palette.error.main, percentage: `${a / n}` }), _;
|
26809
26826
|
}, [i, n, a]);
|
@@ -26814,7 +26831,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26814
26831
|
/* @__PURE__ */ l(y, { direction: "row", gap: 2, mb: 8, children: [
|
26815
26832
|
/* @__PURE__ */ t(p, { bold: !0, variant: "caption", children: B(i, "0,0.00") }),
|
26816
26833
|
/* @__PURE__ */ t(p, { variant: "caption", children: c.paid?.toLowerCase() }),
|
26817
|
-
a !== void 0 && /* @__PURE__ */ l(
|
26834
|
+
a !== void 0 && /* @__PURE__ */ l(q, { children: [
|
26818
26835
|
/* @__PURE__ */ t(p, { variant: "caption", children: "/" }),
|
26819
26836
|
/* @__PURE__ */ t(p, { bold: !0, variant: "caption", children: B(a, "0,0.00") }),
|
26820
26837
|
/* @__PURE__ */ t(p, { variant: "caption", children: c.missed?.toLowerCase() })
|
@@ -26830,7 +26847,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26830
26847
|
] });
|
26831
26848
|
}
|
26832
26849
|
), mb = A(() => {
|
26833
|
-
const { recurring: e } =
|
26850
|
+
const { recurring: e } = x(), { isMobile: n, isSmallTablet: i } = ye(), { onEvent: a } = K(), {
|
26834
26851
|
expenses: o,
|
26835
26852
|
expenseTotal: r,
|
26836
26853
|
income: s,
|
@@ -26842,15 +26859,15 @@ const Yi = g.createContext(null), M0 = ({
|
|
26842
26859
|
selectedDay: m,
|
26843
26860
|
selectedDayRecurrences: C,
|
26844
26861
|
upcomingRecurrences: f
|
26845
|
-
} = $t(), [b, E] = g.useState(0), S = (
|
26862
|
+
} = $t(), [b, E] = g.useState(0), S = (I, R) => {
|
26846
26863
|
E(R);
|
26847
|
-
}, v = (
|
26864
|
+
}, v = (I) => {
|
26848
26865
|
a($.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
26849
|
-
transaction_guid:
|
26866
|
+
transaction_guid: I.transaction?.guid
|
26850
26867
|
});
|
26851
|
-
}, N = (
|
26868
|
+
}, N = (I) => {
|
26852
26869
|
a($.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
26853
|
-
transaction_guid:
|
26870
|
+
transaction_guid: I.transaction?.guid
|
26854
26871
|
});
|
26855
26872
|
};
|
26856
26873
|
return /* @__PURE__ */ l(jt, { container: !0, sx: { pt: 16, px: 24, spacing: 24 }, children: [
|
@@ -26929,7 +26946,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26929
26946
|
] }) })
|
26930
26947
|
] });
|
26931
26948
|
}), v4 = A(({ onBackClick: e, sx: n = {} }) => {
|
26932
|
-
const { accounts: i } = ve(), { recurring: a } =
|
26949
|
+
const { accounts: i } = ve(), { recurring: a } = x(), { isCopyLoaded: o, isInitialized: r, selectedAccountGuids: s, setSelectedAccounts: c } = ue(), { isDataLoaded: d, loadRepeatingTransactions: _ } = $t(), { setFilter: u } = Te(), { onEvent: h } = K(), [m, C] = g.useState(!1);
|
26933
26950
|
return g.useEffect(() => {
|
26934
26951
|
c(i);
|
26935
26952
|
}, [i]), g.useEffect(() => {
|
@@ -26975,7 +26992,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26975
26992
|
}
|
26976
26993
|
) : /* @__PURE__ */ t(ge, {});
|
26977
26994
|
}), pb = A(() => {
|
26978
|
-
const { recurring: e } =
|
26995
|
+
const { recurring: e } = x(), { availableWidth: n } = Vn(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: o, upcomingRecurrences: r } = $t(), s = n < 750;
|
26979
26996
|
return /* @__PURE__ */ l(y, { flexDirection: s ? "column" : "row", width: "100%", children: [
|
26980
26997
|
/* @__PURE__ */ t(pl, {}),
|
26981
26998
|
!s && /* @__PURE__ */ t(k, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
@@ -26995,7 +27012,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
26995
27012
|
] });
|
26996
27013
|
}), w4 = A(
|
26997
27014
|
({ onPrimaryCtaClick: e, sx: n }) => {
|
26998
|
-
const { accounts: i } = ve(), { recurring: a } =
|
27015
|
+
const { accounts: i } = ve(), { recurring: a } = x(), { setFilter: o } = Te(), { isDataLoaded: r, loadRepeatingTransactions: s } = $t(), { isCopyLoaded: c, isInitialized: d, setSelectedAccounts: _, selectedAccountGuids: u } = ue();
|
26999
27016
|
return g.useEffect(() => {
|
27000
27017
|
d && _(i);
|
27001
27018
|
}, [d]), g.useEffect(() => {
|
@@ -27110,7 +27127,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
27110
27127
|
totalLabel: s,
|
27111
27128
|
variant: c = "mini"
|
27112
27129
|
}) => {
|
27113
|
-
const { spending: d } =
|
27130
|
+
const { spending: d } = x(), _ = wn(), { isTablet: u } = ye(), h = g.useMemo(
|
27114
27131
|
() => o ? e.categoryData.find((b) => b.guid === o) : void 0,
|
27115
27132
|
[o]
|
27116
27133
|
), m = g.useMemo(() => e.donutData.length > 0 ? e.donutData : [{ id: "0", color: _.palette.border.light, value: 100 }], [e, _]), C = () => {
|
@@ -27171,7 +27188,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
27171
27188
|
},
|
27172
27189
|
a.guid
|
27173
27190
|
)) }), bb = () => {
|
27174
|
-
const e = me(), { spending: n } =
|
27191
|
+
const e = me(), { spending: n } = x(), { selectedAccounts: i } = ue(), {
|
27175
27192
|
categories: a,
|
27176
27193
|
dateRangeCategoryTotals: o,
|
27177
27194
|
dataRangeTotalsLoaded: r,
|
@@ -27268,7 +27285,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
27268
27285
|
] }) })
|
27269
27286
|
] }) : /* @__PURE__ */ t(ge, { height: 250 });
|
27270
27287
|
}, yb = A(bb), Eb = ({ onPrimaryCtaClick: e, sx: n = {} }) => {
|
27271
|
-
const { spending: i } =
|
27288
|
+
const { spending: i } = x(), { isCopyLoaded: a } = ue();
|
27272
27289
|
return a ? /* @__PURE__ */ t(
|
27273
27290
|
Rn,
|
27274
27291
|
{
|
@@ -27286,7 +27303,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
27286
27303
|
selectedId: i = "",
|
27287
27304
|
title: a
|
27288
27305
|
}) => {
|
27289
|
-
const { spending: o } =
|
27306
|
+
const { spending: o } = x(), r = e.categoryData.find((s) => s.guid === i);
|
27290
27307
|
return /* @__PURE__ */ l(y, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
27291
27308
|
/* @__PURE__ */ t(p, { bold: !0, sx: { py: 12 }, children: `${a} ${o.by_category}` }),
|
27292
27309
|
/* @__PURE__ */ t(k, { "aria-hidden": "true" }),
|
@@ -27366,7 +27383,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
27366
27383
|
selectedId: a,
|
27367
27384
|
title: o
|
27368
27385
|
}) => {
|
27369
|
-
const { isDesktop: r, isMobile: s } = ye(), { isLoadingCategoryTotals: c } = ze(), { spending: d } =
|
27386
|
+
const { isDesktop: r, isMobile: s } = ye(), { isLoadingCategoryTotals: c } = ze(), { spending: d } = x();
|
27370
27387
|
return /* @__PURE__ */ l(
|
27371
27388
|
y,
|
27372
27389
|
{
|
@@ -27417,7 +27434,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
27417
27434
|
e.palette.chartMono.chartMono1,
|
27418
27435
|
e.palette.chartMono.chartMono6
|
27419
27436
|
], xb = () => {
|
27420
|
-
const e = wn(), { categories: n, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: a } = ze(), { spending: o } =
|
27437
|
+
const e = wn(), { categories: n, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: a } = ze(), { spending: o } = x(), { displayedDateRange: r, selectedAccounts: s, selectedAccountGuids: c } = ue(), { setFilter: d, sortedTransactions: _ } = Te(), [u, h] = g.useState(""), [m, C] = g.useState(0), [f, b] = g.useState(""), [E, S] = g.useState(!1);
|
27421
27438
|
g.useEffect(() => {
|
27422
27439
|
a(
|
27423
27440
|
s,
|
@@ -27431,7 +27448,7 @@ const Yi = g.createContext(null), M0 = ({
|
|
27431
27448
|
), N = g.useMemo(
|
27432
27449
|
() => fl(n, i, Ib(e)),
|
27433
27450
|
[n, i]
|
27434
|
-
),
|
27451
|
+
), I = g.useMemo(
|
27435
27452
|
() => _.find((O) => O.guid === f),
|
27436
27453
|
[f]
|
27437
27454
|
), R = (O, M) => {
|
@@ -27445,20 +27462,20 @@ const Yi = g.createContext(null), M0 = ({
|
|
27445
27462
|
};
|
27446
27463
|
if (m === 0)
|
27447
27464
|
if (O === "other") {
|
27448
|
-
const
|
27465
|
+
const j = v.categoryData.find((U) => U.guid === "other");
|
27449
27466
|
d({
|
27450
27467
|
...M,
|
27451
|
-
custom: (U) => !!
|
27468
|
+
custom: (U) => !!j?.categoryTotals?.find((W) => W.guid === U.top_level_category_guid)
|
27452
27469
|
});
|
27453
27470
|
} else
|
27454
27471
|
d({
|
27455
27472
|
...M,
|
27456
|
-
custom: (
|
27473
|
+
custom: (j) => O ? j.top_level_category_guid === O : j.top_level_category_guid !== w.INCOME
|
27457
27474
|
});
|
27458
27475
|
else
|
27459
27476
|
d({
|
27460
27477
|
...M,
|
27461
|
-
custom: (
|
27478
|
+
custom: (j) => O ? j.category_guid === O : j.top_level_category_guid === w.INCOME
|
27462
27479
|
});
|
27463
27480
|
S(!0);
|
27464
27481
|
};
|
@@ -27525,15 +27542,15 @@ const Yi = g.createContext(null), M0 = ({
|
|
27525
27542
|
oe,
|
27526
27543
|
{
|
27527
27544
|
ariaLabelClose: o.close_drawer_aria,
|
27528
|
-
isOpen: !!
|
27545
|
+
isOpen: !!I,
|
27529
27546
|
onClose: () => b(""),
|
27530
27547
|
title: o.transaction_details_drawer_title,
|
27531
|
-
children:
|
27548
|
+
children: I && /* @__PURE__ */ t(Zn, { transaction: I })
|
27532
27549
|
}
|
27533
27550
|
)
|
27534
27551
|
] });
|
27535
27552
|
}, vb = A(xb), wb = ({ onBackClick: e, sx: n = {} }) => {
|
27536
|
-
const { visibleAccounts: i } = ve(), { spending: a } =
|
27553
|
+
const { visibleAccounts: i } = ve(), { spending: a } = x(), { isCopyLoaded: o, isInitialized: r, setDisplayedDate: s, setSelectedAccounts: c } = ue(), { onEvent: d } = K(), [_, u] = g.useState(!1);
|
27537
27554
|
g.useEffect(() => {
|
27538
27555
|
c(i);
|
27539
27556
|
}, [i]), g.useEffect(() => {
|
@@ -27593,7 +27610,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27593
27610
|
const n = e.row[e.field];
|
27594
27611
|
return /* @__PURE__ */ t(y, { alignItems: "flex-end", tabIndex: e.tabIndex, children: /* @__PURE__ */ t(je, { amount: n, variant: "Small" }) });
|
27595
27612
|
}, Gb = ({ categoryGuid: e, topLevelCategoryGuid: n }) => {
|
27596
|
-
const { categories: i } =
|
27613
|
+
const { categories: i } = x(), a = Ia[e];
|
27597
27614
|
return /* @__PURE__ */ l(y, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
27598
27615
|
/* @__PURE__ */ t(
|
27599
27616
|
L,
|
@@ -27658,7 +27675,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27658
27675
|
(b) => b.category_guid === i || b.top_level_category_guid === i
|
27659
27676
|
) : e).reduce(
|
27660
27677
|
(b, E) => {
|
27661
|
-
const { category_guid: S, top_level_category_guid: v, month: N, total:
|
27678
|
+
const { category_guid: S, top_level_category_guid: v, month: N, total: I, year: R } = E, D = i ? S : v;
|
27662
27679
|
b[D] || (b[D] = {
|
27663
27680
|
id: D,
|
27664
27681
|
category: D,
|
@@ -27666,7 +27683,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27666
27683
|
top_level_category_guid: v
|
27667
27684
|
});
|
27668
27685
|
const H = re(new Date(R, N - 1), ae.MONTH_SHORT);
|
27669
|
-
return b[D][H] || (b[D][H] = 0), b[D][H] = b[D][H] +
|
27686
|
+
return b[D][H] || (b[D][H] = 0), b[D][H] = b[D][H] + I, b;
|
27670
27687
|
},
|
27671
27688
|
{}
|
27672
27689
|
);
|
@@ -27700,7 +27717,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27700
27717
|
isOpen: i,
|
27701
27718
|
onClose: a
|
27702
27719
|
}) => {
|
27703
|
-
const { onEvent: o } = K(), { selectedAccountGuids: r } = ue(), { common: s } =
|
27720
|
+
const { onEvent: o } = K(), { selectedAccountGuids: r } = ue(), { common: s } = x(), { setFilter: c, sortedTransactions: d } = Te(), [_, u] = g.useState(""), h = g.useMemo(() => d.find((C) => C.guid === _), [_]);
|
27704
27721
|
g.useEffect(() => {
|
27705
27722
|
c({
|
27706
27723
|
accounts: r,
|
@@ -27727,7 +27744,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27727
27744
|
}, Wb = A(Fb), Ub = {
|
27728
27745
|
view_transactions: "View Transactions"
|
27729
27746
|
}, Vb = ({ onBackClick: e, sx: n }) => {
|
27730
|
-
const i = it(), { onEvent: a } = K(), { isDesktop: o, isTablet: r, isMobile: s } = ye(), { visibleAccounts: c } = ve(), { loadMonthlyCategoryTotals: d, monthlyCategoryTotals: _, getCategoryName: u } = ze(), { sortedTransactions: h } = Te(), { isCopyLoaded: m, isInitialized: C, selectedAccounts: f, setSelectedAccounts: b } = ue(), { trends: E } =
|
27747
|
+
const i = it(), { onEvent: a } = K(), { isDesktop: o, isTablet: r, isMobile: s } = ye(), { visibleAccounts: c } = ve(), { loadMonthlyCategoryTotals: d, monthlyCategoryTotals: _, getCategoryName: u } = ze(), { sortedTransactions: h } = Te(), { isCopyLoaded: m, isInitialized: C, selectedAccounts: f, setSelectedAccounts: b } = ue(), { trends: E } = x(), S = i.palette.mode === "dark", [v, N] = g.useState(!1), [I, R] = g.useState(!1), [D, H] = g.useState("Chart"), [O, M] = g.useState(""), [j, U] = g.useState({
|
27731
27748
|
start: ur(qe(qt(/* @__PURE__ */ new Date(), 6)), 1),
|
27732
27749
|
end: qe(/* @__PURE__ */ new Date())
|
27733
27750
|
});
|
@@ -27736,18 +27753,18 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27736
27753
|
}, [c]), g.useEffect(() => {
|
27737
27754
|
C && d(
|
27738
27755
|
f,
|
27739
|
-
|
27740
|
-
|
27756
|
+
j.start,
|
27757
|
+
j.end
|
27741
27758
|
).finally(() => {
|
27742
27759
|
N(!0);
|
27743
27760
|
});
|
27744
|
-
}, [C, f,
|
27761
|
+
}, [C, f, j]);
|
27745
27762
|
const W = g.useMemo(() => {
|
27746
27763
|
if (!v) return { stackedDatasets: [], unstackedDatasets: [] };
|
27747
27764
|
const Re = Lb(
|
27748
27765
|
_,
|
27749
|
-
|
27750
|
-
|
27766
|
+
j.start,
|
27767
|
+
j.end
|
27751
27768
|
), ot = O.length ? Re.filter(
|
27752
27769
|
(Ye) => Ye.top_level_category_guid === O || Ye.category_guid === O
|
27753
27770
|
) : fm(Re);
|
@@ -27755,16 +27772,16 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27755
27772
|
stackedDatasets: ot.filter(pm),
|
27756
27773
|
unstackedDatasets: ot.filter(ka)
|
27757
27774
|
};
|
27758
|
-
}, [_, O,
|
27775
|
+
}, [_, O, j]), Ee = g.useMemo(() => {
|
27759
27776
|
const Re = re(
|
27760
|
-
|
27777
|
+
j.start,
|
27761
27778
|
s ? ae.MONTH_SHORT_YEAR : ae.MONTH_YEAR
|
27762
27779
|
), ot = re(
|
27763
|
-
|
27780
|
+
j.end,
|
27764
27781
|
s ? ae.MONTH_SHORT_YEAR : ae.MONTH_YEAR
|
27765
27782
|
);
|
27766
27783
|
return `${Re} - ${ot}`;
|
27767
|
-
}, [
|
27784
|
+
}, [j, s]), J = (Re, ot) => {
|
27768
27785
|
H(ot ?? D), a($.TRENDS_CLICK_TOGGLE);
|
27769
27786
|
}, pe = (Re) => {
|
27770
27787
|
const ot = ur(Re?.[0], 1), Ye = Re?.[1], ce = tu(Ye, ot);
|
@@ -27789,7 +27806,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27789
27806
|
{
|
27790
27807
|
accountOptions: c,
|
27791
27808
|
calendarActions: { onRangeChanged: pe },
|
27792
|
-
dateRange:
|
27809
|
+
dateRange: j,
|
27793
27810
|
dateRangeVariant: "timeframebuttons",
|
27794
27811
|
onAccountsFilterClick: Z,
|
27795
27812
|
onBackClick: e,
|
@@ -27895,7 +27912,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27895
27912
|
monthlyCategoryTotals: _,
|
27896
27913
|
onClickRow: Q,
|
27897
27914
|
selectedCategory: O,
|
27898
|
-
selectedDateRange:
|
27915
|
+
selectedDateRange: j
|
27899
27916
|
}
|
27900
27917
|
)
|
27901
27918
|
] })
|
@@ -27906,8 +27923,8 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27906
27923
|
Wb,
|
27907
27924
|
{
|
27908
27925
|
categoryGuid: O,
|
27909
|
-
dateRange:
|
27910
|
-
isOpen:
|
27926
|
+
dateRange: j,
|
27927
|
+
isOpen: I,
|
27911
27928
|
onClose: () => R(!1)
|
27912
27929
|
}
|
27913
27930
|
)
|
@@ -27915,7 +27932,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27915
27932
|
}
|
27916
27933
|
);
|
27917
27934
|
}, R4 = A(Vb), Kb = () => {
|
27918
|
-
const e = it(), { monthlyCategoryTotals: n } = ze(), { trends: i } =
|
27935
|
+
const e = it(), { monthlyCategoryTotals: n } = ze(), { trends: i } = x(), a = Sm(n);
|
27919
27936
|
return /* @__PURE__ */ t(
|
27920
27937
|
xo,
|
27921
27938
|
{
|
@@ -27931,7 +27948,7 @@ const Ob = (e) => e.reduce((i, a) => {
|
|
27931
27948
|
}
|
27932
27949
|
);
|
27933
27950
|
}, zb = A(Kb), Yb = ({ onPrimaryCtaClick: e, sx: n }) => {
|
27934
|
-
const { loadMonthlyCategoryTotals: i, monthlyTotalsLoaded: a } = ze(), { isInitialized: o } = wa(), { trends: r } =
|
27951
|
+
const { loadMonthlyCategoryTotals: i, monthlyTotalsLoaded: a } = ze(), { isInitialized: o } = wa(), { trends: r } = x(), { isCopyLoaded: s, selectedAccounts: c } = ue();
|
27935
27952
|
return g.useEffect(() => {
|
27936
27953
|
o && i(c).finally();
|
27937
27954
|
}, [o, c]), s ? /* @__PURE__ */ t(
|
@@ -28111,7 +28128,7 @@ export {
|
|
28111
28128
|
H2 as StatusName,
|
28112
28129
|
b4 as SurveyMiniWidget,
|
28113
28130
|
hn as TOUCH_TARGET,
|
28114
|
-
|
28131
|
+
X as TRANSACTION_EVENTS,
|
28115
28132
|
li as TabContentContainer,
|
28116
28133
|
so as ToggleButtonListItem,
|
28117
28134
|
ii as ToggleListItem,
|
@@ -28172,7 +28189,7 @@ export {
|
|
28172
28189
|
va as useDebtStore,
|
28173
28190
|
K as useEvent,
|
28174
28191
|
QC as useGetMergeableAccounts,
|
28175
|
-
|
28192
|
+
x as useGlobalCopyStore,
|
28176
28193
|
wa as useGlobalStore,
|
28177
28194
|
ue as useGlobalUiStore,
|
28178
28195
|
lt as useGoalStore,
|