@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.0.0-alpha.mega1

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.
Files changed (203) hide show
  1. package/CHANGELOG.md +178 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CitErkuS.mjs} +89 -82
  4. package/dist/AccountDetailsHeader-BkG3MNYo.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-zCMqet85.mjs} +6 -6
  6. package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DHrz8Mml.mjs} +9 -9
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-LgfBcYMe.mjs} +112 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-BmZXkL0C.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +23 -21
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BkvlItWx.mjs} +11 -11
  16. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-itK0R3wV.mjs} +2 -2
  18. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  19. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  20. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-Bq-aPy-5.mjs} +1 -1
  21. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  22. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  23. package/dist/Drawer-By9V-B5L.mjs +178 -0
  24. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  25. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
  26. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  27. package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
  28. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-1P19goZ7.mjs} +112 -152
  29. package/dist/{Help-B6dIcujh.mjs → Help-Ea3BlXQp.mjs} +2 -2
  30. package/dist/LineChart-KpPw1phO.mjs +580 -0
  31. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BxTkF6Tz.mjs} +10 -10
  32. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-CaoQl609.mjs} +91 -88
  33. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  34. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  35. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  36. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-rC0q7P7t.mjs} +2 -2
  37. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-uzM8tCoH.mjs} +236 -231
  38. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
  39. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  40. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +4 -4
  41. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-B4ybrS0B.mjs} +4 -4
  42. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BqijW_8S.mjs} +49 -48
  43. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +26 -29
  44. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
  45. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DQ1b9uqq.mjs} +11 -13
  46. package/dist/SpendingLegend-CDO060GT.mjs +193 -0
  47. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  48. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  49. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  50. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  51. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  52. package/dist/{User-BQUxBeZV.mjs → User-Cnlegl1N.mjs} +2 -2
  53. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +711 -728
  54. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CoFDmQRE.mjs} +4 -4
  55. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  56. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  57. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  58. package/dist/accounts/index.es.js +245 -235
  59. package/dist/accounts/stores/AccountStore.d.ts +24 -25
  60. package/dist/accounts/utils/Accounts.d.ts +1 -2
  61. package/dist/analytics/index.es.js +2 -2
  62. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  63. package/dist/budgets/index.es.js +611 -580
  64. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  65. package/dist/cashflow/index.es.js +187 -180
  66. package/dist/categories/index.es.js +2 -2
  67. package/dist/categories/stores/CategoryStore.d.ts +2 -5
  68. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  69. package/dist/common/components/Select.d.ts +4 -2
  70. package/dist/common/components/charts/LineChart.d.ts +12 -2
  71. package/dist/common/components/charts/index.d.ts +0 -3
  72. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  73. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  74. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  75. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  76. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  77. package/dist/common/components/drawer/Footer.d.ts +17 -0
  78. package/dist/common/hooks/index.d.ts +1 -0
  79. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  80. package/dist/common/index.es.js +397 -387
  81. package/dist/common/stores/AppDataStore.d.ts +1 -3
  82. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  83. package/dist/common/stores/GlobalStore.d.ts +10 -4
  84. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  85. package/dist/common/stores/UserStore.d.ts +2 -3
  86. package/dist/common/types/Account.d.ts +6 -9
  87. package/dist/common/types/Finstrong.d.ts +54 -0
  88. package/dist/common/types/Global.d.ts +1 -0
  89. package/dist/common/types/Widgets.d.ts +1 -0
  90. package/dist/common/types/index.d.ts +1 -1
  91. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  92. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  93. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  94. package/dist/dashboard/index.es.js +90 -88
  95. package/dist/debts/index.es.js +458 -448
  96. package/dist/exportTransactionsToCSV-DuAaI5XA.mjs +48 -0
  97. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  98. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  99. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  100. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  101. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  102. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  103. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  104. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  105. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  106. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  107. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  108. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  109. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  110. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  111. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  112. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  113. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  114. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  115. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  116. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  117. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  118. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  119. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  120. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  121. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  122. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  123. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  124. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  125. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  126. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  127. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  128. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  129. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  130. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  131. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  132. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  133. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  134. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +24 -0
  135. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  136. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  137. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  138. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  139. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  140. package/dist/finstrong/constants/index.d.ts +9 -0
  141. package/dist/finstrong/index.es.js +3190 -1073
  142. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  143. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  144. package/dist/goals/index.es.js +302 -291
  145. package/dist/goals/stores/GoalStore.d.ts +4 -17
  146. package/dist/help/index.es.js +13 -9
  147. package/dist/{hooks-D6XlXHf4.mjs → hooks-ZMp65DFz.mjs} +12 -12
  148. package/dist/insights/index.es.js +1 -1
  149. package/dist/investments/index.es.js +108 -104
  150. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  151. package/dist/merchants/index.es.js +2 -2
  152. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  153. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  154. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  155. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  156. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  157. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  158. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  159. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  160. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  161. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  162. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  163. package/dist/microinsights/constants/App.d.ts +0 -1
  164. package/dist/microinsights/index.d.ts +4 -3
  165. package/dist/microinsights/index.es.js +101 -14
  166. package/dist/microinsights/interfaces.d.ts +0 -6
  167. package/dist/networth/index.es.js +197 -190
  168. package/dist/notifications/index.es.js +25 -25
  169. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  170. package/dist/recurringtransactions/index.es.js +395 -351
  171. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
  172. package/dist/settings/index.es.js +307 -298
  173. package/dist/spending/index.es.js +299 -438
  174. package/dist/spending/utils/SpendingData.d.ts +2 -1
  175. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  176. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  177. package/dist/transactions/index.es.js +115 -112
  178. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  179. package/dist/trends/components/TrendsTable.d.ts +0 -2
  180. package/dist/trends/index.es.js +1025 -604
  181. package/dist/trends/utils/TrendsData.d.ts +1 -0
  182. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  183. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
  184. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  185. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  186. package/package.json +4 -4
  187. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  188. package/dist/Accounts-BRf_YeTf.mjs +0 -27
  189. package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
  190. package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
  191. package/dist/Drawer-kEE73B87.mjs +0 -113
  192. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  193. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  194. package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
  195. package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
  196. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  197. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  198. package/dist/TransactionStore-ai3uII_r.mjs +0 -690
  199. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  200. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  201. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  202. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  203. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,6 +1,6 @@
1
1
  import { makeAutoObservable as c, observable as f, runInAction as h } from "mobx";
2
2
  import { fromUnixTime as o, isSameDay as d } from "date-fns";
3
- import { F as l, A as a } from "./Fetch-87LIQbEA.mjs";
3
+ import { F as l, A as a } from "./Fetch-DecPFeGU.mjs";
4
4
  class s {
5
5
  fetchInstance;
6
6
  constructor(t, i, n) {
@@ -33,7 +33,7 @@ class A {
33
33
  api = new s("/", "");
34
34
  isLoading = !0;
35
35
  notifications = [];
36
- notificationsLoaded = !1;
36
+ recentNotifications = [];
37
37
  constructor(t) {
38
38
  this.globalStore = t, this.api = new s(
39
39
  t.endpoint,
@@ -45,27 +45,19 @@ class A {
45
45
  get newNotifications() {
46
46
  return this.recentNotifications.filter((t) => !t.has_been_viewed);
47
47
  }
48
- get recentNotifications() {
49
- return u(this.notifications);
50
- }
51
- setNotifications = (t) => {
52
- this.notifications = t, this.notificationsLoaded = !0;
53
- };
54
48
  loadNotifications = async () => {
55
- this.isLoading = !0;
56
49
  try {
50
+ this.isLoading = !0;
57
51
  const t = await this.api.getNotifications();
58
- this.setNotifications(t);
59
- } catch (t) {
60
- console.error(`Error occurred while loading notifications: ${t}`);
61
- } finally {
62
52
  h(() => {
63
- this.isLoading = !1;
53
+ this.notifications = t, this.recentNotifications = u(t), this.isLoading = !1;
64
54
  });
55
+ } catch (t) {
56
+ console.error(`Error occurred while loading notifications: ${t}`);
65
57
  }
66
58
  };
67
59
  markAllAsViewed = async () => {
68
- this.notifications.forEach((t) => t.has_been_viewed = !0), await this.api.markAllAsViewed(), await this.loadNotifications();
60
+ this.notifications.forEach((t) => t.has_been_viewed = !0), await this.api.markAllAsViewed();
69
61
  };
70
62
  updateNotification = async (t) => {
71
63
  t.has_been_viewed = !0, await this.api.updateNotification(t);
@@ -1,22 +1,22 @@
1
1
  import o from "numeral";
2
2
  import { g as a } from "./Localization-2MODESHW.mjs";
3
- const p = 9999999999e-2;
3
+ const D = 9999999999e-2;
4
4
  var c = /* @__PURE__ */ ((t) => (t.CAD = "CAD", t.USD = "USD", t))(c || {});
5
- const w = (t, r, e) => {
5
+ const h = (t, r, e) => {
6
6
  const s = [], l = (r - t) / (e - 1);
7
7
  for (let n = 0; n < e; n++) {
8
8
  const i = t + n * l;
9
9
  s.push(i);
10
10
  }
11
- return s[e - 1] = r, s;
12
- }, $ = (t, r, e) => {
11
+ return s[e - 1] = r, s.map(Math.round);
12
+ }, w = (t, r, e) => {
13
13
  switch (a()) {
14
14
  case "fr-ca":
15
15
  return o(t).format(`${r} $`, e);
16
16
  default:
17
17
  return o(t).format(`$${r}`, e);
18
18
  }
19
- }, h = () => {
19
+ }, $ = () => {
20
20
  switch (a()) {
21
21
  case "fr-ca":
22
22
  return c.CAD;
@@ -38,11 +38,11 @@ const w = (t, r, e) => {
38
38
  };
39
39
  export {
40
40
  c as C,
41
- p as M,
41
+ D as M,
42
42
  N as a,
43
43
  P as b,
44
- w as c,
45
- $ as f,
46
- h as g,
44
+ h as c,
45
+ w as f,
46
+ $ as g,
47
47
  f as i
48
48
  };
@@ -2,10 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import _ from "react";
3
3
  import { observer as p } from "mobx-react-lite";
4
4
  import v from "@mui/material/TextField";
5
- import { L as y } from "./ListItemAction-DHa3KJPs.mjs";
6
- import { u as h, l as b } from "./hooks-D6XlXHf4.mjs";
7
- import { a as T, f as S } from "./NumberFormatting-Buh7u8Oi.mjs";
8
- import { C as f } from "./CurrencyInput-DUsQbkXb.mjs";
5
+ import { L as y } from "./ListItemAction-BxTkF6Tz.mjs";
6
+ import { u as h, l as b } from "./hooks-ZMp65DFz.mjs";
7
+ import { a as T, f as S } from "./NumberFormatting-DjTD0t3W.mjs";
8
+ import { C as f } from "./CurrencyInput-itK0R3wV.mjs";
9
9
  const F = p(({ goal: e }) => {
10
10
  const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
11
11
  const n = { ...e, interest_rate: t };
@@ -7,10 +7,10 @@ import b from "@mui/material/Tabs";
7
7
  import d from "@mui/material/Divider";
8
8
  import R from "@mui/material/List";
9
9
  import T from "@mui/material/Stack";
10
- import { R as C, A as S, a as E, M as v } from "./ManageIncome-1s_q5W4X.mjs";
11
- import { u as _, j as A, g as f } from "./hooks-D6XlXHf4.mjs";
12
- import { R as y, F as N } from "./RecurringTransactions-DK8dWldr.mjs";
13
- import { A as m } from "./WidgetContainer-BHWANqT4.mjs";
10
+ import { R as C, A as S, a as E, M as v } from "./ManageIncome-CaoQl609.mjs";
11
+ import { u as _, j as A, g as f } from "./hooks-ZMp65DFz.mjs";
12
+ import { R as y, F as N } from "./RecurringTransactions-BqijW_8S.mjs";
13
+ import { A as m } from "./WidgetContainer-CoFDmQRE.mjs";
14
14
  const I = h(() => {
15
15
  const { recurring: g } = _(), { repeatingTransactions: n } = A(), { onEvent: o } = f(), l = (r) => {
16
16
  o(m.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
@@ -17,7 +17,7 @@ import { formatISO as H } from "date-fns/formatISO";
17
17
  import { fromUnixTime as V } from "date-fns/fromUnixTime";
18
18
  import { getUnixTime as y } from "date-fns/getUnixTime";
19
19
  import { isAfter as h } from "date-fns/isAfter";
20
- import { isBefore as i } from "date-fns/isBefore";
20
+ import { isBefore as u } from "date-fns/isBefore";
21
21
  import { isSameDay as X } from "date-fns/isSameDay";
22
22
  import { nextDay as E } from "date-fns/nextDay";
23
23
  import { parseISO as J } from "date-fns/parseISO";
@@ -29,9 +29,9 @@ import { subQuarters as N } from "date-fns/subQuarters";
29
29
  import { subYears as T } from "date-fns/subYears";
30
30
  import { lastDayOfMonth as q } from "date-fns/lastDayOfMonth";
31
31
  import { setDayOfYear as F } from "date-fns/setDayOfYear";
32
- import { g as R, a as ee, b as te, c as re, d as oe, e as ae, f as ne } from "./DateUtil-BcuH7ErC.mjs";
33
- import { b as W } from "./NumberFormatting-Buh7u8Oi.mjs";
34
- import { f as v, D as k } from "./Dialog-CWW597AF.mjs";
32
+ import { g as R, a as ee, b as te, c as re, d as oe, e as ae, f as ne } from "./DateUtil-CBdcsyuk.mjs";
33
+ import { b as W } from "./NumberFormatting-DjTD0t3W.mjs";
34
+ import { f as v, a as k } from "./Dialog-BPTr3qHE.mjs";
35
35
  import { b as l } from "./Localization-2MODESHW.mjs";
36
36
  var s = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(s || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}), O = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(O || {}), Y = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Subscription = 1] = "Subscription", e[e.Bill = 2] = "Bill", e[e.Income = 3] = "Income", e[e.Transfer = 4] = "Transfer", e))(Y || {});
37
37
  const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
@@ -51,22 +51,23 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
51
51
  o,
52
52
  /* @__PURE__ */ d(C, { children: /* @__PURE__ */ d(I, { name: "chevron_right", size: 24 }) })
53
53
  ] }) }) : /* @__PURE__ */ d(w, { disableGutters: !1, disablePadding: !1, children: o });
54
- }, Fe = se, Re = ({ label: e, onChange: a, options: t, value: n }) => /* @__PURE__ */ d(
54
+ }, Fe = se, Re = ({ label: e, onChange: a, options: t, value: n, ...o }) => /* @__PURE__ */ d(
55
55
  j,
56
56
  {
57
57
  InputLabelProps: { shrink: !0 },
58
58
  SelectProps: {
59
- IconComponent: (r) => /* @__PURE__ */ d(z, { size: 20, sx: { mr: 4 }, ...r })
59
+ IconComponent: (c) => /* @__PURE__ */ d(z, { size: 20, sx: { mr: 4 }, ...c })
60
60
  },
61
61
  defaultValue: 0,
62
62
  label: e,
63
- onChange: (r) => {
64
- a(Number(r.target.value));
63
+ onChange: (c) => {
64
+ a(Number(c.target.value));
65
65
  },
66
66
  select: !0,
67
67
  value: n,
68
68
  variant: "outlined",
69
- children: t.map((r) => /* @__PURE__ */ d($, { value: r.id, children: r.label }, r.id))
69
+ ...o,
70
+ children: t.map((c) => /* @__PURE__ */ d($, { value: c.id, children: c.label }, c.id))
70
71
  }
71
72
  ), ce = (e) => {
72
73
  if (!e) return "";
@@ -93,93 +94,93 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
93
94
  status: p.Upcoming,
94
95
  type: e.repeating_transaction_type === Y.Income ? O.Income : O.Expense,
95
96
  transaction: void 0
96
- }, u = a.start, c = a.end;
97
+ }, c = a.start, i = a.end;
97
98
  switch (e.recurrence_type) {
98
99
  case s.EveryWeek:
99
- t.push(...ue(r, u, c));
100
+ t.push(...ue(r, c, i));
100
101
  break;
101
102
  case s.EveryOtherWeek:
102
- t.push(...de(r, u, c));
103
+ t.push(...de(r, c, i));
103
104
  break;
104
105
  case s.TwiceAMonth:
105
- t.push(...me(r, u, c));
106
+ t.push(...me(r, c, i));
106
107
  break;
107
108
  case s.EveryMonth:
108
- t.push(...le(r, u, c));
109
+ t.push(...le(r, c, i));
109
110
  break;
110
111
  case s.EveryOtherMonth:
111
- t.push(...he(r, u, c));
112
+ t.push(...he(r, c, i));
112
113
  break;
113
114
  case s.EveryQuarter:
114
- t.push(...fe(r, u, c));
115
+ t.push(...fe(r, c, i));
115
116
  break;
116
117
  case s.EveryOtherQuarter:
117
- t.push(...pe(r, u, c));
118
+ t.push(...pe(r, c, i));
118
119
  break;
119
120
  case s.EveryYear:
120
- t.push(...ye(r, u, c));
121
+ t.push(...ye(r, c, i));
121
122
  break;
122
123
  }
123
124
  for (const m of t) {
124
125
  const _ = e.transactions.find(
125
126
  (x) => x.repeating_transaction_guid === e.guid && x.date > y(D(m.expectedDate, 5)) && x.date < y(Q(m.expectedDate, 5))
126
127
  );
127
- _ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = V(_.date)) : i(m.expectedDate, D(b(), 3)) && (m.status = p.Missed);
128
+ _ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = V(_.date)) : u(m.expectedDate, D(b(), 3)) && (m.status = p.Missed);
128
129
  }
129
130
  return t;
130
131
  }, ue = (e, a, t) => {
131
132
  const n = [];
132
133
  let o = E(a, e.recurrenceDay);
133
- for (; i(o, t); )
134
+ for (; u(o, t); )
134
135
  n.push({ ...e, expectedDate: o }), o = E(o, e.recurrenceDay);
135
136
  return n;
136
137
  }, de = (e, a, t) => {
137
138
  const n = [], o = e.expectedDate;
138
- if (i(o, t)) {
139
+ if (u(o, t)) {
139
140
  let r = D(o, 14);
140
141
  for (; h(r, a) || X(r, a); )
141
142
  n.push({ ...e, expectedDate: r }), r = D(r, 14);
142
- for (r = o; h(r, a) && i(r, t); )
143
+ for (r = o; h(r, a) && u(r, t); )
143
144
  n.push({ ...e, expectedDate: r }), r = Q(r, 14);
144
145
  }
145
146
  return n;
146
147
  }, me = (e, a, t) => {
147
148
  const n = [];
148
149
  let o = g(a, e.recurrenceDay);
149
- for (; i(o, t); )
150
+ for (; u(o, t); )
150
151
  n.push({ ...e, expectedDate: o }), o = f(o, 1);
151
152
  let r = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? g(a, e.secondRecurrenceDay) : q(a);
152
- for (; i(r, t); )
153
+ for (; u(r, t); )
153
154
  n.push({ ...e, expectedDate: r }), r = f(r, 1);
154
155
  return n;
155
156
  }, le = (e, a, t) => {
156
157
  const n = [];
157
158
  let o = g(a, e.recurrenceDay);
158
- for (n.push({ ...e, expectedDate: o }), o = f(o, 1); i(o, t); )
159
+ for (n.push({ ...e, expectedDate: o }), o = f(o, 1); u(o, t); )
159
160
  n.push({ ...e, expectedDate: o }), o = f(o, 1);
160
161
  return n;
161
162
  }, he = (e, a, t) => {
162
163
  const n = [], o = e.expectedDate;
163
- let r = i(o, t) ? o : Z(o, 2);
164
- for (; i(r, t); )
164
+ let r = u(o, t) ? o : Z(o, 2);
165
+ for (; u(r, t); )
165
166
  h(r, a) && n.push({ ...e, expectedDate: r }), r = f(r, 2);
166
167
  return n;
167
168
  }, fe = (e, a, t) => {
168
169
  const n = [], o = e.expectedDate;
169
- let r = i(o, t) ? o : N(o, 1);
170
- for (; i(r, t); )
170
+ let r = u(o, t) ? o : N(o, 1);
171
+ for (; u(r, t); )
171
172
  h(r, a) && n.push({ ...e, expectedDate: r }), r = A(r, 1);
172
173
  return n;
173
174
  }, pe = (e, a, t) => {
174
175
  const n = [], o = e.expectedDate;
175
- let r = i(o, t) ? o : N(o, 2);
176
- for (; i(r, t); )
176
+ let r = u(o, t) ? o : N(o, 2);
177
+ for (; u(r, t); )
177
178
  h(r, a) && n.push({ ...e, expectedDate: r }), r = A(r, 2);
178
179
  return n;
179
180
  }, ye = (e, a, t) => {
180
181
  const n = [], o = e.expectedDate;
181
- let r = i(o, t) ? o : T(o, 1);
182
- for (; i(r, t); )
182
+ let r = u(o, t) ? o : T(o, 1);
183
+ for (; u(r, t); )
183
184
  h(r, a) && n.push({ ...e, expectedDate: r }), r = K(r, 1);
184
185
  return n;
185
186
  }, et = (e, a) => {
@@ -195,11 +196,11 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
195
196
  const n = [];
196
197
  for (const o of a) {
197
198
  const r = t.filter(
198
- (u) => u.repeating_transaction_guid === o.guid
199
+ (c) => c.repeating_transaction_guid === o.guid
199
200
  );
200
201
  t.length > 0 && n.push({
201
202
  ...o,
202
- account: e.find((u) => u.guid === o.account_guid),
203
+ account: e.find((c) => c.guid === o.account_guid),
203
204
  transactions: r
204
205
  });
205
206
  }
@@ -214,41 +215,41 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
214
215
  recurrences: [t]
215
216
  }), a;
216
217
  }, []), ot = (e, a, t) => {
217
- const n = E(b(), a.recurrence_day), o = F(b(), a.recurrence_day), r = W(a.recurrence_day), u = a.second_recurrence_day ? W(a.second_recurrence_day) : "";
218
- let c = t ? l(e.monthly_ordinal, r) : e.monthly;
218
+ const n = E(b(), a.recurrence_day), o = F(b(), a.recurrence_day), r = W(a.recurrence_day), c = a.second_recurrence_day ? W(a.second_recurrence_day) : "";
219
+ let i = t ? l(e.monthly_ordinal, r) : e.monthly;
219
220
  switch (a.recurrence_type) {
220
221
  case s.EveryQuarter:
221
- c = t ? l(e.quarterly_ordinal, r) : e.quarterly;
222
+ i = t ? l(e.quarterly_ordinal, r) : e.quarterly;
222
223
  break;
223
224
  case s.EveryWeek:
224
- c = t ? l(
225
+ i = t ? l(
225
226
  e.weekly_ordinal,
226
227
  v(n, k.DAY_OF_WEEK)
227
228
  ) : e.weekly;
228
229
  break;
229
230
  case s.EveryYear:
230
- c = t ? l(
231
+ i = t ? l(
231
232
  e.anually_ordinal,
232
233
  v(o, k.MONTH_DAY)
233
234
  ) : e.anually;
234
235
  break;
235
236
  case s.EveryOtherWeek:
236
- c = t ? l(
237
+ i = t ? l(
237
238
  e.every_other_week_ordinal,
238
239
  v(n, k.DAY_OF_WEEK)
239
240
  ) : e.every_other_week;
240
241
  break;
241
242
  case s.EveryOtherMonth:
242
- c = t ? l(e.every_other_month_ordinal, r) : e.every_other_month;
243
+ i = t ? l(e.every_other_month_ordinal, r) : e.every_other_month;
243
244
  break;
244
245
  case s.EveryOtherQuarter:
245
- c = t ? l(e.every_other_quarter_ordinal, r) : e.every_other_quarter;
246
+ i = t ? l(e.every_other_quarter_ordinal, r) : e.every_other_quarter;
246
247
  break;
247
248
  case s.TwiceAMonth:
248
- c = t ? l(e.twice_a_month_ordinal, r, u) : e.twice_a_month;
249
+ i = t ? l(e.twice_a_month_ordinal, r, c) : e.twice_a_month;
249
250
  break;
250
251
  }
251
- return c;
252
+ return i;
252
253
  }, at = (e, a) => {
253
254
  let t = a;
254
255
  switch (e) {
@@ -281,10 +282,10 @@ export {
281
282
  s as F,
282
283
  Y as R,
283
284
  Re as S,
284
- tt as a,
285
+ p as a,
285
286
  et as b,
286
- p as c,
287
- O as d,
287
+ O as c,
288
+ tt as d,
288
289
  at as e,
289
290
  rt as f,
290
291
  ot as g
@@ -1,14 +1,14 @@
1
- import { makeAutoObservable as R, runInAction as o } from "mobx";
2
- import { endOfMonth as f } from "date-fns/endOfMonth";
1
+ import { makeAutoObservable as f, runInAction as i } from "mobx";
2
+ import { endOfMonth as R } from "date-fns/endOfMonth";
3
3
  import { isAfter as p } from "date-fns/isAfter";
4
4
  import { isBefore as I } from "date-fns/isBefore";
5
5
  import { isSameDay as g } from "date-fns/isSameDay";
6
6
  import { isWithinInterval as m } from "date-fns/isWithinInterval";
7
7
  import { startOfMonth as S } from "date-fns/startOfMonth";
8
- import { startOfToday as i } from "date-fns/startOfToday";
8
+ import { startOfToday as c } from "date-fns/startOfToday";
9
9
  import { subDays as y } from "date-fns/subDays";
10
- import { F as x, A as c } from "./Fetch-87LIQbEA.mjs";
11
- import { a as u, b as E, c as a, d } from "./RecurringTransactions-DK8dWldr.mjs";
10
+ import { F as x, A as o } from "./Fetch-DecPFeGU.mjs";
11
+ import { b as E, a, c as d, d as u } from "./RecurringTransactions-BqijW_8S.mjs";
12
12
  var A = /* @__PURE__ */ ((r) => (r.Small = "small", r.Medium = "medium", r.Large = "large", r))(A || {});
13
13
  const U = 44;
14
14
  class h {
@@ -16,42 +16,36 @@ class h {
16
16
  constructor(e, t, n) {
17
17
  this.fetchInstance = new x(e, t, void 0, n);
18
18
  }
19
- addRepeatingTransaction = async (e) => this.fetchInstance.post(c.REPEATING_TRANSACTIONS, e).then((t) => t.repeating_transaction);
20
- getRepeatingTransactions = async () => this.fetchInstance.get(c.REPEATING_TRANSACTIONS).then((e) => e.repeating_transactions);
19
+ addRepeatingTransaction = async (e) => this.fetchInstance.post(o.REPEATING_TRANSACTIONS, e).then((t) => t.repeating_transaction);
20
+ getRepeatingTransactions = async () => this.fetchInstance.get(o.REPEATING_TRANSACTIONS).then((e) => e.repeating_transactions);
21
21
  updateRepeatingTransaction = async (e) => this.fetchInstance.put(
22
- `${c.REPEATING_TRANSACTIONS}/${e.guid}`,
22
+ `${o.REPEATING_TRANSACTIONS}/${e.guid}`,
23
23
  e
24
24
  ).then((t) => t.repeating_transaction);
25
- deleteRepeatingTransaction = async (e) => this.fetchInstance.delete(`${c.REPEATING_TRANSACTIONS}/${e}`).then((t) => t);
25
+ deleteRepeatingTransaction = async (e) => this.fetchInstance.delete(`${o.REPEATING_TRANSACTIONS}/${e}`).then((t) => t);
26
26
  }
27
27
  const l = (r, e) => m(e.expectedDate, r), s = (r, e) => r + e.amount;
28
28
  class C {
29
29
  globalStore;
30
30
  api = new h("/", "");
31
+ transactions = [];
31
32
  repeatingTransactions = [];
32
- isDataLoaded = !1;
33
33
  selectedDay;
34
- dateRange = { start: S(i()), end: f(i()) };
34
+ dateRange = { start: S(c()), end: R(c()) };
35
+ isDataLoaded = !1;
35
36
  constructor(e) {
36
37
  this.globalStore = e, this.api = new h(
37
38
  e.endpoint,
38
39
  e.sessionToken,
39
40
  e.onError
40
- ), R(this);
41
- }
42
- get detailedRepeatingTransactions() {
43
- return u(
44
- this.globalStore.accountStore.visibleAccounts,
45
- this.repeatingTransactions,
46
- this.globalStore.transactionStore.transactions
47
- );
41
+ ), f(this);
48
42
  }
49
43
  /**
50
44
  * Returns all recurrences built from repeating transactions and filtered by accounts.
51
45
  */
52
46
  get recurrences() {
53
47
  const e = this.globalStore.accountStore.visibleAccounts;
54
- return E(this.detailedRepeatingTransactions, this.dateRange).filter((t) => e.some((n) => n.guid === t.accountGuid && !n.is_excluded_from_accounts)).filter((t) => m(t.expectedDate, this.dateRange));
48
+ return E(this.repeatingTransactions, this.dateRange).filter((t) => e.some((n) => n.guid === t.accountGuid && !n.is_excluded_from_accounts)).filter((t) => m(t.expectedDate, this.dateRange));
55
49
  }
56
50
  /**
57
51
  * Returns all recurrences that have occurred in the past, including those that are paid or missed
@@ -67,7 +61,7 @@ class C {
67
61
  */
68
62
  get upcomingRecurrences() {
69
63
  return this.recurrences.filter(
70
- (e) => p(e.expectedDate, y(i(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
64
+ (e) => p(e.expectedDate, y(c(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
71
65
  );
72
66
  }
73
67
  /**
@@ -103,7 +97,7 @@ class C {
103
97
  );
104
98
  }
105
99
  get nextIncomeRecurrence() {
106
- return this.upcomingIncome.find((e) => p(e.expectedDate, i()));
100
+ return this.upcomingIncome.find((e) => p(e.expectedDate, c()));
107
101
  }
108
102
  /**
109
103
  * Returns the expense recurrences for the current month.
@@ -171,9 +165,6 @@ class C {
171
165
  (e) => this.selectedDay && g(e.occurredOnDate || e.expectedDate, this.selectedDay)
172
166
  );
173
167
  }
174
- setRepeatingTransactions = (e) => {
175
- this.repeatingTransactions = e, this.isDataLoaded = !0;
176
- };
177
168
  /**
178
169
  * Set the date range for filtering recurrences.
179
170
  * @param dateRange - The date range to set.
@@ -192,7 +183,13 @@ class C {
192
183
  loadRepeatingTransactions = async () => {
193
184
  try {
194
185
  const e = await this.api.getRepeatingTransactions();
195
- this.setRepeatingTransactions(e);
186
+ i(() => {
187
+ this.repeatingTransactions = u(
188
+ this.globalStore.accountStore.visibleAccounts,
189
+ e,
190
+ this.globalStore.transactionStore.transactions
191
+ ), this.isDataLoaded = !0;
192
+ });
196
193
  } catch (e) {
197
194
  console.error(`Error occurred while getting repeating transactions: ${e}`);
198
195
  }
@@ -208,7 +205,7 @@ class C {
208
205
  await this.globalStore.transactionStore.updateTransaction({
209
206
  ...t,
210
207
  repeating_transaction_guid: n.guid
211
- }), o(() => {
208
+ }), i(() => {
212
209
  this.repeatingTransactions = [
213
210
  ...this.repeatingTransactions,
214
211
  ...u(
@@ -228,7 +225,7 @@ class C {
228
225
  */
229
226
  deleteRepeatingTransaction = async (e) => {
230
227
  try {
231
- await this.api.deleteRepeatingTransaction(e), o(() => {
228
+ await this.api.deleteRepeatingTransaction(e), i(() => {
232
229
  this.repeatingTransactions = [
233
230
  ...this.repeatingTransactions.filter((t) => t.guid !== e)
234
231
  ];
@@ -247,7 +244,7 @@ class C {
247
244
  (T) => T.guid === t.guid
248
245
  );
249
246
  if (n < 0) return;
250
- o(() => {
247
+ i(() => {
251
248
  this.repeatingTransactions = [
252
249
  ...this.repeatingTransactions.slice(0, n),
253
250
  ...u(
@@ -1,7 +1,7 @@
1
1
  import { makeAutoObservable as N, runInAction as l } from "mobx";
2
- import { F as D, A as r } from "./Fetch-87LIQbEA.mjs";
3
- import { B as f, A as n, I as i } from "./ToggleListItem-r0Kx56wF.mjs";
4
- import { T as m } from "./TransactionApi-B3Tksf7L.mjs";
2
+ import { F as D, A as r } from "./Fetch-DecPFeGU.mjs";
3
+ import { B as f, A as n, I as i } from "./ToggleListItem-ciFTiqRS.mjs";
4
+ import { T as m } from "./TransactionApi-CjBoLleL.mjs";
5
5
  class y {
6
6
  fetchInstance;
7
7
  constructor(e, t, o) {
@@ -3,9 +3,9 @@ import { isBefore as d } from "date-fns/isBefore";
3
3
  import { startOfMonth as _ } from "date-fns/startOfMonth";
4
4
  import { subMonths as y } from "date-fns/subMonths";
5
5
  import { endOfMonth as M } from "date-fns/endOfMonth";
6
- import { b as n, P as l } from "./Category-CevNQ03n.mjs";
7
- import { f as m, D as T } from "./Dialog-CWW597AF.mjs";
8
- const i = (e) => (e.top_level_category_guid === n.INCOME || e.category_guid === n.INCOME) && !h(e), C = (e) => !i(e) && !f(e), p = (e) => l.includes(e.top_level_category_guid) || l.includes(e.category_guid), f = (e) => e.top_level_category_guid === n.TRANSFER || e.category_guid === n.TRANSFER, h = (e) => e.top_level_category_guid === n.INVESTMENTS || e.category_guid === n.INVESTMENTS, N = (e) => !i(e) && !p(e) && !f(e) && !h(e), w = (e) => e.filter((r) => r.category_guid === r.top_level_category_guid), F = (e, r) => {
6
+ import { b as a, P as l } from "./Category-CevNQ03n.mjs";
7
+ import { f as m, a as T } from "./Dialog-BPTr3qHE.mjs";
8
+ const i = (e) => (e.top_level_category_guid === a.INCOME || e.category_guid === a.INCOME) && !h(e), C = (e) => !i(e) && !f(e), p = (e) => l.includes(e.top_level_category_guid) || l.includes(e.category_guid), f = (e) => e.top_level_category_guid === a.TRANSFER || e.category_guid === a.TRANSFER, h = (e) => e.top_level_category_guid === a.INVESTMENTS || e.category_guid === a.INVESTMENTS, N = (e) => !i(e) && !p(e) && !f(e) && !h(e), w = (e) => e.filter((r) => r.category_guid === r.top_level_category_guid), F = (e, r) => {
9
9
  if (r === 0) return 0;
10
10
  const o = (e - r) / r;
11
11
  return isNaN(o) ? 0 : o;
@@ -16,7 +16,7 @@ const i = (e) => (e.top_level_category_guid === n.INCOME || e.category_guid ===
16
16
  for (; d(t, s); )
17
17
  o.push({
18
18
  x: m(t, T.MONTH_SHORT),
19
- y: e.filter((a) => a.year === t.getFullYear() && a.month === t.getMonth() + 1).reduce((a, c) => a + c.total, 0)
19
+ y: e.filter((n) => n.year === t.getFullYear() && n.month === t.getMonth() + 1).reduce((n, c) => n + c.total, 0)
20
20
  }), t = u(t, 1);
21
21
  return o;
22
22
  }, b = (e, r) => {
@@ -30,26 +30,24 @@ const i = (e) => (e.top_level_category_guid === n.INCOME || e.category_guid ===
30
30
  return g(o, r);
31
31
  }, H = (e) => {
32
32
  const r = [], o = e.filter(
33
- (a) => a.top_level_category_guid !== n.INCOME && a.top_level_category_guid !== n.TRANSFER && a.total > 0
33
+ (n) => n.top_level_category_guid !== a.INCOME && n.top_level_category_guid !== a.TRANSFER && n.total > 0
34
34
  );
35
35
  let t = _(y(/* @__PURE__ */ new Date(), 5));
36
36
  const s = M(/* @__PURE__ */ new Date());
37
37
  for (; d(t, s); )
38
38
  r.push({
39
39
  x: m(t, T.MONTH_SHORT),
40
- y: o.filter((a) => a.year === t.getFullYear() && a.month === t.getMonth() + 1).reduce((a, c) => a + c.total, 0)
40
+ y: o.filter((n) => n.year === t.getFullYear() && n.month === t.getMonth() + 1).reduce((n, c) => n + c.total, 0)
41
41
  }), t = u(t, 1);
42
42
  return r;
43
43
  };
44
44
  export {
45
45
  A as a,
46
46
  x as b,
47
- f as c,
48
- w as d,
49
- C as e,
50
- i as f,
47
+ w as c,
48
+ i as d,
49
+ H as e,
50
+ F as f,
51
51
  b as g,
52
- H as h,
53
- h as i,
54
- F as j
52
+ C as i
55
53
  };