@mx-cartographer/experiences 7.3.0-alpha.sms1 → 7.3.0

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