@mx-cartographer/experiences 5.3.1-alpha.mega23 → 5.3.1-alpha.mega25

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
@@ -38,7 +38,7 @@ import { css as He, keyframes as va } from "@mxenabled/cssinjs";
38
38
  import { addDays as We } from "date-fns/addDays";
39
39
  import { eachDayOfInterval as Ra } from "date-fns/eachDayOfInterval";
40
40
  import { eachWeekOfInterval as ua } from "date-fns/eachWeekOfInterval";
41
- import { endOfMonth as SA } from "date-fns/endOfMonth";
41
+ import { endOfMonth as BA } from "date-fns/endOfMonth";
42
42
  import { format as le } from "date-fns/format";
43
43
  import { isSameMonth as Pa } from "date-fns/isSameMonth";
44
44
  import { startOfMonth as QA } from "date-fns/startOfMonth";
@@ -1791,7 +1791,7 @@ const Cc = ({
1791
1791
  E(t), v(i), t && d(t);
1792
1792
  }, [t, i]);
1793
1793
  const u = h.useMemo(() => {
1794
- const x = ua({ start: QA(c), end: SA(c) }), w = [];
1794
+ const x = ua({ start: QA(c), end: BA(c) }), w = [];
1795
1795
  for (let D = 0; D < x.length; D++) {
1796
1796
  const m = x[D], j = Ra({ start: m, end: We(m, 6) }), O = [];
1797
1797
  for (let T = 0; T < j.length; T++)
@@ -2169,12 +2169,12 @@ const Cc = ({
2169
2169
  },
2170
2170
  children: A
2171
2171
  }
2172
- ), FA = (A = "useGlobalStore") => {
2172
+ ), UA = (A = "useGlobalStore") => {
2173
2173
  const t = h.useContext(gt);
2174
2174
  if (!t)
2175
2175
  throw new Error(`${A}() must be used within the GlobalDataContext`);
2176
2176
  return t;
2177
- }, CA = () => FA("useAccountStore").globalStore.accountStore, tI = () => FA("useAppConfig").globalStore.appDataStore.appConfig, te = () => FA("useBudgetsStore").globalStore.budgetsStore, Tn = () => FA("useCashflowStore").globalStore.cashflowStore, qA = () => FA("useCategoryStore").globalStore.categoryStore, iI = () => FA("useConnectStore").globalStore.connectStore, Ni = () => FA("useDebtsStore").globalStore.debtsStore, oi = () => FA("useGlobalStore").globalStore, pA = () => FA("useGlobalUiStore").globalStore.globalUiStore, X = () => FA("globalCopyStore").globalStore.copyStore.copy, WA = () => FA("useGoalStore").globalStore.goalStore, Yn = () => FA("useHelpStore").globalStore.helpStore, Oc = () => FA("useMerchantStore").globalStore.merchantStore, Lc = () => FA("useNetWorthStore").globalStore.netWorthStore, nI = () => FA("useNotificationStore").globalStore.notificationStore, ZA = () => FA("useRecurringActivityStore").globalStore.recurringActivityStore, ge = () => FA("useSettingsStore").globalStore.settingsStore, PA = () => FA("useTransactionStore").globalStore.transactionStore, Ue = () => FA("useUserStore").globalStore.userStore, K = () => ({ onEvent: FA().onEvent }), PP = () => ({ onPageView: FA().onPageView }), Qc = (A = "useWidgetContainerContext") => {
2177
+ }, CA = () => UA("useAccountStore").globalStore.accountStore, tI = () => UA("useAppConfig").globalStore.appDataStore.appConfig, te = () => UA("useBudgetsStore").globalStore.budgetsStore, Tn = () => UA("useCashflowStore").globalStore.cashflowStore, qA = () => UA("useCategoryStore").globalStore.categoryStore, iI = () => UA("useConnectStore").globalStore.connectStore, Ni = () => UA("useDebtsStore").globalStore.debtsStore, oi = () => UA("useGlobalStore").globalStore, pA = () => UA("useGlobalUiStore").globalStore.globalUiStore, X = () => UA("globalCopyStore").globalStore.copyStore.copy, FA = () => UA("useGoalStore").globalStore.goalStore, Yn = () => UA("useHelpStore").globalStore.helpStore, Oc = () => UA("useMerchantStore").globalStore.merchantStore, Lc = () => UA("useNetWorthStore").globalStore.netWorthStore, nI = () => UA("useNotificationStore").globalStore.notificationStore, ZA = () => UA("useRecurringActivityStore").globalStore.recurringActivityStore, ge = () => UA("useSettingsStore").globalStore.settingsStore, PA = () => UA("useTransactionStore").globalStore.transactionStore, Ue = () => UA("useUserStore").globalStore.userStore, K = () => ({ onEvent: UA().onEvent }), PP = () => ({ onPageView: UA().onPageView }), Qc = (A = "useWidgetContainerContext") => {
2178
2178
  const t = h.useContext(AI);
2179
2179
  if (!t)
2180
2180
  throw new Error(`${A}() must be used within the WidgetContainerContext`);
@@ -2367,7 +2367,7 @@ const Cc = ({
2367
2367
  guid: J,
2368
2368
  top_level_guid: wA
2369
2369
  }))
2370
- ], kA = (J) => {
2370
+ ], WA = (J) => {
2371
2371
  const VA = J.startsWith("stacked-") ? r[parseInt(J.split("-")[1])] : o[parseInt(J.split("-")[1])];
2372
2372
  return {
2373
2373
  guid: VA?.category_guid,
@@ -2378,10 +2378,10 @@ const Cc = ({
2378
2378
  }, Ie = (J) => {
2379
2379
  n?.(J ?? "");
2380
2380
  }, bA = () => {
2381
- const J = kA(String(H)).guid;
2381
+ const J = WA(String(H)).guid;
2382
2382
  J && n?.(J);
2383
2383
  }, JA = (J) => {
2384
- const wA = String(J?.seriesId), VA = kA(wA).guid, Ze = cA.find((Vt) => Vt.id === wA), Ki = Ze && J?.dataIndex !== void 0, Zi = Ze && J?.dataIndex === void 0;
2384
+ const wA = String(J?.seriesId), VA = WA(wA).guid, Ze = cA.find((Vt) => Vt.id === wA), Ki = Ze && J?.dataIndex !== void 0, Zi = Ze && J?.dataIndex === void 0;
2385
2385
  if (Ki)
2386
2386
  u({
2387
2387
  hoveredSeriesId: wA,
@@ -2464,7 +2464,7 @@ const Cc = ({
2464
2464
  itemContent: (J) => w && H ? /* @__PURE__ */ e(
2465
2465
  Mc,
2466
2466
  {
2467
- categoryGuids: kA(H),
2467
+ categoryGuids: WA(H),
2468
2468
  xData: j,
2469
2469
  ...J
2470
2470
  }
@@ -2505,7 +2505,7 @@ const Cc = ({
2505
2505
  x && /* @__PURE__ */ e(
2506
2506
  Gc,
2507
2507
  {
2508
- categoryGuids: kA(H),
2508
+ categoryGuids: WA(H),
2509
2509
  chartContainerRef: f,
2510
2510
  cursorPosition: y,
2511
2511
  hoveredAreaData: P.map((J) => ({
@@ -2707,7 +2707,7 @@ const Cc = ({
2707
2707
  calendarActions: A,
2708
2708
  color: t = "primary",
2709
2709
  copy: i,
2710
- range: n = [QA(fA()), SA(zt())],
2710
+ range: n = [QA(fA()), BA(zt())],
2711
2711
  shouldShrinkToIcon: r = !0,
2712
2712
  toolTipContent: o = "",
2713
2713
  variant: I = "outlined"
@@ -2732,12 +2732,12 @@ const Cc = ({
2732
2732
  (I === "timeframebuttons" || I === "timeframetabs") && A.onRangeChanged(j());
2733
2733
  }, [w]);
2734
2734
  const j = () => {
2735
- const Y = SA(zt());
2736
- return [SA(Ne(Y, w)), Y];
2735
+ const Y = BA(zt());
2736
+ return [BA(Ne(Y, w)), Y];
2737
2737
  }, O = (Y) => {
2738
2738
  const iA = [...f], oA = f[0], sA = f[1], uA = Y === "previous";
2739
2739
  if (l === i.dateRangePickerCopy.dateRangeThisMonth)
2740
- iA[0] = uA ? Ne(oA, 1) : Re(oA, 1), iA[1] = SA(uA ? Ne(sA, 1) : Re(sA, 1));
2740
+ iA[0] = uA ? Ne(oA, 1) : Re(oA, 1), iA[1] = BA(uA ? Ne(sA, 1) : Re(sA, 1));
2741
2741
  else if (l === i.dateRangePickerCopy.dateRangeYTD || l === i.dateRangePickerCopy.dateRangeLastYear)
2742
2742
  iA[0] = uA ? dr(fr(oA), 1) : _t(fr(oA), 1), iA[1] = uA ? dr(cr(oA), 1) : _t(cr(oA), 1);
2743
2743
  else {
@@ -3234,26 +3234,26 @@ const pt = ({
3234
3234
  ),
3235
3235
  t?.map((uA) => {
3236
3236
  if (h.isValidElement(uA)) return uA;
3237
- const { iconName: cA, onClick: jA, label: kA } = uA;
3237
+ const { iconName: cA, onClick: jA, label: WA } = uA;
3238
3238
  return sA ? y ? /* @__PURE__ */ e(
3239
3239
  $,
3240
3240
  {
3241
3241
  onClick: jA,
3242
3242
  startIcon: /* @__PURE__ */ e(q, { name: cA }),
3243
3243
  sx: { my: 4 },
3244
- children: kA
3244
+ children: WA
3245
3245
  },
3246
3246
  cA
3247
- ) : /* @__PURE__ */ e(NA, { "aria-label": kA, onClick: jA, children: /* @__PURE__ */ e(q, { name: cA }) }, cA) : p || w ? /* @__PURE__ */ e(
3247
+ ) : /* @__PURE__ */ e(NA, { "aria-label": WA, onClick: jA, children: /* @__PURE__ */ e(q, { name: cA }) }, cA) : p || w ? /* @__PURE__ */ e(
3248
3248
  $,
3249
3249
  {
3250
3250
  onClick: jA,
3251
3251
  startIcon: /* @__PURE__ */ e(q, { name: cA }),
3252
3252
  sx: { my: 4 },
3253
- children: kA
3253
+ children: WA
3254
3254
  },
3255
3255
  cA
3256
- ) : /* @__PURE__ */ e(NA, { "aria-label": kA, onClick: jA, children: /* @__PURE__ */ e(q, { name: cA }) }, cA);
3256
+ ) : /* @__PURE__ */ e(NA, { "aria-label": WA, onClick: jA, children: /* @__PURE__ */ e(q, { name: cA }) }, cA);
3257
3257
  })
3258
3258
  ] }),
3259
3259
  sx: {
@@ -4067,7 +4067,7 @@ class rf {
4067
4067
  categoryApi = new Pi("/", "");
4068
4068
  globalStore;
4069
4069
  alert = "";
4070
- dateRange = { start: QA(fA()), end: SA(fA()) };
4070
+ dateRange = { start: QA(fA()), end: BA(fA()) };
4071
4071
  budgets = [];
4072
4072
  selectedBudget;
4073
4073
  selectedSubBudget;
@@ -4802,7 +4802,7 @@ const cf = [
4802
4802
  const i = A.toLowerCase().split(" "), n = t?.toString().toLowerCase() ?? "";
4803
4803
  return i.every((r) => n.indexOf(r) > -1);
4804
4804
  };
4805
- var TA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(TA || {}), UA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(UA || {}), uf = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(uf || {}), Pf = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(Pf || {}), bf = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(bf || {}), B = /* @__PURE__ */ ((A) => (A[A.DEBT_TRACK = 1] = "DEBT_TRACK", A[A.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", A[A.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", A[A.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", A))(B || {}), Pn = /* @__PURE__ */ ((A) => (A[A.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", A[A.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", A[A.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", A[A.ACTION = 4] = "ACTION", A))(Pn || {}), he = /* @__PURE__ */ ((A) => (A[A.AUTOMOBILE = 1] = "AUTOMOBILE", A[A.COLLEGE = 2] = "COLLEGE", A[A.HOUSE = 3] = "HOUSE", A[A.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", A[A.VACATION = 5] = "VACATION", A[A.ELECTRONIC = 6] = "ELECTRONIC", A[A.OTHER = 7] = "OTHER", A[A.RETIREMENT = 8] = "RETIREMENT", A[A.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", A[A.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", A[A.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", A[A.CREDIT_CARD = 12] = "CREDIT_CARD", A[A.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", A[A.LOANS = 14] = "LOANS", A))(he || {}), LA = /* @__PURE__ */ ((A) => (A[A.BudgetExceeded = 1] = "BudgetExceeded", A[A.BudgetOffTarget = 2] = "BudgetOffTarget", A[A.DebtPaymentReminder = 3] = "DebtPaymentReminder", A[A.AccountBalanceLow = 6] = "AccountBalanceLow", A[A.AccountDepositLarge = 7] = "AccountDepositLarge", A[A.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", A[A.TransactionFeeCharge = 9] = "TransactionFeeCharge", A[A.InternationalTransaction = 23] = "InternationalTransaction", A))(LA || {}), se = /* @__PURE__ */ ((A) => (A[A.CREDIT = 1] = "CREDIT", A[A.DEBIT = 2] = "DEBIT", A))(se || {}), Bn = /* @__PURE__ */ ((A) => (A[A.POSTED = 1] = "POSTED", A[A.PENDING = 2] = "PENDING", A))(Bn || {}), Hf = /* @__PURE__ */ ((A) => (A.Desktop = "Desktop", A.Mobile = "Mobile", A))(Hf || {});
4805
+ var TA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(TA || {}), SA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(SA || {}), uf = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(uf || {}), Pf = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(Pf || {}), bf = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(bf || {}), B = /* @__PURE__ */ ((A) => (A[A.DEBT_TRACK = 1] = "DEBT_TRACK", A[A.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", A[A.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", A[A.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", A))(B || {}), Pn = /* @__PURE__ */ ((A) => (A[A.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", A[A.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", A[A.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", A[A.ACTION = 4] = "ACTION", A))(Pn || {}), he = /* @__PURE__ */ ((A) => (A[A.AUTOMOBILE = 1] = "AUTOMOBILE", A[A.COLLEGE = 2] = "COLLEGE", A[A.HOUSE = 3] = "HOUSE", A[A.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", A[A.VACATION = 5] = "VACATION", A[A.ELECTRONIC = 6] = "ELECTRONIC", A[A.OTHER = 7] = "OTHER", A[A.RETIREMENT = 8] = "RETIREMENT", A[A.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", A[A.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", A[A.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", A[A.CREDIT_CARD = 12] = "CREDIT_CARD", A[A.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", A[A.LOANS = 14] = "LOANS", A))(he || {}), LA = /* @__PURE__ */ ((A) => (A[A.BudgetExceeded = 1] = "BudgetExceeded", A[A.BudgetOffTarget = 2] = "BudgetOffTarget", A[A.DebtPaymentReminder = 3] = "DebtPaymentReminder", A[A.AccountBalanceLow = 6] = "AccountBalanceLow", A[A.AccountDepositLarge = 7] = "AccountDepositLarge", A[A.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", A[A.TransactionFeeCharge = 9] = "TransactionFeeCharge", A[A.InternationalTransaction = 23] = "InternationalTransaction", A))(LA || {}), se = /* @__PURE__ */ ((A) => (A[A.CREDIT = 1] = "CREDIT", A[A.DEBIT = 2] = "DEBIT", A))(se || {}), Bn = /* @__PURE__ */ ((A) => (A[A.POSTED = 1] = "POSTED", A[A.PENDING = 2] = "PENDING", A))(Bn || {}), Hf = /* @__PURE__ */ ((A) => (A.Desktop = "Desktop", A.Mobile = "Mobile", A))(Hf || {});
4806
4806
  const cI = {
4807
4807
  account_guid: "",
4808
4808
  amount: 0,
@@ -4834,7 +4834,7 @@ const cI = {
4834
4834
  };
4835
4835
  let zf = class {
4836
4836
  beginDate = QA(/* @__PURE__ */ new Date());
4837
- endDate = SA(/* @__PURE__ */ new Date());
4837
+ endDate = BA(/* @__PURE__ */ new Date());
4838
4838
  expandedSplits = [];
4839
4839
  isInitialized = !1;
4840
4840
  height = 550;
@@ -4982,6 +4982,11 @@ class Cf {
4982
4982
  dateRange: { start: yA(i), end: yA(t) }
4983
4983
  });
4984
4984
  };
4985
+ modifyTransactionByAccountGuid = (t, i) => {
4986
+ this.transactions = this.augmentTransactions(
4987
+ this.transactions.map((n) => n.account_guid === t ? { ...n, ...i } : n)
4988
+ );
4989
+ };
4985
4990
  removeTag = async (t) => {
4986
4991
  await this.api.removeTag(t), await this.loadTags();
4987
4992
  };
@@ -5876,7 +5881,7 @@ class cd {
5876
5881
  }
5877
5882
  };
5878
5883
  loadMonthlyCategoryTotals = async (t = this.globalStore.globalUiStore.selectedAccounts, i, n) => {
5879
- const r = gA(QA(i ?? Ne(/* @__PURE__ */ new Date(), 11))), o = gA(SA(n ?? /* @__PURE__ */ new Date()));
5884
+ const r = gA(QA(i ?? Ne(/* @__PURE__ */ new Date(), 11))), o = gA(BA(n ?? /* @__PURE__ */ new Date()));
5880
5885
  try {
5881
5886
  const I = await this.api.getMonthlyCategoryTotals(r, o, t);
5882
5887
  F(() => {
@@ -5895,7 +5900,7 @@ class cd {
5895
5900
  t
5896
5901
  ), o = await this.api.getMonthlyCategoryTotals(
5897
5902
  gA(QA(Ne(n, 11))),
5898
- gA(SA(n)),
5903
+ gA(BA(n)),
5899
5904
  t
5900
5905
  );
5901
5906
  F(() => {
@@ -7162,13 +7167,13 @@ const hI = ({ transaction: A }) => {
7162
7167
  selectedAccounts: Y,
7163
7168
  setDisplayedDate: iA,
7164
7169
  setSelectedAccounts: oA
7165
- } = pA(), [sA, uA] = h.useState(""), [cA, jA] = h.useState(""), [kA, fe] = h.useState(!1), [Ie, bA] = h.useState(!1), [JA, Ke] = h.useState(!1);
7170
+ } = pA(), [sA, uA] = h.useState(""), [cA, jA] = h.useState(""), [WA, fe] = h.useState(!1), [Ie, bA] = h.useState(!1), [JA, Ke] = h.useState(!1);
7166
7171
  h.useEffect(() => {
7167
7172
  oA(r);
7168
7173
  }, [r]), h.useEffect(() => {
7169
- const BA = QA(fA()), rr = SA(fA());
7170
- iA(BA, rr), P({
7171
- dateRange: { start: BA, end: rr },
7174
+ const kA = QA(fA()), rr = BA(fA());
7175
+ iA(kA, rr), P({
7176
+ dateRange: { start: kA, end: rr },
7172
7177
  accounts: Y.map(($i) => $i.guid),
7173
7178
  custom: ($i) => !$i.accountIsClosed
7174
7179
  }), Ke(!0), j(V.TRANSACTIONS_VIEW);
@@ -7176,22 +7181,21 @@ const hI = ({ transaction: A }) => {
7176
7181
  JA && (P({
7177
7182
  ...u,
7178
7183
  dateRange: { start: O.start, end: O.end },
7179
- accounts: tA,
7180
- custom: (BA) => !BA.accountIsClosed
7184
+ accounts: tA
7181
7185
  }), H(O.start));
7182
7186
  }, [O, tA]), h.useEffect(() => {
7183
7187
  E(i);
7184
7188
  }, [i]);
7185
7189
  const Yt = h.useMemo(
7186
- () => r.filter((BA) => BA.is_manual),
7190
+ () => r.filter((kA) => kA.is_manual),
7187
7191
  [r]
7188
- ), J = cA ? y.find((BA) => BA.guid === cA) : void 0, wA = c && !!a.payee && !!a.account_guid && !!a.category_guid, VA = (BA) => {
7189
- iA(BA[0], BA[1]);
7190
- }, Ze = (BA) => {
7191
- f(BA), P({
7192
+ ), J = cA ? y.find((kA) => kA.guid === cA) : void 0, wA = c && !!a.payee && !!a.account_guid && !!a.category_guid, VA = (kA) => {
7193
+ iA(kA[0], kA[1]);
7194
+ }, Ze = (kA) => {
7195
+ f(kA), P({
7192
7196
  ...u,
7193
- searchTerm: BA
7194
- }), j(V.TRANSACTIONS_CLICK_SEARCH, { search_term: BA });
7197
+ searchTerm: kA
7198
+ }), j(V.TRANSACTIONS_CLICK_SEARCH, { search_term: kA });
7195
7199
  }, Ki = () => {
7196
7200
  fI(y, p), j(V.TRANSACTIONS_CLICK_EXPORT);
7197
7201
  }, Zi = () => {
@@ -7253,17 +7257,17 @@ const hI = ({ transaction: A }) => {
7253
7257
  Vf,
7254
7258
  {
7255
7259
  height: `calc(${t} - ${Fr}px)`,
7256
- onCategoryClick: (BA) => {
7257
- jA(BA), uA(
7260
+ onCategoryClick: (kA) => {
7261
+ jA(kA), uA(
7258
7262
  "category"
7259
7263
  /* Category */
7260
7264
  );
7261
7265
  },
7262
- onRowClick: (BA) => {
7263
- jA(BA), uA(
7266
+ onRowClick: (kA) => {
7267
+ jA(kA), uA(
7264
7268
  "transaction"
7265
7269
  /* Transaction */
7266
- ), j(V.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: BA });
7270
+ ), j(V.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: kA });
7267
7271
  }
7268
7272
  }
7269
7273
  )
@@ -7280,8 +7284,8 @@ const hI = ({ transaction: A }) => {
7280
7284
  Rt,
7281
7285
  {
7282
7286
  height: `calc(${t} - ${Fr}px)`,
7283
- onClick: (BA) => {
7284
- jA(BA), uA(
7287
+ onClick: (kA) => {
7288
+ jA(kA), uA(
7285
7289
  "transaction"
7286
7290
  /* Transaction */
7287
7291
  );
@@ -7328,7 +7332,7 @@ const hI = ({ transaction: A }) => {
7328
7332
  Nd,
7329
7333
  {
7330
7334
  copy: { title: D.add_manual_account },
7331
- isOpen: kA,
7335
+ isOpen: WA,
7332
7336
  onClose: () => {
7333
7337
  fe(!1);
7334
7338
  },
@@ -7499,7 +7503,7 @@ const hI = ({ transaction: A }) => {
7499
7503
  h.useEffect(() => {
7500
7504
  c({
7501
7505
  accounts: f,
7502
- dateRange: { start: Ve(fA(), 90), end: SA(fA()) }
7506
+ dateRange: { start: Ve(fA(), 90), end: BA(fA()) }
7503
7507
  });
7504
7508
  }, []), h.useEffect(() => {
7505
7509
  if (p && A.sequenceGuid) {
@@ -7633,17 +7637,17 @@ const hI = ({ transaction: A }) => {
7633
7637
  return n;
7634
7638
  }, Jd = (A, t) => {
7635
7639
  switch (A.activityStatus) {
7636
- case UA.Paid:
7640
+ case SA.Paid:
7637
7641
  return A.occurredOnDate ? z(
7638
7642
  t.paid_on,
7639
7643
  nA(A.occurredOnDate, AA.MONTH_DAY)
7640
7644
  ) : t.paid;
7641
- case UA.Missed:
7645
+ case SA.Missed:
7642
7646
  return z(
7643
7647
  t.missed_on,
7644
7648
  nA(A.expectedDate, AA.MONTH_DAY)
7645
7649
  );
7646
- case UA.Upcoming:
7650
+ case SA.Upcoming:
7647
7651
  return z(
7648
7652
  t.upcoming_on,
7649
7653
  nA(A.expectedDate, AA.MONTH_DAY)
@@ -7655,9 +7659,9 @@ const hI = ({ transaction: A }) => {
7655
7659
  if (A.activityType === TA.Income)
7656
7660
  return /* @__PURE__ */ e(kn, {});
7657
7661
  switch (A.activityStatus) {
7658
- case UA.Missed:
7662
+ case SA.Missed:
7659
7663
  return /* @__PURE__ */ e(Kn, {});
7660
- case UA.Paid:
7664
+ case SA.Paid:
7661
7665
  return /* @__PURE__ */ e(Zn, {});
7662
7666
  default:
7663
7667
  return /* @__PURE__ */ e(Wn, {});
@@ -7669,7 +7673,7 @@ const hI = ({ transaction: A }) => {
7669
7673
  },
7670
7674
  showOrdinal: n = !1
7671
7675
  }) => {
7672
- const { recurring: r } = X(), [o, I] = h.useState(""), a = A.activityType === TA.Income, c = A.activityStatus === UA.Paid, d = A.activityStatus === UA.Missed, f = A.activityStatus === UA.Upcoming;
7676
+ const { recurring: r } = X(), [o, I] = h.useState(""), a = A.activityType === TA.Income, c = A.activityStatus === SA.Paid, d = A.activityStatus === SA.Missed, f = A.activityStatus === SA.Upcoming;
7673
7677
  let E = r.paid?.toLowerCase();
7674
7678
  return d ? E = r.missed?.toLowerCase() : f && (E = Wr(n ? {
7675
7679
  copy: r,
@@ -8021,7 +8025,7 @@ const hI = ({ transaction: A }) => {
8021
8025
  }, pI = C(nE), rE = (A, t, i) => t.map((n) => {
8022
8026
  const r = i.find((I) => I.scheduled_payment_guid === n.guid), o = A.find((I) => I.guid === r?.account_guid);
8023
8027
  return {
8024
- activityStatus: UA.Upcoming,
8028
+ activityStatus: SA.Upcoming,
8025
8029
  activityType: TA.Expense,
8026
8030
  amount: n.amount,
8027
8031
  categoryGuid: r?.category_guid,
@@ -8060,7 +8064,7 @@ const hI = ({ transaction: A }) => {
8060
8064
  const E = r.find((u) => u.guid === f.cashflow_sequence_guid), l = o.find((u) => u.guid === f.transaction_guid), v = A.find((u) => u.guid === l?.account_guid);
8061
8065
  return {
8062
8066
  accountGuid: E?.account_guid || v?.guid,
8063
- activityStatus: UA.Paid,
8067
+ activityStatus: SA.Paid,
8064
8068
  activityType: TA.Income,
8065
8069
  amount: f.amount,
8066
8070
  categoryGuid: f.category_guid,
@@ -8091,7 +8095,7 @@ const hI = ({ transaction: A }) => {
8091
8095
  ), v = o.find((H) => H.guid === l?.transaction_guid), u = A.find((H) => H.guid === v?.account_guid);
8092
8096
  return {
8093
8097
  accountGuid: E?.account_guid || u?.guid,
8094
- activityStatus: UA.Upcoming,
8098
+ activityStatus: SA.Upcoming,
8095
8099
  activityType: TA.Income,
8096
8100
  amount: f.amount,
8097
8101
  categoryGuid: f.category_guid,
@@ -8114,7 +8118,7 @@ const hI = ({ transaction: A }) => {
8114
8118
  if (!r) return [];
8115
8119
  const o = A.find((v) => v.guid === r?.account_guid), I = Lo(t.occurs_on), a = {
8116
8120
  accountGuid: o?.guid,
8117
- activityStatus: UA.Upcoming,
8121
+ activityStatus: SA.Upcoming,
8118
8122
  activityType: TA.Expense,
8119
8123
  amount: t.amount,
8120
8124
  categoryGuid: r?.category_guid,
@@ -8210,13 +8214,13 @@ const hI = ({ transaction: A }) => {
8210
8214
  const u = i.find(
8211
8215
  (H) => H.scheduled_payment_guid === v.scheduledPaymentGuid && H.date > gA(Ve(v.expectedDate, 3)) && H.date < gA(We(v.expectedDate, 3))
8212
8216
  );
8213
- u ? (v.transactionGuid = u.guid, v.occurredOnDate = yA(u.date), v.activityStatus = UA.Paid) : mA(v.expectedDate, Ve(d, 3)) && (v.activityStatus = UA.Missed);
8217
+ u ? (v.transactionGuid = u.guid, v.occurredOnDate = yA(u.date), v.activityStatus = SA.Paid) : mA(v.expectedDate, Ve(d, 3)) && (v.activityStatus = SA.Missed);
8214
8218
  }), n;
8215
8219
  }, cE = (A, t, i, n, r) => n.map((o) => {
8216
8220
  const I = t.find((E) => E.cashflow_sequence_guid === o.guid), a = i.find((E) => E.cashflow_sequence_guid === o.guid), c = r.find((E) => E.guid === I?.transaction_guid), d = A.find((E) => E.guid === c?.account_guid);
8217
8221
  let f = /* @__PURE__ */ new Date();
8218
8222
  return I ? f = Zt(I.expected_date) : a && (f = Zt(a.expected_date)), {
8219
- activityStatus: UA.Upcoming,
8223
+ activityStatus: SA.Upcoming,
8220
8224
  activityType: TA.Income,
8221
8225
  amount: o.amount,
8222
8226
  categoryGuid: I?.category_guid,
@@ -8275,10 +8279,10 @@ const hI = ({ transaction: A }) => {
8275
8279
  ] });
8276
8280
  }, wI = C(dE), Ut = (A, t) => A + t.amount, en = (A) => A.activityType === TA.Income && mt(A.expectedDate, {
8277
8281
  start: QA(fA()),
8278
- end: SA(fA())
8282
+ end: BA(fA())
8279
8283
  }), di = (A) => A.activityType === TA.Expense && mt(A.expectedDate, {
8280
8284
  start: QA(fA()),
8281
- end: SA(fA())
8285
+ end: BA(fA())
8282
8286
  }), tn = (A) => A.occurredOnDate && mt(A.occurredOnDate, {
8283
8287
  start: QA(/* @__PURE__ */ new Date()),
8284
8288
  end: We(fA(), 30)
@@ -8292,11 +8296,11 @@ const hI = ({ transaction: A }) => {
8292
8296
  ).filter(
8293
8297
  (u) => Ee(u.occurredOnDate || u.expectedDate, A)
8294
8298
  ), d = c.some(
8295
- (u) => u.activityType === TA.Expense && u.activityStatus === UA.Upcoming
8299
+ (u) => u.activityType === TA.Expense && u.activityStatus === SA.Upcoming
8296
8300
  ), f = c.some(
8297
- (u) => u.activityType === TA.Expense && u.activityStatus === UA.Missed
8301
+ (u) => u.activityType === TA.Expense && u.activityStatus === SA.Missed
8298
8302
  ), E = c.some(
8299
- (u) => u.activityType === TA.Expense && u.activityStatus === UA.Paid
8303
+ (u) => u.activityType === TA.Expense && u.activityStatus === SA.Paid
8300
8304
  ), l = c.some((u) => u.activityType === TA.Income), v = (d ? 1 : 0) + (f ? 1 : 0) + (E ? 1 : 0) + (l ? 1 : 0);
8301
8305
  return /* @__PURE__ */ e(
8302
8306
  qo,
@@ -8368,7 +8372,7 @@ const hI = ({ transaction: A }) => {
8368
8372
  }, I = /* @__PURE__ */ e(
8369
8373
  mi,
8370
8374
  {
8371
- maxDate: SA(Re(/* @__PURE__ */ new Date(), 1)),
8375
+ maxDate: BA(Re(/* @__PURE__ */ new Date(), 1)),
8372
8376
  minDate: QA(/* @__PURE__ */ new Date()),
8373
8377
  onMonthChange: o,
8374
8378
  showDaysOutsideCurrentMonth: !0,
@@ -8719,13 +8723,13 @@ class wE {
8719
8723
  );
8720
8724
  }
8721
8725
  get paidActivities() {
8722
- return this.activities.filter((t) => t.activityStatus === UA.Paid);
8726
+ return this.activities.filter((t) => t.activityStatus === SA.Paid);
8723
8727
  }
8724
8728
  get upcomingActivities() {
8725
- return this.activities.filter((t) => t.activityStatus === UA.Upcoming);
8729
+ return this.activities.filter((t) => t.activityStatus === SA.Upcoming);
8726
8730
  }
8727
8731
  get missedActivities() {
8728
- return this.activities.filter((t) => t.activityStatus === UA.Missed);
8732
+ return this.activities.filter((t) => t.activityStatus === SA.Missed);
8729
8733
  }
8730
8734
  get upcomingExpenses() {
8731
8735
  return this.upcomingActivities.filter((t) => t.activityType === TA.Expense);
@@ -8832,7 +8836,7 @@ class wE {
8832
8836
  try {
8833
8837
  const t = await this.cashflowApi.getCashflowEventsByDateRange(
8834
8838
  Ve(fA(), 90),
8835
- SA(fA())
8839
+ BA(fA())
8836
8840
  );
8837
8841
  F(() => {
8838
8842
  this.cashflowEvents = t.filter(
@@ -9699,11 +9703,11 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(Z, { children: [
9699
9703
  if (!(j.length < 1)) {
9700
9704
  y(!0);
9701
9705
  for (let cA = 0; cA < j.length; cA++) {
9702
- const jA = j[cA], kA = HI(
9706
+ const jA = j[cA], WA = HI(
9703
9707
  jA,
9704
9708
  jA.frequency,
9705
9709
  jA.nextDate
9706
- ), fe = await t(kA);
9710
+ ), fe = await t(WA);
9707
9711
  if (fe) {
9708
9712
  const Ie = zI(fe, jA);
9709
9713
  await A(Ie);
@@ -9956,7 +9960,7 @@ let ih = class {
9956
9960
  // if there is no income activity
9957
9961
  get expensesTilNextIncome() {
9958
9962
  return this.upcomingExpenses.filter(
9959
- (t) => mA(t.expectedDate, this.nextIncome?.expectedDate || SA(/* @__PURE__ */ new Date()))
9963
+ (t) => mA(t.expectedDate, this.nextIncome?.expectedDate || BA(/* @__PURE__ */ new Date()))
9960
9964
  );
9961
9965
  }
9962
9966
  setNextIncome = (t) => {
@@ -10047,7 +10051,7 @@ const ke = () => {
10047
10051
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
10048
10052
  return Ni().uiStore;
10049
10053
  }, Ih = ({ debts: A, onClickCta: t, sx: i }) => {
10050
- const n = nt(), { isMobile: r } = zA(), { debts: o } = X(), { selectedDebtPriority: I } = ke(), { monthlyCashFlowProfile: a } = WA(), { payoffDate: c, payoffSavings: d, payoffDuration: f } = h.useMemo(() => {
10054
+ const n = nt(), { isMobile: r } = zA(), { debts: o } = X(), { selectedDebtPriority: I } = ke(), { monthlyCashFlowProfile: a } = FA(), { payoffDate: c, payoffSavings: d, payoffDuration: f } = h.useMemo(() => {
10051
10055
  const E = a?.extra_payment ?? 0;
10052
10056
  return oh(A, I, E);
10053
10057
  }, [A, I, a]);
@@ -10488,7 +10492,7 @@ const ke = () => {
10488
10492
  (o) => o.top_level_category_guid !== g.INCOME && o.top_level_category_guid !== g.TRANSFER && o.total > 0
10489
10493
  );
10490
10494
  let n = QA(Ne(/* @__PURE__ */ new Date(), 5));
10491
- const r = SA(/* @__PURE__ */ new Date());
10495
+ const r = BA(/* @__PURE__ */ new Date());
10492
10496
  for (; mA(n, r); )
10493
10497
  t.push({
10494
10498
  x: nA(n, AA.MONTH_SHORT),
@@ -10810,7 +10814,7 @@ const OI = ({
10810
10814
  ) })
10811
10815
  ] }) });
10812
10816
  }, Dh = C(xh), LI = C(({ goal: A }) => {
10813
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.interest_rate ?? 0), a = !A.guid, c = o < 0, d = async () => {
10817
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.interest_rate ?? 0), a = !A.guid, c = o < 0, d = async () => {
10814
10818
  const E = { ...A, interest_rate: o };
10815
10819
  A.interest_rate = o, a ? n(E) : (await r(E), i(t.alert_goal_updated_interest_rate));
10816
10820
  }, f = () => {
@@ -10843,7 +10847,7 @@ const OI = ({
10843
10847
  }
10844
10848
  );
10845
10849
  }), QI = C(({ goal: A }) => {
10846
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.monthly_payment ?? 0), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = async () => {
10850
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.monthly_payment ?? 0), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = async () => {
10847
10851
  const E = { ...A, monthly_payment: o };
10848
10852
  A.monthly_payment = o, a ? n(E) : (await r({ ...A, monthly_payment: o }), i(t.alert_goal_updated_payment));
10849
10853
  }, f = () => {
@@ -10877,7 +10881,7 @@ const OI = ({
10877
10881
  }
10878
10882
  );
10879
10883
  }), qI = C(({ goal: A }) => {
10880
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.initial_amount), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = async () => {
10884
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.initial_amount), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = async () => {
10881
10885
  const E = { ...A, initial_amount: o };
10882
10886
  A.initial_amount = o, a ? n(E) : (await r({ ...A, initial_amount: o }), i(t.alert_goal_updated_balance));
10883
10887
  }, f = () => {
@@ -11121,7 +11125,7 @@ const OI = ({
11121
11125
  }
11122
11126
  );
11123
11127
  }, Yh = C(() => {
11124
- const { debts: A } = X(), { monthlyCashFlowProfile: t, updateMonthlyCashFlowProfile: i } = WA(), { onEvent: n } = K(), [r, o] = h.useState(t?.extra_payment ?? 0), I = r < 0 || r > 9999999999e-2, a = async () => {
11128
+ const { debts: A } = X(), { monthlyCashFlowProfile: t, updateMonthlyCashFlowProfile: i } = FA(), { onEvent: n } = K(), [r, o] = h.useState(t?.extra_payment ?? 0), I = r < 0 || r > 9999999999e-2, a = async () => {
11125
11129
  t && (await i({ ...t, extra_payment: r }), t.extra_payment = r, n(V.DEBTS_SAVE_PAYDOWN_ACTION, {
11126
11130
  user_guid: t?.user_guid
11127
11131
  }));
@@ -11155,7 +11159,7 @@ const OI = ({
11155
11159
  }
11156
11160
  );
11157
11161
  }), Vh = () => {
11158
- const { debts: A } = X(), { totalMonthlyPayments: t } = Ni(), { monthlyCashFlowProfile: i } = WA(), n = t + Number(i?.extra_payment);
11162
+ const { debts: A } = X(), { totalMonthlyPayments: t } = Ni(), { monthlyCashFlowProfile: i } = FA(), n = t + Number(i?.extra_payment);
11159
11163
  return /* @__PURE__ */ s(b, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
11160
11164
  /* @__PURE__ */ s(b, { p: 24, children: [
11161
11165
  /* @__PURE__ */ s(b, { alignItems: "center", gap: 4, mb: 24, children: [
@@ -11530,7 +11534,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11530
11534
  c.priority = !c.is_paid_off && !c.is_impossible ? a++ : void 0;
11531
11535
  }), o;
11532
11536
  }, el = C(({ onClick: A }) => {
11533
- const { debts: t } = X(), { isDesktop: i } = zA(), { totalMonthlyPayments: n } = Ni(), { monthlyCashFlowProfile: r } = WA(), o = n + Number(r?.extra_payment), I = i ? t.paydown_button_long : t.paydown_button_short;
11537
+ const { debts: t } = X(), { isDesktop: i } = zA(), { totalMonthlyPayments: n } = Ni(), { monthlyCashFlowProfile: r } = FA(), o = n + Number(r?.extra_payment), I = i ? t.paydown_button_long : t.paydown_button_short;
11534
11538
  return /* @__PURE__ */ e(
11535
11539
  $,
11536
11540
  {
@@ -11544,7 +11548,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11544
11548
  }
11545
11549
  );
11546
11550
  }), tl = ({ onBackClick: A, sx: t }) => {
11547
- const [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState(!1), [c, d] = h.useState(""), { isDesktop: f, isMobile: E } = zA(), { debts: l } = X(), { onEvent: v } = K(), { isInitialized: u, setSelectedAccounts: H } = pA(), { setSelectedAccount: P } = Xe(), { selectedDebtPriority: p, setSelectedDebtChartData: y } = ke(), { accounts: x } = CA(), { loadGoals: w, monthlyCashFlowProfile: D } = WA(), { debts: m } = Ni(), j = h.useMemo(() => {
11551
+ const [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState(!1), [c, d] = h.useState(""), { isDesktop: f, isMobile: E } = zA(), { debts: l } = X(), { onEvent: v } = K(), { isInitialized: u, setSelectedAccounts: H } = pA(), { setSelectedAccount: P } = Xe(), { selectedDebtPriority: p, setSelectedDebtChartData: y } = ke(), { accounts: x } = CA(), { loadGoals: w, monthlyCashFlowProfile: D } = FA(), { debts: m } = Ni(), j = h.useMemo(() => {
11548
11552
  const oA = D?.extra_payment ?? 0;
11549
11553
  return Al(m, p, oA);
11550
11554
  }, [m, p, D]);
@@ -11690,7 +11694,7 @@ class Il {
11690
11694
  displayedDate = /* @__PURE__ */ new Date();
11691
11695
  displayedDateRange = {
11692
11696
  start: QA(this.displayedDate),
11693
- end: SA(this.displayedDate)
11697
+ end: BA(this.displayedDate)
11694
11698
  };
11695
11699
  constructor(t) {
11696
11700
  DA(this), this.globalStore = t;
@@ -11879,7 +11883,7 @@ const cl = (A, t) => {
11879
11883
  ] }) });
11880
11884
  }
11881
11885
  ), dl = C(({ trackType: A }) => {
11882
- const { goals: t } = X(), { setAlert: i, monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: r } = WA(), o = h.useMemo(() => {
11886
+ const { goals: t } = X(), { setAlert: i, monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: r } = FA(), o = h.useMemo(() => {
11883
11887
  let d = 0;
11884
11888
  return A === B.SAVINGS_TRACK ? d = n?.amount_allocated_for_savings_goals || 0 : A === B.DEBT_TRACK ? d = n?.amount_allocated_for_debt_goals || 0 : A === B.RETIREMENT_TRACK && (d = n?.amount_allocated_for_retirement_goals || 0), d;
11885
11889
  }, [n]), [I, a] = h.useState(o), c = async () => {
@@ -11912,7 +11916,7 @@ const cl = (A, t) => {
11912
11916
  }
11913
11917
  ) });
11914
11918
  }), El = ({ goals: A }) => {
11915
- const { goals: t, common: i } = X(), { reorderGoals: n, setAlert: r } = WA(), [o, I] = h.useState(!1), [a, c] = h.useState(A.map((v) => ({ ...v })));
11919
+ const { goals: t, common: i } = X(), { reorderGoals: n, setAlert: r } = FA(), [o, I] = h.useState(!1), [a, c] = h.useState(A.map((v) => ({ ...v })));
11916
11920
  h.useEffect(() => {
11917
11921
  o && c(A.map((v) => ({ ...v })));
11918
11922
  }, [o]);
@@ -12057,7 +12061,7 @@ const cl = (A, t) => {
12057
12061
  ] }) })
12058
12062
  ] }) }, A.guid);
12059
12063
  }, vl = ({ trackType: A }) => {
12060
- const { goals: t, common: i } = X(), { orderedGoals: n } = WA(), r = n.filter((v) => v.track_type === A), o = r.filter(
12064
+ const { goals: t, common: i } = X(), { orderedGoals: n } = FA(), r = n.filter((v) => v.track_type === A), o = r.filter(
12061
12065
  (v) => v.track_type === B.SAVINGS_TRACK && !v.has_been_spent || v.track_type !== B.SAVINGS_TRACK && !v.is_complete
12062
12066
  ), I = r.filter(
12063
12067
  (v) => v.track_type === B.SAVINGS_TRACK && v.has_been_spent || v.track_type !== B.SAVINGS_TRACK && v.is_complete
@@ -12112,7 +12116,7 @@ const cl = (A, t) => {
12112
12116
  )
12113
12117
  ] });
12114
12118
  }, rn = C(({ trackType: A, onAddGoals: t }) => {
12115
- const { isMobile: i } = zA(), { goals: n } = X(), { orderedGoals: r, setSelectedGoal: o } = WA(), I = r.filter((f) => f.track_type === A), a = I.filter(
12119
+ const { isMobile: i } = zA(), { goals: n } = X(), { orderedGoals: r, setSelectedGoal: o } = FA(), I = r.filter((f) => f.track_type === A), a = I.filter(
12116
12120
  (f) => f.track_type === B.SAVINGS_TRACK && !f.has_been_spent || f.track_type !== B.SAVINGS_TRACK && !f.is_complete
12117
12121
  ), c = I.filter(
12118
12122
  (f) => f.track_type === B.SAVINGS_TRACK && f.has_been_spent || f.track_type !== B.SAVINGS_TRACK && f.is_complete
@@ -12240,7 +12244,7 @@ const cl = (A, t) => {
12240
12244
  }
12241
12245
  );
12242
12246
  }, ul = ({ onClose: A }) => {
12243
- const { goals: t } = X(), { addGoal: i, debtGoals: n, setAlert: r, setSelectedGoal: o } = WA(), { debtAccounts: I } = CA(), [a, c] = h.useState(!1), d = sl(t), f = (l, v, u) => {
12247
+ const { goals: t } = X(), { addGoal: i, debtGoals: n, setAlert: r, setSelectedGoal: o } = FA(), { debtAccounts: I } = CA(), [a, c] = h.useState(!1), d = sl(t), f = (l, v, u) => {
12244
12248
  u === B.DEBT_TRACK ? c(!0) : o({
12245
12249
  amount: 0,
12246
12250
  current_amount: 0,
@@ -12309,7 +12313,7 @@ const cl = (A, t) => {
12309
12313
  ] }) })
12310
12314
  ] });
12311
12315
  }, Pl = C(({ goal: A }) => {
12312
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.amount), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, f = async () => {
12316
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.amount), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, f = async () => {
12313
12317
  const l = { ...A, amount: o };
12314
12318
  A.amount = o, a ? n(l) : (await r(l), i(t.alert_goal_updated_amount));
12315
12319
  }, E = () => {
@@ -12343,7 +12347,7 @@ const cl = (A, t) => {
12343
12347
  }
12344
12348
  );
12345
12349
  }), bl = ({ goal: A }) => {
12346
- const { checkingAccounts: t, savingsAccounts: i } = CA(), { accounts: n, goals: r } = X(), { setAlert: o, setSelectedGoal: I, updateGoal: a } = WA(), c = !A.guid && !A.account_guid, [d, f] = h.useState(!1), E = async (l) => {
12350
+ const { checkingAccounts: t, savingsAccounts: i } = CA(), { accounts: n, goals: r } = X(), { setAlert: o, setSelectedGoal: I, updateGoal: a } = FA(), c = !A.guid && !A.account_guid, [d, f] = h.useState(!1), E = async (l) => {
12347
12351
  const v = { ...A, account_guid: l };
12348
12352
  c ? I(v) : (await a(v), o(r.alert_account_changed)), f(!1);
12349
12353
  };
@@ -12414,7 +12418,7 @@ const cl = (A, t) => {
12414
12418
  ] }) })
12415
12419
  ] });
12416
12420
  }, Hl = C(({ goal: A }) => {
12417
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.name), a = !A.guid, c = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, d = async () => {
12421
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.name), a = !A.guid, c = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, d = async () => {
12418
12422
  const E = { ...A, name: o };
12419
12423
  A.name = o, a ? n(E) : (await r(E), i(t.alert_goal_updated_name));
12420
12424
  }, f = () => {
@@ -12445,7 +12449,7 @@ const cl = (A, t) => {
12445
12449
  }
12446
12450
  );
12447
12451
  }), zl = ({ goal: A }) => {
12448
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.retirement_age || 65), a = !A.guid, c = async () => {
12452
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.retirement_age || 65), a = !A.guid, c = async () => {
12449
12453
  if (!isNaN(o)) {
12450
12454
  const E = { ...A, retirement_age: o };
12451
12455
  A.retirement_age = o, a ? n(E) : (await r(E), i(t.alert_goal_updated_retirement_age));
@@ -12479,7 +12483,7 @@ const cl = (A, t) => {
12479
12483
  }
12480
12484
  );
12481
12485
  }, Cl = C(({ goal: A }) => {
12482
- const { goals: t } = X(), { user: i, updateUser: n } = Ue(), { setAlert: r } = WA(), [o, I] = h.useState(yA(i.birthday ?? 0)), [a, c] = h.useState(null), d = A.is_complete, f = async () => {
12486
+ const { goals: t } = X(), { user: i, updateUser: n } = Ue(), { setAlert: r } = FA(), [o, I] = h.useState(yA(i.birthday ?? 0)), [a, c] = h.useState(null), d = A.is_complete, f = async () => {
12483
12487
  o && Go(o) && (await n({ ...i, birthday: gA(o) }), r(t.alert_goal_updated_birthday));
12484
12488
  };
12485
12489
  return /* @__PURE__ */ e(
@@ -12511,7 +12515,7 @@ const cl = (A, t) => {
12511
12515
  retirementGoalAccounts: o,
12512
12516
  setAlert: I,
12513
12517
  setNewRetirementGoalAccounts: a
12514
- } = WA(), [c, d] = h.useState(!1), f = !A.guid, E = i.filter(
12518
+ } = FA(), [c, d] = h.useState(!1), f = !A.guid, E = i.filter(
12515
12519
  (u) => f ? r.find((H) => H.account_guid === u.guid) : o.find((H) => H.account_guid === u.guid)
12516
12520
  ), l = i.filter(
12517
12521
  (u) => !o.find((H) => H.account_guid === u.guid)
@@ -12605,7 +12609,7 @@ const cl = (A, t) => {
12605
12609
  setAlert: c,
12606
12610
  setSelectedGoal: d,
12607
12611
  updateGoal: f
12608
- } = WA(), { user: E } = Ue(), [l, v] = h.useState(!1), u = !a?.guid, H = a?.track_type === B.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, P = h.useMemo(() => a ? a.track_type === B.SAVINGS_TRACK ? !!a.name && !!a.amount : a.track_type === B.DEBT_TRACK ? !0 : a.track_type === B.RETIREMENT_TRACK ? !!a.name && !!a.amount && !!a.retirement_age && !!E.birthday : !0 : !1, [a]);
12612
+ } = FA(), { user: E } = Ue(), [l, v] = h.useState(!1), u = !a?.guid, H = a?.track_type === B.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, P = h.useMemo(() => a ? a.track_type === B.SAVINGS_TRACK ? !!a.name && !!a.amount : a.track_type === B.DEBT_TRACK ? !0 : a.track_type === B.RETIREMENT_TRACK ? !!a.name && !!a.amount && !!a.retirement_age && !!E.birthday : !0 : !1, [a]);
12609
12613
  let p = i.delete_button, y = () => v(!0);
12610
12614
  u ? (y = () => x(), p = i.save_button) : H && (y = () => D(), p = t.mark_as_complete_button);
12611
12615
  const x = async () => {
@@ -12682,7 +12686,7 @@ const cl = (A, t) => {
12682
12686
  ]
12683
12687
  }
12684
12688
  ), jP = C(({ onBackClick: A, sx: t }) => {
12685
- const { onEvent: i } = K(), { isMobile: n } = zA(), { accounts: r } = CA(), { isInitialized: o, setSelectedAccounts: I } = pA(), { goals: a, common: c } = X(), { alert: d, goals: f, loadGoals: E, monthlyCashFlowProfile: l, setAlert: v, retirmentGoals: u } = WA(), [H, P] = h.useState(0), [p, y] = h.useState(!1), x = l?.amount_allocated_for_savings_goals || 0, w = l?.amount_allocated_for_debt_goals || 0, D = l?.amount_allocated_for_retirement_goals || 0, m = z(
12689
+ const { onEvent: i } = K(), { isMobile: n } = zA(), { accounts: r } = CA(), { isInitialized: o, setSelectedAccounts: I } = pA(), { goals: a, common: c } = X(), { alert: d, goals: f, loadGoals: E, monthlyCashFlowProfile: l, setAlert: v, retirmentGoals: u } = FA(), [H, P] = h.useState(0), [p, y] = h.useState(!1), x = l?.amount_allocated_for_savings_goals || 0, w = l?.amount_allocated_for_debt_goals || 0, D = l?.amount_allocated_for_retirement_goals || 0, m = z(
12686
12690
  n ? a.tab_subtitle_mobile : a.tab_subtitle,
12687
12691
  M(x, "0,0")
12688
12692
  ), j = z(
@@ -13849,7 +13853,7 @@ const Sl = ({
13849
13853
  }, jA = async (Ie) => {
13850
13854
  const bA = Ie[0], JA = Ie[1];
13851
13855
  bA && JA && D(as(JA, bA));
13852
- }, kA = {
13856
+ }, WA = {
13853
13857
  chartData: l,
13854
13858
  hoveredData: d,
13855
13859
  onButtonClick: cA,
@@ -13883,8 +13887,8 @@ const Sl = ({
13883
13887
  direction: P ? "column" : "row",
13884
13888
  spacing: P ? 0 : 48,
13885
13889
  children: [
13886
- /* @__PURE__ */ e(Ul, { ...kA }),
13887
- /* @__PURE__ */ e(Kl, { ...kA })
13890
+ /* @__PURE__ */ e(Ul, { ...WA }),
13891
+ /* @__PURE__ */ e(Kl, { ...WA })
13888
13892
  ]
13889
13893
  }
13890
13894
  )
@@ -18798,15 +18802,12 @@ const In = ({
18798
18802
  (n) => n.member_guid === i.guid && i.successfully_aggregated_at && n.guid !== t.guid
18799
18803
  );
18800
18804
  }, IR = () => {
18801
- const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState({}), { selectedAccount: c } = Xe(), { mergeAccounts: d, updateAccount: f } = CA(), { accounts: E } = X(), l = oR(), { onEvent: v } = K(), { filter: u, setFilter: H } = PA(), P = (y) => {
18802
- f({
18805
+ const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState({}), { selectedAccount: c } = Xe(), { mergeAccounts: d, updateAccount: f } = CA(), { accounts: E } = X(), l = oR(), { onEvent: v } = K(), { modifyTransactionByAccountGuid: u } = PA(), H = async (p) => {
18806
+ await f({
18803
18807
  ...c,
18804
- ...y
18805
- }), H({
18806
- ...u,
18807
- custom: (x) => !x.accountIsClosed
18808
- });
18809
- }, p = () => {
18808
+ ...p
18809
+ }), "is_closed" in p && p.is_closed !== c.is_closed && u(c.guid, { accountIsClosed: p?.is_closed });
18810
+ }, P = () => {
18810
18811
  d([c.guid, I.guid]).finally(
18811
18812
  () => n(!1)
18812
18813
  );
@@ -18817,7 +18818,7 @@ const In = ({
18817
18818
  In,
18818
18819
  {
18819
18820
  onClick: () => {
18820
- P({ is_hidden: !c.is_hidden }), v(V.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: c.guid });
18821
+ H({ is_hidden: !c.is_hidden }), v(V.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: c.guid });
18821
18822
  },
18822
18823
  primaryText: c.is_hidden ? E.unhide_account : E.hide_Account,
18823
18824
  secondaryText: c.is_hidden ? E.include_this_account : E.exclude_this_account,
@@ -18862,7 +18863,7 @@ const In = ({
18862
18863
  onClose: () => {
18863
18864
  t(!1);
18864
18865
  },
18865
- onPrimaryAction: () => P({ is_closed: !c.is_closed }),
18866
+ onPrimaryAction: () => H({ is_closed: !c.is_closed }),
18866
18867
  children: z(
18867
18868
  c.is_closed ? E.this_will_resume_updating_the_balance : E.this_will_set_the_balance_of_your_account,
18868
18869
  c.name
@@ -18876,20 +18877,20 @@ const In = ({
18876
18877
  isOpen: i,
18877
18878
  onClose: () => n(!1),
18878
18879
  title: E.mark_as_duplicate,
18879
- children: /* @__PURE__ */ e(rA, { children: l.map((y) => {
18880
- const x = l.indexOf(y) === l.length - 1;
18880
+ children: /* @__PURE__ */ e(rA, { children: l.map((p) => {
18881
+ const y = l.indexOf(p) === l.length - 1;
18881
18882
  return /* @__PURE__ */ s(h.Fragment, { children: [
18882
18883
  /* @__PURE__ */ e(
18883
18884
  Ui,
18884
18885
  {
18885
- account: y,
18886
+ account: p,
18886
18887
  onRowClick: () => {
18887
- o(!0), a(y);
18888
+ o(!0), a(p);
18888
18889
  }
18889
18890
  }
18890
18891
  ),
18891
- /* @__PURE__ */ e(rA, { sx: { ml: x ? 0 : 24 } })
18892
- ] }, y.guid);
18892
+ /* @__PURE__ */ e(rA, { sx: { ml: y ? 0 : 24 } })
18893
+ ] }, p.guid);
18893
18894
  }) })
18894
18895
  }
18895
18896
  ),
@@ -18902,7 +18903,7 @@ const In = ({
18902
18903
  },
18903
18904
  isOpen: r,
18904
18905
  onClose: () => o(!1),
18905
- onPrimaryAction: p,
18906
+ onPrimaryAction: P,
18906
18907
  children: [
18907
18908
  z(
18908
18909
  E.this_means_accounts_will_be_merged,
@@ -19340,8 +19341,7 @@ const In = ({
19340
19341
  return h.useEffect(() => {
19341
19342
  o({
19342
19343
  dateRange: { start: cs(fs(), 90), end: ds() },
19343
- accounts: [n.guid],
19344
- custom: (c) => c.accountIsClosed === !0 || c.accountIsClosed === !1
19344
+ accounts: [n.guid]
19345
19345
  });
19346
19346
  }, [n]), h.useEffect(() => i(V.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), []), /* @__PURE__ */ s(Z, { children: [
19347
19347
  /* @__PURE__ */ e(Rt, { onClick: t }),
@@ -22616,7 +22616,7 @@ const si = h.createContext(null), u3 = ({
22616
22616
  ref: l,
22617
22617
  children: [
22618
22618
  A.map((sA, uA) => {
22619
- const cA = uA + 1, jA = A.length + 1, kA = z(
22619
+ const cA = uA + 1, jA = A.length + 1, WA = z(
22620
22620
  x.card_position_in_carousel_aria,
22621
22621
  cA.toString(),
22622
22622
  jA.toString()
@@ -22624,7 +22624,7 @@ const si = h.createContext(null), u3 = ({
22624
22624
  return /* @__PURE__ */ e(
22625
22625
  x3,
22626
22626
  {
22627
- ariaLabel: `${kA}: ${bA}, ${JA}`,
22627
+ ariaLabel: `${WA}: ${bA}, ${JA}`,
22628
22628
  beat: sA,
22629
22629
  index: uA,
22630
22630
  isActiveCard: uA === iA,
@@ -23182,7 +23182,7 @@ const si = h.createContext(null), u3 = ({
23182
23182
  I(
23183
23183
  i,
23184
23184
  QA(/* @__PURE__ */ new Date()),
23185
- SA(/* @__PURE__ */ new Date())
23185
+ BA(/* @__PURE__ */ new Date())
23186
23186
  ).finally();
23187
23187
  }, [i]);
23188
23188
  const [a, c] = h.useState(""), [d, f] = h.useState(0), E = h.useMemo(
@@ -23524,7 +23524,7 @@ const si = h.createContext(null), u3 = ({
23524
23524
  h.useEffect(() => {
23525
23525
  I(i);
23526
23526
  }, [i]), h.useEffect(() => {
23527
- o(QA(fA()), SA(fA())), d(!0), a(V.SPENDING_VIEW);
23527
+ o(QA(fA()), BA(fA())), d(!0), a(V.SPENDING_VIEW);
23528
23528
  }, []);
23529
23529
  const f = (E) => {
23530
23530
  o(E[0], E[1]);
@@ -23715,8 +23715,8 @@ const i7 = (A) => A.reduce((i, n) => {
23715
23715
  view_transactions: "View Transactions"
23716
23716
  }, l7 = ({ onBackClick: A, sx: t }) => {
23717
23717
  const i = oe(), { onEvent: n } = K(), { isDesktop: r, isTablet: o, isMobile: I } = zA(), { accounts: a } = CA(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: d, getCategoryName: f } = qA(), { sortedTransactions: E } = PA(), { isInitialized: l, selectedAccounts: v, setSelectedAccounts: u } = pA(), { trends: H } = X(), P = i.palette.mode === "dark", [p, y] = h.useState(!1), [x, w] = h.useState(!1), [D, m] = h.useState("Chart"), [j, O] = h.useState(""), [T, tA] = h.useState({
23718
- start: ur(SA(Ne(/* @__PURE__ */ new Date(), 6)), 1),
23719
- end: SA(/* @__PURE__ */ new Date())
23718
+ start: ur(BA(Ne(/* @__PURE__ */ new Date(), 6)), 1),
23719
+ end: BA(/* @__PURE__ */ new Date())
23720
23720
  });
23721
23721
  h.useEffect(() => {
23722
23722
  u(a);
@@ -23764,7 +23764,7 @@ const i7 = (A) => A.reduce((i, n) => {
23764
23764
  O(bA);
23765
23765
  }, jA = (bA) => {
23766
23766
  O(bA), n(V.TRENDS_CLICK_LEGEND, { category: f(bA) });
23767
- }, kA = (bA) => {
23767
+ }, WA = (bA) => {
23768
23768
  n(V.TRENDS_HOVER_LEGEND, { category: f(bA) });
23769
23769
  }, fe = (bA) => {
23770
23770
  n(V.TRENDS_HOVER_AREA, { category: bA });
@@ -23870,7 +23870,7 @@ const i7 = (A) => A.reduce((i, n) => {
23870
23870
  {
23871
23871
  onClickLegend: jA,
23872
23872
  onHoverArea: fe,
23873
- onHoverLegend: kA,
23873
+ onHoverLegend: WA,
23874
23874
  onHoverPoint: Ie,
23875
23875
  stackedDatasets: Y.stackedDatasets,
23876
23876
  unstackedDatasets: Y.unstackedDatasets
@@ -23950,7 +23950,7 @@ export {
23950
23950
  NP as AccountsMiniWidget,
23951
23951
  MP as AccountsWidget,
23952
23952
  wI as ActivitySettings,
23953
- UA as ActivityStatus,
23953
+ SA as ActivityStatus,
23954
23954
  TA as ActivityType,
23955
23955
  Nd as AddAccountModal,
23956
23956
  rc as AnalyticsApi,
@@ -24150,7 +24150,7 @@ export {
24150
24150
  X as useGlobalCopyStore,
24151
24151
  oi as useGlobalStore,
24152
24152
  pA as useGlobalUiStore,
24153
- WA as useGoalStore,
24153
+ FA as useGoalStore,
24154
24154
  Yn as useHelpStore,
24155
24155
  Oc as useMerchantStore,
24156
24156
  Lc as useNetWorthStore,