@mx-cartographer/experiences 7.0.52-alpha.mega5 → 7.0.52-alpha.mega6

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