@mx-cartographer/experiences 6.24.12 → 6.25.0-alpha.sms2

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.
package/dist/index.es.js CHANGED
@@ -6,7 +6,7 @@ import F from "@mui/material/Divider";
6
6
  import ie from "@mui/material/List";
7
7
  import Ot from "@mui/material/ListSubheader";
8
8
  import Re from "@mui/system/Stack";
9
- import { AccountsIcon as xl, P as _e, Icon as K, useTokens as yt, Text as C, H2 as sn, CategoryIcon as Mt, DialogHeader as Il, DialogFooter as wl, Drawer as vl, Footer as Nl, DateRangePicker as Fo, H3 as rt, H1 as $t, TextField as yn, IconWeight as At, MerchantLogo as on, CategoryIconList as Dl, CategoryIconVariants as _s, InstitutionLogo as ft, ChevronRightIcon as hs, THEMES as Wo } from "@mxenabled/mxui";
9
+ import { AccountsIcon as xl, P as _e, Icon as K, useTokens as yt, Text as C, H2 as cn, CategoryIcon as Mt, DialogHeader as Il, DialogFooter as wl, Drawer as vl, Footer as Nl, DateRangePicker as Fo, H3 as rt, H1 as $t, TextField as En, IconWeight as At, MerchantLogo as on, CategoryIconList as Dl, CategoryIconVariants as _s, InstitutionLogo as ft, ChevronRightIcon as hs, THEMES as Wo } from "@mxenabled/mxui";
10
10
  import Rl from "bowser";
11
11
  import { getUnixTime as Pe } from "date-fns/getUnixTime";
12
12
  import { intlFormat as Ll } from "date-fns/intlFormat";
@@ -32,10 +32,10 @@ import ae from "@mui/material/ListItemText";
32
32
  import ms from "@mui/material/Popover";
33
33
  import b from "@mui/material/Stack";
34
34
  import zi from "@mui/material/Checkbox";
35
- import { alpha as Ml, lighten as Uo, darken as Vo, Stack as xe, Box as xn, useTheme as cn, Card as aa, CardContent as kl, Button as Gl } from "@mui/material";
35
+ import { alpha as Ml, lighten as Uo, darken as Vo, Stack as xe, Box as xn, useTheme as ln, Card as aa, CardContent as kl, Button as Gl } from "@mui/material";
36
36
  import pe from "@mui/material/styles/useTheme";
37
37
  import rn from "@mui/material/useMediaQuery";
38
- import { css as ln, keyframes as Bl } from "@mxenabled/cssinjs";
38
+ import { css as dn, keyframes as Bl } from "@mxenabled/cssinjs";
39
39
  import { addDays as Rn } from "date-fns/addDays";
40
40
  import { eachDayOfInterval as Hl } from "date-fns/eachDayOfInterval";
41
41
  import { eachWeekOfInterval as Pl } from "date-fns/eachWeekOfInterval";
@@ -56,7 +56,7 @@ import bt from "@mui/material/Card";
56
56
  import kt from "@mui/material/CardContent";
57
57
  import it from "@mui/material/Grid";
58
58
  import { differenceInCalendarDays as hd } from "date-fns/differenceInCalendarDays";
59
- import { endOfToday as En } from "date-fns/endOfToday";
59
+ import { endOfToday as sn } from "date-fns/endOfToday";
60
60
  import { endOfYear as Ko } from "date-fns/endOfYear";
61
61
  import { startOfYear as Yo } from "date-fns/startOfYear";
62
62
  import { subDays as It } from "date-fns/subDays";
@@ -68,7 +68,7 @@ import Vn from "@mui/material/ToggleButton";
68
68
  import ti from "@mui/material/ToggleButtonGroup";
69
69
  import md from "@mui/material/Dialog";
70
70
  import xs from "@mui/material/DialogContent";
71
- import dn from "@mui/material/CardHeader";
71
+ import un from "@mui/material/CardHeader";
72
72
  import { ConnectWidget as pd, ConnectionsWidget as Cd } from "@mxenabled/web-widget-sdk";
73
73
  import qa from "@mui/material/CircularProgress";
74
74
  import { v4 as fd } from "uuid";
@@ -94,7 +94,7 @@ import { AdapterDateFns as ni } from "@mui/x-date-pickers/AdapterDateFnsV3";
94
94
  import { DatePicker as Qa } from "@mui/x-date-pickers";
95
95
  import { LocalizationProvider as Ti } from "@mui/x-date-pickers/LocalizationProvider";
96
96
  import ii from "@mui/material/Collapse";
97
- import gn from "@mui/material/Skeleton";
97
+ import mn from "@mui/material/Skeleton";
98
98
  import { isAfter as tn } from "date-fns/isAfter";
99
99
  import { parseISO as Md } from "date-fns/parseISO";
100
100
  import { subQuarters as ws } from "date-fns/subQuarters";
@@ -115,7 +115,7 @@ import { getWeeksInMonth as qo } from "date-fns/getWeeksInMonth";
115
115
  import { DateCalendar as eo } from "@mui/x-date-pickers/DateCalendar";
116
116
  import Ls from "@mui/material/Badge";
117
117
  import { PickersDay as Fd } from "@mui/x-date-pickers/PickersDay";
118
- import fn from "@mui/material/Unstable_Grid2";
118
+ import bn from "@mui/material/Unstable_Grid2";
119
119
  import { formatDistanceToNow as Os } from "date-fns/formatDistanceToNow";
120
120
  import xi from "@mui/material/Accordion";
121
121
  import Ii from "@mui/material/AccordionDetails";
@@ -1653,7 +1653,7 @@ const Ou = (e, n) => {
1653
1653
  ] }),
1654
1654
  /* @__PURE__ */ t(C, { variant: "XSmall", children: n })
1655
1655
  ] });
1656
- }, Gu = (e, n) => ln({
1656
+ }, Gu = (e, n) => dn({
1657
1657
  alignItems: "center",
1658
1658
  display: "flex",
1659
1659
  gap: e.Spacing.XSmall,
@@ -1720,7 +1720,7 @@ const Ou = (e, n) => {
1720
1720
  ] });
1721
1721
  }, Bu = (e, n, i) => {
1722
1722
  const a = `expandBar-${Math.round(i)}`, o = Bl(a, { from: { height: 0 }, to: { height: i } });
1723
- return ln({
1723
+ return dn({
1724
1724
  display: "flex",
1725
1725
  flexDirection: "column",
1726
1726
  justifyContent: "flex-end",
@@ -1804,7 +1804,7 @@ const Ou = (e, n) => {
1804
1804
  }
1805
1805
  )
1806
1806
  ] });
1807
- }, Hu = (e, n) => ln({
1807
+ }, Hu = (e, n) => dn({
1808
1808
  display: "flex",
1809
1809
  flexDirection: "column",
1810
1810
  flexGrow: n === void 0 ? 1 : 0,
@@ -1883,7 +1883,7 @@ const Ou = (e, n) => {
1883
1883
  ] }),
1884
1884
  /* @__PURE__ */ t(ku, { color: i, labelAverage: r, labelMain: s })
1885
1885
  ] });
1886
- }, Vu = (e) => ln({
1886
+ }, Vu = (e) => dn({
1887
1887
  "& .mx-cmn-chart-container": {
1888
1888
  alignItems: "flex-end",
1889
1889
  display: "flex",
@@ -1894,13 +1894,13 @@ const Ou = (e, n) => {
1894
1894
  }), Ku = ({ copy: e, date: n, onNextClick: i, onPreviousClick: a }) => {
1895
1895
  const o = yt(), r = Yu(o);
1896
1896
  return /* @__PURE__ */ l("div", { className: `mx-cmn-calendar-header ${r}`, children: [
1897
- /* @__PURE__ */ t(sn, { className: "mx-cmn-calendar-header-title", variant: "H3", children: oe(n, ee.MONTH_YEAR) }),
1897
+ /* @__PURE__ */ t(cn, { className: "mx-cmn-calendar-header-title", variant: "H3", children: oe(n, ee.MONTH_YEAR) }),
1898
1898
  /* @__PURE__ */ l("div", { className: "mx-cmn-calendar-header-button-container", children: [
1899
1899
  /* @__PURE__ */ t(Q, { "aria-label": e.prevAria, onClick: a, children: /* @__PURE__ */ t(ps, { size: 24 }) }),
1900
1900
  /* @__PURE__ */ t(Q, { "aria-label": e.nextAria, onClick: i, children: /* @__PURE__ */ t(Qe, { size: 24 }) })
1901
1901
  ] })
1902
1902
  ] });
1903
- }, Yu = (e) => ln({
1903
+ }, Yu = (e) => dn({
1904
1904
  alignItems: "center",
1905
1905
  display: "flex",
1906
1906
  marginBottom: e.Spacing.Medium,
@@ -1950,7 +1950,7 @@ const Ou = (e, n) => {
1950
1950
  )
1951
1951
  }
1952
1952
  );
1953
- }, ju = (e) => ln({
1953
+ }, ju = (e) => dn({
1954
1954
  height: mi,
1955
1955
  width: mi,
1956
1956
  display: "flex",
@@ -2059,7 +2059,7 @@ const Xu = ({
2059
2059
  )) }, `w-${w}`)),
2060
2060
  /* @__PURE__ */ t("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ t(Q, { onClick: y, size: "small", variant: "text", children: e.today }) })
2061
2061
  ] }) });
2062
- }, qu = (e) => ln({
2062
+ }, qu = (e) => dn({
2063
2063
  width: $u,
2064
2064
  "& .MuiPaper-root": {
2065
2065
  paddingLeft: 24,
@@ -2464,7 +2464,7 @@ const Xu = ({
2464
2464
  series: a,
2465
2465
  xData: o
2466
2466
  }) => {
2467
- const r = cn(), s = a.data[i], c = o[i];
2467
+ const r = ln(), s = a.data[i], c = o[i];
2468
2468
  return s === void 0 || !c ? null : /* @__PURE__ */ t(aa, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ t(kl, { children: /* @__PURE__ */ l(xn, { alignItems: "center", display: "flex", flexDirection: "column", children: [
2469
2469
  /* @__PURE__ */ t(ec, { categoryGuid: e, topLevelCategoryGuid: n }),
2470
2470
  /* @__PURE__ */ t(C, { color: r.palette.text.secondary, variant: "Small", children: oe(c, ee.MONTH_SHORT_YEAR) }),
@@ -2827,7 +2827,7 @@ const Xu = ({
2827
2827
  margin: "auto",
2828
2828
  textAlign: "center"
2829
2829
  },
2830
- children: /* @__PURE__ */ t(sn, { bold: !0, variant: "Body", children: o })
2830
+ children: /* @__PURE__ */ t(cn, { bold: !0, variant: "Body", children: o })
2831
2831
  }
2832
2832
  ),
2833
2833
  /* @__PURE__ */ t(k, { width: "44px" })
@@ -2899,7 +2899,7 @@ const Xu = ({
2899
2899
  calendarActions: e,
2900
2900
  color: n = "primary",
2901
2901
  copy: i,
2902
- range: a = [Ye(Se()), We(En())],
2902
+ range: a = [Ye(Se()), We(sn())],
2903
2903
  shouldShrinkToIcon: o = !0,
2904
2904
  variant: r = "outlined"
2905
2905
  }) => {
@@ -2923,7 +2923,7 @@ const Xu = ({
2923
2923
  (r === "timeframebuttons" || r === "timeframetabs") && e.onRangeChanged(D());
2924
2924
  }, [I]);
2925
2925
  const D = () => {
2926
- const R = We(En());
2926
+ const R = We(sn());
2927
2927
  return [We(Tt(R, I)), R];
2928
2928
  }, O = (R) => {
2929
2929
  const L = [...d], U = d[0], te = d[1], ue = R === "previous";
@@ -3156,7 +3156,7 @@ const Xu = ({
3156
3156
  ] }),
3157
3157
  /* @__PURE__ */ t("div", { className: "mx-cmn-multi-segment-donut-children", children: o })
3158
3158
  ] });
3159
- }, l_ = (e, n) => ln({
3159
+ }, l_ = (e, n) => dn({
3160
3160
  height: n,
3161
3161
  marginTop: `-${e.Spacing.XSmall}px`,
3162
3162
  position: "relative",
@@ -3289,7 +3289,7 @@ const ha = ({
3289
3289
  }) => {
3290
3290
  const [d, { height: _, width: u }] = vi(), h = /* @__PURE__ */ l(Z, { children: [
3291
3291
  /* @__PURE__ */ t(
3292
- dn,
3292
+ un,
3293
3293
  {
3294
3294
  action: /* @__PURE__ */ t(
3295
3295
  Q,
@@ -3323,7 +3323,7 @@ const ha = ({
3323
3323
  const [_, { height: u, width: h }] = vi();
3324
3324
  return /* @__PURE__ */ l(bt, { className: e, sx: { ...c }, children: [
3325
3325
  /* @__PURE__ */ t(
3326
- dn,
3326
+ un,
3327
3327
  {
3328
3328
  action: a ? /* @__PURE__ */ t(Fe, { "aria-label": n, onClick: a, children: /* @__PURE__ */ t(_t, { name: "close", size: 24 }) }) : o && /* @__PURE__ */ t(Q, { endIcon: /* @__PURE__ */ t(Qe, {}), onClick: o, children: /* @__PURE__ */ t(C, { bold: !0, variant: "Small", children: r }) }),
3329
3329
  subheader: s || null,
@@ -3406,7 +3406,7 @@ const ha = ({
3406
3406
  },
3407
3407
  children: [
3408
3408
  m && /* @__PURE__ */ t(
3409
- dn,
3409
+ un,
3410
3410
  {
3411
3411
  action: /* @__PURE__ */ l(b, { alignItems: "center", flexDirection: "row", children: [
3412
3412
  v && i && /* @__PURE__ */ t(k, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ t(
@@ -3458,18 +3458,15 @@ const ha = ({
3458
3458
  })
3459
3459
  ] }),
3460
3460
  sx: {
3461
- p: v ? 48 : 24,
3462
- pb: 0,
3463
3461
  "& .MuiCardHeader-action": {
3464
- mr: 0,
3465
3462
  ...i && v && { flexGrow: 1 },
3466
- ...(w || D) && { alignSelf: "center" }
3463
+ ...(w || D) && { alignSelf: "center" },
3464
+ mr: 0
3467
3465
  },
3468
- "& .MuiCardHeader-content": {
3469
- overflow: "hidden"
3470
- }
3466
+ p: v ? 48 : 24,
3467
+ pb: 0
3471
3468
  },
3472
- title: v || D ? /* @__PURE__ */ t($t, { children: m }) : /* @__PURE__ */ l(b, { alignItems: "center", flexDirection: "row", sx: { overflow: "hidden" }, children: [
3469
+ title: v || D ? /* @__PURE__ */ t($t, { children: m }) : /* @__PURE__ */ l(b, { alignItems: "center", flexDirection: "row", children: [
3473
3470
  w && d && /* @__PURE__ */ t(
3474
3471
  Fe,
3475
3472
  {
@@ -3626,7 +3623,7 @@ const cr = "connect_widget", lr = "connections_widget", m_ = ({
3626
3623
  ), u?.(!1)) : M.toString().match(D) ? r() ? (p(""), u?.(!0)) : (p(s), u?.(!1)) : (p(E.error_amount_is_invalid), u?.(!1)), _(M.toString());
3627
3624
  };
3628
3625
  return /* @__PURE__ */ t(
3629
- yn,
3626
+ En,
3630
3627
  {
3631
3628
  InputProps: {
3632
3629
  endAdornment: On().includes("fr-ca") ? /* @__PURE__ */ t(_e, { children: "$" }) : void 0,
@@ -3648,7 +3645,7 @@ const cr = "connect_widget", lr = "connections_widget", m_ = ({
3648
3645
  ...h
3649
3646
  }
3650
3647
  );
3651
- }, p_ = (e) => ln({
3648
+ }, p_ = (e) => dn({
3652
3649
  "& .MuiInputBase-adornedStart > .p": {
3653
3650
  marginRight: e.Spacing.Tiny
3654
3651
  }
@@ -3705,7 +3702,7 @@ const cr = "connect_widget", lr = "connections_widget", m_ = ({
3705
3702
  }
3706
3703
  );
3707
3704
  return /* @__PURE__ */ t(k, { className: "mx-cmn-search-box", px: r.Spacing.Large, py: r.Spacing.Medium, children: /* @__PURE__ */ t(
3708
- yn,
3705
+ En,
3709
3706
  {
3710
3707
  InputProps: {
3711
3708
  startAdornment: /* @__PURE__ */ t(ji, { position: "start", children: /* @__PURE__ */ t(K, { color: "disabled", name: "search", size: 26 }) }),
@@ -3860,7 +3857,7 @@ const cr = "connect_widget", lr = "connections_widget", m_ = ({
3860
3857
  return /* @__PURE__ */ l(g.Fragment, { children: [
3861
3858
  /* @__PURE__ */ l(bt, { sx: { m: 24 }, children: [
3862
3859
  /* @__PURE__ */ t(
3863
- dn,
3860
+ un,
3864
3861
  {
3865
3862
  avatar: /* @__PURE__ */ t(Cs, {}),
3866
3863
  sx: { ".MuiCardHeader-avatar": { mr: 8 } },
@@ -3915,7 +3912,7 @@ const cr = "connect_widget", lr = "connections_widget", m_ = ({
3915
3912
  },
3916
3913
  children: [
3917
3914
  /* @__PURE__ */ t(_t, { name: i, size: 54, sx: { color: e } }),
3918
- /* @__PURE__ */ t(sn, { color: "text.primary", sx: { textWrap: "wrap", textAlign: "center" }, children: n }),
3915
+ /* @__PURE__ */ t(cn, { color: "text.primary", sx: { textWrap: "wrap", textAlign: "center" }, children: n }),
3919
3916
  /* @__PURE__ */ t(
3920
3917
  C,
3921
3918
  {
@@ -4062,7 +4059,7 @@ const cr = "connect_widget", lr = "connections_widget", m_ = ({
4062
4059
  !a && n && /* @__PURE__ */ t(gt, { children: n })
4063
4060
  ] })
4064
4061
  }
4065
- ), bn = ({
4062
+ ), yn = ({
4066
4063
  isChecked: e,
4067
4064
  isDisabled: n = !1,
4068
4065
  onToggle: i,
@@ -4268,7 +4265,7 @@ const _r = (e, n) => !e && !n ? 0 : !e && n ? 101 : n / e * 100, hr = (e, n) =>
4268
4265
  };
4269
4266
  return e > 100 ? (i.background = n.palette.error.main, i.mercury = n.palette.error.lighter) : e > 80 && (i.background = n.palette.warning.main, i.text = n.palette.grey[900], i.mercury = n.palette.warning.lighter), i;
4270
4267
  }, T_ = () => {
4271
- const { detailedBudgets: e } = ht();
4268
+ const { budgets: e } = ht();
4272
4269
  return e.map((i) => {
4273
4270
  const a = i.transaction_total;
4274
4271
  return i.amount - a;
@@ -5281,7 +5278,7 @@ const ac = (e, n) => {
5281
5278
  }, ih = (e, n, i) => {
5282
5279
  const {
5283
5280
  accounts: a = [],
5284
- dateRange: o = { start: Ye(Se()), end: En() },
5281
+ dateRange: o = { start: Ye(Se()), end: sn() },
5285
5282
  custom: r = () => !0,
5286
5283
  searchTerm: s = ""
5287
5284
  } = e;
@@ -5393,14 +5390,20 @@ class dh {
5393
5390
  constructor(n) {
5394
5391
  this.globalStore = n, this.uiStore = new lh(), this.api = new Ji(n.endpoint, n.sessionToken), this.beatApi = new Qn(n.endpoint, n.sessionToken), He(this);
5395
5392
  }
5396
- loadTransactionData = async () => {
5393
+ loadTransactionData = async ({
5394
+ associatedBeats: n,
5395
+ taggings: i,
5396
+ tags: a,
5397
+ transactionRules: o,
5398
+ transactions: r
5399
+ }) => {
5397
5400
  await Promise.all([
5398
- this.loadAssociatedBeats(Ye(/* @__PURE__ */ new Date())),
5399
- this.loadTags(),
5400
- this.loadTaggings(),
5401
- this.loadTransactionRules(),
5401
+ this.loadAssociatedBeats(Ye(/* @__PURE__ */ new Date()), n),
5402
+ this.loadTags(a),
5403
+ this.loadTaggings(i),
5404
+ this.loadTransactionRules(o),
5402
5405
  // By default loads 90 days of transactions
5403
- this.loadTransactions()
5406
+ this.loadTransactions(this.cachedStartDate, sn(), r)
5404
5407
  ]), q(() => {
5405
5408
  this.uiStore.setIsInitialized(!0);
5406
5409
  });
@@ -5454,34 +5457,35 @@ class dh {
5454
5457
  this.globalStore.categoryStore.categories,
5455
5458
  this.taggings
5456
5459
  );
5457
- loadAssociatedBeats = async (n) => {
5458
- const i = n ? ca(n, { representation: "date" }) : void 0, a = await this.beatApi.getBeatsWithAssociatedTransaction(i);
5459
- q(() => this.associatedBeats = a);
5460
+ getTransactionData = () => ({});
5461
+ loadAssociatedBeats = async (n, i) => {
5462
+ const a = n ? ca(n, { representation: "date" }) : void 0, o = i ?? await this.beatApi.getBeatsWithAssociatedTransaction(a);
5463
+ q(() => this.associatedBeats = o);
5460
5464
  };
5461
- loadTags = async () => {
5462
- const n = await this.api.getTags();
5463
- q(() => this.tags = n);
5465
+ loadTags = async (n) => {
5466
+ const i = n ?? await this.api.getTags();
5467
+ q(() => this.tags = i);
5464
5468
  };
5465
- loadTaggings = async () => {
5466
- const n = await this.api.getTaggings();
5467
- q(() => this.taggings = n);
5469
+ loadTaggings = async (n) => {
5470
+ const i = n ?? await this.api.getTaggings();
5471
+ q(() => this.taggings = i);
5468
5472
  };
5469
- loadTransactionRules = async () => {
5470
- const n = await this.api.getTransactionRules();
5471
- q(() => this.transactionRules = n);
5473
+ loadTransactionRules = async (n) => {
5474
+ const i = n ?? await this.api.getTransactionRules();
5475
+ q(() => this.transactionRules = i);
5472
5476
  };
5473
- loadTransactions = async (n = this.cachedStartDate, i = En()) => {
5477
+ loadTransactions = async (n = this.cachedStartDate, i = sn(), a) => {
5474
5478
  this.setIsLoading(!0), this.rawTransactions = [];
5475
5479
  try {
5476
- const a = await this.api.getTransactionsByDateRange(
5480
+ const o = a ?? await this.api.getTransactionsByDateRange(
5477
5481
  Pe(n),
5478
5482
  Pe(i)
5479
5483
  );
5480
5484
  q(() => {
5481
- this.rawTransactions = a;
5485
+ this.rawTransactions = o;
5482
5486
  });
5483
- } catch (a) {
5484
- console.error(`Error occurred while loading transactions: ${a}`);
5487
+ } catch (o) {
5488
+ console.error(`Error occurred while loading transactions: ${o}`);
5485
5489
  }
5486
5490
  this.setIsLoading(!1);
5487
5491
  };
@@ -5512,7 +5516,7 @@ class dh {
5512
5516
  }
5513
5517
  };
5514
5518
  setFilter = (n) => {
5515
- this.filter = n, n.dateRange && Je(n.dateRange.start, this.cachedStartDate) && this.loadTransactions(n.dateRange.start, En()).then(() => {
5519
+ this.filter = n, n.dateRange && Je(n.dateRange.start, this.cachedStartDate) && this.loadTransactions(n.dateRange.start, sn()).then(() => {
5516
5520
  n.dateRange && (this.cachedStartDate = n.dateRange.start);
5517
5521
  });
5518
5522
  };
@@ -5894,7 +5898,7 @@ const gh = ({ transaction: e, onClick: n }) => {
5894
5898
  }
5895
5899
  }
5896
5900
  ) });
5897
- }, vh = T(wh), un = () => {
5901
+ }, vh = T(wh), _n = () => {
5898
5902
  if (!g.useContext(Yn))
5899
5903
  throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
5900
5904
  return Ve().uiStore;
@@ -5919,7 +5923,7 @@ const Nh = ({
5919
5923
  isOpen: a,
5920
5924
  type: o
5921
5925
  }) => {
5922
- const [r, s] = g.useState(e), { categories: c } = x(), { setShouldDisableDrawerScroll: d } = un();
5926
+ const [r, s] = g.useState(e), { categories: c } = x(), { setShouldDisableDrawerScroll: d } = _n();
5923
5927
  let _ = "", u = [];
5924
5928
  const h = o === "delete";
5925
5929
  switch (o) {
@@ -5951,7 +5955,7 @@ const Nh = ({
5951
5955
  d(!1), i(r);
5952
5956
  },
5953
5957
  children: /* @__PURE__ */ t(xs, { children: h ? /* @__PURE__ */ t(C, { children: u }) : /* @__PURE__ */ t(
5954
- yn,
5958
+ En,
5955
5959
  {
5956
5960
  "aria-label": o === "edit" ? c.edit_subcategory_aria : c.add_subcategory_aria,
5957
5961
  name: "modify-subcategory",
@@ -5964,7 +5968,7 @@ const Nh = ({
5964
5968
  }
5965
5969
  );
5966
5970
  }, Eo = T(Nh), Dh = ({ parentCategory: e }) => {
5967
- const [n, i] = g.useState(!1), { addCategory: a } = Ve(), { categories: o } = x(), { onEvent: r } = X(), { setShouldDisableDrawerScroll: s } = un(), c = async (u) => {
5971
+ const [n, i] = g.useState(!1), { addCategory: a } = Ve(), { categories: o } = x(), { onEvent: r } = X(), { setShouldDisableDrawerScroll: s } = _n(), c = async (u) => {
5968
5972
  await a(u.trim(), e.guid), r(jt.ON_SUBCATEGORY_ADDED), i(!1);
5969
5973
  }, d = async () => {
5970
5974
  r(jt.ON_SUBCATEGORY_ADD_CLICK), s(!0), i(!0);
@@ -6039,7 +6043,7 @@ const Nh = ({
6039
6043
  showSelected: s,
6040
6044
  unselectable: c,
6041
6045
  unselectableText: d
6042
- } = un(), { categories: _ } = x(), { onEvent: u } = X(), [h, m] = g.useState(!1), [p, f] = g.useState(!1), E = !!n.revision, y = n.guid === a, A = !c.some((v) => v === n.guid);
6046
+ } = _n(), { categories: _ } = x(), { onEvent: u } = X(), [h, m] = g.useState(!1), [p, f] = g.useState(!1), E = !!n.revision, y = n.guid === a, A = !c.some((v) => v === n.guid);
6043
6047
  return /* @__PURE__ */ l(
6044
6048
  j,
6045
6049
  {
@@ -6114,7 +6118,7 @@ const Nh = ({
6114
6118
  }
6115
6119
  );
6116
6120
  }, Bh = T(Gh), Hh = ({ categories: e, parentCategory: n }) => {
6117
- const { expandedGuid: i, searchValue: a } = un(), o = n.guid === i, r = !!a;
6121
+ const { expandedGuid: i, searchValue: a } = _n(), o = n.guid === i, r = !!a;
6118
6122
  return /* @__PURE__ */ t(
6119
6123
  ii,
6120
6124
  {
@@ -6140,7 +6144,7 @@ const Nh = ({
6140
6144
  }
6141
6145
  );
6142
6146
  }, Ph = T(Hh), Fh = ({ category: e, subCategories: n }) => {
6143
- const { expandedGuid: i, searchValue: a, setExpandedGuid: o } = un(), { onEvent: r } = X(), s = e.guid === i, c = () => {
6147
+ const { expandedGuid: i, searchValue: a, setExpandedGuid: o } = _n(), { onEvent: r } = X(), s = e.guid === i, c = () => {
6144
6148
  const d = e.guid !== i ? e.guid : null;
6145
6149
  o(d), r(d ? jt.ON_CATEGORY_EXPANDED : jt.ON_CATEGORY_COLLAPSED);
6146
6150
  };
@@ -6179,7 +6183,7 @@ const Nh = ({
6179
6183
  /* @__PURE__ */ t(Ph, { categories: n, parentCategory: e })
6180
6184
  ] });
6181
6185
  }, rc = T(Fh), Wh = () => {
6182
- const { categories: e } = Ve(), { searchValue: n } = un(), { categories: i } = x(), o = ((r, s = "") => r.reduce((c, d) => {
6186
+ const { categories: e } = Ve(), { searchValue: n } = _n(), { categories: i } = x(), o = ((r, s = "") => r.reduce((c, d) => {
6183
6187
  if (d.parent_guid === null) {
6184
6188
  const u = [
6185
6189
  {
@@ -6219,7 +6223,7 @@ const Nh = ({
6219
6223
  setShowSelected: p,
6220
6224
  setUnselectable: f,
6221
6225
  setUnselectableText: E
6222
- } = un();
6226
+ } = _n();
6223
6227
  return g.useEffect(() => {
6224
6228
  n && u(n);
6225
6229
  }), g.useEffect(() => {
@@ -6379,17 +6383,18 @@ class Xh {
6379
6383
  console.error(`Error occurred while adding category: ${o}`);
6380
6384
  }
6381
6385
  };
6382
- loadCategories = async () => {
6386
+ getCategoryData = () => ({ categories: this.categories });
6387
+ loadCategories = async (n) => {
6383
6388
  try {
6384
- const n = await this.api.getCategories(), { default_categories: i } = this.globalStore.copyStore.copy.categories;
6389
+ const i = n ?? await this.api.getCategories(), { default_categories: a } = this.globalStore.copyStore.copy.categories;
6385
6390
  q(() => {
6386
- this.categories = n.map((a) => ({
6387
- ...a,
6388
- name: i[a.guid] ? i[a.guid].replace(/&/g, "&") : a.name
6391
+ this.categories = i.map((o) => ({
6392
+ ...o,
6393
+ name: a[o.guid] ? a[o.guid].replace(/&/g, "&") : o.name
6389
6394
  }));
6390
6395
  });
6391
- } catch (n) {
6392
- console.error(`Error occurred while getting categories: ${n}`);
6396
+ } catch (i) {
6397
+ console.error(`Error occurred while getting categories: ${i}`);
6393
6398
  }
6394
6399
  };
6395
6400
  loadDateRangeCategoryTotals = async (n, i, a) => {
@@ -7163,7 +7168,7 @@ const cc = ({ transaction: e }) => {
7163
7168
  onSecondaryAction: () => r(!1),
7164
7169
  children: [
7165
7170
  /* @__PURE__ */ t(
7166
- yn,
7171
+ En,
7167
7172
  {
7168
7173
  "aria-label": a.tags_placeholder,
7169
7174
  name: "add-tag",
@@ -7188,7 +7193,7 @@ const cc = ({ transaction: e }) => {
7188
7193
  }
7189
7194
  );
7190
7195
  return /* @__PURE__ */ t(k, { className: "mx-txn-tag-manager-search", px: o.Spacing.Large, py: o.Spacing.Medium, children: /* @__PURE__ */ t(
7191
- yn,
7196
+ En,
7192
7197
  {
7193
7198
  InputProps: {
7194
7199
  startAdornment: /* @__PURE__ */ t(ji, { position: "start", children: /* @__PURE__ */ t(Kd, { color: "disabled" }) }),
@@ -7265,7 +7270,7 @@ const cc = ({ transaction: e }) => {
7265
7270
  onSecondaryAction: () => _(!1),
7266
7271
  children: [
7267
7272
  /* @__PURE__ */ t(
7268
- yn,
7273
+ En,
7269
7274
  {
7270
7275
  "aria-describedby": f ? "update-tag-error" : void 0,
7271
7276
  "aria-label": c.tags_update_the_tag_name,
@@ -7593,7 +7598,7 @@ const cc = ({ transaction: e }) => {
7593
7598
  }
7594
7599
  ),
7595
7600
  /* @__PURE__ */ t(
7596
- yn,
7601
+ En,
7597
7602
  {
7598
7603
  label: i.payee_title,
7599
7604
  name: "payee",
@@ -7603,7 +7608,7 @@ const cc = ({ transaction: e }) => {
7603
7608
  }
7604
7609
  ),
7605
7610
  /* @__PURE__ */ t(
7606
- yn,
7611
+ En,
7607
7612
  {
7608
7613
  InputLabelProps: { shrink: !0 },
7609
7614
  SelectProps: { defaultValue: -1, IconComponent: to },
@@ -7671,7 +7676,7 @@ const cc = ({ transaction: e }) => {
7671
7676
  showInsights: i = !1,
7672
7677
  sx: a = {}
7673
7678
  }) => {
7674
- const { visibleAccounts: o, refreshAccounts: r } = Ce(), { is_mobile_webview: s } = Pt(), { setSearchValue: c } = un(), { onEvent: d } = X(), { common: _, transactions: u } = x(), {
7679
+ const { visibleAccounts: o, refreshAccounts: r } = Ce(), { is_mobile_webview: s } = Pt(), { setSearchValue: c } = _n(), { onEvent: d } = X(), { common: _, transactions: u } = x(), {
7675
7680
  displayedDateRange: h,
7676
7681
  isCopyLoaded: m,
7677
7682
  isInitialized: p,
@@ -8800,8 +8805,8 @@ const cc = ({ transaction: e }) => {
8800
8805
  end: We(U)
8801
8806
  });
8802
8807
  };
8803
- return /* @__PURE__ */ l(fn, { container: !0, sx: { pt: 16, px: 24, spacing: 24 }, children: [
8804
- /* @__PURE__ */ t(fn, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ l(b, { sx: { gap: 16 }, children: [
8808
+ return /* @__PURE__ */ l(bn, { container: !0, sx: { pt: 16, px: 24, spacing: 24 }, children: [
8809
+ /* @__PURE__ */ t(bn, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ l(b, { sx: { gap: 16 }, children: [
8805
8810
  /* @__PURE__ */ l(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
8806
8811
  /* @__PURE__ */ t(rt, { sx: { px: 24 }, children: S(
8807
8812
  e.header_title,
@@ -8881,7 +8886,7 @@ const cc = ({ transaction: e }) => {
8881
8886
  )
8882
8887
  ] })
8883
8888
  ] }) }),
8884
- n && /* @__PURE__ */ t(fn, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ l(b, { gap: 24, children: [
8889
+ n && /* @__PURE__ */ t(bn, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ l(b, { gap: 24, children: [
8885
8890
  /* @__PURE__ */ t(Ec, {}),
8886
8891
  /* @__PURE__ */ t(
8887
8892
  hi,
@@ -8902,7 +8907,7 @@ const cc = ({ transaction: e }) => {
8902
8907
  c(i);
8903
8908
  }, [i]), g.useEffect(() => {
8904
8909
  r && (h({
8905
- dateRange: { start: It(Se(), 90), end: En() },
8910
+ dateRange: { start: It(Se(), 90), end: sn() },
8906
8911
  accounts: s
8907
8912
  }), u({ start: Ye(/* @__PURE__ */ new Date()), end: We(/* @__PURE__ */ new Date()) }), _().finally());
8908
8913
  }, [r]), o ? /* @__PURE__ */ l(
@@ -8924,9 +8929,9 @@ const cc = ({ transaction: e }) => {
8924
8929
  title: a.title,
8925
8930
  children: [
8926
8931
  r && d ? /* @__PURE__ */ t(Bg, {}) : /* @__PURE__ */ l(b, { direction: "column", p: 48, spacing: 24, children: [
8927
- /* @__PURE__ */ t(gn, { height: 100, variant: "rounded", width: "100%" }),
8928
- /* @__PURE__ */ t(gn, { height: 100, variant: "rounded", width: "100%" }),
8929
- /* @__PURE__ */ t(gn, { height: 600, variant: "rounded", width: "100%" })
8932
+ /* @__PURE__ */ t(mn, { height: 100, variant: "rounded", width: "100%" }),
8933
+ /* @__PURE__ */ t(mn, { height: 100, variant: "rounded", width: "100%" }),
8934
+ /* @__PURE__ */ t(mn, { height: 600, variant: "rounded", width: "100%" })
8930
8935
  ] }),
8931
8936
  /* @__PURE__ */ t(
8932
8937
  ce,
@@ -8968,7 +8973,7 @@ const cc = ({ transaction: e }) => {
8968
8973
  d && _(i);
8969
8974
  }, [d]), g.useEffect(() => {
8970
8975
  u.length > 0 && (o({
8971
- dateRange: { start: It(Se(), 90), end: En() },
8976
+ dateRange: { start: It(Se(), 90), end: sn() },
8972
8977
  accounts: u
8973
8978
  }), s().finally());
8974
8979
  }, [u]), !c || !d ? /* @__PURE__ */ t(le, {}) : /* @__PURE__ */ t(
@@ -9077,7 +9082,7 @@ const cc = ({ transaction: e }) => {
9077
9082
  _(a);
9078
9083
  }, [a]), g.useEffect(() => {
9079
9084
  c && (A({
9080
- dateRange: { start: It(Se(), 90), end: En() },
9085
+ dateRange: { start: It(Se(), 90), end: sn() },
9081
9086
  accounts: d
9082
9087
  }), E({ start: Ye(/* @__PURE__ */ new Date()), end: We(/* @__PURE__ */ new Date()) }), u().finally(), i(!0));
9083
9088
  }, [c]);
@@ -10176,7 +10181,7 @@ const Jg = ({ recurrence: e }) => /* @__PURE__ */ l(Z, { children: [
10176
10181
  return /* @__PURE__ */ l(b, { children: [
10177
10182
  /* @__PURE__ */ t($t, { pb: 12, children: i.welcome_title }),
10178
10183
  /* @__PURE__ */ t(
10179
- sn,
10184
+ cn,
10180
10185
  {
10181
10186
  color: a.palette.primary.light,
10182
10187
  pb: 8,
@@ -10452,7 +10457,7 @@ const Jg = ({ recurrence: e }) => /* @__PURE__ */ l(Z, { children: [
10452
10457
  (O) => a.includes(O.guid) && w.includes(O.guid)
10453
10458
  );
10454
10459
  m(D), _({
10455
- dateRange: { start: It(Se(), 90), end: En() },
10460
+ dateRange: { start: It(Se(), 90), end: sn() },
10456
10461
  accounts: D.map((O) => O.guid)
10457
10462
  });
10458
10463
  }, [d, i]), !y || !A ? /* @__PURE__ */ t(le, {}) : u?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ l(
@@ -10617,12 +10622,12 @@ function bm(e, n, i = 0) {
10617
10622
  payoffDuration: d ? "Stagnant" : xd(_, { format: ["years", "months"] }) || "0 months"
10618
10623
  };
10619
10624
  }
10620
- const _n = () => {
10625
+ const hn = () => {
10621
10626
  if (!g.useContext(Yn))
10622
10627
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
10623
10628
  return _a().uiStore;
10624
10629
  }, ym = ({ debts: e, onClickCta: n, sx: i }) => {
10625
- const a = cn(), { isMobile: o } = me(), { debts: r } = x(), { selectedDebtPriority: s } = _n(), { monthlyCashFlowProfile: c } = ct(), { payoffDate: d, payoffSavings: _, payoffDuration: u } = g.useMemo(() => {
10630
+ const a = ln(), { isMobile: o } = me(), { debts: r } = x(), { selectedDebtPriority: s } = hn(), { monthlyCashFlowProfile: c } = ct(), { payoffDate: d, payoffSavings: _, payoffDuration: u } = g.useMemo(() => {
10626
10631
  const h = c?.extra_payment ?? 0;
10627
10632
  return bm(e, s, h);
10628
10633
  }, [e, s, c]);
@@ -10674,7 +10679,7 @@ const _n = () => {
10674
10679
  }
10675
10680
  );
10676
10681
  }, Em = T(ym), Am = ({ isOpen: e, onClose: n, sx: i }) => {
10677
- const a = cn(), { debts: o } = x(), [r, s] = g.useState(!1);
10682
+ const a = ln(), { debts: o } = x(), [r, s] = g.useState(!1);
10678
10683
  return /* @__PURE__ */ t(
10679
10684
  ce,
10680
10685
  {
@@ -11121,7 +11126,7 @@ const _n = () => {
11121
11126
  },
11122
11127
  children: [
11123
11128
  /* @__PURE__ */ t(
11124
- dn,
11129
+ un,
11125
11130
  {
11126
11131
  sx: { pb: 0 },
11127
11132
  title: /* @__PURE__ */ t(rt, { sx: { pb: 4 }, children: oe(/* @__PURE__ */ new Date(), ee.MONTH_LONG) })
@@ -11152,7 +11157,7 @@ const _n = () => {
11152
11157
  /* @__PURE__ */ t(C, { variant: "Small", children: _?.name })
11153
11158
  ] }),
11154
11159
  /* @__PURE__ */ l(b, { gap: 8, mb: 24, mt: 4, children: [
11155
- /* @__PURE__ */ t(sn, { children: i.name || i.feed_name }),
11160
+ /* @__PURE__ */ t(cn, { children: i.name || i.feed_name }),
11156
11161
  /* @__PURE__ */ l(b, { direction: "row", justifyContent: "space-between", children: [
11157
11162
  /* @__PURE__ */ t(C, { bold: s, variant: "Body", children: o }),
11158
11163
  /* @__PURE__ */ t(C, { bold: !0, variant: "Body", children: P(r, "0,0.00") })
@@ -11296,7 +11301,7 @@ const Rc = ({
11296
11301
  }
11297
11302
  );
11298
11303
  }, Gm = () => {
11299
- const e = cn(), { debts: n } = x(), { selectedDebtChartData: i } = _n();
11304
+ const e = ln(), { debts: n } = x(), { selectedDebtChartData: i } = hn();
11300
11305
  return /* @__PURE__ */ l(Z, { children: [
11301
11306
  /* @__PURE__ */ l(
11302
11307
  bt,
@@ -11307,7 +11312,7 @@ const Rc = ({
11307
11312
  }
11308
11313
  },
11309
11314
  children: [
11310
- /* @__PURE__ */ t(dn, { sx: { pb: 0 }, title: /* @__PURE__ */ t(rt, { sx: { pb: 4 }, children: n.details_chart_title }) }),
11315
+ /* @__PURE__ */ t(un, { sx: { pb: 0 }, title: /* @__PURE__ */ t(rt, { sx: { pb: 4 }, children: n.details_chart_title }) }),
11311
11316
  /* @__PURE__ */ t(kt, { sx: { p: 0 }, children: /* @__PURE__ */ t(Rc, { debts: [i], height: 250 }) })
11312
11317
  ]
11313
11318
  }
@@ -11323,7 +11328,7 @@ const Rc = ({
11323
11328
  )
11324
11329
  ] });
11325
11330
  }, Bm = T(Gm), Hm = () => {
11326
- const e = cn(), { onEvent: n } = X(), { debts: i } = x(), { selectedDebtChartData: a, showCompleted: o, showError: r } = _n();
11331
+ const e = ln(), { onEvent: n } = X(), { debts: i } = x(), { selectedDebtChartData: a, showCompleted: o, showError: r } = hn();
11327
11332
  return g.useEffect(() => n(W.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ t(ie, { children: r || o ? /* @__PURE__ */ t(
11328
11333
  C,
11329
11334
  {
@@ -11582,7 +11587,7 @@ const Rc = ({
11582
11587
  }
11583
11588
  );
11584
11589
  }), Vm = () => {
11585
- const { onEvent: e } = X(), { selectedDebtChartData: n } = _n();
11590
+ const { onEvent: e } = X(), { selectedDebtChartData: n } = hn();
11586
11591
  return g.useEffect(() => e(W.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ l(b, { bgcolor: "background.paper", children: [
11587
11592
  n?.goal && /* @__PURE__ */ l(Z, { children: [
11588
11593
  /* @__PURE__ */ t(Oc, { goal: n.goal }),
@@ -11602,7 +11607,7 @@ const Rc = ({
11602
11607
  ] })
11603
11608
  ] });
11604
11609
  }, Km = T(Vm), Ym = ({ setTabValue: e, sx: n }) => {
11605
- const { debts: i } = x(), { showError: a, showCompleted: o } = _n();
11610
+ const { debts: i } = x(), { showError: a, showCompleted: o } = hn();
11606
11611
  return g.useEffect(() => {
11607
11612
  a && e(1);
11608
11613
  }, [a]), !a && !o ? /* @__PURE__ */ t(Z, {}) : /* @__PURE__ */ l(xe, { gap: 16, children: [
@@ -11647,7 +11652,7 @@ const Rc = ({
11647
11652
  ) })
11648
11653
  ] });
11649
11654
  }, zm = T(Ym), jm = () => {
11650
- const { debts: e } = x(), { showError: n, showCompleted: i } = _n(), [a, o] = g.useState(0);
11655
+ const { debts: e } = x(), { showError: n, showCompleted: i } = hn(), [a, o] = g.useState(0);
11651
11656
  return /* @__PURE__ */ l(Z, { children: [
11652
11657
  (n || i) && /* @__PURE__ */ t(zm, { setTabValue: o, sx: { mt: -24 } }),
11653
11658
  /* @__PURE__ */ l(
@@ -11683,7 +11688,7 @@ const Rc = ({
11683
11688
  /* @__PURE__ */ t(ei, { index: 1, name: "debt-details", value: a, children: /* @__PURE__ */ t(Km, {}) })
11684
11689
  ] });
11685
11690
  }, $m = T(jm), Xm = ({ isOpen: e, onClose: n, sx: i }) => {
11686
- const { debts: a } = x(), { showError: o, showCompleted: r } = _n(), s = o || r ? /* @__PURE__ */ t(Z, {}) : /* @__PURE__ */ t(Bm, {});
11691
+ const { debts: a } = x(), { showError: o, showCompleted: r } = hn(), s = o || r ? /* @__PURE__ */ t(Z, {}) : /* @__PURE__ */ t(Bm, {});
11687
11692
  return /* @__PURE__ */ t(
11688
11693
  ce,
11689
11694
  {
@@ -11824,7 +11829,7 @@ const Ut = (e) => /* @__PURE__ */ t(C, { fontWeight: 600, variant: "Small", chil
11824
11829
  onHoverRow: a,
11825
11830
  onClickRow: o
11826
11831
  }) => {
11827
- const r = cn(), { onEvent: s } = X(), { isMobile: c } = me(), { debts: d } = x(), [_, u] = g.useState([
11832
+ const r = ln(), { onEvent: s } = X(), { isMobile: c } = me(), { debts: d } = x(), [_, u] = g.useState([
11828
11833
  { field: "priority", sort: "asc" }
11829
11834
  ]), h = [
11830
11835
  {
@@ -11998,7 +12003,7 @@ const Ut = (e) => /* @__PURE__ */ t(C, { fontWeight: 600, variant: "Small", chil
11998
12003
  }
11999
12004
  );
12000
12005
  }, sp = T(({ buttonEl: e, onClose: n }) => {
12001
- const { onEvent: i } = X(), { debts: a } = x(), { selectedDebtPriority: o, setSelectedDebtPriority: r } = _n(), s = !!e, c = [
12006
+ const { onEvent: i } = X(), { debts: a } = x(), { selectedDebtPriority: o, setSelectedDebtPriority: r } = hn(), s = !!e, c = [
12002
12007
  {
12003
12008
  priority: Qt.HIGHEST_INTEREST,
12004
12009
  text: a.priority_sort_highest_interest
@@ -12057,7 +12062,7 @@ const Ut = (e) => /* @__PURE__ */ t(C, { fontWeight: 600, variant: "Small", chil
12057
12062
  }
12058
12063
  );
12059
12064
  }), cp = T(() => {
12060
- const { onEvent: e } = X(), { debts: n } = x(), { selectedDebtPriority: i } = _n(), [a, o] = g.useState(null), r = (_) => {
12065
+ const { onEvent: e } = X(), { debts: n } = x(), { selectedDebtPriority: i } = hn(), [a, o] = g.useState(null), r = (_) => {
12061
12066
  o(_.currentTarget), e(W.DEBTS_CLICK_PRIORITIZE);
12062
12067
  }, s = () => {
12063
12068
  o(null);
@@ -12122,7 +12127,7 @@ const Ut = (e) => /* @__PURE__ */ t(C, { fontWeight: 600, variant: "Small", chil
12122
12127
  }
12123
12128
  );
12124
12129
  }), up = ({ onBackClick: e, sx: n }) => {
12125
- const [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState(!1), [d, _] = g.useState(""), { isDesktop: u, isMobile: h } = me(), { debts: m } = x(), { onEvent: p } = X(), { isCopyLoaded: f, isInitialized: E, setSelectedAccounts: y } = se(), { setSelectedAccount: A } = Ft(), { selectedDebtPriority: I, setSelectedDebtChartData: v } = _n(), { visibleDebtAccounts: w } = Ce(), { goalsLoaded: D, loadGoals: O, monthlyCashFlowProfile: G } = ct(), { debts: M } = _a(), R = g.useMemo(() => {
12130
+ const [i, a] = g.useState(!1), [o, r] = g.useState(!1), [s, c] = g.useState(!1), [d, _] = g.useState(""), { isDesktop: u, isMobile: h } = me(), { debts: m } = x(), { onEvent: p } = X(), { isCopyLoaded: f, isInitialized: E, setSelectedAccounts: y } = se(), { setSelectedAccount: A } = Ft(), { selectedDebtPriority: I, setSelectedDebtChartData: v } = hn(), { visibleDebtAccounts: w } = Ce(), { goalsLoaded: D, loadGoals: O, monthlyCashFlowProfile: G } = ct(), { debts: M } = _a(), R = g.useMemo(() => {
12126
12131
  const fe = G?.extra_payment ?? 0;
12127
12132
  return lp(M, I, fe);
12128
12133
  }, [M, I, G]);
@@ -12564,14 +12569,14 @@ const yp = (e, n) => {
12564
12569
  let f = /* @__PURE__ */ t(ys, {});
12565
12570
  return e.track_type === Y.DEBT_TRACK ? f = /* @__PURE__ */ t(Es, {}) : e.track_type === Y.RETIREMENT_TRACK && (f = /* @__PURE__ */ t(As, {})), /* @__PURE__ */ t(bt, { elevation: 2, children: /* @__PURE__ */ l(Ms, { disabled: !i, onClick: i, children: [
12566
12571
  /* @__PURE__ */ t(
12567
- dn,
12572
+ un,
12568
12573
  {
12569
12574
  avatar: /* @__PURE__ */ t(Ht, { sx: { bgcolor: c, color: d, height: 48, width: 48 }, variant: "rounded", children: f }),
12570
12575
  subheader: /* @__PURE__ */ t(C, { variant: n || s ? "H3" : "H2", children: `${P(e.current_amount, s ? "0,0" : "0,0.00")} / ${Ep(
12571
12576
  m,
12572
12577
  s
12573
12578
  )}` }),
12574
- title: /* @__PURE__ */ t(sn, { color: "text.secondary", fontWeight: 400, variant: "Body", children: e.name })
12579
+ title: /* @__PURE__ */ t(cn, { color: "text.secondary", fontWeight: 400, variant: "Body", children: e.name })
12575
12580
  }
12576
12581
  ),
12577
12582
  /* @__PURE__ */ t(kt, { sx: { pt: 0 }, children: /* @__PURE__ */ l(b, { gap: 6, children: [
@@ -12827,9 +12832,9 @@ const yp = (e, n) => {
12827
12832
  /* @__PURE__ */ t(C, { color: "text.secondary", variant: "Small", children: a.ongoing_title }),
12828
12833
  /* @__PURE__ */ t(Ip, { trackType: e })
12829
12834
  ] }),
12830
- c.length > 0 ? /* @__PURE__ */ t(fn, { container: !0, spacing: 24, children: c.map((u, h, m) => (
12835
+ c.length > 0 ? /* @__PURE__ */ t(bn, { container: !0, spacing: 24, children: c.map((u, h, m) => (
12831
12836
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
12832
- /* @__PURE__ */ t(fn, { xs: i || h === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ t(Gc, { goal: u, onClick: () => r(u) }, u.guid) }, h)
12837
+ /* @__PURE__ */ t(bn, { xs: i || h === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ t(Gc, { goal: u, onClick: () => r(u) }, u.guid) }, h)
12833
12838
  )) }) : /* @__PURE__ */ l(
12834
12839
  b,
12835
12840
  {
@@ -13700,7 +13705,7 @@ const Hp = T(({ goal: e }) => {
13700
13705
  return e.track_type === Y.DEBT_TRACK ? d = /* @__PURE__ */ t(Es, {}) : e.track_type === Y.RETIREMENT_TRACK && (d = /* @__PURE__ */ t(As, {})), /* @__PURE__ */ l(b, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
13701
13706
  /* @__PURE__ */ t(Ht, { sx: { bgcolor: a, color: o, height: 32, width: 32 }, variant: "rounded", children: d }),
13702
13707
  /* @__PURE__ */ l(k, { sx: { width: "100%" }, children: [
13703
- /* @__PURE__ */ t(sn, { fontSize: 15, fontWeight: 600, variant: "body1", children: e.name }),
13708
+ /* @__PURE__ */ t(cn, { fontSize: 15, fontWeight: 600, variant: "body1", children: e.name }),
13704
13709
  e.projected_to_complete_at && /* @__PURE__ */ t(C, { color: "text.secondary", variant: "XSmall", children: s })
13705
13710
  ] }),
13706
13711
  /* @__PURE__ */ t(
@@ -13731,7 +13736,7 @@ const Hp = T(({ goal: e }) => {
13731
13736
  r && /* @__PURE__ */ t(k, { children: /* @__PURE__ */ t("img", { alt: a.create_goals_header, src: c ? Fp : Pp }) }),
13732
13737
  /* @__PURE__ */ l(b, { sx: { alignItems: r ? "flex-start" : "center" }, children: [
13733
13738
  /* @__PURE__ */ t(jl, { size: 32 }),
13734
- /* @__PURE__ */ t(sn, { fontSize: 15, fontWeight: 600, children: e }),
13739
+ /* @__PURE__ */ t(cn, { fontSize: 15, fontWeight: 600, children: e }),
13735
13740
  /* @__PURE__ */ t(
13736
13741
  C,
13737
13742
  {
@@ -15167,7 +15172,7 @@ const H1 = ({ date: e }) => /* @__PURE__ */ t(k, { sx: { display: "flex", justif
15167
15172
  }
15168
15173
  ) }) : /* @__PURE__ */ t("div", { style: c.badge, children: /* @__PURE__ */ t(Mt, { categoryGuid: r?.category_guid, size: 36 }) });
15169
15174
  }, F1 = T(P1), W1 = ({ notification: e, onClick: n }) => {
15170
- const { updateNotification: i } = $s(), a = cn(), o = {
15175
+ const { updateNotification: i } = $s(), a = ln(), o = {
15171
15176
  card: {
15172
15177
  alignItems: "center",
15173
15178
  cursor: "pointer",
@@ -16349,7 +16354,7 @@ const Z1 = ({
16349
16354
  );
16350
16355
  }
16351
16356
  ), rC = T(({ rule: e }) => {
16352
- const { categories: n } = Ve(), { setSelectedGuid: i } = un(), { deleteTransactionRule: a, setSelectedRule: o } = pt(), { isDesktop: r, isTablet: s } = me(), [c, d] = g.useState(!1), _ = () => {
16357
+ const { categories: n } = Ve(), { setSelectedGuid: i } = _n(), { deleteTransactionRule: a, setSelectedRule: o } = pt(), { isDesktop: r, isTablet: s } = me(), [c, d] = g.useState(!1), _ = () => {
16353
16358
  d(!1), i(null), o(void 0);
16354
16359
  }, u = async () => {
16355
16360
  await a(), _();
@@ -16475,7 +16480,7 @@ const Z1 = ({
16475
16480
  /* @__PURE__ */ t(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: i.delivery_method_title }),
16476
16481
  /* @__PURE__ */ l(ie, { sx: { bgcolor: "background.paper" }, children: [
16477
16482
  h && /* @__PURE__ */ t(b, { sx: { pl: 24 }, children: /* @__PURE__ */ t(
16478
- bn,
16483
+ yn,
16479
16484
  {
16480
16485
  isChecked: !d && n.email_channel && !!a.email,
16481
16486
  isDisabled: d || !a.email,
@@ -16487,7 +16492,7 @@ const Z1 = ({
16487
16492
  ) }),
16488
16493
  h && (p || m) && /* @__PURE__ */ t(F, { sx: { ml: s ? 0 : 24 } }),
16489
16494
  p && /* @__PURE__ */ t(b, { sx: { pl: 24 }, children: /* @__PURE__ */ t(
16490
- bn,
16495
+ yn,
16491
16496
  {
16492
16497
  isChecked: !u && n.sms_channel && !!a.phone,
16493
16498
  isDisabled: u || !a.phone,
@@ -16499,7 +16504,7 @@ const Z1 = ({
16499
16504
  ) }),
16500
16505
  p && m && /* @__PURE__ */ t(F, { sx: { ml: s ? 0 : 24 } }),
16501
16506
  m && /* @__PURE__ */ t(b, { sx: { pl: 24 }, children: /* @__PURE__ */ t(
16502
- bn,
16507
+ yn,
16503
16508
  {
16504
16509
  isChecked: !_ && n.push_channel,
16505
16510
  isDisabled: _,
@@ -16609,7 +16614,7 @@ const Z1 = ({
16609
16614
  ),
16610
16615
  f && /* @__PURE__ */ t(ii, { in: u, children: /* @__PURE__ */ l(ie, { sx: { bgcolor: "background.paper" }, children: [
16611
16616
  i && /* @__PURE__ */ t(
16612
- bn,
16617
+ yn,
16613
16618
  {
16614
16619
  isChecked: !s && e.email_channel && !!_.email,
16615
16620
  isDisabled: s || !_.email,
@@ -16622,7 +16627,7 @@ const Z1 = ({
16622
16627
  ),
16623
16628
  i && (o || a) && /* @__PURE__ */ t(F, { sx: { ml: 48 } }),
16624
16629
  o && /* @__PURE__ */ t(
16625
- bn,
16630
+ yn,
16626
16631
  {
16627
16632
  isChecked: !d && e.sms_channel && !!_.phone,
16628
16633
  isDisabled: d || !_.phone,
@@ -16635,7 +16640,7 @@ const Z1 = ({
16635
16640
  ),
16636
16641
  o && a && /* @__PURE__ */ t(F, { sx: { ml: 48 } }),
16637
16642
  a && /* @__PURE__ */ t(
16638
- bn,
16643
+ yn,
16639
16644
  {
16640
16645
  isChecked: !c && e.push_channel,
16641
16646
  isDisabled: c,
@@ -16669,7 +16674,7 @@ const Z1 = ({
16669
16674
  /* @__PURE__ */ t(rt, { sx: { mt: 24 }, children: n.delivery_method_title }),
16670
16675
  i.email_notifications_enabled && /* @__PURE__ */ l(Z, { children: [
16671
16676
  /* @__PURE__ */ t(
16672
- bn,
16677
+ yn,
16673
16678
  {
16674
16679
  isChecked: !!r.email && !o.opted_out_of_email_notifications,
16675
16680
  isDisabled: !r.email,
@@ -16686,7 +16691,7 @@ const Z1 = ({
16686
16691
  ] }),
16687
16692
  i.sms_notifications_enabled && /* @__PURE__ */ l(Z, { children: [
16688
16693
  /* @__PURE__ */ t(
16689
- bn,
16694
+ yn,
16690
16695
  {
16691
16696
  isChecked: !!r.phone && !o.opted_out_of_sms_notifications,
16692
16697
  isDisabled: !r.phone,
@@ -16699,7 +16704,7 @@ const Z1 = ({
16699
16704
  i.push_notifications_enabled && /* @__PURE__ */ t(F, {})
16700
16705
  ] }),
16701
16706
  i.push_notifications_enabled && /* @__PURE__ */ t(
16702
- bn,
16707
+ yn,
16703
16708
  {
16704
16709
  isChecked: !o.opted_out_of_push_notifications,
16705
16710
  isDisabled: !0,
@@ -17055,7 +17060,7 @@ const Z1 = ({
17055
17060
  }
17056
17061
  )
17057
17062
  ] }),
17058
- /* @__PURE__ */ t(sn, { color: "text.primary", sx: { mt: 24, whiteSpace: { sm: "nowrap", xs: "wrap" } }, children: r })
17063
+ /* @__PURE__ */ t(cn, { color: "text.primary", sx: { mt: 24, whiteSpace: { sm: "nowrap", xs: "wrap" } }, children: r })
17059
17064
  ] });
17060
17065
  }, Lt = ({
17061
17066
  altImage: e,
@@ -19797,7 +19802,7 @@ const Z1 = ({
19797
19802
  return /* @__PURE__ */ t(ce, { isOpen: i, onClose: o, title: e.request_support, children: /* @__PURE__ */ l(k, { sx: { px: 24 }, children: [
19798
19803
  /* @__PURE__ */ t(b, { sx: { alignItems: "center", pb: 24, pt: 80 }, children: /* @__PURE__ */ t(K, { color: "success", fill: !0, name: "check_circle", size: 64 }) }),
19799
19804
  /* @__PURE__ */ l(b, { sx: { alignItems: "center", gap: 16, pb: 48 }, children: [
19800
- /* @__PURE__ */ t(sn, { children: e.request_support_success }),
19805
+ /* @__PURE__ */ t(cn, { children: e.request_support_success }),
19801
19806
  /* @__PURE__ */ t(_e, { align: "center", variant: "Body", children: e.request_support_submit_success_message }),
19802
19807
  /* @__PURE__ */ t(C, { bold: !0, variant: "Body", children: n })
19803
19808
  ] }),
@@ -20846,8 +20851,8 @@ const ko = {
20846
20851
  (e, n) => ({
20847
20852
  ...e,
20848
20853
  [nl(n)]: {
20849
- action: Cn.MICRO_BEAT_CLICKED,
20850
- category: pn.BEAT_INTERACTION,
20854
+ action: fn.MICRO_BEAT_CLICKED,
20855
+ category: Cn.BEAT_INTERACTION,
20851
20856
  label: Go(n),
20852
20857
  value: Vt
20853
20858
  }
@@ -20857,8 +20862,8 @@ const ko = {
20857
20862
  (e, n) => ({
20858
20863
  ...e,
20859
20864
  [il(n)]: {
20860
- action: Cn.MICRO_BEAT_DISPLAYED,
20861
- category: pn.BEAT_INTERACTION,
20865
+ action: fn.MICRO_BEAT_DISPLAYED,
20866
+ category: Cn.BEAT_INTERACTION,
20862
20867
  label: Go(n),
20863
20868
  value: Vt
20864
20869
  }
@@ -20868,19 +20873,19 @@ const ko = {
20868
20873
  (e, n) => ({
20869
20874
  ...e,
20870
20875
  [al(n)]: {
20871
- action: Cn.MICRO_BEAT_DISPLAYED_FIRST_TIME,
20872
- category: pn.BEAT_INTERACTION,
20876
+ action: fn.MICRO_BEAT_DISPLAYED_FIRST_TIME,
20877
+ category: Cn.BEAT_INTERACTION,
20873
20878
  label: Go(n),
20874
20879
  value: Vt
20875
20880
  }
20876
20881
  }),
20877
20882
  {}
20878
- ), mn = {
20883
+ ), pn = {
20879
20884
  CARD: "Card",
20880
20885
  CAROUSEL_CONTROL: "Carousel Control",
20881
20886
  MICRO_WIDGET: "Micro Widget",
20882
20887
  VIEW_MORE: "View More"
20883
- }, pn = {
20888
+ }, Cn = {
20884
20889
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
20885
20890
  BEAT_INTERACTION: "Beat Interaction"
20886
20891
  }, Kt = {
@@ -20892,7 +20897,7 @@ const ko = {
20892
20897
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
20893
20898
  }, ol = {
20894
20899
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
20895
- }, Cn = {
20900
+ }, fn = {
20896
20901
  CONTROL_BACKWARD: "Control Backward",
20897
20902
  CONTROL_FORWARD: "Control Forward",
20898
20903
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -20906,21 +20911,21 @@ const ko = {
20906
20911
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
20907
20912
  }, Jr = {
20908
20913
  [In.MICRO_WIDGET_CAROUSEL]: {
20909
- label: mn.MICRO_WIDGET,
20914
+ label: pn.MICRO_WIDGET,
20910
20915
  name: In.MICRO_WIDGET_CAROUSEL,
20911
20916
  path: Qr.INSIGHTS_MICRO_WIDGET,
20912
20917
  value: Vt
20913
20918
  },
20914
20919
  // zero state
20915
20920
  [In.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
20916
- label: mn.MICRO_WIDGET,
20921
+ label: pn.MICRO_WIDGET,
20917
20922
  name: In.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
20918
20923
  path: Qr.INSIGHTS_MICRO_WIDGET,
20919
20924
  value: Vt
20920
20925
  },
20921
20926
  // no relevant cards
20922
20927
  [In.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
20923
- label: mn.MICRO_WIDGET,
20928
+ label: pn.MICRO_WIDGET,
20924
20929
  name: In.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
20925
20930
  path: "/micro-widget",
20926
20931
  value: Vt
@@ -20928,40 +20933,40 @@ const ko = {
20928
20933
  }, es = {
20929
20934
  // carousel control interaction events - clicks and swipes
20930
20935
  [Kt.ON_CAROUSEL_BACK_CLICK]: {
20931
- action: Cn.CONTROL_BACKWARD,
20932
- category: pn.MICRO_WIDGET_INTERACTION,
20933
- label: mn.CAROUSEL_CONTROL,
20936
+ action: fn.CONTROL_BACKWARD,
20937
+ category: Cn.MICRO_WIDGET_INTERACTION,
20938
+ label: pn.CAROUSEL_CONTROL,
20934
20939
  value: Vt
20935
20940
  },
20936
20941
  [Kt.ON_CAROUSEL_FORWARD_CLICK]: {
20937
- action: Cn.CONTROL_FORWARD,
20938
- category: pn.MICRO_WIDGET_INTERACTION,
20939
- label: mn.CAROUSEL_CONTROL,
20942
+ action: fn.CONTROL_FORWARD,
20943
+ category: Cn.MICRO_WIDGET_INTERACTION,
20944
+ label: pn.CAROUSEL_CONTROL,
20940
20945
  value: Vt
20941
20946
  },
20942
20947
  [Kt.ON_CAROUSEL_BACK_SWIPE]: {
20943
- action: Cn.SWIPE_BACKWARD,
20944
- category: pn.MICRO_WIDGET_INTERACTION,
20945
- label: mn.CAROUSEL_CONTROL,
20948
+ action: fn.SWIPE_BACKWARD,
20949
+ category: Cn.MICRO_WIDGET_INTERACTION,
20950
+ label: pn.CAROUSEL_CONTROL,
20946
20951
  value: Vt
20947
20952
  },
20948
20953
  [Kt.ON_CAROUSEL_FORWARD_SWIPE]: {
20949
- action: Cn.SWIPE_FORWARD,
20950
- category: pn.MICRO_WIDGET_INTERACTION,
20951
- label: mn.CAROUSEL_CONTROL,
20954
+ action: fn.SWIPE_FORWARD,
20955
+ category: Cn.MICRO_WIDGET_INTERACTION,
20956
+ label: pn.CAROUSEL_CONTROL,
20952
20957
  value: Vt
20953
20958
  },
20954
20959
  // read more card events
20955
20960
  [Kt.ON_VIEW_MORE_CLICKED]: {
20956
- action: Cn.MICRO_BEAT_CLICKED,
20957
- category: pn.BEAT_INTERACTION,
20958
- label: mn.VIEW_MORE,
20961
+ action: fn.MICRO_BEAT_CLICKED,
20962
+ category: Cn.BEAT_INTERACTION,
20963
+ label: pn.VIEW_MORE,
20959
20964
  value: Vt
20960
20965
  },
20961
20966
  [ol.ON_VIEW_MORE_VIEWED]: {
20962
- action: Cn.MICRO_BEAT_DISPLAYED,
20963
- category: pn.BEAT_INTERACTION,
20964
- label: mn.VIEW_MORE,
20967
+ action: fn.MICRO_BEAT_DISPLAYED,
20968
+ category: Cn.BEAT_INTERACTION,
20969
+ label: pn.VIEW_MORE,
20965
20970
  value: Vt
20966
20971
  },
20967
20972
  ...uf(),
@@ -21116,7 +21121,7 @@ const Li = g.createContext(null), pf = ({
21116
21121
  },
21117
21122
  children: [
21118
21123
  /* @__PURE__ */ t(
21119
- dn,
21124
+ un,
21120
21125
  {
21121
21126
  avatar: u && s,
21122
21127
  subheader: d && O,
@@ -21175,7 +21180,7 @@ const Li = g.createContext(null), pf = ({
21175
21180
  size: 16
21176
21181
  }
21177
21182
  );
21178
- }, bf = (e) => ln({
21183
+ }, bf = (e) => dn({
21179
21184
  marginTop: e.Spacing.XTiny,
21180
21185
  "& .kyper-categoryicon": {
21181
21186
  display: "flex"
@@ -22583,7 +22588,7 @@ const Li = g.createContext(null), pf = ({
22583
22588
  },
22584
22589
  children: /* @__PURE__ */ t(qa, {})
22585
22590
  }
22586
- ), hn = new mf(), kf = ({
22591
+ ), gn = new mf(), kf = ({
22587
22592
  allowSingleCardPeeking: e,
22588
22593
  areBeatsLoading: n,
22589
22594
  beats: i = [],
@@ -22614,15 +22619,15 @@ const Li = g.createContext(null), pf = ({
22614
22619
  visibleCardsCount: O = 1,
22615
22620
  widthOverrides: G
22616
22621
  }) => {
22617
- const M = dt(), [R, L] = Et("STANDARD"), [U, te] = Et(!1), ue = Ou([_], hn), ye = Mu([u], hn);
22622
+ const M = dt(), [R, L] = Et("STANDARD"), [U, te] = Et(!1), ue = Ou([_], gn), ye = Mu([u], gn);
22618
22623
  g.useEffect(() => {
22619
- hn.isInitialized || hn.initialize(r, I, c);
22620
- }, [r, I, c, hn.isInitialized]), g.useEffect(() => {
22624
+ gn.isInitialized || gn.initialize(r, I, c);
22625
+ }, [r, I, c, gn.isInitialized]), g.useEffect(() => {
22621
22626
  const ke = window.innerHeight;
22622
22627
  ke < 180 ? L("STANDARD") : ke >= 180 && ke < 200 ? L("LARGE") : ke >= 200 && ke < 248 ? L("XLARGE") : ke >= 248 && L("XXLARGE");
22623
22628
  }, [window.innerHeight]), g.useEffect(() => {
22624
- te(!n && hn.isInitialized);
22625
- }, [n, hn.isInitialized]);
22629
+ te(!n && gn.isInitialized);
22630
+ }, [n, gn.isInitialized]);
22626
22631
  const fe = {
22627
22632
  showCTAColocatedWithText: o,
22628
22633
  heightOverrides: s,
@@ -22641,8 +22646,8 @@ const Li = g.createContext(null), pf = ({
22641
22646
  // The Theme provider must wrap the component so that the styles don't break when imported into other applications.
22642
22647
  /* @__PURE__ */ l(id, { theme: M, children: [
22643
22648
  /* @__PURE__ */ t(Hd, {}),
22644
- /* @__PURE__ */ t(pf, { onEvent: ue, onPageview: ye, store: hn, children: /* @__PURE__ */ l(Of, { heightOverrides: s, widthOverrides: G, children: [
22645
- (n || !hn.isInitialized) && /* @__PURE__ */ t(Mf, {}),
22649
+ /* @__PURE__ */ t(pf, { onEvent: ue, onPageview: ye, store: gn, children: /* @__PURE__ */ l(Of, { heightOverrides: s, widthOverrides: G, children: [
22650
+ (n || !gn.isInitialized) && /* @__PURE__ */ t(Mf, {}),
22646
22651
  U && E && /* @__PURE__ */ t(
22647
22652
  Lf,
22648
22653
  {
@@ -22714,7 +22719,7 @@ const Li = g.createContext(null), pf = ({
22714
22719
  }
22715
22720
  );
22716
22721
  }, Hf = T(Bf), Pf = () => {
22717
- const e = cn(), { isMobile: n, isDesktop: i, isLargeDesktop: a } = me(), { beatStore: o, endpoint: r, sessionToken: s } = oi(), { isInitialized: c } = se(), { sortedCategoriesList: d } = Xs(), [_, u] = g.useState(!1), h = e.palette.mode === "dark", m = i || a, p = m || n ? 1 : 2;
22722
+ const e = ln(), { isMobile: n, isDesktop: i, isLargeDesktop: a } = me(), { beatStore: o, endpoint: r, sessionToken: s } = oi(), { isInitialized: c } = se(), { sortedCategoriesList: d } = Xs(), [_, u] = g.useState(!1), h = e.palette.mode === "dark", m = i || a, p = m || n ? 1 : 2;
22718
22723
  g.useEffect(() => {
22719
22724
  c && o.loadBeats().finally(() => u(!0));
22720
22725
  }, [c]);
@@ -22986,14 +22991,14 @@ class Kf {
22986
22991
  get userProfile() {
22987
22992
  return this.appData.user_profile;
22988
22993
  }
22989
- loadAppData = async () => {
22994
+ loadAppData = async (n) => {
22990
22995
  try {
22991
- const n = await this.api.getAppData();
22996
+ const i = n ?? await this.api.getAppData();
22992
22997
  q(() => {
22993
- this.appData = n, this.bannerApi = new er(n.address?.bullseye || "/");
22998
+ this.appData = i, this.bannerApi = new er(i.address?.bullseye || "/");
22994
22999
  });
22995
- } catch (n) {
22996
- console.error(`Error loading app data: ${n}`);
23000
+ } catch (i) {
23001
+ console.error(`Error loading app data: ${i}`);
22997
23002
  }
22998
23003
  };
22999
23004
  loadBanner = async () => {
@@ -23084,14 +23089,14 @@ class jf {
23084
23089
  get user() {
23085
23090
  return this.globalStore.appDataStore.user;
23086
23091
  }
23087
- loadUserFeatures = async () => {
23092
+ loadUserFeatures = async (n) => {
23088
23093
  try {
23089
- const n = await this.api.getUserFeatures();
23094
+ const i = n ?? await this.api.getUserFeatures();
23090
23095
  q(() => {
23091
- this.userFeatures = n;
23096
+ this.userFeatures = i;
23092
23097
  });
23093
- } catch (n) {
23094
- console.error(`Error occurred while loading user features: ${n}`);
23098
+ } catch (i) {
23099
+ console.error(`Error occurred while loading user features: ${i}`);
23095
23100
  }
23096
23101
  };
23097
23102
  updateUser = async (n) => {
@@ -23147,16 +23152,34 @@ class C2 {
23147
23152
  get isInitialized() {
23148
23153
  return this.globalUiStore.isInitialized;
23149
23154
  }
23150
- loadData = async () => {
23155
+ loadData = async ({
23156
+ accounts: n,
23157
+ appData: i,
23158
+ associatedBeats: a,
23159
+ categories: o,
23160
+ institutions: r,
23161
+ members: s,
23162
+ taggings: c,
23163
+ tags: d,
23164
+ transactionRules: _,
23165
+ transactions: u,
23166
+ userFeatures: h
23167
+ }) => {
23151
23168
  await Promise.all([
23152
- // Load copy, config and user data
23169
+ // Load copy, config and quser data
23153
23170
  this.copyStore.loadCopy(),
23154
- this.appDataStore.loadAppData(),
23155
- this.userStore.loadUserFeatures()
23171
+ this.appDataStore.loadAppData(i),
23172
+ this.userStore.loadUserFeatures(h)
23156
23173
  ]), await Promise.all([
23157
- this.accountStore.loadAccountData(),
23158
- this.categoryStore.loadCategories(),
23159
- this.transactionStore.loadTransactionData()
23174
+ this.accountStore.loadAccountData({ accounts: n, institutions: r, members: s }),
23175
+ this.categoryStore.loadCategories(o),
23176
+ this.transactionStore.loadTransactionData({
23177
+ associatedBeats: a,
23178
+ taggings: c,
23179
+ tags: d,
23180
+ transactionRules: _,
23181
+ transactions: u
23182
+ })
23160
23183
  ]), this.globalUiStore.setInitialized(!0);
23161
23184
  };
23162
23185
  }
@@ -24528,8 +24551,12 @@ class b0 {
24528
24551
  constructor(n) {
24529
24552
  this.globalStore = n, this.uiStore = new f0(), this.api = new os(n.endpoint, n.sessionToken), He(this);
24530
24553
  }
24531
- loadAccountData = async () => {
24532
- await Promise.all([this.loadAccounts(), this.loadInstitutions()]);
24554
+ getAccountData = () => ({
24555
+ accounts: this.accounts,
24556
+ institutions: this.institutions
24557
+ });
24558
+ loadAccountData = async ({ accounts: n, institutions: i, members: a }) => {
24559
+ await Promise.all([this.loadAccounts(n, a), this.loadInstitutions(i)]);
24533
24560
  };
24534
24561
  get cashAccounts() {
24535
24562
  return this.accounts.filter(
@@ -24606,35 +24633,35 @@ class b0 {
24606
24633
  }
24607
24634
  }), i;
24608
24635
  };
24609
- loadAccounts = async () => {
24610
- await this.loadMembers();
24636
+ loadAccounts = async (n, i) => {
24637
+ await this.loadMembers(i);
24611
24638
  try {
24612
- const n = await this.api.getAccounts();
24613
- q(() => {
24614
- this.accounts = this.sortAccounts(this.augmentAccounts(n));
24639
+ const a = n || await this.api.getAccounts();
24640
+ console.log("accounts", a), q(() => {
24641
+ this.accounts = this.sortAccounts(this.augmentAccounts(a));
24615
24642
  });
24616
- } catch (n) {
24617
- console.error(`Error occurred while loading accounts: ${n}`);
24643
+ } catch (a) {
24644
+ console.error(`Error occurred while loading accounts: ${a}`);
24618
24645
  }
24619
24646
  };
24620
- loadInstitutions = async () => {
24647
+ loadInstitutions = async (n) => {
24621
24648
  try {
24622
- const n = await this.api.getInstitutions();
24649
+ const i = n || await this.api.getInstitutions();
24623
24650
  q(() => {
24624
- this.institutions = n;
24651
+ this.institutions = i;
24625
24652
  });
24626
- } catch (n) {
24627
- console.error(`Error occurred while loading institutions: ${n}`);
24653
+ } catch (i) {
24654
+ console.error(`Error occurred while loading institutions: ${i}`);
24628
24655
  }
24629
24656
  };
24630
- loadMembers = async () => {
24657
+ loadMembers = async (n) => {
24631
24658
  try {
24632
- const n = await this.api.getMembers();
24659
+ const i = n || await this.api.getMembers();
24633
24660
  q(() => {
24634
- this.members = n;
24661
+ this.members = i;
24635
24662
  });
24636
- } catch (n) {
24637
- console.error(`Error occurred while loading members: ${n}`);
24663
+ } catch (i) {
24664
+ console.error(`Error occurred while loading members: ${i}`);
24638
24665
  }
24639
24666
  };
24640
24667
  mergeAccounts = async (n) => {
@@ -24756,7 +24783,7 @@ const y0 = () => {
24756
24783
  }, E0 = T(y0), A0 = () => {
24757
24784
  const { response: e, setResponse: n } = lo(), { analytics: i } = x();
24758
24785
  return /* @__PURE__ */ t(
24759
- yn,
24786
+ En,
24760
24787
  {
24761
24788
  label: i.feedback,
24762
24789
  multiline: !0,
@@ -25262,7 +25289,7 @@ const G0 = ({
25262
25289
  /* @__PURE__ */ t(W0, { onRecalculateBudgets: e })
25263
25290
  ] });
25264
25291
  }), V0 = (e) => {
25265
- const n = pe(), { onEvent: i } = X(), { detailedBudgets: a, isDataLoaded: o, loadBudgetData: r, setTheme: s } = ht(), { budgets: c, common: d } = x(), { isCopyLoaded: _, isInitialized: u, selectedAccounts: h } = se(), { reloadCategoryTotals: m } = Ve(), p = T_(), f = a.length === 0, [E, y] = g.useState(!1), A = () => {
25292
+ const n = pe(), { onEvent: i } = X(), { budgets: a, isDataLoaded: o, loadBudgetData: r, setTheme: s } = ht(), { budgets: c, common: d } = x(), { isCopyLoaded: _, isInitialized: u, selectedAccounts: h } = se(), { reloadCategoryTotals: m } = Ve(), p = T_(), f = a.length === 0, [E, y] = g.useState(!1), A = () => {
25266
25293
  y(!0), i(W.BUDGETS_CLICK_ADD);
25267
25294
  }, I = () => {
25268
25295
  y(!1);
@@ -25359,7 +25386,7 @@ const G0 = ({
25359
25386
  )
25360
25387
  ] }) });
25361
25388
  }), z0 = T(({ category: e, parentBudget: n }) => {
25362
- const { budgets: i, common: a } = x(), { setExpandedGuid: o, setOnSelect: r } = un(), { addBudget: s } = ht(), [c, d] = g.useState(!1), [_, u] = g.useState(!1), [h, m] = g.useState(""), [p, f] = g.useState(void 0);
25389
+ const { budgets: i, common: a } = x(), { setExpandedGuid: o, setOnSelect: r } = _n(), { addBudget: s } = ht(), [c, d] = g.useState(!1), [_, u] = g.useState(!1), [h, m] = g.useState(""), [p, f] = g.useState(void 0);
25363
25390
  g.useEffect(() => {
25364
25391
  r((A) => {
25365
25392
  const I = e.subCategories.find((v) => v.guid === A);
@@ -25663,7 +25690,7 @@ const G0 = ({
25663
25690
  });
25664
25691
  };
25665
25692
  return /* @__PURE__ */ l(bt, { elevation: 2, children: [
25666
- /* @__PURE__ */ t(dn, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ t(rt, { children: n.budget_categories_title }) }),
25693
+ /* @__PURE__ */ t(un, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ t(rt, { children: n.budget_categories_title }) }),
25667
25694
  /* @__PURE__ */ t(kt, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ t(ie, { children: i.map((r) => /* @__PURE__ */ l(g.Fragment, { children: [
25668
25695
  /* @__PURE__ */ t(q0, { budget: r, onClick: o }),
25669
25696
  /* @__PURE__ */ t(F, {})
@@ -25706,7 +25733,7 @@ const G0 = ({
25706
25733
  }), p(!0), n(W.BUDGETS_CLICK_EDIT_INCOME);
25707
25734
  };
25708
25735
  return /* @__PURE__ */ l(bt, { elevation: 2, sx: { overflow: "visible" }, children: [
25709
- /* @__PURE__ */ t(dn, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ t(rt, { children: a.overview_title }) }),
25736
+ /* @__PURE__ */ t(un, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ t(rt, { children: a.overview_title }) }),
25710
25737
  /* @__PURE__ */ t(kt, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ l(b, { gap: 24, children: [
25711
25738
  /* @__PURE__ */ l(b, { gap: 8, children: [
25712
25739
  /* @__PURE__ */ t(C, { bold: !0, sx: { mb: 8 }, variant: "Body", children: a.spending_title }),
@@ -25761,7 +25788,7 @@ const G0 = ({
25761
25788
  setDateRange: y,
25762
25789
  setAlert: A,
25763
25790
  setTheme: I,
25764
- detailedBudgets: v
25791
+ budgets: v
25765
25792
  } = ht(), { loadRepeatingTransactions: w, setDateRange: D } = tt(), { reloadCategoryTotals: O } = Ve(), { isSmallTablet: G, isMobile: M, isSmallMobile: R } = me(), L = G || M || R, [U, te] = g.useState(!1);
25766
25793
  g.useEffect(() => {
25767
25794
  I(i), h(o), u(p.start, p.end), a(W.BUDGETS_VIEW);
@@ -26008,21 +26035,21 @@ const ab = ({ widgets: e, isLoading: n }) => {
26008
26035
  () => c.filter((u) => u.location === Wi.RightSide),
26009
26036
  [c]
26010
26037
  );
26011
- return /* @__PURE__ */ l(fn, { container: !0, spacing: a ? 0 : 24, sx: { overflow: "scroll" }, children: [
26012
- /* @__PURE__ */ t(fn, { xs: 12, children: o.isInitialized && /* @__PURE__ */ t(ib, {}) }),
26013
- /* @__PURE__ */ l(fn, { lg: 8, xs: 12, children: [
26038
+ return /* @__PURE__ */ l(bn, { container: !0, spacing: a ? 0 : 24, sx: { overflow: "scroll" }, children: [
26039
+ /* @__PURE__ */ t(bn, { xs: 12, children: o.isInitialized && /* @__PURE__ */ t(ib, {}) }),
26040
+ /* @__PURE__ */ l(bn, { lg: 8, xs: 12, children: [
26014
26041
  /* @__PURE__ */ t(J0, {}),
26015
26042
  n && /* @__PURE__ */ l(b, { direction: "column", spacing: 24, children: [
26016
- /* @__PURE__ */ t(gn, { height: 100, variant: "rounded", width: "100%" }),
26017
- /* @__PURE__ */ t(gn, { height: 300, variant: "rounded", width: "100%" }),
26018
- /* @__PURE__ */ t(gn, { height: 300, variant: "rounded", width: "100%" })
26043
+ /* @__PURE__ */ t(mn, { height: 100, variant: "rounded", width: "100%" }),
26044
+ /* @__PURE__ */ t(mn, { height: 300, variant: "rounded", width: "100%" }),
26045
+ /* @__PURE__ */ t(mn, { height: 300, variant: "rounded", width: "100%" })
26019
26046
  ] }),
26020
26047
  !n && /* @__PURE__ */ t(b, { direction: "column", spacing: 24, children: i ? d.map((u) => /* @__PURE__ */ t(g.Fragment, { children: u.component }, u.index)) : c.map((u) => /* @__PURE__ */ t(g.Fragment, { children: u.component }, u.index)) })
26021
26048
  ] }),
26022
- i && /* @__PURE__ */ t(fn, { lg: 4, children: n ? /* @__PURE__ */ l(b, { direction: "column", spacing: 24, children: [
26023
- /* @__PURE__ */ t(gn, { height: 200, variant: "rounded", width: "100%" }),
26024
- /* @__PURE__ */ t(gn, { height: 100, variant: "rounded", width: "100%" }),
26025
- /* @__PURE__ */ t(gn, { height: 300, variant: "rounded", width: "100%" })
26049
+ i && /* @__PURE__ */ t(bn, { lg: 4, children: n ? /* @__PURE__ */ l(b, { direction: "column", spacing: 24, children: [
26050
+ /* @__PURE__ */ t(mn, { height: 200, variant: "rounded", width: "100%" }),
26051
+ /* @__PURE__ */ t(mn, { height: 100, variant: "rounded", width: "100%" }),
26052
+ /* @__PURE__ */ t(mn, { height: 300, variant: "rounded", width: "100%" })
26026
26053
  ] }) : /* @__PURE__ */ t(b, { direction: "column", spacing: 24, children: _.map((u) => /* @__PURE__ */ t(g.Fragment, { children: u.component }, u.index)) }) })
26027
26054
  ] });
26028
26055
  }, T2 = T(ab), Bo = ({ sx: e = {} }) => {
@@ -27708,7 +27735,7 @@ const ab = ({ widgets: e, isLoading: n }) => {
27708
27735
  totalLabel: s,
27709
27736
  variant: c = "mini"
27710
27737
  }) => {
27711
- const { spending: d } = x(), _ = cn(), { isTablet: u } = me(), h = g.useMemo(
27738
+ const { spending: d } = x(), _ = ln(), { isTablet: u } = me(), h = g.useMemo(
27712
27739
  () => o ? e.categoryData.find((E) => E.guid === o) : void 0,
27713
27740
  [o]
27714
27741
  ), m = g.useMemo(() => e.donutData.length > 0 ? e.donutData : [{ id: "0", color: _.palette.divider, value: 100 }], [e, _]), p = () => {
@@ -28015,7 +28042,7 @@ const ab = ({ widgets: e, isLoading: n }) => {
28015
28042
  e.palette.chartMono.chartMono1,
28016
28043
  e.palette.chartMono.chartMono6
28017
28044
  ], Mb = () => {
28018
- const e = cn(), { categories: n, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: a } = Ve(), { goals: o, spending: r } = x(), { displayedDateRange: s, selectedAccounts: c, selectedAccountGuids: d } = se(), { setFilter: _, sortedTransactions: u } = Le(), [h, m] = g.useState(""), [p, f] = g.useState(0), [E, y] = g.useState(""), [A, I] = g.useState(!1);
28045
+ const e = ln(), { categories: n, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: a } = Ve(), { goals: o, spending: r } = x(), { displayedDateRange: s, selectedAccounts: c, selectedAccountGuids: d } = se(), { setFilter: _, sortedTransactions: u } = Le(), [h, m] = g.useState(""), [p, f] = g.useState(0), [E, y] = g.useState(""), [A, I] = g.useState(!1);
28019
28046
  g.useEffect(() => {
28020
28047
  a(
28021
28048
  c,
@@ -28332,7 +28359,7 @@ export {
28332
28359
  $ as TRANSACTION_EVENTS,
28333
28360
  ei as TabContentContainer,
28334
28361
  po as ToggleButtonListItem,
28335
- bn as ToggleListItem,
28362
+ yn as ToggleListItem,
28336
28363
  _i as TopActions,
28337
28364
  Y as TrackType,
28338
28365
  Ji as TransactionApi,
@@ -28389,7 +28416,7 @@ export {
28389
28416
  ht as useBudgetsStore,
28390
28417
  uo as useCashflowStore,
28391
28418
  Ve as useCategoryStore,
28392
- un as useCategoryUiStore,
28419
+ _n as useCategoryUiStore,
28393
28420
  Ou as useCombineEvents,
28394
28421
  Mu as useCombinePageviews,
28395
28422
  _a as useDebtStore,