@mx-cartographer/experiences 7.0.17-alpha.mm.0 → 7.0.17

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 (99) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-DY2axAET.mjs → Account-BW3-oYEs.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-Jsg4ZDC1.mjs → AccountDetailsContent-BzD6CDIm.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-EU_2u2Iq.mjs → AccountDetailsHeader-Eb3WvBGm.mjs} +5 -5
  5. package/dist/{AccountFields-CSUS7pGn.mjs → AccountFields-CIz-r3gP.mjs} +2 -2
  6. package/dist/{AccountListItem-CMYZQg8M.mjs → AccountListItem-B-ZjJ4Gp.mjs} +3 -3
  7. package/dist/{AccountStore-CIX2RAmG.mjs → AccountStore-BaMynkQT.mjs} +26 -26
  8. package/dist/{Accounts-xi9RGRIU.mjs → Accounts-CA-nqAjT.mjs} +1 -1
  9. package/dist/{BeatApi-D0WcLW3O.mjs → BeatApi-DLu87ijw.mjs} +3 -3
  10. package/dist/{BeatStore-y6WVs07e.mjs → BeatStore-By4aGoRM.mjs} +17 -17
  11. package/dist/{BudgetUtil-DmWvHV7C.mjs → BudgetUtil-CeSLAcsl.mjs} +1 -1
  12. package/dist/{CategorySelectorDrawer-BHqOpBNr.mjs → CategorySelectorDrawer-BJ9jlCyt.mjs} +1 -1
  13. package/dist/{CategoryStore-BfYppD3g.mjs → CategoryStore-BOyzQjQp.mjs} +4 -4
  14. package/dist/{ConnectDrawer-CU5dEdrU.mjs → ConnectDrawer-phFH6OHt.mjs} +1 -1
  15. package/dist/{ConnectionsDrawer-BUJuQrgF.mjs → ConnectionsDrawer-ihxkAi1P.mjs} +2 -2
  16. package/dist/{CurrencyInput-BtrNBP3z.mjs → CurrencyInput-bEx2Mbd0.mjs} +1 -1
  17. package/dist/{DebtsStore-BL_0pQEd.mjs → DebtsStore-Dp-CraCD.mjs} +1 -1
  18. package/dist/{ExportCsvAction-CUGnEaHw.mjs → ExportCsvAction-CbMfQ2Wa.mjs} +3 -3
  19. package/dist/{Fetch-CJ9cgjgV.mjs → Fetch-CkFKy79O.mjs} +8 -9
  20. package/dist/{FinstrongStore-rC2F4Tq3.mjs → FinstrongStore-mkALvztw.mjs} +4 -4
  21. package/dist/{GoalStore-CFx47exL.mjs → GoalStore-eSOkI6uE.mjs} +6 -6
  22. package/dist/{Help-CCuoAZT3.mjs → Help-KAAMEubC.mjs} +1 -1
  23. package/dist/{LineChart-D5uLCys4.mjs → LineChart-BWWmmJxV.mjs} +1 -1
  24. package/dist/{ListItemAction-Cwadpg85.mjs → ListItemAction-DNZZ5fSa.mjs} +1 -1
  25. package/dist/{ManageIncome-B91zIeYo.mjs → ManageIncome-DcKHpJ9V.mjs} +4 -4
  26. package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
  27. package/dist/{MicroWidgetContainer-DwTAjSdX.mjs → MicroWidgetContainer-Dxz8uBN9.mjs} +1 -1
  28. package/dist/{MiniWidgetContainer-CxggrnHk.mjs → MiniWidgetContainer-CTyjmE1h.mjs} +1 -1
  29. package/dist/{NetWorthStore-CYYTpP9O.mjs → NetWorthStore-B6xF9eGH.mjs} +2 -2
  30. package/dist/{NotificationSettings-BEFyqBTj.mjs → NotificationSettings-aZFVTc8B.mjs} +2 -2
  31. package/dist/{NotificationStore-DpV9hXSE.mjs → NotificationStore-DHtSGySy.mjs} +4 -8
  32. package/dist/{OriginalBalanceAction-DDMRgIBU.mjs → OriginalBalanceAction-DepsKiJz.mjs} +3 -3
  33. package/dist/{RecurringSettings-CGGFhlhh.mjs → RecurringSettings-C9r4s1Cz.mjs} +3 -3
  34. package/dist/{RecurringTransactionsStore-CXhnipfd.mjs → RecurringTransactionsStore-D62XJtdL.mjs} +16 -20
  35. package/dist/{SettingsStore-CLLqNa_S.mjs → SettingsStore-B4gi6oOw.mjs} +29 -33
  36. package/dist/{TransactionApi-C0HMGDBV.mjs → TransactionApi-DbbcjI2L.mjs} +29 -29
  37. package/dist/{TransactionDetails-Bc0iW26I.mjs → TransactionDetails-bja6hKJk.mjs} +5 -5
  38. package/dist/{TransactionStore-Va_jug-g.mjs → TransactionStore-0tLtBEIC.mjs} +25 -29
  39. package/dist/{TrendsStore-DmuQennN.mjs → TrendsStore-WrHxzdbQ.mjs} +1 -1
  40. package/dist/{User-B9T_314z.mjs → User-Dq9Qj764.mjs} +1 -1
  41. package/dist/{ViewMoreMicroCard-61VqFx4x.mjs → ViewMoreMicroCard-BPEzFZRG.mjs} +2 -5
  42. package/dist/{WidgetContainer-CTrp2veH.mjs → WidgetContainer-CdBs9WOZ.mjs} +2 -2
  43. package/dist/accounts/api/AccountApi.d.ts +2 -2
  44. package/dist/accounts/index.es.js +12 -12
  45. package/dist/analytics/index.es.js +2 -2
  46. package/dist/budgets/api/BudgetsApi.d.ts +2 -2
  47. package/dist/budgets/index.es.js +209 -209
  48. package/dist/cashflow/api/CashflowApi.d.ts +2 -3
  49. package/dist/cashflow/index.es.js +10 -10
  50. package/dist/categories/index.es.js +2 -2
  51. package/dist/common/api/AnalyticsApi.d.ts +2 -2
  52. package/dist/common/api/AppDataApi.d.ts +2 -2
  53. package/dist/common/api/BeatApi.d.ts +2 -2
  54. package/dist/common/api/CategoryApi.d.ts +3 -2
  55. package/dist/common/api/GlobalCopyApi.d.ts +1 -2
  56. package/dist/common/api/LocalizedCopyApi.d.ts +1 -2
  57. package/dist/common/api/NotificationApi.d.ts +2 -2
  58. package/dist/common/api/ScheduledPaymentsApi.d.ts +2 -3
  59. package/dist/common/api/UserApi.d.ts +2 -2
  60. package/dist/common/context/GlobalDataProvider.d.ts +2 -3
  61. package/dist/common/context/hooks.d.ts +1 -4
  62. package/dist/common/context/index.d.ts +1 -1
  63. package/dist/common/index.es.js +315 -321
  64. package/dist/common/stores/GlobalStore.d.ts +1 -2
  65. package/dist/common/types/index.d.ts +0 -1
  66. package/dist/common/utils/Fetch.d.ts +1 -3
  67. package/dist/dashboard/index.es.js +2 -2
  68. package/dist/debts/index.es.js +9 -9
  69. package/dist/{exportTransactionsToCSV-ct1RkLbj.mjs → exportTransactionsToCSV-BDlt8u0n.mjs} +1 -1
  70. package/dist/finstrong/api/FinstrongApi.d.ts +1 -2
  71. package/dist/finstrong/index.es.js +7 -7
  72. package/dist/goals/api/GoalApi.d.ts +2 -3
  73. package/dist/goals/index.es.js +11 -11
  74. package/dist/help/api/HelpApi.d.ts +2 -2
  75. package/dist/help/index.es.js +3 -3
  76. package/dist/hooks-DkUqN6JE.mjs +71 -0
  77. package/dist/insights/index.es.js +1 -1
  78. package/dist/investments/api/HoldingApi.d.ts +2 -3
  79. package/dist/investments/index.es.js +3 -3
  80. package/dist/merchants/api/MerchantApi.d.ts +1 -2
  81. package/dist/merchants/index.es.js +2 -2
  82. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -2
  83. package/dist/microinsights/context/hooks.d.ts +1 -1
  84. package/dist/microinsights/index.es.js +1 -1
  85. package/dist/networth/index.es.js +7 -7
  86. package/dist/notifications/index.es.js +5 -5
  87. package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -2
  88. package/dist/recurringtransactions/index.es.js +10 -10
  89. package/dist/settings/api/SettingsApi.d.ts +2 -3
  90. package/dist/settings/index.es.js +7 -7
  91. package/dist/spending/index.es.js +4 -4
  92. package/dist/transactions/api/TransactionApi.d.ts +2 -3
  93. package/dist/transactions/index.es.js +14 -14
  94. package/dist/trends/index.es.js +10 -10
  95. package/dist/{useCombineEvents-Dbjzfwvo.mjs → useCombineEvents-DaDBSR_1.mjs} +29 -29
  96. package/package.json +1 -1
  97. package/dist/MerchantStore-h96aTml7.mjs +0 -37
  98. package/dist/common/types/Handlers.d.ts +0 -2
  99. package/dist/hooks-DcS6DyRl.mjs +0 -74
@@ -4,18 +4,18 @@ import { observer as I } from "mobx-react-lite";
4
4
  import { endOfMonth as de } from "date-fns/endOfMonth";
5
5
  import { startOfMonth as J } from "date-fns/startOfMonth";
6
6
  import W from "@mui/material/Box";
7
- import b from "@mui/material/Stack";
7
+ import _ from "@mui/material/Stack";
8
8
  import Q from "@mui/material/styles/useTheme";
9
- import { Icon as $, Text as p, CategoryIcon as H, H1 as Ge, H3 as Be } from "@mxenabled/mxui";
10
- import { u as Pe } from "../BudgetUtil-DmWvHV7C.mjs";
11
- import { C as Ne } from "../ConnectionsDrawer-BUJuQrgF.mjs";
9
+ import { Icon as $, Text as g, CategoryIcon as H, H1 as Ge, H3 as Be } from "@mxenabled/mxui";
10
+ import { u as Pe } from "../BudgetUtil-CeSLAcsl.mjs";
11
+ import { C as Ne } from "../ConnectionsDrawer-ihxkAi1P.mjs";
12
12
  import * as E from "d3";
13
13
  import je from "@mui/material/Tooltip";
14
- import { g as w, k as j, u as D, e as X, a as ee, p as ze, h as te, f as ne, m as Ue, c as Se } from "../hooks-DcS6DyRl.mjs";
14
+ import { g as w, k as j, u as D, e as X, a as ee, p as ze, h as te, f as ne, m as Ue, c as Se } from "../hooks-DkUqN6JE.mjs";
15
15
  import { L as P } from "../Loader-DUaFpDGv.mjs";
16
16
  import { E as ce } from "../EmptyState-C0lr9E5T.mjs";
17
17
  import { u as me } from "../useScreenSize-B6JyS_Lj.mjs";
18
- import { A as k, W as Fe } from "../WidgetContainer-CTrp2veH.mjs";
18
+ import { A as k, W as Fe } from "../WidgetContainer-CdBs9WOZ.mjs";
19
19
  import K from "@mui/material/List";
20
20
  import { f as T } from "../NumberFormatting-CtWHhyBX.mjs";
21
21
  import Ae from "@mui/material/Button";
@@ -27,26 +27,26 @@ import Z from "@mui/material/ListItemText";
27
27
  import { b as L } from "../Localization-2MODESHW.mjs";
28
28
  import { D as M } from "../Drawer-kEE73B87.mjs";
29
29
  import We from "@mui/material/ListItemSecondaryAction";
30
- import { C as He } from "../CurrencyInput-BtrNBP3z.mjs";
30
+ import { C as He } from "../CurrencyInput-bEx2Mbd0.mjs";
31
31
  import { a as N } from "../Dialog-CWW597AF.mjs";
32
- import { M as Xe } from "../MiniWidgetContainer-CxggrnHk.mjs";
32
+ import { M as Xe } from "../MiniWidgetContainer-CTyjmE1h.mjs";
33
33
  import { isAfter as Ke } from "date-fns/isAfter";
34
34
  import { startOfToday as q } from "date-fns/startOfToday";
35
35
  import Ve from "@mui/material/Alert";
36
36
  import Ye from "@mui/material/Snackbar";
37
37
  import be from "@mui/material/Tab";
38
38
  import Ze from "@mui/material/Tabs";
39
- import { e as qe } from "../exportTransactionsToCSV-ct1RkLbj.mjs";
40
- import { T as xe, a as Je } from "../TransactionDetails-Bc0iW26I.mjs";
39
+ import { e as qe } from "../exportTransactionsToCSV-BDlt8u0n.mjs";
40
+ import { T as xe, a as Je } from "../TransactionDetails-bja6hKJk.mjs";
41
41
  import ge from "@mui/material/Card";
42
42
  import pe from "@mui/material/CardContent";
43
43
  import { S as ue } from "../StatusBar-BK_uYHAB.mjs";
44
44
  import { S as ve } from "../SingleSegmentDonut-BgbLgwHi.mjs";
45
- import { u as Qe, b as et } from "../CategorySelectorDrawer-BHqOpBNr.mjs";
45
+ import { u as Qe, b as et } from "../CategorySelectorDrawer-BJ9jlCyt.mjs";
46
46
  import Te from "@mui/material/CardHeader";
47
47
  import { subDays as tt } from "date-fns/subDays";
48
48
  import nt from "@mui/material/IconButton";
49
- import { M as ot } from "../ManageIncome-B91zIeYo.mjs";
49
+ import { M as ot } from "../ManageIncome-DcKHpJ9V.mjs";
50
50
  const ye = 5, at = 100, rt = 25, st = (t) => {
51
51
  const o = (a) => {
52
52
  a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
@@ -115,15 +115,15 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
115
115
  const {
116
116
  budgetColors: { background: n, text: r },
117
117
  category: { icon: c, name: y },
118
- guid: h,
119
- description: m,
120
- radius: g,
121
- x: f,
122
- y: _
118
+ guid: p,
119
+ description: h,
120
+ radius: m,
121
+ x: C,
122
+ y: b
123
123
  } = t;
124
- let u = -12, C = -12;
125
- g > G ? (u = -14, C = -45) : g > le && (C = -32);
126
- const B = `${t.category.name}: ${m}`, A = {
124
+ let u = -12, B = -12;
125
+ m > G ? (u = -14, B = -45) : m > le && (B = -32);
126
+ const f = `${t.category.name}: ${h}`, A = {
127
127
  modifiers: [
128
128
  {
129
129
  name: "offset",
@@ -135,14 +135,14 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
135
135
  "g",
136
136
  {
137
137
  className: "bubble",
138
- id: `bubble-${h}`,
138
+ id: `bubble-${p}`,
139
139
  onClick: () => i(t),
140
140
  onMouseEnter: () => a(!0),
141
141
  onMouseLeave: () => a(!1),
142
142
  style: { cursor: o ? "pointer" : "default" },
143
143
  textAnchor: "middle",
144
- x: f,
145
- y: _,
144
+ x: C,
145
+ y: b,
146
146
  children: [
147
147
  /* @__PURE__ */ e(
148
148
  je,
@@ -150,50 +150,50 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
150
150
  followCursor: !0,
151
151
  open: s,
152
152
  slotProps: { popper: A },
153
- title: B,
154
- children: /* @__PURE__ */ e("circle", { fill: n, id: `circle-${h}`, r: g })
153
+ title: f,
154
+ children: /* @__PURE__ */ e("circle", { fill: n, id: `circle-${p}`, r: m })
155
155
  }
156
156
  ),
157
- /* @__PURE__ */ e("svg", { x: u, y: C, children: /* @__PURE__ */ e($, { name: c, size: g <= G ? 24 : 32, sx: { fill: r } }) }),
158
- g > G && /* @__PURE__ */ e(
159
- p,
157
+ /* @__PURE__ */ e("svg", { x: u, y: B, children: /* @__PURE__ */ e($, { name: c, size: m <= G ? 24 : 32, sx: { fill: r } }) }),
158
+ m > G && /* @__PURE__ */ e(
159
+ g,
160
160
  {
161
161
  bold: !0,
162
162
  component: "text",
163
- id: `budget-category-${h}`,
163
+ id: `budget-category-${p}`,
164
164
  sx: { fill: r },
165
165
  variant: "Small",
166
166
  y: 4,
167
167
  children: y
168
168
  }
169
169
  ),
170
- g > le && /* @__PURE__ */ e(
171
- p,
170
+ m > le && /* @__PURE__ */ e(
171
+ g,
172
172
  {
173
173
  bold: !0,
174
174
  component: "text",
175
- id: `budget-description-${h}-1`,
175
+ id: `budget-description-${p}-1`,
176
176
  sx: { fill: r },
177
177
  variant: "Body",
178
- y: g <= G ? 12 : 24,
179
- children: g <= G ? m.split(" ")[0] : m
178
+ y: m <= G ? 12 : 24,
179
+ children: m <= G ? h.split(" ")[0] : h
180
180
  }
181
181
  ),
182
- g <= G && g > le && /* @__PURE__ */ e(
183
- p,
182
+ m <= G && m > le && /* @__PURE__ */ e(
183
+ g,
184
184
  {
185
185
  component: "text",
186
- id: `budget-description-${h}-2`,
186
+ id: `budget-description-${p}-2`,
187
187
  sx: { fill: r },
188
188
  variant: "XSmall",
189
189
  y: 28,
190
- children: m.split(" ")[1]
190
+ children: h.split(" ")[1]
191
191
  }
192
192
  ),
193
193
  /* @__PURE__ */ e(gt, { bubble: t })
194
194
  ]
195
195
  },
196
- h
196
+ p
197
197
  );
198
198
  }
199
199
  let F;
@@ -213,19 +213,19 @@ const ht = ({
213
213
  onConnectAccountsClick: o,
214
214
  createBudgetOnClick: i
215
215
  }) => {
216
- const { recalculateBudgets: s } = w(), { spendCategories: a } = j(), { budgets: n } = D(), [r, c] = l.useState(!1), [y, h] = l.useState(!1), [m, g] = l.useState(!1), f = l.useMemo(() => [...a.filter((u) => u.totalAverageAmount > 0)], [a]), _ = async () => {
217
- g(!0);
218
- const { data: u, isSuccess: C } = await s(f);
219
- g(!1), C ? (u.length === 0 && c(!0), h(!1)) : h(!0);
216
+ const { recalculateBudgets: s } = w(), { spendCategories: a } = j(), { budgets: n } = D(), [r, c] = l.useState(!1), [y, p] = l.useState(!1), [h, m] = l.useState(!1), C = l.useMemo(() => [...a.filter((u) => u.totalAverageAmount > 0)], [a]), b = async () => {
217
+ m(!0);
218
+ const { data: u, isSuccess: B } = await s(C);
219
+ m(!1), B ? (u.length === 0 && c(!0), p(!1)) : p(!0);
220
220
  };
221
- return m ? /* @__PURE__ */ e(P, {}) : y ? /* @__PURE__ */ e(
221
+ return h ? /* @__PURE__ */ e(P, {}) : y ? /* @__PURE__ */ e(
222
222
  ce,
223
223
  {
224
224
  header: n.autogenerate_budgets_error_header,
225
225
  icon: "error",
226
226
  iconColor: "#4D4D4D",
227
227
  onClick: (u) => {
228
- u === "primary" ? _() : i();
228
+ u === "primary" ? b() : i();
229
229
  },
230
230
  primaryButton: n.autogenerate_budgets_error_primary_button,
231
231
  secondaryButton: n.zero_state_generate_budgets_secondary_button,
@@ -267,7 +267,7 @@ const ht = ({
267
267
  icon: "bubble_chart",
268
268
  iconColor: "#1A1A1A",
269
269
  onClick: (u) => {
270
- u === "primary" ? _() : i();
270
+ u === "primary" ? b() : i();
271
271
  },
272
272
  primaryButton: n.empty_state_primary_button,
273
273
  secondaryButton: t ? void 0 : n.empty_state_secondary_button,
@@ -294,7 +294,7 @@ const ht = ({
294
294
  shouldShowZeroState: a,
295
295
  unavailableWidth: n = 24
296
296
  }) => {
297
- const { onEvent: r } = X(), { setSelectedBudget: c } = w(), { isLoadingCategoryTotals: y } = j(), { isInitialized: h } = ee(), { accounts: m } = D(), { availableWidth: g } = ze(), { isMobile: f } = me(), [_, u] = l.useState(!1), C = l.useMemo(() => g - n, [g]), B = (x) => {
297
+ const { onEvent: r } = X(), { setSelectedBudget: c } = w(), { isLoadingCategoryTotals: y } = j(), { isInitialized: p } = ee(), { accounts: h } = D(), { availableWidth: m } = ze(), { isMobile: C } = me(), [b, u] = l.useState(!1), B = l.useMemo(() => m - n, [m]), f = (x) => {
298
298
  c(x), r(k.BUDGETS_CLICK_BUDGET_CATEGORY, {
299
299
  budget_category: x.category.name,
300
300
  click_type: "bubble"
@@ -302,8 +302,8 @@ const ht = ({
302
302
  }, A = () => {
303
303
  u(!0), r(k.ACCOUNTS_CLICK_CONNECT);
304
304
  };
305
- return y ? /* @__PURE__ */ e(b, { alignItems: "center", height: o, justifyContent: "center", width: Math.abs(C), children: /* @__PURE__ */ e(P, {}) }) : /* @__PURE__ */ d(W, { ml: a || f ? 0 : 24, sx: { alignSelf: "center" }, children: [
306
- a || !h ? /* @__PURE__ */ e(
305
+ return y ? /* @__PURE__ */ e(_, { alignItems: "center", height: o, justifyContent: "center", width: Math.abs(B), children: /* @__PURE__ */ e(P, {}) }) : /* @__PURE__ */ d(W, { ml: a || C ? 0 : 24, sx: { alignSelf: "center" }, children: [
306
+ a || !p ? /* @__PURE__ */ e(
307
307
  bt,
308
308
  {
309
309
  createBudgetOnClick: t,
@@ -315,36 +315,36 @@ const ht = ({
315
315
  {
316
316
  height: o,
317
317
  isDraggable: i,
318
- onClick: B,
319
- width: C
318
+ onClick: f,
319
+ width: B
320
320
  }
321
321
  ),
322
322
  /* @__PURE__ */ e(
323
323
  Ne,
324
324
  {
325
325
  onClose: () => u(!1),
326
- showConnectionsWidget: _,
327
- title: m.manage_connections
326
+ showConnectionsWidget: b,
327
+ title: h.manage_connections
328
328
  }
329
329
  )
330
330
  ] });
331
331
  }
332
332
  ), yt = I(() => {
333
333
  const { budgets: t } = D(), { totalBudgeted: o } = w(), { incomeTotal: i } = te(), s = i - o;
334
- return /* @__PURE__ */ d(b, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
335
- /* @__PURE__ */ d(b, { alignItems: "center", children: [
336
- /* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: T(i, "0,0") }),
337
- /* @__PURE__ */ e(p, { color: "secondary", variant: "Small", children: t.projected_income })
334
+ return /* @__PURE__ */ d(_, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
335
+ /* @__PURE__ */ d(_, { alignItems: "center", children: [
336
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(i, "0,0") }),
337
+ /* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.projected_income })
338
338
  ] }),
339
- /* @__PURE__ */ e(p, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
340
- /* @__PURE__ */ d(b, { alignItems: "center", children: [
341
- /* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: T(o, "0,0") }),
342
- /* @__PURE__ */ e(p, { color: "secondary", variant: "Small", children: t.budgeted })
339
+ /* @__PURE__ */ e(g, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
340
+ /* @__PURE__ */ d(_, { alignItems: "center", children: [
341
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(o, "0,0") }),
342
+ /* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.budgeted })
343
343
  ] }),
344
- /* @__PURE__ */ e(p, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
345
- /* @__PURE__ */ d(b, { alignItems: "center", children: [
346
- /* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: T(s, "0,0") }),
347
- /* @__PURE__ */ e(p, { color: "secondary", variant: "Small", children: t.remaining })
344
+ /* @__PURE__ */ e(g, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
345
+ /* @__PURE__ */ d(_, { alignItems: "center", children: [
346
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(s, "0,0") }),
347
+ /* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.remaining })
348
348
  ] })
349
349
  ] });
350
350
  }), ft = I(
@@ -362,26 +362,26 @@ const ht = ({
362
362
  ] }, t.guid);
363
363
  }
364
364
  ), Ct = ({ onRecalculateBudgets: t }) => {
365
- const { budgets: o, common: i } = D(), { spendCategories: s } = j(), { recalculateBudgets: a, setAlert: n } = w(), [r, c] = l.useState(!1), y = s.filter((m) => m.totalAverageAmount > 0), h = async () => {
365
+ const { budgets: o, common: i } = D(), { spendCategories: s } = j(), { recalculateBudgets: a, setAlert: n } = w(), [r, c] = l.useState(!1), y = s.filter((h) => h.totalAverageAmount > 0), p = async () => {
366
366
  await a(y), c(!1), n(o.alert_recalculated_budgets), t?.();
367
367
  };
368
368
  return /* @__PURE__ */ d(l.Fragment, { children: [
369
369
  /* @__PURE__ */ e(Ae, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: o.recalculate_button }),
370
- /* @__PURE__ */ e(p, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: o.recalculate_help }),
370
+ /* @__PURE__ */ e(g, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: o.recalculate_help }),
371
371
  /* @__PURE__ */ e(
372
372
  M,
373
373
  {
374
374
  ariaLabelClose: i.close_aria,
375
375
  isOpen: r,
376
376
  onClose: () => c(!1),
377
- onPrimaryAction: h,
377
+ onPrimaryAction: p,
378
378
  title: o.recalculate_title,
379
- children: /* @__PURE__ */ d(b, { children: [
380
- /* @__PURE__ */ d(b, { mx: 24, my: 16, children: [
381
- /* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
382
- /* @__PURE__ */ e(p, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
379
+ children: /* @__PURE__ */ d(_, { children: [
380
+ /* @__PURE__ */ d(_, { mx: 24, my: 16, children: [
381
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
382
+ /* @__PURE__ */ e(g, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
383
383
  ] }),
384
- /* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: y.map((m) => /* @__PURE__ */ e(ft, { category: m }, m.guid)) }) })
384
+ /* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: y.map((h) => /* @__PURE__ */ e(ft, { category: h }, h.guid)) }) })
385
385
  ] })
386
386
  }
387
387
  )
@@ -392,13 +392,13 @@ const ht = ({
392
392
  onAmountChanged: i
393
393
  }) => {
394
394
  const { budgets: s } = D(), { totalBudgeted: a } = w(), { incomeTotal: n } = te(), r = n - a;
395
- return /* @__PURE__ */ d(b, { gap: 16, children: [
396
- /* @__PURE__ */ d(b, { children: [
397
- /* @__PURE__ */ e(p, { children: L(
395
+ return /* @__PURE__ */ d(_, { gap: 16, children: [
396
+ /* @__PURE__ */ d(_, { children: [
397
+ /* @__PURE__ */ e(g, { children: L(
398
398
  s.add_description_top,
399
399
  T(r, "0,0")
400
400
  ) }),
401
- /* @__PURE__ */ e(p, { children: L(s.add_description_bottom, o) })
401
+ /* @__PURE__ */ e(g, { children: L(s.add_description_bottom, o) })
402
402
  ] }),
403
403
  /* @__PURE__ */ e(
404
404
  He,
@@ -445,7 +445,7 @@ const ht = ({
445
445
  const { budgets: o } = D(), { addBudget: i, setAlert: s, unbudgetedCategories: a } = w(), n = async (r, c) => {
446
446
  await i(r, c), s(L(o.alert_budget_created, r.name));
447
447
  };
448
- return /* @__PURE__ */ d(b, { children: [
448
+ return /* @__PURE__ */ d(_, { children: [
449
449
  /* @__PURE__ */ e(yt, {}),
450
450
  /* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: a.map((r) => /* @__PURE__ */ e(
451
451
  Bt,
@@ -458,27 +458,27 @@ const ht = ({
458
458
  /* @__PURE__ */ e(Ct, { onRecalculateBudgets: t })
459
459
  ] });
460
460
  }), St = (t) => {
461
- const o = Q(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = w(), { budgets: c, common: y } = D(), { isCopyLoaded: h, isInitialized: m, selectedAccounts: g } = ee(), { reloadCategoryTotals: f } = j(), _ = Pe(), u = s.length === 0, [C, B] = l.useState(!1), A = () => {
462
- B(!0), i(k.BUDGETS_CLICK_ADD);
461
+ const o = Q(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = w(), { budgets: c, common: y } = D(), { isCopyLoaded: p, isInitialized: h, selectedAccounts: m } = ee(), { reloadCategoryTotals: C } = j(), b = Pe(), u = s.length === 0, [B, f] = l.useState(!1), A = () => {
462
+ f(!0), i(k.BUDGETS_CLICK_ADD);
463
463
  }, x = () => {
464
- B(!1);
464
+ f(!1);
465
465
  };
466
466
  return l.useEffect(() => {
467
467
  r(o);
468
468
  }, [o]), l.useEffect(() => {
469
- m && !a && f(g, J(/* @__PURE__ */ new Date()), de(/* @__PURE__ */ new Date())).then(
469
+ h && !a && C(m, J(/* @__PURE__ */ new Date()), de(/* @__PURE__ */ new Date())).then(
470
470
  () => {
471
471
  n().finally();
472
472
  }
473
473
  );
474
- }, [m, g]), h ? /* @__PURE__ */ d(
474
+ }, [h, m]), p ? /* @__PURE__ */ d(
475
475
  Xe,
476
476
  {
477
477
  primaryCtaLabel: u ? c.get_started_cta : c.details_cta,
478
478
  title: c.budgets_title,
479
479
  ...t,
480
480
  children: [
481
- a ? /* @__PURE__ */ d(b, { height: 450, mt: 32, children: [
481
+ a ? /* @__PURE__ */ d(_, { height: 450, mt: 32, children: [
482
482
  /* @__PURE__ */ e(
483
483
  we,
484
484
  {
@@ -489,16 +489,16 @@ const ht = ({
489
489
  }
490
490
  ),
491
491
  !u && /* @__PURE__ */ d(W, { ml: 16, children: [
492
- /* @__PURE__ */ e(p, { bold: !0, color: _ < 0 ? "error.main" : "success.main", children: T(Math.abs(_), "0,0") }),
493
- /* @__PURE__ */ e(p, { children: _ < 0 ? c.overspent_in_budgets : c.left_in_budgets })
492
+ /* @__PURE__ */ e(g, { bold: !0, color: b < 0 ? "error.main" : "success.main", children: T(Math.abs(b), "0,0") }),
493
+ /* @__PURE__ */ e(g, { children: b < 0 ? c.overspent_in_budgets : c.left_in_budgets })
494
494
  ] })
495
495
  ] }) : /* @__PURE__ */ e(P, {}),
496
496
  /* @__PURE__ */ e(
497
497
  M,
498
498
  {
499
499
  ariaLabelClose: y.close_aria,
500
- isOpen: C,
501
- onClose: () => B(!1),
500
+ isOpen: B,
501
+ onClose: () => f(!1),
502
502
  title: c.add_new_title,
503
503
  children: /* @__PURE__ */ e(De, { onRecalculateBudgets: x })
504
504
  }
@@ -520,18 +520,18 @@ const ht = ({
520
520
  percentage: `${n}%`
521
521
  }
522
522
  ];
523
- return /* @__PURE__ */ e(ge, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ d(b, { alignItems: "center", gap: 16, children: [
523
+ return /* @__PURE__ */ e(ge, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ d(_, { alignItems: "center", gap: 16, children: [
524
524
  /* @__PURE__ */ e(H, { categoryGuid: a, size: 56 }),
525
525
  /* @__PURE__ */ e(Ge, { children: `${T(r, "0,0")} / ${T(o, "0,0")}` }),
526
- /* @__PURE__ */ e(p, { bold: !0, variant: "XSmall", children: s }),
526
+ /* @__PURE__ */ e(g, { bold: !0, variant: "XSmall", children: s }),
527
527
  /* @__PURE__ */ e(ue, { data: c, height: 10 })
528
528
  ] }) }) });
529
529
  }, At = I(() => {
530
530
  const { budgets: t } = D();
531
- return /* @__PURE__ */ d(b, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
531
+ return /* @__PURE__ */ d(_, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
532
532
  /* @__PURE__ */ e($, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
533
- /* @__PURE__ */ e(p, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
534
- /* @__PURE__ */ e(p, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
533
+ /* @__PURE__ */ e(g, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
534
+ /* @__PURE__ */ e(g, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
535
535
  ] });
536
536
  }), xt = I(({ budget: t }) => {
537
537
  const {
@@ -546,8 +546,8 @@ const ht = ({
546
546
  /* @__PURE__ */ e(
547
547
  Z,
548
548
  {
549
- primary: /* @__PURE__ */ e(b, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: t.category.name }) }),
550
- secondary: /* @__PURE__ */ e(b, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(p, { fontWeight: 400, variant: "Body", children: `
549
+ primary: /* @__PURE__ */ e(_, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: t.category.name }) }),
550
+ secondary: /* @__PURE__ */ e(_, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(g, { fontWeight: 400, variant: "Body", children: `
551
551
  ${T(n, "0,0")} /
552
552
  ${T(o, "0,0")}
553
553
  ` }) })
@@ -555,23 +555,23 @@ const ht = ({
555
555
  )
556
556
  ] }) });
557
557
  }), vt = I(({ category: t, parentBudget: o }) => {
558
- const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: n } = Qe(), { addBudget: r } = w(), [c, y] = l.useState(!1), [h, m] = l.useState(!1), [g, f] = l.useState(""), [_, u] = l.useState(void 0);
558
+ const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: n } = Qe(), { addBudget: r } = w(), [c, y] = l.useState(!1), [p, h] = l.useState(!1), [m, C] = l.useState(""), [b, u] = l.useState(void 0);
559
559
  l.useEffect(() => {
560
560
  n((A) => {
561
561
  const x = t.subCategories.find((v) => v.guid === A);
562
- x && (u(x), f(`${x.currentAmount === 0 ? "" : x.currentAmount}`), m(!0));
562
+ x && (u(x), C(`${x.currentAmount === 0 ? "" : x.currentAmount}`), h(!0));
563
563
  });
564
564
  }, []);
565
- const C = () => {
565
+ const B = () => {
566
566
  a(t.guid), y(!0);
567
- }, B = async () => {
568
- _ && Number(g) > 0 && (await r(_, Number(g), o.guid), m(!1), y(!1), u(void 0));
567
+ }, f = async () => {
568
+ b && Number(m) > 0 && (await r(b, Number(m), o.guid), h(!1), y(!1), u(void 0));
569
569
  };
570
570
  return /* @__PURE__ */ d(W, { children: [
571
- /* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: C, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ d(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
572
- /* @__PURE__ */ d(b, { alignItems: "center", direction: "row", gap: 8, children: [
571
+ /* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: B, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ d(_, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
572
+ /* @__PURE__ */ d(_, { alignItems: "center", direction: "row", gap: 8, children: [
573
573
  /* @__PURE__ */ e($, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
574
- /* @__PURE__ */ e(p, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
574
+ /* @__PURE__ */ e(g, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
575
575
  ] }),
576
576
  /* @__PURE__ */ e($, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
577
577
  ] }) }) }) }),
@@ -590,40 +590,40 @@ const ht = ({
590
590
  N,
591
591
  {
592
592
  copy: { close_aria: s.close_aria, title: i.add_title },
593
- disablePrimaryButton: Number(g) <= 0,
594
- isOpen: h,
595
- onClose: () => m(!1),
596
- onPrimaryAction: B,
593
+ disablePrimaryButton: Number(m) <= 0,
594
+ isOpen: p,
595
+ onClose: () => h(!1),
596
+ onPrimaryAction: f,
597
597
  primaryText: i.add_save_button,
598
598
  children: /* @__PURE__ */ e(
599
599
  re,
600
600
  {
601
- amount: g,
602
- categoryName: _?.name || "",
603
- onAmountChanged: f
601
+ amount: m,
602
+ categoryName: b?.name || "",
603
+ onAmountChanged: C
604
604
  }
605
605
  )
606
606
  }
607
607
  )
608
608
  ] });
609
609
  }), Tt = I(({ budget: t }) => {
610
- const { category: o, subBudgets: i } = t, { budgets: s, common: a } = D(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: y } = w(), { filter: h, setFilter: m } = ne(), [g, f] = l.useState(!1), [_, u] = l.useState(!1), [C, B] = l.useState("");
610
+ const { category: o, subBudgets: i } = t, { budgets: s, common: a } = D(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: y } = w(), { filter: p, setFilter: h } = ne(), [m, C] = l.useState(!1), [b, u] = l.useState(!1), [B, f] = l.useState("");
611
611
  l.useEffect(() => {
612
- r && (B(`${r.amount}`), m({
613
- ...h,
612
+ r && (f(`${r.amount}`), h({
613
+ ...p,
614
614
  custom: (S) => S.category_guid === r.category_guid
615
615
  }));
616
616
  }, [r]);
617
617
  const A = async () => {
618
618
  r && await y({
619
619
  ...r,
620
- amount: Number(C)
620
+ amount: Number(B)
621
621
  });
622
622
  }, x = async () => {
623
623
  r && await n(r.guid), u(!1), v();
624
624
  }, v = () => {
625
- m({
626
- ...h,
625
+ h({
626
+ ...p,
627
627
  custom: (S) => S.category_guid === t.category_guid || S.top_level_category_guid === t.category_guid
628
628
  }), c(void 0);
629
629
  };
@@ -641,12 +641,12 @@ const ht = ({
641
641
  ariaLabelClose: a.close_aria,
642
642
  isOpen: !!r,
643
643
  onClose: v,
644
- onPrimaryAction: () => f(!0),
644
+ onPrimaryAction: () => C(!0),
645
645
  onSecondaryAction: () => u(!0),
646
646
  primaryText: s.details_edit_button,
647
647
  secondaryText: s.details_delete_button,
648
648
  title: s.details_title,
649
- children: r && /* @__PURE__ */ d(b, { gap: 24, children: [
649
+ children: r && /* @__PURE__ */ d(_, { gap: 24, children: [
650
650
  /* @__PURE__ */ e(Ie, { budget: r }),
651
651
  /* @__PURE__ */ e(xe, { height: "100%" })
652
652
  ] })
@@ -657,17 +657,17 @@ const ht = ({
657
657
  N,
658
658
  {
659
659
  copy: { close_aria: a.close_aria, title: s.details_edit_title },
660
- disablePrimaryButton: Number(C) <= 0,
661
- isOpen: g,
662
- onClose: () => f(!1),
660
+ disablePrimaryButton: Number(B) <= 0,
661
+ isOpen: m,
662
+ onClose: () => C(!1),
663
663
  onPrimaryAction: A,
664
664
  primaryText: s.edit_save_button,
665
665
  children: /* @__PURE__ */ e(
666
666
  re,
667
667
  {
668
- amount: C,
668
+ amount: B,
669
669
  categoryName: r.category.name,
670
- onAmountChanged: B
670
+ onAmountChanged: f
671
671
  }
672
672
  )
673
673
  }
@@ -676,40 +676,40 @@ const ht = ({
676
676
  N,
677
677
  {
678
678
  copy: { close_aria: a.close_aria, title: s.delete_title },
679
- isOpen: _,
679
+ isOpen: b,
680
680
  onClose: () => u(!1),
681
681
  onPrimaryAction: x,
682
682
  primaryColor: "error",
683
683
  primaryText: "Delete",
684
684
  secondaryColor: "secondary",
685
- children: /* @__PURE__ */ e(p, { variant: "Paragraph", children: L(s.delete_description, r.category.name) })
685
+ children: /* @__PURE__ */ e(g, { variant: "Paragraph", children: L(s.delete_description, r.category.name) })
686
686
  }
687
687
  )
688
688
  ] })
689
689
  ] });
690
690
  }), wt = I(({ budget: t }) => {
691
- const { is_mobile_webview: o } = Ue(), { setAlert: i } = w(), { budgets: s, common: a, transactions: n } = D(), { isDesktop: r } = me(), {
692
- sortedTransactions: c,
693
- sortedTransactionsWithSplits: y,
694
- tags: h
695
- } = ne(), [m, g] = l.useState(0), [f, _] = l.useState(""), u = l.useMemo(
696
- () => c.find((x) => x.guid === f),
697
- [f, c]
698
- ), C = (x, v) => {
699
- g(v);
700
- }, B = () => {
701
- qe(y, h), i(s.alert_csv_downloaded);
702
- }, A = c.length > 0 && !o && r;
703
- return /* @__PURE__ */ d(b, { gap: 24, children: [
691
+ const { is_mobile_webview: o } = Ue(), { setAlert: i } = w(), { budgets: s, common: a, transactions: n } = D(), { isDesktop: r, isSmallTablet: c, isTablet: y } = me(), {
692
+ sortedTransactions: p,
693
+ sortedTransactionsWithSplits: h,
694
+ tags: m
695
+ } = ne(), [C, b] = l.useState(0), [u, B] = l.useState(""), f = l.useMemo(
696
+ () => p.find((S) => S.guid === u),
697
+ [u, p]
698
+ ), A = (S, O) => {
699
+ b(O);
700
+ }, x = () => {
701
+ qe(h, m), i(s.alert_csv_downloaded);
702
+ }, v = p.length > 0 && !o && (r || y && !c);
703
+ return /* @__PURE__ */ d(_, { gap: 24, children: [
704
704
  /* @__PURE__ */ e(Ie, { budget: t }),
705
- /* @__PURE__ */ d(b, { children: [
705
+ /* @__PURE__ */ d(_, { children: [
706
706
  /* @__PURE__ */ d(
707
707
  Ze,
708
708
  {
709
- onChange: C,
709
+ onChange: A,
710
710
  sx: { width: "100%" },
711
711
  textColor: "primary",
712
- value: m,
712
+ value: C,
713
713
  variant: "fullWidth",
714
714
  children: [
715
715
  /* @__PURE__ */ e(be, { label: s.details_transactions_tab }),
@@ -717,27 +717,27 @@ const ht = ({
717
717
  ]
718
718
  }
719
719
  ),
720
- m === 0 && /* @__PURE__ */ d(b, { children: [
721
- A && /* @__PURE__ */ e(b, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
720
+ C === 0 && /* @__PURE__ */ d(_, { children: [
721
+ v && /* @__PURE__ */ e(_, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
722
722
  Ae,
723
723
  {
724
- onClick: B,
724
+ onClick: x,
725
725
  startIcon: /* @__PURE__ */ e($, { name: "ios_share" }),
726
726
  variant: "text",
727
727
  children: n.export_csv_btn
728
728
  }
729
729
  ) }),
730
- /* @__PURE__ */ e(xe, { height: "100%", onClick: _ })
730
+ /* @__PURE__ */ e(xe, { height: "100%", onClick: B })
731
731
  ] }),
732
- m === 1 && /* @__PURE__ */ e(Tt, { budget: t }),
732
+ C === 1 && /* @__PURE__ */ e(Tt, { budget: t }),
733
733
  /* @__PURE__ */ e(
734
734
  M,
735
735
  {
736
736
  ariaLabelClose: a.close_aria,
737
- isOpen: !!u,
738
- onClose: () => _(""),
737
+ isOpen: !!f,
738
+ onClose: () => B(""),
739
739
  title: s.details_transaction_drawer,
740
- children: u && /* @__PURE__ */ e(Je, { transaction: u })
740
+ children: f && /* @__PURE__ */ e(Je, { transaction: f })
741
741
  }
742
742
  )
743
743
  ] })
@@ -750,10 +750,10 @@ const ht = ({
750
750
  selectedSubBudget: r,
751
751
  setAlert: c,
752
752
  setSelectedBudget: y,
753
- updateBudget: h
754
- } = w(), { setFilter: m } = ne(), [g, f] = l.useState(!1), [_, u] = l.useState(!1), [C, B] = l.useState(!1), [A, x] = l.useState("");
753
+ updateBudget: p
754
+ } = w(), { setFilter: h } = ne(), [m, C] = l.useState(!1), [b, u] = l.useState(!1), [B, f] = l.useState(!1), [A, x] = l.useState("");
755
755
  l.useEffect(() => {
756
- n && !r && (x(`${n.amount}`), f(!0), m({
756
+ n && !r && (x(`${n.amount}`), C(!0), h({
757
757
  accounts: t,
758
758
  dateRange: s,
759
759
  custom: (R) => R.category_guid === n.category_guid || R.top_level_category_guid === n.category_guid,
@@ -761,15 +761,15 @@ const ht = ({
761
761
  }));
762
762
  }, [n]);
763
763
  const v = async () => {
764
- n && (await h({
764
+ n && (await p({
765
765
  ...n,
766
766
  amount: Number(A),
767
767
  percentage: n.category.totalAmount / Number(A) * 100
768
768
  }), c(L(o.alert_budget_updated, n.category.name)));
769
769
  }, S = async () => {
770
- n && (await a(n.guid), c(L(o.alert_budget_deleted, n.category.name))), B(!1), O();
770
+ n && (await a(n.guid), c(L(o.alert_budget_deleted, n.category.name))), f(!1), O();
771
771
  }, O = () => {
772
- f(!1), setTimeout(() => {
772
+ C(!1), setTimeout(() => {
773
773
  y(void 0);
774
774
  }, 250);
775
775
  };
@@ -779,10 +779,10 @@ const ht = ({
779
779
  M,
780
780
  {
781
781
  ariaLabelClose: i.close_aria,
782
- isOpen: g,
782
+ isOpen: m,
783
783
  onClose: O,
784
784
  onPrimaryAction: () => u(!0),
785
- onSecondaryAction: () => B(!0),
785
+ onSecondaryAction: () => f(!0),
786
786
  primaryText: o.details_edit_button,
787
787
  secondaryColor: "error",
788
788
  secondaryText: o.details_delete_button,
@@ -795,7 +795,7 @@ const ht = ({
795
795
  {
796
796
  copy: { close_aria: i.close_aria, title: o.details_edit_title },
797
797
  disablePrimaryButton: Number(A) <= 0,
798
- isOpen: _,
798
+ isOpen: b,
799
799
  onClose: () => u(!1),
800
800
  onPrimaryAction: v,
801
801
  primaryText: o.edit_save_button,
@@ -813,13 +813,13 @@ const ht = ({
813
813
  N,
814
814
  {
815
815
  copy: { close_aria: i.close_aria, title: o.delete_title },
816
- isOpen: C,
817
- onClose: () => B(!1),
816
+ isOpen: B,
817
+ onClose: () => f(!1),
818
818
  onPrimaryAction: S,
819
819
  primaryColor: "error",
820
820
  primaryText: o.details_delete_button,
821
821
  secondaryColor: "secondary",
822
- children: /* @__PURE__ */ e(p, { variant: "Paragraph", children: L(o.delete_description, n.category.name) })
822
+ children: /* @__PURE__ */ e(g, { variant: "Paragraph", children: L(o.delete_description, n.category.name) })
823
823
  }
824
824
  )
825
825
  ] });
@@ -831,23 +831,23 @@ const ht = ({
831
831
  description: r,
832
832
  percentage: c,
833
833
  subBudgets: y,
834
- transaction_total: h
834
+ transaction_total: p
835
835
  } = t;
836
836
  return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ d(Y, { onClick: () => o?.(t), children: [
837
837
  /* @__PURE__ */ e(ae, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(ve, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: n, variant: "basic" }) }) }),
838
838
  /* @__PURE__ */ e(
839
839
  Z,
840
840
  {
841
- primary: /* @__PURE__ */ d(b, { component: "span", direction: "row", justifyContent: "space-between", children: [
842
- /* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: t.category.name }),
843
- /* @__PURE__ */ e(p, { fontWeight: 400, variant: "Body", children: `
844
- ${T(h, "0,0")} /
841
+ primary: /* @__PURE__ */ d(_, { component: "span", direction: "row", justifyContent: "space-between", children: [
842
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: t.category.name }),
843
+ /* @__PURE__ */ e(g, { fontWeight: 400, variant: "Body", children: `
844
+ ${T(p, "0,0")} /
845
845
  ${T(i, "0,0")}
846
846
  ` })
847
847
  ] }),
848
- secondary: /* @__PURE__ */ d(b, { component: "span", direction: "row", justifyContent: "space-between", children: [
849
- /* @__PURE__ */ e(p, { variant: "XSmall", children: `${y.length} Sub-budgets` }),
850
- /* @__PURE__ */ e(p, { bold: c > 100, color: a, variant: "XSmall", children: r })
848
+ secondary: /* @__PURE__ */ d(_, { component: "span", direction: "row", justifyContent: "space-between", children: [
849
+ /* @__PURE__ */ e(g, { variant: "XSmall", children: `${y.length} Sub-budgets` }),
850
+ /* @__PURE__ */ e(g, { bold: c > 100, color: a, variant: "XSmall", children: r })
851
851
  ] })
852
852
  }
853
853
  )
@@ -867,9 +867,9 @@ const ht = ({
867
867
  ] }, n.guid)) }) })
868
868
  ] });
869
869
  }), Ot = I(() => {
870
- const t = Q(), { onEvent: o } = X(), { visibleAccounts: i } = Se(), { budgets: s, common: a, recurring: n } = D(), { incomeCategories: r, spendCategories: c } = j(), { detailedBudgets: y, totalBudgeted: h } = w(), { incomeTotal: m } = te(), { setFilter: g } = ne(), [f, _] = l.useState(!1), [u, C] = l.useMemo(() => {
870
+ const t = Q(), { onEvent: o } = X(), { visibleAccounts: i } = Se(), { budgets: s, common: a, recurring: n } = D(), { incomeCategories: r, spendCategories: c } = j(), { detailedBudgets: y, totalBudgeted: p } = w(), { incomeTotal: h } = te(), { setFilter: m } = ne(), [C, b] = l.useState(!1), [u, B] = l.useMemo(() => {
871
871
  const v = c.reduce((z, se) => z + se.totalAmount, 0);
872
- let S = v / h;
872
+ let S = v / p;
873
873
  S > 1 && (S = 1);
874
874
  let O = t.palette.success.main;
875
875
  S > 0.8 && S < 1 ? O = t.palette.warning.main : S >= 1 && (O = t.palette.error.main);
@@ -880,11 +880,11 @@ const ht = ({
880
880
  }
881
881
  ];
882
882
  return [v, R];
883
- }, [y, c]), [B, A] = l.useMemo(() => {
883
+ }, [y, c]), [f, A] = l.useMemo(() => {
884
884
  const v = Math.abs(
885
885
  r.reduce((R, z) => R + z.totalAmount, 0)
886
886
  );
887
- let S = v / m;
887
+ let S = v / h;
888
888
  S > 1 && (S = 1);
889
889
  const O = [
890
890
  {
@@ -893,30 +893,30 @@ const ht = ({
893
893
  }
894
894
  ];
895
895
  return [v, O];
896
- }, [r, m]), x = () => {
897
- g({
896
+ }, [r, h]), x = () => {
897
+ m({
898
898
  accounts: i.map((v) => v.guid),
899
899
  dateRange: {
900
900
  start: tt(/* @__PURE__ */ new Date(), 90),
901
901
  end: /* @__PURE__ */ new Date()
902
902
  }
903
- }), _(!0), o(k.BUDGETS_CLICK_EDIT_INCOME);
903
+ }), b(!0), o(k.BUDGETS_CLICK_EDIT_INCOME);
904
904
  };
905
905
  return /* @__PURE__ */ d(ge, { elevation: 2, sx: { overflow: "visible" }, children: [
906
906
  /* @__PURE__ */ e(Te, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Be, { children: s.overview_title }) }),
907
- /* @__PURE__ */ e(pe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ d(b, { gap: 24, children: [
908
- /* @__PURE__ */ d(b, { gap: 8, children: [
909
- /* @__PURE__ */ e(p, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
910
- /* @__PURE__ */ e(ue, { data: C, height: 16 }),
911
- /* @__PURE__ */ e(p, { variant: "Small", children: L(
907
+ /* @__PURE__ */ e(pe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ d(_, { gap: 24, children: [
908
+ /* @__PURE__ */ d(_, { gap: 8, children: [
909
+ /* @__PURE__ */ e(g, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
910
+ /* @__PURE__ */ e(ue, { data: B, height: 16 }),
911
+ /* @__PURE__ */ e(g, { variant: "Small", children: L(
912
912
  s.spending_description,
913
913
  T(u, "0,0"),
914
- T(h, "0,0")
914
+ T(p, "0,0")
915
915
  ) })
916
916
  ] }),
917
- /* @__PURE__ */ d(b, { gap: 8, children: [
918
- /* @__PURE__ */ d(b, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
919
- /* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: s.income_title }),
917
+ /* @__PURE__ */ d(_, { gap: 8, children: [
918
+ /* @__PURE__ */ d(_, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
919
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: s.income_title }),
920
920
  /* @__PURE__ */ e(
921
921
  nt,
922
922
  {
@@ -928,10 +928,10 @@ const ht = ({
928
928
  )
929
929
  ] }),
930
930
  /* @__PURE__ */ e(ue, { data: A, height: 16 }),
931
- /* @__PURE__ */ e(p, { variant: "Small", children: L(
931
+ /* @__PURE__ */ e(g, { variant: "Small", children: L(
932
932
  s.income_description,
933
- T(B, "0,0"),
934
- T(m, "0,0")
933
+ T(f, "0,0"),
934
+ T(h, "0,0")
935
935
  ) })
936
936
  ] })
937
937
  ] }) }),
@@ -939,43 +939,43 @@ const ht = ({
939
939
  M,
940
940
  {
941
941
  ariaLabelClose: a.close_aria,
942
- isOpen: f,
943
- onClose: () => _(!1),
942
+ isOpen: C,
943
+ onClose: () => b(!1),
944
944
  title: n.manage_income,
945
- children: /* @__PURE__ */ d(b, { sx: { height: "100%" }, children: [
946
- /* @__PURE__ */ e(p, { bold: !0, sx: { mb: 4, mt: 12, mx: 24 }, variant: "Small", children: s.income_title }),
945
+ children: /* @__PURE__ */ d(_, { sx: { height: "100%" }, children: [
946
+ /* @__PURE__ */ e(g, { bold: !0, sx: { mb: 4, mt: 12, mx: 24 }, variant: "Small", children: s.income_title }),
947
947
  /* @__PURE__ */ e(ot, { forOverview: !0 })
948
948
  ] })
949
949
  }
950
950
  )
951
951
  ] });
952
952
  }), Ce = 480, Dn = I(({ onBackClick: t, sx: o }) => {
953
- const i = Q(), { onEvent: s } = X(), { visibleAccounts: a } = Se(), { budgets: n, common: r } = D(), { isCopyLoaded: c, isInitialized: y, selectedAccounts: h, setDisplayedDate: m, setSelectedAccounts: g } = ee(), {
954
- alert: f,
955
- dateRange: _,
953
+ const i = Q(), { onEvent: s } = X(), { visibleAccounts: a } = Se(), { budgets: n, common: r } = D(), { isCopyLoaded: c, isInitialized: y, selectedAccounts: p, setDisplayedDate: h, setSelectedAccounts: m } = ee(), {
954
+ alert: C,
955
+ dateRange: b,
956
956
  isDataLoaded: u,
957
- loadBudgetData: C,
958
- setDateRange: B,
957
+ loadBudgetData: B,
958
+ setDateRange: f,
959
959
  setAlert: A,
960
960
  setTheme: x,
961
961
  detailedBudgets: v
962
962
  } = w(), { loadRepeatingTransactions: S, setDateRange: O } = te(), { reloadCategoryTotals: R } = j(), { isSmallTablet: z, isMobile: se, isSmallMobile: Ee } = me(), U = z || se || Ee, [Oe, ie] = l.useState(!1);
963
- l.useEffect(() => (x(i), g(a), B({ start: J(q()), end: de(q()) }), s(k.BUDGETS_VIEW), () => {
964
- B({ start: J(q()), end: de(q()) });
963
+ l.useEffect(() => (x(i), m(a), f({ start: J(q()), end: de(q()) }), s(k.BUDGETS_VIEW), () => {
964
+ f({ start: J(q()), end: de(q()) });
965
965
  }), []), l.useEffect(() => {
966
- g(a);
966
+ m(a);
967
967
  }, [a]), l.useEffect(() => {
968
- y && (m(_.start, _.end), R(h, _.start, _.end).finally(), O(_), u || (S().finally(), C().finally()));
969
- }, [y, h, _]);
968
+ y && (h(b.start, b.end), R(p, b.start, b.end).finally(), O(b), u || (S().finally(), B().finally()));
969
+ }, [y, p, b]);
970
970
  const Le = (_e) => {
971
- B({ start: _e[0] || /* @__PURE__ */ new Date(), end: _e[1] || /* @__PURE__ */ new Date() });
971
+ f({ start: _e[0] || /* @__PURE__ */ new Date(), end: _e[1] || /* @__PURE__ */ new Date() });
972
972
  }, Re = () => {
973
973
  s(k.BUDGETS_CLICK_FILTER);
974
974
  }, he = () => {
975
975
  ie(!0), s(k.BUDGETS_CLICK_ADD);
976
976
  }, ke = () => {
977
977
  ie(!1);
978
- }, Me = Ke(_.end, J(/* @__PURE__ */ new Date()));
978
+ }, Me = Ke(b.end, J(/* @__PURE__ */ new Date()));
979
979
  return !c || !y || !u ? /* @__PURE__ */ e(P, {}) : /* @__PURE__ */ d(
980
980
  Fe,
981
981
  {
@@ -999,14 +999,14 @@ const ht = ({
999
999
  children: [
1000
1000
  (!y || !u) && /* @__PURE__ */ e(P, {}),
1001
1001
  y && u && /* @__PURE__ */ d(
1002
- b,
1002
+ _,
1003
1003
  {
1004
1004
  direction: U ? "column" : "row",
1005
1005
  height: "100%",
1006
1006
  sx: { justifyContent: "center" },
1007
1007
  width: "100%",
1008
1008
  children: [
1009
- /* @__PURE__ */ e(b, { height: U ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1009
+ /* @__PURE__ */ e(_, { height: U ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1010
1010
  we,
1011
1011
  {
1012
1012
  createBudgetOnClick: he,
@@ -1017,7 +1017,7 @@ const ht = ({
1017
1017
  }
1018
1018
  ) }),
1019
1019
  v.length !== 0 && /* @__PURE__ */ d(
1020
- b,
1020
+ _,
1021
1021
  {
1022
1022
  gap: 24,
1023
1023
  height: "100%",
@@ -1051,7 +1051,7 @@ const ht = ({
1051
1051
  onClose: () => {
1052
1052
  A("");
1053
1053
  },
1054
- open: !!f,
1054
+ open: !!C,
1055
1055
  children: /* @__PURE__ */ e(
1056
1056
  Ve,
1057
1057
  {
@@ -1060,7 +1060,7 @@ const ht = ({
1060
1060
  },
1061
1061
  severity: "success",
1062
1062
  variant: "filled",
1063
- children: f
1063
+ children: C
1064
1064
  }
1065
1065
  )
1066
1066
  }