@mx-cartographer/experiences 7.0.59-alpha.al0 → 7.0.59

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.
@@ -1,58 +1,59 @@
1
- import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
2
- import u, { useState as J } from "react";
1
+ import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
2
+ import f, { useState as K } from "react";
3
3
  import { observer as T } from "mobx-react-lite";
4
4
  import { addMonths as qe } from "date-fns/addMonths";
5
- import { startOfToday as M } from "date-fns/startOfToday";
5
+ import { startOfToday as F } from "date-fns/startOfToday";
6
6
  import I from "@mui/material/Box";
7
- import H from "@mui/material/Button";
8
7
  import D from "@mui/material/Divider";
9
8
  import s from "@mui/material/Stack";
10
9
  import ie from "@mui/material/styles/useTheme";
11
- import { Text as d, P as k, Icon as F, InstitutionLogo as xe, H1 as le, H2 as Xe } from "@mxenabled/mxui";
12
- import { G as Ye, t as de, u as O, p as re, d as Oe, b as Y, o as me, j as q, g as Ne, h as ke } from "../hooks-CE2TKk4a.mjs";
13
- import { C as L } from "../CurrencyText-YUhH2caW.mjs";
14
- import { u as ue } from "../useScreenSize-B6JyS_Lj.mjs";
15
- import { L as se } from "../Loader-DUaFpDGv.mjs";
16
- import { I as he } from "../CashflowStore-D9Dpuz7X.mjs";
17
- import { C as Wn } from "../CashflowStore-D9Dpuz7X.mjs";
18
- import { b as X } from "../Localization-2MODESHW.mjs";
10
+ import { Text as u, P as N, Icon as G, InstitutionLogo as be, H1 as ce, H2 as Xe } from "@mxenabled/mxui";
11
+ import { G as Ye, t as le, u as L, p as re, d as Le, b as X, j as P, g as Ne, o as Oe, h as ke } from "../hooks-CE2TKk4a.mjs";
12
+ import { C as R } from "../CurrencyText-YUhH2caW.mjs";
13
+ import { u as de } from "../useScreenSize-B6JyS_Lj.mjs";
14
+ import { L as ee } from "../Loader-DUaFpDGv.mjs";
15
+ import { I as me } from "../CashflowStore-D9Dpuz7X.mjs";
16
+ import { C as Mn } from "../CashflowStore-D9Dpuz7X.mjs";
17
+ import { b as q } from "../Localization-2MODESHW.mjs";
19
18
  import { M as Qe } from "../MiniWidgetContainer-DTQdRK-3.mjs";
20
- import { R as Ve } from "../RecurringSettings-qv7DNYac.mjs";
21
- import Ke from "@mui/material/Tabs";
22
- import Ce from "@mui/material/Tab";
23
- import { getUnixTime as U } from "date-fns/getUnixTime";
24
- import ee from "@mui/material/List";
19
+ import { E as Ve } from "../EmptyState-DsXpMcro.mjs";
20
+ import { R as Ke } from "../RecurringSettings-B486z99o.mjs";
21
+ import Je from "@mui/material/Tabs";
22
+ import xe from "@mui/material/Tab";
23
+ import { getUnixTime as B } from "date-fns/getUnixTime";
24
+ import Z from "@mui/material/List";
25
25
  import te from "@mui/material/ListItem";
26
- import { A as Je } from "../AccountListItem-BAdwVscV.mjs";
27
- import { f as Q, D as V } from "../Dialog-CWW597AF.mjs";
28
- import Ze from "@mui/material/ListSubheader";
29
- import { f as Z } from "../NumberFormatting-CtWHhyBX.mjs";
26
+ import { A as Ze } from "../AccountListItem-BAdwVscV.mjs";
27
+ import { f as Y, D as Q } from "../Dialog-CWW597AF.mjs";
28
+ import et from "@mui/material/ListSubheader";
29
+ import { f as J } from "../NumberFormatting-CtWHhyBX.mjs";
30
30
  import { isAfter as He } from "date-fns/isAfter";
31
31
  import { isBefore as Fe } from "date-fns/isBefore";
32
32
  import { isToday as We } from "date-fns/isToday";
33
33
  import { addDays as ye } from "date-fns/addDays";
34
- import { alpha as et, keyframes as tt } from "@mui/material/styles";
35
- import { DataGridPro as nt } from "@mui/x-data-grid-pro";
36
- import { T as Se } from "../TabContentContainer-j01JYR_7.mjs";
37
- import { M as ot, S as at, i as it, d as _e, c as rt } from "../ManageIncome-BX7dzGF8.mjs";
34
+ import { alpha as tt, keyframes as nt } from "@mui/material/styles";
35
+ import { DataGridPro as ot } from "@mui/x-data-grid-pro";
36
+ import { T as Ce } from "../TabContentContainer-j01JYR_7.mjs";
37
+ import M from "@mui/material/Button";
38
+ import { M as at, S as it, i as rt, d as Se, c as st } from "../ManageIncome-BX7dzGF8.mjs";
38
39
  import { D as $e } from "../Drawer-kEE73B87.mjs";
39
- import { formatISO as st } from "date-fns/formatISO";
40
- import { fromUnixTime as we } from "date-fns/fromUnixTime";
41
- import { startOfMonth as ct } from "date-fns/startOfMonth";
40
+ import { formatISO as ct } from "date-fns/formatISO";
41
+ import { fromUnixTime as _e } from "date-fns/fromUnixTime";
42
+ import { startOfMonth as lt } from "date-fns/startOfMonth";
42
43
  import { subDays as Me } from "date-fns/subDays";
43
- import { S as lt, b as dt } from "../TransactionDetails-DAp_CPCP.mjs";
44
- import { F as mt, R as Ie, e as De } from "../RecurringTransactions-DTUx9VN1.mjs";
45
- import { h as ut } from "../DateUtil-BcuH7ErC.mjs";
46
- import { endOfToday as ht } from "date-fns/endOfToday";
47
- import { W as ve, A as Ae } from "../WidgetContainer-B8MRJ5Y1.mjs";
48
- import { F as pt, A as B } from "../Fetch-87LIQbEA.mjs";
49
- const K = () => {
50
- if (!u.useContext(Ye))
44
+ import { S as dt, b as mt } from "../TransactionDetails-DAp_CPCP.mjs";
45
+ import { F as ut, R as we, e as Ie } from "../RecurringTransactions-DTUx9VN1.mjs";
46
+ import { h as ht } from "../DateUtil-BcuH7ErC.mjs";
47
+ import { endOfToday as pt } from "date-fns/endOfToday";
48
+ import { W as De, A as ve } from "../WidgetContainer-B8MRJ5Y1.mjs";
49
+ import { F as ft, A as z } from "../Fetch-87LIQbEA.mjs";
50
+ const V = () => {
51
+ if (!f.useContext(Ye))
51
52
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
52
- return de().uiStore;
53
- }, ft = ({ remaining: a }) => {
54
- const { cashflow: n } = O();
55
- return /* @__PURE__ */ o(P, { children: [
53
+ return le().uiStore;
54
+ }, gt = ({ remaining: a }) => {
55
+ const { cashflow: n } = L();
56
+ return /* @__PURE__ */ o(U, { children: [
56
57
  /* @__PURE__ */ e(
57
58
  I,
58
59
  {
@@ -64,92 +65,84 @@ const K = () => {
64
65
  }
65
66
  }
66
67
  ),
67
- /* @__PURE__ */ e(d, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
68
- /* @__PURE__ */ e(L, { amount: a, bold: !0, sx: { fontSize: 12 } })
68
+ /* @__PURE__ */ e(u, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
69
+ /* @__PURE__ */ e(R, { amount: a, bold: !0, sx: { fontSize: 12 } })
69
70
  ] });
70
- }, pe = T(ft), gt = ({ onAddIncomeClick: a }) => {
71
- const n = ie(), { availableWidth: t } = re(), { isMobile: r } = ue(), { visibleCashAccounts: c, visibleCashBalance: f } = Oe(), { selectedAccounts: m, selectedAccountGuids: g, setSelectedAccounts: C } = Y(), { cashflow: i } = O(), { userProfile: b } = me(), {
72
- daysUntilNextIncome: l,
73
- expensesTilNextIncome: h,
74
- selectedCashAccounts: y,
75
- setNextIncome: S,
76
- setSelectedCashAccounts: v,
77
- setUpcomingExpenses: p
78
- } = K(), { isDataLoaded: N, nextIncomeRecurrence: _, upcomingExpenses: j } = q();
79
- u.useEffect(() => {
80
- C(c);
81
- }, [c]), u.useEffect(() => {
82
- v(
83
- c.filter((R) => g.includes(R.guid))
71
+ }, ue = T(gt), bt = () => {
72
+ const a = ie(), { availableWidth: n } = re(), { isMobile: t } = de(), { visibleCashAccounts: i, visibleCashBalance: h } = Le(), { selectedAccounts: g, selectedAccountGuids: l, setSelectedAccounts: y } = X(), { cashflow: c } = L(), {
73
+ daysUntilNextIncome: r,
74
+ expensesTilNextIncome: m,
75
+ selectedCashAccounts: d,
76
+ setNextIncome: b,
77
+ setSelectedCashAccounts: C,
78
+ setUpcomingExpenses: S
79
+ } = V(), { isDataLoaded: v, nextIncomeRecurrence: p, upcomingExpenses: E } = P();
80
+ f.useEffect(() => {
81
+ y(i);
82
+ }, [i]), f.useEffect(() => {
83
+ C(
84
+ i.filter((w) => l.includes(w.guid))
84
85
  );
85
- }, [c, m]), u.useEffect(() => {
86
- _ && S(_), p(j);
87
- }, [_, j]);
88
- const G = u.useMemo(
89
- () => c.filter((R) => g.includes(R.guid)).reduce((R, w) => R + (w?.balance || 0), 0),
90
- [g, j]
91
- ), W = u.useMemo(
92
- () => h.filter((R) => g.includes(R.accountGuid || "")).reduce((R, w) => R + w.amount, 0),
93
- [g, h]
94
- ), z = u.useMemo(
95
- () => G - W,
96
- [G, W]
97
- ), A = b?.has_completed_cash_flow_onboarding && !!a;
98
- return N ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 710 ? /* @__PURE__ */ o(
86
+ }, [i, g]), f.useEffect(() => {
87
+ p && b(p), S(E);
88
+ }, [p, E]);
89
+ const _ = f.useMemo(
90
+ () => i.filter((w) => l.includes(w.guid)).reduce((w, $) => w + ($?.balance || 0), 0),
91
+ [l, E]
92
+ ), W = f.useMemo(
93
+ () => m.filter((w) => l.includes(w.accountGuid || "")).reduce((w, $) => w + $.amount, 0),
94
+ [l, m]
95
+ ), j = f.useMemo(
96
+ () => _ - W,
97
+ [_, W]
98
+ );
99
+ return v ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
99
100
  s,
100
101
  {
101
- border: `1px solid ${n.palette.border.light}`,
102
+ border: `1px solid ${a.palette.border.light}`,
102
103
  borderRadius: 1,
103
104
  direction: "row",
104
105
  justifyContent: "space-between",
105
106
  px: 24,
106
107
  children: [
107
108
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
108
- /* @__PURE__ */ e(L, { amount: G, variant: "H2" }),
109
- /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(
110
- i.total_cash_accounts,
111
- y.length
109
+ /* @__PURE__ */ e(R, { amount: _, variant: "H2" }),
110
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(
111
+ c.total_cash_accounts,
112
+ d.length
112
113
  ) })
113
114
  ] }),
114
- /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(F, { name: "remove" }) }),
115
+ /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(G, { name: "remove" }) }),
115
116
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
116
- /* @__PURE__ */ e(L, { amount: W, variant: "H2" }),
117
- /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(i.expenses_due, h.length) })
117
+ /* @__PURE__ */ e(R, { amount: W, variant: "H2" }),
118
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(c.expenses_due, m.length) })
118
119
  ] }),
119
- /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(F, { name: "equal" }) }),
120
+ /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(G, { name: "equal" }) }),
120
121
  /* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
121
- /* @__PURE__ */ e(L, { amount: z, variant: "H2" }),
122
+ /* @__PURE__ */ e(R, { amount: j, variant: "H2" }),
122
123
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
123
- /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: i.available_to_spend }),
124
- /* @__PURE__ */ e(he, { body: i.tooltip_body, title: i.tooltip_title })
124
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
125
+ /* @__PURE__ */ e(me, { body: c.tooltip_body, title: c.tooltip_title })
125
126
  ] })
126
127
  ] }),
127
- /* @__PURE__ */ e(s, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: A ? /* @__PURE__ */ o(P, { children: [
128
- /* @__PURE__ */ e(d, { variant: "H2", children: X(i.days, l) }),
129
- /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: i.next_paycheck })
130
- ] }) : /* @__PURE__ */ e(
131
- H,
132
- {
133
- onClick: a,
134
- startIcon: /* @__PURE__ */ e(F, { name: "add" }),
135
- sx: { fontSize: 13, lineHeight: "initial" },
136
- children: i.add_income
137
- }
138
- ) })
128
+ /* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(U, { children: [
129
+ /* @__PURE__ */ e(u, { variant: "H2", children: q(c.days, r) }),
130
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
131
+ ] }) })
139
132
  ]
140
133
  }
141
- ) : /* @__PURE__ */ o(s, { border: `1px solid ${n.palette.border.light}`, borderRadius: 1, children: [
134
+ ) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
142
135
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
143
- /* @__PURE__ */ e(d, { variant: "Small", children: X(
144
- i.total_cash_accounts,
145
- y.length
136
+ /* @__PURE__ */ e(u, { variant: "Small", children: q(
137
+ c.total_cash_accounts,
138
+ d.length
146
139
  ) }),
147
- /* @__PURE__ */ e(L, { amount: f, bold: !0, variant: "XSmall" })
140
+ /* @__PURE__ */ e(R, { amount: h, bold: !0, variant: "XSmall" })
148
141
  ] }),
149
142
  /* @__PURE__ */ e(D, {}),
150
143
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
151
- /* @__PURE__ */ e(d, { variant: "Small", children: X(i.expenses_due, h.length) }),
152
- /* @__PURE__ */ e(L, { amount: W, bold: !0, symbol: "-", variant: "XSmall" })
144
+ /* @__PURE__ */ e(u, { variant: "Small", children: q(c.expenses_due, m.length) }),
145
+ /* @__PURE__ */ e(R, { amount: W, bold: !0, symbol: "-", variant: "XSmall" })
153
146
  ] }),
154
147
  /* @__PURE__ */ e(D, {}),
155
148
  /* @__PURE__ */ e(
@@ -163,58 +156,51 @@ const K = () => {
163
156
  justifyContent: "space-between",
164
157
  px: 16,
165
158
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
166
- children: /* @__PURE__ */ e(pe, { remaining: z })
159
+ children: /* @__PURE__ */ e(ue, { remaining: j })
167
160
  }
168
161
  ),
169
162
  /* @__PURE__ */ e(D, {}),
170
- A ? /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
171
- /* @__PURE__ */ e(d, { variant: "Small", children: i.next_paycheck }),
172
- /* @__PURE__ */ e(d, { bold: !0, variant: "XSmall", children: X(i.days, l) })
173
- ] }) : /* @__PURE__ */ o(
174
- s,
175
- {
176
- alignItems: "center",
177
- direction: "row",
178
- justifyContent: "space-between",
179
- pl: 16,
180
- pr: 2,
181
- py: 2,
182
- children: [
183
- /* @__PURE__ */ e(d, { variant: "Small", children: i.next_paycheck }),
184
- /* @__PURE__ */ e(
185
- H,
186
- {
187
- onClick: a,
188
- startIcon: /* @__PURE__ */ e(F, { name: "add" }),
189
- sx: { fontSize: 13 },
190
- children: i.add_income
191
- }
192
- )
193
- ]
194
- }
195
- )
196
- ] }) }) : /* @__PURE__ */ e(se, { height: r ? 210 : 120 });
197
- }, bt = T(gt), xt = ({
163
+ /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
164
+ /* @__PURE__ */ e(u, { variant: "Small", children: c.next_paycheck }),
165
+ /* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: q(c.days, r) })
166
+ ] })
167
+ ] }) }) : /* @__PURE__ */ e(ee, { height: t ? 210 : 120 });
168
+ }, xt = T(bt), yt = ({
198
169
  onPrimaryCtaClick: a,
199
170
  onSecondaryCtaClick: n,
200
171
  sx: t = {}
201
172
  }) => {
202
- const { cashflow: r } = O(), { isCopyLoaded: c, isInitialized: f } = Y(), { loadRepeatingTransactions: m, setDateRange: g } = q();
203
- return u.useEffect(() => {
204
- f && (g({ start: M(), end: qe(M(), 1) }), m().finally());
205
- }, [f]), c ? /* @__PURE__ */ e(
173
+ const { cashflow: i } = L(), { isCopyLoaded: h, isInitialized: g } = X(), { loadRepeatingTransactions: l, income: y, isDataLoaded: c, setDateRange: r } = P();
174
+ f.useEffect(() => {
175
+ g && (r({ start: F(), end: qe(F(), 1) }), l().finally());
176
+ }, [g]);
177
+ const m = c && !y.length;
178
+ return h ? /* @__PURE__ */ o(
206
179
  Qe,
207
180
  {
208
181
  className: "mx-exp-cashflow-miniwidget",
209
182
  onPrimaryCtaClick: a,
210
- primaryCtaLabel: r.primary_cta,
211
- subTitle: r.sub_title,
183
+ primaryCtaLabel: i.primary_cta,
184
+ subTitle: m || !c ? void 0 : i.sub_title,
212
185
  sx: t,
213
- title: r.title,
214
- children: /* @__PURE__ */ e(bt, { onAddIncomeClick: n })
186
+ title: i.title,
187
+ children: [
188
+ !c && /* @__PURE__ */ e(ee, {}),
189
+ c && (m ? /* @__PURE__ */ e(
190
+ Ve,
191
+ {
192
+ header: i.create,
193
+ icon: "local_atm",
194
+ onClick: n,
195
+ primaryButton: i.add_income,
196
+ primaryButtonStartIcon: "add",
197
+ subText: i.create_description
198
+ }
199
+ ) : /* @__PURE__ */ e(xt, {}))
200
+ ]
215
201
  }
216
- ) : /* @__PURE__ */ e(se, {});
217
- }, On = T(xt), Ct = ({ remaining: a }) => /* @__PURE__ */ e(
202
+ ) : /* @__PURE__ */ e(ee, {});
203
+ }, kn = T(yt), Ct = ({ remaining: a }) => /* @__PURE__ */ e(
218
204
  te,
219
205
  {
220
206
  sx: {
@@ -227,19 +213,19 @@ const K = () => {
227
213
  borderBottomRightRadius: "3px",
228
214
  minHeight: "auto"
229
215
  },
230
- children: /* @__PURE__ */ e(pe, { remaining: a })
216
+ children: /* @__PURE__ */ e(ue, { remaining: a })
231
217
  }
232
218
  );
233
219
  var ne = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(ne || {});
234
- const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
220
+ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
235
221
  /* @__PURE__ */ o(te, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
236
222
  /* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
237
- /* @__PURE__ */ e(d, { bold: !0, sx: { fontSize: 11 }, children: Q(a.expectedDate, V.MONTH) }),
238
- /* @__PURE__ */ e(d, { bold: !0, sx: { fontSize: 11 }, children: Q(a.expectedDate, V.DAY) })
223
+ /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.MONTH) }),
224
+ /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.DAY) })
239
225
  ] }),
240
- /* @__PURE__ */ e(d, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
226
+ /* @__PURE__ */ e(u, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
241
227
  /* @__PURE__ */ e(
242
- L,
228
+ R,
243
229
  {
244
230
  amount: a.amount,
245
231
  bold: !0,
@@ -248,11 +234,11 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
248
234
  )
249
235
  ] }),
250
236
  /* @__PURE__ */ e(D, {})
251
- ] }), Ee = T(yt), St = ({ total: a, type: n }) => {
252
- const { cashflow: t } = O();
253
- return /* @__PURE__ */ o(P, { children: [
237
+ ] }), Ee = T(St), _t = ({ total: a, type: n }) => {
238
+ const { cashflow: t } = L();
239
+ return /* @__PURE__ */ o(U, { children: [
254
240
  /* @__PURE__ */ o(
255
- Ze,
241
+ et,
256
242
  {
257
243
  sx: {
258
244
  alignItems: "center",
@@ -264,40 +250,40 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
264
250
  px: 24
265
251
  },
266
252
  children: [
267
- /* @__PURE__ */ e(d, { bold: !0, sx: { fontSize: 12 }, children: n === ne.EXPENSE ? t.expenses : t.income }),
268
- /* @__PURE__ */ o(d, { bold: !0, sx: { fontSize: 13 }, children: [
253
+ /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 12 }, children: n === ne.EXPENSE ? t.expenses : t.income }),
254
+ /* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 13 }, children: [
269
255
  n === ne.EXPENSE ? "-" : "+",
270
- Z(a, "0,0.00")
256
+ J(a, "0,0.00")
271
257
  ] })
272
258
  ]
273
259
  }
274
260
  ),
275
261
  /* @__PURE__ */ e(D, {})
276
262
  ] });
277
- }, Te = T(St), ae = (a, n) => (t) => t.accountGuid === a.guid && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), _t = () => {
278
- const { availableWidth: a } = re(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: r } = q(), { dateRange: c, selectedCashAccounts: f } = K();
263
+ }, Ae = T(_t), ae = (a, n) => (t) => t.accountGuid === a.guid && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), wt = () => {
264
+ const { availableWidth: a } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: i } = P(), { dateRange: h, selectedCashAccounts: g } = V();
279
265
  return /* @__PURE__ */ o(s, { children: [
280
266
  /* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
281
- /* @__PURE__ */ e(d, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
282
- /* @__PURE__ */ o(d, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
283
- Q(c.start, V.FULL_MONTH_DAY),
267
+ /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
268
+ /* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
269
+ Y(h.start, Q.FULL_MONTH_DAY),
284
270
  " -",
285
271
  " ",
286
- Q(c.end, V.FULL_MONTH_DAY)
272
+ Y(h.end, Q.FULL_MONTH_DAY)
287
273
  ] })
288
274
  ] }),
289
- /* @__PURE__ */ e(s, { children: f.map((m) => {
290
- const g = r.filter(ae(m, c)).sort((l, h) => U(l.expectedDate) - U(h.expectedDate)), C = t.filter(
291
- ae(m, c)
292
- ), i = g.reduce(
293
- (l, h) => l + h.amount,
275
+ /* @__PURE__ */ e(s, { children: g.map((l) => {
276
+ const y = i.filter(ae(l, h)).sort((d, b) => B(d.expectedDate) - B(b.expectedDate)), c = t.filter(
277
+ ae(l, h)
278
+ ), r = y.reduce(
279
+ (d, b) => d + b.amount,
294
280
  0
295
- ), b = C.reduce(
296
- (l, h) => l + h.amount,
281
+ ), m = c.reduce(
282
+ (d, b) => d + b.amount,
297
283
  0
298
284
  );
299
285
  return /* @__PURE__ */ o(
300
- ee,
286
+ Z,
301
287
  {
302
288
  sx: {
303
289
  border: "1px solid",
@@ -307,9 +293,9 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
307
293
  },
308
294
  children: [
309
295
  /* @__PURE__ */ e(
310
- Je,
296
+ Ze,
311
297
  {
312
- account: m,
298
+ account: l,
313
299
  listItemProps: {
314
300
  disableGutters: !1,
315
301
  disablePadding: !1,
@@ -318,52 +304,52 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
318
304
  }
319
305
  ),
320
306
  /* @__PURE__ */ e(D, {}),
321
- g.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
322
- ee,
307
+ y.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
308
+ Z,
323
309
  {
324
- subheader: /* @__PURE__ */ e(Te, { total: i, type: ne.INCOME }),
310
+ subheader: /* @__PURE__ */ e(Ae, { total: r, type: ne.INCOME }),
325
311
  sx: { width: "100%" },
326
- children: g.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
312
+ children: y.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
327
313
  }
328
314
  ) }),
329
- C.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
330
- ee,
315
+ c.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
316
+ Z,
331
317
  {
332
- subheader: /* @__PURE__ */ e(Te, { total: b, type: ne.EXPENSE }),
318
+ subheader: /* @__PURE__ */ e(Ae, { total: m, type: ne.EXPENSE }),
333
319
  sx: { width: "100%" },
334
- children: C.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
320
+ children: c.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
335
321
  }
336
322
  ) }),
337
323
  /* @__PURE__ */ e(
338
324
  Ct,
339
325
  {
340
- remaining: (m.available_balance || m.balance || 0) + i - b
326
+ remaining: (l.available_balance || l.balance || 0) + r - m
341
327
  }
342
328
  )
343
329
  ]
344
330
  },
345
- m.guid
331
+ l.guid
346
332
  );
347
333
  }) })
348
334
  ] });
349
- }, wt = T(_t), It = () => {
350
- const { availableWidth: a } = re(), n = ie(), { cashflow: t } = O(), { upcomingExpenses: r, upcomingIncome: c } = q(), { dateRange: f, selectedCashAccounts: m } = K(), g = [
335
+ }, It = T(wt), Dt = () => {
336
+ const { availableWidth: a } = re(), n = ie(), { cashflow: t } = L(), { upcomingExpenses: i, upcomingIncome: h } = P(), { dateRange: g, selectedCashAccounts: l } = V(), y = [
351
337
  {
352
338
  field: "account",
353
339
  flex: 1.5,
354
340
  headerName: t.accounts,
355
- renderCell: ({ value: { name: i, nickname: b, institution_guid: l, account_number: h } }) => {
356
- const y = b || i;
341
+ renderCell: ({ value: { name: r, nickname: m, institution_guid: d, account_number: b } }) => {
342
+ const C = m || r;
357
343
  return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
358
344
  /* @__PURE__ */ e(
359
- xe,
345
+ be,
360
346
  {
361
347
  alt: t.institution_logo,
362
- institutionGuid: l || "",
348
+ institutionGuid: d || "",
363
349
  size: 16
364
350
  }
365
351
  ),
366
- /* @__PURE__ */ e(d, { variant: "body2", children: `${y} ${h ? `*${h}` : ""}` })
352
+ /* @__PURE__ */ e(u, { variant: "body2", children: `${C} ${b ? `*${b}` : ""}` })
367
353
  ] });
368
354
  }
369
355
  },
@@ -372,54 +358,54 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
372
358
  flex: 1,
373
359
  headerName: t.balance,
374
360
  type: "number",
375
- renderCell: (i) => /* @__PURE__ */ e(d, { color: n.palette.text.primary, variant: "Small", children: Z(i.value, "0,0.00") })
361
+ renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: J(r.value, "0,0.00") })
376
362
  },
377
363
  {
378
364
  field: "income",
379
365
  flex: 1,
380
366
  headerName: t.projected_income,
381
367
  type: "number",
382
- renderCell: (i) => /* @__PURE__ */ e(d, { color: n.palette.text.primary, variant: "Small", children: `+${Z(i.value, "0,0.00")}` })
368
+ renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `+${J(r.value, "0,0.00")}` })
383
369
  },
384
370
  {
385
371
  field: "expenses",
386
372
  flex: 1.1,
387
373
  headerName: t.projected_expenses,
388
374
  type: "number",
389
- renderCell: (i) => /* @__PURE__ */ e(d, { color: n.palette.text.primary, variant: "Small", children: `-${Z(i.value, "0,0.00")}` })
375
+ renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `-${J(r.value, "0,0.00")}` })
390
376
  },
391
377
  {
392
378
  field: "remaining",
393
379
  flex: 1,
394
380
  headerName: t.remaining,
395
381
  type: "number",
396
- renderCell: (i) => {
397
- const b = i.row.balance + i.row.income - i.row.expenses;
382
+ renderCell: (r) => {
383
+ const m = r.row.balance + r.row.income - r.row.expenses;
398
384
  return /* @__PURE__ */ e(
399
- d,
385
+ u,
400
386
  {
401
- color: Math.sign(b) === -1 ? n.palette.error.main : n.palette.text.primary,
387
+ color: Math.sign(m) === -1 ? n.palette.error.main : n.palette.text.primary,
402
388
  variant: "Small",
403
- children: Z(b, "0,0.00")
389
+ children: J(m, "0,0.00")
404
390
  }
405
391
  );
406
392
  }
407
393
  }
408
- ], C = u.useMemo(() => m.map((i) => {
409
- const b = r.filter(
410
- ae(i, { start: M(), end: ye(M(), 30) })
411
- ).reduce((y, S) => y + S.amount, 0), l = c.filter(
412
- ae(i, { start: M(), end: ye(M(), 30) })
413
- ).reduce((y, S) => y + S.amount, 0), h = (i.balance || 0) + l - b;
394
+ ], c = f.useMemo(() => l.map((r) => {
395
+ const m = i.filter(
396
+ ae(r, { start: F(), end: ye(F(), 30) })
397
+ ).reduce((C, S) => C + S.amount, 0), d = h.filter(
398
+ ae(r, { start: F(), end: ye(F(), 30) })
399
+ ).reduce((C, S) => C + S.amount, 0), b = (r.balance || 0) + d - m;
414
400
  return {
415
- account: i,
416
- balance: i.balance || 0,
417
- id: i.guid,
418
- income: l,
419
- expenses: b,
420
- remaining: h
401
+ account: r,
402
+ balance: r.balance || 0,
403
+ id: r.guid,
404
+ income: d,
405
+ expenses: m,
406
+ remaining: b
421
407
  };
422
- }), [m, r, c]);
408
+ }), [l, i, h]);
423
409
  return /* @__PURE__ */ o(
424
410
  I,
425
411
  {
@@ -436,7 +422,7 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
436
422
  children: [
437
423
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
438
424
  /* @__PURE__ */ e(
439
- d,
425
+ u,
440
426
  {
441
427
  bold: !0,
442
428
  sx: {
@@ -447,33 +433,33 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
447
433
  }
448
434
  ),
449
435
  /* @__PURE__ */ e(
450
- he,
436
+ me,
451
437
  {
452
438
  body: t.table_tooltip_body,
453
439
  title: t.table_tooltip_title
454
440
  }
455
441
  )
456
442
  ] }),
457
- /* @__PURE__ */ o(d, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
458
- Q(f.start, V.FULL_MONTH_DAY),
443
+ /* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
444
+ Y(g.start, Q.FULL_MONTH_DAY),
459
445
  " -",
460
446
  " ",
461
- Q(f.end, V.FULL_MONTH_DAY)
447
+ Y(g.end, Q.FULL_MONTH_DAY)
462
448
  ] })
463
449
  ]
464
450
  }
465
451
  ),
466
452
  a > 650 ? /* @__PURE__ */ e(
467
- nt,
453
+ ot,
468
454
  {
469
455
  columnHeaderHeight: 48,
470
- columns: g,
456
+ columns: y,
471
457
  density: "standard",
472
458
  disableColumnMenu: !0,
473
459
  disableRowSelectionOnClick: !0,
474
460
  hideFooter: !0,
475
461
  rowHeight: 48,
476
- rows: C,
462
+ rows: c,
477
463
  sx: {
478
464
  border: "1px solid",
479
465
  borderColor: "border.light",
@@ -481,7 +467,7 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
481
467
  "& .MuiDataGrid-columnHeader .MuiIconButton-root": {
482
468
  color: n.palette.primary.main,
483
469
  "&:hover": {
484
- backgroundColor: et(n.palette.primary.main, 0.1)
470
+ backgroundColor: tt(n.palette.primary.main, 0.1)
485
471
  }
486
472
  },
487
473
  "& .MuiDataGrid-columnHeaderTitle": {
@@ -493,10 +479,10 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
493
479
  }
494
480
  }
495
481
  }
496
- ) : C.map((i) => {
497
- const { name: b, nickname: l, institution_guid: h, account_number: y } = i.account, S = l || b;
482
+ ) : c.map((r) => {
483
+ const { name: m, nickname: d, institution_guid: b, account_number: C } = r.account, S = d || m;
498
484
  return /* @__PURE__ */ e(
499
- ee,
485
+ Z,
500
486
  {
501
487
  sx: {
502
488
  border: "1px solid",
@@ -516,16 +502,16 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
516
502
  children: [
517
503
  /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
518
504
  /* @__PURE__ */ e(
519
- xe,
505
+ be,
520
506
  {
521
507
  alt: t.institution_logo,
522
- institutionGuid: h || "",
508
+ institutionGuid: b || "",
523
509
  size: 16
524
510
  }
525
511
  ),
526
- /* @__PURE__ */ e(d, { variant: "Small", children: `${S} ${y ? `*${y}` : ""}` })
512
+ /* @__PURE__ */ e(u, { variant: "Small", children: `${S} ${C ? `*${C}` : ""}` })
527
513
  ] }),
528
- /* @__PURE__ */ e(L, { amount: i.balance, bold: !0, variant: "Small" })
514
+ /* @__PURE__ */ e(R, { amount: r.balance, bold: !0, variant: "Small" })
529
515
  ]
530
516
  }
531
517
  ),
@@ -539,8 +525,8 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
539
525
  px: 16,
540
526
  py: 12,
541
527
  children: [
542
- /* @__PURE__ */ e(d, { variant: "Small", children: t.projected_income }),
543
- /* @__PURE__ */ e(L, { amount: i.income, bold: !0, symbol: "+", variant: "Small" })
528
+ /* @__PURE__ */ e(u, { variant: "Small", children: t.projected_income }),
529
+ /* @__PURE__ */ e(R, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
544
530
  ]
545
531
  }
546
532
  ),
@@ -554,8 +540,8 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
554
540
  px: 16,
555
541
  py: 12,
556
542
  children: [
557
- /* @__PURE__ */ e(d, { variant: "Small", children: t.projected_expenses }),
558
- /* @__PURE__ */ e(L, { amount: i.expenses, bold: !0, symbol: "-", variant: "Small" })
543
+ /* @__PURE__ */ e(u, { variant: "Small", children: t.projected_expenses }),
544
+ /* @__PURE__ */ e(R, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
559
545
  ]
560
546
  }
561
547
  ),
@@ -571,36 +557,36 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
571
557
  px: 16,
572
558
  py: 12,
573
559
  sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
574
- children: /* @__PURE__ */ e(pe, { remaining: i.remaining })
560
+ children: /* @__PURE__ */ e(ue, { remaining: r.remaining })
575
561
  }
576
562
  )
577
563
  ] }) })
578
564
  },
579
- i.id
565
+ r.id
580
566
  );
581
567
  })
582
568
  ]
583
569
  }
584
570
  );
585
- }, Dt = T(It), vt = () => {
586
- const { cashflow: a } = O(), { isDesktop: n } = ue(), { onEvent: t } = Ne(), [r, c] = u.useState(0), f = (m, g) => {
587
- c(g);
571
+ }, vt = T(Dt), Et = () => {
572
+ const { cashflow: a } = L(), { isDesktop: n } = de(), { onEvent: t } = Ne(), [i, h] = f.useState(0), g = (l, y) => {
573
+ h(y);
588
574
  };
589
- return u.useEffect(() => {
590
- t(r === 0 ? "cash_flow_summary" : "cash_flow_details");
591
- }, [r]), /* @__PURE__ */ o(I, { children: [
575
+ return f.useEffect(() => {
576
+ t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
577
+ }, [i]), /* @__PURE__ */ o(I, { children: [
592
578
  /* @__PURE__ */ o(
593
- Ke,
579
+ Je,
594
580
  {
595
581
  "aria-label": a.cashflow_summary_and_details,
596
582
  centered: !0,
597
- onChange: f,
583
+ onChange: g,
598
584
  textColor: "primary",
599
- value: r,
585
+ value: i,
600
586
  variant: "fullWidth",
601
587
  children: [
602
588
  /* @__PURE__ */ e(
603
- Ce,
589
+ xe,
604
590
  {
605
591
  "aria-controls": "cashflow-tabpanel-0",
606
592
  id: "cashflow-tab-0",
@@ -611,7 +597,7 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
611
597
  }
612
598
  ),
613
599
  /* @__PURE__ */ e(
614
- Ce,
600
+ xe,
615
601
  {
616
602
  "aria-controls": "cashflow-tabpanel-1",
617
603
  id: "cashflow-tab-1",
@@ -625,16 +611,16 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
625
611
  }
626
612
  ),
627
613
  /* @__PURE__ */ e(I, { sx: { mb: 32 } }),
628
- /* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: r, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Dt, {}) }) }),
629
- /* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: r, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(wt, {}) }) })
614
+ /* @__PURE__ */ e(Ce, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(vt, {}) }) }),
615
+ /* @__PURE__ */ e(Ce, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(It, {}) }) })
630
616
  ] });
631
- }, At = T(vt), oe = ({
617
+ }, At = T(Et), oe = ({
632
618
  amount: a,
633
619
  isMobile: n = !1,
634
620
  isTotal: t = !1,
635
- label: r,
636
- symbol: c,
637
- tooltip: f
621
+ label: i,
622
+ symbol: h,
623
+ tooltip: g
638
624
  }) => /* @__PURE__ */ o(
639
625
  s,
640
626
  {
@@ -644,25 +630,25 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
644
630
  padding: n ? "14px 16px" : 0,
645
631
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
646
632
  children: [
647
- !n && /* @__PURE__ */ e(L, { amount: a, component: "h2", variant: "H2" }),
633
+ !n && /* @__PURE__ */ e(R, { amount: a, component: "h2", variant: "H2" }),
648
634
  /* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
649
- /* @__PURE__ */ e(d, { bold: t, variant: "Small", children: r }),
650
- f
635
+ /* @__PURE__ */ e(u, { bold: t, variant: "Small", children: i }),
636
+ g
651
637
  ] }),
652
- n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: c, variant: "Small" })
638
+ n && /* @__PURE__ */ e(R, { amount: a, component: "h2", symbol: h, variant: "Small" })
653
639
  ]
654
640
  }
655
- ), Re = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), Et = () => {
656
- const { availableWidth: a } = re(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: r } = q(), { selectedAccountGuids: c } = Y(), { dateRange: f, selectedCashAccounts: m } = K(), { userProfile: g } = me(), [C, i] = u.useState(!1), b = u.useMemo(
657
- () => t.filter(Re(c, f)),
658
- [f, c, t]
659
- ), l = u.useMemo(
660
- () => r.filter(Re(c, f)),
661
- [f, c, r]
662
- ), h = u.useMemo(
663
- () => m.reduce((N, _) => N + (_?.balance || 0), 0),
664
- [m]
665
- ), y = b.reduce((N, _) => N + _.amount, 0), S = l.reduce((N, _) => N + _.amount, 0), v = h - y + S, p = a < 725;
641
+ ), Te = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), Tt = () => {
642
+ const { availableWidth: a } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: i } = P(), { selectedAccountGuids: h } = X(), { dateRange: g, selectedCashAccounts: l } = V(), { userProfile: y } = Oe(), [c, r] = f.useState(!1), m = f.useMemo(
643
+ () => t.filter(Te(h, g)),
644
+ [g, h, t]
645
+ ), d = f.useMemo(
646
+ () => i.filter(Te(h, g)),
647
+ [g, h, i]
648
+ ), b = f.useMemo(
649
+ () => l.reduce((E, _) => E + (_?.balance || 0), 0),
650
+ [l]
651
+ ), C = m.reduce((E, _) => E + _.amount, 0), S = d.reduce((E, _) => E + _.amount, 0), v = b - C + S, p = a < 725;
666
652
  return /* @__PURE__ */ o(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
667
653
  /* @__PURE__ */ o(
668
654
  s,
@@ -677,14 +663,14 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
677
663
  /* @__PURE__ */ e(
678
664
  oe,
679
665
  {
680
- amount: h,
666
+ amount: b,
681
667
  isMobile: p,
682
668
  label: n.cash_and_bank
683
669
  }
684
670
  ),
685
671
  p && /* @__PURE__ */ e(D, {}),
686
- g?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(P, { children: [
687
- !p && /* @__PURE__ */ e(d, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
672
+ y?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(U, { children: [
673
+ !p && /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
688
674
  /* @__PURE__ */ e(
689
675
  oe,
690
676
  {
@@ -695,25 +681,25 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
695
681
  }
696
682
  )
697
683
  ] }) : /* @__PURE__ */ e(
698
- H,
684
+ M,
699
685
  {
700
- onClick: () => i(!0),
701
- startIcon: /* @__PURE__ */ e(F, { name: "add" }),
686
+ onClick: () => r(!0),
687
+ startIcon: /* @__PURE__ */ e(G, { name: "add" }),
702
688
  sx: { fontSize: 13 },
703
689
  children: n.add_income
704
690
  }
705
691
  ),
706
- p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(d, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
692
+ p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
707
693
  /* @__PURE__ */ e(
708
694
  oe,
709
695
  {
710
- amount: y,
696
+ amount: C,
711
697
  isMobile: p,
712
698
  label: n.to_be_paid_out,
713
699
  symbol: p ? "-" : void 0
714
700
  }
715
701
  ),
716
- p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(d, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
702
+ p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
717
703
  /* @__PURE__ */ e(
718
704
  oe,
719
705
  {
@@ -722,7 +708,7 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
722
708
  isTotal: p,
723
709
  label: n.remaining_cash,
724
710
  tooltip: /* @__PURE__ */ e(
725
- he,
711
+ me,
726
712
  {
727
713
  body: n.remaining_income_tooltip_body,
728
714
  title: n.remaining_income_tooltip_title
@@ -737,263 +723,263 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
737
723
  $e,
738
724
  {
739
725
  ariaLabelClose: n.close_manage_income_aria,
740
- isOpen: C,
741
- onClose: () => i(!1),
726
+ isOpen: c,
727
+ onClose: () => r(!1),
742
728
  shouldShowHeaderBorders: !1,
743
729
  title: n.manage_income,
744
- children: /* @__PURE__ */ e(ot, {})
730
+ children: /* @__PURE__ */ e(at, {})
745
731
  }
746
732
  )
747
733
  ] });
748
- }, Tt = T(Et), Rt = ({ handleNextStep: a }) => {
749
- const { completeOnboarding: n } = de(), { cashflow: t } = O(), r = ie();
734
+ }, Rt = T(Tt), Lt = ({ handleNextStep: a }) => {
735
+ const { completeOnboarding: n } = le(), { cashflow: t } = L(), i = ie();
750
736
  return /* @__PURE__ */ o(s, { children: [
751
- /* @__PURE__ */ e(le, { pb: 12, children: t.welcome_title }),
737
+ /* @__PURE__ */ e(ce, { pb: 12, children: t.welcome_title }),
752
738
  /* @__PURE__ */ e(
753
739
  Xe,
754
740
  {
755
- color: r.palette.primary.light,
741
+ color: i.palette.primary.light,
756
742
  pb: 8,
757
743
  sx: { wordBreak: "break-word", whiteSpace: "initial" },
758
744
  variant: "H3",
759
745
  children: t.welcome_sub_title
760
746
  }
761
747
  ),
762
- /* @__PURE__ */ e(k, { pb: 32, children: t.welcome_description }),
748
+ /* @__PURE__ */ e(N, { pb: 32, children: t.welcome_description }),
763
749
  /* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
764
- /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
750
+ /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
765
751
  /* @__PURE__ */ e(
766
752
  I,
767
753
  {
768
- bgcolor: r.palette.primary.lighter,
754
+ bgcolor: i.palette.primary.lighter,
769
755
  borderRadius: 1,
770
756
  component: "span",
771
757
  height: 44,
772
758
  mr: 24,
773
759
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
774
760
  width: 44,
775
- children: /* @__PURE__ */ e(F, { color: "primary", name: "currency_exchange" })
761
+ children: /* @__PURE__ */ e(G, { color: "primary", name: "currency_exchange" })
776
762
  }
777
763
  ),
778
764
  t.bullet_one
779
765
  ] }),
780
- /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
766
+ /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
781
767
  /* @__PURE__ */ e(
782
768
  I,
783
769
  {
784
- bgcolor: r.palette.primary.lighter,
770
+ bgcolor: i.palette.primary.lighter,
785
771
  borderRadius: 1,
786
772
  component: "span",
787
773
  height: 44,
788
774
  mr: 24,
789
775
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
790
776
  width: 44,
791
- children: /* @__PURE__ */ e(F, { color: "primary", name: "cardiology" })
777
+ children: /* @__PURE__ */ e(G, { color: "primary", name: "cardiology" })
792
778
  }
793
779
  ),
794
780
  t.bullet_two
795
781
  ] }),
796
- /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
782
+ /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
797
783
  /* @__PURE__ */ e(
798
784
  I,
799
785
  {
800
- bgcolor: r.palette.primary.lighter,
786
+ bgcolor: i.palette.primary.lighter,
801
787
  borderRadius: 1,
802
788
  component: "span",
803
789
  height: 44,
804
790
  mr: 24,
805
791
  sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
806
792
  width: 44,
807
- children: /* @__PURE__ */ e(F, { color: "primary", name: "flare" })
793
+ children: /* @__PURE__ */ e(G, { color: "primary", name: "flare" })
808
794
  }
809
795
  ),
810
796
  t.bullet_three
811
797
  ] })
812
798
  ] }),
813
799
  /* @__PURE__ */ o(s, { direction: "row", spacing: 16, children: [
814
- /* @__PURE__ */ e(H, { onClick: a, variant: "contained", children: t.get_started_button }),
815
- /* @__PURE__ */ e(H, { onClick: n, variant: "outlined", children: t.skip_button })
800
+ /* @__PURE__ */ e(M, { onClick: a, variant: "contained", children: t.get_started_button }),
801
+ /* @__PURE__ */ e(M, { onClick: n, variant: "outlined", children: t.skip_button })
816
802
  ] })
817
803
  ] });
818
- }, Lt = T(Rt), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
819
- CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
820
- CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
804
+ }, Nt = T(Lt), Re = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
805
+ CASHFLOW_ONBOARDING: `${Re}/cashflow-onboarding.png`,
806
+ CASHFLOW_LOADING_ANIMATION: `${Re}/loading-animation.gif`
821
807
  }, Ot = () => {
822
- const { cashflow: a } = O();
823
- return /* @__PURE__ */ o(u.Fragment, { children: [
808
+ const { cashflow: a } = L();
809
+ return /* @__PURE__ */ o(f.Fragment, { children: [
824
810
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Ge.CASHFLOW_LOADING_ANIMATION }) }),
825
- /* @__PURE__ */ e(le, { pb: 12, children: a.loading_title }),
826
- /* @__PURE__ */ e(k, { children: a.loading_description })
811
+ /* @__PURE__ */ e(ce, { pb: 12, children: a.loading_title }),
812
+ /* @__PURE__ */ e(N, { children: a.loading_description })
827
813
  ] });
828
- }, Nt = T(Ot), kt = tt`
814
+ }, kt = T(Ot), Ht = nt`
829
815
  from {
830
816
  transform: rotate(0deg);
831
817
  }
832
818
  to {
833
819
  transform: rotate(360deg);
834
820
  }
835
- `, Ht = () => {
836
- const { addRepeatingTransaction: a, repeatingTransactions: n } = q(), { cashflow: t, common: r } = O(), { completeOnboarding: c } = de(), { isDirty: f } = K(), { isMobile: m } = ue(), { isCopyLoaded: g, setDisplayedDate: C } = Y(), { filter: i, setFilter: b, transactions: l } = ke(), h = ie(), [y, S] = J(!0), [v, p] = u.useState(mt.EveryMonth), [N, _] = u.useState(1), [j, G] = u.useState(15), [W, z] = J(!1), [A, R] = J(1), [w, je] = J([]), [fe, ce] = J(""), $ = u.useMemo(
837
- () => l.find((x) => x.guid === fe),
838
- [fe, l]
821
+ `, Ft = () => {
822
+ const { addRepeatingTransaction: a, repeatingTransactions: n } = P(), { cashflow: t, common: i } = L(), { completeOnboarding: h } = le(), { isDirty: g } = V(), { isMobile: l } = de(), { isCopyLoaded: y, setDisplayedDate: c } = X(), { filter: r, setFilter: m, transactions: d } = ke(), b = ie(), [C, S] = K(!0), [v, p] = f.useState(ut.EveryMonth), [E, _] = f.useState(1), [W, j] = f.useState(15), [w, $] = K(!1), [O, he] = K(1), [k, je] = K([]), [pe, se] = K(""), H = f.useMemo(
823
+ () => d.find((x) => x.guid === pe),
824
+ [pe, d]
839
825
  ), ze = !!n.filter(
840
- (x) => x.repeating_transaction_type === Ie.Income
841
- ).length, ge = async () => {
842
- R(2), C(
826
+ (x) => x.repeating_transaction_type === we.Income
827
+ ).length, fe = async () => {
828
+ he(2), c(
843
829
  // Beginning of the month, 90 days before today
844
- ct(Me(M(), 90)),
845
- M()
846
- ), b({ ...i, custom: _e }), R(3);
830
+ lt(Me(F(), 90)),
831
+ F()
832
+ ), m({ ...r, custom: Se }), he(3);
847
833
  }, Be = async () => {
848
- if (!(w.length < 1)) {
849
- z(!0);
850
- for (let x = 0; x < w.length; x++) {
851
- const E = w[x], be = De(v, we(E.date)), Pe = {
852
- account_guid: E.account_guid,
853
- amount: E.amount,
854
- merchant_guid: E.merchant_guid,
855
- description: E.feed_description || E.description,
856
- predicted_occurs_on: st(be, { representation: "date" }),
857
- recurrence_day: be.getDay(),
834
+ if (!(k.length < 1)) {
835
+ $(!0);
836
+ for (let x = 0; x < k.length; x++) {
837
+ const A = k[x], ge = Ie(v, _e(A.date)), Pe = {
838
+ account_guid: A.account_guid,
839
+ amount: A.amount,
840
+ merchant_guid: A.merchant_guid,
841
+ description: A.feed_description || A.description,
842
+ predicted_occurs_on: ct(ge, { representation: "date" }),
843
+ recurrence_day: ge.getDay(),
858
844
  recurrence_type: v,
859
- repeating_transaction_type: Ie.Income,
860
- transaction_type: E.transaction_type
845
+ repeating_transaction_type: we.Income,
846
+ transaction_type: A.transaction_type
861
847
  };
862
- await a(Pe, E);
848
+ await a(Pe, A);
863
849
  }
864
- await c();
850
+ await h();
865
851
  }
866
- }, Ue = !$ && y || !$ && w.length < 1;
867
- return g ? /* @__PURE__ */ o(
852
+ }, Ue = !H && C || !H && k.length < 1;
853
+ return y ? /* @__PURE__ */ o(
868
854
  I,
869
855
  {
870
856
  sx: {
871
857
  display: "flex",
872
- alignItems: m ? "flex-start" : "center",
873
- backgroundColor: h.palette.background.paper,
874
- backgroundImage: m ? null : `url(${Ge.CASHFLOW_ONBOARDING})`,
858
+ alignItems: l ? "flex-start" : "center",
859
+ backgroundColor: b.palette.background.paper,
860
+ backgroundImage: l ? null : `url(${Ge.CASHFLOW_ONBOARDING})`,
875
861
  backgroundRepeat: "no-repeat",
876
862
  backgroundPosition: "left 100px",
877
863
  backgroundSize: "35%",
878
864
  py: 24
879
865
  },
880
866
  children: [
881
- A === 1 && /* @__PURE__ */ e(
867
+ O === 1 && /* @__PURE__ */ e(
882
868
  I,
883
869
  {
884
870
  sx: {
885
- ...m ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
871
+ ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
886
872
  },
887
- children: /* @__PURE__ */ e(Lt, { handleNextStep: ge })
873
+ children: /* @__PURE__ */ e(Nt, { handleNextStep: fe })
888
874
  }
889
875
  ),
890
- A === 2 && /* @__PURE__ */ e(
876
+ O === 2 && /* @__PURE__ */ e(
891
877
  I,
892
878
  {
893
879
  sx: {
894
- ...m ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
880
+ ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
895
881
  },
896
- children: /* @__PURE__ */ e(Nt, {})
882
+ children: /* @__PURE__ */ e(kt, {})
897
883
  }
898
884
  ),
899
- A === 3 && /* @__PURE__ */ o(
885
+ O === 3 && /* @__PURE__ */ o(
900
886
  I,
901
887
  {
902
888
  sx: {
903
- ...m ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
889
+ ...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
904
890
  },
905
891
  children: [
906
- /* @__PURE__ */ e(le, { pb: 12, children: t.add_income_title }),
907
- /* @__PURE__ */ e(k, { mb: 24, children: t.add_income_description }),
908
- w.length > 0 && !$ && /* @__PURE__ */ o(P, { children: [
909
- /* @__PURE__ */ e(ee, { children: w.map((x, E) => /* @__PURE__ */ o(u.Fragment, { children: [
910
- /* @__PURE__ */ e(lt, { bgcolor: "background.paper", children: ut(
911
- U(x.nextDate || x.date)
892
+ /* @__PURE__ */ e(ce, { pb: 12, children: t.add_income_title }),
893
+ /* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
894
+ k.length > 0 && !H && /* @__PURE__ */ o(U, { children: [
895
+ /* @__PURE__ */ e(Z, { children: k.map((x, A) => /* @__PURE__ */ o(f.Fragment, { children: [
896
+ /* @__PURE__ */ e(dt, { bgcolor: "background.paper", children: ht(
897
+ B(x.nextDate || x.date)
912
898
  ) }),
913
- /* @__PURE__ */ e(dt, { transaction: x }),
914
- E !== w.length - 1 && /* @__PURE__ */ e(D, {})
899
+ /* @__PURE__ */ e(mt, { transaction: x }),
900
+ A !== k.length - 1 && /* @__PURE__ */ e(D, {})
915
901
  ] }, x.guid)) }),
916
902
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
917
903
  /* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
918
904
  /* @__PURE__ */ e(
919
- H,
905
+ M,
920
906
  {
921
907
  onClick: () => S(!0),
922
- startIcon: /* @__PURE__ */ e(F, { name: "add", size: 20 }),
908
+ startIcon: /* @__PURE__ */ e(G, { name: "add", size: 20 }),
923
909
  children: t.add_income
924
910
  }
925
911
  )
926
912
  ] })
927
913
  ] }),
928
914
  Ue && /* @__PURE__ */ e(
929
- at,
915
+ it,
930
916
  {
931
917
  bgcolor: "background.paper",
932
- onSearch: (x) => b({
933
- ...i,
934
- custom: (E) => x ? it(E, x) : _e(E)
918
+ onSearch: (x) => m({
919
+ ...r,
920
+ custom: (A) => x ? rt(A, x) : Se(A)
935
921
  }),
936
922
  onSelected: (x) => {
937
- ce(x), S(!1);
923
+ se(x), S(!1);
938
924
  }
939
925
  }
940
926
  ),
941
- !ze && f && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
942
- $ && /* @__PURE__ */ o(P, { children: [
927
+ !ze && g && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
928
+ H && /* @__PURE__ */ o(U, { children: [
943
929
  /* @__PURE__ */ e(
944
- rt,
930
+ st,
945
931
  {
946
932
  bgcolor: "background.paper",
947
- firstDay: N,
933
+ firstDay: E,
948
934
  frequency: v,
949
935
  onFirstDayChange: _,
950
936
  onFrequencyChange: p,
951
- onSecondDayChange: G,
952
- secondDay: j,
953
- transaction: $
937
+ onSecondDayChange: j,
938
+ secondDay: W,
939
+ transaction: H
954
940
  }
955
941
  ),
956
942
  /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
957
943
  /* @__PURE__ */ e(
958
- H,
944
+ M,
959
945
  {
960
- "aria-disabled": !$,
946
+ "aria-disabled": !H,
961
947
  onClick: () => {
962
- const x = [...w];
948
+ const x = [...k];
963
949
  x.push({
964
- ...$,
965
- nextDate: De(v, we($.date)),
950
+ ...H,
951
+ nextDate: Ie(v, _e(H.date)),
966
952
  frequency: v
967
- }), je(x), ce("");
953
+ }), je(x), se("");
968
954
  },
969
955
  variant: "contained",
970
- children: r.confirm_button
956
+ children: i.confirm_button
971
957
  }
972
958
  ),
973
959
  /* @__PURE__ */ e(
974
- H,
960
+ M,
975
961
  {
976
962
  onClick: () => {
977
- ce(""), S(!0), ge().finally();
963
+ se(""), S(!0), fe().finally();
978
964
  },
979
965
  variant: "outlined",
980
- children: r.cancel_button
966
+ children: i.cancel_button
981
967
  }
982
968
  )
983
969
  ] })
984
970
  ] }),
985
- w.length > 0 && !$ && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
971
+ k.length > 0 && !H && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
986
972
  /* @__PURE__ */ e(
987
- H,
973
+ M,
988
974
  {
989
- "aria-disabled": w.length < 1 || W,
975
+ "aria-disabled": k.length < 1 || w,
990
976
  onClick: Be,
991
- startIcon: W ? /* @__PURE__ */ e(
992
- F,
977
+ startIcon: w ? /* @__PURE__ */ e(
978
+ G,
993
979
  {
994
980
  name: "progress_activity",
995
981
  sx: {
996
- animation: `${kt} 2s linear infinite`
982
+ animation: `${Ht} 2s linear infinite`
997
983
  }
998
984
  }
999
985
  ) : null,
@@ -1001,109 +987,109 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
1001
987
  children: t.confirm_income_button
1002
988
  }
1003
989
  ),
1004
- /* @__PURE__ */ e(H, { onClick: c, variant: "outlined", children: t.skip_button })
990
+ /* @__PURE__ */ e(M, { onClick: h, variant: "outlined", children: t.skip_button })
1005
991
  ] })
1006
992
  ]
1007
993
  }
1008
994
  )
1009
995
  ]
1010
996
  }
1011
- ) : /* @__PURE__ */ e(se, {});
1012
- }, Ft = T(Ht), Wt = ({ onBackClick: a, sx: n = {} }) => {
997
+ ) : /* @__PURE__ */ e(ee, {});
998
+ }, Wt = T(Ft), $t = ({ onBackClick: a, sx: n = {} }) => {
1013
999
  const {
1014
1000
  selectedAccounts: t,
1015
- selectedAccountGuids: r,
1016
- setSelectedAccounts: c,
1017
- shouldDisableNextDate: f,
1018
- shouldDisablePrevDate: m
1019
- } = Y(), { onEvent: g } = Ne(), { visibleCashAccounts: C } = Oe(), { setFilter: i } = ke(), { userProfile: b } = me(), { dateRange: l, setSelectedCashAccounts: h } = K(), { loadRepeatingTransactions: y, setDateRange: S } = q(), { cashflow: v, recurring: p } = O(), { isCopyLoaded: N, isInitialized: _ } = Y(), [j, G] = u.useState(!1);
1020
- return u.useEffect(() => {
1021
- _ && (S(l), y().finally());
1022
- }, [_]), u.useEffect(() => {
1023
- c(C);
1024
- }, [C]), u.useEffect(() => {
1025
- const W = C.map((A) => A.guid), z = t.filter(
1026
- (A) => r.includes(A.guid) && W.includes(A.guid)
1001
+ selectedAccountGuids: i,
1002
+ setSelectedAccounts: h,
1003
+ shouldDisableNextDate: g,
1004
+ shouldDisablePrevDate: l
1005
+ } = X(), { onEvent: y } = Ne(), { visibleCashAccounts: c } = Le(), { setFilter: r } = ke(), { userProfile: m } = Oe(), { dateRange: d, setSelectedCashAccounts: b } = V(), { loadRepeatingTransactions: C, setDateRange: S } = P(), { cashflow: v, recurring: p } = L(), { isCopyLoaded: E, isInitialized: _ } = X(), [W, j] = f.useState(!1);
1006
+ return f.useEffect(() => {
1007
+ _ && (S(d), C().finally());
1008
+ }, [_]), f.useEffect(() => {
1009
+ h(c);
1010
+ }, [c]), f.useEffect(() => {
1011
+ const w = c.map((O) => O.guid), $ = t.filter(
1012
+ (O) => i.includes(O.guid) && w.includes(O.guid)
1027
1013
  );
1028
- h(z), i({
1029
- dateRange: { start: Me(M(), 90), end: ht() },
1030
- accounts: z.map((A) => A.guid)
1014
+ b($), r({
1015
+ dateRange: { start: Me(F(), 90), end: pt() },
1016
+ accounts: $.map((O) => O.guid)
1031
1017
  });
1032
- }, [C, t]), !N || !_ ? /* @__PURE__ */ e(se, {}) : b?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
1033
- ve,
1018
+ }, [c, t]), !E || !_ ? /* @__PURE__ */ e(ee, {}) : m?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
1019
+ De,
1034
1020
  {
1035
- accountOptions: C,
1021
+ accountOptions: c,
1036
1022
  actions: [
1037
1023
  {
1038
1024
  label: p.action_title,
1039
1025
  iconName: "credit_card_gear",
1040
1026
  onClick: () => {
1041
- G(!0), g(Ae.CASH_FLOW_CLICK_SETTINGS);
1027
+ j(!0), y(ve.CASH_FLOW_CLICK_SETTINGS);
1042
1028
  }
1043
1029
  }
1044
1030
  ],
1045
1031
  calendarActions: {
1046
- shouldDisableNext: f,
1047
- shouldDisablePrevious: m,
1032
+ shouldDisableNext: g,
1033
+ shouldDisablePrevious: l,
1048
1034
  shouldDisablePicker: !0,
1049
1035
  onRangeChanged: () => {
1050
1036
  }
1051
1037
  },
1052
- dateRange: l,
1038
+ dateRange: d,
1053
1039
  dateRangeVariant: "readonly",
1054
- onAccountsFilterClick: () => g(Ae.CASH_FLOW_CLICK_FILTER),
1040
+ onAccountsFilterClick: () => y(ve.CASH_FLOW_CLICK_FILTER),
1055
1041
  onBackClick: a,
1056
1042
  sx: n,
1057
1043
  title: v.title,
1058
1044
  children: [
1059
- /* @__PURE__ */ e(Tt, {}),
1045
+ /* @__PURE__ */ e(Rt, {}),
1060
1046
  /* @__PURE__ */ e(At, {}),
1061
1047
  /* @__PURE__ */ e(
1062
1048
  $e,
1063
1049
  {
1064
1050
  ariaLabelClose: v.close_settings_aria,
1065
- isOpen: j,
1066
- onClose: () => G(!1),
1051
+ isOpen: W,
1052
+ onClose: () => j(!1),
1067
1053
  shouldShowHeaderBorders: !1,
1068
1054
  title: p.action_title,
1069
- children: /* @__PURE__ */ e(Ve, {})
1055
+ children: /* @__PURE__ */ e(Ke, {})
1070
1056
  }
1071
1057
  )
1072
1058
  ]
1073
1059
  }
1074
1060
  ) : /* @__PURE__ */ e(
1075
- ve,
1061
+ De,
1076
1062
  {
1077
1063
  onBackClick: a,
1078
1064
  sx: { height: "100%", overflow: "auto" },
1079
1065
  title: v.title,
1080
- children: /* @__PURE__ */ e(Ft, {})
1066
+ children: /* @__PURE__ */ e(Wt, {})
1081
1067
  }
1082
1068
  );
1083
- }, Nn = T(Wt);
1084
- class kn {
1069
+ }, Hn = T($t);
1070
+ class Fn {
1085
1071
  fetchInstance;
1086
- constructor(n, t, r) {
1087
- this.fetchInstance = new pt(n, t, void 0, r);
1072
+ constructor(n, t, i) {
1073
+ this.fetchInstance = new ft(n, t, void 0, i);
1088
1074
  }
1089
- addCashflowEvent = async (n) => this.fetchInstance.post(B.CASHFLOW_EVENTS, { ...n }).then((t) => t);
1090
- addCashflowSequence = async (n) => this.fetchInstance.post(B.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
1091
- getCashflowSequences = async () => this.fetchInstance.get(B.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
1075
+ addCashflowEvent = async (n) => this.fetchInstance.post(z.CASHFLOW_EVENTS, { ...n }).then((t) => t);
1076
+ addCashflowSequence = async (n) => this.fetchInstance.post(z.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
1077
+ getCashflowSequences = async () => this.fetchInstance.get(z.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
1092
1078
  getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
1093
- `${B.CASHFLOW_EVENTS}/from/${U(n)}/to/${U(t)}`
1094
- ).then((r) => r.cashflow_events);
1095
- deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${B.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
1079
+ `${z.CASHFLOW_EVENTS}/from/${B(n)}/to/${B(t)}`
1080
+ ).then((i) => i.cashflow_events);
1081
+ deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${z.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
1096
1082
  getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
1097
- `${B.CASHFLOW_SEQUENCES}/projected_events/from/${U(
1083
+ `${z.CASHFLOW_SEQUENCES}/projected_events/from/${B(
1098
1084
  n
1099
- )}/to/${U(t)}`
1100
- ).then((r) => r.cashflow_events);
1101
- updateCashflowSequence = async (n) => this.fetchInstance.put(`${B.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1085
+ )}/to/${B(t)}`
1086
+ ).then((i) => i.cashflow_events);
1087
+ updateCashflowSequence = async (n) => this.fetchInstance.put(`${z.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1102
1088
  }
1103
1089
  export {
1104
- kn as CashflowApi,
1105
- On as CashflowMiniWidget,
1106
- Ft as CashflowOnboarding,
1107
- Wn as CashflowStore,
1108
- Nn as CashflowWidget
1090
+ Fn as CashflowApi,
1091
+ kn as CashflowMiniWidget,
1092
+ Wt as CashflowOnboarding,
1093
+ Mn as CashflowStore,
1094
+ Hn as CashflowWidget
1109
1095
  };