@mx-cartographer/experiences 9.7.206 → 10.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.
- package/CHANGELOG.md +5 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +2 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js +39 -23
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +3 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js +37 -33
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js.map +1 -1
- package/dist/accounts/utils/AccountFields.d.ts +3 -1
- package/dist/accounts/utils/AccountFields.es.js +39 -39
- package/dist/accounts/utils/AccountFields.es.js.map +1 -1
- package/dist/common/components/charts/LineChart.d.ts +4 -0
- package/dist/common/components/charts/LineChart.es.js +114 -112
- package/dist/common/components/charts/LineChart.es.js.map +1 -1
- package/dist/common/components/charts/linechart/CustomLegend.es.js +24 -21
- package/dist/common/components/charts/linechart/CustomLegend.es.js.map +1 -1
- package/dist/core/types/Insights.d.ts +9 -1
- package/dist/core/types/Insights.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +42 -0
- package/dist/core/types/localization/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.d.ts +7 -1
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js +39 -20
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.d.ts +4 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.es.js +42 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.d.ts +7 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.es.js +54 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +10 -10
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/CreateBudgetDialog.es.js +24 -23
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/CreateBudgetDialog.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +75 -73
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.d.ts +5 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js +21 -21
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.d.ts +11 -0
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js +65 -58
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +17 -17
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js +9 -10
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js +21 -22
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +35 -35
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js +44 -49
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +19 -16
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.d.ts +2 -2
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js +212 -166
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.d.ts +4 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.es.js +24 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.d.ts +6 -5
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js +38 -38
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +1 -1
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.d.ts +1 -5
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +37 -36
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.d.ts +9 -11
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js +12 -6
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +46 -40
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +141 -126
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +8 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +243 -200
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js +54 -53
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.d.ts +6 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js +14 -13
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.d.ts +4 -3
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js +24 -21
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +14 -4
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +79 -67
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.d.ts +3 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +48 -32
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +19 -14
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +19 -15
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +26 -19
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js +17 -21
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +11 -11
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +15 -11
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.d.ts +20 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.es.js +21 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +2 -4
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +78 -82
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.d.ts +10 -2
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js +115 -54
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +37 -36
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +27 -22
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +8 -8
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js +46 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/index.d.ts +3 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.d.ts +13 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js +22 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +29 -21
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.d.ts +0 -2
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +17 -21
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/FeeChargedBlock/FeeChargedBlock.es.js +5 -6
- package/dist/insights-v2/blocks/ComponentBlocks/FeeChargedBlock/FeeChargedBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.d.ts +3 -7
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.es.js +120 -306
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.d.ts +17 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.es.js +93 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.d.ts +5 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.es.js +21 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.d.ts +18 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.es.js +71 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.d.ts +82 -8
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.es.js +66 -15
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +46 -63
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +3 -3
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +44 -53
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +30 -31
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js +25 -20
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.d.ts +22 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.es.js +24 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.es.js +89 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.d.ts +43 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.es.js +28 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +54 -53
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +7 -3
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +20 -11
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +29 -28
- package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +2 -0
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js +6 -5
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js +117 -71
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js.map +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +10 -7
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/AccountHeroCard.d.ts +3 -1
- package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
- package/dist/insights-v2/components/BaseLayout.d.ts +3 -1
- package/dist/insights-v2/components/BaseLayout.es.js +134 -119
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/CompactDirectDepositCard.d.ts +28 -0
- package/dist/insights-v2/components/CompactDirectDepositCard.es.js +78 -0
- package/dist/insights-v2/components/CompactDirectDepositCard.es.js.map +1 -0
- package/dist/insights-v2/components/CompactInsightCard.es.js +122 -118
- package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
- package/dist/insights-v2/components/DirectDepositCard.d.ts +6 -1
- package/dist/insights-v2/components/DirectDepositCard.es.js +24 -22
- package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -1
- package/dist/insights-v2/components/LoadingCard.es.js +13 -9
- package/dist/insights-v2/components/LoadingCard.es.js.map +1 -1
- package/dist/insights-v2/components/LogoFromGuid.d.ts +1 -1
- package/dist/insights-v2/components/LogoFromGuid.es.js.map +1 -1
- package/dist/insights-v2/components/MerchantHighlightCard.es.js +4 -4
- package/dist/insights-v2/components/SaveAnExtraCard.d.ts +4 -1
- package/dist/insights-v2/components/SaveAnExtraCard.es.js +32 -20
- package/dist/insights-v2/components/SaveAnExtraCard.es.js.map +1 -1
- package/dist/insights-v2/components/SubTabs.d.ts +2 -1
- package/dist/insights-v2/components/SubTabs.es.js +29 -24
- package/dist/insights-v2/components/SubTabs.es.js.map +1 -1
- package/dist/insights-v2/components/TransactionListCard.d.ts +3 -1
- package/dist/insights-v2/components/TransactionListCard.es.js +39 -37
- package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
- package/dist/insights-v2/components/TransferLogoCard.es.js +1 -0
- package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
- package/dist/insights-v2/components/UpcomingBillCard.es.js +39 -35
- package/dist/insights-v2/components/UpcomingBillCard.es.js.map +1 -1
- package/dist/insights-v2/components/celebrationGradients.d.ts +17 -8
- package/dist/insights-v2/components/celebrationGradients.es.js +14 -14
- package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/ChartLegend.es.js +16 -10
- package/dist/insights-v2/components/chartblocks/ChartLegend.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.d.ts +10 -4
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +62 -61
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +13 -6
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js.map +1 -1
- package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js +2 -3
- package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js.map +1 -1
- package/dist/insights-v2/components/statusIcon.d.ts +2 -1
- package/dist/insights-v2/components/statusIcon.es.js +10 -8
- package/dist/insights-v2/components/statusIcon.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaConfig.es.js +19 -17
- package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaHandlers.d.ts +5 -1
- package/dist/insights-v2/ctaActions/ctaHandlers.es.js +71 -54
- package/dist/insights-v2/ctaActions/ctaHandlers.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaPostMessages.es.js +41 -24
- package/dist/insights-v2/ctaActions/ctaPostMessages.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/feedbackSurvey.d.ts +9 -0
- package/dist/insights-v2/ctaActions/feedbackSurvey.es.js +51 -0
- package/dist/insights-v2/ctaActions/feedbackSurvey.es.js.map +1 -0
- package/dist/insights-v2/ctaActions/runCtaAction.es.js +36 -35
- package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/types.d.ts +7 -0
- package/dist/insights-v2/index.es.js +126 -120
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +126 -122
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/dist/microinsights/MicroCardTemplate.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +53 -53
- package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +0 -13
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js +0 -296
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js.map +0 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { buildDynamicCopy as
|
|
2
|
-
import { useGlobalCopyStore as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { buildDynamicCopy as y } from "../../../../core/utils/Localization.es.js";
|
|
2
|
+
import { useGlobalCopyStore as C } from "../../../../common/context/hooks.es.js";
|
|
3
|
+
import { slot as R } from "../../../../core/types/Insights.es.js";
|
|
4
|
+
import { CURRENCY_FORMAT as _, formatCurrency as w } from "../../../../core/utils/NumberFormatting.es.js";
|
|
5
|
+
import { asNonEmptyText as L, asNumber as O, slotOrFlat as f } from "../../slotReaders.es.js";
|
|
6
|
+
import S, { isLogoGuid as G } from "../../../components/LogoFromGuid.es.js";
|
|
7
|
+
import g from "../../../components/LogoTile.es.js";
|
|
7
8
|
import i from "@mui/material/Stack";
|
|
8
9
|
import { Text as n } from "@mxenabled/mxui";
|
|
9
|
-
import { Icon as
|
|
10
|
+
import { Icon as j } from "@mxenabled/mx-icons";
|
|
10
11
|
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
12
|
+
var b = 6, c = 32, z = (r) => typeof r == "object" && r !== null, A = ({ row: r }) => {
|
|
13
|
+
if (G(r.logo?.guid)) return /* @__PURE__ */ o(S, {
|
|
13
14
|
logo: r.logo,
|
|
14
|
-
size:
|
|
15
|
+
size: c
|
|
15
16
|
});
|
|
16
17
|
const e = r.logo?.alt;
|
|
17
|
-
return /* @__PURE__ */ o(
|
|
18
|
+
return /* @__PURE__ */ o(j, {
|
|
18
19
|
"aria-hidden": e ? void 0 : !0,
|
|
19
20
|
"aria-label": e,
|
|
20
21
|
"data-icon": "storefront",
|
|
@@ -23,10 +24,10 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
|
|
|
23
24
|
size: 20,
|
|
24
25
|
sx: { color: "text.secondary" }
|
|
25
26
|
});
|
|
26
|
-
},
|
|
27
|
-
const e =
|
|
27
|
+
}, P = ({ payload: r }) => {
|
|
28
|
+
const e = C().insights_feed?.general, { instance_slot: a = {} } = r, m = O(f(a, "amount"));
|
|
28
29
|
if (m === void 0) return null;
|
|
29
|
-
const p =
|
|
30
|
+
const p = f(a, "data_series"), t = (Array.isArray(p) ? p : []).filter(z), u = t.length > b ? t.slice(0, 5) : t, s = t.length - u.length, h = t.length >= b, d = y(e?.more_merchants ?? "", `${s}`) || void 0;
|
|
30
31
|
return /* @__PURE__ */ o(i, {
|
|
31
32
|
sx: {
|
|
32
33
|
px: 16,
|
|
@@ -51,42 +52,42 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
|
|
|
51
52
|
children: [/* @__PURE__ */ o(n, {
|
|
52
53
|
component: "p",
|
|
53
54
|
variant: "h2",
|
|
54
|
-
children:
|
|
55
|
+
children: w(m, _.cents)
|
|
55
56
|
}), /* @__PURE__ */ o(n, {
|
|
56
57
|
color: "text.secondary",
|
|
57
58
|
variant: "caption",
|
|
58
|
-
children: e?.total
|
|
59
|
+
children: L(R(a.data, "amount_label")) ?? e?.total
|
|
59
60
|
})]
|
|
60
61
|
}), t.length ? /* @__PURE__ */ l(i, {
|
|
61
62
|
component: "ul",
|
|
62
63
|
direction: "row",
|
|
63
64
|
sx: {
|
|
64
65
|
flexWrap: "wrap",
|
|
65
|
-
gap: 8,
|
|
66
|
-
justifyContent:
|
|
66
|
+
gap: h ? 8 : 12,
|
|
67
|
+
justifyContent: h ? "space-between" : "flex-start",
|
|
67
68
|
listStyle: "none",
|
|
68
69
|
m: 0,
|
|
69
70
|
p: 0
|
|
70
71
|
},
|
|
71
|
-
children: [u.map((
|
|
72
|
+
children: [u.map((v, x) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(g, {
|
|
72
73
|
borderColor: "divider",
|
|
73
74
|
borderRadius: 4,
|
|
74
|
-
size:
|
|
75
|
-
children: /* @__PURE__ */ o(
|
|
76
|
-
}) },
|
|
75
|
+
size: c,
|
|
76
|
+
children: /* @__PURE__ */ o(A, { row: v })
|
|
77
|
+
}) }, x)), s > 0 && /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(g, {
|
|
77
78
|
bgcolor: "action.hover",
|
|
78
79
|
borderColor: null,
|
|
79
80
|
borderRadius: 4,
|
|
80
|
-
size:
|
|
81
|
+
size: c,
|
|
81
82
|
children: /* @__PURE__ */ o(n, {
|
|
82
|
-
"aria-label":
|
|
83
|
+
"aria-label": d,
|
|
83
84
|
bold: !0,
|
|
84
85
|
color: "text.secondary",
|
|
85
|
-
role:
|
|
86
|
+
role: d ? "img" : void 0,
|
|
86
87
|
variant: "body2",
|
|
87
88
|
children: /* @__PURE__ */ l("span", {
|
|
88
|
-
"aria-hidden":
|
|
89
|
-
children: ["+",
|
|
89
|
+
"aria-hidden": d ? !0 : void 0,
|
|
90
|
+
children: ["+", s]
|
|
90
91
|
})
|
|
91
92
|
})
|
|
92
93
|
}) })]
|
|
@@ -99,7 +100,7 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
|
|
|
99
100
|
});
|
|
100
101
|
};
|
|
101
102
|
export {
|
|
102
|
-
|
|
103
|
+
P as default
|
|
103
104
|
};
|
|
104
105
|
|
|
105
106
|
//# sourceMappingURL=WeeklySmallPurchasesBlock.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeeklySmallPurchasesBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport type
|
|
1
|
+
{"version":3,"file":"WeeklySmallPurchasesBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { slot, type InstanceSlotRow } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid, { isLogoGuid } from '../../../components/LogoFromGuid'\nimport LogoTile from '../../../components/LogoTile'\nimport { asNonEmptyText, asNumber, slotOrFlat } from '../../slotReaders'\nimport type { BlockProps } from '../../types'\n\nconst MAX_LOGOS = 6\nconst LOGO_SIZE = 32\n\nconst isRow = (row: unknown): row is InstanceSlotRow => typeof row === 'object' && row !== null\n\nconst RowLogo = ({ row }: { row: InstanceSlotRow }) => {\n if (isLogoGuid(row.logo?.guid)) return <LogoFromGuid logo={row.logo} size={LOGO_SIZE} />\n\n const alt = row.logo?.alt\n return (\n <Icon\n aria-hidden={alt ? undefined : true}\n aria-label={alt}\n data-icon=\"storefront\"\n name=\"storefront\"\n role={alt ? 'img' : undefined}\n size={20}\n sx={{ color: 'text.secondary' }}\n />\n )\n}\n\nconst WeeklySmallPurchasesBlock = ({ payload }: BlockProps) => {\n const generalCopy = useGlobalCopyStore().insights_feed?.general\n\n const { instance_slot = {} } = payload\n const amount = asNumber(slotOrFlat(instance_slot, 'amount'))\n if (amount === undefined) return null\n\n const rawRows = slotOrFlat(instance_slot, 'data_series')\n const rows = (Array.isArray(rawRows) ? rawRows : []).filter(isRow)\n // Past 6, the last tile becomes \"+N\" so the row stays at 6 tiles like Figma.\n const visibleRows = rows.length > MAX_LOGOS ? rows.slice(0, MAX_LOGOS - 1) : rows\n const overflowCount = rows.length - visibleRows.length\n const isFullRow = rows.length >= MAX_LOGOS\n const moreLabel =\n (buildDynamicCopy(generalCopy?.more_merchants ?? '', `${overflowCount}`) as string) || undefined\n\n return (\n <Stack sx={{ px: 16, width: '100%' }}>\n <Stack\n sx={{\n border: 1,\n borderColor: 'divider',\n borderRadius: '8px',\n gap: 12,\n pb: 16,\n pt: 12,\n px: 16,\n }}\n >\n <Stack direction=\"row\" sx={{ alignItems: 'baseline', gap: 6 }}>\n <Text component=\"p\" variant=\"h2\">\n {formatCurrency(amount, CURRENCY_FORMAT.cents)}\n </Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {/* V2 only: V1 payloads never carried the label, so there is no flat fallback. */}\n {asNonEmptyText(slot(instance_slot.data, 'amount_label')) ?? generalCopy?.total}\n </Text>\n </Stack>\n {rows.length ? (\n <Stack\n component=\"ul\"\n direction=\"row\"\n sx={{\n flexWrap: 'wrap',\n // Figma spaces tiles 12px; a full row spreads to that at 320px, and its 8px floor\n // keeps six tiles on one line down to ~300px.\n gap: isFullRow ? 8 : 12,\n justifyContent: isFullRow ? 'space-between' : 'flex-start',\n listStyle: 'none',\n m: 0,\n p: 0,\n }}\n >\n {visibleRows.map((row, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <li key={index}>\n <LogoTile borderColor=\"divider\" borderRadius={4} size={LOGO_SIZE}>\n <RowLogo row={row} />\n </LogoTile>\n </li>\n ))}\n {overflowCount > 0 && (\n <li>\n <LogoTile\n bgcolor=\"action.hover\"\n borderColor={null}\n borderRadius={4}\n size={LOGO_SIZE}\n >\n <Text\n aria-label={moreLabel}\n bold={true}\n color=\"text.secondary\"\n role={moreLabel ? 'img' : undefined}\n variant=\"body2\"\n >\n <span aria-hidden={moreLabel ? true : undefined}>+{overflowCount}</span>\n </Text>\n </LogoTile>\n </li>\n )}\n </Stack>\n ) : (\n <Text color=\"text.secondary\" variant=\"body2\">\n {generalCopy?.no_small_purchases_found}\n </Text>\n )}\n </Stack>\n </Stack>\n )\n}\n\nexport default WeeklySmallPurchasesBlock\n"],"mappings":"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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './AccountBlock';
|
|
2
2
|
export * from './AccountSwitchBlock';
|
|
3
3
|
export * from './BudgetBlock';
|
|
4
|
+
export * from './CompactDirectDepositBlock';
|
|
4
5
|
export * from './DebtsBlock';
|
|
5
6
|
export * from './DetailedAccountBlock';
|
|
6
7
|
export * from './GasPurchaseBlock';
|
|
@@ -19,3 +20,4 @@ export * from './WeeklySmallPurchasesBlock';
|
|
|
19
20
|
export * from './WithdrawalBlock';
|
|
20
21
|
export * from './FeedbackBlock';
|
|
21
22
|
export * from './FeeChargedBlock';
|
|
23
|
+
export * from './StrategiesBlock';
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { slot as s } from "../../../core/types/Insights.es.js";
|
|
2
|
-
import { CURRENCY_FORMAT as
|
|
2
|
+
import { CURRENCY_FORMAT as c, formatCurrency as p } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
3
|
import l from "@mui/material/Stack";
|
|
4
4
|
import { Text as h } from "@mxenabled/mxui";
|
|
5
5
|
import { jsx as o } from "react/jsx-runtime";
|
|
6
6
|
import { alpha as u } from "@mui/material/styles";
|
|
7
7
|
import d from "@mui/material/Box";
|
|
8
|
-
var
|
|
9
|
-
const { data: r } = a.instance_slot, t = s(r, "amount"), n = typeof t == "number" && Number.isFinite(t),
|
|
8
|
+
var g = { cash_back: "https://content.moneydesktop.com/storage/MD_Assets/md/insights/CashBack.png" }, _ = ({ payload: a }) => {
|
|
9
|
+
const { data: r } = a.instance_slot, t = s(r, "amount"), n = typeof t == "number" && Number.isFinite(t), i = s(r, "image") ?? "", e = g[i];
|
|
10
10
|
return /* @__PURE__ */ o(l, {
|
|
11
11
|
justifyContent: "flex-end",
|
|
12
12
|
sx: {
|
|
13
13
|
background: e ? `url(${e}) no-repeat top / cover` : void 0,
|
|
14
14
|
height: 175,
|
|
15
|
+
maxHeight: "100%",
|
|
15
16
|
width: "100%"
|
|
16
17
|
},
|
|
17
18
|
children: /* @__PURE__ */ o(d, {
|
|
18
19
|
sx: {
|
|
19
20
|
backdropFilter: "blur(3px)",
|
|
20
|
-
bgcolor: (
|
|
21
|
+
bgcolor: (m) => u(m.palette.success.light, 0.75),
|
|
21
22
|
height: 56,
|
|
22
23
|
p: 8,
|
|
23
24
|
pl: 16
|
|
@@ -25,7 +26,7 @@ var f = { cash_back: "https://content.moneydesktop.com/storage/MD_Assets/md/insi
|
|
|
25
26
|
children: /* @__PURE__ */ o(h, {
|
|
26
27
|
color: "success.dark",
|
|
27
28
|
variant: "h1",
|
|
28
|
-
children: n ? p(t,
|
|
29
|
+
children: n ? p(t, c.cents) : null
|
|
29
30
|
})
|
|
30
31
|
})
|
|
31
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageBlock.es.js","names":[],"sources":["../../../../src/insights-v2/blocks/ImageBlocks/ImageBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { alpha } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { slot, type InsightsPayload } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\n\nconst INSIGHTS_ASSETS_URL = 'https://content.moneydesktop.com/storage/MD_Assets/md/insights'\n\nconst imageMap: Record<string, string> = {\n cash_back: `${INSIGHTS_ASSETS_URL}/CashBack.png`,\n}\n\nconst ImageBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n // V2 contract carries the block's slots on `instance_slot.data` (not the V1 `instance_slot_data`).\n const { data } = payload.instance_slot\n const amount = slot<number>(data, 'amount')\n const hasAmount = typeof amount === 'number' && Number.isFinite(amount)\n const image = slot<string>(data, 'image') ?? ''\n // Only draw the background when the asset is known; an unmapped image would otherwise produce\n // `url(undefined)` and a broken request.\n const asset = imageMap[image]\n\n return (\n <Stack\n justifyContent=\"flex-end\"\n sx={{\n background: asset ? `url(${asset}) no-repeat top / cover` : undefined,\n height: 175,\n width: '100%',\n }}\n >\n {/* The blur lets the image read through the amount band. */}\n <Box\n sx={{\n backdropFilter: 'blur(3px)',\n bgcolor: (theme) => alpha(theme.palette.success.light, 0.75),\n height: 56,\n p: 8,\n pl: 16,\n }}\n >\n <Text color=\"success.dark\" variant=\"h1\">\n {hasAmount ? formatCurrency(amount, CURRENCY_FORMAT.cents) : null}\n </Text>\n </Box>\n </Stack>\n )\n}\n\nexport default ImageBlock\n"],"mappings":";;;;;;;AAWA,IAAM,IAAmC,EACvC,WAAW,8EACb,GAEM,IAAA,CAAc,EAAE,SAAA,EAAA,MAA+D;AAEnF,QAAM,EAAE,MAAA,EAAA,IAAS,EAAQ,eACnB,IAAS,EAAa,GAAM,QAAQ,GACpC,IAAY,OAAO,KAAW,YAAY,OAAO,SAAS,CAAM,GAChE,IAAQ,EAAa,GAAM,OAAO,KAAK,IAGvC,IAAQ,EAAS,CAAA;AAEvB,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAe;AAAA,IACf,IAAI;AAAA,MACF,YAAY,IAAQ,OAAO,CAAA,4BAAiC;AAAA,MAC5D,QAAQ;AAAA,
|
|
1
|
+
{"version":3,"file":"ImageBlock.es.js","names":[],"sources":["../../../../src/insights-v2/blocks/ImageBlocks/ImageBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { alpha } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { slot, type InsightsPayload } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\n\nconst INSIGHTS_ASSETS_URL = 'https://content.moneydesktop.com/storage/MD_Assets/md/insights'\n\nconst imageMap: Record<string, string> = {\n cash_back: `${INSIGHTS_ASSETS_URL}/CashBack.png`,\n}\n\nconst ImageBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n // V2 contract carries the block's slots on `instance_slot.data` (not the V1 `instance_slot_data`).\n const { data } = payload.instance_slot\n const amount = slot<number>(data, 'amount')\n const hasAmount = typeof amount === 'number' && Number.isFinite(amount)\n const image = slot<string>(data, 'image') ?? ''\n // Only draw the background when the asset is known; an unmapped image would otherwise produce\n // `url(undefined)` and a broken request.\n const asset = imageMap[image]\n\n return (\n <Stack\n justifyContent=\"flex-end\"\n sx={{\n background: asset ? `url(${asset}) no-repeat top / cover` : undefined,\n height: 175,\n // Shrinks into a shorter fixed-height slot (the mini card's), so the band stays at the bottom.\n maxHeight: '100%',\n width: '100%',\n }}\n >\n {/* The blur lets the image read through the amount band. */}\n <Box\n sx={{\n backdropFilter: 'blur(3px)',\n bgcolor: (theme) => alpha(theme.palette.success.light, 0.75),\n height: 56,\n p: 8,\n pl: 16,\n }}\n >\n <Text color=\"success.dark\" variant=\"h1\">\n {hasAmount ? formatCurrency(amount, CURRENCY_FORMAT.cents) : null}\n </Text>\n </Box>\n </Stack>\n )\n}\n\nexport default ImageBlock\n"],"mappings":";;;;;;;AAWA,IAAM,IAAmC,EACvC,WAAW,8EACb,GAEM,IAAA,CAAc,EAAE,SAAA,EAAA,MAA+D;AAEnF,QAAM,EAAE,MAAA,EAAA,IAAS,EAAQ,eACnB,IAAS,EAAa,GAAM,QAAQ,GACpC,IAAY,OAAO,KAAW,YAAY,OAAO,SAAS,CAAM,GAChE,IAAQ,EAAa,GAAM,OAAO,KAAK,IAGvC,IAAQ,EAAS,CAAA;AAEvB,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAe;AAAA,IACf,IAAI;AAAA,MACF,YAAY,IAAQ,OAAO,CAAA,4BAAiC;AAAA,MAC5D,QAAQ;AAAA,MAER,WAAW;AAAA,MACX,OAAO;AAAA,IACT;AAAA,IAGA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,gBAAgB;AAAA,QAChB,SAAA,CAAU,MAAU,EAAM,EAAM,QAAQ,QAAQ,OAAO,IAAI;AAAA,QAC3D,QAAQ;AAAA,QACR,GAAG;AAAA,QACH,IAAI;AAAA,MACN;AAAA,MAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAM;AAAA,QAAe,SAAQ;AAAA,QAChC,UAAA,IAAY,EAAe,GAAQ,EAAgB,KAAK,IAAI;AAAA,MACzD,CAAA;AAAA,IACH,CAAA;AAAA,EACA,CAAA;AAEX"}
|