@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,61 +1,62 @@
1
1
  import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
2
2
  import f, { useState as ee } from "react";
3
3
  import { observer as T } from "mobx-react-lite";
4
- import { addMonths as Xe } from "date-fns/addMonths";
4
+ import { addMonths as Ye } from "date-fns/addMonths";
5
5
  import { startOfToday as $ } from "date-fns/startOfToday";
6
- import I from "@mui/material/Box";
7
- import D from "@mui/material/Divider";
6
+ import D from "@mui/material/Box";
7
+ import v from "@mui/material/Divider";
8
8
  import s from "@mui/material/Stack";
9
9
  import le from "@mui/material/styles/useTheme";
10
- import { Text as u, P as N, Icon as j, InstitutionLogo as ye, H1 as ue, H2 as Ye } from "@mxenabled/mxui";
11
- import { G as Qe, v as he, u as O, q as de, d as Ne, b as X, j as q, g as ke, p as He, h as Fe, a as Ve } from "../hooks-D6XlXHf4.mjs";
12
- import { C as L } from "../CurrencyText-kyC1aseI.mjs";
10
+ import { Text as u, P as O, Icon as j, InstitutionLogo as ye, H1 as ue, H2 as Qe } from "@mxenabled/mxui";
11
+ import { G as Ve, t as he, u as N, p as de, d as Oe, b as X, j as q, g as ke, o as He, h as Fe, a as Ke } from "../hooks-ZMp65DFz.mjs";
12
+ import { C as L } from "../CurrencyText-Dr0EZ7bp.mjs";
13
13
  import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
14
14
  import { L as oe } from "../Loader-DUaFpDGv.mjs";
15
15
  import { I as fe } from "../CashflowStore-D9Dpuz7X.mjs";
16
- import { C as jn } from "../CashflowStore-D9Dpuz7X.mjs";
16
+ import { C as Bn } from "../CashflowStore-D9Dpuz7X.mjs";
17
17
  import { b as M } from "../Localization-2MODESHW.mjs";
18
- import { M as Ke } from "../MiniWidgetContainer-D0gfmbaF.mjs";
19
- import { E as Je } from "../EmptyState-DA_lfRBv.mjs";
20
- import { R as Ze } from "../RecurringSettings-A_rAGCTP.mjs";
21
- import et from "@mui/material/Tabs";
18
+ import { u as We } from "../useWidgetLoadTimer-hIOioiKx.mjs";
19
+ import { M as Je } from "../MiniWidgetContainer-Bg02sF1Y.mjs";
20
+ import { E as Ze } from "../EmptyState-DoxNUae-.mjs";
21
+ import { R as et } from "../RecurringSettings-B4ybrS0B.mjs";
22
+ import tt from "@mui/material/Tabs";
22
23
  import Ce from "@mui/material/Tab";
23
24
  import { getUnixTime as U } from "date-fns/getUnixTime";
24
25
  import ne from "@mui/material/List";
25
26
  import ae from "@mui/material/ListItem";
26
- import { A as tt } from "../AccountListItem-JFMZROh7.mjs";
27
- import { f as Y, D as Q } from "../Dialog-CWW597AF.mjs";
28
- import nt from "@mui/material/ListSubheader";
29
- import { f as te } from "../NumberFormatting-Buh7u8Oi.mjs";
30
- import { isAfter as We } from "date-fns/isAfter";
31
- import { isBefore as $e } from "date-fns/isBefore";
32
- import { isToday as Me } from "date-fns/isToday";
33
- import { addDays as Se } from "date-fns/addDays";
34
- import { alpha as ot, keyframes as at } from "@mui/material/styles";
35
- import { DataGridPro as it } from "@mui/x-data-grid-pro";
36
- import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
27
+ import { A as nt } from "../AccountListItem-DHrz8Mml.mjs";
28
+ import { f as Y, a as Q } from "../Dialog-BPTr3qHE.mjs";
29
+ import ot from "@mui/material/ListSubheader";
30
+ import { f as te } from "../NumberFormatting-DjTD0t3W.mjs";
31
+ import { isAfter as $e } from "date-fns/isAfter";
32
+ import { isBefore as Me } from "date-fns/isBefore";
33
+ import { isToday as Ge } from "date-fns/isToday";
34
+ import { addDays as we } from "date-fns/addDays";
35
+ import { alpha as at, keyframes as it } from "@mui/material/styles";
36
+ import { DataGridPro as rt } from "@mui/x-data-grid-pro";
37
+ import { T as Se } from "../TabContentContainer-j01JYR_7.mjs";
37
38
  import G from "@mui/material/Button";
38
- import { M as rt, S as st, i as ct, d as _e, c as lt } from "../ManageIncome-1s_q5W4X.mjs";
39
- import { D as Ge } from "../Drawer-kEE73B87.mjs";
40
- import { formatISO as dt } from "date-fns/formatISO";
39
+ import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-CaoQl609.mjs";
40
+ import { D as je } from "../Drawer-By9V-B5L.mjs";
41
+ import { formatISO as mt } from "date-fns/formatISO";
41
42
  import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
42
- import { startOfMonth as mt } from "date-fns/startOfMonth";
43
- import { subDays as je } from "date-fns/subDays";
44
- import { S as ut, b as ht } from "../TransactionDetails-oP1eSuiS.mjs";
45
- import { F as pt, R as De, e as ve } from "../RecurringTransactions-DK8dWldr.mjs";
46
- import { h as ft } from "../DateUtil-BcuH7ErC.mjs";
47
- import { endOfToday as gt } from "date-fns/endOfToday";
48
- import { W as Ae, A as Ee } from "../WidgetContainer-BHWANqT4.mjs";
49
- import { F as bt, A as B } from "../Fetch-87LIQbEA.mjs";
43
+ import { startOfMonth as ut } from "date-fns/startOfMonth";
44
+ import { subDays as ze } from "date-fns/subDays";
45
+ import { S as ht, c as pt } from "../TransactionDetails-m5PddMQn.mjs";
46
+ import { F as ft, R as De, e as ve } from "../RecurringTransactions-BqijW_8S.mjs";
47
+ import { h as gt } from "../DateUtil-CBdcsyuk.mjs";
48
+ import { endOfToday as bt } from "date-fns/endOfToday";
49
+ import { W as Ae, A as Ee } from "../WidgetContainer-CoFDmQRE.mjs";
50
+ import { F as xt, A as B } from "../Fetch-DecPFeGU.mjs";
50
51
  const V = () => {
51
- if (!f.useContext(Qe))
52
+ if (!f.useContext(Ve))
52
53
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
53
54
  return he().uiStore;
54
- }, xt = ({ remaining: a }) => {
55
- const { cashflow: n } = O();
55
+ }, yt = ({ remaining: a }) => {
56
+ const { cashflow: n } = N();
56
57
  return /* @__PURE__ */ o(P, { children: [
57
58
  /* @__PURE__ */ e(
58
- I,
59
+ D,
59
60
  {
60
61
  sx: {
61
62
  borderRadius: "1px",
@@ -68,35 +69,35 @@ const V = () => {
68
69
  /* @__PURE__ */ e(u, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
69
70
  /* @__PURE__ */ e(L, { amount: a, bold: !0, sx: { fontSize: 12 } })
70
71
  ] });
71
- }, ge = T(xt), yt = () => {
72
- const a = le(), { availableWidth: n } = de(), { isMobile: t } = pe(), { visibleCashAccounts: i, visibleCashBalance: g } = Ne(), { selectedAccounts: x, selectedAccountGuids: m, setSelectedAccounts: p } = X(), { cashflow: c } = O(), {
72
+ }, ge = T(yt), Ct = () => {
73
+ const a = le(), { availableWidth: n } = de(), { isMobile: t } = pe(), { visibleCashAccounts: i, visibleCashBalance: g } = Oe(), { selectedAccounts: x, selectedAccountGuids: m, setSelectedAccounts: p } = X(), { cashflow: c } = N(), {
73
74
  daysUntilNextIncome: r,
74
75
  expensesTilNextIncome: d,
75
76
  selectedCashAccounts: l,
76
77
  setNextIncome: b,
77
78
  setSelectedCashAccounts: C,
78
79
  setUpcomingExpenses: _
79
- } = V(), { isDataLoaded: k, nextIncomeRecurrence: v, upcomingExpenses: F } = q();
80
+ } = V(), { isDataLoaded: k, nextIncomeRecurrence: I, upcomingExpenses: F } = q();
80
81
  f.useEffect(() => {
81
82
  p(i);
82
83
  }, [i]), f.useEffect(() => {
83
84
  C(
84
- i.filter((w) => m.includes(w.guid))
85
+ i.filter((S) => m.includes(S.guid))
85
86
  );
86
87
  }, [i, x]), f.useEffect(() => {
87
- v && b(v), _(F);
88
- }, [v, F]);
88
+ I && b(I), _(F);
89
+ }, [I, F]);
89
90
  const h = f.useMemo(
90
- () => i.filter((w) => m.includes(w.guid)).reduce((w, z) => w + (z?.balance || 0), 0),
91
+ () => i.filter((S) => m.includes(S.guid)).reduce((S, z) => S + (z?.balance || 0), 0),
91
92
  [m, F]
92
- ), S = f.useMemo(
93
- () => d.filter((w) => m.includes(w.accountGuid || "")).reduce((w, z) => w + z.amount, 0),
93
+ ), w = f.useMemo(
94
+ () => d.filter((S) => m.includes(S.accountGuid || "")).reduce((S, z) => S + z.amount, 0),
94
95
  [m, d]
95
96
  ), A = f.useMemo(
96
- () => h - S,
97
- [h, S]
97
+ () => h - w,
98
+ [h, w]
98
99
  );
99
- return k ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
100
+ return k ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
100
101
  s,
101
102
  {
102
103
  border: `1px solid ${a.palette.border.light}`,
@@ -107,27 +108,27 @@ const V = () => {
107
108
  children: [
108
109
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
109
110
  /* @__PURE__ */ e(L, { amount: h, variant: "H2" }),
110
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: M(
111
+ /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: M(
111
112
  c.total_cash_accounts,
112
113
  l.length
113
114
  ) })
114
115
  ] }),
115
116
  /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "remove" }) }),
116
117
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
117
- /* @__PURE__ */ e(L, { amount: S, variant: "H2" }),
118
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: M(c.expenses_due, d.length) })
118
+ /* @__PURE__ */ e(L, { amount: w, variant: "H2" }),
119
+ /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: M(c.expenses_due, d.length) })
119
120
  ] }),
120
121
  /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "equal" }) }),
121
122
  /* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
122
123
  /* @__PURE__ */ e(L, { amount: A, variant: "H2" }),
123
124
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
124
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
125
+ /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
125
126
  /* @__PURE__ */ e(fe, { body: c.tooltip_body, title: c.tooltip_title })
126
127
  ] })
127
128
  ] }),
128
129
  /* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(P, { children: [
129
130
  /* @__PURE__ */ e(u, { variant: "H2", children: M(c.days, r) }),
130
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
131
+ /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
131
132
  ] }) })
132
133
  ]
133
134
  }
@@ -139,12 +140,12 @@ const V = () => {
139
140
  ) }),
140
141
  /* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "XSmall" })
141
142
  ] }),
142
- /* @__PURE__ */ e(D, {}),
143
+ /* @__PURE__ */ e(v, {}),
143
144
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
144
145
  /* @__PURE__ */ e(u, { variant: "Small", children: M(c.expenses_due, d.length) }),
145
- /* @__PURE__ */ e(L, { amount: S, bold: !0, symbol: "-", variant: "XSmall" })
146
+ /* @__PURE__ */ e(L, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
146
147
  ] }),
147
- /* @__PURE__ */ e(D, {}),
148
+ /* @__PURE__ */ e(v, {}),
148
149
  /* @__PURE__ */ e(
149
150
  s,
150
151
  {
@@ -159,35 +160,38 @@ const V = () => {
159
160
  children: /* @__PURE__ */ e(ge, { remaining: A })
160
161
  }
161
162
  ),
162
- /* @__PURE__ */ e(D, {}),
163
+ /* @__PURE__ */ e(v, {}),
163
164
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
164
165
  /* @__PURE__ */ e(u, { variant: "Small", children: c.next_paycheck }),
165
166
  /* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: M(c.days, r) })
166
167
  ] })
167
168
  ] }) }) : /* @__PURE__ */ e(oe, { height: t ? 210 : 120 });
168
- }, Ct = T(yt), St = ({
169
+ }, wt = T(Ct), St = ({
169
170
  onPrimaryCtaClick: a,
170
171
  onSecondaryCtaClick: n,
171
172
  sx: t = {}
172
173
  }) => {
173
- const { cashflow: i } = O(), { isCopyLoaded: g, isInitialized: x } = X(), { loadRepeatingTransactions: m, income: p, isDataLoaded: c, setDateRange: r } = q();
174
+ const { cashflow: i } = N(), { isCopyLoaded: g, isInitialized: x } = X(), { loadRepeatingTransactions: m, income: p, isDataLoaded: c, setDateRange: r } = q();
174
175
  f.useEffect(() => {
175
- x && (r({ start: $(), end: Xe($(), 1) }), m().finally());
176
- }, [x]);
176
+ x && (r({ start: $(), end: Ye($(), 1) }), m().finally());
177
+ }, [x]), We({
178
+ widgetName: "CashflowMiniWidget",
179
+ isLoaded: c
180
+ });
177
181
  const d = c && !p.length;
178
182
  return g ? /* @__PURE__ */ o(
179
- Ke,
183
+ Je,
180
184
  {
181
185
  className: "mx-exp-cashflow-miniwidget",
182
186
  onPrimaryCtaClick: a,
183
187
  primaryCtaLabel: i.primary_cta,
184
188
  subTitle: d || !c ? void 0 : i.sub_title,
185
- sx: t,
189
+ sx: { height: "100%", ...t },
186
190
  title: i.title,
187
191
  children: [
188
192
  !c && /* @__PURE__ */ e(oe, {}),
189
193
  c && (d ? /* @__PURE__ */ e(
190
- Je,
194
+ Ze,
191
195
  {
192
196
  header: i.create,
193
197
  icon: "local_atm",
@@ -196,11 +200,11 @@ const V = () => {
196
200
  primaryButtonStartIcon: "add",
197
201
  subText: i.create_description
198
202
  }
199
- ) : /* @__PURE__ */ e(Ct, {}))
203
+ ) : /* @__PURE__ */ e(wt, {}))
200
204
  ]
201
205
  }
202
206
  ) : /* @__PURE__ */ e(oe, {});
203
- }, Fn = T(St), wt = ({ remaining: a }) => /* @__PURE__ */ e(
207
+ }, $n = T(St), _t = ({ remaining: a }) => /* @__PURE__ */ e(
204
208
  ae,
205
209
  {
206
210
  sx: {
@@ -217,7 +221,7 @@ const V = () => {
217
221
  }
218
222
  );
219
223
  var ie = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(ie || {});
220
- const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
224
+ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
221
225
  /* @__PURE__ */ o(ae, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
222
226
  /* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
223
227
  /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.MONTH) }),
@@ -233,12 +237,12 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
233
237
  }
234
238
  )
235
239
  ] }),
236
- /* @__PURE__ */ e(D, {})
237
- ] }), Te = T(_t), It = ({ total: a, type: n }) => {
238
- const { cashflow: t } = O();
240
+ /* @__PURE__ */ e(v, {})
241
+ ] }), Te = T(It), Dt = ({ total: a, type: n }) => {
242
+ const { cashflow: t } = N();
239
243
  return /* @__PURE__ */ o(P, { children: [
240
244
  /* @__PURE__ */ o(
241
- nt,
245
+ ot,
242
246
  {
243
247
  sx: {
244
248
  alignItems: "center",
@@ -258,10 +262,10 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
258
262
  ]
259
263
  }
260
264
  ),
261
- /* @__PURE__ */ e(D, {})
265
+ /* @__PURE__ */ e(v, {})
262
266
  ] });
263
- }, Re = T(It), ce = (a, n) => (t) => t.accountGuid === a.guid && (Me(t.expectedDate) || We(t.expectedDate, n.start)) && $e(t.expectedDate, n.end), Dt = () => {
264
- const { availableWidth: a } = de(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: i } = q(), { dateRange: g, selectedCashAccounts: x } = V();
267
+ }, Re = T(Dt), ce = (a, n) => (t) => t.accountGuid === a.guid && (Ge(t.expectedDate) || $e(t.expectedDate, n.start)) && Me(t.expectedDate, n.end), vt = () => {
268
+ const { availableWidth: a } = de(), { cashflow: n } = N(), { upcomingExpenses: t, upcomingIncome: i } = q(), { dateRange: g, selectedCashAccounts: x } = V();
265
269
  return /* @__PURE__ */ o(s, { children: [
266
270
  /* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
267
271
  /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
@@ -293,7 +297,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
293
297
  },
294
298
  children: [
295
299
  /* @__PURE__ */ e(
296
- tt,
300
+ nt,
297
301
  {
298
302
  account: m,
299
303
  listItemProps: {
@@ -303,7 +307,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
303
307
  }
304
308
  }
305
309
  ),
306
- /* @__PURE__ */ e(D, {}),
310
+ /* @__PURE__ */ e(v, {}),
307
311
  p.length > 0 && /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
308
312
  ne,
309
313
  {
@@ -321,7 +325,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
321
325
  }
322
326
  ) }),
323
327
  /* @__PURE__ */ e(
324
- wt,
328
+ _t,
325
329
  {
326
330
  remaining: (m.available_balance || m.balance || 0) + r - d
327
331
  }
@@ -332,8 +336,8 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
332
336
  );
333
337
  }) })
334
338
  ] });
335
- }, vt = T(Dt), At = () => {
336
- const { availableWidth: a } = de(), n = le(), { cashflow: t } = O(), { upcomingExpenses: i, upcomingIncome: g } = q(), { dateRange: x, selectedCashAccounts: m } = V(), p = [
339
+ }, At = T(vt), Et = () => {
340
+ const { availableWidth: a } = de(), n = le(), { cashflow: t } = N(), { upcomingExpenses: i, upcomingIncome: g } = q(), { dateRange: x, selectedCashAccounts: m } = V(), p = [
337
341
  {
338
342
  field: "account",
339
343
  flex: 1.5,
@@ -393,9 +397,9 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
393
397
  }
394
398
  ], c = f.useMemo(() => m.map((r) => {
395
399
  const d = i.filter(
396
- ce(r, { start: $(), end: Se($(), 30) })
400
+ ce(r, { start: $(), end: we($(), 30) })
397
401
  ).reduce((C, _) => C + _.amount, 0), l = g.filter(
398
- ce(r, { start: $(), end: Se($(), 30) })
402
+ ce(r, { start: $(), end: we($(), 30) })
399
403
  ).reduce((C, _) => C + _.amount, 0), b = (r.balance || 0) + l - d;
400
404
  return {
401
405
  account: r,
@@ -407,7 +411,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
407
411
  };
408
412
  }), [m, i, g]);
409
413
  return /* @__PURE__ */ o(
410
- I,
414
+ D,
411
415
  {
412
416
  sx: {
413
417
  width: "100%"
@@ -450,7 +454,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
450
454
  }
451
455
  ),
452
456
  a > 650 ? /* @__PURE__ */ e(
453
- it,
457
+ rt,
454
458
  {
455
459
  columnHeaderHeight: 48,
456
460
  columns: p,
@@ -467,7 +471,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
467
471
  "& .MuiDataGrid-columnHeader .MuiIconButton-root": {
468
472
  color: n.palette.primary.main,
469
473
  "&:hover": {
470
- backgroundColor: ot(n.palette.primary.main, 0.1)
474
+ backgroundColor: at(n.palette.primary.main, 0.1)
471
475
  }
472
476
  },
473
477
  "& .MuiDataGrid-columnHeaderTitle": {
@@ -515,7 +519,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
515
519
  ]
516
520
  }
517
521
  ),
518
- /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
522
+ /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
519
523
  /* @__PURE__ */ o(
520
524
  s,
521
525
  {
@@ -530,7 +534,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
530
534
  ]
531
535
  }
532
536
  ),
533
- /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
537
+ /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
534
538
  /* @__PURE__ */ o(
535
539
  s,
536
540
  {
@@ -545,7 +549,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
545
549
  ]
546
550
  }
547
551
  ),
548
- /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
552
+ /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
549
553
  /* @__PURE__ */ e(
550
554
  s,
551
555
  {
@@ -568,15 +572,15 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
568
572
  ]
569
573
  }
570
574
  );
571
- }, Et = T(At), Tt = () => {
572
- const { cashflow: a } = O(), { isDesktop: n } = pe(), { onEvent: t } = ke(), [i, g] = f.useState(0), x = (m, p) => {
575
+ }, Tt = T(Et), Rt = () => {
576
+ const { cashflow: a } = N(), { isDesktop: n } = pe(), { onEvent: t } = ke(), [i, g] = f.useState(0), x = (m, p) => {
573
577
  g(p);
574
578
  };
575
579
  return f.useEffect(() => {
576
580
  t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
577
- }, [i]), /* @__PURE__ */ o(I, { children: [
581
+ }, [i]), /* @__PURE__ */ o(D, { children: [
578
582
  /* @__PURE__ */ o(
579
- et,
583
+ tt,
580
584
  {
581
585
  "aria-label": a.cashflow_summary_and_details,
582
586
  centered: !0,
@@ -610,11 +614,11 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
610
614
  ]
611
615
  }
612
616
  ),
613
- /* @__PURE__ */ e(I, { sx: { mb: 32 } }),
614
- /* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Et, {}) }) }),
615
- /* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(vt, {}) }) })
617
+ /* @__PURE__ */ e(D, { sx: { mb: 32 } }),
618
+ /* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Tt, {}) }) }),
619
+ /* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) })
616
620
  ] });
617
- }, Rt = T(Tt), se = ({
621
+ }, Lt = T(Rt), se = ({
618
622
  amount: a,
619
623
  isMobile: n = !1,
620
624
  isTotal: t = !1,
@@ -638,17 +642,17 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
638
642
  n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: g, variant: "Small" })
639
643
  ]
640
644
  }
641
- ), Le = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Me(t.expectedDate) || We(t.expectedDate, n.start)) && $e(t.expectedDate, n.end), Lt = () => {
642
- const { availableWidth: a } = de(), { cashflow: n } = O(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: x } = q(), { selectedAccountGuids: m } = X(), { dateRange: p, selectedCashAccounts: c } = V(), [r, d] = f.useState(!1), l = f.useMemo(
645
+ ), Le = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Ge(t.expectedDate) || $e(t.expectedDate, n.start)) && Me(t.expectedDate, n.end), Nt = () => {
646
+ const { availableWidth: a } = de(), { cashflow: n } = N(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: x } = q(), { selectedAccountGuids: m } = X(), { dateRange: p, selectedCashAccounts: c } = V(), [r, d] = f.useState(!1), l = f.useMemo(
643
647
  () => g.filter(Le(m, p)),
644
648
  [p, m, g]
645
649
  ), b = f.useMemo(
646
650
  () => x.filter(Le(m, p)),
647
651
  [p, m, x]
648
652
  ), C = f.useMemo(
649
- () => c.reduce((S, A) => S + (A?.balance || 0), 0),
653
+ () => c.reduce((w, A) => w + (A?.balance || 0), 0),
650
654
  [c]
651
- ), _ = l.reduce((S, A) => S + A.amount, 0), k = b.reduce((S, A) => S + A.amount, 0), v = C - _ + k, F = i && t.length > 0, h = a < 725;
655
+ ), _ = l.reduce((w, A) => w + A.amount, 0), k = b.reduce((w, A) => w + A.amount, 0), I = C - _ + k, F = i && t.length > 0, h = a < 725;
652
656
  return /* @__PURE__ */ o(s, { sx: { mx: h ? 16 : 0, my: h ? 24 : 42 }, children: [
653
657
  /* @__PURE__ */ o(
654
658
  s,
@@ -668,7 +672,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
668
672
  label: M(n.cash_and_bank, c.length)
669
673
  }
670
674
  ),
671
- h && /* @__PURE__ */ e(D, {}),
675
+ h && /* @__PURE__ */ e(v, {}),
672
676
  F ? /* @__PURE__ */ o(P, { children: [
673
677
  !h && /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
674
678
  /* @__PURE__ */ e(
@@ -689,7 +693,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
689
693
  children: n.add_income
690
694
  }
691
695
  ),
692
- h ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
696
+ h ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
693
697
  /* @__PURE__ */ e(
694
698
  se,
695
699
  {
@@ -699,11 +703,11 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
699
703
  symbol: h ? "-" : void 0
700
704
  }
701
705
  ),
702
- h ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
706
+ h ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
703
707
  /* @__PURE__ */ e(
704
708
  se,
705
709
  {
706
- amount: v,
710
+ amount: I,
707
711
  isMobile: h,
708
712
  isTotal: h,
709
713
  label: n.remaining_cash,
@@ -720,23 +724,23 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
720
724
  }
721
725
  ),
722
726
  /* @__PURE__ */ e(
723
- Ge,
727
+ je,
724
728
  {
725
729
  ariaLabelClose: n.close_manage_income_aria,
726
730
  isOpen: r,
727
731
  onClose: () => d(!1),
728
732
  shouldShowHeaderBorders: !1,
729
733
  title: n.manage_income,
730
- children: /* @__PURE__ */ e(rt, {})
734
+ children: /* @__PURE__ */ e(st, {})
731
735
  }
732
736
  )
733
737
  ] });
734
- }, Ot = T(Lt), Nt = ({ handleNextStep: a }) => {
735
- const { completeOnboarding: n } = he(), { cashflow: t } = O(), i = le();
738
+ }, Ot = T(Nt), kt = ({ handleNextStep: a }) => {
739
+ const { completeOnboarding: n } = he(), { cashflow: t } = N(), i = le();
736
740
  return /* @__PURE__ */ o(s, { children: [
737
741
  /* @__PURE__ */ e(ue, { pb: 12, children: t.welcome_title }),
738
742
  /* @__PURE__ */ e(
739
- Ye,
743
+ Qe,
740
744
  {
741
745
  color: i.palette.primary.light,
742
746
  pb: 8,
@@ -745,11 +749,11 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
745
749
  children: t.welcome_sub_title
746
750
  }
747
751
  ),
748
- /* @__PURE__ */ e(N, { pb: 32, children: t.welcome_description }),
752
+ /* @__PURE__ */ e(O, { pb: 32, children: t.welcome_description }),
749
753
  /* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
750
- /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
754
+ /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
751
755
  /* @__PURE__ */ e(
752
- I,
756
+ D,
753
757
  {
754
758
  bgcolor: i.palette.primary.lighter,
755
759
  borderRadius: 1,
@@ -763,9 +767,9 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
763
767
  ),
764
768
  t.bullet_one
765
769
  ] }),
766
- /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
770
+ /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
767
771
  /* @__PURE__ */ e(
768
- I,
772
+ D,
769
773
  {
770
774
  bgcolor: i.palette.primary.lighter,
771
775
  borderRadius: 1,
@@ -779,9 +783,9 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
779
783
  ),
780
784
  t.bullet_two
781
785
  ] }),
782
- /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
786
+ /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
783
787
  /* @__PURE__ */ e(
784
- I,
788
+ D,
785
789
  {
786
790
  bgcolor: i.palette.primary.lighter,
787
791
  borderRadius: 1,
@@ -801,67 +805,67 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
801
805
  /* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
802
806
  ] })
803
807
  ] });
804
- }, kt = T(Nt), Oe = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", ze = {
805
- CASHFLOW_ONBOARDING: `${Oe}/cashflow-onboarding.png`,
806
- CASHFLOW_LOADING_ANIMATION: `${Oe}/loading-animation.gif`
807
- }, Ht = () => {
808
- const { cashflow: a } = O();
808
+ }, Ht = T(kt), Ne = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Be = {
809
+ CASHFLOW_ONBOARDING: `${Ne}/cashflow-onboarding.png`,
810
+ CASHFLOW_LOADING_ANIMATION: `${Ne}/loading-animation.gif`
811
+ }, Ft = () => {
812
+ const { cashflow: a } = N();
809
813
  return /* @__PURE__ */ o(f.Fragment, { children: [
810
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: ze.CASHFLOW_LOADING_ANIMATION }) }),
814
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Be.CASHFLOW_LOADING_ANIMATION }) }),
811
815
  /* @__PURE__ */ e(ue, { pb: 12, children: a.loading_title }),
812
- /* @__PURE__ */ e(N, { children: a.loading_description })
816
+ /* @__PURE__ */ e(O, { children: a.loading_description })
813
817
  ] });
814
- }, Ft = T(Ht), Wt = at`
818
+ }, Wt = T(Ft), $t = it`
815
819
  from {
816
820
  transform: rotate(0deg);
817
821
  }
818
822
  to {
819
823
  transform: rotate(360deg);
820
824
  }
821
- `, $t = () => {
822
- const { addRepeatingTransaction: a, repeatingTransactions: n } = q(), { cashflow: t, common: i } = O(), { user: g } = He(), { completeOnboarding: x } = he(), { isDirty: m } = V(), { isMobile: p } = pe(), { isCopyLoaded: c, setDisplayedDate: r } = X(), { filter: d, setFilter: l, transactions: b } = Fe(), C = le(), [_, k] = ee(!0), [v, F] = f.useState(pt.EveryMonth), [h, S] = f.useState(1), [A, w] = f.useState(15), [z, re] = ee(!1), [K, J] = ee(1), [R, me] = ee([]), [Z, H] = ee(""), W = f.useMemo(
825
+ `, Mt = () => {
826
+ const { addRepeatingTransaction: a, repeatingTransactions: n } = q(), { cashflow: t, common: i } = N(), { user: g } = He(), { completeOnboarding: x } = he(), { isDirty: m } = V(), { isMobile: p } = pe(), { isCopyLoaded: c, setDisplayedDate: r } = X(), { filter: d, setFilter: l, transactions: b } = Fe(), C = le(), [_, k] = ee(!0), [I, F] = f.useState(ft.EveryMonth), [h, w] = f.useState(1), [A, S] = f.useState(15), [z, re] = ee(!1), [K, J] = ee(1), [R, me] = ee([]), [Z, H] = ee(""), W = f.useMemo(
823
827
  () => b.find((y) => y.guid === Z),
824
828
  [Z, b]
825
- ), Be = !!n.filter(
829
+ ), Ue = !!n.filter(
826
830
  (y) => y.repeating_transaction_type === De.Income
827
831
  ).length, be = async () => {
828
832
  J(2), r(
829
833
  // Beginning of the month, 90 days before today
830
- mt(je($(), 90)),
834
+ ut(ze($(), 90)),
831
835
  $()
832
836
  ), l({ ...d, custom: _e }), J(3);
833
- }, Ue = async () => {
837
+ }, Pe = async () => {
834
838
  if (!(R.length < 1)) {
835
839
  re(!0);
836
840
  for (let y = 0; y < R.length; y++) {
837
- const E = R[y], xe = ve(v, Ie(E.date)), qe = {
841
+ const E = R[y], xe = ve(I, Ie(E.date)), Xe = {
838
842
  account_guid: E.account_guid,
839
843
  amount: E.amount,
840
844
  created_by: 0,
841
845
  //user
842
846
  merchant_guid: E.merchant_guid,
843
847
  description: E.feed_description || E.description,
844
- predicted_occurs_on: dt(xe, { representation: "date" }),
848
+ predicted_occurs_on: mt(xe, { representation: "date" }),
845
849
  recurrence_day: xe.getDay(),
846
- recurrence_type: v,
850
+ recurrence_type: I,
847
851
  repeating_transaction_type: De.Income,
848
852
  second_recurrence_day: A,
849
853
  transaction_type: E.transaction_type,
850
854
  user_guid: g.guid
851
855
  };
852
- await a(qe, E);
856
+ await a(Xe, E);
853
857
  }
854
858
  await x();
855
859
  }
856
- }, Pe = !W && _ || !W && R.length < 1;
860
+ }, qe = !W && _ || !W && R.length < 1;
857
861
  return c ? /* @__PURE__ */ o(
858
- I,
862
+ D,
859
863
  {
860
864
  sx: {
861
865
  display: "flex",
862
866
  alignItems: p ? "flex-start" : "center",
863
867
  backgroundColor: C.palette.background.paper,
864
- backgroundImage: p ? null : `url(${ze.CASHFLOW_ONBOARDING})`,
868
+ backgroundImage: p ? null : `url(${Be.CASHFLOW_ONBOARDING})`,
865
869
  backgroundRepeat: "no-repeat",
866
870
  backgroundPosition: "left 100px",
867
871
  backgroundSize: "35%",
@@ -869,42 +873,42 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
869
873
  },
870
874
  children: [
871
875
  K === 1 && /* @__PURE__ */ e(
872
- I,
876
+ D,
873
877
  {
874
878
  sx: {
875
879
  ...p ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
876
880
  },
877
- children: /* @__PURE__ */ e(kt, { handleNextStep: be })
881
+ children: /* @__PURE__ */ e(Ht, { handleNextStep: be })
878
882
  }
879
883
  ),
880
884
  K === 2 && /* @__PURE__ */ e(
881
- I,
885
+ D,
882
886
  {
883
887
  sx: {
884
888
  ...p ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
885
889
  },
886
- children: /* @__PURE__ */ e(Ft, {})
890
+ children: /* @__PURE__ */ e(Wt, {})
887
891
  }
888
892
  ),
889
893
  K === 3 && /* @__PURE__ */ o(
890
- I,
894
+ D,
891
895
  {
892
896
  sx: {
893
897
  ...p ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
894
898
  },
895
899
  children: [
896
900
  /* @__PURE__ */ e(ue, { pb: 12, children: t.add_income_title }),
897
- /* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
901
+ /* @__PURE__ */ e(O, { mb: 24, children: t.add_income_description }),
898
902
  R.length > 0 && !W && /* @__PURE__ */ o(P, { children: [
899
903
  /* @__PURE__ */ e(ne, { children: R.map((y, E) => /* @__PURE__ */ o(f.Fragment, { children: [
900
- /* @__PURE__ */ e(ut, { bgcolor: "background.paper", children: ft(
904
+ /* @__PURE__ */ e(ht, { bgcolor: "background.paper", children: gt(
901
905
  U(y.nextDate || y.date)
902
906
  ) }),
903
- /* @__PURE__ */ e(ht, { transaction: y }),
904
- E !== R.length - 1 && /* @__PURE__ */ e(D, {})
907
+ /* @__PURE__ */ e(pt, { transaction: y }),
908
+ E !== R.length - 1 && /* @__PURE__ */ e(v, {})
905
909
  ] }, y.guid)) }),
906
910
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
907
- /* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
911
+ /* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
908
912
  /* @__PURE__ */ e(
909
913
  G,
910
914
  {
@@ -915,30 +919,30 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
915
919
  )
916
920
  ] })
917
921
  ] }),
918
- Pe && /* @__PURE__ */ e(
919
- st,
922
+ qe && /* @__PURE__ */ e(
923
+ ct,
920
924
  {
921
925
  bgcolor: "background.paper",
922
926
  onSearch: (y) => l({
923
927
  ...d,
924
- custom: (E) => y ? ct(E, y) : _e(E)
928
+ custom: (E) => y ? lt(E, y) : _e(E)
925
929
  }),
926
930
  onSelected: (y) => {
927
931
  H(y), k(!1);
928
932
  }
929
933
  }
930
934
  ),
931
- !Be && m && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
935
+ !Ue && m && /* @__PURE__ */ e(O, { color: "error", mt: 16, children: t.confirm_error }),
932
936
  W && /* @__PURE__ */ o(P, { children: [
933
937
  /* @__PURE__ */ e(
934
- lt,
938
+ dt,
935
939
  {
936
940
  bgcolor: "background.paper",
937
941
  firstDay: h,
938
- frequency: v,
939
- onFirstDayChange: S,
942
+ frequency: I,
943
+ onFirstDayChange: w,
940
944
  onFrequencyChange: F,
941
- onSecondDayChange: w,
945
+ onSecondDayChange: S,
942
946
  secondDay: A,
943
947
  transaction: W
944
948
  }
@@ -952,8 +956,8 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
952
956
  const y = [...R];
953
957
  y.push({
954
958
  ...W,
955
- nextDate: ve(v, Ie(W.date)),
956
- frequency: v
959
+ nextDate: ve(I, Ie(W.date)),
960
+ frequency: I
957
961
  }), me(y), H("");
958
962
  },
959
963
  variant: "contained",
@@ -977,13 +981,13 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
977
981
  G,
978
982
  {
979
983
  "aria-disabled": R.length < 1 || z,
980
- onClick: Ue,
984
+ onClick: Pe,
981
985
  startIcon: z ? /* @__PURE__ */ e(
982
986
  j,
983
987
  {
984
988
  name: "progress_activity",
985
989
  sx: {
986
- animation: `${Wt} 2s linear infinite`
990
+ animation: `${$t} 2s linear infinite`
987
991
  }
988
992
  }
989
993
  ) : null,
@@ -999,35 +1003,38 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
999
1003
  ]
1000
1004
  }
1001
1005
  ) : /* @__PURE__ */ e(oe, {});
1002
- }, Mt = T($t), Gt = ({ onBackClick: a, sx: n = {} }) => {
1006
+ }, Gt = T(Mt), jt = ({ onBackClick: a, sx: n = {} }) => {
1003
1007
  const {
1004
1008
  selectedAccounts: t,
1005
1009
  selectedAccountGuids: i,
1006
1010
  setSelectedAccounts: g,
1007
1011
  shouldDisableNextDate: x,
1008
1012
  shouldDisablePrevDate: m
1009
- } = X(), { onEvent: p } = ke(), { clientConfig: c } = Ve(), { visibleCashAccounts: r } = Ne(), { setFilter: d } = Fe(), { userProfile: l } = He(), { dateRange: b, setSelectedCashAccounts: C } = V(), { loadRepeatingTransactions: _, income: k, isDataLoaded: v, setDateRange: F } = q(), { cashflow: h, recurring: S } = O(), { isCopyLoaded: A, isInitialized: w } = X(), re = c?.master?.deep_link_params?.view === "manage_income", [K, J] = f.useState(re);
1013
+ } = X(), { onEvent: p } = ke(), { clientConfig: c } = Ke(), { visibleCashAccounts: r } = Oe(), { setFilter: d } = Fe(), { userProfile: l } = He(), { dateRange: b, setSelectedCashAccounts: C } = V(), { loadRepeatingTransactions: _, income: k, isDataLoaded: I, setDateRange: F } = q(), { cashflow: h, recurring: w } = N(), { isCopyLoaded: A, isInitialized: S } = X(), re = c?.master?.deep_link_params?.view === "manage_income", [K, J] = f.useState(re);
1010
1014
  f.useEffect(() => {
1011
- w && (F(b), _().finally());
1012
- }, [w]), f.useEffect(() => {
1015
+ S && (F(b), _().finally());
1016
+ }, [S]), f.useEffect(() => {
1013
1017
  g(r);
1014
1018
  }, [r]), f.useEffect(() => {
1015
1019
  const me = r.map((H) => H.guid), Z = t.filter(
1016
1020
  (H) => i.includes(H.guid) && me.includes(H.guid)
1017
1021
  );
1018
1022
  C(Z), d({
1019
- dateRange: { start: je($(), 90), end: gt() },
1023
+ dateRange: { start: ze($(), 90), end: bt() },
1020
1024
  accounts: Z.map((H) => H.guid)
1021
1025
  });
1022
- }, [r, t]);
1023
- const R = v && !l?.has_completed_cash_flow_onboarding && !k.length;
1024
- return !A || !w ? /* @__PURE__ */ e(oe, {}) : R ? /* @__PURE__ */ e(
1026
+ }, [r, t]), We({
1027
+ widgetName: "CashflowWidget",
1028
+ isLoaded: I
1029
+ });
1030
+ const R = I && !l?.has_completed_cash_flow_onboarding && !k.length;
1031
+ return !A || !S ? /* @__PURE__ */ e(oe, {}) : R ? /* @__PURE__ */ e(
1025
1032
  Ae,
1026
1033
  {
1027
1034
  onBackClick: a,
1028
1035
  sx: { height: "100%", overflow: "auto" },
1029
1036
  title: h.title,
1030
- children: /* @__PURE__ */ e(Mt, {})
1037
+ children: /* @__PURE__ */ e(Gt, {})
1031
1038
  }
1032
1039
  ) : /* @__PURE__ */ o(
1033
1040
  Ae,
@@ -1035,7 +1042,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
1035
1042
  accountOptions: r,
1036
1043
  actions: [
1037
1044
  {
1038
- label: S.action_title,
1045
+ label: w.action_title,
1039
1046
  iconName: "credit_card_gear",
1040
1047
  onClick: () => {
1041
1048
  J(!0), p(Ee.CASH_FLOW_CLICK_SETTINGS);
@@ -1057,26 +1064,26 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
1057
1064
  title: h.title,
1058
1065
  children: [
1059
1066
  /* @__PURE__ */ e(Ot, {}),
1060
- /* @__PURE__ */ e(Rt, {}),
1067
+ /* @__PURE__ */ e(Lt, {}),
1061
1068
  /* @__PURE__ */ e(
1062
- Ge,
1069
+ je,
1063
1070
  {
1064
1071
  ariaLabelClose: h.close_settings_aria,
1065
1072
  isOpen: K,
1066
1073
  onClose: () => J(!1),
1067
1074
  shouldShowHeaderBorders: !1,
1068
- title: S.action_title,
1069
- children: /* @__PURE__ */ e(Ze, { defaultSelectedTab: re ? 1 : 0 })
1075
+ title: w.action_title,
1076
+ children: /* @__PURE__ */ e(et, { defaultSelectedTab: re ? 1 : 0 })
1070
1077
  }
1071
1078
  )
1072
1079
  ]
1073
1080
  }
1074
1081
  );
1075
- }, Wn = T(Gt);
1076
- class $n {
1082
+ }, Mn = T(jt);
1083
+ class Gn {
1077
1084
  fetchInstance;
1078
1085
  constructor(n, t, i) {
1079
- this.fetchInstance = new bt(n, t, void 0, i);
1086
+ this.fetchInstance = new xt(n, t, void 0, i);
1080
1087
  }
1081
1088
  addCashflowEvent = async (n) => this.fetchInstance.post(B.CASHFLOW_EVENTS, { ...n }).then((t) => t);
1082
1089
  addCashflowSequence = async (n) => this.fetchInstance.post(B.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
@@ -1093,9 +1100,9 @@ class $n {
1093
1100
  updateCashflowSequence = async (n) => this.fetchInstance.put(`${B.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1094
1101
  }
1095
1102
  export {
1096
- $n as CashflowApi,
1097
- Fn as CashflowMiniWidget,
1098
- Mt as CashflowOnboarding,
1099
- jn as CashflowStore,
1100
- Wn as CashflowWidget
1103
+ Gn as CashflowApi,
1104
+ $n as CashflowMiniWidget,
1105
+ Gt as CashflowOnboarding,
1106
+ Bn as CashflowStore,
1107
+ Mn as CashflowWidget
1101
1108
  };