@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,81 +1,80 @@
1
- import { G as R } from "../useCombineEvents-BUDIR1ba.mjs";
2
- import { A as ss, a as rs, u as os, b as as } from "../useCombineEvents-BUDIR1ba.mjs";
3
- import { F as y, A as h } from "../Fetch-87LIQbEA.mjs";
4
- import { B as is } from "../BeatApi-DhJpgCLz.mjs";
5
- import { C as et } from "../CategoryStore-yHI0hWmK.mjs";
6
- import { a as ds } from "../CategoryStore-yHI0hWmK.mjs";
7
- import { N as st } from "../NotificationStore-BxP_P2dA.mjs";
8
- import { a as us } from "../NotificationStore-BxP_P2dA.mjs";
9
- import { T as rt } from "../User-BQUxBeZV.mjs";
10
- import { C as gs, b as ps, L as ms, a as _s } from "../User-BQUxBeZV.mjs";
1
+ import { G as $ } from "../useCombineEvents-CRwX-qWE.mjs";
2
+ import { A as rs, a as os, u as as, b as ns } from "../useCombineEvents-CRwX-qWE.mjs";
3
+ import { F as S, A as h } from "../Fetch-DecPFeGU.mjs";
4
+ import { B as cs } from "../BeatApi-De2IaqH2.mjs";
5
+ import { C as et } from "../CategoryStore-CA3tS1BO.mjs";
6
+ import { a as ls } from "../CategoryStore-CA3tS1BO.mjs";
7
+ import { N as st } from "../NotificationStore-CDX_kqHa.mjs";
8
+ import { a as hs } from "../NotificationStore-CDX_kqHa.mjs";
9
+ import { T as rt } from "../User-Cnlegl1N.mjs";
10
+ import { C as ps, b as ms, L as _s, a as fs } from "../User-Cnlegl1N.mjs";
11
11
  import { H as ot } from "../Help-DhcC-C05.mjs";
12
- import { E as ys } from "../Help-DhcC-C05.mjs";
13
- import { M as bs } from "../MicroWidgetContainer-DpeqN9n3.mjs";
14
- import { M as xs } from "../MiniWidgetContainer-D0gfmbaF.mjs";
15
- import { A as Ds, D as As, W as vs } from "../WidgetContainer-BHWANqT4.mjs";
16
- import { k as Ts, a as Bs, h as Is, j as Ns, A as Ms, i as Ls, l as ks, C as $s, n as Rs, E as Os, M as Ps, N as Us, c as Hs, P as Gs, o as Fs, S as Ws } from "../ConnectDrawer-BQNs-hjk.mjs";
17
- import { C as Ys } from "../CurrencyInput-DUsQbkXb.mjs";
12
+ import { E as Ss } from "../Help-DhcC-C05.mjs";
13
+ import { M as ws } from "../MicroWidgetContainer-r6mtxRer.mjs";
14
+ import { M as Cs } from "../MiniWidgetContainer-Bg02sF1Y.mjs";
15
+ import { A as Ds, D as As, W as Es } from "../WidgetContainer-CoFDmQRE.mjs";
16
+ import { k as Bs, a as Is, e as Ns, h as Ms, A as $s, f as ks, l as Rs, d as Us, n as Ps, E as Os, j as Ls, N as Gs, i as Hs, P as Fs, o as Ws, S as qs } from "../ConnectDrawer-BkvlItWx.mjs";
17
+ import { C as Qs } from "../CurrencyInput-itK0R3wV.mjs";
18
18
  import { L as Xs } from "../Loader-DUaFpDGv.mjs";
19
19
  import { R as Ks } from "../ResponsiveButton-DZFp78fJ.mjs";
20
- import { S as Vs } from "../SearchBox-B2_zLv8-.mjs";
21
- import { T as at } from "../TransactionStore-ai3uII_r.mjs";
22
- import { S as Js } from "../TransactionStore-ai3uII_r.mjs";
23
- import { T as er } from "../TabContentContainer-j01JYR_7.mjs";
24
- import { I as rr } from "../IconBacking-B9oC6uL2.mjs";
25
- import { D as ar, F as nr, c as ir, d as cr, R as dr, S as lr } from "../RecurringTransactions-DK8dWldr.mjs";
20
+ import { S as Zs } from "../SearchBox-B2_zLv8-.mjs";
21
+ import { T as at } from "../TransactionStore-PRlwE-TF.mjs";
22
+ import { S as tr } from "../TransactionStore-PRlwE-TF.mjs";
23
+ import { T as sr } from "../TabContentContainer-j01JYR_7.mjs";
24
+ import { I as or } from "../IconBacking-B9oC6uL2.mjs";
25
+ import { D as nr, F as ir, a as cr, c as dr, R as lr, S as ur } from "../RecurringTransactions-BqijW_8S.mjs";
26
26
  import { C as nt } from "../CashflowStore-D9Dpuz7X.mjs";
27
- import { I as hr } from "../CashflowStore-D9Dpuz7X.mjs";
28
- import { d as it } from "../GoalStore-D-aB35SY.mjs";
29
- import { C as pr, G as mr, M as _r, T as fr } from "../GoalStore-D-aB35SY.mjs";
30
- import { C as Sr } from "../CurrencyText-kyC1aseI.mjs";
31
- import { E as wr } from "../EmptyState-DA_lfRBv.mjs";
32
- import { L as Cr } from "../ListItemAction-DHa3KJPs.mjs";
33
- import { T as ct } from "../TrendsStore-DCYbpXPO.mjs";
34
- import { L as Ar, S as vr } from "../TrendsStore-DCYbpXPO.mjs";
35
- import { A as Tr, B as Br, I as Ir, N as Nr, T as Mr, a as Lr } from "../ToggleListItem-r0Kx56wF.mjs";
36
- import { jsxs as f, jsx as n } from "react/jsx-runtime";
27
+ import { I as gr } from "../CashflowStore-D9Dpuz7X.mjs";
28
+ import { d as it } from "../GoalStore-1P19goZ7.mjs";
29
+ import { C as mr, G as _r, M as fr, T as yr } from "../GoalStore-1P19goZ7.mjs";
30
+ import { C as br } from "../CurrencyText-Dr0EZ7bp.mjs";
31
+ import { E as xr } from "../EmptyState-DoxNUae-.mjs";
32
+ import { L as vr } from "../ListItemAction-BxTkF6Tz.mjs";
33
+ import { T as ct } from "../TrendsStore-yO7qYv97.mjs";
34
+ import { L as Ar } from "../TrendsStore-yO7qYv97.mjs";
35
+ import { A as Tr, B as Br, I as Ir, N as Nr, T as Mr, a as $r } from "../ToggleListItem-ciFTiqRS.mjs";
36
+ import { jsxs as y, jsx as n } from "react/jsx-runtime";
37
37
  import dt, { useRef as lt, useEffect as ut } from "react";
38
38
  import { css as x, keyframes as ht } from "@mxenabled/cssinjs";
39
39
  import { useTokens as C, Text as B } from "@mxenabled/mxui";
40
- import { D as $r } from "../Donut-oaQFlbit.mjs";
41
- import { L as Or } from "../LineChart-D4GI7nVh.mjs";
42
- import { S as Ur } from "../StatusBar-BK_uYHAB.mjs";
43
- import { D as Gr, a as Fr, O as Wr, b as qr, f as Yr } from "../Dialog-CWW597AF.mjs";
40
+ import { S as Rr } from "../StatusBar-BK_uYHAB.mjs";
41
+ import { a as Pr, D as Or, O as Lr, b as Gr, f as Hr } from "../Dialog-BPTr3qHE.mjs";
44
42
  import { D as gt, a as pt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
45
- import { S as Xr } from "../SingleSegmentDonut-BgbLgwHi.mjs";
46
- import { D as Kr } from "../Drawer-kEE73B87.mjs";
47
- import { I as Vr, P as Zr, S as Jr } from "../Account-Bxw0_4FU.mjs";
43
+ import { S as Wr } from "../SingleSegmentDonut-BgbLgwHi.mjs";
44
+ import { D as Yr } from "../Drawer-By9V-B5L.mjs";
45
+ import { I as zr, P as Xr, S as jr } from "../Account-CvR2-dSR.mjs";
48
46
  import { b as E } from "../Category-CevNQ03n.mjs";
49
- import { C as eo, c as so, a as ro, P as oo } from "../Category-CevNQ03n.mjs";
50
- import { C as no, f as io, b as co, a as lo, g as uo, i as ho } from "../NumberFormatting-Buh7u8Oi.mjs";
51
- import { R as mt } from "../RecurringTransactionsStore-C4YOD7_D.mjs";
52
- import { S as po, T as mo } from "../RecurringTransactionsStore-C4YOD7_D.mjs";
53
- import { G as fo, C as yo, D as So, W as bo, d as wo, a as xo, i as Co, v as Do, m as Ao, y as vo, z as Eo, g as To, x as Bo, u as Io, f as No, b as Mo, l as Lo, A as ko, t as $o, n as Ro, c as Oo, r as Po, o as Uo, B as Ho, j as Go, s as Fo, h as Wo, w as qo, p as Yo, q as Qo } from "../hooks-D6XlXHf4.mjs";
54
- import { u as jo } from "../useAccountDisplayName-BUAApBIb.mjs";
55
- import { u as zo } from "../useInsightsEnabled-DBpwEq10.mjs";
56
- import { u as Zo } from "../useScreenSize-B6JyS_Lj.mjs";
57
- import { makeAutoObservable as _, runInAction as S, reaction as _t } from "mobx";
58
- import { a as ft } from "../AccountStore-BgNOyMdp.mjs";
59
- import yt from "posthog-js";
60
- import { B as St } from "../BeatStore-IBnXd4YK.mjs";
47
+ import { C as Vr, c as Zr, a as Jr, P as to } from "../Category-CevNQ03n.mjs";
48
+ import { C as so, f as ro, b as oo, a as ao, g as no, i as io } from "../NumberFormatting-DjTD0t3W.mjs";
49
+ import { R as mt } from "../RecurringTransactionsStore-BhBUVm9a.mjs";
50
+ import { S as lo, T as uo } from "../RecurringTransactionsStore-BhBUVm9a.mjs";
51
+ import { G as go, C as po, D as mo, W as _o, d as fo, a as yo, i as So, t as bo, m as wo, w as xo, x as Co, g as vo, z as Do, u as Ao, f as Eo, b as To, l as Bo, A as Io, s as No, y as Mo, c as $o, q as ko, n as Ro, B as Uo, j as Po, r as Oo, h as Lo, v as Go, o as Ho, p as Fo } from "../hooks-ZMp65DFz.mjs";
52
+ import { u as qo } from "../useAccountDisplayName-B7iXTNM8.mjs";
53
+ import { u as Qo } from "../useInsightsEnabled-B7dxpDrX.mjs";
54
+ import { u as Xo } from "../useScreenSize-B6JyS_Lj.mjs";
55
+ import { u as Ko } from "../useWidgetLoadTimer-hIOioiKx.mjs";
56
+ import { makeAutoObservable as f, runInAction as p, reaction as _t, autorun as ft } from "mobx";
57
+ import { a as yt } from "../AccountStore-LgfBcYMe.mjs";
58
+ import St from "posthog-js";
59
+ import { B as bt } from "../BeatStore-D_NYuBSz.mjs";
61
60
  import { endOfMonth as Z } from "date-fns/endOfMonth";
62
61
  import { startOfMonth as J } from "date-fns/startOfMonth";
63
62
  import { startOfToday as O } from "date-fns/startOfToday";
64
- import { f as bt, a as wt, b as P } from "../BudgetUtil-B2ZXyw-g.mjs";
65
- import { g as ta, e as ea, c as sa, d as ra, i as oa } from "../BudgetUtil-B2ZXyw-g.mjs";
66
- import { a as xt } from "../DebtsStore-C9bblOgW.mjs";
67
- import { a as Ct } from "../FinstrongStore-F2c607dj.mjs";
68
- import { A as Dt, m as At, a as vt, b as Et } from "../InvestmentUtil-jOyOgzIB.mjs";
69
- import { M as Tt } from "../MerchantStore-DrFvsUyy.mjs";
70
- import { N as Bt } from "../NetWorthStore-DCsTZpuS.mjs";
71
- import { a as It } from "../SettingsStore-BcgS_Ohv.mjs";
72
- import { addMonths as Nt } from "date-fns/addMonths";
63
+ import { f as wt, a as xt, b as L } from "../BudgetUtil-BmZXkL0C.mjs";
64
+ import { g as Zo, e as Jo, c as ta, d as ea, i as sa } from "../BudgetUtil-BmZXkL0C.mjs";
65
+ import { a as Ct } from "../DebtsStore-Bq-aPy-5.mjs";
66
+ import { F as vt } from "../FinstrongStore-BIrX0Xg2.mjs";
67
+ import { A as Dt, m as At, a as Et, b as Tt } from "../InvestmentUtil-jOyOgzIB.mjs";
68
+ import { M as Bt } from "../MerchantStore-WvZ4gnQe.mjs";
69
+ import { N as It } from "../NetWorthStore-rC0q7P7t.mjs";
70
+ import { a as Nt } from "../SettingsStore-krIRNwHK.mjs";
71
+ import { addMonths as Mt } from "date-fns/addMonths";
73
72
  import { getMonth as T } from "date-fns/getMonth";
74
- import { i as na } from "../DateUtil-BcuH7ErC.mjs";
75
- import { b as ca, a as da, g as la } from "../Localization-2MODESHW.mjs";
76
- import { alpha as Mt, lighten as U, darken as H } from "@mui/material";
77
- var Lt = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.EveryWeek = 1] = "EveryWeek", s[s.EveryOtherWeek = 2] = "EveryOtherWeek", s[s.EveryMonth = 3] = "EveryMonth", s[s.EveryOtherMonth = 4] = "EveryOtherMonth", s[s.EveryQuarter = 5] = "EveryQuarter", s[s.EveryOtherQuarter = 6] = "EveryOtherQuarter", s[s.EveryYear = 7] = "EveryYear", s))(Lt || {});
78
- const Ye = [
73
+ import { i as oa } from "../DateUtil-CBdcsyuk.mjs";
74
+ import { b as na, a as ia, g as ca } from "../Localization-2MODESHW.mjs";
75
+ import { alpha as $t, lighten as G, darken as H } from "@mui/material";
76
+ var kt = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.EveryWeek = 1] = "EveryWeek", s[s.EveryOtherWeek = 2] = "EveryOtherWeek", s[s.EveryMonth = 3] = "EveryMonth", s[s.EveryOtherMonth = 4] = "EveryOtherMonth", s[s.EveryQuarter = 5] = "EveryQuarter", s[s.EveryOtherQuarter = 6] = "EveryOtherQuarter", s[s.EveryYear = 7] = "EveryYear", s))(kt || {});
77
+ const Qe = [
79
78
  { id: 0, copy: "frequency_unknown" },
80
79
  { id: 1, copy: "frequency_every_week" },
81
80
  { id: 2, copy: "frequency_every_other_week" },
@@ -84,13 +83,13 @@ const Ye = [
84
83
  { id: 5, copy: "frequency_every_quarter" },
85
84
  { id: 6, copy: "frequency_every_other_quarter" },
86
85
  { id: 7, copy: "frequency_every_year" }
87
- ], Qe = {
86
+ ], ze = {
88
87
  ERROR: "ERROR",
89
88
  LOADING: "LOADING",
90
89
  SUCCESS: "SUCCESS"
91
90
  };
92
- var kt = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))(kt || {}), $t = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))($t || {});
93
- const Rt = [
91
+ var Rt = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))(Rt || {}), Ut = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))(Ut || {});
92
+ const Pt = [
94
93
  "fontFamily",
95
94
  "H1",
96
95
  "h1",
@@ -120,26 +119,26 @@ const Rt = [
120
119
  { key: "info", light: "info_color", dark: "info_color_dark" },
121
120
  { key: "success", light: "success_color", dark: "success_color_dark" }
122
121
  ], Xe = (s, t, e) => {
123
- const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, a = (i, m) => i ? {
124
- lighter: U(i, 0.5),
125
- light: U(i, 0.25),
122
+ const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, a = (i, _) => i ? {
123
+ lighter: G(i, 0.5),
124
+ light: G(i, 0.25),
126
125
  main: i,
127
126
  dark: H(i, 0.25),
128
127
  darker: H(i, 0.5)
129
- } : m, c = Object.fromEntries(
130
- Ot.map(({ key: i, light: m, dark: b }) => [
128
+ } : _, c = Object.fromEntries(
129
+ Ot.map(({ key: i, light: _, dark: b }) => [
131
130
  i,
132
131
  a(
133
- t?.[r ? b : m],
132
+ t?.[r ? b : _],
134
133
  s.palette[i]
135
134
  )
136
135
  ])
137
136
  ), d = Object.fromEntries(
138
- Rt.map((i) => [
137
+ Pt.map((i) => [
139
138
  i,
140
139
  i === "fontFamily" ? o : { fontFamily: o }
141
140
  ])
142
- ), l = {
141
+ ), u = {
143
142
  MuiTabs: {
144
143
  styleOverrides: {
145
144
  indicator: { backgroundColor: c.primary.light }
@@ -149,30 +148,30 @@ const Rt = [
149
148
  styleOverrides: {
150
149
  switchViewButton: {
151
150
  color: c.primary.lighter,
152
- "&:hover": { backgroundColor: Mt(c.primary.light, 0.1) }
151
+ "&:hover": { backgroundColor: $t(c.primary.light, 0.1) }
153
152
  }
154
153
  }
155
154
  }
156
- }, u = t?.button_corner_radius, g = t?.card_corner_radius, p = {
157
- ...l,
158
- ...u && {
155
+ }, l = t?.button_corner_radius, g = t?.card_corner_radius, m = {
156
+ ...u,
157
+ ...l && {
159
158
  MuiButton: {
160
159
  styleOverrides: {
161
- root: { borderRadius: `${u}px`, textTransform: "none" }
160
+ root: { borderRadius: `${l}px`, textTransform: "none" }
162
161
  }
163
162
  },
164
163
  MuiIconButton: {
165
164
  styleOverrides: {
166
165
  root: {
167
- borderRadius: `${u}px`,
168
- minWidth: u,
169
- minHeight: u
166
+ borderRadius: `${l}px`,
167
+ minWidth: l,
168
+ minHeight: l
170
169
  }
171
170
  }
172
171
  },
173
172
  MuiToggleButton: {
174
173
  styleOverrides: {
175
- root: { borderRadius: `${u}px`, textTransform: "none" }
174
+ root: { borderRadius: `${l}px`, textTransform: "none" }
176
175
  }
177
176
  }
178
177
  },
@@ -185,12 +184,12 @@ const Rt = [
185
184
  }
186
185
  }
187
186
  };
188
- return { typography: d, palette: c, components: p };
187
+ return { typography: d, palette: c, components: m };
189
188
  };
190
- class G {
189
+ class F {
191
190
  fetchInstance;
192
191
  constructor(t) {
193
- this.fetchInstance = new y(t, "", {
192
+ this.fetchInstance = new S(t, "", {
194
193
  Accept: "application/json",
195
194
  "Content-Type": "application/json"
196
195
  });
@@ -207,7 +206,7 @@ class G {
207
206
  class je {
208
207
  fetchInstance;
209
208
  constructor(t, e, r) {
210
- this.fetchInstance = new y(t, e, void 0, r);
209
+ this.fetchInstance = new S(t, e, void 0, r);
211
210
  }
212
211
  getLocalizedCopy = async (t) => this.fetchInstance.post(h.LOCALIZED_COPY, t).then((e) => e);
213
212
  getLocalizedContent = async (t) => this.fetchInstance.post(`${h.LOCALIZED_CONTENT}/${t}`).then((e) => e);
@@ -215,7 +214,7 @@ class je {
215
214
  class Ke {
216
215
  fetchInstance;
217
216
  constructor(t, e, r) {
218
- this.fetchInstance = new y(t, e, void 0, r);
217
+ this.fetchInstance = new S(t, e, void 0, r);
219
218
  }
220
219
  addScheduledPayment = async (t) => this.fetchInstance.post(h.SCHEDULED_PAYMENTS, {
221
220
  ...t,
@@ -226,10 +225,10 @@ class Ke {
226
225
  updateScheduledPayment = async (t) => this.fetchInstance.put(`${h.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
227
226
  deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${h.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
228
227
  }
229
- class F {
228
+ class k {
230
229
  fetchInstance;
231
230
  constructor(t, e, r) {
232
- this.fetchInstance = new y(t, e, void 0, r);
231
+ this.fetchInstance = new S(t, e, void 0, r);
233
232
  }
234
233
  getUserFeatures = async () => this.fetchInstance.get(h.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
235
234
  updateUser = async (t) => this.fetchInstance.put(h.USER, t).then((e) => e.user);
@@ -238,29 +237,29 @@ class F {
238
237
  class W {
239
238
  fetchInstance;
240
239
  constructor(t, e) {
241
- this.fetchInstance = new y(t, e);
240
+ this.fetchInstance = new S(t, e);
242
241
  }
243
242
  requestWidgetUrl = async (t) => this.fetchInstance.post(h.WIDGET_URLS, t).then((e) => e.widget_url);
244
243
  }
245
- var Pt = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(Pt || {}), Ut = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(Ut || {}), Ht = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(Ht || {}), Gt = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(Gt || {});
246
- const ze = (s) => {
244
+ var Lt = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(Lt || {}), Gt = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(Gt || {}), Ht = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(Ht || {}), Ft = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(Ft || {});
245
+ const Ve = (s) => {
247
246
  const t = lt();
248
247
  return ut(() => {
249
248
  t.current = s;
250
249
  }, [s]), t.current;
251
- }, Ft = ({ color: s, labelAverage: t, labelMain: e }) => {
252
- const r = C(), o = Wt(r, s);
253
- return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
250
+ }, Wt = ({ color: s, labelAverage: t, labelMain: e }) => {
251
+ const r = C(), o = qt(r, s);
252
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
254
253
  /* @__PURE__ */ n("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
255
254
  /* @__PURE__ */ n(B, { variant: "XSmall", children: e }),
256
- /* @__PURE__ */ f("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
255
+ /* @__PURE__ */ y("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
257
256
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
258
257
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
259
258
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" })
260
259
  ] }),
261
260
  /* @__PURE__ */ n(B, { variant: "XSmall", children: t })
262
261
  ] });
263
- }, Wt = (s, t) => x({
262
+ }, qt = (s, t) => x({
264
263
  alignItems: "center",
265
264
  display: "flex",
266
265
  gap: s.Spacing.XSmall,
@@ -296,21 +295,21 @@ const ze = (s) => {
296
295
  selectedIndex: c,
297
296
  value: d
298
297
  }) => {
299
- const l = C(), u = qt(l, t, e), g = (m) => {
300
- a && (m.key === " " || m.key === "Enter") && a(r);
301
- }, p = c === void 0 || c === r ? "primary" : "secondary", i = () => /* @__PURE__ */ n(
298
+ const u = C(), l = Yt(u, t, e), g = (_) => {
299
+ a && (_.key === " " || _.key === "Enter") && a(r);
300
+ }, m = c === void 0 || c === r ? "primary" : "secondary", i = () => /* @__PURE__ */ n(
302
301
  B,
303
302
  {
304
303
  "aria-hidden": !0,
305
304
  bold: c === r,
306
305
  className: "mx-cmn-bar-text",
307
- color: p,
306
+ color: m,
308
307
  component: "div",
309
308
  variant: "Small",
310
309
  children: o
311
310
  }
312
311
  );
313
- return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-container ${u} ${d < 0 ? "mx-cmn-negative" : ""}`, children: [
312
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-container ${l} ${d < 0 ? "mx-cmn-negative" : ""}`, children: [
314
313
  d >= 0 && /* @__PURE__ */ n(i, {}),
315
314
  /* @__PURE__ */ n(
316
315
  "div",
@@ -325,7 +324,7 @@ const ze = (s) => {
325
324
  ),
326
325
  d < 0 && /* @__PURE__ */ n(i, {})
327
326
  ] });
328
- }, qt = (s, t, e) => {
327
+ }, Yt = (s, t, e) => {
329
328
  const r = `expandBar-${Math.round(e)}`, o = ht(r, { from: { height: 0 }, to: { height: e } });
330
329
  return x({
331
330
  display: "flex",
@@ -367,39 +366,39 @@ const ze = (s) => {
367
366
  onClick: a,
368
367
  range: c,
369
368
  selectedIndex: d,
370
- topHeight: l,
371
- value: u,
369
+ topHeight: u,
370
+ value: l,
372
371
  valueLabel: g = "",
373
- width: p,
372
+ width: m,
374
373
  xAxisLabel: i = ""
375
374
  }) => {
376
- const m = C(), b = Yt(m, p), D = u / c * l, A = Math.abs(u) / c * e, v = d === void 0 || d === o ? "primary" : "secondary";
377
- return /* @__PURE__ */ f("div", { className: `mx-cmn-barchart-bar-column ${b}`, children: [
378
- /* @__PURE__ */ n("div", { style: { height: l }, children: u >= 0 && /* @__PURE__ */ n(
375
+ const _ = C(), b = Qt(_, m), v = l / c * u, D = Math.abs(l) / c * e, A = d === void 0 || d === o ? "primary" : "secondary";
376
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-barchart-bar-column ${b}`, children: [
377
+ /* @__PURE__ */ n("div", { style: { height: u }, children: l >= 0 && /* @__PURE__ */ n(
379
378
  q,
380
379
  {
381
380
  ariaLabel: s,
382
381
  color: r,
383
- height: D,
382
+ height: v,
384
383
  index: o,
385
384
  label: g,
386
385
  onClick: a,
387
386
  selectedIndex: d,
388
- value: u
387
+ value: l
389
388
  }
390
389
  ) }),
391
390
  /* @__PURE__ */ n("div", { className: "mx-cmn-zero-line" }),
392
391
  t !== 0 && /* @__PURE__ */ n("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
393
- /* @__PURE__ */ n("div", { style: { height: e }, children: u < 0 && /* @__PURE__ */ n(
392
+ /* @__PURE__ */ n("div", { style: { height: e }, children: l < 0 && /* @__PURE__ */ n(
394
393
  q,
395
394
  {
396
395
  ariaLabel: s,
397
396
  color: r,
398
- height: A,
397
+ height: D,
399
398
  index: o,
400
399
  label: g,
401
400
  onClick: a,
402
- value: u
401
+ value: l
403
402
  }
404
403
  ) }),
405
404
  /* @__PURE__ */ n(
@@ -407,11 +406,11 @@ const ze = (s) => {
407
406
  {
408
407
  className: `mx-cmn-bar-label ${a ? "mx-cmn-clickable" : ""}`,
409
408
  onClick: a ? () => a(o) : void 0,
410
- children: /* @__PURE__ */ n(B, { bold: d === o, color: v, variant: "Small", children: i })
409
+ children: /* @__PURE__ */ n(B, { bold: d === o, color: A, variant: "Small", children: i })
411
410
  }
412
411
  )
413
412
  ] });
414
- }, Yt = (s, t) => x({
413
+ }, Qt = (s, t) => x({
415
414
  display: "flex",
416
415
  flexDirection: "column",
417
416
  flexGrow: t === void 0 ? 1 : 0,
@@ -436,10 +435,10 @@ const ze = (s) => {
436
435
  "& .mx-cmn-clickable": {
437
436
  cursor: "pointer"
438
437
  }
439
- }), Qt = (s, t) => s + t, Xt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, jt = (s, t) => [...s, t.value], Q = (s, t, e) => {
438
+ }), zt = (s, t) => s + t, Xt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, jt = (s, t) => [...s, t.value], Q = (s, t, e) => {
440
439
  const r = s && t ? e / 2 : e;
441
440
  return s ? r : 0;
442
- }, Kt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, zt = ({
441
+ }, Kt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, Vt = ({
443
442
  average: s,
444
443
  barWidth: t = "8%",
445
444
  color: e,
@@ -448,49 +447,49 @@ const ze = (s) => {
448
447
  legendLabelAverage: a,
449
448
  legendLabelMain: c,
450
449
  onBarClick: d,
451
- selectedIndex: l,
452
- valueFormatter: u = (g) => `${g}`
450
+ selectedIndex: u,
451
+ valueFormatter: l = (g) => `${g}`
453
452
  }) => {
454
- const g = C(), p = Vt(g), i = r.reduce(jt, []), m = s !== void 0 ? s : i.reduce(Qt, 0) / i.length, b = Math.max(...i), D = Math.min(...i), A = i.reduce(Xt, 0), v = b >= 0, L = D < 0, I = Q(v, L, o), N = Q(L, v, o), k = Kt(m, b, D, I || N), tt = (w) => l === void 0 || w === l ? e : `${e}80`, $ = () => /* @__PURE__ */ n(
453
+ const g = C(), m = Zt(g), i = r.reduce(jt, []), _ = s !== void 0 ? s : i.reduce(zt, 0) / i.length, b = Math.max(...i), v = Math.min(...i), D = i.reduce(Xt, 0), A = b >= 0, R = v < 0, I = Q(A, R, o), N = Q(R, A, o), U = Kt(_, b, v, I || N), tt = (w) => u === void 0 || w === u ? e : `${e}80`, P = () => /* @__PURE__ */ n(
455
454
  Y,
456
455
  {
457
- averageLineHeight: k,
456
+ averageLineHeight: U,
458
457
  bottomHeight: N,
459
458
  color: "",
460
- range: A,
459
+ range: D,
461
460
  topHeight: I,
462
461
  value: 0,
463
462
  width: void 0
464
463
  }
465
464
  );
466
- return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-chart ${p}`, children: [
467
- /* @__PURE__ */ f("div", { className: "mx-cmn-chart-container", children: [
468
- /* @__PURE__ */ n($, {}),
469
- r.map((w, M) => /* @__PURE__ */ f(dt.Fragment, { children: [
465
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-chart ${m}`, children: [
466
+ /* @__PURE__ */ y("div", { className: "mx-cmn-chart-container", children: [
467
+ /* @__PURE__ */ n(P, {}),
468
+ r.map((w, M) => /* @__PURE__ */ y(dt.Fragment, { children: [
470
469
  /* @__PURE__ */ n(
471
470
  Y,
472
471
  {
473
472
  ariaLabel: w.ariaLabel,
474
- averageLineHeight: k,
473
+ averageLineHeight: U,
475
474
  bottomHeight: N,
476
475
  color: tt(M),
477
476
  index: M,
478
477
  onClick: d,
479
- range: A,
480
- selectedIndex: l,
478
+ range: D,
479
+ selectedIndex: u,
481
480
  topHeight: I,
482
481
  value: w.value,
483
- valueLabel: u(w.value),
482
+ valueLabel: l(w.value),
484
483
  width: t,
485
484
  xAxisLabel: w.label
486
485
  }
487
486
  ),
488
- /* @__PURE__ */ n($, {})
487
+ /* @__PURE__ */ n(P, {})
489
488
  ] }, `column-${M}`))
490
489
  ] }),
491
- /* @__PURE__ */ n(Ft, { color: e, labelAverage: a, labelMain: c })
490
+ /* @__PURE__ */ n(Wt, { color: e, labelAverage: a, labelMain: c })
492
491
  ] });
493
- }, Vt = (s) => x({
492
+ }, Zt = (s) => x({
494
493
  "& .mx-cmn-chart-container": {
495
494
  alignItems: "flex-end",
496
495
  display: "flex",
@@ -498,47 +497,47 @@ const ze = (s) => {
498
497
  marginTop: s.Spacing.Large,
499
498
  marginBottom: s.Spacing.Medium
500
499
  }
501
- }), Ve = zt, Zt = ({
500
+ }), Ze = Vt, Jt = ({
502
501
  hasGap: s = !1,
503
502
  segments: t,
504
503
  size: e = gt,
505
504
  strokeWidth: r = pt,
506
505
  children: o
507
506
  }) => {
508
- const a = C(), c = Jt(a, e), d = (e - r) / 2, l = e / 2;
509
- let u = -90 - (s ? 1 : 0), g = 0;
510
- return /* @__PURE__ */ f("div", { className: `mx-cmn-multi-segment-donut ${c}`, children: [
511
- /* @__PURE__ */ f("svg", { height: e, width: e, children: [
507
+ const a = C(), c = te(a, e), d = (e - r) / 2, u = e / 2;
508
+ let l = -90 - (s ? 1 : 0), g = 0;
509
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-multi-segment-donut ${c}`, children: [
510
+ /* @__PURE__ */ y("svg", { height: e, width: e, children: [
512
511
  /* @__PURE__ */ n(
513
512
  "circle",
514
513
  {
515
- cx: l,
516
- cy: l,
514
+ cx: u,
515
+ cy: u,
517
516
  fill: "none",
518
517
  r: d,
519
518
  stroke: a.Color.Neutral300,
520
519
  strokeWidth: r
521
520
  }
522
521
  ),
523
- t.map((p, i) => (u += 360 * g + (s ? 1 : 0), g = (p.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
522
+ t.map((m, i) => (l += 360 * g + (s ? 1 : 0), g = (m.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
524
523
  "circle",
525
524
  {
526
- cx: l,
527
- cy: l,
525
+ cx: u,
526
+ cy: u,
528
527
  fill: "none",
529
528
  r: d,
530
- stroke: p.color,
529
+ stroke: m.color,
531
530
  strokeDasharray: 2 * Math.PI * d,
532
531
  strokeDashoffset: 2 * Math.PI * d * (1 - g),
533
532
  strokeWidth: r,
534
- transform: `rotate(${u}, ${l}, ${l})`
533
+ transform: `rotate(${l}, ${u}, ${u})`
535
534
  },
536
535
  i
537
536
  )))
538
537
  ] }),
539
538
  /* @__PURE__ */ n("div", { className: "mx-cmn-multi-segment-donut-children", children: o })
540
539
  ] });
541
- }, Jt = (s, t) => x({
540
+ }, te = (s, t) => x({
542
541
  height: t,
543
542
  marginTop: `-${s.Spacing.XSmall}px`,
544
543
  position: "relative",
@@ -550,29 +549,34 @@ const ze = (s) => {
550
549
  top: "50%",
551
550
  transform: "translate(-50%, -50%)"
552
551
  }
553
- }), Ze = Zt;
554
- class te {
552
+ }), Je = Jt;
553
+ class ee {
555
554
  globalStore;
556
- api = new R("/", "");
555
+ api = new $("/", "");
557
556
  copy = {};
558
557
  featureNamespace = "experiences";
559
558
  isInitialized = !1;
560
559
  constructor(t) {
561
- this.globalStore = t, this.api = new R(
560
+ this.globalStore = t, this.api = new $(
562
561
  t.endpoint,
563
562
  t.sessionToken,
564
563
  t.onError
565
- ), _(this);
564
+ ), f(this);
566
565
  }
566
+ // DEPRECATED: Initialize api in constructor and use loadCopy instead
567
+ // TODO: Remove this function
568
+ initialize = async (t, e) => {
569
+ this.api = new $(t, e), await this.loadCopy();
570
+ };
567
571
  loadCopy = async () => {
568
- await this.getCopy(this.featureNamespace), S(() => {
572
+ await this.getCopy(this.featureNamespace), p(() => {
569
573
  this.isInitialized = !0;
570
574
  });
571
575
  };
572
576
  getCopy = async (t, e = "") => {
573
577
  try {
574
578
  const r = await this.api.getGlobalCopy(t, e);
575
- S(() => {
579
+ p(() => {
576
580
  this.copy = r[t];
577
581
  });
578
582
  } catch (r) {
@@ -580,7 +584,7 @@ class te {
580
584
  }
581
585
  };
582
586
  }
583
- class ee {
587
+ class se {
584
588
  globalStore;
585
589
  survey = null;
586
590
  currentQuestionIndex = 0;
@@ -588,7 +592,7 @@ class ee {
588
592
  response = null;
589
593
  responses = {};
590
594
  constructor(t) {
591
- this.globalStore = t, _(this);
595
+ this.globalStore = t, f(this);
592
596
  }
593
597
  get isLastQuestion() {
594
598
  return this.currentQuestionIndex === this.surveyQuestions.length - 1;
@@ -610,8 +614,8 @@ class ee {
610
614
  return this.survey ? this.survey.questions : [];
611
615
  }
612
616
  loadSurvey = (t = !1) => {
613
- yt.getActiveMatchingSurveys((e) => {
614
- S(() => {
617
+ St.getActiveMatchingSurveys((e) => {
618
+ p(() => {
615
619
  if (e.length > 0) {
616
620
  const r = e.find((o) => o.id === this.surveyId);
617
621
  r && (this.survey = r, this.currentQuestionIndex = 0, this.question = r.questions[0], this.response = null, this.responses = {});
@@ -629,10 +633,10 @@ class ee {
629
633
  this.response = t, this.question && (this.responses[`$survey_response_${this.question.id}`] = t);
630
634
  };
631
635
  }
632
- class X {
636
+ class z {
633
637
  fetchInstance;
634
638
  constructor(t, e, r) {
635
- this.fetchInstance = new y(t, e, void 0, r);
639
+ this.fetchInstance = new S(t, e, void 0, r);
636
640
  }
637
641
  addBudget = async (t, e, r = null) => this.fetchInstance.post(h.BUDGETS, {
638
642
  amount: e,
@@ -650,8 +654,8 @@ class X {
650
654
  throw e;
651
655
  });
652
656
  }
653
- class se {
654
- api = new X("/", "");
657
+ class re {
658
+ api = new z("/", "");
655
659
  globalStore;
656
660
  alert = "";
657
661
  dateRange = { start: J(O()), end: Z(O()) };
@@ -661,7 +665,7 @@ class se {
661
665
  isDataLoaded = !1;
662
666
  theme = {};
663
667
  constructor(t) {
664
- this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken, t.onError), _(this);
668
+ this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken, t.onError), f(this);
665
669
  }
666
670
  loadBudgetData = async () => {
667
671
  await this.loadBudgets(), _t(
@@ -669,9 +673,9 @@ class se {
669
673
  (t) => {
670
674
  if (t) {
671
675
  const e = this.selectedBudget;
672
- e && (this.selectedBudget = bt(t, e.guid));
676
+ e && (this.selectedBudget = wt(t, e.guid));
673
677
  const r = this.selectedSubBudget;
674
- r && r.parent_guid && (this.selectedSubBudget = wt(
678
+ r && r.parent_guid && (this.selectedSubBudget = xt(
675
679
  t,
676
680
  r.guid,
677
681
  r.parent_guid
@@ -681,7 +685,7 @@ class se {
681
685
  );
682
686
  };
683
687
  get detailedBudgets() {
684
- return P(
688
+ return L(
685
689
  this.budgets.filter(
686
690
  (t) => t.category_guid !== E.INCOME && t.category_guid !== E.TRANSFER && t.category_guid !== E.INVESTMENTS
687
691
  ),
@@ -690,9 +694,8 @@ class se {
690
694
  this.theme
691
695
  ).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
692
696
  }
693
- // TODO: Replace this with income from recurring transactions. Income budgets are deprecated.
694
697
  get incomeBudget() {
695
- return P(
698
+ return L(
696
699
  this.budgets.filter((r) => !r.parent_guid),
697
700
  this.globalStore.categoryStore.detailedCategories,
698
701
  this.globalStore.copyStore.copy.budgets,
@@ -713,7 +716,7 @@ class se {
713
716
  addBudget = async (t, e, r = null) => {
714
717
  try {
715
718
  const o = await this.api.addBudget(t, e, r);
716
- S(() => {
719
+ p(() => {
717
720
  this.budgets.push(o);
718
721
  });
719
722
  } catch (o) {
@@ -722,7 +725,7 @@ class se {
722
725
  };
723
726
  deleteBudget = async (t) => {
724
727
  try {
725
- await this.api.deleteBudget(t), S(() => {
728
+ await this.api.deleteBudget(t), p(() => {
726
729
  const e = this.budgets.findIndex((r) => r.guid === t);
727
730
  e >= 0 && this.budgets.splice(e, 1);
728
731
  });
@@ -733,15 +736,14 @@ class se {
733
736
  loadBudgets = async () => {
734
737
  try {
735
738
  const t = await this.api.getBudgets();
736
- this.setBudgets(t);
739
+ p(() => {
740
+ this.budgets = t, this.isDataLoaded = !0;
741
+ });
737
742
  } catch (t) {
738
743
  throw console.error(`Error occurred while loading budgets: ${t}`), t;
739
744
  }
740
745
  };
741
746
  setAlert = (t) => this.alert = t;
742
- setBudgets = (t) => {
743
- this.budgets = t, this.isDataLoaded = !0;
744
- };
745
747
  setDateRange = (t) => this.dateRange = t;
746
748
  setSelectedBudget = (t) => this.selectedBudget = t;
747
749
  setSelectedSubBudget = (t) => this.selectedSubBudget = t;
@@ -772,7 +774,7 @@ class se {
772
774
  updateBudget = async (t) => {
773
775
  try {
774
776
  const e = await this.api.updateBudget(t);
775
- S(() => {
777
+ p(() => {
776
778
  const r = this.budgets.findIndex((o) => o.guid === t.guid);
777
779
  r >= 0 && (this.budgets[r] = e);
778
780
  });
@@ -781,14 +783,14 @@ class se {
781
783
  }
782
784
  };
783
785
  }
784
- class j {
786
+ class X {
785
787
  fetchInstance;
786
788
  constructor(t, e, r) {
787
- this.fetchInstance = new y(t, e, void 0, r);
789
+ this.fetchInstance = new S(t, e, void 0, r);
788
790
  }
789
791
  createSupportTicket = async (t) => this.fetchInstance.post(h.SUPPORT_TICKETS, t).then((e) => e);
790
792
  }
791
- const re = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, oe = (s, t) => {
793
+ const oe = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, ae = (s, t) => {
792
794
  const e = [];
793
795
  for (const r of ot) {
794
796
  const o = t[r.guid];
@@ -801,18 +803,18 @@ const re = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flag
801
803
  label: o.topics[d]
802
804
  }))
803
805
  };
804
- re(a, s) && e.push(a);
806
+ oe(a, s) && e.push(a);
805
807
  }
806
808
  return e;
807
809
  };
808
- class ae {
810
+ class ne {
809
811
  alert = { message: "", severity: void 0 };
810
- api = new j("/", "");
812
+ api = new X("/", "");
811
813
  appConfig;
812
814
  globalStore;
813
815
  isLoading = !1;
814
816
  constructor(t) {
815
- this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken, t.onError), _(this);
817
+ this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken, t.onError), f(this);
816
818
  }
817
819
  createSupportTicket = async (t) => {
818
820
  try {
@@ -831,7 +833,7 @@ class ae {
831
833
  const { client_communication_profile: t, client_profile: e } = this.globalStore.appDataStore.appData, {
832
834
  help: { category_list: r }
833
835
  } = this.globalStore.copyStore.copy;
834
- return oe(
836
+ return ae(
835
837
  {
836
838
  ...t,
837
839
  ...e,
@@ -841,45 +843,44 @@ class ae {
841
843
  );
842
844
  }
843
845
  }
844
- class K {
846
+ class j {
845
847
  fetchInstance;
846
848
  constructor(t, e, r) {
847
- this.fetchInstance = new y(t, e, void 0, r);
849
+ this.fetchInstance = new S(t, e, void 0, r);
848
850
  }
849
851
  getHoldings = async () => this.fetchInstance.get(h.HOLDINGS).then((t) => t.holdings);
850
852
  updateHoldings = async (t) => this.fetchInstance.put(`${h.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
851
853
  }
852
- class ne {
854
+ class ie {
853
855
  analysisType = Dt.Stocks;
854
- api = new K("/", "");
856
+ api = new j("/", "");
855
857
  holdings = [];
856
858
  holdingsLoaded = !1;
857
859
  globalStore;
858
860
  showConnectionsWidget = !1;
859
861
  constructor(t) {
860
- this.globalStore = t, this.api = new K(t.endpoint, t.sessionToken, t.onError), _(this);
862
+ this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken, t.onError), f(this);
861
863
  }
862
864
  get analysisChartData() {
863
- return At(vt(this.visibleHoldings), this.analysisType);
865
+ return At(Et(this.visibleHoldings), this.analysisType);
864
866
  }
865
867
  get analysisDetails() {
866
- return Et(this.visibleHoldings)[this.analysisType] || {};
868
+ return Tt(this.visibleHoldings)[this.analysisType] || {};
867
869
  }
868
870
  get visibleHoldings() {
869
871
  return this.holdings.filter(
870
872
  (t) => this.globalStore.globalUiStore.selectedAccountGuids.includes(t.account_guid)
871
873
  );
872
874
  }
873
- setHoldings = (t) => {
874
- this.holdings = t, this.holdingsLoaded = !0;
875
- };
876
875
  setShowConnectionsWidget = (t) => {
877
876
  this.showConnectionsWidget = t;
878
877
  };
879
878
  loadHoldings = async () => {
880
879
  try {
881
880
  const t = await this.api.getHoldings();
882
- this.setHoldings(t);
881
+ p(() => {
882
+ this.holdings = [...t], this.holdingsLoaded = !0;
883
+ });
883
884
  } catch (t) {
884
885
  console.error(`Error occured while getting holdings: ${t}`);
885
886
  }
@@ -893,7 +894,7 @@ class ne {
893
894
  const e = await this.api.updateHoldings(t), r = this.holdings.findIndex(({ guid: o }) => o === t.guid);
894
895
  if (r >= 0) {
895
896
  const o = [...this.holdings];
896
- o[r] = e, S(() => {
897
+ o[r] = e, p(() => {
897
898
  this.holdings = o, this.holdingsLoaded = !0;
898
899
  });
899
900
  }
@@ -902,7 +903,7 @@ class ne {
902
903
  }
903
904
  };
904
905
  }
905
- const z = {
906
+ const K = {
906
907
  clientConfig: {},
907
908
  clientStyleProfile: {},
908
909
  config: {
@@ -1009,19 +1010,18 @@ const z = {
1009
1010
  class V {
1010
1011
  fetchInstance;
1011
1012
  constructor(t, e, r) {
1012
- this.fetchInstance = new y(t, e, void 0, r);
1013
+ this.fetchInstance = new S(t, e, void 0, r);
1013
1014
  }
1014
1015
  getAppData = async () => this.fetchInstance.get(h.APP_DATA).then((t) => t);
1015
1016
  }
1016
- class ie {
1017
+ class ce {
1017
1018
  globalStore;
1018
1019
  api = new V("/", "");
1019
- bannerApi = new G("/");
1020
+ bannerApi = new F("/");
1020
1021
  appData = {};
1021
- isAppDataLoaded = !1;
1022
1022
  banner = {};
1023
1023
  constructor(t) {
1024
- this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError), _(this);
1024
+ this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError), f(this);
1025
1025
  }
1026
1026
  get appConfig() {
1027
1027
  return this.globalStore.appConfig;
@@ -1041,21 +1041,20 @@ class ie {
1041
1041
  get userProfile() {
1042
1042
  return this.appData.user_profile;
1043
1043
  }
1044
- setAppData = (t) => {
1045
- this.appData = t, this.bannerApi = new G(t.address?.bullseye || "/"), this.isAppDataLoaded = !0;
1046
- };
1047
- loadAppData = async () => {
1044
+ loadAppData = async (t) => {
1048
1045
  try {
1049
- const t = await this.api.getAppData();
1050
- this.setAppData(t);
1051
- } catch (t) {
1052
- console.error(`Error loading app data: ${t}`);
1046
+ const e = t || await this.api.getAppData();
1047
+ p(() => {
1048
+ this.appData = e, this.bannerApi = new F(e.address?.bullseye || "/");
1049
+ });
1050
+ } catch (e) {
1051
+ console.error(`Error loading app data: ${e}`);
1053
1052
  }
1054
1053
  };
1055
1054
  loadBanner = async () => {
1056
1055
  try {
1057
1056
  const t = this.user?.guid ?? null, e = t ? await this.bannerApi.getBanner(t) : {};
1058
- S(() => {
1057
+ p(() => {
1059
1058
  this.banner = e;
1060
1059
  });
1061
1060
  } catch (t) {
@@ -1066,18 +1065,19 @@ class ie {
1066
1065
  setUserCommunicationProfile = (t) => this.appData.user_communication_profile = t;
1067
1066
  setUserProfile = (t) => this.appData.user_profile = t;
1068
1067
  }
1069
- class ce {
1068
+ class de {
1070
1069
  globalStore;
1071
1070
  widgetApi = new W("/", "");
1072
1071
  constructor(t) {
1073
- this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken), _(this);
1072
+ this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken), f(this);
1074
1073
  }
1075
1074
  loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...r }) => await this.widgetApi.requestWidgetUrl({
1076
1075
  widget_url: { widget_type: t, color_scheme: e, ...r }
1077
1076
  });
1078
1077
  }
1079
- class de {
1078
+ class le {
1080
1079
  globalStore;
1080
+ isInitialized = !1;
1081
1081
  selectedAccounts = [];
1082
1082
  selectedAccountGuids = this.selectedAccounts.map((t) => t.guid);
1083
1083
  displayedDate = /* @__PURE__ */ new Date();
@@ -1086,20 +1086,14 @@ class de {
1086
1086
  end: Z(this.displayedDate)
1087
1087
  };
1088
1088
  constructor(t) {
1089
- _(this), this.globalStore = t;
1089
+ f(this), this.globalStore = t;
1090
1090
  }
1091
1091
  get isCopyLoaded() {
1092
1092
  return this.globalStore.copyStore.isInitialized;
1093
1093
  }
1094
- get isConfigLoaded() {
1095
- return this.globalStore.appDataStore.isAppDataLoaded;
1096
- }
1097
- get areUserFeaturesLoaded() {
1098
- return this.globalStore.userStore.userFeaturesLoaded;
1099
- }
1100
- get isInitialized() {
1101
- return this.isCopyLoaded && this.isConfigLoaded && this.areUserFeaturesLoaded;
1102
- }
1094
+ setInitialized = (t) => {
1095
+ this.isInitialized = t;
1096
+ };
1103
1097
  // for the global account filter
1104
1098
  // if excluded from 1 widget, excluded from all
1105
1099
  setSelectedAccounts = (t) => {
@@ -1119,7 +1113,7 @@ class de {
1119
1113
  };
1120
1114
  };
1121
1115
  get shouldDisableNextDate() {
1122
- const t = T(this.displayedDate), e = T(Nt(/* @__PURE__ */ new Date(), 1));
1116
+ const t = T(this.displayedDate), e = T(Mt(/* @__PURE__ */ new Date(), 1));
1123
1117
  return t === e;
1124
1118
  }
1125
1119
  get shouldDisablePrevDate() {
@@ -1127,29 +1121,32 @@ class de {
1127
1121
  return t === e;
1128
1122
  }
1129
1123
  }
1130
- class le {
1124
+ class ue {
1131
1125
  globalStore;
1132
- api = new F("/", "");
1126
+ api = new k("/", "");
1133
1127
  userFeatures = [];
1134
- userFeaturesLoaded = !1;
1135
1128
  constructor(t) {
1136
- this.globalStore = t, this.api = new F(t.endpoint, t.sessionToken, t.onError), _(this);
1129
+ this.globalStore = t, this.api = new k(t.endpoint, t.sessionToken, t.onError), f(this);
1137
1130
  }
1131
+ // DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
1132
+ // TODO: Remove this function
1133
+ initialize = async (t, e) => {
1134
+ this.api = new k(t, e), await this.loadUserFeatures();
1135
+ };
1138
1136
  get userProfile() {
1139
1137
  return this.globalStore.appDataStore.userProfile;
1140
1138
  }
1141
1139
  get user() {
1142
1140
  return this.globalStore.appDataStore.user;
1143
1141
  }
1144
- setUserFeatures = (t) => {
1145
- this.userFeatures = t, this.userFeaturesLoaded = !0;
1146
- };
1147
- loadUserFeatures = async () => {
1142
+ loadUserFeatures = async (t) => {
1148
1143
  try {
1149
- const t = await this.api.getUserFeatures();
1150
- this.setUserFeatures(t);
1151
- } catch (t) {
1152
- console.error(`Error occurred while loading user features: ${t}`);
1144
+ const e = t || await this.api.getUserFeatures();
1145
+ p(() => {
1146
+ this.userFeatures = e;
1147
+ });
1148
+ } catch (e) {
1149
+ console.error(`Error occurred while loading user features: ${e}`);
1153
1150
  }
1154
1151
  };
1155
1152
  updateUser = async (t) => {
@@ -1169,12 +1166,13 @@ class le {
1169
1166
  }
1170
1167
  };
1171
1168
  }
1172
- class Je {
1169
+ class ts {
1173
1170
  // Global properties
1174
- appConfig = z;
1171
+ appConfig = K;
1175
1172
  endpoint = "/";
1176
1173
  sessionToken = "";
1177
1174
  onError;
1175
+ onStoreUpdate;
1178
1176
  // Data Stores
1179
1177
  accountStore;
1180
1178
  appDataStore;
@@ -1200,19 +1198,20 @@ class Je {
1200
1198
  userStore;
1201
1199
  // UI Stores
1202
1200
  globalUiStore;
1203
- constructor(t = z, e = "/", r) {
1204
- this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.accountStore = new ft(this), this.appDataStore = new ie(this), this.analyticsStore = new ee(this), this.beatStore = new St(this), this.budgetsStore = new se(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new ce(this), this.copyStore = new te(this), this.debtsStore = new xt(this), this.finstrongStore = new Ct(this), this.goalStore = new it(this), this.helpStore = new ae(this), this.holdingStore = new ne(this), this.merchantStore = new Tt(this), this.netWorthStore = new Bt(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new It(this), this.transactionStore = new at(this), this.trendsStore = new ct(this), this.userStore = new le(this), this.globalUiStore = new de(this), _(this);
1201
+ constructor(t = K, e = "/", r, o) {
1202
+ this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.onStoreUpdate = o, this.accountStore = new yt(this), this.appDataStore = new ce(this), this.analyticsStore = new se(this), this.beatStore = new bt(this), this.budgetsStore = new re(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new de(this), this.copyStore = new ee(this), this.debtsStore = new Ct(this), this.finstrongStore = new vt(this), this.goalStore = new it(this), this.helpStore = new ne(this), this.holdingStore = new ie(this), this.merchantStore = new Bt(this), this.netWorthStore = new It(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new Nt(this), this.transactionStore = new at(this), this.trendsStore = new ct(this), this.userStore = new ue(this), this.globalUiStore = new le(this), f(this), ft(() => {
1203
+ const { transactions: a } = this.transactionStore;
1204
+ this.emitUpdate({
1205
+ transactions: a
1206
+ });
1207
+ });
1205
1208
  }
1206
1209
  get isInitialized() {
1207
1210
  return this.globalUiStore.isInitialized;
1208
1211
  }
1209
- loadConfigData = async () => {
1210
- await Promise.all([
1211
- // Load copy, config and user data
1212
- this.copyStore.loadCopy(),
1213
- this.appDataStore.loadAppData(),
1214
- this.userStore.loadUserFeatures()
1215
- ]);
1212
+ // emits change triggered in the autorun
1213
+ emitUpdate = (t) => {
1214
+ this.onStoreUpdate?.(t);
1216
1215
  };
1217
1216
  loadData = async ({
1218
1217
  accounts: t,
@@ -1222,167 +1221,178 @@ class Je {
1222
1221
  institutions: a,
1223
1222
  transactionRules: c,
1224
1223
  transactions: d,
1225
- userFeatures: l
1224
+ userFeatures: u
1226
1225
  } = {}) => {
1227
- (!e || !l) && await this.loadConfigData(), e && this.appDataStore.setAppData(e), l && this.userStore.setUserFeatures(l), t && a && (await this.accountStore.loadMembers(), this.accountStore.setInstitutions(a), this.accountStore.setAccounts(t)), r && this.transactionStore.setAssociatedBeats(r), o && this.categoryStore.setCategories(o), d && this.transactionStore.setTransactions(d), c && this.transactionStore.setTransactionRules(c);
1226
+ await Promise.all([
1227
+ // Load copy, config and quser data
1228
+ this.copyStore.loadCopy(),
1229
+ this.appDataStore.loadAppData(e),
1230
+ this.userStore.loadUserFeatures(u)
1231
+ ]), await Promise.all([
1232
+ this.accountStore.loadAccountData({ accounts: t, institutions: a }),
1233
+ this.categoryStore.loadCategories(o),
1234
+ this.transactionStore.loadTransactionData({
1235
+ associatedBeats: r,
1236
+ transactionRules: c,
1237
+ transactions: d
1238
+ })
1239
+ ]), this.globalUiStore.setInitialized(!0);
1228
1240
  };
1229
1241
  }
1230
1242
  export {
1231
1243
  Ds as ANALYTICS_EVENTS,
1232
- Ts as AccountFilter,
1233
- Bs as AccountIcon,
1234
- Is as AccountIconVariants,
1244
+ Bs as AccountFilter,
1245
+ Is as AccountIcon,
1246
+ Ns as AccountIconVariants,
1235
1247
  Tr as AccountNotificationTypes,
1236
- Ns as AccountSubType,
1237
- Ms as AccountType,
1238
- Ls as AccountTypeName,
1239
- ss as AnalyticsApi,
1248
+ Ms as AccountSubType,
1249
+ $s as AccountType,
1250
+ ks as AccountTypeName,
1251
+ rs as AnalyticsApi,
1240
1252
  h as ApiEndpoints,
1241
- G as BannerApi,
1242
- Ve as BarChart,
1243
- is as BeatApi,
1253
+ F as BannerApi,
1254
+ Ze as BarChart,
1255
+ cs as BeatApi,
1244
1256
  Br as BudgetNotificationTypes,
1245
- gs as Calendar,
1246
- ps as CalendarSelectionTypes,
1247
- ds as CategoryApi,
1248
- eo as CategoryColors,
1249
- so as CategoryGuidToName,
1257
+ ps as Calendar,
1258
+ ms as CalendarSelectionTypes,
1259
+ ls as CategoryApi,
1260
+ Vr as CategoryColors,
1261
+ Zr as CategoryGuidToName,
1250
1262
  E as CategoryGuids,
1251
- ro as CategoryIcon,
1252
- pr as ConnectCard,
1253
- ks as ConnectDrawer,
1254
- $s as ConnectionStatus,
1255
- Rs as ConnectionStatusEnums,
1256
- no as CurrencyCodes,
1257
- Ys as CurrencyInput,
1258
- Sr as CurrencyText,
1259
- Gr as DATE_FORMATS_INTL,
1263
+ Jr as CategoryIcon,
1264
+ mr as ConnectCard,
1265
+ Rs as ConnectDrawer,
1266
+ Us as ConnectionStatus,
1267
+ Ps as ConnectionStatusEnums,
1268
+ so as CurrencyCodes,
1269
+ Qs as CurrencyInput,
1270
+ br as CurrencyText,
1271
+ Pr as DATE_FORMATS_INTL,
1260
1272
  gt as DEFAULT_DONUT_SIZE,
1261
1273
  pt as DEFAULT_STROKE_WIDTH,
1262
- ar as DataRow,
1274
+ nr as DataRow,
1263
1275
  As as DateRangeSelector,
1264
- Fr as Dialog,
1265
- $r as Donut,
1266
- Kr as Drawer,
1267
- wr as EmptyState,
1268
- ys as ErrorBoundary,
1276
+ Or as Dialog,
1277
+ Yr as Drawer,
1278
+ xr as EmptyState,
1279
+ Ss as ErrorBoundary,
1269
1280
  Os as ErrorStatuses,
1270
- Ut as ExpenseStatus,
1271
- y as Fetch,
1272
- nr as Frequency,
1273
- R as GlobalCopyApi,
1274
- te as GlobalCopyStore,
1275
- fo as GlobalDataContext,
1276
- yo as GlobalDataProvider,
1277
- Je as GlobalStore,
1278
- mr as GoalType,
1279
- Vr as INCOME_ACCOUNT_TYPES,
1280
- rr as IconBacking,
1281
- hr as InformationTooltip,
1281
+ Gt as ExpenseStatus,
1282
+ S as Fetch,
1283
+ ir as Frequency,
1284
+ $ as GlobalCopyApi,
1285
+ ee as GlobalCopyStore,
1286
+ go as GlobalDataContext,
1287
+ po as GlobalDataProvider,
1288
+ ts as GlobalStore,
1289
+ _r as GoalType,
1290
+ zr as INCOME_ACCOUNT_TYPES,
1291
+ or as IconBacking,
1292
+ gr as InformationTooltip,
1282
1293
  Ir as InsightNotificationTypes,
1283
- $t as IterationItemTypes,
1284
- Qe as LOADING_STATUS,
1285
- Or as LineChart,
1286
- Cr as ListItemAction,
1294
+ Ut as IterationItemTypes,
1295
+ ze as LOADING_STATUS,
1296
+ vr as ListItemAction,
1287
1297
  Ar as ListItemRow,
1288
- ms as ListItemWrapper,
1298
+ _s as ListItemWrapper,
1289
1299
  Xs as Loader,
1290
1300
  je as LocalizedCopyApi,
1291
- _r as MetaType,
1292
- Ps as MfaStatuses,
1293
- bs as MicroWidgetContainer,
1294
- xs as MiniWidgetContainer,
1295
- Ze as MultiSegmentDonut,
1296
- Us as NonConnectedStatuses,
1297
- us as NotificationApi,
1301
+ fr as MetaType,
1302
+ Ls as MfaStatuses,
1303
+ ws as MicroWidgetContainer,
1304
+ Cs as MiniWidgetContainer,
1305
+ Je as MultiSegmentDonut,
1306
+ Gs as NonConnectedStatuses,
1307
+ hs as NotificationApi,
1298
1308
  Nr as NotificationTypes,
1299
- Wr as ORDINAL_DATE_FORMAT,
1300
- qr as ORDINAL_MONTH_DAY_YEAR_FORMAT,
1301
- Zr as PAYMENT_ACCOUNT_TYPES,
1302
- oo as PaymentCategories,
1303
- kt as PlanTypes,
1309
+ Lr as ORDINAL_DATE_FORMAT,
1310
+ Gr as ORDINAL_MONTH_DAY_YEAR_FORMAT,
1311
+ Xr as PAYMENT_ACCOUNT_TYPES,
1312
+ to as PaymentCategories,
1313
+ Rt as PlanTypes,
1304
1314
  Hs as ProcessingStatuses,
1305
- Gs as PropertyType,
1306
- Fs as PropertyTypeName,
1307
- Ye as RECURRENCE_COPY,
1308
- ir as RecurrenceStatus,
1309
- cr as RecurrenceType,
1310
- Lt as RecurrenceTypes,
1311
- dr as RepeatingType,
1315
+ Fs as PropertyType,
1316
+ Ws as PropertyTypeName,
1317
+ Qe as RECURRENCE_COPY,
1318
+ cr as RecurrenceStatus,
1319
+ dr as RecurrenceType,
1320
+ kt as RecurrenceTypes,
1321
+ lr as RepeatingType,
1312
1322
  Ks as ResponsiveButton,
1313
- Jr as SPENDING_ACCOUNT_TYPES,
1323
+ jr as SPENDING_ACCOUNT_TYPES,
1314
1324
  Ht as ScheduledPaymentTypes,
1315
1325
  Ke as ScheduledPaymentsApi,
1316
- Gt as ScreenSize,
1317
- Vs as SearchBox,
1318
- lr as Select,
1319
- Js as SelectionBox,
1320
- Xr as SingleSegmentDonut,
1321
- po as Sizes,
1322
- vr as StackedLineChart,
1323
- Ur as StatusBar,
1324
- Ws as StatusName,
1325
- mo as TOUCH_TARGET,
1326
- er as TabContentContainer,
1326
+ Ft as ScreenSize,
1327
+ Zs as SearchBox,
1328
+ ur as Select,
1329
+ tr as SelectionBox,
1330
+ Wr as SingleSegmentDonut,
1331
+ lo as Sizes,
1332
+ Rr as StatusBar,
1333
+ qs as StatusName,
1334
+ uo as TOUCH_TARGET,
1335
+ sr as TabContentContainer,
1327
1336
  Mr as ToggleButtonListItem,
1328
- Lr as ToggleListItem,
1329
- fr as TrackType,
1330
- _s as TransactionStatus,
1337
+ $r as ToggleListItem,
1338
+ yr as TrackType,
1339
+ fs as TransactionStatus,
1331
1340
  rt as TransactionType,
1332
- F as UserApi,
1333
- le as UserStore,
1334
- Pt as UserVerification,
1341
+ k as UserApi,
1342
+ ue as UserStore,
1343
+ Lt as UserVerification,
1335
1344
  W as WidgetApi,
1336
- vs as WidgetContainer,
1337
- So as WidgetContainerContext,
1338
- bo as WidgetContainerProvider,
1339
- rs as analyticsSession,
1340
- ca as buildDynamicCopy,
1341
- da as buildPluralCopy,
1342
- io as formatCurrency,
1343
- Yr as formatDate,
1344
- co as formatOrdinal,
1345
- lo as formatPercentage,
1346
- na as fromTimestampToMonthYear,
1347
- ta as getCategory,
1348
- ea as getCategoryTotalsByParent,
1345
+ Es as WidgetContainer,
1346
+ mo as WidgetContainerContext,
1347
+ _o as WidgetContainerProvider,
1348
+ os as analyticsSession,
1349
+ na as buildDynamicCopy,
1350
+ ia as buildPluralCopy,
1351
+ ro as formatCurrency,
1352
+ Hr as formatDate,
1353
+ oo as formatOrdinal,
1354
+ ao as formatPercentage,
1355
+ oa as fromTimestampToMonthYear,
1356
+ Zo as getCategory,
1357
+ Jo as getCategoryTotalsByParent,
1349
1358
  Xe as getClientTheme,
1350
- uo as getCurrencyCodes,
1351
- sa as getDetailedCategory,
1352
- ra as getDetailedSubCategory,
1353
- la as getLocale,
1354
- oa as isIncome,
1355
- ho as isValidNumber,
1356
- jo as useAccountDisplayName,
1357
- wo as useAccountStore,
1358
- xo as useAppConfig,
1359
- Co as useBudgetsStore,
1360
- Do as useCashflowStore,
1361
- Ao as useCategoryStore,
1362
- os as useCombineEvents,
1363
- as as useCombinePageviews,
1364
- vo as useDebtStore,
1365
- Eo as useError,
1366
- To as useEvent,
1367
- Bo as useFinstrongStore,
1368
- Io as useGlobalCopyStore,
1369
- No as useGlobalStore,
1370
- Mo as useGlobalUiStore,
1371
- Lo as useGoalStore,
1372
- ko as useHelpStore,
1373
- $o as useHoldingStore,
1374
- zo as useInsightsEnabled,
1375
- Ro as useLoad,
1376
- Oo as useMerchantStore,
1377
- Po as useNetWorthStore,
1378
- Uo as useNotificationStore,
1379
- Ho as usePageView,
1380
- ze as usePrevious,
1381
- Go as useRecurringTransactionsStore,
1382
- Zo as useScreenSize,
1383
- Fo as useSettingsStore,
1384
- Wo as useTransactionStore,
1385
- qo as useTrendsStore,
1386
- Yo as useUserStore,
1387
- Qo as useWidgetContainerProvider
1359
+ no as getCurrencyCodes,
1360
+ ta as getDetailedCategory,
1361
+ ea as getDetailedSubCategory,
1362
+ ca as getLocale,
1363
+ sa as isIncome,
1364
+ io as isValidNumber,
1365
+ qo as useAccountDisplayName,
1366
+ fo as useAccountStore,
1367
+ yo as useAppConfig,
1368
+ So as useBudgetsStore,
1369
+ bo as useCashflowStore,
1370
+ wo as useCategoryStore,
1371
+ as as useCombineEvents,
1372
+ ns as useCombinePageviews,
1373
+ xo as useDebtStore,
1374
+ Co as useError,
1375
+ vo as useEvent,
1376
+ Do as useFinstrongStore,
1377
+ Ao as useGlobalCopyStore,
1378
+ Eo as useGlobalStore,
1379
+ To as useGlobalUiStore,
1380
+ Bo as useGoalStore,
1381
+ Io as useHelpStore,
1382
+ No as useHoldingStore,
1383
+ Qo as useInsightsEnabled,
1384
+ Mo as useLoad,
1385
+ $o as useMerchantStore,
1386
+ ko as useNetWorthStore,
1387
+ Ro as useNotificationStore,
1388
+ Uo as usePageView,
1389
+ Ve as usePrevious,
1390
+ Po as useRecurringTransactionsStore,
1391
+ Xo as useScreenSize,
1392
+ Oo as useSettingsStore,
1393
+ Lo as useTransactionStore,
1394
+ Go as useTrendsStore,
1395
+ Ho as useUserStore,
1396
+ Fo as useWidgetContainerProvider,
1397
+ Ko as useWidgetLoadTimer
1388
1398
  };