@mx-cartographer/experiences 7.0.52-alpha.mega1 → 7.0.52-alpha.mega3

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