@mx-cartographer/experiences 9.0.0-alpha.mega1 → 9.0.0

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 (773) hide show
  1. package/CHANGELOG.md +676 -9
  2. package/README.md +216 -47
  3. package/dist/{Account-CMjOp7S2.mjs → Account-BaJmiJAG.mjs} +4 -4
  4. package/dist/{Account-BIKn4XEZ.mjs → Account-BxHMlV9R.mjs} +1 -1
  5. package/dist/AccountDetailsHeader-DIysk_4w.mjs +95 -0
  6. package/dist/AccountFields-mwJ8NXsX.mjs +141 -0
  7. package/dist/AccountListItem-BDXHs4tV.mjs +94 -0
  8. package/dist/AccountUtils-T5_Odvos.mjs +27 -0
  9. package/dist/Accounts-CseLC3lL.mjs +5 -0
  10. package/dist/Analytics-CkYXKvco.mjs +53 -0
  11. package/dist/Analytics-CzGzz_sE.mjs +136 -0
  12. package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
  13. package/dist/BudgetUtil-Bg2AQJpQ.mjs +74 -0
  14. package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
  15. package/dist/{CategorySelectorDrawer-C4aZYP4N.mjs → CategorySelectorDrawer-CmaDLhnf.mjs} +131 -119
  16. package/dist/Connect-Dk6GZEsA.mjs +39 -0
  17. package/dist/ConnectCard-CCep7Zqe.mjs +54 -0
  18. package/dist/ConnectDrawer-Cnjr3Ddg.mjs +58 -0
  19. package/dist/{ConnectionsDrawer-BExzgE16.mjs → ConnectionsDrawer-CtfPXk0M.mjs} +13 -12
  20. package/dist/CurrencyDialog-DumQCTPO.mjs +373 -0
  21. package/dist/CurrencyInput-adTIRtL3.mjs +87 -0
  22. package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CCbE6MmF.mjs} +1 -1
  23. package/dist/DateFormats-HudZ3Bjs.mjs +64 -0
  24. package/dist/DateUtil-Bhq59ZVg.mjs +58 -0
  25. package/dist/DebtUtils-DD3186U-.mjs +153 -0
  26. package/dist/Dialog-CwWc0AbH.mjs +63 -0
  27. package/dist/Donut-SzzfZDHF.mjs +88 -0
  28. package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-BXqqBMxg.mjs} +32 -34
  29. package/dist/EmbeddedCard-DPwJjqMH.mjs +856 -0
  30. package/dist/{EmptyState-DoxNUae-.mjs → EmptyState-CJUDc3kD.mjs} +21 -22
  31. package/dist/Error-Dogaw2jO.mjs +84 -0
  32. package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
  33. package/dist/{ExportCsvAction-oG_Mn66T.mjs → ExportCsvAction-Bw02ZJEj.mjs} +6 -6
  34. package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +237 -0
  35. package/dist/GlobalCopyApi-wcnDUzMV.mjs +128 -0
  36. package/dist/GoalsUtil-C9EnLWvC.mjs +107 -0
  37. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  38. package/dist/{Help-c-zHlDbv.mjs → Help-CkQTjORd.mjs} +6 -27
  39. package/dist/{Help-BW_ar-4B.mjs → Help-DJ8PrVHX.mjs} +594 -562
  40. package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
  41. package/dist/{InvestmentUtil-jOyOgzIB.mjs → InvestmentUtil-BItV7uEs.mjs} +17 -17
  42. package/dist/LineChart-CejWS_rh.mjs +612 -0
  43. package/dist/{ListItemAction-Cbr3417C.mjs → ListItemAction-CwspSmQi.mjs} +26 -26
  44. package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
  45. package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
  46. package/dist/Loader-CxeBwuPG.mjs +21 -0
  47. package/dist/Localization-DnoVyBNK.mjs +38 -0
  48. package/dist/ManageIncome-B1JfqslT.mjs +595 -0
  49. package/dist/{MicroWidgetContainer-DSyYwRCU.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +2 -2
  50. package/dist/MiniWidgetContainer-BdPiUU-u.mjs +66 -0
  51. package/dist/NetWorthUtils-DilGN1nW.mjs +95 -0
  52. package/dist/Notification-DTNYSd8P.mjs +7 -0
  53. package/dist/{NotificationSettings-e789PcRb.mjs → NotificationSettings-6p-h5phZ.mjs} +143 -142
  54. package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
  55. package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting--XMeeBfr.mjs} +2 -1
  56. package/dist/OriginalBalanceAction-CkJPnp2c.mjs +114 -0
  57. package/dist/{RecurringSettings-BpCUcE8w.mjs → RecurringSettings-cm6MK_aS.mjs} +4 -4
  58. package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +253 -0
  59. package/dist/{ResponsiveButton-C6KH8JH4.mjs → ResponsiveButton-CC9F_Ezk.mjs} +4 -4
  60. package/dist/SearchBox-Cpgu_gdO.mjs +50 -0
  61. package/dist/Select-BFt-HD-L.mjs +55 -0
  62. package/dist/SelectionBox-B4xELRgp.mjs +48 -0
  63. package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +1 -1
  64. package/dist/Sizes-DISGrlUg.mjs +6 -0
  65. package/dist/{SpendingData-B7NuTQ9s.mjs → SpendingData-PKlh8caU.mjs} +6 -6
  66. package/dist/SpendingLegend-5Ct_FZ8o.mjs +193 -0
  67. package/dist/ToggleListItem-Dl1lXNwj.mjs +91 -0
  68. package/dist/TransactionDetails-C3dlAzYf.mjs +1714 -0
  69. package/dist/TransactionUtils-BphBJBbU.mjs +234 -0
  70. package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
  71. package/dist/UserStore-CRpKQjpP.mjs +3002 -0
  72. package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +1295 -0
  73. package/dist/WidgetContainer-DNuz_s7W.mjs +479 -0
  74. package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
  75. package/dist/accounts/AccountsWidget.d.ts +1 -1
  76. package/dist/accounts/components/AccountListItem.d.ts +1 -1
  77. package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
  78. package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
  79. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
  80. package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
  81. package/dist/accounts/hooks/useUiStore.d.ts +6 -1
  82. package/dist/accounts/index.d.ts +0 -2
  83. package/dist/accounts/index.es.js +628 -527
  84. package/dist/accounts/utils/AccountDetails.d.ts +1 -1
  85. package/dist/accounts/utils/AccountFields.d.ts +3 -3
  86. package/dist/analytics/index.es.js +93 -112
  87. package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
  88. package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
  89. package/dist/budgets/components/BubbleChart.d.ts +1 -1
  90. package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +11 -0
  91. package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
  92. package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
  93. package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
  94. package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
  95. package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
  96. package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
  97. package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
  98. package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
  99. package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
  100. package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
  101. package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
  102. package/dist/budgets/index.d.ts +2 -1
  103. package/dist/budgets/index.es.js +989 -813
  104. package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
  105. package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
  106. package/dist/cashflow/CashflowWidget.d.ts +1 -1
  107. package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
  108. package/dist/cashflow/context/hooks.d.ts +15 -1
  109. package/dist/cashflow/index.d.ts +0 -2
  110. package/dist/cashflow/index.es.js +461 -490
  111. package/dist/cashflow/util/Filters.d.ts +1 -1
  112. package/dist/categories/components/CategoryRow.d.ts +1 -1
  113. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
  114. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
  115. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
  116. package/dist/categories/components/SubcategoryList.d.ts +1 -1
  117. package/dist/categories/components/SubcategoryRow.d.ts +1 -1
  118. package/dist/categories/context/hooks.d.ts +19 -1
  119. package/dist/categories/index.d.ts +0 -1
  120. package/dist/categories/index.es.js +4 -6
  121. package/dist/common/components/CurrencyDialog.d.ts +19 -0
  122. package/dist/common/components/CurrencyInput.d.ts +1 -1
  123. package/dist/common/components/EmptyState.d.ts +0 -1
  124. package/dist/common/components/Error.d.ts +13 -0
  125. package/dist/common/components/GlobalAccountFilter.d.ts +3 -2
  126. package/dist/common/components/Loader.d.ts +1 -2
  127. package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
  128. package/dist/common/components/TinyBarChart.d.ts +10 -0
  129. package/dist/common/components/WidgetContainer.d.ts +4 -3
  130. package/dist/common/components/WidgetDateRangeSelector.d.ts +12 -0
  131. package/dist/common/components/charts/LineChart.d.ts +1 -0
  132. package/dist/common/components/charts/index.d.ts +1 -0
  133. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
  134. package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
  135. package/dist/common/components/charts/stackedlinechart/CustomAreaTooltip.d.ts +1 -1
  136. package/dist/common/components/daterangeselector/DateRangeSelector.d.ts +1 -0
  137. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
  138. package/dist/common/components/index.d.ts +2 -1
  139. package/dist/common/constants/Account.d.ts +1 -1
  140. package/dist/common/constants/Analytics.d.ts +12 -0
  141. package/dist/common/constants/ScheduledPayment.d.ts +1 -10
  142. package/dist/common/constants/SpendingPlan.d.ts +0 -10
  143. package/dist/common/constants/index.d.ts +2 -6
  144. package/dist/common/context/GlobalDataProvider.d.ts +2 -1
  145. package/dist/common/context/hooks.d.ts +24 -24
  146. package/dist/common/hooks/index.d.ts +2 -0
  147. package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
  148. package/dist/common/hooks/useCombineEvents.d.ts +1 -1
  149. package/dist/common/hooks/usePrevious.d.ts +2 -0
  150. package/dist/common/hooks/useWidgetHeaderStyles.d.ts +34 -0
  151. package/dist/common/index.d.ts +3 -3
  152. package/dist/common/index.es.js +254 -1348
  153. package/dist/common/utils/AccountDisplayName.d.ts +1 -1
  154. package/dist/common/utils/AccountFilter.d.ts +2 -2
  155. package/dist/common/utils/Analytics.d.ts +1 -1
  156. package/dist/common/utils/PostMessage.d.ts +1 -0
  157. package/dist/common/utils/Theme.d.ts +7 -6
  158. package/dist/common/utils/index.d.ts +1 -6
  159. package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
  160. package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
  161. package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
  162. package/dist/{common → core}/api/BannerApi.d.ts +1 -1
  163. package/dist/{common → core}/api/BeatApi.d.ts +2 -2
  164. package/dist/{budgets → core}/api/BudgetsApi.d.ts +5 -1
  165. package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
  166. package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
  167. package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
  168. package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
  169. package/dist/{help → core}/api/HelpApi.d.ts +2 -2
  170. package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
  171. package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
  172. package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
  173. package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -1
  174. package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
  175. package/dist/{settings → core}/api/SettingsApi.d.ts +2 -3
  176. package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
  177. package/dist/{common → core}/api/UserApi.d.ts +2 -2
  178. package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
  179. package/dist/core/api/index.d.ts +20 -0
  180. package/dist/{common → core}/constants/ApiEndpoints.d.ts +1 -2
  181. package/dist/{common → core}/constants/DefaultConfig.d.ts +1 -1
  182. package/dist/core/constants/Transaction.d.ts +10 -0
  183. package/dist/core/constants/index.d.ts +4 -0
  184. package/dist/core/constants/repeatingTransactions.d.ts +10 -0
  185. package/dist/core/index.d.ts +4 -0
  186. package/dist/core/index.es.js +108 -0
  187. package/dist/{accounts → core}/stores/AccountStore.d.ts +15 -3
  188. package/dist/{analytics → core}/stores/AnalyticsStore.d.ts +1 -1
  189. package/dist/{common → core}/stores/AppDataStore.d.ts +1 -2
  190. package/dist/{insights/store → core/stores}/BeatStore.d.ts +3 -3
  191. package/dist/{budgets/store → core/stores}/BudgetsStore.d.ts +15 -2
  192. package/dist/{cashflow/stores/UiStore.d.ts → core/stores/CashflowStore.d.ts} +10 -2
  193. package/dist/{categories → core}/stores/CategoryStore.d.ts +24 -2
  194. package/dist/{common → core}/stores/ConnectStore.d.ts +1 -1
  195. package/dist/core/stores/DebtsStore.d.ts +22 -0
  196. package/dist/{finstrong → core}/stores/FinstrongStore.d.ts +5 -4
  197. package/dist/{common → core}/stores/GlobalStore.d.ts +4 -25
  198. package/dist/{goals → core}/stores/GoalStore.d.ts +3 -2
  199. package/dist/{help/store → core/stores}/HelpStore.d.ts +4 -5
  200. package/dist/{investments → core}/stores/HoldingStore.d.ts +4 -3
  201. package/dist/{merchants → core}/stores/MerchantStore.d.ts +3 -2
  202. package/dist/{networth → core}/stores/NetWorthStore.d.ts +3 -3
  203. package/dist/{notifications → core}/stores/NotificationStore.d.ts +3 -1
  204. package/dist/{recurringtransactions → core}/stores/RecurringTransactionsStore.d.ts +3 -2
  205. package/dist/{settings → core}/stores/SettingsStore.d.ts +4 -4
  206. package/dist/{transactions → core}/stores/TransactionStore.d.ts +30 -4
  207. package/dist/{trends → core}/stores/TrendsStore.d.ts +11 -4
  208. package/dist/core/stores/index.d.ts +24 -0
  209. package/dist/{common → core}/types/Analytics.d.ts +6 -3
  210. package/dist/{common → core}/types/AppData.d.ts +8 -2
  211. package/dist/{common → core}/types/Beat.d.ts +2 -0
  212. package/dist/{common → core}/types/Budget.d.ts +8 -0
  213. package/dist/{common → core}/types/Client.d.ts +1 -0
  214. package/dist/{common → core}/types/Expense.d.ts +2 -1
  215. package/dist/{common → core}/types/Finstrong.d.ts +0 -2
  216. package/dist/{networth → core}/types/NetWorth.d.ts +1 -10
  217. package/dist/{common → core}/types/Notification.d.ts +15 -5
  218. package/dist/core/types/Offer.d.ts +32 -0
  219. package/dist/{common → core}/types/Widgets.d.ts +1 -0
  220. package/dist/{common → core}/types/index.d.ts +4 -3
  221. package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +26 -0
  222. package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
  223. package/dist/{common → core}/types/localization/CommonCopy.d.ts +3 -0
  224. package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
  225. package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -1
  226. package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +11 -0
  227. package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
  228. package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
  229. package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +11 -6
  230. package/dist/{common → core}/types/localization/TrendsCopy.d.ts +2 -0
  231. package/dist/{accounts/utils/Accounts.d.ts → core/utils/AccountUtils.d.ts} +2 -2
  232. package/dist/{microinsights/utils/beatUtils.d.ts → core/utils/BeatUtils.d.ts} +1 -1
  233. package/dist/{budgets → core}/utils/BudgetUtil.d.ts +7 -2
  234. package/dist/{categories/util → core/utils}/CategoryUtil.d.ts +6 -1
  235. package/dist/core/utils/DebtUtils.d.ts +31 -0
  236. package/dist/core/utils/FinstrongUtils.d.ts +7 -0
  237. package/dist/{goals/util → core/utils}/GoalsUtil.d.ts +1 -1
  238. package/dist/core/utils/HelpUtil.d.ts +3 -0
  239. package/dist/{investments/util → core/utils}/InvestmentUtil.d.ts +2 -2
  240. package/dist/{common → core}/utils/Localization.d.ts +9 -1
  241. package/dist/{networth → core}/utils/NetWorthUtils.d.ts +1 -2
  242. package/dist/{notifications → core}/utils/NotificationUtils.d.ts +2 -1
  243. package/dist/{common → core}/utils/NumberFormatting.d.ts +1 -1
  244. package/dist/{recurringtransactions/util/RecurringTransactions.d.ts → core/utils/RecurringTransactionsUtil.d.ts} +2 -2
  245. package/dist/{settings/util/Notifications.d.ts → core/utils/SettingsUtil.d.ts} +1 -1
  246. package/dist/{transactions/utils/buildDetailedTransactions.d.ts → core/utils/TransactionUtils.d.ts} +12 -2
  247. package/dist/{trends/utils/TrendsData.d.ts → core/utils/TrendsUtil.d.ts} +1 -1
  248. package/dist/core/utils/index.d.ts +2 -0
  249. package/dist/dashboard/index.es.js +39 -38
  250. package/dist/debts/DebtsWidget.d.ts +1 -1
  251. package/dist/debts/components/DebtsChart.d.ts +1 -1
  252. package/dist/debts/components/DebtsTable.d.ts +1 -1
  253. package/dist/debts/components/SnowballCard.d.ts +1 -1
  254. package/dist/debts/components/actions/DebtsPriorityAction.d.ts +6 -1
  255. package/dist/debts/components/actions/InterestRateAction.d.ts +1 -1
  256. package/dist/debts/components/actions/MonthlyPaymentAction.d.ts +1 -1
  257. package/dist/debts/components/actions/OriginalBalanceAction.d.ts +1 -1
  258. package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
  259. package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +3 -1
  260. package/dist/debts/hooks/useDebtsUiStore.d.ts +1 -1
  261. package/dist/debts/index.d.ts +0 -1
  262. package/dist/debts/index.es.js +715 -775
  263. package/dist/debts/utils/DebtsTable.d.ts +1 -1
  264. package/dist/debts/utils/SnowballCard.d.ts +2 -2
  265. package/dist/finstrong/FinstrongWidget.d.ts +2 -2
  266. package/dist/finstrong/components/HealthChart.d.ts +1 -1
  267. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
  268. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
  269. package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
  270. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
  271. package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
  272. package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
  273. package/dist/finstrong/index.d.ts +0 -2
  274. package/dist/finstrong/index.es.js +1587 -1349
  275. package/dist/finstrong/util/finstrongUtils.d.ts +3 -9
  276. package/dist/goals/GoalsWidget.d.ts +2 -2
  277. package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
  278. package/dist/goals/components/AddGoal.d.ts +1 -1
  279. package/dist/goals/components/GoalDetails.d.ts +1 -1
  280. package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
  281. package/dist/goals/components/GoalList.d.ts +1 -1
  282. package/dist/goals/components/GoalStatusCard.d.ts +1 -1
  283. package/dist/goals/components/ManageGoals.d.ts +1 -1
  284. package/dist/goals/components/actions/AccountAction.d.ts +1 -1
  285. package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
  286. package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
  287. package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
  288. package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
  289. package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
  290. package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
  291. package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
  292. package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
  293. package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
  294. package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
  295. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +2 -2
  296. package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
  297. package/dist/goals/components/managegoals/OngoingListItem.d.ts +3 -2
  298. package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
  299. package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
  300. package/dist/goals/index.d.ts +0 -2
  301. package/dist/goals/index.es.js +707 -787
  302. package/dist/help/HelpWidget.d.ts +2 -2
  303. package/dist/help/components/HelpContent.d.ts +1 -1
  304. package/dist/help/components/HelpList.d.ts +1 -1
  305. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  306. package/dist/help/components/content/ContentItem.d.ts +1 -1
  307. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  308. package/dist/help/components/content/NoImageContent.d.ts +1 -1
  309. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  310. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  311. package/dist/help/components/content/section/Accounts.d.ts +1 -1
  312. package/dist/help/components/content/section/Budgets.d.ts +1 -1
  313. package/dist/help/components/content/section/CashFlow.d.ts +1 -1
  314. package/dist/help/components/content/section/Debts.d.ts +1 -1
  315. package/dist/help/components/content/section/General.d.ts +1 -1
  316. package/dist/help/components/content/section/Goals.d.ts +1 -1
  317. package/dist/help/components/content/section/Insights.d.ts +1 -1
  318. package/dist/help/components/content/section/Investments.d.ts +1 -1
  319. package/dist/help/components/content/section/Mobile.d.ts +1 -1
  320. package/dist/help/components/content/section/NetWorth.d.ts +1 -1
  321. package/dist/help/components/content/section/Notifications.d.ts +1 -1
  322. package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
  323. package/dist/help/components/content/section/Spending.d.ts +1 -1
  324. package/dist/help/components/content/section/Transactions.d.ts +1 -1
  325. package/dist/help/components/content/section/Trends.d.ts +1 -1
  326. package/dist/help/components/content/section/index.d.ts +15 -15
  327. package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
  328. package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
  329. package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
  330. package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
  331. package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
  332. package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
  333. package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
  334. package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
  335. package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
  336. package/dist/help/index.es.js +19 -10
  337. package/dist/help/utils/index.d.ts +0 -1
  338. package/dist/{hooks-fY_n74f7.mjs → hooks-BaO_gOI6.mjs} +23 -23
  339. package/dist/insights/components/feed/Header.d.ts +8 -0
  340. package/dist/insights/components/index.d.ts +53 -0
  341. package/dist/insights/components/insights/AccountDiscoverability/AccountDiscoverability.d.ts +3 -0
  342. package/dist/insights/components/insights/AccountDiscoverability/index.d.ts +1 -0
  343. package/dist/insights/components/insights/AccountDiscoverability/types/AccountDiscoverability.d.ts +3 -0
  344. package/dist/insights/components/insights/AmericanUpcomingTaxDeadlineAlert/AmericanUpcomingTaxDeadlineAlert.d.ts +2 -0
  345. package/dist/insights/components/insights/AmericanUpcomingTaxDeadlineAlert/index.d.ts +1 -0
  346. package/dist/insights/components/insights/AmericanUpcomingTaxDeadlineAlert/types/AmericanUpcomingTaxDeadlineProps.d.ts +4 -0
  347. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandard.d.ts +3 -0
  348. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.d.ts +3 -0
  349. package/dist/insights/components/insights/BillAmountNotStandard/index.d.ts +2 -0
  350. package/dist/insights/components/insights/BillAmountNotStandard/types/BillAmountNotStandard.d.ts +4 -0
  351. package/dist/insights/components/insights/CashBack/CashBack.d.ts +3 -0
  352. package/dist/insights/components/insights/CashBack/index.d.ts +1 -0
  353. package/dist/insights/components/insights/CashBack/types/CashBack.d.ts +7 -0
  354. package/dist/insights/components/insights/CategoryBudget/CategoryBudget.d.ts +3 -0
  355. package/dist/insights/components/insights/CategoryBudget/index.d.ts +1 -0
  356. package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +10 -0
  357. package/dist/insights/components/insights/CategorySpendingV2/CategorySpendingV2.d.ts +2 -0
  358. package/dist/insights/components/insights/CategorySpendingV2/CategorySpendingV2MUI.d.ts +2 -0
  359. package/dist/insights/components/insights/CategorySpendingV2/index.d.ts +2 -0
  360. package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +7 -0
  361. package/dist/insights/components/insights/CelebrateCreditCardPayoff/CelebrateCreditCardPayoff.d.ts +3 -0
  362. package/dist/insights/components/insights/CelebrateCreditCardPayoff/index.d.ts +1 -0
  363. package/dist/insights/components/insights/CelebrateCreditCardPayoff/types/CelebrateCreditCardPayoffProps.d.ts +9 -0
  364. package/dist/insights/components/insights/CustomTransaction/CustomTransaction.d.ts +3 -0
  365. package/dist/insights/components/insights/CustomTransaction/index.d.ts +1 -0
  366. package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsBody.d.ts +9 -0
  367. package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsLearnMoreDrawerContent.d.ts +21 -0
  368. package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsMiniInsight.d.ts +6 -0
  369. package/dist/insights/components/insights/DiscoveredAccounts/index.d.ts +3 -0
  370. package/dist/insights/components/insights/FederalBankHoliday/FederalBankHoliday.d.ts +3 -0
  371. package/dist/insights/components/insights/FederalBankHoliday/FederalBankHolidayMUI.d.ts +3 -0
  372. package/dist/insights/components/insights/FederalBankHoliday/index.d.ts +2 -0
  373. package/dist/insights/components/insights/FederalBankHoliday/types/FederalBankHoliday.d.ts +4 -0
  374. package/dist/insights/components/insights/MarketingHub/Offer.d.ts +3 -0
  375. package/dist/insights/components/insights/MarketingHub/Types.d.ts +33 -0
  376. package/dist/insights/components/insights/MarketingHub/index.d.ts +2 -0
  377. package/dist/insights/components/insights/MonthlyDebtToIncomeComparisonV2/MonthlyDebtToIncomeComparisonV2.d.ts +2 -0
  378. package/dist/insights/components/insights/MonthlyDebtToIncomeComparisonV2/index.d.ts +1 -0
  379. package/dist/insights/components/insights/MonthlyDebtToIncomeComparisonV2/types/index.d.ts +4 -0
  380. package/dist/insights/components/insights/MonthlyEmergencyFundReview/LastMonthsContributionSection.d.ts +6 -0
  381. package/dist/insights/components/insights/MonthlyEmergencyFundReview/MonthlyEmergencyFundReviewBody.d.ts +21 -0
  382. package/dist/insights/components/insights/MonthlyEmergencyFundReview/ProjectedCompletionSection.d.ts +6 -0
  383. package/dist/insights/components/insights/MonthlyEmergencyFundReview/TotalSection.d.ts +7 -0
  384. package/dist/insights/components/insights/MonthlyEmergencyFundReview/index.d.ts +4 -0
  385. package/dist/insights/components/insights/MonthlySavingsToIncomeComparison/MonthlySavingsToIncomeComparison.d.ts +2 -0
  386. package/dist/insights/components/insights/MonthlySavingsToIncomeComparison/index.d.ts +1 -0
  387. package/dist/insights/components/insights/MonthlySavingsToIncomeComparison/types/index.d.ts +4 -0
  388. package/dist/insights/components/insights/MonthlySpendToIncomeComparisonV2/MonthlySpendToIncomeComparisonV2.d.ts +2 -0
  389. package/dist/insights/components/insights/MonthlySpendToIncomeComparisonV2/index.d.ts +1 -0
  390. package/dist/insights/components/insights/MonthlySpendToIncomeComparisonV2/types/index.d.ts +4 -0
  391. package/dist/insights/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.d.ts +3 -0
  392. package/dist/insights/components/insights/MonthlySpendingComparisonV2/__test__/MonthlySpendComparisonV2.test.d.ts +1 -0
  393. package/dist/insights/components/insights/MonthlySpendingComparisonV2/index.d.ts +1 -0
  394. package/dist/insights/components/insights/MonthlySpendingComparisonV2/types/MonthlySpendComparisonV2.d.ts +4 -0
  395. package/dist/insights/components/insights/P2pCategorization/P2pCategorization.d.ts +3 -0
  396. package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
  397. package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
  398. package/dist/insights/components/insights/P2pCategorization/index.d.ts +4 -0
  399. package/dist/insights/components/insights/P2pCategorization/shared/P2pCategorizationMultipleTransactions.d.ts +3 -0
  400. package/dist/insights/components/insights/P2pCategorization/shared/P2pCategorizationSingleTransaction.d.ts +3 -0
  401. package/dist/insights/components/insights/P2pCategorization/types/P2pCategorization.d.ts +17 -0
  402. package/dist/insights/components/insights/SavingsAccountBalancesSummary/SavingsAccountBalancesSummary.d.ts +2 -0
  403. package/dist/insights/components/insights/SavingsAccountBalancesSummary/index.d.ts +1 -0
  404. package/dist/insights/components/insights/SavingsAccountBalancesSummary/types/SavingsAccountBalancesSummary.d.ts +4 -0
  405. package/dist/insights/components/insights/SetUpDirectDeposit/SetUpDirectDepositBody.d.ts +3 -0
  406. package/dist/insights/components/insights/SetUpDirectDeposit/index.d.ts +1 -0
  407. package/dist/insights/components/insights/SharedDeposit/SharedDeposit.d.ts +2 -0
  408. package/dist/insights/components/insights/SharedDeposit/index.d.ts +1 -0
  409. package/dist/insights/components/insights/SharedDeposit/types/index.d.ts +7 -0
  410. package/dist/insights/components/insights/SwitchDirectDeposit/AccountBox.d.ts +7 -0
  411. package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.d.ts +10 -0
  412. package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.d.ts +9 -0
  413. package/dist/insights/components/insights/SwitchDirectDeposit/index.d.ts +3 -0
  414. package/dist/insights/components/insights/UnifiedDeposit/UnifiedDeposit.d.ts +7 -0
  415. package/dist/insights/components/insights/UnifiedDeposit/UnifiedDepositBody.d.ts +11 -0
  416. package/dist/insights/components/insights/UnifiedDeposit/index.d.ts +1 -0
  417. package/dist/insights/components/insights/UserFeedback/StyledToggleButton.d.ts +7 -0
  418. package/dist/insights/components/insights/UserFeedback/Types.d.ts +27 -0
  419. package/dist/insights/components/insights/UserFeedback/UserFeedback.d.ts +3 -0
  420. package/dist/insights/components/insights/UserFeedback/index.d.ts +1 -0
  421. package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +9 -0
  422. package/dist/insights/components/insights/WeeklyNoSpendDays/NoSpendIcons.d.ts +1 -0
  423. package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +12 -0
  424. package/dist/insights/components/insights/WeeklyNoSpendDays/_tests_/WeeklyNoSpendDays.test.d.ts +0 -0
  425. package/dist/insights/components/insights/WeeklyNoSpendDays/index.d.ts +1 -0
  426. package/dist/insights/components/insights/index.d.ts +25 -0
  427. package/dist/insights/components/shared/AccountBalanceCard.d.ts +13 -0
  428. package/dist/insights/components/shared/BottomSheet.d.ts +13 -0
  429. package/dist/insights/components/shared/CarouselControls.d.ts +14 -0
  430. package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +30 -0
  431. package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +9 -0
  432. package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +22 -0
  433. package/dist/insights/components/shared/Charts/BarChart/BarChart.d.ts +2 -0
  434. package/dist/insights/components/shared/Charts/BarChart/BarChartV2.d.ts +2 -0
  435. package/dist/insights/components/shared/Charts/BarChart/ChartLegend.d.ts +9 -0
  436. package/dist/insights/components/shared/Charts/BarChart/ChartLegendV2.d.ts +10 -0
  437. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlot.d.ts +18 -0
  438. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.d.ts +18 -0
  439. package/dist/insights/components/shared/Charts/BarChart/CustomDoubleBarPlot.d.ts +18 -0
  440. package/dist/insights/components/shared/Charts/BarChart/CustomDoubleBarPlotMXUI.d.ts +18 -0
  441. package/dist/insights/components/shared/Charts/BarChart/DoubleBarChart.d.ts +2 -0
  442. package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartLegend.d.ts +10 -0
  443. package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartLegendMXUI.d.ts +10 -0
  444. package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartMXUI.d.ts +2 -0
  445. package/dist/insights/components/shared/Charts/BarChart/index.d.ts +4 -0
  446. package/dist/insights/components/shared/Charts/EmptyBarChart.d.ts +1 -0
  447. package/dist/insights/components/shared/Charts/index.d.ts +2 -0
  448. package/dist/insights/components/shared/Confetti.d.ts +5 -0
  449. package/dist/insights/components/shared/ConnectionCard.d.ts +14 -0
  450. package/dist/insights/components/shared/ConnectionDetailDrillDown.d.ts +25 -0
  451. package/dist/insights/components/shared/Coupon.d.ts +8 -0
  452. package/dist/insights/components/shared/DeepLinks/DeepLinkDialog.d.ts +11 -0
  453. package/dist/insights/components/shared/DeepLinks/DirectDeposit/Circle.d.ts +6 -0
  454. package/dist/insights/components/shared/DeepLinks/DirectDeposit/DirectDepositDeepLink.d.ts +24 -0
  455. package/dist/insights/components/shared/DeepLinks/DirectDeposit/Dot.d.ts +1 -0
  456. package/dist/insights/components/shared/DeepLinks/DirectDeposit/Oval.d.ts +1 -0
  457. package/dist/insights/components/shared/DirectDeposit/DirectDeposit.d.ts +3 -0
  458. package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.d.ts +14 -0
  459. package/dist/insights/components/shared/DirectDeposit/FullFeedBodyHeader.d.ts +10 -0
  460. package/dist/insights/components/shared/DirectDeposit/LeftBox.d.ts +7 -0
  461. package/dist/insights/components/shared/DirectDeposit/MiniBodyHeader.d.ts +10 -0
  462. package/dist/insights/components/shared/DirectDeposit/RightBox.d.ts +8 -0
  463. package/dist/insights/components/shared/DiscoveredAccountsConnect.d.ts +8 -0
  464. package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
  465. package/dist/insights/components/shared/DrillDownCalculation/BalanceStepper.d.ts +12 -0
  466. package/dist/insights/components/shared/DrillDownCalculation/DrillDownCalculation.d.ts +31 -0
  467. package/dist/insights/components/shared/ErrorCard/ErrorCard.d.ts +8 -0
  468. package/dist/insights/components/shared/GenericFeedback/FeedbackButtons.d.ts +15 -0
  469. package/dist/insights/components/shared/GenericFeedback/FeedbackDescription.d.ts +5 -0
  470. package/dist/insights/components/shared/GenericFeedback/FeedbackHeader.d.ts +15 -0
  471. package/dist/insights/components/shared/GenericFeedback/FeedbackOptions.d.ts +12 -0
  472. package/dist/insights/components/shared/GenericFeedback/FeedbackText.d.ts +13 -0
  473. package/dist/insights/components/shared/GoalProgress.d.ts +10 -0
  474. package/dist/insights/components/shared/GradientBox.d.ts +8 -0
  475. package/dist/insights/components/shared/InsightsCard/BeatCard.d.ts +20 -0
  476. package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
  477. package/dist/insights/components/shared/InsightsCard/CardButtonSection.d.ts +7 -0
  478. package/dist/insights/components/shared/InsightsCard/CardError.d.ts +5 -0
  479. package/dist/insights/components/shared/InsightsCard/CardFooter.d.ts +7 -0
  480. package/dist/insights/components/shared/InsightsCard/CardHeader.d.ts +11 -0
  481. package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
  482. package/dist/insights/components/shared/InsightsCard/CardLoading.d.ts +5 -0
  483. package/dist/insights/components/shared/InsightsCard/ClientConfigurableCta.d.ts +5 -0
  484. package/dist/insights/components/shared/InsightsCard/ContentAndDescription.d.ts +15 -0
  485. package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +15 -0
  486. package/dist/insights/components/shared/InsightsCard/Description.d.ts +10 -0
  487. package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +10 -0
  488. package/dist/insights/components/shared/InsightsCard/EmbeddedCard.d.ts +9 -0
  489. package/dist/insights/components/shared/InsightsCard/FeedbackCard.d.ts +13 -0
  490. package/dist/insights/components/shared/InsightsCard/InsightButton.d.ts +12 -0
  491. package/dist/insights/components/shared/InsightsCard/MiniDescription.d.ts +9 -0
  492. package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
  493. package/dist/insights/components/shared/MenuAction.d.ts +15 -0
  494. package/dist/insights/components/shared/MiniInsightCard.d.ts +16 -0
  495. package/dist/insights/components/shared/P2P/P2PMultipleCategorization.d.ts +12 -0
  496. package/dist/insights/components/shared/P2PCategorizationSingleAccount/P2PCategorizationSingleAccount.d.ts +10 -0
  497. package/dist/insights/components/shared/ProgressBar.d.ts +9 -0
  498. package/dist/insights/components/shared/SaveAnExtra100/SaveAnExtra100.d.ts +9 -0
  499. package/dist/insights/components/shared/SaveEnoughToLiveOnBottomSection.d.ts +11 -0
  500. package/dist/insights/components/shared/SaveEnoughToLiveOnTopSection.d.ts +2 -0
  501. package/dist/insights/components/shared/StatusIndicator.d.ts +15 -0
  502. package/dist/insights/components/shared/TabContainer.d.ts +8 -0
  503. package/dist/insights/components/shared/ThemedSVGImage.d.ts +2 -0
  504. package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
  505. package/dist/insights/components/shared/ZeroState/LinedCardZeroState.d.ts +1 -0
  506. package/dist/insights/components/shared/index.d.ts +2 -0
  507. package/dist/insights/hooks/useContainerDimensions.d.ts +5 -0
  508. package/dist/insights/index.d.ts +1 -1
  509. package/dist/insights/index.es.js +4843 -2
  510. package/dist/insights/themes/Typography.d.ts +1 -0
  511. package/dist/insights/themes/index.d.ts +1 -0
  512. package/dist/insights/types/Charts/BarChart.d.ts +96 -0
  513. package/dist/insights/types/CommonBeat.d.ts +367 -0
  514. package/dist/insights/types/DirectDeposit.d.ts +16 -0
  515. package/dist/insights/types/ThemedSVGImage.d.ts +5 -0
  516. package/dist/investments/InvestmentsWidget.d.ts +2 -2
  517. package/dist/investments/components/AnalysisDetails.d.ts +1 -1
  518. package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
  519. package/dist/investments/index.es.js +574 -574
  520. package/dist/merchants/index.d.ts +0 -1
  521. package/dist/merchants/index.es.js +18 -20
  522. package/dist/microinsights/InsightsMicroWidget.d.ts +1 -14
  523. package/dist/microinsights/MicroCardTemplate.d.ts +2 -4
  524. package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
  525. package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
  526. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
  527. package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
  528. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
  529. package/dist/microinsights/beaticons/index.d.ts +3 -0
  530. package/dist/microinsights/cards/InsightCard.d.ts +3 -3
  531. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +3 -3
  532. package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +3 -3
  533. package/dist/microinsights/cards/ZeroStateCard.d.ts +3 -3
  534. package/dist/microinsights/carousel/BeatList.d.ts +3 -3
  535. package/dist/microinsights/carousel/CarouselHeader.d.ts +4 -2
  536. package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +12 -12
  537. package/dist/microinsights/constants/Analytics.d.ts +1 -1
  538. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
  539. package/dist/microinsights/context/hooks.d.ts +1 -1
  540. package/dist/microinsights/index.d.ts +1 -1
  541. package/dist/microinsights/index.es.js +1 -1
  542. package/dist/microinsights/interfaces.d.ts +23 -40
  543. package/dist/microinsights/stores/CopyStore.d.ts +2 -2
  544. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +2 -2
  545. package/dist/microinsights/utils/DataSeries.d.ts +1 -1
  546. package/dist/microinsights/utils/colorType.d.ts +22 -0
  547. package/dist/networth/NetWorthWidget.d.ts +1 -1
  548. package/dist/networth/components/AssetsLiabilitiesDetail.d.ts +1 -1
  549. package/dist/networth/components/GainsLossesDetail.d.ts +1 -1
  550. package/dist/networth/components/NetWorthChange.d.ts +1 -1
  551. package/dist/networth/components/NetWorthListItem.d.ts +1 -1
  552. package/dist/networth/components/NetWorthSummary.d.ts +1 -1
  553. package/dist/networth/components/micro/NetworthData.d.ts +1 -1
  554. package/dist/networth/components/micro/ZeroState.d.ts +1 -1
  555. package/dist/networth/index.d.ts +0 -4
  556. package/dist/networth/index.es.js +302 -314
  557. package/dist/notifications/components/NotificationBadge.d.ts +1 -1
  558. package/dist/notifications/components/NotificationCard.d.ts +1 -1
  559. package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
  560. package/dist/notifications/components/NotificationList.d.ts +2 -1
  561. package/dist/notifications/index.d.ts +0 -2
  562. package/dist/notifications/index.es.js +101 -93
  563. package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
  564. package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +2 -2
  565. package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
  566. package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
  567. package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
  568. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
  569. package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
  570. package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
  571. package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
  572. package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
  573. package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
  574. package/dist/recurringtransactions/index.d.ts +0 -1
  575. package/dist/recurringtransactions/index.es.js +489 -462
  576. package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
  577. package/dist/settings/SettingsWidget.d.ts +2 -2
  578. package/dist/settings/TransactionRulesWidget.d.ts +1 -1
  579. package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
  580. package/dist/settings/components/devices/DeviceList.d.ts +1 -1
  581. package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
  582. package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
  583. package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
  584. package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
  585. package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
  586. package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
  587. package/dist/settings/index.d.ts +0 -2
  588. package/dist/settings/index.es.js +419 -430
  589. package/dist/spending/SpendingMiniWidget.d.ts +1 -1
  590. package/dist/spending/SpendingWidget.d.ts +1 -1
  591. package/dist/spending/index.es.js +229 -222
  592. package/dist/spending/utils/SpendingData.d.ts +1 -1
  593. package/dist/transactions/TransactionWidget.d.ts +1 -1
  594. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
  595. package/dist/transactions/components/shared/TransactionList.d.ts +3 -4
  596. package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +17 -0
  597. package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
  598. package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
  599. package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
  600. package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
  601. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
  602. package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
  603. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
  604. package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
  605. package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
  606. package/dist/transactions/components/shared/transactiondetails/actions/ExcludeAction.d.ts +7 -0
  607. package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
  608. package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
  609. package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
  610. package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +2 -1
  611. package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
  612. package/dist/transactions/components/shared/transactiontable/cells/PayeeCell.d.ts +4 -1
  613. package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
  614. package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
  615. package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
  616. package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
  617. package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
  618. package/dist/transactions/constants/Actions.d.ts +4 -3
  619. package/dist/transactions/context/hooks.d.ts +1 -1
  620. package/dist/transactions/index.d.ts +0 -5
  621. package/dist/transactions/index.es.js +344 -351
  622. package/dist/transactions/utils/Filters.d.ts +1 -1
  623. package/dist/transactions/utils/Transactions.d.ts +17 -1
  624. package/dist/trends/TrendsFullWidget.d.ts +1 -1
  625. package/dist/trends/TrendsMiniWidget.d.ts +1 -1
  626. package/dist/trends/TrendsWidget.d.ts +1 -1
  627. package/dist/trends/components/CategoriesList.d.ts +1 -1
  628. package/dist/trends/components/CategoriesListItem.d.ts +1 -1
  629. package/dist/trends/components/CategoryDetails.d.ts +3 -0
  630. package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
  631. package/dist/trends/components/TrendsInsights.d.ts +1 -1
  632. package/dist/trends/components/{TrendsTable.d.ts → TrendsTableContainer.d.ts} +2 -2
  633. package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
  634. package/dist/trends/components/trendstable/TrendsTable.d.ts +12 -0
  635. package/dist/trends/index.d.ts +0 -1
  636. package/dist/trends/index.es.js +987 -874
  637. package/dist/trends/utils/SpendingData.d.ts +1 -1
  638. package/dist/trends/utils/TrendsTable.d.ts +5 -3
  639. package/dist/trends/utils/TrendsWidget.d.ts +7 -0
  640. package/dist/trends/utils/shared.d.ts +2 -2
  641. package/dist/{useAccountDisplayName-DbkgGLdg.mjs → useAccountDisplayName-CFa_MrS6.mjs} +5 -5
  642. package/dist/{useAriaLive-B3_pRUio.mjs → useAriaLive-MkYebyUR.mjs} +4 -4
  643. package/dist/{useDimensions-27p2evRx.mjs → useDimensions-CeDR9V8N.mjs} +6 -6
  644. package/dist/{useInsightsEnabled-dhmXeSyF.mjs → useInsightsEnabled-DaNLPmUU.mjs} +1 -1
  645. package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-mWpmnh5w.mjs} +3 -3
  646. package/dist/{useWidgetLoadTimer-CrUzxN-P.mjs → useWidgetLoadTimer-CJb-RELP.mjs} +1 -1
  647. package/package.json +65 -43
  648. package/dist/AccountApi-DgZ8ILj1.mjs +0 -19
  649. package/dist/AccountDetailsHeader-BOV91g1o.mjs +0 -95
  650. package/dist/AccountFields-BRRH37K1.mjs +0 -140
  651. package/dist/AccountListItem-Ds5C0mOT.mjs +0 -90
  652. package/dist/AccountStore-BFKvXJSD.mjs +0 -244
  653. package/dist/Accounts-CuE8aSZN.mjs +0 -27
  654. package/dist/BeatApi-De2IaqH2.mjs +0 -21
  655. package/dist/BeatStore-D_NYuBSz.mjs +0 -81
  656. package/dist/BudgetUtil-CDSOZXem.mjs +0 -101
  657. package/dist/CashflowStore-naOtJcwo.mjs +0 -91
  658. package/dist/CategoryStore-DEqAnHbi.mjs +0 -186
  659. package/dist/CategoryUtil-CFHBvaV4.mjs +0 -80
  660. package/dist/CurrencyInput-DDQ4DBrE.mjs +0 -85
  661. package/dist/DateUtil-CVsMhbZU.mjs +0 -48
  662. package/dist/DebtsStore-Dv_T7Dts.mjs +0 -63
  663. package/dist/Dialog-CWymUiuO.mjs +0 -120
  664. package/dist/Donut-Dmy3JTWd.mjs +0 -86
  665. package/dist/Fetch-DecPFeGU.mjs +0 -119
  666. package/dist/FinstrongStore-BjFkMTIL.mjs +0 -451
  667. package/dist/GlobalAccountFilter-BpWlPAl5.mjs +0 -316
  668. package/dist/GoalStore-Dbjgft2i.mjs +0 -422
  669. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  670. package/dist/LineChart-DHj-Bufi.mjs +0 -580
  671. package/dist/Loader-BSWSYqvn.mjs +0 -24
  672. package/dist/Localization-2MODESHW.mjs +0 -30
  673. package/dist/ManageIncome-DIIyqDTp.mjs +0 -585
  674. package/dist/MerchantStore-WvZ4gnQe.mjs +0 -37
  675. package/dist/MiniWidgetContainer-DKn7ndO6.mjs +0 -56
  676. package/dist/NetWorthStore-B6ziBtaH.mjs +0 -168
  677. package/dist/Notification-Bs1fdbzI.mjs +0 -95
  678. package/dist/NotificationStore-Ck2KdNmT.mjs +0 -79
  679. package/dist/OriginalBalanceAction-DFoG79Ba.mjs +0 -115
  680. package/dist/RecurringTransactionsStore-D_--5PWH.mjs +0 -277
  681. package/dist/RepeatingTransaction-C2txVA9O.mjs +0 -292
  682. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  683. package/dist/SettingsStore-CInvh-rQ.mjs +0 -269
  684. package/dist/SpendingLegend-BxefXiQd.mjs +0 -193
  685. package/dist/TransactionApi-CjBoLleL.mjs +0 -86
  686. package/dist/TransactionDetails-CPwv9xtZ.mjs +0 -1374
  687. package/dist/TransactionStore-D2aMUClq.mjs +0 -688
  688. package/dist/TrendsStore-BdsYfCc7.mjs +0 -183
  689. package/dist/User-CulNdZUr.mjs +0 -314
  690. package/dist/ViewMoreMicroCard-CDWR16_h.mjs +0 -1147
  691. package/dist/WidgetContainer-mzejMmz2.mjs +0 -555
  692. package/dist/accounts/stores/UiStore.d.ts +0 -10
  693. package/dist/accounts/utils/index.d.ts +0 -1
  694. package/dist/cashflow/api/CashflowApi.d.ts +0 -13
  695. package/dist/cashflow/stores/CashflowStore.d.ts +0 -8
  696. package/dist/categories/stores/UiStore.d.ts +0 -20
  697. package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
  698. package/dist/common/api/index.d.ts +0 -10
  699. package/dist/common/components/barchart/Bar.d.ts +0 -25
  700. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  701. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  702. package/dist/common/components/barchart/Legend.d.ts +0 -8
  703. package/dist/common/components/barchart/Util.d.ts +0 -42
  704. package/dist/common/components/barchart/index.d.ts +0 -1
  705. package/dist/common/stores/index.d.ts +0 -3
  706. package/dist/common/types/SpendingPlan.d.ts +0 -44
  707. package/dist/common/utils/Categories.d.ts +0 -6
  708. package/dist/debts/store/DebtsStore.d.ts +0 -9
  709. package/dist/debts/store/DebtsUiStore.d.ts +0 -13
  710. package/dist/debts/utils/DebtStore.d.ts +0 -4
  711. package/dist/debts/utils/DebtsWidget.d.ts +0 -14
  712. package/dist/debts/utils/shared.d.ts +0 -12
  713. package/dist/exportTransactionsToCSV-BU1jTY0Q.mjs +0 -48
  714. package/dist/help/constants/index.d.ts +0 -1
  715. package/dist/help/utils/getAccessibleHelpCategories.d.ts +0 -3
  716. package/dist/transactions/analytics.d.ts +0 -3
  717. package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +0 -7
  718. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  719. package/dist/transactions/constants/Transaction.d.ts +0 -2
  720. package/dist/transactions/constants/TransactionsTable.d.ts +0 -17
  721. package/dist/transactions/stores/UiStore.d.ts +0 -25
  722. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +0 -9
  723. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +0 -3
  724. package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
  725. package/dist/useCombineEvents-CRwX-qWE.mjs +0 -92
  726. package/dist/{common → core}/constants/Category.d.ts +0 -0
  727. package/dist/{common → core}/constants/DateFormats.d.ts +0 -0
  728. package/dist/{debts/constants/index.d.ts → core/constants/Debts.d.ts} +0 -0
  729. package/dist/{help → core}/constants/Help.d.ts +0 -0
  730. package/dist/{investments/constants/index.d.ts → core/constants/Investments.d.ts} +0 -0
  731. package/dist/{common → core}/constants/Numbers.d.ts +0 -0
  732. package/dist/{common → core}/constants/Table.d.ts +0 -0
  733. package/dist/{common → core}/stores/GlobalCopyStore.d.ts +0 -0
  734. package/dist/{common → core}/stores/GlobalUiStore.d.ts +0 -0
  735. package/dist/{common → core}/stores/UserStore.d.ts +1 -1
  736. /package/dist/{common → core}/types/Account.d.ts +0 -0
  737. /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
  738. /package/dist/{common → core}/types/Category.d.ts +0 -0
  739. /package/dist/{common → core}/types/Date.d.ts +0 -0
  740. /package/dist/{common → core}/types/Debt.d.ts +0 -0
  741. /package/dist/{common → core}/types/Global.d.ts +0 -0
  742. /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
  743. /package/dist/{common → core}/types/Goal.d.ts +0 -0
  744. /package/dist/{common → core}/types/Handlers.d.ts +0 -0
  745. /package/dist/{common → core}/types/Help.d.ts +0 -0
  746. /package/dist/{common → core}/types/Holding.d.ts +0 -0
  747. /package/dist/{common → core}/types/Institution.d.ts +0 -0
  748. /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
  749. /package/dist/{common → core}/types/Merchant.d.ts +0 -0
  750. /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
  751. /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
  752. /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
  753. /package/dist/{common → core}/types/Transaction.d.ts +0 -0
  754. /package/dist/{common → core}/types/User.d.ts +0 -0
  755. /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
  756. /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
  757. /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
  758. /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
  759. /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
  760. /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
  761. /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
  762. /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
  763. /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
  764. /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
  765. /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
  766. /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
  767. /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
  768. /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
  769. /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
  770. /package/dist/{common → core}/types/localization/index.d.ts +0 -0
  771. /package/dist/{common → core}/utils/DateUtil.d.ts +0 -0
  772. /package/dist/{common → core}/utils/Fetch.d.ts +0 -0
  773. /package/dist/{common/utils/User.d.ts → core/utils/UserUtils.d.ts} +0 -0
@@ -1,121 +1,124 @@
1
- import { jsxs as C, jsx as e, Fragment as _t } from "react/jsx-runtime";
2
- import u, { useRef as Tt, useState as bt, useEffect as St } from "react";
3
- import { observer as R } from "mobx-react-lite";
4
- import { CategoryIcon as we, Text as X, Icon as Te, P as fe, H3 as Ue, ChevronRightIcon as xt } from "@mxenabled/mxui";
5
- import A from "@mui/material/Box";
6
- import x from "@mui/material/Stack";
7
- import be from "@mui/material/Button";
8
- import { addSeconds as Xe } from "date-fns/addSeconds";
1
+ import { jsxs as C, jsx as e, Fragment as vt } from "react/jsx-runtime";
2
+ import g, { useRef as wt, useState as Dt, useEffect as It } from "react";
3
+ import { observer as A } from "mobx-react-lite";
4
+ import { CategoryIcon as ve, Text as F, Icon as He, H3 as Ge, P as pe } from "@mxenabled/mxui";
5
+ import H from "@mui/material/Box";
6
+ import S from "@mui/material/Stack";
7
+ import Te from "@mui/material/Button";
8
+ import { addSeconds as et } from "date-fns/addSeconds";
9
9
  import { differenceInCalendarMonths as Se } from "date-fns/differenceInCalendarMonths";
10
- import wt from "numeral";
11
- import { useTheme as le } from "@mui/material/styles";
12
- import { useItemTooltip as vt, ChartsTooltipContainer as Dt } from "@mui/x-charts/ChartsTooltip";
13
- import { LineChart as Lt } from "@mui/x-charts/LineChart";
14
- import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
15
- import { u as It } from "../useDimensions-27p2evRx.mjs";
16
- import Ze from "@mui/material/Card";
17
- import Qe from "@mui/material/CardContent";
18
- import He from "@mui/material/Divider";
19
- import Be from "@mui/material/Grid";
20
- import { u as k, m as J, g as z, b as ye, h as ve, d as De, v as Ce, p as qe, f as We, a as Je } from "../hooks-fY_n74f7.mjs";
21
- import { b as et } from "../Localization-2MODESHW.mjs";
22
- import { C as xe } from "../CurrencyText-C-85TnUF.mjs";
23
- import { a as Re, b as Ve, c as Et } from "../Category-Ccoew_sA.mjs";
24
- import { f as Q, D as B } from "../Dialog-CWymUiuO.mjs";
25
- import { f as oe, a as Mt } from "../NumberFormatting-DjTD0t3W.mjs";
26
- import { a as Fe, c as At, g as Rt, L as tt } from "../TrendsStore-BdsYfCc7.mjs";
27
- import { T as Zn } from "../TrendsStore-BdsYfCc7.mjs";
28
- import { c as kt, i as Ht, d as Nt, e as Wt, g as ot, b as nt, f as Pe } from "../SpendingData-B7NuTQ9s.mjs";
29
- import Ot from "@mui/material/ToggleButton";
30
- import Gt from "@mui/material/ToggleButtonGroup";
31
- import { DataGridPro as Bt } from "@mui/x-data-grid-pro";
32
- import { T as G, a as Vt } from "../ViewMoreMicroCard-CDWR16_h.mjs";
33
- import { parseISO as st } from "date-fns/parseISO";
34
- import { H as ke } from "../HeaderCell-DjuifqHJ.mjs";
35
- import { A as v, W as rt } from "../WidgetContainer-mzejMmz2.mjs";
36
- import { a as at, T as it } from "../TransactionDetails-CPwv9xtZ.mjs";
37
- import { D as Ne } from "../Drawer-Bet2ZPJo.mjs";
38
- import { L as Le } from "../Loader-BSWSYqvn.mjs";
39
- import { u as Ie } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
40
- import { L as Oe } from "../LineChart-DHj-Bufi.mjs";
41
- import { M as Ft } from "../MiniWidgetContainer-DKn7ndO6.mjs";
42
- import { subMonths as Pt } from "date-fns";
43
- import { TrendingUp as zt, TrendingDown as $t, MultilineChart as Kt, ExpandLess as Yt, ExpandMore as jt } from "@mxenabled/mx-icons";
44
- import { M as Ut } from "../MicroWidgetContainer-DSyYwRCU.mjs";
45
- import Xt from "@mui/material/Collapse";
46
- import Zt from "@mui/material/List";
47
- import Qt from "@mui/material/ListItem";
48
- import qt from "@mui/material/ListItemButton";
49
- import Jt from "@mui/material/ListItemIcon";
50
- import eo from "@mui/material/ListItemText";
51
- import ct from "@mui/material/styles/useTheme";
52
- import { Stack as to } from "@mui/material";
53
- import oo from "@mui/material/Paper";
54
- import { b as no } from "../CategoryUtil-CFHBvaV4.mjs";
55
- import { E as so } from "../ExportCsvAction-oG_Mn66T.mjs";
56
- import { u as ro } from "../useInsightsEnabled-dhmXeSyF.mjs";
57
- import { E as ao } from "../EmptyState-DoxNUae-.mjs";
58
- import { b as io } from "../GlobalAccountFilter-BpWlPAl5.mjs";
59
- const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
60
- const { categories: n } = k(), { getCategoryName: t } = J(), r = t(o);
61
- return /* @__PURE__ */ C(x, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
10
+ import Lt from "numeral";
11
+ import { useTheme as Z, styled as Et, alpha as Mt } from "@mui/material/styles";
12
+ import { useItemTooltip as At, ChartsTooltipContainer as Rt } from "@mui/x-charts/ChartsTooltip";
13
+ import { LineChart as kt } from "@mui/x-charts/LineChart";
14
+ import { u as Q } from "../useScreenSize-mWpmnh5w.mjs";
15
+ import { u as Ht } from "../useDimensions-CeDR9V8N.mjs";
16
+ import tt from "@mui/material/Card";
17
+ import ot from "@mui/material/CardContent";
18
+ import Ne from "@mui/material/Divider";
19
+ import Fe from "@mui/material/Grid";
20
+ import { b as nt } from "../Localization-DnoVyBNK.mjs";
21
+ import { u as R, l as q, g as $, b as fe, h as we, d as De, B as ye, D as st, f as Be, a as rt } from "../hooks-BaO_gOI6.mjs";
22
+ import { C as xe } from "../CurrencyText-CCbE6MmF.mjs";
23
+ import { a as Re, C as $e, b as Nt } from "../Category-DEKZGLYe.mjs";
24
+ import { f as X, D as G } from "../DateFormats-HudZ3Bjs.mjs";
25
+ import { f as re, a as Wt } from "../NumberFormatting--XMeeBfr.mjs";
26
+ import { a as Ke, c as Ot, g as Gt } from "../TrendsUtil-D9z3kIj_.mjs";
27
+ import { c as Bt, i as Pt, d as Vt, e as zt, g as at, b as it, f as Ye } from "../SpendingData-PKlh8caU.mjs";
28
+ import Ft from "@mui/material/ToggleButton";
29
+ import $t from "@mui/material/ToggleButtonGroup";
30
+ import { parseISO as lt } from "date-fns/parseISO";
31
+ import { H as ke } from "../HeaderCell-P8w6CmfO.mjs";
32
+ import { T as W, a as Kt } from "../ViewMoreMicroCard-BD_MNc2z.mjs";
33
+ import { useGridApiContext as Yt, useGridRootProps as jt, DataGridPro as Ut } from "@mui/x-data-grid-pro";
34
+ import Xt from "@mui/material/Badge";
35
+ import Zt from "@mui/material/IconButton";
36
+ import { A as w } from "../Analytics-CzGzz_sE.mjs";
37
+ import { T as ct } from "../EmbeddedCard-DPwJjqMH.mjs";
38
+ import { T as dt } from "../TransactionDetails-C3dlAzYf.mjs";
39
+ import { D as Pe } from "../Drawer-BXqqBMxg.mjs";
40
+ import { u as Ie } from "../useWidgetLoadTimer-CJb-RELP.mjs";
41
+ import { L as Le } from "../Loader-CxeBwuPG.mjs";
42
+ import { W as ut } from "../WidgetContainer-DNuz_s7W.mjs";
43
+ import { L as Ve } from "../LineChart-CejWS_rh.mjs";
44
+ import { M as Qt } from "../MiniWidgetContainer-BdPiUU-u.mjs";
45
+ import { subMonths as qt } from "date-fns";
46
+ import { TrendingUp as Jt, TrendingDown as eo, MultilineChart as to, ExpandLess as oo, ExpandMore as no, ChevronRight as so, ArrowBack as ro } from "@mxenabled/mx-icons";
47
+ import { M as ao } from "../MicroWidgetContainer-CfKdQfhi.mjs";
48
+ import io from "@mui/material/Collapse";
49
+ import We from "@mui/material/List";
50
+ import mt from "@mui/material/ListItem";
51
+ import lo from "@mui/material/ListItemButton";
52
+ import co from "@mui/material/ListItemIcon";
53
+ import ht from "@mui/material/ListItemText";
54
+ import { g as Oe } from "../TransactionUtils-BphBJBbU.mjs";
55
+ import { L as uo } from "../ListItemRow-kH1rn8Xu.mjs";
56
+ import { Stack as mo } from "@mui/material";
57
+ import ho from "@mui/material/ListItemAvatar";
58
+ import { E as go } from "../ExportCsvAction-Bw02ZJEj.mjs";
59
+ import { u as po } from "../useInsightsEnabled-DaNLPmUU.mjs";
60
+ import { E as fo } from "../EmptyState-CJUDc3kD.mjs";
61
+ import { C as yo } from "../ConnectDrawer-Cnjr3Ddg.mjs";
62
+ const gt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
63
+ const { categories: s } = R(), { getCategoryName: o } = q(), r = o(t);
64
+ return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
62
65
  /* @__PURE__ */ e(
63
- A,
66
+ H,
64
67
  {
65
- "aria-label": et(n.category_icon_label_aria, r),
68
+ "aria-label": nt(s.category_icon_label_aria, r),
66
69
  mb: 4,
67
70
  role: "img",
68
- children: /* @__PURE__ */ e(we, { categoryGuid: s })
71
+ children: /* @__PURE__ */ e(ve, { categoryGuid: n })
69
72
  }
70
73
  ),
71
- /* @__PURE__ */ e(X, { variant: "Body", children: r })
74
+ /* @__PURE__ */ e(F, { variant: "body1", children: r })
72
75
  ] });
73
- }, co = ({
74
- categoryGuids: { guid: o, topLevelGuid: s },
75
- hoveredAreaData: n,
76
- cursorPosition: t,
76
+ }, Co = ({
77
+ categoryGuids: { guid: t, topLevelGuid: n },
78
+ hoveredAreaData: s,
79
+ cursorPosition: o,
77
80
  chartContainerRef: r
78
81
  }) => {
79
- const i = le(), d = Tt(null), [h, c] = bt({ x: t.x, y: t.y });
80
- if (St(() => {
82
+ const c = Z(), a = wt(null), [d, u] = Dt({ x: o.x, y: o.y });
83
+ if (It(() => {
81
84
  (() => {
82
- const m = d.current, _ = r.current;
85
+ const m = a.current, _ = r.current;
83
86
  if (!m || !_) return;
84
- const f = m.getBoundingClientRect(), g = _.getBoundingClientRect();
85
- let y = t.x, w = t.y;
86
- y + f.width * 2 > g.right ? y = t.x - f.width : y - f.width < g.left && (y = t.x), w + f.height * 2 > g.bottom && (w = t.y - f.height), c({ x: y, y: w });
87
+ const h = m.getBoundingClientRect(), p = _.getBoundingClientRect();
88
+ let y = o.x, T = o.y;
89
+ y + h.width * 2 > p.right ? y = o.x - h.width : y - h.width < p.left && (y = o.x), T + h.height * 2 > p.bottom && (T = o.y - h.height), u({ x: y, y: T });
87
90
  })();
88
- }, [t, r]), !n) return null;
89
- const l = n.reduce((p, m) => p + m.y, 0);
91
+ }, [o, r]), !s) return null;
92
+ const i = s.reduce((f, m) => f + m.y, 0);
90
93
  return /* @__PURE__ */ e(
91
- Ze,
94
+ tt,
92
95
  {
93
- ref: d,
96
+ ref: a,
94
97
  sx: {
95
98
  position: "absolute",
96
- top: h.y,
97
- left: h.x,
99
+ top: d.y,
100
+ left: d.x,
98
101
  width: 250,
99
102
  pointerEvents: "none"
100
103
  },
101
- children: /* @__PURE__ */ C(Qe, { children: [
102
- /* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
103
- /* @__PURE__ */ e(lt, { categoryGuid: o, topLevelCategoryGuid: s }),
104
- /* @__PURE__ */ e(X, { variant: "Small", children: `${n.length}-month total` }),
105
- /* @__PURE__ */ e(xe, { amount: l, bold: !0, formatString: "0,0", variant: "body2" })
104
+ children: /* @__PURE__ */ C(ot, { children: [
105
+ /* @__PURE__ */ C(H, { alignItems: "center", display: "flex", flexDirection: "column", children: [
106
+ /* @__PURE__ */ e(gt, { categoryGuid: t, topLevelCategoryGuid: n }),
107
+ /* @__PURE__ */ e(F, { variant: "body2", children: `${s.length}-month total` }),
108
+ /* @__PURE__ */ e(xe, { amount: i, bold: !0, formatString: "0,0", variant: "body2" })
106
109
  ] }),
107
- /* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
108
- /* @__PURE__ */ e(Be, { container: !0, children: n.map((p, m) => /* @__PURE__ */ C(u.Fragment, { children: [
109
- m > 0 && m % 3 === 0 && /* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
110
- /* @__PURE__ */ e(Be, { item: !0, xs: 4, children: /* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
111
- /* @__PURE__ */ e(X, { color: i.palette.text.secondary, variant: "XSmall", children: p.x }),
110
+ /* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
111
+ /* @__PURE__ */ e(Fe, { container: !0, children: s.map((f, m) => /* @__PURE__ */ C(g.Fragment, { children: [
112
+ m > 0 && m % 3 === 0 && /* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
113
+ /* @__PURE__ */ e(Fe, { size: 4, children: /* @__PURE__ */ C(H, { alignItems: "center", display: "flex", flexDirection: "column", children: [
114
+ /* @__PURE__ */ e(F, { color: c.palette.text.secondary, variant: "caption", children: f.x }),
112
115
  /* @__PURE__ */ e(
113
116
  xe,
114
117
  {
115
- amount: p.y,
118
+ amount: f.y,
116
119
  bold: !0,
117
120
  formatString: "0,0",
118
- variant: "Body"
121
+ variant: "body1"
119
122
  }
120
123
  )
121
124
  ] }) })
@@ -123,31 +126,31 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
123
126
  ] })
124
127
  }
125
128
  );
126
- }, lo = R(co), uo = ({
127
- sx: o,
128
- categoryGuids: s,
129
- hoveredLegend: n,
130
- legendRef: t,
129
+ }, _o = A(Co), bo = ({
130
+ sx: t,
131
+ categoryGuids: n,
132
+ hoveredLegend: s,
133
+ legendRef: o,
131
134
  onHoverLegend: r,
132
- onClickLegend: i
135
+ onClickLegend: c
133
136
  }) => {
134
- const { isMobile: d } = q(), { getCategoryName: h } = J();
137
+ const { isMobile: a } = Q(), { getCategoryName: d } = q();
135
138
  return /* @__PURE__ */ e(
136
- x,
139
+ S,
137
140
  {
138
141
  direction: "row",
139
142
  flexWrap: "wrap",
140
- gap: d ? 2 : 6,
143
+ gap: a ? 2 : 6,
141
144
  justifyContent: "start",
142
- ref: t,
143
- sx: o,
144
- children: s.map(({ guid: c, top_level_guid: l }) => {
145
- const p = n === c, m = Re[c], _ = Re[l], f = m ?? _ ?? Re.default, g = f + "33";
145
+ ref: o,
146
+ sx: t,
147
+ children: n.map(({ guid: u, top_level_guid: i }) => {
148
+ const f = s === u, m = Re[u], _ = Re[i], h = m ?? _ ?? Re.default, p = h + "33";
146
149
  return /* @__PURE__ */ C(
147
- be,
150
+ Te,
148
151
  {
149
- onClick: () => i(c),
150
- onMouseEnter: () => r(c),
152
+ onClick: () => c(u),
153
+ onMouseEnter: () => r(u),
151
154
  onMouseLeave: () => r(null),
152
155
  sx: {
153
156
  color: "text.primary",
@@ -158,151 +161,151 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
158
161
  paddingX: 8,
159
162
  paddingY: 4,
160
163
  borderRadius: 1,
161
- opacity: p ? 1 : 0.7
164
+ opacity: f ? 1 : 0.7
162
165
  },
163
166
  children: [
164
167
  /* @__PURE__ */ e(
165
- A,
168
+ H,
166
169
  {
167
170
  sx: {
168
171
  width: 16,
169
172
  height: 16,
170
- marginRight: d ? 5 : 10,
173
+ marginRight: a ? 5 : 10,
171
174
  borderRadius: "2px",
172
- backgroundColor: n ? p ? f : g : f
175
+ backgroundColor: s ? f ? h : p : h
173
176
  }
174
177
  }
175
178
  ),
176
- /* @__PURE__ */ e(X, { variant: "Body", children: h(c) })
179
+ /* @__PURE__ */ e(F, { variant: "body1", children: d(u) })
177
180
  ]
178
181
  },
179
- c
182
+ u
180
183
  );
181
184
  })
182
185
  }
183
186
  );
184
- }, ho = ({
185
- categoryGuids: { guid: o, topLevelGuid: s },
186
- series: n,
187
- xData: t
187
+ }, To = ({
188
+ categoryGuids: { guid: t, topLevelGuid: n },
189
+ series: s,
190
+ xData: o
188
191
  }) => {
189
- const r = vt(), i = le();
192
+ const r = At(), c = Z();
190
193
  if (!r?.identifier) return null;
191
- const { dataIndex: d, seriesId: h } = r.identifier;
192
- if (d == null || !h) return null;
193
- const l = n.find((m) => m.id === h)?.data?.[d], p = t?.[d];
194
- return l === void 0 || !p ? null : /* @__PURE__ */ e(Ze, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(Qe, { children: /* @__PURE__ */ C(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
195
- /* @__PURE__ */ e(lt, { categoryGuid: o, topLevelCategoryGuid: s }),
196
- /* @__PURE__ */ e(X, { color: i.palette.text.secondary, variant: "Small", children: Q(p, B.MONTH_SHORT_YEAR) }),
197
- /* @__PURE__ */ e(xe, { amount: String(l), bold: !0, formatString: "0,0", variant: "Body" })
194
+ const { dataIndex: a, seriesId: d } = r.identifier;
195
+ if (a == null || !d) return null;
196
+ const i = s.find((m) => m.id === d)?.data?.[a], f = o?.[a];
197
+ return i === void 0 || !f ? null : /* @__PURE__ */ e(tt, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ C(H, { alignItems: "center", display: "flex", flexDirection: "column", children: [
198
+ /* @__PURE__ */ e(gt, { categoryGuid: t, topLevelCategoryGuid: n }),
199
+ /* @__PURE__ */ e(F, { color: c.palette.text.secondary, variant: "body2", children: X(f, G.MONTH_SHORT_YEAR) }),
200
+ /* @__PURE__ */ e(xe, { amount: String(i), bold: !0, formatString: "0,0", variant: "body1" })
198
201
  ] }) }) });
199
- }, go = ({
200
- onHoverArea: o,
201
- onHoverPoint: s,
202
- onHoverLegend: n,
203
- onClickLegend: t,
202
+ }, So = ({
203
+ onHoverArea: t,
204
+ onHoverPoint: n,
205
+ onHoverLegend: s,
206
+ onClickLegend: o,
204
207
  stackedDatasets: r,
205
- unstackedDatasets: i = [],
206
- availableHeight: d = 0,
207
- minimumHeight: h = 350
208
+ unstackedDatasets: c = [],
209
+ availableHeight: a = 0,
210
+ minimumHeight: d = 350
208
211
  }) => {
209
- const c = le(), { isMobile: l } = q(), [p, { height: m }] = It(), _ = u.useRef(null), [f, g] = u.useState(0);
210
- u.useEffect(() => {
211
- const a = Math.max(d - m, h);
212
- g(a);
213
- }, [d, m]);
214
- const [y, w] = u.useState(null), [b, M] = u.useState({
212
+ const u = Z(), { isMobile: i } = Q(), [f, { height: m }] = Ht(), _ = g.useRef(null), [h, p] = g.useState(0);
213
+ g.useEffect(() => {
214
+ const l = Math.max(a - m, d);
215
+ p(l);
216
+ }, [a, m]);
217
+ const [y, T] = g.useState(null), [N, x] = g.useState({
215
218
  hoveredSeriesId: null,
216
219
  hoveredAreaData: null,
217
220
  isAreaHovered: !1,
218
221
  cursorPos: { x: 0, y: 0 }
219
- }), { hoveredSeriesId: I, hoveredAreaData: S, isAreaHovered: H, cursorPos: N } = b, $ = H && I && S, V = !$, K = [...r, ...i], E = K[0]?.dataset.length ?? 0, te = K.flatMap((a) => a.dataset.map((T) => T.x)), O = K.flatMap((a) => a.dataset.map((T) => T.y)), ne = r[0]?.dataset?.map(
220
- (a, T) => r.reduce((L, U) => L + U.dataset[T]?.y || 0, 0)
221
- ) ?? [0], se = Math.max(...ne), Z = Math.max(
222
- ...i.flatMap((a) => a.dataset.map((T) => T.y))
223
- ), de = Math.floor(Math.min(...O) / 100) * 100, ue = Math.ceil(Math.max(se, Z) / 100) * 100, F = r.map((a, T) => ({
224
- id: `stacked-${T}`,
225
- guid: a.category_guid,
226
- top_level_guid: a.top_level_category_guid,
222
+ }), { hoveredSeriesId: L, hoveredAreaData: M, isAreaHovered: E, cursorPos: v } = N, K = E && L && M, ae = !K, Y = [...r, ...c], J = Y[0]?.dataset.length ?? 0, P = Y.flatMap((l) => l.dataset.map((b) => b.x)), V = Y.flatMap((l) => l.dataset.map((b) => b.y)), O = r[0]?.dataset?.map(
223
+ (l, b) => r.reduce((I, z) => I + z.dataset[b]?.y || 0, 0)
224
+ ) ?? [0], ee = Math.max(...O), Ce = Math.max(
225
+ ...c.flatMap((l) => l.dataset.map((b) => b.y))
226
+ ), ie = Math.floor(Math.min(...V) / 100) * 100, te = Math.ceil(Math.max(ee, Ce) / 100) * 100, j = r.map((l, b) => ({
227
+ id: `stacked-${b}`,
228
+ guid: l.category_guid,
229
+ top_level_guid: l.top_level_category_guid,
227
230
  area: !0,
228
- color: r[T].category_color ?? c.palette.primary.main,
229
- data: a.dataset.map((L) => L.y),
230
- label: r[T].category_name,
231
+ color: r[b].category_color ?? u.palette.primary.main,
232
+ data: l.dataset.map((I) => I.y),
233
+ label: r[b].category_name,
231
234
  stack: "total",
232
235
  type: "line",
233
236
  highlightScope: { highlight: "item" },
234
- valueFormatter: (L) => oe(L, "0,0")
235
- })), re = i.map((a, T) => ({
236
- id: `unstacked-${T}`,
237
- guid: a.category_guid,
238
- top_level_guid: a.top_level_category_guid,
237
+ valueFormatter: (I) => re(I, "0,0")
238
+ })), ne = c.map((l, b) => ({
239
+ id: `unstacked-${b}`,
240
+ guid: l.category_guid,
241
+ top_level_guid: l.top_level_category_guid,
239
242
  area: !1,
240
- color: a.category_color,
241
- data: a.dataset.map((L) => L.y),
242
- label: a.category_name,
243
+ color: l.category_color,
244
+ data: l.dataset.map((I) => I.y),
245
+ label: l.category_name,
243
246
  type: "line",
244
- valueFormatter: (L) => oe(L, "0,0")
245
- })), Y = [...F, ...re], he = [
246
- ...F.map(({ guid: a, top_level_guid: T }) => ({
247
- guid: a,
248
- top_level_guid: T
247
+ valueFormatter: (I) => re(I, "0,0")
248
+ })), U = [...j, ...ne], de = [
249
+ ...j.map(({ guid: l, top_level_guid: b }) => ({
250
+ guid: l,
251
+ top_level_guid: b
249
252
  })),
250
- ...re.map(({ guid: a, top_level_guid: T }) => ({
251
- guid: a,
252
- top_level_guid: T
253
+ ...ne.map(({ guid: l, top_level_guid: b }) => ({
254
+ guid: l,
255
+ top_level_guid: b
253
256
  }))
254
- ], j = (a) => {
255
- const L = a.startsWith("stacked-") ? r[parseInt(a.split("-")[1])] : i[parseInt(a.split("-")[1])];
257
+ ], B = (l) => {
258
+ const I = l.startsWith("stacked-") ? r[parseInt(l.split("-")[1])] : c[parseInt(l.split("-")[1])];
256
259
  return {
257
- guid: L?.category_guid,
258
- topLevelGuid: L?.top_level_category_guid
260
+ guid: I?.category_guid,
261
+ topLevelGuid: I?.top_level_category_guid
259
262
  };
260
- }, ae = (a) => {
261
- w(a), n?.(a ?? "");
262
- }, ge = (a) => {
263
- t?.(a ?? "");
264
- }, ie = () => {
265
- const a = j(String(I)).guid;
266
- a && t?.(a);
267
- }, ce = (a) => {
268
- const T = String(a?.seriesId), L = j(T).guid, U = Y.find((me) => me.id === T), Ee = U && a?.dataIndex !== void 0, _e = U && a?.dataIndex === void 0;
263
+ }, ue = (l) => {
264
+ T(l), s?.(l ?? "");
265
+ }, se = (l) => {
266
+ o?.(l ?? "");
267
+ }, le = () => {
268
+ const l = B(String(L)).guid;
269
+ l && o?.(l);
270
+ }, ce = (l) => {
271
+ const b = String(l?.seriesId), I = B(b).guid, z = U.find((he) => he.id === b), Ee = z && l?.dataIndex !== void 0, _e = z && l?.dataIndex === void 0;
269
272
  if (Ee)
270
- M({
271
- hoveredSeriesId: T,
273
+ x({
274
+ hoveredSeriesId: b,
272
275
  hoveredAreaData: null,
273
276
  isAreaHovered: !1,
274
- cursorPos: N
275
- }), s?.(L);
277
+ cursorPos: v
278
+ }), n?.(I);
276
279
  else if (_e) {
277
- const me = U?.data.map((Me, Ae) => ({
278
- x: te[Ae],
280
+ const he = z?.data.map((Me, Ae) => ({
281
+ x: P[Ae],
279
282
  y: Me
280
283
  })) ?? [];
281
- M({
282
- hoveredSeriesId: T,
283
- hoveredAreaData: me,
284
+ x({
285
+ hoveredSeriesId: b,
286
+ hoveredAreaData: he,
284
287
  isAreaHovered: !0,
285
- cursorPos: N
286
- }), o?.(L);
288
+ cursorPos: v
289
+ }), t?.(I);
287
290
  } else
288
- M({
291
+ x({
289
292
  hoveredSeriesId: null,
290
293
  hoveredAreaData: null,
291
294
  isAreaHovered: !1,
292
- cursorPos: N
295
+ cursorPos: v
293
296
  });
294
- }, D = (a) => {
295
- if (a.target instanceof Element && a.target.classList[0]?.includes("MuiMarkElement-root"))
297
+ }, me = (l) => {
298
+ if (l.target instanceof Element && l.target.classList[0]?.includes("MuiMarkElement-root"))
296
299
  return;
297
- const T = a.currentTarget.getBoundingClientRect();
298
- M((L) => ({
299
- ...L,
300
+ const b = l.currentTarget.getBoundingClientRect();
301
+ x((I) => ({
302
+ ...I,
300
303
  cursorPos: {
301
- x: a.clientX - T.left,
302
- y: a.clientY - T.top
304
+ x: l.clientX - b.left,
305
+ y: l.clientY - b.top
303
306
  }
304
307
  }));
305
- }, P = {
308
+ }, D = {
306
309
  p: 4,
307
310
  "& .MuiBarLabel-root": {
308
311
  fontSize: 10,
@@ -318,17 +321,17 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
318
321
  '& [class*="MuiLineElement-series-unstacked-"]': {
319
322
  strokeWidth: 3
320
323
  },
321
- ...y && F.reduce((a, T, L) => {
322
- const U = `.MuiAreaElement-series-stacked-${L}`;
323
- return a[U] = {
324
- opacity: F[L].guid === y ? 0.9 : 0.2
325
- }, a;
324
+ ...y && j.reduce((l, b, I) => {
325
+ const z = `.MuiAreaElement-series-stacked-${I}`;
326
+ return l[z] = {
327
+ opacity: j[I].guid === y ? 0.9 : 0.2
328
+ }, l;
326
329
  }, {})
327
330
  };
328
331
  return /* @__PURE__ */ e(
329
- A,
332
+ H,
330
333
  {
331
- onMouseMove: D,
334
+ onMouseMove: me,
332
335
  ref: _,
333
336
  sx: {
334
337
  position: "relative",
@@ -342,75 +345,75 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
342
345
  }
343
346
  },
344
347
  children: /* @__PURE__ */ C(
345
- x,
348
+ S,
346
349
  {
347
350
  direction: { xs: "column", md: "column" },
348
351
  spacing: { xs: 0, md: 4 },
349
352
  sx: { width: "100%", position: "relative" },
350
353
  children: [
351
354
  /* @__PURE__ */ e(
352
- Lt,
355
+ kt,
353
356
  {
354
- height: f,
357
+ height: h,
355
358
  hideLegend: !0,
356
359
  margin: { bottom: 24, left: 12, right: 54, top: 48 },
357
- onAreaClick: ie,
360
+ onAreaClick: le,
358
361
  onHighlightChange: ce,
359
- series: Y,
362
+ series: U,
360
363
  skipAnimation: !0,
361
364
  slotProps: {
362
- tooltip: { trigger: V ? "item" : "none" }
365
+ tooltip: { trigger: ae ? "item" : "none" }
363
366
  },
364
367
  slots: {
365
- tooltip: V && I ? (a) => /* @__PURE__ */ e(Dt, { children: /* @__PURE__ */ e(
366
- ho,
368
+ tooltip: ae && L ? (l) => /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(
369
+ To,
367
370
  {
368
- ...a,
369
- categoryGuids: j(I),
370
- series: Y,
371
- xData: te
371
+ ...l,
372
+ categoryGuids: B(L),
373
+ series: U,
374
+ xData: P
372
375
  }
373
376
  ) }) : void 0
374
377
  },
375
- sx: P,
378
+ sx: D,
376
379
  xAxis: [
377
380
  {
378
- data: te,
381
+ data: P,
379
382
  scaleType: "time",
380
- valueFormatter: (a) => Q(a, B.MONTH_SHORT_YEAR),
381
- tickNumber: E
383
+ valueFormatter: (l) => X(l, G.MONTH_SHORT_YEAR),
384
+ tickNumber: J
382
385
  // How many ticks to show on the x-axis
383
386
  }
384
387
  ],
385
388
  yAxis: [
386
389
  {
387
- min: de,
388
- max: ue || 100,
389
- valueFormatter: (a) => wt(a).format("0a")
390
+ min: ie,
391
+ max: te || 100,
392
+ valueFormatter: (l) => Lt(l).format("0a")
390
393
  }
391
394
  ]
392
395
  }
393
396
  ),
394
397
  /* @__PURE__ */ e(
395
- uo,
398
+ bo,
396
399
  {
397
- categoryGuids: he,
400
+ categoryGuids: de,
398
401
  hoveredLegend: y,
399
- legendRef: p,
400
- onClickLegend: ge,
401
- onHoverLegend: ae,
402
- sx: { px: l ? 0 : 24 }
402
+ legendRef: f,
403
+ onClickLegend: se,
404
+ onHoverLegend: ue,
405
+ sx: { px: i ? 0 : 24 }
403
406
  }
404
407
  ),
405
- $ && /* @__PURE__ */ e(
406
- lo,
408
+ K && /* @__PURE__ */ e(
409
+ _o,
407
410
  {
408
- categoryGuids: j(I),
411
+ categoryGuids: B(L),
409
412
  chartContainerRef: _,
410
- cursorPosition: N,
411
- hoveredAreaData: S.map((a) => ({
412
- ...a,
413
- x: Q(a.x, B.MONTH_SHORT_YEAR)
413
+ cursorPosition: v,
414
+ hoveredAreaData: M.map((l) => ({
415
+ ...l,
416
+ x: X(l.x, G.MONTH_SHORT_YEAR)
414
417
  }))
415
418
  }
416
419
  )
@@ -419,196 +422,222 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
419
422
  )
420
423
  }
421
424
  );
422
- }, dt = ({ selectedTab: o, onTabChange: s }) => {
423
- const { common: n } = k();
425
+ }, pt = ({ selectedTab: t, onTabChange: n }) => {
426
+ const { common: s } = R();
424
427
  return /* @__PURE__ */ e(
425
- Gt,
428
+ $t,
426
429
  {
427
- "aria-label": n.view_toggle,
430
+ "aria-label": s.view_toggle,
428
431
  exclusive: !0,
429
- onChange: s,
432
+ onChange: n,
430
433
  orientation: "horizontal",
431
- value: o,
432
- children: ["Chart", "Table"].map((t) => /* @__PURE__ */ e(
433
- Ot,
434
+ value: t,
435
+ children: ["Chart", "Table"].map((o) => /* @__PURE__ */ e(
436
+ Ft,
434
437
  {
435
- "aria-label": t === "Chart" ? n.view_chart : n.view_table,
436
- "aria-pressed": o === t,
438
+ "aria-label": o === "Chart" ? s.view_chart : s.view_table,
439
+ "aria-pressed": t === o,
437
440
  color: "primary",
438
441
  sx: { width: 56 },
439
- value: t,
440
- children: t === "Chart" ? /* @__PURE__ */ e(Te, { name: "table_chart_view" }) : /* @__PURE__ */ e(Te, { name: "format_list_bulleted" })
442
+ value: o,
443
+ children: o === "Chart" ? /* @__PURE__ */ e(He, { name: "table_chart_view" }) : /* @__PURE__ */ e(He, { name: "format_list_bulleted" })
441
444
  },
442
- t
445
+ o
443
446
  ))
444
447
  }
445
448
  );
446
- }, ut = ({ selectedDateRange: o, selectedCategoryGuid: s }) => {
447
- const { trends: n } = k(), { isMobile: t, isDesktop: r } = q(), { getCategoryName: i } = J(), d = u.useMemo(() => {
448
- const l = o.start.getFullYear() === o.end.getFullYear() ? Q(
449
- o.start,
450
- t ? B.MONTH_SHORT : B.MONTH_LONG
451
- ) : Q(
452
- o.start,
453
- t ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR
454
- ), p = Q(
455
- o.end,
456
- t ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR
449
+ }, ft = ({ selectedDateRange: t, selectedCategoryGuid: n }) => {
450
+ const { trends: s } = R(), { isMobile: o, isDesktop: r } = Q(), { getCategoryName: c } = q(), a = g.useMemo(() => {
451
+ const i = t.start.getFullYear() === t.end.getFullYear() ? X(
452
+ t.start,
453
+ o ? G.MONTH_SHORT : G.MONTH_LONG
454
+ ) : X(
455
+ t.start,
456
+ o ? G.MONTH_SHORT_YEAR : G.MONTH_YEAR
457
+ ), f = X(
458
+ t.end,
459
+ o ? G.MONTH_SHORT_YEAR : G.MONTH_YEAR
457
460
  );
458
- return `${l} - ${p}`;
459
- }, [o, t]), c = i(s) || (t ? n.sub_title : n.sub_title_by_category);
460
- return /* @__PURE__ */ C(A, { children: [
461
+ return `${i} - ${f}`;
462
+ }, [t, o]), u = c(n) || (o ? s.sub_title : s.sub_title_by_category);
463
+ return /* @__PURE__ */ C(H, { children: [
461
464
  /* @__PURE__ */ e(
462
- X,
465
+ Ge,
463
466
  {
464
- display: "block",
465
- fontWeight: 700,
466
467
  sx: {
467
- whiteSpace: "normal",
468
+ fontSize: r ? null : 15,
468
469
  overflow: "visible",
469
470
  textOverflow: "unset"
470
471
  },
471
- variant: r ? "H3" : "Body",
472
- children: c
472
+ children: u
473
473
  }
474
474
  ),
475
- /* @__PURE__ */ e(X, { variant: r ? "subtitle1" : "body2", children: d })
475
+ /* @__PURE__ */ e(F, { variant: r ? "subtitle1" : "body2", children: a })
476
476
  ] });
477
- }, mo = ({ name: o, topLevelCategoryGuid: s }) => /* @__PURE__ */ C(x, { alignItems: "center", direction: "row", justifyContent: "center", children: [
478
- /* @__PURE__ */ e(A, { "aria-hidden": !0, children: /* @__PURE__ */ e(we, { categoryGuid: s, variant: "twotone" }) }),
479
- /* @__PURE__ */ e(X, { sx: { ml: 12 }, variant: "body2", children: o })
480
- ] }), po = (o) => /* @__PURE__ */ e(x, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
481
- mo,
482
- {
483
- name: o.row.category,
484
- topLevelCategoryGuid: o.row.top_level_category_guid
485
- }
486
- ) }), ze = (o) => {
487
- const s = o.row.category_guid, n = o.row.top_level_category_guid, t = s === Ve.INCOME || n === Ve.INCOME, r = o.row[o.field];
488
- return /* @__PURE__ */ e(x, { alignItems: "flex-end", direction: "row", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
477
+ }, xo = (t) => {
478
+ const n = t.id === "total";
479
+ return /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: t.tabIndex, children: [
480
+ !n && /* @__PURE__ */ e(H, { "aria-hidden": !0, children: /* @__PURE__ */ e(ve, { categoryGuid: t.row.top_level_category_guid, variant: "twotone" }) }),
481
+ /* @__PURE__ */ e(F, { bold: n, sx: { ml: 12 }, variant: n ? "body1" : "body2", children: t.row.category })
482
+ ] });
483
+ }, je = (t) => {
484
+ const n = t.row.category_guid, s = t.row.top_level_category_guid, o = n === $e.INCOME || s === $e.INCOME, r = t.id === "total", c = t.field === "total", a = c ? t.row[t.field] : t.row.monthlyAmounts[t.field];
485
+ return /* @__PURE__ */ e(S, { alignItems: "flex-end", direction: "row", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(
489
486
  xe,
490
487
  {
491
- amount: t ? Math.abs(r) : r,
492
- isIncome: t,
493
- sx: { fontWeight: t ? 600 : 500 },
494
- symbol: t ? "+" : void 0,
495
- variant: "body2"
488
+ amount: o ? Math.abs(a) : a,
489
+ isIncome: o,
490
+ sx: { fontWeight: o || c || r ? 600 : 500 },
491
+ symbol: o ? "+" : void 0,
492
+ variant: r ? "body1" : "body2"
496
493
  }
497
494
  ) });
498
- }, $e = (o, s) => {
499
- const n = Q(st(s.isoDate), B.MONTH_LONG);
500
- return o[n] = s.amount, o;
501
- }, Ke = (o) => (s, n) => {
502
- const t = Q(st(n.isoDate), B.MONTH_LONG);
503
- return s + (o.includes(t) ? n.amount : 0);
504
- }, fo = (o, s) => {
505
- const n = [], t = new Date(o);
506
- for (; t <= s; ) {
507
- const r = Q(t, B.MONTH_LONG);
508
- n.push(r), t.setMonth(t.getMonth() + 1);
495
+ }, Ue = (t, n) => {
496
+ const s = X(lt(n.isoDate), G.MONTH_LONG);
497
+ return t[s] = n.amount, t;
498
+ }, Xe = (t) => (n, s) => {
499
+ const o = X(lt(s.isoDate), G.MONTH_LONG);
500
+ return n + (t.includes(o) ? s.amount : 0);
501
+ }, vo = (t, n) => {
502
+ const s = [], o = new Date(t);
503
+ for (; o <= n; ) {
504
+ const r = X(o, G.MONTH_LONG);
505
+ s.push(r), o.setMonth(o.getMonth() + 1);
509
506
  }
510
- return n;
511
- }, yo = (o, s) => {
512
- const n = {
507
+ return s;
508
+ }, wo = (t, n) => {
509
+ const s = {
513
510
  field: "category",
514
511
  flex: 1,
515
512
  headerClassName: "trends-table-header",
516
- headerName: s.category_title,
513
+ headerName: n.category_title,
517
514
  minWidth: 210,
518
515
  renderHeader: ke,
519
- renderCell: po,
516
+ renderCell: xo,
520
517
  sortable: !0,
521
- sortComparator: At,
518
+ sortComparator: Ot,
522
519
  type: "string"
523
- }, t = o.map((i) => ({
524
- field: i,
520
+ }, o = t.map((c) => ({
521
+ field: c,
525
522
  flex: 1,
526
523
  headerClassName: "trends-table-header",
527
- headerName: i,
524
+ headerName: c,
528
525
  minWidth: 100,
529
526
  renderHeader: ke,
530
- renderCell: ze,
531
- align: "right",
532
- headerAlign: "right",
527
+ renderCell: je,
528
+ align: "center",
529
+ headerAlign: "center",
533
530
  sortable: !0,
534
531
  hideSortIcons: !1,
535
532
  type: "number",
536
- sortComparator: Fe
533
+ sortComparator: Ke,
534
+ valueGetter: (a, d) => d.monthlyAmounts?.[c] ?? 0
537
535
  })), r = {
538
536
  field: "total",
539
537
  flex: 1,
540
538
  headerClassName: "trends-table-header",
541
- headerName: s.table_column_total,
539
+ headerName: n.table_column_total,
542
540
  minWidth: 100,
543
541
  renderHeader: ke,
544
- renderCell: ze,
545
- align: "right",
546
- headerAlign: "right",
542
+ renderCell: je,
543
+ align: "center",
544
+ headerAlign: "center",
547
545
  sortable: !0,
548
546
  hideSortIcons: !1,
549
547
  type: "number",
550
- sortComparator: Fe
548
+ sortComparator: Ke
551
549
  };
552
- return [n, ...t, r];
553
- }, Co = (o, s, n, t) => {
554
- const r = o.map((i) => {
555
- let d = i.totalMonthlyAmounts;
556
- return t && (d = i.monthlyAmounts), {
557
- id: i.guid,
558
- category: i.name,
559
- category_guid: i.guid,
550
+ return [s, ...o, r];
551
+ }, Ze = (t, n, s, o, r) => {
552
+ const c = t.filter((a) => a.is_income === s).map((a) => {
553
+ let d = a.totalMonthlyAmounts;
554
+ return r && (d = a.monthlyAmounts), {
555
+ id: a.guid,
556
+ category: a.name,
557
+ category_guid: a.guid,
560
558
  isParent: !1,
561
- top_level_category_guid: i.parent_guid || i.guid,
562
- total: d.reduce(Ke(n), 0),
563
- ...d.reduce($e, {})
559
+ top_level_category_guid: a.parent_guid || a.guid,
560
+ total: d.reduce(Xe(o), 0),
561
+ monthlyAmounts: d.reduce(Ue, {})
564
562
  };
565
563
  });
566
- if (t) {
567
- const i = t.monthlyAmounts.reduce(Ke(n), 0);
568
- i !== 0 && r.push({
569
- id: `sub-${t.guid}`,
570
- category: et(s.category_general, t.name),
571
- category_guid: t.guid,
564
+ if (r && r.is_income === s) {
565
+ const a = r.monthlyAmounts.reduce(Xe(o), 0);
566
+ a !== 0 && c.push({
567
+ id: `sub-${r.guid}`,
568
+ category: nt(n.category_general, r.name),
569
+ category_guid: r.guid,
572
570
  isParent: !0,
573
- top_level_category_guid: t.guid,
574
- total: i,
575
- ...t.monthlyAmounts.reduce($e, {})
571
+ top_level_category_guid: r.guid,
572
+ total: a,
573
+ monthlyAmounts: r.monthlyAmounts.reduce(Ue, {})
576
574
  });
577
575
  }
578
- return r;
579
- }, ht = ({
580
- selectedDateRange: o,
581
- selectedCategory: s,
582
- onClickRow: n,
583
- height: t = "100%",
584
- sx: r = {}
576
+ return c;
577
+ }, Do = Et("div")({
578
+ display: "flex",
579
+ visibility: "hidden",
580
+ width: 0
581
+ });
582
+ function Io({
583
+ direction: t,
584
+ index: n,
585
+ sortingOrder: s,
586
+ disabled: o,
587
+ className: r,
588
+ field: c
589
+ }) {
590
+ const a = Yt(), d = jt();
591
+ let u = null;
592
+ const i = {};
593
+ if (t === "asc" ? u = d.slots.columnSortedAscendingIcon : t === "desc" ? u = d.slots.columnSortedDescendingIcon : (u = d.slots.columnUnsortedIcon ?? null, i.sortingOrder = s), !u) return null;
594
+ const m = a.current.getColumn(c)?.headerName ?? c;
595
+ let _ = "";
596
+ t === "asc" ? _ = ", sorted ascending" : t === "desc" && (_ = ", sorted descending");
597
+ const h = ["Total", "Category"].includes(m) ? "" : " category totals", p = `Sort by ${m}${h}${_}`, y = /* @__PURE__ */ e(u, { className: "MuiDataGrid-sortIcon", fontSize: "small", ...i }), T = /* @__PURE__ */ e(
598
+ Zt,
599
+ {
600
+ disabled: o,
601
+ size: "small",
602
+ tabIndex: -1,
603
+ ...d.slotProps?.baseIconButton,
604
+ "aria-label": p,
605
+ className: `MuiDataGrid-sortButton${r ? ` ${r}` : ""}`,
606
+ title: p,
607
+ children: y
608
+ }
609
+ );
610
+ return /* @__PURE__ */ e(Do, { className: "MuiDataGrid-iconButtonContainer", children: n != null ? /* @__PURE__ */ e(Xt, { badgeContent: n, color: "default", overlap: "circular", children: T }) : T });
611
+ }
612
+ const Lo = g.memo(Io), Qe = ({
613
+ columns: t,
614
+ onRowClick: n,
615
+ parentCategory: s,
616
+ rows: o,
617
+ totalRow: r
585
618
  }) => {
586
- const i = le(), { onEvent: d } = z(), { trends: h } = k(), { trendsCategories: c } = J(), l = u.useMemo(() => fo(o.start, o.end), [o]), p = i.palette.mode === "light", m = u.useMemo(() => yo(l, h), [l, h]), _ = u.useMemo(() => {
587
- if (s)
588
- return c.find((g) => g.guid === s);
589
- }, [s, c]), f = u.useMemo(() => {
590
- let g = c;
591
- return _ && (g = _.subCategories.filter(
592
- (y) => y.monthlyAmounts.some((w) => w.amount !== 0)
593
- )), Co(g, h, l, _);
594
- }, [c, l, _, h]);
595
- return /* @__PURE__ */ e(A, { sx: { height: t, width: "100%", overflowX: "auto", boxShadow: "none", ...r }, children: /* @__PURE__ */ e(
596
- Bt,
619
+ const c = Z(), { onEvent: a } = $(), d = c.palette.mode === "light";
620
+ return /* @__PURE__ */ e(
621
+ Ut,
597
622
  {
598
- columns: m,
623
+ columns: t,
599
624
  disableColumnFilter: !0,
600
625
  disableColumnMenu: !0,
601
626
  hideFooter: !0,
602
627
  initialState: { sorting: { sortModel: [{ field: "category", sort: "asc" }] } },
603
- onRowClick: (g) => {
604
- _ || n?.(g.row.category_guid), d(v.TRENDS_CLICK_LIST_ITEM, {
605
- ...G,
606
- listItem: Et[g.row.category_guid]
628
+ onRowClick: (u) => {
629
+ s || n?.(u.row.category_guid), a(w.TRENDS_CLICK_LIST_ITEM, {
630
+ ...W,
631
+ listItem: Nt[u.row.category_guid]
607
632
  });
608
633
  },
634
+ pinnedRows: {
635
+ bottom: r ? [r] : []
636
+ },
609
637
  rowHeight: 64,
610
- rows: f,
638
+ rows: o,
611
639
  slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
640
+ slots: { columnHeaderSortIcon: Lo },
612
641
  sortingOrder: ["asc", "desc"],
613
642
  sx: {
614
643
  borderColor: "divider",
@@ -616,180 +645,241 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
616
645
  borderStyle: "solid",
617
646
  borderRadius: 2,
618
647
  "& .MuiDataGrid-columnHeaders": {
619
- bgcolor: p ? "neutral.50" : "neutral.800",
648
+ bgcolor: d ? "neutral.50" : "neutral.800",
620
649
  borderBottom: "none"
621
650
  },
622
651
  "& .trends-table-header": {
623
- bgcolor: p ? "neutral.50" : "neutral.800"
652
+ bgcolor: d ? "neutral.50" : "neutral.800"
624
653
  }
625
654
  }
626
655
  }
627
- ) });
628
- }, _o = {
656
+ );
657
+ }, yt = ({
658
+ selectedDateRange: t,
659
+ selectedCategory: n,
660
+ onClickRow: s,
661
+ height: o = "100%",
662
+ sx: r = {}
663
+ }) => {
664
+ const { trends: c } = R(), { trendsCategories: a } = q(), d = g.useMemo(() => vo(t.start, t.end), [t]), u = g.useMemo(() => wo(d, c), [d, c]), i = g.useMemo(() => {
665
+ if (n)
666
+ return a.find((h) => h.guid === n);
667
+ }, [n, a]), [f, m] = g.useMemo(() => {
668
+ let h = a;
669
+ return i && (h = i.subCategories.filter(
670
+ (p) => p.monthlyAmounts.some((y) => y.amount !== 0)
671
+ )), [
672
+ Ze(h, c, !0, d, i),
673
+ Ze(h, c, !1, d, i)
674
+ ];
675
+ }, [a, d, i, c]), _ = {
676
+ id: "total",
677
+ category: c.table_column_total,
678
+ category_guid: "total",
679
+ isParent: !1,
680
+ top_level_category_guid: "total",
681
+ total: m.reduce((h, p) => h + p.total, 0),
682
+ monthlyAmounts: m.reduce(
683
+ (h, p) => (Object.entries(p.monthlyAmounts).forEach(([y, T]) => {
684
+ h[y] = (h[y] || 0) + T;
685
+ }), h),
686
+ {}
687
+ )
688
+ };
689
+ return /* @__PURE__ */ C(
690
+ S,
691
+ {
692
+ gap: 24,
693
+ sx: { height: o, width: "100%", overflowX: "auto", boxShadow: "none", ...r },
694
+ children: [
695
+ (!i || i && i.is_income) && /* @__PURE__ */ e(
696
+ Qe,
697
+ {
698
+ columns: u,
699
+ onRowClick: s,
700
+ parentCategory: i,
701
+ rows: f
702
+ }
703
+ ),
704
+ (!i || i && !i.is_income) && /* @__PURE__ */ e(
705
+ Qe,
706
+ {
707
+ columns: u,
708
+ onRowClick: s,
709
+ parentCategory: i,
710
+ rows: m,
711
+ totalRow: _
712
+ }
713
+ )
714
+ ]
715
+ }
716
+ );
717
+ }, Eo = {
629
718
  title: "Transaction List"
630
- }, To = ({
631
- categoryGuid: o,
632
- dateRange: s,
633
- isOpen: n,
634
- onClose: t
719
+ }, Mo = ({
720
+ categoryGuid: t,
721
+ dateRange: n,
722
+ isOpen: s,
723
+ onClose: o
635
724
  }) => {
636
- const { onEvent: r } = z(), { selectedAccountGuids: i } = ye(), { common: d } = k(), { setFilter: h, sortedTransactions: c } = ve(), [l, p] = u.useState(""), m = u.useMemo(
637
- () => c.find((f) => f.guid === l),
638
- [l, c]
725
+ const { onEvent: r } = $(), { selectedAccountGuids: c } = fe(), { common: a } = R(), { setFilter: d, sortedTransactions: u } = we(), [i, f] = g.useState(""), m = g.useMemo(
726
+ () => u.find((h) => h.guid === i),
727
+ [i, u]
639
728
  );
640
- u.useEffect(() => {
641
- h({
642
- accounts: i,
643
- dateRange: s,
644
- custom: (f) => o === "" || o === f.category_guid || o === f.top_level_category_guid,
645
- showSplits: !!o
729
+ g.useEffect(() => {
730
+ d({
731
+ accounts: c,
732
+ dateRange: n,
733
+ custom: (h) => t === "" || t === h.category_guid || t === h.top_level_category_guid,
734
+ showSplits: !!t
646
735
  });
647
- }, [i, o, s]), u.useEffect(() => r(v.TRENDS_VIEW_TRANSACTIONS), []);
736
+ }, [c, t, n]), g.useEffect(() => r(w.TRENDS_VIEW_TRANSACTIONS), []);
648
737
  const _ = () => {
649
- p(""), t();
738
+ f(""), o();
650
739
  };
651
740
  return /* @__PURE__ */ C(
652
- Ne,
741
+ Pe,
653
742
  {
654
- ariaLabelClose: d.close_aria,
655
- isOpen: n,
743
+ ariaLabelClose: a.close_aria,
744
+ isOpen: s,
656
745
  onClose: _,
657
- title: _o.title,
746
+ title: Eo.title,
658
747
  children: [
659
- m && /* @__PURE__ */ e(at, { transaction: m }),
660
- !m && /* @__PURE__ */ e(it, { onClick: p })
748
+ m && /* @__PURE__ */ e(dt, { transaction: m }),
749
+ !m && /* @__PURE__ */ e(ct, { onClick: f })
661
750
  ]
662
751
  }
663
752
  );
664
- }, bo = R(To), So = ({ onBackClick: o, sx: s }) => {
665
- const { onEvent: n } = z(), { isDesktop: t, isTablet: r, isMobile: i } = q(), { isAccountDataLoaded: d, loadAccountData: h } = De(), {
666
- categoriesLoaded: c,
667
- loadCategories: l,
668
- loadDateRangeCategoryTotals: p,
669
- loadMonthlyCategoryTotals: m,
670
- monthlyCategoryTotals: _,
671
- getCategoryName: f
672
- } = J(), {
673
- isTransactionDataLoaded: g,
674
- loadTransactionData: y,
675
- sortedTransactions: w
676
- } = ve(), { selectedDateRange: b, setSelectedDateRange: M } = Ce(), { isInitialized: I, selectedAccounts: S } = ye(), { trends: H } = k(), [N, $] = u.useState(!1), [V, K] = u.useState(!1), [E, te] = u.useState("Chart"), [O, ne] = u.useState(""), [se, Z] = u.useState(window.innerHeight), ue = se - (i ? 315 : 345);
753
+ }, Ao = A(Mo), Ro = ({ onBackClick: t, onMenuClick: n, sx: s }) => {
754
+ const { onEvent: o } = $(), { isDesktop: r, isTablet: c, isMobile: a } = Q(), { isAccountDataLoaded: d, loadAccountData: u } = De(), {
755
+ categoriesLoaded: i,
756
+ loadCategories: f,
757
+ loadDateRangeCategoryTotals: m,
758
+ loadMonthlyCategoryTotals: _,
759
+ monthlyCategoryTotals: h,
760
+ getCategoryName: p
761
+ } = q(), {
762
+ isTransactionDataLoaded: y,
763
+ loadTransactionData: T,
764
+ sortedTransactions: N
765
+ } = we(), { selectedDateRange: x, setSelectedDateRange: L } = ye(), { isInitialized: M, selectedAccounts: E } = fe(), { trends: v } = R(), [K, ae] = g.useState(!1), [Y, J] = g.useState(!1), [P, V] = g.useState("Chart"), [O, ee] = g.useState(""), [Ce, ie] = g.useState(window.innerHeight), j = Ce - (a ? 315 : 345);
677
766
  Ie({
678
767
  widgetName: "TrendsFullWidget",
679
- isLoaded: N
680
- }), u.useEffect(() => {
681
- const D = () => Z(window.innerHeight);
682
- return window.addEventListener("resize", D), d || h().finally(), c || l().finally(), g || y().finally(), () => window.removeEventListener("resize", D);
683
- }, []), u.useEffect(() => {
684
- I && p(S, b.start, b.end).then(() => {
685
- m(
686
- S,
687
- b.start,
688
- b.end
768
+ isLoaded: K
769
+ }), g.useEffect(() => {
770
+ const D = () => ie(window.innerHeight);
771
+ return window.addEventListener("resize", D), d || u().finally(), i || f().finally(), y || T().finally(), () => window.removeEventListener("resize", D);
772
+ }, []), g.useEffect(() => {
773
+ M && m(E, x.start, x.end).then(() => {
774
+ _(
775
+ E,
776
+ x.start,
777
+ x.end
689
778
  );
690
779
  }).finally(() => {
691
- $(!0), n(v.TRENDS_LOAD_WIDGET, {
692
- ...G,
693
- time_period: `${Se(b.end, b.start)}M`
780
+ ae(!0), o(w.TRENDS_LOAD_WIDGET, {
781
+ ...W,
782
+ time_period: `${Se(x.end, x.start)}M`
694
783
  });
695
784
  });
696
- }, [I, S, b]);
697
- const F = u.useMemo(() => {
698
- if (!N) return { stackedDatasets: [], unstackedDatasets: [] };
699
- const D = Rt(
700
- _,
701
- b.start,
702
- b.end
703
- ), P = O.length ? D.filter(
704
- (a) => a.top_level_category_guid === O || a.category_guid === O
705
- ) : kt(D);
785
+ }, [M, E, x]);
786
+ const ne = g.useMemo(() => {
787
+ if (!K) return { stackedDatasets: [], unstackedDatasets: [] };
788
+ const D = Gt(
789
+ h,
790
+ x.start,
791
+ x.end
792
+ ), l = O.length ? D.filter(
793
+ (b) => b.top_level_category_guid === O || b.category_guid === O
794
+ ) : Bt(D);
706
795
  return {
707
- stackedDatasets: P.filter(Nt),
708
- unstackedDatasets: P.filter(Ht)
796
+ stackedDatasets: l.filter(Vt),
797
+ unstackedDatasets: l.filter(Pt)
709
798
  };
710
- }, [_, O, b]), re = (D, P) => {
711
- te(P ?? E), n(v.TRENDS_CLICK_TOGGLE_VIEW);
712
- }, Y = (D) => {
713
- const P = Xe(D?.[0], 1), a = D?.[1], T = Se(a, P);
714
- M({ start: P, end: a }), n(v.TRENDS_CLICK_TIME_WINDOW, {
715
- time_period: T + "M"
799
+ }, [h, O, x]), U = (D, l) => {
800
+ V(l ?? P), o(w.TRENDS_CLICK_TOGGLE_VIEW);
801
+ }, de = (D) => {
802
+ const l = et(D?.[0], 1), b = D?.[1], I = Se(b, l);
803
+ L({ start: l, end: b }), o(w.TRENDS_CLICK_TIME_WINDOW, {
804
+ time_period: I + "M"
716
805
  });
717
- }, he = () => {
718
- n(v.TRENDS_CLICK_FILTER);
719
- }, j = (D) => {
720
- ne(D);
721
- }, ae = (D) => {
722
- ne(D), n(v.TRENDS_CLICK_LEGEND, { category: f(D) });
723
- }, ge = (D) => {
724
- n(v.TRENDS_HOVER_LEGEND, { category: f(D) });
725
- }, ie = (D) => {
726
- n(v.TRENDS_HOVER_AREA, { category: D });
806
+ }, B = () => {
807
+ o(w.TRENDS_CLICK_FILTER);
808
+ }, ue = (D) => {
809
+ ee(D);
810
+ }, se = (D) => {
811
+ ee(D), o(w.TRENDS_CLICK_LEGEND, { category: p(D) });
812
+ }, le = (D) => {
813
+ o(w.TRENDS_HOVER_LEGEND, { category: p(D) });
727
814
  }, ce = (D) => {
728
- n(v.TRENDS_HOVER_POINT, { category: D });
815
+ o(w.TRENDS_HOVER_AREA, { category: D });
816
+ }, me = (D) => {
817
+ o(w.TRENDS_HOVER_POINT, { category: D });
729
818
  };
730
- return !I || !N ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ C(
731
- rt,
819
+ return !M || !K ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ C(
820
+ ut,
732
821
  {
733
- calendarActions: { onRangeChanged: Y },
734
- dateRange: b,
822
+ calendarActions: { onRangeChanged: de },
823
+ dateRange: x,
735
824
  dateRangeVariant: "timeframebuttons",
736
- onAccountsFilterClick: he,
737
- onBackClick: o,
825
+ onAccountsFilterClick: B,
826
+ onBackClick: t,
827
+ onMenuClick: n,
738
828
  sx: s,
739
- title: H.title,
829
+ title: v.title,
740
830
  children: [
741
831
  /* @__PURE__ */ C(
742
- x,
832
+ S,
743
833
  {
744
834
  sx: {
745
835
  // eslint-disable-next-line no-nested-ternary
746
- px: t ? 48 : r ? 24 : 12
836
+ px: r ? 48 : c ? 24 : 12
747
837
  },
748
838
  children: [
749
839
  /* @__PURE__ */ C(
750
- x,
840
+ S,
751
841
  {
752
842
  flexDirection: "row",
753
843
  justifyContent: "space-between",
754
- sx: { pb: i ? 12 : 24, pt: i ? 24 : 48 },
844
+ sx: { pb: a ? 12 : 24, pt: a ? 24 : 48 },
755
845
  children: [
756
846
  /* @__PURE__ */ e(
757
- ut,
847
+ ft,
758
848
  {
759
849
  selectedCategoryGuid: O,
760
- selectedDateRange: b
850
+ selectedDateRange: x
761
851
  }
762
852
  ),
763
- /* @__PURE__ */ e(dt, { onTabChange: re, selectedTab: E })
853
+ /* @__PURE__ */ e(pt, { onTabChange: U, selectedTab: P })
764
854
  ]
765
855
  }
766
856
  ),
767
- /* @__PURE__ */ C(x, { alignItems: "center", flexDirection: "row", width: "100%", children: [
768
- /* @__PURE__ */ e(A, { flexGrow: 1, children: O && /* @__PURE__ */ C(be, { onClick: () => ne(""), sx: { p: 0, pr: 5 }, children: [
769
- /* @__PURE__ */ e(Te, { name: "arrow_back" }),
770
- H.all_categories
857
+ /* @__PURE__ */ C(S, { alignItems: "center", flexDirection: "row", width: "100%", children: [
858
+ /* @__PURE__ */ e(H, { flexGrow: 1, children: O && /* @__PURE__ */ C(Te, { onClick: () => ee(""), sx: { p: 0, pr: 5 }, children: [
859
+ /* @__PURE__ */ e(He, { name: "arrow_back" }),
860
+ v.all_categories
771
861
  ] }) }),
772
- /* @__PURE__ */ e(be, { onClick: () => K(!0), sx: { px: 5 }, children: `${H.view_transactions} (${w.length})` })
862
+ /* @__PURE__ */ e(Te, { onClick: () => J(!0), sx: { px: 5 }, children: `${v.view_transactions} (${N.length})` })
773
863
  ] }),
774
- /* @__PURE__ */ C(A, { children: [
775
- E === "Chart" && /* @__PURE__ */ e(
776
- go,
864
+ /* @__PURE__ */ C(H, { children: [
865
+ P === "Chart" && /* @__PURE__ */ e(
866
+ So,
777
867
  {
778
- availableHeight: ue,
779
- onClickLegend: ae,
780
- onHoverArea: ie,
781
- onHoverLegend: ge,
782
- onHoverPoint: ce,
783
- stackedDatasets: F.stackedDatasets,
784
- unstackedDatasets: F.unstackedDatasets
868
+ availableHeight: j,
869
+ onClickLegend: se,
870
+ onHoverArea: ce,
871
+ onHoverLegend: le,
872
+ onHoverPoint: me,
873
+ stackedDatasets: ne.stackedDatasets,
874
+ unstackedDatasets: ne.unstackedDatasets
785
875
  }
786
876
  ),
787
- E === "Table" && /* @__PURE__ */ e(
788
- ht,
877
+ P === "Table" && /* @__PURE__ */ e(
878
+ yt,
789
879
  {
790
- onClickRow: j,
880
+ onClickRow: ue,
791
881
  selectedCategory: O,
792
- selectedDateRange: b
882
+ selectedDateRange: x
793
883
  }
794
884
  )
795
885
  ] })
@@ -797,27 +887,27 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
797
887
  }
798
888
  ),
799
889
  /* @__PURE__ */ e(
800
- bo,
890
+ Ao,
801
891
  {
802
892
  categoryGuid: O,
803
- dateRange: b,
804
- isOpen: V,
805
- onClose: () => K(!1)
893
+ dateRange: x,
894
+ isOpen: Y,
895
+ onClose: () => J(!1)
806
896
  }
807
897
  )
808
898
  ]
809
899
  }
810
900
  );
811
- }, $n = R(So), xo = () => {
812
- const { monthlyCategoryTotals: o } = J(), { trends: s } = k(), n = le(), { availableHeight: t = 300 } = qe(), r = u.useMemo(() => Wt(o), [o]);
901
+ }, rs = A(Ro), ko = () => {
902
+ const { monthlyCategoryTotals: t } = q(), { trends: n } = R(), s = Z(), { availableHeight: o = 300 } = st(), r = g.useMemo(() => zt(t), [t]);
813
903
  return /* @__PURE__ */ e(
814
- Oe,
904
+ Ve,
815
905
  {
816
906
  baseline: "min",
817
- colors: [n.palette.primary.main],
907
+ colors: [s.palette.primary.main],
818
908
  datasets: [r],
819
- height: t,
820
- labels: [s.spending_label],
909
+ height: o,
910
+ labels: [n.spending_label],
821
911
  showArea: !0,
822
912
  showAverage: !0,
823
913
  showLegend: !0,
@@ -826,41 +916,41 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
826
916
  valueFormatterString: "0,0"
827
917
  }
828
918
  );
829
- }, wo = R(xo), vo = ({ onPrimaryCtaClick: o, sx: s }) => {
830
- const { isAccountDataLoaded: n, loadAccountData: t } = De(), { loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: i } = J(), { isInitialized: d } = We(), { trends: h } = k(), { selectedAccounts: c } = ye();
831
- return u.useEffect(() => {
832
- n || t().finally();
919
+ }, Ho = A(ko), No = ({ onPrimaryCtaClick: t, sx: n }) => {
920
+ const { isAccountDataLoaded: s, loadAccountData: o } = De(), { loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: c } = q(), { isInitialized: a } = Be(), { trends: d } = R(), { selectedAccounts: u } = fe();
921
+ return g.useEffect(() => {
922
+ s || o().finally();
833
923
  }, []), Ie({
834
924
  widgetName: "TrendsMiniWidget",
835
- isLoaded: i
836
- }), u.useEffect(() => {
837
- d && n && r(c).finally();
838
- }, [n, d, c]), !n || !d || !i ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
839
- Ft,
925
+ isLoaded: c
926
+ }), g.useEffect(() => {
927
+ a && s && r(u).finally();
928
+ }, [s, a, u]), !s || !a || !c ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
929
+ Qt,
840
930
  {
841
931
  contentStyles: { height: "calc(100% - 72px)", minHeight: 300, ":last-child": { pb: 0 } },
842
- onPrimaryCtaClick: o,
843
- primaryCtaLabel: h.primary_cta,
844
- subTitle: h.sub_title,
845
- sx: { height: "100%", ...s },
846
- title: h.mini_title,
847
- children: /* @__PURE__ */ e(wo, {})
932
+ onPrimaryCtaClick: t,
933
+ primaryCtaLabel: d.primary_cta,
934
+ subTitle: d.sub_title,
935
+ sx: { height: "100%", ...n },
936
+ title: d.mini_title,
937
+ children: /* @__PURE__ */ e(Ho, {})
848
938
  }
849
939
  );
850
- }, Kn = R(vo), Do = 70, Ye = ({
851
- title: o,
852
- totalAmount: s,
853
- transactionType: n,
854
- percentage: t,
940
+ }, as = A(No), Wo = 70, qe = ({
941
+ title: t,
942
+ totalAmount: n,
943
+ transactionType: s,
944
+ percentage: o,
855
945
  secondaryLabel: r,
856
- shouldDisplayPercentage: i
946
+ shouldDisplayPercentage: c
857
947
  }) => {
858
- const { availableWidth: d } = qe(), h = u.useRef(null), c = u.useRef(null), l = Mt(Number(Math.abs(t)), {
948
+ const { availableWidth: a } = st(), d = g.useRef(null), u = g.useRef(null), i = Wt(Number(Math.abs(o)), {
859
949
  style: "percent",
860
950
  minimumIntegerDigits: 1
861
- }), p = d === 288 && oe(s, "0,0.00").length > 10 ? oe(s, "0,0") : oe(s, "0,0.00"), m = n === "spending" ? t > 0 : t >= 0, _ = n === "spending" ? "error.main" : "success.main", f = n === "spending" ? "success.main" : "text.secondary", g = h?.current, y = c?.current, w = g && y ? g.scrollWidth > y.clientWidth - Do : !1;
951
+ }), f = a === 288 && re(n, "0,0.00").length > 10 ? re(n, "0,0") : re(n, "0,0.00"), m = s === "spending" ? o > 0 : o >= 0, _ = s === "spending" ? "error.main" : "success.main", h = s === "spending" ? "success.main" : "text.secondary", p = d?.current, y = u?.current, T = p && y ? p.scrollWidth > y.clientWidth - Wo : !1;
862
952
  return /* @__PURE__ */ C(
863
- x,
953
+ S,
864
954
  {
865
955
  sx: {
866
956
  border: 1,
@@ -873,7 +963,7 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
873
963
  },
874
964
  children: [
875
965
  /* @__PURE__ */ C(
876
- x,
966
+ S,
877
967
  {
878
968
  sx: {
879
969
  alignItems: "center",
@@ -881,18 +971,18 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
881
971
  justifyContent: "space-between"
882
972
  },
883
973
  children: [
884
- /* @__PURE__ */ e(fe, { color: "text.secondary", variant: "caption", children: o }),
885
- i && /* @__PURE__ */ C(x, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
886
- m ? /* @__PURE__ */ e(zt, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e($t, { size: 20, sx: { color: f } }),
974
+ /* @__PURE__ */ e(pe, { color: "text.secondary", variant: "caption", children: t }),
975
+ c && /* @__PURE__ */ C(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
976
+ m ? /* @__PURE__ */ e(Jt, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(eo, { size: 20, sx: { color: h } }),
887
977
  /* @__PURE__ */ e(
888
- fe,
978
+ pe,
889
979
  {
890
980
  sx: {
891
- color: m ? _ : f,
981
+ color: m ? _ : h,
892
982
  fontWeight: 600
893
983
  },
894
984
  variant: "body2",
895
- children: l
985
+ children: i
896
986
  }
897
987
  )
898
988
  ] })
@@ -900,9 +990,9 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
900
990
  }
901
991
  ),
902
992
  /* @__PURE__ */ C(
903
- x,
993
+ S,
904
994
  {
905
- ref: c,
995
+ ref: u,
906
996
  sx: {
907
997
  alignItems: "center",
908
998
  flexDirection: "row",
@@ -910,17 +1000,17 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
910
1000
  },
911
1001
  children: [
912
1002
  /* @__PURE__ */ e(
913
- A,
1003
+ H,
914
1004
  {
915
- ref: h,
1005
+ ref: d,
916
1006
  sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
917
- children: /* @__PURE__ */ e(Ue, { children: p })
1007
+ children: /* @__PURE__ */ e(Ge, { children: f })
918
1008
  }
919
1009
  ),
920
- i && d >= 450 && !w && /* @__PURE__ */ e(
921
- fe,
1010
+ c && a >= 450 && !T && /* @__PURE__ */ e(
1011
+ pe,
922
1012
  {
923
- color: m ? _ : f,
1013
+ color: m ? _ : h,
924
1014
  variant: "caption",
925
1015
  children: r
926
1016
  }
@@ -931,55 +1021,55 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
931
1021
  ]
932
1022
  }
933
1023
  );
934
- }, Lo = R(() => {
935
- const { trends: o } = k();
936
- return /* @__PURE__ */ C(x, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
937
- /* @__PURE__ */ e(Kt, { size: 32 }),
938
- /* @__PURE__ */ C(x, { children: [
939
- /* @__PURE__ */ e(fe, { fontWeight: 600, variant: "body1", children: o.zero_state_content_header }),
940
- /* @__PURE__ */ e(fe, { color: "text.secondary", variant: "subtitle2", children: o.zero_state_content_description })
1024
+ }, Oo = A(() => {
1025
+ const { trends: t } = R();
1026
+ return /* @__PURE__ */ C(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
1027
+ /* @__PURE__ */ e(to, { size: 32 }),
1028
+ /* @__PURE__ */ C(S, { children: [
1029
+ /* @__PURE__ */ e(pe, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
1030
+ /* @__PURE__ */ e(pe, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
941
1031
  ] })
942
1032
  ] });
943
- }), Yn = R(({ onCtaClick: o }) => {
944
- const { isAccountDataLoaded: s, loadAccountData: n, visibleAccounts: t } = De();
945
- u.useEffect(() => {
946
- s || n().finally();
1033
+ }), is = A(({ onCtaClick: t }) => {
1034
+ const { isAccountDataLoaded: n, loadAccountData: s, visibleAccounts: o } = De();
1035
+ g.useEffect(() => {
1036
+ n || s().finally();
947
1037
  }, []);
948
- const { onEvent: r } = z(), { monthlyCategoryTotals: i, loadMonthlyCategoryTotals: d, monthlyTotalsLoaded: h } = J(), c = {
949
- start: Pt(/* @__PURE__ */ new Date(), 1),
1038
+ const { onEvent: r } = $(), { monthlyCategoryTotals: c, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: d } = q(), u = {
1039
+ start: qt(/* @__PURE__ */ new Date(), 1),
950
1040
  end: /* @__PURE__ */ new Date()
951
- }, { trends: l } = k(), { selectedAccounts: p, isInitialized: m } = ye();
1041
+ }, { trends: i } = R(), { selectedAccounts: f, isInitialized: m } = fe();
952
1042
  Ie({
953
1043
  widgetName: "TrendsMicroWidget",
954
- isLoaded: h
955
- }), u.useEffect(() => {
956
- m && d(p, c.start).then(() => {
957
- r(v.TRENDS_LOAD_WIDGET, {
958
- state: t?.length ? "default" : "zeroState"
1044
+ isLoaded: d
1045
+ }), g.useEffect(() => {
1046
+ m && a(f, u.start).then(() => {
1047
+ r(w.TRENDS_LOAD_WIDGET, {
1048
+ state: o?.length ? "default" : "zeroState"
959
1049
  });
960
1050
  });
961
- }, [m, p]);
962
- const { spendingData: _, incomeData: f } = u.useMemo(
1051
+ }, [m, f]);
1052
+ const { spendingData: _, incomeData: h } = g.useMemo(
963
1053
  () => ({
964
- spendingData: nt(i, c),
965
- incomeData: ot(i, c)
1054
+ spendingData: it(c, u),
1055
+ incomeData: at(c, u)
966
1056
  }),
967
- [i, c]
968
- ), [g, y] = _, [w, b] = f, M = Pe(y.y, g.y), I = Pe(b.y, w.y), S = m && !t?.length, H = () => {
1057
+ [c, u]
1058
+ ), [p, y] = _, [T, N] = h, x = Ye(y.y, p.y), L = Ye(N.y, T.y), M = m && !o?.length, E = () => {
969
1059
  r(
970
- S ? v.TRENDS_CLICK_GET_STARTED : v.TRENDS_CLICK_VIEW_MORE
971
- ), o();
1060
+ M ? w.TRENDS_CLICK_GET_STARTED : w.TRENDS_CLICK_VIEW_MORE
1061
+ ), t();
972
1062
  };
973
- return !h || !m ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
974
- Ut,
1063
+ return !d || !m ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
1064
+ ao,
975
1065
  {
976
1066
  className: "mx-trends-microwidget",
977
- ctaLabel: l.micro_primary_cta_label,
978
- onCTAClick: H,
979
- subHeader: S ? void 0 : l.micro_subheader,
980
- title: l.title,
981
- children: S ? /* @__PURE__ */ e(Lo, {}) : /* @__PURE__ */ C(
982
- x,
1067
+ ctaLabel: i.micro_primary_cta_label,
1068
+ onCTAClick: E,
1069
+ subHeader: M ? void 0 : i.micro_subheader,
1070
+ title: i.title,
1071
+ children: M ? /* @__PURE__ */ e(Oo, {}) : /* @__PURE__ */ C(
1072
+ S,
983
1073
  {
984
1074
  sx: {
985
1075
  alignItems: "stretch",
@@ -988,24 +1078,24 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
988
1078
  },
989
1079
  children: [
990
1080
  /* @__PURE__ */ e(
991
- Ye,
1081
+ qe,
992
1082
  {
993
- percentage: M,
994
- secondaryLabel: l.micro_secondary_label,
995
- shouldDisplayPercentage: y.y !== 0 && g.y !== 0,
996
- title: l.spending_label,
1083
+ percentage: x,
1084
+ secondaryLabel: i.micro_secondary_label,
1085
+ shouldDisplayPercentage: y.y !== 0 && p.y !== 0,
1086
+ title: i.spending_label,
997
1087
  totalAmount: y.y,
998
1088
  transactionType: "spending"
999
1089
  }
1000
1090
  ),
1001
1091
  /* @__PURE__ */ e(
1002
- Ye,
1092
+ qe,
1003
1093
  {
1004
- percentage: I,
1005
- secondaryLabel: l.micro_secondary_label,
1006
- shouldDisplayPercentage: b.y !== 0 && w.y !== 0,
1007
- title: l.income_label,
1008
- totalAmount: b.y,
1094
+ percentage: L,
1095
+ secondaryLabel: i.micro_secondary_label,
1096
+ shouldDisplayPercentage: N.y !== 0 && T.y !== 0,
1097
+ title: i.income_label,
1098
+ totalAmount: N.y,
1009
1099
  transactionType: "income"
1010
1100
  }
1011
1101
  )
@@ -1014,21 +1104,21 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1014
1104
  )
1015
1105
  }
1016
1106
  );
1017
- }), Io = R(
1018
- ({ isExpanded: o, onClick: s }) => {
1019
- const n = ct();
1020
- return /* @__PURE__ */ e(Qt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(qt, { onClick: s, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
1021
- x,
1107
+ }), Go = A(
1108
+ ({ isExpanded: t, onClick: n }) => {
1109
+ const s = Z();
1110
+ return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(lo, { onClick: n, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
1111
+ S,
1022
1112
  {
1023
- sx: { color: n.palette.primary.main, flexDirection: "row", alignItems: "center" },
1113
+ sx: { color: s.palette.primary.main, flexDirection: "row", alignItems: "center" },
1024
1114
  children: [
1025
- /* @__PURE__ */ e(eo, { children: /* @__PURE__ */ e(X, { bold: !0, variant: "body2", children: o ? "View less" : "View more" }) }),
1026
- /* @__PURE__ */ e(Jt, { sx: { color: n.palette.primary.main }, children: o ? /* @__PURE__ */ e(Yt, {}) : /* @__PURE__ */ e(
1027
- jt,
1115
+ /* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(F, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
1116
+ /* @__PURE__ */ e(co, { sx: { color: s.palette.primary.main }, children: t ? /* @__PURE__ */ e(oo, {}) : /* @__PURE__ */ e(
1117
+ no,
1028
1118
  {
1029
1119
  sx: {
1030
1120
  transition: "transform 0.3s ease-in-out",
1031
- transform: o ? "rotate(180deg)" : "rotate(0deg)"
1121
+ transform: t ? "rotate(180deg)" : "rotate(0deg)"
1032
1122
  }
1033
1123
  }
1034
1124
  ) })
@@ -1036,128 +1126,139 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1036
1126
  }
1037
1127
  ) }) });
1038
1128
  }
1039
- ), je = R(
1129
+ ), Je = A(
1040
1130
  ({
1041
- totalAmount: o,
1042
- guid: s,
1043
- name: n,
1044
- transactions: t,
1131
+ totalAmount: t,
1132
+ guid: n,
1133
+ name: s,
1134
+ transactions: o,
1045
1135
  onClick: r,
1046
- isLastItem: i = !1,
1047
- showDivider: d = !0
1136
+ isLastItem: c = !1,
1137
+ showDivider: a = !0
1048
1138
  }) => {
1049
- const { trends: h } = k(), { onEvent: c } = z(), l = `${t.length} ${t.length === 1 ? h.transaction : h.transactions}`, p = () => {
1050
- r?.(), c(v.TRENDS_CLICK_LIST_ITEM, {
1051
- ...G,
1052
- listItem: n
1139
+ const { trends: d } = R(), { onEvent: u } = $(), i = Z(), f = `${o.length} ${o.length === 1 ? d.transaction : d.transactions}`, m = () => {
1140
+ r?.(), u(w.TRENDS_CLICK_LIST_ITEM, {
1141
+ ...W,
1142
+ listItem: s
1053
1143
  });
1054
1144
  };
1055
- return /* @__PURE__ */ C(u.Fragment, { children: [
1145
+ return /* @__PURE__ */ C(g.Fragment, { children: [
1056
1146
  /* @__PURE__ */ e(
1057
- tt,
1147
+ uo,
1058
1148
  {
1059
- leftIcon: s ? /* @__PURE__ */ e(we, { categoryGuid: s }) : void 0,
1060
- onClick: p,
1061
- rightContent: oe(Math.abs(o), "0,0.00"),
1062
- rightIcon: r ? /* @__PURE__ */ e(xt, {}) : void 0,
1063
- subtitle: l,
1064
- title: n
1149
+ leftIcon: n ? /* @__PURE__ */ e(
1150
+ ve,
1151
+ {
1152
+ categoryGuid: n,
1153
+ sx: {
1154
+ bgcolor: Mt(Oe(n, i), 0.15),
1155
+ border: `1px solid ${Oe(n, i)}`,
1156
+ color: "text.primary"
1157
+ }
1158
+ }
1159
+ ) : void 0,
1160
+ onClick: m,
1161
+ rightContent: re(Math.abs(t), "0,0.00"),
1162
+ rightIcon: r ? /* @__PURE__ */ e(so, {}) : void 0,
1163
+ subtitle: f,
1164
+ title: s
1065
1165
  }
1066
1166
  ),
1067
- d && /* @__PURE__ */ e(He, { sx: { ml: i ? 24 : 68 } })
1068
- ] }, s);
1167
+ a && /* @__PURE__ */ e(Ne, { component: "li", sx: { ml: c ? 24 : 68 } })
1168
+ ] }, n);
1069
1169
  }
1070
- ), Eo = R(
1071
- ({ availableHeight: o = 0, onCategoryClick: s }) => {
1072
- const { collapsedCategories: n, visibleCategories: t, setVisibleListLength: r } = Ce(), { isLargeDesktop: i, isDesktop: d } = q(), { trends: h } = k(), { onEvent: c } = z(), [l, p] = u.useState(!1), m = d || i;
1073
- u.useEffect(() => {
1074
- const g = Math.floor(o / 64) - 1, y = t.length + n.length;
1075
- g !== t.length && (r(m ? Math.max(g, 5) : 5), p(g >= y));
1076
- }, [o]);
1170
+ ), Bo = A(
1171
+ ({ availableHeight: t = 0, onCategoryClick: n }) => {
1172
+ const { collapsedCategories: s, visibleCategories: o, setVisibleListLength: r } = ye(), { isLargeDesktop: c, isDesktop: a } = Q(), { trends: d } = R(), { onEvent: u } = $(), [i, f] = g.useState(!1), m = a || c;
1173
+ g.useEffect(() => {
1174
+ const p = Math.floor(t / 64) - 1, y = o.length + s.length;
1175
+ p !== o.length && (r(m ? Math.max(p, 5) : 5), f(p >= y));
1176
+ }, [t]);
1077
1177
  const _ = () => {
1078
- p(!l), c(v.TRENDS_CLICK_VIEW_MORE, {
1079
- ...G
1178
+ f(!i), u(w.TRENDS_CLICK_VIEW_MORE, {
1179
+ ...W
1080
1180
  });
1081
- }, f = t.length + (l ? n.length : 0);
1082
- return /* @__PURE__ */ e(x, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(Zt, { children: [
1083
- /* @__PURE__ */ e(x, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Ue, { children: h.categories }) }),
1084
- t.map((g, y) => /* @__PURE__ */ e(
1085
- je,
1086
- {
1087
- ...g,
1088
- isLastItem: y === f - 1,
1089
- onClick: g.transactions.length > 0 ? () => s(g) : void 0,
1090
- showDivider: !0
1091
- },
1092
- g.guid
1093
- )),
1094
- /* @__PURE__ */ e(
1095
- Xt,
1096
- {
1097
- in: l,
1098
- sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
1099
- children: n.map((g, y) => {
1100
- const w = t.length + y;
1101
- return /* @__PURE__ */ e(
1102
- je,
1103
- {
1104
- ...g,
1105
- isLastItem: w === f - 1,
1106
- onClick: g.transactions.length > 0 ? () => s(g) : void 0,
1107
- showDivider: !0
1108
- },
1109
- g.guid
1110
- );
1111
- })
1112
- }
1113
- ),
1114
- n.length > 0 && /* @__PURE__ */ e(Io, { isExpanded: l, onClick: _ })
1115
- ] }) });
1181
+ }, h = o.length + (i ? s.length : 0);
1182
+ return /* @__PURE__ */ C(S, { sx: { width: "100%" }, children: [
1183
+ /* @__PURE__ */ e(S, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Ge, { children: d.categories }) }),
1184
+ /* @__PURE__ */ C(We, { children: [
1185
+ o.map((p, y) => /* @__PURE__ */ e(
1186
+ Je,
1187
+ {
1188
+ ...p,
1189
+ isLastItem: y === h - 1,
1190
+ onClick: p.transactions.length > 0 ? () => n(p) : void 0,
1191
+ showDivider: !0
1192
+ },
1193
+ p.guid
1194
+ )),
1195
+ /* @__PURE__ */ e(
1196
+ io,
1197
+ {
1198
+ component: "li",
1199
+ in: i,
1200
+ sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
1201
+ children: /* @__PURE__ */ e(We, { children: s.map((p, y) => {
1202
+ const T = o.length + y;
1203
+ return /* @__PURE__ */ e(
1204
+ Je,
1205
+ {
1206
+ ...p,
1207
+ isLastItem: T === h - 1,
1208
+ onClick: p.transactions.length > 0 ? () => n(p) : void 0,
1209
+ showDivider: !0
1210
+ },
1211
+ p.guid
1212
+ );
1213
+ }) })
1214
+ }
1215
+ ),
1216
+ s.length > 0 && /* @__PURE__ */ e(Go, { isExpanded: i, onClick: _ })
1217
+ ] })
1218
+ ] });
1116
1219
  }
1117
- ), Mo = ({ beats: o, onInsightCardClick: s }) => {
1118
- const { onEvent: n } = z(), { isMobile: t, isDesktop: r, isLargeDesktop: i } = q(), { beatStore: d, endpoint: h, sessionToken: c } = We(), l = r || i, p = l || t ? 1 : 2, m = () => null, _ = (M) => {
1119
- s?.(M), n(v.TRENDS_CLICK_INSIGHT, G);
1120
- }, f = l ? 200 : 170, g = l ? 170 : 124, y = l ? 56 : 0, w = o.length > 0 ? f + y : g, b = l && o.length > 0 ? f : void 0;
1121
- return /* @__PURE__ */ e(to, { sx: { height: w }, children: /* @__PURE__ */ e(
1122
- Vt,
1220
+ ), Po = ({ beats: t, onInsightCardClick: n }) => {
1221
+ const { onEvent: s } = $(), { isMobile: o, isDesktop: r, isLargeDesktop: c } = Q(), { beatStore: a, endpoint: d, sessionToken: u } = Be(), i = r || c, f = i || o ? 1 : 2, m = () => null, _ = (T) => {
1222
+ n?.(T), s(w.TRENDS_CLICK_INSIGHT, W);
1223
+ }, h = i ? 200 : 170, p = i ? 170 : 124, y = t.length > 0 ? h : p;
1224
+ return /* @__PURE__ */ e(mo, { sx: { height: y }, children: /* @__PURE__ */ e(
1225
+ Kt,
1123
1226
  {
1124
- areBeatsLoading: d.isLoading,
1125
- beats: o,
1126
- endpoint: h,
1127
- heightOverrides: b,
1227
+ areBeatsLoading: a.isLoading,
1228
+ beats: t,
1229
+ cardStyle: "border",
1230
+ endpoint: d,
1231
+ headerSx: { p: 0 },
1128
1232
  logOutUser: m,
1129
1233
  onCardClick: _,
1130
- showBorder: !0,
1131
- showCTAColocatedWithText: !1,
1132
1234
  showCarouselControls: !0,
1133
- showHeader: l,
1235
+ showHeader: i,
1134
1236
  showIcon: !0,
1135
1237
  showWithMargin: !1,
1136
- token: c,
1238
+ token: u,
1137
1239
  userHasFullInsightFeedBeats: !1,
1138
- variant: "outlined",
1139
- visibleCardsCount: p
1240
+ visibleCardsCount: f
1140
1241
  }
1141
1242
  ) });
1142
- }, Ao = R(Mo), Ro = R(({ chartLabel: o, chartColor: s }) => {
1143
- const { onEvent: n } = z(), {
1144
- categoryDetailsChartData: { monthlyAmounts: t, tooltipLabels: r }
1145
- } = Ce();
1146
- return /* @__PURE__ */ e(x, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
1147
- Oe,
1243
+ }, Vo = A(Po), zo = A(({ chartLabel: t, chartColor: n }) => {
1244
+ const { onEvent: s } = $(), {
1245
+ categoryDetailsChartData: { monthlyAmounts: o, tooltipLabels: r }
1246
+ } = ye();
1247
+ return /* @__PURE__ */ e(S, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
1248
+ Ve,
1148
1249
  {
1149
1250
  baseline: "min",
1150
- colors: [s],
1251
+ colors: [n],
1151
1252
  curveType: "bump",
1152
1253
  customTooltipLabels: r,
1153
- datasets: [t],
1254
+ datasets: [o],
1154
1255
  height: 265,
1155
- labels: [o],
1256
+ labels: [t],
1156
1257
  markStyles: () => ({
1157
- stroke: s
1258
+ stroke: n
1158
1259
  }),
1159
1260
  onItemClick: () => {
1160
- n(v.TRENDS_CLICK_CHART, G);
1261
+ s(w.TRENDS_CLICK_CHART, W);
1161
1262
  },
1162
1263
  showArea: !0,
1163
1264
  showAverage: !0,
@@ -1172,100 +1273,92 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1172
1273
  valueFormatterString: "0,0"
1173
1274
  }
1174
1275
  ) });
1175
- }), ko = R(({ onClose: o }) => {
1176
- const s = ct(), { is_mobile_webview: n } = Je(), { isDesktop: t, isSmallTablet: r, isTablet: i } = q(), { onEvent: d } = z(), { common: h, trends: c } = k(), { selectedCategoryData: l, selectedDateRangeMonthRange: p } = Ce(), { sortedTransactions: m } = ve(), [_, f] = u.useState(null);
1177
- if (!l)
1276
+ }), Fo = A(() => {
1277
+ const t = Z(), { is_mobile_webview: n } = rt(), { isDesktop: s, isSmallTablet: o, isTablet: r } = Q(), { common: c, trends: a } = R(), { selectedCategoryData: d, selectedDateRangeMonthRange: u } = ye(), { sortedTransactions: i } = we(), [f, m] = g.useState(null);
1278
+ if (!d)
1178
1279
  return null;
1179
- const { guid: g, name: y, is_income: w, totalAmount: b } = l, M = w ? c.category_income : c.category_spending, I = no(g, s), S = w ? c.income_label : c.spending_label, H = ` ${l.transactions.length === 1 ? c.transaction : c.transactions} (${l.transactions.length})`, N = u.useMemo(
1180
- () => m.find((E) => E.guid === _),
1181
- [_, m]
1182
- ), $ = m.length > 0 && !n && (t || i && !r), V = (E) => E.category_guid === g || E.top_level_category_guid === g, K = () => {
1183
- o?.(), d(v.TRENDS_CLICK_BACK, G);
1184
- };
1185
- return /* @__PURE__ */ C(
1186
- Ne,
1187
- {
1188
- ariaLabelClose: c.close_category_details,
1189
- isOpen: !0,
1190
- onClose: K,
1191
- shouldShowHeaderShadow: !0,
1192
- title: M,
1193
- children: [
1194
- /* @__PURE__ */ C(x, { sx: { alignItems: "center", height: "100%" }, children: [
1195
- /* @__PURE__ */ C(oo, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
1196
- /* @__PURE__ */ e(
1197
- tt,
1198
- {
1199
- leftIcon: /* @__PURE__ */ e(we, { categoryGuid: g }),
1200
- rightContent: oe(Math.abs(b), "0,0.00"),
1201
- subtitle: p,
1202
- title: y
1203
- }
1204
- ),
1205
- /* @__PURE__ */ e(Ro, { chartColor: I, chartLabel: S }),
1206
- /* @__PURE__ */ C(x, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
1207
- /* @__PURE__ */ e(X, { bold: !0, variant: "body1", children: H }),
1208
- $ && /* @__PURE__ */ e(so, { filter: V })
1209
- ] })
1210
- ] }),
1211
- /* @__PURE__ */ e(
1212
- it,
1213
- {
1214
- bgcolor: "transparent",
1215
- filter: V,
1216
- height: "calc(100vh - 475px)",
1217
- onClick: f
1218
- }
1219
- )
1220
- ] }),
1280
+ const { guid: _, name: h, is_income: p, totalAmount: y } = d, T = Oe(_, t), N = p ? a.income_label : a.spending_label, x = ` ${d.transactions.length === 1 ? a.transaction : a.transactions} (${d.transactions.length})`, L = g.useMemo(
1281
+ () => i.find((v) => v.guid === f),
1282
+ [f, i]
1283
+ ), M = i.length > 0 && !n && (s || r && !o), E = (v) => v.category_guid === _ || v.top_level_category_guid === _;
1284
+ return /* @__PURE__ */ C(S, { sx: { alignItems: "center", height: "100%" }, children: [
1285
+ /* @__PURE__ */ C(S, { sx: { borderRadius: 0, pb: 4, pt: 16, px: 12, width: "100%" }, children: [
1286
+ /* @__PURE__ */ e(We, { sx: { px: 12 }, children: /* @__PURE__ */ C(mt, { children: [
1287
+ /* @__PURE__ */ e(ho, { children: /* @__PURE__ */ e(ve, { categoryGuid: _ }) }),
1221
1288
  /* @__PURE__ */ e(
1222
- Ne,
1289
+ ht,
1223
1290
  {
1224
- ariaLabelClose: h.close_aria,
1225
- isOpen: !!N,
1226
- onClose: () => f(""),
1227
- title: c.transaction,
1228
- children: N && /* @__PURE__ */ e(at, { transaction: N })
1291
+ primary: h,
1292
+ secondary: u,
1293
+ slotProps: {
1294
+ primary: { component: "div", variant: "h3", fontSize: 18, fontWeight: 700 },
1295
+ secondary: { component: "div", variant: "body2", fontSize: 13 }
1296
+ }
1229
1297
  }
1230
- )
1231
- ]
1232
- }
1233
- );
1234
- }), Ho = (o, s) => {
1235
- const n = ot(o, s), t = nt(o, s);
1236
- return [n, t].filter((r) => r.length > 0);
1237
- }, No = (o, s) => {
1238
- const [n, t] = o, r = n, i = t ?? n, d = [];
1298
+ ),
1299
+ /* @__PURE__ */ e(F, { component: "div", variant: "h3", children: re(Math.abs(y), "0,0.00") })
1300
+ ] }) }),
1301
+ /* @__PURE__ */ e(zo, { chartColor: T, chartLabel: N }),
1302
+ /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 12 }, children: [
1303
+ /* @__PURE__ */ e(F, { bold: !0, variant: "body1", children: x }),
1304
+ M && /* @__PURE__ */ e(go, { filter: E })
1305
+ ] })
1306
+ ] }),
1307
+ /* @__PURE__ */ e(
1308
+ ct,
1309
+ {
1310
+ bgcolor: "transparent",
1311
+ filter: E,
1312
+ height: "calc(100vh - 475px)",
1313
+ onClick: m
1314
+ }
1315
+ ),
1316
+ /* @__PURE__ */ e(
1317
+ Pe,
1318
+ {
1319
+ ariaLabelClose: c.close_aria,
1320
+ isOpen: !!L,
1321
+ onClose: () => m(""),
1322
+ title: a.transaction,
1323
+ children: L && /* @__PURE__ */ e(dt, { transaction: L })
1324
+ }
1325
+ )
1326
+ ] });
1327
+ }), $o = (t, n) => {
1328
+ const s = at(t, n), o = it(t, n);
1329
+ return [s, o].filter((r) => r.length > 0);
1330
+ }, Ko = (t, n) => {
1331
+ const [s, o] = t, r = s, c = o ?? s, a = [];
1239
1332
  if (r) {
1240
- const h = r.reduce((c, l) => c + l.y, 0);
1241
- d.push({ label: s.income_label, amount: h });
1333
+ const d = r.reduce((u, i) => u + i.y, 0);
1334
+ a.push({ label: n.income_label, amount: d });
1242
1335
  }
1243
- if (i) {
1244
- const h = i.reduce((c, l) => c + l.y, 0);
1245
- d.push({ label: s.spending_label, amount: h });
1336
+ if (c) {
1337
+ const d = c.reduce((u, i) => u + i.y, 0);
1338
+ a.push({ label: n.spending_label, amount: d });
1246
1339
  }
1247
- return d;
1248
- }, Wo = ({
1249
- availableHeight: o = 0,
1250
- minHeight: s = 500,
1251
- selectedDateRange: n,
1252
- totals: t
1340
+ return a;
1341
+ }, Yo = ({
1342
+ availableHeight: t = 0,
1343
+ minHeight: n = 500,
1344
+ selectedDateRange: s,
1345
+ totals: o
1253
1346
  }) => {
1254
- const r = le(), { onEvent: i } = z(), { trends: d } = k(), { isSmallMobile: h, isMobile: c, isSmallTablet: l, isTablet: p } = q(), m = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = Ho(t, n), f = No(_, d), [g, y] = u.useState(0), w = 458, b = 195, M = 56, I = c || h ? b : l || p ? w : g;
1255
- return u.useEffect(() => {
1256
- const H = Math.max(o - M, s);
1257
- y(H);
1258
- }, [o]), /* @__PURE__ */ e(
1259
- Oe,
1347
+ const r = Z(), { onEvent: c } = $(), { trends: a } = R(), { isSmallMobile: d, isMobile: u, isSmallTablet: i, isTablet: f } = Q(), m = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = $o(o, s), h = Ko(_, a), [p, y] = g.useState(0), T = 458, N = 195, x = 56, L = u || d ? N : i || f ? T : p;
1348
+ return g.useEffect(() => {
1349
+ const E = Math.max(t - x, n);
1350
+ y(E);
1351
+ }, [t]), /* @__PURE__ */ e(
1352
+ Ve,
1260
1353
  {
1261
1354
  baseline: "min",
1262
1355
  colors: m,
1263
1356
  curveType: "bump",
1264
1357
  datasets: _,
1265
- height: I,
1266
- labels: f,
1358
+ height: L,
1359
+ labels: h,
1267
1360
  onItemClick: () => {
1268
- i(v.TRENDS_CLICK_CHART, G);
1361
+ c(w.TRENDS_CLICK_CHART, W);
1269
1362
  },
1270
1363
  showArea: !0,
1271
1364
  showAxisHighlight: !0,
@@ -1278,7 +1371,7 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1278
1371
  valueFormatterString: "0.0a"
1279
1372
  }
1280
1373
  );
1281
- }, Oo = R(Wo), Go = [
1374
+ }, jo = A(Yo), Uo = [
1282
1375
  "BillAmountNotStandard",
1283
1376
  "CategorySpendingV2",
1284
1377
  "CostOfLivingToIncome",
@@ -1312,189 +1405,209 @@ const lt = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1312
1405
  "WeeklyNewMerchantsV2",
1313
1406
  "WeeklyNoSpendDays",
1314
1407
  "WeeklySmallPurchasesSummary"
1315
- ], Bo = ({ onBackClick: o, onInsightCardClick: s, sx: n }) => {
1316
- const { onEvent: t } = z(), { config: r } = Je(), { isDesktop: i, isLargeDesktop: d, isMobile: h } = q(), { isAccountDataLoaded: c, loadAccountData: l, visibleAccounts: p } = De(), {
1317
- categoriesLoaded: m,
1318
- loadCategories: _,
1319
- loadDateRangeCategoryTotals: f,
1320
- loadMonthlyCategoryTotals: g,
1321
- monthlyCategoryTotals: y,
1322
- monthlyTotalsLoaded: w
1323
- } = J(), { isTransactionDataLoaded: b, loadTransactionData: M, setFilter: I } = ve(), { selectedDateRange: S, setSelectedCategoryData: H, setSelectedDateRange: N } = Ce(), { isInitialized: $, selectedAccounts: V, selectedAccountGuids: K } = ye(), { trends: E, connect: te } = k(), { beatStore: O } = We(), se = ro() && r.show_insights_widget_in_master, Z = i || d, [de, ue] = u.useState(!1), [F, re] = u.useState(!1), [Y, he] = u.useState("Chart"), [j, ae] = u.useState(""), [ge, ie] = u.useState(!1), [ce, D] = u.useState(window.innerHeight), P = Z ? 56 : 0, a = ce - 208, T = ce - (se ? 550 + P : 266), [L, U] = u.useState(!1), Ee = r.show_connections_widget_in_master ? "buttons" : "no-buttons";
1408
+ ], Xo = (t, n, s) => ({
1409
+ description: n ? t.empty_state_sub_text : t.empty_state_sub_text_no_aggregation,
1410
+ header: n ? t.zero_state_content_header : t.zero_state_content_header_no_aggregation,
1411
+ onClickHandler: n ? s : void 0,
1412
+ primaryButton: n ? t.empty_state_primary : void 0
1413
+ }), Zo = ({
1414
+ onBackClick: t,
1415
+ onMenuClick: n,
1416
+ onInsightCardClick: s,
1417
+ sx: o
1418
+ }) => {
1419
+ const { onEvent: r } = $(), { config: c } = rt(), { isDesktop: a, isLargeDesktop: d, isMobile: u } = Q(), { isAccountDataLoaded: i, loadAccountData: f, visibleAccounts: m } = De(), {
1420
+ categoriesLoaded: _,
1421
+ loadCategories: h,
1422
+ loadDateRangeCategoryTotals: p,
1423
+ loadMonthlyCategoryTotals: y,
1424
+ monthlyCategoryTotals: T,
1425
+ monthlyTotalsLoaded: N
1426
+ } = q(), { isTransactionDataLoaded: x, loadTransactionData: L, setFilter: M } = we(), { selectedCategoryData: E, selectedDateRange: v, setSelectedCategoryData: K, setSelectedDateRange: ae } = ye(), { isInitialized: Y, selectedAccounts: J, selectedAccountGuids: P } = fe(), { trends: V, connect: O } = R(), { beatStore: ee } = Be(), ie = po() && c.show_insights_widget_in_master, te = a || d, [j, ne] = g.useState(!1), [U, de] = g.useState(!1), [B, ue] = g.useState("Chart"), [se, le] = g.useState(""), [ce, me] = g.useState(window.innerHeight), D = te ? 56 : 0, l = ce - 208, b = ce - (ie ? 550 + D : 266), [I, z] = g.useState(!1), Ee = c.show_connections_widget_in_master;
1324
1427
  Ie({
1325
1428
  widgetName: "TrendsWidget",
1326
- isLoaded: de
1429
+ isLoaded: j
1327
1430
  });
1328
- const _e = u.useMemo(() => F ? O.getFilteredBeats({ templates: Go }) : [], [F]);
1329
- u.useEffect(() => {
1330
- const W = () => D(window.innerHeight);
1331
- return window.addEventListener("resize", W), c || l().finally(), m || _().finally(), b || M().finally(), () => window.removeEventListener("resize", W);
1332
- }, []), u.useEffect(() => {
1333
- $ && (O.loadBeats().finally(() => re(!0)), f(V, S.start, S.end).then(() => {
1334
- g(
1335
- V,
1336
- S.start,
1337
- S.end
1338
- );
1431
+ const _e = g.useMemo(() => U ? ee.getFilteredBeats({ templates: Uo }) : [], [U]);
1432
+ g.useEffect(() => {
1433
+ const k = () => me(window.innerHeight);
1434
+ return window.addEventListener("resize", k), i || f().finally(), _ || h().finally(), x || L().finally(), () => window.removeEventListener("resize", k);
1435
+ }, []), g.useEffect(() => {
1436
+ Y && i && (ee.loadBeats().finally(() => de(!0)), p(J, v.start, v.end).then(() => {
1437
+ y(
1438
+ J,
1439
+ v.start,
1440
+ v.end
1441
+ ).finally();
1339
1442
  }).finally(() => {
1340
- ue(!0), t(v.TRENDS_LOAD_WIDGET, {
1341
- ...G,
1342
- time_period: `${Se(S.end, S.start)}M`
1443
+ ne(!0), r(w.TRENDS_LOAD_WIDGET, {
1444
+ ...W,
1445
+ time_period: `${Se(v.end, v.start)}M`
1343
1446
  });
1344
1447
  }));
1345
- }, [$, V, S]), u.useEffect(() => {
1346
- if (y.length !== 0) {
1347
- const W = {
1348
- accounts: K,
1349
- dateRange: { start: S.start, end: S.end }
1448
+ }, [Y, i, J, v]), g.useEffect(() => {
1449
+ if (T.length !== 0) {
1450
+ const k = {
1451
+ accounts: P,
1452
+ dateRange: { start: v.start, end: v.end }
1350
1453
  };
1351
- I({
1352
- ...W,
1353
- custom: (ee) => !!y.find(
1354
- (pe) => pe.top_level_category_guid === ee.top_level_category_guid || pe.category_guid === ee.category_guid
1454
+ M({
1455
+ ...k,
1456
+ custom: (oe) => !!T.find(
1457
+ (ge) => ge.top_level_category_guid === oe.top_level_category_guid || ge.category_guid === oe.category_guid
1355
1458
  )
1356
1459
  });
1357
1460
  }
1358
- }, [y]);
1359
- const me = (W) => {
1360
- H(W), ie(!0);
1461
+ }, [T]);
1462
+ const he = (k) => {
1463
+ K(k);
1361
1464
  }, Me = () => {
1362
- H(null), ie(!1);
1465
+ K(null), r(w.TRENDS_CLICK_BACK, W);
1363
1466
  }, Ae = () => {
1364
- U(!0), t(v.TRENDS_CLICK_CONNECT_ACCOUNTS);
1365
- }, gt = (W, ee) => {
1366
- he(ee ?? Y), t(v.TRENDS_CLICK_TOGGLE_VIEW, {
1367
- ...G,
1368
- toggleView: ee
1467
+ z(!0), r(w.TRENDS_CLICK_CONNECT_ACCOUNTS);
1468
+ }, Ct = (k, oe) => {
1469
+ ue(oe ?? B), r(w.TRENDS_CLICK_TOGGLE_VIEW, {
1470
+ ...W,
1471
+ toggleView: oe
1369
1472
  });
1370
- }, mt = (W) => {
1371
- const ee = Xe(W?.[0], 1), pe = W?.[1], Ct = Se(pe, ee);
1372
- N({ start: ee, end: pe }), t(v.TRENDS_CLICK_TIME_WINDOW, {
1373
- ...G,
1374
- time_period: Ct + "M"
1473
+ }, _t = (k) => {
1474
+ const oe = et(k?.[0], 1), ge = k?.[1], xt = Se(ge, oe);
1475
+ ae({ start: oe, end: ge }), r(w.TRENDS_CLICK_TIME_WINDOW, {
1476
+ ...W,
1477
+ time_period: xt + "M"
1375
1478
  });
1376
- }, pt = (W) => {
1377
- t(v.TRENDS_CLICK_FILTER, {
1378
- ...G,
1379
- filterValue: W
1479
+ }, bt = (k) => {
1480
+ r(w.TRENDS_CLICK_FILTER, {
1481
+ ...W,
1482
+ filterValue: k
1380
1483
  });
1381
- }, ft = (W) => {
1382
- ae(W);
1383
- }, yt = () => {
1384
- ae(""), t(v.TRENDS_CLICK_ALL_CATEGORIES, G);
1484
+ }, Tt = (k) => {
1485
+ le(k);
1486
+ }, St = () => {
1487
+ le(""), r(w.TRENDS_CLICK_ALL_CATEGORIES, W);
1385
1488
  };
1386
- if (!$ || !de || !w) return /* @__PURE__ */ e(Le, {});
1387
- const Ge = p && p.length === 0 || y.length === 0;
1489
+ if (!Y || !i || !j || !N)
1490
+ return /* @__PURE__ */ e(Le, {});
1491
+ const ze = m.length === 0 || T.length === 0, be = Xo(V, Ee, Ae);
1388
1492
  return /* @__PURE__ */ C(
1389
- rt,
1493
+ ut,
1390
1494
  {
1391
- calendarActions: { onRangeChanged: mt },
1392
- dateRange: S,
1393
- dateRangeVariant: h ? "timeframetabs" : "timeframebuttons",
1394
- onAccountsFilterClick: pt,
1395
- onBackClick: o,
1396
- sx: n,
1397
- title: E.title,
1495
+ calendarActions: { onRangeChanged: _t },
1496
+ dateRange: v,
1497
+ dateRangeVariant: u ? "timeframetabs" : "timeframebuttons",
1498
+ onAccountsFilterClick: bt,
1499
+ onBackClick: t,
1500
+ onMenuClick: n,
1501
+ sx: o,
1502
+ title: V.title,
1398
1503
  children: [
1399
- Ge && /* @__PURE__ */ e(
1400
- ao,
1401
- {
1402
- header: E.zero_state_content_header,
1403
- icon: "",
1404
- onClick: Ae,
1405
- primaryButton: E.empty_state_primary,
1406
- subText: E.empty_state_sub_text,
1407
- sx: { height: a },
1408
- variant: Ee
1409
- }
1410
- ),
1411
- !Ge && /* @__PURE__ */ C(
1412
- x,
1504
+ /* @__PURE__ */ C(
1505
+ S,
1413
1506
  {
1414
1507
  sx: {
1415
- px: h ? 0 : 48
1508
+ px: u ? 0 : 48
1416
1509
  },
1417
1510
  children: [
1418
1511
  /* @__PURE__ */ C(
1419
- x,
1512
+ S,
1420
1513
  {
1421
1514
  flexDirection: "row",
1422
1515
  justifyContent: "space-between",
1423
- sx: { gap: 8, px: h ? 24 : 0, py: 16 },
1516
+ sx: { px: u ? 16 : 0, py: 16 },
1424
1517
  children: [
1425
1518
  /* @__PURE__ */ e(
1426
- ut,
1519
+ ft,
1427
1520
  {
1428
- selectedCategoryGuid: j,
1429
- selectedDateRange: S
1521
+ selectedCategoryGuid: se,
1522
+ selectedDateRange: v
1430
1523
  }
1431
1524
  ),
1432
- /* @__PURE__ */ e(dt, { onTabChange: gt, selectedTab: Y })
1525
+ /* @__PURE__ */ e(pt, { onTabChange: Ct, selectedTab: B })
1433
1526
  ]
1434
1527
  }
1435
1528
  ),
1436
- /* @__PURE__ */ e(x, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(A, { flexGrow: 1, children: j && /* @__PURE__ */ C(be, { onClick: yt, sx: { p: 0, pr: 5 }, children: [
1437
- /* @__PURE__ */ e(Te, { name: "arrow_back" }),
1438
- E.all_categories
1529
+ /* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(H, { flexGrow: 1, children: se && /* @__PURE__ */ C(Te, { onClick: St, sx: { p: 0, pr: 5 }, children: [
1530
+ /* @__PURE__ */ e(ro, {}),
1531
+ V.all_categories
1439
1532
  ] }) }) }),
1440
- /* @__PURE__ */ C(x, { flexDirection: Z ? "row" : "column", gap: Z ? 48 : 16, children: [
1441
- Y === "Chart" && /* @__PURE__ */ C(_t, { children: [
1442
- /* @__PURE__ */ e(A, { sx: { width: Z ? "68%" : "100%" }, children: /* @__PURE__ */ e(
1443
- Oo,
1533
+ ze && /* @__PURE__ */ e(
1534
+ fo,
1535
+ {
1536
+ header: be.header,
1537
+ icon: "multiline_chart",
1538
+ onClick: be.onClickHandler,
1539
+ primaryButton: be.primaryButton,
1540
+ subText: be.description,
1541
+ sx: { height: l, maxWidth: 432 }
1542
+ }
1543
+ ),
1544
+ !ze && /* @__PURE__ */ C(S, { flexDirection: te ? "row" : "column", gap: te ? 48 : 16, children: [
1545
+ B === "Chart" && /* @__PURE__ */ C(vt, { children: [
1546
+ /* @__PURE__ */ e(H, { sx: { width: te ? "68%" : "100%" }, children: /* @__PURE__ */ e(
1547
+ jo,
1444
1548
  {
1445
- availableHeight: a,
1549
+ availableHeight: l,
1446
1550
  minHeight: 450,
1447
- selectedDateRange: S,
1448
- totals: y
1551
+ selectedDateRange: v,
1552
+ totals: T
1449
1553
  }
1450
1554
  ) }),
1451
- /* @__PURE__ */ C(x, { gap: 16, sx: { width: Z ? "32%" : "100%" }, children: [
1452
- se && F && _e.length > 0 && /* @__PURE__ */ e(
1453
- Ao,
1555
+ /* @__PURE__ */ C(S, { gap: 16, sx: { width: te ? "32%" : "100%" }, children: [
1556
+ ie && U && _e.length > 0 && /* @__PURE__ */ e(
1557
+ Vo,
1454
1558
  {
1455
1559
  beats: _e,
1456
1560
  onInsightCardClick: s
1457
1561
  }
1458
1562
  ),
1459
1563
  /* @__PURE__ */ e(
1460
- Eo,
1564
+ Bo,
1461
1565
  {
1462
- availableHeight: T,
1463
- onCategoryClick: me
1566
+ availableHeight: b,
1567
+ onCategoryClick: he
1464
1568
  }
1465
1569
  )
1466
1570
  ] })
1467
1571
  ] }),
1468
- Y === "Table" && /* @__PURE__ */ e(A, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1469
- ht,
1572
+ B === "Table" && /* @__PURE__ */ e(H, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1573
+ yt,
1470
1574
  {
1471
1575
  height: "unset",
1472
- onClickRow: ft,
1473
- selectedCategory: j,
1474
- selectedDateRange: S
1576
+ onClickRow: Tt,
1577
+ selectedCategory: se,
1578
+ selectedDateRange: v
1475
1579
  }
1476
1580
  ) })
1477
1581
  ] }),
1478
- ge && /* @__PURE__ */ e(ko, { onClose: Me })
1582
+ /* @__PURE__ */ e(
1583
+ Pe,
1584
+ {
1585
+ ariaLabelClose: V.close_category_details,
1586
+ isOpen: !!E,
1587
+ onClose: Me,
1588
+ shouldShowHeaderShadow: !0,
1589
+ title: E?.is_income ? V.category_income : V.category_spending,
1590
+ children: E && /* @__PURE__ */ e(Fo, {})
1591
+ }
1592
+ )
1479
1593
  ]
1480
1594
  }
1481
1595
  ),
1482
1596
  /* @__PURE__ */ e(
1483
- io,
1597
+ yo,
1484
1598
  {
1485
- onClose: () => U(!1),
1486
- showConnectWidget: L,
1487
- title: te.mini_title
1599
+ onClose: () => z(!1),
1600
+ showConnectWidget: I,
1601
+ title: O.mini_title
1488
1602
  }
1489
1603
  )
1490
1604
  ]
1491
1605
  }
1492
1606
  );
1493
- }, jn = R(Bo);
1607
+ }, ls = A(Zo);
1494
1608
  export {
1495
- $n as TrendsFullWidget,
1496
- Yn as TrendsMicroWidget,
1497
- Kn as TrendsMiniWidget,
1498
- Zn as TrendsStore,
1499
- jn as TrendsWidget
1609
+ rs as TrendsFullWidget,
1610
+ is as TrendsMicroWidget,
1611
+ as as TrendsMiniWidget,
1612
+ ls as TrendsWidget
1500
1613
  };