@mx-cartographer/experiences 7.0.52-alpha.sms1 → 7.0.53-alpha.mega1

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