@mx-cartographer/experiences 7.0.31 → 7.0.32-alpha-recurring-transactions-navigation-issue-ram2

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,91 +1,91 @@
1
- import { jsx as e, jsxs as o, Fragment as K } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as i, Fragment as j } from "react/jsx-runtime";
2
2
  import h from "react";
3
- import { observer as T } from "mobx-react-lite";
3
+ import { observer as R } from "mobx-react-lite";
4
4
  import { endOfMonth as z } from "date-fns/endOfMonth";
5
- import { endOfToday as ce } from "date-fns/endOfToday";
5
+ import { endOfToday as de } from "date-fns/endOfToday";
6
6
  import { startOfMonth as k } from "date-fns/startOfMonth";
7
- import { startOfToday as le } from "date-fns/startOfToday";
8
- import { subDays as de } from "date-fns/subDays";
9
- import re from "@mui/material/Skeleton";
10
- import c from "@mui/material/Stack";
7
+ import { startOfToday as ue } from "date-fns/startOfToday";
8
+ import { subDays as le } from "date-fns/subDays";
9
+ import ie from "@mui/material/Skeleton";
10
+ import s from "@mui/material/Stack";
11
11
  import { R as He } from "../RecurringSettings-ClbdFNWX.mjs";
12
- import { M as An } from "../RecurringSettings-ClbdFNWX.mjs";
12
+ import { M as Nn } from "../RecurringSettings-ClbdFNWX.mjs";
13
13
  import { addMonths as ze } from "date-fns/addMonths";
14
14
  import { subMonths as Be } from "date-fns/subMonths";
15
15
  import { isBefore as Ue } from "date-fns/isBefore";
16
16
  import oe from "@mui/material/Unstable_Grid2";
17
- import be from "@mui/material/IconButton";
17
+ import xe from "@mui/material/IconButton";
18
18
  import Re from "@mui/material/Tab";
19
19
  import Fe from "@mui/material/Tabs";
20
- import { Schedule as je, MonetizationOn as Ke, Cancel as ve, CheckCircle as Me, ChevronLeft as Ye, ChevronRight as Ve, CurrencyExchange as Xe } from "@mxenabled/mx-icons";
21
- import { Text as p, MerchantLogo as ue, InstitutionLogo as Ze, H3 as qe, P as ae } from "@mxenabled/mxui";
22
- import { getWeeksInMonth as Te } from "date-fns/getWeeksInMonth";
23
- import me from "@mui/material/styles/useTheme";
24
- import { AdapterDateFns as Je } from "@mui/x-date-pickers/AdapterDateFnsV3";
25
- import { DateCalendar as Qe } from "@mui/x-date-pickers/DateCalendar";
26
- import { LocalizationProvider as et } from "@mui/x-date-pickers/LocalizationProvider";
27
- import { isSameDay as tt } from "date-fns/isSameDay";
28
- import nt from "@mui/material/Badge";
29
- import { PickersDay as it } from "@mui/x-date-pickers/PickersDay";
30
- import { I as Y } from "../IconBacking-B9oC6uL2.mjs";
31
- import { u as D, a as V, i as v, f as X, c as pe, g as ge, p as rt } from "../hooks-DlI63qSB.mjs";
32
- import { c as M, a as R, g as De, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
33
- import { T as P } from "../RecurringTransactionsStore-D62XJtdL.mjs";
34
- import { R as Gn } from "../RecurringTransactionsStore-D62XJtdL.mjs";
35
- import { A as w, W as at } from "../WidgetContainer-CBpf3h1Y.mjs";
36
- import st from "@mui/material/Button";
20
+ import { Schedule as qe, MonetizationOn as je, Cancel as Me, CheckCircle as Ne, ChevronLeft as Ke, ChevronRight as Ye, CurrencyExchange as Ve } from "@mxenabled/mx-icons";
21
+ import { Text as p, MerchantLogo as me, InstitutionLogo as Xe, H3 as Je, P as ce } from "@mxenabled/mxui";
22
+ import { getWeeksInMonth as Ge } from "date-fns/getWeeksInMonth";
23
+ import fe from "@mui/material/styles/useTheme";
24
+ import { AdapterDateFns as Qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
25
+ import { DateCalendar as et } from "@mui/x-date-pickers/DateCalendar";
26
+ import { LocalizationProvider as tt } from "@mui/x-date-pickers/LocalizationProvider";
27
+ import { isSameDay as nt } from "date-fns/isSameDay";
28
+ import at from "@mui/material/Badge";
29
+ import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
30
+ import { I as K } from "../IconBacking-B9oC6uL2.mjs";
31
+ import { u as G, a as Y, i as _, f as V, p as ve, c as pe, g as ge } from "../hooks-DlI63qSB.mjs";
32
+ import { c as A, a as x, g as Ie, f as it } from "../RepeatingTransaction-BW4J-jeJ.mjs";
33
+ import { T as $ } from "../RecurringTransactionsStore-D62XJtdL.mjs";
34
+ import { R as Ln } from "../RecurringTransactionsStore-D62XJtdL.mjs";
35
+ import { A as S, W as ot } from "../WidgetContainer-CBpf3h1Y.mjs";
36
+ import ct from "@mui/material/Button";
37
37
  import se from "@mui/material/Divider";
38
- import Se from "@mui/material/List";
38
+ import we from "@mui/material/List";
39
39
  import Le from "@mui/material/ListItem";
40
- import ct from "@mui/material/ListSubheader";
41
- import lt from "@mui/material/ListItemAvatar";
42
- import dt from "@mui/material/ListItemButton";
43
- import ut from "@mui/material/ListItemText";
40
+ import st from "@mui/material/ListSubheader";
41
+ import dt from "@mui/material/ListItemAvatar";
42
+ import ut from "@mui/material/ListItemButton";
43
+ import lt from "@mui/material/ListItemText";
44
44
  import { b as mt } from "../ManageIncome-Byw3lVtR.mjs";
45
- import { c as On, M as kn, S as Wn } from "../ManageIncome-Byw3lVtR.mjs";
46
- import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
47
- import { D as Ae } from "../Drawer-kEE73B87.mjs";
48
- import { b as N } from "../Localization-2MODESHW.mjs";
49
- import { f as A, D as E } from "../Dialog-CWW597AF.mjs";
50
- import O from "@mui/material/Box";
51
- import { S as Ee } from "../StatusBar-BK_uYHAB.mjs";
52
- import { u as Ge } from "../useScreenSize-B6JyS_Lj.mjs";
53
- import { L as j } from "../Loader-DUaFpDGv.mjs";
54
- import { M as pt } from "../MiniWidgetContainer-BzW7V_04.mjs";
55
- import { u as gt } from "../useDimensions-27p2evRx.mjs";
56
- import { M as ht } from "../MicroWidgetContainer-DPDsZIiS.mjs";
57
- const Z = {
45
+ import { c as On, M as Pn, S as kn } from "../ManageIncome-Byw3lVtR.mjs";
46
+ import { f as M } from "../NumberFormatting-CtWHhyBX.mjs";
47
+ import { D as Ee } from "../Drawer-kEE73B87.mjs";
48
+ import { b as O } from "../Localization-2MODESHW.mjs";
49
+ import { f as N, D as v } from "../Dialog-CWW597AF.mjs";
50
+ import P from "@mui/material/Box";
51
+ import { S as Oe } from "../StatusBar-BK_uYHAB.mjs";
52
+ import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
53
+ import { L as q } from "../Loader-DUaFpDGv.mjs";
54
+ import { M as ft } from "../MiniWidgetContainer-BzW7V_04.mjs";
55
+ import { u as pt } from "../useDimensions-27p2evRx.mjs";
56
+ import { M as gt } from "../MicroWidgetContainer-DPDsZIiS.mjs";
57
+ const X = {
58
58
  gridRow: 1,
59
59
  gridColumn: 1,
60
60
  zIndex: 2
61
- }, q = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, he = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Y, { size: n, sx: { ...q(t) }, children: /* @__PURE__ */ e(je, { color: "primary", filled: !0, sx: { fontSize: n, ...Z } }) }), fe = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Y, { size: n, sx: { ...q(t) }, children: /* @__PURE__ */ e(
62
- Ke,
61
+ }, J = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(qe, { color: "primary", filled: !0, sx: { fontSize: n, ...X } }) }), ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(
62
+ je,
63
63
  {
64
64
  filled: !0,
65
- sx: { color: "categories.income", fontSize: n, ...Z }
65
+ sx: { color: "categories.income", fontSize: n, ...X }
66
66
  }
67
- ) }), xe = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Y, { size: n, sx: { ...q(t) }, children: /* @__PURE__ */ e(ve, { color: "error", filled: !0, sx: { fontSize: n, ...Z } }) }), ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Y, { size: n, sx: { ...q(t) }, children: /* @__PURE__ */ e(Me, { color: "success", filled: !0, sx: { fontSize: n, ...Z } }) }), ft = T(
68
- ({ day: t, outsideCurrentMonth: n, ...i }) => {
69
- const { recurring: a } = D(), { selectedAccountGuids: r } = V(), { recurrences: l, setSelectedDay: u } = v(), s = h.useMemo(
70
- () => l.filter((d) => r.includes(d.accountGuid)),
71
- [r, l]
67
+ ) }), Te = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Me, { color: "error", filled: !0, sx: { fontSize: n, ...X } }) }), Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Ne, { color: "success", filled: !0, sx: { fontSize: n, ...X } }) }), ht = R(
68
+ ({ day: t, outsideCurrentMonth: n, ...a }) => {
69
+ const { recurring: o } = G(), { selectedAccountGuids: r } = Y(), { recurrences: d, setSelectedDay: f } = _(), c = h.useMemo(
70
+ () => d.filter((u) => r.includes(u.accountGuid)),
71
+ [r, d]
72
72
  ).filter(
73
- (d) => tt(d.occurredOnDate || d.expectedDate, t)
74
- ), m = s.some(
75
- (d) => d.type !== M.Income && d.status === R.Upcoming
76
- ), f = s.some(
77
- (d) => d.type !== M.Income && d.status === R.Missed
78
- ), x = s.some(
79
- (d) => d.type !== M.Income && d.status === R.Paid
80
- ), b = s.some((d) => d.type === M.Income), y = (m ? 1 : 0) + (f ? 1 : 0) + (x ? 1 : 0) + (b ? 1 : 0);
73
+ (u) => nt(u.occurredOnDate || u.expectedDate, t)
74
+ ), l = c.some(
75
+ (u) => u.type !== A.Income && u.status === x.Upcoming
76
+ ), g = c.some(
77
+ (u) => u.type !== A.Income && u.status === x.Missed
78
+ ), b = c.some(
79
+ (u) => u.type !== A.Income && u.status === x.Paid
80
+ ), T = c.some((u) => u.type === A.Income), y = (l ? 1 : 0) + (g ? 1 : 0) + (b ? 1 : 0) + (T ? 1 : 0);
81
81
  return /* @__PURE__ */ e(
82
- nt,
82
+ at,
83
83
  {
84
- badgeContent: s.length > 0 && /* @__PURE__ */ o(K, { children: [
85
- f && /* @__PURE__ */ e(xe, { isOffset: !0 }),
86
- x && /* @__PURE__ */ e(ye, { isOffset: !0 }),
87
- m && /* @__PURE__ */ e(he, { isOffset: !0 }),
88
- b && /* @__PURE__ */ e(fe, { isOffset: !0 })
84
+ badgeContent: c.length > 0 && /* @__PURE__ */ i(j, { children: [
85
+ g && /* @__PURE__ */ e(Te, { isOffset: !0 }),
86
+ b && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
87
+ l && /* @__PURE__ */ e(be, { isOffset: !0 }),
88
+ T && /* @__PURE__ */ e(ye, { isOffset: !0 })
89
89
  ] }),
90
90
  overlap: "circular",
91
91
  sx: {
@@ -96,15 +96,15 @@ const Z = {
96
96
  }
97
97
  },
98
98
  children: /* @__PURE__ */ e(
99
- it,
99
+ rt,
100
100
  {
101
101
  "aria-label": `
102
- ${x && a.paid},
103
- ${f && a.missed},
104
- ${m && a.upcoming},
105
- ${b && a.income}`,
102
+ ${b && o.paid},
103
+ ${g && o.missed},
104
+ ${l && o.upcoming},
105
+ ${T && o.income}`,
106
106
  day: t,
107
- onClick: () => u(t),
107
+ onClick: () => f(t),
108
108
  outsideCurrentMonth: n,
109
109
  sx: {
110
110
  "&.MuiPickersDay-root": {
@@ -113,19 +113,19 @@ const Z = {
113
113
  }
114
114
  }
115
115
  },
116
- ...i
116
+ ...a
117
117
  }
118
118
  )
119
119
  }
120
120
  );
121
121
  }
122
- ), F = ({ icon: t, label: n }) => /* @__PURE__ */ o(c, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
122
+ ), F = ({ icon: t, label: n }) => /* @__PURE__ */ i(s, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
123
123
  /* @__PURE__ */ e(t, {}),
124
124
  /* @__PURE__ */ e(p, { variant: "XSmall", children: n })
125
- ] }), xt = T(() => {
126
- const { recurring: t } = D();
127
- return /* @__PURE__ */ o(
128
- c,
125
+ ] }), bt = R(() => {
126
+ const { recurring: t } = G();
127
+ return /* @__PURE__ */ i(
128
+ s,
129
129
  {
130
130
  alignItems: "center",
131
131
  "aria-hidden": !0,
@@ -134,29 +134,29 @@ const Z = {
134
134
  justifyContent: "center",
135
135
  mt: 12,
136
136
  children: [
137
- /* @__PURE__ */ e(F, { icon: he, label: t.expense }),
138
- /* @__PURE__ */ e(F, { icon: fe, label: t.income }),
139
- /* @__PURE__ */ e(F, { icon: xe, label: t.missed }),
140
- /* @__PURE__ */ e(F, { icon: ye, label: t.paid })
137
+ /* @__PURE__ */ e(F, { icon: be, label: t.expense }),
138
+ /* @__PURE__ */ e(F, { icon: ye, label: t.income }),
139
+ /* @__PURE__ */ e(F, { icon: Te, label: t.missed }),
140
+ /* @__PURE__ */ e(F, { icon: Ce, label: t.paid })
141
141
  ]
142
142
  }
143
143
  );
144
- }), Ie = 58, Ne = T(() => {
145
- const t = me(), { onEvent: n } = X(), { selectedDay: i, setDateRange: a } = v(), [r, l] = h.useState(
146
- Te(/* @__PURE__ */ new Date()) * P + Ie
147
- ), u = (s) => {
148
- l(Te(s) * P + Ie), a({
149
- start: k(s),
150
- end: z(s)
151
- }), n(w.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
152
- }, g = /* @__PURE__ */ e(
153
- Qe,
144
+ }), Se = 58, Pe = R(() => {
145
+ const t = fe(), { onEvent: n } = V(), { selectedDay: a, setDateRange: o } = _(), [r, d] = h.useState(
146
+ Ge(/* @__PURE__ */ new Date()) * $ + Se
147
+ ), f = (c) => {
148
+ d(Ge(c) * $ + Se), o({
149
+ start: k(c),
150
+ end: z(c)
151
+ }), n(S.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
152
+ }, m = /* @__PURE__ */ e(
153
+ et,
154
154
  {
155
155
  minDate: k(/* @__PURE__ */ new Date()),
156
- onMonthChange: u,
156
+ onMonthChange: f,
157
157
  showDaysOutsideCurrentMonth: !0,
158
158
  slots: {
159
- day: ft
159
+ day: ht
160
160
  },
161
161
  sx: {
162
162
  "& .MuiPickersArrowSwitcher-button": {
@@ -184,11 +184,11 @@ const Z = {
184
184
  minHeight: r
185
185
  },
186
186
  "&.MuiDateCalendar-root": {
187
- minHeight: r + P
187
+ minHeight: r + $
188
188
  },
189
189
  "& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
190
- height: P,
191
- width: P,
190
+ height: $,
191
+ width: $,
192
192
  margin: 0
193
193
  },
194
194
  "& .MuiDayCalendar-weekDayLabel": {
@@ -196,45 +196,45 @@ const Z = {
196
196
  fontSize: t.typography.body2.fontSize
197
197
  }
198
198
  },
199
- value: i,
199
+ value: a,
200
200
  views: ["day"]
201
201
  }
202
202
  );
203
- return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(et, { dateAdapter: Je, children: [
204
- i && g,
205
- !i && g,
206
- /* @__PURE__ */ e(xt, {})
203
+ return /* @__PURE__ */ e(s, { justifyContent: "center", children: /* @__PURE__ */ i(tt, { dateAdapter: Qe, children: [
204
+ a && m,
205
+ !a && m,
206
+ /* @__PURE__ */ e(bt, {})
207
207
  ] }) });
208
208
  }), yt = (t) => {
209
- if (t.type === M.Income)
210
- return /* @__PURE__ */ e(fe, {});
209
+ if (t.type === A.Income)
210
+ return /* @__PURE__ */ e(ye, {});
211
211
  switch (t.status) {
212
- case R.Missed:
213
- return /* @__PURE__ */ e(xe, {});
214
- case R.Paid:
215
- return /* @__PURE__ */ e(ye, {});
212
+ case x.Missed:
213
+ return /* @__PURE__ */ e(Te, {});
214
+ case x.Paid:
215
+ return /* @__PURE__ */ e(Ce, {});
216
216
  default:
217
- return /* @__PURE__ */ e(he, {});
217
+ return /* @__PURE__ */ e(be, {});
218
218
  }
219
- }, Ct = (t, n) => {
219
+ }, Tt = (t, n) => {
220
220
  switch (t.status) {
221
- case R.Paid:
222
- return t.expectedDate ? N(
221
+ case x.Paid:
222
+ return t.expectedDate ? O(
223
223
  n.paid_on,
224
- A(
224
+ N(
225
225
  t.occurredOnDate || t.expectedDate,
226
- E.MONTH_DAY
226
+ v.MONTH_DAY
227
227
  )
228
228
  ) : n.paid;
229
- case R.Missed:
230
- return N(
229
+ case x.Missed:
230
+ return O(
231
231
  n.missed_on,
232
- A(t.expectedDate, E.MONTH_DAY)
232
+ N(t.expectedDate, v.MONTH_DAY)
233
233
  );
234
- case R.Upcoming:
235
- return N(
234
+ case x.Upcoming:
235
+ return O(
236
236
  n.upcoming_on,
237
- A(t.expectedDate, E.MONTH_DAY)
237
+ N(t.expectedDate, v.MONTH_DAY)
238
238
  );
239
239
  default:
240
240
  return n.unknown;
@@ -242,42 +242,42 @@ const Z = {
242
242
  }, _e = ({
243
243
  recurrence: t,
244
244
  isMini: n = !1,
245
- onRecurrenceClick: i = () => {
245
+ onRecurrenceClick: a = () => {
246
246
  },
247
- showOrdinal: a = !1
247
+ showOrdinal: o = !1
248
248
  }) => {
249
- const { recurring: r } = D(), { repeatingTransactions: l } = v(), [u, g] = h.useState(!1), s = h.useMemo(
250
- () => l.find((S) => S.guid === t.repeatingTransactionGuid),
251
- [t, l]
252
- ), m = t.type === M.Income, f = t.status === R.Paid, x = t.status === R.Missed, b = t.status === R.Upcoming;
249
+ const { recurring: r } = G(), { repeatingTransactions: d } = _(), [f, m] = h.useState(!1), c = h.useMemo(
250
+ () => d.find((D) => D.guid === t.repeatingTransactionGuid),
251
+ [t, d]
252
+ ), l = t.type === A.Income, g = t.status === x.Paid, b = t.status === x.Missed, T = t.status === x.Upcoming;
253
253
  let y = r.paid?.toLowerCase();
254
- return x ? y = r.missed?.toLowerCase() : b && (y = a ? De(r, s || {}, !0) : De(r, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
255
- /* @__PURE__ */ o(Le, { disableGutters: !0, disablePadding: !0, children: [
256
- /* @__PURE__ */ o(dt, { onClick: () => {
257
- g(!0), i(t);
254
+ return b ? y = r.missed?.toLowerCase() : T && (y = o ? Ie(r, c || {}, !0) : Ie(r, c || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
255
+ /* @__PURE__ */ i(Le, { disableGutters: !0, disablePadding: !0, children: [
256
+ /* @__PURE__ */ i(ut, { onClick: () => {
257
+ m(!0), a(t);
258
258
  }, children: [
259
- /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(
260
- ue,
259
+ /* @__PURE__ */ e(dt, { children: /* @__PURE__ */ e(
260
+ me,
261
261
  {
262
262
  categoryGuid: t.categoryGuid,
263
263
  merchantGuid: t.merchantGuid
264
264
  }
265
265
  ) }),
266
- /* @__PURE__ */ e(ut, { children: /* @__PURE__ */ o(
267
- c,
266
+ /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ i(
267
+ s,
268
268
  {
269
269
  direction: "row",
270
270
  gap: 4,
271
271
  sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
272
272
  children: [
273
- /* @__PURE__ */ o(c, { direction: "column", width: "50%", children: [
273
+ /* @__PURE__ */ i(s, { direction: "column", width: "50%", children: [
274
274
  /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: t.name }),
275
- /* @__PURE__ */ e(c, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
275
+ /* @__PURE__ */ e(s, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ i(s, { direction: "row", gap: 4, children: [
276
276
  yt(t),
277
- /* @__PURE__ */ e(p, { variant: "caption", children: Ct(t, r) })
278
- ] }) : /* @__PURE__ */ o(K, { children: [
277
+ /* @__PURE__ */ e(p, { variant: "caption", children: Tt(t, r) })
278
+ ] }) : /* @__PURE__ */ i(j, { children: [
279
279
  t.institutionGuid && /* @__PURE__ */ e(
280
- Ze,
280
+ Xe,
281
281
  {
282
282
  alt: t.institutionName,
283
283
  institutionGuid: t.institutionGuid,
@@ -287,13 +287,13 @@ const Z = {
287
287
  /* @__PURE__ */ e(p, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
288
288
  ] }) })
289
289
  ] }),
290
- /* @__PURE__ */ o(c, { alignItems: "flex-end", width: "100%", children: [
291
- /* @__PURE__ */ o(p, { bold: !0, color: m ? "success.main" : "text.primary", variant: "body1", children: [
292
- m ? "+" : "",
293
- L(t.amount, "0,0.00")
290
+ /* @__PURE__ */ i(s, { alignItems: "flex-end", width: "100%", children: [
291
+ /* @__PURE__ */ i(p, { bold: !0, color: l ? "success.main" : "text.primary", variant: "body1", children: [
292
+ l ? "+" : "",
293
+ M(t.amount, "0,0.00")
294
294
  ] }),
295
- !n && /* @__PURE__ */ o(
296
- c,
295
+ !n && /* @__PURE__ */ i(
296
+ s,
297
297
  {
298
298
  direction: "row",
299
299
  sx: {
@@ -304,8 +304,8 @@ const Z = {
304
304
  width: "100%"
305
305
  },
306
306
  children: [
307
- f && /* @__PURE__ */ e(Me, { color: "success", filled: !0, size: 12 }),
308
- x && /* @__PURE__ */ e(ve, { color: "error", filled: !0, size: 12 }),
307
+ g && /* @__PURE__ */ e(Ne, { color: "success", filled: !0, size: 12 }),
308
+ b && /* @__PURE__ */ e(Me, { color: "error", filled: !0, size: 12 }),
309
309
  /* @__PURE__ */ e(p, { bold: !0, color: "text.secondary", variant: "caption", children: y })
310
310
  ]
311
311
  }
@@ -316,360 +316,638 @@ const Z = {
316
316
  ) })
317
317
  ] }),
318
318
  /* @__PURE__ */ e(
319
- Ae,
319
+ Ee,
320
320
  {
321
321
  ariaLabelClose: r.close_drawer_aria,
322
- isOpen: u,
323
- onClose: () => g(!1),
324
- title: t.type === M.Income ? r.income_details : r.expense_details,
325
- children: s && /* @__PURE__ */ e(
322
+ isOpen: f,
323
+ onClose: () => m(!1),
324
+ title: t.type === A.Income ? r.income_details : r.expense_details,
325
+ children: c && /* @__PURE__ */ e(
326
326
  mt,
327
327
  {
328
- onDeleted: () => g(!1),
329
- recurringTransaction: s
328
+ onDeleted: () => m(!1),
329
+ recurringTransaction: c
330
330
  }
331
331
  )
332
332
  }
333
333
  )
334
334
  ] });
335
- }, H = T(
335
+ }, H = R(
336
336
  ({
337
337
  recurrences: t,
338
338
  isMini: n = !1,
339
- onResetClick: i,
340
- onRecurrenceClick: a,
339
+ onResetClick: a,
340
+ onRecurrenceClick: o,
341
341
  sx: r = {},
342
- title: l
342
+ title: d
343
343
  }) => {
344
- const { recurring: u } = D(), g = h.useMemo(() => ot(t), [t]);
345
- return /* @__PURE__ */ o(c, { sx: { gap: 8, mt: 4, ...r }, children: [
346
- l && /* @__PURE__ */ o(
347
- c,
344
+ const { recurring: f } = G(), m = h.useMemo(() => it(t), [t]);
345
+ console.log(t, "recurrences"), console.log(m, "grouped recurrences");
346
+ const c = [
347
+ {
348
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
349
+ id: "date-2025-10-01",
350
+ recurrences: [
351
+ {
352
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
353
+ amount: 73,
354
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
355
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
356
+ frequency: 3,
357
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
358
+ institutionName: "Gringotts Mortgage *1568",
359
+ merchantGuid: "",
360
+ name: "Interest Charge",
361
+ recurrenceDay: 1,
362
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
363
+ secondRecurrenceDay: 15,
364
+ status: 2,
365
+ type: 0
366
+ }
367
+ ]
368
+ },
369
+ {
370
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
371
+ id: "date-2025-10-02",
372
+ recurrences: [
373
+ {
374
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
375
+ amount: 73,
376
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
377
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
378
+ frequency: 3,
379
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
380
+ institutionName: "Gringotts Mortgage *1568",
381
+ merchantGuid: "",
382
+ name: "Interest Charge",
383
+ recurrenceDay: 1,
384
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
385
+ secondRecurrenceDay: 15,
386
+ status: 2,
387
+ type: 0
388
+ }
389
+ ]
390
+ },
391
+ {
392
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
393
+ id: "date-2025-10-03",
394
+ recurrences: [
395
+ {
396
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
397
+ amount: 73,
398
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
399
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
400
+ frequency: 3,
401
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
402
+ institutionName: "Gringotts Mortgage *1568",
403
+ merchantGuid: "",
404
+ name: "Interest Charge",
405
+ recurrenceDay: 1,
406
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
407
+ secondRecurrenceDay: 15,
408
+ status: 2,
409
+ type: 0
410
+ }
411
+ ]
412
+ },
413
+ {
414
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
415
+ id: "date-2025-10-04",
416
+ recurrences: [
417
+ {
418
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
419
+ amount: 73,
420
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
421
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
422
+ frequency: 3,
423
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
424
+ institutionName: "Gringotts Mortgage *1568",
425
+ merchantGuid: "",
426
+ name: "Interest Charge",
427
+ recurrenceDay: 1,
428
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
429
+ secondRecurrenceDay: 15,
430
+ status: 2,
431
+ type: 0
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
437
+ id: "date-2025-10-05",
438
+ recurrences: [
439
+ {
440
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
441
+ amount: 73,
442
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
443
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
444
+ frequency: 3,
445
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
446
+ institutionName: "Gringotts Mortgage *1568",
447
+ merchantGuid: "",
448
+ name: "Interest Charge",
449
+ recurrenceDay: 1,
450
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
451
+ secondRecurrenceDay: 15,
452
+ status: 2,
453
+ type: 0
454
+ }
455
+ ]
456
+ },
457
+ {
458
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
459
+ id: "date-2025-10-06",
460
+ recurrences: [
461
+ {
462
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
463
+ amount: 73,
464
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
465
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
466
+ frequency: 3,
467
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
468
+ institutionName: "Gringotts Mortgage *1568",
469
+ merchantGuid: "",
470
+ name: "Interest Charge",
471
+ recurrenceDay: 1,
472
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
473
+ secondRecurrenceDay: 15,
474
+ status: 2,
475
+ type: 0
476
+ }
477
+ ]
478
+ },
479
+ {
480
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
481
+ id: "date-2025-10-07",
482
+ recurrences: [
483
+ {
484
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
485
+ amount: 73,
486
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
487
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
488
+ frequency: 3,
489
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
490
+ institutionName: "Gringotts Mortgage *1568",
491
+ merchantGuid: "",
492
+ name: "Interest Charge",
493
+ recurrenceDay: 1,
494
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
495
+ secondRecurrenceDay: 15,
496
+ status: 2,
497
+ type: 0
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
503
+ id: "date-2025-10-08",
504
+ recurrences: [
505
+ {
506
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
507
+ amount: 73,
508
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
509
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
510
+ frequency: 3,
511
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
512
+ institutionName: "Gringotts Mortgage *1568",
513
+ merchantGuid: "",
514
+ name: "Interest Charge",
515
+ recurrenceDay: 1,
516
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
517
+ secondRecurrenceDay: 15,
518
+ status: 2,
519
+ type: 0
520
+ }
521
+ ]
522
+ },
523
+ {
524
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
525
+ id: "date-2025-10-09",
526
+ recurrences: [
527
+ {
528
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
529
+ amount: 73,
530
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
531
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
532
+ frequency: 3,
533
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
534
+ institutionName: "Gringotts Mortgage *1568",
535
+ merchantGuid: "",
536
+ name: "Interest Charge",
537
+ recurrenceDay: 1,
538
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
539
+ secondRecurrenceDay: 15,
540
+ status: 2,
541
+ type: 0
542
+ }
543
+ ]
544
+ },
545
+ {
546
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
547
+ id: "date-2025-10-10",
548
+ recurrences: [
549
+ {
550
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
551
+ amount: 73,
552
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
553
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
554
+ frequency: 3,
555
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
556
+ institutionName: "Gringotts Mortgage *1568",
557
+ merchantGuid: "",
558
+ name: "Interest Charge",
559
+ recurrenceDay: 1,
560
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
561
+ secondRecurrenceDay: 15,
562
+ status: 2,
563
+ type: 0
564
+ }
565
+ ]
566
+ },
567
+ {
568
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
569
+ id: "date-2025-10-11",
570
+ recurrences: [
571
+ {
572
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
573
+ amount: 73,
574
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
575
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
576
+ frequency: 3,
577
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
578
+ institutionName: "Gringotts Mortgage *1568",
579
+ merchantGuid: "",
580
+ name: "Interest Charge",
581
+ recurrenceDay: 1,
582
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
583
+ secondRecurrenceDay: 15,
584
+ status: 2,
585
+ type: 0
586
+ }
587
+ ]
588
+ },
589
+ {
590
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
591
+ id: "date-2025-10-12",
592
+ recurrences: [
593
+ {
594
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
595
+ amount: 73,
596
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
597
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
598
+ frequency: 3,
599
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
600
+ institutionName: "Gringotts Mortgage *1568",
601
+ merchantGuid: "",
602
+ name: "Interest Charge",
603
+ recurrenceDay: 1,
604
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
605
+ secondRecurrenceDay: 15,
606
+ status: 2,
607
+ type: 0
608
+ }
609
+ ]
610
+ }
611
+ ];
612
+ return /* @__PURE__ */ i(s, { sx: { gap: 8, mt: 4, ...r }, children: [
613
+ d && /* @__PURE__ */ i(
614
+ s,
348
615
  {
349
616
  sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
350
617
  children: [
351
- /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: l }),
352
- i && /* @__PURE__ */ e(st, { onClick: i, sx: { mt: -12 }, variant: "text", children: u.reset })
618
+ /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: d }),
619
+ a && /* @__PURE__ */ e(ct, { onClick: a, sx: { mt: -12 }, variant: "text", children: f.reset })
353
620
  ]
354
621
  }
355
622
  ),
356
- t.length === 0 ? /* @__PURE__ */ e(p, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: u.no_activities }) : /* @__PURE__ */ e(Se, { children: n ? t.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
623
+ c.length === 0 ? /* @__PURE__ */ e(p, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: f.no_activities }) : /* @__PURE__ */ e(we, { children: n ? t.map((l, g) => /* @__PURE__ */ i(h.Fragment, { children: [
357
624
  /* @__PURE__ */ e(
358
625
  _e,
359
626
  {
360
627
  isMini: n,
361
- onRecurrenceClick: a,
362
- recurrence: s
628
+ onRecurrenceClick: o,
629
+ recurrence: l
363
630
  }
364
631
  ),
365
632
  /* @__PURE__ */ e(se, { sx: { mx: 24 } })
366
- ] }, `recurrence-${m}`)) : g.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
633
+ ] }, `recurrence-${g}`)) : c.map((l, g) => /* @__PURE__ */ i(h.Fragment, { children: [
367
634
  /* @__PURE__ */ e(Le, { children: /* @__PURE__ */ e(
368
- Se,
635
+ we,
369
636
  {
370
- subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
637
+ subheader: /* @__PURE__ */ e(st, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: N(l.date, v.DAY_OF_WEEK_MONTH_DAY) }) }),
371
638
  sx: { width: "100%" },
372
- children: s.recurrences.map((f, x) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
639
+ children: l.recurrences.map((b, T) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
373
640
  _e,
374
641
  {
375
642
  isMini: n,
376
- onRecurrenceClick: a,
377
- recurrence: f
643
+ onRecurrenceClick: o,
644
+ recurrence: b
378
645
  }
379
- ) }, `day-recurrence-${x}`))
646
+ ) }, `day-recurrence-${T}`))
380
647
  }
381
- ) }, s.id),
648
+ ) }, l.id),
382
649
  /* @__PURE__ */ e(se, { sx: { mx: 24 } })
383
- ] }, `recurrence-${m}`)) })
650
+ ] }, `recurrence-${g}`)) })
384
651
  ] });
385
652
  }
386
- ), we = T(
387
- ({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming: u }) => {
388
- const g = me(), { isSmallMobile: s } = Ge(), { recurring: m } = D(), f = h.useMemo(() => {
389
- const x = [{ color: g.palette.success.main, percentage: `${a / t}` }];
390
- return i && x.push({ color: g.palette.error.main, percentage: `${i / t}` }), x;
391
- }, [a, t, i]);
392
- return /* @__PURE__ */ o(c, { sx: { px: 24 }, children: [
393
- /* @__PURE__ */ o(c, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
394
- /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${r} (${l})` }),
395
- /* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
653
+ ), Ae = R(
654
+ ({ expected: t, isExpense: n = !0, missed: a, paid: o, title: r, total: d, upcoming: f }) => {
655
+ const m = fe(), { isSmallMobile: c } = he(), { recurring: l } = G(), g = h.useMemo(() => {
656
+ const b = [{ color: m.palette.success.main, percentage: `${o / t}` }];
657
+ return a && b.push({ color: m.palette.error.main, percentage: `${a / t}` }), b;
658
+ }, [o, t, a]);
659
+ return /* @__PURE__ */ i(s, { children: [
660
+ /* @__PURE__ */ i(s, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
661
+ /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${r} (${d})` }),
662
+ /* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${M(t, "0,0.00")}` })
396
663
  ] }),
397
- /* @__PURE__ */ e(Ee, { data: f, height: 12 }),
398
- /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
399
- /* @__PURE__ */ e(O, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
400
- !s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(a, "0,0.00") }),
401
- /* @__PURE__ */ e(p, { variant: "caption", children: m.paid?.toLowerCase() }),
402
- i !== void 0 && /* @__PURE__ */ o(K, { children: [
403
- /* @__PURE__ */ e(O, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
404
- !s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
405
- /* @__PURE__ */ e(p, { variant: "caption", children: m.missed?.toLowerCase() })
664
+ /* @__PURE__ */ e(Oe, { data: g, height: 12 }),
665
+ /* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
666
+ /* @__PURE__ */ e(P, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
667
+ !c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(o, "0,0.00") }),
668
+ /* @__PURE__ */ e(p, { variant: "caption", children: l.paid?.toLowerCase() }),
669
+ a !== void 0 && /* @__PURE__ */ i(j, { children: [
670
+ /* @__PURE__ */ e(P, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
671
+ !c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(a, "0,0.00") }),
672
+ /* @__PURE__ */ e(p, { variant: "caption", children: l.missed?.toLowerCase() })
406
673
  ] }),
407
- /* @__PURE__ */ e(O, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
408
- !s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(u, "0,0.00") }),
409
- /* @__PURE__ */ e(p, { variant: "caption", children: m.upcoming })
674
+ /* @__PURE__ */ e(P, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
675
+ !c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(f, "0,0.00") }),
676
+ /* @__PURE__ */ e(p, { variant: "caption", children: l.upcoming })
410
677
  ] })
411
678
  ] });
412
679
  }
413
- ), bt = T(() => {
414
- const { recurring: t } = D(), { isDesktop: n, isSmallMobile: i } = Ge(), { onEvent: a } = X(), {
415
- currentMonthExpenses: r,
416
- currentMonthIncome: l,
417
- dateRange: u,
418
- expenseTotal: g,
419
- incomeTotal: s,
420
- missedExpenseTotal: m,
421
- pastRecurrences: f,
422
- paidExpenseTotal: x,
423
- paidIncomeTotal: b,
424
- selectedDay: y,
425
- selectedDayRecurrences: d,
426
- setDateRange: S,
427
- upcomingExpenseTotal: W,
428
- upcomingIncomeTotal: J,
680
+ ), Ct = R(() => {
681
+ const { recurring: t } = G(), { availableWidth: n } = ve(), { isDesktop: a, isSmallMobile: o } = he(n), { onEvent: r } = V(), {
682
+ currentMonthExpenses: d,
683
+ currentMonthIncome: f,
684
+ dateRange: m,
685
+ expenseTotal: c,
686
+ incomeTotal: l,
687
+ missedExpenseTotal: g,
688
+ pastRecurrences: b,
689
+ paidExpenseTotal: T,
690
+ paidIncomeTotal: y,
691
+ selectedDay: u,
692
+ selectedDayRecurrences: D,
693
+ setDateRange: L,
694
+ upcomingExpenseTotal: Q,
695
+ upcomingIncomeTotal: ee,
429
696
  upcomingRecurrences: B
430
- } = v(), [$, Q] = h.useState(0), ee = Ue(u.start, /* @__PURE__ */ new Date()), I = (C, ie) => {
431
- Q(ie);
432
- }, U = (C) => {
433
- a(w.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
697
+ } = _(), [W, te] = h.useState(0), I = Ue(m.start, /* @__PURE__ */ new Date()), ne = (C, re) => {
698
+ te(re);
699
+ }, w = (C) => {
700
+ r(S.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
434
701
  transaction_guid: C.transaction?.guid
435
702
  });
436
- }, _ = (C) => {
437
- a(w.RECURRING_TRANSACTIONS_CLICK_PAID, {
703
+ }, U = (C) => {
704
+ r(S.RECURRING_TRANSACTIONS_CLICK_PAID, {
438
705
  transaction_guid: C.transaction?.guid
439
706
  });
440
- }, te = () => {
441
- const C = ze(u.start, 1);
442
- S({
707
+ }, ae = () => {
708
+ const C = ze(m.start, 1);
709
+ L({
443
710
  start: k(C),
444
711
  end: z(C)
445
712
  });
446
- }, ne = () => {
447
- const C = Be(u.start, 1);
448
- S({
713
+ }, Z = () => {
714
+ const C = Be(m.start, 1);
715
+ L({
449
716
  start: k(C),
450
717
  end: z(C)
451
718
  });
452
719
  };
453
- return /* @__PURE__ */ o(oe, { container: !0, sx: { pt: 16, px: 24, spacing: 24 }, children: [
454
- /* @__PURE__ */ e(oe, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ o(c, { sx: { gap: 16 }, children: [
455
- /* @__PURE__ */ o(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
456
- /* @__PURE__ */ e(qe, { sx: { px: 24 }, children: N(
457
- t.header_title,
458
- A(u.start, E.MONTH_LONG)
459
- ) }),
460
- !n && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
720
+ return /* @__PURE__ */ i(
721
+ oe,
722
+ {
723
+ container: !0,
724
+ sx: {
725
+ pt: 16,
726
+ px: a ? 48 : 24
727
+ },
728
+ children: [
729
+ /* @__PURE__ */ e(oe, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ i(s, { sx: { gap: 16 }, children: [
730
+ /* @__PURE__ */ i(s, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
731
+ /* @__PURE__ */ e(Je, { children: O(
732
+ t.header_title,
733
+ N(m.start, v.MONTH_LONG)
734
+ ) }),
735
+ !a && /* @__PURE__ */ i(s, { direction: "row", gap: 4, children: [
736
+ /* @__PURE__ */ e(
737
+ xe,
738
+ {
739
+ color: "primary",
740
+ disabled: I,
741
+ onClick: Z,
742
+ children: /* @__PURE__ */ e(Ke, {})
743
+ }
744
+ ),
745
+ /* @__PURE__ */ e(xe, { color: "primary", onClick: ae, children: /* @__PURE__ */ e(Ye, {}) })
746
+ ] })
747
+ ] }),
461
748
  /* @__PURE__ */ e(
462
- be,
749
+ Ae,
463
750
  {
464
- color: "primary",
465
- disabled: ee,
466
- onClick: ne,
467
- children: /* @__PURE__ */ e(Ye, {})
751
+ expected: c,
752
+ missed: g,
753
+ paid: T,
754
+ title: t.expenses,
755
+ total: d.length,
756
+ upcoming: Q
468
757
  }
469
758
  ),
470
- /* @__PURE__ */ e(be, { color: "primary", onClick: te, children: /* @__PURE__ */ e(Ve, {}) })
471
- ] })
472
- ] }),
473
- /* @__PURE__ */ e(
474
- we,
475
- {
476
- expected: g,
477
- missed: m,
478
- paid: x,
479
- title: t.expenses,
480
- total: r.length,
481
- upcoming: W
482
- }
483
- ),
484
- /* @__PURE__ */ e(
485
- we,
486
- {
487
- expected: s,
488
- isExpense: !1,
489
- paid: b,
490
- title: t.deposits,
491
- total: l.length,
492
- upcoming: J
493
- }
494
- ),
495
- n && /* @__PURE__ */ e(
496
- H,
497
- {
498
- onRecurrenceClick: U,
499
- recurrences: B,
500
- title: t.upcoming_activity
501
- }
502
- ),
503
- !n && /* @__PURE__ */ o(c, { children: [
504
- /* @__PURE__ */ o(Fe, { onChange: I, value: $, variant: "fullWidth", children: [
505
759
  /* @__PURE__ */ e(
506
- Re,
760
+ Ae,
761
+ {
762
+ expected: l,
763
+ isExpense: !1,
764
+ paid: y,
765
+ title: t.deposits,
766
+ total: f.length,
767
+ upcoming: ee
768
+ }
769
+ ),
770
+ a && /* @__PURE__ */ e(
771
+ H,
507
772
  {
508
- label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.upcoming : t.upcoming_activity })
773
+ onRecurrenceClick: w,
774
+ recurrences: B,
775
+ title: t.upcoming_activity
509
776
  }
510
777
  ),
778
+ !a && /* @__PURE__ */ i(s, { children: [
779
+ /* @__PURE__ */ i(Fe, { onChange: ne, value: W, variant: "fullWidth", children: [
780
+ /* @__PURE__ */ e(
781
+ Re,
782
+ {
783
+ label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.upcoming : t.upcoming_activity })
784
+ }
785
+ ),
786
+ /* @__PURE__ */ e(
787
+ Re,
788
+ {
789
+ label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.past : t.past_transactions })
790
+ }
791
+ )
792
+ ] }),
793
+ W === 0 && /* @__PURE__ */ e(
794
+ H,
795
+ {
796
+ onRecurrenceClick: w,
797
+ recurrences: B
798
+ }
799
+ ),
800
+ W === 1 && /* @__PURE__ */ e(
801
+ H,
802
+ {
803
+ onRecurrenceClick: U,
804
+ recurrences: b
805
+ }
806
+ )
807
+ ] })
808
+ ] }) }),
809
+ a && /* @__PURE__ */ e(oe, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ i(s, { gap: 24, children: [
810
+ /* @__PURE__ */ e(Pe, {}),
511
811
  /* @__PURE__ */ e(
512
- Re,
812
+ H,
513
813
  {
514
- label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.past : t.past_transactions })
814
+ onRecurrenceClick: U,
815
+ recurrences: D || b,
816
+ title: u ? O(
817
+ t.day_transactions,
818
+ N(u, v.MONTH_DAY)
819
+ ) : t.past_transactions
515
820
  }
516
821
  )
517
- ] }),
518
- $ === 0 && /* @__PURE__ */ e(
519
- H,
520
- {
521
- onRecurrenceClick: U,
522
- recurrences: B
523
- }
524
- ),
525
- $ === 1 && /* @__PURE__ */ e(
526
- H,
527
- {
528
- onRecurrenceClick: _,
529
- recurrences: f
530
- }
531
- )
532
- ] })
533
- ] }) }),
534
- n && /* @__PURE__ */ e(oe, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(c, { gap: 24, children: [
535
- /* @__PURE__ */ e(Ne, {}),
536
- /* @__PURE__ */ e(
537
- H,
538
- {
539
- onRecurrenceClick: _,
540
- recurrences: d || f,
541
- title: y ? N(
542
- t.day_transactions,
543
- A(y, E.MONTH_DAY)
544
- ) : t.past_transactions
545
- }
546
- )
547
- ] }) })
548
- ] });
549
- }), _n = T(({ onBackClick: t, sx: n = {} }) => {
550
- const { accounts: i } = pe(), { recurring: a } = D(), { isCopyLoaded: r, isInitialized: l, selectedAccountGuids: u, setSelectedAccounts: g } = V(), { isDataLoaded: s, loadRepeatingTransactions: m, setDateRange: f } = v(), { setFilter: x } = ge(), { onEvent: b } = X(), [y, d] = h.useState(!1);
822
+ ] }) })
823
+ ]
824
+ }
825
+ );
826
+ }), wn = R(({ onBackClick: t, sx: n = {} }) => {
827
+ const { accounts: a } = pe(), { recurring: o } = G(), { isCopyLoaded: r, isInitialized: d, selectedAccountGuids: f, setSelectedAccounts: m } = Y(), { isDataLoaded: c, loadRepeatingTransactions: l, setDateRange: g } = _(), { setFilter: b } = ge(), { onEvent: T } = V(), { isMobile: y } = he(), [u, D] = h.useState(!1);
551
828
  return h.useEffect(() => {
552
- g(i);
553
- }, [i]), h.useEffect(() => {
554
- l && (x({
555
- dateRange: { start: de(le(), 90), end: ce() },
556
- accounts: u
557
- }), f({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), m().finally());
558
- }, [l]), r ? /* @__PURE__ */ o(
559
- at,
829
+ m(a);
830
+ }, [a]), h.useEffect(() => {
831
+ d && (b({
832
+ dateRange: { start: le(ue(), 90), end: de() },
833
+ accounts: f
834
+ }), g({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), l().finally());
835
+ }, [d]), r ? /* @__PURE__ */ i(
836
+ ot,
560
837
  {
561
- accountOptions: i,
838
+ accountOptions: a,
562
839
  actions: [
563
840
  {
564
- label: a.action_title,
841
+ label: o.action_title,
565
842
  iconName: "credit_card_gear",
566
843
  onClick: () => {
567
- d(!0), b(w.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
844
+ D(!0), T(S.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
568
845
  }
569
846
  }
570
847
  ],
571
- onAccountsFilterClick: () => b(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
848
+ hasDivider: y,
849
+ onAccountsFilterClick: () => T(S.RECURRING_TRANSACTIONS_CLICK_FILTER),
572
850
  onBackClick: t,
573
851
  sx: n,
574
- title: a.title,
852
+ title: o.title,
575
853
  children: [
576
- l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ o(c, { direction: "column", p: 48, spacing: 24, children: [
577
- /* @__PURE__ */ e(re, { height: 100, variant: "rounded", width: "100%" }),
578
- /* @__PURE__ */ e(re, { height: 100, variant: "rounded", width: "100%" }),
579
- /* @__PURE__ */ e(re, { height: 600, variant: "rounded", width: "100%" })
854
+ d && c ? /* @__PURE__ */ e(Ct, {}) : /* @__PURE__ */ i(s, { direction: "column", p: 48, spacing: 24, children: [
855
+ /* @__PURE__ */ e(ie, { height: 100, variant: "rounded", width: "100%" }),
856
+ /* @__PURE__ */ e(ie, { height: 100, variant: "rounded", width: "100%" }),
857
+ /* @__PURE__ */ e(ie, { height: 600, variant: "rounded", width: "100%" })
580
858
  ] }),
581
859
  /* @__PURE__ */ e(
582
- Ae,
860
+ Ee,
583
861
  {
584
- ariaLabelClose: a.close_drawer_aria,
585
- isOpen: y,
586
- onClose: () => d(!1),
862
+ ariaLabelClose: o.close_drawer_aria,
863
+ isOpen: u,
864
+ onClose: () => D(!1),
587
865
  shouldShowHeaderBorders: !1,
588
- title: a.action_title,
866
+ title: o.action_title,
589
867
  children: /* @__PURE__ */ e(He, {})
590
868
  }
591
869
  )
592
870
  ]
593
871
  }
594
- ) : /* @__PURE__ */ e(j, {});
595
- }), Rt = T(() => {
596
- const { recurring: t } = D(), { availableWidth: n } = rt(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: r, upcomingRecurrences: l } = v(), u = n < 750;
597
- return /* @__PURE__ */ o(c, { flexDirection: u ? "column" : "row", width: "100%", children: [
598
- /* @__PURE__ */ e(Ne, {}),
599
- !u && /* @__PURE__ */ e(se, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
872
+ ) : /* @__PURE__ */ e(q, {});
873
+ }), Dt = R(() => {
874
+ const { recurring: t } = G(), { availableWidth: n } = ve(), { selectedDay: a, selectedDayRecurrences: o, setSelectedDay: r, upcomingRecurrences: d } = _(), f = n < 750;
875
+ return /* @__PURE__ */ i(s, { flexDirection: f ? "column" : "row", width: "100%", children: [
876
+ /* @__PURE__ */ e(Pe, {}),
877
+ !f && /* @__PURE__ */ e(se, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
600
878
  /* @__PURE__ */ e(
601
879
  H,
602
880
  {
603
881
  isMini: !0,
604
- onResetClick: i ? () => r(i) : void 0,
605
- recurrences: a || l.slice(0, 5),
606
- sx: { width: u ? "100%" : "calc(100% - 336px)", mt: 12 },
607
- title: i ? N(
882
+ onResetClick: a ? () => r(a) : void 0,
883
+ recurrences: o || d.slice(0, 5),
884
+ sx: { width: f ? "100%" : "calc(100% - 336px)", mt: 12 },
885
+ title: a ? O(
608
886
  t.day_transactions,
609
- A(i, E.MONTH_DAY)
887
+ N(a, v.MONTH_DAY)
610
888
  ) : t.upcoming_activity
611
889
  }
612
890
  )
613
891
  ] });
614
- }), wn = T(
892
+ }), Sn = R(
615
893
  ({ onPrimaryCtaClick: t, sx: n }) => {
616
- const { accounts: i } = pe(), { recurring: a } = D(), { setFilter: r } = ge(), { isDataLoaded: l, loadRepeatingTransactions: u } = v(), { isCopyLoaded: g, isInitialized: s, setSelectedAccounts: m, selectedAccountGuids: f } = V();
894
+ const { accounts: a } = pe(), { recurring: o } = G(), { setFilter: r } = ge(), { isDataLoaded: d, loadRepeatingTransactions: f } = _(), { isCopyLoaded: m, isInitialized: c, setSelectedAccounts: l, selectedAccountGuids: g } = Y();
617
895
  return h.useEffect(() => {
618
- s && m(i);
619
- }, [s]), h.useEffect(() => {
620
- f.length > 0 && (r({
621
- dateRange: { start: de(le(), 90), end: ce() },
622
- accounts: f
623
- }), u().finally());
624
- }, [f]), !g || !s ? /* @__PURE__ */ e(j, {}) : /* @__PURE__ */ e(
625
- pt,
896
+ c && l(a);
897
+ }, [c]), h.useEffect(() => {
898
+ g.length > 0 && (r({
899
+ dateRange: { start: le(ue(), 90), end: de() },
900
+ accounts: g
901
+ }), f().finally());
902
+ }, [g]), !m || !c ? /* @__PURE__ */ e(q, {}) : /* @__PURE__ */ e(
903
+ ft,
626
904
  {
627
905
  className: "mx-exp-recurring-transactions-miniwidget",
628
906
  onPrimaryCtaClick: t,
629
- primaryCtaLabel: a.primary_cta,
630
- subTitle: a.sub_title,
907
+ primaryCtaLabel: o.primary_cta,
908
+ subTitle: o.sub_title,
631
909
  sx: n,
632
- title: a.mini_title,
633
- children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(j, {})
910
+ title: o.mini_title,
911
+ children: d ? /* @__PURE__ */ e(Dt, {}) : /* @__PURE__ */ e(q, {})
634
912
  }
635
913
  );
636
914
  }
637
- ), Tt = ({
915
+ ), xt = ({
638
916
  upcomingRecurrences: t,
639
917
  maxLogos: n = 3
640
- }) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, a) => /* @__PURE__ */ e(
641
- ue,
918
+ }) => /* @__PURE__ */ e(s, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((a, o) => /* @__PURE__ */ e(
919
+ me,
642
920
  {
643
- categoryGuid: i.categoryGuid || "",
644
- merchantGuid: i.merchantGuid || ""
921
+ categoryGuid: a.categoryGuid || "",
922
+ merchantGuid: a.merchantGuid || ""
645
923
  },
646
- `${i.categoryGuid}-${i.merchantGuid}-${a}`
647
- )) }), Dt = ({
924
+ `${a.categoryGuid}-${a.merchantGuid}-${o}`
925
+ )) }), Rt = ({
648
926
  upcomingRecurrences: t,
649
927
  logoSize: n = 32,
650
- maxLogos: i = 3
928
+ maxLogos: a = 3
651
929
  }) => {
652
- const a = (r) => r * (n / 2);
930
+ const o = (r) => r * (n / 2);
653
931
  return /* @__PURE__ */ e(
654
- O,
932
+ P,
655
933
  {
656
934
  sx: {
657
935
  position: "relative",
658
936
  width: 64
659
937
  },
660
- children: t.map((r, l) => l < i ? /* @__PURE__ */ e(
661
- O,
938
+ children: t.map((r, d) => d < a ? /* @__PURE__ */ e(
939
+ P,
662
940
  {
663
941
  sx: {
664
942
  borderRadius: "4px",
665
- left: a(l),
943
+ left: o(d),
666
944
  outlineColor: "common.white",
667
945
  outlineStyle: "solid",
668
946
  outlineWidth: 2,
669
947
  position: "absolute"
670
948
  },
671
949
  children: /* @__PURE__ */ e(
672
- ue,
950
+ me,
673
951
  {
674
952
  categoryGuid: r.categoryGuid || "",
675
953
  merchantGuid: r.merchantGuid || "",
@@ -677,19 +955,19 @@ const Z = {
677
955
  }
678
956
  )
679
957
  },
680
- `${r.categoryGuid}-${r.merchantGuid}-${l}`
958
+ `${r.categoryGuid}-${r.merchantGuid}-${d}`
681
959
  ) : null)
682
960
  }
683
961
  );
684
- }, St = ({
962
+ }, Gt = ({
685
963
  amount: t,
686
964
  bgcolor: n,
687
- isLargeScreen: i,
688
- isSmallScreen: a,
965
+ isLargeScreen: a,
966
+ isSmallScreen: o,
689
967
  label: r
690
- }) => /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
968
+ }) => /* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
691
969
  /* @__PURE__ */ e(
692
- O,
970
+ P,
693
971
  {
694
972
  sx: {
695
973
  borderRadius: "2px",
@@ -699,110 +977,110 @@ const Z = {
699
977
  }
700
978
  }
701
979
  ),
702
- /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
703
- !a && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
980
+ /* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
981
+ !o && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: M(t, t === 0 || !a ? "0,0" : "0,0.00") }),
704
982
  /* @__PURE__ */ e(p, { variant: "caption", children: r })
705
983
  ] })
706
- ] }), It = T(() => {
707
- const { recurring: t } = D();
708
- return /* @__PURE__ */ o(c, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
709
- /* @__PURE__ */ e(Xe, { size: 32 }),
710
- /* @__PURE__ */ o(c, { children: [
711
- /* @__PURE__ */ e(ae, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
712
- /* @__PURE__ */ e(ae, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
984
+ ] }), It = R(() => {
985
+ const { recurring: t } = G();
986
+ return /* @__PURE__ */ i(s, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
987
+ /* @__PURE__ */ e(Ve, { size: 32 }),
988
+ /* @__PURE__ */ i(s, { children: [
989
+ /* @__PURE__ */ e(ce, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
990
+ /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
713
991
  ] })
714
992
  ] });
715
- }), vn = T(
993
+ }), _n = R(
716
994
  ({ onCTAClick: t }) => {
717
- const [n, i] = h.useState(!1), { onEvent: a } = X(), r = me(), { accounts: l } = pe(), [u, { width: g }] = gt(), { isCopyLoaded: s, isInitialized: m, selectedAccountGuids: f, setSelectedAccounts: x } = V(), {
718
- loadRepeatingTransactions: b,
995
+ const [n, a] = h.useState(!1), { onEvent: o } = V(), r = fe(), { accounts: d } = pe(), [f, { width: m }] = pt(), { isCopyLoaded: c, isInitialized: l, selectedAccountGuids: g, setSelectedAccounts: b } = Y(), {
996
+ loadRepeatingTransactions: T,
719
997
  upcomingRecurrences: y,
720
- expenseTotal: d,
721
- missedExpenseTotal: S,
722
- paidExpenseTotal: W,
723
- repeatingTransactions: J,
724
- setDateRange: B,
725
- upcomingExpenseTotal: $,
726
- isDataLoaded: Q
727
- } = v(), { setFilter: ee } = ge(), { recurring: I, budgets: U } = D();
998
+ expenseTotal: u,
999
+ missedExpenseTotal: D,
1000
+ paidExpenseTotal: L,
1001
+ repeatingTransactions: Q,
1002
+ setDateRange: ee,
1003
+ upcomingExpenseTotal: B,
1004
+ isDataLoaded: W
1005
+ } = _(), { setFilter: te } = ge(), { recurring: I, budgets: ne } = G();
728
1006
  h.useEffect(() => {
729
- x(l);
1007
+ b(d);
1008
+ }, [d]), h.useEffect(() => {
1009
+ l && (te({
1010
+ dateRange: { start: le(ue(), 90), end: de() },
1011
+ accounts: g
1012
+ }), ee({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), T().finally(), a(!0));
730
1013
  }, [l]), h.useEffect(() => {
731
- m && (ee({
732
- dateRange: { start: de(le(), 90), end: ce() },
733
- accounts: f
734
- }), B({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), b().finally(), i(!0));
735
- }, [m]), h.useEffect(() => {
736
- n && a(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
1014
+ n && o(S.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
737
1015
  state: y.length > 0 ? "default" : "zeroState"
738
1016
  });
739
1017
  }, [n]);
740
- const _ = g <= 288, te = g >= 450, ne = h.useMemo(() => {
741
- const G = [
742
- { color: r.palette.success.main, percentage: `${W / d}` }
1018
+ const w = m <= 288, U = m >= 450, ae = h.useMemo(() => {
1019
+ const E = [
1020
+ { color: r.palette.success.main, percentage: `${L / u}` }
743
1021
  ];
744
- return S && G.push({
1022
+ return D && E.push({
745
1023
  color: r.palette.error.main,
746
- percentage: `${S / d}`
747
- }), G;
1024
+ percentage: `${D / u}`
1025
+ }), E;
748
1026
  }, [
749
- W,
750
- d,
751
- S,
1027
+ L,
1028
+ u,
1029
+ D,
752
1030
  r.palette.success.main,
753
1031
  r.palette.error.main
754
- ]), C = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), ie = () => {
755
- a(
756
- y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
1032
+ ]), Z = h.useMemo(() => M(u, u === 0 ? "0,0" : "0,0.00"), [u]), C = () => {
1033
+ o(
1034
+ y.length > 0 ? S.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : S.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
757
1035
  ), t();
758
1036
  };
759
- if (!s || !n || !Q) return /* @__PURE__ */ e(j, { height: 100 });
760
- const Oe = 32, ke = y.length > 0, We = () => ke ? _ ? /* @__PURE__ */ e(
761
- Dt,
1037
+ if (!c || !n || !W) return /* @__PURE__ */ e(q, { height: 100 });
1038
+ const re = 32, ke = y.length > 0, We = () => ke ? w ? /* @__PURE__ */ e(
1039
+ Rt,
762
1040
  {
763
- logoSize: Oe,
1041
+ logoSize: re,
764
1042
  maxLogos: 3,
765
1043
  upcomingRecurrences: y.slice(0, 3)
766
1044
  }
767
- ) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: _ ? 64 : 104 } }), $e = [
1045
+ ) : /* @__PURE__ */ e(xt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(s, { sx: { width: w ? 64 : 104 } }), Ze = [
768
1046
  {
769
- amount: W,
1047
+ amount: L,
770
1048
  bgColor: "success.main",
771
1049
  label: I.paid
772
1050
  },
773
1051
  {
774
- amount: S,
1052
+ amount: D,
775
1053
  bgColor: "error.main",
776
1054
  label: I.missed
777
1055
  },
778
1056
  {
779
- amount: $,
1057
+ amount: B,
780
1058
  bgColor: "border.light",
781
1059
  label: I.upcoming
782
1060
  }
783
- ], Ce = !J?.length;
1061
+ ], De = !Q?.length;
784
1062
  return /* @__PURE__ */ e(
785
- ht,
1063
+ gt,
786
1064
  {
787
1065
  className: "mx-recurring-transaction-microwidget",
788
- ctaLabel: Ce ? U.get_started_cta : I.primary_cta,
789
- onCTAClick: ie,
1066
+ ctaLabel: De ? ne.get_started_cta : I.primary_cta,
1067
+ onCTAClick: C,
790
1068
  title: I.recurring_expenses,
791
- children: Ce ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ o(K, { children: [
792
- /* @__PURE__ */ o(
793
- c,
1069
+ children: De ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ i(j, { children: [
1070
+ /* @__PURE__ */ i(
1071
+ s,
794
1072
  {
795
- ref: u,
1073
+ ref: f,
796
1074
  sx: {
797
1075
  flexDirection: "row",
798
1076
  justifyContent: "space-between"
799
1077
  },
800
1078
  children: [
801
- /* @__PURE__ */ o(
802
- c,
1079
+ /* @__PURE__ */ i(
1080
+ s,
803
1081
  {
804
1082
  sx: [
805
- C.length >= 10 && _ ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
1083
+ Z.length >= 10 && w ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
806
1084
  {
807
1085
  alignItems: "baseline",
808
1086
  overflow: "hidden",
@@ -815,12 +1093,12 @@ const Z = {
815
1093
  p,
816
1094
  {
817
1095
  sx: { width: "100%" },
818
- variant: C.length >= 10 && _ ? "H3" : "H2",
819
- children: C
1096
+ variant: Z.length >= 10 && w ? "H3" : "H2",
1097
+ children: Z
820
1098
  }
821
1099
  ),
822
1100
  /* @__PURE__ */ e(
823
- ae,
1101
+ ce,
824
1102
  {
825
1103
  sx: {
826
1104
  pr: 12
@@ -836,10 +1114,10 @@ const Z = {
836
1114
  ]
837
1115
  }
838
1116
  ),
839
- /* @__PURE__ */ o(c, { sx: { pt: 12 }, children: [
840
- /* @__PURE__ */ e(Ee, { data: ne }),
1117
+ /* @__PURE__ */ i(s, { sx: { pt: 12 }, children: [
1118
+ /* @__PURE__ */ e(Oe, { data: ae }),
841
1119
  /* @__PURE__ */ e(
842
- c,
1120
+ s,
843
1121
  {
844
1122
  sx: {
845
1123
  alignItems: "center",
@@ -847,16 +1125,16 @@ const Z = {
847
1125
  gap: 16,
848
1126
  mt: 4
849
1127
  },
850
- children: $e.map((G, Pe) => /* @__PURE__ */ e(
851
- St,
1128
+ children: Ze.map((E, $e) => /* @__PURE__ */ e(
1129
+ Gt,
852
1130
  {
853
- amount: G.amount,
854
- bgcolor: G.bgColor,
855
- isLargeScreen: te,
856
- isSmallScreen: _,
857
- label: G.label
1131
+ amount: E.amount,
1132
+ bgcolor: E.bgColor,
1133
+ isLargeScreen: U,
1134
+ isSmallScreen: w,
1135
+ label: E.label
858
1136
  },
859
- `recurrence-legend-${Pe}`
1137
+ `recurrence-legend-${$e}`
860
1138
  ))
861
1139
  }
862
1140
  )
@@ -868,12 +1146,12 @@ const Z = {
868
1146
  );
869
1147
  export {
870
1148
  On as AddRecurringTransactionDetails,
871
- An as ManageExpenses,
872
- kn as ManageIncome,
1149
+ Nn as ManageExpenses,
1150
+ Pn as ManageIncome,
873
1151
  He as RecurringSettings,
874
- vn as RecurringTransactionsMicroWidget,
875
- wn as RecurringTransactionsMiniWidget,
876
- Gn as RecurringTransactionsStore,
877
- _n as RecurringTransactionsWidget,
878
- Wn as SelectTransaction
1152
+ _n as RecurringTransactionsMicroWidget,
1153
+ Sn as RecurringTransactionsMiniWidget,
1154
+ Ln as RecurringTransactionsStore,
1155
+ wn as RecurringTransactionsWidget,
1156
+ kn as SelectTransaction
879
1157
  };