@mx-cartographer/experiences 7.6.6 → 7.6.8

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,41 +1,41 @@
1
- import { jsxs as C, jsx as e, Fragment as gt } from "react/jsx-runtime";
2
- import h, { useRef as mt, useState as pt, useEffect as ft } from "react";
3
- import { observer as A } from "mobx-react-lite";
4
- import { CategoryIcon as Se, Text as F, Icon as _e, P as ge, H3 as je, ChevronRightIcon as Ct } from "@mxenabled/mxui";
5
- import M from "@mui/material/Box";
6
- import T from "@mui/material/Stack";
1
+ import { jsxs as C, jsx as e, Fragment as mt } from "react/jsx-runtime";
2
+ import p, { useRef as pt, useState as ft, useEffect as Ct } from "react";
3
+ import { observer as R } from "mobx-react-lite";
4
+ import { CategoryIcon as Se, Text as z, Icon as _e, P as ge, H3 as je, ChevronRightIcon as yt } from "@mxenabled/mxui";
5
+ import A from "@mui/material/Box";
6
+ import S from "@mui/material/Stack";
7
7
  import be from "@mui/material/Button";
8
8
  import { addSeconds as Ue } from "date-fns/addSeconds";
9
9
  import { differenceInCalendarMonths as ke } from "date-fns/differenceInCalendarMonths";
10
- import yt from "numeral";
10
+ import _t from "numeral";
11
11
  import { useTheme as ce } from "@mui/material/styles";
12
- import { useItemTooltip as _t, ChartsTooltipContainer as bt } from "@mui/x-charts/ChartsTooltip";
13
- import { LineChart as Tt } from "@mui/x-charts/LineChart";
14
- import { u as ee } from "../useScreenSize-B6JyS_Lj.mjs";
15
- import { u as St } from "../useDimensions-27p2evRx.mjs";
12
+ import { useItemTooltip as bt, ChartsTooltipContainer as Tt } from "@mui/x-charts/ChartsTooltip";
13
+ import { LineChart as St } from "@mui/x-charts/LineChart";
14
+ import { u as X } from "../useScreenSize-B6JyS_Lj.mjs";
15
+ import { u as wt } from "../useDimensions-27p2evRx.mjs";
16
16
  import Xe from "@mui/material/Card";
17
17
  import Ze from "@mui/material/CardContent";
18
18
  import He from "@mui/material/Divider";
19
19
  import Ge from "@mui/material/Grid";
20
- import { u as R, m as U, g as V, b as pe, h as xe, d as ve, v as fe, p as Qe, f as We, a as xt } from "../hooks-ZMp65DFz.mjs";
21
- import { b as qe } from "../Localization-2MODESHW.mjs";
20
+ import { u as k, m as Z, g as F, b as pe, h as we, d as xe, v as fe, p as Qe, f as We, a as qe } from "../hooks-ZMp65DFz.mjs";
21
+ import { b as Je } from "../Localization-2MODESHW.mjs";
22
22
  import { C as Te } from "../CurrencyText-Dr0EZ7bp.mjs";
23
- import { C as Ae, b as Be, c as vt } from "../Category-CevNQ03n.mjs";
24
- import { f as j, a as W } from "../Dialog-BlnUNqVo.mjs";
25
- import { f as se, a as wt } from "../NumberFormatting-DjTD0t3W.mjs";
26
- import { c as It, a as Ve, g as Lt, L as Je } from "../TrendsStore-CQAsOAvy.mjs";
23
+ import { C as Ae, b as Be, c as xt } from "../Category-CevNQ03n.mjs";
24
+ import { f as U, a as B } from "../Dialog-BlnUNqVo.mjs";
25
+ import { f as se, a as vt } from "../NumberFormatting-DjTD0t3W.mjs";
26
+ import { c as It, a as Ve, g as Lt, L as et } from "../TrendsStore-CQAsOAvy.mjs";
27
27
  import { T as Kn } from "../TrendsStore-CQAsOAvy.mjs";
28
- import { c as Et, i as Dt, d as Mt, e as At, b as et, g as tt, f as Pe } from "../SpendingData-zOn0cwrq.mjs";
28
+ import { c as Et, i as Dt, d as Mt, e as At, b as tt, g as ot, f as Pe } from "../SpendingData-zOn0cwrq.mjs";
29
29
  import Rt from "@mui/material/ToggleButton";
30
30
  import kt from "@mui/material/ToggleButtonGroup";
31
31
  import { DataGridPro as Ht } from "@mui/x-data-grid-pro";
32
- import { T as O, b as Nt } from "../ViewMoreMicroCard-DwR0v_ll.mjs";
33
- import { parseISO as ot } from "date-fns/parseISO";
32
+ import { T as V, b as Nt } from "../ViewMoreMicroCard-DwR0v_ll.mjs";
33
+ import { parseISO as nt } from "date-fns/parseISO";
34
34
  import { H as Re } from "../HeaderCell-DjuifqHJ.mjs";
35
- import { A as v, W as nt } from "../WidgetContainer-8RexRzms.mjs";
36
- import { a as st, T as rt } from "../TransactionDetails-vXstDuDk.mjs";
35
+ import { A as x, W as st } from "../WidgetContainer-8RexRzms.mjs";
36
+ import { a as rt, T as at } from "../TransactionDetails-vXstDuDk.mjs";
37
37
  import { D as Ne } from "../Drawer-DV4NTsFg.mjs";
38
- import { u as we } from "../useWidgetLoadTimer-hIOioiKx.mjs";
38
+ import { u as ve } from "../useWidgetLoadTimer-hIOioiKx.mjs";
39
39
  import { L as me } from "../Loader-DUaFpDGv.mjs";
40
40
  import { L as Oe } from "../LineChart-BF4QA-Lx.mjs";
41
41
  import { M as Wt } from "../MiniWidgetContainer-98-hKFqm.mjs";
@@ -48,7 +48,7 @@ import Yt from "@mui/material/ListItem";
48
48
  import jt from "@mui/material/ListItemButton";
49
49
  import Ut from "@mui/material/ListItemIcon";
50
50
  import Xt from "@mui/material/ListItemText";
51
- import at from "@mui/material/styles/useTheme";
51
+ import it from "@mui/material/styles/useTheme";
52
52
  import { Stack as Zt } from "@mui/material";
53
53
  import Qt from "@mui/material/Paper";
54
54
  import { b as qt } from "../CategoryUtil-CKczWF-y.mjs";
@@ -56,19 +56,19 @@ import { E as Jt } from "../ExportCsvAction-Col0j3VJ.mjs";
56
56
  import { u as eo } from "../useInsightsEnabled-B7dxpDrX.mjs";
57
57
  import { E as to } from "../EmptyState-DoxNUae-.mjs";
58
58
  import { l as oo } from "../ConnectDrawer-DJV-yWGN.mjs";
59
- const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
60
- const { categories: n } = R(), { getCategoryName: t } = U(), r = t(o);
61
- return /* @__PURE__ */ C(T, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
59
+ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
60
+ const { categories: n } = k(), { getCategoryName: t } = Z(), r = t(o);
61
+ return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
62
62
  /* @__PURE__ */ e(
63
- M,
63
+ A,
64
64
  {
65
- "aria-label": qe(n.category_icon_label_aria, r),
65
+ "aria-label": Je(n.category_icon_label_aria, r),
66
66
  mb: 4,
67
67
  role: "img",
68
68
  children: /* @__PURE__ */ e(Se, { categoryGuid: s })
69
69
  }
70
70
  ),
71
- /* @__PURE__ */ e(F, { variant: "Body", children: r })
71
+ /* @__PURE__ */ e(z, { variant: "Body", children: r })
72
72
  ] });
73
73
  }, no = ({
74
74
  categoryGuids: { guid: o, topLevelGuid: s },
@@ -76,39 +76,39 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
76
76
  cursorPosition: t,
77
77
  chartContainerRef: r
78
78
  }) => {
79
- const a = ce(), l = mt(null), [d, c] = pt({ x: t.x, y: t.y });
80
- if (ft(() => {
79
+ const a = ce(), d = pt(null), [u, i] = ft({ x: t.x, y: t.y });
80
+ if (Ct(() => {
81
81
  (() => {
82
- const u = l.current, y = r.current;
83
- if (!u || !y) return;
84
- const g = u.getBoundingClientRect(), p = y.getBoundingClientRect();
85
- let _ = t.x, S = t.y;
86
- _ + g.width * 2 > p.right ? _ = t.x - g.width : _ - g.width < p.left && (_ = t.x), S + g.height * 2 > p.bottom && (S = t.y - g.height), c({ x: _, y: S });
82
+ const l = d.current, y = r.current;
83
+ if (!l || !y) return;
84
+ const g = l.getBoundingClientRect(), m = y.getBoundingClientRect();
85
+ let _ = t.x, T = t.y;
86
+ _ + g.width * 2 > m.right ? _ = t.x - g.width : _ - g.width < m.left && (_ = t.x), T + g.height * 2 > m.bottom && (T = t.y - g.height), i({ x: _, y: T });
87
87
  })();
88
88
  }, [t, r]), !n) return null;
89
- const m = n.reduce((f, u) => f + u.y, 0);
89
+ const h = n.reduce((f, l) => f + l.y, 0);
90
90
  return /* @__PURE__ */ e(
91
91
  Xe,
92
92
  {
93
- ref: l,
93
+ ref: d,
94
94
  sx: {
95
95
  position: "absolute",
96
- top: d.y,
97
- left: d.x,
96
+ top: u.y,
97
+ left: u.x,
98
98
  width: 250,
99
99
  pointerEvents: "none"
100
100
  },
101
101
  children: /* @__PURE__ */ C(Ze, { children: [
102
- /* @__PURE__ */ C(M, { alignItems: "center", display: "flex", flexDirection: "column", children: [
103
- /* @__PURE__ */ e(it, { categoryGuid: o, topLevelCategoryGuid: s }),
104
- /* @__PURE__ */ e(F, { variant: "Small", children: `${n.length}-month total` }),
105
- /* @__PURE__ */ e(Te, { amount: m, bold: !0, formatString: "0,0", variant: "body2" })
102
+ /* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
103
+ /* @__PURE__ */ e(ct, { categoryGuid: o, topLevelCategoryGuid: s }),
104
+ /* @__PURE__ */ e(z, { variant: "Small", children: `${n.length}-month total` }),
105
+ /* @__PURE__ */ e(Te, { amount: h, bold: !0, formatString: "0,0", variant: "body2" })
106
106
  ] }),
107
107
  /* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
108
- /* @__PURE__ */ e(Ge, { container: !0, children: n.map((f, u) => /* @__PURE__ */ C(h.Fragment, { children: [
109
- u > 0 && u % 3 === 0 && /* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
110
- /* @__PURE__ */ e(Ge, { item: !0, xs: 4, children: /* @__PURE__ */ C(M, { alignItems: "center", display: "flex", flexDirection: "column", children: [
111
- /* @__PURE__ */ e(F, { color: a.palette.text.secondary, variant: "XSmall", children: f.x }),
108
+ /* @__PURE__ */ e(Ge, { container: !0, children: n.map((f, l) => /* @__PURE__ */ C(p.Fragment, { children: [
109
+ l > 0 && l % 3 === 0 && /* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
110
+ /* @__PURE__ */ e(Ge, { item: !0, xs: 4, children: /* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
111
+ /* @__PURE__ */ e(z, { color: a.palette.text.secondary, variant: "XSmall", children: f.x }),
112
112
  /* @__PURE__ */ e(
113
113
  Te,
114
114
  {
@@ -119,11 +119,11 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
119
119
  }
120
120
  )
121
121
  ] }) })
122
- ] }, u)) })
122
+ ] }, l)) })
123
123
  ] })
124
124
  }
125
125
  );
126
- }, so = A(no), ro = ({
126
+ }, so = R(no), ro = ({
127
127
  sx: o,
128
128
  categoryGuids: s,
129
129
  hoveredLegend: n,
@@ -131,23 +131,23 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
131
131
  onHoverLegend: r,
132
132
  onClickLegend: a
133
133
  }) => {
134
- const { isMobile: l } = ee(), { getCategoryName: d } = U();
134
+ const { isMobile: d } = X(), { getCategoryName: u } = Z();
135
135
  return /* @__PURE__ */ e(
136
- T,
136
+ S,
137
137
  {
138
138
  direction: "row",
139
139
  flexWrap: "wrap",
140
- gap: l ? 2 : 6,
140
+ gap: d ? 2 : 6,
141
141
  justifyContent: "start",
142
142
  ref: t,
143
143
  sx: o,
144
- children: s.map(({ guid: c, top_level_guid: m }) => {
145
- const f = n === c, u = Ae[c], y = Ae[m], g = u ?? y ?? Ae.default, p = g + "33";
144
+ children: s.map(({ guid: i, top_level_guid: h }) => {
145
+ const f = n === i, l = Ae[i], y = Ae[h], g = l ?? y ?? Ae.default, m = g + "33";
146
146
  return /* @__PURE__ */ C(
147
147
  be,
148
148
  {
149
- onClick: () => a(c),
150
- onMouseEnter: () => r(c),
149
+ onClick: () => a(i),
150
+ onMouseEnter: () => r(i),
151
151
  onMouseLeave: () => r(null),
152
152
  sx: {
153
153
  color: "text.primary",
@@ -162,21 +162,21 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
162
162
  },
163
163
  children: [
164
164
  /* @__PURE__ */ e(
165
- M,
165
+ A,
166
166
  {
167
167
  sx: {
168
168
  width: 16,
169
169
  height: 16,
170
- marginRight: l ? 5 : 10,
170
+ marginRight: d ? 5 : 10,
171
171
  borderRadius: "2px",
172
- backgroundColor: n ? f ? g : p : g
172
+ backgroundColor: n ? f ? g : m : g
173
173
  }
174
174
  }
175
175
  ),
176
- /* @__PURE__ */ e(F, { variant: "Body", children: d(c) })
176
+ /* @__PURE__ */ e(z, { variant: "Body", children: u(i) })
177
177
  ]
178
178
  },
179
- c
179
+ i
180
180
  );
181
181
  })
182
182
  }
@@ -186,15 +186,15 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
186
186
  series: n,
187
187
  xData: t
188
188
  }) => {
189
- const r = _t(), a = ce();
189
+ const r = bt(), a = ce();
190
190
  if (!r?.identifier) return null;
191
- const { dataIndex: l, seriesId: d } = r.identifier;
192
- if (l == null || !d) return null;
193
- const m = n.find((u) => u.id === d)?.data?.[l], f = t?.[l];
194
- return m === void 0 || !f ? null : /* @__PURE__ */ e(Xe, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(Ze, { children: /* @__PURE__ */ C(M, { alignItems: "center", display: "flex", flexDirection: "column", children: [
195
- /* @__PURE__ */ e(it, { categoryGuid: o, topLevelCategoryGuid: s }),
196
- /* @__PURE__ */ e(F, { color: a.palette.text.secondary, variant: "Small", children: j(f, W.MONTH_SHORT_YEAR) }),
197
- /* @__PURE__ */ e(Te, { amount: String(m), bold: !0, formatString: "0,0", variant: "Body" })
191
+ const { dataIndex: d, seriesId: u } = r.identifier;
192
+ if (d == null || !u) return null;
193
+ const h = n.find((l) => l.id === u)?.data?.[d], f = t?.[d];
194
+ return h === void 0 || !f ? null : /* @__PURE__ */ e(Xe, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(Ze, { children: /* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
195
+ /* @__PURE__ */ e(ct, { categoryGuid: o, topLevelCategoryGuid: s }),
196
+ /* @__PURE__ */ e(z, { color: a.palette.text.secondary, variant: "Small", children: U(f, B.MONTH_SHORT_YEAR) }),
197
+ /* @__PURE__ */ e(Te, { amount: String(h), bold: !0, formatString: "0,0", variant: "Body" })
198
198
  ] }) }) });
199
199
  }, io = ({
200
200
  onHoverArea: o,
@@ -203,103 +203,103 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
203
203
  onClickLegend: t,
204
204
  stackedDatasets: r,
205
205
  unstackedDatasets: a = [],
206
- availableHeight: l = 0,
207
- minimumHeight: d = 350
206
+ availableHeight: d = 0,
207
+ minimumHeight: u = 350
208
208
  }) => {
209
- const c = ce(), { isMobile: m } = ee(), [f, { height: u }] = St(), y = h.useRef(null), [g, p] = h.useState(0);
210
- h.useEffect(() => {
211
- const i = Math.max(l - u, d);
212
- p(i);
213
- }, [l, u]);
214
- const [_, S] = h.useState(null), [L, w] = h.useState({
209
+ const i = ce(), { isMobile: h } = X(), [f, { height: l }] = wt(), y = p.useRef(null), [g, m] = p.useState(0);
210
+ p.useEffect(() => {
211
+ const c = Math.max(d - l, u);
212
+ m(c);
213
+ }, [d, l]);
214
+ const [_, T] = p.useState(null), [L, I] = p.useState({
215
215
  hoveredSeriesId: null,
216
216
  hoveredAreaData: null,
217
217
  isAreaHovered: !1,
218
218
  cursorPos: { x: 0, y: 0 }
219
- }), { hoveredSeriesId: E, hoveredAreaData: G, isAreaHovered: D, cursorPos: B } = L, te = D && E && G, H = !te, P = [...r, ...a], z = P[0]?.dataset.length ?? 0, X = P.flatMap((i) => i.dataset.map((b) => b.x)), Ce = P.flatMap((i) => i.dataset.map((b) => b.y)), oe = r[0]?.dataset?.map(
220
- (i, b) => r.reduce((I, Y) => I + Y.dataset[b]?.y || 0, 0)
221
- ) ?? [0], re = Math.max(...oe), Z = Math.max(
222
- ...a.flatMap((i) => i.dataset.map((b) => b.y))
223
- ), le = Math.floor(Math.min(...Ce) / 100) * 100, ne = Math.ceil(Math.max(re, Z) / 100) * 100, $ = r.map((i, b) => ({
219
+ }), { hoveredSeriesId: E, hoveredAreaData: P, isAreaHovered: H, cursorPos: D } = L, $ = H && E && P, M = !$, O = [...r, ...a], N = O[0]?.dataset.length ?? 0, Q = O.flatMap((c) => c.dataset.map((b) => b.x)), Ce = O.flatMap((c) => c.dataset.map((b) => b.y)), oe = r[0]?.dataset?.map(
220
+ (c, b) => r.reduce((v, j) => v + j.dataset[b]?.y || 0, 0)
221
+ ) ?? [0], re = Math.max(...oe), q = Math.max(
222
+ ...a.flatMap((c) => c.dataset.map((b) => b.y))
223
+ ), le = Math.floor(Math.min(...Ce) / 100) * 100, ne = Math.ceil(Math.max(re, q) / 100) * 100, K = r.map((c, b) => ({
224
224
  id: `stacked-${b}`,
225
- guid: i.category_guid,
226
- top_level_guid: i.top_level_category_guid,
225
+ guid: c.category_guid,
226
+ top_level_guid: c.top_level_category_guid,
227
227
  area: !0,
228
- color: r[b].category_color ?? c.palette.primary.main,
229
- data: i.dataset.map((I) => I.y),
228
+ color: r[b].category_color ?? i.palette.primary.main,
229
+ data: c.dataset.map((v) => v.y),
230
230
  label: r[b].category_name,
231
231
  stack: "total",
232
232
  type: "line",
233
233
  highlightScope: { highlight: "item" },
234
- valueFormatter: (I) => se(I, "0,0")
235
- })), ae = a.map((i, b) => ({
234
+ valueFormatter: (v) => se(v, "0,0")
235
+ })), ae = a.map((c, b) => ({
236
236
  id: `unstacked-${b}`,
237
- guid: i.category_guid,
238
- top_level_guid: i.top_level_category_guid,
237
+ guid: c.category_guid,
238
+ top_level_guid: c.top_level_category_guid,
239
239
  area: !1,
240
- color: i.category_color,
241
- data: i.dataset.map((I) => I.y),
242
- label: i.category_name,
240
+ color: c.category_color,
241
+ data: c.dataset.map((v) => v.y),
242
+ label: c.category_name,
243
243
  type: "line",
244
- valueFormatter: (I) => se(I, "0,0")
245
- })), Q = [...$, ...ae], ie = [
246
- ...$.map(({ guid: i, top_level_guid: b }) => ({
247
- guid: i,
244
+ valueFormatter: (v) => se(v, "0,0")
245
+ })), J = [...K, ...ae], ie = [
246
+ ...K.map(({ guid: c, top_level_guid: b }) => ({
247
+ guid: c,
248
248
  top_level_guid: b
249
249
  })),
250
- ...ae.map(({ guid: i, top_level_guid: b }) => ({
251
- guid: i,
250
+ ...ae.map(({ guid: c, top_level_guid: b }) => ({
251
+ guid: c,
252
252
  top_level_guid: b
253
253
  }))
254
- ], q = (i) => {
255
- const I = i.startsWith("stacked-") ? r[parseInt(i.split("-")[1])] : a[parseInt(i.split("-")[1])];
254
+ ], ee = (c) => {
255
+ const v = c.startsWith("stacked-") ? r[parseInt(c.split("-")[1])] : a[parseInt(c.split("-")[1])];
256
256
  return {
257
- guid: I?.category_guid,
258
- topLevelGuid: I?.top_level_category_guid
257
+ guid: v?.category_guid,
258
+ topLevelGuid: v?.top_level_category_guid
259
259
  };
260
- }, x = (i) => {
261
- S(i), n?.(i ?? "");
262
- }, N = (i) => {
263
- t?.(i ?? "");
264
- }, K = () => {
265
- const i = q(String(E)).guid;
266
- i && t?.(i);
267
- }, de = (i) => {
268
- const b = String(i?.seriesId), I = q(b).guid, Y = Q.find((ue) => ue.id === b), Le = Y && i?.dataIndex !== void 0, Ee = Y && i?.dataIndex === void 0;
260
+ }, w = (c) => {
261
+ T(c), n?.(c ?? "");
262
+ }, G = (c) => {
263
+ t?.(c ?? "");
264
+ }, Y = () => {
265
+ const c = ee(String(E)).guid;
266
+ c && t?.(c);
267
+ }, de = (c) => {
268
+ const b = String(c?.seriesId), v = ee(b).guid, j = J.find((ue) => ue.id === b), Le = j && c?.dataIndex !== void 0, Ee = j && c?.dataIndex === void 0;
269
269
  if (Le)
270
- w({
270
+ I({
271
271
  hoveredSeriesId: b,
272
272
  hoveredAreaData: null,
273
273
  isAreaHovered: !1,
274
- cursorPos: B
275
- }), s?.(I);
274
+ cursorPos: D
275
+ }), s?.(v);
276
276
  else if (Ee) {
277
- const ue = Y?.data.map((De, Me) => ({
278
- x: X[Me],
277
+ const ue = j?.data.map((De, Me) => ({
278
+ x: Q[Me],
279
279
  y: De
280
280
  })) ?? [];
281
- w({
281
+ I({
282
282
  hoveredSeriesId: b,
283
283
  hoveredAreaData: ue,
284
284
  isAreaHovered: !0,
285
- cursorPos: B
286
- }), o?.(I);
285
+ cursorPos: D
286
+ }), o?.(v);
287
287
  } else
288
- w({
288
+ I({
289
289
  hoveredSeriesId: null,
290
290
  hoveredAreaData: null,
291
291
  isAreaHovered: !1,
292
- cursorPos: B
292
+ cursorPos: D
293
293
  });
294
- }, ye = (i) => {
295
- if (i.target instanceof Element && i.target.classList[0]?.includes("MuiMarkElement-root"))
294
+ }, ye = (c) => {
295
+ if (c.target instanceof Element && c.target.classList[0]?.includes("MuiMarkElement-root"))
296
296
  return;
297
- const b = i.currentTarget.getBoundingClientRect();
298
- w((I) => ({
299
- ...I,
297
+ const b = c.currentTarget.getBoundingClientRect();
298
+ I((v) => ({
299
+ ...v,
300
300
  cursorPos: {
301
- x: i.clientX - b.left,
302
- y: i.clientY - b.top
301
+ x: c.clientX - b.left,
302
+ y: c.clientY - b.top
303
303
  }
304
304
  }));
305
305
  }, Ie = {
@@ -318,15 +318,15 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
318
318
  '& [class*="MuiLineElement-series-unstacked-"]': {
319
319
  strokeWidth: 3
320
320
  },
321
- ..._ && $.reduce((i, b, I) => {
322
- const Y = `.MuiAreaElement-series-stacked-${I}`;
323
- return i[Y] = {
324
- opacity: $[I].guid === _ ? 0.9 : 0.2
325
- }, i;
321
+ ..._ && K.reduce((c, b, v) => {
322
+ const j = `.MuiAreaElement-series-stacked-${v}`;
323
+ return c[j] = {
324
+ opacity: K[v].guid === _ ? 0.9 : 0.2
325
+ }, c;
326
326
  }, {})
327
327
  };
328
328
  return /* @__PURE__ */ e(
329
- M,
329
+ A,
330
330
  {
331
331
  onMouseMove: ye,
332
332
  ref: y,
@@ -342,43 +342,43 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
342
342
  }
343
343
  },
344
344
  children: /* @__PURE__ */ C(
345
- T,
345
+ S,
346
346
  {
347
347
  direction: { xs: "column", md: "column" },
348
348
  spacing: { xs: 0, md: 4 },
349
349
  sx: { width: "100%", position: "relative" },
350
350
  children: [
351
351
  /* @__PURE__ */ e(
352
- Tt,
352
+ St,
353
353
  {
354
354
  height: g,
355
355
  hideLegend: !0,
356
356
  margin: { bottom: 24, left: 12, right: 54, top: 48 },
357
- onAreaClick: K,
357
+ onAreaClick: Y,
358
358
  onHighlightChange: de,
359
- series: Q,
359
+ series: J,
360
360
  skipAnimation: !0,
361
361
  slotProps: {
362
- tooltip: { trigger: H ? "item" : "none" }
362
+ tooltip: { trigger: M ? "item" : "none" }
363
363
  },
364
364
  slots: {
365
- tooltip: H && E ? (i) => /* @__PURE__ */ e(bt, { children: /* @__PURE__ */ e(
365
+ tooltip: M && E ? (c) => /* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ e(
366
366
  ao,
367
367
  {
368
- ...i,
369
- categoryGuids: q(E),
370
- series: Q,
371
- xData: X
368
+ ...c,
369
+ categoryGuids: ee(E),
370
+ series: J,
371
+ xData: Q
372
372
  }
373
373
  ) }) : void 0
374
374
  },
375
375
  sx: Ie,
376
376
  xAxis: [
377
377
  {
378
- data: X,
378
+ data: Q,
379
379
  scaleType: "time",
380
- valueFormatter: (i) => j(i, W.MONTH_SHORT_YEAR),
381
- tickNumber: z
380
+ valueFormatter: (c) => U(c, B.MONTH_SHORT_YEAR),
381
+ tickNumber: N
382
382
  // How many ticks to show on the x-axis
383
383
  }
384
384
  ],
@@ -386,7 +386,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
386
386
  {
387
387
  min: le,
388
388
  max: ne || 100,
389
- valueFormatter: (i) => yt(i).format("0a")
389
+ valueFormatter: (c) => _t(c).format("0a")
390
390
  }
391
391
  ]
392
392
  }
@@ -397,20 +397,20 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
397
397
  categoryGuids: ie,
398
398
  hoveredLegend: _,
399
399
  legendRef: f,
400
- onClickLegend: N,
401
- onHoverLegend: x,
402
- sx: { px: m ? 0 : 24 }
400
+ onClickLegend: G,
401
+ onHoverLegend: w,
402
+ sx: { px: h ? 0 : 24 }
403
403
  }
404
404
  ),
405
- te && /* @__PURE__ */ e(
405
+ $ && /* @__PURE__ */ e(
406
406
  so,
407
407
  {
408
- categoryGuids: q(E),
408
+ categoryGuids: ee(E),
409
409
  chartContainerRef: y,
410
- cursorPosition: B,
411
- hoveredAreaData: G.map((i) => ({
412
- ...i,
413
- x: j(i.x, W.MONTH_SHORT_YEAR)
410
+ cursorPosition: D,
411
+ hoveredAreaData: P.map((c) => ({
412
+ ...c,
413
+ x: U(c.x, B.MONTH_SHORT_YEAR)
414
414
  }))
415
415
  }
416
416
  )
@@ -419,8 +419,8 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
419
419
  )
420
420
  }
421
421
  );
422
- }, ct = ({ selectedTab: o, onTabChange: s }) => {
423
- const { common: n } = R();
422
+ }, lt = ({ selectedTab: o, onTabChange: s }) => {
423
+ const { common: n } = k();
424
424
  return /* @__PURE__ */ e(
425
425
  kt,
426
426
  {
@@ -443,23 +443,23 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
443
443
  ))
444
444
  }
445
445
  );
446
- }, lt = ({ selectedDateRange: o, selectedCategoryGuid: s }) => {
447
- const { trends: n } = R(), { isMobile: t, isDesktop: r } = ee(), { getCategoryName: a } = U(), l = h.useMemo(() => {
448
- const d = o.start.getFullYear() === o.end.getFullYear() ? j(
446
+ }, dt = ({ selectedDateRange: o, selectedCategoryGuid: s }) => {
447
+ const { trends: n } = k(), { isMobile: t, isDesktop: r } = X(), { getCategoryName: a } = Z(), d = p.useMemo(() => {
448
+ const u = o.start.getFullYear() === o.end.getFullYear() ? U(
449
449
  o.start,
450
- t ? W.MONTH_SHORT : W.MONTH_LONG
451
- ) : j(
450
+ t ? B.MONTH_SHORT : B.MONTH_LONG
451
+ ) : U(
452
452
  o.start,
453
- t ? W.MONTH_SHORT_YEAR : W.MONTH_YEAR
454
- ), c = j(
453
+ t ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR
454
+ ), i = U(
455
455
  o.end,
456
- t ? W.MONTH_SHORT_YEAR : W.MONTH_YEAR
456
+ t ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR
457
457
  );
458
- return `${d} - ${c}`;
458
+ return `${u} - ${i}`;
459
459
  }, [o, t]);
460
- return /* @__PURE__ */ C(M, { sx: { mr: 10, minWidth: "60%" }, children: [
460
+ return /* @__PURE__ */ C(A, { sx: { mr: 10, minWidth: "60%" }, children: [
461
461
  /* @__PURE__ */ e(
462
- F,
462
+ z,
463
463
  {
464
464
  display: "block",
465
465
  fontWeight: 700,
@@ -472,12 +472,12 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
472
472
  children: a(s) || n.sub_title
473
473
  }
474
474
  ),
475
- /* @__PURE__ */ e(F, { variant: r ? "subtitle1" : "body2", children: l })
475
+ /* @__PURE__ */ e(z, { variant: r ? "subtitle1" : "body2", children: d })
476
476
  ] });
477
- }, co = ({ name: o, topLevelCategoryGuid: s }) => /* @__PURE__ */ C(T, { alignItems: "center", direction: "row", justifyContent: "center", children: [
478
- /* @__PURE__ */ e(M, { "aria-hidden": !0, children: /* @__PURE__ */ e(Se, { categoryGuid: s, variant: "twotone" }) }),
479
- /* @__PURE__ */ e(F, { sx: { ml: 12 }, variant: "body2", children: o })
480
- ] }), lo = (o) => /* @__PURE__ */ e(T, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
477
+ }, co = ({ name: o, topLevelCategoryGuid: s }) => /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", justifyContent: "center", children: [
478
+ /* @__PURE__ */ e(A, { "aria-hidden": !0, children: /* @__PURE__ */ e(Se, { categoryGuid: s, variant: "twotone" }) }),
479
+ /* @__PURE__ */ e(z, { sx: { ml: 12 }, variant: "body2", children: o })
480
+ ] }), lo = (o) => /* @__PURE__ */ e(S, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
481
481
  co,
482
482
  {
483
483
  name: o.row.category,
@@ -485,7 +485,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
485
485
  }
486
486
  ) }), Fe = (o) => {
487
487
  const s = o.row.category_guid, n = o.row.top_level_category_guid, t = s === Be.INCOME || n === Be.INCOME, r = o.row[o.field];
488
- return /* @__PURE__ */ e(T, { alignItems: "flex-end", direction: "row", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
488
+ return /* @__PURE__ */ e(S, { alignItems: "flex-end", direction: "row", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
489
489
  Te,
490
490
  {
491
491
  amount: t ? Math.abs(r) : r,
@@ -496,15 +496,15 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
496
496
  }
497
497
  ) });
498
498
  }, ze = (o, s) => {
499
- const n = j(ot(s.isoDate), W.MONTH_LONG);
499
+ const n = U(nt(s.isoDate), B.MONTH_LONG);
500
500
  return o[n] = s.amount, o;
501
501
  }, $e = (o) => (s, n) => {
502
- const t = j(ot(n.isoDate), W.MONTH_LONG);
502
+ const t = U(nt(n.isoDate), B.MONTH_LONG);
503
503
  return s + (o.includes(t) ? n.amount : 0);
504
504
  }, uo = (o, s) => {
505
505
  const n = [], t = new Date(o);
506
506
  for (; t <= s; ) {
507
- const r = j(t, W.MONTH_LONG);
507
+ const r = U(t, B.MONTH_LONG);
508
508
  n.push(r), t.setMonth(t.getMonth() + 1);
509
509
  }
510
510
  return n;
@@ -552,22 +552,22 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
552
552
  return [n, ...t, r];
553
553
  }, go = (o, s, n, t) => {
554
554
  const r = o.map((a) => {
555
- let l = a.totalMonthlyAmounts;
556
- return t && (l = a.monthlyAmounts), {
555
+ let d = a.totalMonthlyAmounts;
556
+ return t && (d = a.monthlyAmounts), {
557
557
  id: a.guid,
558
558
  category: a.name,
559
559
  category_guid: a.guid,
560
560
  isParent: !1,
561
561
  top_level_category_guid: a.parent_guid || a.guid,
562
- total: l.reduce($e(n), 0),
563
- ...l.reduce(ze, {})
562
+ total: d.reduce($e(n), 0),
563
+ ...d.reduce(ze, {})
564
564
  };
565
565
  });
566
566
  if (t) {
567
567
  const a = t.monthlyAmounts.reduce($e(n), 0);
568
568
  a !== 0 && r.push({
569
569
  id: `sub-${t.guid}`,
570
- category: qe(s.category_general, t.name),
570
+ category: Je(s.category_general, t.name),
571
571
  category_guid: t.guid,
572
572
  isParent: !0,
573
573
  top_level_category_guid: t.guid,
@@ -576,34 +576,34 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
576
576
  });
577
577
  }
578
578
  return r;
579
- }, dt = ({
579
+ }, ut = ({
580
580
  selectedDateRange: o,
581
581
  selectedCategory: s,
582
582
  onClickRow: n,
583
583
  height: t = "100%",
584
584
  sx: r = {}
585
585
  }) => {
586
- const a = ce(), { onEvent: l } = V(), { trends: d } = R(), { trendsCategories: c } = U(), m = h.useMemo(() => uo(o.start, o.end), [o]), f = a.palette.mode === "light", u = h.useMemo(() => ho(m, d), [m, d]), y = h.useMemo(() => {
586
+ const a = ce(), { onEvent: d } = F(), { trends: u } = k(), { trendsCategories: i } = Z(), h = p.useMemo(() => uo(o.start, o.end), [o]), f = a.palette.mode === "light", l = p.useMemo(() => ho(h, u), [h, u]), y = p.useMemo(() => {
587
587
  if (s)
588
- return c.find((p) => p.guid === s);
589
- }, [s, c]), g = h.useMemo(() => {
590
- let p = c;
591
- return y && (p = y.subCategories.filter(
592
- (_) => _.monthlyAmounts.some((S) => S.amount !== 0)
593
- )), go(p, d, m, y);
594
- }, [c, m, y, d]);
595
- return /* @__PURE__ */ e(M, { sx: { height: t, width: "100%", overflowX: "auto", boxShadow: "none", ...r }, children: /* @__PURE__ */ e(
588
+ return i.find((m) => m.guid === s);
589
+ }, [s, i]), g = p.useMemo(() => {
590
+ let m = i;
591
+ return y && (m = y.subCategories.filter(
592
+ (_) => _.monthlyAmounts.some((T) => T.amount !== 0)
593
+ )), go(m, u, h, y);
594
+ }, [i, h, y, u]);
595
+ return /* @__PURE__ */ e(A, { sx: { height: t, width: "100%", overflowX: "auto", boxShadow: "none", ...r }, children: /* @__PURE__ */ e(
596
596
  Ht,
597
597
  {
598
- columns: u,
598
+ columns: l,
599
599
  disableColumnFilter: !0,
600
600
  disableColumnMenu: !0,
601
601
  hideFooter: !0,
602
602
  initialState: { sorting: { sortModel: [{ field: "category", sort: "asc" }] } },
603
- onRowClick: (p) => {
604
- y || n?.(p.row.category_guid), l(v.TRENDS_CLICK_LIST_ITEM, {
605
- ...O,
606
- listItem: vt[p.row.category_guid]
603
+ onRowClick: (m) => {
604
+ y || n?.(m.row.category_guid), d(x.TRENDS_CLICK_LIST_ITEM, {
605
+ ...V,
606
+ listItem: xt[m.row.category_guid]
607
607
  });
608
608
  },
609
609
  rowHeight: 64,
@@ -633,92 +633,92 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
633
633
  isOpen: n,
634
634
  onClose: t
635
635
  }) => {
636
- const { onEvent: r } = V(), { selectedAccountGuids: a } = pe(), { common: l } = R(), { setFilter: d, sortedTransactions: c } = xe(), [m, f] = h.useState(""), u = h.useMemo(
637
- () => c.find((g) => g.guid === m),
638
- [m, c]
636
+ const { onEvent: r } = F(), { selectedAccountGuids: a } = pe(), { common: d } = k(), { setFilter: u, sortedTransactions: i } = we(), [h, f] = p.useState(""), l = p.useMemo(
637
+ () => i.find((g) => g.guid === h),
638
+ [h, i]
639
639
  );
640
- h.useEffect(() => {
641
- d({
640
+ p.useEffect(() => {
641
+ u({
642
642
  accounts: a,
643
643
  dateRange: s,
644
644
  custom: (g) => o === "" || o === g.category_guid || o === g.top_level_category_guid,
645
645
  showSplits: !!o
646
646
  });
647
- }, [a, o, s]), h.useEffect(() => r(v.TRENDS_VIEW_TRANSACTIONS), []);
647
+ }, [a, o, s]), p.useEffect(() => r(x.TRENDS_VIEW_TRANSACTIONS), []);
648
648
  const y = () => {
649
649
  f(""), t();
650
650
  };
651
651
  return /* @__PURE__ */ C(
652
652
  Ne,
653
653
  {
654
- ariaLabelClose: l.close_aria,
654
+ ariaLabelClose: d.close_aria,
655
655
  isOpen: n,
656
656
  onClose: y,
657
657
  title: mo.title,
658
658
  children: [
659
- u && /* @__PURE__ */ e(st, { transaction: u }),
660
- !u && /* @__PURE__ */ e(rt, { onClick: f })
659
+ l && /* @__PURE__ */ e(rt, { transaction: l }),
660
+ !l && /* @__PURE__ */ e(at, { onClick: f })
661
661
  ]
662
662
  }
663
663
  );
664
- }, fo = A(po), Co = ({ onBackClick: o, sx: s }) => {
665
- const { onEvent: n } = V(), { isDesktop: t, isTablet: r, isMobile: a } = ee(), { visibleAccounts: l } = ve(), { loadMonthlyCategoryTotals: d, monthlyCategoryTotals: c, getCategoryName: m } = U(), { sortedTransactions: f } = xe(), { selectedDateRange: u, setSelectedDateRange: y } = fe(), { isCopyLoaded: g, isInitialized: p, selectedAccounts: _, setSelectedAccounts: S } = pe(), { trends: L } = R(), [w, E] = h.useState(!1), [G, D] = h.useState(!1), [B, te] = h.useState("Chart"), [H, P] = h.useState(""), [z, X] = h.useState(window.innerHeight), oe = z - (a ? 315 : 345);
666
- we({
664
+ }, fo = R(po), Co = ({ onBackClick: o, sx: s }) => {
665
+ const { onEvent: n } = F(), { isDesktop: t, isTablet: r, isMobile: a } = X(), { visibleAccounts: d } = xe(), { loadMonthlyCategoryTotals: u, monthlyCategoryTotals: i, getCategoryName: h } = Z(), { sortedTransactions: f } = we(), { selectedDateRange: l, setSelectedDateRange: y } = fe(), { isCopyLoaded: g, isInitialized: m, selectedAccounts: _, setSelectedAccounts: T } = pe(), { trends: L } = k(), [I, E] = p.useState(!1), [P, H] = p.useState(!1), [D, $] = p.useState("Chart"), [M, O] = p.useState(""), [N, Q] = p.useState(window.innerHeight), oe = N - (a ? 315 : 345);
666
+ ve({
667
667
  widgetName: "TrendsFullWidget",
668
- isLoaded: w
669
- }), h.useEffect(() => {
670
- const x = () => X(window.innerHeight);
671
- return window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
672
- }, []), h.useEffect(() => {
673
- S(l);
674
- }, [l]), h.useEffect(() => {
675
- p && d(
668
+ isLoaded: I
669
+ }), p.useEffect(() => {
670
+ const w = () => Q(window.innerHeight);
671
+ return window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
672
+ }, []), p.useEffect(() => {
673
+ T(d);
674
+ }, [d]), p.useEffect(() => {
675
+ m && u(
676
676
  _,
677
- u.start,
678
- u.end
677
+ l.start,
678
+ l.end
679
679
  ).finally(() => {
680
680
  E(!0);
681
681
  });
682
- }, [p, _, u]);
683
- const re = h.useMemo(() => {
684
- if (!w) return { stackedDatasets: [], unstackedDatasets: [] };
685
- const x = Lt(
686
- c,
687
- u.start,
688
- u.end
689
- ), N = H.length ? x.filter(
690
- (K) => K.top_level_category_guid === H || K.category_guid === H
691
- ) : Et(x);
682
+ }, [m, _, l]);
683
+ const re = p.useMemo(() => {
684
+ if (!I) return { stackedDatasets: [], unstackedDatasets: [] };
685
+ const w = Lt(
686
+ i,
687
+ l.start,
688
+ l.end
689
+ ), G = M.length ? w.filter(
690
+ (Y) => Y.top_level_category_guid === M || Y.category_guid === M
691
+ ) : Et(w);
692
692
  return {
693
- stackedDatasets: N.filter(Dt),
694
- unstackedDatasets: N.filter(Mt)
693
+ stackedDatasets: G.filter(Dt),
694
+ unstackedDatasets: G.filter(Mt)
695
695
  };
696
- }, [c, H, u]), Z = (x, N) => {
697
- te(N ?? B), n(v.TRENDS_CLICK_TOGGLE_VIEW);
698
- }, le = (x) => {
699
- const N = Ue(x?.[0], 1), K = x?.[1], de = ke(K, N);
700
- y({ start: N, end: K }), n(v.TRENDS_CLICK_TIME_WINDOW, {
696
+ }, [i, M, l]), q = (w, G) => {
697
+ $(G ?? D), n(x.TRENDS_CLICK_TOGGLE_VIEW);
698
+ }, le = (w) => {
699
+ const G = Ue(w?.[0], 1), Y = w?.[1], de = ke(Y, G);
700
+ y({ start: G, end: Y }), n(x.TRENDS_CLICK_TIME_WINDOW, {
701
701
  time_period: de + "M"
702
702
  });
703
703
  }, ne = () => {
704
- n(v.TRENDS_CLICK_FILTER);
705
- }, $ = (x) => {
706
- P(x);
707
- }, ae = (x) => {
708
- P(x), n(v.TRENDS_CLICK_LEGEND, { category: m(x) });
709
- }, Q = (x) => {
710
- n(v.TRENDS_HOVER_LEGEND, { category: m(x) });
711
- }, ie = (x) => {
712
- n(v.TRENDS_HOVER_AREA, { category: x });
713
- }, q = (x) => {
714
- n(v.TRENDS_HOVER_POINT, { category: x });
704
+ n(x.TRENDS_CLICK_FILTER);
705
+ }, K = (w) => {
706
+ O(w);
707
+ }, ae = (w) => {
708
+ O(w), n(x.TRENDS_CLICK_LEGEND, { category: h(w) });
709
+ }, J = (w) => {
710
+ n(x.TRENDS_HOVER_LEGEND, { category: h(w) });
711
+ }, ie = (w) => {
712
+ n(x.TRENDS_HOVER_AREA, { category: w });
713
+ }, ee = (w) => {
714
+ n(x.TRENDS_HOVER_POINT, { category: w });
715
715
  };
716
- return !g || !p || !w ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ C(
717
- nt,
716
+ return !g || !m || !I ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ C(
717
+ st,
718
718
  {
719
- accountOptions: l,
719
+ accountOptions: d,
720
720
  calendarActions: { onRangeChanged: le },
721
- dateRange: u,
721
+ dateRange: l,
722
722
  dateRangeVariant: "timeframebuttons",
723
723
  onAccountsFilterClick: ne,
724
724
  onBackClick: o,
@@ -726,7 +726,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
726
726
  title: L.title,
727
727
  children: [
728
728
  /* @__PURE__ */ C(
729
- T,
729
+ S,
730
730
  {
731
731
  sx: {
732
732
  // eslint-disable-next-line no-nested-ternary
@@ -734,49 +734,49 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
734
734
  },
735
735
  children: [
736
736
  /* @__PURE__ */ C(
737
- T,
737
+ S,
738
738
  {
739
739
  flexDirection: "row",
740
740
  justifyContent: "space-between",
741
741
  sx: { pb: a ? 12 : 24, pt: a ? 24 : 48 },
742
742
  children: [
743
743
  /* @__PURE__ */ e(
744
- lt,
744
+ dt,
745
745
  {
746
- selectedCategoryGuid: H,
747
- selectedDateRange: u
746
+ selectedCategoryGuid: M,
747
+ selectedDateRange: l
748
748
  }
749
749
  ),
750
- /* @__PURE__ */ e(ct, { onTabChange: Z, selectedTab: B })
750
+ /* @__PURE__ */ e(lt, { onTabChange: q, selectedTab: D })
751
751
  ]
752
752
  }
753
753
  ),
754
- /* @__PURE__ */ C(T, { alignItems: "center", flexDirection: "row", width: "100%", children: [
755
- /* @__PURE__ */ e(M, { flexGrow: 1, children: H && /* @__PURE__ */ C(be, { onClick: () => P(""), sx: { p: 0, pr: 5 }, children: [
754
+ /* @__PURE__ */ C(S, { alignItems: "center", flexDirection: "row", width: "100%", children: [
755
+ /* @__PURE__ */ e(A, { flexGrow: 1, children: M && /* @__PURE__ */ C(be, { onClick: () => O(""), sx: { p: 0, pr: 5 }, children: [
756
756
  /* @__PURE__ */ e(_e, { name: "arrow_back" }),
757
757
  L.all_categories
758
758
  ] }) }),
759
- /* @__PURE__ */ e(be, { onClick: () => D(!0), sx: { px: 5 }, children: `${L.view_transactions} (${f.length})` })
759
+ /* @__PURE__ */ e(be, { onClick: () => H(!0), sx: { px: 5 }, children: `${L.view_transactions} (${f.length})` })
760
760
  ] }),
761
- /* @__PURE__ */ C(M, { children: [
762
- B === "Chart" && /* @__PURE__ */ e(
761
+ /* @__PURE__ */ C(A, { children: [
762
+ D === "Chart" && /* @__PURE__ */ e(
763
763
  io,
764
764
  {
765
765
  availableHeight: oe,
766
766
  onClickLegend: ae,
767
767
  onHoverArea: ie,
768
- onHoverLegend: Q,
769
- onHoverPoint: q,
768
+ onHoverLegend: J,
769
+ onHoverPoint: ee,
770
770
  stackedDatasets: re.stackedDatasets,
771
771
  unstackedDatasets: re.unstackedDatasets
772
772
  }
773
773
  ),
774
- B === "Table" && /* @__PURE__ */ e(
775
- dt,
774
+ D === "Table" && /* @__PURE__ */ e(
775
+ ut,
776
776
  {
777
- onClickRow: $,
778
- selectedCategory: H,
779
- selectedDateRange: u
777
+ onClickRow: K,
778
+ selectedCategory: M,
779
+ selectedDateRange: l
780
780
  }
781
781
  )
782
782
  ] })
@@ -786,17 +786,17 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
786
786
  /* @__PURE__ */ e(
787
787
  fo,
788
788
  {
789
- categoryGuid: H,
790
- dateRange: u,
791
- isOpen: G,
792
- onClose: () => D(!1)
789
+ categoryGuid: M,
790
+ dateRange: l,
791
+ isOpen: P,
792
+ onClose: () => H(!1)
793
793
  }
794
794
  )
795
795
  ]
796
796
  }
797
797
  );
798
- }, Bn = A(Co), yo = () => {
799
- const { monthlyCategoryTotals: o } = U(), { trends: s } = R(), n = ce(), { availableHeight: t = 300 } = Qe(), r = At(o);
798
+ }, Bn = R(Co), yo = () => {
799
+ const { monthlyCategoryTotals: o } = Z(), { trends: s } = k(), n = ce(), { availableHeight: t = 300 } = Qe(), r = At(o);
800
800
  return /* @__PURE__ */ e(
801
801
  Oe,
802
802
  {
@@ -813,28 +813,28 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
813
813
  valueFormatterString: "0,0"
814
814
  }
815
815
  );
816
- }, _o = A(yo), bo = ({ onPrimaryCtaClick: o, sx: s }) => {
817
- const { visibleAccounts: n } = ve(), { loadMonthlyCategoryTotals: t, monthlyTotalsLoaded: r } = U(), { isInitialized: a } = We(), { trends: l } = R(), { isCopyLoaded: d, selectedAccounts: c, setSelectedAccounts: m } = pe();
818
- return we({
816
+ }, _o = R(yo), bo = ({ onPrimaryCtaClick: o, sx: s }) => {
817
+ const { visibleAccounts: n } = xe(), { loadMonthlyCategoryTotals: t, monthlyTotalsLoaded: r } = Z(), { isInitialized: a } = We(), { trends: d } = k(), { isCopyLoaded: u, selectedAccounts: i, setSelectedAccounts: h } = pe();
818
+ return ve({
819
819
  widgetName: "TrendsMiniWidget",
820
820
  isLoaded: r
821
- }), h.useEffect(() => {
822
- m(n);
823
- }, [n]), h.useEffect(() => {
824
- a && t(c).finally();
825
- }, [a, c]), !d || !a ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ e(
821
+ }), p.useEffect(() => {
822
+ h(n);
823
+ }, [n]), p.useEffect(() => {
824
+ a && t(i).finally();
825
+ }, [a, i]), !u || !a ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ e(
826
826
  Wt,
827
827
  {
828
828
  contentStyles: { height: "calc(100% - 72px)", ":last-child": { pb: 0 } },
829
829
  onPrimaryCtaClick: o,
830
- primaryCtaLabel: l.primary_cta,
831
- subTitle: l.sub_title,
830
+ primaryCtaLabel: d.primary_cta,
831
+ subTitle: d.sub_title,
832
832
  sx: { height: "100%", ...s },
833
- title: l.mini_title,
833
+ title: d.mini_title,
834
834
  children: r ? /* @__PURE__ */ e(_o, {}) : /* @__PURE__ */ e(me, {})
835
835
  }
836
836
  );
837
- }, Vn = A(bo), To = 70, Ke = ({
837
+ }, Vn = R(bo), To = 70, Ke = ({
838
838
  title: o,
839
839
  totalAmount: s,
840
840
  transactionType: n,
@@ -842,12 +842,12 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
842
842
  secondaryLabel: r,
843
843
  shouldDisplayPercentage: a
844
844
  }) => {
845
- const { availableWidth: l } = Qe(), d = h.useRef(null), c = h.useRef(null), m = wt(Number(Math.abs(t)), {
845
+ const { availableWidth: d } = Qe(), u = p.useRef(null), i = p.useRef(null), h = vt(Number(Math.abs(t)), {
846
846
  style: "percent",
847
847
  minimumIntegerDigits: 1
848
- }), f = l === 288 && se(s, "0,0.00").length > 10 ? se(s, "0,0") : se(s, "0,0.00"), u = n === "spending" ? t > 0 : t >= 0, y = n === "spending" ? "error.main" : "success.main", g = n === "spending" ? "success.main" : "text.secondary", p = d?.current, _ = c?.current, S = p && _ ? p.scrollWidth > _.clientWidth - To : !1;
848
+ }), f = d === 288 && se(s, "0,0.00").length > 10 ? se(s, "0,0") : se(s, "0,0.00"), l = n === "spending" ? t > 0 : t >= 0, y = n === "spending" ? "error.main" : "success.main", g = n === "spending" ? "success.main" : "text.secondary", m = u?.current, _ = i?.current, T = m && _ ? m.scrollWidth > _.clientWidth - To : !1;
849
849
  return /* @__PURE__ */ C(
850
- T,
850
+ S,
851
851
  {
852
852
  sx: {
853
853
  border: 1,
@@ -860,7 +860,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
860
860
  },
861
861
  children: [
862
862
  /* @__PURE__ */ C(
863
- T,
863
+ S,
864
864
  {
865
865
  sx: {
866
866
  alignItems: "center",
@@ -869,17 +869,17 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
869
869
  },
870
870
  children: [
871
871
  /* @__PURE__ */ e(ge, { color: "text.secondary", variant: "caption", children: o }),
872
- a && /* @__PURE__ */ C(T, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
873
- u ? /* @__PURE__ */ e(Gt, { size: 20, sx: { color: y } }) : /* @__PURE__ */ e(Bt, { size: 20, sx: { color: g } }),
872
+ a && /* @__PURE__ */ C(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
873
+ l ? /* @__PURE__ */ e(Gt, { size: 20, sx: { color: y } }) : /* @__PURE__ */ e(Bt, { size: 20, sx: { color: g } }),
874
874
  /* @__PURE__ */ e(
875
875
  ge,
876
876
  {
877
877
  sx: {
878
- color: u ? y : g,
878
+ color: l ? y : g,
879
879
  fontWeight: 600
880
880
  },
881
881
  variant: "body2",
882
- children: m
882
+ children: h
883
883
  }
884
884
  )
885
885
  ] })
@@ -887,9 +887,9 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
887
887
  }
888
888
  ),
889
889
  /* @__PURE__ */ C(
890
- T,
890
+ S,
891
891
  {
892
- ref: c,
892
+ ref: i,
893
893
  sx: {
894
894
  alignItems: "center",
895
895
  flexDirection: "row",
@@ -897,17 +897,17 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
897
897
  },
898
898
  children: [
899
899
  /* @__PURE__ */ e(
900
- M,
900
+ A,
901
901
  {
902
- ref: d,
902
+ ref: u,
903
903
  sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
904
904
  children: /* @__PURE__ */ e(je, { children: f })
905
905
  }
906
906
  ),
907
- a && l >= 450 && !S && /* @__PURE__ */ e(
907
+ a && d >= 450 && !T && /* @__PURE__ */ e(
908
908
  ge,
909
909
  {
910
- color: u ? y : g,
910
+ color: l ? y : g,
911
911
  variant: "caption",
912
912
  children: r
913
913
  }
@@ -918,53 +918,53 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
918
918
  ]
919
919
  }
920
920
  );
921
- }, So = A(() => {
922
- const { trends: o } = R();
923
- return /* @__PURE__ */ C(T, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
921
+ }, So = R(() => {
922
+ const { trends: o } = k();
923
+ return /* @__PURE__ */ C(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
924
924
  /* @__PURE__ */ e(Vt, { size: 32 }),
925
- /* @__PURE__ */ C(T, { children: [
925
+ /* @__PURE__ */ C(S, { children: [
926
926
  /* @__PURE__ */ e(ge, { fontWeight: 600, variant: "body1", children: o.zero_state_content_header }),
927
927
  /* @__PURE__ */ e(ge, { color: "text.secondary", variant: "subtitle2", children: o.zero_state_content_description })
928
928
  ] })
929
929
  ] });
930
- }), Pn = A(({ onCtaClick: o }) => {
931
- const { visibleAccounts: s } = ve(), { onEvent: n } = V(), { monthlyCategoryTotals: t, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: a } = U(), l = {
930
+ }), Pn = R(({ onCtaClick: o }) => {
931
+ const { visibleAccounts: s } = xe(), { onEvent: n } = F(), { monthlyCategoryTotals: t, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: a } = Z(), d = {
932
932
  start: Ot(/* @__PURE__ */ new Date(), 1),
933
933
  end: /* @__PURE__ */ new Date()
934
- }, { trends: d } = R(), { selectedAccounts: c, setSelectedAccounts: m, isInitialized: f } = pe();
935
- we({
934
+ }, { trends: u } = k(), { selectedAccounts: i, setSelectedAccounts: h, isInitialized: f } = pe();
935
+ ve({
936
936
  widgetName: "TrendsMicroWidget",
937
937
  isLoaded: a
938
- }), h.useEffect(() => {
939
- m(s);
940
- }, [s]), h.useEffect(() => {
941
- f && r(c, l.start).then(() => {
942
- n(v.TRENDS_LOAD_WIDGET, {
938
+ }), p.useEffect(() => {
939
+ h(s);
940
+ }, [s]), p.useEffect(() => {
941
+ f && r(i, d.start).then(() => {
942
+ n(x.TRENDS_LOAD_WIDGET, {
943
943
  state: s?.length ? "default" : "zeroState"
944
944
  });
945
945
  });
946
- }, [f, c]);
947
- const { spendingData: u, incomeData: y } = h.useMemo(
946
+ }, [f, i]);
947
+ const { spendingData: l, incomeData: y } = p.useMemo(
948
948
  () => ({
949
- spendingData: et(t, l),
950
- incomeData: tt(t, l)
949
+ spendingData: tt(t, d),
950
+ incomeData: ot(t, d)
951
951
  }),
952
- [t, l]
953
- ), [g, p] = u, [_, S] = y, L = Pe(p.y, g.y), w = Pe(S.y, _.y), E = f && !s?.length, G = () => {
952
+ [t, d]
953
+ ), [g, m] = l, [_, T] = y, L = Pe(m.y, g.y), I = Pe(T.y, _.y), E = f && !s?.length, P = () => {
954
954
  n(
955
- E ? v.TRENDS_CLICK_GET_STARTED : v.TRENDS_CLICK_VIEW_MORE
955
+ E ? x.TRENDS_CLICK_GET_STARTED : x.TRENDS_CLICK_VIEW_MORE
956
956
  ), o();
957
957
  };
958
958
  return !a || !f ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ e(
959
959
  zt,
960
960
  {
961
961
  className: "mx-trends-microwidget",
962
- ctaLabel: d.micro_primary_cta_label,
963
- onCTAClick: G,
964
- subHeader: E ? void 0 : d.micro_subheader,
965
- title: d.title,
962
+ ctaLabel: u.micro_primary_cta_label,
963
+ onCTAClick: P,
964
+ subHeader: E ? void 0 : u.micro_subheader,
965
+ title: u.title,
966
966
  children: E ? /* @__PURE__ */ e(So, {}) : /* @__PURE__ */ C(
967
- T,
967
+ S,
968
968
  {
969
969
  sx: {
970
970
  alignItems: "stretch",
@@ -976,21 +976,21 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
976
976
  Ke,
977
977
  {
978
978
  percentage: L,
979
- secondaryLabel: d.micro_secondary_label,
980
- shouldDisplayPercentage: p.y !== 0 && g.y !== 0,
981
- title: d.spending_label,
982
- totalAmount: p.y,
979
+ secondaryLabel: u.micro_secondary_label,
980
+ shouldDisplayPercentage: m.y !== 0 && g.y !== 0,
981
+ title: u.spending_label,
982
+ totalAmount: m.y,
983
983
  transactionType: "spending"
984
984
  }
985
985
  ),
986
986
  /* @__PURE__ */ e(
987
987
  Ke,
988
988
  {
989
- percentage: w,
990
- secondaryLabel: d.micro_secondary_label,
991
- shouldDisplayPercentage: S.y !== 0 && _.y !== 0,
992
- title: d.income_label,
993
- totalAmount: S.y,
989
+ percentage: I,
990
+ secondaryLabel: u.micro_secondary_label,
991
+ shouldDisplayPercentage: T.y !== 0 && _.y !== 0,
992
+ title: u.income_label,
993
+ totalAmount: T.y,
994
994
  transactionType: "income"
995
995
  }
996
996
  )
@@ -999,15 +999,15 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
999
999
  )
1000
1000
  }
1001
1001
  );
1002
- }), xo = A(
1002
+ }), wo = R(
1003
1003
  ({ isExpanded: o, onClick: s }) => {
1004
- const n = at();
1004
+ const n = it();
1005
1005
  return /* @__PURE__ */ e(Yt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(jt, { onClick: s, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
1006
- T,
1006
+ S,
1007
1007
  {
1008
1008
  sx: { color: n.palette.primary.main, flexDirection: "row", alignItems: "center" },
1009
1009
  children: [
1010
- /* @__PURE__ */ e(Xt, { children: /* @__PURE__ */ e(F, { bold: !0, variant: "body2", children: o ? "View less" : "View more" }) }),
1010
+ /* @__PURE__ */ e(Xt, { children: /* @__PURE__ */ e(z, { bold: !0, variant: "body2", children: o ? "View less" : "View more" }) }),
1011
1011
  /* @__PURE__ */ e(Ut, { sx: { color: n.palette.primary.main }, children: o ? /* @__PURE__ */ e(Pt, {}) : /* @__PURE__ */ e(
1012
1012
  Ft,
1013
1013
  {
@@ -1021,7 +1021,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1021
1021
  }
1022
1022
  ) }) });
1023
1023
  }
1024
- ), Ye = A(
1024
+ ), Ye = R(
1025
1025
  ({
1026
1026
  totalAmount: o,
1027
1027
  guid: s,
@@ -1029,106 +1029,106 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1029
1029
  transactions: t,
1030
1030
  onClick: r,
1031
1031
  isLastItem: a = !1,
1032
- showDivider: l = !0
1032
+ showDivider: d = !0
1033
1033
  }) => {
1034
- const { trends: d } = R(), { onEvent: c } = V(), m = `${t.length} ${t.length === 1 ? d.transaction : d.transactions}`, f = () => {
1035
- r?.(), c(v.TRENDS_CLICK_LIST_ITEM, {
1036
- ...O,
1034
+ const { trends: u } = k(), { onEvent: i } = F(), h = `${t.length} ${t.length === 1 ? u.transaction : u.transactions}`, f = () => {
1035
+ r?.(), i(x.TRENDS_CLICK_LIST_ITEM, {
1036
+ ...V,
1037
1037
  listItem: n
1038
1038
  });
1039
1039
  };
1040
- return /* @__PURE__ */ C(h.Fragment, { children: [
1040
+ return /* @__PURE__ */ C(p.Fragment, { children: [
1041
1041
  /* @__PURE__ */ e(
1042
- Je,
1042
+ et,
1043
1043
  {
1044
1044
  leftIcon: s ? /* @__PURE__ */ e(Se, { categoryGuid: s }) : void 0,
1045
1045
  onClick: f,
1046
1046
  rightContent: se(Math.abs(o), "0,0.00"),
1047
- rightIcon: r ? /* @__PURE__ */ e(Ct, {}) : void 0,
1048
- subtitle: m,
1047
+ rightIcon: r ? /* @__PURE__ */ e(yt, {}) : void 0,
1048
+ subtitle: h,
1049
1049
  title: n
1050
1050
  }
1051
1051
  ),
1052
- l && /* @__PURE__ */ e(He, { sx: { ml: a ? 24 : 68 } })
1052
+ d && /* @__PURE__ */ e(He, { sx: { ml: a ? 24 : 68 } })
1053
1053
  ] }, s);
1054
1054
  }
1055
- ), vo = A(
1055
+ ), xo = R(
1056
1056
  ({ availableHeight: o = 0, onCategoryClick: s }) => {
1057
- const { collapsedCategories: n, visibleCategories: t, setVisibleListLength: r } = fe(), { isLargeDesktop: a, isDesktop: l } = ee(), { trends: d } = R(), { onEvent: c } = V(), [m, f] = h.useState(!1), u = l || a;
1058
- h.useEffect(() => {
1059
- const p = Math.floor(o / 64) - 1, _ = t.length + n.length;
1060
- p !== t.length && (r(u ? Math.max(p, 5) : 5), f(p >= _));
1057
+ const { collapsedCategories: n, visibleCategories: t, setVisibleListLength: r } = fe(), { isLargeDesktop: a, isDesktop: d } = X(), { trends: u } = k(), { onEvent: i } = F(), [h, f] = p.useState(!1), l = d || a;
1058
+ p.useEffect(() => {
1059
+ const m = Math.floor(o / 64) - 1, _ = t.length + n.length;
1060
+ m !== t.length && (r(l ? Math.max(m, 5) : 5), f(m >= _));
1061
1061
  }, [o]);
1062
1062
  const y = () => {
1063
- f(!m), c(v.TRENDS_CLICK_VIEW_MORE, {
1064
- ...O
1063
+ f(!h), i(x.TRENDS_CLICK_VIEW_MORE, {
1064
+ ...V
1065
1065
  });
1066
- }, g = t.length + (m ? n.length : 0);
1067
- return /* @__PURE__ */ e(T, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(Kt, { children: [
1068
- /* @__PURE__ */ e(T, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(je, { children: d.categories }) }),
1069
- t.map((p, _) => /* @__PURE__ */ e(
1066
+ }, g = t.length + (h ? n.length : 0);
1067
+ return /* @__PURE__ */ e(S, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(Kt, { children: [
1068
+ /* @__PURE__ */ e(S, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(je, { children: u.categories }) }),
1069
+ t.map((m, _) => /* @__PURE__ */ e(
1070
1070
  Ye,
1071
1071
  {
1072
- ...p,
1072
+ ...m,
1073
1073
  isLastItem: _ === g - 1,
1074
- onClick: p.transactions.length > 0 ? () => s(p) : void 0,
1074
+ onClick: m.transactions.length > 0 ? () => s(m) : void 0,
1075
1075
  showDivider: !0
1076
1076
  },
1077
- p.guid
1077
+ m.guid
1078
1078
  )),
1079
1079
  /* @__PURE__ */ e(
1080
1080
  $t,
1081
1081
  {
1082
- in: m,
1082
+ in: h,
1083
1083
  sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
1084
- children: n.map((p, _) => {
1085
- const S = t.length + _;
1084
+ children: n.map((m, _) => {
1085
+ const T = t.length + _;
1086
1086
  return /* @__PURE__ */ e(
1087
1087
  Ye,
1088
1088
  {
1089
- ...p,
1090
- isLastItem: S === g - 1,
1091
- onClick: p.transactions.length > 0 ? () => s(p) : void 0,
1089
+ ...m,
1090
+ isLastItem: T === g - 1,
1091
+ onClick: m.transactions.length > 0 ? () => s(m) : void 0,
1092
1092
  showDivider: !0
1093
1093
  },
1094
- p.guid
1094
+ m.guid
1095
1095
  );
1096
1096
  })
1097
1097
  }
1098
1098
  ),
1099
- n.length > 0 && /* @__PURE__ */ e(xo, { isExpanded: m, onClick: y })
1099
+ n.length > 0 && /* @__PURE__ */ e(wo, { isExpanded: h, onClick: y })
1100
1100
  ] }) });
1101
1101
  }
1102
- ), wo = ({ beats: o, onInsightCardClick: s }) => {
1103
- const { onEvent: n } = V(), { isMobile: t, isDesktop: r, isLargeDesktop: a } = ee(), { beatStore: l, endpoint: d, sessionToken: c } = We(), m = r || a, f = m || t ? 1 : 2, u = () => null, y = (w) => {
1104
- s?.(w), n(v.TRENDS_CLICK_INSIGHT, O);
1105
- }, g = m ? 200 : 170, p = m ? 170 : 124, _ = m ? 56 : 0, S = o.length > 0 ? g + _ : p, L = m && o.length > 0 ? g : void 0;
1106
- return /* @__PURE__ */ e(Zt, { sx: { height: S }, children: /* @__PURE__ */ e(
1102
+ ), vo = ({ beats: o, onInsightCardClick: s }) => {
1103
+ const { onEvent: n } = F(), { isMobile: t, isDesktop: r, isLargeDesktop: a } = X(), { beatStore: d, endpoint: u, sessionToken: i } = We(), h = r || a, f = h || t ? 1 : 2, l = () => null, y = (I) => {
1104
+ s?.(I), n(x.TRENDS_CLICK_INSIGHT, V);
1105
+ }, g = h ? 200 : 170, m = h ? 170 : 124, _ = h ? 56 : 0, T = o.length > 0 ? g + _ : m, L = h && o.length > 0 ? g : void 0;
1106
+ return /* @__PURE__ */ e(Zt, { sx: { height: T }, children: /* @__PURE__ */ e(
1107
1107
  Nt,
1108
1108
  {
1109
- areBeatsLoading: l.isLoading,
1109
+ areBeatsLoading: d.isLoading,
1110
1110
  beats: o,
1111
- endpoint: d,
1111
+ endpoint: u,
1112
1112
  heightOverrides: L,
1113
- logOutUser: u,
1113
+ logOutUser: l,
1114
1114
  onCardClick: y,
1115
1115
  showBorder: !0,
1116
1116
  showCTAColocatedWithText: !1,
1117
1117
  showCarouselControls: !0,
1118
- showHeader: m,
1118
+ showHeader: h,
1119
1119
  showIcon: !0,
1120
1120
  showWithMargin: !1,
1121
- token: c,
1121
+ token: i,
1122
1122
  userHasFullInsightFeedBeats: !1,
1123
1123
  variant: "outlined",
1124
1124
  visibleCardsCount: f
1125
1125
  }
1126
1126
  ) });
1127
- }, Io = A(wo), Lo = A(({ chartLabel: o, chartColor: s }) => {
1128
- const { onEvent: n } = V(), {
1127
+ }, Io = R(vo), Lo = R(({ chartLabel: o, chartColor: s }) => {
1128
+ const { onEvent: n } = F(), {
1129
1129
  categoryDetailsChartData: { monthlyAmounts: t, tooltipLabels: r }
1130
1130
  } = fe();
1131
- return /* @__PURE__ */ e(T, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
1131
+ return /* @__PURE__ */ e(S, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
1132
1132
  Oe,
1133
1133
  {
1134
1134
  baseline: "min",
@@ -1142,7 +1142,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1142
1142
  stroke: s
1143
1143
  }),
1144
1144
  onItemClick: () => {
1145
- n(v.TRENDS_CLICK_CHART, O);
1145
+ n(x.TRENDS_CLICK_CHART, V);
1146
1146
  },
1147
1147
  showArea: !0,
1148
1148
  showAverage: !0,
@@ -1157,100 +1157,100 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1157
1157
  valueFormatterString: "0,0"
1158
1158
  }
1159
1159
  ) });
1160
- }), Eo = A(({ onClose: o }) => {
1161
- const s = at(), { onEvent: n } = V(), { common: t, trends: r } = R(), { selectedCategoryData: a, selectedDateRangeMonthRange: l } = fe(), { sortedTransactions: d } = xe(), [c, m] = h.useState(null);
1162
- if (!a)
1160
+ }), Eo = R(({ onClose: o }) => {
1161
+ const s = it(), { is_mobile_webview: n } = qe(), { isDesktop: t, isSmallTablet: r, isTablet: a } = X(), { onEvent: d } = F(), { common: u, trends: i } = k(), { selectedCategoryData: h, selectedDateRangeMonthRange: f } = fe(), { sortedTransactions: l } = we(), [y, g] = p.useState(null);
1162
+ if (!h)
1163
1163
  return null;
1164
- const { guid: f, name: u, is_income: y, totalAmount: g } = a, p = y ? r.category_income : r.category_spending, _ = qt(f, s), S = y ? r.income_label : r.spending_label, L = ` ${a.transactions.length === 1 ? r.transaction : r.transactions} (${a.transactions.length})`, w = h.useMemo(
1165
- () => d.find((D) => D.guid === c),
1166
- [c, d]
1167
- ), E = (D) => D.category_guid === f || D.top_level_category_guid === f, G = () => {
1168
- o?.(), n(v.TRENDS_CLICK_BACK, O);
1164
+ const { guid: m, name: _, is_income: T, totalAmount: L } = h, I = T ? i.category_income : i.category_spending, E = qt(m, s), P = T ? i.income_label : i.spending_label, H = ` ${h.transactions.length === 1 ? i.transaction : i.transactions} (${h.transactions.length})`, D = p.useMemo(
1165
+ () => l.find((N) => N.guid === y),
1166
+ [y, l]
1167
+ ), $ = l.length > 0 && !n && (t || a && !r), M = (N) => N.category_guid === m || N.top_level_category_guid === m, O = () => {
1168
+ o?.(), d(x.TRENDS_CLICK_BACK, V);
1169
1169
  };
1170
1170
  return /* @__PURE__ */ C(
1171
1171
  Ne,
1172
1172
  {
1173
- ariaLabelClose: r.close_category_details,
1173
+ ariaLabelClose: i.close_category_details,
1174
1174
  isOpen: !0,
1175
- onClose: G,
1175
+ onClose: O,
1176
1176
  shouldShowHeaderShadow: !0,
1177
- title: p,
1177
+ title: I,
1178
1178
  children: [
1179
- /* @__PURE__ */ C(T, { sx: { alignItems: "center", height: "100%" }, children: [
1179
+ /* @__PURE__ */ C(S, { sx: { alignItems: "center", height: "100%" }, children: [
1180
1180
  /* @__PURE__ */ C(Qt, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
1181
1181
  /* @__PURE__ */ e(
1182
- Je,
1182
+ et,
1183
1183
  {
1184
- leftIcon: /* @__PURE__ */ e(Se, { categoryGuid: f }),
1185
- rightContent: se(Math.abs(g), "0,0.00"),
1186
- subtitle: l,
1187
- title: u
1184
+ leftIcon: /* @__PURE__ */ e(Se, { categoryGuid: m }),
1185
+ rightContent: se(Math.abs(L), "0,0.00"),
1186
+ subtitle: f,
1187
+ title: _
1188
1188
  }
1189
1189
  ),
1190
- /* @__PURE__ */ e(Lo, { chartColor: _, chartLabel: S }),
1191
- /* @__PURE__ */ C(T, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
1192
- /* @__PURE__ */ e(F, { bold: !0, variant: "body1", children: L }),
1193
- /* @__PURE__ */ e(Jt, { filter: E })
1190
+ /* @__PURE__ */ e(Lo, { chartColor: E, chartLabel: P }),
1191
+ /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
1192
+ /* @__PURE__ */ e(z, { bold: !0, variant: "body1", children: H }),
1193
+ $ && /* @__PURE__ */ e(Jt, { filter: M })
1194
1194
  ] })
1195
1195
  ] }),
1196
1196
  /* @__PURE__ */ e(
1197
- rt,
1197
+ at,
1198
1198
  {
1199
1199
  bgcolor: "transparent",
1200
- filter: E,
1200
+ filter: M,
1201
1201
  height: "calc(100vh - 475px)",
1202
- onClick: m
1202
+ onClick: g
1203
1203
  }
1204
1204
  )
1205
1205
  ] }),
1206
1206
  /* @__PURE__ */ e(
1207
1207
  Ne,
1208
1208
  {
1209
- ariaLabelClose: t.close_aria,
1210
- isOpen: !!w,
1211
- onClose: () => m(""),
1212
- title: r.transaction,
1213
- children: w && /* @__PURE__ */ e(st, { transaction: w })
1209
+ ariaLabelClose: u.close_aria,
1210
+ isOpen: !!D,
1211
+ onClose: () => g(""),
1212
+ title: i.transaction,
1213
+ children: D && /* @__PURE__ */ e(rt, { transaction: D })
1214
1214
  }
1215
1215
  )
1216
1216
  ]
1217
1217
  }
1218
1218
  );
1219
1219
  }), Do = (o, s) => {
1220
- const n = tt(o, s), t = et(o, s);
1220
+ const n = ot(o, s), t = tt(o, s);
1221
1221
  return [n, t].filter((r) => r.length > 0);
1222
1222
  }, Mo = (o, s) => {
1223
- const [n, t] = o, r = n, a = t ?? n, l = [];
1223
+ const [n, t] = o, r = n, a = t ?? n, d = [];
1224
1224
  if (r) {
1225
- const d = r.reduce((c, m) => c + m.y, 0);
1226
- l.push({ label: s.income_label, amount: d });
1225
+ const u = r.reduce((i, h) => i + h.y, 0);
1226
+ d.push({ label: s.income_label, amount: u });
1227
1227
  }
1228
1228
  if (a) {
1229
- const d = a.reduce((c, m) => c + m.y, 0);
1230
- l.push({ label: s.spending_label, amount: d });
1229
+ const u = a.reduce((i, h) => i + h.y, 0);
1230
+ d.push({ label: s.spending_label, amount: u });
1231
1231
  }
1232
- return l;
1232
+ return d;
1233
1233
  }, Ao = ({
1234
1234
  availableHeight: o = 0,
1235
1235
  minHeight: s = 500,
1236
1236
  selectedDateRange: n,
1237
1237
  totals: t
1238
1238
  }) => {
1239
- const r = ce(), { onEvent: a } = V(), { trends: l } = R(), { isSmallMobile: d, isMobile: c, isSmallTablet: m, isTablet: f } = ee(), u = [r.palette.chart?.chart1, r.palette.chart?.chart2], y = Do(t, n), g = Mo(y, l), [p, _] = h.useState(0), S = 458, L = 195, w = 56, E = c || d ? L : m || f ? S : p;
1240
- return h.useEffect(() => {
1241
- const D = Math.max(o - w, s);
1242
- _(D);
1239
+ const r = ce(), { onEvent: a } = F(), { trends: d } = k(), { isSmallMobile: u, isMobile: i, isSmallTablet: h, isTablet: f } = X(), l = [r.palette.chart?.chart1, r.palette.chart?.chart2], y = Do(t, n), g = Mo(y, d), [m, _] = p.useState(0), T = 458, L = 195, I = 56, E = i || u ? L : h || f ? T : m;
1240
+ return p.useEffect(() => {
1241
+ const H = Math.max(o - I, s);
1242
+ _(H);
1243
1243
  }, [o]), /* @__PURE__ */ e(
1244
1244
  Oe,
1245
1245
  {
1246
1246
  baseline: "min",
1247
- colors: u,
1247
+ colors: l,
1248
1248
  curveType: "bump",
1249
1249
  datasets: y,
1250
1250
  height: E,
1251
1251
  labels: g,
1252
1252
  onItemClick: () => {
1253
- a(v.TRENDS_CLICK_CHART, O);
1253
+ a(x.TRENDS_CLICK_CHART, V);
1254
1254
  },
1255
1255
  showArea: !0,
1256
1256
  showAxisHighlight: !0,
@@ -1263,7 +1263,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1263
1263
  valueFormatterString: "0.0a"
1264
1264
  }
1265
1265
  );
1266
- }, Ro = A(Ao), ko = [
1266
+ }, Ro = R(Ao), ko = [
1267
1267
  "BillAmountNotStandard",
1268
1268
  "CategorySpendingV2",
1269
1269
  "CostOfLivingToIncome",
@@ -1298,149 +1298,149 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1298
1298
  "WeeklyNoSpendDays",
1299
1299
  "WeeklySmallPurchasesSummary"
1300
1300
  ], Ho = ({ onBackClick: o, onInsightCardClick: s, sx: n }) => {
1301
- const { onEvent: t } = V(), { config: r } = xt(), { isLargeDesktop: a, isDesktop: l, isMobile: d } = ee(), { visibleAccounts: c } = ve(), { loadDateRangeCategoryTotals: m, loadMonthlyCategoryTotals: f, monthlyCategoryTotals: u } = U(), { setFilter: y } = xe(), { selectedDateRange: g, setSelectedCategoryData: p, setSelectedDateRange: _ } = fe(), {
1302
- isCopyLoaded: S,
1301
+ const { onEvent: t } = F(), { config: r } = qe(), { isLargeDesktop: a, isDesktop: d, isMobile: u } = X(), { visibleAccounts: i } = xe(), { loadDateRangeCategoryTotals: h, loadMonthlyCategoryTotals: f, monthlyCategoryTotals: l } = Z(), { setFilter: y } = we(), { selectedDateRange: g, setSelectedCategoryData: m, setSelectedDateRange: _ } = fe(), {
1302
+ isCopyLoaded: T,
1303
1303
  isInitialized: L,
1304
- selectedAccounts: w,
1304
+ selectedAccounts: I,
1305
1305
  selectedAccountGuids: E,
1306
- setSelectedAccounts: G
1307
- } = pe(), { trends: D, connect: B } = R(), { beatStore: te } = We(), P = eo() && r.show_insights_widget_in_master, z = l || a, [X, Ce] = h.useState(!1), [oe, re] = h.useState(!1), [Z, le] = h.useState("Chart"), [ne, $] = h.useState(""), [ae, Q] = h.useState(!1), [ie, q] = h.useState(window.innerHeight), x = z ? 56 : 0, N = ie - 208, K = ie - (P ? 550 + x : 266), [de, ye] = h.useState(!1), Ie = r.show_connections_widget_in_master ? "buttons" : "no-buttons", i = h.useMemo(
1308
- () => c && c.length === 0 || u.length === 0,
1309
- [c, u]
1306
+ setSelectedAccounts: P
1307
+ } = pe(), { trends: H, connect: D } = k(), { beatStore: $ } = We(), O = eo() && r.show_insights_widget_in_master, N = d || a, [Q, Ce] = p.useState(!1), [oe, re] = p.useState(!1), [q, le] = p.useState("Chart"), [ne, K] = p.useState(""), [ae, J] = p.useState(!1), [ie, ee] = p.useState(window.innerHeight), w = N ? 56 : 0, G = ie - 208, Y = ie - (O ? 550 + w : 266), [de, ye] = p.useState(!1), Ie = r.show_connections_widget_in_master ? "buttons" : "no-buttons", c = p.useMemo(
1308
+ () => i && i.length === 0 || l.length === 0,
1309
+ [i, l]
1310
1310
  );
1311
- we({
1311
+ ve({
1312
1312
  widgetName: "TrendsWidget",
1313
- isLoaded: X
1314
- }), h.useEffect(() => {
1315
- L && te.loadBeats().finally(() => re(!0));
1313
+ isLoaded: Q
1314
+ }), p.useEffect(() => {
1315
+ L && $.loadBeats().finally(() => re(!0));
1316
1316
  }, [L]);
1317
- const b = h.useMemo(() => oe ? te.getFilteredBeats({ templates: ko }) : [], [oe]);
1318
- h.useEffect(() => {
1319
- const k = () => q(window.innerHeight);
1320
- return window.addEventListener("resize", k), () => window.removeEventListener("resize", k);
1321
- }, []), h.useEffect(() => {
1322
- G(c);
1323
- }, [c]), h.useEffect(() => {
1317
+ const b = p.useMemo(() => oe ? $.getFilteredBeats({ templates: ko }) : [], [oe]);
1318
+ p.useEffect(() => {
1319
+ const W = () => ee(window.innerHeight);
1320
+ return window.addEventListener("resize", W), () => window.removeEventListener("resize", W);
1321
+ }, []), p.useEffect(() => {
1322
+ P(i);
1323
+ }, [i]), p.useEffect(() => {
1324
1324
  L && Promise.all([
1325
- m(
1326
- w,
1325
+ h(
1326
+ I,
1327
1327
  g.start,
1328
1328
  g.end
1329
1329
  ),
1330
- f(w, g.start, g.end)
1330
+ f(I, g.start, g.end)
1331
1331
  ]).finally(() => {
1332
- Ce(!0), t(v.TRENDS_LOAD_WIDGET, {
1333
- ...O,
1332
+ Ce(!0), t(x.TRENDS_LOAD_WIDGET, {
1333
+ ...V,
1334
1334
  time_period: `${ke(g.end, g.start)}M`
1335
1335
  });
1336
1336
  });
1337
- }, [L, w, g]), h.useEffect(() => {
1338
- if (u.length !== 0) {
1339
- const k = {
1337
+ }, [L, I, g]), p.useEffect(() => {
1338
+ if (l.length !== 0) {
1339
+ const W = {
1340
1340
  accounts: E,
1341
1341
  dateRange: { start: g.start, end: g.end }
1342
1342
  };
1343
1343
  y({
1344
- ...k,
1345
- custom: (J) => !!u.find(
1346
- (he) => he.top_level_category_guid === J.top_level_category_guid || he.category_guid === J.category_guid
1344
+ ...W,
1345
+ custom: (te) => !!l.find(
1346
+ (he) => he.top_level_category_guid === te.top_level_category_guid || he.category_guid === te.category_guid
1347
1347
  )
1348
1348
  });
1349
1349
  }
1350
- }, [u]);
1351
- const I = (k) => {
1352
- p(k), Q(!0);
1353
- }, Y = () => {
1354
- p(null), Q(!1);
1350
+ }, [l]);
1351
+ const v = (W) => {
1352
+ m(W), J(!0);
1353
+ }, j = () => {
1354
+ m(null), J(!1);
1355
1355
  }, Le = () => {
1356
- ye(!0), t(v.TRENDS_CLICK_CONNECT_ACCOUNTS);
1357
- }, Ee = (k, J) => {
1358
- le(J ?? Z), t(v.TRENDS_CLICK_TOGGLE_VIEW, {
1359
- ...O,
1360
- toggleView: J
1356
+ ye(!0), t(x.TRENDS_CLICK_CONNECT_ACCOUNTS);
1357
+ }, Ee = (W, te) => {
1358
+ le(te ?? q), t(x.TRENDS_CLICK_TOGGLE_VIEW, {
1359
+ ...V,
1360
+ toggleView: te
1361
1361
  });
1362
- }, ue = (k) => {
1363
- const J = Ue(k?.[0], 1), he = k?.[1], ht = ke(he, J);
1364
- _({ start: J, end: he }), t(v.TRENDS_CLICK_TIME_WINDOW, {
1365
- ...O,
1366
- time_period: ht + "M"
1362
+ }, ue = (W) => {
1363
+ const te = Ue(W?.[0], 1), he = W?.[1], gt = ke(he, te);
1364
+ _({ start: te, end: he }), t(x.TRENDS_CLICK_TIME_WINDOW, {
1365
+ ...V,
1366
+ time_period: gt + "M"
1367
1367
  });
1368
- }, De = (k) => {
1369
- t(v.TRENDS_CLICK_FILTER, {
1370
- ...O,
1371
- filterValue: k
1368
+ }, De = (W) => {
1369
+ t(x.TRENDS_CLICK_FILTER, {
1370
+ ...V,
1371
+ filterValue: W
1372
1372
  });
1373
- }, Me = (k) => {
1374
- $(k);
1375
- }, ut = () => {
1376
- $(""), t(v.TRENDS_CLICK_ALL_CATEGORIES, O);
1373
+ }, Me = (W) => {
1374
+ K(W);
1375
+ }, ht = () => {
1376
+ K(""), t(x.TRENDS_CLICK_ALL_CATEGORIES, V);
1377
1377
  };
1378
- return !S || !X ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ C(
1379
- nt,
1378
+ return !T || !Q ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ C(
1379
+ st,
1380
1380
  {
1381
- accountOptions: c,
1381
+ accountOptions: i,
1382
1382
  calendarActions: { onRangeChanged: ue },
1383
1383
  dateRange: g,
1384
- dateRangeVariant: d ? "timeframetabs" : "timeframebuttons",
1384
+ dateRangeVariant: u ? "timeframetabs" : "timeframebuttons",
1385
1385
  onAccountsFilterClick: De,
1386
1386
  onBackClick: o,
1387
1387
  sx: n,
1388
- title: D.title,
1388
+ title: H.title,
1389
1389
  children: [
1390
- i && /* @__PURE__ */ e(
1390
+ c && /* @__PURE__ */ e(
1391
1391
  to,
1392
1392
  {
1393
- header: D.zero_state_content_header,
1393
+ header: H.zero_state_content_header,
1394
1394
  icon: "",
1395
1395
  onClick: Le,
1396
- primaryButton: D.empty_state_primary,
1397
- subText: D.empty_state_sub_text,
1398
- sx: { height: N },
1396
+ primaryButton: H.empty_state_primary,
1397
+ subText: H.empty_state_sub_text,
1398
+ sx: { height: G },
1399
1399
  variant: Ie
1400
1400
  }
1401
1401
  ),
1402
- !i && /* @__PURE__ */ C(
1403
- T,
1402
+ !c && /* @__PURE__ */ C(
1403
+ S,
1404
1404
  {
1405
1405
  sx: {
1406
- px: d ? 0 : 48
1406
+ px: u ? 0 : 48
1407
1407
  },
1408
1408
  children: [
1409
1409
  /* @__PURE__ */ C(
1410
- T,
1410
+ S,
1411
1411
  {
1412
1412
  flexDirection: "row",
1413
1413
  justifyContent: "space-between",
1414
- sx: { pb: d ? 12 : 24, pt: d ? 24 : 48 },
1414
+ sx: { pb: u ? 12 : 24, pt: u ? 24 : 48 },
1415
1415
  children: [
1416
1416
  /* @__PURE__ */ e(
1417
- lt,
1417
+ dt,
1418
1418
  {
1419
1419
  selectedCategoryGuid: ne,
1420
1420
  selectedDateRange: g
1421
1421
  }
1422
1422
  ),
1423
- /* @__PURE__ */ e(ct, { onTabChange: Ee, selectedTab: Z })
1423
+ /* @__PURE__ */ e(lt, { onTabChange: Ee, selectedTab: q })
1424
1424
  ]
1425
1425
  }
1426
1426
  ),
1427
- /* @__PURE__ */ e(T, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(M, { flexGrow: 1, children: ne && /* @__PURE__ */ C(be, { onClick: ut, sx: { p: 0, pr: 5 }, children: [
1427
+ /* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(A, { flexGrow: 1, children: ne && /* @__PURE__ */ C(be, { onClick: ht, sx: { p: 0, pr: 5 }, children: [
1428
1428
  /* @__PURE__ */ e(_e, { name: "arrow_back" }),
1429
- D.all_categories
1429
+ H.all_categories
1430
1430
  ] }) }) }),
1431
- /* @__PURE__ */ C(T, { flexDirection: z ? "row" : "column", gap: z ? 48 : 16, children: [
1432
- Z === "Chart" && /* @__PURE__ */ C(gt, { children: [
1433
- /* @__PURE__ */ e(M, { sx: { width: z ? "68%" : "100%" }, children: /* @__PURE__ */ e(
1431
+ /* @__PURE__ */ C(S, { flexDirection: N ? "row" : "column", gap: N ? 48 : 16, children: [
1432
+ q === "Chart" && /* @__PURE__ */ C(mt, { children: [
1433
+ /* @__PURE__ */ e(A, { sx: { width: N ? "68%" : "100%" }, children: /* @__PURE__ */ e(
1434
1434
  Ro,
1435
1435
  {
1436
- availableHeight: N,
1436
+ availableHeight: G,
1437
1437
  minHeight: 450,
1438
1438
  selectedDateRange: g,
1439
- totals: u
1439
+ totals: l
1440
1440
  }
1441
1441
  ) }),
1442
- /* @__PURE__ */ C(T, { gap: 16, sx: { width: z ? "32%" : "100%" }, children: [
1443
- P && oe && b.length > 0 && /* @__PURE__ */ e(
1442
+ /* @__PURE__ */ C(S, { gap: 16, sx: { width: N ? "32%" : "100%" }, children: [
1443
+ O && oe && b.length > 0 && /* @__PURE__ */ e(
1444
1444
  Io,
1445
1445
  {
1446
1446
  beats: b,
@@ -1448,16 +1448,16 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1448
1448
  }
1449
1449
  ),
1450
1450
  /* @__PURE__ */ e(
1451
- vo,
1451
+ xo,
1452
1452
  {
1453
- availableHeight: K,
1454
- onCategoryClick: I
1453
+ availableHeight: Y,
1454
+ onCategoryClick: v
1455
1455
  }
1456
1456
  )
1457
1457
  ] })
1458
1458
  ] }),
1459
- Z === "Table" && /* @__PURE__ */ e(M, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1460
- dt,
1459
+ q === "Table" && /* @__PURE__ */ e(A, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1460
+ ut,
1461
1461
  {
1462
1462
  height: "unset",
1463
1463
  onClickRow: Me,
@@ -1466,7 +1466,7 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1466
1466
  }
1467
1467
  ) })
1468
1468
  ] }),
1469
- ae && /* @__PURE__ */ e(Eo, { onClose: Y })
1469
+ ae && /* @__PURE__ */ e(Eo, { onClose: j })
1470
1470
  ]
1471
1471
  }
1472
1472
  ),
@@ -1475,13 +1475,13 @@ const it = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1475
1475
  {
1476
1476
  onClose: () => ye(!1),
1477
1477
  showConnectWidget: de,
1478
- title: B.mini_title
1478
+ title: D.mini_title
1479
1479
  }
1480
1480
  )
1481
1481
  ]
1482
1482
  }
1483
1483
  );
1484
- }, Fn = A(Ho);
1484
+ }, Fn = R(Ho);
1485
1485
  export {
1486
1486
  Bn as TrendsFullWidget,
1487
1487
  Pn as TrendsMicroWidget,