@mx-cartographer/experiences 7.4.1 → 7.4.2

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,37 +1,37 @@
1
- import { jsxs as f, jsx as e, Fragment as rt } from "react/jsx-runtime";
2
- import d, { useRef as at, useState as it, useEffect as ct } from "react";
3
- import { observer as H } from "mobx-react-lite";
4
- import { CategoryIcon as Se, Text as K, Icon as fe, P as he, H3 as Pe, ChevronRightIcon as lt } from "@mxenabled/mxui";
5
- import W from "@mui/material/Box";
1
+ import { jsxs as f, jsx as e, Fragment as st } from "react/jsx-runtime";
2
+ import l, { useRef as rt, useState as at, useEffect as it } from "react";
3
+ import { observer as k } from "mobx-react-lite";
4
+ import { CategoryIcon as Se, Text as K, Icon as fe, P as he, H3 as Pe, ChevronRightIcon as ct } from "@mxenabled/mxui";
5
+ import N from "@mui/material/Box";
6
6
  import b from "@mui/material/Stack";
7
7
  import _e from "@mui/material/Button";
8
8
  import { addSeconds as $e } from "date-fns/addSeconds";
9
9
  import { differenceInCalendarMonths as Ae } from "date-fns/differenceInCalendarMonths";
10
10
  import { useTheme as be } from "@mui/material/styles";
11
- import { LineChart as dt } from "@mui/x-charts";
11
+ import { LineChart as lt } from "@mui/x-charts";
12
12
  import { u as ee } from "../useScreenSize-B6JyS_Lj.mjs";
13
- import { u as ut } from "../useDimensions-27p2evRx.mjs";
14
- import ht from "@mui/material/Card";
15
- import gt from "@mui/material/CardContent";
13
+ import { u as dt } from "../useDimensions-27p2evRx.mjs";
14
+ import ut from "@mui/material/Card";
15
+ import ht from "@mui/material/CardContent";
16
16
  import Re from "@mui/material/Divider";
17
17
  import We from "@mui/material/Grid";
18
- import { u as O, m as U, g as P, b as me, h as xe, d as ve, w as pe, f as He, q as mt, n as pt, a as Ct } from "../hooks-C41HAxM5.mjs";
18
+ import { u as W, m as U, g as P, b as me, h as xe, d as ve, w as pe, f as He, q as gt, n as mt, a as pt } from "../hooks-C41HAxM5.mjs";
19
19
  import { b as Fe } from "../Localization-2MODESHW.mjs";
20
20
  import { C as Te } from "../CurrencyText-kyC1aseI.mjs";
21
- import { useTheme as ze, Card as yt, CardContent as ft, Box as _t, Stack as Tt } from "@mui/material";
21
+ import { useTheme as Ct, Card as yt, CardContent as ft, Box as _t, Stack as Tt } from "@mui/material";
22
22
  import { f as J, a as z } from "../Dialog-BPTr3qHE.mjs";
23
23
  import { C as Me, c as St } from "../Category-CevNQ03n.mjs";
24
24
  import { f as oe, a as bt } from "../NumberFormatting-Buh7u8Oi.mjs";
25
- import { a as xt, g as vt, L as Ke } from "../TrendsStore-BW9FGQeE.mjs";
25
+ import { a as xt, g as vt, L as ze } from "../TrendsStore-BW9FGQeE.mjs";
26
26
  import { T as Gn } from "../TrendsStore-BW9FGQeE.mjs";
27
- import { i as wt, c as Dt, d as It, e as Et, f as Lt, h as Mt, b as je, g as Ye, j as Oe } from "../SpendingData-BuJ03S9d.mjs";
27
+ import { i as wt, c as Dt, d as It, e as Et, f as Lt, h as Mt, b as Ke, g as je, j as Oe } from "../SpendingData-BuJ03S9d.mjs";
28
28
  import At from "@mui/material/ToggleButton";
29
29
  import Rt from "@mui/material/ToggleButtonGroup";
30
30
  import { DataGridPro as kt } from "@mui/x-data-grid-pro";
31
31
  import { H as Ge } from "../HeaderCell-DjuifqHJ.mjs";
32
- import { T as G, b as Ht } from "../ViewMoreMicroCard-dHzKolxh.mjs";
33
- import { A as w, W as Ue } from "../WidgetContainer-6dsjtOVg.mjs";
34
- import { a as Xe, T as Ze } from "../TransactionDetails-CtbBBSoU.mjs";
32
+ import { T as G, b as Ht } from "../ViewMoreMicroCard-C0832BMe.mjs";
33
+ import { A as v, W as Ye } from "../WidgetContainer-6dsjtOVg.mjs";
34
+ import { a as Ue, T as Xe } from "../TransactionDetails-CtbBBSoU.mjs";
35
35
  import { D as ke } from "../Drawer-BEtCk82g.mjs";
36
36
  import { L as ge } from "../Loader-DUaFpDGv.mjs";
37
37
  import { L as Ne } from "../LineChart-DttMO7uS.mjs";
@@ -45,18 +45,18 @@ import Kt from "@mui/material/ListItem";
45
45
  import jt from "@mui/material/ListItemButton";
46
46
  import Yt from "@mui/material/ListItemIcon";
47
47
  import Ut from "@mui/material/ListItemText";
48
- import qe from "@mui/material/styles/useTheme";
48
+ import Ze from "@mui/material/styles/useTheme";
49
49
  import Xt from "@mui/material/Paper";
50
50
  import { b as Zt } from "../CategoryUtil-DUM8NuGO.mjs";
51
51
  import { E as qt } from "../ExportCsvAction-DzTrtPzk.mjs";
52
52
  import { u as Qt } from "../useInsightsEnabled-CNjP5cfR.mjs";
53
53
  import { E as Jt } from "../EmptyState-DoxNUae-.mjs";
54
54
  import { l as eo } from "../ConnectDrawer-CuUj16NH.mjs";
55
- const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
56
- const { categories: t } = O(), { getCategoryName: n } = U(), r = n(o);
55
+ const qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
56
+ const { categories: t } = W(), { getCategoryName: n } = U(), r = n(o);
57
57
  return /* @__PURE__ */ f(b, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
58
58
  /* @__PURE__ */ e(
59
- W,
59
+ N,
60
60
  {
61
61
  "aria-label": Fe(t.category_icon_label_aria, r),
62
62
  mb: 4,
@@ -72,21 +72,21 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
72
72
  cursorPosition: n,
73
73
  chartContainerRef: r
74
74
  }) => {
75
- const u = be(), h = at(null), [g, c] = it({ x: n.x, y: n.y });
76
- if (ct(() => {
75
+ const d = be(), u = rt(null), [g, c] = at({ x: n.x, y: n.y });
76
+ if (it(() => {
77
77
  (() => {
78
- const l = h.current, _ = r.current;
79
- if (!l || !_) return;
80
- const m = l.getBoundingClientRect(), i = _.getBoundingClientRect();
78
+ const p = u.current, _ = r.current;
79
+ if (!p || !_) return;
80
+ const m = p.getBoundingClientRect(), i = _.getBoundingClientRect();
81
81
  let T = n.x, y = n.y;
82
82
  T + m.width * 2 > i.right ? T = n.x - m.width : T - m.width < i.left && (T = n.x), y + m.height * 2 > i.bottom && (y = n.y - m.height), c({ x: T, y });
83
83
  })();
84
84
  }, [n, r]), !t) return null;
85
- const p = t.reduce((C, l) => C + l.y, 0);
85
+ const h = t.reduce((C, p) => C + p.y, 0);
86
86
  return /* @__PURE__ */ e(
87
- ht,
87
+ ut,
88
88
  {
89
- ref: h,
89
+ ref: u,
90
90
  sx: {
91
91
  position: "absolute",
92
92
  top: g.y,
@@ -94,17 +94,17 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
94
94
  width: 250,
95
95
  pointerEvents: "none"
96
96
  },
97
- children: /* @__PURE__ */ f(gt, { children: [
98
- /* @__PURE__ */ f(W, { alignItems: "center", display: "flex", flexDirection: "column", children: [
99
- /* @__PURE__ */ e(Qe, { categoryGuid: o, topLevelCategoryGuid: s }),
97
+ children: /* @__PURE__ */ f(ht, { children: [
98
+ /* @__PURE__ */ f(N, { alignItems: "center", display: "flex", flexDirection: "column", children: [
99
+ /* @__PURE__ */ e(qe, { categoryGuid: o, topLevelCategoryGuid: s }),
100
100
  /* @__PURE__ */ e(K, { variant: "Small", children: `${t.length}-month total` }),
101
- /* @__PURE__ */ e(Te, { amount: p, bold: !0, formatString: "0,0", variant: "body2" })
101
+ /* @__PURE__ */ e(Te, { amount: h, bold: !0, formatString: "0,0", variant: "body2" })
102
102
  ] }),
103
103
  /* @__PURE__ */ e(Re, { sx: { my: 16, width: "100%" } }),
104
- /* @__PURE__ */ e(We, { container: !0, children: t.map((C, l) => /* @__PURE__ */ f(d.Fragment, { children: [
105
- l > 0 && l % 3 === 0 && /* @__PURE__ */ e(Re, { sx: { my: 16, width: "100%" } }),
106
- /* @__PURE__ */ e(We, { item: !0, xs: 4, children: /* @__PURE__ */ f(W, { alignItems: "center", display: "flex", flexDirection: "column", children: [
107
- /* @__PURE__ */ e(K, { color: u.palette.text.secondary, variant: "XSmall", children: C.x }),
104
+ /* @__PURE__ */ e(We, { container: !0, children: t.map((C, p) => /* @__PURE__ */ f(l.Fragment, { children: [
105
+ p > 0 && p % 3 === 0 && /* @__PURE__ */ e(Re, { sx: { my: 16, width: "100%" } }),
106
+ /* @__PURE__ */ e(We, { item: !0, xs: 4, children: /* @__PURE__ */ f(N, { alignItems: "center", display: "flex", flexDirection: "column", children: [
107
+ /* @__PURE__ */ e(K, { color: d.palette.text.secondary, variant: "XSmall", children: C.x }),
108
108
  /* @__PURE__ */ e(
109
109
  Te,
110
110
  {
@@ -115,21 +115,21 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
115
115
  }
116
116
  )
117
117
  ] }) })
118
- ] }, l)) })
118
+ ] }, p)) })
119
119
  ] })
120
120
  }
121
121
  );
122
- }, oo = H(to), no = ({
122
+ }, oo = k(to), no = ({
123
123
  categoryGuids: { guid: o, topLevelGuid: s },
124
124
  itemData: { dataIndex: t },
125
125
  series: n,
126
126
  xData: r
127
127
  }) => {
128
- const u = ze(), h = n.data[t], g = r[t];
129
- return h === void 0 || !g ? null : /* @__PURE__ */ e(yt, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ f(_t, { alignItems: "center", display: "flex", flexDirection: "column", children: [
130
- /* @__PURE__ */ e(Qe, { categoryGuid: o, topLevelCategoryGuid: s }),
131
- /* @__PURE__ */ e(K, { color: u.palette.text.secondary, variant: "Small", children: J(g, z.MONTH_SHORT_YEAR) }),
132
- /* @__PURE__ */ e(Te, { amount: String(h), bold: !0, formatString: "0,0", variant: "Body" })
128
+ const d = Ct(), u = n.data[t], g = r[t];
129
+ return u === void 0 || !g ? null : /* @__PURE__ */ e(yt, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ f(_t, { alignItems: "center", display: "flex", flexDirection: "column", children: [
130
+ /* @__PURE__ */ e(qe, { categoryGuid: o, topLevelCategoryGuid: s }),
131
+ /* @__PURE__ */ e(K, { color: d.palette.text.secondary, variant: "Small", children: J(g, z.MONTH_SHORT_YEAR) }),
132
+ /* @__PURE__ */ e(Te, { amount: String(u), bold: !0, formatString: "0,0", variant: "Body" })
133
133
  ] }) }) });
134
134
  }, so = ({
135
135
  sx: o,
@@ -137,24 +137,24 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
137
137
  hoveredLegend: t,
138
138
  legendRef: n,
139
139
  onHoverLegend: r,
140
- onClickLegend: u
140
+ onClickLegend: d
141
141
  }) => {
142
- const { isMobile: h } = ee(), { getCategoryName: g } = U();
142
+ const { isMobile: u } = ee(), { getCategoryName: g } = U();
143
143
  return /* @__PURE__ */ e(
144
144
  b,
145
145
  {
146
146
  direction: "row",
147
147
  flexWrap: "wrap",
148
- gap: h ? 2 : 6,
148
+ gap: u ? 2 : 6,
149
149
  justifyContent: "start",
150
150
  ref: n,
151
151
  sx: o,
152
- children: s.map(({ guid: c, top_level_guid: p }) => {
153
- const C = t === c, l = Me[c], _ = Me[p], m = l ?? _ ?? Me.default, i = m + "33";
152
+ children: s.map(({ guid: c, top_level_guid: h }) => {
153
+ const C = t === c, p = Me[c], _ = Me[h], m = p ?? _ ?? Me.default, i = m + "33";
154
154
  return /* @__PURE__ */ f(
155
155
  _e,
156
156
  {
157
- onClick: () => u(c),
157
+ onClick: () => d(c),
158
158
  onMouseEnter: () => r(c),
159
159
  onMouseLeave: () => r(null),
160
160
  sx: {
@@ -170,12 +170,12 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
170
170
  },
171
171
  children: [
172
172
  /* @__PURE__ */ e(
173
- W,
173
+ N,
174
174
  {
175
175
  sx: {
176
176
  width: 16,
177
177
  height: 16,
178
- marginRight: h ? 5 : 10,
178
+ marginRight: u ? 5 : 10,
179
179
  borderRadius: "2px",
180
180
  backgroundColor: t ? C ? m : i : m
181
181
  }
@@ -195,24 +195,24 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
195
195
  onHoverLegend: t,
196
196
  onClickLegend: n,
197
197
  stackedDatasets: r,
198
- unstackedDatasets: u = [],
199
- availableHeight: h = 0,
198
+ unstackedDatasets: d = [],
199
+ availableHeight: u = 0,
200
200
  minimumHeight: g = 350
201
201
  }) => {
202
- const c = be(), { isMobile: p } = ee(), [C, { height: l }] = ut(), _ = d.useRef(null), [m, i] = d.useState(0);
203
- d.useEffect(() => {
204
- const a = Math.max(h - l, g);
202
+ const c = be(), { isMobile: h } = ee(), [C, { height: p }] = dt(), _ = l.useRef(null), [m, i] = l.useState(0);
203
+ l.useEffect(() => {
204
+ const a = Math.max(u - p, g);
205
205
  i(a);
206
- }, [h, l]);
207
- const [T, y] = d.useState(null), [L, x] = d.useState({
206
+ }, [u, p]);
207
+ const [T, y] = l.useState(null), [L, x] = l.useState({
208
208
  hoveredSeriesId: null,
209
209
  hoveredAreaData: null,
210
210
  isAreaHovered: !1,
211
211
  cursorPos: { x: 0, y: 0 }
212
- }), { hoveredSeriesId: v, hoveredAreaData: A, isAreaHovered: R, cursorPos: M } = L, k = R && v && A, E = !k, X = [...r, ...u], ne = X[0]?.dataset.length ?? 0, B = X.flatMap((a) => a.dataset.map((S) => S.x)), Ce = X.flatMap((a) => a.dataset.map((S) => S.y)), ae = r[0]?.dataset?.map(
212
+ }), { hoveredSeriesId: D, hoveredAreaData: O, isAreaHovered: A, cursorPos: M } = L, R = A && D && O, E = !R, X = [...r, ...d], ne = X[0]?.dataset.length ?? 0, B = X.flatMap((a) => a.dataset.map((S) => S.x)), Ce = X.flatMap((a) => a.dataset.map((S) => S.y)), ae = r[0]?.dataset?.map(
213
213
  (a, S) => r.reduce((I, Y) => I + Y.dataset[S]?.y || 0, 0)
214
214
  ) ?? [0], Z = Math.max(...ae), ie = Math.max(
215
- ...u.flatMap((a) => a.dataset.map((S) => S.y))
215
+ ...d.flatMap((a) => a.dataset.map((S) => S.y))
216
216
  ), q = Math.floor(Math.min(...Ce) / 100) * 100, ce = Math.ceil(Math.max(Z, ie) / 100) * 100, $ = r.map((a, S) => ({
217
217
  id: `stacked-${S}`,
218
218
  guid: a.category_guid,
@@ -225,7 +225,7 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
225
225
  type: "line",
226
226
  highlightScope: { highlight: "item" },
227
227
  valueFormatter: (I) => oe(I, "0,0")
228
- })), te = u.map((a, S) => ({
228
+ })), te = d.map((a, S) => ({
229
229
  id: `unstacked-${S}`,
230
230
  guid: a.category_guid,
231
231
  top_level_guid: a.top_level_category_guid,
@@ -245,17 +245,17 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
245
245
  top_level_guid: S
246
246
  }))
247
247
  ], j = (a) => {
248
- const I = a.startsWith("stacked-") ? r[parseInt(a.split("-")[1])] : u[parseInt(a.split("-")[1])];
248
+ const I = a.startsWith("stacked-") ? r[parseInt(a.split("-")[1])] : d[parseInt(a.split("-")[1])];
249
249
  return {
250
250
  guid: I?.category_guid,
251
251
  topLevelGuid: I?.top_level_category_guid
252
252
  };
253
- }, D = (a) => {
253
+ }, w = (a) => {
254
254
  y(a), t?.(a ?? "");
255
255
  }, V = (a) => {
256
256
  n?.(a ?? "");
257
257
  }, F = () => {
258
- const a = j(String(v)).guid;
258
+ const a = j(String(D)).guid;
259
259
  a && n?.(a);
260
260
  }, le = (a) => {
261
261
  const S = String(a?.seriesId), I = j(S).guid, Y = se.find((de) => de.id === S), De = Y && a?.dataIndex !== void 0, Ie = Y && a?.dataIndex === void 0;
@@ -317,7 +317,7 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
317
317
  }, {})
318
318
  };
319
319
  return /* @__PURE__ */ e(
320
- W,
320
+ N,
321
321
  {
322
322
  onMouseMove: we,
323
323
  ref: _,
@@ -340,7 +340,7 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
340
340
  sx: { width: "100%", position: "relative" },
341
341
  children: [
342
342
  /* @__PURE__ */ e(
343
- dt,
343
+ lt,
344
344
  {
345
345
  height: m,
346
346
  margin: { bottom: 50 },
@@ -354,10 +354,10 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
354
354
  }
355
355
  },
356
356
  slots: {
357
- itemContent: (a) => E && v ? /* @__PURE__ */ e(
357
+ itemContent: (a) => E && D ? /* @__PURE__ */ e(
358
358
  no,
359
359
  {
360
- categoryGuids: j(v),
360
+ categoryGuids: j(D),
361
361
  xData: B,
362
362
  ...a
363
363
  }
@@ -391,17 +391,17 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
391
391
  hoveredLegend: T,
392
392
  legendRef: C,
393
393
  onClickLegend: V,
394
- onHoverLegend: D,
395
- sx: { px: p ? 0 : 24 }
394
+ onHoverLegend: w,
395
+ sx: { px: h ? 0 : 24 }
396
396
  }
397
397
  ),
398
- k && /* @__PURE__ */ e(
398
+ R && /* @__PURE__ */ e(
399
399
  oo,
400
400
  {
401
- categoryGuids: j(v),
401
+ categoryGuids: j(D),
402
402
  chartContainerRef: _,
403
403
  cursorPosition: M,
404
- hoveredAreaData: A.map((a) => ({
404
+ hoveredAreaData: O.map((a) => ({
405
405
  ...a,
406
406
  x: J(a.x, z.MONTH_SHORT_YEAR)
407
407
  }))
@@ -412,7 +412,7 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
412
412
  )
413
413
  }
414
414
  );
415
- }, Je = ({ selectedTab: o, onTabChange: s }) => /* @__PURE__ */ e(
415
+ }, Qe = ({ selectedTab: o, onTabChange: s }) => /* @__PURE__ */ e(
416
416
  Rt,
417
417
  {
418
418
  exclusive: !0,
@@ -421,8 +421,8 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
421
421
  value: o,
422
422
  children: ["Chart", "Table"].map((t) => /* @__PURE__ */ e(At, { color: "primary", sx: { width: 56 }, value: t, children: t === "Chart" ? /* @__PURE__ */ e(fe, { name: "table_chart_view" }) : /* @__PURE__ */ e(fe, { name: "format_list_bulleted" }) }, t))
423
423
  }
424
- ), et = ({ selectedDateRange: o, selectedCategoryGuid: s }) => {
425
- const { trends: t } = O(), { isMobile: n, isDesktop: r } = ee(), { getCategoryName: u } = U(), h = d.useMemo(() => {
424
+ ), Je = ({ selectedDateRange: o, selectedCategoryGuid: s }) => {
425
+ const { trends: t } = W(), { isMobile: n, isDesktop: r } = ee(), { getCategoryName: d } = U(), u = l.useMemo(() => {
426
426
  const g = J(
427
427
  o.start,
428
428
  n ? z.MONTH_SHORT_YEAR : z.MONTH_YEAR
@@ -432,7 +432,7 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
432
432
  );
433
433
  return `${g} - ${c}`;
434
434
  }, [o, n]);
435
- return /* @__PURE__ */ f(W, { sx: { mr: 10, minWidth: "60%" }, children: [
435
+ return /* @__PURE__ */ f(N, { sx: { mr: 10, minWidth: "60%" }, children: [
436
436
  /* @__PURE__ */ e(
437
437
  K,
438
438
  {
@@ -444,19 +444,19 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
444
444
  textOverflow: "unset"
445
445
  },
446
446
  variant: r ? "H3" : "Body",
447
- children: u(s) || t.sub_title
447
+ children: d(s) || t.sub_title
448
448
  }
449
449
  ),
450
- /* @__PURE__ */ e(K, { variant: r ? "Body" : "Small", children: h })
450
+ /* @__PURE__ */ e(K, { variant: r ? "Body" : "Small", children: u })
451
451
  ] });
452
452
  }, ao = (o) => {
453
453
  const s = o.row[o.field];
454
454
  return /* @__PURE__ */ e(b, { alignItems: "flex-end", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(Te, { amount: s, variant: "Small" }) });
455
455
  }, io = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
456
- const { getCategoryName: t } = U(), { categories: n } = O(), r = n.default_categories[o]?.replace(/&amp;/g, "&") ?? t(o);
456
+ const { getCategoryName: t } = U(), { categories: n } = W(), r = n.default_categories[o]?.replace(/&amp;/g, "&") ?? t(o);
457
457
  return /* @__PURE__ */ f(b, { alignItems: "center", direction: "row", justifyContent: "center", children: [
458
458
  /* @__PURE__ */ e(
459
- W,
459
+ N,
460
460
  {
461
461
  "aria-label": Fe(n.category_icon_label_aria, r),
462
462
  role: "img",
@@ -478,17 +478,17 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
478
478
  t.push(r), n.setMonth(n.getMonth() + 1);
479
479
  }
480
480
  return t;
481
- }, tt = ({
481
+ }, et = ({
482
482
  monthlyCategoryTotals: o,
483
483
  selectedDateRange: s,
484
484
  selectedCategory: t,
485
485
  onClickRow: n,
486
486
  height: r = "100dvh",
487
- sx: u = {}
487
+ sx: d = {}
488
488
  }) => {
489
- const { onEvent: h } = P(), g = J(/* @__PURE__ */ new Date(), z.MONTH_SHORT), [c, p] = d.useState([
489
+ const { onEvent: u } = P(), g = J(/* @__PURE__ */ new Date(), z.MONTH_SHORT), [c, h] = l.useState([
490
490
  { field: g, sort: "desc" }
491
- ]), C = d.useMemo(() => lo(s.start, s.end), [s]), l = [
491
+ ]), C = l.useMemo(() => lo(s.start, s.end), [s]), p = [
492
492
  {
493
493
  field: "category",
494
494
  flex: 1,
@@ -515,43 +515,43 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
515
515
  sortComparator: xt
516
516
  })
517
517
  )
518
- ], _ = d.useMemo(() => {
518
+ ], _ = l.useMemo(() => {
519
519
  const m = o.filter(
520
520
  (y) => !wt(y) && !Dt(y)
521
521
  ), T = (t ? m.filter(
522
522
  (y) => y.category_guid === t || y.top_level_category_guid === t
523
523
  ) : m).reduce(
524
524
  (y, L) => {
525
- const { category_guid: x, top_level_category_guid: v, month: A, total: R, year: M } = L, k = t ? x : v;
526
- y[k] || (y[k] = {
527
- id: k,
528
- category: k,
525
+ const { category_guid: x, top_level_category_guid: D, month: O, total: A, year: M } = L, R = t ? x : D;
526
+ y[R] || (y[R] = {
527
+ id: R,
528
+ category: R,
529
529
  category_guid: x,
530
- top_level_category_guid: v
530
+ top_level_category_guid: D
531
531
  });
532
- const E = J(new Date(M, A - 1), z.MONTH_SHORT);
533
- return y[k][E] || (y[k][E] = 0), y[k][E] = y[k][E] + Math.abs(R), y;
532
+ const E = J(new Date(M, O - 1), z.MONTH_SHORT);
533
+ return y[R][E] || (y[R][E] = 0), y[R][E] = y[R][E] + Math.abs(A), y;
534
534
  },
535
535
  {}
536
536
  );
537
537
  return Object.values(T);
538
538
  }, [o, t]);
539
- return /* @__PURE__ */ e(W, { sx: { height: r, width: "100%", overflowX: "auto", boxShadow: "none", ...u }, children: /* @__PURE__ */ e(
539
+ return /* @__PURE__ */ e(N, { sx: { height: r, width: "100%", overflowX: "auto", boxShadow: "none", ...d }, children: /* @__PURE__ */ e(
540
540
  kt,
541
541
  {
542
- columns: l,
542
+ columns: p,
543
543
  disableColumnFilter: !0,
544
544
  disableColumnMenu: !0,
545
545
  hideFooter: !0,
546
546
  initialState: { sorting: { sortModel: c } },
547
547
  onRowClick: (m) => {
548
- n?.(m.row.category), h(w.TRENDS_CLICK_LIST_ITEM, {
548
+ n?.(m.row.category), u(v.TRENDS_CLICK_LIST_ITEM, {
549
549
  ...G,
550
550
  listItem: St[m.row.category]
551
551
  });
552
552
  },
553
553
  onSortModelChange: (m) => {
554
- p(m), h(w.TRENDS_CLICK_TABLE_SORT, G);
554
+ h(m), u(v.TRENDS_CLICK_TABLE_SORT, G);
555
555
  },
556
556
  rows: _,
557
557
  slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
@@ -567,89 +567,89 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
567
567
  isOpen: t,
568
568
  onClose: n
569
569
  }) => {
570
- const { onEvent: r } = P(), { selectedAccountGuids: u } = me(), { common: h } = O(), { setFilter: g, sortedTransactions: c } = xe(), [p, C] = d.useState(""), l = d.useMemo(
571
- () => c.find((m) => m.guid === p),
572
- [p, c]
570
+ const { onEvent: r } = P(), { selectedAccountGuids: d } = me(), { common: u } = W(), { setFilter: g, sortedTransactions: c } = xe(), [h, C] = l.useState(""), p = l.useMemo(
571
+ () => c.find((m) => m.guid === h),
572
+ [h, c]
573
573
  );
574
- d.useEffect(() => {
574
+ l.useEffect(() => {
575
575
  g({
576
- accounts: u,
576
+ accounts: d,
577
577
  dateRange: s,
578
578
  custom: (m) => o === "" || o === m.category_guid || o === m.top_level_category_guid,
579
579
  showSplits: !!o
580
580
  });
581
- }, [u, o, s]), d.useEffect(() => r(w.TRENDS_VIEW_TRANSACTIONS), []);
581
+ }, [d, o, s]), l.useEffect(() => r(v.TRENDS_VIEW_TRANSACTIONS), []);
582
582
  const _ = () => {
583
583
  C(""), n();
584
584
  };
585
585
  return /* @__PURE__ */ f(
586
586
  ke,
587
587
  {
588
- ariaLabelClose: h.close_aria,
588
+ ariaLabelClose: u.close_aria,
589
589
  isOpen: t,
590
590
  onClose: _,
591
591
  title: uo.title,
592
592
  children: [
593
- l && /* @__PURE__ */ e(Xe, { transaction: l }),
594
- !l && /* @__PURE__ */ e(Ze, { onClick: C })
593
+ p && /* @__PURE__ */ e(Ue, { transaction: p }),
594
+ !p && /* @__PURE__ */ e(Xe, { onClick: C })
595
595
  ]
596
596
  }
597
597
  );
598
- }, go = H(ho), mo = ({ onBackClick: o, sx: s }) => {
599
- const { onEvent: t } = P(), { isDesktop: n, isTablet: r, isMobile: u } = ee(), { visibleAccounts: h } = ve(), { loadMonthlyCategoryTotals: g, monthlyCategoryTotals: c, getCategoryName: p } = U(), { sortedTransactions: C } = xe(), { selectedDateRange: l, setSelectedDateRange: _ } = pe(), { isCopyLoaded: m, isInitialized: i, selectedAccounts: T, setSelectedAccounts: y } = me(), { trends: L } = O(), [x, v] = d.useState(!1), [A, R] = d.useState(!1), [M, k] = d.useState("Chart"), [E, X] = d.useState(""), [ne, B] = d.useState(window.innerHeight), ae = ne - (u ? 315 : 345);
600
- d.useEffect(() => {
601
- const D = () => B(window.innerHeight);
602
- return window.addEventListener("resize", D), () => window.removeEventListener("resize", D);
603
- }, []), d.useEffect(() => {
604
- y(h);
605
- }, [h]), d.useEffect(() => {
598
+ }, go = k(ho), mo = ({ onBackClick: o, sx: s }) => {
599
+ const { onEvent: t } = P(), { isDesktop: n, isTablet: r, isMobile: d } = ee(), { visibleAccounts: u } = ve(), { loadMonthlyCategoryTotals: g, monthlyCategoryTotals: c, getCategoryName: h } = U(), { sortedTransactions: C } = xe(), { selectedDateRange: p, setSelectedDateRange: _ } = pe(), { isCopyLoaded: m, isInitialized: i, selectedAccounts: T, setSelectedAccounts: y } = me(), { trends: L } = W(), [x, D] = l.useState(!1), [O, A] = l.useState(!1), [M, R] = l.useState("Chart"), [E, X] = l.useState(""), [ne, B] = l.useState(window.innerHeight), ae = ne - (d ? 315 : 345);
600
+ l.useEffect(() => {
601
+ const w = () => B(window.innerHeight);
602
+ return window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
603
+ }, []), l.useEffect(() => {
604
+ y(u);
605
+ }, [u]), l.useEffect(() => {
606
606
  i && g(
607
607
  T,
608
- l.start,
609
- l.end
608
+ p.start,
609
+ p.end
610
610
  ).finally(() => {
611
- v(!0);
611
+ D(!0);
612
612
  });
613
- }, [i, T, l]);
614
- const Z = d.useMemo(() => {
613
+ }, [i, T, p]);
614
+ const Z = l.useMemo(() => {
615
615
  if (!x) return { stackedDatasets: [], unstackedDatasets: [] };
616
- const D = vt(
616
+ const w = vt(
617
617
  c,
618
- l.start,
619
- l.end
620
- ), V = E.length ? D.filter(
618
+ p.start,
619
+ p.end
620
+ ), V = E.length ? w.filter(
621
621
  (F) => F.top_level_category_guid === E || F.category_guid === E
622
- ) : It(D);
622
+ ) : It(w);
623
623
  return {
624
624
  stackedDatasets: V.filter(Et),
625
625
  unstackedDatasets: V.filter(Lt)
626
626
  };
627
- }, [c, E, l]), ie = (D, V) => {
628
- k(V ?? M), t(w.TRENDS_CLICK_TOGGLE_VIEW);
629
- }, q = (D) => {
630
- const V = $e(D?.[0], 1), F = D?.[1], le = Ae(F, V);
631
- _({ start: V, end: F }), t(w.TRENDS_CLICK_TIME_WINDOW, {
627
+ }, [c, E, p]), ie = (w, V) => {
628
+ R(V ?? M), t(v.TRENDS_CLICK_TOGGLE_VIEW);
629
+ }, q = (w) => {
630
+ const V = $e(w?.[0], 1), F = w?.[1], le = Ae(F, V);
631
+ _({ start: V, end: F }), t(v.TRENDS_CLICK_TIME_WINDOW, {
632
632
  time_period: le + "M"
633
633
  });
634
634
  }, ce = () => {
635
- t(w.TRENDS_CLICK_FILTER);
636
- }, $ = (D) => {
637
- X(D);
638
- }, te = (D) => {
639
- X(D), t(w.TRENDS_CLICK_LEGEND, { category: p(D) });
640
- }, se = (D) => {
641
- t(w.TRENDS_HOVER_LEGEND, { category: p(D) });
642
- }, re = (D) => {
643
- t(w.TRENDS_HOVER_AREA, { category: D });
644
- }, j = (D) => {
645
- t(w.TRENDS_HOVER_POINT, { category: D });
635
+ t(v.TRENDS_CLICK_FILTER);
636
+ }, $ = (w) => {
637
+ X(w);
638
+ }, te = (w) => {
639
+ X(w), t(v.TRENDS_CLICK_LEGEND, { category: h(w) });
640
+ }, se = (w) => {
641
+ t(v.TRENDS_HOVER_LEGEND, { category: h(w) });
642
+ }, re = (w) => {
643
+ t(v.TRENDS_HOVER_AREA, { category: w });
644
+ }, j = (w) => {
645
+ t(v.TRENDS_HOVER_POINT, { category: w });
646
646
  };
647
647
  return !m || !i || !x ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ f(
648
- Ue,
648
+ Ye,
649
649
  {
650
- accountOptions: h,
650
+ accountOptions: u,
651
651
  calendarActions: { onRangeChanged: q },
652
- dateRange: l,
652
+ dateRange: p,
653
653
  dateRangeVariant: "timeframebuttons",
654
654
  onAccountsFilterClick: ce,
655
655
  onBackClick: o,
@@ -669,27 +669,27 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
669
669
  {
670
670
  flexDirection: "row",
671
671
  justifyContent: "space-between",
672
- sx: { pb: u ? 12 : 24, pt: u ? 24 : 48 },
672
+ sx: { pb: d ? 12 : 24, pt: d ? 24 : 48 },
673
673
  children: [
674
674
  /* @__PURE__ */ e(
675
- et,
675
+ Je,
676
676
  {
677
677
  selectedCategoryGuid: E,
678
- selectedDateRange: l
678
+ selectedDateRange: p
679
679
  }
680
680
  ),
681
- /* @__PURE__ */ e(Je, { onTabChange: ie, selectedTab: M })
681
+ /* @__PURE__ */ e(Qe, { onTabChange: ie, selectedTab: M })
682
682
  ]
683
683
  }
684
684
  ),
685
685
  /* @__PURE__ */ f(b, { alignItems: "center", flexDirection: "row", width: "100%", children: [
686
- /* @__PURE__ */ e(W, { flexGrow: 1, children: E && /* @__PURE__ */ f(_e, { onClick: () => X(""), sx: { p: 0, pr: 5 }, children: [
686
+ /* @__PURE__ */ e(N, { flexGrow: 1, children: E && /* @__PURE__ */ f(_e, { onClick: () => X(""), sx: { p: 0, pr: 5 }, children: [
687
687
  /* @__PURE__ */ e(fe, { name: "arrow_back" }),
688
688
  L.all_categories
689
689
  ] }) }),
690
- /* @__PURE__ */ e(_e, { onClick: () => R(!0), sx: { px: 5 }, children: `${L.view_transactions} (${C.length})` })
690
+ /* @__PURE__ */ e(_e, { onClick: () => A(!0), sx: { px: 5 }, children: `${L.view_transactions} (${C.length})` })
691
691
  ] }),
692
- /* @__PURE__ */ f(W, { children: [
692
+ /* @__PURE__ */ f(N, { children: [
693
693
  M === "Chart" && /* @__PURE__ */ e(
694
694
  ro,
695
695
  {
@@ -703,12 +703,12 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
703
703
  }
704
704
  ),
705
705
  M === "Table" && /* @__PURE__ */ e(
706
- tt,
706
+ et,
707
707
  {
708
708
  monthlyCategoryTotals: c,
709
709
  onClickRow: $,
710
710
  selectedCategory: E,
711
- selectedDateRange: l
711
+ selectedDateRange: p
712
712
  }
713
713
  )
714
714
  ] })
@@ -719,16 +719,16 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
719
719
  go,
720
720
  {
721
721
  categoryGuid: E,
722
- dateRange: l,
723
- isOpen: A,
724
- onClose: () => R(!1)
722
+ dateRange: p,
723
+ isOpen: O,
724
+ onClose: () => A(!1)
725
725
  }
726
726
  )
727
727
  ]
728
728
  }
729
729
  );
730
- }, Rn = H(mo), po = () => {
731
- const o = be(), { monthlyCategoryTotals: s } = U(), { trends: t } = O(), n = Mt(s);
730
+ }, Rn = k(mo), po = () => {
731
+ const o = be(), { monthlyCategoryTotals: s } = U(), { trends: t } = W(), n = Mt(s);
732
732
  return /* @__PURE__ */ e(
733
733
  Ne,
734
734
  {
@@ -745,35 +745,35 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
745
745
  valueFormatterString: "0,0"
746
746
  }
747
747
  );
748
- }, Co = H(po), yo = ({ onPrimaryCtaClick: o, sx: s }) => {
749
- const { visibleAccounts: t } = ve(), { loadMonthlyCategoryTotals: n, monthlyTotalsLoaded: r } = U(), { isInitialized: u } = He(), { trends: h } = O(), { isCopyLoaded: g, selectedAccounts: c, setSelectedAccounts: p } = me();
750
- return d.useEffect(() => {
751
- p(t);
752
- }, [t]), d.useEffect(() => {
753
- u && n(c).finally();
754
- }, [u, c]), !g || !u ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ e(
748
+ }, Co = k(po), yo = ({ onPrimaryCtaClick: o, sx: s }) => {
749
+ const { visibleAccounts: t } = ve(), { loadMonthlyCategoryTotals: n, monthlyTotalsLoaded: r } = U(), { isInitialized: d } = He(), { trends: u } = W(), { isCopyLoaded: g, selectedAccounts: c, setSelectedAccounts: h } = me();
750
+ return l.useEffect(() => {
751
+ h(t);
752
+ }, [t]), l.useEffect(() => {
753
+ d && n(c).finally();
754
+ }, [d, c]), !g || !d ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ e(
755
755
  Nt,
756
756
  {
757
757
  onPrimaryCtaClick: o,
758
- primaryCtaLabel: h.primary_cta,
759
- subTitle: h.sub_title,
758
+ primaryCtaLabel: u.primary_cta,
759
+ subTitle: u.sub_title,
760
760
  sx: s,
761
- title: h.mini_title,
761
+ title: u.mini_title,
762
762
  children: r ? /* @__PURE__ */ e(Co, {}) : /* @__PURE__ */ e(ge, {})
763
763
  }
764
764
  );
765
- }, kn = H(yo), fo = 70, Be = ({
765
+ }, kn = k(yo), fo = 70, Be = ({
766
766
  title: o,
767
767
  totalAmount: s,
768
768
  transactionType: t,
769
769
  percentage: n,
770
770
  secondaryLabel: r,
771
- shouldDisplayPercentage: u
771
+ shouldDisplayPercentage: d
772
772
  }) => {
773
- const { availableWidth: h } = mt(), g = d.useRef(null), c = d.useRef(null), p = bt(Number(Math.abs(n)), {
773
+ const { availableWidth: u } = gt(), g = l.useRef(null), c = l.useRef(null), h = bt(Number(Math.abs(n)), {
774
774
  style: "percent",
775
775
  minimumIntegerDigits: 1
776
- }), C = h === 288 && oe(s, "0,0.00").length > 10 ? oe(s, "0,0") : oe(s, "0,0.00"), l = t === "spending" ? n > 0 : n >= 0, _ = t === "spending" ? "error.main" : "success.main", m = t === "spending" ? "success.main" : "text.secondary", i = g?.current, T = c?.current, y = i && T ? i.scrollWidth > T.clientWidth - fo : !1;
776
+ }), C = u === 288 && oe(s, "0,0.00").length > 10 ? oe(s, "0,0") : oe(s, "0,0.00"), p = t === "spending" ? n > 0 : n >= 0, _ = t === "spending" ? "error.main" : "success.main", m = t === "spending" ? "success.main" : "text.secondary", i = g?.current, T = c?.current, y = i && T ? i.scrollWidth > T.clientWidth - fo : !1;
777
777
  return /* @__PURE__ */ f(
778
778
  b,
779
779
  {
@@ -797,17 +797,17 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
797
797
  },
798
798
  children: [
799
799
  /* @__PURE__ */ e(he, { color: "text.secondary", variant: "caption", children: o }),
800
- u && /* @__PURE__ */ f(b, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
801
- l ? /* @__PURE__ */ e(Ot, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(Gt, { size: 20, sx: { color: m } }),
800
+ d && /* @__PURE__ */ f(b, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
801
+ p ? /* @__PURE__ */ e(Ot, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(Gt, { size: 20, sx: { color: m } }),
802
802
  /* @__PURE__ */ e(
803
803
  he,
804
804
  {
805
805
  sx: {
806
- color: l ? _ : m,
806
+ color: p ? _ : m,
807
807
  fontWeight: 600
808
808
  },
809
809
  variant: "body2",
810
- children: p
810
+ children: h
811
811
  }
812
812
  )
813
813
  ] })
@@ -825,17 +825,17 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
825
825
  },
826
826
  children: [
827
827
  /* @__PURE__ */ e(
828
- W,
828
+ N,
829
829
  {
830
830
  ref: g,
831
831
  sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
832
832
  children: /* @__PURE__ */ e(Pe, { children: C })
833
833
  }
834
834
  ),
835
- u && h >= 450 && !y && /* @__PURE__ */ e(
835
+ d && u >= 450 && !y && /* @__PURE__ */ e(
836
836
  he,
837
837
  {
838
- color: l ? _ : m,
838
+ color: p ? _ : m,
839
839
  variant: "caption",
840
840
  children: r
841
841
  }
@@ -846,8 +846,8 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
846
846
  ]
847
847
  }
848
848
  );
849
- }, _o = H(() => {
850
- const { trends: o } = O();
849
+ }, _o = k(() => {
850
+ const { trends: o } = W();
851
851
  return /* @__PURE__ */ f(b, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
852
852
  /* @__PURE__ */ e(Bt, { size: 32 }),
853
853
  /* @__PURE__ */ f(b, { children: [
@@ -855,40 +855,40 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
855
855
  /* @__PURE__ */ e(he, { color: "text.secondary", variant: "subtitle2", children: o.zero_state_content_description })
856
856
  ] })
857
857
  ] });
858
- }), Hn = H(({ onCtaClick: o }) => {
859
- const { visibleAccounts: s } = ve(), { onEvent: t } = P(), { monthlyCategoryTotals: n, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: u } = U(), h = {
858
+ }), Hn = k(({ onCtaClick: o }) => {
859
+ const { visibleAccounts: s } = ve(), { onEvent: t } = P(), { monthlyCategoryTotals: n, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: d } = U(), u = {
860
860
  start: Wt(/* @__PURE__ */ new Date(), 1),
861
861
  end: /* @__PURE__ */ new Date()
862
- }, { trends: g } = O(), { selectedAccounts: c, setSelectedAccounts: p, isInitialized: C } = me();
863
- d.useEffect(() => {
864
- p(s);
865
- }, [s]), d.useEffect(() => {
866
- C && r(c, h.start).then(() => {
867
- t(w.TRENDS_LOAD_WIDGET, {
862
+ }, { trends: g } = W(), { selectedAccounts: c, setSelectedAccounts: h, isInitialized: C } = me();
863
+ l.useEffect(() => {
864
+ h(s);
865
+ }, [s]), l.useEffect(() => {
866
+ C && r(c, u.start).then(() => {
867
+ t(v.TRENDS_LOAD_WIDGET, {
868
868
  state: s?.length ? "default" : "zeroState"
869
869
  });
870
870
  });
871
871
  }, [C, c]);
872
- const { spendingData: l, incomeData: _ } = d.useMemo(
872
+ const { spendingData: p, incomeData: _ } = l.useMemo(
873
873
  () => ({
874
- spendingData: je(n, h),
875
- incomeData: Ye(n, h)
874
+ spendingData: Ke(n, u),
875
+ incomeData: je(n, u)
876
876
  }),
877
- [n, h]
878
- ), [m, i] = l, [T, y] = _, L = Oe(i.y, m.y), x = Oe(y.y, T.y), v = C && !s?.length, A = () => {
877
+ [n, u]
878
+ ), [m, i] = p, [T, y] = _, L = Oe(i.y, m.y), x = Oe(y.y, T.y), D = C && !s?.length, O = () => {
879
879
  t(
880
- v ? w.TRENDS_CLICK_GET_STARTED : w.TRENDS_CLICK_VIEW_MORE
880
+ D ? v.TRENDS_CLICK_GET_STARTED : v.TRENDS_CLICK_VIEW_MORE
881
881
  ), o();
882
882
  };
883
- return !u || !C ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ e(
883
+ return !d || !C ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ e(
884
884
  $t,
885
885
  {
886
886
  className: "mx-trends-microwidget",
887
887
  ctaLabel: g.micro_primary_cta_label,
888
- onCTAClick: A,
889
- subHeader: v ? void 0 : g.micro_subheader,
888
+ onCTAClick: O,
889
+ subHeader: D ? void 0 : g.micro_subheader,
890
890
  title: g.title,
891
- children: v ? /* @__PURE__ */ e(_o, {}) : /* @__PURE__ */ f(
891
+ children: D ? /* @__PURE__ */ e(_o, {}) : /* @__PURE__ */ f(
892
892
  b,
893
893
  {
894
894
  sx: {
@@ -924,9 +924,9 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
924
924
  )
925
925
  }
926
926
  );
927
- }), To = H(
927
+ }), To = k(
928
928
  ({ isExpanded: o, onClick: s }) => {
929
- const t = qe();
929
+ const t = Ze();
930
930
  return /* @__PURE__ */ e(Kt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(jt, { onClick: s, sx: { justifyContent: "center" }, children: /* @__PURE__ */ f(
931
931
  b,
932
932
  {
@@ -946,49 +946,49 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
946
946
  }
947
947
  ) }) });
948
948
  }
949
- ), Ve = H(
949
+ ), Ve = k(
950
950
  ({
951
951
  totalAmount: o,
952
952
  guid: s,
953
953
  name: t,
954
954
  transactions: n,
955
955
  onClick: r,
956
- isLastItem: u = !1,
957
- showDivider: h = !0
956
+ isLastItem: d = !1,
957
+ showDivider: u = !0
958
958
  }) => {
959
- const { trends: g } = O(), { onEvent: c } = P(), p = `${n.length} ${n.length === 1 ? g.transaction : g.transactions}`, C = () => {
960
- r?.(), c(w.TRENDS_CLICK_LIST_ITEM, {
959
+ const { trends: g } = W(), { onEvent: c } = P(), h = `${n.length} ${n.length === 1 ? g.transaction : g.transactions}`, C = () => {
960
+ r?.(), c(v.TRENDS_CLICK_LIST_ITEM, {
961
961
  ...G,
962
962
  listItem: t
963
963
  });
964
964
  };
965
- return /* @__PURE__ */ f(d.Fragment, { children: [
965
+ return /* @__PURE__ */ f(l.Fragment, { children: [
966
966
  /* @__PURE__ */ e(
967
- Ke,
967
+ ze,
968
968
  {
969
969
  leftIcon: s ? /* @__PURE__ */ e(Se, { categoryGuid: s }) : void 0,
970
970
  onClick: C,
971
971
  rightContent: oe(Math.abs(o), "0,0.00"),
972
- rightIcon: r ? /* @__PURE__ */ e(lt, {}) : void 0,
973
- subtitle: p,
972
+ rightIcon: r ? /* @__PURE__ */ e(ct, {}) : void 0,
973
+ subtitle: h,
974
974
  title: t
975
975
  }
976
976
  ),
977
- h && /* @__PURE__ */ e(Re, { sx: { ml: u ? 24 : 68 } })
977
+ u && /* @__PURE__ */ e(Re, { sx: { ml: d ? 24 : 68 } })
978
978
  ] }, s);
979
979
  }
980
- ), So = H(
980
+ ), So = k(
981
981
  ({ availableHeight: o = 0, onCategoryClick: s }) => {
982
- const { collapsedCategories: t, visibleCategories: n, setVisibleListLength: r } = pe(), { isLargeDesktop: u, isDesktop: h } = ee(), { trends: g } = O(), { onEvent: c } = P(), [p, C] = d.useState(!1), l = h || u;
983
- d.useEffect(() => {
982
+ const { collapsedCategories: t, visibleCategories: n, setVisibleListLength: r } = pe(), { isLargeDesktop: d, isDesktop: u } = ee(), { trends: g } = W(), { onEvent: c } = P(), [h, C] = l.useState(!1), p = u || d;
983
+ l.useEffect(() => {
984
984
  const i = Math.floor(o / 64) - 1, T = n.length + t.length;
985
- i !== n.length && (r(l ? Math.max(i, 5) : 5), C(i >= T));
985
+ i !== n.length && (r(p ? Math.max(i, 5) : 5), C(i >= T));
986
986
  }, [o]);
987
987
  const _ = () => {
988
- C(!p), c(w.TRENDS_CLICK_VIEW_MORE, {
988
+ C(!h), c(v.TRENDS_CLICK_VIEW_MORE, {
989
989
  ...G
990
990
  });
991
- }, m = n.length + (p ? t.length : 0);
991
+ }, m = n.length + (h ? t.length : 0);
992
992
  return /* @__PURE__ */ e(b, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ f(zt, { children: [
993
993
  /* @__PURE__ */ e(b, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Pe, { children: g.categories }) }),
994
994
  n.map((i, T) => /* @__PURE__ */ e(
@@ -1004,7 +1004,7 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1004
1004
  /* @__PURE__ */ e(
1005
1005
  Ft,
1006
1006
  {
1007
- in: p,
1007
+ in: h,
1008
1008
  sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
1009
1009
  children: t.map((i, T) => {
1010
1010
  const y = n.length + T;
@@ -1021,36 +1021,35 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1021
1021
  })
1022
1022
  }
1023
1023
  ),
1024
- t.length > 0 && /* @__PURE__ */ e(To, { isExpanded: p, onClick: _ })
1024
+ t.length > 0 && /* @__PURE__ */ e(To, { isExpanded: h, onClick: _ })
1025
1025
  ] }) });
1026
1026
  }
1027
1027
  ), bo = ({ beats: o, onInsightCardClick: s }) => {
1028
- const t = ze(), { onEvent: n } = P(), { isMobile: r, isDesktop: u, isLargeDesktop: h } = ee(), { beatStore: g, endpoint: c, sessionToken: p } = He(), C = t.palette.mode === "dark", l = u || h, _ = l || r ? 1 : 2, m = () => null, i = (A) => {
1029
- s?.(A), n(w.TRENDS_CLICK_INSIGHT, G);
1030
- }, T = l ? 200 : 170, y = l ? 170 : 124, L = l ? 56 : 0, x = o.length > 0 ? T + L : y, v = l && o.length > 0 ? T : void 0;
1031
- return /* @__PURE__ */ e(Tt, { sx: { height: x }, children: /* @__PURE__ */ e(
1028
+ const { onEvent: t } = P(), { isMobile: n, isDesktop: r, isLargeDesktop: d } = ee(), { beatStore: u, endpoint: g, sessionToken: c } = He(), h = r || d, C = h || n ? 1 : 2, p = () => null, _ = (x) => {
1029
+ s?.(x), t(v.TRENDS_CLICK_INSIGHT, G);
1030
+ }, m = h ? 200 : 170, i = h ? 170 : 124, T = h ? 56 : 0, y = o.length > 0 ? m + T : i, L = h && o.length > 0 ? m : void 0;
1031
+ return /* @__PURE__ */ e(Tt, { sx: { height: y }, children: /* @__PURE__ */ e(
1032
1032
  Ht,
1033
1033
  {
1034
- areBeatsLoading: g.isLoading,
1034
+ areBeatsLoading: u.isLoading,
1035
1035
  beats: o,
1036
- endpoint: c,
1037
- heightOverrides: v,
1038
- logOutUser: m,
1039
- onCardClick: i,
1036
+ endpoint: g,
1037
+ heightOverrides: L,
1038
+ logOutUser: p,
1039
+ onCardClick: _,
1040
1040
  showBorder: !0,
1041
1041
  showCTAColocatedWithText: !1,
1042
1042
  showCarouselControls: !0,
1043
- showHeader: l,
1043
+ showHeader: h,
1044
1044
  showIcon: !0,
1045
1045
  showWithMargin: !1,
1046
- token: p,
1047
- useDarkMode: C,
1046
+ token: c,
1048
1047
  userHasFullInsightFeedBeats: !1,
1049
1048
  variant: "outlined",
1050
- visibleCardsCount: _
1049
+ visibleCardsCount: C
1051
1050
  }
1052
1051
  ) });
1053
- }, xo = H(bo), vo = H(({ chartLabel: o, chartColor: s }) => {
1052
+ }, xo = k(bo), vo = k(({ chartLabel: o, chartColor: s }) => {
1054
1053
  const { onEvent: t } = P(), {
1055
1054
  categoryDetailsChartData: { monthlyAmounts: n, tooltipLabels: r }
1056
1055
  } = pe();
@@ -1068,7 +1067,7 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1068
1067
  stroke: s
1069
1068
  }),
1070
1069
  onItemClick: () => {
1071
- t(w.TRENDS_CLICK_CHART, G);
1070
+ t(v.TRENDS_CLICK_CHART, G);
1072
1071
  },
1073
1072
  showArea: !0,
1074
1073
  showAverage: !0,
@@ -1083,49 +1082,49 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1083
1082
  valueFormatterString: "0,0"
1084
1083
  }
1085
1084
  ) });
1086
- }), wo = H(({ onClose: o }) => {
1087
- const s = qe(), { onEvent: t } = P(), { common: n, trends: r } = O(), { selectedCategoryData: u, selectedDateRangeMonthRange: h } = pe(), { sortedTransactions: g } = xe(), [c, p] = d.useState(null);
1088
- if (!u)
1085
+ }), wo = k(({ onClose: o }) => {
1086
+ const s = Ze(), { onEvent: t } = P(), { common: n, trends: r } = W(), { selectedCategoryData: d, selectedDateRangeMonthRange: u } = pe(), { sortedTransactions: g } = xe(), [c, h] = l.useState(null);
1087
+ if (!d)
1089
1088
  return null;
1090
- const { guid: C, name: l, is_income: _, totalAmount: m } = u, i = _ ? r.category_income : r.category_spending, T = Zt(C, s), y = _ ? r.income_label : r.spending_label, L = ` ${u.transactions.length === 1 ? r.transaction : r.transactions} (${u.transactions.length})`, x = d.useMemo(
1091
- () => g.find((R) => R.guid === c),
1089
+ const { guid: C, name: p, is_income: _, totalAmount: m } = d, i = _ ? r.category_income : r.category_spending, T = Zt(C, s), y = _ ? r.income_label : r.spending_label, L = ` ${d.transactions.length === 1 ? r.transaction : r.transactions} (${d.transactions.length})`, x = l.useMemo(
1090
+ () => g.find((A) => A.guid === c),
1092
1091
  [c, g]
1093
- ), v = (R) => R.category_guid === C || R.top_level_category_guid === C, A = () => {
1094
- o?.(), t(w.TRENDS_CLICK_BACK, G);
1092
+ ), D = (A) => A.category_guid === C || A.top_level_category_guid === C, O = () => {
1093
+ o?.(), t(v.TRENDS_CLICK_BACK, G);
1095
1094
  };
1096
1095
  return /* @__PURE__ */ f(
1097
1096
  ke,
1098
1097
  {
1099
1098
  ariaLabelClose: r.close_category_details,
1100
1099
  isOpen: !0,
1101
- onClose: A,
1100
+ onClose: O,
1102
1101
  shouldShowHeaderShadow: !0,
1103
1102
  title: i,
1104
1103
  children: [
1105
1104
  /* @__PURE__ */ f(b, { sx: { alignItems: "center", height: "100%" }, children: [
1106
1105
  /* @__PURE__ */ f(Xt, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
1107
1106
  /* @__PURE__ */ e(
1108
- Ke,
1107
+ ze,
1109
1108
  {
1110
1109
  leftIcon: /* @__PURE__ */ e(Se, { categoryGuid: C }),
1111
1110
  rightContent: oe(Math.abs(m), "0,0.00"),
1112
- subtitle: h,
1113
- title: l
1111
+ subtitle: u,
1112
+ title: p
1114
1113
  }
1115
1114
  ),
1116
1115
  /* @__PURE__ */ e(vo, { chartColor: T, chartLabel: y }),
1117
1116
  /* @__PURE__ */ f(b, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
1118
1117
  /* @__PURE__ */ e(K, { bold: !0, variant: "body1", children: L }),
1119
- /* @__PURE__ */ e(qt, { filter: v })
1118
+ /* @__PURE__ */ e(qt, { filter: D })
1120
1119
  ] })
1121
1120
  ] }),
1122
1121
  /* @__PURE__ */ e(
1123
- Ze,
1122
+ Xe,
1124
1123
  {
1125
1124
  bgcolor: "transparent",
1126
- filter: v,
1125
+ filter: D,
1127
1126
  height: "calc(100vh - 475px)",
1128
- onClick: p
1127
+ onClick: h
1129
1128
  }
1130
1129
  )
1131
1130
  ] }),
@@ -1134,49 +1133,49 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1134
1133
  {
1135
1134
  ariaLabelClose: n.close_aria,
1136
1135
  isOpen: !!x,
1137
- onClose: () => p(""),
1136
+ onClose: () => h(""),
1138
1137
  title: r.transaction,
1139
- children: x && /* @__PURE__ */ e(Xe, { transaction: x })
1138
+ children: x && /* @__PURE__ */ e(Ue, { transaction: x })
1140
1139
  }
1141
1140
  )
1142
1141
  ]
1143
1142
  }
1144
1143
  );
1145
1144
  }), Do = (o, s) => {
1146
- const t = Ye(o, s), n = je(o, s);
1145
+ const t = je(o, s), n = Ke(o, s);
1147
1146
  return [t, n].filter((r) => r.length > 0);
1148
1147
  }, Io = (o, s) => {
1149
- const [t, n] = o, r = t, u = n ?? t, h = [];
1148
+ const [t, n] = o, r = t, d = n ?? t, u = [];
1150
1149
  if (r) {
1151
- const g = r.reduce((c, p) => c + p.y, 0);
1152
- h.push({ label: s.income_label, amount: g });
1150
+ const g = r.reduce((c, h) => c + h.y, 0);
1151
+ u.push({ label: s.income_label, amount: g });
1153
1152
  }
1154
- if (u) {
1155
- const g = u.reduce((c, p) => c + p.y, 0);
1156
- h.push({ label: s.spending_label, amount: g });
1153
+ if (d) {
1154
+ const g = d.reduce((c, h) => c + h.y, 0);
1155
+ u.push({ label: s.spending_label, amount: g });
1157
1156
  }
1158
- return h;
1157
+ return u;
1159
1158
  }, Eo = ({
1160
1159
  availableHeight: o = 0,
1161
1160
  minHeight: s = 500,
1162
1161
  selectedDateRange: t,
1163
1162
  totals: n
1164
1163
  }) => {
1165
- const r = be(), { onEvent: u } = P(), { trends: h } = O(), { isSmallMobile: g, isMobile: c, isSmallTablet: p, isTablet: C } = ee(), l = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = Do(n, t), m = Io(_, h), [i, T] = d.useState(0), y = 458, L = 195, x = 56, v = c || g ? L : p || C ? y : i;
1166
- return d.useEffect(() => {
1167
- const R = Math.max(o - x, s);
1168
- T(R);
1164
+ const r = be(), { onEvent: d } = P(), { trends: u } = W(), { isSmallMobile: g, isMobile: c, isSmallTablet: h, isTablet: C } = ee(), p = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = Do(n, t), m = Io(_, u), [i, T] = l.useState(0), y = 458, L = 195, x = 56, D = c || g ? L : h || C ? y : i;
1165
+ return l.useEffect(() => {
1166
+ const A = Math.max(o - x, s);
1167
+ T(A);
1169
1168
  }, [o]), /* @__PURE__ */ e(
1170
1169
  Ne,
1171
1170
  {
1172
1171
  baseline: "min",
1173
- colors: l,
1172
+ colors: p,
1174
1173
  curveType: "bump",
1175
1174
  datasets: _,
1176
- height: v,
1175
+ height: D,
1177
1176
  labels: m,
1178
1177
  onItemClick: () => {
1179
- u(w.TRENDS_CLICK_CHART, G);
1178
+ d(v.TRENDS_CLICK_CHART, G);
1180
1179
  },
1181
1180
  showArea: !0,
1182
1181
  showAxisHighlight: !0,
@@ -1189,7 +1188,7 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1189
1188
  valueFormatterString: "0.0a"
1190
1189
  }
1191
1190
  );
1192
- }, Lo = H(Eo), Mo = [
1191
+ }, Lo = k(Eo), Mo = [
1193
1192
  "BillAmountNotStandard",
1194
1193
  "CategorySpendingV2",
1195
1194
  "CostOfLivingToIncome",
@@ -1224,83 +1223,83 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1224
1223
  "WeeklyNoSpendDays",
1225
1224
  "WeeklySmallPurchasesSummary"
1226
1225
  ], Ao = ({ onBackClick: o, onInsightCardClick: s, sx: t }) => {
1227
- const { onEvent: n } = P(), { onLoad: r } = pt(), { config: u } = Ct(), { isLargeDesktop: h, isDesktop: g, isMobile: c } = ee(), { visibleAccounts: p } = ve(), { loadDateRangeCategoryTotals: C, loadMonthlyCategoryTotals: l, monthlyCategoryTotals: _ } = U(), { setFilter: m } = xe(), { selectedDateRange: i, setSelectedCategoryData: T, setSelectedDateRange: y } = pe(), {
1226
+ const { onEvent: n } = P(), { onLoad: r } = mt(), { config: d } = pt(), { isLargeDesktop: u, isDesktop: g, isMobile: c } = ee(), { visibleAccounts: h } = ve(), { loadDateRangeCategoryTotals: C, loadMonthlyCategoryTotals: p, monthlyCategoryTotals: _ } = U(), { setFilter: m } = xe(), { selectedDateRange: i, setSelectedCategoryData: T, setSelectedDateRange: y } = pe(), {
1228
1227
  isCopyLoaded: L,
1229
1228
  isInitialized: x,
1230
- selectedAccounts: v,
1231
- selectedAccountGuids: A,
1232
- setSelectedAccounts: R
1233
- } = me(), { trends: M, connect: k } = O(), { beatStore: E } = He(), ne = Qt() && u.show_insights_widget_in_master, B = g || h, [Ce, ae] = d.useState(!1), [Z, ie] = d.useState(!1), [q, ce] = d.useState("Chart"), [$, te] = d.useState(""), [se, re] = d.useState(!1), [j, D] = d.useState(window.innerHeight), V = B ? 56 : 0, F = j - 208, le = j - (ne ? 550 + V : 266), [we, ye] = d.useState(!1), a = u.show_connections_widget_in_master ? "buttons" : "no-buttons", S = d.useMemo(
1234
- () => p && p.length === 0 || _.length === 0,
1235
- [p, _]
1229
+ selectedAccounts: D,
1230
+ selectedAccountGuids: O,
1231
+ setSelectedAccounts: A
1232
+ } = me(), { trends: M, connect: R } = W(), { beatStore: E } = He(), ne = Qt() && d.show_insights_widget_in_master, B = g || u, [Ce, ae] = l.useState(!1), [Z, ie] = l.useState(!1), [q, ce] = l.useState("Chart"), [$, te] = l.useState(""), [se, re] = l.useState(!1), [j, w] = l.useState(window.innerHeight), V = B ? 56 : 0, F = j - 208, le = j - (ne ? 550 + V : 266), [we, ye] = l.useState(!1), a = d.show_connections_widget_in_master ? "buttons" : "no-buttons", S = l.useMemo(
1233
+ () => h && h.length === 0 || _.length === 0,
1234
+ [h, _]
1236
1235
  );
1237
- d.useEffect(() => {
1236
+ l.useEffect(() => {
1238
1237
  x && E.loadBeats().finally(() => ie(!0));
1239
1238
  }, [x]);
1240
- const I = d.useMemo(() => Z ? E.getFilteredBeats({ templates: Mo }) : [], [Z]);
1241
- d.useEffect(() => {
1242
- const N = () => D(window.innerHeight);
1243
- return window.addEventListener("resize", N), () => window.removeEventListener("resize", N);
1244
- }, []), d.useEffect(() => {
1245
- R(p);
1246
- }, [p]), d.useEffect(() => {
1247
- x && C(v, i.start, i.end).then(() => {
1248
- l(
1249
- v,
1239
+ const I = l.useMemo(() => Z ? E.getFilteredBeats({ templates: Mo }) : [], [Z]);
1240
+ l.useEffect(() => {
1241
+ const H = () => w(window.innerHeight);
1242
+ return window.addEventListener("resize", H), () => window.removeEventListener("resize", H);
1243
+ }, []), l.useEffect(() => {
1244
+ A(h);
1245
+ }, [h]), l.useEffect(() => {
1246
+ x && C(D, i.start, i.end).then(() => {
1247
+ p(
1248
+ D,
1250
1249
  i.start,
1251
1250
  i.end
1252
1251
  );
1253
1252
  }).finally(() => {
1254
- ae(!0), n(w.TRENDS_LOAD_WIDGET, {
1253
+ ae(!0), n(v.TRENDS_LOAD_WIDGET, {
1255
1254
  ...G,
1256
1255
  time_period: `${Ae(i.end, i.start)}M`
1257
1256
  }), r?.("TrendsWidget");
1258
1257
  });
1259
- }, [x, v, i]), d.useEffect(() => {
1258
+ }, [x, D, i]), l.useEffect(() => {
1260
1259
  if (_.length !== 0) {
1261
- const N = {
1262
- accounts: A,
1260
+ const H = {
1261
+ accounts: O,
1263
1262
  dateRange: { start: i.start, end: i.end }
1264
1263
  };
1265
1264
  m({
1266
- ...N,
1265
+ ...H,
1267
1266
  custom: (Q) => !!_.find(
1268
1267
  (ue) => ue.top_level_category_guid === Q.top_level_category_guid || ue.category_guid === Q.category_guid
1269
1268
  )
1270
1269
  });
1271
1270
  }
1272
1271
  }, [_]);
1273
- const Y = (N) => {
1274
- T(N), re(!0);
1272
+ const Y = (H) => {
1273
+ T(H), re(!0);
1275
1274
  }, De = () => {
1276
1275
  T(null), re(!1);
1277
1276
  }, Ie = () => {
1278
- ye(!0), n(w.TRENDS_CLICK_CONNECT_ACCOUNTS);
1279
- }, de = (N, Q) => {
1280
- ce(Q ?? q), n(w.TRENDS_CLICK_TOGGLE_VIEW, {
1277
+ ye(!0), n(v.TRENDS_CLICK_CONNECT_ACCOUNTS);
1278
+ }, de = (H, Q) => {
1279
+ ce(Q ?? q), n(v.TRENDS_CLICK_TOGGLE_VIEW, {
1281
1280
  ...G,
1282
1281
  toggleView: Q
1283
1282
  });
1284
- }, Ee = (N) => {
1285
- const Q = $e(N?.[0], 1), ue = N?.[1], st = Ae(ue, Q);
1286
- y({ start: Q, end: ue }), n(w.TRENDS_CLICK_TIME_WINDOW, {
1283
+ }, Ee = (H) => {
1284
+ const Q = $e(H?.[0], 1), ue = H?.[1], nt = Ae(ue, Q);
1285
+ y({ start: Q, end: ue }), n(v.TRENDS_CLICK_TIME_WINDOW, {
1287
1286
  ...G,
1288
- time_period: st + "M"
1287
+ time_period: nt + "M"
1289
1288
  });
1290
- }, Le = (N) => {
1291
- n(w.TRENDS_CLICK_FILTER, {
1289
+ }, Le = (H) => {
1290
+ n(v.TRENDS_CLICK_FILTER, {
1292
1291
  ...G,
1293
- filterValue: N
1292
+ filterValue: H
1294
1293
  });
1295
- }, ot = (N) => {
1296
- te(N);
1297
- }, nt = () => {
1298
- te(""), n(w.TRENDS_CLICK_ALL_CATEGORIES, G);
1294
+ }, tt = (H) => {
1295
+ te(H);
1296
+ }, ot = () => {
1297
+ te(""), n(v.TRENDS_CLICK_ALL_CATEGORIES, G);
1299
1298
  };
1300
1299
  return !L || !Ce ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ f(
1301
- Ue,
1300
+ Ye,
1302
1301
  {
1303
- accountOptions: p,
1302
+ accountOptions: h,
1304
1303
  calendarActions: { onRangeChanged: Ee },
1305
1304
  dateRange: i,
1306
1305
  dateRangeVariant: c ? "timeframetabs" : "timeframebuttons",
@@ -1336,23 +1335,23 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1336
1335
  sx: { pb: c ? 12 : 24, pt: c ? 24 : 48 },
1337
1336
  children: [
1338
1337
  /* @__PURE__ */ e(
1339
- et,
1338
+ Je,
1340
1339
  {
1341
1340
  selectedCategoryGuid: $,
1342
1341
  selectedDateRange: i
1343
1342
  }
1344
1343
  ),
1345
- /* @__PURE__ */ e(Je, { onTabChange: de, selectedTab: q })
1344
+ /* @__PURE__ */ e(Qe, { onTabChange: de, selectedTab: q })
1346
1345
  ]
1347
1346
  }
1348
1347
  ),
1349
- /* @__PURE__ */ e(b, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(W, { flexGrow: 1, children: $ && /* @__PURE__ */ f(_e, { onClick: nt, sx: { p: 0, pr: 5 }, children: [
1348
+ /* @__PURE__ */ e(b, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(N, { flexGrow: 1, children: $ && /* @__PURE__ */ f(_e, { onClick: ot, sx: { p: 0, pr: 5 }, children: [
1350
1349
  /* @__PURE__ */ e(fe, { name: "arrow_back" }),
1351
1350
  M.all_categories
1352
1351
  ] }) }) }),
1353
1352
  /* @__PURE__ */ f(b, { flexDirection: B ? "row" : "column", gap: B ? 48 : 16, children: [
1354
- q === "Chart" && /* @__PURE__ */ f(rt, { children: [
1355
- /* @__PURE__ */ e(W, { sx: { width: B ? "68%" : "100%" }, children: /* @__PURE__ */ e(
1353
+ q === "Chart" && /* @__PURE__ */ f(st, { children: [
1354
+ /* @__PURE__ */ e(N, { sx: { width: B ? "68%" : "100%" }, children: /* @__PURE__ */ e(
1356
1355
  Lo,
1357
1356
  {
1358
1357
  availableHeight: F,
@@ -1378,12 +1377,12 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1378
1377
  )
1379
1378
  ] })
1380
1379
  ] }),
1381
- q === "Table" && /* @__PURE__ */ e(W, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1382
- tt,
1380
+ q === "Table" && /* @__PURE__ */ e(N, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1381
+ et,
1383
1382
  {
1384
1383
  height: "unset",
1385
1384
  monthlyCategoryTotals: _,
1386
- onClickRow: ot,
1385
+ onClickRow: tt,
1387
1386
  selectedCategory: $,
1388
1387
  selectedDateRange: i
1389
1388
  }
@@ -1398,13 +1397,13 @@ const Qe = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1398
1397
  {
1399
1398
  onClose: () => ye(!1),
1400
1399
  showConnectWidget: we,
1401
- title: k.mini_title
1400
+ title: R.mini_title
1402
1401
  }
1403
1402
  )
1404
1403
  ]
1405
1404
  }
1406
1405
  );
1407
- }, Nn = H(Ao);
1406
+ }, Nn = k(Ao);
1408
1407
  export {
1409
1408
  Rn as TrendsFullWidget,
1410
1409
  Hn as TrendsMicroWidget,