@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/Account-BiB1F8lL.mjs +118 -0
  3. package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
  4. package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
  5. package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
  6. package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
  7. package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
  8. package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
  9. package/dist/AccountStore-BbPWe2C9.mjs +244 -0
  10. package/dist/Accounts-M-LTzStv.mjs +27 -0
  11. package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
  12. package/dist/CategoryUtil-meuejJqP.mjs +80 -0
  13. package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
  14. package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
  15. package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
  16. package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
  17. package/dist/GoalStore-B4LVt_kH.mjs +422 -0
  18. package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
  19. package/dist/NetWorthStore-yV43kJro.mjs +168 -0
  20. package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
  21. package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
  22. package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
  23. package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
  24. package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
  25. package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
  26. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  27. package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
  28. package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
  29. package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
  30. package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
  31. package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
  32. package/dist/accounts/index.es.js +421 -391
  33. package/dist/accounts/stores/AccountStore.d.ts +30 -23
  34. package/dist/accounts/utils/Accounts.d.ts +2 -1
  35. package/dist/budgets/index.es.js +546 -540
  36. package/dist/budgets/store/BudgetsStore.d.ts +1 -0
  37. package/dist/cashflow/index.es.js +444 -457
  38. package/dist/categories/index.es.js +1 -1
  39. package/dist/categories/stores/CategoryStore.d.ts +10 -5
  40. package/dist/categories/util/CategoryUtil.d.ts +3 -2
  41. package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
  42. package/dist/common/components/SkeletonLoader.d.ts +7 -0
  43. package/dist/common/components/WidgetContainer.d.ts +7 -6
  44. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
  45. package/dist/common/components/index.d.ts +2 -2
  46. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  47. package/dist/common/index.es.js +459 -445
  48. package/dist/common/stores/AppDataStore.d.ts +3 -1
  49. package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
  50. package/dist/common/stores/GlobalStore.d.ts +3 -3
  51. package/dist/common/stores/GlobalUiStore.d.ts +10 -6
  52. package/dist/common/stores/UserStore.d.ts +3 -2
  53. package/dist/common/types/Account.d.ts +9 -6
  54. package/dist/dashboard/index.es.js +84 -116
  55. package/dist/debts/index.es.js +417 -413
  56. package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
  57. package/dist/finstrong/index.es.js +1167 -1110
  58. package/dist/goals/index.es.js +618 -598
  59. package/dist/goals/stores/GoalStore.d.ts +19 -4
  60. package/dist/help/index.es.js +13 -13
  61. package/dist/investments/index.es.js +330 -325
  62. package/dist/investments/stores/HoldingStore.d.ts +1 -0
  63. package/dist/networth/components/NetWorthChart.d.ts +3 -2
  64. package/dist/networth/components/NetWorthList.d.ts +3 -3
  65. package/dist/networth/index.es.js +423 -433
  66. package/dist/networth/stores/NetWorthStore.d.ts +20 -9
  67. package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
  68. package/dist/notifications/index.es.js +90 -91
  69. package/dist/notifications/stores/NotificationStore.d.ts +3 -1
  70. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  71. package/dist/recurringtransactions/index.es.js +543 -562
  72. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
  73. package/dist/settings/index.es.js +253 -248
  74. package/dist/spending/index.es.js +282 -301
  75. package/dist/transactions/index.es.js +269 -263
  76. package/dist/transactions/stores/TransactionStore.d.ts +26 -77
  77. package/dist/transactions/stores/UiStore.d.ts +0 -2
  78. package/dist/trends/index.es.js +708 -699
  79. package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
  80. package/package.json +3 -3
  81. package/dist/AccountStore-CWFzg8-E.mjs +0 -260
  82. package/dist/Accounts-CWt-NRq8.mjs +0 -9
  83. package/dist/CategoryUtil-DZflYFam.mjs +0 -78
  84. package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
  85. package/dist/GoalStore-C7ahxxLi.mjs +0 -364
  86. package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
  87. package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
  88. package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
  89. package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
  90. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
  91. package/dist/common/components/accountfilter/index.d.ts +0 -1
  92. package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
@@ -1,127 +1,127 @@
1
- import { jsxs as m, jsx as e, Fragment as He } from "react/jsx-runtime";
1
+ import { jsxs as g, jsx as e, Fragment as ze } from "react/jsx-runtime";
2
2
  import l from "react";
3
- import { observer as I } from "mobx-react-lite";
4
- import { endOfMonth as ge } from "date-fns/endOfMonth";
5
- import { startOfMonth as Q } from "date-fns/startOfMonth";
6
- import H from "@mui/material/Box";
3
+ import { observer as E } from "mobx-react-lite";
4
+ import { endOfMonth as ue } from "date-fns/endOfMonth";
5
+ import { startOfMonth as J } from "date-fns/startOfMonth";
6
+ import F from "@mui/material/Box";
7
7
  import B from "@mui/material/Stack";
8
- import te from "@mui/material/styles/useTheme";
9
- import { Text as y, CategoryIcon as W, Icon as G, H2 as We, H3 as ve } from "@mxenabled/mxui";
10
- import K from "@mui/material/List";
11
- import { u as w, i as D, j as ne, m as F, p as oe, g as X, b as ae, h as re, a as Ke, d as Ae } from "../hooks-ZMp65DFz.mjs";
8
+ import ee from "@mui/material/styles/useTheme";
9
+ import { Text as y, CategoryIcon as H, Icon as P, H2 as Ue, H3 as xe } from "@mxenabled/mxui";
10
+ import W from "@mui/material/List";
11
+ import { u as w, i as D, j as te, m as K, p as ne, g as X, b as oe, h as ae, a as Fe, d as ve } from "../hooks-ZMp65DFz.mjs";
12
12
  import { f as T } from "../NumberFormatting-DjTD0t3W.mjs";
13
- import Te from "@mui/material/Button";
14
- import se from "@mui/material/Divider";
13
+ import Ae from "@mui/material/Button";
14
+ import re from "@mui/material/Divider";
15
15
  import V from "@mui/material/ListItem";
16
- import ie from "@mui/material/ListItemAvatar";
16
+ import se from "@mui/material/ListItemAvatar";
17
17
  import Y from "@mui/material/ListItemButton";
18
18
  import Z from "@mui/material/ListItemText";
19
19
  import { b as L } from "../Localization-2MODESHW.mjs";
20
- import { D as P } from "../Drawer-DV4NTsFg.mjs";
21
- import Xe from "@mui/material/ListItemSecondaryAction";
22
- import { C as Ve } from "../CurrencyInput-itK0R3wV.mjs";
20
+ import { D as $ } from "../Drawer-DV4NTsFg.mjs";
21
+ import He from "@mui/material/ListItemSecondaryAction";
22
+ import { C as We } from "../CurrencyInput-itK0R3wV.mjs";
23
23
  import { a as z } from "../Dialog-B4PI-_bL.mjs";
24
- import { C as Ye } from "../ConnectionsDrawer-BqR6FWJO.mjs";
25
- import * as E from "d3";
26
- import Ze from "@mui/material/Tooltip";
27
- import { useTheme as qe } from "@mui/material/styles";
28
- import { u as ce } from "../useScreenSize-B6JyS_Lj.mjs";
29
- import { L as U } from "../Loader-DUaFpDGv.mjs";
30
- import { E as ue } from "../EmptyState-DoxNUae-.mjs";
31
- import { A as $, W as Je } from "../WidgetContainer-CrK6tyHr.mjs";
32
- import { u as Qe } from "../BudgetUtil-BmZXkL0C.mjs";
33
- import { u as we } from "../useWidgetLoadTimer-hIOioiKx.mjs";
34
- import { M as et } from "../MiniWidgetContainer-98-hKFqm.mjs";
35
- import { isAfter as tt } from "date-fns/isAfter";
36
- import { startOfToday as J } from "date-fns/startOfToday";
37
- import De from "@mui/material/Alert";
38
- import Ie from "@mui/material/Snackbar";
39
- import _e from "@mui/material/Tab";
40
- import nt from "@mui/material/Tabs";
41
- import { e as ot } from "../exportTransactionsToCSV-BrTYdSgJ.mjs";
42
- import { T as Ee, a as at } from "../TransactionDetails-7MHOshKQ.mjs";
43
- import he from "@mui/material/Card";
44
- import fe from "@mui/material/CardContent";
45
- import { S as pe } from "../StatusBar-BK_uYHAB.mjs";
46
- import { S as Oe } from "../SingleSegmentDonut-BgbLgwHi.mjs";
47
- import { u as rt, b as st } from "../CategorySelectorDrawer-cQKX5dZb.mjs";
48
- import Me from "@mui/material/CardHeader";
49
- import { subDays as it } from "date-fns/subDays";
50
- import ct from "@mui/material/IconButton";
51
- import { M as lt } from "../ManageIncome-BrTrlplL.mjs";
52
- const dt = I(() => {
53
- const { budgets: t } = w(), { totalBudgeted: n } = D(), { incomeTotal: i } = ne(), s = i - n;
54
- return /* @__PURE__ */ m(B, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
55
- /* @__PURE__ */ m(B, { alignItems: "center", children: [
24
+ import { C as Ke } from "../ConnectionsDrawer-BDpVTTSe.mjs";
25
+ import * as O from "d3";
26
+ import Xe from "@mui/material/Tooltip";
27
+ import { useTheme as Ve } from "@mui/material/styles";
28
+ import { u as ie } from "../useScreenSize-B6JyS_Lj.mjs";
29
+ import { L as ge } from "../Loader-DUaFpDGv.mjs";
30
+ import { E as le } from "../EmptyState-DoxNUae-.mjs";
31
+ import { A as N, W as Ye } from "../WidgetContainer-BbPS3Yxz.mjs";
32
+ import { u as Ze } from "../BudgetUtil-BmZXkL0C.mjs";
33
+ import { u as Te } from "../useWidgetLoadTimer-hIOioiKx.mjs";
34
+ import { M as qe } from "../MiniWidgetContainer-98-hKFqm.mjs";
35
+ import { isAfter as Je } from "date-fns/isAfter";
36
+ import { startOfToday as q } from "date-fns/startOfToday";
37
+ import we from "@mui/material/Alert";
38
+ import De from "@mui/material/Snackbar";
39
+ import ye from "@mui/material/Tab";
40
+ import Qe from "@mui/material/Tabs";
41
+ import { e as et } from "../exportTransactionsToCSV-DtQ7ovAR.mjs";
42
+ import { T as Ee, a as tt } from "../TransactionDetails-BDhz3DLT.mjs";
43
+ import pe from "@mui/material/Card";
44
+ import he from "@mui/material/CardContent";
45
+ import { S as me } from "../StatusBar-BK_uYHAB.mjs";
46
+ import { S as Ie } from "../SingleSegmentDonut-BgbLgwHi.mjs";
47
+ import { u as nt, b as ot } from "../CategorySelectorDrawer-cQKX5dZb.mjs";
48
+ import Oe from "@mui/material/CardHeader";
49
+ import { subDays as at } from "date-fns/subDays";
50
+ import rt from "@mui/material/IconButton";
51
+ import { M as st } from "../ManageIncome-CL3hv8i9.mjs";
52
+ const it = E(() => {
53
+ const { budgets: t } = w(), { totalBudgeted: o } = D(), { incomeTotal: i } = te(), s = i - o;
54
+ return /* @__PURE__ */ g(B, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
55
+ /* @__PURE__ */ g(B, { alignItems: "center", children: [
56
56
  /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(i, "0,0") }),
57
57
  /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.projected_income })
58
58
  ] }),
59
59
  /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
60
- /* @__PURE__ */ m(B, { alignItems: "center", children: [
61
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(n, "0,0") }),
60
+ /* @__PURE__ */ g(B, { alignItems: "center", children: [
61
+ /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(o, "0,0") }),
62
62
  /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.budgeted })
63
63
  ] }),
64
64
  /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
65
- /* @__PURE__ */ m(B, { alignItems: "center", children: [
65
+ /* @__PURE__ */ g(B, { alignItems: "center", children: [
66
66
  /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(s, "0,0") }),
67
67
  /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.remaining })
68
68
  ] })
69
69
  ] });
70
- }), ut = I(
70
+ }), ct = E(
71
71
  ({ category: t }) => {
72
- const { budgets: n } = w(), { budgets: i } = D(), s = l.useMemo(() => {
73
- const a = i.find((c) => c.category_guid === t.guid), r = T(t.totalAverageAmount, "0,0"), o = a ? L(n.recalculate_previous_budget, T(a.amount, "0,0")) : n.recalculate_new_budget;
74
- return `${r} - ${o}`;
75
- }, [n, i]);
76
- return /* @__PURE__ */ m(l.Fragment, { children: [
77
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ m(Y, { children: [
78
- /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid, variant: "filled" }) }),
72
+ const { budgets: o } = w(), { budgets: i } = D(), s = l.useMemo(() => {
73
+ const a = i.find((c) => c.category_guid === t.guid), r = T(t.totalAverageAmount, "0,0"), n = a ? L(o.recalculate_previous_budget, T(a.amount, "0,0")) : o.recalculate_new_budget;
74
+ return `${r} - ${n}`;
75
+ }, [o, i]);
76
+ return /* @__PURE__ */ g(l.Fragment, { children: [
77
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { children: [
78
+ /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid, variant: "filled" }) }),
79
79
  /* @__PURE__ */ e(Z, { primary: t.name, secondary: s })
80
80
  ] }) }),
81
- /* @__PURE__ */ e(se, {})
81
+ /* @__PURE__ */ e(re, {})
82
82
  ] }, t.guid);
83
83
  }
84
- ), mt = ({ onRecalculateBudgets: t }) => {
85
- const { budgets: n, common: i } = w(), { spendCategories: s } = F(), { recalculateBudgets: a, setAlert: r } = D(), [o, c] = l.useState(!1), d = s.filter((u) => u.totalAverageAmount > 0), g = async () => {
86
- await a(d), c(!1), r(n.alert_recalculated_budgets), t?.();
84
+ ), lt = ({ onRecalculateBudgets: t }) => {
85
+ const { budgets: o, common: i } = w(), { spendCategories: s } = K(), { recalculateBudgets: a, setAlert: r } = D(), [n, c] = l.useState(!1), d = s.filter((u) => u.totalAverageAmount > 0), m = async () => {
86
+ await a(d), c(!1), r(o.alert_recalculated_budgets), t?.();
87
87
  };
88
- return /* @__PURE__ */ m(l.Fragment, { children: [
89
- /* @__PURE__ */ e(Te, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: n.recalculate_button }),
90
- /* @__PURE__ */ e(y, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: n.recalculate_help }),
88
+ return /* @__PURE__ */ g(l.Fragment, { children: [
89
+ /* @__PURE__ */ e(Ae, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: o.recalculate_button }),
90
+ /* @__PURE__ */ e(y, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: o.recalculate_help }),
91
91
  /* @__PURE__ */ e(
92
- P,
92
+ $,
93
93
  {
94
94
  ariaLabelClose: i.close_aria,
95
- isOpen: o,
95
+ isOpen: n,
96
96
  onClose: () => c(!1),
97
- onPrimaryAction: g,
98
- title: n.recalculate_title,
99
- children: /* @__PURE__ */ m(B, { children: [
100
- /* @__PURE__ */ m(B, { mx: 24, my: 16, children: [
101
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: n.recalculate_description_top }),
102
- /* @__PURE__ */ e(y, { variant: "ParagraphSmall", children: n.recalculate_description_bottom })
97
+ onPrimaryAction: m,
98
+ title: o.recalculate_title,
99
+ children: /* @__PURE__ */ g(B, { children: [
100
+ /* @__PURE__ */ g(B, { mx: 24, my: 16, children: [
101
+ /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
102
+ /* @__PURE__ */ e(y, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
103
103
  ] }),
104
- /* @__PURE__ */ e(H, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: d.map((u) => /* @__PURE__ */ e(ut, { category: u }, u.guid)) }) })
104
+ /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(W, { children: d.map((u) => /* @__PURE__ */ e(ct, { category: u }, u.guid)) }) })
105
105
  ] })
106
106
  }
107
107
  )
108
108
  ] });
109
- }, le = ({
109
+ }, ce = ({
110
110
  amount: t,
111
- categoryName: n,
111
+ categoryName: o,
112
112
  onAmountChanged: i
113
113
  }) => {
114
- const { budgets: s } = w(), { totalBudgeted: a } = D(), { incomeTotal: r } = ne(), o = r - a;
115
- return /* @__PURE__ */ m(B, { gap: 16, children: [
116
- /* @__PURE__ */ m(B, { children: [
114
+ const { budgets: s } = w(), { totalBudgeted: a } = D(), { incomeTotal: r } = te(), n = r - a;
115
+ return /* @__PURE__ */ g(B, { gap: 16, children: [
116
+ /* @__PURE__ */ g(B, { children: [
117
117
  /* @__PURE__ */ e(y, { children: L(
118
118
  s.add_description_top,
119
- T(o, "0,0")
119
+ T(n, "0,0")
120
120
  ) }),
121
- /* @__PURE__ */ e(y, { children: L(s.add_description_bottom, n) })
121
+ /* @__PURE__ */ e(y, { children: L(s.add_description_bottom, o) })
122
122
  ] }),
123
123
  /* @__PURE__ */ e(
124
- Ve,
124
+ We,
125
125
  {
126
126
  amount: t,
127
127
  autoFocus: !0,
@@ -132,13 +132,13 @@ const dt = I(() => {
132
132
  }
133
133
  )
134
134
  ] });
135
- }, gt = I(({ category: t, onAddBudget: n }) => {
136
- const { budgets: i, common: s } = w(), [a, r] = l.useState(!1), [o, c] = l.useState(
135
+ }, dt = E(({ category: t, onAddBudget: o }) => {
136
+ const { budgets: i, common: s } = w(), [a, r] = l.useState(!1), [n, c] = l.useState(
137
137
  `${t.totalAmount === 0 ? "" : t.totalAmount}`
138
138
  );
139
- return /* @__PURE__ */ m(l.Fragment, { children: [
140
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ m(Y, { onClick: () => r(!0), children: [
141
- /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid }) }),
139
+ return /* @__PURE__ */ g(l.Fragment, { children: [
140
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => r(!0), children: [
141
+ /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid }) }),
142
142
  /* @__PURE__ */ e(
143
143
  Z,
144
144
  {
@@ -146,122 +146,122 @@ const dt = I(() => {
146
146
  secondary: T(t.totalAmount, "0,0")
147
147
  }
148
148
  ),
149
- /* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e(G, { name: "add", size: 20 }) })
149
+ /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(P, { name: "add", size: 20 }) })
150
150
  ] }) }, t.guid),
151
151
  /* @__PURE__ */ e(
152
152
  z,
153
153
  {
154
154
  copy: { close_aria: s.close_aria, title: i.add_title },
155
- disablePrimaryButton: Number(o) <= 0,
155
+ disablePrimaryButton: Number(n) <= 0,
156
156
  isOpen: a,
157
157
  onClose: () => r(!1),
158
- onPrimaryAction: () => n(t, Number(o)),
158
+ onPrimaryAction: () => o(t, Number(n)),
159
159
  primaryText: i.add_save_button,
160
- children: /* @__PURE__ */ e(le, { amount: o, categoryName: t.name, onAmountChanged: c })
160
+ children: /* @__PURE__ */ e(ce, { amount: n, categoryName: t.name, onAmountChanged: c })
161
161
  }
162
162
  )
163
163
  ] });
164
- }), Re = I(({ onAddBudget: t, onRecalculateBudgets: n }) => {
165
- const { budgets: i } = w(), { addBudget: s, setAlert: a, unbudgetedCategories: r } = D(), o = async (c, d) => {
164
+ }), Re = E(({ onAddBudget: t, onRecalculateBudgets: o }) => {
165
+ const { budgets: i } = w(), { addBudget: s, setAlert: a, unbudgetedCategories: r } = D(), n = async (c, d) => {
166
166
  await s(c, d), t?.(), a(L(i.alert_budget_created, c.name));
167
167
  };
168
- return /* @__PURE__ */ m(B, { children: [
169
- /* @__PURE__ */ e(dt, {}),
170
- /* @__PURE__ */ e(H, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: r.map((c) => /* @__PURE__ */ e(
171
- gt,
168
+ return /* @__PURE__ */ g(B, { children: [
169
+ /* @__PURE__ */ e(it, {}),
170
+ /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(W, { children: r.map((c) => /* @__PURE__ */ e(
171
+ dt,
172
172
  {
173
173
  category: c,
174
- onAddBudget: o
174
+ onAddBudget: n
175
175
  },
176
176
  c.guid
177
177
  )) }) }),
178
- /* @__PURE__ */ e(mt, { onRecalculateBudgets: n })
178
+ /* @__PURE__ */ e(lt, { onRecalculateBudgets: o })
179
179
  ] });
180
- }), Ce = 5, Le = 100, ee = 25, pt = (t) => {
181
- const n = (a) => {
180
+ }), _e = 5, Me = 100, Q = 25, ut = (t) => {
181
+ const o = (a) => {
182
182
  a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
183
183
  }, i = (a) => {
184
184
  a.subject.fx = a.x, a.subject.fy = a.y;
185
185
  }, s = (a) => {
186
186
  a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
187
187
  };
188
- return E.drag().on("start", n).on("drag", i).on("end", s);
189
- }, ht = (t) => {
190
- let n = t.transaction_total / t.amount;
191
- n < 0 ? n = 0 : n > 1 && (n = 1);
192
- const i = n * 2 * Math.PI, s = E.interpolate(0, i), a = E.arc().cornerRadius(5).innerRadius(t.radius - Ce * 2).outerRadius(t.radius - Ce).startAngle(0).endAngle(0);
188
+ return O.drag().on("start", o).on("drag", i).on("end", s);
189
+ }, mt = (t) => {
190
+ let o = t.transaction_total / t.amount;
191
+ o < 0 ? o = 0 : o > 1 && (o = 1);
192
+ const i = o * 2 * Math.PI, s = O.interpolate(0, i), a = O.arc().cornerRadius(5).innerRadius(t.radius - _e * 2).outerRadius(t.radius - _e).startAngle(0).endAngle(0);
193
193
  return (r) => (a.endAngle(s(r)), a(t) || "");
194
- }, ft = (t) => {
195
- E.selectAll(".bubble").call(pt(t));
196
- }, Be = (t, n, i) => Math.min(Math.max(t, n), i), bt = (t, n, i) => {
194
+ }, gt = (t) => {
195
+ O.selectAll(".bubble").call(ut(t));
196
+ }, Ce = (t, o, i) => Math.min(Math.max(t, o), i), pt = (t, o, i) => {
197
197
  t.alpha(1).restart().force(
198
198
  "x",
199
- E.forceX().x(i / 2).strength(0.01)
199
+ O.forceX().x(i / 2).strength(0.01)
200
200
  ).force(
201
201
  "y",
202
- E.forceY().y(n / 2).strength(0.02)
202
+ O.forceY().y(o / 2).strength(0.02)
203
203
  ).on("tick", () => {
204
204
  const s = t.nodes();
205
205
  s.forEach((a) => {
206
- const r = a.radius ?? ee;
207
- a.x = Be(a.x ?? 0, r, i - r), a.y = Be(a.y ?? 0, r, n - r);
208
- }), E.selectAll(".bubble").data(s).attr("transform", (a) => `translate(${a.x},${a.y})`);
206
+ const r = a.radius ?? Q;
207
+ a.x = Ce(a.x ?? 0, r, i - r), a.y = Ce(a.y ?? 0, r, o - r);
208
+ }), O.selectAll(".bubble").data(s).attr("transform", (a) => `translate(${a.x},${a.y})`);
209
209
  });
210
- }, ke = (t, n) => E.scaleLinear().domain([t, n]).range([ee, Le]), yt = (t) => {
211
- const n = t.reduce((r, o) => {
212
- const c = Math.max(o.transaction_total, o.amount);
210
+ }, Le = (t, o) => O.scaleLinear().domain([t, o]).range([Q, Me]), ht = (t) => {
211
+ const o = t.reduce((r, n) => {
212
+ const c = Math.max(n.transaction_total, n.amount);
213
213
  return c > r ? c : r;
214
- }, 0), i = t.reduce((r, o) => {
215
- const c = Math.max(o.transaction_total, o.amount);
214
+ }, 0), i = t.reduce((r, n) => {
215
+ const c = Math.max(n.transaction_total, n.amount);
216
216
  return c < r ? c : r;
217
- }, n), s = ke(i, n), a = t.map((r) => {
218
- const o = s(Math.max(r.transaction_total, r.amount)) || 25;
217
+ }, o), s = Le(i, o), a = t.map((r) => {
218
+ const n = s(Math.max(r.transaction_total, r.amount)) || 25;
219
219
  return {
220
220
  ...r,
221
- radius: o
221
+ radius: n
222
222
  };
223
223
  });
224
- return E.forceSimulation(a).velocityDecay(0.05).force("collide", E.forceCollide((r) => r.radius + 2).strength(0.7));
225
- }, _t = (t, n, i) => {
226
- const a = Math.PI * ee ** 2 * t, r = i < 400 || n < 300, o = r ? 40 : 20, c = Math.max(100, i - o), d = Math.max(100, n - o), g = c * d;
227
- let u = ee;
228
- if (a < g) {
229
- const f = Math.sqrt(g / (t * Math.PI)), h = Math.min(c, d) / 4;
230
- u = Math.min(Le, f, h);
224
+ return O.forceSimulation(a).velocityDecay(0.05).force("collide", O.forceCollide((r) => r.radius + 2).strength(0.7));
225
+ }, ft = (t, o, i) => {
226
+ const a = Math.PI * Q ** 2 * t, r = i < 400 || o < 300, n = r ? 40 : 20, c = Math.max(100, i - n), d = Math.max(100, o - n), m = c * d;
227
+ let u = Q;
228
+ if (a < m) {
229
+ const h = Math.sqrt(m / (t * Math.PI)), b = Math.min(c, d) / 4;
230
+ u = Math.min(Me, h, b);
231
231
  }
232
232
  return r && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
233
- }, Ct = (t, n, i, s, a) => {
234
- const { maxRadius: r, minRadius: o } = _t(t, n, a);
235
- return E.scaleLinear().domain([s, i]).range([o, r]);
236
- }, Bt = (t, n, i = !1, s, a) => {
237
- const r = n.map((g) => Math.max(g.transaction_total, g.amount)), o = Math.min(...r), c = Math.max(...r), d = i ? Ct(t.length, s, c, o, a) : ke(o, c);
238
- return t.map((g) => ({
239
- ...g,
240
- radius: d(Math.max(g.transaction_total, g.amount))
233
+ }, bt = (t, o, i, s, a) => {
234
+ const { maxRadius: r, minRadius: n } = ft(t, o, a);
235
+ return O.scaleLinear().domain([s, i]).range([n, r]);
236
+ }, yt = (t, o, i = !1, s, a) => {
237
+ const r = o.map((m) => Math.max(m.transaction_total, m.amount)), n = Math.min(...r), c = Math.max(...r), d = i ? bt(t.length, s, c, n, a) : Le(n, c);
238
+ return t.map((m) => ({
239
+ ...m,
240
+ radius: d(Math.max(m.transaction_total, m.amount))
241
241
  }));
242
- }, Se = 5, St = 2e3, xt = ({ bubble: t }) => {
243
- const n = te(), {
242
+ }, Be = 5, _t = 2e3, Ct = ({ bubble: t }) => {
243
+ const o = ee(), {
244
244
  amount: i,
245
245
  guid: s,
246
246
  budgetColors: { mercury: a },
247
247
  radius: r,
248
- transaction_total: o
248
+ transaction_total: n
249
249
  } = t, c = `mercury-${s}`;
250
250
  l.useEffect(() => {
251
- E.select(`.${c}`).selectAll(".status").remove(), E.select(`.${c}`).append("path").transition().duration(St).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => ht(t));
252
- }, [i, r, o]);
253
- const d = E.arc().innerRadius((g) => g - 2 * Se).outerRadius((g) => g - Se).startAngle(0).endAngle(2 * Math.PI);
251
+ O.select(`.${c}`).selectAll(".status").remove(), O.select(`.${c}`).append("path").transition().duration(_t).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => mt(t));
252
+ }, [i, r, n]);
253
+ const d = O.arc().innerRadius((m) => m - 2 * Be).outerRadius((m) => m - Be).startAngle(0).endAngle(2 * Math.PI);
254
254
  return /* @__PURE__ */ e("g", { className: c, children: /* @__PURE__ */ e(
255
255
  "path",
256
256
  {
257
257
  d: d(r) || "",
258
- style: { fill: n.palette.common.white, fillOpacity: 0.35 }
258
+ style: { fill: o.palette.common.white, fillOpacity: 0.35 }
259
259
  }
260
260
  ) });
261
- }, vt = l.memo(xt), j = 75, me = 50;
262
- function At({ bubble: t, isDraggable: n, onClick: i = () => {
261
+ }, Bt = l.memo(Ct), j = 75, de = 50;
262
+ function St({ bubble: t, isDraggable: o, onClick: i = () => {
263
263
  } }) {
264
- const [s, a] = l.useState(!1), r = qe(), { availableWidth: o } = oe(), c = l.useMemo(() => {
264
+ const [s, a] = l.useState(!1), r = Ve(), { availableWidth: n } = ne(), c = l.useMemo(() => {
265
265
  if (t)
266
266
  return {
267
267
  amount: t.amount,
@@ -273,50 +273,50 @@ function At({ bubble: t, isDraggable: n, onClick: i = () => {
273
273
  }, [t.amount, t.budgetColors, t.guid, t.radius, t.transaction_total]);
274
274
  if (!t) return;
275
275
  const {
276
- budgetColors: { background: d, text: g },
277
- category: { icon: u, name: _ },
278
- guid: f,
279
- description: h,
276
+ budgetColors: { background: d, text: m },
277
+ category: { icon: u, name: f },
278
+ guid: h,
279
+ description: b,
280
280
  radius: p,
281
- x: C,
282
- y: b
283
- } = t, S = o < 400 ? -8 : -12;
284
- let v = S, A = S;
285
- p > j ? (v = -14, A = -45) : p > me && (A = -32);
281
+ x: _,
282
+ y: S
283
+ } = t, C = n < 400 ? -8 : -12;
284
+ let v = C, A = C;
285
+ p > j ? (v = -14, A = -45) : p > de && (A = -32);
286
286
  let x = 32;
287
- p <= j && (x = o < 400 ? 16 : 24);
288
- const O = `${t.category.name}: ${h}`, M = {
287
+ p <= j && (x = n < 400 ? 16 : 24);
288
+ const R = `${t.category.name}: ${b}`, M = {
289
289
  modifiers: [
290
290
  {
291
291
  name: "offset",
292
292
  options: { offset: [0, 15] }
293
293
  }
294
294
  ]
295
- }, R = (k) => {
296
- (k.key === "Enter" || k.key === " ") && (k.preventDefault(), i(t));
297
- }, N = () => {
295
+ }, I = (U) => {
296
+ (U.key === "Enter" || U.key === " ") && (U.preventDefault(), i(t));
297
+ }, k = () => {
298
298
  a(!0);
299
- }, de = () => {
299
+ }, G = () => {
300
300
  a(!1);
301
301
  };
302
- return /* @__PURE__ */ m(
302
+ return /* @__PURE__ */ g(
303
303
  "g",
304
304
  {
305
- "aria-label": `${_} - ${h}`,
305
+ "aria-label": `${f} - ${b}`,
306
306
  className: "bubble",
307
- id: `bubble-${f}`,
308
- onBlur: de,
307
+ id: `bubble-${h}`,
308
+ onBlur: G,
309
309
  onClick: () => i(t),
310
- onFocus: N,
311
- onKeyDown: R,
310
+ onFocus: k,
311
+ onKeyDown: I,
312
312
  onMouseEnter: () => a(!0),
313
313
  onMouseLeave: () => a(!1),
314
314
  role: "button",
315
- style: { cursor: n ? "pointer" : "default" },
315
+ style: { cursor: o ? "pointer" : "default" },
316
316
  tabIndex: 0,
317
317
  textAnchor: "middle",
318
- x: C,
319
- y: b,
318
+ x: _,
319
+ y: S,
320
320
  children: [
321
321
  /* @__PURE__ */ e("style", { children: `
322
322
  .bubble:focus,
@@ -330,102 +330,102 @@ function At({ bubble: t, isDraggable: n, onClick: i = () => {
330
330
  stroke-opacity: 0.8;
331
331
  }
332
332
  ` }),
333
- /* @__PURE__ */ e(Ze, { open: s, slotProps: { popper: M }, title: O, children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${f}`, r: p }) }),
334
- /* @__PURE__ */ e("svg", { x: v, y: A, children: /* @__PURE__ */ e(G, { name: u, size: x, sx: { fill: g } }) }),
333
+ /* @__PURE__ */ e(Xe, { open: s, slotProps: { popper: M }, title: R, children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${h}`, r: p }) }),
334
+ /* @__PURE__ */ e("svg", { x: v, y: A, children: /* @__PURE__ */ e(P, { name: u, size: x, sx: { fill: m } }) }),
335
335
  p > j && /* @__PURE__ */ e(
336
336
  y,
337
337
  {
338
338
  bold: !0,
339
339
  component: "text",
340
- id: `budget-category-${f}`,
341
- sx: { fill: g },
340
+ id: `budget-category-${h}`,
341
+ sx: { fill: m },
342
342
  variant: "Small",
343
343
  y: 4,
344
- children: _
344
+ children: f
345
345
  }
346
346
  ),
347
- p > me && /* @__PURE__ */ e(
347
+ p > de && /* @__PURE__ */ e(
348
348
  y,
349
349
  {
350
350
  bold: !0,
351
351
  component: "text",
352
- id: `budget-description-${f}-1`,
353
- sx: { fill: g },
352
+ id: `budget-description-${h}-1`,
353
+ sx: { fill: m },
354
354
  variant: "Body",
355
355
  y: p <= j ? 12 : 24,
356
- children: p <= j ? h.split(" ")[0] : h
356
+ children: p <= j ? b.split(" ")[0] : b
357
357
  }
358
358
  ),
359
- p <= j && p > me && /* @__PURE__ */ e(
359
+ p <= j && p > de && /* @__PURE__ */ e(
360
360
  y,
361
361
  {
362
362
  component: "text",
363
- id: `budget-description-${f}-2`,
364
- sx: { fill: g },
363
+ id: `budget-description-${h}-2`,
364
+ sx: { fill: m },
365
365
  variant: "XSmall",
366
366
  y: 28,
367
- children: h.split(" ")[1]
367
+ children: b.split(" ")[1]
368
368
  }
369
369
  ),
370
- /* @__PURE__ */ e(vt, { bubble: c })
370
+ /* @__PURE__ */ e(Bt, { bubble: c })
371
371
  ]
372
372
  },
373
- f
373
+ h
374
374
  );
375
375
  }
376
- const Tt = ({
376
+ const xt = ({
377
377
  height: t,
378
- width: n,
378
+ width: o,
379
379
  isDraggable: i = !1,
380
380
  onClick: s = () => {
381
381
  }
382
382
  }) => {
383
- const [a, r] = l.useState([]), o = l.useRef(null), c = l.useRef(!1), { detailedBudgets: d } = D(), g = l.useCallback(() => {
384
- const u = o.current, _ = yt(d), f = _.nodes();
383
+ const [a, r] = l.useState([]), n = l.useRef(null), c = l.useRef(!1), { detailedBudgets: d } = D(), m = l.useCallback(() => {
384
+ const u = n.current, f = ht(d), h = f.nodes();
385
385
  if (u) {
386
- const h = u.nodes(), p = new Map(h.map((C) => [C.guid, C]));
387
- f.forEach((C) => {
388
- const b = p.get(C.guid);
389
- b && Object.assign(C, {
390
- vx: b.vx,
391
- vy: b.vy,
392
- x: b.x,
393
- y: b.y
386
+ const b = u.nodes(), p = new Map(b.map((_) => [_.guid, _]));
387
+ h.forEach((_) => {
388
+ const S = p.get(_.guid);
389
+ S && Object.assign(_, {
390
+ vx: S.vx,
391
+ vy: S.vy,
392
+ x: S.x,
393
+ y: S.y
394
394
  });
395
395
  });
396
396
  }
397
- o.current = _, c.current = !1, r(f);
397
+ n.current = f, c.current = !1, r(h);
398
398
  }, [d]);
399
399
  return l.useEffect(() => {
400
- g();
401
- }, [g]), l.useEffect(() => () => {
402
- o.current && (o.current.stop(), o.current = null);
400
+ m();
401
+ }, [m]), l.useEffect(() => () => {
402
+ n.current && (n.current.stop(), n.current = null);
403
403
  }, []), l.useEffect(() => {
404
- const u = o.current;
404
+ const u = n.current;
405
405
  if (!u) return;
406
- const _ = u.nodes(), f = n > 0 && n < 450 || t > 0 && t < 300, h = Bt(_, d, f, t, n);
407
- u.nodes(h), bt(u, t, n), i && setTimeout(() => {
408
- ft(u);
409
- }, 0), r([...h]);
410
- }, [t, n, i, d]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(n), children: a.map((u) => /* @__PURE__ */ e(At, { bubble: u, isDraggable: i, onClick: s }, u.guid)) });
411
- }, wt = I(Tt), Dt = ({
406
+ const f = u.nodes(), h = o > 0 && o < 450 || t > 0 && t < 300, b = yt(f, d, h, t, o);
407
+ u.nodes(b), pt(u, t, o), i && setTimeout(() => {
408
+ gt(u);
409
+ }, 0), r([...b]);
410
+ }, [t, o, i, d]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(o), children: a.map((u) => /* @__PURE__ */ e(St, { bubble: u, isDraggable: i, onClick: s }, u.guid)) });
411
+ }, vt = E(xt), At = ({
412
412
  isMiniWidget: t = !1,
413
- onConnectAccountsClick: n,
413
+ onConnectAccountsClick: o,
414
414
  createBudgetOnClick: i
415
415
  }) => {
416
- const { recalculateBudgets: s } = D(), { spendCategories: a } = F(), { budgets: r } = w(), { availableWidth: o } = oe(), { isMobile: c } = ce(o), d = t && c, [g, u] = l.useState(!1), [_, f] = l.useState(!1), [h, p] = l.useState(!1), C = l.useMemo(() => [...a.filter((S) => S.totalAverageAmount > 0)], [a]), b = async () => {
416
+ const { recalculateBudgets: s } = D(), { spendCategories: a } = K(), { budgets: r } = w(), { availableWidth: n } = ne(), { isMobile: c } = ie(n), d = t && c, [m, u] = l.useState(!1), [f, h] = l.useState(!1), [b, p] = l.useState(!1), _ = l.useMemo(() => [...a.filter((C) => C.totalAverageAmount > 0)], [a]), S = async () => {
417
417
  p(!0);
418
- const { data: S, isSuccess: v } = await s(C);
419
- p(!1), v ? (S.length === 0 && f(!0), u(!1)) : u(!0);
418
+ const { data: C, isSuccess: v } = await s(_);
419
+ p(!1), v ? (C.length === 0 && h(!0), u(!1)) : u(!0);
420
420
  };
421
- return h ? /* @__PURE__ */ e(U, {}) : g ? /* @__PURE__ */ e(
422
- ue,
421
+ return b ? /* @__PURE__ */ e(ge, {}) : m ? /* @__PURE__ */ e(
422
+ le,
423
423
  {
424
424
  header: r.autogenerate_budgets_error_header,
425
425
  icon: "error",
426
426
  iconColor: "#4D4D4D",
427
- onClick: (S) => {
428
- S === "primary" ? b() : i();
427
+ onClick: (C) => {
428
+ C === "primary" ? S() : i();
429
429
  },
430
430
  primaryButton: r.autogenerate_budgets_error_primary_button,
431
431
  secondaryButton: r.zero_state_generate_budgets_secondary_button,
@@ -439,14 +439,14 @@ const Tt = ({
439
439
  ...d && { justifyContent: "center", mt: 0, svg: { height: 32, width: 32 } }
440
440
  }
441
441
  }
442
- ) : /* @__PURE__ */ e(He, { children: _ ? /* @__PURE__ */ e(
443
- ue,
442
+ ) : /* @__PURE__ */ e(ze, { children: f ? /* @__PURE__ */ e(
443
+ le,
444
444
  {
445
445
  header: r.zero_state_generate_budgets_header,
446
446
  icon: "error",
447
447
  iconColor: "#4D4D4D",
448
- onClick: (S) => {
449
- S === "primary" ? n() : i();
448
+ onClick: (C) => {
449
+ C === "primary" ? o() : i();
450
450
  },
451
451
  primaryButton: r.zero_state_generate_budgets_primary_button,
452
452
  secondaryButton: r.zero_state_generate_budgets_secondary_button,
@@ -465,13 +465,13 @@ const Tt = ({
465
465
  }
466
466
  }
467
467
  ) : /* @__PURE__ */ e(
468
- ue,
468
+ le,
469
469
  {
470
470
  header: r.create_budgets_title,
471
471
  icon: "bubble_chart",
472
472
  iconColor: "#1A1A1A",
473
- onClick: (S) => {
474
- S === "primary" ? b() : i();
473
+ onClick: (C) => {
474
+ C === "primary" ? S() : i();
475
475
  },
476
476
  primaryButton: r.empty_state_primary_button,
477
477
  secondaryButton: t ? void 0 : r.empty_state_secondary_button,
@@ -490,303 +490,309 @@ const Tt = ({
490
490
  }
491
491
  }
492
492
  ) });
493
- }, Ne = I(
493
+ }, ke = E(
494
494
  ({
495
495
  createBudgetOnClick: t = () => {
496
496
  },
497
- height: n,
497
+ height: o,
498
498
  isDraggable: i = !1,
499
499
  isMiniWidget: s = !1,
500
500
  shouldShowZeroState: a,
501
501
  unavailableWidth: r = 24
502
502
  }) => {
503
- const { onEvent: o } = X(), { setSelectedBudget: c } = D(), { isLoadingCategoryTotals: d } = F(), { isInitialized: g } = ae(), { accounts: u } = w(), { availableWidth: _ } = oe(), { isMobile: f } = ce(), [h, p] = l.useState(!1), C = l.useMemo(() => _ - r, [_]), b = (v) => {
504
- c(v), o($.BUDGETS_CLICK_BUDGET_CATEGORY, {
505
- budget_category: v.category.name,
503
+ const { onEvent: n } = X(), { setSelectedBudget: c } = D(), { isInitialized: d } = oe(), { accounts: m } = w(), { availableWidth: u } = ne(), { isMobile: f } = ie(), [h, b] = l.useState(!1), p = l.useMemo(() => u - r, [u]), _ = (C) => {
504
+ c(C), n(N.BUDGETS_CLICK_BUDGET_CATEGORY, {
505
+ budget_category: C.category.name,
506
506
  click_type: "bubble"
507
507
  });
508
508
  }, S = () => {
509
- p(!0), o($.ACCOUNTS_CLICK_CONNECT);
509
+ b(!0), n(N.ACCOUNTS_CLICK_CONNECT);
510
510
  };
511
- return d ? /* @__PURE__ */ e(B, { alignItems: "center", height: n, justifyContent: "center", width: Math.abs(C), children: /* @__PURE__ */ e(U, {}) }) : /* @__PURE__ */ m(
512
- H,
511
+ return /* @__PURE__ */ g(
512
+ F,
513
513
  {
514
514
  ml: a || f ? 0 : 24,
515
515
  sx: { alignSelf: "center", ...s && { height: "100%" } },
516
516
  children: [
517
- a || !g ? /* @__PURE__ */ e(
518
- Dt,
517
+ a || !d ? /* @__PURE__ */ e(
518
+ At,
519
519
  {
520
520
  createBudgetOnClick: t,
521
521
  isMiniWidget: s,
522
522
  onConnectAccountsClick: S
523
523
  }
524
524
  ) : /* @__PURE__ */ e(
525
- wt,
525
+ vt,
526
526
  {
527
- height: n,
527
+ height: o,
528
528
  isDraggable: i,
529
- onClick: b,
530
- width: C
529
+ onClick: _,
530
+ width: p
531
531
  }
532
532
  ),
533
533
  /* @__PURE__ */ e(
534
- Ye,
534
+ Ke,
535
535
  {
536
- onClose: () => p(!1),
536
+ onClose: () => b(!1),
537
537
  showConnectionsWidget: h,
538
- title: u.manage_connections
538
+ title: m.manage_connections
539
539
  }
540
540
  )
541
541
  ]
542
542
  }
543
543
  );
544
544
  }
545
- ), It = ({
545
+ ), Tt = ({
546
546
  budgetsCopy: t,
547
- difference: n,
547
+ difference: o,
548
548
  handleAddClick: i,
549
549
  shouldShowZeroState: s
550
550
  }) => {
551
- const { availableHeight: a = 0 } = oe(), r = l.useRef(null);
551
+ const { availableHeight: a = 0 } = ne(), r = l.useRef(null);
552
552
  l.useEffect(() => {
553
553
  a > 0 && r.current === null && (r.current = a);
554
554
  }, [a]);
555
- const o = l.useMemo(() => {
555
+ const n = l.useMemo(() => {
556
556
  const c = r.current ?? a;
557
557
  return c > 0 ? Math.round(Math.max(120, Math.min(450, c * 0.8))) - 40 : 450;
558
558
  }, [a]);
559
- return /* @__PURE__ */ m(B, { sx: { height: "100%", justifyContent: "space-between" }, children: [
559
+ return /* @__PURE__ */ g(B, { sx: { height: "100%", justifyContent: "space-between" }, children: [
560
560
  /* @__PURE__ */ e(
561
- Ne,
561
+ ke,
562
562
  {
563
563
  createBudgetOnClick: i,
564
- height: o,
564
+ height: n,
565
565
  isMiniWidget: !0,
566
566
  shouldShowZeroState: s
567
567
  }
568
568
  ),
569
- !s && /* @__PURE__ */ m(H, { ml: 16, children: [
570
- /* @__PURE__ */ e(y, { bold: !0, color: n < 0 ? "error.main" : "success.main", children: T(Math.abs(n), "0,0") }),
571
- /* @__PURE__ */ e(y, { children: n < 0 ? t.overspent_in_budgets : t.left_in_budgets })
569
+ !s && /* @__PURE__ */ g(F, { ml: 16, children: [
570
+ /* @__PURE__ */ e(y, { bold: !0, color: o < 0 ? "error.main" : "success.main", children: T(Math.abs(o), "0,0") }),
571
+ /* @__PURE__ */ e(y, { children: o < 0 ? t.overspent_in_budgets : t.left_in_budgets })
572
572
  ] })
573
573
  ] });
574
- }, Et = (t) => {
575
- const n = te(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: r, setTheme: o } = D(), { budgets: c, common: d } = w(), { isCopyLoaded: g, isInitialized: u, selectedAccounts: _ } = ae(), { reloadCategoryTotals: f } = F(), h = Qe(), p = s.length === 0, [C, b] = l.useState(!1), S = () => {
576
- b(!0), i($.BUDGETS_CLICK_ADD);
577
- }, v = () => {
578
- b(!1);
579
- }, A = () => b(!1);
580
- return we({
574
+ }, wt = (t) => {
575
+ const o = ee(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: r, setTheme: n } = D(), { budgets: c, common: d } = w(), { isInitialized: m, selectedAccounts: u } = oe(), { loadDateRangeCategoryTotals: f } = K(), h = Ze(), [b, p] = l.useState(!1);
576
+ l.useEffect(() => {
577
+ a || r().finally();
578
+ }, []), l.useEffect(() => {
579
+ n(o);
580
+ }, [o]), l.useEffect(() => {
581
+ m && !a && f(
582
+ u,
583
+ J(/* @__PURE__ */ new Date()),
584
+ ue(/* @__PURE__ */ new Date())
585
+ ).finally();
586
+ }, [m, u, a]);
587
+ const _ = () => {
588
+ p(!0), i(N.BUDGETS_CLICK_ADD);
589
+ }, S = () => {
590
+ p(!1);
591
+ }, C = () => p(!1);
592
+ if (Te({
581
593
  widgetName: "BubbleBudgetsMiniWidget",
582
594
  isLoaded: a
583
- }), l.useEffect(() => {
584
- o(n);
585
- }, [n]), l.useEffect(() => {
586
- u && !a && f(_, Q(/* @__PURE__ */ new Date()), ge(/* @__PURE__ */ new Date())).then(
587
- () => {
588
- r().finally();
589
- }
590
- );
591
- }, [u, _]), g ? /* @__PURE__ */ m(
592
- et,
595
+ }), !m || !a) return /* @__PURE__ */ e(ge, {});
596
+ const v = s.length === 0;
597
+ return /* @__PURE__ */ g(
598
+ qe,
593
599
  {
594
600
  contentStyles: { height: "calc(100% - 66px)", ":last-child": { pb: 0 } },
595
- primaryCtaLabel: p ? c.get_started_cta : c.details_cta,
601
+ primaryCtaLabel: v ? c.get_started_cta : c.details_cta,
596
602
  sx: { height: "100%" },
597
603
  title: c.budgets_title,
598
604
  ...t,
599
605
  children: [
600
- a ? /* @__PURE__ */ e(
601
- It,
606
+ /* @__PURE__ */ e(
607
+ Tt,
602
608
  {
603
609
  budgetsCopy: c,
604
610
  difference: h,
605
- handleAddClick: S,
606
- shouldShowZeroState: p
611
+ handleAddClick: _,
612
+ shouldShowZeroState: v
607
613
  }
608
- ) : /* @__PURE__ */ e(U, {}),
614
+ ),
609
615
  /* @__PURE__ */ e(
610
- P,
616
+ $,
611
617
  {
612
618
  ariaLabelClose: d.close_aria,
613
- isOpen: C,
614
- onClose: () => b(!1),
619
+ isOpen: b,
620
+ onClose: () => p(!1),
615
621
  title: c.add_new_title,
616
622
  children: /* @__PURE__ */ e(
617
623
  Re,
618
624
  {
619
- onAddBudget: v,
620
- onRecalculateBudgets: A
625
+ onAddBudget: S,
626
+ onRecalculateBudgets: C
621
627
  }
622
628
  )
623
629
  }
624
630
  )
625
631
  ]
626
632
  }
627
- ) : /* @__PURE__ */ e(U, {});
628
- }, $n = I(Et), $e = ({ budget: t }) => {
633
+ );
634
+ }, Ln = E(wt), Ne = ({ budget: t }) => {
629
635
  const {
630
- amount: n,
636
+ amount: o,
631
637
  budgetColors: { background: i },
632
638
  category: { name: s },
633
639
  category_guid: a,
634
640
  percentage: r,
635
- transaction_total: o
641
+ transaction_total: n
636
642
  } = t, c = [
637
643
  {
638
644
  color: i,
639
645
  percentage: `${r}%`
640
646
  }
641
647
  ];
642
- return /* @__PURE__ */ e(he, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ m(B, { alignItems: "center", gap: 16, children: [
643
- /* @__PURE__ */ e(W, { categoryGuid: a, size: 56 }),
644
- /* @__PURE__ */ e(We, { variant: "H1", children: `${T(o, "0,0")} / ${T(n, "0,0")}` }),
648
+ return /* @__PURE__ */ e(pe, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(he, { children: /* @__PURE__ */ g(B, { alignItems: "center", gap: 16, children: [
649
+ /* @__PURE__ */ e(H, { categoryGuid: a, size: 56 }),
650
+ /* @__PURE__ */ e(Ue, { variant: "H1", children: `${T(n, "0,0")} / ${T(o, "0,0")}` }),
645
651
  /* @__PURE__ */ e(y, { bold: !0, variant: "XSmall", children: s }),
646
- /* @__PURE__ */ e(pe, { data: c, height: 10 })
652
+ /* @__PURE__ */ e(me, { data: c, height: 10 })
647
653
  ] }) }) });
648
- }, Ot = I(() => {
654
+ }, Dt = E(() => {
649
655
  const { budgets: t } = w();
650
- return /* @__PURE__ */ m(B, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
651
- /* @__PURE__ */ e(G, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
656
+ return /* @__PURE__ */ g(B, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
657
+ /* @__PURE__ */ e(P, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
652
658
  /* @__PURE__ */ e(y, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
653
659
  /* @__PURE__ */ e(y, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
654
660
  ] });
655
- }), Mt = I(({ budget: t }) => {
661
+ }), Et = E(({ budget: t }) => {
656
662
  const {
657
- amount: n,
663
+ amount: o,
658
664
  budgetColors: { background: i },
659
665
  category: s,
660
666
  percentage: a,
661
667
  transaction_total: r
662
- } = t, { setSelectedSubBudget: o } = D();
663
- return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ m(Y, { onClick: () => o(t), children: [
664
- /* @__PURE__ */ e(ie, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Oe, { color: i, percent: a, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
668
+ } = t, { setSelectedSubBudget: n } = D();
669
+ return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => n(t), children: [
670
+ /* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ie, { color: i, percent: a, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
665
671
  /* @__PURE__ */ e(
666
672
  Z,
667
673
  {
668
674
  primary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }) }),
669
675
  secondary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
670
676
  ${T(r, "0,0")} /
671
- ${T(n, "0,0")}
677
+ ${T(o, "0,0")}
672
678
  ` }) })
673
679
  }
674
680
  )
675
681
  ] }) });
676
- }), Rt = I(({ category: t, parentBudget: n }) => {
677
- const { budgets: i, common: s } = w(), { setExpandedGuid: a, setOnSelect: r } = rt(), { addBudget: o } = D(), [c, d] = l.useState(!1), [g, u] = l.useState(!1), [_, f] = l.useState(""), [h, p] = l.useState(void 0);
682
+ }), It = E(({ category: t, parentBudget: o }) => {
683
+ const { budgets: i, common: s } = w(), { setExpandedGuid: a, setOnSelect: r } = nt(), { addBudget: n } = D(), [c, d] = l.useState(!1), [m, u] = l.useState(!1), [f, h] = l.useState(""), [b, p] = l.useState(void 0);
678
684
  l.useEffect(() => {
679
- r((S) => {
680
- const v = t.subCategories.find((A) => A.guid === S);
681
- v && (p(v), f(`${v.currentAmount === 0 ? "" : v.currentAmount}`), u(!0));
685
+ r((C) => {
686
+ const v = t.subCategories.find((A) => A.guid === C);
687
+ v && (p(v), h(`${v.currentAmount === 0 ? "" : v.currentAmount}`), u(!0));
682
688
  });
683
689
  }, []);
684
- const C = () => {
690
+ const _ = () => {
685
691
  a(t.guid), d(!0);
686
- }, b = async () => {
687
- h && Number(_) > 0 && (await o(h, Number(_), n.guid), u(!1), d(!1), p(void 0));
692
+ }, S = async () => {
693
+ b && Number(f) > 0 && (await n(b, Number(f), o.guid), u(!1), d(!1), p(void 0));
688
694
  };
689
- return /* @__PURE__ */ m(H, { children: [
690
- /* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: C, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ m(B, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
691
- /* @__PURE__ */ m(B, { alignItems: "center", direction: "row", gap: 8, children: [
692
- /* @__PURE__ */ e(G, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
695
+ return /* @__PURE__ */ g(F, { children: [
696
+ /* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: _, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
697
+ /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", gap: 8, children: [
698
+ /* @__PURE__ */ e(P, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
693
699
  /* @__PURE__ */ e(y, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
694
700
  ] }),
695
- /* @__PURE__ */ e(G, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
701
+ /* @__PURE__ */ e(P, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
696
702
  ] }) }) }) }),
697
- /* @__PURE__ */ e(se, {}),
703
+ /* @__PURE__ */ e(re, {}),
698
704
  /* @__PURE__ */ e(
699
- P,
705
+ $,
700
706
  {
701
707
  ariaLabelClose: s.close_aria,
702
708
  isOpen: c,
703
709
  onClose: () => d(!1),
704
710
  title: i.add_sub_budget_title,
705
- children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(st, { category: t, subCategories: t.subCategories }) })
711
+ children: /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(ot, { category: t, subCategories: t.subCategories }) })
706
712
  }
707
713
  ),
708
714
  /* @__PURE__ */ e(
709
715
  z,
710
716
  {
711
717
  copy: { close_aria: s.close_aria, title: i.add_title },
712
- disablePrimaryButton: Number(_) <= 0,
713
- isOpen: g,
718
+ disablePrimaryButton: Number(f) <= 0,
719
+ isOpen: m,
714
720
  onClose: () => u(!1),
715
- onPrimaryAction: b,
721
+ onPrimaryAction: S,
716
722
  primaryText: i.add_save_button,
717
723
  children: /* @__PURE__ */ e(
718
- le,
724
+ ce,
719
725
  {
720
- amount: _,
721
- categoryName: h?.name || "",
722
- onAmountChanged: f
726
+ amount: f,
727
+ categoryName: b?.name || "",
728
+ onAmountChanged: h
723
729
  }
724
730
  )
725
731
  }
726
732
  )
727
733
  ] });
728
- }), Lt = I(({ budget: t }) => {
729
- const { category: n, subBudgets: i } = t, { budgets: s, common: a } = w(), { deleteBudget: r, selectedSubBudget: o, setSelectedSubBudget: c, updateBudget: d } = D(), { filter: g, setFilter: u } = re(), [_, f] = l.useState(!1), [h, p] = l.useState(!1), [C, b] = l.useState("");
734
+ }), Ot = E(({ budget: t }) => {
735
+ const { category: o, subBudgets: i } = t, { budgets: s, common: a } = w(), { deleteBudget: r, selectedSubBudget: n, setSelectedSubBudget: c, updateBudget: d } = D(), { filter: m, setFilter: u } = ae(), [f, h] = l.useState(!1), [b, p] = l.useState(!1), [_, S] = l.useState("");
730
736
  l.useEffect(() => {
731
- o && (b(`${o.amount}`), u({
732
- ...g,
733
- custom: (x) => x.category_guid === o.category_guid
737
+ n && (S(`${n.amount}`), u({
738
+ ...m,
739
+ custom: (x) => x.category_guid === n.category_guid
734
740
  }));
735
- }, [o]);
736
- const S = async () => {
737
- o && await d({
738
- ...o,
739
- amount: Number(C)
741
+ }, [n]);
742
+ const C = async () => {
743
+ n && await d({
744
+ ...n,
745
+ amount: Number(_)
740
746
  });
741
747
  }, v = async () => {
742
- o && await r(o.guid), p(!1), A();
748
+ n && await r(n.guid), p(!1), A();
743
749
  }, A = () => {
744
750
  u({
745
- ...g,
751
+ ...m,
746
752
  custom: (x) => x.category_guid === t.category_guid || x.top_level_category_guid === t.category_guid
747
753
  }), c(void 0);
748
754
  };
749
- return /* @__PURE__ */ m(l.Fragment, { children: [
750
- /* @__PURE__ */ m(K, { sx: { bgcolor: "background.paper" }, children: [
751
- i.length === 0 ? /* @__PURE__ */ e(Ot, {}) : i.map((x) => /* @__PURE__ */ m(l.Fragment, { children: [
752
- /* @__PURE__ */ e(Mt, { budget: x }),
753
- /* @__PURE__ */ e(se, {})
755
+ return /* @__PURE__ */ g(l.Fragment, { children: [
756
+ /* @__PURE__ */ g(W, { sx: { bgcolor: "background.paper" }, children: [
757
+ i.length === 0 ? /* @__PURE__ */ e(Dt, {}) : i.map((x) => /* @__PURE__ */ g(l.Fragment, { children: [
758
+ /* @__PURE__ */ e(Et, { budget: x }),
759
+ /* @__PURE__ */ e(re, {})
754
760
  ] }, x.guid)),
755
- /* @__PURE__ */ e(Rt, { category: n, parentBudget: t })
761
+ /* @__PURE__ */ e(It, { category: o, parentBudget: t })
756
762
  ] }),
757
763
  /* @__PURE__ */ e(
758
- P,
764
+ $,
759
765
  {
760
766
  ariaLabelClose: a.close_aria,
761
- isOpen: !!o,
767
+ isOpen: !!n,
762
768
  onClose: A,
763
- onPrimaryAction: () => f(!0),
769
+ onPrimaryAction: () => h(!0),
764
770
  onSecondaryAction: () => p(!0),
765
771
  primaryText: s.details_edit_button,
766
772
  secondaryText: s.details_delete_button,
767
773
  title: s.details_title,
768
- children: o && /* @__PURE__ */ m(B, { gap: 24, children: [
769
- /* @__PURE__ */ e($e, { budget: o }),
774
+ children: n && /* @__PURE__ */ g(B, { gap: 24, children: [
775
+ /* @__PURE__ */ e(Ne, { budget: n }),
770
776
  /* @__PURE__ */ e(Ee, { height: "100%" })
771
777
  ] })
772
778
  }
773
779
  ),
774
- o && /* @__PURE__ */ m(l.Fragment, { children: [
780
+ n && /* @__PURE__ */ g(l.Fragment, { children: [
775
781
  /* @__PURE__ */ e(
776
782
  z,
777
783
  {
778
784
  copy: { close_aria: a.close_aria, title: s.details_edit_title },
779
- disablePrimaryButton: Number(C) <= 0,
780
- isOpen: _,
781
- onClose: () => f(!1),
782
- onPrimaryAction: S,
785
+ disablePrimaryButton: Number(_) <= 0,
786
+ isOpen: f,
787
+ onClose: () => h(!1),
788
+ onPrimaryAction: C,
783
789
  primaryText: s.edit_save_button,
784
790
  children: /* @__PURE__ */ e(
785
- le,
791
+ ce,
786
792
  {
787
- amount: C,
788
- categoryName: o.category.name,
789
- onAmountChanged: b
793
+ amount: _,
794
+ categoryName: n.category.name,
795
+ onAmountChanged: S
790
796
  }
791
797
  )
792
798
  }
@@ -795,130 +801,130 @@ const Tt = ({
795
801
  z,
796
802
  {
797
803
  copy: { close_aria: a.close_aria, title: s.delete_title },
798
- isOpen: h,
804
+ isOpen: b,
799
805
  onClose: () => p(!1),
800
806
  onPrimaryAction: v,
801
807
  primaryColor: "error",
802
808
  primaryText: "Delete",
803
809
  secondaryColor: "secondary",
804
- children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: L(s.delete_description, o.category.name) })
810
+ children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: L(s.delete_description, n.category.name) })
805
811
  }
806
812
  )
807
813
  ] })
808
814
  ] });
809
- }), kt = I(({ budget: t }) => {
810
- const { is_mobile_webview: n } = Ke(), { setAlert: i } = D(), { budgets: s, common: a, transactions: r } = w(), { isDesktop: o, isSmallTablet: c, isTablet: d } = ce(), {
811
- sortedTransactions: g,
815
+ }), Rt = E(({ budget: t }) => {
816
+ const { is_mobile_webview: o } = Fe(), { setAlert: i } = D(), { budgets: s, common: a, transactions: r } = w(), { isDesktop: n, isSmallTablet: c, isTablet: d } = ie(), {
817
+ sortedTransactions: m,
812
818
  sortedTransactionsWithSplits: u,
813
- tags: _
814
- } = re(), [f, h] = l.useState(0), [p, C] = l.useState(""), b = l.useMemo(
815
- () => g.find((x) => x.guid === p),
816
- [p, g]
817
- ), S = (x, O) => {
818
- h(O);
819
+ tags: f
820
+ } = ae(), [h, b] = l.useState(0), [p, _] = l.useState(""), S = l.useMemo(
821
+ () => m.find((x) => x.guid === p),
822
+ [p, m]
823
+ ), C = (x, R) => {
824
+ b(R);
819
825
  }, v = () => {
820
- ot(u, _), i(s.alert_csv_downloaded);
821
- }, A = g.length > 0 && !n && (o || d && !c);
822
- return /* @__PURE__ */ m(B, { gap: 24, children: [
823
- /* @__PURE__ */ e($e, { budget: t }),
824
- /* @__PURE__ */ m(B, { children: [
825
- /* @__PURE__ */ m(
826
- nt,
826
+ et(u, f), i(s.alert_csv_downloaded);
827
+ }, A = m.length > 0 && !o && (n || d && !c);
828
+ return /* @__PURE__ */ g(B, { gap: 24, children: [
829
+ /* @__PURE__ */ e(Ne, { budget: t }),
830
+ /* @__PURE__ */ g(B, { children: [
831
+ /* @__PURE__ */ g(
832
+ Qe,
827
833
  {
828
- onChange: S,
834
+ onChange: C,
829
835
  sx: { width: "100%" },
830
836
  textColor: "primary",
831
- value: f,
837
+ value: h,
832
838
  variant: "fullWidth",
833
839
  children: [
834
- /* @__PURE__ */ e(_e, { label: s.details_transactions_tab }),
835
- /* @__PURE__ */ e(_e, { label: s.details_subbudgets_tab })
840
+ /* @__PURE__ */ e(ye, { label: s.details_transactions_tab }),
841
+ /* @__PURE__ */ e(ye, { label: s.details_subbudgets_tab })
836
842
  ]
837
843
  }
838
844
  ),
839
- f === 0 && /* @__PURE__ */ m(B, { children: [
845
+ h === 0 && /* @__PURE__ */ g(B, { children: [
840
846
  A && /* @__PURE__ */ e(B, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
841
- Te,
847
+ Ae,
842
848
  {
843
849
  onClick: v,
844
- startIcon: /* @__PURE__ */ e(G, { name: "ios_share" }),
850
+ startIcon: /* @__PURE__ */ e(P, { name: "ios_share" }),
845
851
  variant: "text",
846
852
  children: r.export_csv_btn
847
853
  }
848
854
  ) }),
849
- /* @__PURE__ */ e(Ee, { height: "100%", onClick: C })
855
+ /* @__PURE__ */ e(Ee, { height: "100%", onClick: _ })
850
856
  ] }),
851
- f === 1 && /* @__PURE__ */ e(Lt, { budget: t }),
857
+ h === 1 && /* @__PURE__ */ e(Ot, { budget: t }),
852
858
  /* @__PURE__ */ e(
853
- P,
859
+ $,
854
860
  {
855
861
  ariaLabelClose: a.close_aria,
856
- isOpen: !!b,
857
- onClose: () => C(""),
862
+ isOpen: !!S,
863
+ onClose: () => _(""),
858
864
  title: s.details_transaction_drawer,
859
- children: b && /* @__PURE__ */ e(at, { transaction: b })
865
+ children: S && /* @__PURE__ */ e(tt, { transaction: S })
860
866
  }
861
867
  )
862
868
  ] })
863
869
  ] });
864
- }), Nt = I(() => {
865
- const { selectedAccountGuids: t } = ae(), { budgets: n, common: i } = w(), {
870
+ }), Mt = E(() => {
871
+ const { selectedAccountGuids: t } = oe(), { budgets: o, common: i } = w(), {
866
872
  alert: s,
867
873
  dateRange: a,
868
874
  deleteBudget: r,
869
- selectedBudget: o,
875
+ selectedBudget: n,
870
876
  selectedSubBudget: c,
871
877
  setAlert: d,
872
- setSelectedBudget: g,
878
+ setSelectedBudget: m,
873
879
  updateBudget: u
874
- } = D(), { setFilter: _ } = re(), [f, h] = l.useState(!1), [p, C] = l.useState(!1), [b, S] = l.useState(!1), [v, A] = l.useState("");
880
+ } = D(), { setFilter: f } = ae(), [h, b] = l.useState(!1), [p, _] = l.useState(!1), [S, C] = l.useState(!1), [v, A] = l.useState("");
875
881
  l.useEffect(() => {
876
- o && !c && (A(`${o.amount}`), h(!0), _({
882
+ n && !c && (A(`${n.amount}`), b(!0), f({
877
883
  accounts: t,
878
884
  dateRange: a,
879
- custom: (N) => N.category_guid === o.category_guid || N.top_level_category_guid === o.category_guid,
885
+ custom: (k) => k.category_guid === n.category_guid || k.top_level_category_guid === n.category_guid,
880
886
  showSplits: !0
881
887
  }));
882
- }, [o]);
888
+ }, [n]);
883
889
  const x = async () => {
884
- o && (await u({
885
- ...o,
890
+ n && (await u({
891
+ ...n,
886
892
  amount: Number(v),
887
- percentage: o.category.totalAmount / Number(v) * 100
888
- }), C(!1), d(L(n.alert_budget_updated, o.category.name)));
889
- }, O = async () => {
890
- o && (await r(o.guid), d(L(n.alert_budget_deleted, o.category.name))), M();
893
+ percentage: n.category.totalAmount / Number(v) * 100
894
+ }), _(!1), d(L(o.alert_budget_updated, n.category.name)));
895
+ }, R = async () => {
896
+ n && (await r(n.guid), d(L(o.alert_budget_deleted, n.category.name))), M();
891
897
  }, M = () => {
892
- h(!1), setTimeout(() => {
893
- g(void 0);
898
+ b(!1), setTimeout(() => {
899
+ m(void 0);
894
900
  }, 250);
895
- }, R = () => {
896
- C(!1), A(`${o?.amount}`);
901
+ }, I = () => {
902
+ _(!1), A(`${n?.amount}`);
897
903
  };
898
- if (o)
899
- return /* @__PURE__ */ m(l.Fragment, { children: [
900
- /* @__PURE__ */ m(
901
- P,
904
+ if (n)
905
+ return /* @__PURE__ */ g(l.Fragment, { children: [
906
+ /* @__PURE__ */ g(
907
+ $,
902
908
  {
903
909
  ariaLabelClose: i.close_aria,
904
- isOpen: f,
910
+ isOpen: h,
905
911
  onClose: M,
906
- onPrimaryAction: () => C(!0),
907
- onSecondaryAction: () => S(!0),
908
- primaryText: n.details_edit_button,
912
+ onPrimaryAction: () => _(!0),
913
+ onSecondaryAction: () => C(!0),
914
+ primaryText: o.details_edit_button,
909
915
  secondaryColor: "error",
910
- secondaryText: n.details_delete_button,
911
- title: n.details_title,
916
+ secondaryText: o.details_delete_button,
917
+ title: o.details_title,
912
918
  children: [
913
- /* @__PURE__ */ e(kt, { budget: o }),
919
+ /* @__PURE__ */ e(Rt, { budget: n }),
914
920
  /* @__PURE__ */ e(
915
- Ie,
921
+ De,
916
922
  {
917
923
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
918
924
  autoHideDuration: 3500,
919
925
  onClose: () => d(""),
920
926
  open: !!s,
921
- children: /* @__PURE__ */ e(De, { closeText: "", onClose: () => d(""), severity: "success", variant: "filled", children: s })
927
+ children: /* @__PURE__ */ e(we, { closeText: "", onClose: () => d(""), severity: "success", variant: "filled", children: s })
922
928
  }
923
929
  )
924
930
  ]
@@ -927,18 +933,18 @@ const Tt = ({
927
933
  /* @__PURE__ */ e(
928
934
  z,
929
935
  {
930
- copy: { close_aria: i.close_aria, title: n.details_edit_title },
936
+ copy: { close_aria: i.close_aria, title: o.details_edit_title },
931
937
  disablePrimaryButton: Number(v) <= 0,
932
938
  isOpen: p,
933
- onClose: R,
939
+ onClose: I,
934
940
  onPrimaryAction: x,
935
- onSecondaryAction: R,
936
- primaryText: n.edit_save_button,
941
+ onSecondaryAction: I,
942
+ primaryText: o.edit_save_button,
937
943
  children: /* @__PURE__ */ e(
938
- le,
944
+ ce,
939
945
  {
940
946
  amount: v,
941
- categoryName: o.category.name,
947
+ categoryName: n.category.name,
942
948
  onAmountChanged: A
943
949
  }
944
950
  )
@@ -947,264 +953,264 @@ const Tt = ({
947
953
  /* @__PURE__ */ e(
948
954
  z,
949
955
  {
950
- copy: { close_aria: i.close_aria, title: n.delete_title },
951
- isOpen: b,
952
- onClose: () => S(!1),
953
- onPrimaryAction: O,
956
+ copy: { close_aria: i.close_aria, title: o.delete_title },
957
+ isOpen: S,
958
+ onClose: () => C(!1),
959
+ onPrimaryAction: R,
954
960
  primaryColor: "error",
955
- primaryText: n.details_delete_button,
961
+ primaryText: o.details_delete_button,
956
962
  secondaryColor: "secondary",
957
- children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: L(n.delete_description, o.category.name) })
963
+ children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: L(o.delete_description, n.category.name) })
958
964
  }
959
965
  )
960
966
  ] });
961
- }), $t = ({ budget: t, onClick: n }) => {
967
+ }), Lt = ({ budget: t, onClick: o }) => {
962
968
  const {
963
969
  amount: i,
964
970
  budgetColors: { background: s, description: a },
965
971
  category_guid: r,
966
- description: o,
972
+ description: n,
967
973
  percentage: c,
968
974
  subBudgets: d,
969
- transaction_total: g
975
+ transaction_total: m
970
976
  } = t;
971
- return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ m(Y, { onClick: () => n?.(t), children: [
972
- /* @__PURE__ */ e(ie, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Oe, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: r, variant: "basic" }) }) }),
977
+ return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => o?.(t), children: [
978
+ /* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ie, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: r, variant: "basic" }) }) }),
973
979
  /* @__PURE__ */ e(
974
980
  Z,
975
981
  {
976
- primary: /* @__PURE__ */ m(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
982
+ primary: /* @__PURE__ */ g(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
977
983
  /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }),
978
984
  /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
979
- ${T(g, "0,0")} /
985
+ ${T(m, "0,0")} /
980
986
  ${T(i, "0,0")}
981
987
  ` })
982
988
  ] }),
983
- secondary: /* @__PURE__ */ m(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
989
+ secondary: /* @__PURE__ */ g(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
984
990
  /* @__PURE__ */ e(y, { variant: "XSmall", children: `${d.length} Sub-budgets` }),
985
- /* @__PURE__ */ e(y, { bold: c > 100, color: a, variant: "XSmall", children: o })
991
+ /* @__PURE__ */ e(y, { bold: c > 100, color: a, variant: "XSmall", children: n })
986
992
  ] })
987
993
  }
988
994
  )
989
995
  ] }) });
990
- }, Pt = I(() => {
991
- const { onEvent: t } = X(), { budgets: n } = w(), { detailedBudgets: i, setSelectedBudget: s } = D(), a = (r) => {
992
- s(r), t($.BUDGETS_CLICK_BUDGET_CATEGORY, {
996
+ }, kt = E(() => {
997
+ const { onEvent: t } = X(), { budgets: o } = w(), { detailedBudgets: i, setSelectedBudget: s } = D(), a = (r) => {
998
+ s(r), t(N.BUDGETS_CLICK_BUDGET_CATEGORY, {
993
999
  budget_category: r.category.name,
994
1000
  click_type: "list"
995
1001
  });
996
1002
  };
997
- return /* @__PURE__ */ m(he, { elevation: 2, children: [
998
- /* @__PURE__ */ e(Me, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(ve, { children: n.budget_categories_title }) }),
999
- /* @__PURE__ */ e(fe, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(K, { children: i.map((r) => /* @__PURE__ */ m(l.Fragment, { children: [
1000
- /* @__PURE__ */ e($t, { budget: r, onClick: a }),
1001
- /* @__PURE__ */ e(se, {})
1003
+ return /* @__PURE__ */ g(pe, { elevation: 2, children: [
1004
+ /* @__PURE__ */ e(Oe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(xe, { children: o.budget_categories_title }) }),
1005
+ /* @__PURE__ */ e(he, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(W, { children: i.map((r) => /* @__PURE__ */ g(l.Fragment, { children: [
1006
+ /* @__PURE__ */ e(Lt, { budget: r, onClick: a }),
1007
+ /* @__PURE__ */ e(re, {})
1002
1008
  ] }, r.guid)) }) })
1003
1009
  ] });
1004
- }), Gt = I(() => {
1005
- const t = te(), { onEvent: n } = X(), { visibleAccounts: i } = Ae(), { budgets: s, common: a, recurring: r } = w(), { incomeCategories: o, spendCategories: c } = F(), { detailedBudgets: d, totalBudgeted: g } = D(), { incomeTotal: u } = ne(), { setFilter: _ } = re(), [f, h] = l.useState(!1), [p, C] = l.useMemo(() => {
1006
- const A = c.reduce((R, N) => R + N.totalAmount, 0);
1007
- let x = A / g;
1010
+ }), Nt = E(() => {
1011
+ const t = ee(), { onEvent: o } = X(), { visibleAccounts: i } = ve(), { budgets: s, common: a, recurring: r } = w(), { incomeCategories: n, spendCategories: c } = K(), { detailedBudgets: d, totalBudgeted: m } = D(), { incomeTotal: u } = te(), { setFilter: f } = ae(), [h, b] = l.useState(!1), [p, _] = l.useMemo(() => {
1012
+ const A = c.reduce((I, k) => I + k.totalAmount, 0);
1013
+ let x = A / m;
1008
1014
  x > 1 && (x = 1);
1009
- let O = t.palette.success.main;
1010
- x > 0.8 && x < 1 ? O = t.palette.warning.main : x >= 1 && (O = t.palette.error.main);
1015
+ let R = t.palette.success.main;
1016
+ x > 0.8 && x < 1 ? R = t.palette.warning.main : x >= 1 && (R = t.palette.error.main);
1011
1017
  const M = [
1012
1018
  {
1013
- color: O,
1019
+ color: R,
1014
1020
  percentage: `${x}`
1015
1021
  }
1016
1022
  ];
1017
1023
  return [A, M];
1018
- }, [d, c]), [b, S] = l.useMemo(() => {
1024
+ }, [d, c]), [S, C] = l.useMemo(() => {
1019
1025
  const A = Math.abs(
1020
- o.reduce((M, R) => M + R.totalAmount, 0)
1026
+ n.reduce((M, I) => M + I.totalAmount, 0)
1021
1027
  );
1022
1028
  let x = A / u;
1023
1029
  x > 1 && (x = 1);
1024
- const O = [
1030
+ const R = [
1025
1031
  {
1026
1032
  color: t.palette.secondary.main,
1027
1033
  percentage: `${x}`
1028
1034
  }
1029
1035
  ];
1030
- return [A, O];
1031
- }, [o, u]), v = () => {
1032
- _({
1036
+ return [A, R];
1037
+ }, [n, u]), v = () => {
1038
+ f({
1033
1039
  accounts: i.map((A) => A.guid),
1034
1040
  dateRange: {
1035
- start: it(/* @__PURE__ */ new Date(), 90),
1041
+ start: at(/* @__PURE__ */ new Date(), 90),
1036
1042
  end: /* @__PURE__ */ new Date()
1037
1043
  }
1038
- }), h(!0), n($.BUDGETS_CLICK_EDIT_INCOME);
1044
+ }), b(!0), o(N.BUDGETS_CLICK_EDIT_INCOME);
1039
1045
  };
1040
- return /* @__PURE__ */ m(he, { elevation: 2, sx: { overflow: "visible" }, children: [
1041
- /* @__PURE__ */ e(Me, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(ve, { children: s.overview_title }) }),
1042
- /* @__PURE__ */ e(fe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(B, { gap: 24, children: [
1043
- /* @__PURE__ */ m(B, { gap: 8, children: [
1046
+ return /* @__PURE__ */ g(pe, { elevation: 2, sx: { overflow: "visible" }, children: [
1047
+ /* @__PURE__ */ e(Oe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(xe, { children: s.overview_title }) }),
1048
+ /* @__PURE__ */ e(he, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ g(B, { gap: 24, children: [
1049
+ /* @__PURE__ */ g(B, { gap: 8, children: [
1044
1050
  /* @__PURE__ */ e(y, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
1045
- /* @__PURE__ */ e(pe, { data: C, height: 16 }),
1051
+ /* @__PURE__ */ e(me, { data: _, height: 16 }),
1046
1052
  /* @__PURE__ */ e(y, { variant: "Small", children: L(
1047
1053
  s.spending_description,
1048
1054
  T(p, "0,0"),
1049
- T(g, "0,0")
1055
+ T(m, "0,0")
1050
1056
  ) })
1051
1057
  ] }),
1052
- /* @__PURE__ */ m(B, { gap: 8, children: [
1053
- /* @__PURE__ */ m(B, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
1058
+ /* @__PURE__ */ g(B, { gap: 8, children: [
1059
+ /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
1054
1060
  /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: s.income_title }),
1055
1061
  /* @__PURE__ */ e(
1056
- ct,
1062
+ rt,
1057
1063
  {
1058
1064
  "aria-label": r.manage_income,
1059
1065
  onClick: v,
1060
1066
  sx: { p: 0 },
1061
- children: /* @__PURE__ */ e(G, { color: "primary", name: "edit" })
1067
+ children: /* @__PURE__ */ e(P, { color: "primary", name: "edit" })
1062
1068
  }
1063
1069
  )
1064
1070
  ] }),
1065
- /* @__PURE__ */ e(pe, { data: S, height: 16 }),
1071
+ /* @__PURE__ */ e(me, { data: C, height: 16 }),
1066
1072
  /* @__PURE__ */ e(y, { variant: "Small", children: L(
1067
1073
  s.income_description,
1068
- T(b, "0,0"),
1074
+ T(S, "0,0"),
1069
1075
  T(u, "0,0")
1070
1076
  ) })
1071
1077
  ] })
1072
1078
  ] }) }),
1073
1079
  /* @__PURE__ */ e(
1074
- P,
1080
+ $,
1075
1081
  {
1076
1082
  ariaLabelClose: a.close_aria,
1077
- isOpen: f,
1078
- onClose: () => h(!1),
1083
+ isOpen: h,
1084
+ onClose: () => b(!1),
1079
1085
  title: r.manage_income,
1080
- children: /* @__PURE__ */ e(lt, { forOverview: !0 })
1086
+ children: /* @__PURE__ */ e(st, { forOverview: !0 })
1081
1087
  }
1082
1088
  )
1083
1089
  ] });
1084
- }), xe = 480, Pn = I(({ onBackClick: t, sx: n }) => {
1085
- const i = te(), { onEvent: s } = X(), { visibleAccounts: a } = Ae(), { budgets: r, common: o } = w(), { isCopyLoaded: c, isInitialized: d, selectedAccounts: g, setDisplayedDate: u, setSelectedAccounts: _ } = ae(), {
1086
- alert: f,
1087
- dateRange: h,
1088
- isDataLoaded: p,
1089
- loadBudgetData: C,
1090
- setDateRange: b,
1091
- setAlert: S,
1092
- setTheme: v,
1093
- detailedBudgets: A
1094
- } = D(), { loadRepeatingTransactions: x, setDateRange: O } = ne(), { reloadCategoryTotals: M } = F(), { isSmallTablet: R, isMobile: N, isSmallMobile: de } = ce(), k = R || N || de, [Pe, q] = l.useState(!1);
1095
- l.useEffect(() => (v(i), _(a), b({ start: Q(J()), end: ge(J()) }), s($.BUDGETS_VIEW), () => {
1096
- b({ start: Q(J()), end: ge(J()) });
1097
- }), []), l.useEffect(() => {
1098
- _(a);
1099
- }, [a]), l.useEffect(() => {
1100
- d && (u(h.start, h.end), M(g, h.start, h.end).finally(), O(h), p || (x().finally(), C().finally()));
1101
- }, [d, g, h]), we({
1090
+ }), Se = 480, kn = E(({ onBackClick: t, sx: o }) => {
1091
+ const i = ee(), { onEvent: s } = X(), { visibleAccounts: a } = ve(), { budgets: r, common: n } = w(), { isInitialized: c, selectedAccounts: d, setDisplayedDate: m } = oe(), {
1092
+ alert: u,
1093
+ dateRange: f,
1094
+ isDataLoaded: h,
1095
+ loadBudgetData: b,
1096
+ setDateRange: p,
1097
+ setAlert: _,
1098
+ setTheme: S,
1099
+ detailedBudgets: C
1100
+ } = D(), { setDateRange: v } = te(), { loadDateRangeCategoryTotals: A } = K(), { isSmallTablet: x, isMobile: R, isSmallMobile: M } = ie(), I = x || R || M, [k, G] = l.useState(!1);
1101
+ Te({
1102
1102
  widgetName: "BubbleBudgetsWidget",
1103
- isLoaded: p
1104
- });
1105
- const Ge = (ye) => {
1106
- b({ start: ye[0] || /* @__PURE__ */ new Date(), end: ye[1] || /* @__PURE__ */ new Date() });
1107
- }, je = () => {
1108
- s($.BUDGETS_CLICK_FILTER);
1109
- }, be = () => {
1110
- q(!0), s($.BUDGETS_CLICK_ADD);
1111
- }, ze = () => {
1112
- q(!1);
1113
- }, Ue = () => {
1114
- q(!1);
1115
- }, Fe = tt(h.end, Q(/* @__PURE__ */ new Date()));
1116
- return !c || !d || !p ? /* @__PURE__ */ e(U, {}) : /* @__PURE__ */ m(
1117
- Je,
1103
+ isLoaded: h
1104
+ }), l.useEffect(() => {
1105
+ S(i), h || b().finally(() => {
1106
+ s(N.BUDGETS_VIEW);
1107
+ });
1108
+ }, []), l.useEffect(() => (p({ start: J(q()), end: ue(q()) }), () => {
1109
+ p({ start: J(q()), end: ue(q()) });
1110
+ }), [a]), l.useEffect(() => {
1111
+ c && (m(f.start, f.end), A(d, f.start, f.end).finally(), v(f));
1112
+ }, [c, d, f]);
1113
+ const U = (be) => {
1114
+ p({ start: be[0] || /* @__PURE__ */ new Date(), end: be[1] || /* @__PURE__ */ new Date() });
1115
+ }, $e = () => {
1116
+ s(N.BUDGETS_CLICK_FILTER);
1117
+ }, fe = () => {
1118
+ G(!0), s(N.BUDGETS_CLICK_ADD);
1119
+ }, Pe = () => {
1120
+ G(!1);
1121
+ }, Ge = () => {
1122
+ G(!1);
1123
+ }, je = Je(f.end, J(/* @__PURE__ */ new Date()));
1124
+ return !c || !h ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ g(
1125
+ Ye,
1118
1126
  {
1119
- accountOptions: a,
1120
1127
  actions: [
1121
1128
  {
1122
1129
  iconName: "add",
1123
1130
  label: r.add_title,
1124
- onClick: be
1131
+ onClick: fe
1125
1132
  }
1126
1133
  ],
1127
1134
  calendarActions: {
1128
- onRangeChanged: Ge,
1129
- shouldDisableNext: Fe,
1135
+ onRangeChanged: U,
1136
+ shouldDisableNext: je,
1130
1137
  shouldDisablePicker: !0
1131
1138
  },
1132
- onAccountsFilterClick: je,
1139
+ onAccountsFilterClick: $e,
1133
1140
  onBackClick: t,
1134
- sx: n,
1141
+ sx: o,
1135
1142
  title: r.budgets_title,
1136
1143
  children: [
1137
- (!d || !p) && /* @__PURE__ */ e(U, {}),
1138
- d && p && /* @__PURE__ */ m(
1144
+ /* @__PURE__ */ g(
1139
1145
  B,
1140
1146
  {
1141
- direction: k ? "column" : "row",
1147
+ direction: I ? "column" : "row",
1142
1148
  height: "100%",
1143
1149
  sx: { justifyContent: "center" },
1144
1150
  width: "100%",
1145
1151
  children: [
1146
- /* @__PURE__ */ e(B, { height: k ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1147
- Ne,
1152
+ /* @__PURE__ */ e(B, { height: I ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1153
+ ke,
1148
1154
  {
1149
- createBudgetOnClick: be,
1150
- height: k ? 450 : 800,
1155
+ createBudgetOnClick: fe,
1156
+ height: I ? 450 : 800,
1151
1157
  isDraggable: !0,
1152
- shouldShowZeroState: A.length === 0,
1153
- unavailableWidth: k ? 0 : xe
1158
+ shouldShowZeroState: C.length === 0,
1159
+ unavailableWidth: I ? 0 : Se
1154
1160
  }
1155
1161
  ) }),
1156
- A.length !== 0 && /* @__PURE__ */ m(
1162
+ C.length !== 0 && /* @__PURE__ */ g(
1157
1163
  B,
1158
1164
  {
1159
1165
  gap: 24,
1160
1166
  height: "100%",
1161
1167
  sx: { mr: 24, mt: 48 },
1162
- width: k ? "100%" : xe,
1168
+ width: I ? "100%" : Se,
1163
1169
  children: [
1164
- /* @__PURE__ */ e(Gt, {}),
1165
- /* @__PURE__ */ e(Pt, {})
1170
+ /* @__PURE__ */ e(Nt, {}),
1171
+ /* @__PURE__ */ e(kt, {})
1166
1172
  ]
1167
1173
  }
1168
1174
  )
1169
1175
  ]
1170
1176
  }
1171
1177
  ),
1172
- /* @__PURE__ */ e(Nt, {}),
1178
+ /* @__PURE__ */ e(Mt, {}),
1173
1179
  /* @__PURE__ */ e(
1174
- P,
1180
+ $,
1175
1181
  {
1176
- ariaLabelClose: o.close_aria,
1177
- isOpen: Pe,
1178
- onClose: () => q(!1),
1182
+ ariaLabelClose: n.close_aria,
1183
+ isOpen: k,
1184
+ onClose: () => G(!1),
1179
1185
  title: r.add_new_title,
1180
1186
  children: /* @__PURE__ */ e(
1181
1187
  Re,
1182
1188
  {
1183
- onAddBudget: ze,
1184
- onRecalculateBudgets: Ue
1189
+ onAddBudget: Pe,
1190
+ onRecalculateBudgets: Ge
1185
1191
  }
1186
1192
  )
1187
1193
  }
1188
1194
  ),
1189
1195
  /* @__PURE__ */ e(
1190
- Ie,
1196
+ De,
1191
1197
  {
1192
1198
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
1193
1199
  autoHideDuration: 3500,
1194
1200
  onClose: () => {
1195
- S("");
1201
+ _("");
1196
1202
  },
1197
- open: !!f,
1203
+ open: !!u,
1198
1204
  children: /* @__PURE__ */ e(
1199
- De,
1205
+ we,
1200
1206
  {
1201
1207
  closeText: "",
1202
1208
  onClose: () => {
1203
- S("");
1209
+ _("");
1204
1210
  },
1205
1211
  severity: "success",
1206
1212
  variant: "filled",
1207
- children: f
1213
+ children: u
1208
1214
  }
1209
1215
  )
1210
1216
  }
@@ -1214,6 +1220,6 @@ const Tt = ({
1214
1220
  );
1215
1221
  });
1216
1222
  export {
1217
- $n as BubbleBudgetsMiniWidget,
1218
- Pn as BubbleBudgetsWidget
1223
+ Ln as BubbleBudgetsMiniWidget,
1224
+ kn as BubbleBudgetsWidget
1219
1225
  };